cortex-react-components 2.13.14 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/{chunk-GETYSIZV.mjs → chunk-255P6K5W.mjs} +1 -1
  2. package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
  3. package/dist/{chunk-P6OSMPUQ.mjs → chunk-2RQDJ5XT.mjs} +1 -1
  4. package/dist/chunk-3BG2SCNC.mjs +1 -0
  5. package/dist/{chunk-BQQ4V4PX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
  6. package/dist/{chunk-R6AYIVIR.mjs → chunk-5WVFEIMC.mjs} +1 -1
  7. package/dist/chunk-5Y6FKL5W.mjs +4 -0
  8. package/dist/{chunk-QQFIVSBW.mjs → chunk-62A35O55.mjs} +1 -1
  9. package/dist/{chunk-GAZHKHGB.mjs → chunk-67QPOSVV.mjs} +1 -1
  10. package/dist/chunk-6OT5PQXV.mjs +13 -0
  11. package/dist/{chunk-7OMPPFGG.mjs → chunk-7GMAMIHM.mjs} +1 -1
  12. package/dist/{chunk-TO7SVJIU.mjs → chunk-A2KX5N75.mjs} +1 -1
  13. package/dist/{chunk-2GM2LPLB.mjs → chunk-ERJXTG6X.mjs} +1 -1
  14. package/dist/chunk-EW6KWAHS.mjs +4 -0
  15. package/dist/{chunk-HDKHF3EA.mjs → chunk-FKU4VQR6.mjs} +1 -1
  16. package/dist/{chunk-F64CA5CH.mjs → chunk-H3CJOE6S.mjs} +1 -1
  17. package/dist/{chunk-U3FYDDE2.mjs → chunk-HKGW6JI2.mjs} +1 -1
  18. package/dist/{chunk-KZAYLEFB.mjs → chunk-I2GNNRFH.mjs} +1 -1
  19. package/dist/{chunk-PNUBVBSR.mjs → chunk-IF3425JX.mjs} +1 -1
  20. package/dist/{chunk-GLBQHEMQ.mjs → chunk-JTVWQ42C.mjs} +1 -1
  21. package/dist/{chunk-PTZT4QJW.mjs → chunk-LJQPLE4S.mjs} +1 -1
  22. package/dist/{chunk-2OOJ4ZFB.mjs → chunk-M7NV6EFH.mjs} +1 -1
  23. package/dist/{chunk-4SRUEQTP.mjs → chunk-MXCW6SOT.mjs} +1 -1
  24. package/dist/{chunk-FYQBRCQM.mjs → chunk-N3B3XNV3.mjs} +1 -1
  25. package/dist/{chunk-FEWOSBUJ.mjs → chunk-NWISIJFD.mjs} +1 -1
  26. package/dist/{chunk-RIRZRO6U.mjs → chunk-P55W6AFU.mjs} +1 -1
  27. package/dist/{chunk-MO4HRQEL.mjs → chunk-PK3OBSCB.mjs} +1 -1
  28. package/dist/{chunk-T5HJS6OF.mjs → chunk-RSDUFAIB.mjs} +1 -1
  29. package/dist/{chunk-DPZHVBGG.mjs → chunk-RX63ABAF.mjs} +1 -1
  30. package/dist/{chunk-PKEBARQB.mjs → chunk-TILPSVAP.mjs} +1 -1
  31. package/dist/chunk-UTHKFW4R.mjs +1 -0
  32. package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
  33. package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
  34. package/dist/{chunk-OQCMTGML.mjs → chunk-XKGBG5FX.mjs} +1 -1
  35. package/dist/{chunk-HKMNAXLM.mjs → chunk-YKG4FNS4.mjs} +1 -1
  36. package/dist/components/Blocks/Banner.mjs +1 -1
  37. package/dist/components/Blocks/CallToAction.mjs +1 -1
  38. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  39. package/dist/components/Blocks/Content.mjs +1 -1
  40. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  41. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  42. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  43. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  44. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  45. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  46. package/dist/components/Blocks/index.mjs +1 -1
  47. package/dist/components/Cards/ContentCard.mjs +1 -1
  48. package/dist/components/Cards/FeatureCard.mjs +1 -1
  49. package/dist/components/Cards/index.mjs +1 -1
  50. package/dist/components/Chat/ChatInterface.js +13 -3
  51. package/dist/components/Chat/ChatInterface.mjs +1 -1
  52. package/dist/components/Chat/Components/ApprovalRequest.d.ts +12 -0
  53. package/dist/components/Chat/Components/ApprovalRequest.js +13 -0
  54. package/dist/components/Chat/Components/ApprovalRequest.mjs +2 -0
  55. package/dist/components/Chat/CopilotInterface.js +14 -4
  56. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  57. package/dist/components/Chat/PartTypes/PartApprovalTool.d.ts +15 -0
  58. package/dist/components/Chat/PartTypes/PartApprovalTool.js +13 -0
  59. package/dist/components/Chat/PartTypes/PartApprovalTool.mjs +1 -0
  60. package/dist/components/Chat/PartTypes/Reasoning.css +1 -0
  61. package/dist/components/Chat/PartTypes/Reasoning.d.ts +16 -0
  62. package/dist/components/Chat/PartTypes/Reasoning.js +5 -0
  63. package/dist/components/Chat/PartTypes/Reasoning.mjs +2 -0
  64. package/dist/components/Chat/PartTypes/Response.css +1 -0
  65. package/dist/components/Chat/PartTypes/Response.d.ts +5 -0
  66. package/dist/components/Chat/PartTypes/Response.js +4 -0
  67. package/dist/components/Chat/PartTypes/Response.mjs +2 -0
  68. package/dist/components/Chat/PartTypes/index.css +1 -0
  69. package/dist/components/Chat/PartTypes/index.d.ts +3 -0
  70. package/dist/components/Chat/PartTypes/index.js +14 -4
  71. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  72. package/dist/components/Chat/demo-long-messages.js +20 -10
  73. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  74. package/dist/components/Chat/demo-tests.js +36 -26
  75. package/dist/components/Chat/demo-tests.mjs +1 -1
  76. package/dist/components/Chat/demo.js +14 -4
  77. package/dist/components/Chat/demo.mjs +1 -1
  78. package/dist/components/Chat/example-usage.js +14 -4
  79. package/dist/components/Chat/example-usage.mjs +1 -1
  80. package/dist/components/Chat/example-with-vercel-ai.js +14 -4
  81. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  82. package/dist/components/Chat/index.d.ts +2 -0
  83. package/dist/components/Chat/index.js +14 -4
  84. package/dist/components/Chat/index.mjs +1 -1
  85. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  86. package/dist/components/DigitalColleagues/index.mjs +1 -1
  87. package/dist/components/Foundary/MainPage.mjs +1 -1
  88. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  89. package/dist/components/Foundary/Views/index.mjs +1 -1
  90. package/dist/components/Foundary/index.mjs +1 -1
  91. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  92. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  93. package/dist/components/HeaderFooter/index.mjs +1 -1
  94. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  95. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  96. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  97. package/dist/components/Heros/RenderHero.mjs +1 -1
  98. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  99. package/dist/components/Heros/index.mjs +1 -1
  100. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  101. package/dist/components/Layouts/Print.mjs +1 -1
  102. package/dist/components/Layouts/SlideShow.mjs +1 -1
  103. package/dist/components/Layouts/index.mjs +1 -1
  104. package/dist/components/Other/index.mjs +1 -1
  105. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  106. package/dist/components/Payload/Media/index.mjs +1 -1
  107. package/dist/components/Payload/PayloadCard/index.mjs +1 -1
  108. package/dist/components/Payload/RichText/index.mjs +1 -1
  109. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  110. package/dist/components/Payload/index.mjs +1 -1
  111. package/dist/components/index.js +22 -13
  112. package/dist/components/index.mjs +1 -1
  113. package/dist/globals.css +1 -1
  114. package/dist/index.js +28 -19
  115. package/dist/index.mjs +1 -1
  116. package/dist/metafile-cjs.json +1 -1
  117. package/dist/metafile-esm.json +1 -1
  118. package/dist/pages/Blog.mjs +1 -1
  119. package/dist/pages/Documentation.mjs +1 -1
  120. package/dist/pages/IndexPage.mjs +1 -1
  121. package/dist/pages/Intranet.mjs +1 -1
  122. package/dist/pages/LandingPage.mjs +1 -1
  123. package/dist/pages/Page.mjs +1 -1
  124. package/dist/pages/Publish.mjs +1 -1
  125. package/dist/pages/Website.mjs +1 -1
  126. package/dist/sections/AboutSection.mjs +1 -1
  127. package/dist/sections/BlogDetail.mjs +1 -1
  128. package/dist/sections/BlogList.mjs +1 -1
  129. package/dist/sections/BlogListSection.mjs +1 -1
  130. package/dist/sections/ContactSection.mjs +1 -1
  131. package/dist/sections/PageSections.mjs +1 -1
  132. package/dist/sections/PricingSection.mjs +1 -1
  133. package/dist/sections/ServiceDetail.mjs +1 -1
  134. package/dist/sections/ServiceDetailSection.mjs +1 -1
  135. package/dist/sections/ServiceSection.mjs +1 -1
  136. package/dist/sections/index.mjs +1 -1
  137. package/package.json +6 -4
  138. package/dist/chunk-FDRX3CL2.mjs +0 -1
@@ -1,11 +1,21 @@
1
1
  "use client";
2
2
  "use strict";
3
3
  "use client"
4
+ 'use client';
4
5
 
5
- "use strict";var Ct=Object.create;var Pe=Object.defineProperty;var Nt=Object.getOwnPropertyDescriptor;var kt=Object.getOwnPropertyNames;var At=Object.getPrototypeOf,Pt=Object.prototype.hasOwnProperty;var Rt=(e,t)=>{for(var r in t)Pe(e,r,{get:t[r],enumerable:!0})},$e=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of kt(t))!Pt.call(e,s)&&s!==r&&Pe(e,s,{get:()=>t[s],enumerable:!(o=Nt(t,s))||o.enumerable});return e};var G=(e,t,r)=>(r=e!=null?Ct(At(e)):{},$e(t||!e||!e.__esModule?Pe(r,"default",{value:e,enumerable:!0}):r,e)),Tt=e=>$e(Pe({},"__esModule",{value:!0}),e);var br={};Rt(br,{ChatInterface:()=>fr});module.exports=Tt(br);var U=require("react"),le=G(require("motion/react-client")),k=require("lucide-react");var Re=G(require("react")),K=G(require("@radix-ui/react-avatar"));var Xe=require("clsx");var De="-",St=e=>{let t=Lt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let i=l.split(De);return i[0]===""&&i.length!==1&&i.shift(),We(i,t)||Mt(l)},getConflictingClassGroupIds:(l,i)=>{let u=r[l]||[];return i&&o[l]?[...u,...o[l]]:u}}},We=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?We(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(De);return t.validators.find(({validator:l})=>l(n))?.classGroupId},je=/^\[(.+)\]$/,Mt=e=>{if(je.test(e)){let t=je.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Lt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Dt(Object.entries(e.classGroups),r).forEach(([n,l])=>{Ie(l,o,n,t)}),o},Ie=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:Ue(t,s);n.classGroupId=r;return}if(typeof s=="function"){if(It(s)){Ie(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([n,l])=>{Ie(l,Ue(t,n),r,o)})})},Ue=(e,t)=>{let r=e;return t.split(De).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},It=e=>e.isThemeGetter,Dt=(e,t)=>t?e.map(([r,o])=>{let s=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,i])=>[t+l,i])):n);return[r,s]}):e,Et=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(n,l)=>{r.set(n,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let l=r.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return s(n,l),l},set(n,l){r.has(n)?r.set(n,l):s(n,l)}}},Ke="!",zt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],n=t.length,l=i=>{let u=[],f=0,x=0,g;for(let y=0;y<i.length;y++){let T=i[y];if(f===0){if(T===s&&(o||i.slice(y,y+n)===t)){u.push(i.slice(x,y)),x=y+n;continue}if(T==="/"){g=y;continue}}T==="["?f++:T==="]"&&f--}let b=u.length===0?i:i.substring(x),P=b.startsWith(Ke),S=P?b.substring(1):b,A=g&&g>x?g-x:void 0;return{modifiers:u,hasImportantModifier:P,baseClassName:S,maybePostfixModifierPosition:A}};return r?i=>r({className:i,parseClassName:l}):l},Bt=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},Ht=e=>({cache:Et(e.cacheSize),parseClassName:zt(e),...St(e)}),Ft=/\s+/,Vt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,n=[],l=e.trim().split(Ft),i="";for(let u=l.length-1;u>=0;u-=1){let f=l[u],{modifiers:x,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:P}=r(f),S=!!P,A=o(S?b.substring(0,P):b);if(!A){if(!S){i=f+(i.length>0?" "+i:i);continue}if(A=o(b),!A){i=f+(i.length>0?" "+i:i);continue}S=!1}let y=Bt(x).join(":"),T=g?y+Ke:y,D=T+A;if(n.includes(D))continue;n.push(D);let v=s(A,S);for(let M=0;M<v.length;++M){let te=v[M];n.push(T+te)}i=f+(i.length>0?" "+i:i)}return i};function Gt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=_e(t))&&(o&&(o+=" "),o+=r);return o}var _e=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=_e(e[o]))&&(r&&(r+=" "),r+=t);return r};function Ot(e,...t){let r,o,s,n=l;function l(u){let f=t.reduce((x,g)=>g(x),e());return r=Ht(f),o=r.cache.get,s=r.cache.set,n=i,i(u)}function i(u){let f=o(u);if(f)return f;let x=Vt(u,r);return s(u,x),x}return function(){return n(Gt.apply(null,arguments))}}var N=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},qe=/^\[(?:([Te-z-]+):)?(.+)\]$/i,$t=/^\d+\/\d+$/,jt=new Set(["px","full","screen"]),Ut=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wt=/\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$/,Kt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_t=/^(inset_)?-?((\d+)?\.?(\d+)[Te-z]+|0)_-?((\d+)?\.?(\d+)[Te-z]+|0)/,qt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,W=e=>de(e)||jt.has(e)||$t.test(e),Z=e=>pe(e,"length",rr),de=e=>!!e&&!Number.isNaN(Number(e)),Le=e=>pe(e,"number",de),fe=e=>!!e&&Number.isInteger(Number(e)),Jt=e=>e.endsWith("%")&&de(e.slice(0,-1)),m=e=>qe.test(e),Y=e=>Ut.test(e),Qt=new Set(["length","size","percentage"]),Xt=e=>pe(e,Qt,Je),Zt=e=>pe(e,"position",Je),Yt=new Set(["image","url"]),er=e=>pe(e,Yt,or),tr=e=>pe(e,"",ar),be=()=>!0,pe=(e,t,r)=>{let o=qe.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},rr=e=>Wt.test(e)&&!Kt.test(e),Je=()=>!1,ar=e=>_t.test(e),or=e=>qt.test(e);var nr=()=>{let e=N("colors"),t=N("spacing"),r=N("blur"),o=N("brightness"),s=N("borderColor"),n=N("borderRadius"),l=N("borderSpacing"),i=N("borderWidth"),u=N("contrast"),f=N("grayscale"),x=N("hueRotate"),g=N("invert"),b=N("gap"),P=N("gradientColorStops"),S=N("gradientColorStopPositions"),A=N("inset"),y=N("margin"),T=N("opacity"),D=N("padding"),v=N("saturate"),M=N("scale"),te=N("sepia"),Se=N("skew"),me=N("space"),we=N("translate"),re=()=>["auto","contain","none"],Ce=()=>["auto","hidden","clip","visible","scroll"],ge=()=>["auto",m,t],w=()=>[m,t],Ne=()=>["",W,Z],ce=()=>["auto",de,m],ke=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ae=()=>["solid","dashed","dotted","double","none"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],c=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",m],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>[de,m];return{cacheSize:500,separator:":",theme:{colors:[be],spacing:[W,Z],blur:["none","",Y,m],brightness:C(),borderColor:[e],borderRadius:["none","","full",Y,m],borderSpacing:w(),borderWidth:Ne(),contrast:C(),grayscale:R(),hueRotate:C(),invert:R(),gap:w(),gradientColorStops:[e],gradientColorStopPositions:[Jt,Z],inset:ge(),margin:ge(),opacity:C(),padding:w(),saturate:C(),scale:C(),sepia:R(),skew:C(),space:w(),translate:w()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[Y]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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:[...ke(),m]}],overflow:[{overflow:Ce()}],"overflow-x":[{"overflow-x":Ce()}],"overflow-y":[{"overflow-y":Ce()}],overscroll:[{overscroll:re()}],"overscroll-x":[{"overscroll-x":re()}],"overscroll-y":[{"overscroll-y":re()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[A]}],"inset-x":[{"inset-x":[A]}],"inset-y":[{"inset-y":[A]}],start:[{start:[A]}],end:[{end:[A]}],top:[{top:[A]}],right:[{right:[A]}],bottom:[{bottom:[A]}],left:[{left:[A]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fe,m]}],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",m]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",fe,m]}],"grid-cols":[{"grid-cols":[be]}],"col-start-end":[{col:["auto",{span:["full",fe,m]},m]}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":[be]}],"row-start-end":[{row:["auto",{span:[fe,m]},m]}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...c()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...c(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...c(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],Te:[{Te:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],k:[{k:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[me]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[me]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[Y]},Y]}],h:[{h:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Y,Z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Le]}],"font-family":[{font:[be]}],"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",m]}],"line-clamp":[{"line-clamp":["none",de,Le]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",W,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[T]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",W,Z]}],"underline-offset":[{"underline-offset":["auto",W,m]}],"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:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],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",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[T]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ke(),Zt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Xt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},er]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[P]}],"gradient-via":[{via:[P]}],"gradient-to":[{to:[P]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-U":[{"rounded-U":[n]}],"rounded-Te":[{"rounded-Te":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[T]}],"border-style":[{border:[...ae(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[T]}],"divide-style":[{divide:ae()}],"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:["",...ae()]}],"outline-offset":[{"outline-offset":[W,m]}],"outline-w":[{outline:[W,Z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[T]}],"ring-offset-w":[{"ring-offset":[W,Z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Y,tr]}],"shadow-color":[{shadow:[be]}],opacity:[{opacity:[T]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ae()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Y,m]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[g]}],saturate:[{saturate:[v]}],sepia:[{sepia:[te]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[T]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[te]}],"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",m]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[fe,m]}],"translate-x":[{"translate-x":[we]}],"translate-y":[{"translate-y":[we]}],"skew-x":[{"skew-x":[Se]}],"skew-y":[{"skew-y":[Se]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],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","Te-resize","nw-resize","U-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-k":[{"scroll-k":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-Te":[{"scroll-Te":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[W,Z,Le]}],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"],Te:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","k","mr","mb","ml"],mx:["mr","ml"],my:["k","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-U","rounded-Te","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-U","rounded-Te"],"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-k","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-k","scroll-mb"],"scroll-Te":["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 Qe=Ot(nr);function d(...e){return Qe((0,Xe.clsx)(e))}var Te=require("react/jsx-runtime"),he=Re.forwardRef(({className:e,...t},r)=>(0,Te.jsx)(K.Root,{ref:r,className:d("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));he.displayName=K.Root.displayName;var ir=Re.forwardRef(({className:e,...t},r)=>(0,Te.jsx)(K.Image,{ref:r,className:d("aspect-square h-full w-full",e),...t}));ir.displayName=K.Image.displayName;var ve=Re.forwardRef(({className:e,...t},r)=>(0,Te.jsx)(K.Fallback,{ref:r,className:d("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ve.displayName=K.Fallback.displayName;var Ze=require("@radix-ui/react-slot"),Ye=require("class-variance-authority"),et=G(require("react")),sr=(0,Ye.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"}}}),B=et.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},n)=>(0,Te.jsx)(e?Ze.Slot:"button",{className:d(sr({className:t,size:r,variant:o})),ref:n,...s}));B.displayName="Button";var oe=G(require("react"));var O=oe.forwardRef(({className:e,...t},r)=>(0,Te.jsx)("div",{ref:r,className:d("rounded-xl border bg-card text-card-foreground shadow",e),...t}));O.displayName="Card";var _=oe.forwardRef(({className:e,...t},r)=>(0,Te.jsx)("div",{ref:r,className:d("flex flex-col space-y-1.5 Te-6",e),...t}));_.displayName="CardHeader";var q=oe.forwardRef(({className:e,...t},r)=>(0,Te.jsx)("div",{ref:r,className:d("font-semibold leading-none tracking-tight",e),...t}));q.displayName="CardTitle";var Ee=oe.forwardRef(({className:e,...t},r)=>(0,Te.jsx)("div",{ref:r,className:d("text-sm text-muted-foreground",e),...t}));Ee.displayName="CardDescription";var $=oe.forwardRef(({className:e,...t},r)=>(0,Te.jsx)("div",{ref:r,className:d("Te-6 pt-0",e),...t}));$.displayName="CardContent";var ye=oe.forwardRef(({className:e,...t},r)=>(0,Te.jsx)("div",{ref:r,className:d("flex items-center Te-6 pt-0",e),...t}));ye.displayName="CardFooter";var rt=G(require("react"));var ze=rt.forwardRef(({className:e,type:t,...r},o)=>(0,Te.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}));ze.displayName="Input";var Be=G(require("react")),H=G(require("@radix-ui/react-scroll-area"));var He=Be.forwardRef(({className:e,children:t,...r},o)=>(0,Te.jsxs)(H.Root,{ref:o,className:d("relative overflow-hidden",e),...r,children:[(0,Te.jsx)(H.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Te.jsx)(ot,{}),(0,Te.jsx)(H.Corner,{})]}));He.displayName=H.Root.displayName;var ot=Be.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,Te.jsx)(H.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 Te-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent Te-[1px]",e),...r,children:(0,Te.jsx)(H.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ot.displayName=H.ScrollAreaScrollbar.displayName;var lr=(0,Ye.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ie({className:e,variant:t,...r}){return(0,Te.jsx)("div",{className:d(lr({variant:t}),e),...r})}var j=require("motion/react");var st={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 Fe(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function lt({capabilities:e,isOpen:t,onToggle:r,onActionSelect:o,onContextChange:s,colorScheme:n=st,className:l}){let[i,u]=(0,U.useState)([]),[f,x]=(0,U.useState)([]),g=i[i.length-1],b=g?.children||e,P=(v,M)=>{switch(v.type){case"category":return n.categories[M%n.categories.length];case"list":return n.lists[M%n.lists.length];case"item":return n.items[M%n.items.length];default:return n.primary}},S=(0,U.useMemo)(()=>({path:i,selectedItems:f,filters:{}}),[i,f]);(0,U.useEffect)(()=>{s&&s(S)},[S,s]);let A=v=>{v.type==="category"||v.type==="list"?u([...i,v]):v.type==="item"&&x([...f,v])},y=()=>{u(i.slice(0,-1))},T=v=>{u(i.slice(0,v+1))},D=()=>g?.actions?g.actions:[];return t?(0,Te.jsxs)("div",{className:d("w-full",l),children:[(0,Te.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Te.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,Te.jsx)(j.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:y,className:d("group Te-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,Te.jsx)(k.ChevronLeft,{className:d("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Te.jsx)("h4",{className:"font-medium text-sm",children:g?.name||"Capabilities"})]}),(0,Te.jsx)(j.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 Te-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,Te.jsx)(k.X,{className:d("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,Te.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Te.jsx)(j.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>u([]),className:d("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Te.jsxs)("span",{className:"relative",children:["Capabilities",(0,Te.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"})]})}),i.map((v,M)=>(0,Te.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Te.jsx)(k.ChevronRight,{className:"h-2 w-2"}),(0,Te.jsx)(j.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>T(M),className:d("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Te.jsxs)("span",{className:"relative",children:[v.name,(0,Te.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"})]})})]},v.id))]}),(0,Te.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,Te.jsx)(j.AnimatePresence,{mode:"wait",children:(0,Te.jsx)(j.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,Te.jsx)(pr,{data:g.data,onItemSelect:v=>x([...f,v]),colorScheme:n}):(0,Te.jsx)(cr,{capabilities:b,onSelect:A,colorScheme:n})},g?.id||"root")})})]}):(0,Te.jsxs)(B,{onClick:r,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Te.jsx)(k.Menu,{className:"h-4 w-4"}),(0,Te.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function cr({capabilities:e,onSelect:t,colorScheme:r}){return(0,Te.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,Te.jsx)(dr,{capability:o,onClick:()=>t(o),color:r.categories[s%r.categories.length]},o.id))})}function dr({capability:e,onClick:t,selected:r,color:o}){return(0,Te.jsxs)(j.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,Te.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,Te.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Te.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,Te.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,Te.jsx)(ie,{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 pr({data:e,onItemSelect:t,colorScheme:r}){return(0,Te.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,Te.jsxs)(j.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,Te.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,Te.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Te.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,Te.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,Te.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,Te.jsx)(ie,{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 pt=require("date-fns");function ct({taskId:e,polling:t=!0,system:r="payload"}){let[o,s]=(0,U.useState)(null),[n,l]=(0,U.useState)(!1),[i,u]=(0,U.useState)(null),f=async(g=!0)=>{if(e){g&&l(!0);try{let b=await fetch(`/api/tasks/${e}`);if(!b.ok)throw new Error(`Failed to fetch task: ${b.statusText}`);let P=await b.json();s(P)}catch(b){console.error("Error fetching task:",b),u(b instanceof Error?b:new Error("Unknown error occurred"))}finally{g&&l(!1)}}},x=()=>f(!1);return(0,U.useEffect)(()=>{e&&f(!0);let g=null;return e&&t&&(g=setInterval(x,5e3)),()=>{g&&clearInterval(g)}},[e,t]),{task:o,loading:n,error:i}}var ur=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},mr=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function ut({data:e}){let{id:t,system:r,fetchLatest:o,taskData:s,error:n}=e||{};if(!t)return null;let l=null,i=!0,u=n,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:u}),f){let{task:P,loading:S,error:A}=ct({taskId:t,system:r});l=P,i=S,u=A}else i=!1;let x=ur(l?.status||"todo"),g=mr(l?.status||"todo"),b=l?.dateLogged||new Date().toISOString();try{let P=new Date(l?.dateLogged||"");isNaN(P.getTime())||(b=(0,pt.formatDistanceToNow)(P,{addSuffix:!0}))}catch{}return(0,Te.jsxs)(O,{className:d("w-full max-w-md shadow-md",u&&"border border-destructive"),children:[(0,Te.jsxs)(_,{className:"pb-2",children:[(0,Te.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Te.jsx)(q,{className:"text-lg font-semibold",children:i?"Loading...":l?.name||"Task"}),(0,Te.jsx)(ie,{className:`${x}`,children:g})]}),l?.project&&(0,Te.jsxs)(Ee,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,Te.jsx)($,{className:"pb-2",children:i?(0,Te.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):u?(0,Te.jsx)("Te",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Te.jsx)("Te",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,Te.jsx)(ye,{className:"pt-2 flex items-center justify-between",children:(0,Te.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Te.jsx)(k.Clock,{className:"h-3 w-3 mr-1"}),(0,Te.jsxs)("span",{children:["Created ",b]}),(0,Te.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Te.jsxs)("span",{children:["Task #",t]})]})})]})}function ft({artefact:e,taskId:t,taskData:r,loading:o=!1,error:s=null}){let n=r||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=n.dateLogged;try{let i=new Date(n.dateLogged);isNaN(i.getTime())||(l=(0,pt.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,Te.jsxs)(O,{className:"w-full max-w-md shadow-md",children:[(0,Te.jsx)(_,{className:"pb-2",children:(0,Te.jsx)("div",{className:"flex justify-between items-start",children:(0,Te.jsx)(q,{className:"text-lg font-semibold",children:o?"Loading...":n.name})})}),(0,Te.jsx)($,{className:"pb-2",children:o?(0,Te.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,Te.jsx)("Te",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Te.jsx)("Te",{className:"text-sm text-foreground",children:e})}),(0,Te.jsx)(ye,{className:"pt-2 flex items-center justify-between",children:(0,Te.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Te.jsx)(k.Clock,{className:"h-3 w-3 mr-1"}),(0,Te.jsxs)("span",{children:["Created ",l]}),(0,Te.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Te.jsxs)("span",{children:["Task #",n.id]})]})})]})}var ht=G(require("react"));var bt=({isOpen:e=!0,authUrl:t,onClose:r,onSuccess:o,description:s="This endpoint requires authentication to sync functions."})=>{let[n,l]=(0,U.useState)(!1),[i,u]=(0,U.useState)(""),f=()=>{if(!t){u("No authentication URL provided");return}l(!0),u("");try{let g=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!g){u("Popup blocked. Please allow popups for this site and try again."),l(!1);return}let b=setInterval(()=>{try{g.closed&&(clearInterval(b),l(!1),o(),r())}catch{}},1e3);setTimeout(()=>{g.closed||(g.close(),clearInterval(b),l(!1),u("Authentication timed out. Please try again."))},6e5)}catch{u("Failed to open authentication window"),l(!1)}},x=async()=>{try{await navigator.clipboard.writeText(t),u("")}catch{u("Failed to copy URL to clipboard")}};return e?(0,Te.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,Te.jsxs)("div",{className:"bg-white rounded-lg Te-6 max-w-md w-[90%] shadow-lg",children:[(0,Te.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,Te.jsx)("Te",{className:"text-sm text-gray-600 mb-4",children:s}),i&&(0,Te.jsx)("div",{className:"mb-4 Te-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:i}),(0,Te.jsxs)("div",{className:"flex gap-2",children:[(0,Te.jsx)("button",{onClick:f,disabled:n||!t,className:`
6
+ "use strict";var Ut=Object.create;var Le=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var _t=Object.getOwnPropertyNames;var qt=Object.getPrototypeOf,Kt=Object.prototype.hasOwnProperty;var Jt=(e,t)=>{for(var o in t)Le(e,o,{get:t[o],enumerable:!0})},tt=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of _t(t))!Kt.call(e,s)&&s!==o&&Le(e,s,{get:()=>t[s],enumerable:!(a=Wt(t,s))||a.enumerable});return e};var V=(e,t,o)=>(o=e!=null?Ut(qt(e)):{},tt(t||!e||!e.__esModule?Le(o,"default",{value:e,enumerable:!0}):o,e)),Qt=e=>tt(Le({},"__esModule",{value:!0}),e);var jo={};Jt(jo,{ChatInterface:()=>$o});module.exports=Qt(jo);var q=require("react"),ue=V(require("motion/react-client")),A=require("lucide-react");var Ie=V(require("react")),J=V(require("@radix-ui/react-avatar"));var dt=require("clsx");var Oe="-",Xt=e=>{let t=Zt(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{let i=l.split(Oe);return i[0]===""&&i.length!==1&&i.shift(),at(i,t)||Yt(l)},getConflictingClassGroupIds:(l,i)=>{let p=o[l]||[];return i&&a[l]?[...p,...a[l]]:p}}},at=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),s=a?at(e.slice(1),a):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(Oe);return t.validators.find(({validator:l})=>l(n))?.classGroupId},ot=/^\[(.+)\]$/,Yt=e=>{if(ot.test(e)){let t=ot.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Zt=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return to(Object.entries(e.classGroups),o).forEach(([n,l])=>{Fe(l,a,n,t)}),a},Fe=(e,t,o,a)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:rt(t,s);n.classGroupId=o;return}if(typeof s=="function"){if(eo(s)){Fe(s(a),t,o,a);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([n,l])=>{Fe(l,rt(t,n),o,a)})})},rt=(e,t)=>{let o=e;return t.split(Oe).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},eo=e=>e.isThemeGetter,to=(e,t)=>t?e.map(([o,a])=>{let s=a.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,i])=>[t+l,i])):n);return[o,s]}):e,oo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,s=(n,l)=>{o.set(n,l),t++,t>e&&(t=0,a=o,o=new Map)};return{get(n){let l=o.get(n);if(l!==void 0)return l;if((l=a.get(n))!==void 0)return s(n,l),l},set(n,l){o.has(n)?o.set(n,l):s(n,l)}}},nt="!",ro=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,s=t[0],n=t.length,l=i=>{let p=[],f=0,h=0,m;for(let x=0;x<i.length;x++){let P=i[x];if(f===0){if(P===s&&(a||i.slice(x,x+n)===t)){p.push(i.slice(h,x)),h=x+n;continue}if(P==="/"){m=x;continue}}P==="["?f++:P==="]"&&f--}let b=p.length===0?i:i.substring(h),T=b.startsWith(nt),R=T?b.substring(1):b,w=m&&m>h?m-h:void 0;return{modifiers:p,hasImportantModifier:T,baseClassName:R,maybePostfixModifierPosition:w}};return o?i=>o({className:i,parseClassName:l}):l},ao=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},no=e=>({cache:oo(e.cacheSize),parseClassName:ro(e),...Xt(e)}),io=/\s+/,so=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:s}=t,n=[],l=e.trim().split(io),i="";for(let p=l.length-1;p>=0;p-=1){let f=l[p],{modifiers:h,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:T}=o(f),R=!!T,w=a(R?b.substring(0,T):b);if(!w){if(!R){i=f+(i.length>0?" "+i:i);continue}if(w=a(b),!w){i=f+(i.length>0?" "+i:i);continue}R=!1}let x=ao(h).join(":"),P=m?x+nt:x,E=P+w;if(n.includes(E))continue;n.push(E);let C=s(w,R);for(let L=0;L<C.length;++L){let ne=C[L];n.push(P+ne)}i=f+(i.length>0?" "+i:i)}return i};function lo(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=it(t))&&(a&&(a+=" "),a+=o);return a}var it=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=it(e[a]))&&(o&&(o+=" "),o+=t);return o};function co(e,...t){let o,a,s,n=l;function l(p){let f=t.reduce((h,m)=>m(h),e());return o=no(f),a=o.cache.get,s=o.cache.set,n=i,i(p)}function i(p){let f=a(p);if(f)return f;let h=so(p,o);return s(p,h),h}return function(){return n(lo.apply(null,arguments))}}var k=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},st=/^\[(?:([a-De-]+):)?(.+)\]$/i,po=/^\d+\/\d+$/,uo=new Set(["px","full","screen"]),mo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,go=/\d+(%|px|De?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|De?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,bo=/^(inset_)?-?((\d+)?\.?(\d+)[a-De]+|0)_-?((\d+)?\.?(\d+)[a-De]+|0)/,vo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,K=e=>ge(e)||uo.has(e)||po.test(e),oe=e=>fe(e,"length",Ro),ge=e=>!!e&&!Number.isNaN(Number(e)),He=e=>fe(e,"number",ge),xe=e=>!!e&&Number.isInteger(Number(e)),ho=e=>e.endsWith("%")&&ge(e.slice(0,-1)),g=e=>st.test(e),re=e=>mo.test(e),yo=new Set(["length","size","percentage"]),xo=e=>fe(e,yo,lt),Co=e=>fe(e,"position",lt),wo=new Set(["image","url"]),No=e=>fe(e,wo,Ao),ko=e=>fe(e,"",Po),Ce=()=>!0,fe=(e,t,o)=>{let a=st.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},Ro=e=>go.test(e)&&!fo.test(e),lt=()=>!1,Po=e=>bo.test(e),Ao=e=>vo.test(e);var To=()=>{let e=k("colors"),t=k("spacing"),o=k("blur"),a=k("brightness"),s=k("borderColor"),n=k("borderRadius"),l=k("borderSpacing"),i=k("borderWidth"),p=k("contrast"),f=k("grayscale"),h=k("hueRotate"),m=k("invert"),b=k("gap"),T=k("gradientColorStops"),R=k("gradientColorStopPositions"),w=k("inset"),x=k("margin"),P=k("opacity"),E=k("padding"),C=k("saturate"),L=k("scale"),ne=k("sepia"),ze=k("skew"),he=k("space"),Pe=k("translate"),ie=()=>["auto","contain","none"],Ae=()=>["auto","hidden","clip","visible","scroll"],ye=()=>["auto",g,t],N=()=>[g,t],Te=()=>["",K,oe],me=()=>["auto",ge,g],Se=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],Me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],c=()=>["start","end","center","between","around","evenly","stretch"],S=()=>["","0",g],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>[ge,g];return{cacheSize:500,separator:":",theme:{colors:[Ce],spacing:[K,oe],blur:["none","",re,g],brightness:y(),borderColor:[e],borderRadius:["none","","full",re,g],borderSpacing:N(),borderWidth:Te(),contrast:y(),grayscale:S(),hueRotate:y(),invert:S(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[ho,oe],inset:ye(),margin:ye(),opacity:y(),padding:N(),saturate:y(),scale:y(),sepia:S(),skew:y(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",g]}],container:["container"],columns:[{columns:[re]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:[...Se(),g]}],overflow:[{overflow:Ae()}],"overflow-x":[{"overflow-x":Ae()}],"overflow-y":[{"overflow-y":Ae()}],overscroll:[{overscroll:ie()}],"overscroll-x":[{"overscroll-x":ie()}],"overscroll-y":[{"overscroll-y":ie()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],De:[{De:["auto",xe,g]}],basis:[{basis:ye()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",g]}],grow:[{grow:S()}],shrink:[{shrink:S()}],order:[{order:["first","last","none",xe,g]}],"grid-cols":[{"grid-cols":[Ce]}],"col-start-end":[{col:["auto",{span:["full",xe,g]},g]}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":[Ce]}],"row-start-end":[{row:["auto",{span:[xe,g]},g]}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",g]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",g]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...c()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...c(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...c(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],q:[{q:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],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":[he]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[he]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",g,t]}],"min-w":[{"min-w":[g,t,"min","max","fit"]}],"max-w":[{"max-w":[g,t,"none","full","min","max","fit","prose",{screen:[re]},re]}],h:[{h:[g,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[g,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[g,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[g,t,"auto","min","max","fit"]}],"font-size":[{text:["base",re,oe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",He]}],"font-family":[{font:[Ce]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",g]}],"line-clamp":[{"line-clamp":["none",ge,He]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",K,g]}],"list-image":[{"list-image":["none",g]}],"list-style-type":[{list:["none","disc","decimal",g]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",K,oe]}],"underline-offset":[{"underline-offset":["auto",K,g]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",g]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",g]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Se(),Co]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","De","br","b","bl","l","tl"]},No]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[R]}],"gradient-via-pos":[{via:[R]}],"gradient-to-pos":[{to:[R]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-De":[{"rounded-De":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-De":[{"rounded-De":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-De":[{"border-De":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:se()}],"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-De":[{"border-De":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...se()]}],"outline-offset":[{"outline-offset":[K,g]}],"outline-w":[{outline:[K,oe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[K,oe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",re,ko]}],"shadow-color":[{shadow:[Ce]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...Me(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Me()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",re,g]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[C]}],sepia:[{sepia:[ne]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[ne]}],"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",g]}],duration:[{duration:y()}],ease:[{ease:["linear","in","out","in-out",g]}],delay:[{delay:y()}],animate:[{animate:["none","spin","ping","pulse","bounce",g]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[xe,g]}],"translate-x":[{"translate-x":[Pe]}],"translate-y":[{"translate-y":[Pe]}],"skew-x":[{"skew-x":[ze]}],"skew-y":[{"skew-y":[ze]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",g]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",g]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-q":[{"scroll-q":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",g]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[K,oe,He]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","q","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-De","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-De","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-De"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-De":["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-De","border-w-b","border-w-l"],"border-w-x":["border-w-De","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-De","border-color-b","border-color-l"],"border-color-x":["border-color-De","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-p":["scroll-px","scroll-py","scroll-ps","scroll-q","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 ct=co(To);function d(...e){return ct((0,dt.clsx)(e))}var De=require("react/jsx-runtime"),we=Ie.forwardRef(({className:e,...t},o)=>(0,De.jsx)(J.Root,{ref:o,className:d("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));we.displayName=J.Root.displayName;var So=Ie.forwardRef(({className:e,...t},o)=>(0,De.jsx)(J.Image,{ref:o,className:d("aspect-square h-full w-full",e),...t}));So.displayName=J.Image.displayName;var Ne=Ie.forwardRef(({className:e,...t},o)=>(0,De.jsx)(J.Fallback,{ref:o,className:d("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ne.displayName=J.Fallback.displayName;var pt=require("@radix-ui/react-slot"),ut=require("class-variance-authority"),mt=V(require("react")),Mo=(0,ut.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"}}}),O=mt.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...s},n)=>(0,De.jsx)(e?pt.Slot:"button",{className:d(Mo({className:t,size:o,variant:a})),ref:n,...s}));O.displayName="Button";var le=V(require("react"));var U=le.forwardRef(({className:e,...t},o)=>(0,De.jsx)("div",{ref:o,className:d("rounded-xl border bg-card text-card-foreground shadow",e),...t}));U.displayName="Card";var Q=le.forwardRef(({className:e,...t},o)=>(0,De.jsx)("div",{ref:o,className:d("flex flex-col space-y-1.5 p-6",e),...t}));Q.displayName="CardHeader";var X=le.forwardRef(({className:e,...t},o)=>(0,De.jsx)("div",{ref:o,className:d("font-semibold leading-none tracking-tight",e),...t}));X.displayName="CardTitle";var Ve=le.forwardRef(({className:e,...t},o)=>(0,De.jsx)("div",{ref:o,className:d("text-sm text-muted-foreground",e),...t}));Ve.displayName="CardDescription";var W=le.forwardRef(({className:e,...t},o)=>(0,De.jsx)("div",{ref:o,className:d("p-6 pt-0",e),...t}));W.displayName="CardContent";var ke=le.forwardRef(({className:e,...t},o)=>(0,De.jsx)("div",{ref:o,className:d("flex items-center p-6 pt-0",e),...t}));ke.displayName="CardFooter";var ft=V(require("react"));var Ge=ft.forwardRef(({className:e,type:t,...o},a)=>(0,De.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:a,...o}));Ge.displayName="Input";var $e=V(require("react")),G=V(require("@radix-ui/react-scroll-area"));var je=$e.forwardRef(({className:e,children:t,...o},a)=>(0,De.jsxs)(G.Root,{ref:a,className:d("relative overflow-hidden",e),...o,children:[(0,De.jsx)(G.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,De.jsx)(vt,{}),(0,De.jsx)(G.Corner,{})]}));je.displayName=G.Root.displayName;var vt=$e.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,De.jsx)(G.ScrollAreaScrollbar,{ref:a,orientation:t,className:d("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,De.jsx)(G.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));vt.displayName=G.ScrollAreaScrollbar.displayName;var Lo=(0,ut.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 de({className:e,variant:t,...o}){return(0,De.jsx)("div",{className:d(Lo({variant:t}),e),...o})}var _=require("motion/react");var xt={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 Ue(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Ct({capabilities:e,isOpen:t,onToggle:o,onActionSelect:a,onContextChange:s,colorScheme:n=xt,className:l}){let[i,p]=(0,q.useState)([]),[f,h]=(0,q.useState)([]),m=i[i.length-1],b=m?.children||e,T=(C,L)=>{switch(C.type){case"category":return n.categories[L%n.categories.length];case"list":return n.lists[L%n.lists.length];case"item":return n.items[L%n.items.length];default:return n.primary}},R=(0,q.useMemo)(()=>({path:i,selectedItems:f,filters:{}}),[i,f]);(0,q.useEffect)(()=>{s&&s(R)},[R,s]);let w=C=>{C.type==="category"||C.type==="list"?p([...i,C]):C.type==="item"&&h([...f,C])},x=()=>{p(i.slice(0,-1))},P=C=>{p(i.slice(0,C+1))},E=()=>m?.actions?m.actions:[];return t?(0,De.jsxs)("div",{className:d("w-full",l),children:[(0,De.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,De.jsx)(_.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 p-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,De.jsx)(A.ChevronLeft,{className:d("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,De.jsx)("h4",{className:"font-medium text-sm",children:m?.name||"Capabilities"})]}),(0,De.jsx)(_.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:o,className:d("group p-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,De.jsx)(A.X,{className:d("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,De.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,De.jsx)(_.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>p([]),className:d("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,De.jsxs)("span",{className:"relative",children:["Capabilities",(0,De.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"})]})}),i.map((C,L)=>(0,De.jsxs)("div",{className:"flex items-center gap-1",children:[(0,De.jsx)(A.ChevronRight,{className:"h-2 w-2"}),(0,De.jsx)(_.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>P(L),className:d("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,De.jsxs)("span",{className:"relative",children:[C.name,(0,De.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,De.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,De.jsx)(_.AnimatePresence,{mode:"wait",children:(0,De.jsx)(_.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:m?.type==="list"&&m.data?(0,De.jsx)(Eo,{data:m.data,onItemSelect:C=>h([...f,C]),colorScheme:n}):(0,De.jsx)(Io,{capabilities:b,onSelect:w,colorScheme:n})},m?.id||"root")})})]}):(0,De.jsxs)(O,{onClick:o,size:"sm",variant:"outline",className:"rounded-full",children:[(0,De.jsx)(A.Menu,{className:"h-4 w-4"}),(0,De.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Io({capabilities:e,onSelect:t,colorScheme:o}){return(0,De.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,s)=>(0,De.jsx)(Do,{capability:a,onClick:()=>t(a),color:o.categories[s%o.categories.length]},a.id))})}function Do({capability:e,onClick:t,selected:o,color:a}){return(0,De.jsxs)(_.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",o&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,De.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)}),(0,De.jsxs)("span",{className:"truncate relative",children:[e.name,(0,De.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,De.jsx)(A.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,De.jsx)(de,{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 Eo({data:e,onItemSelect:t,colorScheme:o}){return(0,De.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,s)=>(0,De.jsxs)(_.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(a),children:[(0,De.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.items[s%o.items.length])}),(0,De.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,De.jsxs)("span",{className:"truncate relative font-medium",children:[a.title,(0,De.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"})]}),a.subtitle&&(0,De.jsx)("div",{className:d("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:a.subtitle})]}),a.value&&(0,De.jsx)(de,{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:a.value})]},a.id))})}var kt=require("date-fns");function wt({taskId:e,polling:t=!0,system:o="payload"}){let[a,s]=(0,q.useState)(null),[n,l]=(0,q.useState)(!1),[i,p]=(0,q.useState)(null),f=async(m=!0)=>{if(e){m&&l(!0);try{let b=await fetch(`/api/tasks/${e}`);if(!b.ok)throw new Error(`Failed to fetch task: ${b.statusText}`);let T=await b.json();s(T)}catch(b){console.error("Error fetching task:",b),p(b instanceof Error?b:new Error("Unknown error occurred"))}finally{m&&l(!1)}}},h=()=>f(!1);return(0,q.useEffect)(()=>{e&&f(!0);let m=null;return e&&t&&(m=setInterval(h,5e3)),()=>{m&&clearInterval(m)}},[e,t]),{task:a,loading:n,error:i}}var zo=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"}},Bo=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Rt({data:e}){let{id:t,system:o,fetchLatest:a,taskData:s,error:n}=e||{};if(!t)return null;let l=null,i=!0,p=n,f=a!==void 0?a:!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:a,system:o,fetchLatest:f,taskData:l,error:p}),f){let{task:T,loading:R,error:w}=wt({taskId:t,system:o});l=T,i=R,p=w}else i=!1;let h=zo(l?.status||"todo"),m=Bo(l?.status||"todo"),b=l?.dateLogged||new Date().toISOString();try{let T=new Date(l?.dateLogged||"");isNaN(T.getTime())||(b=(0,kt.formatDistanceToNow)(T,{addSuffix:!0}))}catch{}return(0,De.jsxs)(U,{className:d("w-full max-w-md shadow-md",p&&"border border-destructive"),children:[(0,De.jsxs)(Q,{className:"pb-2",children:[(0,De.jsxs)("div",{className:"flex justify-between items-start",children:[(0,De.jsx)(X,{className:"text-lg font-semibold",children:i?"Loading...":l?.name||"Task"}),(0,De.jsx)(de,{className:`${h}`,children:m})]}),l?.project&&(0,De.jsxs)(Ve,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,De.jsx)(W,{className:"pb-2",children:i?(0,De.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):p?(0,De.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,De.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,De.jsx)(ke,{className:"pt-2 flex items-center justify-between",children:(0,De.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,De.jsx)(A.Clock,{className:"h-3 w-3 mr-1"}),(0,De.jsxs)("span",{children:["Created ",b]}),(0,De.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,De.jsxs)("span",{children:["Task #",t]})]})})]})}function Tt({artefact:e,taskId:t,taskData:o,loading:a=!1,error:s=null}){let n=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=n.dateLogged;try{let i=new Date(n.dateLogged);isNaN(i.getTime())||(l=(0,kt.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,De.jsxs)(U,{className:"w-full max-w-md shadow-md",children:[(0,De.jsx)(Q,{className:"pb-2",children:(0,De.jsx)("div",{className:"flex justify-between items-start",children:(0,De.jsx)(X,{className:"text-lg font-semibold",children:a?"Loading...":n.name})})}),(0,De.jsx)(W,{className:"pb-2",children:a?(0,De.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,De.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,De.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,De.jsx)(ke,{className:"pt-2 flex items-center justify-between",children:(0,De.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,De.jsx)(A.Clock,{className:"h-3 w-3 mr-1"}),(0,De.jsxs)("span",{children:["Created ",l]}),(0,De.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,De.jsxs)("span",{children:["Task #",n.id]})]})})]})}var Mt=V(require("react"));var St=({isOpen:e=!0,authUrl:t,onClose:o,onSuccess:a,description:s="This endpoint requires authentication to sync functions."})=>{let[n,l]=(0,q.useState)(!1),[i,p]=(0,q.useState)(""),f=()=>{if(!t){p("No authentication URL provided");return}l(!0),p("");try{let m=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!m){p("Popup blocked. Please allow popups for this site and try again."),l(!1);return}let b=setInterval(()=>{try{m.closed&&(clearInterval(b),l(!1),a(),o())}catch{}},1e3);setTimeout(()=>{m.closed||(m.close(),clearInterval(b),l(!1),p("Authentication timed out. Please try again."))},6e5)}catch{p("Failed to open authentication window"),l(!1)}},h=async()=>{try{await navigator.clipboard.writeText(t),p("")}catch{p("Failed to copy URL to clipboard")}};return e?(0,De.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center De-[1000]",children:(0,De.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,De.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,De.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s}),i&&(0,De.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:i}),(0,De.jsxs)("div",{className:"flex gap-2",children:[(0,De.jsx)("button",{onClick:f,disabled:n||!t,className:`
6
7
  px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
7
8
  ${n||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
8
- `,children:n?"Authenticating...":"Authenticate"}),(0,Te.jsx)("button",{onClick:x,disabled:!t,className:`
9
+ `,children:n?"Authenticating...":"Authenticate"}),(0,De.jsx)("button",{onClick:h,disabled:!t,className:`
9
10
  px-4 py-2 text-white border-none rounded text-sm
10
11
  ${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
11
- `,children:"Copy URL"}),(0,Te.jsx)("button",{onClick:r,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var vt=({toolPart:e,index:t,addToolResult:r})=>{let[o,s]=ht.default.useState(!0),n=()=>{r(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,Te.jsxs)("div",{className:"mb-2",children:[(0,Te.jsx)(bt,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:n,description:e.output?.reason||e.input?.reason}),!o&&(0,Te.jsx)("div",{className:"flex items-center justify-center k-3",children:(0,Te.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Te.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Te.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,Te.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var yt=require("marked"),xt=G(require("react-markdown"));function gr(e){return yt.marked.lexer(e).map(r=>r.raw)}var wt=(0,U.memo)(({content:e})=>(0,Te.jsx)(xt.default,{children:e}),(e,t)=>e.content===t.content);wt.displayName="MemoizedMarkdownBlock";var Ge=(0,U.memo)(({content:e,id:t})=>(0,U.useMemo)(()=>gr(e),[e]).map((o,s)=>(0,Te.jsx)(wt,{content:o},`${t}-block_${s}`)));Ge.displayName="PartText";function fr({messages:e,input:t,isTyping:r=!1,currentSessionTitle:o,capabilities:s,fileUploads:n,isDragOver:l,enableFileUpload:i,onInputChange:u,addToolResult:f,onSendMessage:x,onKeyPress:g,onFileUpload:b,onRemoveFile:P,onDragOver:S,className:A}){let y=(0,U.useRef)(null),T=(0,U.useRef)(null),D=(0,U.useRef)(null),[v,M]=(0,U.useState)(!1),[te,Se]=(0,U.useState)({path:[],selectedItems:[],filters:{}});(0,U.useEffect)(()=>{y.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,U.useEffect)(()=>{v&&setTimeout(()=>{y.current?.scrollIntoView({behavior:"smooth"})},100)},[v]);let me=()=>Fe(te),we=()=>{let c=[];return s.forEach(R=>{R.actions&&R.actions.forEach(I=>{c.push({label:I.label,action:()=>re(I.id,{path:[R],selectedItems:[],filters:{}})})}),R.children&&R.children.forEach(I=>{I.type==="list"&&I.data&&c.push({label:`View ${I.name}`,action:()=>M(!0)})})}),c.slice(0,5)},re=(c,R)=>{console.log("Capability action:",c,R);let I=`Executing ${c} with context: ${JSON.stringify(R.path.map(C=>C.name))}`;M(!1)},Ce=Fe({path:[],selectedItems:[],filters:{}}),ge=c=>{b(c.target.files),c.target.files&&(c.target.value="")},w=c=>{c.preventDefault(),S(!0)},Ne=c=>{c.preventDefault(),S(!1)},ce=c=>{c.preventDefault(),S(!1),b(c.dataTransfer.files)},ke=c=>{if(c===0)return"0 Bytes";let R=1024,I=["Bytes","KB","MB","GB"],C=Math.floor(Math.log(c)/Math.log(R));return parseFloat((c/Math.pow(R,C)).toFixed(2))+" "+I[C]},ae=c=>c.startsWith("image/")?(0,Te.jsx)(k.Image,{className:"h-4 w-4"}):c.startsWith("text/")?(0,Te.jsx)(k.FileText,{className:"h-4 w-4"}):(0,Te.jsx)(k.File,{className:"h-4 w-4"}),Ae=c=>{let R=c.role==="assistant",I=c.role==="user";return(0,Te.jsxs)("div",{className:d("flex items-start gap-3",I?"flex-row-reverse":""),children:[(0,Te.jsx)(he,{className:"h-8 w-8 shrink-0",children:(0,Te.jsx)(ve,{className:d(I?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:I?(0,Te.jsx)(k.User,{className:"h-4 w-4"}):(0,Te.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Te.jsx)("div",{className:d("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",I?"bg-primary text-primary-foreground":"bg-muted"),children:c.parts.map((C,z)=>{if(C.type==="text")return(0,Te.jsx)(Ge,{id:c.id,content:C.text},`${c.id}-text`);if(C.type==="file"){let h=C;return(0,Te.jsx)("div",{className:"mb-2 Te-2 bg-background/50 rounded-lg",children:(0,Te.jsxs)("div",{className:"flex items-center gap-2",children:[ae(h.mediaType||"application/octet-stream"),(0,Te.jsx)("div",{className:"flex-1 min-w-0",children:(0,Te.jsx)("Te",{className:"text-sm font-medium truncate",children:h.filename||h.url?.split("/").pop()||"File"})}),h.url&&(0,Te.jsx)(B,{variant:"ghost",size:"sm",onClick:()=>window.open(h.url,"_blank"),className:"h-8 w-8 Te-0",children:(0,Te.jsx)(k.Download,{className:"h-4 w-4"})})]})},z)}if(C.type.startsWith("tool-")){let h=C,X=C.type.replace("tool-","");if(X==="task")switch(h.state){case"input-available":return(0,Te.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},z);case"output-available":return(0,Te.jsx)("div",{className:"mb-2",children:(0,Te.jsx)(ut,{data:{id:h.output?.id||h.input?.id,fetchLatest:!1,taskData:h.output||h.input}})},z);case"output-error":return(0,Te.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",h.errorText]},z);default:return null}if(C.type==="tool-requestEndpointLogin")return(0,Te.jsx)("div",{className:"mb-2",children:(0,Te.jsx)(vt,{toolPart:h,index:z,addToolResult:f??(()=>{})})},z);if(X==="artefact")switch(h.state){case"input-available":return(0,Te.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},z);case"output-available":return(0,Te.jsx)("div",{className:"mb-2",children:(0,Te.jsx)(ft,{artefact:h.output?.description||"",taskId:h.output?.id||h.input?.id,taskData:h.output||h.input})},z);case"output-error":return(0,Te.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",h.errorText]},z);default:return null}return(0,Te.jsx)("div",{className:"mb-2",children:(0,Te.jsxs)(O,{className:"w-full max-w-md",children:[(0,Te.jsx)(_,{children:(0,Te.jsx)(q,{className:"text-lg",children:X})}),(0,Te.jsxs)($,{children:[h.state==="input-available"&&(0,Te.jsxs)("Te",{className:"text-sm",children:["Processing ",X,"..."]}),h.state==="output-available"&&(0,Te.jsx)("pre",{className:"text-sm",children:JSON.stringify(h.output,null,2)}),h.state==="output-error"&&(0,Te.jsxs)("Te",{className:"text-sm text-red-500",children:["Error: ",h.errorText]})]})]})},z)}if(C.type.startsWith("data-")){let h=C,X=C.type.replace("data-","");return X==="reference"?(0,Te.jsx)("div",{className:"mb-2",children:(0,Te.jsx)(O,{className:"w-full",children:(0,Te.jsx)($,{className:"Te-4",children:(0,Te.jsx)("div",{className:"space-y-2",children:h.data?.references?.map((F,Me)=>(0,Te.jsxs)("div",{className:"flex items-center gap-2 Te-2 rounded-md bg-muted/50",children:[(0,Te.jsx)(ie,{variant:"outline",children:F.type||"link"}),(0,Te.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Te.jsx)("Te",{className:"text-sm font-medium truncate",children:F.title}),F.description&&(0,Te.jsx)("Te",{className:"text-xs text-muted-foreground truncate",children:F.description})]}),F.url&&(0,Te.jsx)(B,{variant:"ghost",size:"sm",onClick:()=>window.open(F.url,"_blank"),className:"h-8 w-8 Te-0",children:(0,Te.jsx)(k.ExternalLink,{className:"h-4 w-4"})})]},Me))})})})},z):X==="menu"?(0,Te.jsx)("div",{className:"mb-2",children:(0,Te.jsxs)(O,{className:"w-full",children:[(0,Te.jsx)(_,{children:(0,Te.jsx)(q,{className:"text-lg",children:h.data?.title})}),(0,Te.jsx)($,{children:(0,Te.jsx)("div",{className:"space-y-2",children:h.data?.items?.map((F,Me)=>(0,Te.jsx)(B,{variant:"outline",className:"w-full justify-start",onClick:F.action,children:(0,Te.jsxs)("div",{className:"text-left",children:[(0,Te.jsx)("Te",{className:"font-medium",children:F.label}),F.description&&(0,Te.jsx)("Te",{className:"text-xs text-muted-foreground",children:F.description})]})},Me))})})]})},z):(0,Te.jsx)("div",{className:"mb-2",children:(0,Te.jsxs)(O,{className:"w-full max-w-md",children:[(0,Te.jsx)(_,{children:(0,Te.jsx)(q,{className:"text-lg",children:X})}),(0,Te.jsx)($,{children:(0,Te.jsx)("pre",{className:"text-sm",children:JSON.stringify(h.data,null,2)})})]})},z)}return null})})]})};return(0,Te.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${A||""}`,children:[(0,Te.jsxs)(He,{ref:T,className:"flex-1 Te-4 bg-background border-0",onDragOver:w,onDragLeave:Ne,onDrop:ce,children:[(0,Te.jsxs)("div",{className:d("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Te.jsx)(le.animate,{children:e.map(c=>(0,Te.jsx)(le.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:Ae(c)},c.id))}),v&&(0,Te.jsxs)(le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Te.jsx)(he,{className:"h-8 w-8",children:(0,Te.jsx)(ve,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Te.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Te.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Te.jsx)(lt,{capabilities:s,isOpen:v,onToggle:()=>M(!v),onActionSelect:re,className:"w-full"})})]}),r&&(0,Te.jsxs)(le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Te.jsx)(he,{className:"h-8 w-8",children:(0,Te.jsx)(ve,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Te.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Te.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Te.jsxs)("div",{className:"flex space-x-1",children:[(0,Te.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Te.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Te.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Te.jsx)("div",{ref:y})]}),n.length>0&&(0,Te.jsx)("div",{className:"Te-4 border-t bg-muted/10",children:(0,Te.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(c=>(0,Te.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg Te-2 border",children:[ae(c.file.type),(0,Te.jsx)("span",{className:"text-sm font-medium",children:c.file.name}),(0,Te.jsx)("span",{className:"text-xs text-muted-foreground",children:ke(c.file.size)}),(0,Te.jsx)(B,{variant:"ghost",size:"sm",onClick:()=>P(c.id),className:"h-6 w-6 Te-0",children:(0,Te.jsx)(k.X,{className:"h-4 w-4"})})]},c.id))})}),(0,Te.jsxs)("div",{className:"border rounded-2xl Te-4 bg-muted/20",children:[(0,Te.jsxs)("div",{className:"flex gap-3",children:[(0,Te.jsx)(ze,{value:t,onChange:c=>u(c.target.value),onKeyPress:g,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:r}),i&&(0,Te.jsx)(B,{variant:"outline",size:"icon",onClick:()=>D.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Te.jsx)(k.Paperclip,{className:"h-4 w-4"})}),(0,Te.jsx)(B,{onClick:x,disabled:!t.trim()&&n.length===0||r,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Te.jsx)(k.Send,{className:"h-4 w-4"})})]}),(0,Te.jsxs)("div",{className:"flex items-center gap-3 k-3",children:[(0,Te.jsxs)(B,{onClick:()=>M(!v),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Te.jsx)(k.Menu,{className:"h-3 w-3 mr-1"}),v?"Hide":"Show"," Capabilities"]}),(0,Te.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[me().map((c,R)=>(0,Te.jsx)(B,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>re(c.id,te),children:c.label},`context-${c.id}`)),me().length===0&&we().map((c,R)=>(0,Te.jsx)(B,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:c.action,children:c.label},`suggestion-${R}`))]})]}),i&&(0,Te.jsx)("input",{ref:D,type:"file",multiple:!0,onChange:ge,className:"hidden"})]})]})}0&&(module.exports={ChatInterface});
12
+ `,children:"Copy URL"}),(0,De.jsx)("button",{onClick:o,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var _e=({toolPart:e,index:t,addToolResult:o})=>{let[a,s]=Mt.default.useState(!0),n=()=>{o(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,De.jsxs)("div",{className:"mb-2",children:[(0,De.jsx)(St,{isOpen:a,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:n,description:e.output?.reason||e.input?.reason}),!a&&(0,De.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,De.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,De.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,De.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,De.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Lt=require("marked"),It=V(require("react-markdown"));function Ho(e){return Lt.marked.lexer(e).map(o=>o.raw)}var Dt=(0,q.memo)(({content:e})=>(0,De.jsx)(It.default,{children:e}),(e,t)=>e.content===t.content);Dt.displayName="MemoizedMarkdownBlock";var qe=(0,q.memo)(({content:e,id:t})=>(0,q.useMemo)(()=>Ho(e),[e]).map((a,s)=>(0,De.jsx)(Dt,{content:a},`${t}-block_${s}`)));qe.displayName="PartText";var Je=V(require("react"));var zt=({isOpen:e=!0,reason:t,onClose:o,onApprove:a,onDeny:s,title:n="Approval Required"})=>{let[l,i]=(0,q.useState)(!1),p=()=>{i(!0),a(),o()},f=()=>{i(!0),s(),o()},h=()=>{i(!0),s(),o()};return e?(0,De.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full shadow-lg",children:[(0,De.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:n}),(0,De.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:t}),(0,De.jsxs)("div",{className:"flex gap-2",children:[(0,De.jsx)("button",{onClick:p,disabled:l,className:`
13
+ px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
14
+ ${l?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
15
+ `,children:l?"Processing...":"Approve"}),(0,De.jsx)("button",{onClick:f,disabled:l,className:`
16
+ px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
17
+ ${l?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
18
+ `,children:l?"Processing...":"Deny"}),(0,De.jsx)("button",{onClick:h,disabled:l,className:`
19
+ px-4 py-2 text-white border-none rounded text-sm
20
+ ${l?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
21
+ `,children:"Cancel"})]})]}):null};var Bt=({toolPart:e,index:t,addToolResult:o})=>{let[a,s]=Je.default.useState(!0),[n,l]=Je.default.useState(null),i=()=>{o(e.input?.toolCallId,e.input?.tool,"Approved"),s(!1),l("approve")},p=()=>{o(e.input?.toolCallId,e.input?.tool,"Denied"),s(!1),l("deny")};switch(e.state){case"input-available":return(0,De.jsxs)("div",{className:"mb-2",children:[(0,De.jsx)(zt,{isOpen:a,onApprove:i,onDeny:p,onClose:()=>s(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,De.jsxs)(De.Fragment,{children:[n==="approve"&&(0,De.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,De.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,De.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,De.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),n==="deny"&&(0,De.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,De.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,De.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,De.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,De.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Xe=require("@radix-ui/react-use-controllable-state");var ve=V(require("@radix-ui/react-collapsible")),Ht=ve.Root,Ft=ve.CollapsibleTrigger,Ot=ve.CollapsibleContent;var Gt=require("streamdown"),Qe=(0,q.memo)(({className:e,...t})=>(0,$t.jsx)(Gt.Streamdown,{className:d("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Qe.displayName="Response";var jt=(0,q.createContext)(null),Fo=()=>{let e=(0,q.useContext)(jt);if(!e)throw new Error("Reasoning components must q used within Reasoning");return e},Oo=1e3,Vo=1e3,Ye=(0,q.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:s,duration:n,children:l,...i})=>{let[p,f]=(0,Xe.useControllableState)({prop:o,defaultProp:a,onChange:s}),[h,m]=(0,Xe.useControllableState)({prop:n,defaultProp:0}),[b,T]=(0,q.useState)(!1),[R,w]=(0,q.useState)(null);(0,q.useEffect)(()=>{t?R===null&&w(Date.now()):R!==null&&(m(Math.ceil((Date.now()-R)/Vo)),w(null))},[t,R,m]),(0,q.useEffect)(()=>{if(a&&!t&&p&&!b){let P=setTimeout(()=>{f(!1),T(!0)},Oo);return()=>clearTimeout(P)}},[t,p,a,f,b]);let x=P=>{f(P)};return(0,De.jsx)(jt.Provider,{value:{isStreaming:t,isOpen:p,setIsOpen:f,duration:h},children:(0,De.jsx)(Ht,{className:d("not-prose mb-4",e),onOpenChange:x,open:p,...i,children:l})})}),Go=(e,t)=>e||t===0?(0,De.jsx)("p",{children:"Thinking..."}):t===void 0?(0,De.jsx)("p",{children:"Thought for a few seconds"}):(0,De.jsxs)("p",{children:["Thought for ",t," seconds"]}),Ze=(0,q.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:s,duration:n}=Fo();return(0,De.jsx)(Ft,{className:d("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(A.BrainIcon,{className:"size-4"}),Go(a,n),(0,De.jsx)(A.ChevronDownIcon,{className:d("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),et=(0,q.memo)(({className:e,children:t,...o})=>(0,De.jsx)(Ot,{className:d("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,De.jsx)(Qe,{className:"grid gap-2",children:t})}));Ye.displayName="Reasoning";Ze.displayName="ReasoningTrigger";et.displayName="ReasoningContent";function $o({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:s,fileUploads:n,isDragOver:l,enableFileUpload:i,onInputChange:p,addToolResult:f,onSendMessage:h,onKeyPress:m,onFileUpload:b,onRemoveFile:T,onDragOver:R,className:w}){let x=(0,q.useRef)(null),P=(0,q.useRef)(null),E=(0,q.useRef)(null),[C,L]=(0,q.useState)(!1),[ne,ze]=(0,q.useState)({path:[],selectedItems:[],filters:{}});(0,q.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,q.useEffect)(()=>{C&&setTimeout(()=>{x.current?.scrollIntoView({behavior:"smooth"})},100)},[C]);let he=()=>Ue(ne),Pe=()=>{let c=[];return s.forEach(S=>{S.actions&&S.actions.forEach(D=>{c.push({label:D.label,action:()=>ie(D.id,{path:[S],selectedItems:[],filters:{}})})}),S.children&&S.children.forEach(D=>{D.type==="list"&&D.data&&c.push({label:`View ${D.name}`,action:()=>L(!0)})})}),c.slice(0,5)},ie=(c,S)=>{console.log("Capability action:",c,S);let D=`Executing ${c} with context: ${JSON.stringify(S.path.map(y=>y.name))}`;L(!1)},Ae=Ue({path:[],selectedItems:[],filters:{}}),ye=c=>{b(c.target.files),c.target.files&&(c.target.value="")},N=c=>{c.preventDefault(),R(!0)},Te=c=>{c.preventDefault(),R(!1)},me=c=>{c.preventDefault(),R(!1),b(c.dataTransfer.files)},Se=c=>{if(c===0)return"0 Bytes";let S=1024,D=["Bytes","KB","MB","GB"],y=Math.floor(Math.log(c)/Math.log(S));return parseFloat((c/Math.pow(S,y)).toFixed(2))+" "+D[y]},se=c=>c.startsWith("image/")?(0,De.jsx)(A.Image,{className:"h-4 w-4"}):c.startsWith("text/")?(0,De.jsx)(A.FileText,{className:"h-4 w-4"}):(0,De.jsx)(A.File,{className:"h-4 w-4"}),Me=c=>{let S=c.role==="assistant",D=c.role==="user";return(0,De.jsxs)("div",{className:d("flex my-2 items-start gap-3",D?"flex-row-reverse":""),children:[(0,De.jsx)(we,{className:"h-8 w-8 shrink-0",children:(0,De.jsx)(Ne,{className:d(D?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:D?(0,De.jsx)(A.User,{className:"h-4 w-4"}):(0,De.jsx)(A.Bot,{className:"h-4 w-4"})})}),(0,De.jsx)("div",{className:d("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",D?"bg-primary text-primary-foreground":"bg-muted"),children:c.parts.map((y,M)=>{if(y.type==="text")return(0,De.jsx)(qe,{id:c.id,content:y.text},`${c.id}-text`);if(y.type==="file"){let v=y;return(0,De.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[se(v.mediaType||"application/octet-stream"),(0,De.jsx)("div",{className:"flex-1 min-w-0",children:(0,De.jsx)("p",{className:"text-sm font-medium truncate",children:v.filename||v.url?.split("/").pop()||"File"})}),v.url&&(0,De.jsx)(O,{variant:"ghost",size:"sm",onClick:()=>window.open(v.url,"_blank"),className:"h-8 w-8 p-0",children:(0,De.jsx)(A.Download,{className:"h-4 w-4"})})]})},M)}if(y.type.startsWith("tool-")){let v=y,te=y.type.replace("tool-","");if(te==="task")switch(v.state){case"input-available":return(0,De.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},M);case"output-available":return(0,De.jsx)("div",{className:"mb-2",children:(0,De.jsx)(Rt,{data:{id:v.output?.id||v.input?.id,fetchLatest:!1,taskData:v.output||v.input}})},M);case"output-error":return(0,De.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",v.errorText]},M);default:return null}if(y.type==="tool-requestEndpointLogin")return(0,De.jsx)("div",{className:"mb-2",children:(0,De.jsx)(_e,{toolPart:v,index:M,addToolResult:f??(()=>{})})},M);if(y.type==="tool-authenticate")return(0,De.jsx)("div",{className:"mb-2",children:(0,De.jsx)(_e,{toolPart:v,index:M,addToolResult:f??(()=>{})})},M);if(y.type==="tool-requestApproval")return(0,De.jsx)("div",{className:"mb-2",children:(0,De.jsx)(Bt,{toolPart:v,index:M,addToolResult:f??(()=>{})})},M);if(te==="artefact")switch(v.state){case"input-available":return(0,De.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},M);case"output-available":return(0,De.jsx)("div",{className:"mb-2",children:(0,De.jsx)(Tt,{artefact:v.output?.description||"",taskId:v.output?.id||v.input?.id,taskData:v.output||v.input})},M);case"output-error":return(0,De.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",v.errorText]},M);default:return null}return(0,De.jsx)("div",{className:"mb-2",children:(0,De.jsxs)(U,{className:"w-full max-w-md",children:[(0,De.jsx)(Q,{children:(0,De.jsx)(X,{className:"text-lg",children:te})}),(0,De.jsxs)(W,{children:[v.state==="input-available"&&(0,De.jsxs)("p",{className:"text-sm",children:["Processing ",te,"..."]}),v.state==="output-available"&&(0,De.jsx)("pre",{className:"text-sm",children:JSON.stringify(v.output,null,2)}),v.state==="output-error"&&(0,De.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",v.errorText]})]})]})},M)}if(y.type.startsWith("data-")){let v=y,te=y.type.replace("data-","");return te==="reference"?(0,De.jsx)("div",{className:"mb-2",children:(0,De.jsx)(U,{className:"w-full",children:(0,De.jsx)(W,{className:"p-4",children:(0,De.jsx)("div",{className:"space-y-2",children:v.data?.references?.map(($,Be)=>(0,De.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,De.jsx)(de,{variant:"outline",children:$.type||"link"}),(0,De.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,De.jsx)("p",{className:"text-sm font-medium truncate",children:$.title}),$.description&&(0,De.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:$.description})]}),$.url&&(0,De.jsx)(O,{variant:"ghost",size:"sm",onClick:()=>window.open($.url,"_blank"),className:"h-8 w-8 p-0",children:(0,De.jsx)(A.ExternalLink,{className:"h-4 w-4"})})]},Be))})})})},M):te==="menu"?(0,De.jsx)("div",{className:"mb-2",children:(0,De.jsxs)(U,{className:"w-full",children:[(0,De.jsx)(Q,{children:(0,De.jsx)(X,{className:"text-lg",children:v.data?.title})}),(0,De.jsx)(W,{children:(0,De.jsx)("div",{className:"space-y-2",children:v.data?.items?.map(($,Be)=>(0,De.jsx)(O,{variant:"outline",className:"w-full justify-start",onClick:$.action,children:(0,De.jsxs)("div",{className:"text-left",children:[(0,De.jsx)("p",{className:"font-medium",children:$.label}),$.description&&(0,De.jsx)("p",{className:"text-xs text-muted-foreground",children:$.description})]})},Be))})})]})},M):(0,De.jsx)("div",{className:"mb-2",children:(0,De.jsxs)(U,{className:"w-full max-w-md",children:[(0,De.jsx)(Q,{children:(0,De.jsx)(X,{className:"text-lg",children:te})}),(0,De.jsx)(W,{children:(0,De.jsx)("pre",{className:"text-sm",children:JSON.stringify(v.data,null,2)})})]})},M)}if(y.type==="reasoning")return(0,De.jsxs)(Ye,{className:"w-full",isStreaming:status==="streaming"&&M===c.parts.length-1&&c.id===e.at(-1)?.id,children:[(0,De.jsx)(Ze,{}),(0,De.jsx)(et,{children:y.text})]},`${c.id}-${M}`)})})]})};return(0,De.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${w||""}`,children:[(0,De.jsxs)(je,{ref:P,className:"flex-1 p-4 bg-background border-0",onDragOver:N,onDragLeave:Te,onDrop:me,children:[(0,De.jsxs)("div",{className:d("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,De.jsx)(ue.animate,{children:e.map(c=>(0,De.jsx)(ue.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:Me(c)},c.id))}),C&&(0,De.jsxs)(ue.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,De.jsx)(we,{className:"h-8 w-8",children:(0,De.jsx)(Ne,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,De.jsx)(A.Bot,{className:"h-4 w-4"})})}),(0,De.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,De.jsx)(Ct,{capabilities:s,isOpen:C,onToggle:()=>L(!C),onActionSelect:ie,className:"w-full"})})]}),o&&(0,De.jsxs)(ue.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,De.jsx)(we,{className:"h-8 w-8",children:(0,De.jsx)(Ne,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,De.jsx)(A.Bot,{className:"h-4 w-4"})})}),(0,De.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,De.jsxs)("div",{className:"flex space-x-1",children:[(0,De.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,De.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,De.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,De.jsx)("div",{ref:x})]}),n.length>0&&(0,De.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,De.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(c=>(0,De.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[se(c.file.type),(0,De.jsx)("span",{className:"text-sm font-medium",children:c.file.name}),(0,De.jsx)("span",{className:"text-xs text-muted-foreground",children:Se(c.file.size)}),(0,De.jsx)(O,{variant:"ghost",size:"sm",onClick:()=>T(c.id),className:"h-6 w-6 p-0",children:(0,De.jsx)(A.X,{className:"h-4 w-4"})})]},c.id))})}),(0,De.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,De.jsxs)("div",{className:"flex gap-3",children:[(0,De.jsx)(Ge,{value:t,onChange:c=>p(c.target.value),onKeyPress:m,placeholder:"How can De help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),i&&(0,De.jsx)(O,{variant:"outline",size:"icon",onClick:()=>E.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,De.jsx)(A.Paperclip,{className:"h-4 w-4"})}),(0,De.jsx)(O,{onClick:h,disabled:!t.trim()&&n.length===0||o,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,De.jsx)(A.Send,{className:"h-4 w-4"})})]}),(0,De.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,De.jsxs)(O,{onClick:()=>L(!C),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,De.jsx)(A.Menu,{className:"h-3 w-3 mr-1"}),C?"Hide":"Show"," Capabilities"]}),(0,De.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[he().map((c,S)=>(0,De.jsx)(O,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>ie(c.id,ne),children:c.label},`context-${c.id}`)),he().length===0&&Pe().map((c,S)=>(0,De.jsx)(O,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:c.action,children:c.label},`suggestion-${S}`))]})]}),i&&(0,De.jsx)("input",{ref:E,type:"file",multiple:!0,onChange:ye,className:"hidden"})]})]})}0&&(module.exports={ChatInterface});
@@ -1 +1 @@
1
- import{a}from"../../chunk-FDRX3CL2.mjs";import"../../chunk-SIL7AP7H.mjs";import"../../chunk-QM5FOQHG.mjs";import"../../chunk-6OCLRAHU.mjs";import"../../chunk-2LINLX4S.mjs";import"../../chunk-DBY4SXQI.mjs";import"../../chunk-I2PVJQQR.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-UTHKFW4R.mjs";import"../../chunk-3BG2SCNC.mjs";import"../../chunk-6OT5PQXV.mjs";import"../../chunk-SIL7AP7H.mjs";import"../../chunk-QM5FOQHG.mjs";import"../../chunk-6OCLRAHU.mjs";import"../../chunk-5Y6FKL5W.mjs";import"../../chunk-EW6KWAHS.mjs";import"../../chunk-2LINLX4S.mjs";import"../../chunk-DBY4SXQI.mjs";import"../../chunk-I2PVJQQR.mjs";import"../../chunk-LTTO57ZK.mjs";import"../../chunk-Q2DPE66H.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-YNCJATT7.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};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface ApprovalRequestModalProps {
3
+ isOpen?: boolean;
4
+ reason: string;
5
+ onClose: () => void;
6
+ onApprove: () => void;
7
+ onDeny: () => void;
8
+ title?: string;
9
+ }
10
+ declare const ApprovalRequestModal: React.FC<ApprovalRequestModalProps>;
11
+ export type { ApprovalRequestModalProps };
12
+ export { ApprovalRequestModal };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ "use strict";"use client";var d=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var m=(o,e)=>{for(var r in e)d(o,r,{get:e[r],enumerable:!0})},h=(o,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of v(e))!x.call(o,s)&&s!==r&&d(o,s,{get:()=>e[s],enumerable:!(a=g(e,s))||a.enumerable});return o};var y=o=>h(d({},"__esModule",{value:!0}),o);var w={};m(w,{ApprovalRequestModal:()=>f});module.exports=y(w);var p=require("react"),t=require("react/jsx-runtime"),f=({isOpen:o=!0,reason:e,onClose:r,onApprove:a,onDeny:s,title:i="Approval Required"})=>{let[n,l]=(0,p.useState)(!1),c=()=>{l(!0),a(),r()},u=()=>{l(!0),s(),r()},b=()=>{l(!0),s(),r()};return o?(0,t.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full shadow-lg",children:[(0,t.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:i}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:e}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{onClick:c,disabled:n,className:`
5
+ px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
6
+ ${n?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
7
+ `,children:n?"Processing...":"Approve"}),(0,t.jsx)("button",{onClick:u,disabled:n,className:`
8
+ px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
9
+ ${n?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
10
+ `,children:n?"Processing...":"Deny"}),(0,t.jsx)("button",{onClick:b,disabled:n,className:`
11
+ px-4 py-2 text-white border-none rounded text-sm
12
+ ${n?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
13
+ `,children:"Cancel"})]})]}):null};0&&(module.exports={ApprovalRequestModal});
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";import{a}from"../../../chunk-6OT5PQXV.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as ApprovalRequestModal};