cortex-react-components 2.13.13 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-GETYSIZV.mjs → chunk-255P6K5W.mjs} +1 -1
- package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
- package/dist/{chunk-6FHRZHAJ.mjs → chunk-2HWSTGAP.mjs} +1 -1
- package/dist/{chunk-P6OSMPUQ.mjs → chunk-2RQDJ5XT.mjs} +1 -1
- package/dist/{chunk-UPRS7OYQ.mjs → chunk-2UNIT7NC.mjs} +1 -1
- package/dist/{chunk-3AZ2XX4O.mjs → chunk-2Z5N6HIX.mjs} +1 -1
- package/dist/chunk-3BG2SCNC.mjs +1 -0
- package/dist/chunk-4RGIPI27.mjs +1 -0
- package/dist/{chunk-XX4GSGRP.mjs → chunk-5NIEZE7A.mjs} +1 -1
- package/dist/{chunk-BQQ4V4PX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
- package/dist/{chunk-R6AYIVIR.mjs → chunk-5WVFEIMC.mjs} +1 -1
- package/dist/{chunk-QQFIVSBW.mjs → chunk-62A35O55.mjs} +1 -1
- package/dist/{chunk-GAZHKHGB.mjs → chunk-67QPOSVV.mjs} +1 -1
- package/dist/chunk-6OT5PQXV.mjs +13 -0
- package/dist/{chunk-7OMPPFGG.mjs → chunk-7GMAMIHM.mjs} +1 -1
- package/dist/{chunk-M527EJIX.mjs → chunk-AMVJPDM3.mjs} +1 -1
- package/dist/{chunk-KBEXWUKI.mjs → chunk-AQQCH7Z2.mjs} +1 -1
- package/dist/{chunk-DKRRVTCV.mjs → chunk-CJDUN6R4.mjs} +1 -1
- package/dist/{chunk-LAQ3QAUW.mjs → chunk-CLGBBNRB.mjs} +1 -1
- package/dist/{chunk-DXE6AGJX.mjs → chunk-D2H36ZLW.mjs} +1 -1
- package/dist/{chunk-MAZGVZJN.mjs → chunk-DMCFEJ2C.mjs} +1 -1
- package/dist/{chunk-2GM2LPLB.mjs → chunk-ERJXTG6X.mjs} +1 -1
- package/dist/{chunk-TO7SVJIU.mjs → chunk-F2Y3ELUO.mjs} +1 -1
- package/dist/{chunk-HDKHF3EA.mjs → chunk-FKU4VQR6.mjs} +1 -1
- package/dist/{chunk-RRME4EHD.mjs → chunk-GSOFCLPO.mjs} +1 -1
- package/dist/{chunk-F64CA5CH.mjs → chunk-H3CJOE6S.mjs} +1 -1
- package/dist/{chunk-U3FYDDE2.mjs → chunk-HKGW6JI2.mjs} +1 -1
- package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
- package/dist/{chunk-KZAYLEFB.mjs → chunk-I2GNNRFH.mjs} +1 -1
- package/dist/{chunk-PNUBVBSR.mjs → chunk-IF3425JX.mjs} +1 -1
- package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
- package/dist/{chunk-PTZT4QJW.mjs → chunk-LJQPLE4S.mjs} +1 -1
- package/dist/{chunk-2OOJ4ZFB.mjs → chunk-M7NV6EFH.mjs} +1 -1
- package/dist/{chunk-ESPA7NWT.mjs → chunk-MDBYZZXI.mjs} +1 -1
- package/dist/{chunk-BDDEMCAH.mjs → chunk-MFCVMJBO.mjs} +1 -1
- package/dist/{chunk-4SRUEQTP.mjs → chunk-MXCW6SOT.mjs} +1 -1
- package/dist/{chunk-FYQBRCQM.mjs → chunk-N3B3XNV3.mjs} +1 -1
- package/dist/{chunk-FEWOSBUJ.mjs → chunk-NWISIJFD.mjs} +1 -1
- package/dist/{chunk-UPDEVKI7.mjs → chunk-OLIYPWO3.mjs} +1 -1
- package/dist/{chunk-RIRZRO6U.mjs → chunk-P55W6AFU.mjs} +1 -1
- package/dist/{chunk-MX3JKY3V.mjs → chunk-P7S6XFU4.mjs} +1 -1
- package/dist/{chunk-MO4HRQEL.mjs → chunk-PK3OBSCB.mjs} +1 -1
- package/dist/{chunk-L5NPH5RX.mjs → chunk-PO3XUUWY.mjs} +1 -1
- package/dist/{chunk-W2UVMIWN.mjs → chunk-R5SXUWYU.mjs} +1 -1
- package/dist/{chunk-T5HJS6OF.mjs → chunk-RSDUFAIB.mjs} +1 -1
- package/dist/chunk-SDMPCZ2S.mjs +1 -0
- package/dist/{chunk-RZET5RXO.mjs → chunk-TILPSVAP.mjs} +1 -1
- package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
- package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
- package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
- package/dist/{chunk-OQCMTGML.mjs → chunk-XKGBG5FX.mjs} +1 -1
- package/dist/{chunk-HKMNAXLM.mjs → chunk-YKG4FNS4.mjs} +1 -1
- package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/CogeBoard.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.js +12 -3
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/Components/ApprovalRequest.d.ts +12 -0
- package/dist/components/Chat/Components/ApprovalRequest.js +13 -0
- package/dist/components/Chat/Components/ApprovalRequest.mjs +2 -0
- package/dist/components/Chat/CopilotInterface.js +12 -3
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/PartApprovalTool.d.ts +15 -0
- package/dist/components/Chat/PartTypes/PartApprovalTool.js +13 -0
- package/dist/components/Chat/PartTypes/PartApprovalTool.mjs +1 -0
- package/dist/components/Chat/PartTypes/index.d.ts +1 -0
- package/dist/components/Chat/PartTypes/index.js +13 -4
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +23 -14
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +38 -29
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +12 -3
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +12 -3
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +12 -3
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.d.ts +2 -0
- package/dist/components/Chat/index.js +13 -4
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Logo/index.d.ts +2 -0
- package/dist/components/Payload/Logo/index.js +1 -1
- package/dist/components/Payload/Logo/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/PayloadCard/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.js +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +22 -13
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +28 -19
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-AUBKJ4XO.mjs +0 -1
- package/dist/chunk-FDRX3CL2.mjs +0 -1
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
"use client"
|
|
4
4
|
|
|
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:`
|
|
5
|
+
"use strict";var Tt=Object.create;var Te=Object.defineProperty;var St=Object.getOwnPropertyDescriptor;var Mt=Object.getOwnPropertyNames;var Lt=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var Dt=(e,t)=>{for(var r in t)Te(e,r,{get:t[r],enumerable:!0})},qe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Mt(t))!It.call(e,l)&&l!==r&&Te(e,l,{get:()=>t[l],enumerable:!(o=St(t,l))||o.enumerable});return e};var O=(e,t,r)=>(r=e!=null?Tt(Lt(e)):{},qe(t||!e||!e.__esModule?Te(r,"default",{value:e,enumerable:!0}):r,e)),Et=e=>qe(Te({},"__esModule",{value:!0}),e);var Cr={};Dt(Cr,{ChatInterface:()=>wr});module.exports=Et(Cr);var W=require("react"),de=O(require("motion/react-client")),k=require("lucide-react");var Se=O(require("react")),K=O(require("@radix-ui/react-avatar"));var tt=require("clsx");var ze="-",zt=e=>{let t=Ht(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{let i=s.split(ze);return i[0]===""&&i.length!==1&&i.shift(),Je(i,t)||Bt(s)},getConflictingClassGroupIds:(s,i)=>{let d=r[s]||[];return i&&o[s]?[...d,...o[s]]:d}}},Je=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),l=o?Je(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(ze);return t.validators.find(({validator:s})=>s(n))?.classGroupId},Ke=/^\[(.+)\]$/,Bt=e=>{if(Ke.test(e)){let t=Ke.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ht=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Vt(Object.entries(e.classGroups),r).forEach(([n,s])=>{Ee(s,o,n,t)}),o},Ee=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:_e(t,l);n.classGroupId=r;return}if(typeof l=="function"){if(Ft(l)){Ee(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([n,s])=>{Ee(s,_e(t,n),r,o)})})},_e=(e,t)=>{let r=e;return t.split(ze).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ft=e=>e.isThemeGetter,Vt=(e,t)=>t?e.map(([r,o])=>{let l=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([s,i])=>[t+s,i])):n);return[r,l]}):e,Ot=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,l=(n,s)=>{r.set(n,s),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let s=r.get(n);if(s!==void 0)return s;if((s=o.get(n))!==void 0)return l(n,s),s},set(n,s){r.has(n)?r.set(n,s):l(n,s)}}},Qe="!",Gt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],n=t.length,s=i=>{let d=[],f=0,h=0,g;for(let w=0;w<i.length;w++){let T=i[w];if(f===0){if(T===l&&(o||i.slice(w,w+n)===t)){d.push(i.slice(h,w)),h=w+n;continue}if(T==="/"){g=w;continue}}T==="["?f++:T==="]"&&f--}let v=d.length===0?i:i.substring(h),R=v.startsWith(Qe),S=R?v.substring(1):v,A=g&&g>h?g-h:void 0;return{modifiers:d,hasImportantModifier:R,baseClassName:S,maybePostfixModifierPosition:A}};return r?i=>r({className:i,parseClassName:s}):s},$t=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},jt=e=>({cache:Ot(e.cacheSize),parseClassName:Gt(e),...zt(e)}),Ut=/\s+/,Wt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],s=e.trim().split(Ut),i="";for(let d=s.length-1;d>=0;d-=1){let f=s[d],{modifiers:h,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:R}=r(f),S=!!R,A=o(S?v.substring(0,R):v);if(!A){if(!S){i=f+(i.length>0?" "+i:i);continue}if(A=o(v),!A){i=f+(i.length>0?" "+i:i);continue}S=!1}let w=$t(h).join(":"),T=g?w+Qe:w,E=T+A;if(n.includes(E))continue;n.push(E);let y=l(A,S);for(let M=0;M<y.length;++M){let ae=y[M];n.push(T+ae)}i=f+(i.length>0?" "+i:i)}return i};function qt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Xe(t))&&(o&&(o+=" "),o+=r);return o}var Xe=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Xe(e[o]))&&(r&&(r+=" "),r+=t);return r};function Kt(e,...t){let r,o,l,n=s;function s(d){let f=t.reduce((h,g)=>g(h),e());return r=jt(f),o=r.cache.get,l=r.cache.set,n=i,i(d)}function i(d){let f=o(d);if(f)return f;let h=Wt(d,r);return l(d,h),h}return function(){return n(qt.apply(null,arguments))}}var N=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ze=/^\[(?:([Me-Me-]+):)?(.+)\]$/i,_t=/^\d+\/\d+$/,Jt=new Set(["px","full","screen"]),Qt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Yt=/^(inset_)?-?((\d+)?\.?(\d+)[Me-Me]+|0)_-?((\d+)?\.?(\d+)[Me-Me]+|0)/,er=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,q=e=>ue(e)||Jt.has(e)||_t.test(e),ee=e=>me(e,"length",lr),ue=e=>!!e&&!Number.isNaN(Number(e)),De=e=>me(e,"number",ue),ve=e=>!!e&&Number.isInteger(Number(e)),tr=e=>e.endsWith("%")&&ue(e.slice(0,-1)),m=e=>Ze.test(e),te=e=>Qt.test(e),rr=new Set(["length","size","percentage"]),ar=e=>me(e,rr,Ye),or=e=>me(e,"position",Ye),nr=new Set(["image","url"]),ir=e=>me(e,nr,dr),sr=e=>me(e,"",cr),he=()=>!0,me=(e,t,r)=>{let o=Ze.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},lr=e=>Xt.test(e)&&!Zt.test(e),Ye=()=>!1,cr=e=>Yt.test(e),dr=e=>er.test(e);var pr=()=>{let e=N("colors"),t=N("spacing"),r=N("blur"),o=N("brightness"),l=N("borderColor"),n=N("borderRadius"),s=N("borderSpacing"),i=N("borderWidth"),d=N("contrast"),f=N("grayscale"),h=N("hueRotate"),g=N("invert"),v=N("gap"),R=N("gradientColorStops"),S=N("gradientColorStopPositions"),A=N("inset"),w=N("margin"),T=N("opacity"),E=N("padding"),y=N("saturate"),M=N("scale"),ae=N("sepia"),Le=N("skew"),fe=N("space"),Ne=N("translate"),oe=()=>["auto","contain","none"],ke=()=>["auto","hidden","clip","visible","scroll"],be=()=>["auto",m,t],C=()=>[m,t],Ae=()=>["",q,ee],pe=()=>["auto",ue,m],Re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],Pe=()=>["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"],P=()=>["","0",m],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>[ue,m];return{cacheSize:500,separator:":",theme:{colors:[he],spacing:[q,ee],blur:["none","",te,m],brightness:x(),borderColor:[e],borderRadius:["none","","full",te,m],borderSpacing:C(),borderWidth:Ae(),contrast:x(),grayscale:P(),hueRotate:x(),invert:P(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[tr,ee],inset:be(),margin:be(),opacity:x(),padding:C(),saturate:x(),scale:x(),sepia:P(),skew:x(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[te]}],"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:[...Re(),m]}],overflow:[{overflow:ke()}],"overflow-x":[{"overflow-x":ke()}],"overflow-y":[{"overflow-y":ke()}],overscroll:[{overscroll:oe()}],"overscroll-x":[{"overscroll-x":oe()}],"overscroll-y":[{"overscroll-y":oe()}],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"],Me:[{Me:["auto",ve,m]}],basis:[{basis:be()}],"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:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",ve,m]}],"grid-cols":[{"grid-cols":[he]}],"col-start-end":[{col:["auto",{span:["full",ve,m]},m]}],"col-start":[{"col-start":pe()}],"col-end":[{"col-end":pe()}],"grid-rows":[{"grid-rows":[he]}],"row-start-end":[{row:["auto",{span:[ve,m]},m]}],"row-start":[{"row-start":pe()}],"row-end":[{"row-end":pe()}],"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:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"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]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[fe]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[fe]}],"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:[te]},te]}],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",te,ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",De]}],"font-family":[{font:[he]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",m]}],"line-clamp":[{"line-clamp":["none",ue,De]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",q,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:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",q,ee]}],"underline-offset":[{"underline-offset":["auto",q,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:C()}],"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:[...Re(),or]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ar]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ir]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],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-Me":[{"rounded-Me":[n]}],"rounded-ee":[{"rounded-ee":[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:[...ne(),"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:ne()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[q,m]}],"outline-w":[{outline:[q,ee]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[T]}],"ring-offset-w":[{"ring-offset":[q,ee]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",te,sr]}],"shadow-color":[{shadow:[he]}],opacity:[{opacity:[T]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Pe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",te,m]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[y]}],sepia:[{sepia:[ae]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[T]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:x()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:x()}],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:[ve,m]}],"translate-x":[{"translate-x":[Ne]}],"translate-y":[{"translate-y":[Ne]}],"skew-x":[{"skew-x":[Le]}],"skew-y":[{"skew-y":[Le]}],"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","ne-resize","nw-resize","Me-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":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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:[q,ee,De]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Me","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Me","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var et=Kt(pr);function p(...e){return et((0,tt.clsx)(e))}var Me=require("react/jsx-runtime"),ye=Se.forwardRef(({className:e,...t},r)=>(0,Me.jsx)(K.Root,{ref:r,className:p("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ye.displayName=K.Root.displayName;var ur=Se.forwardRef(({className:e,...t},r)=>(0,Me.jsx)(K.Image,{ref:r,className:p("aspect-square h-full w-full",e),...t}));ur.displayName=K.Image.displayName;var xe=Se.forwardRef(({className:e,...t},r)=>(0,Me.jsx)(K.Fallback,{ref:r,className:p("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));xe.displayName=K.Fallback.displayName;var rt=require("@radix-ui/react-slot"),at=require("class-variance-authority"),ot=O(require("react")),mr=(0,at.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"}}}),H=ot.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...l},n)=>(0,Me.jsx)(e?rt.Slot:"button",{className:p(mr({className:t,size:r,variant:o})),ref:n,...l}));H.displayName="Button";var ie=O(require("react"));var $=ie.forwardRef(({className:e,...t},r)=>(0,Me.jsx)("div",{ref:r,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));$.displayName="Card";var _=ie.forwardRef(({className:e,...t},r)=>(0,Me.jsx)("div",{ref:r,className:p("flex flex-col space-y-1.5 p-6",e),...t}));_.displayName="CardHeader";var J=ie.forwardRef(({className:e,...t},r)=>(0,Me.jsx)("div",{ref:r,className:p("font-semibold leading-none tracking-tight",e),...t}));J.displayName="CardTitle";var Be=ie.forwardRef(({className:e,...t},r)=>(0,Me.jsx)("div",{ref:r,className:p("text-sm text-muted-foreground",e),...t}));Be.displayName="CardDescription";var j=ie.forwardRef(({className:e,...t},r)=>(0,Me.jsx)("div",{ref:r,className:p("p-6 pt-0",e),...t}));j.displayName="CardContent";var we=ie.forwardRef(({className:e,...t},r)=>(0,Me.jsx)("div",{ref:r,className:p("flex items-center p-6 pt-0",e),...t}));we.displayName="CardFooter";var it=O(require("react"));var He=it.forwardRef(({className:e,type:t,...r},o)=>(0,Me.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));He.displayName="Input";var Fe=O(require("react")),F=O(require("@radix-ui/react-scroll-area"));var Ve=Fe.forwardRef(({className:e,children:t,...r},o)=>(0,Me.jsxs)(F.Root,{ref:o,className:p("relative overflow-hidden",e),...r,children:[(0,Me.jsx)(F.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Me.jsx)(lt,{}),(0,Me.jsx)(F.Corner,{})]}));Ve.displayName=F.Root.displayName;var lt=Fe.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,Me.jsx)(F.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,Me.jsx)(F.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));lt.displayName=F.ScrollAreaScrollbar.displayName;var gr=(0,at.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 le({className:e,variant:t,...r}){return(0,Me.jsx)("div",{className:p(gr({variant:t}),e),...r})}var U=require("motion/react");var pt={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 Oe(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function ut({capabilities:e,isOpen:t,onToggle:r,onActionSelect:o,onContextChange:l,colorScheme:n=pt,className:s}){let[i,d]=(0,W.useState)([]),[f,h]=(0,W.useState)([]),g=i[i.length-1],v=g?.children||e,R=(y,M)=>{switch(y.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,W.useMemo)(()=>({path:i,selectedItems:f,filters:{}}),[i,f]);(0,W.useEffect)(()=>{l&&l(S)},[S,l]);let A=y=>{y.type==="category"||y.type==="list"?d([...i,y]):y.type==="item"&&h([...f,y])},w=()=>{d(i.slice(0,-1))},T=y=>{d(i.slice(0,y+1))},E=()=>g?.actions?g.actions:[];return t?(0,Me.jsxs)("div",{className:p("w-full",s),children:[(0,Me.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Me.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,Me.jsx)(U.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:w,className:p("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,Me.jsx)(k.ChevronLeft,{className:p("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Me.jsx)("h4",{className:"font-medium text-sm",children:g?.name||"Capabilities"})]}),(0,Me.jsx)(U.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:p("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,Me.jsx)(k.Me,{className:p("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,Me.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Me.jsx)(U.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>d([]),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Me.jsxs)("span",{className:"relative",children:["Capabilities",(0,Me.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((y,M)=>(0,Me.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Me.jsx)(k.ChevronRight,{className:"h-2 w-2"}),(0,Me.jsx)(U.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>T(M),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Me.jsxs)("span",{className:"relative",children:[y.name,(0,Me.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"})]})})]},y.id))]}),(0,Me.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,Me.jsx)(U.AnimatePresence,{mode:"wait",children:(0,Me.jsx)(U.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,Me.jsx)(vr,{data:g.data,onItemSelect:y=>h([...f,y]),colorScheme:n}):(0,Me.jsx)(fr,{capabilities:v,onSelect:A,colorScheme:n})},g?.id||"root")})})]}):(0,Me.jsxs)(H,{onClick:r,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Me.jsx)(k.Menu,{className:"h-4 w-4"}),(0,Me.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function fr({capabilities:e,onSelect:t,colorScheme:r}){return(0,Me.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,Me.jsx)(br,{capability:o,onClick:()=>t(o),color:r.categories[l%r.categories.length]},o.id))})}function br({capability:e,onClick:t,selected:r,color:o}){return(0,Me.jsxs)(U.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:p("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,Me.jsx)("div",{className:p("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,Me.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Me.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,Me.jsx)(k.ChevronRight,{className:p("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,Me.jsx)(le,{variant:"secondary",className:p("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 vr({data:e,onItemSelect:t,colorScheme:r}){return(0,Me.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,Me.jsxs)(U.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:p("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,Me.jsx)("div",{className:p("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",r.items[l%r.items.length])}),(0,Me.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Me.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,Me.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,Me.jsx)("div",{className:p("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,Me.jsx)(le,{variant:"secondary",className:p("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 ft=require("date-fns");function mt({taskId:e,polling:t=!0,system:r="payload"}){let[o,l]=(0,W.useState)(null),[n,s]=(0,W.useState)(!1),[i,d]=(0,W.useState)(null),f=async(g=!0)=>{if(e){g&&s(!0);try{let v=await fetch(`/api/tasks/${e}`);if(!v.ok)throw new Error(`Failed to fetch task: ${v.statusText}`);let R=await v.json();l(R)}catch(v){console.error("Error fetching task:",v),d(v instanceof Error?v:new Error("Unknown error occurred"))}finally{g&&s(!1)}}},h=()=>f(!1);return(0,W.useEffect)(()=>{e&&f(!0);let g=null;return e&&t&&(g=setInterval(h,5e3)),()=>{g&&clearInterval(g)}},[e,t]),{task:o,loading:n,error:i}}var hr=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"}},yr=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function bt({data:e}){let{id:t,system:r,fetchLatest:o,taskData:l,error:n}=e||{};if(!t)return null;let s=null,i=!0,d=n,f=o!==void 0?o:!0;if(s=l||{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:s,error:d}),f){let{task:R,loading:S,error:A}=mt({taskId:t,system:r});s=R,i=S,d=A}else i=!1;let h=hr(s?.status||"todo"),g=yr(s?.status||"todo"),v=s?.dateLogged||new Date().toISOString();try{let R=new Date(s?.dateLogged||"");isNaN(R.getTime())||(v=(0,ft.formatDistanceToNow)(R,{addSuffix:!0}))}catch{}return(0,Me.jsxs)($,{className:p("w-full max-w-md shadow-md",d&&"border border-destructive"),children:[(0,Me.jsxs)(_,{className:"pb-2",children:[(0,Me.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Me.jsx)(J,{className:"text-lg font-semibold",children:i?"Loading...":s?.name||"Task"}),(0,Me.jsx)(le,{className:`${h}`,children:g})]}),s?.project&&(0,Me.jsxs)(Be,{className:"text-sm text-gray-500",children:["Project: ",s.project.name]})]}),(0,Me.jsx)(j,{className:"pb-2",children:i?(0,Me.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):d?(0,Me.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Me.jsx)("p",{className:"text-sm text-foreground",children:s?.description||"......."})}),(0,Me.jsx)(we,{className:"pt-2 flex items-center justify-between",children:(0,Me.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Me.jsx)(k.Clock,{className:"h-3 w-3 mr-1"}),(0,Me.jsxs)("span",{children:["Created ",v]}),(0,Me.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Me.jsxs)("span",{children:["Task #",t]})]})})]})}function yt({artefact:e,taskId:t,taskData:r,loading:o=!1,error:l=null}){let n=r||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},s=n.dateLogged;try{let i=new Date(n.dateLogged);isNaN(i.getTime())||(s=(0,ft.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,Me.jsxs)($,{className:"w-full max-w-md shadow-md",children:[(0,Me.jsx)(_,{className:"pb-2",children:(0,Me.jsx)("div",{className:"flex justify-between items-start",children:(0,Me.jsx)(J,{className:"text-lg font-semibold",children:o?"Loading...":n.name})})}),(0,Me.jsx)(j,{className:"pb-2",children:o?(0,Me.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):l?(0,Me.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Me.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,Me.jsx)(we,{className:"pt-2 flex items-center justify-between",children:(0,Me.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Me.jsx)(k.Clock,{className:"h-3 w-3 mr-1"}),(0,Me.jsxs)("span",{children:["Created ",s]}),(0,Me.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Me.jsxs)("span",{children:["Task #",n.id]})]})})]})}var wt=O(require("react"));var xt=({isOpen:e=!0,authUrl:t,onClose:r,onSuccess:o,description:l="This endpoint requires authentication to sync functions."})=>{let[n,s]=(0,W.useState)(!1),[i,d]=(0,W.useState)(""),f=()=>{if(!t){d("No authentication URL provided");return}s(!0),d("");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){d("Popup blocked. Please allow popups for this site and try again."),s(!1);return}let v=setInterval(()=>{try{g.closed&&(clearInterval(v),s(!1),o(),r())}catch{}},1e3);setTimeout(()=>{g.closed||(g.close(),clearInterval(v),s(!1),d("Authentication timed out. Please try again."))},6e5)}catch{d("Failed to open authentication window"),s(!1)}},h=async()=>{try{await navigator.clipboard.writeText(t),d("")}catch{d("Failed to copy URL to clipboard")}};return e?(0,Me.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center Me-[1000]",children:(0,Me.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,Me.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,Me.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:l}),i&&(0,Me.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:i}),(0,Me.jsxs)("div",{className:"flex gap-2",children:[(0,Me.jsx)("button",{onClick:f,disabled:n||!t,className:`
|
|
6
6
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
7
7
|
${n||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
8
|
-
`,children:n?"Authenticating...":"Authenticate"}),(0,
|
|
8
|
+
`,children:n?"Authenticating...":"Authenticate"}),(0,Me.jsx)("button",{onClick:h,disabled:!t,className:`
|
|
9
9
|
px-4 py-2 text-white border-none rounded text-sm
|
|
10
10
|
${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});
|
|
11
|
+
`,children:"Copy URL"}),(0,Me.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 $e=({toolPart:e,index:t,addToolResult:r})=>{let[o,l]=wt.default.useState(!0),n=()=>{r(e.input?.toolCallId,e.input?.tool,"Authentication completed"),l(!1)};switch(e.state){case"input-available":return(0,Me.jsxs)("div",{className:"mb-2",children:[(0,Me.jsx)(xt,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>l(!1),onSuccess:n,description:e.output?.reason||e.input?.reason}),!o&&(0,Me.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Me.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,Me.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Me.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,Me.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Ct=require("marked"),Nt=O(require("react-markdown"));function xr(e){return Ct.marked.lexer(e).map(r=>r.raw)}var kt=(0,W.memo)(({content:e})=>(0,Me.jsx)(Nt.default,{children:e}),(e,t)=>e.content===t.content);kt.displayName="MemoizedMarkdownBlock";var je=(0,W.memo)(({content:e,id:t})=>(0,W.useMemo)(()=>xr(e),[e]).map((o,l)=>(0,Me.jsx)(kt,{content:o},`${t}-block_${l}`)));je.displayName="PartText";var We=O(require("react"));var Rt=({isOpen:e=!0,reason:t,onClose:r,onApprove:o,onDeny:l,title:n="Approval Required"})=>{let[s,i]=(0,W.useState)(!1),d=()=>{i(!0),o(),r()},f=()=>{i(!0),l(),r()},h=()=>{i(!0),l(),r()};return e?(0,Me.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full shadow-lg",children:[(0,Me.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:n}),(0,Me.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:t}),(0,Me.jsxs)("div",{className:"flex gap-2",children:[(0,Me.jsx)("button",{onClick:d,disabled:s,className:`
|
|
12
|
+
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
13
|
+
${s?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
14
|
+
`,children:s?"Processing...":"Approve"}),(0,Me.jsx)("button",{onClick:f,disabled:s,className:`
|
|
15
|
+
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
16
|
+
${s?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
|
|
17
|
+
`,children:s?"Processing...":"Deny"}),(0,Me.jsx)("button",{onClick:h,disabled:s,className:`
|
|
18
|
+
px-4 py-2 text-white border-none rounded text-sm
|
|
19
|
+
${s?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
|
|
20
|
+
`,children:"Cancel"})]})]}):null};var Pt=({toolPart:e,index:t,addToolResult:r})=>{let[o,l]=We.default.useState(!0),[n,s]=We.default.useState(null),i=()=>{r(e.input?.toolCallId,e.input?.tool,"Approved"),l(!1),s("approve")},d=()=>{r(e.input?.toolCallId,e.input?.tool,"Denied"),l(!1),s("deny")};switch(e.state){case"input-available":return(0,Me.jsxs)("div",{className:"mb-2",children:[(0,Me.jsx)(Rt,{isOpen:o,onApprove:i,onDeny:d,onClose:()=>l(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,Me.jsxs)(Me.Fragment,{children:[n==="approve"&&(0,Me.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Me.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,Me.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Me.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),n==="deny"&&(0,Me.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Me.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,Me.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Me.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Me.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};function wr({messages:e,input:t,isTyping:r=!1,currentSessionTitle:o,capabilities:l,fileUploads:n,isDragOver:s,enableFileUpload:i,onInputChange:d,addToolResult:f,onSendMessage:h,onKeyPress:g,onFileUpload:v,onRemoveFile:R,onDragOver:S,className:A}){let w=(0,W.useRef)(null),T=(0,W.useRef)(null),E=(0,W.useRef)(null),[y,M]=(0,W.useState)(!1),[ae,Le]=(0,W.useState)({path:[],selectedItems:[],filters:{}});(0,W.useEffect)(()=>{w.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,W.useEffect)(()=>{y&&setTimeout(()=>{w.current?.scrollIntoView({behavior:"smooth"})},100)},[y]);let fe=()=>Oe(ae),Ne=()=>{let c=[];return l.forEach(P=>{P.actions&&P.actions.forEach(I=>{c.push({label:I.label,action:()=>oe(I.id,{path:[P],selectedItems:[],filters:{}})})}),P.children&&P.children.forEach(I=>{I.type==="list"&&I.data&&c.push({label:`View ${I.name}`,action:()=>M(!0)})})}),c.slice(0,5)},oe=(c,P)=>{console.log("Capability action:",c,P);let I=`Executing ${c} with context: ${JSON.stringify(P.path.map(x=>x.name))}`;M(!1)},ke=Oe({path:[],selectedItems:[],filters:{}}),be=c=>{v(c.target.files),c.target.files&&(c.target.value="")},C=c=>{c.preventDefault(),S(!0)},Ae=c=>{c.preventDefault(),S(!1)},pe=c=>{c.preventDefault(),S(!1),v(c.dataTransfer.files)},Re=c=>{if(c===0)return"0 Bytes";let P=1024,I=["Bytes","KB","MB","GB"],x=Math.floor(Math.log(c)/Math.log(P));return parseFloat((c/Math.pow(P,x)).toFixed(2))+" "+I[x]},ne=c=>c.startsWith("image/")?(0,Me.jsx)(k.Image,{className:"h-4 w-4"}):c.startsWith("text/")?(0,Me.jsx)(k.FileText,{className:"h-4 w-4"}):(0,Me.jsx)(k.File,{className:"h-4 w-4"}),Pe=c=>{let P=c.role==="assistant",I=c.role==="user";return(0,Me.jsxs)("div",{className:p("flex my-2 items-start gap-3",I?"flex-row-reverse":""),children:[(0,Me.jsx)(ye,{className:"h-8 w-8 shrink-0",children:(0,Me.jsx)(xe,{className:p(I?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:I?(0,Me.jsx)(k.User,{className:"h-4 w-4"}):(0,Me.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Me.jsx)("div",{className:p("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",I?"bg-primary text-primary-foreground":"bg-muted"),children:c.parts.map((x,D)=>{if(x.type==="text")return(0,Me.jsx)(je,{id:c.id,content:x.text},`${c.id}-text`);if(x.type==="file"){let b=x;return(0,Me.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Me.jsxs)("div",{className:"flex items-center gap-2",children:[ne(b.mediaType||"application/octet-stream"),(0,Me.jsx)("div",{className:"flex-1 min-w-0",children:(0,Me.jsx)("p",{className:"text-sm font-medium truncate",children:b.filename||b.url?.split("/").pop()||"File"})}),b.url&&(0,Me.jsx)(H,{variant:"ghost",size:"sm",onClick:()=>window.open(b.url,"_blank"),className:"h-8 w-8 p-0",children:(0,Me.jsx)(k.Download,{className:"h-4 w-4"})})]})},D)}if(x.type.startsWith("tool-")){let b=x,Y=x.type.replace("tool-","");if(Y==="task")switch(b.state){case"input-available":return(0,Me.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},D);case"output-available":return(0,Me.jsx)("div",{className:"mb-2",children:(0,Me.jsx)(bt,{data:{id:b.output?.id||b.input?.id,fetchLatest:!1,taskData:b.output||b.input}})},D);case"output-error":return(0,Me.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",b.errorText]},D);default:return null}if(x.type==="tool-requestEndpointLogin")return(0,Me.jsx)("div",{className:"mb-2",children:(0,Me.jsx)($e,{toolPart:b,index:D,addToolResult:f??(()=>{})})},D);if(x.type==="tool-authenticate")return(0,Me.jsx)("div",{className:"mb-2",children:(0,Me.jsx)($e,{toolPart:b,index:D,addToolResult:f??(()=>{})})},D);if(x.type==="tool-requestApproval")return(0,Me.jsx)("div",{className:"mb-2",children:(0,Me.jsx)(Pt,{toolPart:b,index:D,addToolResult:f??(()=>{})})},D);if(Y==="artefact")switch(b.state){case"input-available":return(0,Me.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},D);case"output-available":return(0,Me.jsx)("div",{className:"mb-2",children:(0,Me.jsx)(yt,{artefact:b.output?.description||"",taskId:b.output?.id||b.input?.id,taskData:b.output||b.input})},D);case"output-error":return(0,Me.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",b.errorText]},D);default:return null}return(0,Me.jsx)("div",{className:"mb-2",children:(0,Me.jsxs)($,{className:"w-full max-w-md",children:[(0,Me.jsx)(_,{children:(0,Me.jsx)(J,{className:"text-lg",children:Y})}),(0,Me.jsxs)(j,{children:[b.state==="input-available"&&(0,Me.jsxs)("p",{className:"text-sm",children:["Processing ",Y,"..."]}),b.state==="output-available"&&(0,Me.jsx)("pre",{className:"text-sm",children:JSON.stringify(b.output,null,2)}),b.state==="output-error"&&(0,Me.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",b.errorText]})]})]})},D)}if(x.type.startsWith("data-")){let b=x,Y=x.type.replace("data-","");return Y==="reference"?(0,Me.jsx)("div",{className:"mb-2",children:(0,Me.jsx)($,{className:"w-full",children:(0,Me.jsx)(j,{className:"p-4",children:(0,Me.jsx)("div",{className:"space-y-2",children:b.data?.references?.map((V,Ie)=>(0,Me.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,Me.jsx)(le,{variant:"outline",children:V.type||"link"}),(0,Me.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Me.jsx)("p",{className:"text-sm font-medium truncate",children:V.title}),V.description&&(0,Me.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:V.description})]}),V.url&&(0,Me.jsx)(H,{variant:"ghost",size:"sm",onClick:()=>window.open(V.url,"_blank"),className:"h-8 w-8 p-0",children:(0,Me.jsx)(k.ExternalLink,{className:"h-4 w-4"})})]},Ie))})})})},D):Y==="menu"?(0,Me.jsx)("div",{className:"mb-2",children:(0,Me.jsxs)($,{className:"w-full",children:[(0,Me.jsx)(_,{children:(0,Me.jsx)(J,{className:"text-lg",children:b.data?.title})}),(0,Me.jsx)(j,{children:(0,Me.jsx)("div",{className:"space-y-2",children:b.data?.items?.map((V,Ie)=>(0,Me.jsx)(H,{variant:"outline",className:"w-full justify-start",onClick:V.action,children:(0,Me.jsxs)("div",{className:"text-left",children:[(0,Me.jsx)("p",{className:"font-medium",children:V.label}),V.description&&(0,Me.jsx)("p",{className:"text-xs text-muted-foreground",children:V.description})]})},Ie))})})]})},D):(0,Me.jsx)("div",{className:"mb-2",children:(0,Me.jsxs)($,{className:"w-full max-w-md",children:[(0,Me.jsx)(_,{children:(0,Me.jsx)(J,{className:"text-lg",children:Y})}),(0,Me.jsx)(j,{children:(0,Me.jsx)("pre",{className:"text-sm",children:JSON.stringify(b.data,null,2)})})]})},D)}return null})})]})};return(0,Me.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${A||""}`,children:[(0,Me.jsxs)(Ve,{ref:T,className:"flex-1 p-4 bg-background border-0",onDragOver:C,onDragLeave:Ae,onDrop:pe,children:[(0,Me.jsxs)("div",{className:p("space-y-4",s&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Me.jsx)(de.animate,{children:e.map(c=>(0,Me.jsx)(de.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:p("flex gap-3",c.role==="user"?"flex-row-reverse":"flex-row"),children:Pe(c)},c.id))}),y&&(0,Me.jsxs)(de.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Me.jsx)(ye,{className:"h-8 w-8",children:(0,Me.jsx)(xe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Me.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Me.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Me.jsx)(ut,{capabilities:l,isOpen:y,onToggle:()=>M(!y),onActionSelect:oe,className:"w-full"})})]}),r&&(0,Me.jsxs)(de.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Me.jsx)(ye,{className:"h-8 w-8",children:(0,Me.jsx)(xe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Me.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Me.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Me.jsxs)("div",{className:"flex space-x-1",children:[(0,Me.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Me.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Me.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Me.jsx)("div",{ref:w})]}),n.length>0&&(0,Me.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Me.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(c=>(0,Me.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[ne(c.file.type),(0,Me.jsx)("span",{className:"text-sm font-medium",children:c.file.name}),(0,Me.jsx)("span",{className:"text-xs text-muted-foreground",children:Re(c.file.size)}),(0,Me.jsx)(H,{variant:"ghost",size:"sm",onClick:()=>R(c.id),className:"h-6 w-6 p-0",children:(0,Me.jsx)(k.Me,{className:"h-4 w-4"})})]},c.id))})}),(0,Me.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Me.jsxs)("div",{className:"flex gap-3",children:[(0,Me.jsx)(He,{value:t,onChange:c=>d(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,Me.jsx)(H,{variant:"outline",size:"icon",onClick:()=>E.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Me.jsx)(k.Paperclip,{className:"h-4 w-4"})}),(0,Me.jsx)(H,{onClick:h,disabled:!t.trim()&&n.length===0||r,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Me.jsx)(k.Send,{className:"h-4 w-4"})})]}),(0,Me.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Me.jsxs)(H,{onClick:()=>M(!y),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Me.jsx)(k.Menu,{className:"h-3 w-3 mr-1"}),y?"Hide":"Show"," Capabilities"]}),(0,Me.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[fe().map((c,P)=>(0,Me.jsx)(H,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>oe(c.id,ae),children:c.label},`context-${c.id}`)),fe().length===0&&Ne().map((c,P)=>(0,Me.jsx)(H,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:c.action,children:c.label},`suggestion-${P}`))]})]}),i&&(0,Me.jsx)("input",{ref:E,type:"file",multiple:!0,onChange:be,className:"hidden"})]})]})}0&&(module.exports={ChatInterface});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-4RGIPI27.mjs";import"../../chunk-3BG2SCNC.mjs";import"../../chunk-6OT5PQXV.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};
|
|
@@ -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});
|