cortex-react-components 2.28.2 → 2.28.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/chunk-53ERRCTV.mjs +4 -0
  2. package/dist/{chunk-PTSAG7IY.mjs → chunk-5EKGFFJD.mjs} +1 -1
  3. package/dist/{chunk-LHO4WFYP.mjs → chunk-5FWH5YVM.mjs} +1 -1
  4. package/dist/{chunk-2RQDJ5XT.mjs → chunk-5MMNC65L.mjs} +1 -1
  5. package/dist/{chunk-RS4VD3ML.mjs → chunk-6FHRZHAJ.mjs} +1 -1
  6. package/dist/{chunk-H3CJOE6S.mjs → chunk-7BYNW77I.mjs} +1 -1
  7. package/dist/{chunk-YKG4FNS4.mjs → chunk-7MPZOMXK.mjs} +1 -1
  8. package/dist/{chunk-5SHZBJ5R.mjs → chunk-AABB4TFO.mjs} +1 -1
  9. package/dist/{chunk-255P6K5W.mjs → chunk-CC57QZMB.mjs} +1 -1
  10. package/dist/{chunk-LJQPLE4S.mjs → chunk-FB5PBKLV.mjs} +1 -1
  11. package/dist/{chunk-B7AXSCTN.mjs → chunk-GUEJKEJJ.mjs} +1 -1
  12. package/dist/{chunk-NWISIJFD.mjs → chunk-IISYRLNU.mjs} +1 -1
  13. package/dist/{chunk-HKGW6JI2.mjs → chunk-ITNR7N47.mjs} +1 -1
  14. package/dist/{chunk-5WVFEIMC.mjs → chunk-J3VJUPR7.mjs} +1 -1
  15. package/dist/{chunk-XKGBG5FX.mjs → chunk-JBGWDOOS.mjs} +1 -1
  16. package/dist/{chunk-IF3425JX.mjs → chunk-JU4TJYSZ.mjs} +1 -1
  17. package/dist/{chunk-5NIEZE7A.mjs → chunk-KBEXWUKI.mjs} +1 -1
  18. package/dist/{chunk-I2GNNRFH.mjs → chunk-KPQ56JSD.mjs} +1 -1
  19. package/dist/{chunk-JCWFPKF3.mjs → chunk-MAZGVZJN.mjs} +1 -1
  20. package/dist/{chunk-67QPOSVV.mjs → chunk-MU47F4UR.mjs} +1 -1
  21. package/dist/{chunk-P7S6XFU4.mjs → chunk-MX3JKY3V.mjs} +1 -1
  22. package/dist/{chunk-ERJXTG6X.mjs → chunk-NDBSSX6Q.mjs} +1 -1
  23. package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
  24. package/dist/{chunk-62A35O55.mjs → chunk-PVPDARFR.mjs} +1 -1
  25. package/dist/{chunk-M7NV6EFH.mjs → chunk-QDP657UR.mjs} +1 -1
  26. package/dist/{chunk-N3B3XNV3.mjs → chunk-SME3D72Q.mjs} +1 -1
  27. package/dist/chunk-SX2LOHXX.mjs +4 -0
  28. package/dist/{chunk-FKU4VQR6.mjs → chunk-TIIYFAV6.mjs} +1 -1
  29. package/dist/{chunk-MXCW6SOT.mjs → chunk-TQKXHMD7.mjs} +1 -1
  30. package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
  31. package/dist/{chunk-ATPB5HSG.mjs → chunk-V7SNI22Q.mjs} +1 -1
  32. package/dist/{chunk-AHMDJQZI.mjs → chunk-VKLEU4ZW.mjs} +1 -1
  33. package/dist/{chunk-7GMAMIHM.mjs → chunk-VNKGAW4K.mjs} +1 -1
  34. package/dist/{chunk-AQQCH7Z2.mjs → chunk-XX4GSGRP.mjs} +1 -1
  35. package/dist/{chunk-PK3OBSCB.mjs → chunk-YH72WKGC.mjs} +1 -1
  36. package/dist/components/Blocks/Banner.mjs +1 -1
  37. package/dist/components/Blocks/CallToAction.mjs +1 -1
  38. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  39. package/dist/components/Blocks/Content.mjs +1 -1
  40. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  41. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  42. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  43. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  44. package/dist/components/Blocks/index.mjs +1 -1
  45. package/dist/components/CRM/CogeBoard.js +1 -1
  46. package/dist/components/CRM/CogeBoard.mjs +1 -1
  47. package/dist/components/CRM/KanbanBoard.js +1 -1
  48. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  49. package/dist/components/CRM/index.js +1 -1
  50. package/dist/components/CRM/index.mjs +1 -1
  51. package/dist/components/Cards/ContentCard.mjs +1 -1
  52. package/dist/components/Cards/FeatureCard.mjs +1 -1
  53. package/dist/components/Cards/index.mjs +1 -1
  54. package/dist/components/Chat/example-usage.mjs +1 -1
  55. package/dist/components/Chat/index.mjs +1 -1
  56. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  57. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  58. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  59. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
  60. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  61. package/dist/components/DigitalColleagues/index.mjs +1 -1
  62. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  63. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  64. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  65. package/dist/components/Foundary/MainPage.mjs +1 -1
  66. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  67. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  68. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  69. package/dist/components/Foundary/Views/index.mjs +1 -1
  70. package/dist/components/Foundary/file-edit.mjs +1 -1
  71. package/dist/components/Foundary/index.mjs +1 -1
  72. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  73. package/dist/components/HeaderFooter/index.mjs +1 -1
  74. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  75. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  76. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  77. package/dist/components/Heros/PostHero/index.mjs +1 -1
  78. package/dist/components/Heros/RenderHero.mjs +1 -1
  79. package/dist/components/Heros/index.mjs +1 -1
  80. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  81. package/dist/components/Holidays/index.mjs +1 -1
  82. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  83. package/dist/components/Layouts/Print.mjs +1 -1
  84. package/dist/components/Layouts/SlideShow.mjs +1 -1
  85. package/dist/components/Layouts/index.mjs +1 -1
  86. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  87. package/dist/components/Menus/SidebarRight.mjs +1 -1
  88. package/dist/components/Menus/index.mjs +1 -1
  89. package/dist/components/Payload/RichText/index.mjs +1 -1
  90. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  91. package/dist/components/Payload/index.mjs +1 -1
  92. package/dist/components/Projects/FileView.mjs +1 -1
  93. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  94. package/dist/components/Projects/ProjectPage.mjs +1 -1
  95. package/dist/components/Projects/ProjectView.mjs +1 -1
  96. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  97. package/dist/components/Projects/file-list.mjs +1 -1
  98. package/dist/components/Projects/index.mjs +1 -1
  99. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  100. package/dist/components/dc-temp/index.mjs +1 -1
  101. package/dist/components/index.js +1 -1
  102. package/dist/components/index.mjs +1 -1
  103. package/dist/components/ui/index.mjs +1 -1
  104. package/dist/components/ui/sidebar.mjs +1 -1
  105. package/dist/index.js +1 -1
  106. package/dist/index.mjs +1 -1
  107. package/dist/metafile-cjs.json +1 -1
  108. package/dist/metafile-esm.json +1 -1
  109. package/dist/pages/Blog.mjs +1 -1
  110. package/dist/pages/Documentation.mjs +1 -1
  111. package/dist/pages/IndexPage.mjs +1 -1
  112. package/dist/pages/Intranet.mjs +1 -1
  113. package/dist/pages/LandingPage.mjs +1 -1
  114. package/dist/pages/Page.mjs +1 -1
  115. package/dist/pages/Publish.mjs +1 -1
  116. package/dist/pages/Website.mjs +1 -1
  117. package/dist/sections/AboutSection.mjs +1 -1
  118. package/dist/sections/BlogDetail.mjs +1 -1
  119. package/dist/sections/BlogList.mjs +1 -1
  120. package/dist/sections/BlogListSection.mjs +1 -1
  121. package/dist/sections/ContactSection.mjs +1 -1
  122. package/dist/sections/PageSections.mjs +1 -1
  123. package/dist/sections/PricingSection.mjs +1 -1
  124. package/dist/sections/ServiceDetail.mjs +1 -1
  125. package/dist/sections/ServiceDetailSection.mjs +1 -1
  126. package/dist/sections/ServiceSection.mjs +1 -1
  127. package/dist/sections/form/index.mjs +1 -1
  128. package/dist/sections/index.mjs +1 -1
  129. package/package.json +1 -1
  130. package/dist/chunk-GED5VYLZ.mjs +0 -4
  131. package/dist/chunk-Z4ZRNNSX.mjs +0 -4
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use strict";"use client";var St=Object.create;var de=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Rt=Object.getPrototypeOf,Dt=Object.prototype.hasOwnProperty;var kt=(e,t)=>{for(var r in t)de(e,r,{get:t[r],enumerable:!0})},Fe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Nt(t))!Dt.call(e,l)&&l!==r&&de(e,l,{get:()=>t[l],enumerable:!(o=Pt(t,l))||o.enumerable});return e};var A=(e,t,r)=>(r=e!=null?St(Rt(e)):{},Fe(t||!e||!e.__esModule?de(r,"default",{value:e,enumerable:!0}):r,e)),Tt=e=>Fe(de({},"__esModule",{value:!0}),e);var hr={};kt(hr,{CRMCogeBoard:()=>xr});module.exports=Tt(hr);var Ce=require("react");var te=A(require("react")),D=A(require("@radix-ui/react-dialog")),Ze=require("lucide-react");var Xe=require("clsx");var Te="-",At=e=>{let t=Mt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let a=c.split(Te);return a[0]===""&&a.length!==1&&a.shift(),_e(a,t)||Lt(c)},getConflictingClassGroupIds:(c,a)=>{let x=r[c]||[];return a&&o[c]?[...x,...o[c]]:x}}},_e=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),l=o?_e(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(Te);return t.validators.find(({validator:c})=>c(n))?.classGroupId},Oe=/^\[(.+)\]$/,Lt=e=>{if(Oe.test(e)){let t=Oe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Mt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Et(Object.entries(e.classGroups),r).forEach(([n,c])=>{ke(c,o,n,t)}),o},ke=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:je(t,l);n.classGroupId=r;return}if(typeof l=="function"){if(It(l)){ke(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([n,c])=>{ke(c,je(t,n),r,o)})})},je=(e,t)=>{let r=e;return t.split(Te).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},It=e=>e.isThemeGetter,Et=(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(([c,a])=>[t+c,a])):n);return[r,l]}):e,zt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,l=(n,c)=>{r.set(n,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let c=r.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return l(n,c),c},set(n,c){r.has(n)?r.set(n,c):l(n,c)}}},$e="!",Bt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],n=t.length,c=a=>{let x=[],u=0,d=0,C;for(let g=0;g<a.length;g++){let k=a[g];if(u===0){if(k===l&&(o||a.slice(g,g+n)===t)){x.push(a.slice(d,g)),d=g+n;continue}if(k==="/"){C=g;continue}}k==="["?u++:k==="]"&&u--}let P=x.length===0?a:a.substring(d),S=P.startsWith($e),b=S?P.substring(1):P,R=C&&C>d?C-d:void 0;return{modifiers:x,hasImportantModifier:S,baseClassName:b,maybePostfixModifierPosition:R}};return r?a=>r({className:a,parseClassName:c}):c},Ht=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},Vt=e=>({cache:zt(e.cacheSize),parseClassName:Bt(e),...At(e)}),Wt=/\M+/,Gt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],c=e.trim().split(Wt),a="";for(let x=c.length-1;x>=0;x-=1){let u=c[x],{modifiers:d,hasImportantModifier:C,baseClassName:P,maybePostfixModifierPosition:S}=r(u),b=!!S,R=o(b?P.substring(0,S):P);if(!R){if(!b){a=u+(a.length>0?" "+a:a);continue}if(R=o(P),!R){a=u+(a.length>0?" "+a:a);continue}b=!1}let g=Ht(d).join(":"),k=C?g+$e:g,T=k+R;if(n.includes(T))continue;n.push(T);let V=l(R,b);for(let E=0;E<V.length;++E){let i=V[E];n.push(k+i)}a=u+(a.length>0?" "+a:a)}return a};function Ut(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ke(t))&&(o&&(o+=" "),o+=r);return o}var Ke=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ke(e[o]))&&(r&&(r+=" "),r+=t);return r};function Ft(e,...t){let r,o,l,n=c;function c(x){let u=t.reduce((d,C)=>C(d),e());return r=Vt(u),o=r.cache.get,l=r.cache.set,n=a,a(x)}function a(x){let u=o(x);if(u)return u;let d=Gt(x,r);return l(x,d),d}return function(){return n(Ut.apply(null,arguments))}}var y=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Je=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ot=/^\d+\/\d+$/,jt=new Set(["px","full","screen"]),_t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$t=/\d+(%|px|r?em|[sdl]?M([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))\(.+\)$/,Jt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Ce-?((\d+)?\.?(\d+)[a-z]+|0)/,Qt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>q(e)||jt.has(e)||Ot.test(e),W=e=>X(e,"length",or),q=e=>!!e&&!Number.isNaN(Number(e)),De=e=>X(e,"number",q),Y=e=>!!e&&Number.isInteger(Number(e)),qt=e=>e.endsWith("%")&&q(e.slice(0,-1)),m=e=>Je.test(e),G=e=>_t.test(e),Xt=new Set(["length","size","percentage"]),Zt=e=>X(e,Xt,Qe),Yt=e=>X(e,"position",Qe),er=new Set(["image","url"]),tr=e=>X(e,er,sr),rr=e=>X(e,"",ar),ee=()=>!0,X=(e,t,r)=>{let o=Je.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},or=e=>$t.test(e)&&!Kt.test(e),Qe=()=>!1,ar=e=>Jt.test(e),sr=e=>Qt.test(e);var ir=()=>{let e=y("colors"),t=y("spacing"),r=y("blur"),o=y("brightness"),l=y("borderColor"),n=y("borderRadius"),c=y("borderSpacing"),a=y("borderWidth"),x=y("contrast"),u=y("grayscale"),d=y("hueRotate"),C=y("invert"),P=y("gap"),S=y("gradientColorStops"),b=y("gradientColorStopPositions"),R=y("inset"),g=y("margin"),k=y("opacity"),T=y("padding"),V=y("saturate"),E=y("scale"),i=y("sepia"),h=y("skew"),Q=y("space"),He=y("translate"),Se=()=>["auto","contain","none"],Pe=()=>["auto","hidden","clip","visible","scroll"],Ne=()=>["auto",m,t],w=()=>[m,t],Ve=()=>["",B,W],le=()=>["auto",q,m],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ce=()=>["solid","dashed","dotted","double","none"],Ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Re=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",m],Ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[q,m];return{cacheSize:500,separator:":",theme:{colors:[ee],spacing:[B,W],blur:["none","",G,m],brightness:z(),borderColor:[e],borderRadius:["none","","full",G,m],borderSpacing:w(),borderWidth:Ve(),contrast:z(),grayscale:Z(),hueRotate:z(),invert:Z(),gap:w(),gradientColorStops:[e],gradientColorStopPositions:[qt,W],inset:Ne(),margin:Ne(),opacity:z(),padding:w(),saturate:z(),scale:z(),sepia:Z(),skew:z(),space:w(),translate:w()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":Ue()}],"break-before":[{"break-before":Ue()}],"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:[...We(),m]}],overflow:[{overflow:Pe()}],"overflow-x":[{"overflow-x":Pe()}],"overflow-y":[{"overflow-y":Pe()}],overscroll:[{overscroll:Se()}],"overscroll-x":[{"overscroll-x":Se()}],"overscroll-y":[{"overscroll-y":Se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Y,m]}],basis:[{basis:Ne()}],"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:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Y,m]}],"grid-cols":[{"grid-cols":[ee]}],"col-start-end":[{col:["auto",{span:["full",Y,m]},m]}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":[ee]}],"row-start-end":[{row:["auto",{span:[Y,m]},m]}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"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:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...Re()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Re(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Re(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],M:[{M:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[Q]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Q]}],"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:[G]},G]}],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",G,W]}],"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:[ee]}],"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",q,De]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",B,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":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",B,W]}],"underline-offset":[{"underline-offset":["auto",B,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":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),Yt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},tr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[n]}],"rounded-M":[{"rounded-M":[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-se":[{"rounded-se":[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:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-M":[{"border-M":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...ce(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:ce()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-M":[{"border-M":[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:["",...ce()]}],"outline-offset":[{"outline-offset":[B,m]}],"outline-w":[{outline:[B,W]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[B,W]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",G,rr]}],"shadow-color":[{shadow:[ee]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...Ge(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ge()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[x]}],"drop-shadow":[{"drop-shadow":["","none",G,m]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[C]}],saturate:[{saturate:[V]}],sepia:[{sepia:[i]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[x]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[C]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Y,m]}],"translate-x":[{"translate-x":[He]}],"translate-y":[{"translate-y":[He]}],"skew-x":[{"skew-x":[h]}],"skew-y":[{"skew-y":[h]}],"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","M-resize","w-resize","ne-resize","nw-resize","se-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-M":[{"scroll-M":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":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:[B,W,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","M","mr","mb","ml"],mx:["mr","ml"],my:["M","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-M","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-M":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-M","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-M","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-M","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-M","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 qe=Ft(ir);function p(...e){return qe((0,Xe.clsx)(e))}var M=require("react/jsx-runtime"),Ye=D.Root;var nr=D.Portal;var et=te.forwardRef(({className:e,...t},r)=>(0,M.jsx)(D.Overlay,{ref:r,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));et.displayName=D.Overlay.displayName;var Ae=te.forwardRef(({className:e,children:t,...r},o)=>(0,M.jsxs)(nr,{children:[(0,M.jsx)(et,{}),(0,M.jsxs)(D.Content,{ref:o,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,(0,M.jsxs)(D.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,M.jsx)(Ze.X,{className:"h-4 w-4"}),(0,M.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ae.displayName=D.Content.displayName;var Le=({className:e,...t})=>(0,M.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Le.displayName="DialogHeader";var lr=({className:e,...t})=>(0,M.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});lr.displayName="DialogFooter";var Me=te.forwardRef(({className:e,...t},r)=>(0,M.jsx)(D.Title,{ref:r,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));Me.displayName=D.Title.displayName;var cr=te.forwardRef(({className:e,...t},r)=>(0,M.jsx)(D.Description,{ref:r,className:p("text-sm text-muted-foreground",e),...t}));cr.displayName=D.Description.displayName;var tt=require("@radix-ui/react-slot"),rt=require("class-variance-authority"),ot=A(require("react")),dr=(0,rt.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"}}}),re=ot.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...l},n)=>(0,M.jsx)(e?tt.Slot:"button",{className:p(dr({className:t,size:r,variant:o})),ref:n,...l}));re.displayName="Button";var st=A(require("react"));var oe=st.forwardRef(({className:e,type:t,...r},o)=>(0,M.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}));oe.displayName="Input";var nt=A(require("react")),Ie=A(require("@radix-ui/react-label"));var mr=(0,rt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),H=nt.forwardRef(({className:e,...t},r)=>(0,M.jsx)(Ie.Root,{ref:r,className:p(mr(),e),...t}));H.displayName=Ie.Root.displayName;var dt=A(require("react")),Ee=dt.forwardRef(({className:e,...t},r)=>(0,M.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));Ee.displayName="Textarea";var f=A(require("@radix-ui/react-select")),U=A(require("react")),me=f.Root;var pe=f.Value,ae=U.forwardRef(({children:e,className:t,...r},o)=>(0,M.jsxs)(f.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,M.jsx)(f.Icon,{asChild:!0,children:(0,M.jsx)(Ze.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ae.displayName=f.Trigger.displayName;var pt=U.forwardRef(({className:e,...t},r)=>(0,M.jsx)(f.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,M.jsx)(Ze.ChevronUp,{className:"h-4 w-4"})}));pt.displayName=f.ScrollUpButton.displayName;var ut=U.forwardRef(({className:e,...t},r)=>(0,M.jsx)(f.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,M.jsx)(Ze.ChevronDown,{className:"h-4 w-4"})}));ut.displayName=f.ScrollDownButton.displayName;var se=U.forwardRef(({children:e,className:t,position:r="popper",...o},l)=>(0,M.jsx)(f.Portal,{children:(0,M.jsxs)(f.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,ref:l,...o,children:[(0,M.jsx)(pt,{}),(0,M.jsx)(f.Viewport,{className:p("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,M.jsx)(ut,{})]})}));se.displayName=f.Content.displayName;var pr=U.forwardRef(({className:e,...t},r)=>(0,M.jsx)(f.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));pr.displayName=f.Label.displayName;var ie=U.forwardRef(({children:e,className:t,...r},o)=>(0,M.jsxs)(f.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...r,children:[(0,M.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,M.jsx)(f.ItemIndicator,{children:(0,M.jsx)(Ze.Check,{className:"h-4 w-4"})})}),(0,M.jsx)(f.ItemText,{children:e})]}));ie.displayName=f.Item.displayName;var ur=U.forwardRef(({className:e,...t},r)=>(0,M.jsx)(f.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));ur.displayName=f.Separator.displayName;var ne=A(require("@radix-ui/react-checkbox")),gt=A(require("react")),ze=gt.forwardRef(({className:e,...t},r)=>(0,M.jsx)(ne.Root,{className:p("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,M.jsx)(ne.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,M.jsx)(Ze.Check,{className:"h-4 w-4"})})}));ze.displayName=ne.Root.displayName;var fr=(0,rt.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 fe({className:e,variant:t,...r}){return(0,M.jsx)("div",{className:p(fr({variant:t}),e),...r})}var Be=A(require("react")),I=A(require("@radix-ui/react-scroll-area"));var ge=Be.forwardRef(({className:e,children:t,...r},o)=>(0,M.jsxs)(I.Root,{ref:o,className:p("relative overflow-hidden",e),...r,children:[(0,M.jsx)(I.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,M.jsx)(xt,{}),(0,M.jsx)(I.Corner,{})]}));ge.displayName=I.Root.displayName;var xt=Be.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,M.jsx)(I.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,M.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));xt.displayName=I.ScrollAreaScrollbar.displayName;function ht({deal:e,users:t,customer:r,categories:o,onClose:l,onSave:n,onAddComment:c}){let[a,x]=(0,Ce.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[u,d]=(0,Ce.useState)(""),[C,P]=(0,Ce.useState)(!1),[S,b]=(0,Ce.useState)(null);(0,Ce.useEffect)(()=>{P(JSON.stringify(e)!==JSON.stringify(a))},[e,a]);let R=async()=>{try{let i=await n(a);i.success?(P(!1),b(null)):console.error("Failed to save deal:",i.errors)}catch(i){console.error("Failed to save deal:",i)}},g=(i,h)=>{x(Q=>({...Q,[i]:h}))},k=i=>{let h=(a.categories||[]).includes(i)?(a.categories||[]).filter(Q=>Q!==i):[...a.categories||[],i];g("categories",h)},T=async()=>{if(u.trim()){let i={text:u,timestamp:new Date().toISOString()};try{let h=await c(i);if(!h.success){console.error("Failed to add comment:",h.errors);return}}catch(h){console.error("Failed to add comment:",h)}x(h=>({...h,comments:[...h.comments||[],i]})),d("")}},V=i=>{switch(i){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},E=i=>t?.find(h=>h.id===Number(i));return(0,M.jsx)(Ye,{open:!0,children:(0,M.jsxs)(Ae,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,M.jsxs)(Le,{className:"flex flex-row items-center justify-between",children:[(0,M.jsx)(Me,{className:"text-2xl font-bold",children:r?.name||"no customer"}),(0,M.jsxs)("div",{className:"flex space-x-2",children:[(0,M.jsx)(re,{variant:"outline",onClick:l,children:"Close"}),(0,M.jsxs)(re,{onClick:R,disabled:!C,children:[(0,M.jsx)(Ze.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,M.jsxs)(ge,{className:"flex-grow pr-4",children:[(0,M.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,M.jsx)("div",{className:"grid gap-2 m-1",children:S==="value"?(0,M.jsx)(oe,{type:"number",value:a.value,onChange:i=>g("value",Number(i.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,M.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("value"),children:["\xA3",a.value?.toLocaleString()]})}),(0,M.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Assignee"}),S==="assignee"?(0,M.jsxs)(me,{value:a?.assignee?.id?.toString()||"",onValueChange:i=>g("assignee",E(i)),children:[(0,M.jsx)(ae,{children:(0,M.jsx)(pe,{placeholder:"Select assignee"})}),(0,M.jsx)(se,{children:t&&t.map(i=>(0,M.jsx)(ie,{value:i?.id?.toString()||"",children:i.name},i.id))})]}):(0,M.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,M.jsx)(Ze.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,M.jsx)("span",{children:a?.assignee?.name})]})]}),(0,M.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Closure Date"}),S==="closureDate"?(0,M.jsx)(oe,{type:"date",value:a.closureDate?.split("T")[0]??"",onChange:i=>g("closureDate",i.target.value),onBlur:()=>b(null),className:"mr-2",autoFocus:!0}):(0,M.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,M.jsx)(Ze.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,M.jsx)("span",{children:a.closureDate?new Date(a.closureDate).toLocaleDateString("en-GB"):"M/A"})]})]})]}),(0,M.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,M.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Description"}),S==="description"?(0,M.jsx)(Ee,{value:a.description||"",onChange:i=>g("description",i.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,M.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:a.description})]})}),(0,M.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,M.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Status"}),S==="status"?(0,M.jsxs)(me,{value:a.status,onValueChange:i=>{g("status",i),b(null)},children:[(0,M.jsx)(ae,{children:(0,M.jsx)(pe,{placeholder:"Select status"})}),(0,M.jsx)(se,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(i=>(0,M.jsx)(ie,{value:i,children:i},i))})]}):(0,M.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:a.status})]}),(0,M.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Categories"}),S==="categories"?(0,M.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(i=>(0,M.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,M.jsx)(ze,{id:i.id?.toString()||"",checked:(a.categories||[]).some(h=>h.id===i.id),onCheckedChange:()=>i.id!==void 0&&k(i)}),(0,M.jsx)("label",{htmlFor:(i.id??"").toString(),className:`text-sm font-medium ${V(i.type||"sector")} px-2 py-1 rounded`,children:i.name})]},i.id))}):(0,M.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:a.categories&&a.categories.map(i=>{let h=i;return h?(0,M.jsx)(fe,{variant:"outline",className:V(h.type||"sector"),children:h.name},h.id):null})})]}),(0,M.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"COGE Status"}),S==="gecoStatus"?(0,M.jsxs)(me,{value:a.gecoStatus??void 0,onValueChange:i=>{g("gecoStatus",i),b(null)},children:[(0,M.jsx)(ae,{children:(0,M.jsx)(pe,{placeholder:"Select status"})}),(0,M.jsx)(se,{children:["firm","forecast","other"].map(i=>(0,M.jsx)(ie,{value:i,children:i.charAt(0).toUpperCase()+i.slice(1)},i))})]}):(0,M.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:a.gecoStatus?a.gecoStatus.charAt(0).toUpperCase()+a.gecoStatus.slice(1):"M/A"})]})]}),(0,M.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,M.jsxs)("div",{className:"grid gap-2",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,M.jsx)(ge,{className:"h-[200px] overflow-y-auto",children:(0,M.jsx)("div",{className:"space-y-2",children:a.comments&&a.comments.slice().sort((i,h)=>new Date(h.timestamp||"").getTime()-new Date(i.timestamp||"").getTime()).map(i=>(0,M.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,M.jsx)("p",{className:"text-sm text-foreground",children:i.text}),(0,M.jsxs)("p",{className:"text-xs text-foreground M-1",children:[i?.author?.name," - ",new Date(i.timestamp||"").toLocaleString()]})]},i.id))})}),(0,M.jsxs)("div",{className:"flex M-2",children:[(0,M.jsx)(oe,{value:u,onChange:i=>d(i.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,M.jsxs)(re,{onClick:T,className:"ml-2",children:[(0,M.jsx)(Ze.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,M.jsxs)("div",{className:"text-xs text-gray-500 M-4",children:["Last modified: ",new Date(a.updatedAt||"").toLocaleString()]})]})]})]})})}var $=A(require("react"));var be=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));be.displayName="Card";var ve=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("flex flex-col space-y-1.5 p-6",e),...t}));ve.displayName="CardHeader";var xe=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("font-semibold leading-none tracking-tight",e),...t}));xe.displayName="CardTitle";var gr=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("text-sm text-muted-foreground",e),...t}));gr.displayName="CardDescription";var he=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("p-6 pt-0",e),...t}));he.displayName="CardContent";var br=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("flex items-center p-6 pt-0",e),...t}));br.displayName="CardFooter";function yt({deal:e,customer:t,categories:r,onClick:o,compact:l=!1}){let n=r.find(c=>c.type==="proposition"&&(e.categories??[]).includes(c.id));return l?(0,M.jsxs)(be,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,M.jsxs)(ve,{className:"pb-1 pt-2",children:[(0,M.jsx)(xe,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,M.jsx)("p",{className:"text-sm text-foreground M-1",children:e.description})]}),(0,M.jsx)(he,{className:"text-xs text-gray-200 pb-2",children:(0,M.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,M.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,M.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,M.jsxs)(be,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,M.jsxs)(ve,{className:"pb-2",children:[(0,M.jsx)("div",{className:"flex justify-between items-center",children:(0,M.jsx)(xe,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,M.jsx)("p",{className:"text-sm text-foreground M-1",children:e.description})]}),(0,M.jsxs)(he,{children:[(0,M.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,M.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,M.jsx)(Ze.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,M.jsx)("span",{children:e.assignee.name})]}),(0,M.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,M.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,M.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,M.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,M.jsx)(Ze.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,M.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,M.jsx)("div",{className:"flex justify-between items-left",children:n&&(0,M.jsx)(fe,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:n.name})})]})]})}var we=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function wt({status:e,deals:t,users:r,customers:o,categories:l,onDealClick:n,calculateColumnValue:c,calculateWeightedValue:a,compact:x=!1}){return(0,M.jsxs)("div",{className:"flex flex-col w-80 h-full",children:[(0,M.jsxs)("h2",{className:"text-xl font-semibold mb-4 flex-shrink-0",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,M.jsx)(we.Droppable,{droppableId:e,isDropDisabled:!1,children:u=>(0,M.jsxs)("div",{ref:u.innerRef,...u.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-1 min-h-0 overflow-y-auto shadow-inner scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:[t.map((d,C)=>(0,M.jsx)(we.Draggable,{draggableId:d.id.toString(),index:d.id,children:P=>(0,M.jsx)("div",{ref:P.innerRef,...P.draggableProps,...P.dragHandleProps,children:(0,M.jsx)(yt,{deal:d,customer:d.customer,categories:l,onClick:()=>n(d),compact:x})})},d.id.toString())),u.placeholder]})}),(0,M.jsxs)("div",{className:"text-sm p-3 rounded-lg shadow flex-shrink-0 M-auto",children:[(0,M.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,M.jsxs)("span",{className:"text-green-600",children:["\xA3",c(t).toLocaleString()]})]}),(0,M.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,M.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}var vr=["firm","forecast","other"];function xr({initialData:e,updateDeal:t,addComment:r}){let[o,l]=(0,Ce.useState)(null),n=u=>(e.deals??[]).filter(d=>d.gecoStatus===u).filter(d=>d.status!=="Lost").filter(d=>d.status!=="Cold"),c=u=>u.reduce((d,C)=>d+(C.value||0),0),a=(u,d)=>{let C={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0};return u.reduce((P,S)=>P+(S.value||0)*(C[S.status]??0),0)},x=(0,Ce.useCallback)(u=>{let{source:d,destination:C}=u;if(!C||d.droppableId===C.droppableId&&d.index===C.index)return;let P=d.droppableId,S=C.droppableId,b=e.deals?.filter(g=>g.id===d.index)[0],R=[...e.deals??[]];b&&(b.gecoStatus=S,t(b))},[t]);return(0,M.jsx)(we.DragDropContext,{onDragEnd:x,children:(0,M.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,M.jsx)("div",{className:"flex space-x-4 pb-4",children:vr.map(u=>{let d=n(u);return(0,M.jsx)(wt,{status:u,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:l,calculateColumnValue:c,calculateWeightedValue:a,compact:!0},u)})}),o&&(0,M.jsx)(ht,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>l(null),onSave:t,onAddComment:u=>r(o.id.toString(),u)})]})})}0&&(module.exports={CRMCogeBoard});
4
+ "use strict";"use client";var St=Object.create;var de=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Rt=Object.getPrototypeOf,Dt=Object.prototype.hasOwnProperty;var kt=(e,t)=>{for(var r in t)de(e,r,{get:t[r],enumerable:!0})},Fe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Nt(t))!Dt.call(e,l)&&l!==r&&de(e,l,{get:()=>t[l],enumerable:!(o=Pt(t,l))||o.enumerable});return e};var A=(e,t,r)=>(r=e!=null?St(Rt(e)):{},Fe(t||!e||!e.__esModule?de(r,"default",{value:e,enumerable:!0}):r,e)),Tt=e=>Fe(de({},"__esModule",{value:!0}),e);var hr={};kt(hr,{CRMCogeBoard:()=>xr});module.exports=Tt(hr);var Ce=require("react");var te=A(require("react")),D=A(require("@radix-ui/react-dialog")),Ze=require("lucide-react");var Xe=require("clsx");var Te="-",At=e=>{let t=Mt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let a=c.split(Te);return a[0]===""&&a.length!==1&&a.shift(),_e(a,t)||Lt(c)},getConflictingClassGroupIds:(c,a)=>{let x=r[c]||[];return a&&o[c]?[...x,...o[c]]:x}}},_e=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),l=o?_e(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(Te);return t.validators.find(({validator:c})=>c(n))?.classGroupId},Oe=/^\[(.+)\]$/,Lt=e=>{if(Oe.test(e)){let t=Oe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Mt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Et(Object.entries(e.classGroups),r).forEach(([n,c])=>{ke(c,o,n,t)}),o},ke=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:je(t,l);n.classGroupId=r;return}if(typeof l=="function"){if(It(l)){ke(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([n,c])=>{ke(c,je(t,n),r,o)})})},je=(e,t)=>{let r=e;return t.split(Te).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},It=e=>e.isThemeGetter,Et=(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(([c,a])=>[t+c,a])):n);return[r,l]}):e,zt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,l=(n,c)=>{r.set(n,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let c=r.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return l(n,c),c},set(n,c){r.has(n)?r.set(n,c):l(n,c)}}},$e="!",Bt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],n=t.length,c=a=>{let x=[],u=0,d=0,C;for(let g=0;g<a.length;g++){let k=a[g];if(u===0){if(k===l&&(o||a.slice(g,g+n)===t)){x.push(a.slice(d,g)),d=g+n;continue}if(k==="/"){C=g;continue}}k==="["?u++:k==="]"&&u--}let P=x.length===0?a:a.substring(d),S=P.startsWith($e),b=S?P.substring(1):P,R=C&&C>d?C-d:void 0;return{modifiers:x,hasImportantModifier:S,baseClassName:b,maybePostfixModifierPosition:R}};return r?a=>r({className:a,parseClassName:c}):c},Ht=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},Vt=e=>({cache:zt(e.cacheSize),parseClassName:Bt(e),...At(e)}),Wt=/\M+/,Gt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],c=e.trim().split(Wt),a="";for(let x=c.length-1;x>=0;x-=1){let u=c[x],{modifiers:d,hasImportantModifier:C,baseClassName:P,maybePostfixModifierPosition:S}=r(u),b=!!S,R=o(b?P.substring(0,S):P);if(!R){if(!b){a=u+(a.length>0?" "+a:a);continue}if(R=o(P),!R){a=u+(a.length>0?" "+a:a);continue}b=!1}let g=Ht(d).join(":"),k=C?g+$e:g,T=k+R;if(n.includes(T))continue;n.push(T);let V=l(R,b);for(let E=0;E<V.length;++E){let i=V[E];n.push(k+i)}a=u+(a.length>0?" "+a:a)}return a};function Ut(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ke(t))&&(o&&(o+=" "),o+=r);return o}var Ke=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ke(e[o]))&&(r&&(r+=" "),r+=t);return r};function Ft(e,...t){let r,o,l,n=c;function c(x){let u=t.reduce((d,C)=>C(d),e());return r=Vt(u),o=r.cache.get,l=r.cache.set,n=a,a(x)}function a(x){let u=o(x);if(u)return u;let d=Gt(x,r);return l(x,d),d}return function(){return n(Ut.apply(null,arguments))}}var y=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Je=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ot=/^\d+\/\d+$/,jt=new Set(["px","full","screen"]),_t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$t=/\d+(%|px|r?em|[sdl]?M([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))\(.+\)$/,Jt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Ce-?((\d+)?\.?(\d+)[a-z]+|0)/,Qt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>q(e)||jt.has(e)||Ot.test(e),W=e=>X(e,"length",or),q=e=>!!e&&!Number.isNaN(Number(e)),De=e=>X(e,"number",q),Y=e=>!!e&&Number.isInteger(Number(e)),qt=e=>e.endsWith("%")&&q(e.slice(0,-1)),m=e=>Je.test(e),G=e=>_t.test(e),Xt=new Set(["length","size","percentage"]),Zt=e=>X(e,Xt,Qe),Yt=e=>X(e,"position",Qe),er=new Set(["image","url"]),tr=e=>X(e,er,sr),rr=e=>X(e,"",ar),ee=()=>!0,X=(e,t,r)=>{let o=Je.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},or=e=>$t.test(e)&&!Kt.test(e),Qe=()=>!1,ar=e=>Jt.test(e),sr=e=>Qt.test(e);var ir=()=>{let e=y("colors"),t=y("spacing"),r=y("blur"),o=y("brightness"),l=y("borderColor"),n=y("borderRadius"),c=y("borderSpacing"),a=y("borderWidth"),x=y("contrast"),u=y("grayscale"),d=y("hueRotate"),C=y("invert"),P=y("gap"),S=y("gradientColorStops"),b=y("gradientColorStopPositions"),R=y("inset"),g=y("margin"),k=y("opacity"),T=y("padding"),V=y("saturate"),E=y("scale"),i=y("sepia"),h=y("skew"),Q=y("space"),He=y("translate"),Se=()=>["auto","contain","none"],Pe=()=>["auto","hidden","clip","visible","scroll"],Ne=()=>["auto",m,t],w=()=>[m,t],Ve=()=>["",B,W],le=()=>["auto",q,m],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ce=()=>["solid","dashed","dotted","double","none"],Ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Re=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",m],Ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[q,m];return{cacheSize:500,separator:":",theme:{colors:[ee],spacing:[B,W],blur:["none","",G,m],brightness:z(),borderColor:[e],borderRadius:["none","","full",G,m],borderSpacing:w(),borderWidth:Ve(),contrast:z(),grayscale:Z(),hueRotate:z(),invert:Z(),gap:w(),gradientColorStops:[e],gradientColorStopPositions:[qt,W],inset:Ne(),margin:Ne(),opacity:z(),padding:w(),saturate:z(),scale:z(),sepia:Z(),skew:z(),space:w(),translate:w()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":Ue()}],"break-before":[{"break-before":Ue()}],"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:[...We(),m]}],overflow:[{overflow:Pe()}],"overflow-x":[{"overflow-x":Pe()}],"overflow-y":[{"overflow-y":Pe()}],overscroll:[{overscroll:Se()}],"overscroll-x":[{"overscroll-x":Se()}],"overscroll-y":[{"overscroll-y":Se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Y,m]}],basis:[{basis:Ne()}],"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:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Y,m]}],"grid-cols":[{"grid-cols":[ee]}],"col-start-end":[{col:["auto",{span:["full",Y,m]},m]}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":[ee]}],"row-start-end":[{row:["auto",{span:[Y,m]},m]}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"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:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...Re()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Re(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Re(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],M:[{M:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[Q]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Q]}],"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:[G]},G]}],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",G,W]}],"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:[ee]}],"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",q,De]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",B,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":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",B,W]}],"underline-offset":[{"underline-offset":["auto",B,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":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),Yt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},tr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[n]}],"rounded-M":[{"rounded-M":[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-se":[{"rounded-se":[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:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-M":[{"border-M":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...ce(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:ce()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-M":[{"border-M":[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:["",...ce()]}],"outline-offset":[{"outline-offset":[B,m]}],"outline-w":[{outline:[B,W]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[B,W]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",G,rr]}],"shadow-color":[{shadow:[ee]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...Ge(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ge()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[x]}],"drop-shadow":[{"drop-shadow":["","none",G,m]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[C]}],saturate:[{saturate:[V]}],sepia:[{sepia:[i]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[x]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[C]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Y,m]}],"translate-x":[{"translate-x":[He]}],"translate-y":[{"translate-y":[He]}],"skew-x":[{"skew-x":[h]}],"skew-y":[{"skew-y":[h]}],"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","M-resize","w-resize","ne-resize","nw-resize","se-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-M":[{"scroll-M":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":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:[B,W,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","M","mr","mb","ml"],mx:["mr","ml"],my:["M","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-M","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-M":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-M","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-M","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-M","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-M","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 qe=Ft(ir);function p(...e){return qe((0,Xe.clsx)(e))}var M=require("react/jsx-runtime"),Ye=D.Root;var nr=D.Portal;var et=te.forwardRef(({className:e,...t},r)=>(0,M.jsx)(D.Overlay,{ref:r,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));et.displayName=D.Overlay.displayName;var Ae=te.forwardRef(({className:e,children:t,...r},o)=>(0,M.jsxs)(nr,{children:[(0,M.jsx)(et,{}),(0,M.jsxs)(D.Content,{ref:o,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,(0,M.jsxs)(D.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,M.jsx)(Ze.X,{className:"h-4 w-4"}),(0,M.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ae.displayName=D.Content.displayName;var Le=({className:e,...t})=>(0,M.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Le.displayName="DialogHeader";var lr=({className:e,...t})=>(0,M.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});lr.displayName="DialogFooter";var Me=te.forwardRef(({className:e,...t},r)=>(0,M.jsx)(D.Title,{ref:r,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));Me.displayName=D.Title.displayName;var cr=te.forwardRef(({className:e,...t},r)=>(0,M.jsx)(D.Description,{ref:r,className:p("text-sm text-muted-foreground",e),...t}));cr.displayName=D.Description.displayName;var tt=require("@radix-ui/react-slot"),rt=require("class-variance-authority"),ot=A(require("react")),dr=(0,rt.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"}}}),re=ot.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...l},n)=>(0,M.jsx)(e?tt.Slot:"button",{className:p(dr({className:t,size:r,variant:o})),ref:n,...l}));re.displayName="Button";var st=A(require("react"));var oe=st.forwardRef(({className:e,type:t,...r},o)=>(0,M.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}));oe.displayName="Input";var nt=A(require("react")),Ie=A(require("@radix-ui/react-label"));var mr=(0,rt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),H=nt.forwardRef(({className:e,...t},r)=>(0,M.jsx)(Ie.Root,{ref:r,className:p(mr(),e),...t}));H.displayName=Ie.Root.displayName;var dt=A(require("react")),Ee=dt.forwardRef(({className:e,...t},r)=>(0,M.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));Ee.displayName="Textarea";var f=A(require("@radix-ui/react-select")),U=A(require("react")),me=f.Root;var pe=f.Value,ae=U.forwardRef(({children:e,className:t,...r},o)=>(0,M.jsxs)(f.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,M.jsx)(f.Icon,{asChild:!0,children:(0,M.jsx)(Ze.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ae.displayName=f.Trigger.displayName;var pt=U.forwardRef(({className:e,...t},r)=>(0,M.jsx)(f.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,M.jsx)(Ze.ChevronUp,{className:"h-4 w-4"})}));pt.displayName=f.ScrollUpButton.displayName;var ut=U.forwardRef(({className:e,...t},r)=>(0,M.jsx)(f.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,M.jsx)(Ze.ChevronDown,{className:"h-4 w-4"})}));ut.displayName=f.ScrollDownButton.displayName;var se=U.forwardRef(({children:e,className:t,position:r="popper",...o},l)=>(0,M.jsx)(f.Portal,{children:(0,M.jsxs)(f.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,ref:l,...o,children:[(0,M.jsx)(pt,{}),(0,M.jsx)(f.Viewport,{className:p("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,M.jsx)(ut,{})]})}));se.displayName=f.Content.displayName;var pr=U.forwardRef(({className:e,...t},r)=>(0,M.jsx)(f.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));pr.displayName=f.Label.displayName;var ie=U.forwardRef(({children:e,className:t,...r},o)=>(0,M.jsxs)(f.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...r,children:[(0,M.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,M.jsx)(f.ItemIndicator,{children:(0,M.jsx)(Ze.Check,{className:"h-4 w-4"})})}),(0,M.jsx)(f.ItemText,{children:e})]}));ie.displayName=f.Item.displayName;var ur=U.forwardRef(({className:e,...t},r)=>(0,M.jsx)(f.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));ur.displayName=f.Separator.displayName;var ne=A(require("@radix-ui/react-checkbox")),gt=A(require("react")),ze=gt.forwardRef(({className:e,...t},r)=>(0,M.jsx)(ne.Root,{className:p("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,M.jsx)(ne.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,M.jsx)(Ze.Check,{className:"h-4 w-4"})})}));ze.displayName=ne.Root.displayName;var fr=(0,rt.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 fe({className:e,variant:t,...r}){return(0,M.jsx)("div",{className:p(fr({variant:t}),e),...r})}var Be=A(require("react")),I=A(require("@radix-ui/react-scroll-area"));var ge=Be.forwardRef(({className:e,children:t,...r},o)=>(0,M.jsxs)(I.Root,{ref:o,className:p("relative overflow-hidden",e),...r,children:[(0,M.jsx)(I.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,M.jsx)(xt,{}),(0,M.jsx)(I.Corner,{})]}));ge.displayName=I.Root.displayName;var xt=Be.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,M.jsx)(I.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,M.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));xt.displayName=I.ScrollAreaScrollbar.displayName;function ht({deal:e,users:t,customer:r,categories:o,onClose:l,onSave:n,onAddComment:c}){let[a,x]=(0,Ce.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[u,d]=(0,Ce.useState)(""),[C,P]=(0,Ce.useState)(!1),[S,b]=(0,Ce.useState)(null);(0,Ce.useEffect)(()=>{P(JSON.stringify(e)!==JSON.stringify(a))},[e,a]);let R=async()=>{try{let i=await n(a);i.success?(P(!1),b(null)):console.error("Failed to save deal:",i.errors)}catch(i){console.error("Failed to save deal:",i)}},g=(i,h)=>{x(Q=>({...Q,[i]:h}))},k=i=>{let h=(a.categories||[]).includes(i)?(a.categories||[]).filter(Q=>Q!==i):[...a.categories||[],i];g("categories",h)},T=async()=>{if(u.trim()){let i={text:u,timestamp:new Date().toISOString()};try{let h=await c(i);if(!h.success){console.error("Failed to add comment:",h.errors);return}}catch(h){console.error("Failed to add comment:",h)}x(h=>({...h,comments:[...h.comments||[],i]})),d("")}},V=i=>{switch(i){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},E=i=>t?.find(h=>h.id===Number(i));return(0,M.jsx)(Ye,{open:!0,children:(0,M.jsxs)(Ae,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,M.jsxs)(Le,{className:"flex flex-row items-center justify-between",children:[(0,M.jsx)(Me,{className:"text-2xl font-bold",children:r?.name||"no customer"}),(0,M.jsxs)("div",{className:"flex space-x-2",children:[(0,M.jsx)(re,{variant:"outline",onClick:l,children:"Close"}),(0,M.jsxs)(re,{onClick:R,disabled:!C,children:[(0,M.jsx)(Ze.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,M.jsxs)(ge,{className:"flex-grow pr-4",children:[(0,M.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,M.jsx)("div",{className:"grid gap-2 m-1",children:S==="value"?(0,M.jsx)(oe,{type:"number",value:a.value,onChange:i=>g("value",Number(i.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,M.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("value"),children:["\xA3",a.value?.toLocaleString()]})}),(0,M.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Assignee"}),S==="assignee"?(0,M.jsxs)(me,{value:a?.assignee?.id?.toString()||"",onValueChange:i=>g("assignee",E(i)),children:[(0,M.jsx)(ae,{children:(0,M.jsx)(pe,{placeholder:"Select assignee"})}),(0,M.jsx)(se,{children:t&&t.map(i=>(0,M.jsx)(ie,{value:i?.id?.toString()||"",children:i.name},i.id))})]}):(0,M.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,M.jsx)(Ze.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,M.jsx)("span",{children:a?.assignee?.name})]})]}),(0,M.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Closure Date"}),S==="closureDate"?(0,M.jsx)(oe,{type:"date",value:a.closureDate?.split("T")[0]??"",onChange:i=>g("closureDate",i.target.value),onBlur:()=>b(null),className:"mr-2",autoFocus:!0}):(0,M.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,M.jsx)(Ze.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,M.jsx)("span",{children:a.closureDate?new Date(a.closureDate).toLocaleDateString("en-GB"):"M/A"})]})]})]}),(0,M.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,M.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Description"}),S==="description"?(0,M.jsx)(Ee,{value:a.description||"",onChange:i=>g("description",i.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,M.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:a.description})]})}),(0,M.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,M.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Status"}),S==="status"?(0,M.jsxs)(me,{value:a.status,onValueChange:i=>{g("status",i),b(null)},children:[(0,M.jsx)(ae,{children:(0,M.jsx)(pe,{placeholder:"Select status"})}),(0,M.jsx)(se,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(i=>(0,M.jsx)(ie,{value:i,children:i},i))})]}):(0,M.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:a.status})]}),(0,M.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Categories"}),S==="categories"?(0,M.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(i=>(0,M.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,M.jsx)(ze,{id:i.id?.toString()||"",checked:(a.categories||[]).some(h=>h.id===i.id),onCheckedChange:()=>i.id!==void 0&&k(i)}),(0,M.jsx)("label",{htmlFor:(i.id??"").toString(),className:`text-sm font-medium ${V(i.type||"sector")} px-2 py-1 rounded`,children:i.name})]},i.id))}):(0,M.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:a.categories&&a.categories.map(i=>{let h=i;return h?(0,M.jsx)(fe,{variant:"outline",className:V(h.type||"sector"),children:h.name},h.id):null})})]}),(0,M.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"COGE Status"}),S==="gecoStatus"?(0,M.jsxs)(me,{value:a.gecoStatus??void 0,onValueChange:i=>{g("gecoStatus",i),b(null)},children:[(0,M.jsx)(ae,{children:(0,M.jsx)(pe,{placeholder:"Select status"})}),(0,M.jsx)(se,{children:["firm","forecast","other"].map(i=>(0,M.jsx)(ie,{value:i,children:i.charAt(0).toUpperCase()+i.slice(1)},i))})]}):(0,M.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:a.gecoStatus?a.gecoStatus.charAt(0).toUpperCase()+a.gecoStatus.slice(1):"M/A"})]})]}),(0,M.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,M.jsxs)("div",{className:"grid gap-2",children:[(0,M.jsx)(H,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,M.jsx)(ge,{className:"h-[200px] overflow-y-auto",children:(0,M.jsx)("div",{className:"space-y-2",children:a.comments&&a.comments.slice().sort((i,h)=>new Date(h.timestamp||"").getTime()-new Date(i.timestamp||"").getTime()).map(i=>(0,M.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,M.jsx)("p",{className:"text-sm text-foreground",children:i.text}),(0,M.jsxs)("p",{className:"text-xs text-foreground M-1",children:[i?.author?.name," - ",new Date(i.timestamp||"").toLocaleString()]})]},i.id))})}),(0,M.jsxs)("div",{className:"flex M-2",children:[(0,M.jsx)(oe,{value:u,onChange:i=>d(i.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,M.jsxs)(re,{onClick:T,className:"ml-2",children:[(0,M.jsx)(Ze.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,M.jsxs)("div",{className:"text-xs text-gray-500 M-4",children:["Last modified: ",new Date(a.updatedAt||"").toLocaleString()]})]})]})]})})}var $=A(require("react"));var be=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));be.displayName="Card";var ve=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("flex flex-col space-y-1.5 p-6",e),...t}));ve.displayName="CardHeader";var xe=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("font-semibold leading-none tracking-tight",e),...t}));xe.displayName="CardTitle";var gr=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("text-sm text-muted-foreground",e),...t}));gr.displayName="CardDescription";var he=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("p-6 pt-0",e),...t}));he.displayName="CardContent";var br=$.forwardRef(({className:e,...t},r)=>(0,M.jsx)("div",{ref:r,className:p("flex items-center p-6 pt-0",e),...t}));br.displayName="CardFooter";function yt({deal:e,customer:t,categories:r,onClick:o,compact:l=!1}){let n=r.find(c=>c.type==="proposition"&&(e.categories??[]).includes(c.id));return l?(0,M.jsxs)(be,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,M.jsxs)(ve,{className:"pb-1 pt-2",children:[(0,M.jsx)(xe,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,M.jsx)("p",{className:"text-sm text-foreground M-1",children:e.description})]}),(0,M.jsx)(he,{className:"text-xs text-gray-200 pb-2",children:(0,M.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,M.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,M.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,M.jsxs)(be,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,M.jsxs)(ve,{className:"pb-2",children:[(0,M.jsx)("div",{className:"flex justify-between items-center",children:(0,M.jsx)(xe,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,M.jsx)("p",{className:"text-sm text-foreground M-1",children:e.description})]}),(0,M.jsxs)(he,{children:[(0,M.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,M.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,M.jsx)(Ze.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,M.jsx)("span",{children:e.assignee.name})]}),(0,M.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,M.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,M.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,M.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,M.jsx)(Ze.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,M.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,M.jsx)("div",{className:"flex justify-between items-left",children:n&&(0,M.jsx)(fe,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:n.name})})]})]})}var we=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function wt({status:e,deals:t,users:r,customers:o,categories:l,onDealClick:n,calculateColumnValue:c,calculateWeightedValue:a,compact:x=!1}){return(0,M.jsxs)("div",{className:"flex flex-col w-80 h-full",children:[(0,M.jsxs)("h2",{className:"text-xl font-semibold mb-4 flex-shrink-0",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,M.jsx)(we.Droppable,{droppableId:e,isDropDisabled:!1,children:u=>(0,M.jsxs)("div",{ref:u.innerRef,...u.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-1 min-h-0 overflow-y-auto shadow-inner scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:[t.map((d,C)=>(0,M.jsx)(we.Draggable,{draggableId:d.id.toString(),index:d.id,children:P=>(0,M.jsx)("div",{ref:P.innerRef,...P.draggableProps,...P.dragHandleProps,children:(0,M.jsx)(yt,{deal:d,customer:d.customer,categories:l,onClick:()=>n(d),compact:x})})},d.id.toString())),u.placeholder]})}),(0,M.jsxs)("div",{className:"text-sm p-3 rounded-lg shadow flex-shrink-0 M-auto",children:[(0,M.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,M.jsxs)("span",{className:"text-green-600",children:["\xA3",c(t).toLocaleString()]})]}),(0,M.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,M.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}var vr=["firm","forecast","other"];function xr({initialData:e,updateDeal:t,addComment:r}){let[o,l]=(0,Ce.useState)(null),n=u=>(e.deals??[]).filter(d=>d.gecoStatus===u).filter(d=>d.status!=="Lost").filter(d=>d.status!=="Cold"),c=u=>u.reduce((d,C)=>d+(C.value||0),0),a=(u,d)=>{let C={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0};return u.reduce((P,S)=>P+(S.value||0)*(C[S.status]??0),0)},x=(0,Ce.useCallback)(u=>{let{source:d,destination:C}=u;if(!C||d.droppableId===C.droppableId&&d.index===C.index)return;let P=d.droppableId,S=C.droppableId,b=e.deals?.filter(g=>g.id===d.index)[0],R=[...e.deals??[]];b&&(b.gecoStatus=S,t(b))},[t]);return(0,M.jsx)(we.DragDropContext,{onDragEnd:x,children:(0,M.jsxs)("div",{className:"flex flex-col p-4 overflow-hidden",style:{height:"calc(100% - 60px)"},children:[(0,M.jsx)("div",{className:"flex space-x-4 pb-4",children:vr.map(u=>{let d=n(u);return(0,M.jsx)(wt,{status:u,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:l,calculateColumnValue:c,calculateWeightedValue:a,compact:!0},u)})}),o&&(0,M.jsx)(ht,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>l(null),onSave:t,onAddComment:u=>r(o.id.toString(),u)})]})})}0&&(module.exports={CRMCogeBoard});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-Z4ZRNNSX.mjs";import"../../chunk-LLED3RQS.mjs";import"../../chunk-SMKYMYUV.mjs";import"../../chunk-KVD6XDZT.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as CRMCogeBoard};
2
+ "use strict";import{a}from"../../chunk-53ERRCTV.mjs";import"../../chunk-LLED3RQS.mjs";import"../../chunk-SMKYMYUV.mjs";import"../../chunk-KVD6XDZT.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as CRMCogeBoard};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use strict";"use client";var St=Object.create;var de=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Rt=Object.getPrototypeOf,Dt=Object.prototype.hasOwnProperty;var kt=(e,t)=>{for(var r in t)de(e,r,{get:t[r],enumerable:!0})},Fe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Nt(t))!Dt.call(e,l)&&l!==r&&de(e,l,{get:()=>t[l],enumerable:!(o=Pt(t,l))||o.enumerable});return e};var A=(e,t,r)=>(r=e!=null?St(Rt(e)):{},Fe(t||!e||!e.__esModule?de(r,"default",{value:e,enumerable:!0}):r,e)),Tt=e=>Fe(de({},"__esModule",{value:!0}),e);var hr={};kt(hr,{CRMKanbanBoard:()=>xr});module.exports=Tt(hr);var Ce=require("react");var te=A(require("react")),k=A(require("@radix-ui/react-dialog")),Ze=require("lucide-react");var Xe=require("clsx");var Te="-",At=e=>{let t=Lt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let a=c.split(Te);return a[0]===""&&a.length!==1&&a.shift(),_e(a,t)||Mt(c)},getConflictingClassGroupIds:(c,a)=>{let v=r[c]||[];return a&&o[c]?[...v,...o[c]]:v}}},_e=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),l=o?_e(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(Te);return t.validators.find(({validator:c})=>c(n))?.classGroupId},Oe=/^\[(.+)\]$/,Mt=e=>{if(Oe.test(e)){let t=Oe.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 Et(Object.entries(e.classGroups),r).forEach(([n,c])=>{ke(c,o,n,t)}),o},ke=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:je(t,l);n.classGroupId=r;return}if(typeof l=="function"){if(It(l)){ke(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([n,c])=>{ke(c,je(t,n),r,o)})})},je=(e,t)=>{let r=e;return t.split(Te).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},It=e=>e.isThemeGetter,Et=(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(([c,a])=>[t+c,a])):n);return[r,l]}):e,zt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,l=(n,c)=>{r.set(n,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let c=r.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return l(n,c),c},set(n,c){r.has(n)?r.set(n,c):l(n,c)}}},Ke="!",Bt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],n=t.length,c=a=>{let v=[],y=0,x=0,g;for(let u=0;u<a.length;u++){let D=a[u];if(y===0){if(D===l&&(o||a.slice(u,u+n)===t)){v.push(a.slice(x,u)),x=u+n;continue}if(D==="/"){g=u;continue}}D==="["?y++:D==="]"&&y--}let f=v.length===0?a:a.substring(x),w=f.startsWith(Ke),h=w?f.substring(1):f,N=g&&g>x?g-x:void 0;return{modifiers:v,hasImportantModifier:w,baseClassName:h,maybePostfixModifierPosition:N}};return r?a=>r({className:a,parseClassName:c}):c},Ht=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},Vt=e=>({cache:zt(e.cacheSize),parseClassName:Bt(e),...At(e)}),Wt=/\L+/,Gt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],c=e.trim().split(Wt),a="";for(let v=c.length-1;v>=0;v-=1){let y=c[v],{modifiers:x,hasImportantModifier:g,baseClassName:f,maybePostfixModifierPosition:w}=r(y),h=!!w,N=o(h?f.substring(0,w):f);if(!N){if(!h){a=y+(a.length>0?" "+a:a);continue}if(N=o(f),!N){a=y+(a.length>0?" "+a:a);continue}h=!1}let u=Ht(x).join(":"),D=g?u+Ke:u,T=D+N;if(n.includes(T))continue;n.push(T);let V=l(N,h);for(let E=0;E<V.length;++E){let i=V[E];n.push(D+i)}a=y+(a.length>0?" "+a:a)}return a};function Ut(){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 Ft(e,...t){let r,o,l,n=c;function c(v){let y=t.reduce((x,g)=>g(x),e());return r=Vt(y),o=r.cache.get,l=r.cache.set,n=a,a(v)}function a(v){let y=o(v);if(y)return y;let x=Gt(v,r);return l(v,x),x}return function(){return n(Ut.apply(null,arguments))}}var S=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Je=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ot=/^\d+\/\d+$/,jt=new Set(["px","full","screen"]),_t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|L|min|max))|\L(calc|min|max|clamp)\(.+\)|^0$/,$t=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Ce-?((\d+)?\.?(\d+)[a-z]+|0)/,Qt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>q(e)||jt.has(e)||Ot.test(e),W=e=>X(e,"length",or),q=e=>!!e&&!Number.isNaN(Number(e)),De=e=>X(e,"number",q),Y=e=>!!e&&Number.isInteger(Number(e)),qt=e=>e.endsWith("%")&&q(e.slice(0,-1)),d=e=>Je.test(e),G=e=>_t.test(e),Xt=new Set(["length","size","percentage"]),Zt=e=>X(e,Xt,Qe),Yt=e=>X(e,"position",Qe),er=new Set(["image","url"]),tr=e=>X(e,er,sr),rr=e=>X(e,"",ar),ee=()=>!0,X=(e,t,r)=>{let o=Je.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},or=e=>Kt.test(e)&&!$t.test(e),Qe=()=>!1,ar=e=>Jt.test(e),sr=e=>Qt.test(e);var ir=()=>{let e=S("colors"),t=S("spacing"),r=S("blur"),o=S("brightness"),l=S("borderColor"),n=S("borderRadius"),c=S("borderSpacing"),a=S("borderWidth"),v=S("contrast"),y=S("grayscale"),x=S("hueRotate"),g=S("invert"),f=S("gap"),w=S("gradientColorStops"),h=S("gradientColorStopPositions"),N=S("inset"),u=S("margin"),D=S("opacity"),T=S("padding"),V=S("saturate"),E=S("scale"),i=S("sepia"),C=S("skew"),Q=S("space"),He=S("translate"),Se=()=>["auto","contain","none"],Pe=()=>["auto","hidden","clip","visible","scroll"],Ne=()=>["auto",d,t],P=()=>[d,t],Ve=()=>["",B,W],le=()=>["auto",q,d],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ce=()=>["solid","dashed","dotted","double","none"],Ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Re=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",d],Ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[q,d];return{cacheSize:500,separator:":",theme:{colors:[ee],spacing:[B,W],blur:["none","",G,d],brightness:z(),borderColor:[e],borderRadius:["none","","full",G,d],borderSpacing:P(),borderWidth:Ve(),contrast:z(),grayscale:Z(),hueRotate:z(),invert:Z(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[qt,W],inset:Ne(),margin:Ne(),opacity:z(),padding:P(),saturate:z(),scale:z(),sepia:Z(),skew:z(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":Ue()}],"break-before":[{"break-before":Ue()}],"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:[...We(),d]}],overflow:[{overflow:Pe()}],"overflow-x":[{"overflow-x":Pe()}],"overflow-y":[{"overflow-y":Pe()}],overscroll:[{overscroll:Se()}],"overscroll-x":[{"overscroll-x":Se()}],"overscroll-y":[{"overscroll-y":Se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-x":[{"inset-x":[N]}],"inset-y":[{"inset-y":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Y,d]}],basis:[{basis:Ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Y,d]}],"grid-cols":[{"grid-cols":[ee]}],"col-start-end":[{col:["auto",{span:["full",Y,d]},d]}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":[ee]}],"row-start-end":[{row:["auto",{span:[Y,d]},d]}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Re()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Re(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Re(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],me:[{me:[u]}],L:[{L:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-x":[{"space-x":[Q]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Q]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-w":[{"min-w":[d,t,"min","max","fit"]}],"max-w":[{"max-w":[d,t,"none","full","min","max","fit","prose",{screen:[G]},G]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",G,W]}],"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:[ee]}],"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",d]}],"line-clamp":[{"line-clamp":["none",q,De]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",B,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[D]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[D]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",B,W]}],"underline-offset":[{"underline-offset":["auto",B,d]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],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",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[D]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),Yt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","L","bl","l","tl"]},tr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[n]}],"rounded-L":[{"rounded-L":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-L":[{"rounded-L":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[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:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-L":[{"border-L":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-L":[{"border-L":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[D]}],"border-style":[{border:[...ce(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[D]}],"divide-style":[{divide:ce()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-L":[{"border-L":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-L":[{"border-L":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ce()]}],"outline-offset":[{"outline-offset":[B,d]}],"outline-w":[{outline:[B,W]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[D]}],"ring-offset-w":[{"ring-offset":[B,W]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",G,rr]}],"shadow-color":[{shadow:[ee]}],opacity:[{opacity:[D]}],"mix-blend":[{"mix-blend":[...Ge(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ge()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",G,d]}],grayscale:[{grayscale:[y]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[g]}],saturate:[{saturate:[V]}],sepia:[{sepia:[i]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[D]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Y,d]}],"translate-x":[{"translate-x":[He]}],"translate-y":[{"translate-y":[He]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],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","L-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-L":[{"scroll-L":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",d]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[B,W,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","L","mr","mb","ml"],mx:["mr","ml"],my:["L","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-L","rounded-e","rounded-t","rounded-r","rounded-L","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-L":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-L":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-L","border-w-e","border-w-t","border-w-r","border-w-L","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-L"],"border-color":["border-color-L","border-color-e","border-color-t","border-color-r","border-color-L","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-L"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-L","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-L","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 qe=Ft(ir);function m(...e){return qe((0,Xe.clsx)(e))}var L=require("react/jsx-runtime"),Ye=k.Root;var nr=k.Portal;var et=te.forwardRef(({className:e,...t},r)=>(0,L.jsx)(k.Overlay,{ref:r,className:m("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));et.displayName=k.Overlay.displayName;var Ae=te.forwardRef(({className:e,children:t,...r},o)=>(0,L.jsxs)(nr,{children:[(0,L.jsx)(et,{}),(0,L.jsxs)(k.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,(0,L.jsxs)(k.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,L.jsx)(Ze.X,{className:"h-4 w-4"}),(0,L.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ae.displayName=k.Content.displayName;var Me=({className:e,...t})=>(0,L.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Me.displayName="DialogHeader";var lr=({className:e,...t})=>(0,L.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});lr.displayName="DialogFooter";var Le=te.forwardRef(({className:e,...t},r)=>(0,L.jsx)(k.Title,{ref:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));Le.displayName=k.Title.displayName;var cr=te.forwardRef(({className:e,...t},r)=>(0,L.jsx)(k.Description,{ref:r,className:m("text-sm text-muted-foreground",e),...t}));cr.displayName=k.Description.displayName;var tt=require("@radix-ui/react-slot"),rt=require("class-variance-authority"),ot=A(require("react")),dr=(0,rt.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"}}}),re=ot.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...l},n)=>(0,L.jsx)(e?tt.Slot:"button",{className:m(dr({className:t,size:r,variant:o})),ref:n,...l}));re.displayName="Button";var st=A(require("react"));var oe=st.forwardRef(({className:e,type:t,...r},o)=>(0,L.jsx)("input",{type:t,className:m("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}));oe.displayName="Input";var nt=A(require("react")),Ie=A(require("@radix-ui/react-label"));var mr=(0,rt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),H=nt.forwardRef(({className:e,...t},r)=>(0,L.jsx)(Ie.Root,{ref:r,className:m(mr(),e),...t}));H.displayName=Ie.Root.displayName;var dt=A(require("react")),Ee=dt.forwardRef(({className:e,...t},r)=>(0,L.jsx)("textarea",{className:m("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));Ee.displayName="Textarea";var p=A(require("@radix-ui/react-select")),U=A(require("react")),me=p.Root;var pe=p.Value,ae=U.forwardRef(({children:e,className:t,...r},o)=>(0,L.jsxs)(p.Trigger,{className:m("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,L.jsx)(p.Icon,{asChild:!0,children:(0,L.jsx)(Ze.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ae.displayName=p.Trigger.displayName;var pt=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,L.jsx)(Ze.ChevronUp,{className:"h-4 w-4"})}));pt.displayName=p.ScrollUpButton.displayName;var ut=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,L.jsx)(Ze.ChevronDown,{className:"h-4 w-4"})}));ut.displayName=p.ScrollDownButton.displayName;var se=U.forwardRef(({children:e,className:t,position:r="popper",...o},l)=>(0,L.jsx)(p.Portal,{children:(0,L.jsxs)(p.Content,{className:m("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,ref:l,...o,children:[(0,L.jsx)(pt,{}),(0,L.jsx)(p.Viewport,{className:m("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,L.jsx)(ut,{})]})}));se.displayName=p.Content.displayName;var pr=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.Label,{className:m("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));pr.displayName=p.Label.displayName;var ie=U.forwardRef(({children:e,className:t,...r},o)=>(0,L.jsxs)(p.Item,{className:m("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...r,children:[(0,L.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,L.jsx)(p.ItemIndicator,{children:(0,L.jsx)(Ze.Check,{className:"h-4 w-4"})})}),(0,L.jsx)(p.ItemText,{children:e})]}));ie.displayName=p.Item.displayName;var ur=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));ur.displayName=p.Separator.displayName;var ne=A(require("@radix-ui/react-checkbox")),gt=A(require("react")),ze=gt.forwardRef(({className:e,...t},r)=>(0,L.jsx)(ne.Root,{className:m("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,L.jsx)(ne.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,L.jsx)(Ze.Check,{className:"h-4 w-4"})})}));ze.displayName=ne.Root.displayName;var fr=(0,rt.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 fe({className:e,variant:t,...r}){return(0,L.jsx)("div",{className:m(fr({variant:t}),e),...r})}var Be=A(require("react")),I=A(require("@radix-ui/react-scroll-area"));var ge=Be.forwardRef(({className:e,children:t,...r},o)=>(0,L.jsxs)(I.Root,{ref:o,className:m("relative overflow-hidden",e),...r,children:[(0,L.jsx)(I.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,L.jsx)(xt,{}),(0,L.jsx)(I.Corner,{})]}));ge.displayName=I.Root.displayName;var xt=Be.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,L.jsx)(I.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("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,L.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));xt.displayName=I.ScrollAreaScrollbar.displayName;function ht({deal:e,users:t,customer:r,categories:o,onClose:l,onSave:n,onAddComment:c}){let[a,v]=(0,Ce.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[y,x]=(0,Ce.useState)(""),[g,f]=(0,Ce.useState)(!1),[w,h]=(0,Ce.useState)(null);(0,Ce.useEffect)(()=>{f(JSON.stringify(e)!==JSON.stringify(a))},[e,a]);let N=async()=>{try{let i=await n(a);i.success?(f(!1),h(null)):console.error("Failed to save deal:",i.errors)}catch(i){console.error("Failed to save deal:",i)}},u=(i,C)=>{v(Q=>({...Q,[i]:C}))},D=i=>{let C=(a.categories||[]).includes(i)?(a.categories||[]).filter(Q=>Q!==i):[...a.categories||[],i];u("categories",C)},T=async()=>{if(y.trim()){let i={text:y,timestamp:new Date().toISOString()};try{let C=await c(i);if(!C.success){console.error("Failed to add comment:",C.errors);return}}catch(C){console.error("Failed to add comment:",C)}v(C=>({...C,comments:[...C.comments||[],i]})),x("")}},V=i=>{switch(i){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},E=i=>t?.find(C=>C.id===Number(i));return(0,L.jsx)(Ye,{open:!0,children:(0,L.jsxs)(Ae,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,L.jsxs)(Me,{className:"flex flex-row items-center justify-between",children:[(0,L.jsx)(Le,{className:"text-2xl font-bold",children:r?.name||"no customer"}),(0,L.jsxs)("div",{className:"flex space-x-2",children:[(0,L.jsx)(re,{variant:"outline",onClick:l,children:"Close"}),(0,L.jsxs)(re,{onClick:N,disabled:!g,children:[(0,L.jsx)(Ze.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,L.jsxs)(ge,{className:"flex-grow pr-4",children:[(0,L.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,L.jsx)("div",{className:"grid gap-2 m-1",children:w==="value"?(0,L.jsx)(oe,{type:"number",value:a.value,onChange:i=>u("value",Number(i.target.value)),onBlur:()=>h(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,L.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("value"),children:["\xA3",a.value?.toLocaleString()]})}),(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Assignee"}),w==="assignee"?(0,L.jsxs)(me,{value:a?.assignee?.id?.toString()||"",onValueChange:i=>u("assignee",E(i)),children:[(0,L.jsx)(ae,{children:(0,L.jsx)(pe,{placeholder:"Select assignee"})}),(0,L.jsx)(se,{children:t&&t.map(i=>(0,L.jsx)(ie,{value:i?.id?.toString()||"",children:i.name},i.id))})]}):(0,L.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("assignee"),children:[(0,L.jsx)(Ze.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,L.jsx)("span",{children:a?.assignee?.name})]})]}),(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Closure Date"}),w==="closureDate"?(0,L.jsx)(oe,{type:"date",value:a.closureDate?.split("T")[0]??"",onChange:i=>u("closureDate",i.target.value),onBlur:()=>h(null),className:"mr-2",autoFocus:!0}):(0,L.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("closureDate"),children:[(0,L.jsx)(Ze.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,L.jsx)("span",{children:a.closureDate?new Date(a.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,L.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Description"}),w==="description"?(0,L.jsx)(Ee,{value:a.description||"",onChange:i=>u("description",i.target.value),onBlur:()=>h(null),className:"min-h-[100px]",autoFocus:!0}):(0,L.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>h("description"),children:a.description})]})}),(0,L.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Status"}),w==="status"?(0,L.jsxs)(me,{value:a.status,onValueChange:i=>{u("status",i),h(null)},children:[(0,L.jsx)(ae,{children:(0,L.jsx)(pe,{placeholder:"Select status"})}),(0,L.jsx)(se,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(i=>(0,L.jsx)(ie,{value:i,children:i},i))})]}):(0,L.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("status"),children:a.status})]}),(0,L.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Categories"}),w==="categories"?(0,L.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(i=>(0,L.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,L.jsx)(ze,{id:i.id?.toString()||"",checked:(a.categories||[]).some(C=>C.id===i.id),onCheckedChange:()=>i.id!==void 0&&D(i)}),(0,L.jsx)("label",{htmlFor:(i.id??"").toString(),className:`text-sm font-medium ${V(i.type||"sector")} px-2 py-1 rounded`,children:i.name})]},i.id))}):(0,L.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("categories"),children:a.categories&&a.categories.map(i=>{let C=i;return C?(0,L.jsx)(fe,{variant:"outline",className:V(C.type||"sector"),children:C.name},C.id):null})})]}),(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"COGE Status"}),w==="gecoStatus"?(0,L.jsxs)(me,{value:a.gecoStatus??void 0,onValueChange:i=>{u("gecoStatus",i),h(null)},children:[(0,L.jsx)(ae,{children:(0,L.jsx)(pe,{placeholder:"Select status"})}),(0,L.jsx)(se,{children:["firm","forecast","other"].map(i=>(0,L.jsx)(ie,{value:i,children:i.charAt(0).toUpperCase()+i.slice(1)},i))})]}):(0,L.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("gecoStatus"),children:a.gecoStatus?a.gecoStatus.charAt(0).toUpperCase()+a.gecoStatus.slice(1):"N/A"})]})]}),(0,L.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,L.jsxs)("div",{className:"grid gap-2",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,L.jsx)(ge,{className:"h-[200px] overflow-y-auto",children:(0,L.jsx)("div",{className:"space-y-2",children:a.comments&&a.comments.slice().sort((i,C)=>new Date(C.timestamp||"").getTime()-new Date(i.timestamp||"").getTime()).map(i=>(0,L.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,L.jsx)("p",{className:"text-sm text-foreground",children:i.text}),(0,L.jsxs)("p",{className:"text-xs text-foreground L-1",children:[i?.author?.name," - ",new Date(i.timestamp||"").toLocaleString()]})]},i.id))})}),(0,L.jsxs)("div",{className:"flex L-2",children:[(0,L.jsx)(oe,{value:y,onChange:i=>x(i.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,L.jsxs)(re,{onClick:T,className:"ml-2",children:[(0,L.jsx)(Ze.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,L.jsxs)("div",{className:"text-xs text-gray-500 L-4",children:["Last modified: ",new Date(a.updatedAt||"").toLocaleString()]})]})]})]})})}var K=A(require("react"));var be=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));be.displayName="Card";var ve=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("flex flex-col space-y-1.5 p-6",e),...t}));ve.displayName="CardHeader";var xe=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("font-semibold leading-none tracking-tight",e),...t}));xe.displayName="CardTitle";var gr=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("text-sm text-muted-foreground",e),...t}));gr.displayName="CardDescription";var he=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("p-6 pt-0",e),...t}));he.displayName="CardContent";var br=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("flex items-center p-6 pt-0",e),...t}));br.displayName="CardFooter";function yt({deal:e,customer:t,categories:r,onClick:o,compact:l=!1}){let n=r.find(c=>c.type==="proposition"&&(e.categories??[]).includes(c.id));return l?(0,L.jsxs)(be,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,L.jsxs)(ve,{className:"pb-1 pt-2",children:[(0,L.jsx)(xe,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,L.jsx)("p",{className:"text-sm text-foreground L-1",children:e.description})]}),(0,L.jsx)(he,{className:"text-xs text-gray-200 pb-2",children:(0,L.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,L.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,L.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,L.jsxs)(be,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,L.jsxs)(ve,{className:"pb-2",children:[(0,L.jsx)("div",{className:"flex justify-between items-center",children:(0,L.jsx)(xe,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,L.jsx)("p",{className:"text-sm text-foreground L-1",children:e.description})]}),(0,L.jsxs)(he,{children:[(0,L.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,L.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,L.jsx)(Ze.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,L.jsx)("span",{children:e.assignee.name})]}),(0,L.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,L.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,L.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,L.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,L.jsx)(Ze.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,L.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,L.jsx)("div",{className:"flex justify-between items-left",children:n&&(0,L.jsx)(fe,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:n.name})})]})]})}var we=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function wt({status:e,deals:t,users:r,customers:o,categories:l,onDealClick:n,calculateColumnValue:c,calculateWeightedValue:a,compact:v=!1}){return(0,L.jsxs)("div",{className:"flex flex-col w-80 h-full",children:[(0,L.jsxs)("h2",{className:"text-xl font-semibold mb-4 flex-shrink-0",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,L.jsx)(we.Droppable,{droppableId:e,isDropDisabled:!1,children:y=>(0,L.jsxs)("div",{ref:y.innerRef,...y.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-1 min-h-0 overflow-y-auto shadow-inner scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:[t.map((x,g)=>(0,L.jsx)(we.Draggable,{draggableId:x.id.toString(),index:x.id,children:f=>(0,L.jsx)("div",{ref:f.innerRef,...f.draggableProps,...f.dragHandleProps,children:(0,L.jsx)(yt,{deal:x,customer:x.customer,categories:l,onClick:()=>n(x),compact:v})})},x.id.toString())),y.placeholder]})}),(0,L.jsxs)("div",{className:"text-sm p-3 rounded-lg shadow flex-shrink-0 L-auto",children:[(0,L.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,L.jsxs)("span",{className:"text-green-600",children:["\xA3",c(t).toLocaleString()]})]}),(0,L.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,L.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}var vr=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function xr({initialData:e,addNewDeal:t,updateDeal:r,addComment:o,addNewCustomer:l}){let[n,c]=(0,Ce.useState)(null),a=g=>(e.deals??[]).filter(f=>f.status===g),v=g=>g.reduce((f,w)=>f+(w.value||0),0),y=(g,f)=>{let w={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0};return g.reduce((h,N)=>h+(N.value||0)*w[f],0)},x=(0,Ce.useCallback)(g=>{let{source:f,destination:w}=g;if(!w||f.droppableId===w.droppableId&&f.index===w.index)return;let h=f.droppableId,N=w.droppableId,u=e.deals?.filter(T=>T.id===f.index)[0],D=[...e.deals??[]];u&&(u.status=N,r(u))},[r]);return(0,L.jsx)(we.DragDropContext,{onDragEnd:x,children:(0,L.jsxs)("div",{className:"h-screen flex flex-col p-4 overflow-hidden",children:[(0,L.jsx)("div",{className:"flex space-x-4 flex-1 min-h-0 h-full",children:vr.filter(g=>g!=="Lost").map(g=>{let f=a(g);return(0,L.jsx)(wt,{status:g,deals:f,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:c,calculateColumnValue:v,calculateWeightedValue:y},g)})}),n&&(0,L.jsx)(ht,{deal:n,users:e.users,customer:n.customer,categories:e.categories??[],onClose:()=>c(null),onSave:r,onAddComment:g=>o(n.id.toString(),g)})]})})}0&&(module.exports={CRMKanbanBoard});
4
+ "use strict";"use client";var St=Object.create;var de=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Rt=Object.getPrototypeOf,Dt=Object.prototype.hasOwnProperty;var kt=(e,t)=>{for(var r in t)de(e,r,{get:t[r],enumerable:!0})},Fe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Nt(t))!Dt.call(e,l)&&l!==r&&de(e,l,{get:()=>t[l],enumerable:!(o=Pt(t,l))||o.enumerable});return e};var A=(e,t,r)=>(r=e!=null?St(Rt(e)):{},Fe(t||!e||!e.__esModule?de(r,"default",{value:e,enumerable:!0}):r,e)),Tt=e=>Fe(de({},"__esModule",{value:!0}),e);var hr={};kt(hr,{CRMKanbanBoard:()=>xr});module.exports=Tt(hr);var Ce=require("react");var te=A(require("react")),k=A(require("@radix-ui/react-dialog")),Ze=require("lucide-react");var Xe=require("clsx");var Te="-",At=e=>{let t=Lt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let a=c.split(Te);return a[0]===""&&a.length!==1&&a.shift(),_e(a,t)||Mt(c)},getConflictingClassGroupIds:(c,a)=>{let v=r[c]||[];return a&&o[c]?[...v,...o[c]]:v}}},_e=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),l=o?_e(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(Te);return t.validators.find(({validator:c})=>c(n))?.classGroupId},Oe=/^\[(.+)\]$/,Mt=e=>{if(Oe.test(e)){let t=Oe.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 Et(Object.entries(e.classGroups),r).forEach(([n,c])=>{ke(c,o,n,t)}),o},ke=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:je(t,l);n.classGroupId=r;return}if(typeof l=="function"){if(It(l)){ke(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([n,c])=>{ke(c,je(t,n),r,o)})})},je=(e,t)=>{let r=e;return t.split(Te).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},It=e=>e.isThemeGetter,Et=(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(([c,a])=>[t+c,a])):n);return[r,l]}):e,zt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,l=(n,c)=>{r.set(n,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let c=r.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return l(n,c),c},set(n,c){r.has(n)?r.set(n,c):l(n,c)}}},Ke="!",Bt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],n=t.length,c=a=>{let v=[],y=0,x=0,g;for(let u=0;u<a.length;u++){let D=a[u];if(y===0){if(D===l&&(o||a.slice(u,u+n)===t)){v.push(a.slice(x,u)),x=u+n;continue}if(D==="/"){g=u;continue}}D==="["?y++:D==="]"&&y--}let f=v.length===0?a:a.substring(x),w=f.startsWith(Ke),h=w?f.substring(1):f,N=g&&g>x?g-x:void 0;return{modifiers:v,hasImportantModifier:w,baseClassName:h,maybePostfixModifierPosition:N}};return r?a=>r({className:a,parseClassName:c}):c},Ht=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},Vt=e=>({cache:zt(e.cacheSize),parseClassName:Bt(e),...At(e)}),Wt=/\L+/,Gt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],c=e.trim().split(Wt),a="";for(let v=c.length-1;v>=0;v-=1){let y=c[v],{modifiers:x,hasImportantModifier:g,baseClassName:f,maybePostfixModifierPosition:w}=r(y),h=!!w,N=o(h?f.substring(0,w):f);if(!N){if(!h){a=y+(a.length>0?" "+a:a);continue}if(N=o(f),!N){a=y+(a.length>0?" "+a:a);continue}h=!1}let u=Ht(x).join(":"),D=g?u+Ke:u,T=D+N;if(n.includes(T))continue;n.push(T);let V=l(N,h);for(let E=0;E<V.length;++E){let i=V[E];n.push(D+i)}a=y+(a.length>0?" "+a:a)}return a};function Ut(){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 Ft(e,...t){let r,o,l,n=c;function c(v){let y=t.reduce((x,g)=>g(x),e());return r=Vt(y),o=r.cache.get,l=r.cache.set,n=a,a(v)}function a(v){let y=o(v);if(y)return y;let x=Gt(v,r);return l(v,x),x}return function(){return n(Ut.apply(null,arguments))}}var S=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Je=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ot=/^\d+\/\d+$/,jt=new Set(["px","full","screen"]),_t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|L|min|max))|\L(calc|min|max|clamp)\(.+\)|^0$/,$t=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Ce-?((\d+)?\.?(\d+)[a-z]+|0)/,Qt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>q(e)||jt.has(e)||Ot.test(e),W=e=>X(e,"length",or),q=e=>!!e&&!Number.isNaN(Number(e)),De=e=>X(e,"number",q),Y=e=>!!e&&Number.isInteger(Number(e)),qt=e=>e.endsWith("%")&&q(e.slice(0,-1)),d=e=>Je.test(e),G=e=>_t.test(e),Xt=new Set(["length","size","percentage"]),Zt=e=>X(e,Xt,Qe),Yt=e=>X(e,"position",Qe),er=new Set(["image","url"]),tr=e=>X(e,er,sr),rr=e=>X(e,"",ar),ee=()=>!0,X=(e,t,r)=>{let o=Je.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},or=e=>Kt.test(e)&&!$t.test(e),Qe=()=>!1,ar=e=>Jt.test(e),sr=e=>Qt.test(e);var ir=()=>{let e=S("colors"),t=S("spacing"),r=S("blur"),o=S("brightness"),l=S("borderColor"),n=S("borderRadius"),c=S("borderSpacing"),a=S("borderWidth"),v=S("contrast"),y=S("grayscale"),x=S("hueRotate"),g=S("invert"),f=S("gap"),w=S("gradientColorStops"),h=S("gradientColorStopPositions"),N=S("inset"),u=S("margin"),D=S("opacity"),T=S("padding"),V=S("saturate"),E=S("scale"),i=S("sepia"),C=S("skew"),Q=S("space"),He=S("translate"),Se=()=>["auto","contain","none"],Pe=()=>["auto","hidden","clip","visible","scroll"],Ne=()=>["auto",d,t],P=()=>[d,t],Ve=()=>["",B,W],le=()=>["auto",q,d],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ce=()=>["solid","dashed","dotted","double","none"],Ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Re=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",d],Ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[q,d];return{cacheSize:500,separator:":",theme:{colors:[ee],spacing:[B,W],blur:["none","",G,d],brightness:z(),borderColor:[e],borderRadius:["none","","full",G,d],borderSpacing:P(),borderWidth:Ve(),contrast:z(),grayscale:Z(),hueRotate:z(),invert:Z(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[qt,W],inset:Ne(),margin:Ne(),opacity:z(),padding:P(),saturate:z(),scale:z(),sepia:Z(),skew:z(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":Ue()}],"break-before":[{"break-before":Ue()}],"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:[...We(),d]}],overflow:[{overflow:Pe()}],"overflow-x":[{"overflow-x":Pe()}],"overflow-y":[{"overflow-y":Pe()}],overscroll:[{overscroll:Se()}],"overscroll-x":[{"overscroll-x":Se()}],"overscroll-y":[{"overscroll-y":Se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-x":[{"inset-x":[N]}],"inset-y":[{"inset-y":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Y,d]}],basis:[{basis:Ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Y,d]}],"grid-cols":[{"grid-cols":[ee]}],"col-start-end":[{col:["auto",{span:["full",Y,d]},d]}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":[ee]}],"row-start-end":[{row:["auto",{span:[Y,d]},d]}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Re()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Re(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Re(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],me:[{me:[u]}],L:[{L:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-x":[{"space-x":[Q]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Q]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-w":[{"min-w":[d,t,"min","max","fit"]}],"max-w":[{"max-w":[d,t,"none","full","min","max","fit","prose",{screen:[G]},G]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",G,W]}],"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:[ee]}],"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",d]}],"line-clamp":[{"line-clamp":["none",q,De]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",B,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[D]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[D]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",B,W]}],"underline-offset":[{"underline-offset":["auto",B,d]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],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",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[D]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),Yt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","L","bl","l","tl"]},tr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[n]}],"rounded-L":[{"rounded-L":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-L":[{"rounded-L":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[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:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-L":[{"border-L":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-L":[{"border-L":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[D]}],"border-style":[{border:[...ce(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[D]}],"divide-style":[{divide:ce()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-L":[{"border-L":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-L":[{"border-L":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ce()]}],"outline-offset":[{"outline-offset":[B,d]}],"outline-w":[{outline:[B,W]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[D]}],"ring-offset-w":[{"ring-offset":[B,W]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",G,rr]}],"shadow-color":[{shadow:[ee]}],opacity:[{opacity:[D]}],"mix-blend":[{"mix-blend":[...Ge(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ge()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",G,d]}],grayscale:[{grayscale:[y]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[g]}],saturate:[{saturate:[V]}],sepia:[{sepia:[i]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[D]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Y,d]}],"translate-x":[{"translate-x":[He]}],"translate-y":[{"translate-y":[He]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],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","L-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-L":[{"scroll-L":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",d]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[B,W,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","L","mr","mb","ml"],mx:["mr","ml"],my:["L","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-L","rounded-e","rounded-t","rounded-r","rounded-L","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-L":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-L":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-L","border-w-e","border-w-t","border-w-r","border-w-L","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-L"],"border-color":["border-color-L","border-color-e","border-color-t","border-color-r","border-color-L","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-L"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-L","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-L","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 qe=Ft(ir);function m(...e){return qe((0,Xe.clsx)(e))}var L=require("react/jsx-runtime"),Ye=k.Root;var nr=k.Portal;var et=te.forwardRef(({className:e,...t},r)=>(0,L.jsx)(k.Overlay,{ref:r,className:m("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));et.displayName=k.Overlay.displayName;var Ae=te.forwardRef(({className:e,children:t,...r},o)=>(0,L.jsxs)(nr,{children:[(0,L.jsx)(et,{}),(0,L.jsxs)(k.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,(0,L.jsxs)(k.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,L.jsx)(Ze.X,{className:"h-4 w-4"}),(0,L.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ae.displayName=k.Content.displayName;var Me=({className:e,...t})=>(0,L.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Me.displayName="DialogHeader";var lr=({className:e,...t})=>(0,L.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});lr.displayName="DialogFooter";var Le=te.forwardRef(({className:e,...t},r)=>(0,L.jsx)(k.Title,{ref:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));Le.displayName=k.Title.displayName;var cr=te.forwardRef(({className:e,...t},r)=>(0,L.jsx)(k.Description,{ref:r,className:m("text-sm text-muted-foreground",e),...t}));cr.displayName=k.Description.displayName;var tt=require("@radix-ui/react-slot"),rt=require("class-variance-authority"),ot=A(require("react")),dr=(0,rt.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"}}}),re=ot.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...l},n)=>(0,L.jsx)(e?tt.Slot:"button",{className:m(dr({className:t,size:r,variant:o})),ref:n,...l}));re.displayName="Button";var st=A(require("react"));var oe=st.forwardRef(({className:e,type:t,...r},o)=>(0,L.jsx)("input",{type:t,className:m("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}));oe.displayName="Input";var nt=A(require("react")),Ie=A(require("@radix-ui/react-label"));var mr=(0,rt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),H=nt.forwardRef(({className:e,...t},r)=>(0,L.jsx)(Ie.Root,{ref:r,className:m(mr(),e),...t}));H.displayName=Ie.Root.displayName;var dt=A(require("react")),Ee=dt.forwardRef(({className:e,...t},r)=>(0,L.jsx)("textarea",{className:m("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));Ee.displayName="Textarea";var p=A(require("@radix-ui/react-select")),U=A(require("react")),me=p.Root;var pe=p.Value,ae=U.forwardRef(({children:e,className:t,...r},o)=>(0,L.jsxs)(p.Trigger,{className:m("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,L.jsx)(p.Icon,{asChild:!0,children:(0,L.jsx)(Ze.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ae.displayName=p.Trigger.displayName;var pt=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,L.jsx)(Ze.ChevronUp,{className:"h-4 w-4"})}));pt.displayName=p.ScrollUpButton.displayName;var ut=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,L.jsx)(Ze.ChevronDown,{className:"h-4 w-4"})}));ut.displayName=p.ScrollDownButton.displayName;var se=U.forwardRef(({children:e,className:t,position:r="popper",...o},l)=>(0,L.jsx)(p.Portal,{children:(0,L.jsxs)(p.Content,{className:m("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,ref:l,...o,children:[(0,L.jsx)(pt,{}),(0,L.jsx)(p.Viewport,{className:m("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,L.jsx)(ut,{})]})}));se.displayName=p.Content.displayName;var pr=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.Label,{className:m("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));pr.displayName=p.Label.displayName;var ie=U.forwardRef(({children:e,className:t,...r},o)=>(0,L.jsxs)(p.Item,{className:m("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...r,children:[(0,L.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,L.jsx)(p.ItemIndicator,{children:(0,L.jsx)(Ze.Check,{className:"h-4 w-4"})})}),(0,L.jsx)(p.ItemText,{children:e})]}));ie.displayName=p.Item.displayName;var ur=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));ur.displayName=p.Separator.displayName;var ne=A(require("@radix-ui/react-checkbox")),gt=A(require("react")),ze=gt.forwardRef(({className:e,...t},r)=>(0,L.jsx)(ne.Root,{className:m("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,L.jsx)(ne.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,L.jsx)(Ze.Check,{className:"h-4 w-4"})})}));ze.displayName=ne.Root.displayName;var fr=(0,rt.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 fe({className:e,variant:t,...r}){return(0,L.jsx)("div",{className:m(fr({variant:t}),e),...r})}var Be=A(require("react")),I=A(require("@radix-ui/react-scroll-area"));var ge=Be.forwardRef(({className:e,children:t,...r},o)=>(0,L.jsxs)(I.Root,{ref:o,className:m("relative overflow-hidden",e),...r,children:[(0,L.jsx)(I.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,L.jsx)(xt,{}),(0,L.jsx)(I.Corner,{})]}));ge.displayName=I.Root.displayName;var xt=Be.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,L.jsx)(I.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("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,L.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));xt.displayName=I.ScrollAreaScrollbar.displayName;function ht({deal:e,users:t,customer:r,categories:o,onClose:l,onSave:n,onAddComment:c}){let[a,v]=(0,Ce.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[y,x]=(0,Ce.useState)(""),[g,f]=(0,Ce.useState)(!1),[w,h]=(0,Ce.useState)(null);(0,Ce.useEffect)(()=>{f(JSON.stringify(e)!==JSON.stringify(a))},[e,a]);let N=async()=>{try{let i=await n(a);i.success?(f(!1),h(null)):console.error("Failed to save deal:",i.errors)}catch(i){console.error("Failed to save deal:",i)}},u=(i,C)=>{v(Q=>({...Q,[i]:C}))},D=i=>{let C=(a.categories||[]).includes(i)?(a.categories||[]).filter(Q=>Q!==i):[...a.categories||[],i];u("categories",C)},T=async()=>{if(y.trim()){let i={text:y,timestamp:new Date().toISOString()};try{let C=await c(i);if(!C.success){console.error("Failed to add comment:",C.errors);return}}catch(C){console.error("Failed to add comment:",C)}v(C=>({...C,comments:[...C.comments||[],i]})),x("")}},V=i=>{switch(i){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},E=i=>t?.find(C=>C.id===Number(i));return(0,L.jsx)(Ye,{open:!0,children:(0,L.jsxs)(Ae,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,L.jsxs)(Me,{className:"flex flex-row items-center justify-between",children:[(0,L.jsx)(Le,{className:"text-2xl font-bold",children:r?.name||"no customer"}),(0,L.jsxs)("div",{className:"flex space-x-2",children:[(0,L.jsx)(re,{variant:"outline",onClick:l,children:"Close"}),(0,L.jsxs)(re,{onClick:N,disabled:!g,children:[(0,L.jsx)(Ze.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,L.jsxs)(ge,{className:"flex-grow pr-4",children:[(0,L.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,L.jsx)("div",{className:"grid gap-2 m-1",children:w==="value"?(0,L.jsx)(oe,{type:"number",value:a.value,onChange:i=>u("value",Number(i.target.value)),onBlur:()=>h(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,L.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("value"),children:["\xA3",a.value?.toLocaleString()]})}),(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Assignee"}),w==="assignee"?(0,L.jsxs)(me,{value:a?.assignee?.id?.toString()||"",onValueChange:i=>u("assignee",E(i)),children:[(0,L.jsx)(ae,{children:(0,L.jsx)(pe,{placeholder:"Select assignee"})}),(0,L.jsx)(se,{children:t&&t.map(i=>(0,L.jsx)(ie,{value:i?.id?.toString()||"",children:i.name},i.id))})]}):(0,L.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("assignee"),children:[(0,L.jsx)(Ze.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,L.jsx)("span",{children:a?.assignee?.name})]})]}),(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Closure Date"}),w==="closureDate"?(0,L.jsx)(oe,{type:"date",value:a.closureDate?.split("T")[0]??"",onChange:i=>u("closureDate",i.target.value),onBlur:()=>h(null),className:"mr-2",autoFocus:!0}):(0,L.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("closureDate"),children:[(0,L.jsx)(Ze.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,L.jsx)("span",{children:a.closureDate?new Date(a.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,L.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Description"}),w==="description"?(0,L.jsx)(Ee,{value:a.description||"",onChange:i=>u("description",i.target.value),onBlur:()=>h(null),className:"min-h-[100px]",autoFocus:!0}):(0,L.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>h("description"),children:a.description})]})}),(0,L.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Status"}),w==="status"?(0,L.jsxs)(me,{value:a.status,onValueChange:i=>{u("status",i),h(null)},children:[(0,L.jsx)(ae,{children:(0,L.jsx)(pe,{placeholder:"Select status"})}),(0,L.jsx)(se,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(i=>(0,L.jsx)(ie,{value:i,children:i},i))})]}):(0,L.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("status"),children:a.status})]}),(0,L.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Categories"}),w==="categories"?(0,L.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(i=>(0,L.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,L.jsx)(ze,{id:i.id?.toString()||"",checked:(a.categories||[]).some(C=>C.id===i.id),onCheckedChange:()=>i.id!==void 0&&D(i)}),(0,L.jsx)("label",{htmlFor:(i.id??"").toString(),className:`text-sm font-medium ${V(i.type||"sector")} px-2 py-1 rounded`,children:i.name})]},i.id))}):(0,L.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("categories"),children:a.categories&&a.categories.map(i=>{let C=i;return C?(0,L.jsx)(fe,{variant:"outline",className:V(C.type||"sector"),children:C.name},C.id):null})})]}),(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"COGE Status"}),w==="gecoStatus"?(0,L.jsxs)(me,{value:a.gecoStatus??void 0,onValueChange:i=>{u("gecoStatus",i),h(null)},children:[(0,L.jsx)(ae,{children:(0,L.jsx)(pe,{placeholder:"Select status"})}),(0,L.jsx)(se,{children:["firm","forecast","other"].map(i=>(0,L.jsx)(ie,{value:i,children:i.charAt(0).toUpperCase()+i.slice(1)},i))})]}):(0,L.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("gecoStatus"),children:a.gecoStatus?a.gecoStatus.charAt(0).toUpperCase()+a.gecoStatus.slice(1):"N/A"})]})]}),(0,L.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,L.jsxs)("div",{className:"grid gap-2",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,L.jsx)(ge,{className:"h-[200px] overflow-y-auto",children:(0,L.jsx)("div",{className:"space-y-2",children:a.comments&&a.comments.slice().sort((i,C)=>new Date(C.timestamp||"").getTime()-new Date(i.timestamp||"").getTime()).map(i=>(0,L.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,L.jsx)("p",{className:"text-sm text-foreground",children:i.text}),(0,L.jsxs)("p",{className:"text-xs text-foreground L-1",children:[i?.author?.name," - ",new Date(i.timestamp||"").toLocaleString()]})]},i.id))})}),(0,L.jsxs)("div",{className:"flex L-2",children:[(0,L.jsx)(oe,{value:y,onChange:i=>x(i.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,L.jsxs)(re,{onClick:T,className:"ml-2",children:[(0,L.jsx)(Ze.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,L.jsxs)("div",{className:"text-xs text-gray-500 L-4",children:["Last modified: ",new Date(a.updatedAt||"").toLocaleString()]})]})]})]})})}var K=A(require("react"));var be=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));be.displayName="Card";var ve=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("flex flex-col space-y-1.5 p-6",e),...t}));ve.displayName="CardHeader";var xe=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("font-semibold leading-none tracking-tight",e),...t}));xe.displayName="CardTitle";var gr=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("text-sm text-muted-foreground",e),...t}));gr.displayName="CardDescription";var he=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("p-6 pt-0",e),...t}));he.displayName="CardContent";var br=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("flex items-center p-6 pt-0",e),...t}));br.displayName="CardFooter";function yt({deal:e,customer:t,categories:r,onClick:o,compact:l=!1}){let n=r.find(c=>c.type==="proposition"&&(e.categories??[]).includes(c.id));return l?(0,L.jsxs)(be,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,L.jsxs)(ve,{className:"pb-1 pt-2",children:[(0,L.jsx)(xe,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,L.jsx)("p",{className:"text-sm text-foreground L-1",children:e.description})]}),(0,L.jsx)(he,{className:"text-xs text-gray-200 pb-2",children:(0,L.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,L.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,L.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,L.jsxs)(be,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,L.jsxs)(ve,{className:"pb-2",children:[(0,L.jsx)("div",{className:"flex justify-between items-center",children:(0,L.jsx)(xe,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,L.jsx)("p",{className:"text-sm text-foreground L-1",children:e.description})]}),(0,L.jsxs)(he,{children:[(0,L.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,L.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,L.jsx)(Ze.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,L.jsx)("span",{children:e.assignee.name})]}),(0,L.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,L.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,L.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,L.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,L.jsx)(Ze.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,L.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,L.jsx)("div",{className:"flex justify-between items-left",children:n&&(0,L.jsx)(fe,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:n.name})})]})]})}var we=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function wt({status:e,deals:t,users:r,customers:o,categories:l,onDealClick:n,calculateColumnValue:c,calculateWeightedValue:a,compact:v=!1}){return(0,L.jsxs)("div",{className:"flex flex-col w-80 h-full",children:[(0,L.jsxs)("h2",{className:"text-xl font-semibold mb-4 flex-shrink-0",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,L.jsx)(we.Droppable,{droppableId:e,isDropDisabled:!1,children:y=>(0,L.jsxs)("div",{ref:y.innerRef,...y.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-1 min-h-0 overflow-y-auto shadow-inner scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:[t.map((x,g)=>(0,L.jsx)(we.Draggable,{draggableId:x.id.toString(),index:x.id,children:f=>(0,L.jsx)("div",{ref:f.innerRef,...f.draggableProps,...f.dragHandleProps,children:(0,L.jsx)(yt,{deal:x,customer:x.customer,categories:l,onClick:()=>n(x),compact:v})})},x.id.toString())),y.placeholder]})}),(0,L.jsxs)("div",{className:"text-sm p-3 rounded-lg shadow flex-shrink-0 L-auto",children:[(0,L.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,L.jsxs)("span",{className:"text-green-600",children:["\xA3",c(t).toLocaleString()]})]}),(0,L.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,L.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}var vr=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function xr({initialData:e,addNewDeal:t,updateDeal:r,addComment:o,addNewCustomer:l}){let[n,c]=(0,Ce.useState)(null),a=g=>(e.deals??[]).filter(f=>f.status===g),v=g=>g.reduce((f,w)=>f+(w.value||0),0),y=(g,f)=>{let w={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0};return g.reduce((h,N)=>h+(N.value||0)*w[f],0)},x=(0,Ce.useCallback)(g=>{let{source:f,destination:w}=g;if(!w||f.droppableId===w.droppableId&&f.index===w.index)return;let h=f.droppableId,N=w.droppableId,u=e.deals?.filter(T=>T.id===f.index)[0],D=[...e.deals??[]];u&&(u.status=N,r(u))},[r]);return(0,L.jsx)(we.DragDropContext,{onDragEnd:x,children:(0,L.jsxs)("div",{className:"flex flex-col p-4 overflow-hidden",style:{height:"calc(100% - 60px)"},children:[(0,L.jsx)("div",{className:"flex space-x-4 flex-1 min-h-0 h-full",children:vr.filter(g=>g!=="Lost").map(g=>{let f=a(g);return(0,L.jsx)(wt,{status:g,deals:f,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:c,calculateColumnValue:v,calculateWeightedValue:y},g)})}),n&&(0,L.jsx)(ht,{deal:n,users:e.users,customer:n.customer,categories:e.categories??[],onClose:()=>c(null),onSave:r,onAddComment:g=>o(n.id.toString(),g)})]})})}0&&(module.exports={CRMKanbanBoard});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-GED5VYLZ.mjs";import"../../chunk-LLED3RQS.mjs";import"../../chunk-SMKYMYUV.mjs";import"../../chunk-KVD6XDZT.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as CRMKanbanBoard};
2
+ "use strict";import{a}from"../../chunk-SX2LOHXX.mjs";import"../../chunk-LLED3RQS.mjs";import"../../chunk-SMKYMYUV.mjs";import"../../chunk-KVD6XDZT.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as CRMKanbanBoard};