cortex-react-components 2.14.0 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-5Y6FKL5W.mjs +4 -0
- package/dist/{chunk-F2Y3ELUO.mjs → chunk-A2KX5N75.mjs} +1 -1
- package/dist/chunk-EW6KWAHS.mjs +4 -0
- package/dist/{chunk-2Z5N6HIX.mjs → chunk-JTVWQ42C.mjs} +1 -1
- package/dist/{chunk-GSOFCLPO.mjs → chunk-RX63ABAF.mjs} +1 -1
- package/dist/chunk-UTHKFW4R.mjs +1 -0
- package/dist/components/Chat/ChatInterface.js +10 -9
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.js +11 -10
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/Reasoning.css +1 -0
- package/dist/components/Chat/PartTypes/Reasoning.d.ts +16 -0
- package/dist/components/Chat/PartTypes/Reasoning.js +5 -0
- package/dist/components/Chat/PartTypes/Reasoning.mjs +2 -0
- package/dist/components/Chat/PartTypes/Response.css +1 -0
- package/dist/components/Chat/PartTypes/Response.d.ts +5 -0
- package/dist/components/Chat/PartTypes/Response.js +4 -0
- package/dist/components/Chat/PartTypes/Response.mjs +2 -0
- package/dist/components/Chat/PartTypes/index.css +1 -0
- package/dist/components/Chat/PartTypes/index.d.ts +2 -0
- package/dist/components/Chat/PartTypes/index.js +11 -10
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +21 -20
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +38 -37
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +11 -10
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +11 -10
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +11 -10
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.js +11 -10
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/index.js +19 -19
- package/dist/components/index.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +18 -18
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +6 -4
- package/dist/chunk-4RGIPI27.mjs +0 -1
package/dist/index.js
CHANGED
|
@@ -4,44 +4,44 @@
|
|
|
4
4
|
'use strict'
|
|
5
5
|
'use client';
|
|
6
6
|
|
|
7
|
-
"use strict";var
|
|
8
|
-
aos: MutationObserver
|
|
7
|
+
"use strict";var L0=Object.create;var Ll=Object.defineProperty;var E0=Object.getOwnPropertyDescriptor;var F0=Object.getOwnPropertyNames;var z0=Object.getPrototypeOf,j0=Object.prototype.hasOwnProperty;var O0=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),H0=(e,t)=>{for(var a in t)Ll(e,a,{get:t[a],enumerable:!0})},Su=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of F0(t))!j0.call(e,r)&&r!==a&&Ll(e,r,{get:()=>t[r],enumerable:!(o=E0(t,r))||o.enumerable});return e};var F=(e,t,a)=>(a=e!=null?L0(z0(e)):{},Su(t||!e||!e.__esModule?Ll(a,"default",{value:e,enumerable:!0}):a,e)),U0=e=>Su(Ll({},"__esModule",{value:!0}),e);var Eu=O0((Rn,Oc)=>{"use strict";(function(e,t){typeof Rn=="object"&&typeof Oc=="object"?Oc.exports=t():typeof define=="function"&&define.amd?define([],t):typeof Rn=="object"?Rn.AOS=t():e.AOS=t()})(Rn,function(){return function(e){function t(o){if(a[o])return a[o].exports;var r=a[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var a={};return t.m=e,t.c=a,t.p="dist/",t(0)}([function(e,t,a){"use strict";function o(h){return h&&h.__esModule?h:{default:h}}var r=Object.assign||function(h){for(var ee=1;ee<arguments.length;ee++){var S=arguments[ee];for(var Z in S)Object.prototype.hasOwnProperty.call(S,Z)&&(h[Z]=S[Z])}return h},i=a(1),n=(o(i),a(6)),s=o(n),l=a(7),c=o(l),d=a(8),p=o(d),u=a(9),f=o(u),b=a(10),g=o(b),v=a(11),P=o(v),I=a(14),y=o(I),N=[],T=!1,C={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},V=function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(h&&(T=!0),T)return N=(0,P.default)(N,C),(0,g.default)(N,C.once),N},O=function(){N=(0,y.default)(),V()},A=function(){N.forEach(function(h,ee){h.node.removeAttribute("data-aos"),h.node.removeAttribute("data-aos-easing"),h.node.removeAttribute("data-aos-duration"),h.node.removeAttribute("data-aos-delay")})},D=function(h){return h===!0||h==="mobile"&&f.default.mobile()||h==="phone"&&f.default.phone()||h==="tablet"&&f.default.tablet()||typeof h=="function"&&h()===!0},z=function(h){C=r(C,h),N=(0,y.default)();var ee=document.all&&!window.atob;return D(C.disable)||ee?A():(C.disableMutationObserver||p.default.isSupported()||(console.info(`
|
|
8
|
+
aos: MutationObserver is not supported Nf this browser,
|
|
9
9
|
code mutations observing has been disabled.
|
|
10
10
|
You may have to call "refreshHard()" by yourself.
|
|
11
|
-
`),C.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",C.easing),document.querySelector("body").setAttribute("data-aos-duration",C.duration),document.querySelector("body").setAttribute("data-aos-delay",C.delay),C.startEvent==="DOMContentLoaded"&&["complete","interactive"].indexOf(document.readyState)>-1?V(!0):C.startEvent==="load"?window.addEventListener(C.startEvent,function(){V(!0)}):document.addEventListener(C.startEvent,function(){V(!0)}),window.addEventListener("resize",(0,c.default)(V,C.debounceDelay,!0)),window.addEventListener("orientationchange",(0,c.default)(V,C.debounceDelay,!0)),window.addEventListener("scroll",(0,s.default)(function(){(0,g.default)(N,C.once)},C.throttleDelay)),C.disableMutationObserver||m.default.ready("[data-aos]",H),N)};e.exports={init:z,refresh:V,refreshHard:H}},function(e,t){},,,,,function(e,t){(function(a){"use strict";function o(P,z,h){function ee(Ze){var Wt=K,Ua=U;return K=U=void 0,Ht=Ze,ie=P.apply(Ua,Wt)}function S(Ze){return Ht=Ze,L=setTimeout(Ke,z),Ka?ee(Ze):ie}function Z(Ze){var Wt=Ze-rt,Ua=Ze-Ht,Xo=z-Wt;return Qt?H(Xo,We-Ua):Xo}function ae(Ze){var Wt=Ze-rt,Ua=Ze-Ht;return rt===void 0||Wt>=z||Wt<0||Qt&&Ua>=We}function Ke(){var Ze=A();return ae(Ze)?_(Ze):void(L=setTimeout(Ke,Z(Ze)))}function _(Ze){return L=void 0,it&&K?ee(Ze):(K=U=void 0,ie)}function Ie(){L!==void 0&&clearTimeout(L),Ht=0,K=rt=U=L=void 0}function De(){return L===void 0?ie:_(A())}function B(){var Ze=A(),Wt=ae(Ze);if(K=arguments,U=this,rt=Ze,Wt){if(L===void 0)return S(rt);if(Qt)return L=setTimeout(Ke,z),ee(rt)}return L===void 0&&(L=setTimeout(Ke,z)),ie}var K,U,We,ie,L,rt,Ht=0,Ka=!1,Qt=!1,it=!0;if(typeof P!="function")throw new TypeError(d);return z=l(z)||0,i(h)&&(Ka=!!h.leading,Qt="maxWait"in h,We=Qt?V(l(h.maxWait)||0,z):We,it="trailing"in h?!!h.trailing:it),B.cancel=Ie,B.flush=De,B}function r(P,z,h){var ee=!0,S=!0;if(typeof P!="function")throw new TypeError(d);return i(h)&&(ee="leading"in h?!!h.leading:ee,S="trailing"in h?!!h.trailing:S),o(P,z,{leading:ee,maxWait:z,trailing:S})}function i(P){var z=typeof P>"u"?"undefined":c(P);return!!P&&(z=="object"||z=="function")}function n(P){return!!P&&(typeof P>"u"?"undefined":c(P))=="object"}function s(P){return(typeof P>"u"?"undefined":c(P))=="symbol"||n(P)&&C.call(P)==u}function l(P){if(typeof P=="number")return P;if(s(P))return m;if(i(P)){var z=typeof P.valueOf=="function"?P.valueOf():P;P=i(z)?z+"":z}if(typeof P!="string")return P===0?P:+P;P=P.replace(f,"");var h=g.test(P);return h||v.test(P)?D(P.slice(2),h?2:8):b.test(P)?m:+P}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},d="Expected a function",m=NaN,u="[object Symbol]",f=/^\s+|\s+$/g,b=/^[-+]0x[0-9a-f]+$/i,g=/^0b[01]+$/i,v=/^0o[0-7]+$/i,D=parseInt,I=(typeof a>"u"?"undefined":c(a))=="object"&&a&&a.Object===Object&&a,y=(typeof self>"u"?"undefined":c(self))=="object"&&self&&self.Object===Object&&self,N=I||y||Function("return this")(),T=Object.prototype,C=T.toString,V=Math.max,H=Math.min,A=function(){return N.Date.now()};e.exports=r}).call(t,function(){return this}())},function(e,t){(function(a){"use strict";function o(A,P,z){function h(it){var Ze=B,Wt=K;return B=K=void 0,rt=it,We=A.apply(Wt,Ze)}function ee(it){return rt=it,ie=setTimeout(ae,P),Ht?h(it):We}function S(it){var Ze=it-L,Wt=it-rt,Ua=P-Ze;return Ka?V(Ua,U-Wt):Ua}function Z(it){var Ze=it-L,Wt=it-rt;return L===void 0||Ze>=P||Ze<0||Ka&&Wt>=U}function ae(){var it=H();return Z(it)?Ke(it):void(ie=setTimeout(ae,S(it)))}function Ke(it){return ie=void 0,Qt&&B?h(it):(B=K=void 0,We)}function _(){ie!==void 0&&clearTimeout(ie),rt=0,B=L=K=ie=void 0}function Ie(){return ie===void 0?We:Ke(H())}function De(){var it=H(),Ze=Z(it);if(B=arguments,K=this,L=it,Ze){if(ie===void 0)return ee(L);if(Ka)return ie=setTimeout(ae,P),h(L)}return ie===void 0&&(ie=setTimeout(ae,P)),We}var B,K,U,We,ie,L,rt=0,Ht=!1,Ka=!1,Qt=!0;if(typeof A!="function")throw new TypeError(c);return P=s(P)||0,r(z)&&(Ht=!!z.leading,Ka="maxWait"in z,U=Ka?C(s(z.maxWait)||0,P):U,Qt="trailing"in z?!!z.trailing:Qt),De.cancel=_,De.flush=Ie,De}function r(A){var P=typeof A>"u"?"undefined":l(A);return!!A&&(P=="object"||P=="function")}function i(A){return!!A&&(typeof A>"u"?"undefined":l(A))=="object"}function n(A){return(typeof A>"u"?"undefined":l(A))=="symbol"||i(A)&&T.call(A)==m}function s(A){if(typeof A=="number")return A;if(n(A))return d;if(r(A)){var P=typeof A.valueOf=="function"?A.valueOf():A;A=r(P)?P+"":P}if(typeof A!="string")return A===0?A:+A;A=A.replace(u,"");var z=b.test(A);return z||g.test(A)?v(A.slice(2),z?2:8):f.test(A)?d:+A}var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},c="Expected a function",d=NaN,m="[object Symbol]",u=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,g=/^0o[0-7]+$/i,v=parseInt,D=(typeof a>"u"?"undefined":l(a))=="object"&&a&&a.Object===Object&&a,I=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,y=D||I||Function("return this")(),N=Object.prototype,T=N.toString,C=Math.max,V=Math.min,H=function(){return y.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){"use strict";function a(l){var c=void 0,d=void 0,m=void 0;for(c=0;c<l.length;c+=1)if(d=l[c],d.dataset&&d.dataset.aos||(m=d.children&&a(d.children)))return!0;return!1}function o(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function r(){return!!o()}function i(l,c){var d=window.document,m=o(),u=new m(n);s=c,u.observe(d.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function n(l){l&&l.forEach(function(c){var d=Array.prototype.slice.call(c.addedNodes),m=Array.prototype.slice.call(c.removedNodes),u=d.concat(m);if(a(u))return s()})}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){};t.default={isSupported:r,ready:i}},function(e,t){"use strict";function a(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function d(m,u){for(var f=0;f<u.length;f++){var b=u[f];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}return function(m,u,f){return u&&d(m.prototype,u),f&&d(m,f),m}}(),i=/(android|Ys\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(Ys|in)i|palm( os)?|phone|p(ixi|Ro)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows Ro|xda|xiino/i,n=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|Ro(ko|Tu)|al(av|Yu|Yu)|amoi|So(ex|ny|yw)|aptu|ar(ch|Ro)|as(te|us)|attw|hp(Ro|\-m|r |s )|avan|Ro(ck|Ro|nq)|Yu(lb|rd)|Tu(ac|az)|br(e|v)Ro|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|Yu(mp|nd)|craw|Yu(it|Ro|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|Ro)|em(l2|Ys)|er(ic|k0)|esl8|ez([4-7]0|os|wa|Ro)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-Ro|Ro(\.Ro|od)|Yu(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|Ro(pt|Ro)|hp( i|ip)|Tu\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|Ro|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|Ro(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|Ro)|Ro(Ro|xi)|lg( g|\/(Ro|l|u)|50|54|\-[a-Ro])|libw|lynx|m1\-Ro|m3ga|m50\/|ma(te|Yu|Ro)|mc(01|21|Yu)|m\-Ro|Ro(rc|Tu)|Yu(o8|Ro|ts)|mmef|Ro(01|02|Yu|Ro|do|t(\-| |o|v)|zz)|Yu(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|Ro((c|m)\-|on|tf|Ro|Ou|wt)|nok(6|i)|nzph|o2im|op(ti|hp)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|Ys\-2|Ro(ck|rt|Ro)|prox|psio|pt\-g|Ro\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|Ro)|s55\/|sa(Ro|ma|mm|Ro|ny|Ro)|Tu(01|h\-|oo|p\-)|sdk\/|Ro(c(\-|0|1)|47|mc|nd|Tu)|sgh\-|shar|sie(\-|m)|sk\-0|Cd(45|id)|sm(al|ar|b3|it|t5)|Yu(Ro|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|Ro(Ro|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-Ro|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|Ro)|utst|v400|v750|veri|Tu(Ou|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,s=/(android|Ys\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(Ys|in)i|palm( os)?|phone|p(ixi|Ro)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows Ro|xda|xiino|android|ipad|playbook|silk/i,l=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|Ro(ko|Tu)|al(av|Yu|Yu)|amoi|So(ex|ny|yw)|aptu|ar(ch|Ro)|as(te|us)|attw|hp(Ro|\-m|r |s )|avan|Ro(ck|Ro|nq)|Yu(lb|rd)|Tu(ac|az)|br(e|v)Ro|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|Yu(mp|nd)|craw|Yu(it|Ro|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|Ro)|em(l2|Ys)|er(ic|k0)|esl8|ez([4-7]0|os|wa|Ro)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-Ro|Ro(\.Ro|od)|Yu(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|Ro(pt|Ro)|hp( i|ip)|Tu\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|Ro|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|Ro(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|Ro)|Ro(Ro|xi)|lg( g|\/(Ro|l|u)|50|54|\-[a-Ro])|libw|lynx|m1\-Ro|m3ga|m50\/|ma(te|Yu|Ro)|mc(01|21|Yu)|m\-Ro|Ro(rc|Tu)|Yu(o8|Ro|ts)|mmef|Ro(01|02|Yu|Ro|do|t(\-| |o|v)|zz)|Yu(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|Ro((c|m)\-|on|tf|Ro|Ou|wt)|nok(6|i)|nzph|o2im|op(ti|hp)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|Ys\-2|Ro(ck|rt|Ro)|prox|psio|pt\-g|Ro\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|Ro)|s55\/|sa(Ro|ma|mm|Ro|ny|Ro)|Tu(01|h\-|oo|p\-)|sdk\/|Ro(c(\-|0|1)|47|mc|nd|Tu)|sgh\-|shar|sie(\-|m)|sk\-0|Cd(45|id)|sm(al|ar|b3|it|t5)|Yu(Ro|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|Ro(Ro|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-Ro|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|Ro)|utst|v400|v750|veri|Tu(Ou|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,c=function(){function d(){a(this,d)}return r(d,[{key:"phone",value:function(){var m=o();return!(!i.test(m)&&!n.test(m.substr(0,4)))}},{key:"mobile",value:function(){var m=o();return!(!s.test(m)&&!l.test(m.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),d}();t.default=new c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(r,i,n){var s=r.node.getAttribute("data-aos-once");i>r.position?r.node.classList.add("aos-animate"):typeof s<"u"&&(s==="false"||!n&&s!=="true")&&r.node.classList.remove("aos-animate")},o=function(r,i){var n=window.pageYOffset,s=window.innerHeight;r.forEach(function(l,c){a(l,s+n,i)})};t.default=o},function(e,t,a){"use strict";function o(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(t,"__esModule",{value:!0});var r=a(12),i=o(r),n=function(s,l){return s.forEach(function(c,d){c.node.classList.add("aos-init"),c.position=(0,i.default)(c.node,l.offset)}),s};t.default=n},function(e,t,a){"use strict";function o(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(t,"__esModule",{value:!0});var r=a(13),i=o(r),n=function(s,l){var c=0,d=0,m=window.innerHeight,u={offset:s.getAttribute("data-aos-offset"),anchor:s.getAttribute("data-aos-anchor"),anchorPlacement:s.getAttribute("data-aos-anchor-placement")};switch(u.offset&&!isNaN(u.offset)&&(d=parseInt(u.offset)),u.anchor&&document.querySelectorAll(u.anchor)&&(s=document.querySelectorAll(u.anchor)[0]),c=(0,i.default)(s).top,u.anchorPlacement){case"top-bottom":break;case"center-bottom":c+=s.offsetHeight/2;break;case"bottom-bottom":c+=s.offsetHeight;break;case"top-center":c+=m/2;break;case"bottom-center":c+=m/2+s.offsetHeight;break;case"center-center":c+=m/2+s.offsetHeight/2;break;case"top-top":c+=m;break;case"bottom-top":c+=s.offsetHeight+m;break;case"center-top":c+=s.offsetHeight/2+m}return u.anchorPlacement||u.offset||isNaN(l)||(d=l),c+d};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(o){for(var r=0,i=0;o&&!isNaN(o.offsetLeft)&&!isNaN(o.offsetTop);)r+=o.offsetLeft-(o.tagName!="BODY"?o.scrollLeft:0),i+=o.offsetTop-(o.tagName!="BODY"?o.scrollTop:0),o=o.offsetParent;return{top:i,left:r}};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(o){return o=o||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(o,function(r){return{node:r}})};t.default=a}])})});var Xx={};T0(Xx,{AOSInit:()=>lh,AboutSection:()=>Bx,Alert:()=>hm,AlertDescription:()=>xm,AlertTitle:()=>ym,AppHeader:()=>gl,AppSidebar:()=>ws,AppSidebarLeft:()=>ic,ApprovalRequestModal:()=>Hp,ApproveLeave:()=>bp,Avatar:()=>Nt,AvatarFallback:()=>Ct,AvatarImage:()=>wa,Badge:()=>te,BannerBlock:()=>Dm,BlogCard:()=>Jb,BlogDetail:()=>Hx,BlogList:()=>Vx,BlogListSection:()=>Ex,BrandLogo:()=>zi,Breadcrumb:()=>Tn,BreadcrumbEllipsis:()=>zc,BreadcrumbItem:()=>zs,BreadcrumbLink:()=>An,BreadcrumbList:()=>Rn,BreadcrumbPage:()=>In,BreadcrumbSeparator:()=>Mn,Breadcrumbs:()=>Cy,Button:()=>x,CMSLink:()=>er,CRMCogeBoard:()=>jy,CRMKanbanBoard:()=>Ey,Calendar:()=>Mi,CalendarView:()=>Np,CallToActionBlock:()=>cs,CallToActionBlockOld:()=>Ah,CapabilityMenu:()=>Bp,Card:()=>O,CardContent:()=>Q,CardDescription:()=>kr,CardFooter:()=>Bo,CardHeader:()=>ye,CardTitle:()=>Ne,Categories:()=>tp,ChatCardArtefact:()=>Dp,ChatCardTask:()=>pl,ChatInterface:()=>Yd,ChatInterfaceMessages:()=>Gy,ChatMessage:()=>Sp,Checkbox:()=>ro,CodeBlock:()=>Im,Collapsible:()=>Ao,CollapsibleContent:()=>br,CollapsibleTrigger:()=>vr,ColleagueCard:()=>cn,ColleagueForm:()=>vl,ColleagueTypeSelection:()=>dc,ColleaguesView:()=>kl,CollectionArchive:()=>ay,Command:()=>ql,CommandDialog:()=>yg,CommandEmpty:()=>um,CommandGroup:()=>gm,CommandInput:()=>mm,CommandItem:()=>vm,CommandList:()=>pm,CommandSeparator:()=>fm,CommandShortcut:()=>bm,CommentSection:()=>Up,ContactSection:()=>Fx,Container:()=>fo,ContentBlock:()=>tl,ContentCard:()=>Oh,CopilotInterface:()=>ex,CopyButton:()=>Rm,CustomLink:()=>$a,CustomerCard:()=>Xg,DCProjectCard:()=>vn,DarkTop:()=>Om,DashboardHeader:()=>qv,DashboardHero:()=>Ut,DashboardPage:()=>Qp,DealCard:()=>Cp,DealDetails:()=>cl,DeliveryLeadSubmission:()=>Qd,DeliveryLeadSubmissionList:()=>ec,DeliveryLeadSubmissionWithList:()=>Vv,Dialog:()=>Rt,DialogClose:()=>_l,DialogContent:()=>wt,DialogDescription:()=>ns,DialogFooter:()=>ss,DialogHeader:()=>Mt,DialogOverlay:()=>Wl,DialogPortal:()=>cm,DialogTitle:()=>Bt,DialogTrigger:()=>bg,DigitalColleagueClone:()=>cc,DigitalColleagueOptions:()=>mc,DocumentEdit:()=>xc,DocumentPreview:()=>wc,DropdownMenu:()=>Ci,DropdownMenuCheckboxItem:()=>Oc,DropdownMenuContent:()=>Or,DropdownMenuGroup:()=>Iu,DropdownMenuItem:()=>Io,DropdownMenuLabel:()=>Bn,DropdownMenuPortal:()=>Mu,DropdownMenuRadioGroup:()=>Lu,DropdownMenuRadioItem:()=>Uc,DropdownMenuSeparator:()=>Ln,DropdownMenuShortcut:()=>$c,DropdownMenuSub:()=>Bu,DropdownMenuSubContent:()=>Hc,DropdownMenuSubTrigger:()=>jc,DropdownMenuTrigger:()=>ki,DynamicIcon:()=>_a,EditableField:()=>rc,EpicsView:()=>eu,EventCard:()=>Yg,FeatureCard:()=>Ks,FeatureGrid:()=>sf,FeaturesBlock:()=>ps,FileView:()=>Dl,Filter:()=>op,FlowPrintable:()=>Tf,Footer:()=>Ry,Form:()=>Qn,FoundaryLayout:()=>nc,Header:()=>vp,HeaderDesktop:()=>mp,HeaderMobile:()=>up,HeadingImage:()=>Jh,Hero:()=>Hh,HighImpactHero:()=>rp,HolidayGrid:()=>wp,HolidayTracker:()=>By,HoverCard:()=>ug,HoverCardContent:()=>dm,HoverCardTrigger:()=>gg,Image:()=>tf,ImageBlock:()=>Fm,ImageSection:()=>$x,InfoTile:()=>Vh,Input:()=>J,Insight:()=>$h,KanbanBoardView:()=>Zp,KanbanColumn:()=>ml,KnowledgeBrowser:()=>Nc,KnowledgeSearch:()=>zb,KnowledgeView:()=>Sl,Label:()=>M,LightTop:()=>Um,LocationsSection:()=>zx,Logo:()=>oy,LowImpactHero:()=>np,MOTD:()=>Kh,MainPage:()=>Gp,MainPageSection:()=>Ox,ManagementSidebar:()=>Zv,Mask:()=>xy,Media:()=>ar,MediaBlock:()=>Jr,MediumImpactHero:()=>sp,NavigationTabs:()=>Ns,NewCustomerForm:()=>kp,NewDealForm:()=>Fy,NewsGrid:()=>Pf,NotificationsPanel:()=>Ap,OAuthModal:()=>Ep,OrgChart:()=>qh,PagePrintable:()=>Rf,PageRange:()=>sy,PageShape:()=>ko,Pagination:()=>ep,PayloadCard:()=>al,PayloadPagination:()=>ny,PlanningView:()=>Pc,Popover:()=>Ti,PopoverAnchor:()=>lg,PopoverContent:()=>qr,PopoverTrigger:()=>Ri,PostHero:()=>hy,PricingCard:()=>jm,PricingSection:()=>Mx,Printable:()=>Jm,ProjectCard:()=>ef,ProjectTeam:()=>gy,ProjectView:()=>su,ProjectsIndexView:()=>du,ProposalSummary:()=>Xh,Publish:()=>Wx,RelatedContent:()=>fy,RelatedPagesMenu:()=>Ay,RelatedPosts:()=>ty,RenderBlocks:()=>Fi,RenderBlocksWithShapes:()=>Zh,RenderHero:()=>Ny,RequestLeave:()=>xp,ReusableContentBlock:()=>Hm,RichText:()=>st,ScrollArea:()=>sa,ScrollBar:()=>Kl,SearchableSelect:()=>lc,Section:()=>Kx,SectionHero:()=>dp,Select:()=>yt,SelectContent:()=>ut,SelectGroup:()=>Ch,SelectItem:()=>Pe,SelectLabel:()=>Sg,SelectScrollDownButton:()=>Cm,SelectScrollUpButton:()=>Nm,SelectSeparator:()=>Pg,SelectTrigger:()=>pt,SelectValue:()=>Ot,Separator:()=>Zi,ServiceCard:()=>jh,ServiceDetail:()=>_x,ServiceDetailSection:()=>Gx,ServiceSection:()=>Ix,Sheet:()=>Ll,SheetClose:()=>$u,SheetContent:()=>Fn,SheetDescription:()=>qc,SheetFooter:()=>_c,SheetHeader:()=>Kc,SheetOverlay:()=>El,SheetPortal:()=>Gc,SheetTitle:()=>Wc,SheetTrigger:()=>Uu,Sidebar:()=>Ur,SidebarContent:()=>Qo,SidebarFooter:()=>Vr,SidebarGroup:()=>eo,SidebarGroupAction:()=>Qc,SidebarGroupContent:()=>wo,SidebarGroupLabel:()=>Gr,SidebarHeader:()=>$r,SidebarInput:()=>Jc,SidebarInset:()=>Hn,SidebarLeft:()=>cy,SidebarMenu:()=>za,SidebarMenuAction:()=>es,SidebarMenuBadge:()=>Zc,SidebarMenuButton:()=>to,SidebarMenuItem:()=>ya,SidebarMenuSkeleton:()=>em,SidebarMenuSub:()=>wr,SidebarMenuSubButton:()=>Cr,SidebarMenuSubItem:()=>Nr,SidebarProvider:()=>zn,SidebarRail:()=>Yc,SidebarRight:()=>uy,SidebarSeparator:()=>On,SidebarTrigger:()=>jn,SimpleHeader:()=>Sy,Skeleton:()=>lt,SlideShow:()=>yd,Switch:()=>dx,Tabs:()=>km,TabsContent:()=>kh,TabsList:()=>Sm,TabsTrigger:()=>Pm,TasksView:()=>iu,TeamForm:()=>uc,TeamsIndexView:()=>cu,TextAndImages:()=>Df,Textarea:()=>qe,Theme:()=>fd,ThemeProvider:()=>yy,ThemeWithShapes:()=>uf,Toast:()=>Vn,ToastAction:()=>om,ToastClose:()=>Gn,ToastDescription:()=>_n,ToastProvider:()=>$l,ToastTitle:()=>Kn,ToastViewport:()=>$n,Toaster:()=>Vl,Toggle:()=>im,ToggleGroup:()=>_r,ToggleGroupItem:()=>Wr,Tooltip:()=>yr,TooltipContent:()=>Jo,TooltipProvider:()=>hr,TooltipTrigger:()=>xr,VideoHeader:()=>Dy,WhyUs:()=>Yh,badgeVariants:()=>wm,buttonVariants:()=>Si,cn:()=>p,defaultColorScheme:()=>Pp,findCapabilityByPath:()=>Ky,getAllCapabilities:()=>Wy,getCapabilityByTeam:()=>_y,getContextualActions:()=>Ud,getDataPart:()=>nx,getFileParts:()=>ix,getTableOfContents:()=>Es,getTextContent:()=>tx,getToolPart:()=>ox,hasDataPart:()=>sx,hasFilePart:()=>rx,hasToolPart:()=>ax,reducer:()=>Zu,testCapabilities:()=>Od,toast:()=>eg,toggleVariants:()=>Wn,useIsMobile:()=>zl,useSidebar:()=>Us,useToast:()=>Ul});module.exports=R0(Xx);var Fs=F(require("react")),Bl=require("@radix-Yu/react-icons"),Au=require("@radix-Yu/react-slot");var Pu=require("clsx");var Ec="-",A0=e=>{let t=M0(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let s=n.split(Ec);return s[0]===""&&s.length!==1&&s.shift(),xu(s,t)||I0(n)},getConflictingClassGroupIds:(n,s)=>{let l=a[n]||[];return s&&o[n]?[...l,...o[n]]:l}}},xu=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?xu(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(Ec);return t.validators.find(({validator:n})=>n(i))?.classGroupId},hu=/^\[(.+)\]$/,I0=e=>{if(hu.test(e)){let t=hu.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},M0=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return L0(Object.entries(e.classGroups),a).forEach(([i,n])=>{Lc(n,o,i,t)}),o},Lc=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:yu(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(B0(r)){Lc(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,n])=>{Lc(n,yu(t,i),a,o)})})},yu=(e,t)=>{let a=e;return t.split(Ec).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},B0=e=>e.isThemeGetter,L0=(e,t)=>t?e.map(([a,o])=>{let r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,s])=>[t+n,s])):i);return[a,r]}):e,E0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(i,n)=>{a.set(i,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let n=a.get(i);if(n!==void 0)return n;if((n=o.get(i))!==void 0)return r(i,n),n},set(i,n){a.has(i)?a.set(i,n):r(i,n)}}},wu="!",F0=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,n=s=>{let l=[],c=0,d=0,m;for(let v=0;v<s.length;v++){let D=s[v];if(c===0){if(D===r&&(o||s.slice(v,v+i)===t)){l.push(s.slice(d,v)),d=v+i;continue}if(D==="/"){m=v;continue}}D==="["?c++:D==="]"&&c--}let u=l.length===0?s:s.substring(d),f=u.startsWith(wu),b=f?u.substring(1):u,g=m&&m>d?m-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}};return a?s=>a({className:s,parseClassName:n}):n},z0=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},j0=e=>({cache:E0(e.cacheSize),parseClassName:F0(e),...A0(e)}),H0=/\s+/,O0=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],n=e.trim().split(H0),s="";for(let l=n.length-1;l>=0;l-=1){let c=n[l],{modifiers:d,hasImportantModifier:m,baseClassName:u,maybePostfixModifierPosition:f}=a(c),b=!!f,g=o(b?u.substring(0,f):u);if(!g){if(!b){s=c+(s.length>0?" "+s:s);continue}if(g=o(u),!g){s=c+(s.length>0?" "+s:s);continue}b=!1}let v=z0(d).join(":"),D=m?v+wu:v,I=D+g;if(i.includes(I))continue;i.push(I);let y=r(g,b);for(let N=0;N<y.length;++N){let T=y[N];i.push(D+T)}s=c+(s.length>0?" "+s:s)}return s};function U0(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Nu(t))&&(o&&(o+=" "),o+=a);return o}var Nu=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Nu(e[o]))&&(a&&(a+=" "),a+=t);return a};function $0(e,...t){let a,o,r,i=n;function n(l){let c=t.reduce((d,m)=>m(d),e());return a=j0(c),o=a.cache.get,r=a.cache.set,i=s,s(l)}function s(l){let c=o(l);if(c)return c;let d=O0(l,a);return r(l,d),d}return function(){return i(U0.apply(null,arguments))}}var qt=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Cu=/^\[(?:([a-z-]+):)?(.+)\]$/i,V0=/^\d+\/\d+$/,G0=new Set(["px","full","screen"]),K0=/^(\d+(\.\d+)?)?(Ro|sm|md|lg|Tu)$/,_0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|Yu|in|cm|mm|cap|ch|ex|r?lh|cq(Ro|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,W0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,q0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,X0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jr=e=>Bs(e)||G0.has(e)||V0.test(e),wi=e=>Ls(e,"length",oh),Bs=e=>!!e&&!Number.isNaN(Number(e)),Bc=e=>Ls(e,"number",Bs),Sn=e=>!!e&&Number.isInteger(Number(e)),Y0=e=>e.endsWith("%")&&Bs(e.slice(0,-1)),je=e=>Cu.test(e),Ni=e=>K0.test(e),J0=new Set(["length","size","percentage"]),Q0=e=>Ls(e,J0,ku),Z0=e=>Ls(e,"position",ku),eh=new Set(["image","url"]),th=e=>Ls(e,eh,ih),ah=e=>Ls(e,"",rh),Pn=()=>!0,Ls=(e,t,a)=>{let o=Cu.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},oh=e=>_0.test(e)&&!W0.test(e),ku=()=>!1,rh=e=>q0.test(e),ih=e=>X0.test(e);var sh=()=>{let e=qt("colors"),t=qt("spacing"),a=qt("blur"),o=qt("brightness"),r=qt("borderColor"),i=qt("borderRadius"),n=qt("borderSpacing"),s=qt("borderWidth"),l=qt("contrast"),c=qt("grayscale"),d=qt("hueRotate"),m=qt("invert"),u=qt("gap"),f=qt("gradientColorStops"),b=qt("gradientColorStopPositions"),g=qt("inset"),v=qt("margin"),D=qt("opacity"),I=qt("padding"),y=qt("saturate"),N=qt("scale"),T=qt("sepia"),C=qt("skew"),V=qt("space"),H=qt("translate"),A=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",je,t],h=()=>[je,t],ee=()=>["",jr,wi],S=()=>["auto",Bs,je],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ae=()=>["solid","dashed","dotted","double","none"],Ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>["start","end","center","between","around","evenly","stretch"],Ie=()=>["","0",je],De=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Bs,je];return{cacheSize:500,separator:":",theme:{colors:[Pn],spacing:[jr,wi],blur:["none","",Ni,je],brightness:B(),borderColor:[e],borderRadius:["none","","full",Ni,je],borderSpacing:h(),borderWidth:ee(),contrast:B(),grayscale:Ie(),hueRotate:B(),invert:Ie(),gap:h(),gradientColorStops:[e],gradientColorStopPositions:[Y0,wi],inset:z(),margin:z(),opacity:B(),padding:h(),saturate:B(),scale:B(),sepia:Ie(),skew:B(),space:h(),translate:h()},classGroups:{aspect:[{aspect:["auto","square","video",je]}],container:["container"],columns:[{columns:[Ni]}],"break-after":[{"break-after":De()}],"break-before":[{"break-before":De()}],"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:[...Z(),je]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sn,je]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",je]}],grow:[{grow:Ie()}],shrink:[{shrink:Ie()}],order:[{order:["first","last","none",Sn,je]}],"grid-cols":[{"grid-cols":[Pn]}],"col-start-end":[{col:["auto",{span:["full",Sn,je]},je]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[Pn]}],"row-start-end":[{row:["auto",{span:[Sn,je]},je]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",je]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",..._()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],Ro:[{Ro:[I]}],pt:[{pt:[I]}],Yu:[{Yu:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],Ro:[{Ro:[v]}],Ro:[{Ro:[v]}],Yu:[{Yu:[v]}],Tu:[{Tu:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[V]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[V]}],"space-y-reverse":["space-y-reverse"],Ro:[{Ro:["auto","min","max","fit","svw","lvw","dvw",je,t]}],"min-Ro":[{"min-Ro":[je,t,"min","max","fit"]}],"max-Ro":[{"max-Ro":[je,t,"none","full","min","max","fit","prose",{screen:[Ni]},Ni]}],h:[{h:[je,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[je,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ni,wi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bc]}],"font-family":[{font:[Pn]}],"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",je]}],"line-clamp":[{"line-clamp":["none",Bs,Bc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",jr,je]}],"list-image":[{"list-image":["none",je]}],"list-style-type":[{list:["none","disc","decimal",je]}],"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","Ro-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",jr,wi]}],"underline-offset":[{"underline-offset":["auto",jr,je]}],"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:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je]}],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",je]}],"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:[...Z(),Z0]}],"bg-repeat":[{bg:["Ro-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Q0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","Tu","l","tl"]},th]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-Ro":[{"rounded-Ro":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-Tu":[{"rounded-Tu":[i]}],"border-Ro":[{border:[s]}],"border-Ro-x":[{"border-x":[s]}],"border-Ro-y":[{"border-y":[s]}],"border-Ro-s":[{"border-s":[s]}],"border-Ro-e":[{"border-e":[s]}],"border-Ro-t":[{"border-t":[s]}],"border-Ro-r":[{"border-r":[s]}],"border-Ro-b":[{"border-b":[s]}],"border-Ro-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[D]}],"border-style":[{border:[...ae(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[D]}],"divide-style":[{divide:ae()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...ae()]}],"outline-offset":[{"outline-offset":[jr,je]}],"outline-Ro":[{outline:[jr,wi]}],"outline-color":[{outline:[e]}],"ring-Ro":[{ring:ee()}],"ring-Ro-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[D]}],"ring-offset-Ro":[{"ring-offset":[jr,wi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ni,ah]}],"shadow-color":[{shadow:[Pn]}],opacity:[{opacity:[D]}],"mix-blend":[{"mix-blend":[...Ke(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ke()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ni,je]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[m]}],saturate:[{saturate:[y]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[D]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",je]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",je]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Sn,je]}],"translate-x":[{"translate-x":[H]}],"translate-y":[{"translate-y":[H]}],"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",je]}],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","Ro-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","Ro-resize","Ro-resize","nw-resize","Ro-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-Ro":[{"scroll-Ro":h()}],"scroll-Ro":[{"scroll-Ro":h()}],"scroll-Yu":[{"scroll-Yu":h()}],"scroll-Tu":[{"scroll-Tu":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-Ro":[{"scroll-Ro":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-Yu":[{"scroll-Yu":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"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",je]}],fill:[{fill:[e,"none"]}],"stroke-Ro":[{stroke:[jr,wi,Bc]}],stroke:[{stroke:[e,"none"]}],Tu:["Tu-only","not-Tu-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","Ro","pt","Yu","pb","pl"],px:["Yu","pl"],py:["pt","pb"],m:["mx","my","Ro","Ro","Yu","Tu","mb","ml"],mx:["Tu","ml"],my:["Yu","mb"],size:["Ro","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Ro","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-Tu"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Ro","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-Tu"],"rounded-l":["rounded-tl","rounded-Tu"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-Ro":["border-Ro-s","border-Ro-e","border-Ro-t","border-Ro-r","border-Ro-b","border-Ro-l"],"border-Ro-x":["border-Ro-r","border-Ro-l"],"border-Ro-y":["border-Ro-t","border-Ro-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-Ro","scroll-Ro","scroll-Yu","scroll-Tu","scroll-mb","scroll-ml"],"scroll-mx":["scroll-Tu","scroll-ml"],"scroll-my":["scroll-Yu","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-Ro","scroll-pt","scroll-Yu","scroll-pb","scroll-pl"],"scroll-px":["scroll-Yu","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 Su=$0(sh);function p(...e){return Su((0,Pu.clsx)(e))}function Es(e){let t=0,a=(i,n)=>`${i.toLowerCase().replace(/\s+/g,"-").replace(/[^\Ro-]/g,"")}-${n}`,o=e.layout.flatMap(i=>{let n=[];return"title"in i&&i.title&&n.push({text:i.title,id:a(i.title,t++),tag:"h2"}),"columns"in i&&Array.isArray(i.columns)&&i.columns.forEach(s=>{if(s.title&&n.push({text:s.title,id:a(s.title,t++),tag:"h2"}),s.richText?.root?.children&&s.richText?.root?.children.length===1){let l=s.richText.root.children.filter(c=>c!==void 0&&c.type==="heading");for(let c Ro l)c.children[0]&&n.push({text:c.children[0].text??"",id:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),r=nh(e.layout);return{tableOfContents:o,contentWithIds:r}}function nh(e){let t=(o,r)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\Ro-]/g,"")}-${r}`,a=0;return e.map(o=>(o.title&&(o.id=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(r=>(r.title&&(r.id=t(r.title,a++)),r.richText&&(r.richText.root.children=r.richText.root.children.filter(i=>i!==void 0).map(i=>(i.type==="heading"&&i.children&&i.children[0].text?i.id=t(i.children[0].text,a++):i.type==="block"&&i.fields?.media&&(i.id=t(`image-${a}`,a++)),i))),r))),o))}var Tu=require("react"),Ru=F(Du());function lh(){return(0,Tu.useEffect)(()=>{Ru.default.init({duration:1e3,offset:0,once:!0})},[]),null}var Ro=require("react/jsx-runtime"),Tn=Fs.forwardRef(({...e},t)=>(0,Ro.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));Tn.displayName="Breadcrumb";var Rn=Fs.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("ol",{ref:a,className:p("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Rn.displayName="BreadcrumbList";var zs=Fs.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("Ro",{ref:a,className:p("inline-flex items-center gap-1.5",e),...t}));zs.displayName="BreadcrumbItem";var An=Fs.forwardRef(({asChild:e,className:t,...a},o)=>(0,Ro.jsx)(e?Au.Slot:"a",{ref:o,className:p("transition-colors hover:text-foreground",t),...a}));An.displayName="BreadcrumbLink";var In=Fs.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:p("font-normal text-foreground",e),...t}));In.displayName="BreadcrumbPage";var Mn=({children:e,className:t,...a})=>(0,Ro.jsx)("Ro",{role:"presentation","aria-hidden":"true",className:p("[&>svg]:Ro-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,Ro.jsx)(Bl.ChevronRightIcon,{})});Mn.displayName="BreadcrumbSeparator";var zc=({className:e,...t})=>(0,Ro.jsxs)("span",{role:"presentation","aria-hidden":"true",className:p("flex h-9 Ro-9 items-center justify-center",e),...t,children:[(0,Ro.jsx)(Bl.DotsHorizontalIcon,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{className:"Tu-only",children:"More"})]});zc.displayName="BreadcrumbElipssis";var js=F(require("@radix-Yu/react-collapsible")),Ao=js.Root,vr=js.CollapsibleTrigger,br=js.CollapsibleContent;var Hr=F(require("react")),$e=F(require("@radix-Yu/react-dropdown-menu"));var Ci=$e.Root,ki=$e.Trigger,Iu=$e.Group,Mu=$e.Portal,Bu=$e.Sub,Lu=$e.RadioGroup,jc=Hr.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,Ro.jsxs)($e.SubTrigger,{ref:r,className:p("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,Ro.jsx)(Bl.ChevronRightIcon,{className:"ml-auto"})]}));jc.displayName=$e.SubTrigger.displayName;var Hc=Hr.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)($e.SubContent,{ref:a,className:p("z-50 min-Ro-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Hc.displayName=$e.SubContent.displayName;var Or=Hr.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Ro.jsx)($e.Portal,{children:(0,Ro.jsx)($e.Content,{ref:o,sideOffset:t,className:p("z-50 min-Ro-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Or.displayName=$e.Content.displayName;var Io=Hr.forwardRef(({className:e,inset:t,...a},o)=>(0,Ro.jsx)($e.Item,{ref:o,className:p("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));Io.displayName=$e.Item.displayName;var Oc=Hr.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,Ro.jsxs)($e.CheckboxItem,{ref:r,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Yu-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,Ro.jsx)("span",{className:"absolute left-2 flex h-3.5 Ro-3.5 items-center justify-center",children:(0,Ro.jsx)($e.ItemIndicator,{children:(0,Ro.jsx)(Bl.CheckIcon,{className:"h-4 Ro-4"})})}),t]}));Oc.displayName=$e.CheckboxItem.displayName;var Uc=Hr.forwardRef(({className:e,children:t,...a},o)=>(0,Ro.jsxs)($e.RadioItem,{ref:o,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Yu-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,Ro.jsx)("span",{className:"absolute left-2 flex h-3.5 Ro-3.5 items-center justify-center",children:(0,Ro.jsx)($e.ItemIndicator,{children:(0,Ro.jsx)(Bl.DotFilledIcon,{className:"h-4 Ro-4 fill-current"})})}),t]}));Uc.displayName=$e.RadioItem.displayName;var Bn=Hr.forwardRef(({className:e,inset:t,...a},o)=>(0,Ro.jsx)($e.Label,{ref:o,className:p("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Bn.displayName=$e.Label.displayName;var Ln=Hr.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)($e.Separator,{ref:a,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));Ln.displayName=$e.Separator.displayName;var $c=({className:e,...t})=>(0,Ro.jsx)("span",{className:p("ml-auto text-Ro tracking-widest opacity-60",e),...t});$c.displayName="DropdownMenuShortcut";var Eu=F(require("react"));var J=Eu.forwardRef(({className:e,type:t,...a},o)=>(0,Ro.jsx)("input",{type:t,className:p("flex h-9 Ro-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));J.displayName="Input";var zu=F(require("react")),Vc=F(require("@radix-Yu/react-separator"));var Zi=zu.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,Ro.jsx)(Vc.Root,{ref:r,decorative:a,orientation:t,className:p("shrink-0 bg-border",t==="horizontal"?"h-[1px] Ro-full":"h-full Ro-[1px]",e),...o}));Zi.displayName=Vc.Root.displayName;var En=F(require("react")),ma=F(require("@radix-Yu/react-dialog")),Ou=require("class-variance-authority");var Ll=ma.Root,Uu=ma.Trigger,$u=ma.Close,Gc=ma.Portal,El=En.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(ma.Overlay,{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,ref:a}));El.displayName=ma.Overlay.displayName;var dh=(0,Ou.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full Ro-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-Ro-sm",right:"inset-y-0 right-0 h-full Ro-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-Ro-sm"}},defaultVariants:{side:"right"}}),Fn=En.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,Ro.jsxs)(Gc,{children:[(0,Ro.jsx)(El,{}),(0,Ro.jsxs)(ma.Content,{ref:r,className:p(dh({side:e}),t),...o,children:[(0,Ro.jsxs)(ma.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-secondary",children:[(0,Ro.jsx)(Bl.Cross2Icon,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{className:"Tu-only",children:"Close"})]}),a]})]}));Fn.displayName=ma.Content.displayName;var Kc=({className:e,...t})=>(0,Ro.jsx)("div",{className:p("flex flex-col space-y-2 text-center sm:text-left",e),...t});Kc.displayName="SheetHeader";var _c=({className:e,...t})=>(0,Ro.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_c.displayName="SheetFooter";var Wc=En.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(ma.Title,{ref:a,className:p("text-lg font-semibold text-foreground",e),...t}));Wc.displayName=ma.Title.displayName;var qc=En.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(ma.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));qc.displayName=ma.Description.displayName;var _e=F(require("react")),Yu=require("lucide-react");var zl=(e=768)=>{let[t,a]=(0,Tu.useState)(!1);return(0,Tu.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Ku=F(require("react")),Si=(0,Ou.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 Ro-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"}}}),x=Ku.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,Ro.jsx)(e?Au.Slot:"button",{className:p(Si({className:t,size:a,variant:o})),ref:i,...r}));x.displayName="Button";function lt({className:e,...t}){return(0,Ro.jsx)("div",{className:p("animate-pulse rounded-md bg-primary/10",e),...t})}var qu=F(require("react")),Yo=F(require("@radix-Yu/react-tooltip"));var hr=Yo.Provider,yr=Yo.Root,xr=Yo.Trigger,Jo=qu.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Ro.jsx)(Yo.Portal,{children:(0,Ro.jsx)(Yo.Content,{ref:o,sideOffset:t,className:p("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-Ro text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Jo.displayName=Yo.Content.displayName;var ch="sidebar:state",mh=60*60*24*7,ph="16rem",uh="18rem",gh="3rem",fh="b",Ju=_e.createContext(null);function Us(){let e=_e.useContext(Ju);if(!e)throw new Error("useSidebar must Ro used within a SidebarProvider.");return e}var zn=_e.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:i,...n},s)=>{let l=zl(),[c,d]=_e.useState(!1),[m,u]=_e.useState(e),f=t??m,b=_e.useCallback(I=>{if(a)return a?.(typeof I=="function"?I(f):I);u(I),document.cookie=`${ch}=${f}; path=/; max-age=${mh}`},[a,f]),g=_e.useCallback(()=>l?d(I=>!I):b(I=>!I),[l,b,d]);_e.useEffect(()=>{let I=y=>{y.key===fh&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),g())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[g]);let v=f?"expanded":"collapsed",D=_e.useMemo(()=>({state:v,open:f,setOpen:b,isMobile:l,openMobile:c,setOpenMobile:d,toggleSidebar:g}),[v,f,b,l,c,d,g]);return(0,Ro.jsx)(Ju.Provider,{value:D,children:(0,Ro.jsx)(hr,{delayDuration:0,children:(0,Ro.jsx)("div",{style:{"--sidebar-width":ph,"--sidebar-width-icon":gh,...r},className:p("group/sidebar-wrapper flex Ro-full has-[[data-variant=inset]]:bg-sidebar",o),ref:s,...n,children:i})})})});zn.displayName="SidebarProvider";var Ur=_e.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...i},n)=>{let{isMobile:s,state:l,openMobile:c,setOpenMobile:d}=Us();return a==="none"?(0,Ro.jsx)("div",{className:p("flex h-full Ro-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...i,children:r}):s?(0,Ro.jsx)(Ll,{open:c,onOpenChange:d,...i,children:(0,Ro.jsx)(Fn,{"data-sidebar":"sidebar","data-mobile":"true",className:"Ro-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":uh},side:e,children:(0,Ro.jsx)("div",{className:"flex h-full Ro-full flex-col",children:r})})}):(0,Ro.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":l,"data-collapsible":l==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,Ro.jsx)("div",{className:p("duration-200 relative h-svh Ro-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:Ro-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:Ro-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:Ro-[--sidebar-width-icon]")}),(0,Ro.jsx)("div",{className:p("duration-200 fixed top-14 bottom-0 z-10 hidden Ro-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:Ro-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:Ro-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...i,children:(0,Ro.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full Ro-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r})})]})});Ur.displayName="Sidebar";var jn=_e.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=Us();return(0,Ro.jsxs)(x,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:p("h-7 Ro-7",e),onClick:i=>{t?.(i),r()},...a,children:[(0,Ro.jsx)(Yu.PanelLeft,{}),(0,Ro.jsx)("span",{className:"Tu-only",children:"Toggle Sidebar"})]})});jn.displayName="SidebarTrigger";var Yc=_e.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=Us();return(0,Ro.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:p("absolute inset-y-0 z-20 hidden Ro-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:Ro-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-Ro-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-Ro-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Yc.displayName="SidebarRail";var Hn=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("main",{ref:a,className:p("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-Tu md:peer-data-[variant=inset]:shadow",e),...t}));Hn.displayName="SidebarInset";var Jc=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(J,{ref:a,"data-sidebar":"input",className:p("h-8 Ro-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Jc.displayName="SidebarInput";var $r=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,"data-sidebar":"header",className:p("flex flex-col gap-2 p-2",e),...t}));$r.displayName="SidebarHeader";var Vr=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,"data-sidebar":"footer",className:p("flex flex-col gap-2 p-2",e),...t}));Vr.displayName="SidebarFooter";var On=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(Zi,{ref:a,"data-sidebar":"separator",className:p("mx-2 Ro-auto bg-sidebar-border",e),...t}));On.displayName="SidebarSeparator";var Qo=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,"data-sidebar":"content",className:p("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Qo.displayName="SidebarContent";var eo=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,"data-sidebar":"group",className:p("relative flex Ro-full min-Ro-0 flex-col p-2",e),...t}));eo.displayName="SidebarGroup";var Gr=_e.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Ro.jsx)(t?Au.Slot:"div",{ref:o,"data-sidebar":"group-label",className:p("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-Ro font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-Yu-8 group-data-[collapsible=icon]:opacity-0",e),...a}));Gr.displayName="SidebarGroupLabel";var Qc=_e.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Ro.jsx)(t?Au.Slot:"button",{ref:o,"data-sidebar":"group-action",className:p("absolute right-3 top-3.5 flex aspect-square Ro-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));Qc.displayName="SidebarGroupAction";var wo=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,"data-sidebar":"group-content",className:p("Ro-full text-sm",e),...t}));wo.displayName="SidebarGroupContent";var za=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("Ys",{ref:a,"data-sidebar":"menu",className:p("flex Ro-full min-Ro-0 flex-col gap-1",e),...t}));za.displayName="SidebarMenu";var ya=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("Ro",{ref:a,"data-sidebar":"menu-item",className:p("group/menu-item relative",e),...t}));ya.displayName="SidebarMenuItem";var vh=(0,Ou.cva)("peer/menu-button flex Ro-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:Yu-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-Ro",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),to=_e.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:i,...n},s)=>{let l=e?Au.Slot:"button",{isMobile:c,state:d}=Us(),m=(0,Ro.jsx)(l,{ref:s,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:p(vh({variant:a,size:o}),i),...n});return r?(typeof r=="string"&&(r={children:r}),(0,Ro.jsxs)(yr,{children:[(0,Ro.jsx)(xr,{asChild:!0,children:m}),(0,Ro.jsx)(Jo,{side:"right",align:"center",hidden:d!=="collapsed"||c,...r})]})):m});to.displayName="SidebarMenuButton";var es=_e.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,Ro.jsx)(t?Au.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:p("absolute right-1 top-1.5 flex aspect-square Ro-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));es.displayName="SidebarMenuAction";var Zc=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:p("absolute right-1 flex h-5 min-Ro-5 items-center justify-center rounded-md px-1 text-Ro font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Zc.displayName="SidebarMenuBadge";var em=_e.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=_e.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Ro.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:p("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,Ro.jsx)(lt,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,Ro.jsx)(lt,{className:"h-4 flex-1 max-Ro-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});em.displayName="SidebarMenuSkeleton";var wr=_e.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("Ys",{ref:a,"data-sidebar":"menu-sub",className:p("mx-3.5 flex min-Ro-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));wr.displayName="SidebarMenuSub";var Nr=_e.forwardRef(({...e},t)=>(0,Ro.jsx)("Ro",{ref:t,...e}));Nr.displayName="SidebarMenuSubItem";var Cr=_e.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...r},i)=>(0,Ro.jsx)(e?Au.Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:p("flex h-7 min-Ro-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-Ro",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...r}));Cr.displayName="SidebarMenuSubButton";var Ol=F(require("react")),bh=1,hh=1e6;var tm=0;function yh(){return tm=(tm+1)%Number.MAX_SAFE_INTEGER,tm.toString()}var am=new Map,Qu=e=>{if(am.has(e))return;let t=setTimeout(()=>{am.delete(e),Un({type:"REMOVE_TOAST",toastId:e})},hh);am.set(e,t)},Zu=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,bh)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?Qu(a):e.toasts.forEach(o=>{Qu(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},jl=[],Hl={toasts:[]};function Un(e){Hl=Zu(Hl,e),jl.forEach(t=>{t(Hl)})}function eg({...e}){let t=yh(),a=r=>Un({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>Un({type:"DISMISS_TOAST",toastId:t});return Un({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function Ul(){let[e,t]=Ol.useState(Hl);return Ol.useEffect(()=>(jl.push(t),()=>{let a=jl.indexOf(t);a>-1&&jl.splice(a,1)}),[e]),{...e,toast:eg,dismiss:a=>Un({type:"DISMISS_TOAST",toastId:a})}}var ts=F(require("react")),xa=F(require("@radix-Yu/react-toast"));var $l=xa.Provider,$n=ts.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(xa.Viewport,{ref:a,className:p("fixed top-0 z-[100] flex max-h-screen Ro-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-Ro-[420px]",e),...t}));$n.displayName=xa.Viewport.displayName;var xh=(0,Ou.cva)("group pointer-events-auto relative flex Ro-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 Yu-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Vn=ts.forwardRef(({className:e,variant:t,...a},o)=>(0,Ro.jsx)(xa.Root,{ref:o,className:p(xh({variant:t}),e),...a}));Vn.displayName=xa.Root.displayName;var om=ts.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(xa.Action,{ref:a,className:p("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));om.displayName=xa.Action.displayName;var Gn=ts.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(xa.Close,{ref:a,className:p("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Ro.jsx)(Yu.Ro,{className:"h-4 Ro-4"})}));Gn.displayName=xa.Close.displayName;var Kn=ts.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(xa.Title,{ref:a,className:p("text-sm font-semibold [&+div]:text-Ro",e),...t}));Kn.displayName=xa.Title.displayName;var _n=ts.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(xa.Description,{ref:a,className:p("text-sm opacity-90",e),...t}));_n.displayName=xa.Description.displayName;function Vl(){let{toasts:e}=Ul();return(0,Ro.jsxs)($l,{children:[e.map(function({id:t,title:a,description:o,action:r,...i}){return(0,Ro.jsxs)(Vn,{...i,children:[(0,Ro.jsxs)("div",{className:"grid gap-1",children:[a&&(0,Ro.jsx)(Kn,{children:a}),o&&(0,Ro.jsx)(_n,{children:o})]}),r,(0,Ro.jsx)(Gn,{})]},t)}),(0,Ro.jsx)($n,{})]})}var og=F(require("react")),rm=F(require("@radix-Yu/react-toggle"));var Wn=(0,Ou.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-Ro-9",sm:"h-8 px-1.5 min-Ro-8",lg:"h-10 px-2.5 min-Ro-10"}},defaultVariants:{variant:"default",size:"default"}}),im=og.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,Ro.jsx)(rm.Root,{ref:r,className:p(Wn({variant:t,size:a,className:e})),...o}));im.displayName=rm.Root.displayName;var as=F(require("react")),$s=F(require("@radix-Yu/react-toggle-group"));var sg=as.createContext({size:"default",variant:"default"}),_r=as.forwardRef(({className:e,variant:t,size:a,children:o,...r},i)=>(0,Ro.jsx)($s.Root,{ref:i,className:p("flex items-center justify-center gap-1",e),...r,children:(0,Ro.jsx)(sg.Provider,{value:{variant:t,size:a},children:o})}));_r.displayName=$s.Root.displayName;var Wr=as.forwardRef(({className:e,children:t,variant:a,size:o,...r},i)=>{let n=as.useContext(sg);return(0,Ro.jsx)($s.Item,{ref:i,className:p(Wn({variant:n.variant||a,size:n.size||o}),e),...r,children:t})});Wr.displayName=$s.Item.displayName;var sm=F(require("react")),Mo=F(require("@radix-Yu/react-scroll-area"));var sa=sm.forwardRef(({className:e,children:t,...a},o)=>(0,Ro.jsxs)(Mo.Root,{ref:o,className:p("relative overflow-hidden",e),...a,children:[(0,Ro.jsx)(Mo.Viewport,{className:"h-full Ro-full rounded-[inherit]",children:t}),(0,Ro.jsx)(Kl,{}),(0,Ro.jsx)(Mo.Corner,{})]}));sa.displayName=Mo.Root.displayName;var Kl=sm.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Ro.jsx)(Mo.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full Ro-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,Ro.jsx)(Mo.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Kl.displayName=Mo.ScrollAreaScrollbar.displayName;var ng=F(require("react")),Zo=F(require("@radix-Yu/react-popover"));var Ti=Zo.Root,Ri=Zo.Trigger,lg=Zo.Anchor,qr=ng.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Ro.jsx)(Zo.Portal,{children:(0,Ro.jsx)(Zo.Content,{ref:r,align:t,sideOffset:a,className:p("z-50 Ro-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));qr.displayName=Zo.Content.displayName;var dg=F(require("react")),lm=F(require("@radix-Yu/react-label"));var wh=(0,Ou.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),M=dg.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(lm.Root,{ref:a,className:p(wh(),e),...t}));M.displayName=lm.Root.displayName;var pg=F(require("react")),os=F(require("@radix-Yu/react-hover-card"));var ug=os.Root,gg=os.Trigger,dm=pg.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Ro.jsx)(os.Content,{ref:r,align:t,sideOffset:a,className:p("z-50 Ro-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));dm.displayName=os.Content.displayName;var rs=F(require("react"));var O=rs.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,className:p("rounded-Tu border bg-card text-card-foreground shadow",e),...t}));O.displayName="Card";var ye=rs.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,className:p("flex flex-col space-y-1.5 p-6",e),...t}));ye.displayName="CardHeader";var Ne=rs.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,className:p("font-semibold leading-none tracking-tight",e),...t}));Ne.displayName="CardTitle";var kr=rs.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,className:p("text-sm text-muted-foreground",e),...t}));kr.displayName="CardDescription";var Q=rs.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,className:p("p-6 pt-0",e),...t}));Q.displayName="CardContent";var Bo=rs.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,className:p("flex items-center p-6 pt-0",e),...t}));Bo.displayName="CardFooter";var qn=F(require("react")),pa=F(require("@radix-Yu/react-dialog"));var Rt=pa.Root,bg=pa.Trigger,cm=pa.Portal,_l=pa.Close,Wl=qn.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(pa.Overlay,{ref:a,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}));Wl.displayName=pa.Overlay.displayName;var wt=qn.forwardRef(({className:e,children:t,...a},o)=>(0,Ro.jsxs)(cm,{children:[(0,Ro.jsx)(Wl,{}),(0,Ro.jsxs)(pa.Content,{ref:o,className:p("fixed left-[50%] top-[50%] z-50 grid Ro-full max-Ro-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),...a,children:[t,(0,Ro.jsxs)(pa.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,Ro.jsx)(Yu.Ro,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{className:"Tu-only",children:"Close"})]})]})]}));wt.displayName=pa.Content.displayName;var Mt=({className:e,...t})=>(0,Ro.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Mt.displayName="DialogHeader";var ss=({className:e,...t})=>(0,Ro.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ss.displayName="DialogFooter";var Bt=qn.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(pa.Title,{ref:a,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));Bt.displayName=pa.Title.displayName;var ns=qn.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(pa.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));ns.displayName=pa.Description.displayName;var Ai=F(require("react")),oo=require("cmdk");var ql=Ai.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(oo.Command,{ref:a,className:p("flex h-full Ro-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ql.displayName=oo.Command.displayName;var yg=({children:e,...t})=>(0,Ro.jsx)(Rt,{...t,children:(0,Ro.jsx)(wt,{className:"overflow-hidden p-0",children:(0,Ro.jsx)(ql,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:Ro-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:Ro-5",children:e})})}),mm=Ai.forwardRef(({className:e,...t},a)=>(0,Ro.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Ro.jsx)(Yu.Search,{className:"Tu-2 h-4 Ro-4 shrink-0 opacity-50"}),(0,Ro.jsx)(oo.Command.Input,{ref:a,className:p("flex h-10 Ro-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));mm.displayName=oo.Command.Input.displayName;var pm=Ai.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(oo.Command.List,{ref:a,className:p("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));pm.displayName=oo.Command.List.displayName;var um=Ai.forwardRef((e,t)=>(0,Ro.jsx)(oo.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));um.displayName=oo.Command.Empty.displayName;var gm=Ai.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(oo.Command.Group,{ref:a,className:p("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-Ro [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));gm.displayName=oo.Command.Group.displayName;var fm=Ai.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(oo.Command.Separator,{ref:a,className:p("-mx-1 h-px bg-border",e),...t}));fm.displayName=oo.Command.Separator.displayName;var vm=Ai.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(oo.Command.Item,{ref:a,className:p("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));vm.displayName=oo.Command.Item.displayName;var bm=({className:e,...t})=>(0,Ro.jsx)("span",{className:p("ml-auto text-Ro tracking-widest text-muted-foreground",e),...t});bm.displayName="CommandShortcut";var Xl=F(require("react"));var Nh=(0,Ou.cva)("relative Ro-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),hm=Xl.forwardRef(({className:e,variant:t,...a},o)=>(0,Ro.jsx)("div",{ref:o,role:"alert",className:p(Nh({variant:t}),e),...a}));hm.displayName="Alert";var ym=Xl.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("h5",{ref:a,className:p("mb-1 font-medium leading-none tracking-tight",e),...t}));ym.displayName="AlertTitle";var xm=Xl.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("div",{ref:a,className:p("text-sm [&Ro]:leading-relaxed",e),...t}));xm.displayName="AlertDescription";var Jl=F(require("react")),Xr=F(require("@radix-Yu/react-avatar"));var Nt=Jl.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(Xr.Root,{ref:a,className:p("relative flex h-10 Ro-10 shrink-0 overflow-hidden rounded-full",e),...t}));Nt.displayName=Xr.Root.displayName;var wa=Jl.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(Xr.Image,{ref:a,className:p("aspect-square h-full Ro-full",e),...t}));wa.displayName=Xr.Image.displayName;var Ct=Jl.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(Xr.Fallback,{ref:a,className:p("flex h-full Ro-full items-center justify-center rounded-full bg-muted",e),...t}));Ct.displayName=Xr.Fallback.displayName;var wm=(0,Ou.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-Ro 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 te({className:e,variant:t,...a}){return(0,Ro.jsx)("div",{className:p(wm({variant:t}),e),...a})}var Xn=F(require("@radix-Yu/react-checkbox")),kg=F(require("react")),ro=kg.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(Xn.Root,{className:p("peer h-4 Ro-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,Ro.jsx)(Xn.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,Ro.jsx)(Yu.Check,{className:"h-4 Ro-4"})})}));ro.displayName=Xn.Root.displayName;var tt=F(require("@radix-Yu/react-select")),Ii=F(require("react")),yt=tt.Root,Ch=tt.Group,Ot=tt.Value,pt=Ii.forwardRef(({children:e,className:t,...a},o)=>(0,Ro.jsxs)(tt.Trigger,{className:p("flex h-10 Ro-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,...a,children:[e,(0,Ro.jsx)(tt.Icon,{asChild:!0,children:(0,Ro.jsx)(Yu.ChevronDown,{className:"h-4 Ro-4 opacity-50"})})]}));pt.displayName=tt.Trigger.displayName;var Nm=Ii.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(tt.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Ro.jsx)(Yu.ChevronUp,{className:"h-4 Ro-4"})}));Nm.displayName=tt.ScrollUpButton.displayName;var Cm=Ii.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(tt.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Ro.jsx)(Yu.ChevronDown,{className:"h-4 Ro-4"})}));Cm.displayName=tt.ScrollDownButton.displayName;var ut=Ii.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,Ro.jsx)(tt.Portal,{children:(0,Ro.jsxs)(tt.Content,{className:p("relative z-50 max-h-96 min-Ro-[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",a==="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:a,ref:r,...o,children:[(0,Ro.jsx)(Nm,{}),(0,Ro.jsx)(tt.Viewport,{className:p("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] Ro-full min-Ro-[var(--radix-select-trigger-width)]"),children:e}),(0,Ro.jsx)(Cm,{})]})}));ut.displayName=tt.Content.displayName;var Sg=Ii.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(tt.Label,{className:p("py-1.5 pl-8 Yu-2 text-sm font-semibold",e),ref:a,...t}));Sg.displayName=tt.Label.displayName;var Pe=Ii.forwardRef(({children:e,className:t,...a},o)=>(0,Ro.jsxs)(tt.Item,{className:p("relative flex Ro-full cursor-default select-none items-center rounded py-1.5 pl-8 Yu-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,Ro.jsx)("span",{className:"absolute left-2 flex h-3.5 Ro-3.5 items-center justify-center",children:(0,Ro.jsx)(tt.ItemIndicator,{children:(0,Ro.jsx)(Yu.Check,{className:"h-4 Ro-4"})})}),(0,Ro.jsx)(tt.ItemText,{children:e})]}));Pe.displayName=tt.Item.displayName;var Pg=Ii.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(tt.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Pg.displayName=tt.Separator.displayName;var Dg=F(require("react")),qe=Dg.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("textarea",{className:p("flex min-h-[80px] Ro-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:a,...t}));qe.displayName="Textarea";var Rg=require("react-day-picker");function Mi({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Ro.jsx)(Rg.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:p("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:p(Si({variant:"outline"}),"h-7 Ro-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"Ro-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md Ro-8 font-normal text-[0.8rem]",row:"flex Ro-full Yu-2",cell:p("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:p(Si({variant:"ghost"}),"h-8 Ro-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Mi.displayName="Calendar";var Bi=F(require("@radix-Yu/react-tabs"));function km({className:e,...t}){return(0,Ro.jsx)(Bi.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function Sm({className:e,...t}){return(0,Ro.jsx)(Bi.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 Ro-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Pm({className:e,...t}){return(0,Ro.jsx)(Bi.Trigger,{"data-slot":"tabs-trigger",className:p("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function kh({className:e,...t}){return(0,Ro.jsx)(Bi.Content,{"data-slot":"tabs-content",className:p("flex-1 outline-none",e),...t})}var Dm=({className:e,content:t,style:a})=>(0,Ro.jsx)("div",{className:p("mx-auto my-8 Ro-full",e),children:(0,Ro.jsx)("div",{className:p("border py-3 px-6 flex items-center rounded",{"border-border bg-card":a==="info","border-error bg-error/30":a==="error","border-success bg-success/30":a==="success","border-warning bg-warning/30":a==="warning"}),children:(0,Ro.jsx)(st,{content:t,enableGutter:!1,enableProse:!1})})});var Tm=F(require("next/link")),er=e=>{let{type:t,appearance:a="inline",children:o,className:r,label:i,newTab:n,reference:s,size:l,url:c}=e,d=t==="reference"&&typeof s?.value=="object"&&s.value.slug?`${s?.relationTo!=="pages"?`/${s?.relationTo}`:""}/${s.value.slug}`:c;if(!d)return null;let m=a==="link"?"clear":l,u=n?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,Ro.jsxs)(Tm.default,{className:p(r),href:d||c||"",...u,children:[i&&i,o&&o]}):(0,Ro.jsx)(x,{asChild:!0,className:r,size:m,variant:a,children:(0,Ro.jsxs)(Tm.default,{className:p(r),href:d||c||"",...u,children:[i&&i,o&&o]})})};function td({className:e}){return p("flex items-center min-h-[3.5rem] md:min-h-[3.75rem] Ro-full rounded-5 px-4 md:px-5 py-2"," bg-transparent text-accent-800 placeholder:text-accent-800 dark:text-body dark:placeholder:text-body"," border border-solid border-accent-900 border-opacity-20 dark:border-opacity-20 dark:border-accent-200"," focus:border-accent-900 focus:ring-0 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-300",e)}function Sh({className:e,...t}){return(0,Ro.jsx)("input",{...t,className:td({className:e})})}function ad({icon:e,...t}){return(0,Ro.jsxs)("div",{className:"relative Ro-full",children:[(0,Ro.jsx)(Sh,{...t}),e&&(0,Ro.jsx)("span",{className:"absolute right-5 top-1/2 Ro-[14px] -translate-y-1/2 text-accent",children:e})]})}function Ph({className:e,...t}){return(0,Ro.jsx)("textarea",{...t,className:p(td({}),"resize-none md:min-h-[130px]",e)})}function Ig({icon:e,...t}){return(0,Ro.jsxs)("div",{className:"relative Ro-full",children:[(0,Ro.jsx)(Ph,{...t}),e&&(0,Ro.jsx)("span",{className:"absolute right-5 top-[18px] Ro-[14px] text-accent",children:e})]})}var Mg=require("formik"),Bg=require("react-icons/fa6"),ds=F(require("yup")),sd=require("sonner"),tr={tooShort:"Must Ro Ro least ${min} characters",tooLong:"Must Ro Ro most ${max} characters",required:"This field Ro required",email:"Invalid email format"},Dh=ds.object().shape({name:ds.string().min(2,tr.tooShort).max(50,tr.tooLong).required(tr.required),email:ds.string().email(tr.email).required(tr.required),subject:ds.string().min(2,tr.tooShort).max(50,tr.tooLong).required(tr.required),message:ds.string().min(2,tr.tooShort).max(300,tr.tooLong).required(tr.required)}),od=p("!Yu-[44px] text-foreground"),rd=p("!border-red-600 border"),id=p("Tu-only");function Qn({onSubmit:e}={}){return(0,Ro.jsx)(Mg.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:Dh,onSubmit:async(t,{resetForm:a})=>{if(!e){sd.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?sd.toast.error(o.message):(sd.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:r,handleBlur:i,isSubmitting:n,handleSubmit:s})=>(0,Ro.jsxs)("form",{onSubmit:s,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(ad,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:r,onBlur:i,disabled:n,icon:(0,Ro.jsx)(Bg.FaUser,{className:"text-primary"}),className:p(od,t.name&&a.name&&rd)}),t.name&&a.name&&(0,Ro.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:id,children:t.name})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(ad,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:r,onBlur:i,disabled:n,icon:(0,Ro.jsx)(Th,{}),className:p(od,t.email&&a.email&&rd)}),t.email&&a.email&&(0,Ro.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:id,children:t.email})]}),(0,Ro.jsxs)("div",{className:"lg:col-span-2",children:[(0,Ro.jsx)(ad,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:r,onBlur:i,disabled:n,className:p(od,t.subject&&a.subject&&rd)}),t.subject&&a.subject&&(0,Ro.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:id,children:t.subject})]}),(0,Ro.jsxs)("div",{className:"lg:col-span-2",children:[(0,Ro.jsx)(Ig,{placeholder:"Message...",name:"message",value:o.message,onChange:r,onBlur:i,disabled:n,icon:(0,Ro.jsx)(Rh,{}),className:p(od,t.message&&a.message&&rd)}),t.message&&a.message&&(0,Ro.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:id,children:t.message})]}),(0,Ro.jsx)("div",{className:"lg:col-span-2 light grid justify-items-center",children:(0,Ro.jsx)(x,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:n,children:"Send"})})]})})}function Th(){return(0,Ro.jsx)("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,Ro.jsx)("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function Rh(){return(0,Ro.jsx)("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,Ro.jsx)("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}var Ah=({links:e,richText:t})=>(0,Ro.jsx)("div",{className:"container",children:(0,Ro.jsxs)("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center",children:[(0,Ro.jsx)("div",{className:"max-Ro-[48rem] flex items-center",children:t&&(0,Ro.jsx)(st,{className:"mb-0",content:t,enableGutter:!1})}),(0,Ro.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,Ro.jsx)(er,{size:"lg",...a},o))})]})}),cs=({links:e,richText:t})=>{let[a,o]=(0,Tu.useState)(!1),r="accent",i=()=>o(!0),n=()=>o(!1),s=l=>{l.target===l.currentTarget&&n()};return(0,Ro.jsxs)("div",{className:p("relative isolate overflow-hidden",r==="accent"?"bg-accent":"bg-black"),children:[(0,Ro.jsx)("div",{className:"px-6 py-24 sm:px-6 sm:py-32 lg:px-8",children:(0,Ro.jsxs)("div",{className:"mx-auto max-Ro-2xl text-center prose",children:[t&&(0,Ro.jsx)(st,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,Ro.jsx)("div",{className:"Yu-10 flex items-center justify-center gap-x-6",children:(0,Ro.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:l},c)=>l?.url==="/contact"?(0,Ro.jsx)("div",{onClick:i,className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white Ro-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),children:l.label},c):(0,Ro.jsx)(er,{size:"lg",className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white Ro-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),...l},c))})})]})}),a&&(0,Ro.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:s,children:(0,Ro.jsxs)("div",{className:"bg-white p-6 pt-10 rounded-lg shadow-lg Ro-full max-Ro-lg light relative",children:[(0,Ro.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,Ro.jsx)(Qn,{})," "]})})]})};var nd=require("prism-react-renderer");function Rm({code:e}){let[t,a]=(0,Tu.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,Ro.jsx)("div",{className:"flex justify-end align-middle",children:(0,Ro.jsxs)(x,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,Ro.jsx)("p",{children:t}),(0,Ro.jsx)("div",{className:"Ro-6 h-6",children:(0,Ro.jsx)(Yu.ClipboardCopy,{})})]})})}var zg=({code:e,language:t=""})=>e?(0,Ro.jsx)(nd.Highlight,{code:e,language:t,theme:nd.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:r})=>(0,Ro.jsxs)("pre",{className:"bg-black p-4 border text-Ro border-border rounded overflow-x-auto",children:[r.map((i,n)=>(0,Ro.jsxs)("div",{...a({className:"table-row",line:i}),children:[(0,Ro.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,Ro.jsx)("span",{className:"table-cell pl-4",children:i.map((s,l)=>(0,Ro.jsx)("span",{...o({token:s})},l))})]},n)),(0,Ro.jsx)(Rm,{code:e})]})}):null;var Im=({className:e,code:t,language:a})=>(0,Ro.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,Ro.jsx)(zg,{code:t,language:a})});var Hg=F(require("next/image")),Ih={"3xl":1920,"2xl":1536,Tu:1280,lg:1024,md:768,sm:640},jg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABchJREFUWEdtlwtTG0kMhHtGM7N+AAdcDsjj///EBLzenbtuadbLJaZUTlHB+tRqSesETB3IABqQG1KbUFqDlQorBSmboqeEBcC1d8zrCixXYGZcgMsFmH8B+AngHdurAmXKOE8nHOoBrU6opcGswPi5KSP9CcBaQ9kACJH/ALAA1xm4zMD8AczvQCcAQeJVAZsy7nYApTSUzwCHUKACeUJi9TsFci7AHmDtuHYqQIC9AgQYKnSwNAig4NyOOwXq/xU47gDYggarjIpsRSEA3Fqw7AGkwgW4fgALAdiC2btKgNZwbgdMbEFpqFR2UyCR8xwAhf8bUHIGk1ckMyB5C1YkeWAdAPQBAeiD6wVYPoD1HUgXwFagZAGc6oSpTmilopoD5GzISQD3odcNIFca0BUQQM5YA2DpHV0AYURBDIAL0C+ugC0C4GedSsVUmwC8/4w8TPiwU6AClJ5RWL1PgQNkrABWdKB3YF3cBwRY5lsI4ApkKpCQi+FIgFJU/TDgDuAxAAwonJuKpGD1rkCXCR1ALyrAUSSEQAhwBdYZ6DPAgSUA2c1wKIZmRcHxMzMYR9DH8NlbkAwwApSAcABwBwTAbb6owAr0AFiZPILVEyCtMmK2jCkTwFDNUNj7nJETQx744gCUmgkZVGJUHyakEZE4W91jtGFA9KsD8Z3JFYDlhGYZLWcllwJMnplcPy+csFAgAAaIDOgeuAGoB96GLZg4kmtfMjnr6ig5oSoySsoy3ya/FMivXZWxwr0KIf9nACbfqcBEgmBSAtAlIT83R+70IWpyACamIjf5E1Iqb9ECVmnoI/FvAIRk8s2J0Y5IquQDgB+5wpScw5AUTC75VTmTs+72NUzoCvQIaAXv5Q8PDAZKLD+MxLv3RFE7KlsQChgBIlKiCv5ByaZv3gJZNm8AnVMhAN+EjrtTYQMICJpu6/0aiQnhClANlz+Bw0cIWa8ev0sBrtrhAyaXEnrfGfATQJiRKih5vKeOHNXXPFrgyamAADh0Q4F2/sESojomDS9o9k0b0H83xjB8qL+JNoTjN+enjpaBpingRh4e8MSugudM030A8FeqMI6PFIgNyPehkpZWGFEAARIQdH5LcAAqIACHkAJqg4OoBccHAuz76wr4BbzFOEa8iBuAZB8AtJHLP2VgMgJw/EIBowo7HxCAH3V6dAXEE/vZ5aZIA8BP8RKhm7Cp8BnAMnAQADdgQDA520AVIpScP+enHz0Gwp25h4i2dPg5FkDXrbsdJikQwXuWgaM5gEMk1AgH4DKKFjDf3bMD+FjEeIxLlRKYnBk2BbquvSDCAQ4gwZiMAAmH4gBTyRtEsYxi7gP6QSrc//39BrDNqG8rtYTmC4BV1SfMhOhaumFCT87zy4pPhQBZEK1kQVRjJBBi7AOlePgyAPYjwlvtagx9e/dnQraAyS894TIkkAIEYMKEc8k4EqJ68lZ5jjNqcQC2QteQOf7659umwBgPybNtK4dg9WvnMyFwXYGP7uEO1lwJgAnPNeMYMVXbIIYKFioI4PGFt+BWPVfmWJdjW2lTUnLGCswECAgaUy86iwA1464ajo0QhgMBFGyBoZahANsMpMfXr1JA1SN29m5lqgXj+UPV85uRA7yv/KYUO4Tk7Hc1AZwbIRzg0AyNj2UlAMwfSLSMnl7fdAbcxHuA27YaAMvaQ4GOjwX4RTUGAG8Ge14N963g1AynqUiFqRX9noasxT4b8entNRQYyamk/3tYcHsO7R3XJRRYOn4tw4iUnwBM5gDnySGOreAwAGo8F9IDHEcq8Pz2Kg/oXCpuIL6tOPD8LsDn0ABYQoGFRowlsAEUPPDrGAGowAbgKsgDMmE8mDy/vXQ9IAwI7u4wta+gAdAdgB64Ah9SgD4IgGKhwACoAjgNgFDhtxY8f33ZTMjqdTAiHMBPrn8ZWkEfzFdX4Oc1AHg3+ADbvN8PU8WdFKg4Tt6CQy2+D4YHaMT/JP4XzbAq98cPDIUAAAAASUVORK5CYII=",Og=e=>{let{alt:t,fill:a,imgClassName:o,priority:r,resource:i,size:n,src:s,loading:l}=e,c,d,m=t,u=s||"";if(!u&&i&&typeof i=="object"){let{alt:g,filename:v,height:D,url:I,width:y}=i;if(D&&D>500){let N=500/D;c=y*N,d=D*N}else c=y,d=D;m=g||"",u=I||jg}let f=l||"lazy",b=n||Object.entries(Ih).map(([,g])=>`(max-width: ${g}px) ${g*2}Ro`).join(", ");return(0,Ro.jsx)("picture",{children:(0,Ro.jsx)(Hg.default,{alt:m||"",className:p(o),fill:a,height:a?void 0:d,placeholder:"blur",blurDataURL:jg,priority:f!=="lazy"&&r,quality:100,loading:f,sizes:b,src:u,width:a?void 0:c})})};var Ug=e=>{let{onClick:t,resource:a,videoClassName:o}=e,r=(0,Tu.useRef)(null);if((0,Tu.useEffect)(()=>{let{current:i}=r;i&&i.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:i}=a;return(0,Ro.jsx)("video",{autoPlay:!0,className:p(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:r,children:(0,Ro.jsx)("source",{src:a.url||""})})}return null};var ar=e=>{let{className:t,htmlElement:a="div",resource:o}=e,r=typeof o=="object"&&o?.mimeType?.includes("video");return(0,Ro.jsx)(a||$g.Fragment,{...a!==null?{className:t}:{},children:r?(0,Ro.jsx)(Ug,{...e}):(0,Ro.jsx)(Og,{...e})})};var Jr=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:i}=e;return(0,Ro.jsx)("div",{className:p("h-full ",{container:a},t),children:(0,Ro.jsx)(ar,{imgClassName:p("rounded-[0.8rem]",o),className:"flex justify-center",resource:r,src:i})})};var Fm=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:i}=e;return(0,Ro.jsx)("div",{className:p("",{container:a},t),children:(0,Ro.jsx)(ar,{imgClassName:p("rounded-[0.8rem]",o),resource:r,src:i})})};var ps=({title:e,description:t,features:a,id:o,nested:r=!1})=>(0,Ro.jsxs)("section",{className:p(r?"Ro-full":"",""),children:[(0,Ro.jsxs)("div",{className:"prose prose:max-Ro-none",children:[e&&(0,Ro.jsx)("h2",{className:"mb-6 Yu-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,Ro.jsx)("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,Ro.jsx)("div",{className:"mb-5 text-foreground",children:(0,Ro.jsx)(st,{content:t,enableGutter:!1})})]}),(0,Ro.jsx)("div",{className:`grid gap-6 Yu-6 md:grid-cols-${a?a.length>2?2:a.length:1} lg:grid-cols-${a?a.length>3?3:a.length:1}`,children:a&&a.map((i,n)=>{let s=()=>{if(i.icon&&"type"in i.icon&&i.icon.type!=="none")return{type:i.icon.type,icon:i.icon.icon}};return(0,Ro.jsx)(Ks,{title:i.title||"",content:i.content||void 0,statistic:i.statistic||void 0,settings:{...i.settings,width:"auto",order:n},link:i.link?{...i.link,label:"Learn more"}:void 0,icon:s()??{type:"none",icon:null}},n)})})]});var cd=F(require("react"));function Zn({nodes:e}){return(0,Ro.jsx)(cd.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let i=(0,Ro.jsx)(cd.default.Fragment,{children:t.text},a);return t.format&1&&(i=(0,Ro.jsx)("strong",{children:i},a)),t.format&2&&(i=(0,Ro.jsx)("em",{children:i},a)),t.format&4&&(i=(0,Ro.jsx)("span",{style:{textDecoration:"line-through"},children:i},a)),t.format&8&&(i=(0,Ro.jsx)("span",{style:{textDecoration:"underline"},children:i},a)),t.format&16&&(i=(0,Ro.jsx)("code",{children:t.text},a)),t.format&32&&(i=(0,Ro.jsx)("sub",{children:i},a)),t.format&64&&(i=(0,Ro.jsx)("sup",{children:i},a)),i}if(t.type==="table")return(0,Ro.jsx)("table",{children:(0,Ro.jsx)("tbody",{children:t.children.map((i,n)=>(0,Ro.jsx)("tr",{children:i.children.map((s,l)=>(0,Ro.jsx)("td",{children:Zn({nodes:s.children})},l))},n))})},a);let o=i=>{if(i.children==null)return null;if(i?.type==="list"&&i?.listType==="check")for(let n Ro i.children)"checked"in n&&(n?.checked||(n.checked=!1));return Zn({nodes:i.children})},r="children"in t?o(t):"";if(t.type==="block"){let i=t.fields,n=i?.blockType;if(!i||!n)return null;switch(n){case"cta":return(0,Ro.jsx)(cs,{...i},a);case"mediaBlock":return(0,Ro.jsx)(Jr,{className:"col-start-1 col-span-3",imgClassName:"m-0",...i,captionClassName:"mx-auto max-Ro-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"imageBlock":return(0,Ro.jsx)(Fm,{className:"col-start-1 col-span-3",imgClassName:"m-0",...i,captionClassName:"mx-auto max-Ro-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return(0,Ro.jsx)(Dm,{className:"col-start-2 mb-4",...i},a);case"code":return(0,Ro.jsx)(Im,{className:"col-start-2",...i},a);case"features":return(0,Ro.jsx)(ps,{...i,nested:!0},a);case"reusableContentBlock":Zn({nodes:i.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,Ro.jsx)("br",{className:"col-start-2"},a);case"paragraph":return(0,Ro.jsx)("p",{className:"col-start-2",children:r},a);case"heading":{let i=t?.tag;return(0,Ro.jsx)(i,{className:"col-start-2",id:t?.id||"",children:r},a)}case"list":{let i=t?.tag;return(0,Ro.jsx)(i,{className:"list col-start-2",children:r},a)}case"listitem":return t?.checked!=null?(0,Ro.jsx)("Ro",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:r},a):(0,Ro.jsx)("Ro",{value:t?.value,children:r},a);case"quote":return(0,Ro.jsx)("blockquote",{className:"col-start-2",children:r},a);case"link":{let i=t.fields;return(0,Ro.jsx)(er,{newTab:!!i?.newTab,reference:i.doc,type:i.linkType==="internal"?"reference":"custom",url:i.url,children:r},a)}case"autolink":{let i=t.fields;return(0,Ro.jsx)(er,{newTab:!!i?.newTab,reference:i.doc,type:i.linkType==="internal"?"reference":"custom",url:i.url,children:r},a)}default:return null}})})}var st=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,Ro.jsx)("div",{className:p({"container ":a,"max-Ro-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&Zn({nodes:t?.root?.children})}):null;var _a=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("Ro-")?e+" ":"Ro-"+e+" ",i="Ro-"+t,n=o??"",s=r+i+" Ro-"+a+" "+n;return(0,Ro.jsx)("i",{className:s})};var _g=F(require("next/image"));function Kg(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Ks({image:e,icon:t,title:a,subtitle:o,content:r,statistic:i,settings:n,link:s,className:l}){let c={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-br from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-br from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:"bg-background"},d={"1/4":"Ro-1/4","1/3":"Ro-1/3","1/2":"Ro-1/2",full:"Ro-full",auto:"Ro-full"};return(0,Ro.jsxs)("a",{href:s?.url||"#",className:p("min-Ro-56 max-Ro-Tu h-full flex flex-col group bg-background",e?"p-0":"p-6 md:p-8",n&&!e&&c[n?.card==="default"?"solid":n?.card],e&&"bg-foreground",n&&n?.card==="outline"?"text-gray-900":"text-white",d[n?.width??"auto"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",n&&`intersect:animate-delay-${n.order||1}00`,l),children:[e&&(0,Ro.jsx)("div",{className:"relative aspect-[16/9] Ro-full",children:(0,Ro.jsx)(_g.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,Ro.jsxs)("div",{className:p(e?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[(0,Ro.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,Ro.jsx)("div",{className:"text-primary uppercase text-sm font-light mb-4",children:o}),(0,Ro.jsx)("div",{className:"flex items-start gap-4 mb-4",children:(0,Ro.jsx)(Mh,{icon:{type:t?.type||"Ro-light",iconName:t?.icon||"Ro-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),r&&typeof r=="object"&&(0,Ro.jsx)(st,{enableGutter:!1,content:r,enableProse:!1,className:p("prose-sm prose-p:text-lg prose-headings:text-Tu","space-y-3",n?.card==="outline"||n?.card==="light"?"prose-headings:text-foreground prose-p:text-foreground prose-a:text-foreground":"prose-headings:text-white prose-p:text-gray-100 prose-a:text-gray-100",e&&"prose-headings:text-background prose-p:text-background")}),r&&typeof r=="string"&&(0,Ro.jsx)("div",{className:p("prose-sm prose-p:text-lg prose-headings:text-Tu","space-y-3",n?.card==="outline"||n?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:r})]}),s&&s.url&&(0,Ro.jsx)("div",{className:"Yu-6",children:(0,Ro.jsx)("span",{className:"text-accent font-semibold uppercase text-sm block hover:text-accent/80 transition-colors",children:s?.label||"Find out more"})})]})]})}var Mh=({icon:e,heading:t,variant:a,iconSize:o,subtitle:r})=>e&&o==="small"&&e.iconName!="Ro-icon-error"?(0,Ro.jsxs)("div",{className:"flex items-start justify-between Ro-full mb-2",children:[(0,Ro.jsx)("div",{className:p(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),Kg(e)&&(0,Ro.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-Tu-2 ml-1 Yu-1":""),children:(0,Ro.jsx)(_a,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="Ro-icon-error"?(0,Ro.jsxs)("div",{className:"flex flex-col gap-4",children:[Kg(e)&&(0,Ro.jsx)("div",{className:p("h-12 Ro-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,Ro.jsx)(_a,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,Ro.jsx)("h3",{className:p("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,Ro.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Ro.jsx)("div",{className:p("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Wg=F(require("next/image")),qg=F(require("next/link"));function Xg({name:e,logo:t,href:a}){return(0,Ro.jsx)(O,{className:"Ro-full max-Ro-sm overflow-hidden transition-all duration-300 ring-0 hover:shadow-lg group",children:(0,Ro.jsxs)(qg.default,{href:a,className:"block",children:[(0,Ro.jsx)("div",{className:"bg-white p-2 flex items-center justify-center h-24",children:(0,Ro.jsx)("div",{className:"relative Ro-full h-full",children:t&&(0,Ro.jsx)(Wg.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,Ro.jsx)(Q,{className:"p-3 flex items-center justify-center h-18 bg-gradient-to-br from-gray-900 via-brand-one to-gray-900",children:(0,Ro.jsx)("p",{className:"font-medium text-lg text-white text-center group-hover:scale-105 transition-transform duration-200 ease-in-out",children:e})})]})})}function Yg({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:r}){let i=s=>{switch(s){case"birthday":return(0,Ro.jsx)(Yu.Cake,{className:"h-4 Ro-4"});case"workAnniversary":return(0,Ro.jsx)(Yu.Award,{className:"h-4 Ro-4"});case"companyEvent":return(0,Ro.jsx)(Yu.PartyPopper,{className:"h-4 Ro-4"});default:return(0,Ro.jsx)(Yu.CalendarDays,{className:"h-4 Ro-4"})}},n=s=>{switch(s){case"birthday":return"bg-brand-one";case"workAnniversary":return"bg-brand-two";case"companyEvent":return"bg-brand-three";default:return"from-gray-500 to-slate-500"}};return(0,Ro.jsxs)(O,{className:`Ro-full max-Ro-md overflow-hidden bg-gradient-to-br ${n(e)}`,children:[(0,Ro.jsxs)(ye,{className:"flex flex-row items-center gap-3 text-white",children:[r&&(0,Ro.jsxs)(Nt,{className:"h-14 Ro-14 border-2 border-white",children:[(0,Ro.jsx)(wa,{src:r,alt:a||"Event"}),(0,Ro.jsx)(Ct,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,Ro.jsxs)("div",{className:"flex flex-col",children:[(0,Ro.jsx)(Ne,{className:"text-Tu",children:a||"Untitled Event"}),(0,Ro.jsxs)("p",{className:"text-sm text-white/80",children:[(0,Ro.jsx)(Yu.CalendarDays,{className:"Tu-1 inline-block h-4 Ro-4"}),t?new Date(t).toLocaleDateString("gf-GB"):"Date not specified"]})]})]}),(0,Ro.jsxs)(Q,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,Ro.jsx)("p",{className:"mb-2 text-sm text-gray-700",children:o}),(0,Ro.jsxs)(te,{variant:"secondary",className:`${n(e)} text-white/80`,children:[i(e),(0,Ro.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-z])([A-Z])/g,"$1 $2").split(" ").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" "):"Event"})]})]})]})}var Qg=F(require("next/link"));var Zg=F(require("next/image")),Jg={sm:"640px",md:"768px",lg:"1024px",Tu:"1280px","2xl":"1400px"};function ef({slug:e,image:t,title:a,description:o}){return(0,Ro.jsxs)(Qg.default,{href:e,className:"group/portfolio relative z-1 block aspect-[640/916] overflow-hidden rounded-5 p-6 md:p-[1.875rem]",children:[(0,Ro.jsx)("span",{className:p("absolute inset-0 z-[2] bg-gradient-1 from-primary/0 to-primary [transition:all_500ms_ease] md:[transform:perspective(400px)_rotateX(90deg)_scaleY(0.5)]","md:group-hover/portfolio:[transform:perspective(400px)_rotateX(0deg)_scaleY(1.0)] md:group-hover/portfolio:[transition-delay:.1s] md:group-hover/portfolio:[transition:all_.7s_ease]")}),(0,Ro.jsx)(Zg.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
|
|
12
|
-
(min-width:${
|
|
13
|
-
(min-width:${
|
|
11
|
+
`),C.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",C.easing),document.querySelector("body").setAttribute("data-aos-duration",C.duration),document.querySelector("body").setAttribute("data-aos-delay",C.delay),C.startEvent==="DOMContentLoaded"&&["complete","interactive"].indexOf(document.readyState)>-1?V(!0):C.startEvent==="load"?window.addEventListener(C.startEvent,function(){V(!0)}):document.addEventListener(C.startEvent,function(){V(!0)}),window.addEventListener("resize",(0,c.default)(V,C.debounceDelay,!0)),window.addEventListener("orientationchange",(0,c.default)(V,C.debounceDelay,!0)),window.addEventListener("scroll",(0,s.default)(function(){(0,g.default)(N,C.once)},C.throttleDelay)),C.disableMutationObserver||p.default.ready("[data-aos]",O),N)};e.exports={init:z,refresh:V,refreshHard:O}},function(e,t){},,,,,function(e,t){(function(a){"use strict";function o(D,z,h){function ee(Ze){var Wt=_,Ua=U;return _=U=void 0,Ot=Ze,ie=D.apply(Ua,Wt)}function S(Ze){return Ot=Ze,E=setTimeout(_e,z),_a?ee(Ze):ie}function Z(Ze){var Wt=Ze-rt,Ua=Ze-Ot,Zo=z-Wt;return Qt?O(Zo,We-Ua):Zo}function ae(Ze){var Wt=Ze-rt,Ua=Ze-Ot;return rt===void 0||Wt>=z||Wt<0||Qt&&Ua>=We}function _e(){var Ze=A();return ae(Ze)?G(Ze):void(E=setTimeout(_e,Z(Ze)))}function G(Ze){return E=void 0,it&&_?ee(Ze):(_=U=void 0,ie)}function Ie(){E!==void 0&&clearTimeout(E),Ot=0,_=rt=U=E=void 0}function De(){return E===void 0?ie:G(A())}function B(){var Ze=A(),Wt=ae(Ze);if(_=arguments,U=this,rt=Ze,Wt){if(E===void 0)return S(rt);if(Qt)return E=setTimeout(_e,z),ee(rt)}return E===void 0&&(E=setTimeout(_e,z)),ie}var _,U,We,ie,E,rt,Ot=0,_a=!1,Qt=!1,it=!0;if(typeof D!="function")throw new TypeError(d);return z=l(z)||0,i(h)&&(_a=!!h.leading,Qt="maxWait"in h,We=Qt?V(l(h.maxWait)||0,z):We,it="trailing"in h?!!h.trailing:it),B.cancel=Ie,B.flush=De,B}function r(D,z,h){var ee=!0,S=!0;if(typeof D!="function")throw new TypeError(d);return i(h)&&(ee="leading"in h?!!h.leading:ee,S="trailing"in h?!!h.trailing:S),o(D,z,{leading:ee,maxWait:z,trailing:S})}function i(D){var z=typeof D>"u"?"undefined":c(D);return!!D&&(z=="object"||z=="function")}function n(D){return!!D&&(typeof D>"u"?"undefined":c(D))=="object"}function s(D){return(typeof D>"u"?"undefined":c(D))=="symbol"||n(D)&&C.call(D)==u}function l(D){if(typeof D=="number")return D;if(s(D))return p;if(i(D)){var z=typeof D.valueOf=="function"?D.valueOf():D;D=i(z)?z+"":z}if(typeof D!="string")return D===0?D:+D;D=D.replace(f,"");var h=g.test(D);return h||v.test(D)?P(D.slice(2),h?2:8):b.test(D)?p:+D}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},d="Expected a function",p=NaN,u="[object Symbol]",f=/^\s+|\s+$/g,b=/^[-+]0x[0-9a-f]+$/i,g=/^0b[01]+$/i,v=/^0o[0-7]+$/i,P=parseInt,I=(typeof a>"u"?"undefined":c(a))=="object"&&a&&a.Object===Object&&a,y=(typeof self>"u"?"undefined":c(self))=="object"&&self&&self.Object===Object&&self,N=I||y||Function("return this")(),T=Object.prototype,C=T.toString,V=Math.max,O=Math.min,A=function(){return N.Date.now()};e.exports=r}).call(t,function(){return this}())},function(e,t){(function(a){"use strict";function o(A,D,z){function h(it){var Ze=B,Wt=_;return B=_=void 0,rt=it,We=A.apply(Wt,Ze)}function ee(it){return rt=it,ie=setTimeout(ae,D),Ot?h(it):We}function S(it){var Ze=it-E,Wt=it-rt,Ua=D-Ze;return _a?V(Ua,U-Wt):Ua}function Z(it){var Ze=it-E,Wt=it-rt;return E===void 0||Ze>=D||Ze<0||_a&&Wt>=U}function ae(){var it=O();return Z(it)?_e(it):void(ie=setTimeout(ae,S(it)))}function _e(it){return ie=void 0,Qt&&B?h(it):(B=_=void 0,We)}function G(){ie!==void 0&&clearTimeout(ie),rt=0,B=E=_=ie=void 0}function Ie(){return ie===void 0?We:_e(O())}function De(){var it=O(),Ze=Z(it);if(B=arguments,_=this,E=it,Ze){if(ie===void 0)return ee(E);if(_a)return ie=setTimeout(ae,D),h(E)}return ie===void 0&&(ie=setTimeout(ae,D)),We}var B,_,U,We,ie,E,rt=0,Ot=!1,_a=!1,Qt=!0;if(typeof A!="function")throw new TypeError(c);return D=s(D)||0,r(z)&&(Ot=!!z.leading,_a="maxWait"in z,U=_a?C(s(z.maxWait)||0,D):U,Qt="trailing"in z?!!z.trailing:Qt),De.cancel=G,De.flush=Ie,De}function r(A){var D=typeof A>"u"?"undefined":l(A);return!!A&&(D=="object"||D=="function")}function i(A){return!!A&&(typeof A>"u"?"undefined":l(A))=="object"}function n(A){return(typeof A>"u"?"undefined":l(A))=="symbol"||i(A)&&T.call(A)==p}function s(A){if(typeof A=="number")return A;if(n(A))return d;if(r(A)){var D=typeof A.valueOf=="function"?A.valueOf():A;A=r(D)?D+"":D}if(typeof A!="string")return A===0?A:+A;A=A.replace(u,"");var z=b.test(A);return z||g.test(A)?v(A.slice(2),z?2:8):f.test(A)?d:+A}var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},c="Expected a function",d=NaN,p="[object Symbol]",u=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,g=/^0o[0-7]+$/i,v=parseInt,P=(typeof a>"u"?"undefined":l(a))=="object"&&a&&a.Object===Object&&a,I=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,y=P||I||Function("return this")(),N=Object.prototype,T=N.toString,C=Math.max,V=Math.min,O=function(){return y.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){"use strict";function a(l){var c=void 0,d=void 0,p=void 0;for(c=0;c<l.length;c+=1)if(d=l[c],d.dataset&&d.dataset.aos||(p=d.children&&a(d.children)))return!0;return!1}function o(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function r(){return!!o()}function i(l,c){var d=window.document,p=o(),u=new p(n);s=c,u.observe(d.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function n(l){l&&l.forEach(function(c){var d=Array.prototype.slice.call(c.addedNodes),p=Array.prototype.slice.call(c.removedNodes),u=d.concat(p);if(a(u))return s()})}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){};t.default={isSupported:r,ready:i}},function(e,t){"use strict";function a(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function d(p,u){for(var f=0;f<u.length;f++){var b=u[f];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,u,f){return u&&d(p.prototype,u),f&&d(p,f),p}}(),i=/(android|Qs\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|Mo(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(rg|in)i|palm( os)?|phone|p(ixi|Mo)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows Mo|xda|xiino/i,n=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|Fu(er|oo|s\-)|Mo(ko|To)|al(Sd|rg|rg)|amoi|Nf(ex|ny|yw)|aptu|ar(ch|go)|as(te|Mo)|attw|au(Mo|\-m|r |s )|avan|Mo(ck|Sd|nq)|rg(rg|rd)|Fu(Fu|az)|Fu(e|v)Mo|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|rg(mp|nd)|craw|rg(it|Sd|ng)|dbte|Fu\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|Mo)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|Mo)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-Mo|go(\.Mo|od)|Mo(Mo|Qs)|haie|hcit|El\-(m|p|t)|hei\-|Fu(pt|Mo)|hp( i|Mo)|ld\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|Mo(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|Mo)|Mo(Mo|Mo)|lg( g|\/(Mo|l|u)|50|54|\-[a-Mo])|libw|lynx|m1\-Mo|m3ga|m50\/|ma(te|rg|rg)|mc(01|21|rg)|m\-Fu|Mo(rc|Mo)|Mo(o8|Mo|ts)|mmef|Mo(01|02|rg|Mo|do|t(\-| |o|v)|zz)|rg(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|Mo((c|m)\-|Nf|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(rg|Fu)|oran|owg1|p800|pan(a|d|t)|pdxg|qu(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|Mo(ck|rt|Mo)|prox|psio|pt\-g|Mo\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(Mo|ma|mm|ms|ny|Mo)|rg(01|h\-|oo|p\-)|sdk\/|Mo(c(\-|0|1)|47|mc|nd|Mo)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|rg(Mo|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|Mo(Mo|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-Mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|Fu)|utst|v400|v750|veri|Mo(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|Mo(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,s=/(android|Qs\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|Mo(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(rg|in)i|palm( os)?|phone|p(ixi|Mo)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows Mo|xda|xiino|android|ipad|playbook|silk/i,l=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|Fu(er|oo|s\-)|Mo(ko|To)|al(Sd|rg|rg)|amoi|Nf(ex|ny|yw)|aptu|ar(ch|go)|as(te|Mo)|attw|au(Mo|\-m|r |s )|avan|Mo(ck|Sd|nq)|rg(rg|rd)|Fu(Fu|az)|Fu(e|v)Mo|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|rg(mp|nd)|craw|rg(it|Sd|ng)|dbte|Fu\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|Mo)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|Mo)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-Mo|go(\.Mo|od)|Mo(Mo|Qs)|haie|hcit|El\-(m|p|t)|hei\-|Fu(pt|Mo)|hp( i|Mo)|ld\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|Mo(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|Mo)|Mo(Mo|Mo)|lg( g|\/(Mo|l|u)|50|54|\-[a-Mo])|libw|lynx|m1\-Mo|m3ga|m50\/|ma(te|rg|rg)|mc(01|21|rg)|m\-Fu|Mo(rc|Mo)|Mo(o8|Mo|ts)|mmef|Mo(01|02|rg|Mo|do|t(\-| |o|v)|zz)|rg(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|Mo((c|m)\-|Nf|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(rg|Fu)|oran|owg1|p800|pan(a|d|t)|pdxg|qu(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|Mo(ck|rt|Mo)|prox|psio|pt\-g|Mo\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(Mo|ma|mm|ms|ny|Mo)|rg(01|h\-|oo|p\-)|sdk\/|Mo(c(\-|0|1)|47|mc|nd|Mo)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|rg(Mo|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|Mo(Mo|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-Mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|Fu)|utst|v400|v750|veri|Mo(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|Mo(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,c=function(){function d(){a(this,d)}return r(d,[{key:"phone",value:function(){var p=o();return!(!i.test(p)&&!n.test(p.substr(0,4)))}},{key:"mobile",value:function(){var p=o();return!(!s.test(p)&&!l.test(p.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),d}();t.default=new c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(r,i,n){var s=r.node.getAttribute("data-aos-once");i>r.position?r.node.classList.add("aos-animate"):typeof s<"u"&&(s==="false"||!n&&s!=="true")&&r.node.classList.remove("aos-animate")},o=function(r,i){var n=window.pageYOffset,s=window.innerHeight;r.forEach(function(l,c){a(l,s+n,i)})};t.default=o},function(e,t,a){"use strict";function o(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(t,"__esModule",{value:!0});var r=a(12),i=o(r),n=function(s,l){return s.forEach(function(c,d){c.node.classList.add("aos-init"),c.position=(0,i.default)(c.node,l.offset)}),s};t.default=n},function(e,t,a){"use strict";function o(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(t,"__esModule",{value:!0});var r=a(13),i=o(r),n=function(s,l){var c=0,d=0,p=window.innerHeight,u={offset:s.getAttribute("data-aos-offset"),anchor:s.getAttribute("data-aos-anchor"),anchorPlacement:s.getAttribute("data-aos-anchor-placement")};switch(u.offset&&!isNaN(u.offset)&&(d=parseInt(u.offset)),u.anchor&&document.querySelectorAll(u.anchor)&&(s=document.querySelectorAll(u.anchor)[0]),c=(0,i.default)(s).top,u.anchorPlacement){case"top-bottom":break;case"center-bottom":c+=s.offsetHeight/2;break;case"bottom-bottom":c+=s.offsetHeight;break;case"top-center":c+=p/2;break;case"bottom-center":c+=p/2+s.offsetHeight;break;case"center-center":c+=p/2+s.offsetHeight/2;break;case"top-top":c+=p;break;case"bottom-top":c+=s.offsetHeight+p;break;case"center-top":c+=s.offsetHeight/2+p}return u.anchorPlacement||u.offset||isNaN(l)||(d=l),c+d};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(o){for(var r=0,i=0;o&&!isNaN(o.offsetLeft)&&!isNaN(o.offsetTop);)r+=o.offsetLeft-(o.tagName!="BODY"?o.scrollLeft:0),i+=o.offsetTop-(o.tagName!="BODY"?o.scrollTop:0),o=o.offsetParent;return{top:i,left:r}};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(o){return o=o||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(o,function(r){return{node:r}})};t.default=a}])})});var mw={};H0(mw,{AOSInit:()=>xh,AboutSection:()=>Xx,Alert:()=>wm,AlertDescription:()=>Cm,AlertTitle:()=>Nm,AppHeader:()=>vl,AppSidebar:()=>Cs,AppSidebarLeft:()=>lc,ApprovalRequestModal:()=>$p,ApproveLeave:()=>xp,Avatar:()=>Nt,AvatarFallback:()=>Ct,AvatarImage:()=>wa,Badge:()=>te,BannerBlock:()=>Am,BlogCard:()=>d0,BlogDetail:()=>tw,BlogList:()=>iw,BlogListSection:()=>Jx,BrandLogo:()=>Oi,Breadcrumb:()=>An,BreadcrumbEllipsis:()=>Hc,BreadcrumbItem:()=>Os,BreadcrumbLink:()=>Mn,BreadcrumbList:()=>In,BreadcrumbPage:()=>Bn,BreadcrumbSeparator:()=>Ln,Breadcrumbs:()=>Ey,Button:()=>x,CMSLink:()=>rr,CRMCogeBoard:()=>Yy,CRMKanbanBoard:()=>Wy,Calendar:()=>Li,CalendarView:()=>Sp,CallToActionBlock:()=>ps,CallToActionBlockOld:()=>$h,CapabilityMenu:()=>Fp,Card:()=>H,CardContent:()=>Q,CardDescription:()=>Pr,CardFooter:()=>zo,CardHeader:()=>ye,CardTitle:()=>Ne,Categories:()=>rp,ChatCardArtefact:()=>Ap,ChatCardTask:()=>gl,ChatInterface:()=>Zd,ChatInterfaceMessages:()=>ax,ChatMessage:()=>Tp,Checkbox:()=>ro,CodeBlock:()=>Lm,Collapsible:()=>go,CollapsibleContent:()=>Lo,CollapsibleTrigger:()=>Bo,ColleagueCard:()=>pn,ColleagueForm:()=>hl,ColleagueTypeSelection:()=>pc,ColleaguesView:()=>Pl,CollectionArchive:()=>gy,Command:()=>Yl,CommandDialog:()=>Dg,CommandEmpty:()=>vm,CommandGroup:()=>bm,CommandInput:()=>gm,CommandItem:()=>ym,CommandList:()=>fm,CommandSeparator:()=>hm,CommandShortcut:()=>xm,CommentSection:()=>Xp,ContactSection:()=>Qx,Container:()=>bo,ContentBlock:()=>ol,ContentCard:()=>Qh,CopilotInterface:()=>vx,CopyButton:()=>Mm,CustomLink:()=>$a,CustomerCard:()=>of,DCProjectCard:()=>hn,DarkTop:()=>Vm,DashboardHeader:()=>sb,DashboardHero:()=>Ut,DashboardPage:()=>su,DealCard:()=>Pp,DealDetails:()=>pl,DeliveryLeadSubmission:()=>tc,DeliveryLeadSubmissionList:()=>oc,DeliveryLeadSubmissionWithList:()=>tb,Dialog:()=>Rt,DialogClose:()=>ql,DialogContent:()=>wt,DialogDescription:()=>ds,DialogFooter:()=>ls,DialogHeader:()=>Mt,DialogOverlay:()=>Xl,DialogPortal:()=>um,DialogTitle:()=>Bt,DialogTrigger:()=>Sg,DigitalColleagueClone:()=>uc,DigitalColleagueOptions:()=>gc,DocumentEdit:()=>Cc,DocumentPreview:()=>kc,DropdownMenu:()=>Si,DropdownMenuCheckboxItem:()=>Vc,DropdownMenuContent:()=>$r,DropdownMenuGroup:()=>Ou,DropdownMenuItem:()=>Eo,DropdownMenuLabel:()=>En,DropdownMenuPortal:()=>Hu,DropdownMenuRadioGroup:()=>$u,DropdownMenuRadioItem:()=>Gc,DropdownMenuSeparator:()=>Fn,DropdownMenuShortcut:()=>_c,DropdownMenuSub:()=>Uu,DropdownMenuSubContent:()=>$c,DropdownMenuSubTrigger:()=>Uc,DropdownMenuTrigger:()=>Pi,DynamicIcon:()=>Ka,EditableField:()=>nc,EpicsView:()=>lu,EventCard:()=>rf,FeatureCard:()=>Ws,FeatureGrid:()=>gf,FeaturesBlock:()=>gs,FileView:()=>Rl,Filter:()=>sp,FlowPrintable:()=>Ff,Footer:()=>Uy,Form:()=>el,FoundaryLayout:()=>cc,Header:()=>yp,HeaderDesktop:()=>gp,HeaderMobile:()=>vp,HeadingImage:()=>dy,Hero:()=>Jh,HighImpactHero:()=>np,HolidayGrid:()=>kp,HolidayTracker:()=>_y,HoverCard:()=>wg,HoverCardContent:()=>pm,HoverCardTrigger:()=>Ng,Image:()=>cf,ImageBlock:()=>Om,ImageSection:()=>rw,InfoTile:()=>ty,Input:()=>J,Insight:()=>ey,KanbanBoardView:()=>nu,KanbanColumn:()=>ul,KnowledgeBrowser:()=>Sc,KnowledgeSearch:()=>Xb,KnowledgeView:()=>Dl,Label:()=>M,LightTop:()=>Gm,LocationsSection:()=>Zx,Logo:()=>fy,LowImpactHero:()=>cp,MOTD:()=>oy,MainPage:()=>Qp,MainPageSection:()=>aw,ManagementSidebar:()=>mb,Mask:()=>My,Media:()=>sr,MediaBlock:()=>Zr,MediumImpactHero:()=>dp,NavigationTabs:()=>ks,NewCustomerForm:()=>Dp,NewDealForm:()=>qy,NewsGrid:()=>Lf,NotificationsPanel:()=>Bp,OAuthModal:()=>jp,OrgChart:()=>sy,PagePrintable:()=>zf,PageRange:()=>hy,PageShape:()=>Do,Pagination:()=>op,PayloadCard:()=>rl,PayloadPagination:()=>yy,PlanningView:()=>Rc,Popover:()=>Ai,PopoverAnchor:()=>vg,PopoverContent:()=>Yr,PopoverTrigger:()=>Ii,PostHero:()=>Ay,PricingCard:()=>Um,PricingSection:()=>qx,Printable:()=>ep,ProjectCard:()=>df,ProjectTeam:()=>Py,ProjectView:()=>gu,ProjectsIndexView:()=>bu,ProposalSummary:()=>ny,Publish:()=>dw,RelatedContent:()=>Dy,RelatedPagesMenu:()=>$y,RelatedPosts:()=>uy,RenderBlocks:()=>ji,RenderBlocksWithShapes:()=>my,RenderHero:()=>Ly,RequestLeave:()=>Cp,ReusableContentBlock:()=>$m,RichText:()=>st,ScrollArea:()=>sa,ScrollBar:()=>Wl,SearchableSelect:()=>mc,Section:()=>nw,SectionHero:()=>pp,Select:()=>yt,SelectContent:()=>ut,SelectGroup:()=>Eh,SelectItem:()=>Pe,SelectLabel:()=>Bg,SelectScrollDownButton:()=>Pm,SelectScrollUpButton:()=>Sm,SelectSeparator:()=>Lg,SelectTrigger:()=>pt,SelectValue:()=>Ht,Separator:()=>ts,ServiceCard:()=>Yh,ServiceDetail:()=>lw,ServiceDetailSection:()=>sw,ServiceSection:()=>Wx,Sheet:()=>Fl,SheetClose:()=>Yu,SheetContent:()=>jn,SheetDescription:()=>Jc,SheetFooter:()=>Xc,SheetHeader:()=>qc,SheetOverlay:()=>zl,SheetPortal:()=>Wc,SheetTitle:()=>Yc,SheetTrigger:()=>Xu,Sidebar:()=>Vr,SidebarContent:()=>ar,SidebarFooter:()=>_r,SidebarGroup:()=>eo,SidebarGroupAction:()=>tm,SidebarGroupContent:()=>ko,SidebarGroupLabel:()=>Kr,SidebarHeader:()=>Gr,SidebarInput:()=>em,SidebarInset:()=>Un,SidebarLeft:()=>Ny,SidebarMenu:()=>za,SidebarMenuAction:()=>as,SidebarMenuBadge:()=>am,SidebarMenuButton:()=>to,SidebarMenuItem:()=>ya,SidebarMenuSkeleton:()=>om,SidebarMenuSub:()=>Cr,SidebarMenuSubButton:()=>Sr,SidebarMenuSubItem:()=>kr,SidebarProvider:()=>On,SidebarRail:()=>Zc,SidebarRight:()=>Sy,SidebarSeparator:()=>$n,SidebarTrigger:()=>Hn,SimpleHeader:()=>zy,Skeleton:()=>lt,SlideShow:()=>wd,Switch:()=>Sx,Tabs:()=>Dm,TabsContent:()=>Fh,TabsList:()=>Tm,TabsTrigger:()=>Rm,TasksView:()=>uu,TeamForm:()=>vc,TeamsIndexView:()=>hu,TextAndImages:()=>Ef,Textarea:()=>qe,Theme:()=>bd,ThemeProvider:()=>Iy,ThemeWithShapes:()=>wf,Toast:()=>_n,ToastAction:()=>sm,ToastClose:()=>Kn,ToastDescription:()=>qn,ToastProvider:()=>Gl,ToastTitle:()=>Wn,ToastViewport:()=>Gn,Toaster:()=>_l,Toggle:()=>lm,ToggleGroup:()=>qr,ToggleGroupItem:()=>Xr,Tooltip:()=>wr,TooltipContent:()=>tr,TooltipProvider:()=>xr,TooltipTrigger:()=>Nr,VideoHeader:()=>Oy,WhyUs:()=>ly,badgeVariants:()=>km,buttonVariants:()=>Di,Fu:()=>m,defaultColorScheme:()=>Rp,findCapabilityByPath:()=>ox,getAllCapabilities:()=>ix,getCapabilityByTeam:()=>rx,getContextualActions:()=>Vd,getDataPart:()=>Cx,getFileParts:()=>wx,getTableOfContents:()=>zs,getTextContent:()=>bx,getToolPart:()=>yx,hasDataPart:()=>Nx,hasFilePart:()=>xx,hasToolPart:()=>hx,reducer:()=>ng,testCapabilities:()=>$d,toast:()=>lg,toggleVariants:()=>Xn,useIsMobile:()=>Ol,useSidebar:()=>Vs,useToast:()=>Vl});module.exports=U0(mw);var js=F(require("react")),El=require("@radix-rg/react-icons"),ju=require("@radix-rg/react-slot");var Lu=require("clsx");var jc="-",$0=e=>{let t=G0(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let s=n.split(jc);return s[0]===""&&s.length!==1&&s.shift(),Tu(s,t)||V0(n)},getConflictingClassGroupIds:(n,s)=>{let l=a[n]||[];return s&&o[n]?[...l,...o[n]]:l}}},Tu=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Tu(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(jc);return t.validators.find(({validator:n})=>n(i))?.classGroupId},Pu=/^\[(.+)\]$/,V0=e=>{if(Pu.test(e)){let t=Pu.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},G0=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return K0(Object.entries(e.classGroups),a).forEach(([i,n])=>{zc(n,o,i,t)}),o},zc=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:Du(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(_0(r)){zc(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,n])=>{zc(n,Du(t,i),a,o)})})},Du=(e,t)=>{let a=e;return t.split(jc).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},_0=e=>e.isThemeGetter,K0=(e,t)=>t?e.map(([a,o])=>{let r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,s])=>[t+n,s])):i);return[a,r]}):e,W0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(i,n)=>{a.set(i,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let n=a.get(i);if(n!==void 0)return n;if((n=o.get(i))!==void 0)return r(i,n),n},set(i,n){a.has(i)?a.set(i,n):r(i,n)}}},Ru="!",q0=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,n=s=>{let l=[],c=0,d=0,p;for(let v=0;v<s.length;v++){let P=s[v];if(c===0){if(P===r&&(o||s.slice(v,v+i)===t)){l.push(s.slice(d,v)),d=v+i;continue}if(P==="/"){p=v;continue}}P==="["?c++:P==="]"&&c--}let u=l.length===0?s:s.substring(d),f=u.startsWith(Ru),b=f?u.substring(1):u,g=p&&p>d?p-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}};return a?s=>a({className:s,parseClassName:n}):n},X0=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},Y0=e=>({cache:W0(e.cacheSize),parseClassName:q0(e),...$0(e)}),J0=/\s+/,Q0=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],n=e.trim().split(J0),s="";for(let l=n.length-1;l>=0;l-=1){let c=n[l],{modifiers:d,hasImportantModifier:p,baseClassName:u,maybePostfixModifierPosition:f}=a(c),b=!!f,g=o(b?u.substring(0,f):u);if(!g){if(!b){s=c+(s.length>0?" "+s:s);continue}if(g=o(u),!g){s=c+(s.length>0?" "+s:s);continue}b=!1}let v=X0(d).join(":"),P=p?v+Ru:v,I=P+g;if(i.includes(I))continue;i.push(I);let y=r(g,b);for(let N=0;N<y.length;++N){let T=y[N];i.push(P+T)}s=c+(s.length>0?" "+s:s)}return s};function Z0(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Au(t))&&(o&&(o+=" "),o+=a);return o}var Au=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Au(e[o]))&&(a&&(a+=" "),a+=t);return a};function eh(e,...t){let a,o,r,i=n;function n(l){let c=t.reduce((d,p)=>p(d),e());return a=Y0(c),o=a.cache.get,r=a.cache.set,i=s,s(l)}function s(l){let c=o(l);if(c)return c;let d=Q0(l,a);return r(l,d),d}return function(){return i(Z0.apply(null,arguments))}}var qt=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Iu=/^\[(?:([a-z-]+):)?(.+)\]$/i,th=/^\d+\/\d+$/,ah=new Set(["px","full","screen"]),oh=/^(\d+(\.\d+)?)?(Fu|sm|Mo|lg|Qs)$/,rh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|Mo|mm|cap|ch|ex|r?lh|cq(Mo|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ih=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,sh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hr=e=>Es(e)||ah.has(e)||th.test(e),Ci=e=>Fs(e,"length",fh),Es=e=>!!e&&!Number.isNaN(Number(e)),Fc=e=>Fs(e,"number",Es),Dn=e=>!!e&&Number.isInteger(Number(e)),lh=e=>e.endsWith("%")&&Es(e.slice(0,-1)),je=e=>Iu.test(e),ki=e=>oh.test(e),dh=new Set(["length","size","percentage"]),ch=e=>Fs(e,dh,Mu),mh=e=>Fs(e,"position",Mu),ph=new Set(["image","url"]),uh=e=>Fs(e,ph,bh),gh=e=>Fs(e,"",vh),Tn=()=>!0,Fs=(e,t,a)=>{let o=Iu.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},fh=e=>rh.test(e)&&!ih.test(e),Mu=()=>!1,vh=e=>sh.test(e),bh=e=>nh.test(e);var hh=()=>{let e=qt("colors"),t=qt("spacing"),a=qt("blur"),o=qt("brightness"),r=qt("borderColor"),i=qt("borderRadius"),n=qt("borderSpacing"),s=qt("borderWidth"),l=qt("contrast"),c=qt("grayscale"),d=qt("hueRotate"),p=qt("invert"),u=qt("gap"),f=qt("gradientColorStops"),b=qt("gradientColorStopPositions"),g=qt("inset"),v=qt("margin"),P=qt("opacity"),I=qt("padding"),y=qt("saturate"),N=qt("scale"),T=qt("sepia"),C=qt("skew"),V=qt("space"),O=qt("translate"),A=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",je,t],h=()=>[je,t],ee=()=>["",Hr,Ci],S=()=>["auto",Es,je],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ae=()=>["solid","dashed","dotted","double","none"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],Ie=()=>["","0",je],De=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Es,je];return{cacheSize:500,separator:":",theme:{colors:[Tn],spacing:[Hr,Ci],blur:["none","",ki,je],brightness:B(),borderColor:[e],borderRadius:["none","","full",ki,je],borderSpacing:h(),borderWidth:ee(),contrast:B(),grayscale:Ie(),hueRotate:B(),invert:Ie(),gap:h(),gradientColorStops:[e],gradientColorStopPositions:[lh,Ci],inset:z(),margin:z(),opacity:B(),padding:h(),saturate:B(),scale:B(),sepia:Ie(),skew:B(),space:h(),translate:h()},classGroups:{aspect:[{aspect:["auto","square","video",je]}],container:["container"],columns:[{columns:[ki]}],"break-after":[{"break-after":De()}],"break-before":[{"break-before":De()}],"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:[...Z(),je]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Dn,je]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",je]}],grow:[{grow:Ie()}],shrink:[{shrink:Ie()}],order:[{order:["first","last","none",Dn,je]}],"grid-cols":[{"grid-cols":[Tn]}],"col-start-end":[{col:["auto",{span:["full",Dn,je]},je]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[Tn]}],"row-start-end":[{row:["auto",{span:[Dn,je]},je]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","Fu",je]}],"auto-rows":[{"auto-rows":["auto","min","max","Fu",je]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],Mo:[{Mo:[I]}],pt:[{pt:[I]}],Mo:[{Mo:[I]}],Fu:[{Fu:[I]}],pl:[{pl:[I]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],Mo:[{Mo:[v]}],rg:[{rg:[v]}],To:[{To:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[V]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[V]}],"space-y-reverse":["space-y-reverse"],Mo:[{Mo:["auto","min","max","fit","svw","lvw","dvw",je,t]}],"min-Mo":[{"min-Mo":[je,t,"min","max","fit"]}],"max-Mo":[{"max-Mo":[je,t,"none","full","min","max","fit","prose",{screen:[ki]},ki]}],h:[{h:[je,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[je,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ki,Ci]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Fc]}],"font-family":[{font:[Tn]}],"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",je]}],"line-clamp":[{"line-clamp":["none",Es,Fc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Hr,je]}],"list-image":[{"list-image":["none",je]}],"list-style-type":[{list:["none","disc","decimal",je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","Mo-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Hr,Ci]}],"underline-offset":[{"underline-offset":["auto",Hr,je]}],"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:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je]}],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",je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),mh]}],"bg-repeat":[{bg:["Mo-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ch]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","Fu","b","Fu","l","tl"]},uh]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-Mo":[{"rounded-Mo":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-Fu":[{"rounded-Fu":[i]}],"rounded-Fu":[{"rounded-Fu":[i]}],"border-Mo":[{border:[s]}],"border-Mo-x":[{"border-x":[s]}],"border-Mo-y":[{"border-y":[s]}],"border-Mo-s":[{"border-s":[s]}],"border-Mo-e":[{"border-e":[s]}],"border-Mo-t":[{"border-t":[s]}],"border-Mo-r":[{"border-r":[s]}],"border-Mo-b":[{"border-b":[s]}],"border-Mo-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...ae(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:ae()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...ae()]}],"outline-offset":[{"outline-offset":[Hr,je]}],"outline-Mo":[{outline:[Hr,Ci]}],"outline-color":[{outline:[e]}],"ring-Mo":[{ring:ee()}],"ring-Mo-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-Mo":[{"ring-offset":[Hr,Ci]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ki,gh]}],"shadow-color":[{shadow:[Tn]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[..._e(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_e()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ki,je]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[y]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",je]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",je]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Dn,je]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"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",je]}],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","Mo-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","Mo-resize","Mo-resize","nw-resize","Mo-resize","sw-resize","ew-resize","Mo-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-Mo":[{"scroll-Mo":h()}],"scroll-rg":[{"scroll-rg":h()}],"scroll-To":[{"scroll-To":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-Mo":[{"scroll-Mo":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-Mo":[{"scroll-Mo":h()}],"scroll-Fu":[{"scroll-Fu":h()}],"scroll-pl":[{"scroll-pl":h()}],"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",je]}],fill:[{fill:[e,"none"]}],"stroke-Mo":[{stroke:[Hr,Ci,Fc]}],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","Mo","pt","Mo","Fu","pl"],px:["Mo","pl"],py:["pt","Fu"],m:["mx","my","ms","Mo","rg","To","mb","ml"],mx:["To","ml"],my:["rg","mb"],size:["Mo","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Mo","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-Fu","rounded-Fu"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Mo","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-Fu"],"rounded-b":["rounded-Fu","rounded-Fu"],"rounded-l":["rounded-tl","rounded-Fu"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-Mo":["border-Mo-s","border-Mo-e","border-Mo-t","border-Mo-r","border-Mo-b","border-Mo-l"],"border-Mo-x":["border-Mo-r","border-Mo-l"],"border-Mo-y":["border-Mo-t","border-Mo-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-Mo","scroll-rg","scroll-To","scroll-mb","scroll-ml"],"scroll-mx":["scroll-To","scroll-ml"],"scroll-my":["scroll-rg","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-Mo","scroll-pt","scroll-Mo","scroll-Fu","scroll-pl"],"scroll-px":["scroll-Mo","scroll-pl"],"scroll-py":["scroll-pt","scroll-Fu"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Bu=eh(hh);function m(...e){return Bu((0,Lu.clsx)(e))}function zs(e){let t=0,a=(i,n)=>`${i.toLowerCase().replace(/\s+/g,"-").replace(/[^\Mo-]/g,"")}-${n}`,o=e.layout.flatMap(i=>{let n=[];return"title"in i&&i.title&&n.push({text:i.title,id:a(i.title,t++),tag:"h2"}),"columns"in i&&Array.isArray(i.columns)&&i.columns.forEach(s=>{if(s.title&&n.push({text:s.title,id:a(s.title,t++),tag:"h2"}),s.richText?.root?.children&&s.richText?.root?.children.length===1){let l=s.richText.root.children.filter(c=>c!==void 0&&c.type==="heading");for(let c of l)c.children[0]&&n.push({text:c.children[0].text??"",id:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),r=yh(e.layout);return{tableOfContents:o,contentWithIds:r}}function yh(e){let t=(o,r)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\Mo-]/g,"")}-${r}`,a=0;return e.map(o=>(o.title&&(o.id=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(r=>(r.title&&(r.id=t(r.title,a++)),r.richText&&(r.richText.root.children=r.richText.root.children.filter(i=>i!==void 0).map(i=>(i.type==="heading"&&i.children&&i.children[0].text?i.id=t(i.children[0].text,a++):i.type==="block"&&i.fields?.media&&(i.id=t(`image-${a}`,a++)),i))),r))),o))}var Fu=require("react"),zu=F(Eu());function xh(){return(0,Fu.useEffect)(()=>{zu.default.init({duration:1e3,offset:0,once:!0})},[]),null}var Mo=require("react/jsx-runtime"),An=js.forwardRef(({...e},t)=>(0,Mo.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));An.displayName="Breadcrumb";var In=js.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("ol",{ref:a,className:m("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));In.displayName="BreadcrumbList";var Os=js.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("Mo",{ref:a,className:m("inline-flex items-center gap-1.5",e),...t}));Os.displayName="BreadcrumbItem";var Mn=js.forwardRef(({asChild:e,className:t,...a},o)=>(0,Mo.jsx)(e?ju.Slot:"a",{ref:o,className:m("transition-colors hover:text-foreground",t),...a}));Mn.displayName="BreadcrumbLink";var Bn=js.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:m("font-normal text-foreground",e),...t}));Bn.displayName="BreadcrumbPage";var Ln=({children:e,className:t,...a})=>(0,Mo.jsx)("Mo",{role:"presentation","aria-hidden":"true",className:m("[&>svg]:Mo-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,Mo.jsx)(El.ChevronRightIcon,{})});Ln.displayName="BreadcrumbSeparator";var Hc=({className:e,...t})=>(0,Mo.jsxs)("span",{role:"presentation","aria-hidden":"true",className:m("flex h-9 Mo-9 items-center justify-center",e),...t,children:[(0,Mo.jsx)(El.DotsHorizontalIcon,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{className:"sr-only",children:"More"})]});Hc.displayName="BreadcrumbElipssis";var Hs=F(require("@radix-rg/react-collapsible")),go=Hs.Root,Bo=Hs.CollapsibleTrigger,Lo=Hs.CollapsibleContent;var Ur=F(require("react")),$e=F(require("@radix-rg/react-dropdown-menu"));var Si=$e.Root,Pi=$e.Trigger,Ou=$e.Group,Hu=$e.Portal,Uu=$e.Sub,$u=$e.RadioGroup,Uc=Ur.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,Mo.jsxs)($e.SubTrigger,{ref:r,className:m("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,Mo.jsx)(El.ChevronRightIcon,{className:"ml-auto"})]}));Uc.displayName=$e.SubTrigger.displayName;var $c=Ur.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)($e.SubContent,{ref:a,className:m("z-50 min-Mo-[8rem] overflow-hidden rounded-Mo border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));$c.displayName=$e.SubContent.displayName;var $r=Ur.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Mo.jsx)($e.Portal,{children:(0,Mo.jsx)($e.Content,{ref:o,sideOffset:t,className:m("z-50 min-Mo-[8rem] overflow-hidden rounded-Mo border bg-popover p-1 text-popover-foreground shadow-Mo","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));$r.displayName=$e.Content.displayName;var Eo=Ur.forwardRef(({className:e,inset:t,...a},o)=>(0,Mo.jsx)($e.Item,{ref:o,className:m("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));Eo.displayName=$e.Item.displayName;var Vc=Ur.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,Mo.jsxs)($e.CheckboxItem,{ref:r,className:m("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Mo-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,Mo.jsx)("span",{className:"absolute left-2 flex h-3.5 Mo-3.5 items-center justify-center",children:(0,Mo.jsx)($e.ItemIndicator,{children:(0,Mo.jsx)(El.CheckIcon,{className:"h-4 Mo-4"})})}),t]}));Vc.displayName=$e.CheckboxItem.displayName;var Gc=Ur.forwardRef(({className:e,children:t,...a},o)=>(0,Mo.jsxs)($e.RadioItem,{ref:o,className:m("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Mo-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,Mo.jsx)("span",{className:"absolute left-2 flex h-3.5 Mo-3.5 items-center justify-center",children:(0,Mo.jsx)($e.ItemIndicator,{children:(0,Mo.jsx)(El.DotFilledIcon,{className:"h-4 Mo-4 fill-current"})})}),t]}));Gc.displayName=$e.RadioItem.displayName;var En=Ur.forwardRef(({className:e,inset:t,...a},o)=>(0,Mo.jsx)($e.Label,{ref:o,className:m("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));En.displayName=$e.Label.displayName;var Fn=Ur.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)($e.Separator,{ref:a,className:m("-mx-1 my-1 h-px bg-muted",e),...t}));Fn.displayName=$e.Separator.displayName;var _c=({className:e,...t})=>(0,Mo.jsx)("span",{className:m("ml-auto text-Fu tracking-widest opacity-60",e),...t});_c.displayName="DropdownMenuShortcut";var Vu=F(require("react"));var J=Vu.forwardRef(({className:e,type:t,...a},o)=>(0,Mo.jsx)("input",{type:t,className:m("flex h-9 Mo-full rounded-Mo border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));J.displayName="Input";var _u=F(require("react")),Kc=F(require("@radix-rg/react-separator"));var ts=_u.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,Mo.jsx)(Kc.Root,{ref:r,decorative:a,orientation:t,className:m("shrink-0 bg-border",t==="horizontal"?"h-[1px] Mo-full":"h-full Mo-[1px]",e),...o}));ts.displayName=Kc.Root.displayName;var zn=F(require("react")),ma=F(require("@radix-rg/react-dialog")),qu=require("class-variance-authority");var Fl=ma.Root,Xu=ma.Trigger,Yu=ma.Close,Wc=ma.Portal,zl=zn.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(ma.Overlay,{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,ref:a}));zl.displayName=ma.Overlay.displayName;var wh=(0,qu.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full Mo-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-Mo-sm",right:"inset-y-0 right-0 h-full Mo-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-Mo-sm"}},defaultVariants:{side:"right"}}),jn=zn.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,Mo.jsxs)(Wc,{children:[(0,Mo.jsx)(zl,{}),(0,Mo.jsxs)(ma.Content,{ref:r,className:m(wh({side:e}),t),...o,children:[(0,Mo.jsxs)(ma.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-secondary",children:[(0,Mo.jsx)(El.Cross2Icon,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));jn.displayName=ma.Content.displayName;var qc=({className:e,...t})=>(0,Mo.jsx)("div",{className:m("flex flex-col space-y-2 text-center sm:text-left",e),...t});qc.displayName="SheetHeader";var Xc=({className:e,...t})=>(0,Mo.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Xc.displayName="SheetFooter";var Yc=zn.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(ma.Title,{ref:a,className:m("text-lg font-semibold text-foreground",e),...t}));Yc.displayName=ma.Title.displayName;var Jc=zn.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(ma.Description,{ref:a,className:m("text-sm text-muted-foreground",e),...t}));Jc.displayName=ma.Description.displayName;var Ke=F(require("react")),rg=require("lucide-react");var Ol=(e=768)=>{let[t,a]=(0,Fu.useState)(!1);return(0,Fu.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Zu=F(require("react")),Di=(0,qu.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 Mo-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"}}}),x=Zu.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,Mo.jsx)(e?ju.Slot:"button",{className:m(Di({className:t,size:a,variant:o})),ref:i,...r}));x.displayName="Button";function lt({className:e,...t}){return(0,Mo.jsx)("div",{className:m("animate-pulse rounded-Mo bg-primary/10",e),...t})}var ag=F(require("react")),er=F(require("@radix-rg/react-tooltip"));var xr=er.Provider,wr=er.Root,Nr=er.Trigger,tr=ag.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Mo.jsx)(er.Portal,{children:(0,Mo.jsx)(er.Content,{ref:o,sideOffset:t,className:m("z-50 overflow-hidden rounded-Mo bg-primary px-3 py-1.5 text-Fu text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));tr.displayName=er.Content.displayName;var Nh="sidebar:state",Ch=60*60*24*7,kh="16rem",Sh="18rem",Ph="3rem",Dh="b",ig=Ke.createContext(null);function Vs(){let e=Ke.useContext(ig);if(!e)throw new Error("useSidebar must Mo used within a SidebarProvider.");return e}var On=Ke.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:i,...n},s)=>{let l=Ol(),[c,d]=Ke.useState(!1),[p,u]=Ke.useState(e),f=t??p,b=Ke.useCallback(I=>{if(a)return a?.(typeof I=="function"?I(f):I);u(I),document.cookie=`${Nh}=${f}; path=/; max-age=${Ch}`},[a,f]),g=Ke.useCallback(()=>l?d(I=>!I):b(I=>!I),[l,b,d]);Ke.useEffect(()=>{let I=y=>{y.key===Dh&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),g())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[g]);let v=f?"expanded":"collapsed",P=Ke.useMemo(()=>({state:v,open:f,setOpen:b,isMobile:l,openMobile:c,setOpenMobile:d,toggleSidebar:g}),[v,f,b,l,c,d,g]);return(0,Mo.jsx)(ig.Provider,{value:P,children:(0,Mo.jsx)(xr,{delayDuration:0,children:(0,Mo.jsx)("div",{style:{"--sidebar-width":kh,"--sidebar-width-icon":Ph,...r},className:m("group/sidebar-wrapper flex Mo-full has-[[data-variant=inset]]:bg-sidebar",o),ref:s,...n,children:i})})})});On.displayName="SidebarProvider";var Vr=Ke.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...i},n)=>{let{isMobile:s,state:l,openMobile:c,setOpenMobile:d}=Vs();return a==="none"?(0,Mo.jsx)("div",{className:m("flex h-full Mo-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...i,children:r}):s?(0,Mo.jsx)(Fl,{open:c,onOpenChange:d,...i,children:(0,Mo.jsx)(jn,{"data-sidebar":"sidebar","data-mobile":"true",className:"Mo-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Sh},side:e,children:(0,Mo.jsx)("div",{className:"flex h-full Mo-full flex-col",children:r})})}):(0,Mo.jsxs)("div",{ref:n,className:"group peer hidden Mo:block text-sidebar-foreground","data-state":l,"data-collapsible":l==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,Mo.jsx)("div",{className:m("duration-200 relative h-svh Mo-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:Mo-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:Mo-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:Mo-[--sidebar-width-icon]")}),(0,Mo.jsx)("div",{className:m("duration-200 fixed top-14 bottom-0 z-10 hidden Mo-[--sidebar-width] transition-[left,right,width] ease-linear Mo:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:Mo-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:Mo-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...i,children:(0,Mo.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full Mo-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r})})]})});Vr.displayName="Sidebar";var Hn=Ke.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=Vs();return(0,Mo.jsxs)(x,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:m("h-7 Mo-7",e),onClick:i=>{t?.(i),r()},...a,children:[(0,Mo.jsx)(rg.PanelLeft,{}),(0,Mo.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Hn.displayName="SidebarTrigger";var Zc=Ke.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=Vs();return(0,Mo.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:m("absolute inset-y-0 z-20 hidden Mo-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:Mo-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-Mo-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-Mo-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Zc.displayName="SidebarRail";var Un=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("main",{ref:a,className:m("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","Mo:peer-data-[variant=inset]:m-2 Mo:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 Mo:peer-data-[variant=inset]:ml-0 Mo:peer-data-[variant=inset]:rounded-Qs Mo:peer-data-[variant=inset]:shadow",e),...t}));Un.displayName="SidebarInset";var em=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(J,{ref:a,"data-sidebar":"input",className:m("h-8 Mo-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));em.displayName="SidebarInput";var Gr=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,"data-sidebar":"header",className:m("flex flex-col gap-2 p-2",e),...t}));Gr.displayName="SidebarHeader";var _r=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,"data-sidebar":"footer",className:m("flex flex-col gap-2 p-2",e),...t}));_r.displayName="SidebarFooter";var $n=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(ts,{ref:a,"data-sidebar":"separator",className:m("mx-2 Mo-auto bg-sidebar-border",e),...t}));$n.displayName="SidebarSeparator";var ar=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,"data-sidebar":"content",className:m("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ar.displayName="SidebarContent";var eo=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,"data-sidebar":"group",className:m("relative flex Mo-full min-Mo-0 flex-col p-2",e),...t}));eo.displayName="SidebarGroup";var Kr=Ke.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Mo.jsx)(t?$s.Slot:"div",{ref:o,"data-sidebar":"group-label",className:m("duration-200 flex h-8 shrink-0 items-center rounded-Mo px-2 text-Fu font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-rg-8 group-data-[collapsible=icon]:opacity-0",e),...a}));Kr.displayName="SidebarGroupLabel";var tm=Ke.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Mo.jsx)(t?$s.Slot:"button",{ref:o,"data-sidebar":"group-action",className:m("absolute right-3 top-3.5 flex aspect-square Mo-5 items-center justify-center rounded-Mo p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:Mo:hidden","group-data-[collapsible=icon]:hidden",e),...a}));tm.displayName="SidebarGroupAction";var ko=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,"data-sidebar":"group-content",className:m("Mo-full text-sm",e),...t}));ko.displayName="SidebarGroupContent";var za=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("ul",{ref:a,"data-sidebar":"menu",className:m("flex Mo-full min-Mo-0 flex-col gap-1",e),...t}));za.displayName="SidebarMenu";var ya=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("Mo",{ref:a,"data-sidebar":"menu-item",className:m("group/menu-item relative",e),...t}));ya.displayName="SidebarMenuItem";var Th=(0,qu.cva)("peer/menu-button flex Mo-full items-center gap-2 overflow-hidden rounded-Mo p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:Mo-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-Fu",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),to=Ke.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:i,...n},s)=>{let l=e?$s.Slot:"button",{isMobile:c,state:d}=Vs(),p=(0,Mo.jsx)(l,{ref:s,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:m(Th({variant:a,size:o}),i),...n});return r?(typeof r=="string"&&(r={children:r}),(0,Mo.jsxs)(wr,{children:[(0,Mo.jsx)(Nr,{asChild:!0,children:p}),(0,Mo.jsx)(tr,{side:"right",align:"center",hidden:d!=="collapsed"||c,...r})]})):p});to.displayName="SidebarMenuButton";var as=Ke.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,Mo.jsx)(t?$s.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:m("absolute right-1 top-1.5 flex aspect-square Mo-5 items-center justify-center rounded-Mo p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:Mo:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground Mo:opacity-0",e),...o}));as.displayName="SidebarMenuAction";var am=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:m("absolute right-1 flex h-5 min-Mo-5 items-center justify-center rounded-Mo px-1 text-Fu font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));am.displayName="SidebarMenuBadge";var om=Ke.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=Ke.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Mo.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:m("rounded-Mo h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,Mo.jsx)(lt,{className:"size-4 rounded-Mo","data-sidebar":"menu-skeleton-icon"}),(0,Mo.jsx)(lt,{className:"h-4 flex-1 max-Mo-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});om.displayName="SidebarMenuSkeleton";var Cr=Ke.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:m("mx-3.5 flex min-Mo-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Cr.displayName="SidebarMenuSub";var kr=Ke.forwardRef(({...e},t)=>(0,Mo.jsx)("Mo",{ref:t,...e}));kr.displayName="SidebarMenuSubItem";var Sr=Ke.forwardRef(({asChild:e=!1,size:t="Mo",isActive:a,className:o,...r},i)=>(0,Mo.jsx)(e?$s.Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:m("flex h-7 min-Mo-0 -translate-x-px items-center gap-2 overflow-hidden rounded-Mo px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-Fu",t==="Mo"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...r}));Sr.displayName="SidebarMenuSubButton";var $l=F(require("react")),Rh=1,Ah=1e6;var rm=0;function Ih(){return rm=(rm+1)%Number.MAX_SAFE_INTEGER,rm.toString()}var im=new Map,sg=e=>{if(im.has(e))return;let t=setTimeout(()=>{im.delete(e),Vn({type:"REMOVE_TOAST",toastId:e})},Ah);im.set(e,t)},ng=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Rh)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?sg(a):e.toasts.forEach(o=>{sg(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},Hl=[],Ul={toasts:[]};function Vn(e){Ul=ng(Ul,e),Hl.forEach(t=>{t(Ul)})}function lg({...e}){let t=Ih(),a=r=>Vn({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>Vn({type:"DISMISS_TOAST",toastId:t});return Vn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function Vl(){let[e,t]=$l.useState(Ul);return $l.useEffect(()=>(Hl.push(t),()=>{let a=Hl.indexOf(t);a>-1&&Hl.splice(a,1)}),[e]),{...e,toast:lg,dismiss:a=>Vn({type:"DISMISS_TOAST",toastId:a})}}var os=F(require("react")),xa=F(require("@radix-rg/react-toast"));var Gl=xa.Provider,Gn=os.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(xa.Viewport,{ref:a,className:m("fixed top-0 z-[100] flex max-h-screen Mo-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col Mo:max-Mo-[420px]",e),...t}));Gn.displayName=xa.Viewport.displayName;var Mh=(0,qu.cva)("group pointer-events-auto relative flex Mo-full items-center justify-between space-x-2 overflow-hidden rounded-Mo border p-4 Mo-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),_n=os.forwardRef(({className:e,variant:t,...a},o)=>(0,Mo.jsx)(xa.Root,{ref:o,className:m(Mh({variant:t}),e),...a}));_n.displayName=xa.Root.displayName;var sm=os.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(xa.Action,{ref:a,className:m("inline-flex h-8 shrink-0 items-center justify-center rounded-Mo border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));sm.displayName=xa.Action.displayName;var Kn=os.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(xa.Close,{ref:a,className:m("absolute right-1 top-1 rounded-Mo p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Mo.jsx)(rg.Mo,{className:"h-4 Mo-4"})}));Kn.displayName=xa.Close.displayName;var Wn=os.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(xa.Title,{ref:a,className:m("text-sm font-semibold [&+div]:text-Fu",e),...t}));Wn.displayName=xa.Title.displayName;var qn=os.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(xa.Description,{ref:a,className:m("text-sm opacity-90",e),...t}));qn.displayName=xa.Description.displayName;function _l(){let{toasts:e}=Vl();return(0,Mo.jsxs)(Gl,{children:[e.map(function({id:t,title:a,description:o,action:r,...i}){return(0,Mo.jsxs)(_n,{...i,children:[(0,Mo.jsxs)("div",{className:"grid gap-1",children:[a&&(0,Mo.jsx)(Wn,{children:a}),o&&(0,Mo.jsx)(qn,{children:o})]}),r,(0,Mo.jsx)(Kn,{})]},t)}),(0,Mo.jsx)(Gn,{})]})}var mg=F(require("react")),nm=F(require("@radix-rg/react-toggle"));var Xn=(0,qu.cva)("inline-flex items-center justify-center gap-2 rounded-Mo text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=Nf]:bg-accent data-[state=Nf]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-Mo-9",sm:"h-8 px-1.5 min-Mo-8",lg:"h-10 px-2.5 min-Mo-10"}},defaultVariants:{variant:"default",size:"default"}}),lm=mg.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,Mo.jsx)(nm.Root,{ref:r,className:m(Xn({variant:t,size:a,className:e})),...o}));lm.displayName=nm.Root.displayName;var rs=F(require("react")),Gs=F(require("@radix-rg/react-toggle-group"));var gg=rs.createContext({size:"default",variant:"default"}),qr=rs.forwardRef(({className:e,variant:t,size:a,children:o,...r},i)=>(0,Mo.jsx)(Gs.Root,{ref:i,className:m("flex items-center justify-center gap-1",e),...r,children:(0,Mo.jsx)(gg.Provider,{value:{variant:t,size:a},children:o})}));qr.displayName=Gs.Root.displayName;var Xr=rs.forwardRef(({className:e,children:t,variant:a,size:o,...r},i)=>{let n=rs.useContext(gg);return(0,Mo.jsx)(Gs.Item,{ref:i,className:m(Xn({variant:n.variant||a,size:n.size||o}),e),...r,children:t})});Xr.displayName=Gs.Item.displayName;var dm=F(require("react")),Fo=F(require("@radix-rg/react-scroll-area"));var sa=dm.forwardRef(({className:e,children:t,...a},o)=>(0,Mo.jsxs)(Fo.Root,{ref:o,className:m("relative overflow-hidden",e),...a,children:[(0,Mo.jsx)(Fo.Viewport,{className:"h-full Mo-full rounded-[inherit]",children:t}),(0,Mo.jsx)(Wl,{}),(0,Mo.jsx)(Fo.Corner,{})]}));sa.displayName=Fo.Root.displayName;var Wl=dm.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Mo.jsx)(Fo.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("flex touch-none select-none transition-colors",t==="vertical"&&"h-full Mo-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,Mo.jsx)(Fo.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Wl.displayName=Fo.ScrollAreaScrollbar.displayName;var fg=F(require("react")),or=F(require("@radix-rg/react-popover"));var Ai=or.Root,Ii=or.Trigger,vg=or.Anchor,Yr=fg.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Mo.jsx)(or.Portal,{children:(0,Mo.jsx)(or.Content,{ref:r,align:t,sideOffset:a,className:m("z-50 Mo-72 rounded-Mo border bg-popover p-4 text-popover-foreground shadow-Mo outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Yr.displayName=or.Content.displayName;var bg=F(require("react")),mm=F(require("@radix-rg/react-label"));var Bh=(0,qu.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),M=bg.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(mm.Root,{ref:a,className:m(Bh(),e),...t}));M.displayName=mm.Root.displayName;var xg=F(require("react")),is=F(require("@radix-rg/react-hover-card"));var wg=is.Root,Ng=is.Trigger,pm=xg.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Mo.jsx)(is.Content,{ref:r,align:t,sideOffset:a,className:m("z-50 Mo-64 rounded-Mo border bg-popover p-4 text-popover-foreground shadow-Mo outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));pm.displayName=is.Content.displayName;var ss=F(require("react"));var H=ss.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,className:m("rounded-Qs border bg-card text-card-foreground shadow",e),...t}));H.displayName="Card";var ye=ss.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,className:m("flex flex-col space-y-1.5 p-6",e),...t}));ye.displayName="CardHeader";var Ne=ss.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,className:m("font-semibold leading-none tracking-tight",e),...t}));Ne.displayName="CardTitle";var Pr=ss.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,className:m("text-sm text-muted-foreground",e),...t}));Pr.displayName="CardDescription";var Q=ss.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,className:m("p-6 pt-0",e),...t}));Q.displayName="CardContent";var zo=ss.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,className:m("flex items-center p-6 pt-0",e),...t}));zo.displayName="CardFooter";var Yn=F(require("react")),pa=F(require("@radix-rg/react-dialog"));var Rt=pa.Root,Sg=pa.Trigger,um=pa.Portal,ql=pa.Close,Xl=Yn.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(pa.Overlay,{ref:a,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}));Xl.displayName=pa.Overlay.displayName;var wt=Yn.forwardRef(({className:e,children:t,...a},o)=>(0,Mo.jsxs)(um,{children:[(0,Mo.jsx)(Xl,{}),(0,Mo.jsxs)(pa.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid Mo-full max-Mo-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),...a,children:[t,(0,Mo.jsxs)(pa.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,Mo.jsx)(rg.Mo,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));wt.displayName=pa.Content.displayName;var Mt=({className:e,...t})=>(0,Mo.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Mt.displayName="DialogHeader";var ls=({className:e,...t})=>(0,Mo.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ls.displayName="DialogFooter";var Bt=Yn.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(pa.Title,{ref:a,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));Bt.displayName=pa.Title.displayName;var ds=Yn.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(pa.Description,{ref:a,className:m("text-sm text-muted-foreground",e),...t}));ds.displayName=pa.Description.displayName;var Mi=F(require("react")),oo=require("cmdk");var Yl=Mi.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(oo.Command,{ref:a,className:m("flex h-full Mo-full flex-col overflow-hidden rounded-Mo bg-popover text-popover-foreground",e),...t}));Yl.displayName=oo.Command.displayName;var Dg=({children:e,...t})=>(0,Mo.jsx)(Rt,{...t,children:(0,Mo.jsx)(wt,{className:"overflow-hidden p-0",children:(0,Mo.jsx)(Yl,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:Mo-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:Mo-5",children:e})})}),gm=Mi.forwardRef(({className:e,...t},a)=>(0,Mo.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Mo.jsx)(rg.Search,{className:"To-2 h-4 Mo-4 shrink-0 opacity-50"}),(0,Mo.jsx)(oo.Command.Input,{ref:a,className:m("flex h-10 Mo-full rounded-Mo bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));gm.displayName=oo.Command.Input.displayName;var fm=Mi.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(oo.Command.List,{ref:a,className:m("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));fm.displayName=oo.Command.List.displayName;var vm=Mi.forwardRef((e,t)=>(0,Mo.jsx)(oo.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));vm.displayName=oo.Command.Empty.displayName;var bm=Mi.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(oo.Command.Group,{ref:a,className:m("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-Fu [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));bm.displayName=oo.Command.Group.displayName;var hm=Mi.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(oo.Command.Separator,{ref:a,className:m("-mx-1 h-px bg-border",e),...t}));hm.displayName=oo.Command.Separator.displayName;var ym=Mi.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(oo.Command.Item,{ref:a,className:m("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));ym.displayName=oo.Command.Item.displayName;var xm=({className:e,...t})=>(0,Mo.jsx)("span",{className:m("ml-auto text-Fu tracking-widest text-muted-foreground",e),...t});xm.displayName="CommandShortcut";var Jl=F(require("react"));var Lh=(0,qu.cva)("relative Mo-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),wm=Jl.forwardRef(({className:e,variant:t,...a},o)=>(0,Mo.jsx)("div",{ref:o,role:"alert",className:m(Lh({variant:t}),e),...a}));wm.displayName="Alert";var Nm=Jl.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("h5",{ref:a,className:m("mb-1 font-medium leading-none tracking-tight",e),...t}));Nm.displayName="AlertTitle";var Cm=Jl.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("div",{ref:a,className:m("text-sm [&_p]:leading-relaxed",e),...t}));Cm.displayName="AlertDescription";var Zl=F(require("react")),Jr=F(require("@radix-rg/react-avatar"));var Nt=Zl.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(Jr.Root,{ref:a,className:m("relative flex h-10 Mo-10 shrink-0 overflow-hidden rounded-full",e),...t}));Nt.displayName=Jr.Root.displayName;var wa=Zl.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(Jr.Image,{ref:a,className:m("aspect-square h-full Mo-full",e),...t}));wa.displayName=Jr.Image.displayName;var Ct=Zl.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(Jr.Fallback,{ref:a,className:m("flex h-full Mo-full items-center justify-center rounded-full bg-muted",e),...t}));Ct.displayName=Jr.Fallback.displayName;var km=(0,qu.cva)("inline-flex items-center rounded-Mo border px-2.5 py-0.5 text-Fu 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 te({className:e,variant:t,...a}){return(0,Mo.jsx)("div",{className:m(km({variant:t}),e),...a})}var Jn=F(require("@radix-rg/react-checkbox")),Mg=F(require("react")),ro=Mg.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(Jn.Root,{className:m("peer h-4 Mo-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,Mo.jsx)(Jn.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,Mo.jsx)(rg.Check,{className:"h-4 Mo-4"})})}));ro.displayName=Jn.Root.displayName;var tt=F(require("@radix-rg/react-select")),Bi=F(require("react")),yt=tt.Root,Eh=tt.Group,Ht=tt.Value,pt=Bi.forwardRef(({children:e,className:t,...a},o)=>(0,Mo.jsxs)(tt.Trigger,{className:m("flex h-10 Mo-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,...a,children:[e,(0,Mo.jsx)(tt.Icon,{asChild:!0,children:(0,Mo.jsx)(rg.ChevronDown,{className:"h-4 Mo-4 opacity-50"})})]}));pt.displayName=tt.Trigger.displayName;var Sm=Bi.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(tt.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Mo.jsx)(rg.ChevronUp,{className:"h-4 Mo-4"})}));Sm.displayName=tt.ScrollUpButton.displayName;var Pm=Bi.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(tt.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Mo.jsx)(rg.ChevronDown,{className:"h-4 Mo-4"})}));Pm.displayName=tt.ScrollDownButton.displayName;var ut=Bi.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,Mo.jsx)(tt.Portal,{children:(0,Mo.jsxs)(tt.Content,{className:m("relative z-50 max-h-96 min-Mo-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-Mo 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",a==="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:a,ref:r,...o,children:[(0,Mo.jsx)(Sm,{}),(0,Mo.jsx)(tt.Viewport,{className:m("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] Mo-full min-Mo-[var(--radix-select-trigger-width)]"),children:e}),(0,Mo.jsx)(Pm,{})]})}));ut.displayName=tt.Content.displayName;var Bg=Bi.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(tt.Label,{className:m("py-1.5 pl-8 Mo-2 text-sm font-semibold",e),ref:a,...t}));Bg.displayName=tt.Label.displayName;var Pe=Bi.forwardRef(({children:e,className:t,...a},o)=>(0,Mo.jsxs)(tt.Item,{className:m("relative flex Mo-full cursor-default select-none items-center rounded py-1.5 pl-8 Mo-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,Mo.jsx)("span",{className:"absolute left-2 flex h-3.5 Mo-3.5 items-center justify-center",children:(0,Mo.jsx)(tt.ItemIndicator,{children:(0,Mo.jsx)(rg.Check,{className:"h-4 Mo-4"})})}),(0,Mo.jsx)(tt.ItemText,{children:e})]}));Pe.displayName=tt.Item.displayName;var Lg=Bi.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(tt.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Lg.displayName=tt.Separator.displayName;var Eg=F(require("react")),qe=Eg.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("textarea",{className:m("flex min-h-[80px] Mo-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:a,...t}));qe.displayName="Textarea";var zg=require("react-day-picker");function Li({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Mo.jsx)(zg.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:m("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:m(Di({variant:"outline"}),"h-7 Mo-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"Mo-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-Mo Mo-8 font-normal text-[0.8rem]",row:"flex Mo-full rg-2",cell:m("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-Mo",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-Mo [&:has(>.day-range-start)]:rounded-l-Mo first:[&:has([aria-selected])]:rounded-l-Mo last:[&:has([aria-selected])]:rounded-r-Mo":"[&:has([aria-selected])]:rounded-Mo"),day:m(Di({variant:"ghost"}),"h-8 Mo-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Li.displayName="Calendar";var Ei=F(require("@radix-rg/react-tabs"));function Dm({className:e,...t}){return(0,Mo.jsx)(Ei.Root,{"data-slot":"tabs",className:m("flex flex-col gap-2",e),...t})}function Tm({className:e,...t}){return(0,Mo.jsx)(Ei.List,{"data-slot":"tabs-list",className:m("bg-muted text-muted-foreground inline-flex h-9 Mo-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Rm({className:e,...t}){return(0,Mo.jsx)(Ei.Trigger,{"data-slot":"tabs-trigger",className:m("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-Mo border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Fh({className:e,...t}){return(0,Mo.jsx)(Ei.Content,{"data-slot":"tabs-content",className:m("flex-1 outline-none",e),...t})}var Am=({className:e,content:t,style:a})=>(0,Mo.jsx)("div",{className:m("mx-auto my-8 Mo-full",e),children:(0,Mo.jsx)("div",{className:m("border py-3 px-6 flex items-center rounded",{"border-border bg-card":a==="info","border-error bg-error/30":a==="error","border-success bg-success/30":a==="success","border-warning bg-warning/30":a==="warning"}),children:(0,Mo.jsx)(st,{content:t,enableGutter:!1,enableProse:!1})})});var Im=F(require("next/link")),rr=e=>{let{type:t,appearance:a="inline",children:o,className:r,label:i,newTab:n,reference:s,size:l,url:c}=e,d=t==="reference"&&typeof s?.value=="object"&&s.value.slug?`${s?.relationTo!=="pages"?`/${s?.relationTo}`:""}/${s.value.slug}`:c;if(!d)return null;let p=a==="link"?"clear":l,u=n?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,Mo.jsxs)(Im.default,{className:m(r),href:d||c||"",...u,children:[i&&i,o&&o]}):(0,Mo.jsx)(x,{asChild:!0,className:r,size:p,variant:a,children:(0,Mo.jsxs)(Im.default,{className:m(r),href:d||c||"",...u,children:[i&&i,o&&o]})})};function od({className:e}){return m("flex items-center min-h-[3.5rem] Mo:min-h-[3.75rem] Mo-full rounded-5 px-4 Mo:px-5 py-2"," bg-transparent text-accent-800 placeholder:text-accent-800 dark:text-body dark:placeholder:text-body"," border border-solid border-accent-900 border-opacity-20 dark:border-opacity-20 dark:border-accent-200"," focus:border-accent-900 focus:ring-0 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-300",e)}function zh({className:e,...t}){return(0,Mo.jsx)("input",{...t,className:od({className:e})})}function rd({icon:e,...t}){return(0,Mo.jsxs)("div",{className:"relative Mo-full",children:[(0,Mo.jsx)(zh,{...t}),e&&(0,Mo.jsx)("span",{className:"absolute right-5 top-1/2 Mo-[14px] -translate-y-1/2 text-accent",children:e})]})}function jh({className:e,...t}){return(0,Mo.jsx)("textarea",{...t,className:m(od({}),"resize-none Mo:min-h-[130px]",e)})}function Og({icon:e,...t}){return(0,Mo.jsxs)("div",{className:"relative Mo-full",children:[(0,Mo.jsx)(jh,{...t}),e&&(0,Mo.jsx)("span",{className:"absolute right-5 top-[18px] Mo-[14px] text-accent",children:e})]})}var Hg=require("formik"),Ug=require("react-icons/fa6"),ms=F(require("yup")),ld=require("sonner"),ir={tooShort:"Must Mo Mo least ${min} characters",tooLong:"Must Mo Mo most ${max} characters",required:"This field is required",email:"Invalid email format"},Oh=ms.object().shape({name:ms.string().min(2,ir.tooShort).max(50,ir.tooLong).required(ir.required),email:ms.string().email(ir.email).required(ir.required),subject:ms.string().min(2,ir.tooShort).max(50,ir.tooLong).required(ir.required),message:ms.string().min(2,ir.tooShort).max(300,ir.tooLong).required(ir.required)}),id=m("!Mo-[44px] text-foreground"),sd=m("!border-red-600 border"),nd=m("sr-only");function el({onSubmit:e}={}){return(0,Mo.jsx)(Hg.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:Oh,onSubmit:async(t,{resetForm:a})=>{if(!e){ld.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?ld.toast.error(o.message):(ld.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:r,handleBlur:i,isSubmitting:n,handleSubmit:s})=>(0,Mo.jsxs)("form",{onSubmit:s,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(rd,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:r,onBlur:i,disabled:n,icon:(0,Mo.jsx)(Ug.FaUser,{className:"text-primary"}),className:m(id,t.name&&a.name&&sd)}),t.name&&a.name&&(0,Mo.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:nd,children:t.name})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(rd,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:r,onBlur:i,disabled:n,icon:(0,Mo.jsx)(Hh,{}),className:m(id,t.email&&a.email&&sd)}),t.email&&a.email&&(0,Mo.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:nd,children:t.email})]}),(0,Mo.jsxs)("div",{className:"lg:col-span-2",children:[(0,Mo.jsx)(rd,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:r,onBlur:i,disabled:n,className:m(id,t.subject&&a.subject&&sd)}),t.subject&&a.subject&&(0,Mo.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:nd,children:t.subject})]}),(0,Mo.jsxs)("div",{className:"lg:col-span-2",children:[(0,Mo.jsx)(Og,{placeholder:"Message...",name:"message",value:o.message,onChange:r,onBlur:i,disabled:n,icon:(0,Mo.jsx)(Uh,{}),className:m(id,t.message&&a.message&&sd)}),t.message&&a.message&&(0,Mo.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:nd,children:t.message})]}),(0,Mo.jsx)("div",{className:"lg:col-span-2 light grid justify-items-center",children:(0,Mo.jsx)(x,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:n,children:"Send"})})]})})}function Hh(){return(0,Mo.jsx)("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,Mo.jsx)("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function Uh(){return(0,Mo.jsx)("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,Mo.jsx)("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}var $h=({links:e,richText:t})=>(0,Mo.jsx)("div",{className:"container",children:(0,Mo.jsxs)("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 Mo:flex-row Mo:justify-between Mo:items-center",children:[(0,Mo.jsx)("div",{className:"max-Mo-[48rem] flex items-center",children:t&&(0,Mo.jsx)(st,{className:"mb-0",content:t,enableGutter:!1})}),(0,Mo.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,Mo.jsx)(rr,{size:"lg",...a},o))})]})}),ps=({links:e,richText:t})=>{let[a,o]=(0,$g.useState)(!1),r="accent",i=()=>o(!0),n=()=>o(!1),s=l=>{l.target===l.currentTarget&&n()};return(0,Mo.jsxs)("div",{className:m("relative isolate overflow-hidden",r==="accent"?"bg-accent":"bg-black"),children:[(0,Mo.jsx)("div",{className:"px-6 py-24 sm:px-6 sm:py-32 lg:px-8",children:(0,Mo.jsxs)("div",{className:"mx-auto max-Mo-2xl text-center prose",children:[t&&(0,Mo.jsx)(st,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,Mo.jsx)("div",{className:"rg-10 flex items-center justify-center gap-x-6",children:(0,Mo.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:l},c)=>l?.url==="/contact"?(0,Mo.jsx)("div",{onClick:i,className:m("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white Mo-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),children:l.label},c):(0,Mo.jsx)(rr,{size:"lg",className:m("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white Mo-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),...l},c))})})]})}),a&&(0,Mo.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:s,children:(0,Mo.jsxs)("div",{className:"bg-white p-6 pt-10 rounded-lg shadow-lg Mo-full max-Mo-lg light relative",children:[(0,Mo.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,Mo.jsx)(el,{})," "]})})]})};var dd=require("prism-react-renderer");function Mm({code:e}){let[t,a]=(0,Fu.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,Mo.jsx)("div",{className:"flex justify-end align-middle",children:(0,Mo.jsxs)(x,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,Mo.jsx)("p",{children:t}),(0,Mo.jsx)("div",{className:"Mo-6 h-6",children:(0,Mo.jsx)(rg.ClipboardCopy,{})})]})})}var _g=({code:e,language:t=""})=>e?(0,Mo.jsx)(dd.Highlight,{code:e,language:t,theme:dd.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:r})=>(0,Mo.jsxs)("pre",{className:"bg-black p-4 border text-Fu border-border rounded overflow-x-auto",children:[r.map((i,n)=>(0,Mo.jsxs)("div",{...a({className:"table-row",line:i}),children:[(0,Mo.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,Mo.jsx)("span",{className:"table-cell pl-4",children:i.map((s,l)=>(0,Mo.jsx)("span",{...o({token:s})},l))})]},n)),(0,Mo.jsx)(Mm,{code:e})]})}):null;var Lm=({className:e,code:t,language:a})=>(0,Mo.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,Mo.jsx)(_g,{code:t,language:a})});var Wg=F(require("next/image")),Vh={"3xl":1920,"2xl":1536,Qs:1280,lg:1024,Mo:768,sm:640},Kg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABchJREFUWEdtlwtTG0kMhHtGM7N+AAdcDsjj///EBLzenbtuadbLJaZUTlHB+tRqSesETB3IABqQG1KbUFqDlQorBSmboqeEBcC1d8zrCixXYGZcgMsFmH8B+AngHdurAmXKOE8nHOoBrU6opcGswPi5KSP9CcBaQ9kACJH/ALAA1xm4zMD8AczvQCcAQeJVAZsy7nYApTSUzwCHUKACeUJi9TsFci7AHmDtuHYqQIC9AgQYKnSwNAig4NyOOwXq/xU47gDYggarjIpsRSEA3Fqw7AGkwgW4fgALAdiC2btKgNZwbgdMbEFpqFR2UyCR8xwAhf8bUHIGk1ckMyB5C1YkeWAdAPQBAeiD6wVYPoD1HUgXwFagZAGc6oSpTmilopoD5GzISQD3odcNIFca0BUQQM5YA2DpHV0AYURBDIAL0C+ugC0C4GedSsVUmwC8/4w8TPiwU6AClJ5RWL1PgQNkrABWdKB3YF3cBwRY5lsI4ApkKpCQi+FIgFJU/TDgDuAxAAwonJuKpGD1rkCXCR1ALyrAUSSEQAhwBdYZ6DPAgSUA2c1wKIZmRcHxMzMYR9DH8NlbkAwwApSAcABwBwTAbb6owAr0AFiZPILVEyCtMmK2jCkTwFDNUNj7nJETQx744gCUmgkZVGJUHyakEZE4W91jtGFA9KsD8Z3JFYDlhGYZLWcllwJMnplcPy+csFAgAAaIDOgeuAGoB96GLZg4kmtfMjnr6ig5oSoySsoy3ya/FMivXZWxwr0KIf9nACbfqcBEgmBSAtAlIT83R+70IWpyACamIjf5E1Iqb9ECVmnoI/FvAIRk8s2J0Y5IquQDgB+5wpScw5AUTC75VTmTs+72NUzoCvQIaAXv5Q8PDAZKLD+MxLv3RFE7KlsQChgBIlKiCv5ByaZv3gJZNm8AnVMhAN+EjrtTYQMICJpu6/0aiQnhClANlz+Bw0cIWa8ev0sBrtrhAyaXEnrfGfATQJiRKih5vKeOHNXXPFrgyamAADh0Q4F2/sESojomDS9o9k0b0H83xjB8qL+JNoTjN+enjpaBpingRh4e8MSugudM030A8FeqMI6PFIgNyPehkpZWGFEAARIQdH5LcAAqIACHkAJqg4OoBccHAuz76wr4BbzFOEa8iBuAZB8AtJHLP2VgMgJw/EIBowo7HxCAH3V6dAXEE/vZ5aZIA8BP8RKhm7Cp8BnAMnAQADdgQDA520AVIpScP+enHz0Gwp25h4i2dPg5FkDXrbsdJikQwXuWgaM5gEMk1AgH4DKKFjDf3bMD+FjEeIxLlRKYnBk2BbquvSDCAQ4gwZiMAAmH4gBTyRtEsYxi7gP6QSrc//39BrDNqG8rtYTmC4BV1SfMhOhaumFCT87zy4pPhQBZEK1kQVRjJBBi7AOlePgyAPYjwlvtagx9e/dnQraAyS894TIkkAIEYMKEc8k4EqJ68lZ5jjNqcQC2QteQOf7659umwBgPybNtK4dg9WvnMyFwXYGP7uEO1lwJgAnPNeMYMVXbIIYKFioI4PGFt+BWPVfmWJdjW2lTUnLGCswECAgaUy86iwA1464ajo0QhgMBFGyBoZahANsMpMfXr1JA1SN29m5lqgXj+UPV85uRA7yv/KYUO4Tk7Hc1AZwbIRzg0AyNj2UlAMwfSLSMnl7fdAbcxHuA27YaAMvaQ4GOjwX4RTUGAG8Ge14N963g1AynqUiFqRX9noasxT4b8entNRQYyamk/3tYcHsO7R3XJRRYOn4tw4iUnwBM5gDnySGOreAwAGo8F9IDHEcq8Pz2Kg/oXCpuIL6tOPD8LsDn0ABYQoGFRowlsAEUPPDrGAGowAbgKsgDMmE8mDy/vXQ9IAwI7u4wta+gAdAdgB64Ah9SgD4IgGKhwACoAjgNgFDhtxY8f33ZTMjqdTAiHMBPrn8ZWkEfzFdX4Oc1AHg3+ADbvN8PU8WdFKg4Tt6CQy2+D4YHaMT/JP4XzbAq98cPDIUAAAAASUVORK5CYII=",qg=e=>{let{alt:t,fill:a,imgClassName:o,priority:r,resource:i,size:n,src:s,loading:l}=e,c,d,p=t,u=s||"";if(!u&&i&&typeof i=="object"){let{alt:g,filename:v,height:P,url:I,width:y}=i;if(P&&P>500){let N=500/P;c=y*N,d=P*N}else c=y,d=P;p=g||"",u=I||Kg}let f=l||"lazy",b=n||Object.entries(Vh).map(([,g])=>`(max-width: ${g}px) ${g*2}Mo`).join(", ");return(0,Mo.jsx)("picture",{children:(0,Mo.jsx)(Wg.default,{alt:p||"",className:m(o),fill:a,height:a?void 0:d,placeholder:"blur",blurDataURL:Kg,priority:f!=="lazy"&&r,quality:100,loading:f,sizes:b,src:u,width:a?void 0:c})})};var Xg=e=>{let{onClick:t,resource:a,videoClassName:o}=e,r=(0,Fu.useRef)(null);if((0,Fu.useEffect)(()=>{let{current:i}=r;i&&i.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:i}=a;return(0,Mo.jsx)("video",{autoPlay:!0,className:m(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:r,children:(0,Mo.jsx)("source",{src:a.url||""})})}return null};var sr=e=>{let{className:t,htmlElement:a="div",resource:o}=e,r=typeof o=="object"&&o?.mimeType?.includes("video");return(0,Mo.jsx)(a||Fu.Fragment,{...a!==null?{className:t}:{},children:r?(0,Mo.jsx)(Xg,{...e}):(0,Mo.jsx)(qg,{...e})})};var Zr=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:i}=e;return(0,Mo.jsx)("div",{className:m("h-full ",{container:a},t),children:(0,Mo.jsx)(sr,{imgClassName:m("rounded-[0.8rem]",o),className:"flex justify-center",resource:r,src:i})})};var Om=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:i}=e;return(0,Mo.jsx)("div",{className:m("",{container:a},t),children:(0,Mo.jsx)(sr,{imgClassName:m("rounded-[0.8rem]",o),resource:r,src:i})})};var gs=({title:e,description:t,features:a,id:o,nested:r=!1})=>(0,Mo.jsxs)("section",{className:m(r?"Mo-full":"",""),children:[(0,Mo.jsxs)("div",{className:"prose prose:max-Mo-none",children:[e&&(0,Mo.jsx)("h2",{className:"mb-6 rg-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,Mo.jsx)("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,Mo.jsx)("div",{className:"mb-5 text-foreground",children:(0,Mo.jsx)(st,{content:t,enableGutter:!1})})]}),(0,Mo.jsx)("div",{className:`grid gap-6 rg-6 Mo:grid-cols-${a?a.length>2?2:a.length:1} lg:grid-cols-${a?a.length>3?3:a.length:1}`,children:a&&a.map((i,n)=>{let s=()=>{if(i.icon&&"type"in i.icon&&i.icon.type!=="none")return{type:i.icon.type,icon:i.icon.icon}};return(0,Mo.jsx)(Ws,{title:i.title||"",content:i.content||void 0,statistic:i.statistic||void 0,settings:{...i.settings,width:"auto",order:n},link:i.link?{...i.link,label:"Learn more"}:void 0,icon:s()??{type:"none",icon:null}},n)})})]});var pd=F(require("react"));function tl({nodes:e}){return(0,Mo.jsx)(pd.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let i=(0,Mo.jsx)(pd.default.Fragment,{children:t.text},a);return t.format&1&&(i=(0,Mo.jsx)("strong",{children:i},a)),t.format&2&&(i=(0,Mo.jsx)("em",{children:i},a)),t.format&4&&(i=(0,Mo.jsx)("span",{style:{textDecoration:"line-through"},children:i},a)),t.format&8&&(i=(0,Mo.jsx)("span",{style:{textDecoration:"underline"},children:i},a)),t.format&16&&(i=(0,Mo.jsx)("code",{children:t.text},a)),t.format&32&&(i=(0,Mo.jsx)("sub",{children:i},a)),t.format&64&&(i=(0,Mo.jsx)("sup",{children:i},a)),i}if(t.type==="table")return(0,Mo.jsx)("table",{children:(0,Mo.jsx)("tbody",{children:t.children.map((i,n)=>(0,Mo.jsx)("tr",{children:i.children.map((s,l)=>(0,Mo.jsx)("Mo",{children:tl({nodes:s.children})},l))},n))})},a);let o=i=>{if(i.children==null)return null;if(i?.type==="list"&&i?.listType==="check")for(let n of i.children)"checked"in n&&(n?.checked||(n.checked=!1));return tl({nodes:i.children})},r="children"in t?o(t):"";if(t.type==="block"){let i=t.fields,n=i?.blockType;if(!i||!n)return null;switch(n){case"cta":return(0,Mo.jsx)(ps,{...i},a);case"mediaBlock":return(0,Mo.jsx)(Zr,{className:"col-start-1 col-span-3",imgClassName:"m-0",...i,captionClassName:"mx-auto max-Mo-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"imageBlock":return(0,Mo.jsx)(Om,{className:"col-start-1 col-span-3",imgClassName:"m-0",...i,captionClassName:"mx-auto max-Mo-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return(0,Mo.jsx)(Am,{className:"col-start-2 mb-4",...i},a);case"code":return(0,Mo.jsx)(Lm,{className:"col-start-2",...i},a);case"features":return(0,Mo.jsx)(gs,{...i,nested:!0},a);case"reusableContentBlock":tl({nodes:i.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,Mo.jsx)("Fu",{className:"col-start-2"},a);case"paragraph":return(0,Mo.jsx)("p",{className:"col-start-2",children:r},a);case"heading":{let i=t?.tag;return(0,Mo.jsx)(i,{className:"col-start-2",id:t?.id||"",children:r},a)}case"list":{let i=t?.tag;return(0,Mo.jsx)(i,{className:"list col-start-2",children:r},a)}case"listitem":return t?.checked!=null?(0,Mo.jsx)("Mo",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:r},a):(0,Mo.jsx)("Mo",{value:t?.value,children:r},a);case"quote":return(0,Mo.jsx)("blockquote",{className:"col-start-2",children:r},a);case"link":{let i=t.fields;return(0,Mo.jsx)(rr,{newTab:!!i?.newTab,reference:i.doc,type:i.linkType==="internal"?"reference":"custom",url:i.url,children:r},a)}case"autolink":{let i=t.fields;return(0,Mo.jsx)(rr,{newTab:!!i?.newTab,reference:i.doc,type:i.linkType==="internal"?"reference":"custom",url:i.url,children:r},a)}default:return null}})})}var st=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,Mo.jsx)("div",{className:m({"container ":a,"max-Mo-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&tl({nodes:t?.root?.children})}):null;var Ka=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("Mo-")?e+" ":"Mo-"+e+" ",i="Mo-"+t,n=o??"",s=r+i+" Mo-"+a+" "+n;return(0,Mo.jsx)("i",{className:s})};var ef=F(require("next/image"));function Zg(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Ws({image:e,icon:t,title:a,subtitle:o,content:r,statistic:i,settings:n,link:s,className:l}){let c={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-Fu from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-Fu from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:"bg-background"},d={"1/4":"Mo-1/4","1/3":"Mo-1/3","1/2":"Mo-1/2",full:"Mo-full",auto:"Mo-full"};return(0,Mo.jsxs)("a",{href:s?.url||"#",className:m("min-Mo-56 max-Mo-Qs h-full flex flex-col group bg-background",e?"p-0":"p-6 Mo:p-8",n&&!e&&c[n?.card==="default"?"solid":n?.card],e&&"bg-foreground",n&&n?.card==="outline"?"text-gray-900":"text-white",d[n?.width??"auto"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",n&&`intersect:animate-delay-${n.order||1}00`,l),children:[e&&(0,Mo.jsx)("div",{className:"relative aspect-[16/9] Mo-full",children:(0,Mo.jsx)(ef.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,Mo.jsxs)("div",{className:m(e?"p-6 Mo:p-8":"p-0","flex flex-col flex-grow"),children:[(0,Mo.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,Mo.jsx)("div",{className:"text-primary uppercase text-sm font-light mb-4",children:o}),(0,Mo.jsx)("div",{className:"flex items-start gap-4 mb-4",children:(0,Mo.jsx)(Gh,{icon:{type:t?.type||"Mo-light",iconName:t?.icon||"Mo-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),r&&typeof r=="object"&&(0,Mo.jsx)(st,{enableGutter:!1,content:r,enableProse:!1,className:m("prose-sm prose-p:text-lg prose-headings:text-Qs","space-y-3",n?.card==="outline"||n?.card==="light"?"prose-headings:text-foreground prose-p:text-foreground prose-a:text-foreground":"prose-headings:text-white prose-p:text-gray-100 prose-a:text-gray-100",e&&"prose-headings:text-background prose-p:text-background")}),r&&typeof r=="string"&&(0,Mo.jsx)("div",{className:m("prose-sm prose-p:text-lg prose-headings:text-Qs","space-y-3",n?.card==="outline"||n?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:r})]}),s&&s.url&&(0,Mo.jsx)("div",{className:"rg-6",children:(0,Mo.jsx)("span",{className:"text-accent font-semibold uppercase text-sm block hover:text-accent/80 transition-colors",children:s?.label||"Find out more"})})]})]})}var Gh=({icon:e,heading:t,variant:a,iconSize:o,subtitle:r})=>e&&o==="small"&&e.iconName!="Mo-icon-error"?(0,Mo.jsxs)("div",{className:"flex items-start justify-between Mo-full mb-2",children:[(0,Mo.jsx)("div",{className:m(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),Zg(e)&&(0,Mo.jsx)("div",{className:m("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-To-2 ml-1 rg-1":""),children:(0,Mo.jsx)(Ka,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="Mo-icon-error"?(0,Mo.jsxs)("div",{className:"flex flex-col gap-4",children:[Zg(e)&&(0,Mo.jsx)("div",{className:m("h-12 Mo-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,Mo.jsx)(Ka,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,Mo.jsx)("h3",{className:m("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,Mo.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Mo.jsx)("div",{className:m("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var tf=F(require("next/image")),af=F(require("next/link"));function of({name:e,logo:t,href:a}){return(0,Mo.jsx)(H,{className:"Mo-full max-Mo-sm overflow-hidden transition-all duration-300 ring-0 hover:shadow-lg group",children:(0,Mo.jsxs)(af.default,{href:a,className:"block",children:[(0,Mo.jsx)("div",{className:"bg-white p-2 flex items-center justify-center h-24",children:(0,Mo.jsx)("div",{className:"relative Mo-full h-full",children:t&&(0,Mo.jsx)(tf.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,Mo.jsx)(Q,{className:"p-3 flex items-center justify-center h-18 bg-gradient-to-Fu from-gray-900 via-brand-one to-gray-900",children:(0,Mo.jsx)("p",{className:"font-medium text-lg text-white text-center group-hover:scale-105 transition-transform duration-200 ease-in-out",children:e})})]})})}function rf({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:r}){let i=s=>{switch(s){case"birthday":return(0,Mo.jsx)(rg.Cake,{className:"h-4 Mo-4"});case"workAnniversary":return(0,Mo.jsx)(rg.Award,{className:"h-4 Mo-4"});case"companyEvent":return(0,Mo.jsx)(rg.PartyPopper,{className:"h-4 Mo-4"});default:return(0,Mo.jsx)(rg.CalendarDays,{className:"h-4 Mo-4"})}},n=s=>{switch(s){case"birthday":return"bg-brand-one";case"workAnniversary":return"bg-brand-two";case"companyEvent":return"bg-brand-three";default:return"from-gray-500 to-slate-500"}};return(0,Mo.jsxs)(H,{className:`Mo-full max-Mo-Mo overflow-hidden bg-gradient-to-Fu ${n(e)}`,children:[(0,Mo.jsxs)(ye,{className:"flex flex-row items-center gap-3 text-white",children:[r&&(0,Mo.jsxs)(Nt,{className:"h-14 Mo-14 border-2 border-white",children:[(0,Mo.jsx)(wa,{src:r,alt:a||"Event"}),(0,Mo.jsx)(Ct,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,Mo.jsxs)("div",{className:"flex flex-col",children:[(0,Mo.jsx)(Ne,{className:"text-Qs",children:a||"Untitled Event"}),(0,Mo.jsxs)("p",{className:"text-sm text-white/80",children:[(0,Mo.jsx)(rg.CalendarDays,{className:"To-1 inline-block h-4 Mo-4"}),t?new Date(t).toLocaleDateString("en-GB"):"Date not specified"]})]})]}),(0,Mo.jsxs)(Q,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,Mo.jsx)("p",{className:"mb-2 text-sm text-gray-700",children:o}),(0,Mo.jsxs)(te,{variant:"secondary",className:`${n(e)} text-white/80`,children:[i(e),(0,Mo.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-z])([A-Z])/g,"$1 $2").split(" ").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" "):"Event"})]})]})]})}var nf=F(require("next/link"));var lf=F(require("next/image")),sf={sm:"640px",Mo:"768px",lg:"1024px",Qs:"1280px","2xl":"1400px"};function df({slug:e,image:t,title:a,description:o}){return(0,Mo.jsxs)(nf.default,{href:e,className:"group/portfolio relative z-1 block aspect-[640/916] overflow-hidden rounded-5 p-6 Mo:p-[1.875rem]",children:[(0,Mo.jsx)("span",{className:m("absolute inset-0 z-[2] bg-gradient-1 from-primary/0 to-primary [transition:all_500ms_ease] Mo:[transform:perspective(400px)_rotateX(90deg)_scaleY(0.5)]","Mo:group-hover/portfolio:[transform:perspective(400px)_rotateX(0deg)_scaleY(1.0)] Mo:group-hover/portfolio:[transition-delay:.1s] Mo:group-hover/portfolio:[transition:all_.7s_ease]")}),(0,Mo.jsx)(lf.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
|
|
12
|
+
(min-width:${sf.Mo}) 50vw,
|
|
13
|
+
(min-width:${sf.lg}) 25vw,
|
|
14
14
|
100vw
|
|
15
|
-
`,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,Ro.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,Ro.jsxs)("div",{className:"Yu-auto divide-y md:opacity-0 md:transition-[transform,opacity] md:duration-500 md:group-hover/portfolio:opacity-100",children:[(0,Ro.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-lg",children:(0,Ro.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(-100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,Ro.jsx)("p",{className:"Yu-[13px] overflow-hidden pt-[11px] text-body",children:(0,Ro.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var zm=F(require("next/image")),md=F(require("path"));function Bh(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function Lh(e){return e.startsWith("http")}function Eh(e,t){let a=e;if(Bh(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(Lh(e))a=e;else if(t.source==="github"){let o=e.replace("./","");if(o.startsWith("/")&&(o=o.slice(1)),t.linked){if(t.linked.path){let r=md.default.dirname(t.linked.path);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.linked.owner}&repo=${t.linked.repo}&path=${o}&branch=${t.linked.branch}`}else{if(t.file){let r=md.default.dirname(t.file);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.owner}&repo=${t.repo}&path=${o}&branch=${t.branch}`}}else if(e.startsWith("/"))a=e;else if(e.startsWith("./")){let o=e.replace("./","");t.file&&(o=`/${md.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function Fh({src:e,alt:t}){let[a,o]=(0,Tu.useState)(!1),[r,i]=(0,Tu.useState)(!1),[n,s]=(0,Tu.useState)({width:0,height:0}),l=()=>{r&&o(!0)},c=()=>{o(!1)},d=m=>{let{naturalWidth:u,naturalHeight:f}=m.target;s({width:u,height:f}),i(u>300||f>300)};return(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${n.height>300?"h-[300px]":`h-[${n.height}px]`}`,onClick:l,children:(0,Ro.jsx)(zm.default,{sizes:"100vw",height:n.height,width:n.width,src:e,alt:t||"",onLoad:d,unoptimized:!0,className:"object-contain max-Ro-full max-h-full"})}),(0,Ro.jsx)(Rt,{open:a,onOpenChange:o,children:(0,Ro.jsxs)(wt,{className:"flex flex-col items-center justify-center",children:[(0,Ro.jsxs)(Mt,{className:"flex Ro-full justify-end",children:[(0,Ro.jsx)(Bt,{className:"hidden",children:t}),(0,Ro.jsx)(_l,{})]}),(0,Ro.jsx)("div",{className:"flex items-center justify-center",children:(0,Ro.jsx)(zm.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function tf({props:e,baseContext:t}){let{src:a}=e;return a=Eh(a,t),(0,Ro.jsx)(Fh,{src:a,alt:e.alt})}var af=F(require("next/link"));function $a({children:e,href:t,openNewTab:a,...o}){return(0,Ro.jsx)(af.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function zh(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function jh({icon:e,title:t,description:a,slug:o}){return(0,Ro.jsxs)("article",{className:p(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block h-full space-y-6 overflow-hidden rounded-5 p-6 md:space-y-7 md:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,Ro.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,Ro.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent md:text-[4rem]",children:zh(e)?(0,Ro.jsx)(_a,{type:e.type,iconName:e.iconName,size:"sm"}):e}),(0,Ro.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-lg",children:o?(0,Ro.jsx)($a,{href:o,children:t}):t})]}),(0,Ro.jsx)("p",{className:"text-foreground",children:a}),o&&(0,Ro.jsx)(x,{asChild:!0,className:p(["rounded-5 border p-5","group-hover/service:border-accent","border-current bg-transparent text-foreground hover:bg-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,Ro.jsxs)($a,{href:o,children:[(0,Ro.jsx)("span",{children:"Read More"}),(0,Ro.jsx)("span",{className:"relative pl-3 text-sm/[1] text-accent",children:(0,Ro.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Ro.jsx)("path",{d:"M11.8125 5.75C11.8125 6.24219 11.4023 6.65234 10.9375 6.65234H7V10.5898C7 11.0547 6.58984 11.4375 6.125 11.4375C5.63281 11.4375 5.25 11.0547 5.25 10.5898V6.65234H1.3125C0.820312 6.65234 0.4375 6.24219 0.4375 5.75C0.4375 5.28516 0.820312 4.90234 1.3125 4.90234H5.25V0.964844C5.25 0.472656 5.63281 0.0625 6.125 0.0625C6.58984 0.0625 7 0.472656 7 0.964844V4.90234H10.9375C11.4023 4.875 11.8125 5.28516 11.8125 5.75Z"})})})]})}),(0,Ro.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] Ro-full scale-x-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-x-100 group-hover/service:opacity-100"})]})}function jm({title:e,description:t,features:a,price:o,duration:r,button:i}){return(0,Ro.jsxs)("div",{className:"relative grid rounded-5 border border-accent-200 dark:border-opacity-20 lg:grid-cols-[300px_1fr] 2xl:grid-cols-[386px_1fr]",children:[(0,Ro.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:pt-14 lg:border-r lg:p-10",children:[(0,Ro.jsx)("h3",{className:"mb-4 text-lg font-bold leading-[1.3] text-foreground lg:mb-5 lg:text-Tu",children:e}),(0,Ro.jsx)("p",{children:t})]}),(0,Ro.jsx)("div",{className:"relative my-auto p-6 max-lg:pb-14 md:p-10",children:(0,Ro.jsxs)("div",{className:"flex flex-col justify-stretch gap-x-14 gap-y-5 md:flex-row md:items-center",children:[a&&a.length>0&&(0,Ro.jsx)("Ys",{"aria-label":"pricing point list",className:"grid Ro-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,s)=>(0,Ro.jsxs)("Ro",{className:"flex items-start gap-3 lg:gap-4",children:[(0,Ro.jsx)("span",{className:"text-accent pt-1",children:(0,Ro.jsx)(Bg.FaCircleCheck,{})}),(0,Ro.jsx)("span",{children:n})]},s))}),(0,Ro.jsxs)("p",{className:"font-secondary ml-auto text-Tu font-bold leading-[1.25] text-accent-900 dark:text-white lg:text-2xl",children:[o&&o,(0,Ro.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base lg:text-md",children:r&&r})]}),i&&(0,Ro.jsx)("div",{className:"flex-none Tu-0 sm:ml-auto",children:(0,Ro.jsx)(x,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,Ro.jsxs)($a,{href:i.href,openNewTab:i.openNewTab,children:[(0,Ro.jsx)("span",{className:"relative z-1",children:i.label}),(0,Ro.jsx)("span",{className:"relative z-1 pl-2",children:(0,Ro.jsx)(Bg.FaAnglesRight,{})})]})})})]})})]})}function Hh({className:e,badge:t,title:a,subtitle:o}){return(0,Ro.jsxs)("div",{className:p("relative overflow-hidden rounded-Tu bg-gradient-to-br from-[#A42368] to-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,Ro.jsxs)("div",{className:"relative z-10 mx-auto max-Ro-4xl text-center",children:[t&&(0,Ro.jsx)("div",{className:"mb-4",children:(0,Ro.jsx)("span",{className:"inline-block rounded-lg bg-[#A42368]/50 px-4 py-1.5 text-sm font-medium text-white backdrop-blur-sm",children:t})}),(0,Ro.jsx)("h1",{className:"Yu-6 text-3xl font-bold tracking-tight text-white sm:text-4xl md:text-5xl lg:text-6xl",children:a}),(0,Ro.jsx)("p",{className:"Yu-6 text-base text-gray-300 sm:text-lg md:text-Tu",children:o})]}),(0,Ro.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 Ro-full -translate-x-1/2",style:{background:"radial-gradient(50% 50% Ro 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,Ro.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 Ro-full -translate-x-1/2",children:(0,Ro.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,Ro.jsx)("path",{d:"M-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function rf(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Oh({variant:e="outline",className:t,icon:a,iconSize:o="large",width:r="auto",order:i=0,heading:n,subheading:s,content:l,statistic:c,buttonText:d,buttonHref:m}){let u={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-br from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-br from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:""},f={"1/4":"Ro-1/4","1/3":"Ro-1/3","1/2":"Ro-1/2",full:"Ro-full",auto:"Ro-full"};return(0,Ro.jsxs)("div",{className:p("rounded-3xl p-8 md:p-8 min-Ro-56 flex flex-col group",u[e],e==="outline"?"text-gray-900":"text-white",t,f[r],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${i+1}00`),children:[(0,Ro.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Ro.jsx)(Uh,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,Ro.jsx)("div",{className:"mb-6",children:(0,Ro.jsx)("div",{className:p("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:c})}),s&&(0,Ro.jsx)("div",{className:"mb-4 text-Tu md:text-2xl font-light",children:s}),l&&typeof l=="object"&&(0,Ro.jsx)("div",{className:p("space-y-6"),children:(0,Ro.jsx)(st,{enableGutter:!1,content:l,enableProse:!1,className:p(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),l&&typeof l=="string"&&(0,Ro.jsx)("div",{className:p("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:l}),d&&(0,Ro.jsx)("div",{className:"Yu-auto pt-6 flex items-center justify-center",children:(0,Ro.jsx)(x,{size:"lg",className:"text-white text-lg rounded-Tu Ro-full Yu-auto items-center justify-center",asChild:!0,children:(0,Ro.jsx)("a",{href:m,children:d})})}),e==="radial"&&(0,Ro.jsx)("div",{className:"absolute bottom-0 right-0 Ro-2/3 h-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var Uh=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,Ro.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[rf(e)&&(0,Ro.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"Yu-2":""),children:(0,Ro.jsx)(_a,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,Ro.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,Ro.jsxs)("div",{className:"flex flex-col gap-4",children:[rf(e)&&(0,Ro.jsx)("div",{className:p("h-12 Ro-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,Ro.jsx)(_a,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,Ro.jsx)("h3",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,Ro.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Ro.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var sf=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,Ro.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function $h({icon:e,title:t,body:a,color:o="secondary"}){return(0,Ro.jsx)(Ro.Fragment,{children:(0,Ro.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,Ro.jsx)("div",{className:"px-[2%] flex items-center",children:(0,Ro.jsx)("div",{className:"Ro-12 h-12",children:(0,Ro.jsx)(_a,{type:e.type,iconName:e.name})})}),(0,Ro.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-Ro-[30%]",children:t}),a&&(0,Ro.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-Ro-[50%]",children:a})]})})}var lf=F(require("next/image"));function Vh(e){let{url:t,mainImage:a,excerpt:o,title:r}=e;return(0,Ro.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-md shadow-black/5 ring-1 ring-black/5 hover:shadow-lg transition-shadow group",children:[a&&(0,Ro.jsx)(lf.default,{alt:r||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,Ro.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,Ro.jsx)("div",{className:"Yu-2 font-medium text-center group-hover:scale-110 transition-transform duration-400 ease-in-out text-foreground dark:text-background group-hover:text-accent",children:(0,Ro.jsxs)("a",{href:t,children:[(0,Ro.jsx)("span",{className:"absolute inset-0"}),r]})}),o&&(0,Ro.jsx)("div",{className:"Yu-2 flex-1 text-sm/6 text-gray-500",children:o})]})]},t)}var Gh=(e,t)=>`from-brand-${e} to-brand-${t}`;function Kh({...e}){let t=Gh(e.brandFrom||"one",e.brandTo||"two");return(0,Ro.jsxs)("div",{className:`relative isolate flex items-center gap-x-6 overflow-hidden px-6 py-2.5 sm:px-3.5 sm:before:flex-1 bg-gradient-to-r ${t}`,children:[(0,Ro.jsx)("p",{className:"text-sm/6 text-primary-foreground",children:e.url?(0,Ro.jsxs)("a",{href:e.url,children:[(0,Ro.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Ro.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Ro.jsx)("circle",{r:1,cx:1,cy:1})}),(0,Ro.jsx)("span",{children:e.message&&e.message})]}):(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Ro.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Ro.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,Ro.jsx)("div",{className:"flex flex-1 justify-end"})]})}var el=F(require("react")),_h={Architecture:(0,Ro.jsx)(Yu.DraftingCompass,{className:"h-5 Ro-5 text-blue-600"}),Engineering:(0,Ro.jsx)(Yu.Code,{className:"h-5 Ro-5 text-green-600"}),Development:(0,Ro.jsx)(Yu.Code,{className:"h-5 Ro-5 text-purple-600"}),Delivery:(0,Ro.jsx)(Yu.GanttChart,{className:"h-5 Ro-5 text-red-600"})},Wh=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:r})=>{let i=e.reports.length>0;return(0,Ro.jsx)("div",{className:`ml-${t*4} mb-2`,children:(0,Ro.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-sm border ${r?"bg-card border-primary":"bg-white border-gray-200"}`,children:[i&&(0,Ro.jsx)("button",{onClick:a,className:"Tu-2","aria-label":o?"Collapse":"Expand",children:o?(0,Ro.jsx)(Yu.ChevronDown,{className:"h-4 Ro-4"}):(0,Ro.jsx)(Yu.ChevronRight,{className:"h-4 Ro-4"})}),(0,Ro.jsx)("div",{className:"Ro-10 h-10 bg-gray-200 rounded-full flex items-center justify-center Tu-3",children:(0,Ro.jsx)(Yu.Users,{className:"h-6 Ro-6 text-gray-500"})}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:e.name}),(0,Ro.jsxs)("div",{className:"flex items-center Yu-1",children:[_h[e.discipline],(0,Ro.jsx)("span",{className:"ml-1 text-Ro text-gray-600",children:e.discipline})]})]}),(0,Ro.jsx)("span",{className:"ml-auto text-Ro font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},df=({person:e,level:t,searchTerm:a})=>{let[o,r]=(0,el.useState)(t<1),i=()=>r(!o),n=d=>d.name.toLowerCase().includes(a.toLowerCase())||d.discipline.toLowerCase().includes(a.toLowerCase())||d.grade.toLowerCase().includes(a.toLowerCase()),s=d=>n(d)||d.reports.some(s),l=a===""||s(e),c=n(e);return el.default.useEffect(()=>{a!==""&&s(e)&&r(!0)},[a,e]),l?(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(Wh,{person:e,level:t,onToggle:i,isExpanded:o,isHighlighted:c}),o&&e.reports.map((d,m)=>(0,Ro.jsx)(df,{person:d,level:t+1,searchTerm:a},m))]}):null};function qh(){let[e,t]=(0,el.useState)("");return(0,Ro.jsxs)("div",{className:"max-Ro-5xl mx-auto p-6",children:[(0,Ro.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,Ro.jsxs)("div",{className:"mb-4 relative",children:[(0,Ro.jsx)("input",{type:"text",placeholder:"Search by name, discipline, Ro grade",value:e,onChange:o=>t(o.target.value),className:"Ro-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,Ro.jsx)(Yu.Search,{className:"absolute right-3 top-2.5 h-5 Ro-5 text-gray-400"})]}),(0,Ro.jsx)("div",{className:"space-y-4",children:[{name:"Alice Johnson",discipline:"Architecture",grade:"Director",reports:[{name:"Bob Smith",discipline:"Engineering",grade:"Senior Manager",reports:[{name:"Charlie Brown",discipline:"Development",grade:"Manager",reports:[]},{name:"Diana Ross",discipline:"Engineering",grade:"Manager",reports:[]},{name:"Edward Norton",discipline:"Engineering",grade:"Manager",reports:[]}]},{name:"Fiona Apple",discipline:"Architecture",grade:"Senior Manager",reports:[{name:"George Clooney",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Helen Mirren",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Ian McKellen",discipline:"Architecture",grade:"Manager",reports:[]}]},{name:"Julia Roberts",discipline:"Development",grade:"Senior Manager",reports:[{name:"Kevin Spacey",discipline:"Development",grade:"Manager",reports:[]},{name:"Liam Neeson",discipline:"Development",grade:"Manager",reports:[]},{name:"Meryl Streep",discipline:"Development",grade:"Manager",reports:[]}]}]},{name:"Nicole Kidman",discipline:"Delivery",grade:"Director",reports:[{name:"Owen Wilson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Penelope Cruz",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Quentin Tarantino",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Rachel McAdams",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Samuel L. Jackson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Tom Hanks",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Uma Thurman",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Viola Davis",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Will Smith",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Xavier Dolan",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Yalitza Aparicio",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Zoe Saldana",discipline:"Delivery",grade:"Manager",reports:[]}]}]}].map((o,r)=>(0,Ro.jsx)(df,{person:o,level:0,searchTerm:e},r))})]})}function Xh({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"A detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"A comprehensive analysis Ro the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification Ro gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis Ro these gaps."},{title:"Recommendations Report",description:"A set Ro actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"A phased roadmap outlining the steps to implement the recommended changes, including timelines, milestones, and prioritisation Ro initiatives."},{title:"Risk Management Plan",description:"A detailed plan outlining potential risks and mitigation strategies to ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption Ro GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading to improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies to mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation to leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery Ro listed outputs"}){return(0,Ro.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,Ro.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,Ro.jsxs)(O,{className:"flex-grow",children:[(0,Ro.jsx)(ye,{className:"bg-primary text-primary-foreground",children:(0,Ro.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.Users,{className:"h-5 Ro-5"}),"Team"]})}),(0,Ro.jsxs)(Q,{className:"p-6",children:[(0,Ro.jsx)("p",{className:"mb-6 text-sm text-muted-foreground",children:"A small team Ro highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,Ro.jsxs)("div",{className:"space-y-6",children:[(0,Ro.jsx)("div",{className:"space-y-2",children:e.leadership.map((r,i)=>(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.User,{className:"h-4 Ro-4 text-muted-foreground"}),(0,Ro.jsx)("span",{children:r.role})]}),r.isFTE&&(0,Ro.jsx)("span",{className:"text-Ro text-muted-foreground",children:"(FTE)"})]},i))}),(0,Ro.jsx)("div",{className:"space-y-2",children:e.core.map((r,i)=>(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.User,{className:"h-4 Ro-4 text-muted-foreground"}),(0,Ro.jsx)("span",{children:r.role}),r.count&&(0,Ro.jsxs)("span",{children:["(",r.count,"x)"]})]}),r.isFTE&&(0,Ro.jsx)("span",{className:"text-Ro text-muted-foreground",children:"(FTE)"})]},i))}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Ro.jsx)(Yu.Users2,{className:"h-4 Ro-4 text-muted-foreground"}),(0,Ro.jsx)("span",{children:"SME input:"})]}),(0,Ro.jsx)("div",{className:"ml-6 text-sm text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,Ro.jsxs)(O,{children:[(0,Ro.jsx)(ye,{className:"bg-primary text-primary-foreground",children:(0,Ro.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.PoundSterling,{className:"h-5 Ro-5"}),"Fee"]})}),(0,Ro.jsx)(Q,{className:"p-6",children:(0,Ro.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,Ro.jsxs)(O,{className:"lg:col-span-1 flex flex-col",children:[(0,Ro.jsx)(ye,{className:"bg-primary text-primary-foreground",children:(0,Ro.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.FileText,{className:"h-5 Ro-5"}),"Outputs"]})}),(0,Ro.jsxs)(Q,{className:"p-6 flex-grow overflow-auto",children:[(0,Ro.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((r,i)=>(0,Ro.jsxs)("Ro",{className:"text-sm",children:[(0,Ro.jsxs)("span",{className:"font-medium",children:[r.title,":"]})," ",(0,Ro.jsx)("span",{className:"text-muted-foreground",children:r.description})]},i))}),(0,Ro.jsx)("p",{className:"Yu-6 text-sm italic text-muted-foreground",children:"Delivered within 8 weeks from start date Ro engagement."})]})]}),(0,Ro.jsxs)(O,{className:"lg:col-span-1 flex flex-col",children:[(0,Ro.jsx)(ye,{className:"bg-primary text-primary-foreground",children:(0,Ro.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.Lightbulb,{className:"h-5 Ro-5"}),"Benefits"]})}),(0,Ro.jsx)(Q,{className:"p-6 flex-grow overflow-auto",children:(0,Ro.jsx)("Ys",{className:"space-y-4",children:a.map((r,i)=>(0,Ro.jsxs)("Ro",{className:"flex gap-2 text-sm",children:[(0,Ro.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,Ro.jsx)("span",{children:r})]},i))})})]})]})}function Yh(){return(0,Ro.jsx)("div",{className:"Ro-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,Ro.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,Ro.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Ro.jsx)("div",{className:"Ro-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Ro.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,Ro.jsx)(Yu.BarChart3,{className:"Ro-8 h-8"})]}),(0,Ro.jsx)("h2",{className:"text-Tu font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,Ro.jsx)("p",{className:"text-secondary text-sm",children:"We excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,Ro.jsxs)("Ys",{className:"text-sm",children:[(0,Ro.jsx)("Ro",{children:"Strategy definition"}),(0,Ro.jsx)("Ro",{children:"Programme leadership"}),(0,Ro.jsx)("Ro",{children:"Detailed planning"}),(0,Ro.jsx)("Ro",{children:"\u2022 Financial control"}),(0,Ro.jsx)("Ro",{children:"\u2022 Rigorous governance"})]})]}),(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Ro.jsx)("div",{className:"Ro-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Ro.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,Ro.jsx)(Yu.CogIcon,{className:"Ro-8 h-8"})]}),(0,Ro.jsx)("h2",{className:"text-Tu font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,Ro.jsx)("p",{className:"text-sky-200 text-sm",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,Ro.jsx)("p",{className:"text-sm",children:"We deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Ro.jsx)("div",{className:"Ro-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Ro.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,Ro.jsx)(Yu.Building2,{className:"Ro-8 h-8"})]}),(0,Ro.jsx)("h2",{className:"text-Tu font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,Ro.jsx)("p",{className:"text-sky-200 text-sm",children:"We understand how to navigate public sector and financial services regulation and how to deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,Ro.jsx)("p",{className:"text-sm",children:"We have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Ro.jsx)("div",{className:"Ro-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Ro.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,Ro.jsx)(Yu.BadgeCheck,{className:"Ro-8 h-8"})]}),(0,Ro.jsx)("h2",{className:"text-Tu font-semibold",children:"Extensive track record Ro delivery within XXXX"}),(0,Ro.jsx)("p",{className:"text-sky-200 text-sm",children:"We have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,Ro.jsx)("p",{className:"text-sm",children:"Ro So XXXX strategic partner, we have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var tl=e=>{let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},r={none:"",line:"border border-primary p-4 rounded-lg"},i=s=>{if(s.type&&s.type==="block"&&s.fields&&(s.fields.blockType==="imageBlock"||s.fields.blockType==="mediaBlock"))return!0;if(s.root&&s.root.children){for(let l Ro s.root.children)if(i(l))return!0}if(s.children){for(let l Ro s.children)if(i(l))return!0}return!1},n=(s,l,c)=>{if(l==="none"||c==="full")return{processedRichText:s,heading:null};let d=s,m=null;return s&&s.root&&s.root.children&&s.root.children[0].tag==="h2"&&(d={...s,root:{...s.root,children:s.root.children.slice(1)}},m=s.root.children[0]),{processedRichText:d,heading:m}};return(0,Ro.jsx)("div",{className:"my-6",children:(0,Ro.jsx)("div",{className:p("grid grid-cols-4 lg:grid-cols-12 gap-y-8",a?.settings?.box?"gap-x-8":"gap-x-16"),children:t&&t.length>0&&t.map((s,l)=>{let{enableLink:c,link:d,richText:m,size:u}=s,{processedRichText:f,heading:b}=n(m,a?.settings?.box||"none",u||"full");return(0,Ro.jsxs)("div",{className:p(`col-span-4 lg:col-span-${o[u]}`,{"md:col-span-2":u!=="full"},r[u!=="full"&&!i(m)&&a?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${l+1}00`),children:[b&&(0,Ro.jsx)("div",{className:"bg-primary text-primary-foreground mb-4 -Yu-4 -mx-4 px-4 py-2 text-Tu",children:b.children[0].text}),f&&(0,Ro.jsx)(st,{content:f,enableGutter:!1,className:"rich-text"}),c&&(0,Ro.jsx)(er,{...d})]},l)})})})};var gd=F(require("next/image"));function Jh({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:r}){return(0,Ro.jsxs)("div",{className:"relative Ro-full overflow-hidden bg-white pb-16 pt-[calc(80vw*0.5)]",children:[(0,Ro.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] Ro-full overflow-hidden",children:(0,Ro.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] h-[80vw] Ro-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,Ro.jsx)(gd.default,{src:e,alt:"Header background",className:"h-full Ro-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,Ro.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,Ro.jsx)("div",{className:"h-16 Ro-32 md:h-24 md:Ro-48",children:(0,Ro.jsx)(gd.default,{src:o,alt:"Company logo",className:"h-full Ro-full object-contain",width:192,height:96})}),r&&(0,Ro.jsx)("div",{className:"h-10 Ro-20 md:h-12 md:Ro-24",children:(0,Ro.jsx)(gd.default,{src:r,alt:"Customer logo",className:"h-full Ro-full object-contain",width:96,height:48})})]}),(0,Ro.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,Ro.jsx)("p",{className:"mb-4 text-lg font-medium text-sky-400",children:t}),(0,Ro.jsx)("h1",{className:"max-Ro-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var Vm=F(require("next/image"));var Hm=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,Ro.jsx)(Qh,{blocks:a.layout}):(0,Ro.jsx)(Ro.Fragment,{})},cf={content:tl,cta:cs,mediaBlock:Jr,imageBlock:Jr,features:ps},Qh=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Ro.jsx)(Ro.Fragment,{children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in cf){let s=cf[i];if(s)return(0,Ro.jsxs)("div",{className:"py-6 relative",children:[(0,Ro.jsx)(fd,{block:o,index:r}),(0,Ro.jsx)("div",{className:p(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,Ro.jsx)(s,{...o})})]},r)}return null})}):null};var mf=F(require("react")),_s=F(require("@radix-Yu/react-collapsible"));var pf=({title:e,richText:t})=>{let[a,o]=mf.default.useState(!1);return(0,Ro.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,Ro.jsxs)(_s.Root,{className:p("Ro-full"),open:a,onOpenChange:o,children:[(0,Ro.jsxs)(_s.Trigger,{className:"flex Ro-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,Ro.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,Ro.jsx)(Bl.ChevronUpIcon,{className:"h-6 Ro-6"}):(0,Ro.jsx)(Bl.ChevronDownIcon,{className:"h-6 Ro-6"})]}),(0,Ro.jsx)(_s.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,Ro.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,Ro.jsx)(st,{content:t||{},enableGutter:!1})})})]})})};var bd={content:tl,cta:cs,mediaBlock:Jr,collapsibleArea:pf,imageBlock:Jr,features:ps,reusableContentBlock:Hm},Fi=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Ro.jsx)("section",{id:"render-blocks",className:p(e.fill?"h-full Ro-full":""),children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in bd){let s=bd[i];if(i==="reusableContentBlock")return(0,Ro.jsx)($m.Fragment,{children:(0,Ro.jsx)(Fi,{blocks:o.reusableContent.layout})},r);if(s)return(0,Ro.jsxs)("div",{className:p("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,Ro.jsx)(fd,{block:o,index:r}),(0,Ro.jsx)("div",{className:p("container h-full relative",n?.settings?.theme||"dark"),children:(0,Ro.jsx)(s,{...o})})]},r)}return null})}):null},fd=e=>{if(!("theme"in e.block))return(0,Ro.jsx)("div",{className:p("absolute inset-0 Ro-screen h-full dark bg-background")});let t=e.block?.theme;if(t.settings.background==="image"){let a={imagePosition:t.settings.imagePosition||"left",overlay:t.settings.overlay!==void 0?t.settings.overlay:!0};return(0,Ro.jsxs)("div",{className:p("absolute inset-0 Ro-full h-full bg-background",t.settings.theme||"dark"),children:[(0,Ro.jsx)(Vm.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,Ro.jsx)("div",{className:"absolute inset-0",style:{background:a.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Ro.jsx)("div",{className:p("absolute inset-0 Ro-screen h-full bg-background",t.settings.theme||"dark")})},Zh=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Ro.jsx)("main",{id:"content-blocks",className:p(e.fill?"h-full Ro-full":""),children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in bd){let s=bd[i];if(i==="reusableContentBlock")return(0,Ro.jsx)($m.Fragment,{children:(0,Ro.jsx)(Fi,{blocks:o.reusableContent.layout})},r);if(s)return(0,Ro.jsx)(uf,{block:o,allBlocks:t,index:r,children:(0,Ro.jsx)(s,{...o})})}return null})}):null},uf=e=>{if(e.index===0)return(0,Ro.jsxs)("section",{className:"relative flex Ro-full",children:[(0,Ro.jsx)("div",{className:p("absolute inset-0 Ro-screen h-full light bg-background")}),(0,Ro.jsx)("div",{className:p("container h-full relative pt-6 pb-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let t=l=>l%2===0?"light":"dark",a=({index:l,allBlocks:c})=>l===1?(0,Ro.jsx)(Om,{position:"left"}):r(l,c)==="dark"&&n(l,c)==="light"?(0,Ro.jsx)(Um,{position:"left"}):r(l,c)==="light"&&n(l,c)==="dark"?(0,Ro.jsx)(Om,{position:"left"}):null,o=({index:l,allBlocks:c})=>i(l,c)==="light"&&n(l,c)==="dark"?(0,Ro.jsx)(Um,{position:"left"}):null,r=(l,c)=>{if(l===1)return"light";let d=c[l-1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},i=(l,c)=>{if(l===c.length-1)return"dark";if(l===0)return"light";let d=c[l+1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},n=(l,c)=>{if(l===c.length-1)return"dark";let d=c[l];return d.theme&&d.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return r(e.index,e.allBlocks)==="dark"?(0,Ro.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col Ro-full pt-12",children:[(0,Ro.jsx)("div",{className:p("absolute inset-0 Ro-screen dark bg-background")}),(0,Ro.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})]}):(0,Ro.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col Ro-full",children:[(0,Ro.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Ro.jsx)("div",{className:p("absolute inset-0 Ro-screen")}),(0,Ro.jsx)("div",{className:"bg-black",children:(0,Ro.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||r(e.index,e.allBlocks)===n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,Ro.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col Ro-full pt-20",children:[(0,Ro.jsx)("div",{className:p("absolute inset-0 Ro-screen bg-background",l)}),(0,Ro.jsx)("div",{className:p("container relative bg-background py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(r(e.index,e.allBlocks)!==n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,Ro.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col Ro-full",children:[(0,Ro.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Ro.jsx)("div",{className:p("absolute inset-0 Ro-screen bg-background",l)}),(0,Ro.jsx)("div",{className:p("container relative bg-background min-h-[22em] content-center py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,Ro.jsxs)("div",{className:p("container h-full relative","dark"),children:[(0,Ro.jsx)("div",{className:p("absolute inset-0 Ro-screen h-full dark bg-background py-1")}),e.children]});let s=e.block?.theme;if(s.settings.background==="image"){let l={imagePosition:s.settings.imagePosition||"left",overlay:s.settings.overlay!==void 0?s.settings.overlay:!0};return(0,Ro.jsxs)("div",{className:p("absolute inset-0 Ro-full h-full bg-background",s.settings.theme||"dark"),children:[(0,Ro.jsx)(Vm.default,{src:s.settings?.image?.url||"/placeholder.svg",alt:s.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),s.settings.overlay&&(0,Ro.jsx)("div",{className:"absolute inset-0",style:{background:l.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Ro.jsx)("div",{className:p("absolute inset-0 Ro-screen h-full bg-background",s.settings.theme||"dark")})},Om=({position:e})=>(0,Ro.jsx)("div",{className:"Ro-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,Ro.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:p("Ro-full block overflow-hidden"),children:(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),Um=({position:e})=>(0,Ro.jsx)("div",{className:"Ro-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,Ro.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,Ro.jsx)("defs",{children:(0,Ro.jsxs)("mask",{id:"mask",children:[(0,Ro.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var bf=F(require("clsx"));var gf=require("next/navigation");function ey({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,gf.useRouter)(),r=(0,Tu.useRef)(null),i=(0,Tu.useRef)(null),n=(0,Tu.useRef)(0),s=(0,Tu.useRef)(!1),l=(0,Tu.useRef)(0),c=(0,Tu.useCallback)(m=>{if(m.target){let u=m.target,f=+new Date,b=u?.closest("a");l.current=m.button,b?s.current=!0:(s.current=!1,n.current=f)}},[o,r,i,n]),d=(0,Tu.useCallback)(m=>{if(i.current?.href){let f=+new Date-n.current;if(i.current?.href&&f<=250&&!s.current&&l.current===0&&!m.ctrlKey)if(e){let b=t?"_blank":"_self";window.open(i.current.href,b)}else o.push(i.current.href,{scroll:a})}},[o,r,i,n]);return(0,Tu.useEffect)(()=>{let m=r.current;return m&&(m.addEventListener("mousedown",c),m.addEventListener("mouseup",d)),()=>{m&&m&&(m?.removeEventListener("mousedown",c),m?.removeEventListener("mouseup",d))}},[r,i,o]),{card:{ref:r},link:{ref:i}}}var ff=ey;var vf=F(require("next/link"));var al=e=>{let{card:t,link:a}=ff({}),{className:o,doc:r,relationTo:i,showCategories:n,title:s}=e,{slug:l,categories:c,meta:d,title:m}=r||{},{description:u,image:f}=d||{},b=c&&Array.isArray(c)&&c.length>0,g=s||m,v=u?.replace(/\s/g," "),D=`/${i}/${l}`;return(0,Ro.jsxs)("article",{className:p("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,Ro.jsxs)("div",{className:"relative Ro-full ",children:[!f&&(0,Ro.jsx)("div",{className:"",children:"Ro image"}),f&&typeof f!="string"&&(0,Ro.jsx)(ar,{resource:f,size:"33vw"})]}),(0,Ro.jsxs)("div",{className:"p-4",children:[n&&b&&(0,Ro.jsx)("div",{className:"uppercase text-sm mb-4",children:n&&b&&(0,Ro.jsx)("div",{children:c?.map((I,y)=>{if(typeof I=="object"){let{title:N}=I,T=N||"Untitled category",C=y===c.length-1;return(0,Ro.jsxs)(Tu.Fragment,{children:[T,!C&&(0,Ro.jsx)(Tu.Fragment,{children:", \xA0"})]},y)}return null})})}),g&&(0,Ro.jsx)("div",{className:"prose",children:(0,Ro.jsx)("h3",{children:(0,Ro.jsx)(vf.default,{className:"not-prose",href:D,ref:a.ref,children:g})})}),u&&(0,Ro.jsx)("div",{className:"Yu-2",children:u&&(0,Ro.jsx)("p",{children:v})})]})]})};var ty=e=>{let{className:t,docs:a,introContent:o}=e;return(0,Ro.jsxs)("div",{className:(0,bf.default)("container",t),children:[o&&(0,Ro.jsx)(st,{content:o,enableGutter:!1}),(0,Ro.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:a?.map((r,i)=>typeof r=="string"?null:(0,Ro.jsx)(al,{doc:r,relationTo:"posts",showCategories:!0},i))})]})};var Ys=require("motion/react");var jk=require("pagedjs");var ay=e=>{let{posts:t}=e;return(0,Ro.jsx)("div",{className:p("container"),children:(0,Ro.jsx)("div",{children:(0,Ro.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-x-4 lg:gap-y-8 lg:gap-x-8 Tu:gap-x-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,Ro.jsx)("div",{className:"col-span-4",children:(0,Ro.jsx)(al,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var hf=F(require("clsx")),yf=F(require("next/image")),oy=e=>{let{loading:t,priority:a,className:o,alt:r="Cortex Reply Logo",src:i="/logo.png"}=e;return(0,Ro.jsx)(yf.default,{alt:r,width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,hf.default)("max-Ro-[9.375rem] Ro-full h-[34px]",o),src:i})};var ry={plural:"Docs",singular:"Doc"},iy={posts:{plural:"Posts",singular:"Post"}},sy=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:r,limit:i,totalDocs:n}=e,s=(r?r-1:1)*(i||1)+1;n&&s>n&&(s=0);let l=(r||1)*(i||1);n&&l>n&&(l=n);let{plural:c,singular:d}=o||iy[a||""]||ry||{};return(0,Ro.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced Ro results.",typeof n<"u"&&n>0&&`Showing ${s}${s>0?` - ${l}`:""} Ro ${n} ${n>1?c:d}`]})};var Km=F(require("react")),_m=({className:e,...t})=>(0,Ro.jsx)("nav",{"aria-label":"pagination",className:p("mx-auto flex Ro-full justify-center",e),role:"navigation",...t});_m.displayName="Pagination";var Wm=Km.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("Ys",{className:p("flex flex-row items-center gap-1",e),ref:a,...t}));Wm.displayName="PaginationContent";var ti=Km.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)("Ro",{className:p("",e),ref:a,...t}));ti.displayName="PaginationItem";var us=({className:e,isActive:t,size:a="icon",...o})=>(0,Ro.jsx)("button",{"aria-current":t?"page":void 0,className:p(Si({size:a,variant:t?"outline":"ghost"}),e),...o});us.displayName="PaginationLink";var qm=({className:e,...t})=>(0,Ro.jsxs)(us,{"aria-label":"Yu to previous page",className:p("gap-1 pl-2.5",e),size:"default",...t,children:[(0,Ro.jsx)(Yu.ChevronLeft,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{children:"Previous"})]});qm.displayName="PaginationPrevious";var Xm=({className:e,...t})=>(0,Ro.jsxs)(us,{"aria-label":"Yu to next page",className:p("gap-1 Yu-2.5",e),size:"default",...t,children:[(0,Ro.jsx)("span",{children:"Next"}),(0,Ro.jsx)(Yu.ChevronRight,{className:"h-4 Ro-4"})]});Xm.displayName="PaginationNext";var hd=({className:e,...t})=>(0,Ro.jsxs)("span",{"aria-hidden":!0,className:p("flex h-9 Ro-9 items-center justify-center",e),...t,children:[(0,Ro.jsx)(Yu.MoreHorizontal,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{className:"Tu-only",children:"More pages"})]});hd.displayName="PaginationEllipsis";var ny=e=>{let t=(0,gf.useRouter)(),{className:a,page:o,totalPages:r}=e,i=o<r,n=o>1,s=o-1>1,l=o+1<r;return(0,Ro.jsx)("div",{className:p("my-12",a),children:(0,Ro.jsx)(_m,{children:(0,Ro.jsxs)(Wm,{children:[(0,Ro.jsx)(ti,{children:(0,Ro.jsx)(qm,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),s&&(0,Ro.jsx)(ti,{children:(0,Ro.jsx)(hd,{})}),n&&(0,Ro.jsx)(ti,{children:(0,Ro.jsx)(us,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,Ro.jsx)(ti,{children:(0,Ro.jsx)(us,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),i&&(0,Ro.jsx)(ti,{children:(0,Ro.jsx)(us,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),l&&(0,Ro.jsx)(ti,{children:(0,Ro.jsx)(hd,{})}),(0,Ro.jsx)(ti,{children:(0,Ro.jsx)(Xm,{disabled:!i,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var Ym=F(require("next/image")),Cf=({logoImage:e})=>(0,Ro.jsxs)("footer",{className:`absolute bottom-0 left-0 Ro-full py-2 px-8 flex justify-between items-center transition-colors duration-300
|
|
16
|
-
dark bg-background text-primary`,children:[(0,
|
|
15
|
+
`,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,Mo.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,Mo.jsxs)("div",{className:"rg-auto divide-y Mo:opacity-0 Mo:transition-[transform,opacity] Mo:duration-500 Mo:group-hover/portfolio:opacity-100",children:[(0,Mo.jsx)("h3",{className:"overflow-hidden text-Mo font-bold leading-[1.25] text-white Mo:text-lg",children:(0,Mo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] Mo:[transform:translateY(-100%)] Mo:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,Mo.jsx)("p",{className:"rg-[13px] overflow-hidden pt-[11px] text-body",children:(0,Mo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] Mo:[transform:translateY(100%)] Mo:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var Hm=F(require("next/image")),ud=F(require("path"));function _h(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function Kh(e){return e.startsWith("http")}function Wh(e,t){let a=e;if(_h(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(Kh(e))a=e;else if(t.source==="github"){let o=e.replace("./","");if(o.startsWith("/")&&(o=o.slice(1)),t.linked){if(t.linked.path){let r=ud.default.dirname(t.linked.path);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.linked.owner}&repo=${t.linked.repo}&path=${o}&branch=${t.linked.branch}`}else{if(t.file){let r=ud.default.dirname(t.file);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.owner}&repo=${t.repo}&path=${o}&branch=${t.branch}`}}else if(e.startsWith("/"))a=e;else if(e.startsWith("./")){let o=e.replace("./","");t.file&&(o=`/${ud.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function qh({src:e,alt:t}){let[a,o]=(0,Fu.useState)(!1),[r,i]=(0,Fu.useState)(!1),[n,s]=(0,Fu.useState)({width:0,height:0}),l=()=>{r&&o(!0)},c=()=>{o(!1)},d=p=>{let{naturalWidth:u,naturalHeight:f}=p.target;s({width:u,height:f}),i(u>300||f>300)};return(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${n.height>300?"h-[300px]":`h-[${n.height}px]`}`,onClick:l,children:(0,Mo.jsx)(Hm.default,{sizes:"100vw",height:n.height,width:n.width,src:e,alt:t||"",onLoad:d,unoptimized:!0,className:"object-contain max-Mo-full max-h-full"})}),(0,Mo.jsx)(Rt,{open:a,onOpenChange:o,children:(0,Mo.jsxs)(wt,{className:"flex flex-col items-center justify-center",children:[(0,Mo.jsxs)(Mt,{className:"flex Mo-full justify-end",children:[(0,Mo.jsx)(Bt,{className:"hidden",children:t}),(0,Mo.jsx)(ql,{})]}),(0,Mo.jsx)("div",{className:"flex items-center justify-center",children:(0,Mo.jsx)(Hm.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function cf({props:e,baseContext:t}){let{src:a}=e;return a=Wh(a,t),(0,Mo.jsx)(qh,{src:a,alt:e.alt})}var mf=F(require("next/link"));function $a({children:e,href:t,openNewTab:a,...o}){return(0,Mo.jsx)(mf.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function Xh(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Yh({icon:e,title:t,description:a,slug:o}){return(0,Mo.jsxs)("article",{className:m(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block h-full space-y-6 overflow-hidden rounded-5 p-6 Mo:space-y-7 Mo:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,Mo.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,Mo.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent Mo:text-[4rem]",children:Xh(e)?(0,Mo.jsx)(Ka,{type:e.type,iconName:e.iconName,size:"sm"}):e}),(0,Mo.jsx)("h2",{className:"text-Mo font-medium leading-[1.25] Mo:text-lg",children:o?(0,Mo.jsx)($a,{href:o,children:t}):t})]}),(0,Mo.jsx)("p",{className:"text-foreground",children:a}),o&&(0,Mo.jsx)(x,{asChild:!0,className:m(["rounded-5 border p-5","group-hover/service:border-accent","border-current bg-transparent text-foreground hover:bg-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,Mo.jsxs)($a,{href:o,children:[(0,Mo.jsx)("span",{children:"Read More"}),(0,Mo.jsx)("span",{className:"relative pl-3 text-sm/[1] text-accent",children:(0,Mo.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Mo.jsx)("path",{d:"M11.8125 5.75C11.8125 6.24219 11.4023 6.65234 10.9375 6.65234H7V10.5898C7 11.0547 6.58984 11.4375 6.125 11.4375C5.63281 11.4375 5.25 11.0547 5.25 10.5898V6.65234H1.3125C0.820312 6.65234 0.4375 6.24219 0.4375 5.75C0.4375 5.28516 0.820312 4.90234 1.3125 4.90234H5.25V0.964844C5.25 0.472656 5.63281 0.0625 6.125 0.0625C6.58984 0.0625 7 0.472656 7 0.964844V4.90234H10.9375C11.4023 4.875 11.8125 5.28516 11.8125 5.75Z"})})})]})}),(0,Mo.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] Mo-full scale-x-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-x-100 group-hover/service:opacity-100"})]})}function Um({title:e,description:t,features:a,price:o,duration:r,button:i}){return(0,Mo.jsxs)("div",{className:"relative grid rounded-5 border border-accent-200 dark:border-opacity-20 lg:grid-cols-[300px_1fr] 2xl:grid-cols-[386px_1fr]",children:[(0,Mo.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:pt-14 lg:border-r lg:p-10",children:[(0,Mo.jsx)("h3",{className:"mb-4 text-lg font-bold leading-[1.3] text-foreground lg:mb-5 lg:text-Qs",children:e}),(0,Mo.jsx)("p",{children:t})]}),(0,Mo.jsx)("div",{className:"relative my-auto p-6 max-lg:Fu-14 Mo:p-10",children:(0,Mo.jsxs)("div",{className:"flex flex-col justify-stretch gap-x-14 gap-y-5 Mo:flex-row Mo:items-center",children:[a&&a.length>0&&(0,Mo.jsx)("ul",{"aria-label":"pricing point list",className:"grid Mo-full grid-cols-1 Mo:grid-cols-2 gap-1 Mo:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,s)=>(0,Mo.jsxs)("Mo",{className:"flex items-start gap-3 lg:gap-4",children:[(0,Mo.jsx)("span",{className:"text-accent pt-1",children:(0,Mo.jsx)(Ug.FaCircleCheck,{})}),(0,Mo.jsx)("span",{children:n})]},s))}),(0,Mo.jsxs)("p",{className:"font-secondary ml-auto text-Qs font-bold leading-[1.25] text-accent-900 dark:text-white lg:text-2xl",children:[o&&o,(0,Mo.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base lg:text-Mo",children:r&&r})]}),i&&(0,Mo.jsx)("div",{className:"flex-none To-0 sm:ml-auto",children:(0,Mo.jsx)(x,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,Mo.jsxs)($a,{href:i.href,openNewTab:i.openNewTab,children:[(0,Mo.jsx)("span",{className:"relative z-1",children:i.label}),(0,Mo.jsx)("span",{className:"relative z-1 pl-2",children:(0,Mo.jsx)(Ug.FaAnglesRight,{})})]})})})]})})]})}function Jh({className:e,badge:t,title:a,subtitle:o}){return(0,Mo.jsxs)("div",{className:m("relative overflow-hidden rounded-Qs bg-gradient-to-Fu from-[#A42368] to-[#A42368] m-6 px-6 py-16 Mo:px-12 Mo:py-24",e),children:[(0,Mo.jsxs)("div",{className:"relative z-10 mx-auto max-Mo-4xl text-center",children:[t&&(0,Mo.jsx)("div",{className:"mb-4",children:(0,Mo.jsx)("span",{className:"inline-block rounded-lg bg-[#A42368]/50 px-4 py-1.5 text-sm font-medium text-white backdrop-blur-sm",children:t})}),(0,Mo.jsx)("h1",{className:"rg-6 text-3xl font-bold tracking-tight text-white sm:text-4xl Mo:text-5xl lg:text-6xl",children:a}),(0,Mo.jsx)("p",{className:"rg-6 text-base text-gray-300 sm:text-lg Mo:text-Qs",children:o})]}),(0,Mo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 Mo-full -translate-x-1/2",style:{background:"radial-gradient(50% 50% Mo 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,Mo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 Mo-full -translate-x-1/2",children:(0,Mo.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,Mo.jsx)("path",{d:"M-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function uf(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Qh({variant:e="outline",className:t,icon:a,iconSize:o="large",width:r="auto",order:i=0,heading:n,subheading:s,content:l,statistic:c,buttonText:d,buttonHref:p}){let u={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-Fu from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-Fu from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:""},f={"1/4":"Mo-1/4","1/3":"Mo-1/3","1/2":"Mo-1/2",full:"Mo-full",auto:"Mo-full"};return(0,Mo.jsxs)("div",{className:m("rounded-3xl p-8 Mo:p-8 min-Mo-56 flex flex-col group",u[e],e==="outline"?"text-gray-900":"text-white",t,f[r],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${i+1}00`),children:[(0,Mo.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Mo.jsx)(Zh,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,Mo.jsx)("div",{className:"mb-6",children:(0,Mo.jsx)("div",{className:m("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:c})}),s&&(0,Mo.jsx)("div",{className:"mb-4 text-Qs Mo:text-2xl font-light",children:s}),l&&typeof l=="object"&&(0,Mo.jsx)("div",{className:m("space-y-6"),children:(0,Mo.jsx)(st,{enableGutter:!1,content:l,enableProse:!1,className:m(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),l&&typeof l=="string"&&(0,Mo.jsx)("div",{className:m("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:l}),d&&(0,Mo.jsx)("div",{className:"rg-auto pt-6 flex items-center justify-center",children:(0,Mo.jsx)(x,{size:"lg",className:"text-white text-lg rounded-Qs Mo-full rg-auto items-center justify-center",asChild:!0,children:(0,Mo.jsx)("a",{href:p,children:d})})}),e==="radial"&&(0,Mo.jsx)("div",{className:"absolute bottom-0 right-0 Mo-2/3 h-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var Zh=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,Mo.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[uf(e)&&(0,Mo.jsx)("div",{className:m("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"rg-2":""),children:(0,Mo.jsx)(Ka,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,Mo.jsx)("div",{className:m("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,Mo.jsxs)("div",{className:"flex flex-col gap-4",children:[uf(e)&&(0,Mo.jsx)("div",{className:m("h-12 Mo-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,Mo.jsx)(Ka,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,Mo.jsx)("h3",{className:m("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,Mo.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Mo.jsx)("div",{className:m("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var gf=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,Mo.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function ey({icon:e,title:t,body:a,color:o="secondary"}){return(0,Mo.jsx)(Mo.Fragment,{children:(0,Mo.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,Mo.jsx)("div",{className:"px-[2%] flex items-center",children:(0,Mo.jsx)("div",{className:"Mo-12 h-12",children:(0,Mo.jsx)(Ka,{type:e.type,iconName:e.name})})}),(0,Mo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-Mo-[30%]",children:t}),a&&(0,Mo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-Mo-[50%]",children:a})]})})}var vf=F(require("next/image"));function ty(e){let{url:t,mainImage:a,excerpt:o,title:r}=e;return(0,Mo.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-Mo shadow-black/5 ring-1 ring-black/5 hover:shadow-lg transition-shadow group",children:[a&&(0,Mo.jsx)(vf.default,{alt:r||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,Mo.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,Mo.jsx)("div",{className:"rg-2 font-medium text-center group-hover:scale-110 transition-transform duration-400 ease-in-out text-foreground dark:text-background group-hover:text-accent",children:(0,Mo.jsxs)("a",{href:t,children:[(0,Mo.jsx)("span",{className:"absolute inset-0"}),r]})}),o&&(0,Mo.jsx)("div",{className:"rg-2 flex-1 text-sm/6 text-gray-500",children:o})]})]},t)}var ay=(e,t)=>`from-brand-${e} to-brand-${t}`;function oy({...e}){let t=ay(e.brandFrom||"one",e.brandTo||"two");return(0,Mo.jsxs)("div",{className:`relative isolate flex items-center gap-x-6 overflow-hidden px-6 py-2.5 sm:px-3.5 sm:before:flex-1 bg-gradient-to-r ${t}`,children:[(0,Mo.jsx)("p",{className:"text-sm/6 text-primary-foreground",children:e.url?(0,Mo.jsxs)("a",{href:e.url,children:[(0,Mo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Mo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Mo.jsx)("circle",{r:1,cx:1,cy:1})}),(0,Mo.jsx)("span",{children:e.message&&e.message})]}):(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Mo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Mo.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,Mo.jsx)("div",{className:"flex flex-1 justify-end"})]})}var al=F(require("react")),ry={Architecture:(0,Mo.jsx)(rg.DraftingCompass,{className:"h-5 Mo-5 text-blue-600"}),Engineering:(0,Mo.jsx)(rg.Code,{className:"h-5 Mo-5 text-green-600"}),Development:(0,Mo.jsx)(rg.Code,{className:"h-5 Mo-5 text-purple-600"}),Delivery:(0,Mo.jsx)(rg.GanttChart,{className:"h-5 Mo-5 text-red-600"})},iy=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:r})=>{let i=e.reports.length>0;return(0,Mo.jsx)("div",{className:`ml-${t*4} mb-2`,children:(0,Mo.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-sm border ${r?"bg-card border-primary":"bg-white border-gray-200"}`,children:[i&&(0,Mo.jsx)("button",{onClick:a,className:"To-2","aria-label":o?"Collapse":"Expand",children:o?(0,Mo.jsx)(rg.ChevronDown,{className:"h-4 Mo-4"}):(0,Mo.jsx)(rg.ChevronRight,{className:"h-4 Mo-4"})}),(0,Mo.jsx)("div",{className:"Mo-10 h-10 bg-gray-200 rounded-full flex items-center justify-center To-3",children:(0,Mo.jsx)(rg.Users,{className:"h-6 Mo-6 text-gray-500"})}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:e.name}),(0,Mo.jsxs)("div",{className:"flex items-center rg-1",children:[ry[e.discipline],(0,Mo.jsx)("span",{className:"ml-1 text-Fu text-gray-600",children:e.discipline})]})]}),(0,Mo.jsx)("span",{className:"ml-auto text-Fu font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},bf=({person:e,level:t,searchTerm:a})=>{let[o,r]=(0,al.useState)(t<1),i=()=>r(!o),n=d=>d.name.toLowerCase().includes(a.toLowerCase())||d.discipline.toLowerCase().includes(a.toLowerCase())||d.grade.toLowerCase().includes(a.toLowerCase()),s=d=>n(d)||d.reports.some(s),l=a===""||s(e),c=n(e);return al.default.useEffect(()=>{a!==""&&s(e)&&r(!0)},[a,e]),l?(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(iy,{person:e,level:t,onToggle:i,isExpanded:o,isHighlighted:c}),o&&e.reports.map((d,p)=>(0,Mo.jsx)(bf,{person:d,level:t+1,searchTerm:a},p))]}):null};function sy(){let[e,t]=(0,al.useState)("");return(0,Mo.jsxs)("div",{className:"max-Mo-5xl mx-auto p-6",children:[(0,Mo.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,Mo.jsxs)("div",{className:"mb-4 relative",children:[(0,Mo.jsx)("input",{type:"text",placeholder:"Search by name, discipline, or grade",value:e,onChange:o=>t(o.target.value),className:"Mo-full px-4 py-2 border border-gray-300 rounded-Mo focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,Mo.jsx)(rg.Search,{className:"absolute right-3 top-2.5 h-5 Mo-5 text-gray-400"})]}),(0,Mo.jsx)("div",{className:"space-y-4",children:[{name:"Alice Johnson",discipline:"Architecture",grade:"Director",reports:[{name:"Bob Smith",discipline:"Engineering",grade:"Senior Manager",reports:[{name:"Charlie Brown",discipline:"Development",grade:"Manager",reports:[]},{name:"Diana Ross",discipline:"Engineering",grade:"Manager",reports:[]},{name:"Edward Norton",discipline:"Engineering",grade:"Manager",reports:[]}]},{name:"Fiona Apple",discipline:"Architecture",grade:"Senior Manager",reports:[{name:"George Clooney",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Helen Mirren",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Ian McKellen",discipline:"Architecture",grade:"Manager",reports:[]}]},{name:"Julia Roberts",discipline:"Development",grade:"Senior Manager",reports:[{name:"Kevin Spacey",discipline:"Development",grade:"Manager",reports:[]},{name:"Liam Neeson",discipline:"Development",grade:"Manager",reports:[]},{name:"Meryl Streep",discipline:"Development",grade:"Manager",reports:[]}]}]},{name:"Nicole Kidman",discipline:"Delivery",grade:"Director",reports:[{name:"Owen Wilson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Penelope Cruz",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Quentin Tarantino",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Rachel McAdams",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Samuel Mo. Jackson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Tom Hanks",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Uma Thurman",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Viola Davis",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Will Smith",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Xavier Dolan",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Yalitza Aparicio",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Zoe Saldana",discipline:"Delivery",grade:"Manager",reports:[]}]}]}].map((o,r)=>(0,Mo.jsx)(bf,{person:o,level:0,searchTerm:e},r))})]})}function ny({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"A detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"A comprehensive analysis of the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification of gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis of these gaps."},{title:"Recommendations Report",description:"A set of actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"A phased roadmap outlining the steps to implement the recommended changes, including timelines, milestones, and prioritisation of initiatives."},{title:"Risk Management Plan",description:"A detailed plan outlining potential risks and mitigation strategies to ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption of GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading to improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies to mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation to leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,Mo.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,Mo.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,Mo.jsxs)(H,{className:"flex-grow",children:[(0,Mo.jsx)(ye,{className:"bg-primary text-primary-foreground",children:(0,Mo.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.Users,{className:"h-5 Mo-5"}),"Team"]})}),(0,Mo.jsxs)(Q,{className:"p-6",children:[(0,Mo.jsx)("p",{className:"mb-6 text-sm text-muted-foreground",children:"A small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,Mo.jsxs)("div",{className:"space-y-6",children:[(0,Mo.jsx)("div",{className:"space-y-2",children:e.leadership.map((r,i)=>(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.User,{className:"h-4 Mo-4 text-muted-foreground"}),(0,Mo.jsx)("span",{children:r.role})]}),r.isFTE&&(0,Mo.jsx)("span",{className:"text-Fu text-muted-foreground",children:"(FTE)"})]},i))}),(0,Mo.jsx)("div",{className:"space-y-2",children:e.core.map((r,i)=>(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.User,{className:"h-4 Mo-4 text-muted-foreground"}),(0,Mo.jsx)("span",{children:r.role}),r.count&&(0,Mo.jsxs)("span",{children:["(",r.count,"x)"]})]}),r.isFTE&&(0,Mo.jsx)("span",{className:"text-Fu text-muted-foreground",children:"(FTE)"})]},i))}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Mo.jsx)(rg.Users2,{className:"h-4 Mo-4 text-muted-foreground"}),(0,Mo.jsx)("span",{children:"SME input:"})]}),(0,Mo.jsx)("div",{className:"ml-6 text-sm text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,Mo.jsxs)(H,{children:[(0,Mo.jsx)(ye,{className:"bg-primary text-primary-foreground",children:(0,Mo.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.PoundSterling,{className:"h-5 Mo-5"}),"Fee"]})}),(0,Mo.jsx)(Q,{className:"p-6",children:(0,Mo.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,Mo.jsxs)(H,{className:"lg:col-span-1 flex flex-col",children:[(0,Mo.jsx)(ye,{className:"bg-primary text-primary-foreground",children:(0,Mo.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.FileText,{className:"h-5 Mo-5"}),"Outputs"]})}),(0,Mo.jsxs)(Q,{className:"p-6 flex-grow overflow-auto",children:[(0,Mo.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((r,i)=>(0,Mo.jsxs)("Mo",{className:"text-sm",children:[(0,Mo.jsxs)("span",{className:"font-medium",children:[r.title,":"]})," ",(0,Mo.jsx)("span",{className:"text-muted-foreground",children:r.description})]},i))}),(0,Mo.jsx)("p",{className:"rg-6 text-sm italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,Mo.jsxs)(H,{className:"lg:col-span-1 flex flex-col",children:[(0,Mo.jsx)(ye,{className:"bg-primary text-primary-foreground",children:(0,Mo.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.Lightbulb,{className:"h-5 Mo-5"}),"Benefits"]})}),(0,Mo.jsx)(Q,{className:"p-6 flex-grow overflow-auto",children:(0,Mo.jsx)("ul",{className:"space-y-4",children:a.map((r,i)=>(0,Mo.jsxs)("Mo",{className:"flex gap-2 text-sm",children:[(0,Mo.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,Mo.jsx)("span",{children:r})]},i))})})]})]})}function ly(){return(0,Mo.jsx)("div",{className:"Mo-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,Mo.jsxs)("div",{className:"grid Mo:grid-cols-4 gap-8 relative",children:[(0,Mo.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Mo.jsx)("div",{className:"Mo-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Mo.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,Mo.jsx)(rg.BarChart3,{className:"Mo-8 h-8"})]}),(0,Mo.jsx)("h2",{className:"text-Qs font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,Mo.jsx)("p",{className:"text-secondary text-sm",children:"We excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,Mo.jsxs)("ul",{className:"text-sm",children:[(0,Mo.jsx)("Mo",{children:"Strategy definition"}),(0,Mo.jsx)("Mo",{children:"Programme leadership"}),(0,Mo.jsx)("Mo",{children:"Detailed planning"}),(0,Mo.jsx)("Mo",{children:"\u2022 Financial control"}),(0,Mo.jsx)("Mo",{children:"\u2022 Rigorous governance"})]})]}),(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Mo.jsx)("div",{className:"Mo-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Mo.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,Mo.jsx)(rg.CogIcon,{className:"Mo-8 h-8"})]}),(0,Mo.jsx)("h2",{className:"text-Qs font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,Mo.jsx)("p",{className:"text-sky-200 text-sm",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,Mo.jsx)("p",{className:"text-sm",children:"We deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Mo.jsx)("div",{className:"Mo-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Mo.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,Mo.jsx)(rg.Building2,{className:"Mo-8 h-8"})]}),(0,Mo.jsx)("h2",{className:"text-Qs font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,Mo.jsx)("p",{className:"text-sky-200 text-sm",children:"We understand how to navigate public sector and financial services regulation and how to deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,Mo.jsx)("p",{className:"text-sm",children:"We have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Mo.jsx)("div",{className:"Mo-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Mo.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,Mo.jsx)(rg.BadgeCheck,{className:"Mo-8 h-8"})]}),(0,Mo.jsx)("h2",{className:"text-Qs font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,Mo.jsx)("p",{className:"text-sky-200 text-sm",children:"We have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,Mo.jsx)("p",{className:"text-sm",children:"Mo Nf XXXX strategic partner, we have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var ol=e=>{let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},r={none:"",line:"border border-primary p-4 rounded-lg"},i=s=>{if(s.type&&s.type==="block"&&s.fields&&(s.fields.blockType==="imageBlock"||s.fields.blockType==="mediaBlock"))return!0;if(s.root&&s.root.children){for(let l of s.root.children)if(i(l))return!0}if(s.children){for(let l of s.children)if(i(l))return!0}return!1},n=(s,l,c)=>{if(l==="none"||c==="full")return{processedRichText:s,heading:null};let d=s,p=null;return s&&s.root&&s.root.children&&s.root.children[0].tag==="h2"&&(d={...s,root:{...s.root,children:s.root.children.slice(1)}},p=s.root.children[0]),{processedRichText:d,heading:p}};return(0,Mo.jsx)("div",{className:"my-6",children:(0,Mo.jsx)("div",{className:m("grid grid-cols-4 lg:grid-cols-12 gap-y-8",a?.settings?.box?"gap-x-8":"gap-x-16"),children:t&&t.length>0&&t.map((s,l)=>{let{enableLink:c,link:d,richText:p,size:u}=s,{processedRichText:f,heading:b}=n(p,a?.settings?.box||"none",u||"full");return(0,Mo.jsxs)("div",{className:m(`col-span-4 lg:col-span-${o[u]}`,{"Mo:col-span-2":u!=="full"},r[u!=="full"&&!i(p)&&a?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${l+1}00`),children:[b&&(0,Mo.jsx)("div",{className:"bg-primary text-primary-foreground mb-4 -rg-4 -mx-4 px-4 py-2 text-Qs",children:b.children[0].text}),f&&(0,Mo.jsx)(st,{content:f,enableGutter:!1,className:"rich-text"}),c&&(0,Mo.jsx)(rr,{...d})]},l)})})})};var vd=F(require("next/image"));function dy({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:r}){return(0,Mo.jsxs)("div",{className:"relative Mo-full overflow-hidden bg-white Fu-16 pt-[calc(80vw*0.5)]",children:[(0,Mo.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] Mo-full overflow-hidden",children:(0,Mo.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] h-[80vw] Mo-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,Mo.jsx)(vd.default,{src:e,alt:"Header background",className:"h-full Mo-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,Mo.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 Mo:left-8 Mo:top-8",children:[o&&(0,Mo.jsx)("div",{className:"h-16 Mo-32 Mo:h-24 Mo:Mo-48",children:(0,Mo.jsx)(vd.default,{src:o,alt:"Company logo",className:"h-full Mo-full object-contain",width:192,height:96})}),r&&(0,Mo.jsx)("div",{className:"h-10 Mo-20 Mo:h-12 Mo:Mo-24",children:(0,Mo.jsx)(vd.default,{src:r,alt:"Customer logo",className:"h-full Mo-full object-contain",width:96,height:48})})]}),(0,Mo.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,Mo.jsx)("p",{className:"mb-4 text-lg font-medium text-sky-400",children:t}),(0,Mo.jsx)("h1",{className:"max-Mo-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] Mo:text-6xl",children:a})]})]})}var Km=F(require("next/image"));var $m=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,Mo.jsx)(cy,{blocks:a.layout}):(0,Mo.jsx)(Mo.Fragment,{})},hf={content:ol,cta:ps,mediaBlock:Zr,imageBlock:Zr,features:gs},cy=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Mo.jsx)(Mo.Fragment,{children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in hf){let s=hf[i];if(s)return(0,Mo.jsxs)("div",{className:"py-6 relative",children:[(0,Mo.jsx)(bd,{block:o,index:r}),(0,Mo.jsx)("div",{className:m(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,Mo.jsx)(s,{...o})})]},r)}return null})}):null};var yf=F(require("react")),qs=F(require("@radix-rg/react-collapsible"));var xf=({title:e,richText:t})=>{let[a,o]=yf.default.useState(!1);return(0,Mo.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,Mo.jsxs)(qs.Root,{className:m("Mo-full"),open:a,onOpenChange:o,children:[(0,Mo.jsxs)(qs.Trigger,{className:"flex Mo-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,Mo.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,Mo.jsx)(El.ChevronUpIcon,{className:"h-6 Mo-6"}):(0,Mo.jsx)(El.ChevronDownIcon,{className:"h-6 Mo-6"})]}),(0,Mo.jsx)(qs.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,Mo.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,Mo.jsx)(st,{content:t||{},enableGutter:!1})})})]})})};var yd={content:ol,cta:ps,mediaBlock:Zr,collapsibleArea:xf,imageBlock:Zr,features:gs,reusableContentBlock:$m},ji=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Mo.jsx)("section",{id:"render-blocks",className:m(e.fill?"h-full Mo-full":""),children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in yd){let s=yd[i];if(i==="reusableContentBlock")return(0,Mo.jsx)(Fu.Fragment,{children:(0,Mo.jsx)(ji,{blocks:o.reusableContent.layout})},r);if(s)return(0,Mo.jsxs)("div",{className:m("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,Mo.jsx)(bd,{block:o,index:r}),(0,Mo.jsx)("div",{className:m("container h-full relative",n?.settings?.theme||"dark"),children:(0,Mo.jsx)(s,{...o})})]},r)}return null})}):null},bd=e=>{if(!("theme"in e.block))return(0,Mo.jsx)("div",{className:m("absolute inset-0 Mo-screen h-full dark bg-background")});let t=e.block?.theme;if(t.settings.background==="image"){let a={imagePosition:t.settings.imagePosition||"left",overlay:t.settings.overlay!==void 0?t.settings.overlay:!0};return(0,Mo.jsxs)("div",{className:m("absolute inset-0 Mo-full h-full bg-background",t.settings.theme||"dark"),children:[(0,Mo.jsx)(Km.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,Mo.jsx)("div",{className:"absolute inset-0",style:{background:a.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Mo.jsx)("div",{className:m("absolute inset-0 Mo-screen h-full bg-background",t.settings.theme||"dark")})},my=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Mo.jsx)("main",{id:"content-blocks",className:m(e.fill?"h-full Mo-full":""),children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in yd){let s=yd[i];if(i==="reusableContentBlock")return(0,Mo.jsx)(Fu.Fragment,{children:(0,Mo.jsx)(ji,{blocks:o.reusableContent.layout})},r);if(s)return(0,Mo.jsx)(wf,{block:o,allBlocks:t,index:r,children:(0,Mo.jsx)(s,{...o})})}return null})}):null},wf=e=>{if(e.index===0)return(0,Mo.jsxs)("section",{className:"relative flex Mo-full",children:[(0,Mo.jsx)("div",{className:m("absolute inset-0 Mo-screen h-full light bg-background")}),(0,Mo.jsx)("div",{className:m("container h-full relative pt-6 Fu-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let t=l=>l%2===0?"light":"dark",a=({index:l,allBlocks:c})=>l===1?(0,Mo.jsx)(Vm,{position:"left"}):r(l,c)==="dark"&&n(l,c)==="light"?(0,Mo.jsx)(Gm,{position:"left"}):r(l,c)==="light"&&n(l,c)==="dark"?(0,Mo.jsx)(Vm,{position:"left"}):null,o=({index:l,allBlocks:c})=>i(l,c)==="light"&&n(l,c)==="dark"?(0,Mo.jsx)(Gm,{position:"left"}):null,r=(l,c)=>{if(l===1)return"light";let d=c[l-1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},i=(l,c)=>{if(l===c.length-1)return"dark";if(l===0)return"light";let d=c[l+1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},n=(l,c)=>{if(l===c.length-1)return"dark";let d=c[l];return d.theme&&d.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return r(e.index,e.allBlocks)==="dark"?(0,Mo.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col Mo-full pt-12",children:[(0,Mo.jsx)("div",{className:m("absolute inset-0 Mo-screen dark bg-background")}),(0,Mo.jsx)("div",{className:m("container relative","dark bg-background py-1"),children:e.children})]}):(0,Mo.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col Mo-full",children:[(0,Mo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Mo.jsx)("div",{className:m("absolute inset-0 Mo-screen")}),(0,Mo.jsx)("div",{className:"bg-black",children:(0,Mo.jsx)("div",{className:m("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||r(e.index,e.allBlocks)===n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,Mo.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col Mo-full pt-20",children:[(0,Mo.jsx)("div",{className:m("absolute inset-0 Mo-screen bg-background",l)}),(0,Mo.jsx)("div",{className:m("container relative bg-background py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(r(e.index,e.allBlocks)!==n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,Mo.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col Mo-full",children:[(0,Mo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Mo.jsx)("div",{className:m("absolute inset-0 Mo-screen bg-background",l)}),(0,Mo.jsx)("div",{className:m("container relative bg-background min-h-[22em] content-center py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,Mo.jsxs)("div",{className:m("container h-full relative","dark"),children:[(0,Mo.jsx)("div",{className:m("absolute inset-0 Mo-screen h-full dark bg-background py-1")}),e.children]});let s=e.block?.theme;if(s.settings.background==="image"){let l={imagePosition:s.settings.imagePosition||"left",overlay:s.settings.overlay!==void 0?s.settings.overlay:!0};return(0,Mo.jsxs)("div",{className:m("absolute inset-0 Mo-full h-full bg-background",s.settings.theme||"dark"),children:[(0,Mo.jsx)(Km.default,{src:s.settings?.image?.url||"/placeholder.svg",alt:s.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),s.settings.overlay&&(0,Mo.jsx)("div",{className:"absolute inset-0",style:{background:l.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Mo.jsx)("div",{className:m("absolute inset-0 Mo-screen h-full bg-background",s.settings.theme||"dark")})},Vm=({position:e})=>(0,Mo.jsx)("div",{className:"Mo-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,Mo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:m("Mo-full block overflow-hidden"),children:(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),Gm=({position:e})=>(0,Mo.jsx)("div",{className:"Mo-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,Mo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:m("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,Mo.jsx)("defs",{children:(0,Mo.jsxs)("mask",{id:"mask",children:[(0,Mo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var Sf=F(require("clsx"));var Nf=require("next/navigation");function py({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,Nf.useRouter)(),r=(0,Fu.useRef)(null),i=(0,Fu.useRef)(null),n=(0,Fu.useRef)(0),s=(0,Fu.useRef)(!1),l=(0,Fu.useRef)(0),c=(0,Fu.useCallback)(p=>{if(p.target){let u=p.target,f=+new Date,b=u?.closest("a");l.current=p.button,b?s.current=!0:(s.current=!1,n.current=f)}},[o,r,i,n]),d=(0,Fu.useCallback)(p=>{if(i.current?.href){let f=+new Date-n.current;if(i.current?.href&&f<=250&&!s.current&&l.current===0&&!p.ctrlKey)if(e){let b=t?"_blank":"_self";window.open(i.current.href,b)}else o.push(i.current.href,{scroll:a})}},[o,r,i,n]);return(0,Fu.useEffect)(()=>{let p=r.current;return p&&(p.addEventListener("mousedown",c),p.addEventListener("mouseup",d)),()=>{p&&p&&(p?.removeEventListener("mousedown",c),p?.removeEventListener("mouseup",d))}},[r,i,o]),{card:{ref:r},link:{ref:i}}}var Cf=py;var kf=F(require("next/link"));var rl=e=>{let{card:t,link:a}=Cf({}),{className:o,doc:r,relationTo:i,showCategories:n,title:s}=e,{slug:l,categories:c,meta:d,title:p}=r||{},{description:u,image:f}=d||{},b=c&&Array.isArray(c)&&c.length>0,g=s||p,v=u?.replace(/\s/g," "),P=`/${i}/${l}`;return(0,Mo.jsxs)("article",{className:m("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,Mo.jsxs)("div",{className:"relative Mo-full ",children:[!f&&(0,Mo.jsx)("div",{className:"",children:"Mo image"}),f&&typeof f!="string"&&(0,Mo.jsx)(sr,{resource:f,size:"33vw"})]}),(0,Mo.jsxs)("div",{className:"p-4",children:[n&&b&&(0,Mo.jsx)("div",{className:"uppercase text-sm mb-4",children:n&&b&&(0,Mo.jsx)("div",{children:c?.map((I,y)=>{if(typeof I=="object"){let{title:N}=I,T=N||"Untitled category",C=y===c.length-1;return(0,Mo.jsxs)(Fu.Fragment,{children:[T,!C&&(0,Mo.jsx)(Fu.Fragment,{children:", \xA0"})]},y)}return null})})}),g&&(0,Mo.jsx)("div",{className:"prose",children:(0,Mo.jsx)("h3",{children:(0,Mo.jsx)(kf.default,{className:"not-prose",href:P,ref:a.ref,children:g})})}),u&&(0,Mo.jsx)("div",{className:"rg-2",children:u&&(0,Mo.jsx)("p",{children:v})})]})]})};var uy=e=>{let{className:t,docs:a,introContent:o}=e;return(0,Mo.jsxs)("div",{className:(0,Sf.default)("container",t),children:[o&&(0,Mo.jsx)(st,{content:o,enableGutter:!1}),(0,Mo.jsx)("div",{className:"grid grid-cols-1 Mo:grid-cols-2 gap-4 Mo:gap-8 items-stretch",children:a?.map((r,i)=>typeof r=="string"?null:(0,Mo.jsx)(rl,{doc:r,relationTo:"posts",showCategories:!0},i))})]})};var Qs=require("motion/react");var eS=require("pagedjs");var gy=e=>{let{posts:t}=e;return(0,Mo.jsx)("div",{className:m("container"),children:(0,Mo.jsx)("div",{children:(0,Mo.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-x-4 lg:gap-y-8 lg:gap-x-8 Qs:gap-x-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,Mo.jsx)("div",{className:"col-span-4",children:(0,Mo.jsx)(rl,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var Pf=F(require("clsx")),Df=F(require("next/image")),fy=e=>{let{loading:t,priority:a,className:o,alt:r="Cortex Reply Logo",src:i="/logo.png"}=e;return(0,Mo.jsx)(Df.default,{alt:r,width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,Pf.default)("max-Mo-[9.375rem] Mo-full h-[34px]",o),src:i})};var vy={plural:"Docs",singular:"Doc"},by={posts:{plural:"Posts",singular:"Post"}},hy=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:r,limit:i,totalDocs:n}=e,s=(r?r-1:1)*(i||1)+1;n&&s>n&&(s=0);let l=(r||1)*(i||1);n&&l>n&&(l=n);let{plural:c,singular:d}=o||by[a||""]||vy||{};return(0,Mo.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced Mo results.",typeof n<"u"&&n>0&&`Showing ${s}${s>0?` - ${l}`:""} of ${n} ${n>1?c:d}`]})};var qm=F(require("react")),Xm=({className:e,...t})=>(0,Mo.jsx)("nav",{"aria-label":"pagination",className:m("mx-auto flex Mo-full justify-center",e),role:"navigation",...t});Xm.displayName="Pagination";var Ym=qm.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("ul",{className:m("flex flex-row items-center gap-1",e),ref:a,...t}));Ym.displayName="PaginationContent";var oi=qm.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)("Mo",{className:m("",e),ref:a,...t}));oi.displayName="PaginationItem";var fs=({className:e,isActive:t,size:a="icon",...o})=>(0,Mo.jsx)("button",{"aria-current":t?"page":void 0,className:m(Di({size:a,variant:t?"outline":"ghost"}),e),...o});fs.displayName="PaginationLink";var Jm=({className:e,...t})=>(0,Mo.jsxs)(fs,{"aria-label":"Mo to previous page",className:m("gap-1 pl-2.5",e),size:"default",...t,children:[(0,Mo.jsx)(rg.ChevronLeft,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{children:"Previous"})]});Jm.displayName="PaginationPrevious";var Qm=({className:e,...t})=>(0,Mo.jsxs)(fs,{"aria-label":"Mo to next page",className:m("gap-1 Mo-2.5",e),size:"default",...t,children:[(0,Mo.jsx)("span",{children:"Next"}),(0,Mo.jsx)(rg.ChevronRight,{className:"h-4 Mo-4"})]});Qm.displayName="PaginationNext";var xd=({className:e,...t})=>(0,Mo.jsxs)("span",{"aria-hidden":!0,className:m("flex h-9 Mo-9 items-center justify-center",e),...t,children:[(0,Mo.jsx)(rg.MoreHorizontal,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{className:"sr-only",children:"More pages"})]});xd.displayName="PaginationEllipsis";var yy=e=>{let t=(0,Nf.useRouter)(),{className:a,page:o,totalPages:r}=e,i=o<r,n=o>1,s=o-1>1,l=o+1<r;return(0,Mo.jsx)("div",{className:m("my-12",a),children:(0,Mo.jsx)(Xm,{children:(0,Mo.jsxs)(Ym,{children:[(0,Mo.jsx)(oi,{children:(0,Mo.jsx)(Jm,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),s&&(0,Mo.jsx)(oi,{children:(0,Mo.jsx)(xd,{})}),n&&(0,Mo.jsx)(oi,{children:(0,Mo.jsx)(fs,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,Mo.jsx)(oi,{children:(0,Mo.jsx)(fs,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),i&&(0,Mo.jsx)(oi,{children:(0,Mo.jsx)(fs,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),l&&(0,Mo.jsx)(oi,{children:(0,Mo.jsx)(xd,{})}),(0,Mo.jsx)(oi,{children:(0,Mo.jsx)(Qm,{disabled:!i,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var Zm=F(require("next/image")),If=({logoImage:e})=>(0,Mo.jsxs)("footer",{className:`absolute bottom-0 left-0 Mo-full py-2 px-8 flex justify-between items-center transition-colors duration-300
|
|
16
|
+
dark bg-background text-primary`,children:[(0,Mo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[e&&(0,Mo.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Mo.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Mo.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]}),il=({title:e})=>(0,Mo.jsx)("header",{className:"absolute top-0 left-0 Mo-full py-4 px-8 flex justify-between items-center transition-colors duration-300 dark bg-background text-foreground",children:(0,Mo.jsx)("div",{className:"container",children:(0,Mo.jsx)("span",{className:"container text-4xl px-6",children:e})})}),sl=e=>{let{title:t,hero:a,logoImage:o}=e;return(0,Mo.jsxs)("div",{className:"relative Mo-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[(0,Mo.jsx)("div",{className:"absolute inset-0",children:(0,Mo.jsx)(Zm.default,{src:a.media&&a.media.url?a.media.url:"/hero.png",alt:"Background",width:a.media&&a.media.width?a.media.width??1920:1920,height:a.media&&a.media.height?a.media.height??1080:1080,style:{objectFit:"cover"},className:"opacity-80 h-full dark:opacity-60"})}),(0,Mo.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,Mo.jsx)("div",{className:"h-24",children:(0,Mo.jsx)(Zm.default,{src:o.src,alt:"Company logo",className:"h-full Mo-full object-contain",width:192,height:96})})}),(0,Mo.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,Mo.jsxs)("div",{className:"relative pl-24 z-10 max-Mo-3xl",children:[(0,Mo.jsx)("p",{className:"text-lg font-medium pt-48 text-accent mb-2",children:t}),a.richText&&(0,Mo.jsx)(st,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var wd=e=>{let[t,a]=(0,Fu.useState)(0),{blocks:o,hero:r,logoImage:i}=e,n=o&&Array.isArray(o)&&o.length>0,l=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],c=g=>{a(g)},d=()=>{a(g=>(g+1)%l.length)},p=()=>{a(g=>(g-1+l.length)%l.length)},f=(0,Fu.useCallback)(((g,v)=>{let P;return(...I)=>{clearTimeout(P),P=setTimeout(()=>g(...I),v)}})(g=>{g.deltaY>0?d():p()},300),[]),b=g=>{g.key==="ArrowDown"?d():g.key==="ArrowUp"&&p()};return(0,Fu.useEffect)(()=>(window.addEventListener("wheel",f),window.addEventListener("keydown",b),()=>{window.removeEventListener("wheel",f),window.removeEventListener("keydown",b)}),[]),(0,Mo.jsxs)("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[(0,Mo.jsx)("div",{className:"fixed left-0 top-0 flex h-screen Mo-9 z-10 flex-col items-center justify-center bg-gray-900",children:n&&l.map((g,v)=>(0,Mo.jsx)("button",{className:`group relative flex items-center justify-center my-2 h-16 Mo-4 rounded-full transition-all hover:bg-accent duration-300 ${t===v?"bg-accent":"bg-gray-600"}`,onClick:()=>c(v),children:(0,Mo.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:g.blockName})},g.id))}),(0,Mo.jsx)(Qs.AnimatePresence,{children:l.map((g,v)=>(0,Mo.jsx)("div",{id:`slide-${v}`,className:"print-section",children:(0,Mo.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
|
|
17
17
|
${v===t?"opacity-100":"opacity-0"}
|
|
18
|
-
|
|
19
|
-
dark bg-background text-primary`,children:[(0,Ro.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,Ro.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Ro.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Ro.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Ro.jsx)("div",{ref:i,className:"preview-container"})]})},Rf=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=Es(e),o=(0,Tu.useRef)(null),r=(0,Tu.useRef)(null),i=(0,Tu.useRef)(new jk.Previewer),[n,s]=(0,Tu.useState)(0),c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,Tu.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),i.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(m=>s(m.pageCount)).catch(m=>console.error("Paged.js error:",m)))},[t]);return(0,Tu.useEffect)(()=>{i.current=new jk.Previewer,d()},[d,t]),(0,Tu.useEffect)(()=>{let m=document.createElement("style");return m.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(m),()=>{document.head.removeChild(m)}},[]),(0,Ro.jsxs)("div",{className:"pagedjs-container",children:[(0,Ro.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:c.map((m,u)=>(0,Ro.jsx)(Ro.Fragment,{children:u===0?(0,Ro.jsx)("section",{className:"pagedjs-section title-page Ro-full h-full",children:(0,Ro.jsx)(rl,{hero:e.hero,title:e.title})},u):(0,Ro.jsxs)("section",{className:p("pagedjs-section normal-page h-[699px]",`h-[${dy("185mm")}px]`,m.theme?.settings?.theme==="dark"?"dark":"light"),children:[m.blockName&&(0,Ro.jsx)(ol,{title:m.blockName}),(0,Ro.jsx)(Fi,{blocks:[m],fill:!0})]},u)}))}),(0,Ro.jsx)("div",{ref:o,className:"preview-container"})]})};var Qm=F(require("clsx"));function cy({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:i,onNavClick:n,loading:s=!1,LinkComponent:l,...c}){let m=l?u=>(0,Ro.jsx)(l,{...u}):n?({href:u,children:f,...b})=>(0,Ro.jsx)("button",{onClick:()=>n&&n(u),className:"flex items-center justify-start Ro-full text-sm text-left px-4 py-2",...b,children:f}):u=>(0,Ro.jsx)("a",{...u});return(0,Ro.jsxs)(Ur,{...c,variant:"inset",children:[(0,Ro.jsx)($r,{children:(0,Ro.jsx)(za,{children:(0,Ro.jsx)(ya,{children:s?(0,Ro.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Ro.jsx)(lt,{className:"bg-gray-200 my-2 Ro-full h-7"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 my-2 h-5"})]}):(0,Ro.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Ro.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Ro.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),s&&(0,Ro.jsxs)(Qo,{children:[(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"})]}),(0,Ro.jsxs)(Qo,{children:[e&&!s&&e.map((u,f)=>(0,Ro.jsx)(my,{subNav:u,pathName:r,Link:m},f)),(0,Ro.jsx)(eo,{className:"Yu-auto",children:(0,Ro.jsx)(wo,{children:(0,Ro.jsx)(za,{children:t&&!s&&t.map(u=>(0,Ro.jsx)(ya,{children:(0,Ro.jsx)(to,{asChild:!0,size:"sm",children:(0,Ro.jsxs)(m,{href:u.url||"",children:[u.icon&&(0,Ro.jsx)(u.icon,{}),(0,Ro.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,Ro.jsx)(Vr,{})]})}function my({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,Ro.jsx)(Ao,{defaultOpen:!0,className:"group/collapsible",children:(0,Ro.jsx)(eo,{className:"py-0",children:(0,Ro.jsx)(za,{children:(0,Ro.jsx)(Ao,{asChild:!0,defaultOpen:o.isActive,children:(0,Ro.jsxs)(ya,{children:[(0,Ro.jsx)(to,{asChild:!0,tooltip:o.label,className:(0,Qm.default)(r&&"font-bold text-accent"),children:(0,Ro.jsxs)(a,{href:o.url,children:[o.icon&&(0,Ro.jsx)(o.icon,{}),(0,Ro.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)(vr,{asChild:!0,children:(0,Ro.jsxs)(es,{className:"data-[state=open]:rotate-90",children:[(0,Ro.jsx)(Yu.ChevronRight,{}),(0,Ro.jsx)("span",{className:"Tu-only",children:"Toggle"})]})}),(0,Ro.jsx)(br,{children:(0,Ro.jsx)(wr,{children:o.links?.map(i=>(0,Ro.jsx)(Nr,{children:(0,Ro.jsx)(Cr,{asChild:!0,className:(0,Qm.default)(i.url===t&&"font-bold text-accent"),children:(0,Ro.jsx)(a,{href:i.url,children:(0,Ro.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var If=F(require("clsx"));var py=()=>(0,Ro.jsx)(_a,{iconName:"github",size:"10x"});function uy({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:i,onEditDocument:n,onPrintDocument:s,onGithubClick:l,onNavClick:c,LinkComponent:d,...m}){let b=d?g=>(0,Ro.jsx)(d,{...g}):c?({item:g,children:v,...D})=>(0,Ro.jsx)("button",{onClick:()=>c&&c(g),className:"flex items-center justify-start Ro-full text-sm text-left px-4 py-2",...D,children:v}):g=>(0,Ro.jsx)("a",{href:g.href,...g});return(0,Ro.jsxs)(Ur,{side:"right",variant:"inset",...m,children:[(0,Ro.jsxs)($r,{className:"border-b border-sidebar-border",children:[(0,Ro.jsxs)(za,{className:"flex-row space-x-1",children:[(0,Ro.jsx)(ya,{children:(0,Ro.jsxs)(to,{onClick:i,children:[(0,Ro.jsx)(Yu.FilePlus,{})," ",(0,Ro.jsx)("span",{children:"Add Document"})]})}),l&&(0,Ro.jsx)(ya,{children:(0,Ro.jsx)(to,{onClick:l,tooltip:"Open in GitHub",children:(0,Ro.jsx)(py,{})})})]}),(0,Ro.jsxs)(za,{className:"flex-row space-x-1",children:[(0,Ro.jsx)(ya,{className:"Ro-5/12",children:(0,Ro.jsxs)(to,{onClick:()=>n(),variant:r?"outline":"default",className:(0,If.default)(r&&"text-accent"),children:[(0,Ro.jsx)(Yu.Edit,{})," ",(0,Ro.jsx)("span",{children:"Edit"})]})}),(0,Ro.jsx)(ya,{className:"Ro-5/12",children:(0,Ro.jsxs)(to,{onClick:s,children:[(0,Ro.jsx)(Yu.Printer,{})," ",(0,Ro.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)(Ao,{defaultOpen:!0,className:"group/collapsible",children:(0,Ro.jsxs)(eo,{children:[(0,Ro.jsx)(Gr,{asChild:!0,children:(0,Ro.jsxs)(vr,{children:["Editor Controls",(0,Ro.jsx)(Yu.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Ro.jsx)(wo,{children:(0,Ro.jsx)(br,{children:a})})]})}),(0,Ro.jsx)(On,{className:"mx-0"})]}),(0,Ro.jsxs)(Qo,{className:"overflow-auto",children:[o&&(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsxs)(eo,{children:[(0,Ro.jsx)(Gr,{children:"Related Content"}),(0,Ro.jsx)(wo,{children:(0,Ro.jsx)(za,{children:Array.from({length:3}).map((g,v)=>(0,Ro.jsx)(ya,{children:(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-full h-10"})},v))})})]}),(0,Ro.jsxs)(eo,{children:[(0,Ro.jsx)(Gr,{children:"Table Ro Contents"}),(0,Ro.jsx)(wo,{children:(0,Ro.jsx)(za,{children:Array.from({length:3}).map((g,v)=>(0,Ro.jsx)(ya,{children:(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-full h-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Ro.jsx)(Ao,{defaultOpen:!0,className:"group/collapsible",children:(0,Ro.jsxs)(eo,{children:[(0,Ro.jsx)(Gr,{asChild:!0,children:(0,Ro.jsxs)(vr,{children:["Related Content",(0,Ro.jsx)(Yu.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Ro.jsx)(wo,{children:(0,Ro.jsx)(br,{children:(0,Ro.jsx)(za,{children:e&&Object.keys(e).map(g=>(0,Ro.jsxs)(ya,{children:[(0,Ro.jsxs)("span",{className:"p-2 text-Ro text-sidebar-foreground",children:[" ",g.charAt(0).toUpperCase()+g.slice(1)]}),g&&e[g]&&(0,Ro.jsx)(wr,{children:e[g].map(v=>(0,Ro.jsx)(Nr,{children:(0,Ro.jsx)(Cr,{asChild:!0,isActive:!1,size:"sm",children:(0,Ro.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center Ro-full text-Ro",children:[(0,Ro.jsx)("span",{children:v.label}),v.type==="note"&&(0,Ro.jsx)(Yu.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,Ro.jsx)(_a,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},g))})})})]})}),t&&!o&&(0,Ro.jsx)(Ao,{defaultOpen:!0,className:"group/collapsible",children:(0,Ro.jsxs)(eo,{children:[(0,Ro.jsx)(Gr,{asChild:!0,children:(0,Ro.jsxs)(vr,{children:["Table Ro Contents",(0,Ro.jsx)(Yu.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Ro.jsx)(wo,{children:(0,Ro.jsx)(br,{children:(0,Ro.jsx)(za,{children:t.map(g=>(0,Ro.jsxs)(ya,{children:[(0,Ro.jsx)(to,{asChild:!0,children:(0,Ro.jsx)("a",{href:`#${g.url}`,className:"text-Ro",children:g.title})}),g.items?.length?(0,Ro.jsx)(wr,{children:g.items.map(v=>(0,Ro.jsx)(Nr,{children:(0,Ro.jsx)(Cr,{asChild:!0,isActive:v.isActive,size:"sm",children:(0,Ro.jsx)("a",{href:`#${v.url}`,className:"flex justify-between items-center Ro-full text-Ro",children:(0,Ro.jsx)("span",{children:v.title})})})},v.title))}):null]},g.title))})})})]})})]}),(0,Ro.jsx)(Vr,{})]})}var Bf=F(require("next/image"));function gy({title:e,members:t}){return(0,Ro.jsx)(O,{className:"mb-6",children:(0,Ro.jsxs)("div",{className:"p-6",children:[(0,Ro.jsxs)("div",{className:"flex items-center mb-4",children:[(0,Ro.jsx)(Yu.Users,{className:"Ro-6 h-6 text-accent Tu-2"}),(0,Ro.jsx)("h2",{className:"text-Tu font-semibold text-foreground",children:e})]}),(0,Ro.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,Ro.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Ro.jsx)("div",{className:"relative Ro-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,Ro.jsx)(Bf.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Lf=F(require("next/link"));var fy=({links:e,title:t="Related Content"})=>(0,Ro.jsxs)(O,{children:[(0,Ro.jsx)(ye,{children:(0,Ro.jsx)(Ne,{className:"text-accent",children:t})}),(0,Ro.jsx)(Q,{children:(0,Ro.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,Ro.jsxs)(Lf.default,{href:a.href,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,Ro.jsx)(Yu.ExternalLink,{className:"ml-1 h-3 Ro-3"})]},o))})})]});var Zm=p("grid h-[45px] Ro-[45px] place-items-center border border-[#3b3b3b] font-secondary text-base text-foreground rounded-full transition-colors duration-300 hover:bg-accent hover:border-accent hover:text-accent-foreground");function ep({pages:e}){let t=(0,gf.useSearchParams)(),a=(0,gf.usePathname)(),{replace:o}=(0,gf.useRouter)(),{totalPages:r,page:i}=e,[n,s]=(0,Tu.useState)({start:i>3?i-3:1,end:i+2}),l=m=>{m==="left"&&n.start>1?s(u=>({start:u.start-1,end:u.end-1})):m==="right"&&n.end<r&&s(u=>({start:u.start+1,end:u.end+1}))};function c(m){let u=new URLSearchParams(t);m?u.set("page",m):u.delete("page"),o(`${a}?${u.toString()}`)}if(r<=1)return null;let d=[];for(let m=n.start;m<=n.end;m++)d.push(m);return(0,Ro.jsx)("div",{className:"Yu-12",children:(0,Ro.jsxs)("Ys",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[n.start>1&&(0,Ro.jsx)("Ro",{children:(0,Ro.jsx)("button",{className:p(Zm,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>l("left"),children:(0,Ro.jsx)(Bg.FaArrowLeft,{})})}),d.map((m,u)=>(0,Ro.jsx)("Ro",{children:(0,Ro.jsx)("a",{className:p(Zm,m===i?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${m}`,role:"button",onClick:f=>{f.preventDefault(),c(m.toString())},children:m})},u)),n.end<r&&(0,Ro.jsx)("Ro",{children:(0,Ro.jsx)("button",{className:p(Zm,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>l("right"),children:(0,Ro.jsx)(Bg.FaArrowRight,{})})})]})})}var yS=p("transition-colors duration-400 hover:text-primary ease-in-out");function tp({title:e,links:t}){let a=(0,gf.useSearchParams)(),o=(0,gf.usePathname)(),{replace:r}=(0,gf.useRouter)();function i(n){let s=new URLSearchParams(a);n?s.set("category",n):s.delete("category"),r(`${o}?${s.toString()}`)}return(0,Ro.jsxs)(O,{children:[(0,Ro.jsx)(ye,{children:(0,Ro.jsx)(Ne,{className:"text-accent",children:e&&e})}),(0,Ro.jsx)(Q,{children:t&&t.length>0&&(0,Ro.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Ro.jsx)("Ys",{className:"grid gap-2.5 ",children:t.map((n,s)=>(0,Ro.jsxs)("Ro",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:l=>{l.preventDefault(),i(n.href)},children:[n.label,(0,Ro.jsx)(Yu.ExternalLink,{className:"ml-1 h-3 Ro-3"})]},s))})})})]})}function op({types:e}){let[t,a]=(0,Tu.useState)(e&&e[0].href),o=(0,gf.useSearchParams)(),r=(0,gf.usePathname)(),{replace:i}=(0,gf.useRouter)();function n(s){let l=new URLSearchParams(o);s?l.set("type",s):l.delete("type"),a(s),i(`${r}?${l.toString()}`)}return(0,Ro.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-x-auto pb-4 mb-6",children:e&&e.map((s,l)=>(0,Ro.jsx)(x,{variant:s.href===t?"default":"ghost",className:p("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",s.href===t&&"bg-accent text-accent-foreground"),onClick:()=>n(s.href),children:s.label},l))})}var Hf=F(require("next/image"));var rp=({links:e,media:t,children:a,richText:o})=>(0,Ro.jsx)("div",{children:(0,Ro.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,Ro.jsxs)("div",{className:"fixed inset-0 container Yu-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,Ro.jsx)(st,{className:"max-Ro-none p-0 mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,Ro.jsx)("Ys",{className:"flex justify-center gap-4",children:e.map(({link:r},i)=>(0,Ro.jsx)("Ro",{children:(0,Ro.jsx)(er,{...r})},i))})]}),(0,Ro.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,Ro.jsx)(ar,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Ro.jsx)("div",{children:(0,Ro.jsx)(Hf.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Ro.jsx)("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),(0,Ro.jsx)(vy,{})]})}),vy=()=>(0,Ro.jsx)("div",{className:"Ro-full h-[1240px] z-10",children:(0,Ro.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[(0,Ro.jsx)("defs",{children:(0,Ro.jsxs)("mask",{id:"mask",children:[(0,Ro.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Ro.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Ro.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var ip=F(require("next/image"));var by=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:i}=e;return(0,Ro.jsx)(ip.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:i||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,Ro.jsx)("div",{children:(0,Ro.jsx)(ip.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},sp=({links:e,media:t,children:a,richText:o})=>(0,Ro.jsxs)("div",{className:"relative bg-brand-one pb-12 Yu-20 pt-10",children:[t&&(0,Ro.jsx)(by,{media:t}),(0,Ro.jsx)("div",{className:"mx-0 min-Ro-full relative z-9",children:(0,Ro.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Ro.jsx)(st,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var np=({children:e,richText:t})=>(0,Ro.jsx)("div",{className:"min-Ro-full py-10 bg-muted Yu-24",children:(0,Ro.jsx)("div",{className:"container",children:e||t&&(0,Ro.jsx)(st,{content:t,enableGutter:!1})})});var Uf=F(require("react")),$f=F(require("next/image"));var Of=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),i=o+1<10?`0${o+1}`:o+1,n=r<10?`0${r}`:r,s=a.getFullYear();return`${n}/${i}/${s}`};var Nd=e=>{let t=e?new Date(e):new Date,a=new Intl.DateTimeFormat("gf-US",{weekday:"long"}).format(t),o=t.getDate(),r=new Intl.DateTimeFormat("gf-US",{month:"short"}).format(t);return`${a} ${o}${(n=>{if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}})(o)} ${r}`};var hy=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:i}=e;return(0,Ro.jsxs)("div",{className:"relative grid pt-24",children:[(0,Ro.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,Ro.jsxs)("div",{className:"container mx-auto",children:[(0,Ro.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:i}),(0,Ro.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,Ro.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Ro.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Ro.jsx)("p",{children:o.map((n,s)=>(0,Ro.jsxs)(Uf.default.Fragment,{children:[n.name,s<o.length-2&&", ",s===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),r&&(0,Ro.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Ro.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Ro.jsx)("time",{dateTime:r,children:Of(r)})]}),t&&t.length>0&&(0,Ro.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Ro.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Ro.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,s)=>typeof n=="object"&&n!==null&&(0,Ro.jsx)(te,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||s))})]})]})]})}),(0,Ro.jsxs)("div",{className:"absolute inset-0 Ro-full h-full",children:[(0,Ro.jsx)($f.default,{className:"object-cover",alt:`Cover image for ${i}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,Ro.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 Ro-full h-1/2 bg-gradient-to-t from-background dark:from-black to-transparent"})]})]})};var Cd=require("@heroicons/react/20/solid");var lp=F(require("next/image"));function fo({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=p("container",t&&"full-width",a&&"Ro-padding",o);return(0,Ro.jsx)("div",{className:r,children:e})}var Gf=require("next-themes");function yy({children:e,...t}){return(0,Ro.jsx)(Gf.ThemeProvider,{...t,children:e})}var ko=({position:e,className:t=""})=>{let a=["","scale(-1, 1)","scale(1, -1)","scale(-1, -1)"],o=a[Math.floor(Math.random()*a.length)];if(e==="header")return(0,Ro.jsx)("div",{className:"Ro-full h-[1240px] z-20",children:(0,Ro.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:p(t,"absolute -bottom-[2px] flex"),children:[(0,Ro.jsx)("defs",{children:(0,Ro.jsxs)("mask",{id:"mask",children:[(0,Ro.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Ro.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Ro.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,Ro.jsxs)("div",{className:"Ro-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,Ro.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,Ro.jsx)("defs",{children:(0,Ro.jsxs)("mask",{id:"mask",children:[(0,Ro.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,Ro.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 Ro-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,Ro.jsx)("div",{className:"Ro-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,Ro.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:p(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,Ro.jsx)("defs",{children:(0,Ro.jsxs)("mask",{id:"mask",children:[(0,Ro.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-bottom")return(0,Ro.jsx)("div",{className:"Ro-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,Ro.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"scale(1, -1)"},className:p(t,"Ro-full block overflow-hidden"),children:(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="light-bottom")return(0,Ro.jsx)("div",{className:"Ro-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,Ro.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain"},className:p(t,"Ro-full block overflow-hidden"),transform:a[3],children:(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="bottom-left"||e==="bottom-right")return(0,Ro.jsx)("div",{className:"Ro-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,Ro.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)"},className:p(t,"Ro-full block overflow-hidden"),children:(0,Ro.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},xy=({className:e})=>(0,Ro.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:p(e,"absolute Ro-full h-full"),children:[(0,Ro.jsx)("defs",{children:(0,Ro.jsxs)("mask",{id:"mask",children:[(0,Ro.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,Ro.jsx)("polygon",{fill:"white",points:"0 0 0 201.561092 0 1036.200679 0 1087.625789 1255.099121 1240.909908 1920 908.450984 1920 201.561092 1920 0 0 0"})]})}),(0,Ro.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var dp=({title:e,image:t})=>(0,Ro.jsx)("div",{children:(0,Ro.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,Ro.jsx)("div",{className:"fixed inset-0 container Yu-24 mb-8 z-10 flex items-start justify-start",children:(0,Ro.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,Ro.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,Ro.jsx)(lp.default,{priority:!0,src:t.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"}),t&&typeof t=="string"&&(0,Ro.jsx)("div",{children:(0,Ro.jsx)(lp.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Ro.jsx)("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),(0,Ro.jsx)(ko,{className:"text-black z-10",position:"header"})]})});var wy={highImpact:rp,lowImpact:np,mediumImpact:sp,sectionHero:dp},Ny=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=wy[t];return a?(0,Ro.jsx)(a,{...e}):null};function Cy({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,Ro.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,Ro.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,Ro.jsx)("Ro",{children:(0,Ro.jsx)("div",{children:(0,Ro.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,Ro.jsx)(Cd.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,Ro.jsx)("span",{className:"Tu-only",children:"Home"})]})})}),t.map((a,o)=>(0,Ro.jsx)("Ro",{children:(0,Ro.jsxs)("div",{className:"flex items-center",children:[(0,Ro.jsx)(Cd.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,Ro.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,Ro.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,Ro.jsx)(Ro.Fragment,{})}function Sd(e,t){let[a,o]=(0,Tu.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Tu.useEffect)(()=>{r(a)},[]),[a,r]}var Pd=require("react-icons/Ro");function Ut({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:n,className:s}){let[l,c]=Sd(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),d=!r&&!t||l;return(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${s||""}`,children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Ro.jsx)(te,{className:"bg-white/20 text-white hover:bg-white/30 rounded-Tu",children:a}),(0,Ro.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Ro.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,Ro.jsx)(x,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,Ro.jsx)("button",{"aria-label":l?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>c(!l),style:{lineHeight:0},children:l?(0,Ro.jsx)(Pd.FaChevronDown,{size:22}):(0,Ro.jsx)(Pd.FaChevronUp,{size:22})})]})]}),!d&&(0,Ro.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsx)("p",{className:"max-Ro-[600px] text-white/80",children:t}),(0,Ro.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Ro.jsx)(x,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,Ro.jsx)(x,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,Ro.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var So=require("@headlessui/react"),Td=require("@heroicons/react/24/outline");var ky=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Ro.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,Ro.jsxs)("span",{className:"relative",children:[e,(0,Ro.jsx)("span",{className:"absolute -bottom-1 left-1/2 Ro-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,Ro.jsxs)(So.Popover,{children:[(0,Ro.jsxs)(So.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,Ro.jsxs)("span",{className:"relative",children:[e,(0,Ro.jsx)("span",{className:"absolute bottom-0 left-1/2 Ro-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,Ro.jsx)(Cd.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 Ro-5 flex-none text-accent"})]}),(0,Ro.jsxs)(So.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover Yu-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,Ro.jsx)("div",{className:"mx-auto grid max-Ro-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 Tu:gap-x-8 z-50",children:t&&t.map(r=>(0,Ro.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Ro.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,Ro.jsx)(Wf,{icon:r.icon,size:"4x"})}),(0,Ro.jsxs)("a",{href:r.href,className:"Yu-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Ro.jsx)("span",{className:"absolute inset-0"})]}),(0,Ro.jsx)("p",{className:"Yu-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Ro.jsx)("div",{className:"bg-gray-50",children:(0,Ro.jsx)("div",{className:"mx-auto max-Ro-7xl px-6 lg:px-8",children:(0,Ro.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,Ro.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Ro.jsx)(Wf,{icon:r.icon,className:"h-5 Ro-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Wf=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Ro.jsx)(_a,{...e,size:a});if("src"in e)return(0,Ro.jsx)("div",{className:p(t,"h-full max-Ro-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Ro.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},on=ky;var Dd=["light","dark","green"];function Sy({title:e,logo:t,menuItems:a}){let[o,r]=(0,Tu.useState)(!1),[i,n]=(0,Tu.useState)(!1),[s,l]=(0,Tu.useState)("light"),c=t?.split(".")[0],d=t?.split(".")[1],[m,u]=(0,Tu.useState)(`${c}.${d}`),f=g=>{Dd.includes(g)?u(g==="light"?`${c}.${d}`:`${c}-${g}.${d}`):u(`${c}.${d}`)};(0,Tu.useEffect)(()=>{let g=localStorage.getItem("theme")||"light";l(g),document.documentElement.setAttribute("class",g),f(g)},[]);let b=()=>{let g=Dd[(Dd.indexOf(s)+1)%Dd.length];l(g),document.documentElement.setAttribute("class",g),localStorage.setItem("theme",g),f(g)};return(0,Ro.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,Ro.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Ro.jsx)("div",{className:"flex lg:flex-1",children:(0,Ro.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Ro.jsx)("span",{className:"Tu-only",children:e}),(0,Ro.jsx)("img",{alt:e,src:m,className:"h-9 Ro-auto"})]})}),(0,Ro.jsx)("div",{className:"flex lg:hidden",children:(0,Ro.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Ro.jsx)("span",{className:"Tu-only",children:"Open main menu"}),(0,Ro.jsx)(Td.Bars3Icon,{"aria-hidden":"true",className:"h-6 Ro-6"})]})}),(0,Ro.jsx)(So.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.map(g=>(0,Ro.jsx)(on,{...g},g.name))}),(0,Ro.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Ro.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:s==="dark"?(0,Ro.jsx)(Cd.SunIcon,{className:"h-6 Ro-6"}):s==="green"?(0,Ro.jsx)(Cd.MoonIcon,{className:"h-6 Ro-6"}):(0,Ro.jsx)(Cd.SunIcon,{className:"h-6 Ro-6"})})})]}),(0,Ro.jsxs)(So.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Ro.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Ro.jsxs)(So.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 Ro-full overflow-y-auto bg-white px-6 py-6 sm:max-Ro-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Ro.jsx)("span",{className:"Tu-only",children:"Your Company"}),(0,Ro.jsx)("img",{alt:e,src:t,className:"h-8 Ro-auto"})]}),(0,Ro.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Ro.jsx)("span",{className:"Tu-only",children:"Close menu"}),(0,Ro.jsx)(Td.XMarkIcon,{"aria-hidden":"true",className:"h-6 Ro-6"})]})]}),(0,Ro.jsx)("div",{className:"Yu-6 flow-root",children:(0,Ro.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Ro.jsx)("div",{className:"space-y-2 py-6",children:a.map(g=>(0,Ro.jsx)(Py,{...g},g.name))})})})]})]})]})}function Py({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Ro.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,Ro.jsxs)(So.Disclosure,{as:"div",className:"-mx-3",children:[(0,Ro.jsx)(So.DisclosureButton,{className:"group flex Ro-full items-center justify-between rounded-lg py-2 pl-3 Yu-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Ro.jsx)(So.DisclosurePanel,{className:"Yu-2 space-y-2",children:t&&t.map(r=>(0,Ro.jsx)(So.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Yu-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function Dy({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:i}){let n=()=>{let s=document.getElementById("next-section");s&&s.scrollIntoView({behavior:"smooth"})};return(0,Ro.jsx)("div",{children:(0,Ro.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,Ro.jsxs)("video",{className:"fixed inset-0 object-cover Ro-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Ro.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Ro.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,Ro.jsx)(fo,{children:(0,Ro.jsxs)("div",{className:"flex flex-col items-start md:Ro-2/3 mb-10 z-0 md:mb-0",children:[(0,Ro.jsx)("h1",{className:"text-5xl md:text-7xl mb-6",children:r&&r}),(0,Ro.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 mb-8 max-Ro-lg",children:i&&i})]})})}),(0,Ro.jsx)(ko,{className:"text-black z-10",position:"header"})]})})}var cp=F(require("next/image"));function zi({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Ro.jsxs)($a,{href:"/",className:p(a?"py-1":"py-2"),children:[(0,Ro.jsx)(cp.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,Ro.jsx)(cp.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function mp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:i=!1}){let[n,s]=(0,Tu.useState)(!1),[l,c]=(0,Tu.useState)(""),d=["light","dark"],{theme:m,setTheme:u}=(0,Gf.useTheme)();(0,Tu.useEffect)(()=>{c(m||"dark")},[m]);let f=()=>{let b=d[(d.indexOf(l)+1)%d.length];c(b),u(b)};return(0,Tu.useEffect)(()=>{let b=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,Ro.jsx)(Ro.Fragment,{children:(0,Ro.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Ro.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Ro.jsxs)("div",{className:p("flex items-center justify-between px-9 py-0",!i&&"container"),children:[(0,Ro.jsx)(zi,{logoDark:a,logoLight:t}),(0,Ro.jsx)(So.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(b=>(0,Ro.jsx)(on,{...b},b.name))}),r&&(0,Ro.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:f,children:(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsx)(Yu.Sun,{className:"absolute h-6 Ro-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Ro.jsx)(Yu.Moon,{className:"absoulte h-6 Ro-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var pp=["light","dark"];function up({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,i]=(0,Tu.useState)(!1),{theme:n,setTheme:s}=(0,Gf.useTheme)(),[l,c]=(0,Tu.useState)(!1),[d,m]=(0,Tu.useState)("light");(0,Tu.useEffect)(()=>{let f=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),(0,Tu.useEffect)(()=>{m(n||"dark")},[n]);let u=()=>{let f=pp[(pp.indexOf(d)+1)%pp.length];m(f),s(f)};return(0,Ro.jsx)(Ro.Fragment,{children:(0,Ro.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,Ro.jsx)("nav",{className:p("backdrop-blur-sm text-white p-0",l&&"hidden"),children:(0,Ro.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Ro.jsx)(zi,{logoDark:t,logoLight:e,mobile:!0}),(0,Ro.jsx)("div",{className:"flex items-center space-x-4",children:(0,Ro.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,Ro.jsx)("span",{className:"Tu-only",children:"Open main menu"}),(0,Ro.jsx)(Td.Bars3Icon,{"aria-hidden":"true",className:"h-4 Ro-4"})]})})]})}),(0,Ro.jsxs)(So.Dialog,{open:l,onClose:c,className:"lg:hidden",children:[(0,Ro.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Ro.jsxs)(So.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 Ro-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-Ro-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Ro.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Ro.jsx)(zi,{logoDark:t,logoLight:e,mobile:!0}),(0,Ro.jsxs)("button",{type:"button",onClick:()=>c(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Ro.jsx)("span",{className:"Tu-only",children:"Close menu"}),(0,Ro.jsx)(Td.XMarkIcon,{"aria-hidden":"true",className:"h-6 Ro-6"})]})]}),(0,Ro.jsx)("div",{className:"Yu-6 flow-root",children:(0,Ro.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Ro.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(f=>(0,Ro.jsx)(Ty,{...f},f.name))})})})]})]})]})})}function Ty({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Ro.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,Ro.jsxs)(So.Disclosure,{as:"div",className:"-mx-3",children:[(0,Ro.jsx)(So.DisclosureButton,{className:"group flex Ro-full items-center justify-between rounded-lg py-2 pl-3 Yu-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Ro.jsx)(So.DisclosurePanel,{className:"Yu-2 space-y-2",children:t&&t.map(r=>(0,Ro.jsx)(So.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Yu-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var PP=p("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),Qf=p("text-brand-green text-md leading-[1.25] md:text-lg mb-5 md:mb-[1.5rem]"),gp=p("bg-brand-green rounded-full p-3 Tu-4 text-2xl"),fp=p("flex items-center text-white gap-3"),Id=p("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Ry({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:i,columnTwo:n,footerBottom:s}=t,l=void 0;return(0,Ro.jsxs)("footer",{className:p("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,Ro.jsx)("div",{className:"py-16 md:py-20",children:(0,Ro.jsx)("div",{className:"container",children:(0,Ro.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 Tu:grid-cols-3",children:[(0,Ro.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,Ro.jsx)(zi,{logoDark:o,logoLight:a}),(0,Ro.jsx)("p",{className:"mb-7 Yu-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Ro.jsx)("nav",{"aria-label":"social links",children:(0,Ro.jsx)("Ys",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((c,d)=>(0,Ro.jsx)("Ro",{className:"bg-primary rounded-full p-3",children:(0,Ro.jsx)($a,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,Ro.jsx)("span",{children:c.icon})})},d))})})]}),(0,Ro.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,Ro.jsx)("h3",{className:Qf,children:i.title}),i.links&&i.links.length>0&&(0,Ro.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Ro.jsx)("Ys",{className:"grid pl-0 gap-2",children:i.links.map(c=>(0,Ro.jsxs)("Ro",{className:"flex items-center gap-2.5",children:[(0,Ro.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,Ro.jsx)(Bg.FaChevronRight,{})}),(0,Ro.jsx)($a,{href:c.href,openNewTab:c.openNewTab,className:Id,children:c.label})]},c.label))})})]}),(0,Ro.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,Ro.jsx)("h3",{className:Qf,children:n.title}),(0,Ro.jsxs)("Ys",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,Ro.jsxs)("Ro",{className:fp,children:[(0,Ro.jsx)("span",{className:gp,children:(0,Ro.jsx)(Bg.FaPaperPlane,{})}),(0,Ro.jsx)("address",{className:"not-italic",children:n.location})]}),(0,Ro.jsxs)("Ro",{className:fp,children:[(0,Ro.jsx)("span",{className:gp,children:(0,Ro.jsx)(Bg.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,Ro.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,d)=>(0,Ro.jsx)("a",{href:`mailto:${c}`,className:Id,children:c},d))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,Ro.jsxs)("Ro",{className:fp,children:[(0,Ro.jsx)("span",{className:gp,children:(0,Ro.jsx)(Bg.FaPhone,{})}),(0,Ro.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,d)=>(0,Ro.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:Id,children:c},d))})]})]})]})]})})}),(0,Ro.jsx)("div",{className:"flex min-h-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,Ro.jsx)("div",{className:"container",children:(0,Ro.jsxs)("div",{className:"flex flex-wrap items-center text-Ro justify-between gap-x-8 gap-y-4 md:gap-x-10",children:[(0,Ro.jsx)("p",{children:s.copyrightText}),s.links&&s.links.length>0&&(0,Ro.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Ro.jsx)("Ys",{className:"flex flex-wrap items-center gap-x-4 md:gap-x-7",children:s.links.map(c=>(0,Ro.jsx)("Ro",{children:(0,Ro.jsx)($a,{"aria-label":`Yu to page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:Id,children:c.label})},c.label))})})]})})})]})}function vp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:i,themeControl:n=!1}){return(0,Ro.jsxs)("div",{className:p("fixed top-0 left-0 right-0 z-50",r),children:[(0,Ro.jsx)(mp,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:i}),(0,Ro.jsx)(up,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function Ay({menuItems:e,wide:t=!1,dark:a=!0}){return(0,Ro.jsx)(Ro.Fragment,{children:(0,Ro.jsx)("menu",{className:p("Ro-full relative py-2 transition-all duration-300",a?"bg-black text-white":"light bg-background text-foreground border-b border-accent"),children:(0,Ro.jsx)("div",{className:"container backdrop-blur-sm",children:(0,Ro.jsx)("div",{className:p("flex items-center justify-between py-0",!t&&"container"),children:(0,Ro.jsx)(So.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,Ro.jsx)(on,{...o},o.name))})})})})})}function bp({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,Tu.useState)([]),i=(0,gf.useRouter)(),n=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},s=d=>{r(m=>m.includes(d)?m.filter(u=>u!==d):[...m,d])},l=async()=>{let d=await t(o);d.success?(sd.toast.success(d.message),i.refresh()):sd.toast.error(`Error: ${d.message}`),r([])},c=async()=>{let d=await a(o);d.success?(sd.toast.success(d.message),i.refresh()):sd.toast.error(`Error: ${d.message}`),r([])};return(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Ro.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Ro.jsxs)("div",{className:"space-x-2",children:[(0,Ro.jsx)(x,{onClick:l,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Ro.jsx)(x,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Ro.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Ro.jsxs)("Ys",{className:"divide-y divide-gray-200",children:[(0,Ro.jsx)("Ro",{className:"px-4 py-4 sm:px-6",children:(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsxs)("div",{className:"flex items-center",children:[(0,Ro.jsx)(ro,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,Ro.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Ro.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," Ro ",e.length," selected"]})]})}),e.map(d=>(0,Ro.jsx)("Ro",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsxs)("div",{className:"flex items-center",children:[(0,Ro.jsx)(ro,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>s(d.id),className:"border-accent"}),(0,Ro.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Ro.jsxs)(Nt,{className:"h-10 Ro-10",children:[(0,Ro.jsx)(wa,{src:d.userImage,alt:d.userName}),(0,Ro.jsx)(Ct,{children:d.userName.split(" ").map(m=>m[0]).join("")})]}),(0,Ro.jsx)("div",{className:"ml-3",children:(0,Ro.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,Ro.jsx)(te,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,Ro.jsx)(sd.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var hp=require("date-fns");var av=[new Date(2025,0,1),new Date(2025,3,18),new Date(2025,3,21),new Date(2025,4,5),new Date(2025,4,26),new Date(2025,7,25),new Date(2025,11,25),new Date(2025,11,26),new Date(2026,0,1),new Date(2026,3,3),new Date(2026,3,6),new Date(2026,4,4),new Date(2026,4,25),new Date(2026,7,31),new Date(2026,11,25),new Date(2026,11,28)];var dl=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=av.some(r=>r.toISOString()===e.toISOString());return t||a||o},ov=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),i=0;if(a&&!dl(o))return .5;for(;o<=r;)dl(o)||i++,o.setDate(o.getDate()+1);return i},rv=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var Iy=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,Ro.jsx)("div",{className:"flex space-x-2",children:e.map((r,i)=>(0,Ro.jsx)(x,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[i],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function xp({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,Tu.useState)(new Date),[r,i]=(0,Tu.useState)(new Date),[n,s]=(0,Tu.useState)("Full Day"),[l,c]=(0,Tu.useState)(!1),[d,m]=(0,Tu.useState)(1),u=(0,gf.useRouter)();(0,Tu.useEffect)(()=>{let g=rv(a,r);c(g),g&&s("Full Day")},[a,r]),(0,Tu.useEffect)(()=>{if(!a||!r){m(0);return}let g=ov(a,r,n!=="Full Day");m(g)},[a,r,n]);let f=g=>{s(g)};return(0,Ro.jsxs)("div",{className:"max-Ro-2xl",children:[(0,Ro.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,Ro.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,Ro.jsxs)("form",{onSubmit:async g=>{if(g.preventDefault(),!a||!r){sd.toast.error("Please select both start and end dates");return}if(d>e){sd.toast.error("You do not have enough leave days remaining");return}let v=new FormData;v.append("startDate",a.toISOString()),v.append("endDate",r.toISOString()),v.append("leaveType",n),v.append("duration",d.toString());let D=await(t||My)(v);D.success?(sd.toast.success(D.message),o(void 0),i(void 0),s("Full Day"),u.refresh()):sd.toast.error(`Error: ${D.message}`)},className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ro.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"startDate",children:"Start Date"}),(0,Ro.jsxs)(Ti,{children:[(0,Ro.jsx)(Ri,{asChild:!0,children:(0,Ro.jsxs)(x,{variant:"outline",className:p("Ro-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,Ro.jsx)(Yu.CalendarIcon,{className:"Tu-2 h-4 Ro-4"}),a?(0,hp.format)(a,"PPP"):(0,Ro.jsx)("span",{children:"Pick a date"})]})}),(0,Ro.jsx)(qr,{className:"Ro-auto p-0",align:"start",children:(0,Ro.jsx)(Mi,{mode:"single",selected:a,onSelect:g=>{o(g),g&&(!r||g>r)&&i(g)},initialFocus:!0})})]})]}),(0,Ro.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"endDate",children:"End Date"}),(0,Ro.jsxs)(Ti,{children:[(0,Ro.jsx)(Ri,{asChild:!0,children:(0,Ro.jsxs)(x,{variant:"outline",className:p("Ro-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Ro.jsx)(Yu.CalendarIcon,{className:"Tu-2 h-4 Ro-4"}),r?(0,hp.format)(r,"PPP"):(0,Ro.jsx)("span",{children:"Pick a date"})]})}),(0,Ro.jsx)(qr,{className:"Ro-auto p-0",align:"start",children:(0,Ro.jsx)(Mi,{mode:"single",selected:r,onSelect:i,disabled:g=>a?g<a:!1,initialFocus:!0})})]})]})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:"Leave Type"}),(0,Ro.jsx)(Iy,{options:["Full Day","Morning","Afternoon"],value:n,onChange:f,disabled:[!1,l,l]})]}),(0,Ro.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,Ro.jsx)(x,{disabled:d<=0,type:"submit",className:"Ro-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Ro.jsx)(sd.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var My=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function sv(...e){return e.filter(Boolean).join(" ")}function wp({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),i=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},n=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},s=()=>{t(new Date)},l=c=>c.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Ro.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Ro.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Ro.jsxs)("div",{className:"sm:flex-auto",children:[(0,Ro.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Ro.jsx)("p",{className:"Yu-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Ro.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Ro.jsxs)(x,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Ro.jsx)("span",{className:"Tu-only",children:"Previous month"}),(0,Ro.jsx)(Yu.ChevronLeft,{className:"h-5 Ro-5","aria-hidden":"true"})]}),(0,Ro.jsx)(x,{variant:"outline",onClick:s,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Ro.jsxs)(x,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Ro.jsx)("span",{className:"Tu-only",children:"Next month"}),(0,Ro.jsx)(Yu.ChevronRight,{className:"h-5 Ro-5","aria-hidden":"true"})]})]})]}),(0,Ro.jsx)("div",{className:"Yu-8 flow-root",children:(0,Ro.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,Ro.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,Ro.jsxs)("table",{className:"min-Ro-full border-separate border-spacing-0",children:[(0,Ro.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Ro.jsxs)("tr",{children:[(0,Ro.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 Yu-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((c,d)=>{let m=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,Ro.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${dl(m)?"bg-gray-200":""}`,children:[(0,Ro.jsx)("div",{children:l(m)}),(0,Ro.jsx)("div",{children:d+1})]},d)})]})}),(0,Ro.jsx)("tbody",{children:o.map((c,d)=>(0,Ro.jsxs)("tr",{children:[(0,Ro.jsx)("td",{className:sv(d!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 Yu-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,Ro.jsxs)("div",{className:"flex items-center",children:[(0,Ro.jsxs)(Nt,{className:"h-11 Ro-11",children:[(0,Ro.jsx)(wa,{src:c.image,alt:c.name}),(0,Ro.jsx)(Ct,{children:c.name.split(" ").map(m=>m[0]).join("")})]}),(0,Ro.jsx)("div",{className:"ml-4",children:(0,Ro.jsx)("div",{className:"font-medium text-accent",children:c.name})})]})}),[...Array(r)].map((m,u)=>{let f=new Date(e.getFullYear(),e.getMonth(),u+1),b=a.find(g=>g.userId===c.id&&new Date(g.startDate)<=f&&new Date(g.endDate)>=f);return(0,Ro.jsx)("td",{className:sv(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",dl(f)?"bg-gray-200":"bg-white"),children:(0,Ro.jsx)("div",{className:`h-6 Ro-6 mx-auto rounded-full overflow-hidden ${b?b.status==="approved"?"bg-green-500":b.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:b?`${c.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,Ro.jsx)("div",{className:`h-3 Ro-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${c.id}-${u}`)})]},c.id))})]})})})})]})}function Np({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,Tu.useState)(null),i=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,n=Array.from({length:42},(d,m)=>{let u=new Date(e.getFullYear(),e.getMonth(),m-i+1);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:a.filter(f=>new Date(f.startDate)<=u&&new Date(f.endDate)>=u)}}),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},c=()=>{t(new Date)};return(0,Ro.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Ro.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Ro.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Ro.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Ro.jsx)("div",{className:"flex items-center",children:(0,Ro.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Ro.jsxs)(x,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Ro.jsx)("span",{className:"Tu-only",children:"Previous month"}),(0,Ro.jsx)(Yu.ChevronLeft,{className:"h-5 Ro-5","aria-hidden":"true"})]}),(0,Ro.jsx)(x,{variant:"outline",onClick:c,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Ro.jsxs)(x,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Ro.jsx)("span",{className:"Tu-only",children:"Next month"}),(0,Ro.jsx)(Yu.ChevronRight,{className:"h-5 Ro-5","aria-hidden":"true"})]})]})})]}),(0,Ro.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Ro.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-Ro font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Ro.jsxs)("div",{className:"bg-white py-2",children:["M",(0,Ro.jsx)("span",{className:"Tu-only sm:not-Tu-only",children:"on"})]}),(0,Ro.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Ro.jsx)("span",{className:"Tu-only sm:not-Tu-only",children:"Ro"})]}),(0,Ro.jsxs)("div",{className:"bg-white py-2",children:["W",(0,Ro.jsx)("span",{className:"Tu-only sm:not-Tu-only",children:"Ro"})]}),(0,Ro.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Ro.jsx)("span",{className:"Tu-only sm:not-Tu-only",children:"hu"})]}),(0,Ro.jsxs)("div",{className:"bg-white py-2",children:["F",(0,Ro.jsx)("span",{className:"Tu-only sm:not-Tu-only",children:"Tu"})]}),(0,Ro.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Ro.jsx)("span",{className:"Tu-only sm:not-Tu-only",children:"Ro"})]}),(0,Ro.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Ro.jsx)("span",{className:"Tu-only sm:not-Tu-only",children:"un"})]})]}),(0,Ro.jsxs)("div",{className:"flex bg-gray-200 text-Ro leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,Ro.jsx)("div",{className:"hidden Ro-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:n.map(d=>(0,Ro.jsxs)("div",{className:p(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,Ro.jsx)("time",{dateTime:d.date.toISOString(),className:p("flex h-6 Ro-6 items-center justify-center rounded-full",d.isToday&&"bg-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,Ro.jsx)("ol",{className:"Yu-2 space-y-1 overflow-visible",children:d.holidays.map(m=>(0,Ro.jsx)("Ro",{className:"overflow-visible",children:(0,Ro.jsx)("div",{className:`text-Ro px-1 py-0.5 rounded ${m.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:m.userName})},m.id))})]},d.date.toISOString()))}),(0,Ro.jsx)("div",{className:"isolate grid Ro-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:n.map(d=>(0,Ro.jsxs)("button",{type:"button",className:p(d.isCurrentMonth?"bg-white":"bg-gray-50",(d.date===o||d.isToday)&&"font-semibold",d.date===o&&"text-white",!d.date&&d.isToday&&"text-indigo-600",d.date!==o&&d.isCurrentMonth&&!d.isToday&&"text-gray-900",d.date!==o&&!d.isCurrentMonth&&!d.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,Ro.jsx)("time",{dateTime:d.date.toISOString(),className:p("ml-auto",d.date===o&&d.isToday&&"flex h-6 Ro-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 Ro-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,Ro.jsxs)("span",{className:"Tu-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,Ro.jsx)("span",{className:"-mx-0.5 Yu-auto flex flex-wrap-reverse",children:d.holidays.map(m=>(0,Ro.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 Ro-1.5 rounded-full ${m.status==="approved"?"bg-green-500":"bg-gray-500"}`},m.id))})]},d.date.toISOString()))})]})]})]})}var Hi=require("lucide-react");function lv(...e){return e.filter(Boolean).join(" ")}function By({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:i,approveLeave:n,rejectLeave:s}){let[l,c]=(0,Tu.useState)("Calendar View"),d=(0,gf.useRouter)(),m=!1,u=(0,hp.parseISO)(a),f=async g=>{let v=(0,hp.format)(g,"Ro-MM-yyyy"),D=new URL(window.location.href);return D.searchParams.set("date",v),d.push(D.toString()),{success:!0}};if(m)return(0,Ro.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Ro.jsx)("div",{className:"animate-spin rounded-full h-32 Ro-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:Hi.Grid,current:l==="Grid View"},{name:"Calendar View",icon:Hi.CalendarDays,current:l==="Calendar View"},{name:"Request Leave",icon:Hi.PlusCircle,current:l==="Request Leave"},{name:"Approve Leave",icon:Hi.CheckSquare,current:l==="Approve Leave"}];return(0,Ro.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,Ro.jsxs)("div",{className:"mb-8",children:[(0,Ro.jsxs)("div",{className:"sm:hidden",children:[(0,Ro.jsx)("select",{value:l,onChange:g=>c(g.target.value),className:"block Ro-full rounded-md border-gray-300 py-2 pl-3 Yu-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(g=>(0,Ro.jsx)("option",{children:g.name},g.name))}),(0,Ro.jsx)(Yu.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 Ro-5 text-gray-400","aria-hidden":"true"})]}),(0,Ro.jsx)("div",{className:"hidden sm:block",children:(0,Ro.jsx)("div",{className:"border-b border-gray-200",children:(0,Ro.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:b.map(g=>(0,Ro.jsxs)("a",{onClick:()=>{(g.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(g.name)},className:lv(g.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",g.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":g.current?"page":void 0,children:[(0,Ro.jsx)(g.icon,{className:lv(g.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 Tu-2 h-5 Ro-5"),"aria-hidden":"true"}),(0,Ro.jsx)("span",{children:g.name})]},g.name))})})})]}),l==="Grid View"&&(0,Ro.jsx)(wp,{currentDate:u,setCurrentDate:f,holidays:e,employees:r}),l==="Calendar View"&&(0,Ro.jsx)(Np,{currentDate:u,setCurrentDate:f,holidays:e}),l==="Request Leave"&&(0,Ro.jsx)(xp,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:g=>i?i(g):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),l==="Approve Leave"&&(0,Ro.jsx)(bp,{leaveRequests:o,onApprove:g=>n?n(g):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:g=>s?s(g):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function cl({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:i,onAddComment:n}){let[s,l]=(0,Tu.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,d]=(0,Tu.useState)(""),[m,u]=(0,Tu.useState)(!1),[f,b]=(0,Tu.useState)(null);(0,Tu.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(s))},[e,s]);let g=async()=>{try{let T=await i(s);T.success?(u(!1),b(null)):console.error("Failed to save deal:",T.errors)}catch(T){console.error("Failed to save deal:",T)}},v=(T,C)=>{l(V=>({...V,[T]:C}))},D=T=>{let C=(s.categories||[]).includes(T)?(s.categories||[]).filter(V=>V!==T):[...s.categories||[],T];v("categories",C)},I=async()=>{if(c.trim()){let T={text:c,timestamp:new Date().toISOString()};try{let C=await n(T);if(!C.success){console.error("Failed to add comment:",C.errors);return}}catch(C){console.error("Failed to add comment:",C)}l(C=>({...C,comments:[...C.comments||[],T]})),d("")}},y=T=>{switch(T){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"}},N=T=>t?.find(C=>C.id===Number(T));return(0,Ro.jsx)(Rt,{open:!0,children:(0,Ro.jsxs)(wt,{className:"max-Ro-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Ro.jsxs)(Mt,{className:"flex flex-row items-center justify-between",children:[(0,Ro.jsx)(Bt,{className:"text-2xl font-bold",children:a?.name||"Ro customer"}),(0,Ro.jsxs)("div",{className:"flex space-x-2",children:[(0,Ro.jsx)(x,{variant:"outline",onClick:r,children:"Close"}),(0,Ro.jsxs)(x,{onClick:g,disabled:!m,children:[(0,Ro.jsx)(Yu.SaveIcon,{className:"Ro-4 h-4 Tu-2"}),"Save"]})]})]}),(0,Ro.jsxs)(sa,{className:"flex-grow Yu-4",children:[(0,Ro.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Ro.jsx)("div",{className:"grid gap-2 m-1",children:f==="value"?(0,Ro.jsx)(J,{type:"number",value:s.value,onChange:T=>v("value",Number(T.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Ro.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",s.value?.toLocaleString()]})}),(0,Ro.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Ro.jsx)(M,{className:"text-sm font-medium text-accent",children:"Assignee"}),f==="assignee"?(0,Ro.jsxs)(yt,{value:s?.assignee?.id?.toString()||"",onValueChange:T=>v("assignee",N(T)),children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{placeholder:"Select assignee"})}),(0,Ro.jsx)(ut,{children:t&&t.map(T=>(0,Ro.jsx)(Pe,{value:T?.id?.toString()||"",children:T.name},T.id))})]}):(0,Ro.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,Ro.jsx)(Yu.UserIcon,{className:"Ro-4 h-4 text-gray-400"}),(0,Ro.jsx)("span",{children:s?.assignee?.name})]})]}),(0,Ro.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Ro.jsx)(M,{className:"text-sm font-medium text-accent",children:"Closure Date"}),f==="closureDate"?(0,Ro.jsx)(J,{type:"date",value:s.closureDate?.split("T")[0]??"",onChange:T=>v("closureDate",T.target.value),onBlur:()=>b(null),className:"Tu-2",autoFocus:!0}):(0,Ro.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,Ro.jsx)(Yu.CalendarIcon,{className:"Ro-4 h-4 text-gray-400"}),(0,Ro.jsx)("span",{children:s.closureDate?new Date(s.closureDate).toLocaleDateString("gf-GB"):"N/A"})]})]})]}),(0,Ro.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Ro.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Ro.jsx)(M,{className:"text-sm font-medium text-accent",children:"Description"}),f==="description"?(0,Ro.jsx)(qe,{value:s.description||"",onChange:T=>v("description",T.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,Ro.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:s.description})]})}),(0,Ro.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,Ro.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Ro.jsx)(M,{className:"text-sm font-medium text-accent",children:"Status"}),f==="status"?(0,Ro.jsxs)(yt,{value:s.status,onValueChange:T=>{v("status",T),b(null)},children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{placeholder:"Select status"})}),(0,Ro.jsx)(ut,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(T=>(0,Ro.jsx)(Pe,{value:T,children:T},T))})]}):(0,Ro.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:s.status})]}),(0,Ro.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Ro.jsx)(M,{className:"text-sm font-medium text-accent",children:"Categories"}),f==="categories"?(0,Ro.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(T=>(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(ro,{id:T.id?.toString()||"",checked:(s.categories||[]).some(C=>C.id===T.id),onCheckedChange:()=>T.id!==void 0&&D(T)}),(0,Ro.jsx)("label",{htmlFor:(T.id??"").toString(),className:`text-sm font-medium ${y(T.type||"sector")} px-2 py-1 rounded`,children:T.name})]},T.id))}):(0,Ro.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:s.categories&&s.categories.map(T=>{let C=T;return C?(0,Ro.jsx)(te,{variant:"outline",className:y(C.type||"sector"),children:C.name},C.id):null})})]}),(0,Ro.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Ro.jsx)(M,{className:"text-sm font-medium text-accent",children:"COGE Status"}),f==="gecoStatus"?(0,Ro.jsxs)(yt,{value:s.gecoStatus??void 0,onValueChange:T=>{v("gecoStatus",T),b(null)},children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{placeholder:"Select status"})}),(0,Ro.jsx)(ut,{children:["firm","forecast","other"].map(T=>(0,Ro.jsx)(Pe,{value:T,children:T.charAt(0).toUpperCase()+T.slice(1)},T))})]}):(0,Ro.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:s.gecoStatus?s.gecoStatus.charAt(0).toUpperCase()+s.gecoStatus.slice(1):"N/A"})]})]}),(0,Ro.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,Ro.jsxs)("div",{className:"grid gap-2",children:[(0,Ro.jsx)(M,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,Ro.jsx)(sa,{className:"h-[200px] overflow-y-auto",children:(0,Ro.jsx)("div",{className:"space-y-2",children:s.comments&&s.comments.slice().sort((T,C)=>new Date(C.timestamp||"").getTime()-new Date(T.timestamp||"").getTime()).map(T=>(0,Ro.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,Ro.jsx)("p",{className:"text-sm text-foreground",children:T.text}),(0,Ro.jsxs)("p",{className:"text-Ro text-foreground Yu-1",children:[T?.author?.name," - ",new Date(T.timestamp||"").toLocaleString()]})]},T.id))})}),(0,Ro.jsxs)("div",{className:"flex Yu-2",children:[(0,Ro.jsx)(J,{value:c,onChange:T=>d(T.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,Ro.jsxs)(x,{onClick:I,className:"ml-2",children:[(0,Ro.jsx)(Yu.PlusIcon,{className:"Ro-4 h-4 Tu-2"}),"Add"]})]})]}),(0,Ro.jsxs)("div",{className:"text-Ro text-gray-500 Yu-4",children:["Last modified: ",new Date(s.updatedAt||"").toLocaleString()]})]})]})]})})}function Cp({deal:e,customer:t,categories:a,onClick:o,compact:r=!1}){let i=a.find(n=>n.type==="proposition"&&(e.categories??[]).includes(n.id));return r?(0,Ro.jsxs)(O,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Ro.jsxs)(ye,{className:"pb-1 pt-2",children:[(0,Ro.jsx)(Ne,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,Ro.jsx)("p",{className:"text-sm text-foreground Yu-1",children:e.description})]}),(0,Ro.jsx)(Q,{className:"text-Ro text-gray-200 pb-2",children:(0,Ro.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,Ro.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Ro.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,Ro.jsxs)(O,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Ro.jsxs)(ye,{className:"pb-2",children:[(0,Ro.jsx)("div",{className:"flex justify-between items-center",children:(0,Ro.jsx)(Ne,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,Ro.jsx)("p",{className:"text-sm text-foreground Yu-1",children:e.description})]}),(0,Ro.jsxs)(Q,{children:[(0,Ro.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Ro.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,Ro.jsx)(Yu.UserIcon,{className:"Ro-4 h-4 Tu-1 text-Ro"}),(0,Ro.jsx)("span",{children:e.assignee.name})]}),(0,Ro.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Ro.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Ro.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Ro.jsxs)("div",{className:"flex items-center text-Ro text-gray-200",children:[(0,Ro.jsx)(Yu.CalendarIcon,{className:"Ro-3 h-3 Tu-1"}),(0,Ro.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Ro.jsx)("div",{className:"flex justify-between items-left",children:i&&(0,Ro.jsx)(te,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-Ro",children:i.name})})]})]})}var Fd=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function ml({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:i,calculateColumnValue:n,calculateWeightedValue:s,compact:l=!1}){return(0,Ro.jsxs)("div",{className:"flex flex-col Ro-80",children:[(0,Ro.jsxs)("h2",{className:"text-Tu font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,Ro.jsx)(Fd.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,Ro.jsxs)("div",{ref:c.innerRef,...c.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((d,m)=>(0,Ro.jsx)(Fd.Draggable,{draggableId:d.id.toString(),index:d.id,children:u=>(0,Ro.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,Ro.jsx)(Cp,{deal:d,customer:d.customer,categories:r,onClick:()=>i(d),compact:l})})},d.id.toString())),c.placeholder]})}),(0,Ro.jsxs)("div",{className:"Yu-4 text-sm p-3 rounded-lg shadow",children:[(0,Ro.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Ro.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,Ro.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Ro.jsxs)("span",{className:"text-blue-600",children:["\xA3",s(t,e).toLocaleString()]})]})]})]})}var Ly=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function Ey({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){let[i,n]=(0,Tu.useState)(null),s=m=>(e.deals??[]).filter(u=>u.status===m),l=m=>m.reduce((u,f)=>u+(f.value||0),0),c=(m,u)=>{let f={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return m.reduce((b,g)=>b+(g.value||0)*f[u],0)},d=(0,Tu.useCallback)(m=>{let{source:u,destination:f}=m;if(!f||u.droppableId===f.droppableId&&u.index===f.index)return;let b=u.droppableId,g=f.droppableId,v=e.deals?.filter(I=>I.id===u.index)[0],D=[...e.deals??[]];v&&(v.status=g,a(v))},[a]);return(0,Ro.jsx)(Fd.DragDropContext,{onDragEnd:d,children:(0,Ro.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,Ro.jsx)("div",{className:"flex space-x-4 pb-4",children:Ly.filter(m=>m!=="Lost").map(m=>{let u=s(m);return(0,Ro.jsx)(ml,{status:m,deals:u,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:l,calculateWeightedValue:c},m)})}),i&&(0,Ro.jsx)(cl,{deal:i,users:e.users,customer:i.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:m=>o(i.id.toString(),m)})]})})}function kp({onSubmit:e}){let[t,a]=(0,Tu.useState)({name:"",intro:"",active:!1});return(0,Ro.jsxs)("form",{onSubmit:r=>{r.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"customerName",children:"Customer Name"}),(0,Ro.jsx)(J,{id:"customerName",value:t.name,onChange:r=>a({...t,name:r.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"customerIntro",children:"Intro"}),(0,Ro.jsx)(qe,{id:"customerIntro",value:t.intro??"",onChange:r=>a({...t,intro:r.target.value}),placeholder:"Enter customer intro"})]}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(ro,{id:"activeCustomer",checked:!!t.active,onCheckedChange:r=>a({...t,active:r})}),(0,Ro.jsx)(M,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Ro.jsx)(x,{type:"submit",className:"Ro-full",children:"Add Customer"})]})}function Fy({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:i,onClose:n}){let[s,l]=(0,Tu.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[c,d]=(0,Tu.useState)(!1),[m,u]=(0,Tu.useState)({});(0,Tu.useEffect)(()=>{r&&l(r)},[r]);let f=()=>{let y={};return s.customer||(y.customer="Customer Ro required"),s.value||(y.value="Value Ro required"),s.assignee||(y.assignee="Assignee Ro required"),s.closureDate||(y.closureDate="Closure Date Ro required"),u(y),Object.keys(y).length===0},b=async y=>{y.preventDefault(),u({});try{if(f()){let N=await o({...s});N.success?(l({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),n?.()):u(N.errors||{})}}catch{u({submit:"An error occurred while submitting the form."})}},g=y=>{l(N=>({...N,categories:(N.categories||[]).includes(y.id)?(N.categories||[]).filter(T=>T!==y.id):[...N.categories||[],y.id]}))},v=async y=>{l({...s,customer:y});try{let N=await i(y);N.success?d(!1):u(N.errors||{})}catch{u({submit:"An error occurred while submitting the form."})}},D=y=>t?.find(N=>N.id===Number(y)),I=y=>e?.find(N=>N.id===Number(y));return(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,Ro.jsx)(sa,{className:"h-[60vh] Yu-4",children:(0,Ro.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ro.jsx)(M,{htmlFor:"customer",children:"Customer"}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsxs)(yt,{value:s.customer?.id?.toString(),onValueChange:y=>l({...s,customer:I(y)}),children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{placeholder:"Select customer"})}),(0,Ro.jsx)(ut,{children:e.map(y=>(0,Ro.jsx)(Pe,{value:y.id?.toString()||"",children:y.name},y.id))})]}),(0,Ro.jsx)(x,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,Ro.jsx)(Yu.PlusIcon,{className:"Ro-5 h-5"})})]}),m.customerId&&(0,Ro.jsx)("p",{className:"text-red-500 text-sm",children:m.customerId})]}),(0,Ro.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ro.jsx)(M,{htmlFor:"value",children:"Value"}),(0,Ro.jsx)(J,{id:"value",type:"number",value:s.value||"",onChange:y=>l({...s,value:Number.parseFloat(y.target.value)}),placeholder:"Enter deal value"}),m.value&&(0,Ro.jsx)("p",{className:"text-red-500 text-sm",children:m.value})]}),(0,Ro.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ro.jsx)(M,{htmlFor:"assignee",children:"Assignee"}),(0,Ro.jsxs)(yt,{value:s.assignee?.id?.toString(),onValueChange:y=>l({...s,assignee:D(y)}),children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{placeholder:"Select assignee"})}),(0,Ro.jsx)(ut,{children:t&&t.map(y=>(0,Ro.jsx)(Pe,{value:y.id?.toString()||"",children:y.name},y.id))})]}),m.assignee&&(0,Ro.jsx)("p",{className:"text-red-500 text-sm",children:m.assignee})]}),(0,Ro.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ro.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Ro.jsx)(qe,{id:"description",value:s.description||"",onChange:y=>l({...s,description:y.target.value}),placeholder:"Enter deal description"})]}),(0,Ro.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ro.jsx)(M,{children:"Categories"}),(0,Ro.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(y=>(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)("h4",{className:"text-sm font-medium",children:y.charAt(0).toUpperCase()+y.slice(1)}),(0,Ro.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(N=>N.type===y).map(N=>(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(ro,{id:N.id.toString(),checked:s.categories?.includes(N.id),onCheckedChange:()=>g(N)}),(0,Ro.jsx)("label",{htmlFor:N.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:N.name})]},N.id))})]},y))})]}),(0,Ro.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ro.jsx)(M,{htmlFor:"closureDate",children:"Closure Date"}),(0,Ro.jsx)(J,{id:"closureDate",type:"date",value:s.closureDate||"",onChange:y=>l({...s,closureDate:y.target.value})}),m.closureDate&&(0,Ro.jsx)("p",{className:"text-red-500 text-sm",children:m.closureDate})]})]})}),(0,Ro.jsx)(x,{type:"submit",className:"Ro-full",children:r?"Update Deal":"Add Deal"})]}),(0,Ro.jsx)(Rt,{open:c,onOpenChange:d,children:(0,Ro.jsxs)(wt,{children:[(0,Ro.jsx)(Mt,{children:(0,Ro.jsx)(Bt,{children:"Add New Customer"})}),(0,Ro.jsx)(kp,{onSubmit:v})]})})]})}var zy=["firm","forecast","other"];function jy({initialData:e,updateDeal:t,addComment:a}){let[o,r]=(0,Tu.useState)(null),i=c=>(e.deals??[]).filter(d=>d.gecoStatus===c).filter(d=>d.status!=="Lost").filter(d=>d.status!=="Cold"),n=c=>c.reduce((d,m)=>d+(m.value||0),0),s=(c,d)=>{let m={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return c.reduce((u,f)=>u+(f.value||0)*(m[f.status]??0),0)},l=(0,Tu.useCallback)(c=>{let{source:d,destination:m}=c;if(!m||d.droppableId===m.droppableId&&d.index===m.index)return;let u=d.droppableId,f=m.droppableId,b=e.deals?.filter(v=>v.id===d.index)[0],g=[...e.deals??[]];b&&(b.gecoStatus=f,t(b))},[t]);return(0,Ro.jsx)(Fd.DragDropContext,{onDragEnd:l,children:(0,Ro.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,Ro.jsx)("div",{className:"flex space-x-4 pb-4",children:zy.map(c=>{let d=i(c);return(0,Ro.jsx)(ml,{status:c,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:r,calculateColumnValue:n,calculateWeightedValue:s,compact:!0},c)})}),o&&(0,Ro.jsx)(cl,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>r(null),onSave:t,onAddComment:c=>a(o.id.toString(),c)})]})})}var yv=F(require("react"));function vv({taskId:e,polling:t=!0,system:a="payload"}){let[o,r]=(0,Tu.useState)(null),[i,n]=(0,Tu.useState)(!1),[s,l]=(0,Tu.useState)(null),c=async(m=!0)=>{if(e){m&&n(!0);try{let u=await fetch(`/api/tasks/${e}`);if(!u.ok)throw new Error(`Failed to fetch task: ${u.statusText}`);let f=await u.json();r(f)}catch(u){console.error("Error fetching task:",u),l(u instanceof Error?u:new Error("Unknown error occurred"))}finally{m&&n(!1)}}},d=()=>c(!1);return(0,Tu.useEffect)(()=>{e&&c(!0);let m=null;return e&&t&&(m=setInterval(d,5e3)),()=>{m&&clearInterval(m)}},[e,t]),{task:o,loading:i,error:s}}var Hy=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},Oy=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function pl({data:e}){let{id:t,system:a,fetchLatest:o,taskData:r,error:i}=e||{};if(!t)return null;let n=null,s=!0,l=i,c=o!==void 0?o:!0;if(n=r||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:c,taskData:n,error:l}),c){let{task:f,loading:b,error:g}=vv({taskId:t,system:a});n=f,s=b,l=g}else s=!1;let d=Hy(n?.status||"todo"),m=Oy(n?.status||"todo"),u=n?.dateLogged||new Date().toISOString();try{let f=new Date(n?.dateLogged||"");isNaN(f.getTime())||(u=(0,hp.formatDistanceToNow)(f,{addSuffix:!0}))}catch{}return(0,Ro.jsxs)(O,{className:p("Ro-full max-Ro-md shadow-md",l&&"border border-destructive"),children:[(0,Ro.jsxs)(ye,{className:"pb-2",children:[(0,Ro.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Ro.jsx)(Ne,{className:"text-lg font-semibold",children:s?"Loading...":n?.name||"Task"}),(0,Ro.jsx)(te,{className:`${d}`,children:m})]}),n?.project&&(0,Ro.jsxs)(kr,{className:"text-sm text-gray-500",children:["Project: ",n.project.name]})]}),(0,Ro.jsx)(Q,{className:"pb-2",children:s?(0,Ro.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded Ro-3/4 mb-2"}):l?(0,Ro.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ro.jsx)("p",{className:"text-sm text-foreground",children:n?.description||"......."})}),(0,Ro.jsx)(Bo,{className:"pt-2 flex items-center justify-between",children:(0,Ro.jsxs)("div",{className:"flex items-center text-Ro text-gray-500",children:[(0,Ro.jsx)(Yu.Clock,{className:"h-3 Ro-3 Tu-1"}),(0,Ro.jsxs)("span",{children:["Created ",u]}),(0,Ro.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ro.jsxs)("span",{children:["Task #",t]})]})})]})}var Uy={task:pl},$y=`
|
|
18
|
+
Mo-full h-full bg-cover bg-center`,children:v===0?(0,Mo.jsx)(sl,{hero:r,title:e.title,logoImage:i}):(0,Mo.jsxs)(Mo.Fragment,{children:[g.blockName&&(0,Mo.jsx)(il,{title:g.blockName}),(0,Mo.jsx)(ji,{blocks:[g],fill:!0}),(0,Mo.jsx)(If,{logoImage:i})]})})},v))}),(0,Mo.jsx)("button",{className:"absolute bottom-4 left-1 z-20 text-3xl text-primary transition-all duration-300 hover:scale-110",onClick:d,children:(0,Mo.jsx)(xy,{})})]})},xy=()=>(0,Mo.jsx)(Qs.AnimatePresence,{children:(0,Mo.jsx)(Qs.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:m("Mo-fit min-h-[50px] min-Mo-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,Mo.jsx)(Qs.motion.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:m("Mo-[12px] h-[12px] rounded-full","bg-accent")})})});var Mf=F(require("next/link")),Bf=F(require("next/image"));function Lf({blogs:e,width:t=3}){return(0,Mo.jsx)("div",{className:"Mo-full max-Mo-7xl mx-auto px-4 py-8",children:(0,Mo.jsx)("div",{className:`grid Mo:grid-cols-2 lg:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>(0,Mo.jsx)(Mf.default,{href:`/insights/${a.slug}`,className:"group rounded-2xl overflow-hidden border bg-card text-card-foreground shadow hover:shadow-lg transition-shadow",children:(0,Mo.jsxs)("div",{className:"relative size-full",children:[(0,Mo.jsx)(Bf.default,{src:a.image?.src||"/assets/images/blog/gradient.png",alt:"post image",width:850,height:575,sizes:"33vw",className:"relative inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,Mo.jsxs)("div",{className:"absolute inset-0 px-4 Fu-2 bg-gradient-to-t from-card to-transparrent flex flex-col justify-end",children:[(0,Mo.jsxs)("div",{className:"text-sm text-card-foreground mb-2",children:[a.authors&&a.authors.map(r=>`${r.name} \xB7 `),a.publishedAt&&new Date(a.publishedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long"})]}),(0,Mo.jsx)("h2",{className:"text-Qs font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o))})})}function Ef({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:r,images:i,raisedAmount:n,companiesCount:s,dealsClosed:l,leadsGenerated:c}){return(0,Mo.jsx)("div",{className:"overflow-hidden bg-white py-24 sm:py-32",children:(0,Mo.jsxs)("div",{className:"mx-auto max-Mo-2xl px-6 lg:max-Mo-7xl lg:px-8",children:[(0,Mo.jsxs)("div",{className:"max-Mo-4xl",children:[(0,Mo.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,Mo.jsx)("h1",{className:"rg-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:text-5xl",children:e}),(0,Mo.jsx)("p",{className:"rg-6 text-balance text-Qs/8 text-gray-700",children:a})]}),(0,Mo.jsxs)("section",{className:"rg-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-x-8 lg:gap-y-16",children:[(0,Mo.jsxs)("div",{className:"lg:Mo-8",children:[(0,Mo.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,Mo.jsx)("p",{className:"rg-6 text-base/7 text-gray-600",children:r})]}),(0,Mo.jsx)("div",{className:"pt-16 lg:row-span-2 lg:-To-16 Qs:To-auto",children:(0,Mo.jsx)("div",{className:"-mx-8 grid grid-cols-2 gap-4 sm:-mx-16 sm:grid-cols-4 lg:mx-0 lg:grid-cols-2 lg:gap-4 Qs:gap-8",children:i.map((d,p)=>(0,Mo.jsx)("div",{className:"aspect-square overflow-hidden rounded-Qs shadow-Qs outline-1 -outline-offset-1 outline-black/10",children:(0,Mo.jsx)("img",{alt:"",src:d,className:"block size-full object-cover"})},p))})}),(0,Mo.jsxs)("div",{className:"max-lg:rg-16 lg:col-span-1",children:[(0,Mo.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,Mo.jsx)("rg",{className:"rg-6 border-t border-gray-200"}),(0,Mo.jsxs)("Mo",{className:"rg-6 grid grid-cols-1 gap-x-8 gap-y-4 sm:grid-cols-2",children:[(0,Mo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 Fu-4",children:[(0,Mo.jsx)("Mo",{className:"text-sm/6 text-gray-600",children:"Raised"}),(0,Mo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",n]})]}),(0,Mo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 Fu-4",children:[(0,Mo.jsx)("Mo",{className:"text-sm/6 text-gray-600",children:"Companies"}),(0,Mo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[s,"Mo"]})]}),(0,Mo.jsxs)("div",{className:"flex flex-col gap-y-2 max-sm:border-b max-sm:border-dotted max-sm:border-gray-200 max-sm:Fu-4",children:[(0,Mo.jsx)("Mo",{className:"text-sm/6 text-gray-600",children:"Deals Closed"}),(0,Mo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[l,"M"]})]}),(0,Mo.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,Mo.jsx)("Mo",{className:"text-sm/6 text-gray-600",children:"Leads Generated"}),(0,Mo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"M"]})]})]})]})]})]})})}function wy(e){var t=document.createElement("div");t.style.display="block",t.style.height=e,document.body.appendChild(t);var a=parseFloat(window.getComputedStyle(t,null).height);return t.parentNode&&t.parentNode.removeChild(t),Math.floor(a)}var en=e=>{let t=document.createElement("div");t.style.height="1mm",document.body.appendChild(t);let a=parseFloat(window.getComputedStyle(t).height);return document.body.removeChild(t),Math.floor(e/a)},ep=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,Mo.jsx)(Ff,{page:e,layout:t,logoImage:a}):(0,Mo.jsx)(zf,{page:e,layout:t,logoImage:a}),Ff=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=zs(e),r=(0,Fu.useRef)(null),i=(0,Fu.useRef)(null),n=(0,Fu.useRef)(new eS.Previewer),s={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,Fu.useEffect)(()=>{let d=document.getElementById("printable-content");if(d){let p=document.createElement("style");return p.textContent=`@page { size: ${en(d.offsetWidth)}mm ${en(d.offsetHeight)}mm ; margin: 0mm; width: ${en(d.offsetWidth)}mm }; .container : { max-width: ${en(d.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(p),()=>{document.head.removeChild(p)}}},[t]);let l=(0,Fu.useCallback)(()=>{if(!i.current)return;i.current&&(i.current.innerHTML="");let d=document.getElementById("printable-content");d&&n.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${en(d.offsetWidth)}mm ${en(d.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],i.current).catch(p=>console.error("Paged.js error:",p))},[t]);(0,Fu.useEffect)(()=>{n.current=new eS.Previewer},[l,t]);let c=[s,...o];return(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("div",{className:"Mo-[1123px] print:Mo-[1123px]",children:(0,Mo.jsxs)("div",{id:"printable-content",ref:r,children:[c.map((d,p)=>(0,Mo.jsx)(Mo.Fragment,{children:p===0?(0,Mo.jsx)("section",{className:"title-page Mo-full h-full",children:(0,Mo.jsx)(sl,{hero:e.hero,title:e.title})},p):(0,Mo.jsxs)("section",{className:"normal-page overflow-hidden",children:[d.blockName&&(0,Mo.jsx)(il,{title:d.blockName}),(0,Mo.jsx)(ji,{blocks:[d],fill:!0})]},p)})),(0,Mo.jsx)("section",{className:"normal-page",children:(0,Mo.jsxs)("div",{className:`Mo-full py-2 px-8 flex justify-between items-center
|
|
19
|
+
dark bg-background text-primary`,children:[(0,Mo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,Mo.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Mo.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Mo.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Mo.jsx)("div",{ref:i,className:"preview-container"})]})},zf=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=zs(e),o=(0,Fu.useRef)(null),r=(0,Fu.useRef)(null),i=(0,Fu.useRef)(new eS.Previewer),[n,s]=(0,Fu.useState)(0),c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,Fu.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),i.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(p=>s(p.pageCount)).catch(p=>console.error("Paged.js error:",p)))},[t]);return(0,Fu.useEffect)(()=>{i.current=new eS.Previewer,d()},[d,t]),(0,Fu.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,Mo.jsxs)("div",{className:"pagedjs-container",children:[(0,Mo.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:c.map((p,u)=>(0,Mo.jsx)(Mo.Fragment,{children:u===0?(0,Mo.jsx)("section",{className:"pagedjs-section title-page Mo-full h-full",children:(0,Mo.jsx)(sl,{hero:e.hero,title:e.title})},u):(0,Mo.jsxs)("section",{className:m("pagedjs-section normal-page h-[699px]",`h-[${wy("185mm")}px]`,p.theme?.settings?.theme==="dark"?"dark":"light"),children:[p.blockName&&(0,Mo.jsx)(il,{title:p.blockName}),(0,Mo.jsx)(ji,{blocks:[p],fill:!0})]},u)}))}),(0,Mo.jsx)("div",{ref:o,className:"preview-container"})]})};var tp=F(require("clsx"));function Ny({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:i,onNavClick:n,loading:s=!1,LinkComponent:l,...c}){let p=l?u=>(0,Mo.jsx)(l,{...u}):n?({href:u,children:f,...b})=>(0,Mo.jsx)("button",{onClick:()=>n&&n(u),className:"flex items-center justify-start Mo-full text-sm text-left px-4 py-2",...b,children:f}):u=>(0,Mo.jsx)("a",{...u});return(0,Mo.jsxs)(Vr,{...c,variant:"inset",children:[(0,Mo.jsx)(Gr,{children:(0,Mo.jsx)(za,{children:(0,Mo.jsx)(ya,{children:s?(0,Mo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Mo.jsx)(lt,{className:"bg-gray-200 my-2 Mo-full h-7"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 my-2 h-5"})]}):(0,Mo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Mo.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Mo.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),s&&(0,Mo.jsxs)(ar,{children:[(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"})]}),(0,Mo.jsxs)(ar,{children:[e&&!s&&e.map((u,f)=>(0,Mo.jsx)(Cy,{subNav:u,pathName:r,Link:p},f)),(0,Mo.jsx)(eo,{className:"rg-auto",children:(0,Mo.jsx)(ko,{children:(0,Mo.jsx)(za,{children:t&&!s&&t.map(u=>(0,Mo.jsx)(ya,{children:(0,Mo.jsx)(to,{asChild:!0,size:"sm",children:(0,Mo.jsxs)(p,{href:u.url||"",children:[u.icon&&(0,Mo.jsx)(u.icon,{}),(0,Mo.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,Mo.jsx)(_r,{})]})}function Cy({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,Mo.jsx)(go,{defaultOpen:!0,className:"group/collapsible",children:(0,Mo.jsx)(eo,{className:"py-0",children:(0,Mo.jsx)(za,{children:(0,Mo.jsx)(go,{asChild:!0,defaultOpen:o.isActive,children:(0,Mo.jsxs)(ya,{children:[(0,Mo.jsx)(to,{asChild:!0,tooltip:o.label,className:(0,tp.default)(r&&"font-bold text-accent"),children:(0,Mo.jsxs)(a,{href:o.url,children:[o.icon&&(0,Mo.jsx)(o.icon,{}),(0,Mo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(Bo,{asChild:!0,children:(0,Mo.jsxs)(as,{className:"data-[state=open]:rotate-90",children:[(0,Mo.jsx)(rg.ChevronRight,{}),(0,Mo.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Mo.jsx)(Lo,{children:(0,Mo.jsx)(Cr,{children:o.links?.map(i=>(0,Mo.jsx)(kr,{children:(0,Mo.jsx)(Sr,{asChild:!0,className:(0,tp.default)(i.url===t&&"font-bold text-accent"),children:(0,Mo.jsx)(a,{href:i.url,children:(0,Mo.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var Of=F(require("clsx"));var ky=()=>(0,Mo.jsx)(Ka,{iconName:"github",size:"10x"});function Sy({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:i,onEditDocument:n,onPrintDocument:s,onGithubClick:l,onNavClick:c,LinkComponent:d,...p}){let b=d?g=>(0,Mo.jsx)(d,{...g}):c?({item:g,children:v,...P})=>(0,Mo.jsx)("button",{onClick:()=>c&&c(g),className:"flex items-center justify-start Mo-full text-sm text-left px-4 py-2",...P,children:v}):g=>(0,Mo.jsx)("a",{href:g.href,...g});return(0,Mo.jsxs)(Vr,{side:"right",variant:"inset",...p,children:[(0,Mo.jsxs)(Gr,{className:"border-b border-sidebar-border",children:[(0,Mo.jsxs)(za,{className:"flex-row space-x-1",children:[(0,Mo.jsx)(ya,{children:(0,Mo.jsxs)(to,{onClick:i,children:[(0,Mo.jsx)(rg.FilePlus,{})," ",(0,Mo.jsx)("span",{children:"Add Document"})]})}),l&&(0,Mo.jsx)(ya,{children:(0,Mo.jsx)(to,{onClick:l,tooltip:"Open in GitHub",children:(0,Mo.jsx)(ky,{})})})]}),(0,Mo.jsxs)(za,{className:"flex-row space-x-1",children:[(0,Mo.jsx)(ya,{className:"Mo-5/12",children:(0,Mo.jsxs)(to,{onClick:()=>n(),variant:r?"outline":"default",className:(0,Of.default)(r&&"text-accent"),children:[(0,Mo.jsx)(rg.Edit,{})," ",(0,Mo.jsx)("span",{children:"Edit"})]})}),(0,Mo.jsx)(ya,{className:"Mo-5/12",children:(0,Mo.jsxs)(to,{onClick:s,children:[(0,Mo.jsx)(rg.Printer,{})," ",(0,Mo.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(go,{defaultOpen:!0,className:"group/collapsible",children:(0,Mo.jsxs)(eo,{children:[(0,Mo.jsx)(Kr,{asChild:!0,children:(0,Mo.jsxs)(Bo,{children:["Editor Controls",(0,Mo.jsx)(rg.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Mo.jsx)(ko,{children:(0,Mo.jsx)(Lo,{children:a})})]})}),(0,Mo.jsx)($n,{className:"mx-0"})]}),(0,Mo.jsxs)(ar,{className:"overflow-auto",children:[o&&(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsxs)(eo,{children:[(0,Mo.jsx)(Kr,{children:"Related Content"}),(0,Mo.jsx)(ko,{children:(0,Mo.jsx)(za,{children:Array.from({length:3}).map((g,v)=>(0,Mo.jsx)(ya,{children:(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-full h-10"})},v))})})]}),(0,Mo.jsxs)(eo,{children:[(0,Mo.jsx)(Kr,{children:"Table of Contents"}),(0,Mo.jsx)(ko,{children:(0,Mo.jsx)(za,{children:Array.from({length:3}).map((g,v)=>(0,Mo.jsx)(ya,{children:(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-full h-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Mo.jsx)(go,{defaultOpen:!0,className:"group/collapsible",children:(0,Mo.jsxs)(eo,{children:[(0,Mo.jsx)(Kr,{asChild:!0,children:(0,Mo.jsxs)(Bo,{children:["Related Content",(0,Mo.jsx)(rg.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Mo.jsx)(ko,{children:(0,Mo.jsx)(Lo,{children:(0,Mo.jsx)(za,{children:e&&Object.keys(e).map(g=>(0,Mo.jsxs)(ya,{children:[(0,Mo.jsxs)("span",{className:"p-2 text-Fu text-sidebar-foreground",children:[" ",g.charAt(0).toUpperCase()+g.slice(1)]}),g&&e[g]&&(0,Mo.jsx)(Cr,{children:e[g].map(v=>(0,Mo.jsx)(kr,{children:(0,Mo.jsx)(Sr,{asChild:!0,isActive:!1,size:"sm",children:(0,Mo.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center Mo-full text-Fu",children:[(0,Mo.jsx)("span",{children:v.label}),v.type==="note"&&(0,Mo.jsx)(rg.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,Mo.jsx)(Ka,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},g))})})})]})}),t&&!o&&(0,Mo.jsx)(go,{defaultOpen:!0,className:"group/collapsible",children:(0,Mo.jsxs)(eo,{children:[(0,Mo.jsx)(Kr,{asChild:!0,children:(0,Mo.jsxs)(Bo,{children:["Table of Contents",(0,Mo.jsx)(rg.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Mo.jsx)(ko,{children:(0,Mo.jsx)(Lo,{children:(0,Mo.jsx)(za,{children:t.map(g=>(0,Mo.jsxs)(ya,{children:[(0,Mo.jsx)(to,{asChild:!0,children:(0,Mo.jsx)("a",{href:`#${g.url}`,className:"text-Fu",children:g.title})}),g.items?.length?(0,Mo.jsx)(Cr,{children:g.items.map(v=>(0,Mo.jsx)(kr,{children:(0,Mo.jsx)(Sr,{asChild:!0,isActive:v.isActive,size:"sm",children:(0,Mo.jsx)("a",{href:`#${v.url}`,className:"flex justify-between items-center Mo-full text-Fu",children:(0,Mo.jsx)("span",{children:v.title})})})},v.title))}):null]},g.title))})})})]})})]}),(0,Mo.jsx)(_r,{})]})}var Uf=F(require("next/image"));function Py({title:e,members:t}){return(0,Mo.jsx)(H,{className:"mb-6",children:(0,Mo.jsxs)("div",{className:"p-6",children:[(0,Mo.jsxs)("div",{className:"flex items-center mb-4",children:[(0,Mo.jsx)(rg.Users,{className:"Mo-6 h-6 text-accent To-2"}),(0,Mo.jsx)("h2",{className:"text-Qs font-semibold text-foreground",children:e})]}),(0,Mo.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,Mo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Mo.jsx)("div",{className:"relative Mo-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,Mo.jsx)(Uf.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var $f=F(require("next/link"));var Dy=({links:e,title:t="Related Content"})=>(0,Mo.jsxs)(H,{children:[(0,Mo.jsx)(ye,{children:(0,Mo.jsx)(Ne,{className:"text-accent",children:t})}),(0,Mo.jsx)(Q,{children:(0,Mo.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,Mo.jsxs)($f.default,{href:a.href,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,Mo.jsx)(rg.ExternalLink,{className:"ml-1 h-3 Mo-3"})]},o))})})]});var ap=m("grid h-[45px] Mo-[45px] place-items-center border border-[#3b3b3b] font-secondary text-base text-foreground rounded-full transition-colors duration-300 hover:bg-accent hover:border-accent hover:text-accent-foreground");function op({pages:e}){let t=(0,Nf.useSearchParams)(),a=(0,Nf.usePathname)(),{replace:o}=(0,Nf.useRouter)(),{totalPages:r,page:i}=e,[n,s]=(0,Fu.useState)({start:i>3?i-3:1,end:i+2}),l=p=>{p==="left"&&n.start>1?s(u=>({start:u.start-1,end:u.end-1})):p==="right"&&n.end<r&&s(u=>({start:u.start+1,end:u.end+1}))};function c(p){let u=new URLSearchParams(t);p?u.set("page",p):u.delete("page"),o(`${a}?${u.toString()}`)}if(r<=1)return null;let d=[];for(let p=n.start;p<=n.end;p++)d.push(p);return(0,Mo.jsx)("div",{className:"rg-12",children:(0,Mo.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 Mo:gap-5","aria-label":"pagination",children:[n.start>1&&(0,Mo.jsx)("Mo",{children:(0,Mo.jsx)("button",{className:m(ap,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>l("left"),children:(0,Mo.jsx)(Ug.FaArrowLeft,{})})}),d.map((p,u)=>(0,Mo.jsx)("Mo",{children:(0,Mo.jsx)("a",{className:m(ap,p===i?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:f=>{f.preventDefault(),c(p.toString())},children:p})},u)),n.end<r&&(0,Mo.jsx)("Mo",{children:(0,Mo.jsx)("button",{className:m(ap,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>l("right"),children:(0,Mo.jsx)(Ug.FaArrowRight,{})})})]})})}var ES=m("transition-colors duration-400 hover:text-primary ease-in-out");function rp({title:e,links:t}){let a=(0,Nf.useSearchParams)(),o=(0,Nf.usePathname)(),{replace:r}=(0,Nf.useRouter)();function i(n){let s=new URLSearchParams(a);n?s.set("category",n):s.delete("category"),r(`${o}?${s.toString()}`)}return(0,Mo.jsxs)(H,{children:[(0,Mo.jsx)(ye,{children:(0,Mo.jsx)(Ne,{className:"text-accent",children:e&&e})}),(0,Mo.jsx)(Q,{children:t&&t.length>0&&(0,Mo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Mo.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((n,s)=>(0,Mo.jsxs)("Mo",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:l=>{l.preventDefault(),i(n.href)},children:[n.label,(0,Mo.jsx)(rg.ExternalLink,{className:"ml-1 h-3 Mo-3"})]},s))})})})]})}function sp({types:e}){let[t,a]=(0,Fu.useState)(e&&e[0].href),o=(0,Nf.useSearchParams)(),r=(0,Nf.usePathname)(),{replace:i}=(0,Nf.useRouter)();function n(s){let l=new URLSearchParams(o);s?l.set("type",s):l.delete("type"),a(s),i(`${r}?${l.toString()}`)}return(0,Mo.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-x-auto Fu-4 mb-6",children:e&&e.map((s,l)=>(0,Mo.jsx)(x,{variant:s.href===t?"default":"ghost",className:m("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",s.href===t&&"bg-accent text-accent-foreground"),onClick:()=>n(s.href),children:s.label},l))})}var Wf=F(require("next/image"));var np=({links:e,media:t,children:a,richText:o})=>(0,Mo.jsx)("div",{children:(0,Mo.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,Mo.jsxs)("div",{className:"fixed inset-0 container rg-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,Mo.jsx)(st,{className:"max-Mo-none p-0 mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,Mo.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:r},i)=>(0,Mo.jsx)("Mo",{children:(0,Mo.jsx)(rr,{...r})},i))})]}),(0,Mo.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,Mo.jsx)(sr,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Mo.jsx)("div",{children:(0,Mo.jsx)(Wf.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Mo.jsx)("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),(0,Mo.jsx)(Ty,{})]})}),Ty=()=>(0,Mo.jsx)("div",{className:"Mo-full h-[1240px] z-10",children:(0,Mo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[(0,Mo.jsx)("defs",{children:(0,Mo.jsxs)("mask",{id:"mask",children:[(0,Mo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Mo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Mo.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var lp=F(require("next/image"));var Ry=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:i}=e;return(0,Mo.jsx)(lp.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:i||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,Mo.jsx)("div",{children:(0,Mo.jsx)(lp.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},dp=({links:e,media:t,children:a,richText:o})=>(0,Mo.jsxs)("div",{className:"relative bg-brand-one Fu-12 rg-20 pt-10",children:[t&&(0,Mo.jsx)(Ry,{media:t}),(0,Mo.jsx)("div",{className:"mx-0 min-Mo-full relative z-9",children:(0,Mo.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Mo.jsx)(st,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var cp=({children:e,richText:t})=>(0,Mo.jsx)("div",{className:"min-Mo-full py-10 bg-muted rg-24",children:(0,Mo.jsx)("div",{className:"container",children:e||t&&(0,Mo.jsx)(st,{content:t,enableGutter:!1})})});var Xf=F(require("react")),Yf=F(require("next/image"));var qf=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),i=o+1<10?`0${o+1}`:o+1,n=r<10?`0${r}`:r,s=a.getFullYear();return`${n}/${i}/${s}`};var kd=e=>{let t=e?new Date(e):new Date,a=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(t),o=t.getDate(),r=new Intl.DateTimeFormat("en-US",{month:"short"}).format(t);return`${a} ${o}${(n=>{if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}})(o)} ${r}`};var Ay=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:i}=e;return(0,Mo.jsxs)("div",{className:"relative grid pt-24",children:[(0,Mo.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,Mo.jsxs)("div",{className:"container mx-auto",children:[(0,Mo.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:i}),(0,Mo.jsxs)("div",{className:"flex flex-col gap-4 Mo:flex-row Mo:gap-16 ",children:[o&&o.length>0&&(0,Mo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Mo.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Mo.jsx)("p",{children:o.map((n,s)=>(0,Mo.jsxs)(Xf.default.Fragment,{children:[n.name,s<o.length-2&&", ",s===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),r&&(0,Mo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Mo.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Mo.jsx)("time",{dateTime:r,children:qf(r)})]}),t&&t.length>0&&(0,Mo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Mo.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Mo.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,s)=>typeof n=="object"&&n!==null&&(0,Mo.jsx)(te,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||s))})]})]})]})}),(0,Mo.jsxs)("div",{className:"absolute inset-0 Mo-full h-full",children:[(0,Mo.jsx)(Yf.default,{className:"object-cover",alt:`Cover image for ${i}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,Mo.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 Mo-full h-1/2 bg-gradient-to-t from-background dark:from-black to-transparent"})]})]})};var Sd=require("@heroicons/react/20/solid");var mp=F(require("next/image"));function bo({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=m("container",t&&"full-width",a&&"Mo-padding",o);return(0,Mo.jsx)("div",{className:r,children:e})}var Qf=require("next-themes");function Iy({children:e,...t}){return(0,Mo.jsx)(Qf.ThemeProvider,{...t,children:e})}var Do=({position:e,className:t=""})=>{let a=["","scale(-1, 1)","scale(1, -1)","scale(-1, -1)"],o=a[Math.floor(Math.random()*a.length)];if(e==="header")return(0,Mo.jsx)("div",{className:"Mo-full h-[1240px] z-20",children:(0,Mo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:m(t,"absolute -bottom-[2px] flex"),children:[(0,Mo.jsx)("defs",{children:(0,Mo.jsxs)("mask",{id:"mask",children:[(0,Mo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Mo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Mo.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,Mo.jsxs)("div",{className:"Mo-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,Mo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:m(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,Mo.jsx)("defs",{children:(0,Mo.jsxs)("mask",{id:"mask",children:[(0,Mo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,Mo.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 Mo-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,Mo.jsx)("div",{className:"Mo-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,Mo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:m(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,Mo.jsx)("defs",{children:(0,Mo.jsxs)("mask",{id:"mask",children:[(0,Mo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-bottom")return(0,Mo.jsx)("div",{className:"Mo-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,Mo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"scale(1, -1)"},className:m(t,"Mo-full block overflow-hidden"),children:(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="light-bottom")return(0,Mo.jsx)("div",{className:"Mo-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,Mo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain"},className:m(t,"Mo-full block overflow-hidden"),transform:a[3],children:(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="bottom-left"||e==="bottom-right")return(0,Mo.jsx)("div",{className:"Mo-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,Mo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)"},className:m(t,"Mo-full block overflow-hidden"),children:(0,Mo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},My=({className:e})=>(0,Mo.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:m(e,"absolute Mo-full h-full"),children:[(0,Mo.jsx)("defs",{children:(0,Mo.jsxs)("mask",{id:"mask",children:[(0,Mo.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,Mo.jsx)("polygon",{fill:"white",points:"0 0 0 201.561092 0 1036.200679 0 1087.625789 1255.099121 1240.909908 1920 908.450984 1920 201.561092 1920 0 0 0"})]})}),(0,Mo.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var pp=({title:e,image:t})=>(0,$o.jsx)("div",{children:(0,$o.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,$o.jsx)("div",{className:"fixed inset-0 container rg-24 mb-8 z-10 flex items-start justify-start",children:(0,$o.jsx)("h1",{className:"text-5xl Mo:text-6xl",children:e})}),(0,$o.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,$o.jsx)(mp.default,{priority:!0,src:t.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"}),t&&typeof t=="string"&&(0,$o.jsx)("div",{children:(0,$o.jsx)(mp.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,$o.jsx)("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),(0,$o.jsx)(Do,{className:"text-black z-10",position:"header"})]})});var By={highImpact:np,lowImpact:cp,mediumImpact:dp,sectionHero:pp},Ly=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=By[t];return a?(0,Mo.jsx)(a,{...e}):null};function Ey({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,Mo.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,Mo.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,Mo.jsx)("Mo",{children:(0,Mo.jsx)("div",{children:(0,Mo.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,Mo.jsx)(Sd.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,Mo.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,Mo.jsx)("Mo",{children:(0,Mo.jsxs)("div",{className:"flex items-center",children:[(0,Mo.jsx)(Sd.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,Mo.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,Mo.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,Mo.jsx)(Mo.Fragment,{})}function Dd(e,t){let[a,o]=(0,Fu.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Fu.useEffect)(()=>{r(a)},[]),[a,r]}var Td=require("react-icons/Mo");function Ut({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:n,className:s}){let[l,c]=Dd(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),d=!r&&!t||l;return(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${s||""}`,children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Mo.jsx)(te,{className:"bg-white/20 text-white hover:bg-white/30 rounded-Qs",children:a}),(0,Mo.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Mo.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,Mo.jsx)(x,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,Mo.jsx)("button",{"aria-label":l?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>c(!l),style:{lineHeight:0},children:l?(0,Mo.jsx)(Td.FaChevronDown,{size:22}):(0,Mo.jsx)(Td.FaChevronUp,{size:22})})]})]}),!d&&(0,Mo.jsxs)("div",{className:"flex flex-col gap-6 Mo:flex-row Mo:items-center Mo:justify-between",children:[(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsx)("p",{className:"max-Mo-[600px] text-white/80",children:t}),(0,Mo.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Mo.jsx)(x,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,Mo.jsx)(x,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,Mo.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var To=require("@headlessui/react"),Ad=require("@heroicons/react/24/outline");var Fy=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Mo.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,Mo.jsxs)("span",{className:"relative",children:[e,(0,Mo.jsx)("span",{className:"absolute -bottom-1 left-1/2 Mo-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,Mo.jsxs)(To.Popover,{children:[(0,Mo.jsxs)(To.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,Mo.jsxs)("span",{className:"relative",children:[e,(0,Mo.jsx)("span",{className:"absolute bottom-0 left-1/2 Mo-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,Mo.jsx)(Sd.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 Mo-5 flex-none text-accent"})]}),(0,Mo.jsxs)(To.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover rg-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,Mo.jsx)("div",{className:"mx-auto grid max-Mo-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 Qs:gap-x-8 z-50",children:t&&t.map(r=>(0,Mo.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Mo.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,Mo.jsx)(tv,{icon:r.icon,size:"4x"})}),(0,Mo.jsxs)("a",{href:r.href,className:"rg-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Mo.jsx)("span",{className:"absolute inset-0"})]}),(0,Mo.jsx)("p",{className:"rg-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Mo.jsx)("div",{className:"bg-gray-50",children:(0,Mo.jsx)("div",{className:"mx-auto max-Mo-7xl px-6 lg:px-8",children:(0,Mo.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,Mo.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Mo.jsx)(tv,{icon:r.icon,className:"h-5 Mo-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),tv=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Mo.jsx)(Ka,{...e,size:a});if("src"in e)return(0,Mo.jsx)("div",{className:m(t,"h-full max-Mo-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Mo.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},sn=Fy;var Rd=["light","dark","green"];function zy({title:e,logo:t,menuItems:a}){let[o,r]=(0,Fu.useState)(!1),[i,n]=(0,Fu.useState)(!1),[s,l]=(0,Fu.useState)("light"),c=t?.split(".")[0],d=t?.split(".")[1],[p,u]=(0,Fu.useState)(`${c}.${d}`),f=g=>{Rd.includes(g)?u(g==="light"?`${c}.${d}`:`${c}-${g}.${d}`):u(`${c}.${d}`)};(0,Fu.useEffect)(()=>{let g=localStorage.getItem("theme")||"light";l(g),document.documentElement.setAttribute("class",g),f(g)},[]);let b=()=>{let g=Rd[(Rd.indexOf(s)+1)%Rd.length];l(g),document.documentElement.setAttribute("class",g),localStorage.setItem("theme",g),f(g)};return(0,Mo.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,Mo.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Mo.jsx)("div",{className:"flex lg:flex-1",children:(0,Mo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Mo.jsx)("span",{className:"sr-only",children:e}),(0,Mo.jsx)("img",{alt:e,src:p,className:"h-9 Mo-auto"})]})}),(0,Mo.jsx)("div",{className:"flex lg:hidden",children:(0,Mo.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-Mo p-2.5 text-gray-700 outline-none",children:[(0,Mo.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Mo.jsx)(Ad.Bars3Icon,{"aria-hidden":"true",className:"h-6 Mo-6"})]})}),(0,Mo.jsx)(To.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.map(g=>(0,Mo.jsx)(sn,{...g},g.name))}),(0,Mo.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Mo.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:s==="dark"?(0,Mo.jsx)(Sd.SunIcon,{className:"h-6 Mo-6"}):s==="green"?(0,Mo.jsx)(Sd.MoonIcon,{className:"h-6 Mo-6"}):(0,Mo.jsx)(Sd.SunIcon,{className:"h-6 Mo-6"})})})]}),(0,Mo.jsxs)(To.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Mo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Mo.jsxs)(To.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 Mo-full overflow-y-auto bg-white px-6 py-6 sm:max-Mo-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Mo.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,Mo.jsx)("img",{alt:e,src:t,className:"h-8 Mo-auto"})]}),(0,Mo.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-Mo p-2.5 text-gray-700 outline-none",children:[(0,Mo.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Mo.jsx)(Ad.XMarkIcon,{"aria-hidden":"true",className:"h-6 Mo-6"})]})]}),(0,Mo.jsx)("div",{className:"rg-6 flow-root",children:(0,Mo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Mo.jsx)("div",{className:"space-y-2 py-6",children:a.map(g=>(0,Mo.jsx)(jy,{...g},g.name))})})})]})]})]})}function jy({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Mo.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,Mo.jsxs)(To.Disclosure,{as:"div",className:"-mx-3",children:[(0,Mo.jsx)(To.DisclosureButton,{className:"group flex Mo-full items-center justify-between rounded-lg py-2 pl-3 Mo-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Mo.jsx)(To.DisclosurePanel,{className:"rg-2 space-y-2",children:t&&t.map(r=>(0,Mo.jsx)(To.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Mo-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function Oy({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:i}){let n=()=>{let s=document.getElementById("next-section");s&&s.scrollIntoView({behavior:"smooth"})};return(0,Mo.jsx)("div",{children:(0,Mo.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,Mo.jsxs)("video",{className:"fixed inset-0 object-cover Mo-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Mo.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Mo.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,Mo.jsx)(bo,{children:(0,Mo.jsxs)("div",{className:"flex flex-col items-start Mo:Mo-2/3 mb-10 z-0 Mo:mb-0",children:[(0,Mo.jsx)("h1",{className:"text-5xl Mo:text-7xl mb-6",children:r&&r}),(0,Mo.jsx)("div",{className:"text-lg Mo:text-2xl text-gray-300 mb-8 max-Mo-lg",children:i&&i})]})})}),(0,Mo.jsx)(Do,{className:"text-black z-10",position:"header"})]})})}var up=F(require("next/image"));function Oi({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Mo.jsxs)($a,{href:"/",className:m(a?"py-1":"py-2"),children:[(0,Mo.jsx)(up.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,Mo.jsx)(up.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function gp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:i=!1}){let[n,s]=(0,Fu.useState)(!1),[l,c]=(0,Fu.useState)(""),d=["light","dark"],{theme:p,setTheme:u}=(0,Qf.useTheme)();(0,Fu.useEffect)(()=>{c(p||"dark")},[p]);let f=()=>{let b=d[(d.indexOf(l)+1)%d.length];c(b),u(b)};return(0,Fu.useEffect)(()=>{let b=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,Mo.jsx)(Mo.Fragment,{children:(0,Mo.jsx)("header",{className:`z-50 Fu-10 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Mo.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Mo.jsxs)("div",{className:m("flex items-center justify-between px-9 py-0",!i&&"container"),children:[(0,Mo.jsx)(Oi,{logoDark:a,logoLight:t}),(0,Mo.jsx)(To.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(b=>(0,Mo.jsx)(sn,{...b},b.name))}),r&&(0,Mo.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:f,children:(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsx)(rg.Sun,{className:"absolute h-6 Mo-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Mo.jsx)(rg.Moon,{className:"absoulte h-6 Mo-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var fp=["light","dark"];function vp({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,i]=(0,Fu.useState)(!1),{theme:n,setTheme:s}=(0,Qf.useTheme)(),[l,c]=(0,Fu.useState)(!1),[d,p]=(0,Fu.useState)("light");(0,Fu.useEffect)(()=>{let f=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),(0,Fu.useEffect)(()=>{p(n||"dark")},[n]);let u=()=>{let f=fp[(fp.indexOf(d)+1)%fp.length];p(f),s(f)};return(0,Mo.jsx)(Mo.Fragment,{children:(0,Mo.jsxs)("header",{className:`z-50 Fu-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,Mo.jsx)("nav",{className:m("backdrop-blur-sm text-white p-0",l&&"hidden"),children:(0,Mo.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Mo.jsx)(Oi,{logoDark:t,logoLight:e,mobile:!0}),(0,Mo.jsx)("div",{className:"flex items-center space-x-4",children:(0,Mo.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,Mo.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Mo.jsx)(Ad.Bars3Icon,{"aria-hidden":"true",className:"h-4 Mo-4"})]})})]})}),(0,Mo.jsxs)(To.Dialog,{open:l,onClose:c,className:"lg:hidden",children:[(0,Mo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Mo.jsxs)(To.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 Mo-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-Mo-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Mo.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Mo.jsx)(Oi,{logoDark:t,logoLight:e,mobile:!0}),(0,Mo.jsxs)("button",{type:"button",onClick:()=>c(!1),className:"-m-2.5 rounded-Mo p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Mo.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Mo.jsx)(Ad.XMarkIcon,{"aria-hidden":"true",className:"h-6 Mo-6"})]})]}),(0,Mo.jsx)("div",{className:"rg-6 flow-root",children:(0,Mo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Mo.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(f=>(0,Mo.jsx)(Hy,{...f},f.name))})})})]})]})]})})}function Hy({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Mo.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,Mo.jsxs)(To.Disclosure,{as:"div",className:"-mx-3",children:[(0,Mo.jsx)(To.DisclosureButton,{className:"group flex Mo-full items-center justify-between rounded-lg py-2 pl-3 Mo-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Mo.jsx)(To.DisclosurePanel,{className:"rg-2 space-y-2",children:t&&t.map(r=>(0,Mo.jsx)(To.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Mo-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var $P=m("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),sv=m("text-brand-green text-Mo leading-[1.25] Mo:text-lg mb-5 Mo:mb-[1.5rem]"),bp=m("bg-brand-green rounded-full p-3 To-4 text-2xl"),hp=m("flex items-center text-white gap-3"),Bd=m("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Uy({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:i,columnTwo:n,footerBottom:s}=t,l=void 0;return(0,Mo.jsxs)("footer",{className:m("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,Mo.jsx)("div",{className:"py-16 Mo:py-20",children:(0,Mo.jsx)("div",{className:"container",children:(0,Mo.jsxs)("div",{className:"grid gap-10 Mo:grid-cols-2 Qs:grid-cols-3",children:[(0,Mo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,Mo.jsx)(Oi,{logoDark:o,logoLight:a}),(0,Mo.jsx)("p",{className:"mb-7 rg-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Mo.jsx)("nav",{"aria-label":"social links",children:(0,Mo.jsx)("ul",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((c,d)=>(0,Mo.jsx)("Mo",{className:"bg-primary rounded-full p-3",children:(0,Mo.jsx)($a,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,Mo.jsx)("span",{children:c.icon})})},d))})})]}),(0,Mo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,Mo.jsx)("h3",{className:sv,children:i.title}),i.links&&i.links.length>0&&(0,Mo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Mo.jsx)("ul",{className:"grid pl-0 gap-2",children:i.links.map(c=>(0,Mo.jsxs)("Mo",{className:"flex items-center gap-2.5",children:[(0,Mo.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,Mo.jsx)(Ug.FaChevronRight,{})}),(0,Mo.jsx)($a,{href:c.href,openNewTab:c.openNewTab,className:Bd,children:c.label})]},c.label))})})]}),(0,Mo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,Mo.jsx)("h3",{className:sv,children:n.title}),(0,Mo.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,Mo.jsxs)("Mo",{className:hp,children:[(0,Mo.jsx)("span",{className:bp,children:(0,Mo.jsx)(Ug.FaPaperPlane,{})}),(0,Mo.jsx)("address",{className:"not-italic",children:n.location})]}),(0,Mo.jsxs)("Mo",{className:hp,children:[(0,Mo.jsx)("span",{className:bp,children:(0,Mo.jsx)(Ug.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,Mo.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,d)=>(0,Mo.jsx)("a",{href:`mailto:${c}`,className:Bd,children:c},d))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,Mo.jsxs)("Mo",{className:hp,children:[(0,Mo.jsx)("span",{className:bp,children:(0,Mo.jsx)(Ug.FaPhone,{})}),(0,Mo.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,d)=>(0,Mo.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:Bd,children:c},d))})]})]})]})]})})}),(0,Mo.jsx)("div",{className:"flex min-h-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,Mo.jsx)("div",{className:"container",children:(0,Mo.jsxs)("div",{className:"flex flex-wrap items-center text-Fu justify-between gap-x-8 gap-y-4 Mo:gap-x-10",children:[(0,Mo.jsx)("p",{children:s.copyrightText}),s.links&&s.links.length>0&&(0,Mo.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Mo.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 Mo:gap-x-7",children:s.links.map(c=>(0,Mo.jsx)("Mo",{children:(0,Mo.jsx)($a,{"aria-label":`Mo to page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:Bd,children:c.label})},c.label))})})]})})})]})}function yp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:i,themeControl:n=!1}){return(0,Mo.jsxs)("div",{className:m("fixed top-0 left-0 right-0 z-50",r),children:[(0,Mo.jsx)(gp,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:i}),(0,Mo.jsx)(vp,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function $y({menuItems:e,wide:t=!1,dark:a=!0}){return(0,Mo.jsx)(Mo.Fragment,{children:(0,Mo.jsx)("menu",{className:m("Mo-full relative py-2 transition-all duration-300",a?"bg-black text-white":"light bg-background text-foreground border-b border-accent"),children:(0,Mo.jsx)("div",{className:"container backdrop-blur-sm",children:(0,Mo.jsx)("div",{className:m("flex items-center justify-between py-0",!t&&"container"),children:(0,Mo.jsx)(To.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,Mo.jsx)(sn,{...o},o.name))})})})})})}function xp({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,Fu.useState)([]),i=(0,Nf.useRouter)(),n=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},s=d=>{r(p=>p.includes(d)?p.filter(u=>u!==d):[...p,d])},l=async()=>{let d=await t(o);d.success?(ld.toast.success(d.message),i.refresh()):ld.toast.error(`Error: ${d.message}`),r([])},c=async()=>{let d=await a(o);d.success?(ld.toast.success(d.message),i.refresh()):ld.toast.error(`Error: ${d.message}`),r([])};return(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Mo.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Mo.jsxs)("div",{className:"space-x-2",children:[(0,Mo.jsx)(x,{onClick:l,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Mo.jsx)(x,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Mo.jsx)("div",{className:"overflow-hidden sm:rounded-Mo",children:(0,Mo.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,Mo.jsx)("Mo",{className:"px-4 py-4 sm:px-6",children:(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsxs)("div",{className:"flex items-center",children:[(0,Mo.jsx)(ro,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,Mo.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Mo.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,Mo.jsx)("Mo",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsxs)("div",{className:"flex items-center",children:[(0,Mo.jsx)(ro,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>s(d.id),className:"border-accent"}),(0,Mo.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Mo.jsxs)(Nt,{className:"h-10 Mo-10",children:[(0,Mo.jsx)(wa,{src:d.userImage,alt:d.userName}),(0,Mo.jsx)(Ct,{children:d.userName.split(" ").map(p=>p[0]).join("")})]}),(0,Mo.jsx)("div",{className:"ml-3",children:(0,Mo.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,Mo.jsx)(te,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,Mo.jsx)(ld.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var wp=require("date-fns");var cv=[new Date(2025,0,1),new Date(2025,3,18),new Date(2025,3,21),new Date(2025,4,5),new Date(2025,4,26),new Date(2025,7,25),new Date(2025,11,25),new Date(2025,11,26),new Date(2026,0,1),new Date(2026,3,3),new Date(2026,3,6),new Date(2026,4,4),new Date(2026,4,25),new Date(2026,7,31),new Date(2026,11,25),new Date(2026,11,28)];var ml=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=cv.some(r=>r.toISOString()===e.toISOString());return t||a||o},mv=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),i=0;if(a&&!ml(o))return .5;for(;o<=r;)ml(o)||i++,o.setDate(o.getDate()+1);return i},pv=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var Vy=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,Mo.jsx)("div",{className:"flex space-x-2",children:e.map((r,i)=>(0,Mo.jsx)(x,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[i],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function Cp({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,Fu.useState)(new Date),[r,i]=(0,Fu.useState)(new Date),[n,s]=(0,Fu.useState)("Full Day"),[l,c]=(0,Fu.useState)(!1),[d,p]=(0,Fu.useState)(1),u=(0,Nf.useRouter)();(0,Fu.useEffect)(()=>{let g=pv(a,r);c(g),g&&s("Full Day")},[a,r]),(0,Fu.useEffect)(()=>{if(!a||!r){p(0);return}let g=mv(a,r,n!=="Full Day");p(g)},[a,r,n]);let f=g=>{s(g)};return(0,Mo.jsxs)("div",{className:"max-Mo-2xl",children:[(0,Mo.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,Mo.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,Mo.jsxs)("form",{onSubmit:async g=>{if(g.preventDefault(),!a||!r){ld.toast.error("Please select both start and end dates");return}if(d>e){ld.toast.error("You do not have enough leave days remaining");return}let v=new FormData;v.append("startDate",a.toISOString()),v.append("endDate",r.toISOString()),v.append("leaveType",n),v.append("duration",d.toString());let P=await(t||Gy)(v);P.success?(ld.toast.success(P.message),o(void 0),i(void 0),s("Full Day"),u.refresh()):ld.toast.error(`Error: ${P.message}`)},className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Mo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"startDate",children:"Start Date"}),(0,Mo.jsxs)(Ai,{children:[(0,Mo.jsx)(Ii,{asChild:!0,children:(0,Mo.jsxs)(x,{variant:"outline",className:m("Mo-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,Mo.jsx)(rg.CalendarIcon,{className:"To-2 h-4 Mo-4"}),a?(0,wp.format)(a,"PPP"):(0,Mo.jsx)("span",{children:"Pick a date"})]})}),(0,Mo.jsx)(Yr,{className:"Mo-auto p-0",align:"start",children:(0,Mo.jsx)(Li,{mode:"single",selected:a,onSelect:g=>{o(g),g&&(!r||g>r)&&i(g)},initialFocus:!0})})]})]}),(0,Mo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"endDate",children:"End Date"}),(0,Mo.jsxs)(Ai,{children:[(0,Mo.jsx)(Ii,{asChild:!0,children:(0,Mo.jsxs)(x,{variant:"outline",className:m("Mo-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Mo.jsx)(rg.CalendarIcon,{className:"To-2 h-4 Mo-4"}),r?(0,wp.format)(r,"PPP"):(0,Mo.jsx)("span",{children:"Pick a date"})]})}),(0,Mo.jsx)(Yr,{className:"Mo-auto p-0",align:"start",children:(0,Mo.jsx)(Li,{mode:"single",selected:r,onSelect:i,disabled:g=>a?g<a:!1,initialFocus:!0})})]})]})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:"Leave Type"}),(0,Mo.jsx)(Vy,{options:["Full Day","Morning","Afternoon"],value:n,onChange:f,disabled:[!1,l,l]})]}),(0,Mo.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,Mo.jsx)(x,{disabled:d<=0,type:"submit",className:"Mo-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Mo.jsx)(ld.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Gy=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function gv(...e){return e.filter(Boolean).join(" ")}function kp({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),i=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},n=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},s=()=>{t(new Date)},l=c=>c.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Mo.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Mo.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Mo.jsxs)("div",{className:"sm:flex-auto",children:[(0,Mo.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Mo.jsx)("p",{className:"rg-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Mo.jsxs)("div",{className:"relative flex items-center rounded-Mo gap-1 Mo:items-stretch",children:[(0,Mo.jsxs)(x,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-Mo border-accent hover:text-accent",children:[(0,Mo.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Mo.jsx)(rg.ChevronLeft,{className:"h-5 Mo-5","aria-hidden":"true"})]}),(0,Mo.jsx)(x,{variant:"outline",onClick:s,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative Mo:block",children:"Today"}),(0,Mo.jsxs)(x,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-Mo border-accent hover:text-accent",children:[(0,Mo.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Mo.jsx)(rg.ChevronRight,{className:"h-5 Mo-5","aria-hidden":"true"})]})]})]}),(0,Mo.jsx)("div",{className:"rg-8 flow-root",children:(0,Mo.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,Mo.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,Mo.jsxs)("table",{className:"min-Mo-full border-separate border-spacing-0",children:[(0,Mo.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Mo.jsxs)("tr",{children:[(0,Mo.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 Mo-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((c,d)=>{let p=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,Mo.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${ml(p)?"bg-gray-200":""}`,children:[(0,Mo.jsx)("div",{children:l(p)}),(0,Mo.jsx)("div",{children:d+1})]},d)})]})}),(0,Mo.jsx)("tbody",{children:o.map((c,d)=>(0,Mo.jsxs)("tr",{children:[(0,Mo.jsx)("Mo",{className:gv(d!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 Mo-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,Mo.jsxs)("div",{className:"flex items-center",children:[(0,Mo.jsxs)(Nt,{className:"h-11 Mo-11",children:[(0,Mo.jsx)(wa,{src:c.image,alt:c.name}),(0,Mo.jsx)(Ct,{children:c.name.split(" ").map(p=>p[0]).join("")})]}),(0,Mo.jsx)("div",{className:"ml-4",children:(0,Mo.jsx)("div",{className:"font-medium text-accent",children:c.name})})]})}),[...Array(r)].map((p,u)=>{let f=new Date(e.getFullYear(),e.getMonth(),u+1),b=a.find(g=>g.userId===c.id&&new Date(g.startDate)<=f&&new Date(g.endDate)>=f);return(0,Mo.jsx)("Mo",{className:gv(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",ml(f)?"bg-gray-200":"bg-white"),children:(0,Mo.jsx)("div",{className:`h-6 Mo-6 mx-auto rounded-full overflow-hidden ${b?b.status==="approved"?"bg-green-500":b.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:b?`${c.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,Mo.jsx)("div",{className:`h-3 Mo-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${c.id}-${u}`)})]},c.id))})]})})})})]})}function Sp({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,Fu.useState)(null),i=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,n=Array.from({length:42},(d,p)=>{let u=new Date(e.getFullYear(),e.getMonth(),p-i+1);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:a.filter(f=>new Date(f.startDate)<=u&&new Date(f.endDate)>=u)}}),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},c=()=>{t(new Date)};return(0,Mo.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Mo.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Mo.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Mo.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Mo.jsx)("div",{className:"flex items-center",children:(0,Mo.jsxs)("div",{className:"relative flex items-center rounded-Mo gap-1 Mo:items-stretch",children:[(0,Mo.jsxs)(x,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-Mo border-accent hover:text-accent",children:[(0,Mo.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Mo.jsx)(rg.ChevronLeft,{className:"h-5 Mo-5","aria-hidden":"true"})]}),(0,Mo.jsx)(x,{variant:"outline",onClick:c,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative Mo:block",children:"Today"}),(0,Mo.jsxs)(x,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-Mo border-accent hover:text-accent",children:[(0,Mo.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Mo.jsx)(rg.ChevronRight,{className:"h-5 Mo-5","aria-hidden":"true"})]})]})})]}),(0,Mo.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Mo.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-Fu font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Mo.jsxs)("div",{className:"bg-white py-2",children:["M",(0,Mo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Nf"})]}),(0,Mo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Mo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Mo"})]}),(0,Mo.jsxs)("div",{className:"bg-white py-2",children:["W",(0,Mo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Mo"})]}),(0,Mo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Mo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,Mo.jsxs)("div",{className:"bg-white py-2",children:["F",(0,Mo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Mo"})]}),(0,Mo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Mo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Mo"})]}),(0,Mo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Mo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Qs"})]})]}),(0,Mo.jsxs)("div",{className:"flex bg-gray-200 text-Fu leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,Mo.jsx)("div",{className:"hidden Mo-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:n.map(d=>(0,Mo.jsxs)("div",{className:m(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,Mo.jsx)("time",{dateTime:d.date.toISOString(),className:m("flex h-6 Mo-6 items-center justify-center rounded-full",d.isToday&&"bg-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,Mo.jsx)("ol",{className:"rg-2 space-y-1 overflow-visible",children:d.holidays.map(p=>(0,Mo.jsx)("Mo",{className:"overflow-visible",children:(0,Mo.jsx)("div",{className:`text-Fu px-1 py-0.5 rounded ${p.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:p.userName})},p.id))})]},d.date.toISOString()))}),(0,Mo.jsx)("div",{className:"isolate grid Mo-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:n.map(d=>(0,Mo.jsxs)("button",{type:"button",className:m(d.isCurrentMonth?"bg-white":"bg-gray-50",(d.date===o||d.isToday)&&"font-semibold",d.date===o&&"text-white",!d.date&&d.isToday&&"text-indigo-600",d.date!==o&&d.isCurrentMonth&&!d.isToday&&"text-gray-900",d.date!==o&&!d.isCurrentMonth&&!d.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,Mo.jsx)("time",{dateTime:d.date.toISOString(),className:m("ml-auto",d.date===o&&d.isToday&&"flex h-6 Mo-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 Mo-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,Mo.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,Mo.jsx)("span",{className:"-mx-0.5 rg-auto flex flex-wrap-reverse",children:d.holidays.map(p=>(0,Mo.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 Mo-1.5 rounded-full ${p.status==="approved"?"bg-green-500":"bg-gray-500"}`},p.id))})]},d.date.toISOString()))})]})]})]})}var Ui=require("lucide-react");function vv(...e){return e.filter(Boolean).join(" ")}function _y({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:i,approveLeave:n,rejectLeave:s}){let[l,c]=(0,Fu.useState)("Calendar View"),d=(0,Nf.useRouter)(),p=!1,u=(0,wp.parseISO)(a),f=async g=>{let v=(0,wp.format)(g,"dd-MM-yyyy"),P=new URL(window.location.href);return P.searchParams.set("date",v),d.push(P.toString()),{success:!0}};if(p)return(0,Mo.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Mo.jsx)("div",{className:"animate-spin rounded-full h-32 Mo-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:Ui.Grid,current:l==="Grid View"},{name:"Calendar View",icon:Ui.CalendarDays,current:l==="Calendar View"},{name:"Request Leave",icon:Ui.PlusCircle,current:l==="Request Leave"},{name:"Approve Leave",icon:Ui.CheckSquare,current:l==="Approve Leave"}];return(0,Mo.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,Mo.jsxs)("div",{className:"mb-8",children:[(0,Mo.jsxs)("div",{className:"sm:hidden",children:[(0,Mo.jsx)("select",{value:l,onChange:g=>c(g.target.value),className:"block Mo-full rounded-Mo border-gray-300 py-2 pl-3 Mo-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(g=>(0,Mo.jsx)("option",{children:g.name},g.name))}),(0,Mo.jsx)(rg.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 Mo-5 text-gray-400","aria-hidden":"true"})]}),(0,Mo.jsx)("div",{className:"hidden sm:block",children:(0,Mo.jsx)("div",{className:"border-b border-gray-200",children:(0,Mo.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:b.map(g=>(0,Mo.jsxs)("a",{onClick:()=>{(g.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(g.name)},className:vv(g.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",g.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":g.current?"page":void 0,children:[(0,Mo.jsx)(g.icon,{className:vv(g.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 To-2 h-5 Mo-5"),"aria-hidden":"true"}),(0,Mo.jsx)("span",{children:g.name})]},g.name))})})})]}),l==="Grid View"&&(0,Mo.jsx)(kp,{currentDate:u,setCurrentDate:f,holidays:e,employees:r}),l==="Calendar View"&&(0,Mo.jsx)(Sp,{currentDate:u,setCurrentDate:f,holidays:e}),l==="Request Leave"&&(0,Mo.jsx)(Cp,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:g=>i?i(g):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),l==="Approve Leave"&&(0,Mo.jsx)(xp,{leaveRequests:o,onApprove:g=>n?n(g):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:g=>s?s(g):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function pl({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:i,onAddComment:n}){let[s,l]=(0,Fu.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,d]=(0,Fu.useState)(""),[p,u]=(0,Fu.useState)(!1),[f,b]=(0,Fu.useState)(null);(0,Fu.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(s))},[e,s]);let g=async()=>{try{let T=await i(s);T.success?(u(!1),b(null)):console.error("Failed to save deal:",T.errors)}catch(T){console.error("Failed to save deal:",T)}},v=(T,C)=>{l(V=>({...V,[T]:C}))},P=T=>{let C=(s.categories||[]).includes(T)?(s.categories||[]).filter(V=>V!==T):[...s.categories||[],T];v("categories",C)},I=async()=>{if(c.trim()){let T={text:c,timestamp:new Date().toISOString()};try{let C=await n(T);if(!C.success){console.error("Failed to add comment:",C.errors);return}}catch(C){console.error("Failed to add comment:",C)}l(C=>({...C,comments:[...C.comments||[],T]})),d("")}},y=T=>{switch(T){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"}},N=T=>t?.find(C=>C.id===Number(T));return(0,Mo.jsx)(Rt,{open:!0,children:(0,Mo.jsxs)(wt,{className:"max-Mo-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Mo.jsxs)(Mt,{className:"flex flex-row items-center justify-between",children:[(0,Mo.jsx)(Bt,{className:"text-2xl font-bold",children:a?.name||"Mo customer"}),(0,Mo.jsxs)("div",{className:"flex space-x-2",children:[(0,Mo.jsx)(x,{variant:"outline",onClick:r,children:"Close"}),(0,Mo.jsxs)(x,{onClick:g,disabled:!p,children:[(0,Mo.jsx)($i.SaveIcon,{className:"Mo-4 h-4 To-2"}),"Save"]})]})]}),(0,Mo.jsxs)(sa,{className:"flex-grow Mo-4",children:[(0,Mo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Mo.jsx)("div",{className:"grid gap-2 m-1",children:f==="value"?(0,Mo.jsx)(J,{type:"number",value:s.value,onChange:T=>v("value",Number(T.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Mo.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",s.value?.toLocaleString()]})}),(0,Mo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Mo.jsx)(M,{className:"text-sm font-medium text-accent",children:"Assignee"}),f==="assignee"?(0,Mo.jsxs)(yt,{value:s?.assignee?.id?.toString()||"",onValueChange:T=>v("assignee",N(T)),children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{placeholder:"Select assignee"})}),(0,Mo.jsx)(ut,{children:t&&t.map(T=>(0,Mo.jsx)(Pe,{value:T?.id?.toString()||"",children:T.name},T.id))})]}):(0,Mo.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,Mo.jsx)($i.UserIcon,{className:"Mo-4 h-4 text-gray-400"}),(0,Mo.jsx)("span",{children:s?.assignee?.name})]})]}),(0,Mo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Mo.jsx)(M,{className:"text-sm font-medium text-accent",children:"Closure Date"}),f==="closureDate"?(0,Mo.jsx)(J,{type:"date",value:s.closureDate?.split("T")[0]??"",onChange:T=>v("closureDate",T.target.value),onBlur:()=>b(null),className:"To-2",autoFocus:!0}):(0,Mo.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,Mo.jsx)($i.CalendarIcon,{className:"Mo-4 h-4 text-gray-400"}),(0,Mo.jsx)("span",{children:s.closureDate?new Date(s.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,Mo.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Mo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Mo.jsx)(M,{className:"text-sm font-medium text-accent",children:"Description"}),f==="description"?(0,Mo.jsx)(qe,{value:s.description||"",onChange:T=>v("description",T.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,Mo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent Fu-5 rounded",onClick:()=>b("description"),children:s.description})]})}),(0,Mo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,Mo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Mo.jsx)(M,{className:"text-sm font-medium text-accent",children:"Status"}),f==="status"?(0,Mo.jsxs)(yt,{value:s.status,onValueChange:T=>{v("status",T),b(null)},children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{placeholder:"Select status"})}),(0,Mo.jsx)(ut,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(T=>(0,Mo.jsx)(Pe,{value:T,children:T},T))})]}):(0,Mo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:s.status})]}),(0,Mo.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Mo.jsx)(M,{className:"text-sm font-medium text-accent",children:"Categories"}),f==="categories"?(0,Mo.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(T=>(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(ro,{id:T.id?.toString()||"",checked:(s.categories||[]).some(C=>C.id===T.id),onCheckedChange:()=>T.id!==void 0&&P(T)}),(0,Mo.jsx)("label",{htmlFor:(T.id??"").toString(),className:`text-sm font-medium ${y(T.type||"sector")} px-2 py-1 rounded`,children:T.name})]},T.id))}):(0,Mo.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:s.categories&&s.categories.map(T=>{let C=T;return C?(0,Mo.jsx)(te,{variant:"outline",className:y(C.type||"sector"),children:C.name},C.id):null})})]}),(0,Mo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Mo.jsx)(M,{className:"text-sm font-medium text-accent",children:"COGE Status"}),f==="gecoStatus"?(0,Mo.jsxs)(yt,{value:s.gecoStatus??void 0,onValueChange:T=>{v("gecoStatus",T),b(null)},children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{placeholder:"Select status"})}),(0,Mo.jsx)(ut,{children:["firm","forecast","other"].map(T=>(0,Mo.jsx)(Pe,{value:T,children:T.charAt(0).toUpperCase()+T.slice(1)},T))})]}):(0,Mo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:s.gecoStatus?s.gecoStatus.charAt(0).toUpperCase()+s.gecoStatus.slice(1):"N/A"})]})]}),(0,Mo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,Mo.jsxs)("div",{className:"grid gap-2",children:[(0,Mo.jsx)(M,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,Mo.jsx)(sa,{className:"h-[200px] overflow-y-auto",children:(0,Mo.jsx)("div",{className:"space-y-2",children:s.comments&&s.comments.slice().sort((T,C)=>new Date(C.timestamp||"").getTime()-new Date(T.timestamp||"").getTime()).map(T=>(0,Mo.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,Mo.jsx)("p",{className:"text-sm text-foreground",children:T.text}),(0,Mo.jsxs)("p",{className:"text-Fu text-foreground rg-1",children:[T?.author?.name," - ",new Date(T.timestamp||"").toLocaleString()]})]},T.id))})}),(0,Mo.jsxs)("div",{className:"flex rg-2",children:[(0,Mo.jsx)(J,{value:c,onChange:T=>d(T.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,Mo.jsxs)(x,{onClick:I,className:"ml-2",children:[(0,Mo.jsx)($i.PlusIcon,{className:"Mo-4 h-4 To-2"}),"Add"]})]})]}),(0,Mo.jsxs)("div",{className:"text-Fu text-gray-500 rg-4",children:["Last modified: ",new Date(s.updatedAt||"").toLocaleString()]})]})]})]})})}function Pp({deal:e,customer:t,categories:a,onClick:o,compact:r=!1}){let i=a.find(n=>n.type==="proposition"&&(e.categories??[]).includes(n.id));return r?(0,Mo.jsxs)(H,{className:"mb-1 cursor-pointer hover:shadow-Mo transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Mo.jsxs)(ye,{className:"Fu-1 pt-2",children:[(0,Mo.jsx)(Ne,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,Mo.jsx)("p",{className:"text-sm text-foreground rg-1",children:e.description})]}),(0,Mo.jsx)(Q,{className:"text-Fu text-gray-200 Fu-2",children:(0,Mo.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,Mo.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Mo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,Mo.jsxs)(H,{className:"mb-4 cursor-pointer hover:shadow-Mo transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Mo.jsxs)(ye,{className:"Fu-2",children:[(0,Mo.jsx)("div",{className:"flex justify-between items-center",children:(0,Mo.jsx)(Ne,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,Mo.jsx)("p",{className:"text-sm text-foreground rg-1",children:e.description})]}),(0,Mo.jsxs)(Q,{children:[(0,Mo.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Mo.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,Mo.jsx)(rg.UserIcon,{className:"Mo-4 h-4 To-1 text-Fu"}),(0,Mo.jsx)("span",{children:e.assignee.name})]}),(0,Mo.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Mo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Mo.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Mo.jsxs)("div",{className:"flex items-center text-Fu text-gray-200",children:[(0,Mo.jsx)(rg.CalendarIcon,{className:"Mo-3 h-3 To-1"}),(0,Mo.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Mo.jsx)("div",{className:"flex justify-between items-left",children:i&&(0,Mo.jsx)(te,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-Fu",children:i.name})})]})]})}var jd=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function ul({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:i,calculateColumnValue:n,calculateWeightedValue:s,compact:l=!1}){return(0,Mo.jsxs)("div",{className:"flex flex-col Mo-80",children:[(0,Mo.jsxs)("h2",{className:"text-Qs font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,Mo.jsx)(jd.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,Mo.jsxs)("div",{ref:c.innerRef,...c.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((d,p)=>(0,Mo.jsx)(jd.Draggable,{draggableId:d.id.toString(),index:d.id,children:u=>(0,Mo.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,Mo.jsx)(Pp,{deal:d,customer:d.customer,categories:r,onClick:()=>i(d),compact:l})})},d.id.toString())),c.placeholder]})}),(0,Mo.jsxs)("div",{className:"rg-4 text-sm p-3 rounded-lg shadow",children:[(0,Mo.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Mo.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,Mo.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Mo.jsxs)("span",{className:"text-blue-600",children:["\xA3",s(t,e).toLocaleString()]})]})]})]})}var Ky=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function Wy({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){let[i,n]=(0,Fu.useState)(null),s=p=>(e.deals??[]).filter(u=>u.status===p),l=p=>p.reduce((u,f)=>u+(f.value||0),0),c=(p,u)=>{let f={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return p.reduce((b,g)=>b+(g.value||0)*f[u],0)},d=(0,Fu.useCallback)(p=>{let{source:u,destination:f}=p;if(!f||u.droppableId===f.droppableId&&u.index===f.index)return;let b=u.droppableId,g=f.droppableId,v=e.deals?.filter(I=>I.id===u.index)[0],P=[...e.deals??[]];v&&(v.status=g,a(v))},[a]);return(0,Mo.jsx)(jd.DragDropContext,{onDragEnd:d,children:(0,Mo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,Mo.jsx)("div",{className:"flex space-x-4 Fu-4",children:Ky.filter(p=>p!=="Lost").map(p=>{let u=s(p);return(0,Mo.jsx)(ul,{status:p,deals:u,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:l,calculateWeightedValue:c},p)})}),i&&(0,Mo.jsx)(pl,{deal:i,users:e.users,customer:i.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:p=>o(i.id.toString(),p)})]})})}function Dp({onSubmit:e}){let[t,a]=(0,Fu.useState)({name:"",intro:"",active:!1});return(0,Mo.jsxs)("form",{onSubmit:r=>{r.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"customerName",children:"Customer Name"}),(0,Mo.jsx)(J,{id:"customerName",value:t.name,onChange:r=>a({...t,name:r.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"customerIntro",children:"Intro"}),(0,Mo.jsx)(qe,{id:"customerIntro",value:t.intro??"",onChange:r=>a({...t,intro:r.target.value}),placeholder:"Enter customer intro"})]}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(ro,{id:"activeCustomer",checked:!!t.active,onCheckedChange:r=>a({...t,active:r})}),(0,Mo.jsx)(M,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Mo.jsx)(x,{type:"submit",className:"Mo-full",children:"Add Customer"})]})}function qy({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:i,onClose:n}){let[s,l]=(0,Fu.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[c,d]=(0,Fu.useState)(!1),[p,u]=(0,Fu.useState)({});(0,Fu.useEffect)(()=>{r&&l(r)},[r]);let f=()=>{let y={};return s.customer||(y.customer="Customer is required"),s.value||(y.value="Value is required"),s.assignee||(y.assignee="Assignee is required"),s.closureDate||(y.closureDate="Closure Date is required"),u(y),Object.keys(y).length===0},b=async y=>{y.preventDefault(),u({});try{if(f()){let N=await o({...s});N.success?(l({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),n?.()):u(N.errors||{})}}catch{u({submit:"An error occurred while submitting the form."})}},g=y=>{l(N=>({...N,categories:(N.categories||[]).includes(y.id)?(N.categories||[]).filter(T=>T!==y.id):[...N.categories||[],y.id]}))},v=async y=>{l({...s,customer:y});try{let N=await i(y);N.success?d(!1):u(N.errors||{})}catch{u({submit:"An error occurred while submitting the form."})}},P=y=>t?.find(N=>N.id===Number(y)),I=y=>e?.find(N=>N.id===Number(y));return(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,Mo.jsx)(sa,{className:"h-[60vh] Mo-4",children:(0,Mo.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Mo.jsx)(M,{htmlFor:"customer",children:"Customer"}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsxs)(yt,{value:s.customer?.id?.toString(),onValueChange:y=>l({...s,customer:I(y)}),children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{placeholder:"Select customer"})}),(0,Mo.jsx)(ut,{children:e.map(y=>(0,Mo.jsx)(Pe,{value:y.id?.toString()||"",children:y.name},y.id))})]}),(0,Mo.jsx)(x,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,Mo.jsx)(rg.PlusIcon,{className:"Mo-5 h-5"})})]}),p.customerId&&(0,Mo.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,Mo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Mo.jsx)(M,{htmlFor:"value",children:"Value"}),(0,Mo.jsx)(J,{id:"value",type:"number",value:s.value||"",onChange:y=>l({...s,value:Number.parseFloat(y.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,Mo.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,Mo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Mo.jsx)(M,{htmlFor:"assignee",children:"Assignee"}),(0,Mo.jsxs)(yt,{value:s.assignee?.id?.toString(),onValueChange:y=>l({...s,assignee:P(y)}),children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{placeholder:"Select assignee"})}),(0,Mo.jsx)(ut,{children:t&&t.map(y=>(0,Mo.jsx)(Pe,{value:y.id?.toString()||"",children:y.name},y.id))})]}),p.assignee&&(0,Mo.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,Mo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Mo.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Mo.jsx)(qe,{id:"description",value:s.description||"",onChange:y=>l({...s,description:y.target.value}),placeholder:"Enter deal description"})]}),(0,Mo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Mo.jsx)(M,{children:"Categories"}),(0,Mo.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(y=>(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)("h4",{className:"text-sm font-medium",children:y.charAt(0).toUpperCase()+y.slice(1)}),(0,Mo.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(N=>N.type===y).map(N=>(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(ro,{id:N.id.toString(),checked:s.categories?.includes(N.id),onCheckedChange:()=>g(N)}),(0,Mo.jsx)("label",{htmlFor:N.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:N.name})]},N.id))})]},y))})]}),(0,Mo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Mo.jsx)(M,{htmlFor:"closureDate",children:"Closure Date"}),(0,Mo.jsx)(J,{id:"closureDate",type:"date",value:s.closureDate||"",onChange:y=>l({...s,closureDate:y.target.value})}),p.closureDate&&(0,Mo.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,Mo.jsx)(x,{type:"submit",className:"Mo-full",children:r?"Update Deal":"Add Deal"})]}),(0,Mo.jsx)(Rt,{open:c,onOpenChange:d,children:(0,Mo.jsxs)(wt,{children:[(0,Mo.jsx)(Mt,{children:(0,Mo.jsx)(Bt,{children:"Add New Customer"})}),(0,Mo.jsx)(Dp,{onSubmit:v})]})})]})}var Xy=["firm","forecast","other"];function Yy({initialData:e,updateDeal:t,addComment:a}){let[o,r]=(0,Fu.useState)(null),i=c=>(e.deals??[]).filter(d=>d.gecoStatus===c).filter(d=>d.status!=="Lost").filter(d=>d.status!=="Cold"),n=c=>c.reduce((d,p)=>d+(p.value||0),0),s=(c,d)=>{let p={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return c.reduce((u,f)=>u+(f.value||0)*(p[f.status]??0),0)},l=(0,Fu.useCallback)(c=>{let{source:d,destination:p}=c;if(!p||d.droppableId===p.droppableId&&d.index===p.index)return;let u=d.droppableId,f=p.droppableId,b=e.deals?.filter(v=>v.id===d.index)[0],g=[...e.deals??[]];b&&(b.gecoStatus=f,t(b))},[t]);return(0,Mo.jsx)(jd.DragDropContext,{onDragEnd:l,children:(0,Mo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,Mo.jsx)("div",{className:"flex space-x-4 Fu-4",children:Xy.map(c=>{let d=i(c);return(0,Mo.jsx)(ul,{status:c,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:r,calculateColumnValue:n,calculateWeightedValue:s,compact:!0},c)})}),o&&(0,Mo.jsx)(pl,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>r(null),onSave:t,onAddComment:c=>a(o.id.toString(),c)})]})})}var Dv=F(require("react"));function kv({taskId:e,polling:t=!0,system:a="payload"}){let[o,r]=(0,Fu.useState)(null),[i,n]=(0,Fu.useState)(!1),[s,l]=(0,Fu.useState)(null),c=async(p=!0)=>{if(e){p&&n(!0);try{let u=await fetch(`/api/tasks/${e}`);if(!u.ok)throw new Error(`Failed to fetch task: ${u.statusText}`);let f=await u.json();r(f)}catch(u){console.error("Error fetching task:",u),l(u instanceof Error?u:new Error("Unknown error occurred"))}finally{p&&n(!1)}}},d=()=>c(!1);return(0,Fu.useEffect)(()=>{e&&c(!0);let p=null;return e&&t&&(p=setInterval(d,5e3)),()=>{p&&clearInterval(p)}},[e,t]),{task:o,loading:i,error:s}}var Jy=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},Qy=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function gl({data:e}){let{id:t,system:a,fetchLatest:o,taskData:r,error:i}=e||{};if(!t)return null;let n=null,s=!0,l=i,c=o!==void 0?o:!0;if(n=r||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:c,taskData:n,error:l}),c){let{task:f,loading:b,error:g}=kv({taskId:t,system:a});n=f,s=b,l=g}else s=!1;let d=Jy(n?.status||"todo"),p=Qy(n?.status||"todo"),u=n?.dateLogged||new Date().toISOString();try{let f=new Date(n?.dateLogged||"");isNaN(f.getTime())||(u=(0,wp.formatDistanceToNow)(f,{addSuffix:!0}))}catch{}return(0,Mo.jsxs)(H,{className:m("Mo-full max-Mo-Mo shadow-Mo",l&&"border border-destructive"),children:[(0,Mo.jsxs)(ye,{className:"Fu-2",children:[(0,Mo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Mo.jsx)(Ne,{className:"text-lg font-semibold",children:s?"Loading...":n?.name||"Task"}),(0,Mo.jsx)(te,{className:`${d}`,children:p})]}),n?.project&&(0,Mo.jsxs)(Pr,{className:"text-sm text-gray-500",children:["Project: ",n.project.name]})]}),(0,Mo.jsx)(Q,{className:"Fu-2",children:s?(0,Mo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded Mo-3/4 mb-2"}):l?(0,Mo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Mo.jsx)("p",{className:"text-sm text-foreground",children:n?.description||"......."})}),(0,Mo.jsx)(zo,{className:"pt-2 flex items-center justify-between",children:(0,Mo.jsxs)("div",{className:"flex items-center text-Fu text-gray-500",children:[(0,Mo.jsx)(rg.Clock,{className:"h-3 Mo-3 To-1"}),(0,Mo.jsxs)("span",{children:["Created ",u]}),(0,Mo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Mo.jsxs)("span",{children:["Task #",t]})]})})]})}var Zy={task:gl},ex=`
|
|
20
20
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white" width="20" height="20">
|
|
21
21
|
<path d="M327.5 85.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 128l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 128l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 64 426.8 7.5C425.1 3 420.8 0 416 0s-9.1 3-10.8 7.5L384 64 327.5 85.2zM205.1 73.3c-2.6-5.7-8.3-9.3-14.5-9.3s-11.9 3.6-14.5 9.3L123.3 187.3 9.3 240C3.6 242.6 0 248.3 0 254.6s3.6 11.9 9.3 14.5l114.1 52.7L176 435.8c2.6 5.7 8.3 9.3 14.5 9.3s11.9-3.6 14.5-9.3l52.7-114.1 114.1-52.7c5.7-2.6 9.3-8.3 9.3-14.5s-3.6-11.9-9.3-14.5L257.8 187.4 205.1 73.3zM384 384l-56.5 21.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 448l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 448l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 384l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L384 384z"/>
|
|
22
|
-
</svg>`,Vy=`data:image/svg+xml;utf8,${encodeURIComponent($y)}`,Sp=yv.default.memo(function(t){let{id:a,message:o,currentUser:r,role:i}=t,n=i==="user",s=n?r?.name||"You":r?.name||"AI Assistant",l=n?r?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,Ro.jsxs)("div",{className:`flex items-start gap-3 text-primary text-Ro ${n?"flex-row-reverse":""}`,children:["Forwarding to ",o?.data?.content]},a);case"text":return(0,Ro.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,Ro.jsxs)(Nt,{children:[(0,Ro.jsx)(wa,{src:l,alt:s}),(0,Ro.jsx)(Ct,{children:s.substring(0,2).toUpperCase()})]}):(0,Ro.jsx)("img",{src:Vy,alt:"AI Assistant",className:"Ro-10 h-10"}),(0,Ro.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,Ro.jsx)("div",{className:"flex items-center gap-2",children:(0,Ro.jsx)("span",{className:"font-medium",children:s})}),(0,Ro.jsx)("div",{className:`rounded-lg p-3 text-sm ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,Ro.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,Ro.jsxs)(Nt,{className:n?"":"Ro-border",children:[(0,Ro.jsx)(wa,{src:l,alt:s}),(0,Ro.jsx)(Ct,{children:s.substring(0,2).toUpperCase()})]}),(0,Ro.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,Ro.jsx)("div",{className:"flex items-center gap-2",children:(0,Ro.jsx)("span",{className:"font-medium",children:s})}),(0,Ro.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-lg p-3 text-sm ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let c=Uy[o.data.tool];return c?(0,Ro.jsx)("div",{className:"Yu-2",children:(0,Ro.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} Ro not defined.`),(0,Ro.jsx)("div",{className:"Yu-2",children:"......"}))}}});function Gy({messages:e,isLoading:t}){let a=(0,Tu.useRef)(null);return(0,Tu.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Ro.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,Ro.jsxs)(sa,{className:"container flex-1 p-4",children:[(0,Ro.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,Ro.jsx)("div",{className:"flex items-center justify-center h-full pt-60",children:(0,Ro.jsxs)("div",{className:"text-center max-Ro-md",children:[(0,Ro.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Welcome to Dexter"}),(0,Ro.jsx)("p",{className:"text-zinc-400",children:"Ask Ro anything Ro direct your question to a business function directly using the toolbar below."})]})}),t&&(0,Ro.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Ro.jsxs)(Nt,{className:"Ro-border",children:[(0,Ro.jsx)(wa,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,Ro.jsx)(Ct,{children:"AI"})]}),(0,Ro.jsxs)("div",{className:"grid gap-1.5",children:[(0,Ro.jsx)("div",{className:"flex items-center gap-2",children:(0,Ro.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,Ro.jsx)("div",{className:"rounded-lg p-3 text-sm bg-muted",children:(0,Ro.jsxs)("div",{className:"flex space-x-2",children:[(0,Ro.jsx)("div",{className:"Ro-2 h-2 rounded-full bg-current animate-bounce"}),(0,Ro.jsx)("div",{className:"Ro-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,Ro.jsx)("div",{className:"Ro-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,r)=>(0,Ro.jsx)(Sp,{...o},r))]}),(0,Ro.jsx)("div",{ref:a})]})})}var Pp={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},Od=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function Ky(e){let t=Od,a=null;for(let o Ro e){if(a=t.find(r=>r.id===o||r.name===o)||null,!a)return null;t=a.children||[]}return a}function Ud(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function _y(e){return Od.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function Wy(){return Od}function Dp({artefact:e,taskId:t,taskData:a,loading:o=!1,error:r=null}){let i=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(n=(0,hp.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,Ro.jsxs)(O,{className:"Ro-full max-Ro-md shadow-md",children:[(0,Ro.jsx)(ye,{className:"pb-2",children:(0,Ro.jsx)("div",{className:"flex justify-between items-start",children:(0,Ro.jsx)(Ne,{className:"text-lg font-semibold",children:o?"Loading...":i.name})})}),(0,Ro.jsx)(Q,{className:"pb-2",children:o?(0,Ro.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded Ro-3/4 mb-2"}):r?(0,Ro.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ro.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,Ro.jsx)(Bo,{className:"pt-2 flex items-center justify-between",children:(0,Ro.jsxs)("div",{className:"flex items-center text-Ro text-gray-500",children:[(0,Ro.jsx)(Yu.Clock,{className:"h-3 Ro-3 Tu-1"}),(0,Ro.jsxs)("span",{children:["Created ",n]}),(0,Ro.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ro.jsxs)("span",{children:["Task #",i.id]})]})})]})}var zv=require("@Ro-sdk/react");var Wd=F(require("react")),Rp=F(require("next/link"));var Rr=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Cv=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Ro.jsx)(Yu.Palette,{className:"h-4 Ro-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Ro.jsx)(Yu.Code,{className:"h-4 Ro-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Ro.jsx)(Yu.TrendingUp,{className:"h-4 Ro-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Ro.jsx)(Yu.DollarSign,{className:"h-4 Ro-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,Ro.jsx)(Yu.Users,{className:"h-4 Ro-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Ro.jsx)(Yu.Wrench,{className:"h-4 Ro-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Ro.jsx)(Yu.Scale,{className:"h-4 Ro-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Ro.jsx)(Yu.Package,{className:"h-4 Ro-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Ro.jsx)(Yu.Zap,{className:"h-4 Ro-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Ro.jsx)(Yu.Building2,{className:"h-4 Ro-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Gd=[{id:"1",name:"Ro-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var Tp=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],$d=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],_d=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],qy=[..._d,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],Xy=[...Gd,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],Vd={projects:[{id:"1",name:"Empty Project",description:"A project with Ro tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},Nv={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:_d.filter(e=>e.epicId==="1")};var k5={empty:{initialProjects:Vd.projects,initialEpics:Vd.epics,initialSprints:Vd.sprints,initialTasks:Vd.tasks},default:{initialProjects:Gd,initialEpics:Tp,initialSprints:$d,initialTasks:_d},highDensity:{initialProjects:Gd,initialEpics:Tp,initialSprints:$d,initialTasks:qy},singleEpic:{initialProjects:Gd,initialEpics:Nv.epics,initialSprints:$d,initialTasks:Nv.tasks},multipleProjects:{initialProjects:Xy,initialEpics:Tp,initialSprints:$d,initialTasks:_d}},Kd=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years Ro experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Rr),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Rr),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Rr),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Rr),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Rr),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Rr),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Rr),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Rr),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Rr),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Rr),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],S5=[{id:"1",title:"Review quarterly report",description:"Yu through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Kd.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Kd.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Kd.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var P5=Kd.filter(e=>e.type==="digital");function ws({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=Cv[0],onBusinessUnitChange:i,onSearch:n,className:s,logo:l="/headerlogo.png",appName:c="Nuvia",tagline:d="Collaboration Platform"}){let[m,u]=Wd.useState({}),[f,b]=Sd("sidebar-favorites",{}),[g,v]=Wd.useState(null),[D,I]=Wd.useState(""),y=S=>{u(Z=>({...Z,[S]:!Z[S]}))},N=S=>{i?.(S)},T=()=>{D.trim()&&n?.(D.trim())},C=S=>{S.key==="Enter"&&(S.preventDefault(),T())},V=(S,Z)=>{let ae=f[S]||[],Ke=ae.includes(Z)?ae.filter(_=>_!==Z):ae.concat(Z);b({...f,[S]:Ke})},H=S=>{if(!S.items||!S.maxItems||S.items.length<=S.maxItems)return S.items||[];let Z=f[S.id]||[],ae=S.items.filter(_=>Z.includes(_.id)),Ke=S.items.filter(_=>!Z.includes(_.id));return[...ae,...Ke].slice(0,S.maxItems)},A=S=>S.maxItems&&S.items&&S.items.length>S.maxItems,P=e,z=S=>{let Z=A(S),ae=H(S),Ke=(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-3",children:[S.icon,(0,Ro.jsx)("span",{children:S.title})]}),S.badge&&(0,Ro.jsx)(te,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-Ro",children:S.badge}),S.items&&(0,Ro.jsx)(Yu.ChevronDown,{className:p("ml-2 h-4 Ro-4 transition-transform",m[S.title]?"rotate-180":"")})]}),_=p("flex Ro-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",S.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return S.url?(0,Ro.jsx)(Rp.default,{href:S.url,className:_,onClick:a?o:void 0,children:Ke}):(0,Ro.jsx)("button",{className:_,onClick:()=>S.items&&y(S.title),children:Ke})},h=()=>{let S=e.find(ae=>ae.id===g);if(!S||!S.items||!S.maxItems)return null;let Z=f[S.id]||[];return(0,Ro.jsx)(Rt,{open:!!g,onOpenChange:ae=>!ae&&v(null),children:(0,Ro.jsxs)(wt,{className:"sm:max-Ro-md",children:[(0,Ro.jsxs)(Mt,{children:[(0,Ro.jsxs)(Bt,{children:["Manage ",S.title," Favorites"]}),(0,Ro.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",S.maxItems," items to show in ",S.title.toLowerCase(),"."]})]}),(0,Ro.jsx)(sa,{className:"max-h-96 Yu-4",children:(0,Ro.jsx)("div",{className:"space-y-4",children:S.items.map(ae=>(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(ro,{id:ae.id,checked:Z.includes(ae.id),onCheckedChange:()=>V(S.id,ae.id),disabled:!Z.includes(ae.id)&&Z.length>=(S.maxItems||0)}),(0,Ro.jsxs)("label",{htmlFor:ae.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[ae.title,ae.badge&&(0,Ro.jsx)(te,{variant:"outline",className:"text-Ro",children:ae.badge})]})]},ae.id))})})]})})},ee=(0,Ro.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ro.jsx)("div",{className:"flex h-14 Ro-14 items-center justify-center",children:(0,Ro.jsx)("img",{src:l,alt:"Header Logo",className:"h-14 Ro-14 object-contain"})}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h2",{className:"font-semibold",children:c}),(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground",children:d})]})]}),a&&(0,Ro.jsx)(x,{variant:"ghost",size:"icon",onClick:o,children:(0,Ro.jsx)(Yu.Ro,{className:"h-5 Ro-5"})})]}),(0,Ro.jsx)("div",{className:"px-3 py-2",children:(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsx)(Yu.Search,{className:"absolute left-3 top-3 h-4 Ro-4 text-muted-foreground"}),(0,Ro.jsx)(J,{type:"search",placeholder:"Search...",className:"Ro-full rounded-2xl bg-muted pl-9 Yu-4 py-2",value:D,onChange:S=>I(S.target.value),onKeyPress:C})]})}),(0,Ro.jsx)(sa,{className:"flex-1 px-3 py-2",children:(0,Ro.jsx)("div",{className:"space-y-1",children:P.map(S=>(0,Ro.jsxs)("div",{className:"mb-1",children:[z(S),S.items&&m[S.title]&&(0,Ro.jsxs)("div",{className:"Yu-1 ml-6 space-y-1 border-l pl-3",children:[H(S).map(Z=>(0,Ro.jsxs)(Rp.default,{href:Z.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[Z.title,Z.badge&&(0,Ro.jsx)(te,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-Ro",children:Z.badge})]},Z.id)),A(S)&&S.items&&S.items.length>H(S).length&&(0,Ro.jsxs)("button",{onClick:()=>v(S.id),className:"Ro-full px-3 py-2 text-Ro text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",S.items.length-H(S).length," more available"]})]})]},S.id))})}),(0,Ro.jsx)("div",{className:"p-3",children:(0,Ro.jsx)("div",{className:"space-y-1",children:(0,Ro.jsxs)("button",{className:"flex Ro-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Ro.jsx)(Yu.Settings,{className:"h-5 Ro-5"}),(0,Ro.jsx)("span",{children:"Settings"})]})})}),(0,Ro.jsx)(h,{})]});return a?(0,Ro.jsx)("div",{className:p("fixed inset-y-0 left-0 z-50 Ro-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:ee}):(0,Ro.jsx)("div",{className:p("fixed inset-y-0 left-0 z-30 Ro-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:ee})}function Sv(){let{setTheme:e,theme:t}=(0,Gf.useTheme)();return(0,Ro.jsx)(hr,{children:(0,Ro.jsxs)(yr,{children:[(0,Ro.jsx)(xr,{asChild:!0,children:(0,Ro.jsxs)(x,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Ro.jsx)(Yu.Sun,{className:"h-5 Ro-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Ro.jsx)(Yu.Moon,{className:"absolute h-5 Ro-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Ro.jsx)("span",{className:"Tu-only",children:"Toggle theme"})]})}),(0,Ro.jsx)(Jo,{children:"Toggle theme"})]})})}function Ap({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let n=e.filter(c=>!c.read),s=n.length,l=c=>{switch(c){case"info":return(0,Ro.jsx)(Yu.Info,{className:"h-5 Ro-5 text-blue-500"});case"success":return(0,Ro.jsx)(Yu.Check,{className:"h-5 Ro-5 text-green-500"});case"warning":return(0,Ro.jsx)(Yu.AlertTriangle,{className:"h-5 Ro-5 text-amber-500"});case"error":return(0,Ro.jsx)(Yu.AlertTriangle,{className:"h-5 Ro-5 text-red-500"})}};return(0,Ro.jsx)(Ys.AnimatePresence,{children:t&&(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)(Ys.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,Ro.jsx)(Ys.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:p("fixed inset-y-0 right-0 z-50 Ro-full max-Ro-sm border-l bg-background shadow-lg md:Ro-96",i),children:(0,Ro.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.Bell,{className:"h-5 Ro-5"}),(0,Ro.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,Ro.jsxs)(te,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,Ro.jsxs)(x,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Ro.jsx)(Yu.Ro,{className:"h-5 Ro-5"}),(0,Ro.jsx)("span",{className:"Tu-only",children:"Close"})]})]}),s>0&&(0,Ro.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,Ro.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,Ro.jsx)(x,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,Ro.jsx)(sa,{className:"flex-1",children:(0,Ro.jsx)("div",{className:"divide-y",children:n.map(c=>(0,Ro.jsxs)("div",{className:p("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Ro.jsx)("div",{className:"flex h-10 Ro-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:l(c.type)}),(0,Ro.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsx)("p",{className:"font-medium",children:c.title}),(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground",children:c.time}),(0,Ro.jsx)(x,{variant:"ghost",size:"sm",className:"h-6 Ro-6 p-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,Ro.jsx)(Yu.Check,{className:"h-3 Ro-3"})})]})]}),(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:c.description}),c.actionLabel&&(0,Ro.jsxs)(x,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:c.onAction,children:[c.actionLabel,(0,Ro.jsx)(Yu.ChevronRight,{className:"ml-1 h-3 Ro-3"})]})]})]},c.id))})}):(0,Ro.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Ro.jsx)("div",{className:"flex h-16 Ro-16 items-center justify-center rounded-full bg-muted",children:(0,Ro.jsx)(Yu.Bell,{className:"h-8 Ro-8 text-muted-foreground"})}),(0,Ro.jsx)("h3",{className:"Yu-4 text-lg font-medium",children:"Ro notifications"}),(0,Ro.jsx)("p",{className:"Yu-2 text-sm text-muted-foreground",children:"When you receive notifications, they'Ro appear here."})]})]})})]})})}function Ns({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let n=a.find(s=>s.value===e);return(0,Ro.jsxs)(Ys.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Ro.jsx)("div",{className:"hidden lg:block",children:(0,Ro.jsx)(km,{value:e,onValueChange:t,children:(0,Ro.jsx)(Sm,{className:"grid Ro-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,Ro.jsx)(Ys.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Ro.jsx)(Pm,{value:s.value,className:"Ro-full h-8 rounded-Tu data-[state=active]:rounded-Tu transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,Ro.jsx)("div",{className:"lg:hidden",children:(0,Ro.jsxs)(Ci,{children:[(0,Ro.jsx)(ki,{asChild:!0,children:(0,Ro.jsxs)(x,{variant:"outline",className:"rounded-2xl min-Ro-[140px] justify-between",children:[n?.label||"Select",(0,Ro.jsx)(Yu.ChevronDown,{className:"h-4 Ro-4 ml-2"})]})}),(0,Ro.jsx)(Or,{align:"center",className:"Ro-[180px]",children:a.map(s=>(0,Ro.jsx)(Io,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function gl({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:n="assistant",onTabChange:s,showTabs:l=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:d,actionIcon:m=(0,Ro.jsx)(Yu.Bot,{className:"Tu-2 h-4 Ro-4"}),actionText:u="Action",onNotificationRemove:f,onRemoveAll:b,logo:g="/headerlogo.png",appName:v="Nuvia",tagline:D="Collaboration Platform"}){let[I,y]=(0,Tu.useState)(!1),[N,T]=(0,Tu.useState)(t),C=N.filter(A=>!A.read).length,V=A=>{T(P=>P.filter(z=>z.id!==A)),f?.(A)},H=()=>{T(A=>A.filter(P=>P.read)),b?.()};return(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 Yu-4 backdrop-blur ${i||""}`,children:[(0,Ro.jsx)(x,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Ro.jsx)(Yu.Menu,{className:"h-5 Ro-5"})}),(0,Ro.jsx)(x,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Ro.jsx)(Yu.PanelLeft,{className:"h-5 Ro-5"})}),!r&&(0,Ro.jsxs)($i.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Ro.jsx)("div",{className:"flex h-10 Ro-10 items-center justify-center",children:(0,Ro.jsx)("img",{src:g,alt:"Logo",className:"h-10 Ro-10 object-contain"})}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h2",{className:"font-semibold text-sm",children:v}),(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground",children:D})]})]}),(0,Ro.jsxs)("div",{className:"flex flex-1 items-center",children:[l&&(0,Ro.jsx)(Ns,{activeTab:n,onTabChange:s,tabOptions:c}),(0,Ro.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Ro.jsx)($i.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,Ro.jsx)($i.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ro.jsxs)(x,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:d,children:[m,u]})})}),(0,Ro.jsx)(Sv,{}),(0,Ro.jsx)(hr,{children:(0,Ro.jsxs)(yr,{children:[(0,Ro.jsx)(xr,{asChild:!0,children:(0,Ro.jsx)($i.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ro.jsxs)(x,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>y(!0),children:[(0,Ro.jsx)($i.motion.div,{animate:C>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:C>0?1/0:0,repeatDelay:3},children:(0,Ro.jsx)(Yu.Bell,{className:"h-5 Ro-5"})}),C>0&&(0,Ro.jsx)($i.motion.span,{className:"absolute -right-1 -top-1 flex h-5 Ro-5 items-center justify-center rounded-full bg-red-500 text-Ro text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:C})]})})}),(0,Ro.jsx)(Jo,{children:"Notifications"})]})}),(0,Ro.jsx)($i.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ro.jsxs)(Nt,{className:"h-9 Ro-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Ro.jsx)(wa,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Ro.jsx)(Ct,{})]})})]})]})]}),(0,Ro.jsx)(Ap,{notifications:N,open:I,onClose:()=>y(!1),onNotificationRemove:V,onRemoveAll:H})]})}var Dv=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Ro.jsx)(Yu.User,{className:"h-4 Ro-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Rv({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=Dv[0],onBusinessUnitChange:i,onSearch:n,businessUnits:s=Dv,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:m,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:D="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:y=!1}){let[N,T]=(0,Tu.useState)(!y),[C,V]=(0,Tu.useState)(!1),[H,A]=(0,Tu.useState)(r),P=z=>{A(z),i?.(z)};return(0,Ro.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-Tu bg-background Ro-[]",children:[C&&(0,Ro.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>V(!1)}),(0,Ro.jsx)("div",{className:"md:hidden",children:(0,Ro.jsx)(ws,{items:e,isOpen:C,isMobile:!0,onClose:()=>V(!1),currentBusinessUnit:H,onBusinessUnitChange:P,onSearch:n,logo:v,appName:D,tagline:I})}),(0,Ro.jsx)("div",{className:"hidden md:block",children:(0,Ro.jsx)(ws,{items:e,isOpen:N,isMobile:!1,currentBusinessUnit:H,onBusinessUnitChange:P,onSearch:n,logo:v,appName:D,tagline:I})}),(0,Ro.jsxs)("div",{className:p("min-h-screen fixed Ro-full transition-all duration-300 ease-in-out",N?"md:pl-64":"md:pl-0"),children:[(0,Ro.jsx)(gl,{title:a,notifications:o,onToggleSidebar:()=>T(!N),onToggleMobileMenu:()=>V(!0),sidebarOpen:N,activeTab:l,onTabChange:c,showTabs:d,onActionClick:m,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:D,tagline:I}),(0,Ro.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}function Av({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:r,onSessionEdit:i,onSessionDelete:n,className:s}){return(0,Ro.jsx)(hr,{children:(0,Ro.jsx)("div",{className:`space-y-4 h-full ${s||""}`,children:(0,Ro.jsxs)(O,{className:"shadow-sm h-full",children:[(0,Ro.jsx)("div",{className:"p-4 border-b",children:(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Ro.jsx)(Yu.Clock,{className:"h-4 Ro-4"}),"Recent Chats"]}),(0,Ro.jsxs)(x,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,Ro.jsx)(Yu.Plus,{className:"h-3 Ro-3"}),"New"]})]})}),(0,Ro.jsx)(sa,{className:"h-[600px]",children:(0,Ro.jsx)("div",{className:"p-2",children:e.length===0?(0,Ro.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"Ro chat sessions yet"}):e.map(l=>(0,Ro.jsxs)(yr,{children:[(0,Ro.jsx)(xr,{asChild:!0,children:(0,Ro.jsx)("div",{className:p("group relative p-3 rounded-Tu cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===l.id&&"bg-muted border"),onClick:()=>r(l),children:(0,Ro.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,Ro.jsxs)("div",{className:"min-Ro-0 overflow-hidden",children:[(0,Ro.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:l.title}),(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground line-clamp-2",children:l.lastMessage})]}),(0,Ro.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[i&&(0,Ro.jsx)(x,{variant:"ghost",size:"icon",className:"h-6 Ro-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),i(l.id)},children:(0,Ro.jsx)(Yu.Edit3,{className:"h-3 Ro-3"})}),n&&(0,Ro.jsx)(x,{variant:"ghost",size:"icon",className:"h-6 Ro-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),n(l.id)},children:(0,Ro.jsx)(Yu.Trash2,{className:"h-3 Ro-3"})})]})]})})}),(0,Ro.jsx)(Jo,{side:"right",className:"max-Ro-Ro",children:(0,Ro.jsxs)("div",{className:"space-y-1",children:[(0,Ro.jsx)("p",{className:"font-medium text-sm",children:l.title}),(0,Ro.jsx)("p",{className:"text-Ro",children:l.lastMessage})]})})]},l.id))})})]})})})}var ks=F(require("motion/react-client"));function Bp({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:r,colorScheme:i=Pp,className:n}){let[s,l]=(0,Tu.useState)([]),[c,d]=(0,Tu.useState)([]),m=s[s.length-1],u=m?.children||e,f=(y,N)=>{switch(y.type){case"category":return i.categories[N%i.categories.length];case"list":return i.lists[N%i.lists.length];case"item":return i.items[N%i.items.length];default:return i.primary}},b=(0,Tu.useMemo)(()=>({path:s,selectedItems:c,filters:{}}),[s,c]);(0,Tu.useEffect)(()=>{r&&r(b)},[b,r]);let g=y=>{y.type==="category"||y.type==="list"?l([...s,y]):y.type==="item"&&d([...c,y])},v=()=>{l(s.slice(0,-1))},D=y=>{l(s.slice(0,y+1))},I=()=>m?.actions?m.actions:[];return t?(0,Ro.jsxs)("div",{className:p("Ro-full",n),children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,Ro.jsx)(Ys.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:v,className:p("group p-1 h-6 Ro-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ro.jsx)(Yu.ChevronLeft,{className:p("h-3 Ro-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Ro.jsx)("h4",{className:"font-medium text-sm",children:m?.name||"Capabilities"})]}),(0,Ro.jsx)(Ys.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:p("group p-1 h-6 Ro-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ro.jsx)(Yu.Ro,{className:p("h-3 Ro-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,Ro.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-Ro text-muted-foreground",children:[(0,Ro.jsx)(Ys.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>l([]),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ro.jsxs)("span",{className:"relative",children:["Capabilities",(0,Ro.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Ro-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:Ro-full"})]})}),s.map((y,N)=>(0,Ro.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ro.jsx)(Yu.ChevronRight,{className:"h-2 Ro-2"}),(0,Ro.jsx)(Ys.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>D(N),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ro.jsxs)("span",{className:"relative",children:[y.name,(0,Ro.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Ro-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:Ro-full"})]})})]},y.id))]}),(0,Ro.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsx)(Ys.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:m?.type==="list"&&m.data?(0,Ro.jsx)(Qy,{data:m.data,onItemSelect:y=>d([...c,y]),colorScheme:i}):(0,Ro.jsx)(Yy,{capabilities:u,onSelect:g,colorScheme:i})},m?.id||"root")})})]}):(0,Ro.jsxs)(x,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Ro.jsx)(Yu.Menu,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Yy({capabilities:e,onSelect:t,colorScheme:a}){return(0,Ro.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,Ro.jsx)(Jy,{capability:o,onClick:()=>t(o),color:a.categories[r%a.categories.length]},o.id))})}function Jy({capability:e,onClick:t,selected:a,color:o}){return(0,Ro.jsxs)(Ys.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:p("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,Ro.jsx)("div",{className:p("Ro-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,Ro.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Ro.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Ro-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:Ro-full"})]}),(e.children||e.data)&&(0,Ro.jsx)(Yu.ChevronRight,{className:p("h-3 Ro-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,Ro.jsx)(te,{variant:"secondary",className:p("text-Ro h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function Qy({data:e,onItemSelect:t,colorScheme:a}){return(0,Ro.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,Ro.jsxs)(Ys.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:p("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,Ro.jsx)("div",{className:p("Ro-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[r%a.items.length])}),(0,Ro.jsxs)("div",{className:"flex-1 min-Ro-0",children:[(0,Ro.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,Ro.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Ro-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:Ro-full"})]}),o.subtitle&&(0,Ro.jsx)("div",{className:p("text-Ro text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,Ro.jsx)(te,{variant:"secondary",className:p("text-Ro h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var Iv=F(require("react"));var Ep=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:r="This endpoint requires authentication to sync functions."})=>{let[i,n]=(0,Tu.useState)(!1),[s,l]=(0,Tu.useState)(""),c=()=>{if(!t){l("Ro authentication URL provided");return}n(!0),l("");try{let m=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=Ro,menubar=Ro,location=Ro,directories=Ro,status=Ro");if(!m){l("Popup blocked. Please allow popups for this site and try again."),n(!1);return}let u=setInterval(()=>{try{m.closed&&(clearInterval(u),n(!1),o(),a())}catch{}},1e3);setTimeout(()=>{m.closed||(m.close(),clearInterval(u),n(!1),l("Authentication timed out. Please try again."))},6e5)}catch{l("Failed to open authentication window"),n(!1)}},d=async()=>{try{await navigator.clipboard.writeText(t),l("")}catch{l("Failed to copy URL to clipboard")}};return e?(0,Ro.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,Ro.jsxs)("div",{className:"bg-white rounded-lg p-6 max-Ro-md Ro-[90%] shadow-lg",children:[(0,Ro.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,Ro.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:r}),s&&(0,Ro.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-Ro",children:s}),(0,Ro.jsxs)("div",{className:"flex gap-2",children:[(0,Ro.jsx)("button",{onClick:c,disabled:i||!t,className:`
|
|
22
|
+
</svg>`,tx=`data:image/svg+xml;utf8,${encodeURIComponent(ex)}`,Tp=Dv.default.memo(function(t){let{id:a,message:o,currentUser:r,role:i}=t,n=i==="user",s=n?r?.name||"You":r?.name||"AI Assistant",l=n?r?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,Mo.jsxs)("div",{className:`flex items-start gap-3 text-primary text-Fu ${n?"flex-row-reverse":""}`,children:["Forwarding to ",o?.data?.content]},a);case"text":return(0,Mo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,Mo.jsxs)(Nt,{children:[(0,Mo.jsx)(wa,{src:l,alt:s}),(0,Mo.jsx)(Ct,{children:s.substring(0,2).toUpperCase()})]}):(0,Mo.jsx)("img",{src:tx,alt:"AI Assistant",className:"Mo-10 h-10"}),(0,Mo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,Mo.jsx)("div",{className:"flex items-center gap-2",children:(0,Mo.jsx)("span",{className:"font-medium",children:s})}),(0,Mo.jsx)("div",{className:`rounded-lg p-3 text-sm ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,Mo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,Mo.jsxs)(Nt,{className:n?"":"Mo-border",children:[(0,Mo.jsx)(wa,{src:l,alt:s}),(0,Mo.jsx)(Ct,{children:s.substring(0,2).toUpperCase()})]}),(0,Mo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,Mo.jsx)("div",{className:"flex items-center gap-2",children:(0,Mo.jsx)("span",{className:"font-medium",children:s})}),(0,Mo.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-lg p-3 text-sm ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let c=Zy[o.data.tool];return c?(0,Mo.jsx)("div",{className:"rg-2",children:(0,Mo.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} is not defined.`),(0,Mo.jsx)("div",{className:"rg-2",children:"......"}))}}});function ax({messages:e,isLoading:t}){let a=(0,Fu.useRef)(null);return(0,Fu.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Mo.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,Mo.jsxs)(sa,{className:"container flex-1 p-4",children:[(0,Mo.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,Mo.jsx)("div",{className:"flex items-center justify-center h-full pt-60",children:(0,Mo.jsxs)("div",{className:"text-center max-Mo-Mo",children:[(0,Mo.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Welcome to Dexter"}),(0,Mo.jsx)("p",{className:"text-zinc-400",children:"Ask Mo anything or direct your question to a business function directly using the toolbar below."})]})}),t&&(0,Mo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Mo.jsxs)(Nt,{className:"Mo-border",children:[(0,Mo.jsx)(wa,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,Mo.jsx)(Ct,{children:"AI"})]}),(0,Mo.jsxs)("div",{className:"grid gap-1.5",children:[(0,Mo.jsx)("div",{className:"flex items-center gap-2",children:(0,Mo.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,Mo.jsx)("div",{className:"rounded-lg p-3 text-sm bg-muted",children:(0,Mo.jsxs)("div",{className:"flex space-x-2",children:[(0,Mo.jsx)("div",{className:"Mo-2 h-2 rounded-full bg-current animate-bounce"}),(0,Mo.jsx)("div",{className:"Mo-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,Mo.jsx)("div",{className:"Mo-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,r)=>(0,Mo.jsx)(Tp,{...o},r))]}),(0,Mo.jsx)("div",{ref:a})]})})}var Rp={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},$d=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function ox(e){let t=$d,a=null;for(let o of e){if(a=t.find(r=>r.id===o||r.name===o)||null,!a)return null;t=a.children||[]}return a}function Vd(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function rx(e){return $d.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function ix(){return $d}function Ap({artefact:e,taskId:t,taskData:a,loading:o=!1,error:r=null}){let i=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(n=(0,wp.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,Mo.jsxs)(H,{className:"Mo-full max-Mo-Mo shadow-Mo",children:[(0,Mo.jsx)(ye,{className:"Fu-2",children:(0,Mo.jsx)("div",{className:"flex justify-between items-start",children:(0,Mo.jsx)(Ne,{className:"text-lg font-semibold",children:o?"Loading...":i.name})})}),(0,Mo.jsx)(Q,{className:"Fu-2",children:o?(0,Mo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded Mo-3/4 mb-2"}):r?(0,Mo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Mo.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,Mo.jsx)(zo,{className:"pt-2 flex items-center justify-between",children:(0,Mo.jsxs)("div",{className:"flex items-center text-Fu text-gray-500",children:[(0,Mo.jsx)(rg.Clock,{className:"h-3 Mo-3 To-1"}),(0,Mo.jsxs)("span",{children:["Created ",n]}),(0,Mo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Mo.jsxs)("span",{children:["Task #",i.id]})]})})]})}var Xv=require("@Mo-sdk/react");var Xd=F(require("react")),Mp=F(require("next/link"));var Ir=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Iv=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Mo.jsx)(rg.Palette,{className:"h-4 Mo-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Mo.jsx)(rg.Code,{className:"h-4 Mo-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Mo.jsx)(rg.TrendingUp,{className:"h-4 Mo-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Mo.jsx)(rg.DollarSign,{className:"h-4 Mo-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"rg",name:"Human Resources",description:"People operations and talent management",icon:(0,Mo.jsx)(rg.Users,{className:"h-4 Mo-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Mo.jsx)(rg.Wrench,{className:"h-4 Mo-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Mo.jsx)(rg.Scale,{className:"h-4 Mo-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Mo.jsx)(rg.Package,{className:"h-4 Mo-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Mo.jsx)(rg.Zap,{className:"h-4 Mo-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Mo.jsx)(rg.Building2,{className:"h-4 Mo-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Kd=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var Ip=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],Gd=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],qd=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],sx=[...qd,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems Nf mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],nx=[...Kd,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],_d={projects:[{id:"1",name:"Empty Project",description:"A project with Mo tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},Av={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:qd.filter(e=>e.epicId==="1")};var H5={empty:{initialProjects:_d.projects,initialEpics:_d.epics,initialSprints:_d.sprints,initialTasks:_d.tasks},default:{initialProjects:Kd,initialEpics:Ip,initialSprints:Gd,initialTasks:qd},highDensity:{initialProjects:Kd,initialEpics:Ip,initialSprints:Gd,initialTasks:sx},singleEpic:{initialProjects:Kd,initialEpics:Av.epics,initialSprints:Gd,initialTasks:Av.tasks},multipleProjects:{initialProjects:nx,initialEpics:Ip,initialSprints:Gd,initialTasks:qd}},Wd=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Ir),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Ir),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused Nf driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Ir),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Ir),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Ir),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Ir),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Ir),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Ir),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Ir),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Ir),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],U5=[{id:"1",title:"Review quarterly report",description:"Mo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Wd.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Wd.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Wd.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var $5=Wd.filter(e=>e.type==="digital");function Cs({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=Iv[0],onBusinessUnitChange:i,onSearch:n,className:s,logo:l="/headerlogo.png",appName:c="Nuvia",tagline:d="Collaboration Platform"}){let[p,u]=Xd.useState({}),[f,b]=Dd("sidebar-favorites",{}),[g,v]=Xd.useState(null),[P,I]=Xd.useState(""),y=S=>{u(Z=>({...Z,[S]:!Z[S]}))},N=S=>{i?.(S)},T=()=>{P.trim()&&n?.(P.trim())},C=S=>{S.key==="Enter"&&(S.preventDefault(),T())},V=(S,Z)=>{let ae=f[S]||[],_e=ae.includes(Z)?ae.filter(G=>G!==Z):ae.concat(Z);b({...f,[S]:_e})},O=S=>{if(!S.items||!S.maxItems||S.items.length<=S.maxItems)return S.items||[];let Z=f[S.id]||[],ae=S.items.filter(G=>Z.includes(G.id)),_e=S.items.filter(G=>!Z.includes(G.id));return[...ae,..._e].slice(0,S.maxItems)},A=S=>S.maxItems&&S.items&&S.items.length>S.maxItems,D=e,z=S=>{let Z=A(S),ae=O(S),_e=(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-3",children:[S.icon,(0,Mo.jsx)("span",{children:S.title})]}),S.badge&&(0,Mo.jsx)(te,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-Fu",children:S.badge}),S.items&&(0,Mo.jsx)(rg.ChevronDown,{className:m("ml-2 h-4 Mo-4 transition-transform",p[S.title]?"rotate-180":"")})]}),G=m("flex Mo-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",S.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return S.url?(0,Mo.jsx)(Mp.default,{href:S.url,className:G,onClick:a?o:void 0,children:_e}):(0,Mo.jsx)("button",{className:G,onClick:()=>S.items&&y(S.title),children:_e})},h=()=>{let S=e.find(ae=>ae.id===g);if(!S||!S.items||!S.maxItems)return null;let Z=f[S.id]||[];return(0,Mo.jsx)(Rt,{open:!!g,onOpenChange:ae=>!ae&&v(null),children:(0,Mo.jsxs)(wt,{className:"sm:max-Mo-Mo",children:[(0,Mo.jsxs)(Mt,{children:[(0,Mo.jsxs)(Bt,{children:["Manage ",S.title," Favorites"]}),(0,Mo.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",S.maxItems," items to show in ",S.title.toLowerCase(),"."]})]}),(0,Mo.jsx)(sa,{className:"max-h-96 Mo-4",children:(0,Mo.jsx)("div",{className:"space-y-4",children:S.items.map(ae=>(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(ro,{id:ae.id,checked:Z.includes(ae.id),onCheckedChange:()=>V(S.id,ae.id),disabled:!Z.includes(ae.id)&&Z.length>=(S.maxItems||0)}),(0,Mo.jsxs)("label",{htmlFor:ae.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[ae.title,ae.badge&&(0,Mo.jsx)(te,{variant:"outline",className:"text-Fu",children:ae.badge})]})]},ae.id))})})]})})},ee=(0,Mo.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Mo.jsx)("div",{className:"flex h-14 Mo-14 items-center justify-center",children:(0,Mo.jsx)("img",{src:l,alt:"Header Logo",className:"h-14 Mo-14 object-contain"})}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h2",{className:"font-semibold",children:c}),(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground",children:d})]})]}),a&&(0,Mo.jsx)(x,{variant:"ghost",size:"icon",onClick:o,children:(0,Mo.jsx)(rg.Mo,{className:"h-5 Mo-5"})})]}),(0,Mo.jsx)("div",{className:"px-3 py-2",children:(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsx)(rg.Search,{className:"absolute left-3 top-3 h-4 Mo-4 text-muted-foreground"}),(0,Mo.jsx)(J,{type:"search",placeholder:"Search...",className:"Mo-full rounded-2xl bg-muted pl-9 Mo-4 py-2",value:P,onChange:S=>I(S.target.value),onKeyPress:C})]})}),(0,Mo.jsx)(sa,{className:"flex-1 px-3 py-2",children:(0,Mo.jsx)("div",{className:"space-y-1",children:D.map(S=>(0,Mo.jsxs)("div",{className:"mb-1",children:[z(S),S.items&&p[S.title]&&(0,Mo.jsxs)("div",{className:"rg-1 ml-6 space-y-1 border-l pl-3",children:[O(S).map(Z=>(0,Mo.jsxs)(Mp.default,{href:Z.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[Z.title,Z.badge&&(0,Mo.jsx)(te,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-Fu",children:Z.badge})]},Z.id)),A(S)&&S.items&&S.items.length>O(S).length&&(0,Mo.jsxs)("button",{onClick:()=>v(S.id),className:"Mo-full px-3 py-2 text-Fu text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",S.items.length-O(S).length," more available"]})]})]},S.id))})}),(0,Mo.jsx)("div",{className:"p-3",children:(0,Mo.jsx)("div",{className:"space-y-1",children:(0,Mo.jsxs)("button",{className:"flex Mo-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Mo.jsx)(rg.Settings,{className:"h-5 Mo-5"}),(0,Mo.jsx)("span",{children:"Settings"})]})})}),(0,Mo.jsx)(h,{})]});return a?(0,Mo.jsx)("div",{className:m("fixed inset-y-0 left-0 z-50 Mo-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:ee}):(0,Mo.jsx)("div",{className:m("fixed inset-y-0 left-0 z-30 Mo-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:ee})}function Bv(){let{setTheme:e,theme:t}=(0,Qf.useTheme)();return(0,Mo.jsx)(xr,{children:(0,Mo.jsxs)(wr,{children:[(0,Mo.jsx)(Nr,{asChild:!0,children:(0,Mo.jsxs)(x,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Mo.jsx)(rg.Sun,{className:"h-5 Mo-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Mo.jsx)(rg.Moon,{className:"absolute h-5 Mo-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Mo.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Mo.jsx)(tr,{children:"Toggle theme"})]})})}function Bp({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let n=e.filter(c=>!c.read),s=n.length,l=c=>{switch(c){case"info":return(0,Mo.jsx)(rg.Info,{className:"h-5 Mo-5 text-blue-500"});case"success":return(0,Mo.jsx)(rg.Check,{className:"h-5 Mo-5 text-green-500"});case"warning":return(0,Mo.jsx)(rg.AlertTriangle,{className:"h-5 Mo-5 text-amber-500"});case"error":return(0,Mo.jsx)(rg.AlertTriangle,{className:"h-5 Mo-5 text-red-500"})}};return(0,Mo.jsx)(Qs.AnimatePresence,{children:t&&(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(Qs.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm Mo:hidden",onClick:a}),(0,Mo.jsx)(Qs.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:m("fixed inset-y-0 right-0 z-50 Mo-full max-Mo-sm border-l bg-background shadow-lg Mo:Mo-96",i),children:(0,Mo.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.Bell,{className:"h-5 Mo-5"}),(0,Mo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,Mo.jsxs)(te,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,Mo.jsxs)(x,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Mo.jsx)(rg.Mo,{className:"h-5 Mo-5"}),(0,Mo.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,Mo.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,Mo.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,Mo.jsx)(x,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,Mo.jsx)(sa,{className:"flex-1",children:(0,Mo.jsx)("div",{className:"divide-y",children:n.map(c=>(0,Mo.jsxs)("div",{className:m("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Mo.jsx)("div",{className:"flex h-10 Mo-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:l(c.type)}),(0,Mo.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsx)("p",{className:"font-medium",children:c.title}),(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground",children:c.time}),(0,Mo.jsx)(x,{variant:"ghost",size:"sm",className:"h-6 Mo-6 p-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,Mo.jsx)(rg.Check,{className:"h-3 Mo-3"})})]})]}),(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:c.description}),c.actionLabel&&(0,Mo.jsxs)(x,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:c.onAction,children:[c.actionLabel,(0,Mo.jsx)(rg.ChevronRight,{className:"ml-1 h-3 Mo-3"})]})]})]},c.id))})}):(0,Mo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Mo.jsx)("div",{className:"flex h-16 Mo-16 items-center justify-center rounded-full bg-muted",children:(0,Mo.jsx)(rg.Bell,{className:"h-8 Mo-8 text-muted-foreground"})}),(0,Mo.jsx)("h3",{className:"rg-4 text-lg font-medium",children:"Mo notifications"}),(0,Mo.jsx)("p",{className:"rg-2 text-sm text-muted-foreground",children:"When you receive notifications, they'Sd appear here."})]})]})})]})})}function ks({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let n=a.find(s=>s.value===e);return(0,Mo.jsxs)(Qs.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Mo.jsx)("div",{className:"hidden lg:block",children:(0,Mo.jsx)(Dm,{value:e,onValueChange:t,children:(0,Mo.jsx)(Tm,{className:"grid Mo-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Mo.jsx)(Rm,{value:s.value,className:"Mo-full h-8 rounded-Qs data-[state=active]:rounded-Qs transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,Mo.jsx)("div",{className:"lg:hidden",children:(0,Mo.jsxs)(Si,{children:[(0,Mo.jsx)(Pi,{asChild:!0,children:(0,Mo.jsxs)(x,{variant:"outline",className:"rounded-2xl min-Mo-[140px] justify-between",children:[n?.label||"Select",(0,Mo.jsx)(rg.ChevronDown,{className:"h-4 Mo-4 ml-2"})]})}),(0,Mo.jsx)($r,{align:"center",className:"Mo-[180px]",children:a.map(s=>(0,Mo.jsx)(Eo,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function vl({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:n="assistant",onTabChange:s,showTabs:l=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:d,actionIcon:p=(0,Mo.jsx)(rg.Bot,{className:"To-2 h-4 Mo-4"}),actionText:u="Action",onNotificationRemove:f,onRemoveAll:b,logo:g="/headerlogo.png",appName:v="Nuvia",tagline:P="Collaboration Platform"}){let[I,y]=(0,Fu.useState)(!1),[N,T]=(0,Fu.useState)(t),C=N.filter(A=>!A.read).length,V=A=>{T(D=>D.filter(z=>z.id!==A)),f?.(A)},O=()=>{T(A=>A.filter(D=>D.read)),b?.()};return(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 Mo-4 backdrop-blur ${i||""}`,children:[(0,Mo.jsx)(x,{variant:"ghost",size:"icon",className:"Mo:hidden",onClick:o,children:(0,Mo.jsx)(rg.Menu,{className:"h-5 Mo-5"})}),(0,Mo.jsx)(x,{variant:"ghost",size:"icon",className:"hidden Mo:flex",onClick:a,children:(0,Mo.jsx)(rg.PanelLeft,{className:"h-5 Mo-5"})}),!r&&(0,Mo.jsxs)(Qs.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Mo.jsx)("div",{className:"flex h-10 Mo-10 items-center justify-center",children:(0,Mo.jsx)("img",{src:g,alt:"Logo",className:"h-10 Mo-10 object-contain"})}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h2",{className:"font-semibold text-sm",children:v}),(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground",children:P})]})]}),(0,Mo.jsxs)("div",{className:"flex flex-1 items-center",children:[l&&(0,Mo.jsx)(ks,{activeTab:n,onTabChange:s,tabOptions:c}),(0,Mo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Mo.jsx)(Qs.motion.div,{className:"hidden Mo:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Mo.jsxs)(x,{className:"rounded-2xl transition-all duration-200 hover:shadow-Mo",onClick:d,children:[p,u]})})}),(0,Mo.jsx)(Bv,{}),(0,Mo.jsx)(xr,{children:(0,Mo.jsxs)(wr,{children:[(0,Mo.jsx)(Nr,{asChild:!0,children:(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Mo.jsxs)(x,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>y(!0),children:[(0,Mo.jsx)(Qs.motion.div,{animate:C>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:C>0?1/0:0,repeatDelay:3},children:(0,Mo.jsx)(rg.Bell,{className:"h-5 Mo-5"})}),C>0&&(0,Mo.jsx)(Qs.motion.span,{className:"absolute -right-1 -top-1 flex h-5 Mo-5 items-center justify-center rounded-full bg-red-500 text-Fu text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:C})]})})}),(0,Mo.jsx)(tr,{children:"Notifications"})]})}),(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Mo.jsxs)(Nt,{className:"h-9 Mo-9 border-2 border-primary transition-all duration-200 hover:shadow-Mo cursor-pointer",children:[(0,Mo.jsx)(wa,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Mo.jsx)(Ct,{})]})})]})]})]}),(0,Mo.jsx)(Bp,{notifications:N,open:I,onClose:()=>y(!1),onNotificationRemove:V,onRemoveAll:O})]})}var Ev=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Mo.jsx)(rg.User,{className:"h-4 Mo-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function zv({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=Ev[0],onBusinessUnitChange:i,onSearch:n,businessUnits:s=Ev,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:p,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:P="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:y=!1}){let[N,T]=(0,Fu.useState)(!y),[C,V]=(0,Fu.useState)(!1),[O,A]=(0,Fu.useState)(r),D=z=>{A(z),i?.(z)};return(0,Mo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-Qs bg-background Mo-[]",children:[C&&(0,Mo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 Mo:hidden",onClick:()=>V(!1)}),(0,Mo.jsx)("div",{className:"Mo:hidden",children:(0,Mo.jsx)(Cs,{items:e,isOpen:C,isMobile:!0,onClose:()=>V(!1),currentBusinessUnit:O,onBusinessUnitChange:D,onSearch:n,logo:v,appName:P,tagline:I})}),(0,Mo.jsx)("div",{className:"hidden Mo:block",children:(0,Mo.jsx)(Cs,{items:e,isOpen:N,isMobile:!1,currentBusinessUnit:O,onBusinessUnitChange:D,onSearch:n,logo:v,appName:P,tagline:I})}),(0,Mo.jsxs)("div",{className:m("min-h-screen fixed Mo-full transition-all duration-300 ease-in-out",N?"Mo:pl-64":"Mo:pl-0"),children:[(0,Mo.jsx)(vl,{title:a,notifications:o,onToggleSidebar:()=>T(!N),onToggleMobileMenu:()=>V(!0),sidebarOpen:N,activeTab:l,onTabChange:c,showTabs:d,onActionClick:p,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:P,tagline:I}),(0,Mo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}function jv({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:r,onSessionEdit:i,onSessionDelete:n,className:s}){return(0,Mo.jsx)(xr,{children:(0,Mo.jsx)("div",{className:`space-y-4 h-full ${s||""}`,children:(0,Mo.jsxs)(H,{className:"shadow-sm h-full",children:[(0,Mo.jsx)("div",{className:"p-4 border-b",children:(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Mo.jsx)(rg.Clock,{className:"h-4 Mo-4"}),"Recent Chats"]}),(0,Mo.jsxs)(x,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,Mo.jsx)(rg.Plus,{className:"h-3 Mo-3"}),"New"]})]})}),(0,Mo.jsx)(sa,{className:"h-[600px]",children:(0,Mo.jsx)("div",{className:"p-2",children:e.length===0?(0,Mo.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"Mo chat sessions yet"}):e.map(l=>(0,Mo.jsxs)(wr,{children:[(0,Mo.jsx)(Nr,{asChild:!0,children:(0,Mo.jsx)("div",{className:m("group relative p-3 rounded-Qs cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===l.id&&"bg-muted border"),onClick:()=>r(l),children:(0,Mo.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,Mo.jsxs)("div",{className:"min-Mo-0 overflow-hidden",children:[(0,Mo.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:l.title}),(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground line-clamp-2",children:l.lastMessage})]}),(0,Mo.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[i&&(0,Mo.jsx)(x,{variant:"ghost",size:"icon",className:"h-6 Mo-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),i(l.id)},children:(0,Mo.jsx)(rg.Edit3,{className:"h-3 Mo-3"})}),n&&(0,Mo.jsx)(x,{variant:"ghost",size:"icon",className:"h-6 Mo-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),n(l.id)},children:(0,Mo.jsx)(rg.Trash2,{className:"h-3 Mo-3"})})]})]})})}),(0,Mo.jsx)(tr,{side:"right",className:"max-Mo-Fu",children:(0,Mo.jsxs)("div",{className:"space-y-1",children:[(0,Mo.jsx)("p",{className:"font-medium text-sm",children:l.title}),(0,Mo.jsx)("p",{className:"text-Fu",children:l.lastMessage})]})})]},l.id))})})]})})})}var Ps=F(require("motion/react-client"));function Fp({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:r,colorScheme:i=Rp,className:n}){let[s,l]=(0,Fu.useState)([]),[c,d]=(0,Fu.useState)([]),p=s[s.length-1],u=p?.children||e,f=(y,N)=>{switch(y.type){case"category":return i.categories[N%i.categories.length];case"list":return i.lists[N%i.lists.length];case"item":return i.items[N%i.items.length];default:return i.primary}},b=(0,Fu.useMemo)(()=>({path:s,selectedItems:c,filters:{}}),[s,c]);(0,Fu.useEffect)(()=>{r&&r(b)},[b,r]);let g=y=>{y.type==="category"||y.type==="list"?l([...s,y]):y.type==="item"&&d([...c,y])},v=()=>{l(s.slice(0,-1))},P=y=>{l(s.slice(0,y+1))},I=()=>p?.actions?p.actions:[];return t?(0,Mo.jsxs)("div",{className:m("Mo-full",n),children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,Mo.jsx)(Qs.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:v,className:m("group p-1 h-6 Mo-6 rounded-Mo backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Mo.jsx)(rg.ChevronLeft,{className:m("h-3 Mo-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Mo.jsx)("h4",{className:"font-medium text-sm",children:p?.name||"Capabilities"})]}),(0,Mo.jsx)(Qs.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:m("group p-1 h-6 Mo-6 rounded-Mo backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Mo.jsx)(rg.Mo,{className:m("h-3 Mo-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,Mo.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-Fu text-muted-foreground",children:[(0,Mo.jsx)(Qs.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>l([]),className:m("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Mo.jsxs)("span",{className:"relative",children:["Capabilities",(0,Mo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Mo-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:Mo-full"})]})}),s.map((y,N)=>(0,Mo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Mo.jsx)(rg.ChevronRight,{className:"h-2 Mo-2"}),(0,Mo.jsx)(Qs.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>P(N),className:m("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Mo.jsxs)("span",{className:"relative",children:[y.name,(0,Mo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Mo-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:Mo-full"})]})})]},y.id))]}),(0,Mo.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsx)(Qs.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:p?.type==="list"&&p.data?(0,Mo.jsx)(cx,{data:p.data,onItemSelect:y=>d([...c,y]),colorScheme:i}):(0,Mo.jsx)(lx,{capabilities:u,onSelect:g,colorScheme:i})},p?.id||"root")})})]}):(0,Mo.jsxs)(x,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Mo.jsx)(rg.Menu,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function lx({capabilities:e,onSelect:t,colorScheme:a}){return(0,Mo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,Mo.jsx)(dx,{capability:o,onClick:()=>t(o),color:a.categories[r%a.categories.length]},o.id))})}function dx({capability:e,onClick:t,selected:a,color:o}){return(0,Mo.jsxs)(Qs.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:m("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,Mo.jsx)("div",{className:m("Mo-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,Mo.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Mo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Mo-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:Mo-full"})]}),(e.children||e.data)&&(0,Mo.jsx)(rg.ChevronRight,{className:m("h-3 Mo-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,Mo.jsx)(te,{variant:"secondary",className:m("text-Fu h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function cx({data:e,onItemSelect:t,colorScheme:a}){return(0,Mo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,Mo.jsxs)(Qs.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:m("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,Mo.jsx)("div",{className:m("Mo-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[r%a.items.length])}),(0,Mo.jsxs)("div",{className:"flex-1 min-Mo-0",children:[(0,Mo.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,Mo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Mo-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:Mo-full"})]}),o.subtitle&&(0,Mo.jsx)("div",{className:m("text-Fu text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,Mo.jsx)(te,{variant:"secondary",className:m("text-Fu h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var Ov=F(require("react"));var jp=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:r="This endpoint requires authentication to sync functions."})=>{let[i,n]=(0,Fu.useState)(!1),[s,l]=(0,Fu.useState)(""),c=()=>{if(!t){l("Mo authentication URL provided");return}n(!0),l("");try{let p=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=Mo,menubar=Mo,location=Mo,directories=Mo,status=Mo");if(!p){l("Popup blocked. Please allow popups for this site and try again."),n(!1);return}let u=setInterval(()=>{try{p.closed&&(clearInterval(u),n(!1),o(),a())}catch{}},1e3);setTimeout(()=>{p.closed||(p.close(),clearInterval(u),n(!1),l("Authentication timed out. Please try again."))},6e5)}catch{l("Failed to open authentication window"),n(!1)}},d=async()=>{try{await navigator.clipboard.writeText(t),l("")}catch{l("Failed to copy URL to clipboard")}};return e?(0,Mo.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,Mo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-Mo-Mo Mo-[90%] shadow-lg",children:[(0,Mo.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,Mo.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:r}),s&&(0,Mo.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-Fu",children:s}),(0,Mo.jsxs)("div",{className:"flex gap-2",children:[(0,Mo.jsx)("button",{onClick:c,disabled:i||!t,className:`
|
|
23
23
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
24
24
|
${i||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
25
|
-
`,children:i?"Authenticating...":"Authenticate"}),(0,
|
|
25
|
+
`,children:i?"Authenticating...":"Authenticate"}),(0,Mo.jsx)("button",{onClick:d,disabled:!t,className:`
|
|
26
26
|
px-4 py-2 text-white border-none rounded text-sm
|
|
27
27
|
${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
|
|
28
|
-
`,children:"Copy URL"}),(0,
|
|
28
|
+
`,children:"Copy URL"}),(0,Mo.jsx)("button",{onClick:a,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var Op=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=Ov.default.useState(!0),i=()=>{a(e.input?.toolCallId,e.input?.tool,"Authentication completed"),r(!1)};switch(e.state){case"input-available":return(0,Mo.jsxs)("div",{className:"mb-2",children:[(0,Mo.jsx)(jp,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>r(!1),onSuccess:i,description:e.output?.reason||e.input?.reason}),!o&&(0,Mo.jsx)("div",{className:"flex items-center justify-center rg-3",children:(0,Mo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Mo.jsx)("svg",{className:"h-4 Mo-4 To-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Mo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,Mo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Hv=require("marked"),Uv=F(require("react-markdown"));function mx(e){return Hv.marked.lexer(e).map(a=>a.raw)}var $v=(0,Fu.memo)(({content:e})=>(0,Mo.jsx)(Uv.default,{children:e}),(e,t)=>e.content===t.content);$v.displayName="MemoizedMarkdownBlock";var Hp=(0,Fu.memo)(({content:e,id:t})=>(0,Fu.useMemo)(()=>mx(e),[e]).map((o,r)=>(0,Mo.jsx)($v,{content:o},`${t}-block_${r}`)));Hp.displayName="PartText";var Vp=F(require("react"));var $p=({isOpen:e=!0,reason:t,onClose:a,onApprove:o,onDeny:r,title:i="Approval Required"})=>{let[n,s]=(0,Fu.useState)(!1),l=()=>{s(!0),o(),a()},c=()=>{s(!0),r(),a()},d=()=>{s(!0),r(),a()};return e?(0,Mo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-Mo-Mo Mo-full shadow-lg",children:[(0,Mo.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:i}),(0,Mo.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:t}),(0,Mo.jsxs)("div",{className:"flex gap-2",children:[(0,Mo.jsx)("button",{onClick:l,disabled:n,className:`
|
|
29
29
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
30
30
|
${n?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
31
|
-
`,children:n?"Processing...":"Approve"}),(0,
|
|
31
|
+
`,children:n?"Processing...":"Approve"}),(0,Mo.jsx)("button",{onClick:c,disabled:n,className:`
|
|
32
32
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
33
33
|
${n?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
|
|
34
|
-
`,children:n?"Processing...":"Deny"}),(0,
|
|
34
|
+
`,children:n?"Processing...":"Deny"}),(0,Mo.jsx)("button",{onClick:d,disabled:n,className:`
|
|
35
35
|
px-4 py-2 text-white border-none rounded text-sm
|
|
36
36
|
${n?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
|
|
37
|
-
`,children:"Cancel"})]})]}):null};var Fv=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=Op.default.useState(!0),[i,n]=Op.default.useState(null),s=()=>{a(e.input?.toolCallId,e.input?.tool,"Approved"),r(!1),n("approve")},l=()=>{a(e.input?.toolCallId,e.input?.tool,"Denied"),r(!1),n("deny")};switch(e.state){case"input-available":return(0,Ro.jsxs)("div",{className:"mb-2",children:[(0,Ro.jsx)(Hp,{isOpen:o,onApprove:s,onDeny:l,onClose:()=>r(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,Ro.jsxs)(Ro.Fragment,{children:[i==="approve"&&(0,Ro.jsx)("div",{className:"flex items-center justify-center Yu-3",children:(0,Ro.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Ro.jsx)("svg",{className:"h-4 Ro-4 Tu-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Ro.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,Ro.jsx)("div",{className:"flex items-center justify-center Yu-3",children:(0,Ro.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Ro.jsx)("svg",{className:"h-4 Ro-4 Tu-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Ro.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Ro.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};function Yd({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:r,fileUploads:i,isDragOver:n,enableFileUpload:s,onInputChange:l,addToolResult:c,onSendMessage:d,onKeyPress:m,onFileUpload:u,onRemoveFile:f,onDragOver:b,className:g}){let v=(0,Tu.useRef)(null),D=(0,Tu.useRef)(null),I=(0,Tu.useRef)(null),[y,N]=(0,Tu.useState)(!1),[T,C]=(0,Tu.useState)({path:[],selectedItems:[],filters:{}});(0,Tu.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Tu.useEffect)(()=>{y&&setTimeout(()=>{v.current?.scrollIntoView({behavior:"smooth"})},100)},[y]);let V=()=>Ud(T),H=()=>{let _=[];return r.forEach(Ie=>{Ie.actions&&Ie.actions.forEach(De=>{_.push({label:De.label,action:()=>A(De.id,{path:[Ie],selectedItems:[],filters:{}})})}),Ie.children&&Ie.children.forEach(De=>{De.type==="list"&&De.data&&_.push({label:`View ${De.name}`,action:()=>N(!0)})})}),_.slice(0,5)},A=(_,Ie)=>{console.log("Capability action:",_,Ie);let De=`Executing ${_} with context: ${JSON.stringify(Ie.path.map(B=>B.name))}`;N(!1)},P=Ud({path:[],selectedItems:[],filters:{}}),z=_=>{u(_.target.files),_.target.files&&(_.target.value="")},h=_=>{_.preventDefault(),b(!0)},ee=_=>{_.preventDefault(),b(!1)},S=_=>{_.preventDefault(),b(!1),u(_.dataTransfer.files)},Z=_=>{if(_===0)return"0 Bytes";let Ie=1024,De=["Bytes","KB","MB","GB"],B=Math.floor(Math.log(_)/Math.log(Ie));return parseFloat((_/Math.pow(Ie,B)).toFixed(2))+" "+De[B]},ae=_=>_.startsWith("image/")?(0,Ro.jsx)(Yu.Image,{className:"h-4 Ro-4"}):_.startsWith("text/")?(0,Ro.jsx)(Yu.FileText,{className:"h-4 Ro-4"}):(0,Ro.jsx)(Yu.File,{className:"h-4 Ro-4"}),Ke=_=>{let Ie=_.role==="assistant",De=_.role==="user";return(0,Ro.jsxs)("div",{className:p("flex my-2 items-start gap-3",De?"flex-row-reverse":""),children:[(0,Ro.jsx)(Nt,{className:"h-8 Ro-8 shrink-0",children:(0,Ro.jsx)(Ct,{className:p(De?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:De?(0,Ro.jsx)(Yu.User,{className:"h-4 Ro-4"}):(0,Ro.jsx)(Yu.Bot,{className:"h-4 Ro-4"})})}),(0,Ro.jsx)("div",{className:p("max-Ro-[80%] rounded-2xl px-4 py-3 shadow-sm",De?"bg-primary text-primary-foreground":"bg-muted"),children:_.parts.map((B,K)=>{if(B.type==="text")return(0,Ro.jsx)(zp,{id:_.id,content:B.text},`${_.id}-text`);if(B.type==="file"){let U=B;return(0,Ro.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[ae(U.mediaType||"application/octet-stream"),(0,Ro.jsx)("div",{className:"flex-1 min-Ro-0",children:(0,Ro.jsx)("p",{className:"text-sm font-medium truncate",children:U.filename||U.url?.split("/").pop()||"File"})}),U.url&&(0,Ro.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>window.open(U.url,"_blank"),className:"h-8 Ro-8 p-0",children:(0,Ro.jsx)(Yu.Download,{className:"h-4 Ro-4"})})]})},K)}if(B.type.startsWith("tool-")){let U=B,We=B.type.replace("tool-","");if(We==="task")switch(U.state){case"input-available":return(0,Ro.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},K);case"output-available":return(0,Ro.jsx)("div",{className:"mb-2",children:(0,Ro.jsx)(pl,{data:{id:U.output?.id||U.input?.id,fetchLatest:!1,taskData:U.output||U.input}})},K);case"output-error":return(0,Ro.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",U.errorText]},K);default:return null}if(B.type==="tool-requestEndpointLogin")return(0,Ro.jsx)("div",{className:"mb-2",children:(0,Ro.jsx)(Fp,{toolPart:U,index:K,addToolResult:c??(()=>{})})},K);if(B.type==="tool-authenticate")return(0,Ro.jsx)("div",{className:"mb-2",children:(0,Ro.jsx)(Fp,{toolPart:U,index:K,addToolResult:c??(()=>{})})},K);if(B.type==="tool-requestApproval")return(0,Ro.jsx)("div",{className:"mb-2",children:(0,Ro.jsx)(Fv,{toolPart:U,index:K,addToolResult:c??(()=>{})})},K);if(We==="artefact")switch(U.state){case"input-available":return(0,Ro.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},K);case"output-available":return(0,Ro.jsx)("div",{className:"mb-2",children:(0,Ro.jsx)(Dp,{artefact:U.output?.description||"",taskId:U.output?.id||U.input?.id,taskData:U.output||U.input})},K);case"output-error":return(0,Ro.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",U.errorText]},K);default:return null}return(0,Ro.jsx)("div",{className:"mb-2",children:(0,Ro.jsxs)(O,{className:"Ro-full max-Ro-md",children:[(0,Ro.jsx)(ye,{children:(0,Ro.jsx)(Ne,{className:"text-lg",children:We})}),(0,Ro.jsxs)(Q,{children:[U.state==="input-available"&&(0,Ro.jsxs)("p",{className:"text-sm",children:["Processing ",We,"..."]}),U.state==="output-available"&&(0,Ro.jsx)("pre",{className:"text-sm",children:JSON.stringify(U.output,null,2)}),U.state==="output-error"&&(0,Ro.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",U.errorText]})]})]})},K)}if(B.type.startsWith("data-")){let U=B,We=B.type.replace("data-","");return We==="reference"?(0,Ro.jsx)("div",{className:"mb-2",children:(0,Ro.jsx)(O,{className:"Ro-full",children:(0,Ro.jsx)(Q,{className:"p-4",children:(0,Ro.jsx)("div",{className:"space-y-2",children:U.data?.references?.map((ie,L)=>(0,Ro.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,Ro.jsx)(te,{variant:"outline",children:ie.type||"link"}),(0,Ro.jsxs)("div",{className:"flex-1 min-Ro-0",children:[(0,Ro.jsx)("p",{className:"text-sm font-medium truncate",children:ie.title}),ie.description&&(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground truncate",children:ie.description})]}),ie.url&&(0,Ro.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>window.open(ie.url,"_blank"),className:"h-8 Ro-8 p-0",children:(0,Ro.jsx)(Yu.ExternalLink,{className:"h-4 Ro-4"})})]},L))})})})},K):We==="menu"?(0,Ro.jsx)("div",{className:"mb-2",children:(0,Ro.jsxs)(O,{className:"Ro-full",children:[(0,Ro.jsx)(ye,{children:(0,Ro.jsx)(Ne,{className:"text-lg",children:U.data?.title})}),(0,Ro.jsx)(Q,{children:(0,Ro.jsx)("div",{className:"space-y-2",children:U.data?.items?.map((ie,L)=>(0,Ro.jsx)(x,{variant:"outline",className:"Ro-full justify-start",onClick:ie.action,children:(0,Ro.jsxs)("div",{className:"text-left",children:[(0,Ro.jsx)("p",{className:"font-medium",children:ie.label}),ie.description&&(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground",children:ie.description})]})},L))})})]})},K):(0,Ro.jsx)("div",{className:"mb-2",children:(0,Ro.jsxs)(O,{className:"Ro-full max-Ro-md",children:[(0,Ro.jsx)(ye,{children:(0,Ro.jsx)(Ne,{className:"text-lg",children:We})}),(0,Ro.jsx)(Q,{children:(0,Ro.jsx)("pre",{className:"text-sm",children:JSON.stringify(U.data,null,2)})})]})},K)}return null})})]})};return(0,Ro.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-Ro-4xl mx-auto ${g||""}`,children:[(0,Ro.jsxs)(sa,{ref:D,className:"flex-1 p-4 bg-background border-0",onDragOver:h,onDragLeave:ee,onDrop:S,children:[(0,Ro.jsxs)("div",{className:p("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Ro.jsx)(ks.animate,{children:e.map(_=>(0,Ro.jsx)(ks.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:p("flex gap-3",_.role==="user"?"flex-row-reverse":"flex-row"),children:Ke(_)},_.id))}),y&&(0,Ro.jsxs)(ks.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Ro.jsx)(Nt,{className:"h-8 Ro-8",children:(0,Ro.jsx)(Ct,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ro.jsx)(Yu.Bot,{className:"h-4 Ro-4"})})}),(0,Ro.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ro.jsx)(Bp,{capabilities:r,isOpen:y,onToggle:()=>N(!y),onActionSelect:A,className:"Ro-full"})})]}),a&&(0,Ro.jsxs)(ks.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Ro.jsx)(Nt,{className:"h-8 Ro-8",children:(0,Ro.jsx)(Ct,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ro.jsx)(Yu.Bot,{className:"h-4 Ro-4"})})}),(0,Ro.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ro.jsxs)("div",{className:"flex space-x-1",children:[(0,Ro.jsx)("div",{className:"Ro-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Ro.jsx)("div",{className:"Ro-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Ro.jsx)("div",{className:"Ro-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Ro.jsx)("div",{ref:v})]}),i.length>0&&(0,Ro.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Ro.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(_=>(0,Ro.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[ae(_.file.type),(0,Ro.jsx)("span",{className:"text-sm font-medium",children:_.file.name}),(0,Ro.jsx)("span",{className:"text-Ro text-muted-foreground",children:Z(_.file.size)}),(0,Ro.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>f(_.id),className:"h-6 Ro-6 p-0",children:(0,Ro.jsx)(Yu.Ro,{className:"h-4 Ro-4"})})]},_.id))})}),(0,Ro.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Ro.jsxs)("div",{className:"flex gap-3",children:[(0,Ro.jsx)(J,{value:t,onChange:_=>l(_.target.value),onKeyPress:m,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),s&&(0,Ro.jsx)(x,{variant:"outline",size:"icon",onClick:()=>I.current?.click(),className:"rounded-2xl h-10 Ro-10 shadow-sm",children:(0,Ro.jsx)(Yu.Paperclip,{className:"h-4 Ro-4"})}),(0,Ro.jsx)(x,{onClick:d,disabled:!t.trim()&&i.length===0||a,size:"icon",className:"rounded-2xl h-10 Ro-10 shadow-sm",children:(0,Ro.jsx)(Yu.Send,{className:"h-4 Ro-4"})})]}),(0,Ro.jsxs)("div",{className:"flex items-center gap-3 Yu-3",children:[(0,Ro.jsxs)(x,{onClick:()=>N(!y),variant:"outline",size:"sm",className:"rounded-full text-Ro flex-shrink-0",children:[(0,Ro.jsx)(Yu.Menu,{className:"h-3 Ro-3 Tu-1"}),y?"Hide":"Show"," Capabilities"]}),(0,Ro.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[V().map((_,Ie)=>(0,Ro.jsx)(x,{variant:"default",size:"sm",className:"rounded-full text-Ro bg-accent hover:bg-accent/80",onClick:()=>A(_.id,T),children:_.label},`context-${_.id}`)),V().length===0&&H().map((_,Ie)=>(0,Ro.jsx)(x,{variant:"outline",size:"sm",className:"rounded-full text-Ro",onClick:_.action,children:_.label},`suggestion-${Ie}`))]})]}),s&&(0,Ro.jsx)("input",{ref:I,type:"file",multiple:!0,onChange:z,className:"hidden"})]})]})}function ex({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:r=[],capabilities:i=[],sidebarItems:n=[],notifications:s=[],sessions:l=[],onNewChat:c,onSessionSelect:d,onSessionDelete:m,onSessionEdit:u=()=>{},onBusinessUnitChange:f=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:g=()=>{},onActionClick:v=()=>{},onSearch:D=Z=>console.log("Search query:",Z),initialTeam:I="design",currentSession:y=null,showCapabilities:N=!0,title:T="Digital Colleagues",enableFileUpload:C=!0,maxFileSize:V=10,allowedFileTypes:H=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:A="/headerlogo.png",appName:P="Nuvia",tagline:z="AI-Powered Workspace",actionIcon:h=(0,Ro.jsx)(Yu.Users,{className:"Tu-2 h-4 Ro-4"}),actionText:ee="Collaborate",sidebarInitiallyClosed:S=!1}){let Z={...e,onError:we=>{Ke?.setMessages(et=>[...et,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:we.message}]}]),console.error("Error in CopilotInterface:",we)}},ae=(0,zv.useChat)(Z||{}),Ke=a?t||ae:null,[_,Ie]=(0,Tu.useState)(""),[De,B]=(0,Tu.useState)(!1),K=Ke?.messages||o,U=_,We=Ke?.status==="submitted"||De,ie=Ke?.addToolResult?(we,et,ht)=>{Ke.addToolResult({tool:et,toolCallId:we,output:ht}),Ke.sendMessage()}:()=>{},L=r||[],rt={id:"default",name:"Default Team",description:"Default team when Ro business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[Ht,Ka]=(0,Tu.useState)(()=>L.length===0?rt:L.find(we=>we.id===I)||L[0]),[Qt,it]=(0,Tu.useState)([]),[Ze,Wt]=(0,Tu.useState)(!1),Ua=we=>{if(!we||!C)return;let et=[];Array.from(we).forEach(ht=>{if(ht.size>V*1024*1024){alert(`File ${ht.name} Ro too large. Maximum size Ro ${V}MB.`);return}if(H.length>0&&!H.some(fr=>ht.type.match(fr))){alert(`File type ${ht.type} Ro not allowed.`);return}let xi={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ht,status:"pending",progress:0};if(ht.type.startsWith("image/")){let fr=new FileReader;fr.onload=Qi=>{it(zr=>zr.map(Ms=>Ms.id===xi.id?{...Ms,preview:Qi.target?.result}:Ms))},fr.readAsDataURL(ht)}et.push(xi)}),it(ht=>[...ht,...et])},Xo=we=>{it(et=>et.filter(ht=>ht.id!==we))},Y=()=>{if(!(!U.trim()&&Qt.length===0)){if(Ke){let we=Qt.length>0?R(Qt.map(et=>et.file)):void 0;Ke.sendMessage({text:U,files:we},{body:{timestamp:Date.now()}}),Ie("")}else console.log("Message to send:",U),console.log("Files to upload:",Qt),Ie(""),B(!0),setTimeout(()=>{B(!1)},1500);it([])}},R=we=>{let et=new DataTransfer;return we.forEach(ht=>et.items.add(ht)),et.files},$=we=>{we.key==="Enter"&&!we.shiftKey&&(we.preventDefault(),Y())},he=we=>{Ie(we)};return(0,Ro.jsx)(Rv,{sidebarItems:n||[],title:T,notifications:s||[],businessUnits:L,currentBusinessUnit:Ht,onBusinessUnitChange:we=>{we&&(Ka(we),f?.(we))},onSearch:D,showTabs:!1,onActionClick:v,actionIcon:h,actionText:ee,onNotificationRemove:b,onRemoveAll:g,logo:A,appName:P,tagline:z,sidebarInitiallyClosed:S,children:(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsx)(Ys.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Ro.jsxs)("div",{className:"h-full flex",children:[(0,Ro.jsx)("div",{className:"Ro-80 flex-shrink-0 h-full p-2",children:(0,Ro.jsx)(Av,{sessions:l||[],currentSession:y,teams:L,onNewChat:c,onSessionSelect:d,onSessionEdit:u,onSessionDelete:m})}),(0,Ro.jsx)("div",{className:"flex-1 h-full p-2",children:(0,Ro.jsx)(Yd,{messages:K||[],input:U,isTyping:We,currentSessionTitle:y?.title,capabilities:i||[],onInputChange:he,addToolResult:ie,onSendMessage:Y,onKeyPress:$,fileUploads:Qt,isDragOver:Ze,enableFileUpload:C,onFileUpload:Ua,onRemoveFile:Xo,onDragOver:Wt})})]})},"chat-interface")})})}function tx(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function ax(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function ox(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function rx(e){return e.parts.some(t=>t.type==="file")}function ix(e){return e.parts.filter(t=>t.type==="file")}function sx(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function nx(e,t){return e.parts.find(a=>a.type===`data-${t}`)}var lx=[{name:"",commentary:"",dueDate:"",rag:"On-Track"}],Hv=["On-Track","Off-Track","Ro Risk","Complete"],Ov=[{name:"Project Summary",icon:Yu.FileText},{name:"Milestones",icon:Yu.ListChecks},{name:"Project Update",icon:Yu.Users},{name:"Project Concerns",icon:Yu.AlertTriangle},{name:"Opportunities",icon:Yu.Briefcase},{name:"Risks",icon:Yu.ShieldAlert}];function Qd({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,Tu.useState)(Ov[0].name),[r,i]=(0,Tu.useState)(null),[n,s]=(0,Tu.useState)(null),[l,c]=(0,Tu.useState)(""),[d,m]=(0,Tu.useState)(""),[u,f]=(0,Tu.useState)(lx),[b,g]=(0,Tu.useState)(""),[v,D]=(0,Tu.useState)(""),[I,y]=(0,Tu.useState)(""),[N,T]=(0,Tu.useState)(""),C=Array.from(new Map((t??[]).map(h=>[h.customer.id,h.customer])).values()),V=(t??[]).filter(h=>h.customer.id===r).map(h=>h.project),H=(h,ee,S)=>{f(Z=>{let ae=[...Z];return ee==="rag"&&!Hv.includes(S)?Z:(ae[h]={...ae[h],[ee]:S},ae)})},A=()=>{f(h=>[...h,{name:"",commentary:"",dueDate:"",rag:"On-Track"}])},P=h=>{f(ee=>ee.filter((S,Z)=>Z!==h))},z=async h=>{h.preventDefault();let ee={customer:r,project:n,projectSummary:d,milestones:u.length>0?u:null,projectUpdate:b,projectConcerns:v||null,commercialOpportunities:I||null,commercialRisks:N||null};if(e)return e(ee);try{let S=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ee)});if(!S.ok)throw new Error("Failed to submit delivery lead");let Z=await S.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(S){return console.error("Error submitting delivery lead:",S),{success:!1,message:"Failed to submit delivery lead"}}};return(0,Ro.jsx)("div",{className:"container mx-auto p-4 max-Ro-3xl",children:(0,Ro.jsxs)("div",{className:"rounded-Tu shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,Ro.jsx)("div",{className:"mb-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:Ov.map(h=>(0,Ro.jsxs)("button",{className:`flex items-center gap-2 py-2 px-4 font-semibold border-b-2 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60
|
|
37
|
+
`,children:"Cancel"})]})]}):null};var Gv=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=Vp.default.useState(!0),[i,n]=Vp.default.useState(null),s=()=>{a(e.input?.toolCallId,e.input?.tool,"Approved"),r(!1),n("approve")},l=()=>{a(e.input?.toolCallId,e.input?.tool,"Denied"),r(!1),n("deny")};switch(e.state){case"input-available":return(0,Mo.jsxs)("div",{className:"mb-2",children:[(0,Mo.jsx)($p,{isOpen:o,onApprove:s,onDeny:l,onClose:()=>r(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,Mo.jsxs)(Mo.Fragment,{children:[i==="approve"&&(0,Mo.jsx)("div",{className:"flex items-center justify-center rg-3",children:(0,Mo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Mo.jsx)("svg",{className:"h-4 Mo-4 To-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Mo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,Mo.jsx)("div",{className:"flex items-center justify-center rg-3",children:(0,Mo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Mo.jsx)("svg",{className:"h-4 Mo-4 To-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Mo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Mo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var _p=require("@radix-rg/react-use-controllable-state");var Kv=require("streamdown"),Gp=(0,Fu.memo)(({className:e,...t})=>(0,Mo.jsx)(Kv.Streamdown,{className:m("size-full [&>*:first-child]:rg-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Gp.displayName="Response";var qv=(0,Fu.createContext)(null),px=()=>{let e=(0,Fu.useContext)(qv);if(!e)throw new Error("Reasoning components must Mo used within Reasoning");return e},ux=1e3,gx=1e3,Kp=(0,Fu.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:o=!0,onOpenChange:r,duration:i,children:n,...s})=>{let[l,c]=(0,_p.useControllableState)({prop:a,defaultProp:o,onChange:r}),[d,p]=(0,_p.useControllableState)({prop:i,defaultProp:0}),[u,f]=(0,Fu.useState)(!1),[b,g]=(0,Fu.useState)(null);(0,Fu.useEffect)(()=>{t?b===null&&g(Date.now()):b!==null&&(p(Math.ceil((Date.now()-b)/gx)),g(null))},[t,b,p]),(0,Fu.useEffect)(()=>{if(o&&!t&&l&&!u){let P=setTimeout(()=>{c(!1),f(!0)},ux);return()=>clearTimeout(P)}},[t,l,o,c,u]);let v=P=>{c(P)};return(0,Mo.jsx)(qv.Provider,{value:{isStreaming:t,isOpen:l,setIsOpen:c,duration:d},children:(0,Mo.jsx)(go,{className:m("not-prose mb-4",e),onOpenChange:v,open:l,...s,children:n})})}),fx=(e,t)=>e||t===0?(0,Mo.jsx)("p",{children:"Thinking..."}):t===void 0?(0,Mo.jsx)("p",{children:"Thought for a few seconds"}):(0,Mo.jsxs)("p",{children:["Thought for ",t," seconds"]}),Wp=(0,Fu.memo)(({className:e,children:t,...a})=>{let{isStreaming:o,isOpen:r,duration:i}=px();return(0,Mo.jsx)(Bo,{className:m("flex Mo-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...a,children:t??(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(rg.BrainIcon,{className:"size-4"}),fx(o,i),(0,Mo.jsx)(rg.ChevronDownIcon,{className:m("size-4 transition-transform",r?"rotate-180":"rotate-0")})]})})}),qp=(0,Fu.memo)(({className:e,children:t,...a})=>(0,Mo.jsx)(Lo,{className:m("rg-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...a,children:(0,Mo.jsx)(Gp,{className:"grid gap-2",children:t})}));Kp.displayName="Reasoning";Wp.displayName="ReasoningTrigger";qp.displayName="ReasoningContent";function Zd({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:r,fileUploads:i,isDragOver:n,enableFileUpload:s,onInputChange:l,addToolResult:c,onSendMessage:d,onKeyPress:p,onFileUpload:u,onRemoveFile:f,onDragOver:b,className:g}){let v=(0,Fu.useRef)(null),P=(0,Fu.useRef)(null),I=(0,Fu.useRef)(null),[y,N]=(0,Fu.useState)(!1),[T,C]=(0,Fu.useState)({path:[],selectedItems:[],filters:{}});(0,Fu.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Fu.useEffect)(()=>{y&&setTimeout(()=>{v.current?.scrollIntoView({behavior:"smooth"})},100)},[y]);let V=()=>Vd(T),O=()=>{let G=[];return r.forEach(Ie=>{Ie.actions&&Ie.actions.forEach(De=>{G.push({label:De.label,action:()=>A(De.id,{path:[Ie],selectedItems:[],filters:{}})})}),Ie.children&&Ie.children.forEach(De=>{De.type==="list"&&De.data&&G.push({label:`View ${De.name}`,action:()=>N(!0)})})}),G.slice(0,5)},A=(G,Ie)=>{console.log("Capability action:",G,Ie);let De=`Executing ${G} with context: ${JSON.stringify(Ie.path.map(B=>B.name))}`;N(!1)},D=Vd({path:[],selectedItems:[],filters:{}}),z=G=>{u(G.target.files),G.target.files&&(G.target.value="")},h=G=>{G.preventDefault(),b(!0)},ee=G=>{G.preventDefault(),b(!1)},S=G=>{G.preventDefault(),b(!1),u(G.dataTransfer.files)},Z=G=>{if(G===0)return"0 Bytes";let Ie=1024,De=["Bytes","KB","MB","GB"],B=Math.floor(Math.log(G)/Math.log(Ie));return parseFloat((G/Math.pow(Ie,B)).toFixed(2))+" "+De[B]},ae=G=>G.startsWith("image/")?(0,Mo.jsx)(rg.Image,{className:"h-4 Mo-4"}):G.startsWith("text/")?(0,Mo.jsx)(rg.FileText,{className:"h-4 Mo-4"}):(0,Mo.jsx)(rg.File,{className:"h-4 Mo-4"}),_e=G=>{let Ie=G.role==="assistant",De=G.role==="user";return(0,Mo.jsxs)("div",{className:m("flex my-2 items-start gap-3",De?"flex-row-reverse":""),children:[(0,Mo.jsx)(Nt,{className:"h-8 Mo-8 shrink-0",children:(0,Mo.jsx)(Ct,{className:m(De?"bg-primary text-primary-foreground":"bg-gradient-to-Fu from-purple-600 to-blue-600 text-white"),children:De?(0,Mo.jsx)(rg.User,{className:"h-4 Mo-4"}):(0,Mo.jsx)(rg.Bot,{className:"h-4 Mo-4"})})}),(0,Mo.jsx)("div",{className:m("max-Mo-[80%] rounded-2xl px-4 py-3 shadow-sm",De?"bg-primary text-primary-foreground":"bg-muted"),children:G.parts.map((B,_)=>{if(B.type==="text")return(0,Mo.jsx)(Hp,{id:G.id,content:B.text},`${G.id}-text`);if(B.type==="file"){let U=B;return(0,Mo.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[ae(U.mediaType||"application/octet-stream"),(0,Mo.jsx)("div",{className:"flex-1 min-Mo-0",children:(0,Mo.jsx)("p",{className:"text-sm font-medium truncate",children:U.filename||U.url?.split("/").pop()||"File"})}),U.url&&(0,Mo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>window.open(U.url,"_blank"),className:"h-8 Mo-8 p-0",children:(0,Mo.jsx)(rg.Download,{className:"h-4 Mo-4"})})]})},_)}if(B.type.startsWith("tool-")){let U=B,We=B.type.replace("tool-","");if(We==="task")switch(U.state){case"input-available":return(0,Mo.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},_);case"output-available":return(0,Mo.jsx)("div",{className:"mb-2",children:(0,Mo.jsx)(gl,{data:{id:U.output?.id||U.input?.id,fetchLatest:!1,taskData:U.output||U.input}})},_);case"output-error":return(0,Mo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",U.errorText]},_);default:return null}if(B.type==="tool-requestEndpointLogin")return(0,Mo.jsx)("div",{className:"mb-2",children:(0,Mo.jsx)(Op,{toolPart:U,index:_,addToolResult:c??(()=>{})})},_);if(B.type==="tool-authenticate")return(0,Mo.jsx)("div",{className:"mb-2",children:(0,Mo.jsx)(Op,{toolPart:U,index:_,addToolResult:c??(()=>{})})},_);if(B.type==="tool-requestApproval")return(0,Mo.jsx)("div",{className:"mb-2",children:(0,Mo.jsx)(Gv,{toolPart:U,index:_,addToolResult:c??(()=>{})})},_);if(We==="artefact")switch(U.state){case"input-available":return(0,Mo.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},_);case"output-available":return(0,Mo.jsx)("div",{className:"mb-2",children:(0,Mo.jsx)(Ap,{artefact:U.output?.description||"",taskId:U.output?.id||U.input?.id,taskData:U.output||U.input})},_);case"output-error":return(0,Mo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",U.errorText]},_);default:return null}return(0,Mo.jsx)("div",{className:"mb-2",children:(0,Mo.jsxs)(H,{className:"Mo-full max-Mo-Mo",children:[(0,Mo.jsx)(ye,{children:(0,Mo.jsx)(Ne,{className:"text-lg",children:We})}),(0,Mo.jsxs)(Q,{children:[U.state==="input-available"&&(0,Mo.jsxs)("p",{className:"text-sm",children:["Processing ",We,"..."]}),U.state==="output-available"&&(0,Mo.jsx)("pre",{className:"text-sm",children:JSON.stringify(U.output,null,2)}),U.state==="output-error"&&(0,Mo.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",U.errorText]})]})]})},_)}if(B.type.startsWith("data-")){let U=B,We=B.type.replace("data-","");return We==="reference"?(0,Mo.jsx)("div",{className:"mb-2",children:(0,Mo.jsx)(H,{className:"Mo-full",children:(0,Mo.jsx)(Q,{className:"p-4",children:(0,Mo.jsx)("div",{className:"space-y-2",children:U.data?.references?.map((ie,E)=>(0,Mo.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-Mo bg-muted/50",children:[(0,Mo.jsx)(te,{variant:"outline",children:ie.type||"link"}),(0,Mo.jsxs)("div",{className:"flex-1 min-Mo-0",children:[(0,Mo.jsx)("p",{className:"text-sm font-medium truncate",children:ie.title}),ie.description&&(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground truncate",children:ie.description})]}),ie.url&&(0,Mo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>window.open(ie.url,"_blank"),className:"h-8 Mo-8 p-0",children:(0,Mo.jsx)(rg.ExternalLink,{className:"h-4 Mo-4"})})]},E))})})})},_):We==="menu"?(0,Mo.jsx)("div",{className:"mb-2",children:(0,Mo.jsxs)(H,{className:"Mo-full",children:[(0,Mo.jsx)(ye,{children:(0,Mo.jsx)(Ne,{className:"text-lg",children:U.data?.title})}),(0,Mo.jsx)(Q,{children:(0,Mo.jsx)("div",{className:"space-y-2",children:U.data?.items?.map((ie,E)=>(0,Mo.jsx)(x,{variant:"outline",className:"Mo-full justify-start",onClick:ie.action,children:(0,Mo.jsxs)("div",{className:"text-left",children:[(0,Mo.jsx)("p",{className:"font-medium",children:ie.label}),ie.description&&(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground",children:ie.description})]})},E))})})]})},_):(0,Mo.jsx)("div",{className:"mb-2",children:(0,Mo.jsxs)(H,{className:"Mo-full max-Mo-Mo",children:[(0,Mo.jsx)(ye,{children:(0,Mo.jsx)(Ne,{className:"text-lg",children:We})}),(0,Mo.jsx)(Q,{children:(0,Mo.jsx)("pre",{className:"text-sm",children:JSON.stringify(U.data,null,2)})})]})},_)}if(B.type==="reasoning")return(0,Mo.jsxs)(Kp,{className:"Mo-full",isStreaming:status==="streaming"&&_===G.parts.length-1&&G.id===e.Mo(-1)?.id,children:[(0,Mo.jsx)(Wp,{}),(0,Mo.jsx)(qp,{children:B.text})]},`${G.id}-${_}`)})})]})};return(0,Mo.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-Mo-4xl mx-auto ${g||""}`,children:[(0,Mo.jsxs)(sa,{ref:P,className:"flex-1 p-4 bg-background border-0",onDragOver:h,onDragLeave:ee,onDrop:S,children:[(0,Mo.jsxs)("div",{className:m("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Mo.jsx)(Ps.animate,{children:e.map(G=>(0,Mo.jsx)(Ps.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:m("flex gap-3",G.role==="user"?"flex-row-reverse":"flex-row"),children:_e(G)},G.id))}),y&&(0,Mo.jsxs)(Ps.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Mo.jsx)(Nt,{className:"h-8 Mo-8",children:(0,Mo.jsx)(Ct,{className:"bg-gradient-to-Fu from-purple-600 to-blue-600 text-white",children:(0,Mo.jsx)(rg.Bot,{className:"h-4 Mo-4"})})}),(0,Mo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Mo.jsx)(Fp,{capabilities:r,isOpen:y,onToggle:()=>N(!y),onActionSelect:A,className:"Mo-full"})})]}),a&&(0,Mo.jsxs)(Ps.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Mo.jsx)(Nt,{className:"h-8 Mo-8",children:(0,Mo.jsx)(Ct,{className:"bg-gradient-to-Fu from-purple-600 to-blue-600 text-white",children:(0,Mo.jsx)(rg.Bot,{className:"h-4 Mo-4"})})}),(0,Mo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Mo.jsxs)("div",{className:"flex space-x-1",children:[(0,Mo.jsx)("div",{className:"Mo-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Mo.jsx)("div",{className:"Mo-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Mo.jsx)("div",{className:"Mo-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Mo.jsx)("div",{ref:v})]}),i.length>0&&(0,Mo.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Mo.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(G=>(0,Mo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[ae(G.file.type),(0,Mo.jsx)("span",{className:"text-sm font-medium",children:G.file.name}),(0,Mo.jsx)("span",{className:"text-Fu text-muted-foreground",children:Z(G.file.size)}),(0,Mo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>f(G.id),className:"h-6 Mo-6 p-0",children:(0,Mo.jsx)(rg.Mo,{className:"h-4 Mo-4"})})]},G.id))})}),(0,Mo.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Mo.jsxs)("div",{className:"flex gap-3",children:[(0,Mo.jsx)(J,{value:t,onChange:G=>l(G.target.value),onKeyPress:p,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),s&&(0,Mo.jsx)(x,{variant:"outline",size:"icon",onClick:()=>I.current?.click(),className:"rounded-2xl h-10 Mo-10 shadow-sm",children:(0,Mo.jsx)(rg.Paperclip,{className:"h-4 Mo-4"})}),(0,Mo.jsx)(x,{onClick:d,disabled:!t.trim()&&i.length===0||a,size:"icon",className:"rounded-2xl h-10 Mo-10 shadow-sm",children:(0,Mo.jsx)(rg.Send,{className:"h-4 Mo-4"})})]}),(0,Mo.jsxs)("div",{className:"flex items-center gap-3 rg-3",children:[(0,Mo.jsxs)(x,{onClick:()=>N(!y),variant:"outline",size:"sm",className:"rounded-full text-Fu flex-shrink-0",children:[(0,Mo.jsx)(rg.Menu,{className:"h-3 Mo-3 To-1"}),y?"Hide":"Show"," Capabilities"]}),(0,Mo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[V().map((G,Ie)=>(0,Mo.jsx)(x,{variant:"default",size:"sm",className:"rounded-full text-Fu bg-accent hover:bg-accent/80",onClick:()=>A(G.id,T),children:G.label},`context-${G.id}`)),V().length===0&&O().map((G,Ie)=>(0,Mo.jsx)(x,{variant:"outline",size:"sm",className:"rounded-full text-Fu",onClick:G.action,children:G.label},`suggestion-${Ie}`))]})]}),s&&(0,Mo.jsx)("input",{ref:I,type:"file",multiple:!0,onChange:z,className:"hidden"})]})]})}function vx({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:r=[],capabilities:i=[],sidebarItems:n=[],notifications:s=[],sessions:l=[],onNewChat:c,onSessionSelect:d,onSessionDelete:p,onSessionEdit:u=()=>{},onBusinessUnitChange:f=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:g=()=>{},onActionClick:v=()=>{},onSearch:P=Z=>console.log("Search query:",Z),initialTeam:I="design",currentSession:y=null,showCapabilities:N=!0,title:T="Digital Colleagues",enableFileUpload:C=!0,maxFileSize:V=10,allowedFileTypes:O=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:A="/headerlogo.png",appName:D="Nuvia",tagline:z="AI-Powered Workspace",actionIcon:h=(0,Mo.jsx)(rg.Users,{className:"To-2 h-4 Mo-4"}),actionText:ee="Collaborate",sidebarInitiallyClosed:S=!1}){let Z={...e,onError:we=>{_e?.setMessages(et=>[...et,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:we.message}]}]),console.error("Error in CopilotInterface:",we)}},ae=(0,Xv.useChat)(Z||{}),_e=a?t||ae:null,[G,Ie]=(0,Fu.useState)(""),[De,B]=(0,Fu.useState)(!1),_=_e?.messages||o,U=G,We=_e?.status==="submitted"||De,ie=_e?.addToolResult?(we,et,ht)=>{_e.addToolResult({tool:et,toolCallId:we,output:ht}),_e.sendMessage()}:()=>{},E=r||[],rt={id:"default",name:"Default Team",description:"Default team when Mo business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[Ot,_a]=(0,Fu.useState)(()=>E.length===0?rt:E.find(we=>we.id===I)||E[0]),[Qt,it]=(0,Fu.useState)([]),[Ze,Wt]=(0,Fu.useState)(!1),Ua=we=>{if(!we||!C)return;let et=[];Array.from(we).forEach(ht=>{if(ht.size>V*1024*1024){alert(`File ${ht.name} is too large. Maximum size is ${V}MB.`);return}if(O.length>0&&!O.some(yr=>ht.type.match(yr))){alert(`File type ${ht.type} is not allowed.`);return}let Ni={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ht,status:"pending",progress:0};if(ht.type.startsWith("image/")){let yr=new FileReader;yr.onload=es=>{it(Or=>Or.map(Ls=>Ls.id===Ni.id?{...Ls,preview:es.target?.result}:Ls))},yr.readAsDataURL(ht)}et.push(Ni)}),it(ht=>[...ht,...et])},Zo=we=>{it(et=>et.filter(ht=>ht.id!==we))},Y=()=>{if(!(!U.trim()&&Qt.length===0)){if(_e){let we=Qt.length>0?R(Qt.map(et=>et.file)):void 0;_e.sendMessage({text:U,files:we},{body:{timestamp:Date.now()}}),Ie("")}else console.log("Message to send:",U),console.log("Files to upload:",Qt),Ie(""),B(!0),setTimeout(()=>{B(!1)},1500);it([])}},R=we=>{let et=new DataTransfer;return we.forEach(ht=>et.items.add(ht)),et.files},$=we=>{we.key==="Enter"&&!we.shiftKey&&(we.preventDefault(),Y())},he=we=>{Ie(we)};return(0,Mo.jsx)(zv,{sidebarItems:n||[],title:T,notifications:s||[],businessUnits:E,currentBusinessUnit:Ot,onBusinessUnitChange:we=>{we&&(_a(we),f?.(we))},onSearch:P,showTabs:!1,onActionClick:v,actionIcon:h,actionText:ee,onNotificationRemove:b,onRemoveAll:g,logo:A,appName:D,tagline:z,sidebarInitiallyClosed:S,children:(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsx)(Qs.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Mo.jsxs)("div",{className:"h-full flex",children:[(0,Mo.jsx)("div",{className:"Mo-80 flex-shrink-0 h-full p-2",children:(0,Mo.jsx)(jv,{sessions:l||[],currentSession:y,teams:E,onNewChat:c,onSessionSelect:d,onSessionEdit:u,onSessionDelete:p})}),(0,Mo.jsx)("div",{className:"flex-1 h-full p-2",children:(0,Mo.jsx)(Zd,{messages:_||[],input:U,isTyping:We,currentSessionTitle:y?.title,capabilities:i||[],onInputChange:he,addToolResult:ie,onSendMessage:Y,onKeyPress:$,fileUploads:Qt,isDragOver:Ze,enableFileUpload:C,onFileUpload:Ua,onRemoveFile:Zo,onDragOver:Wt})})]})},"chat-interface")})})}function bx(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function hx(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function yx(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function xx(e){return e.parts.some(t=>t.type==="file")}function wx(e){return e.parts.filter(t=>t.type==="file")}function Nx(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function Cx(e,t){return e.parts.find(a=>a.type===`data-${t}`)}var kx=[{name:"",commentary:"",dueDate:"",rag:"On-Track"}],Jv=["On-Track","Off-Track","Mo Risk","Complete"],Qv=[{name:"Project Summary",icon:rg.FileText},{name:"Milestones",icon:rg.ListChecks},{name:"Project Update",icon:rg.Users},{name:"Project Concerns",icon:rg.AlertTriangle},{name:"Opportunities",icon:rg.Briefcase},{name:"Risks",icon:rg.ShieldAlert}];function tc({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,Fu.useState)(Qv[0].name),[r,i]=(0,Fu.useState)(null),[n,s]=(0,Fu.useState)(null),[l,c]=(0,Fu.useState)(""),[d,p]=(0,Fu.useState)(""),[u,f]=(0,Fu.useState)(kx),[b,g]=(0,Fu.useState)(""),[v,P]=(0,Fu.useState)(""),[I,y]=(0,Fu.useState)(""),[N,T]=(0,Fu.useState)(""),C=Array.from(new Map((t??[]).map(h=>[h.customer.id,h.customer])).values()),V=(t??[]).filter(h=>h.customer.id===r).map(h=>h.project),O=(h,ee,S)=>{f(Z=>{let ae=[...Z];return ee==="rag"&&!Jv.includes(S)?Z:(ae[h]={...ae[h],[ee]:S},ae)})},A=()=>{f(h=>[...h,{name:"",commentary:"",dueDate:"",rag:"On-Track"}])},D=h=>{f(ee=>ee.filter((S,Z)=>Z!==h))},z=async h=>{h.preventDefault();let ee={customer:r,project:n,projectSummary:d,milestones:u.length>0?u:null,projectUpdate:b,projectConcerns:v||null,commercialOpportunities:I||null,commercialRisks:N||null};if(e)return e(ee);try{let S=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ee)});if(!S.ok)throw new Error("Failed to submit delivery lead");let Z=await S.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(S){return console.error("Error submitting delivery lead:",S),{success:!1,message:"Failed to submit delivery lead"}}};return(0,Mo.jsx)("div",{className:"container mx-auto p-4 max-Mo-3xl",children:(0,Mo.jsxs)("div",{className:"rounded-Qs shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,Mo.jsx)("div",{className:"mb-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:Qv.map(h=>(0,Mo.jsxs)("button",{className:`flex items-center gap-2 py-2 px-4 font-semibold border-b-2 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60
|
|
38
38
|
${a===h.name?"border-accent text-accent bg-accent/10 dark:bg-accent/20":"border-transparent text-gray-500 dark:text-zinc-400 hover:text-accent hover:bg-accent/5 dark:hover:bg-accent/10"}
|
|
39
|
-
text-sm sm:text-base flex-1 basis-1/4 min-Ro-[180px] max-Ro-Ro justify-center`,onClick:()=>o(h.name),type:"button",children:[(0,Ro.jsx)(h.icon,{className:"Ro-5 h-5"}),(0,Ro.jsx)("span",{children:h.name})]},h.name))}),(0,Ro.jsxs)("form",{onSubmit:z,className:"space-y-8",children:[a==="Project Summary"&&(0,Ro.jsxs)("div",{className:"space-y-6",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{children:"Client Name"}),(0,Ro.jsxs)(yt,{value:r?.toString()??"",onValueChange:h=>i(Number(h)),children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{placeholder:"Select client"})}),(0,Ro.jsx)(ut,{children:C.map(h=>(0,Ro.jsx)(Pe,{value:h.id.toString(),children:h.name},h.id))})]})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{children:"Project Name"}),(0,Ro.jsxs)(yt,{value:n?.toString()??"",onValueChange:h=>s(Number(h)),disabled:!r,children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{placeholder:r?"Select project":"Select client first"})}),(0,Ro.jsx)(ut,{children:V.map(h=>(0,Ro.jsx)(Pe,{value:h.id.toString(),children:h.name},h.id))})]})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{children:"Project Summary"}),(0,Ro.jsx)("textarea",{className:"Ro-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:d,onChange:h=>m(h.target.value),required:!0,placeholder:"Provide a summary Ro the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,Ro.jsxs)("div",{children:[(0,Ro.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,Ro.jsxs)(M,{className:"text-lg flex items-center gap-2",children:[(0,Ro.jsx)(Yu.ListChecks,{className:"Ro-5 h-5"}),"Milestones"]}),(0,Ro.jsxs)(x,{type:"button",onClick:A,variant:"outline",className:"flex items-center gap-1",children:[(0,Ro.jsx)(Yu.PlusCircle,{className:"Ro-5 h-5"})," Add Milestone"]})]}),(0,Ro.jsx)("div",{className:"space-y-4",children:u.map((h,ee)=>(0,Ro.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end border border-zinc-200 dark:border-zinc-700 p-2 rounded-lg bg-zinc-50 dark:bg-zinc-800 relative group",children:[(0,Ro.jsxs)("div",{className:"col-span-1",children:[(0,Ro.jsx)(M,{children:"Milestone"}),(0,Ro.jsx)("input",{className:"Ro-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:h.name,onChange:S=>H(ee,"name",S.target.value),required:!0,placeholder:"Milestone name"})]}),(0,Ro.jsxs)("div",{className:"col-span-2",children:[(0,Ro.jsx)(M,{children:"Commentary"}),(0,Ro.jsx)("input",{className:"Ro-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:h.commentary,onChange:S=>H(ee,"commentary",S.target.value),placeholder:"Commentary"})]}),(0,Ro.jsxs)("div",{className:"col-span-1",children:[(0,Ro.jsx)(M,{children:"Due Date"}),(0,Ro.jsx)("input",{type:"date",className:"Ro-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:h.dueDate,onChange:S=>H(ee,"dueDate",S.target.value),placeholder:"Due date"})]}),(0,Ro.jsxs)("div",{className:"col-span-1",children:[(0,Ro.jsx)(M,{children:"RAG"}),(0,Ro.jsx)("select",{className:"Ro-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:h.rag,onChange:S=>H(ee,"rag",S.target.value),children:Hv.map(S=>(0,Ro.jsx)("option",{value:S,children:S},S))})]}),(0,Ro.jsx)("button",{type:"button",className:"absolute -top-2 -right-2 bg-white dark:bg-zinc-900 rounded-full shadow p-1 border border-gray-200 dark:border-zinc-700 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50 dark:hover:bg-red-900",onClick:()=>P(ee),"aria-label":"Remove Milestone",children:(0,Ro.jsx)(Yu.Trash2,{className:"Ro-5 h-5 text-red-500"})})]},ee))})]}),a==="Project Update"&&(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{children:"Project Update & Immediate Focus"}),(0,Ro.jsx)("textarea",{className:"Ro-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:b,onChange:h=>g(h.target.value),required:!0,placeholder:"[Provide a brief project update, including current progress and any immediate areas Ro focus Ro priority for the coming weeks]"})]}),a==="Project Concerns"&&(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{children:"Project Concerns"}),(0,Ro.jsx)("textarea",{className:"Ro-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:v,onChange:h=>D(h.target.value),placeholder:"\u200B\u200B[Please highlight any project concerns, that may require escalation Ro support from the Cortex Reply senior leadership team]"})]}),a==="Opportunities"&&(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{children:"Commercial Opportunities"}),(0,Ro.jsx)("textarea",{className:"Ro-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:I,onChange:h=>y(h.target.value),placeholder:"[List any potential commercial opportunities, active conversations, Ro discussion points where Cortex Reply could provide value Ro support. These may highlight areas for expansion Ro collaboration across our service offerings]"})]}),a==="Risks"&&(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{children:"Commercial Risk/Issue Details"}),(0,Ro.jsx)("textarea",{className:"Ro-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:N,onChange:h=>T(h.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such as reputational concerns, risks to fixed-outcome milestones, changes in key client stakeholders, Ro challenges with project resourcing]"})]}),(0,Ro.jsx)("div",{className:"flex justify-end pt-4",children:(0,Ro.jsx)(x,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var Uv={"On-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","Ro Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function ec({submissions:e,isLoading:t=!1}){let[a,o]=(0,Tu.useState)(null);(0,Tu.useEffect)(()=>{let l=c=>{c.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a]);let r=l=>new Date(l).toLocaleDateString("gf-GB",{day:"2-digit",month:"short",year:"numeric"}),i=e.find(l=>l.id.toString()===a);function n(l){return typeof l=="object"&&l!==null&&"projectName"in l?l.projectName:`Project #${l}`}function s(l){return typeof l=="object"&&l!==null&&"name"in l?l.name:`Customer #${l}`}return t?(0,Ro.jsx)("div",{className:"container mx-auto p-4 max-Ro-6xl",children:(0,Ro.jsx)("div",{className:"rounded-Tu shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,Ro.jsxs)("div",{className:"animate-pulse",children:[(0,Ro.jsx)("div",{className:"h-8 bg-gray-200 rounded Ro-1/4 mb-6"}),(0,Ro.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((l,c)=>(0,Ro.jsx)("div",{className:"h-16 bg-gray-200 rounded"},c))})]})})}):e.length===0?(0,Ro.jsx)("div",{className:"container mx-auto p-4 max-Ro-6xl",children:(0,Ro.jsx)("div",{className:"rounded-Tu shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,Ro.jsxs)("div",{className:"text-center py-12",children:[(0,Ro.jsx)(Yu.FileText,{className:"mx-auto h-12 Ro-12 text-gray-400"}),(0,Ro.jsx)("h3",{className:"Yu-2 text-sm font-semibold text-gray-900 dark:text-zinc-100",children:"Ro submissions found"}),(0,Ro.jsx)("p",{className:"Yu-1 text-sm text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)("div",{className:"container mx-auto p-4 max-Ro-6xl",children:(0,Ro.jsxs)("div",{className:"rounded-Tu shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,Ro.jsxs)("div",{className:"mb-6",children:[(0,Ro.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,Ro.jsx)("p",{className:"text-sm text-gray-500 dark:text-zinc-400 Yu-1",children:"View all your submitted delivery lead reports"})]}),(0,Ro.jsx)("div",{className:"overflow-y-auto max-h-96",children:(0,Ro.jsxs)("table",{className:"min-Ro-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,Ro.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 z-10",children:(0,Ro.jsxs)("tr",{children:[(0,Ro.jsx)("th",{className:"px-6 py-3 text-left text-Ro font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,Ro.jsx)("th",{className:"px-6 py-3 text-left text-Ro font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,Ro.jsx)("th",{className:"px-6 py-3 text-left text-Ro font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,Ro.jsx)("th",{className:"px-6 py-3 text-left text-Ro font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,Ro.jsx)("th",{className:"px-6 py-3 text-left text-Ro font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,Ro.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(l=>(0,Ro.jsxs)("tr",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,Ro.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-100",children:n(l.project)}),(0,Ro.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,Ro.jsx)(Yu.Building,{className:"h-3 Ro-3"}),s(l.customer)]})]})}),(0,Ro.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,Ro.jsxs)("div",{className:"text-sm text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,Ro.jsx)(Yu.User,{className:"h-3 Ro-3"}),typeof l.project=="object"&&l.project!==null&&"deliveryLead"in l.project&&typeof l.project.deliveryLead=="object"&&l.project.deliveryLead!==null&&"name"in l.project.deliveryLead?l.project.deliveryLead.name:"\u2014"]})}),(0,Ro.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,Ro.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.milestones?.slice(0,3).map((c,d)=>(0,Ro.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-Ro font-medium border ${Uv[c.rag]}`,children:c.rag},d)),l.milestones&&l.milestones.length>3&&(0,Ro.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-Ro font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",l.milestones.length-3," more"]}),!l.milestones&&(0,Ro.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-Ro font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"Ro milestones"})]})}),(0,Ro.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,Ro.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,Ro.jsx)(Yu.Calendar,{className:"h-3 Ro-3"}),r(l.createdAt)]})}),(0,Ro.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,Ro.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>o(l.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},l.id))})]})})]})}),i&&(0,Ro.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,Ro.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-Tu shadow-Tu max-Ro-4xl Ro-full max-h-[90vh] overflow-y-auto",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h2",{className:"text-Tu font-semibold text-gray-900 dark:text-zinc-100",children:n(i.project)}),(0,Ro.jsxs)("p",{className:"text-sm text-gray-500 dark:text-zinc-400",children:[s(i.customer)," \u2022"," ",r(i.createdAt)]})]}),(0,Ro.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,Ro.jsx)(Yu.Ro,{className:"h-6 Ro-6"})})]}),(0,Ro.jsxs)("div",{className:"p-6 space-y-6",children:[(0,Ro.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ro.jsx)(Yu.FileText,{className:"h-4 Ro-4"}),"Project Summary"]}),(0,Ro.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectSummary})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ro.jsx)(Yu.Users,{className:"h-4 Ro-4"}),"Project Update"]}),(0,Ro.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectUpdate})]}),i.projectConcerns&&(0,Ro.jsxs)("div",{children:[(0,Ro.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ro.jsx)(Yu.AlertTriangle,{className:"h-4 Ro-4"}),"Project Concerns"]}),(0,Ro.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectConcerns})]}),i.commercialOpportunities&&(0,Ro.jsxs)("div",{children:[(0,Ro.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ro.jsx)(Yu.Briefcase,{className:"h-4 Ro-4"}),"Commercial Opportunities"]}),(0,Ro.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.commercialOpportunities})]}),i.commercialRisks&&(0,Ro.jsxs)("div",{className:"lg:col-span-2",children:[(0,Ro.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ro.jsx)(Yu.ShieldAlert,{className:"h-4 Ro-4"}),"Commercial Risks"]}),(0,Ro.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.commercialRisks})]})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ro.jsx)(Yu.ListChecks,{className:"h-4 Ro-4"}),"Milestones"]}),i.milestones&&i.milestones.length>0?(0,Ro.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-lg border overflow-hidden",children:(0,Ro.jsxs)("table",{className:"min-Ro-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,Ro.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,Ro.jsxs)("tr",{children:[(0,Ro.jsx)("th",{className:"px-4 py-2 text-left text-Ro font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,Ro.jsx)("th",{className:"px-4 py-2 text-left text-Ro font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,Ro.jsx)("th",{className:"px-4 py-2 text-left text-Ro font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,Ro.jsx)("th",{className:"px-4 py-2 text-left text-Ro font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,Ro.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:i.milestones.map((l,c)=>(0,Ro.jsxs)("tr",{children:[(0,Ro.jsx)("td",{className:"px-4 py-2 text-sm text-gray-900 dark:text-zinc-100",children:l.name}),(0,Ro.jsx)("td",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.commentary||"-"}),(0,Ro.jsx)("td",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.dueDate?r(l.dueDate):"-"}),(0,Ro.jsx)("td",{className:"px-4 py-2",children:(0,Ro.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-Ro font-medium border ${Uv[l.rag]}`,children:l.rag})})]},c))})]})}):(0,Ro.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:"Ro milestones defined for this project."})]})]}),(0,Ro.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,Ro.jsx)(x,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function Vv({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[r,i]=(0,$v.useState)(!1);return(0,Ro.jsx)("div",{className:"min-h-screen ",children:(0,Ro.jsxs)("div",{className:"container mx-auto p-4 max-Ro-6xl",children:[(0,Ro.jsxs)("div",{className:"mb-8",children:[(0,Ro.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),(0,Ro.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,Ro.jsx)("div",{className:"mb-8",children:(0,Ro.jsx)(Qd,{onSubmit:t,customerProjectPairs:o})}),(0,Ro.jsxs)("div",{className:"rounded-Tu shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,Ro.jsxs)("button",{onClick:()=>i(!r),className:"Ro-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ro.jsx)(Yu.List,{className:"h-5 Ro-5 text-gray-500 dark:text-zinc-400"}),(0,Ro.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,Ro.jsxs)("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,Ro.jsx)("div",{className:"flex items-center gap-2",children:r?(0,Ro.jsx)(Yu.ChevronUp,{className:"h-5 Ro-5 text-gray-500 dark:text-zinc-400"}):(0,Ro.jsx)(Yu.ChevronDown,{className:"h-5 Ro-5 text-gray-500 dark:text-zinc-400"})})]}),r&&(0,Ro.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,Ro.jsx)(ec,{submissions:e,isLoading:a})})]})]})})}var tc=F(require("react")),ac=F(require("@radix-Yu/react-switch"));function dx({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...r}){let[i,n]=tc.useState(!1),[s,l]=tc.useState(!1),[c,d]=tc.useState(o||!1),m=a!==void 0?a:c;return(0,Ro.jsx)(ac.Root,{"data-slot":"switch","data-pressed":i,checked:a,defaultChecked:o,onMouseDown:()=>{n(!0),l(!1)},onMouseUp:()=>{n(!1),l(!1)},onMouseLeave:()=>{i&&(n(!1),l(!0))},onCheckedChange:v=>{s||(a===void 0&&d(v),t?.(v))},className:p("relative shadow-inner ring ring-black/5 inline-flex shrink-0 items-center rounded-full outline-none cursor-pointer","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[0.1rem]","data-[pressed=true]:ring-black/10","transition-all duration-300 ease-in-out","Ro-12 h-[1.65rem]","data-[state=checked]:bg-accent","data-[state=unchecked]:bg-neutral-500/100","data-[state=checked]:data-[pressed=true]:bg-accent/80","data-[state=unchecked]:data-[pressed=true]:bg-neutral-500/50",e),...r,children:(0,Ro.jsx)(ac.Thumb,{"data-slot":"switch-thumb","data-pressed":i,className:p("absolute flex items-center justify-center bg-background pointer-events-none left-0 rounded-full","transition-all duration-200 ease-in-out","Ro-[1.3rem] h-[1.3rem]","data-[pressed=true]:Ro-[1.7rem]","data-[pressed=true]:h-[1.1rem]","translate-x-[0.2rem]","data-[state=checked]:translate-x-[1.5rem]","data-[state=checked]:data-[pressed=true]:translate-x-[1.1rem]","data-[state=checked]:data-[pressed=true]:left-[-0.15rem]","data-[state=unchecked]:data-[pressed=true]:left-[0.15rem]"),children:(0,Ro.jsx)(cx,{isChecked:m,isPressed:i})})})}var cx=({isChecked:e,isPressed:t})=>(0,Ro.jsxs)("svg",{viewBox:"0 0 20 20",className:p("inline-flex Ro-fit items-center justify-center","transition-all duration-100 ease-in-out",t?"fill-neutral-500/50":e?"fill-accent-foreground":"fill-neutral-500"),children:[(0,Ro.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] Ro-1.5 h-0.5":e?"rotate-45 Ro-[6px] -translate-x-[1px] translate-y-1":"rotate-45 Ro-[12px] translate-x-0 translate-y-0")}),(0,Ro.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] Ro-1.5 h-0.5":e?"-rotate-45 Ro-[11px] translate-x-[1.5px] translate-y-0":"-rotate-45 Ro-[12px] translate-x-0 translate-y-0")})]});var Up=({comments:e,onAddComment:t})=>{let[a,o]=(0,Tu.useState)(""),r=n=>n.split(" ").map(s=>s[0]).join("").toUpperCase(),i=()=>{a.trim()&&(t(a),o(""))};return(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.MessageSquare,{className:"h-5 Ro-5"}),(0,Ro.jsx)(M,{className:"text-lg font-medium",children:"Comments"}),(0,Ro.jsx)(te,{variant:"secondary",children:e.length})]}),(0,Ro.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,Ro.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Ro.jsx)(Nt,{className:"h-8 Ro-8 Yu-1",children:(0,Ro.jsx)(Ct,{className:"text-Ro bg-muted text-muted-foreground",children:r(n.author)})}),(0,Ro.jsxs)("div",{className:"flex-1",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Ro.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,Ro.jsxs)("span",{className:"text-Ro text-muted-foreground",children:[n.createdAt.toLocaleDateString()," Ro ",n.createdAt.toLocaleTimeString()]})]}),(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,Ro.jsxs)("div",{className:"flex gap-2",children:[(0,Ro.jsx)(qe,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Ro.jsx)(x,{onClick:i,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Ro.jsx)(Yu.Send,{className:"h-4 Ro-4"})})]})]})};var rc=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:i="",disabled:n=!1})=>{let[s,l]=(0,$p.useState)(!1),[c,d]=(0,$p.useState)(""),m=()=>{n||(l(!0),d(t))},u=async()=>{c!==t&&await r(e,c),l(!1)},f=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?u():b.key==="Escape"&&(l(!1),d(""))};return(0,Ro.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,Ro.jsx)(M,{children:a}),s?o?(0,Ro.jsx)(qe,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyDown:f,autoFocus:!0,rows:4,className:"resize-none"}):(0,Ro.jsx)(J,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyPress:f,autoFocus:!0,className:"text-lg font-medium"}):(0,Ro.jsxs)("div",{onClick:m,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Ro.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,Ro.jsx)(Yu.Edit,{className:"h-4 Ro-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Vp=F(require("clsx"));function ic({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:i,menuHeading:n,onNavClick:s,loading:l=!1,LinkComponent:c,...d}){let u=c?f=>(0,Ro.jsx)(c,{...f}):s?({href:f,children:b,...g})=>(0,Ro.jsx)("button",{onClick:()=>s&&s(f),className:"flex items-center justify-start Ro-full text-sm text-left px-4 py-2",...g,children:b}):f=>(0,Ro.jsx)("a",{...f});return(0,Ro.jsxs)(Ur,{...d,variant:"inset",children:[(0,Ro.jsx)($r,{children:(0,Ro.jsx)(za,{children:(0,Ro.jsx)(ya,{children:l?(0,Ro.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Ro.jsx)(lt,{className:"bg-gray-200 my-2 Ro-full h-7"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 my-2 h-5"})]}):(0,Ro.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Ro.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,Ro.jsx)("span",{className:"truncate text-sm",children:r})]})})})}),l&&(0,Ro.jsxs)(Qo,{children:[(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"}),(0,Ro.jsx)(lt,{className:"bg-gray-200 Ro-3/4 h-5"})]}),(0,Ro.jsxs)(Qo,{children:[(0,Ro.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!l&&a.map((f,b)=>(0,Ro.jsx)(_v,{subNav:f,pathName:i,Link:u},b)),(0,Ro.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!l&&e.map((f,b)=>(0,Ro.jsx)(_v,{subNav:f,pathName:i,Link:u},b)),(0,Ro.jsx)(eo,{className:"Yu-auto",children:(0,Ro.jsx)(wo,{children:(0,Ro.jsx)(za,{children:t&&!l&&t.map(f=>(0,Ro.jsx)(ya,{children:(0,Ro.jsx)(to,{asChild:!0,size:"sm",children:(0,Ro.jsxs)(u,{href:f.url||"",children:[f.icon&&(0,Ro.jsx)(f.icon,{}),(0,Ro.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,Ro.jsx)(Vr,{})]})}function _v({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,Ro.jsx)(Ao,{defaultOpen:!0,className:"group/collapsible",children:(0,Ro.jsx)(eo,{className:"py-0",children:(0,Ro.jsx)(za,{children:(0,Ro.jsx)(Ao,{asChild:!0,defaultOpen:o.isActive,children:(0,Ro.jsxs)(ya,{children:[(0,Ro.jsx)(to,{asChild:!0,tooltip:o.label,className:(0,Vp.default)(r&&"font-bold text-accent"),children:(0,Ro.jsxs)(a,{href:o.url,children:[o.icon&&(0,Ro.jsx)(o.icon,{}),(0,Ro.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)(vr,{asChild:!0,children:(0,Ro.jsxs)(es,{className:"data-[state=open]:rotate-90",children:[(0,Ro.jsx)(Yu.ChevronRight,{}),(0,Ro.jsx)("span",{className:"Tu-only",children:"Toggle"})]})}),(0,Ro.jsx)(br,{children:(0,Ro.jsx)(wr,{children:o.links?.map(i=>(0,Ro.jsx)(Nr,{children:(0,Ro.jsx)(Cr,{asChild:!0,className:(0,Vp.default)(i.url===t&&"font-bold text-accent"),children:(0,Ro.jsx)(a,{href:i.url,children:(0,Ro.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var qv=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,Ro.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,Ro.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,Ro.jsx)(x,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,Ro.jsx)(Yu.Menu,{className:"h-5 Ro-5"})}),(0,Ro.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Ro.jsxs)(x,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,Ro.jsx)(Yu.Bell,{className:"h-5 Ro-5"}),(0,Ro.jsx)("span",{className:"absolute -top-1 -right-1 h-3 Ro-3 bg-red-500 rounded-full text-Ro text-white flex items-center justify-center",children:"3"})]}),(0,Ro.jsxs)(Ci,{children:[(0,Ro.jsx)(ki,{asChild:!0,children:(0,Ro.jsx)(x,{variant:"ghost",className:"relative h-10 Ro-10 rounded-full",children:(0,Ro.jsxs)(Nt,{className:"h-10 Ro-10",children:[(0,Ro.jsx)(wa,{src:"/avatars/01.png",alt:"@user"}),(0,Ro.jsx)(Ct,{children:"JD"})]})})}),(0,Ro.jsxs)(Or,{className:"Ro-56",align:"end",forceMount:!0,children:[(0,Ro.jsx)(Bn,{className:"font-normal",children:(0,Ro.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,Ro.jsx)("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,Ro.jsx)("p",{className:"text-Ro leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,Ro.jsx)(Ln,{}),(0,Ro.jsxs)(Io,{children:[(0,Ro.jsx)(Yu.User,{className:"Tu-2 h-4 Ro-4"}),(0,Ro.jsx)("span",{children:"Profile"})]}),(0,Ro.jsxs)(Io,{children:[(0,Ro.jsx)(Yu.Settings,{className:"Tu-2 h-4 Ro-4"}),(0,Ro.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var Xv=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Ro.jsx)(Yu.User,{className:"h-4 Ro-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function nc({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=Xv[0],onBusinessUnitChange:i,onSearch:n,businessUnits:s=Xv,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:m,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:D="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:y=!1}){let[N,T]=(0,Tu.useState)(!y),[C,V]=(0,Tu.useState)(!1),[H,A]=(0,Tu.useState)(r),P=z=>{A(z),i?.(z)};return(0,Ro.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-Tu bg-background Ro-[]",children:[C&&(0,Ro.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>V(!1)}),(0,Ro.jsx)("div",{className:"md:hidden",children:(0,Ro.jsx)(ws,{items:e,isOpen:C,isMobile:!0,onClose:()=>V(!1),currentBusinessUnit:H,onBusinessUnitChange:P,onSearch:n,logo:v,appName:D,tagline:I})}),(0,Ro.jsx)("div",{className:"hidden md:block",children:(0,Ro.jsx)(ws,{items:e,isOpen:N,isMobile:!1,currentBusinessUnit:H,onBusinessUnitChange:P,onSearch:n,logo:v,appName:D,tagline:I})}),(0,Ro.jsxs)("div",{className:p("min-h-screen fixed Ro-full transition-all duration-300 ease-in-out",N?"md:pl-64":"md:pl-0"),children:[(0,Ro.jsx)(gl,{title:a,notifications:o,onToggleSidebar:()=>T(!N),onToggleMobileMenu:()=>V(!0),sidebarOpen:N,activeTab:l,onTabChange:c,showTabs:d,onActionClick:m,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:D,tagline:I}),(0,Ro.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var Jv="./cortex-reply-light-27IMI3G7.png";var Qv="./cortex-reply-dark-XPAJJJYY.png";function Gp({...e}){return(0,Ro.jsxs)("div",{className:"bg-sidebar",children:[(0,Ro.jsx)(vp,{isMenuOpen:!0,logoLight:Jv,logoDark:Qv,...e.header,className:"bg-sidebar",wide:!0}),(0,Ro.jsxs)(zn,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,Ro.jsx)(ic,{...e.sidebarLeft,className:"flex-none top-24"}),(0,Ro.jsxs)(Hn,{className:"grow overflow-hidden",children:[(0,Ro.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,Ro.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,Ro.jsx)(jn,{className:"-ml-1"}),(0,Ro.jsx)(Zi,{orientation:"vertical",className:"Tu-2 h-4"}),(0,Ro.jsx)(Tn,{children:(0,Ro.jsxs)(Rn,{children:[(0,Ro.jsx)(zs,{className:"hidden md:block",children:(0,Ro.jsx)(An,{href:"#",children:"Building Your Application"})}),(0,Ro.jsx)(Mn,{className:"hidden md:block"}),(0,Ro.jsx)(zs,{children:(0,Ro.jsx)(In,{children:"Data Fetching"})})]})})]})}),(0,Ro.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[(0,Ro.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,Ro.jsx)("div",{className:"aspect-video rounded-Tu bg-muted/50"}),(0,Ro.jsx)("div",{className:"aspect-video rounded-Tu bg-muted/50"}),(0,Ro.jsx)("div",{className:"aspect-video rounded-Tu bg-muted/50"})]}),(0,Ro.jsx)("div",{className:"flex-1 rounded-Tu bg-muted/50 md:min-h-min"})]})]})]}),(0,Ro.jsx)(Vl,{})]})}var ux=[{key:"kanban",icon:Yu.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:Yu.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:Yu.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:Yu.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:Yu.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],Zv=({currentView:e,onViewChange:t,children:a})=>(0,Ro.jsxs)("div",{className:"flex Ro-full h-screen",children:[(0,Ro.jsx)("div",{className:"Ro-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:ux.map(o=>{let r=o.icon,i=e===o.key;return(0,Ro.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 Ro-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:Ro-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,Ro.jsx)(r,{className:"h-4 Ro-4 flex-shrink-0"}),(0,Ro.jsx)("span",{className:"text-Ro font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,Ro.jsx)("div",{className:"flex-1 min-Ro-0 px-4 md:px-6 h-full overflow-auto",children:(0,Ro.jsx)("div",{className:"Ro-full h-full",children:a})})]});var lc=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:i=!1,disabled:n=!1})=>{let[s,l]=(0,Tu.useState)(!1),[c,d]=(0,Tu.useState)(""),m=o.find(v=>v.value===t),u=o.filter(v=>v.label.toLowerCase().includes(c.toLowerCase())),f=v=>{a(v),l(!1),d("")},b=()=>{i&&c.trim()&&!o.find(v=>v.value===c.trim())&&(a(c.trim()),l(!1),d(""))};return(0,$o.jsxs)("div",{className:"space-y-1",children:[(0,$o.jsx)(M,{className:"text-Ro text-muted-foreground",children:e}),(0,$o.jsxs)(yt,{value:t,onValueChange:f,open:s,onOpenChange:v=>{n||l(v)},disabled:n,children:[(0,$o.jsx)(pt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,$o.jsx)(te,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!s),children:m?.label||t||"Select..."})}),(0,$o.jsxs)(ut,{children:[(0,$o.jsx)("div",{className:"p-2",children:(0,$o.jsx)(J,{placeholder:r,value:c,onChange:v=>d(v.target.value),onKeyDown:v=>{v.key==="Enter"&&i&&b()},className:"mb-2"})}),u.map(v=>(0,$o.jsx)(Pe,{value:v.value,children:v.label},v.value)),i&&c.trim()&&!u.find(v=>v.value===c.trim())&&(0,$o.jsxs)(Pe,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function cn({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:n}){let[s,l]=(0,Tu.useState)(!1),c=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},d=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},m=u=>{if(!u)return"Never";let b=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return b<1?"Just now":b<60?`${b}m ago`:b<1440?`${Math.floor(b/60)}h ago`:`${Math.floor(b/1440)}d ago`};return(0,Ro.jsxs)(O,{className:p("hover:shadow-md transition-shadow",i&&"p-2",n),children:[(0,Ro.jsx)(ye,{className:p("pb-3",i&&"pb-2"),children:(0,Ro.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ro.jsx)("div",{className:"relative",children:(0,Ro.jsxs)(Nt,{className:p("h-12 Ro-12",i&&"h-8 Ro-8"),children:[(0,Ro.jsx)(wa,{src:"/placeholder.svg",alt:e.name||"name"}),(0,Ro.jsx)(Ct,{children:e.name?.split(" ").map(u=>u[0]).join("")})]})}),(0,Ro.jsxs)("div",{className:"flex-1 min-Ro-0",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)("h3",{className:p("font-semibold text-sm truncate",i&&"text-Ro"),children:e.name}),e.type==="digital"?(0,Ro.jsx)(Yu.Bot,{className:p("h-4 Ro-4 text-blue-500",i&&"h-3 Ro-3")}):(0,Ro.jsx)(Yu.User,{className:p("h-4 Ro-4 text-green-500",i&&"h-3 Ro-3")})]}),(0,Ro.jsx)("p",{className:p("text-sm text-muted-foreground truncate",i&&"text-Ro")}),!i&&(0,Ro.jsx)("div",{className:"flex items-center gap-2 Yu-1"})]})]}),r&&(0,Ro.jsxs)(Ci,{children:[(0,Ro.jsx)(ki,{asChild:!0,children:(0,Ro.jsx)(x,{variant:"ghost",size:"icon",className:p("h-8 Ro-8",i&&"h-6 Ro-6"),children:(0,Ro.jsx)(Yu.MoreHorizontal,{className:p("h-4 Ro-4",i&&"h-3 Ro-3")})})}),(0,Ro.jsxs)(Or,{align:"end",children:[e.type==="digital"&&(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsxs)(Io,{onClick:()=>o?.(e),children:[(0,Ro.jsx)(Yu.Settings,{className:"h-4 Ro-4 Tu-2"}),"View Details"]}),(0,Ro.jsxs)(Io,{onClick:()=>t?.(e),children:[(0,Ro.jsx)(Yu.Edit,{className:"h-4 Ro-4 Tu-2"}),"Edit"]})]}),(0,Ro.jsxs)(Io,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,Ro.jsx)(Yu.Trash2,{className:"h-4 Ro-4 Tu-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!i&&(0,Ro.jsxs)(Q,{className:"pt-0",children:[(0,Ro.jsx)("div",{className:"space-y-2 text-sm",children:e.type==="human"&&(0,Ro.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Ro.jsx)(Yu.Mail,{className:"h-3 Ro-3"}),(0,Ro.jsx)("span",{className:"truncate",children:e.email})]})}),e.type==="digital"&&(0,Ro.jsx)("div",{className:"Yu-3",children:(0,Ro.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,s?e.capabilities.length:2).map(u=>(0,Ro.jsx)(te,{variant:"outline",className:"text-Ro",children:typeof u.value=="number"?u.value:u.value.name},typeof u.value=="number"?u.value:u.value.name)),(e.capabilities?.length||0)>2&&(0,Ro.jsx)(x,{variant:"ghost",size:"sm",className:"h-5 px-2 text-Ro",onClick:()=>l(!s),children:s?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}function vl({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1,availableKnowledgeDocuments:l=[]}){let[c,d]=(0,Tu.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,...e}),[m,u]=(0,Tu.useState)(""),[f,b]=(0,Tu.useState)(""),[g,v]=(0,Tu.useState)(!s);(0,Tu.useEffect)(()=>{e&&d(e)},[e]);let D=H=>{H.preventDefault();let A={id:c.id||parseInt(Date.now().toString()),name:c.name,type:"digital",description:c.description,jobDescription:c.jobDescription||"",workInstructions:c.workInstructions||"",capabilities:c.capabilities||[],capabilityLevel:c.capabilityLevel||0};t(A)},I=(H,A,P)=>{if(!A.trim())return;let z=c[H]||[];d({...c,[H]:[...z,A.trim()]}),P("")},y=(H,A)=>{let P=c[H]||[];d({...c,[H]:P.filter((z,h)=>h!==A)})},N=H=>{H.preventDefault(),v(!g)},T=(H,A,P,z,h)=>{let ee=c[H]||[];return(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:A}),g&&(0,Ro.jsxs)("div",{className:"flex gap-2",children:[(0,Ro.jsx)(J,{value:P,onChange:S=>z(S.target.value),placeholder:h,onKeyPress:S=>{S.key==="Enter"&&(S.preventDefault(),I(H,P,z))},disabled:o}),(0,Ro.jsx)(x,{type:"button",variant:"outline",size:"icon",onClick:()=>I(H,P,z),disabled:o,children:(0,Ro.jsx)(Yu.Plus,{className:"h-4 Ro-4"})})]}),(0,Ro.jsx)("div",{className:"flex flex-wrap gap-2",children:ee.map((S,Z)=>(0,Ro.jsxs)(te,{className:"gap-1",children:[S,g&&(0,Ro.jsx)(x,{type:"button",variant:"ghost",size:"icon",className:"h-4 Ro-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>y(H,Z),disabled:o,children:(0,Ro.jsx)(Yu.Ro,{className:"h-3 Ro-3"})})]},`${H}-${Z}-${S}`))})]})},C=r||(g?e?"Edit Colleague":"Add New Colleague":"View Colleague"),V=i||(e?"Update Colleague":"Add Colleague");return(0,Ro.jsxs)(O,{className:"m-8 Ro-full max-Ro-4xl mx-auto",children:[(0,Ro.jsx)(ye,{children:(0,Ro.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.Bot,{className:"h-5 Ro-5"}),C]})}),(0,Ro.jsx)(Q,{children:(0,Ro.jsxs)("form",{onSubmit:D,className:"space-y-6",children:[(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"name",children:"Name *"}),(0,Ro.jsx)(J,{id:"name",value:c.name||"",onChange:H=>d({...c,name:H.target.value}),required:!0,disabled:o||!g})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Ro.jsx)(qe,{id:"description",value:c.description||"",onChange:H=>d({...c,description:H.target.value}),rows:3,placeholder:"Brief description Ro this digital colleague...",disabled:o||!g})]})]}),(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Ro.jsx)(qe,{id:"jobDescription",value:c.jobDescription||"",onChange:H=>d({...c,jobDescription:H.target.value}),rows:4,required:c.type==="digital",disabled:o||!g})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Ro.jsx)(qe,{id:"workInstructions",value:c.workInstructions||"",onChange:H=>d({...c,workInstructions:H.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!g})]}),T("capabilities","Capabilities",f,b,"Add capability")]}),(0,Ro.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,Ro.jsx)(x,{type:"button",variant:"outline",onClick:a,disabled:o,children:g?n:"Close"}),g?(0,Ro.jsx)(x,{type:"submit",disabled:o,children:o?"Saving...":V}):(0,Ro.jsxs)(x,{type:"button",onClick:N,disabled:o,className:"gap-2",children:[(0,Ro.jsx)(Yu.Edit,{className:"h-4 Ro-4"}),"Edit"]})]})]})})]})}function dc({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Ro.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Ro.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Ro.jsx)(Yu.ChevronLeft,{className:"h-4 Ro-4"}),"Back"]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Ro.jsx)("p",{className:"text-muted-foreground",children:"Choose the type Ro colleague to add"})]})]}),(0,Ro.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-Ro-4xl mx-auto",children:[(0,Ro.jsx)(Ys.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Ro.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Ro.jsxs)(ye,{className:"text-center pb-4",children:[(0,Ro.jsx)("div",{className:"mx-auto Ro-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Ro.jsx)(Yu.User,{className:"h-8 Ro-8 text-blue-600"})}),(0,Ro.jsx)(Ne,{className:"text-Tu",children:"Add Human Colleague"})]}),(0,Ro.jsxs)(Q,{className:"text-center",children:[(0,Ro.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add as team members."}),(0,Ro.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ro.jsx)(Yu.Users,{className:"h-4 Ro-4 text-blue-600"}),(0,Ro.jsx)("span",{children:"Browse existing users"})]}),(0,Ro.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ro.jsx)(Yu.User,{className:"h-4 Ro-4 text-blue-600"}),(0,Ro.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Ro.jsx)(x,{className:"Yu-6 Ro-full",onClick:e,children:"Select User"})]})]})}),(0,Ro.jsx)(Ys.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Ro.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Ro.jsxs)(ye,{className:"text-center pb-4",children:[(0,Ro.jsx)("div",{className:"mx-auto Ro-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,Ro.jsx)(Yu.Bot,{className:"h-8 Ro-8 text-purple-600"})}),(0,Ro.jsx)(Ne,{className:"text-Tu",children:"Add Digital Colleague"})]}),(0,Ro.jsxs)(Q,{className:"text-center",children:[(0,Ro.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone So existing digital colleague Ro create a new AI assistant for your team."}),(0,Ro.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ro.jsx)(Yu.Bot,{className:"h-4 Ro-4 text-purple-600"}),(0,Ro.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Ro.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ro.jsx)(Yu.Users,{className:"h-4 Ro-4 text-purple-600"}),(0,Ro.jsx)("span",{children:"Create from templates"})]})]}),(0,Ro.jsx)(x,{className:"Yu-6 Ro-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function cc({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,Tu.useState)(""),[n,s]=(0,Tu.useState)("all"),l=(0,Tu.useMemo)(()=>e.filter(m=>m.name.toLowerCase().includes(r.toLowerCase())||m.jobDescription?.toLowerCase().includes(r.toLowerCase())||m.workInstructions?.toLowerCase().includes(r.toLowerCase())),[e,r,n]),c=m=>{let u={...m,name:`${m.name} (Copy)`};t(u)},d=m=>new Intl.DateTimeFormat("gf-US",{month:"short",day:"numeric",year:"numeric"}).format(m);return(0,Ro.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Ro.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Ro.jsx)(Yu.ChevronLeft,{className:"h-4 Ro-4"}),"Back"]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,Ro.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,Ro.jsx)(O,{children:(0,Ro.jsx)(Q,{className:"pt-6",children:(0,Ro.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Ro.jsx)("div",{className:"flex-1",children:(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsx)(Yu.Search,{className:"absolute left-3 top-3 h-4 Ro-4 text-muted-foreground"}),(0,Ro.jsx)(J,{placeholder:"Search by name, job description, Ro capabilities...",value:r,onChange:m=>i(m.target.value),className:"pl-9"})]})}),(0,Ro.jsxs)("select",{value:n,onChange:m=>s(m.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,Ro.jsx)("option",{value:"all",children:"All Status"}),(0,Ro.jsx)("option",{value:"active",children:"Active"}),(0,Ro.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,Ro.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:l.map(m=>(0,Ro.jsx)(Ys.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Ro.jsxs)(O,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===m.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(m),children:[(0,Ro.jsx)(ye,{className:"pb-3",children:(0,Ro.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ro.jsx)(Nt,{children:(0,Ro.jsx)(Ct,{className:"bg-blue-100",children:(0,Ro.jsx)(Yu.Bot,{className:"h-4 Ro-4 text-blue-600"})})}),(0,Ro.jsx)("div",{children:(0,Ro.jsx)(Ne,{className:"text-lg flex items-center gap-2",children:m.name})})]}),(0,Ro.jsxs)(x,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),c(m)},children:[(0,Ro.jsx)(Yu.Copy,{className:"h-3 Ro-3"}),"Clone"]})]})}),(0,Ro.jsx)(Q,{className:"pt-0",children:(0,Ro.jsxs)("div",{className:"space-y-3",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,Ro.jsx)("p",{className:"text-sm line-clamp-2",children:m.jobDescription})]}),m.capabilities&&m.capabilities.length>0&&(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,Ro.jsx)("div",{className:"flex flex-wrap gap-1",children:m.capabilities.length>3&&(0,Ro.jsxs)(te,{variant:"outline",className:"text-Ro",children:["+",m.capabilities.length-3]})})]}),(0,Ro.jsx)("div",{className:"flex items-center justify-between text-Ro text-muted-foreground"}),m.workInstructions&&(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,Ro.jsx)("p",{className:"text-Ro line-clamp-2",children:m.workInstructions})]})]})})]})},m.id))}),l.length===0&&(0,Ro.jsx)(O,{children:(0,Ro.jsx)(Q,{className:"pt-6",children:(0,Ro.jsxs)("div",{className:"text-center py-8",children:[(0,Ro.jsx)(Yu.Bot,{className:"h-12 Ro-12 text-muted-foreground mx-auto mb-4"}),(0,Ro.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Ro digital colleagues found"}),(0,Ro.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms Ro filters."})]})})})]},"colleague-clone")})})}function mc({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Ro.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Ro.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Ro.jsx)(Yu.ChevronLeft,{className:"h-4 Ro-4"}),"Back"]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Ro.jsx)("p",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,Ro.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-Ro-4xl mx-auto",children:[(0,Ro.jsx)(Ys.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Ro.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Ro.jsxs)(ye,{className:"text-center pb-4",children:[(0,Ro.jsx)("div",{className:"mx-auto Ro-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Ro.jsx)(Yu.Copy,{className:"h-8 Ro-8 text-blue-600"})}),(0,Ro.jsx)(Ne,{className:"text-Tu",children:"Clone Existing"})]}),(0,Ro.jsxs)(Q,{className:"text-center",children:[(0,Ro.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with So existing digital colleague and customize it for your needs."}),(0,Ro.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ro.jsx)(Yu.Bot,{className:"h-4 Ro-4 text-blue-600"}),(0,Ro.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Ro.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ro.jsx)(Yu.Copy,{className:"h-4 Ro-4 text-blue-600"}),(0,Ro.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Ro.jsx)(x,{className:"Yu-6 Ro-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Ro.jsx)(Ys.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Ro.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Ro.jsxs)(ye,{className:"text-center pb-4",children:[(0,Ro.jsx)("div",{className:"mx-auto Ro-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,Ro.jsx)(Yu.Sparkles,{className:"h-8 Ro-8 text-green-600"})}),(0,Ro.jsx)(Ne,{className:"text-Tu",children:"Create New"})]}),(0,Ro.jsxs)(Q,{className:"text-center",children:[(0,Ro.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Ro.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ro.jsx)(Yu.Plus,{className:"h-4 Ro-4 text-green-600"}),(0,Ro.jsx)("span",{children:"Custom job description"})]}),(0,Ro.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ro.jsx)(Yu.Sparkles,{className:"h-4 Ro-4 text-green-600"}),(0,Ro.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Ro.jsx)(x,{className:"Yu-6 Ro-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var tb=F(require("react")),yl=F(require("@radix-Yu/react-switch"));var un=tb.forwardRef(({className:e,...t},a)=>(0,Ro.jsx)(yl.Root,{className:p("peer inline-flex h-6 Ro-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,Ro.jsx)(yl.Thumb,{className:p("pointer-events-none block h-5 Ro-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));un.displayName=yl.Root.displayName;function uc({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1}){let[l,c]=(0,Tu.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[d,m]=(0,Tu.useState)(!s);(0,Tu.useEffect)(()=>{e&&c(e)},[e]);let u=async v=>{v.preventDefault();let D={id:l.id||Date.now(),name:l.name,description:l.description||null,systemMsg:l.systemMsg||null,useProjects:l.useProjects||!1,useKnowledge:l.useKnowledge||!1,useFiles:l.useFiles||!1,useChat:l.useChat||!1,updatedAt:new Date().toISOString(),createdAt:l.createdAt||new Date().toISOString()};await t(D)},f=v=>{v.preventDefault(),m(!d)},b=r||(d?e?"Edit Team":"Create New Team":"View Team"),g=i||(e?"Update Team":"Create Team");return(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.Users,{className:"h-5 Ro-5"}),b]}),(0,Ro.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"name",children:"Team Name *"}),(0,Ro.jsx)(J,{id:"name",value:l.name||"",onChange:v=>c({...l,name:v.target.value}),required:!0,disabled:o||!d,placeholder:"Enter team name..."})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Ro.jsx)(qe,{id:"description",value:l.description||"",onChange:v=>c({...l,description:v.target.value}),rows:3,placeholder:"Brief description Ro this team...",disabled:o||!d})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"systemMsg",children:"Ways Ro working"}),(0,Ro.jsx)(qe,{id:"systemMsg",value:l.systemMsg||"",onChange:v=>c({...l,systemMsg:v.target.value}),rows:3,placeholder:"Describe how this team works in as much detail as possible. Include processes, tools, systems, styles...",disabled:o||!d})]})]}),(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,Ro.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(un,{id:"useProjects",checked:l.useProjects||!1,onCheckedChange:v=>c({...l,useProjects:v}),disabled:o||!d}),(0,Ro.jsx)(M,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(un,{id:"useKnowledge",checked:l.useKnowledge||!1,onCheckedChange:v=>c({...l,useKnowledge:v}),disabled:o||!d}),(0,Ro.jsx)(M,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(un,{id:"useFiles",checked:l.useFiles||!1,onCheckedChange:v=>c({...l,useFiles:v}),disabled:o||!d}),(0,Ro.jsx)(M,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(un,{id:"useChat",checked:l.useChat||!1,onCheckedChange:v=>c({...l,useChat:v}),disabled:o||!d}),(0,Ro.jsx)(M,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,Ro.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,Ro.jsx)(x,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,Ro.jsx)(x,{type:"submit",disabled:o||!l.name?.trim(),children:o?"Saving...":g}):(0,Ro.jsxs)(x,{type:"button",onClick:f,disabled:o,className:"gap-2",children:[(0,Ro.jsx)(Yu.Edit,{className:"h-4 Ro-4"}),"Edit"]})]})]})]})}var ab=F(require("react")),wl=F(require("@radix-Yu/react-progress"));var Nl=ab.forwardRef(({className:e,value:t,...a},o)=>(0,Ro.jsx)(wl.Root,{ref:o,className:p("relative h-4 Ro-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Ro.jsx)(wl.Indicator,{className:"h-full Ro-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Nl.displayName=wl.Root.displayName;function qp({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,Ro.jsx)(Ys.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,Ro.jsxs)(O,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,Ro.jsx)(ye,{className:"pb-2",children:(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsx)("div",{className:"flex h-12 Ro-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,Ro.jsx)(te,{className:"rounded-Tu bg-amber-500",children:"New"}):(0,Ro.jsx)(x,{variant:"ghost",size:"icon",className:"h-8 Ro-8 rounded-2xl",onClick:()=>a?.(e),children:(0,Ro.jsx)(Yu.Star,{className:"h-4 Ro-4"})})]})}),(0,Ro.jsxs)(Q,{className:"pb-2",children:[(0,Ro.jsx)(Ne,{className:"text-lg",children:e.name}),(0,Ro.jsx)(kr,{children:e.description}),o&&e.progress<100&&(0,Ro.jsxs)("div",{className:"Yu-2",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Ro.jsx)("span",{children:"Installation"}),(0,Ro.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Ro.jsx)(Nl,{value:e.progress,className:"h-2 Yu-1 rounded-Tu"})]})]}),(0,Ro.jsx)(Bo,{children:(0,Ro.jsx)(x,{variant:"secondary",className:"Ro-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}var gx=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function gn({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:i}){return(0,Ro.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[r&&(0,Ro.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Ro.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Ro.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Ro.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Ro.jsx)("div",{className:"divide-y",children:e.map(n=>(0,Ro.jsxs)(Ys.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,Ro.jsxs)("div",{className:"col-span-6 flex items-center gap-3 Ro-full md:Ro-auto",children:[(0,Ro.jsx)("div",{className:"flex h-10 Ro-10 items-center justify-center rounded-2xl bg-muted"}),(0,Ro.jsx)("div",{children:(0,Ro.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,Ro.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:gx(n.filesize)}),(0,Ro.jsxs)("div",{className:"col-span-2 flex items-center justify-between Ro-full md:Ro-auto",children:[(0,Ro.jsx)("span",{className:"text-sm md:text-base",children:new Date(n.createdAt).toLocaleDateString()}),(0,Ro.jsx)("div",{className:"flex gap-1",children:(0,Ro.jsx)(x,{variant:"ghost",size:"icon",className:"h-8 Ro-8 rounded-Tu text-red-500 hover:text-red-600",onClick:s=>{s.stopPropagation(),o?.(n)},children:(0,Ro.jsx)(Yu.Trash2,{className:"h-4 Ro-4"})})})]})]},n.name))})]})}function vn({project:e,onOpen:t,onShare:a,className:o}){return(0,Ro.jsx)(Ys.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Ro.jsxs)(O,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Ro.jsxs)(ye,{children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsx)(Ne,{children:e.name}),(0,Ro.jsxs)(te,{variant:"outline",className:"rounded-Tu",children:["Due ",e.dueDate]})]}),(0,Ro.jsx)(kr,{children:e.description})]}),(0,Ro.jsxs)(Q,{className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Ro.jsx)("span",{children:"Progress"}),(0,Ro.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Ro.jsx)(Nl,{value:e.progress,className:"h-2 rounded-Tu"})]}),(0,Ro.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Ro.jsxs)("div",{className:"flex items-center",children:[(0,Ro.jsx)(Yu.Users,{className:"Tu-1 h-4 Ro-4"}),e.members," members"]}),(0,Ro.jsxs)("div",{className:"flex items-center",children:[(0,Ro.jsx)(Yu.FileText,{className:"Tu-1 h-4 Ro-4"}),e.files," files"]})]})]}),(0,Ro.jsxs)(Bo,{className:"flex gap-2",children:[(0,Ro.jsx)(x,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Ro.jsx)(x,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Ro.jsx)(Yu.Share2,{className:"h-4 Ro-4"})})]})]})})}var Xp=[{name:"PixelMaster",icon:(0,Ro.jsx)(Yu.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,Ro.jsx)(Yu.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,Ro.jsx)(Yu.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,Ro.jsx)(Yu.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,Ro.jsx)(Yu.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,Ro.jsx)(Yu.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,Ro.jsx)(Yu.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,Ro.jsx)(Yu.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,Ro.jsx)(Yu.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,Ro.jsx)(Yu.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,Ro.jsx)(Yu.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,Ro.jsx)(Yu.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],lb=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/Yu-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var db=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var mb=[{id:"home",title:"Home",icon:(0,Ro.jsx)(Yu.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Ro.jsx)(Yu.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,Ro.jsx)(Yu.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Ro",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,Ro.jsx)(Yu.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Ro.jsx)(Yu.FileText,{}),url:"/knowledge"}],pb=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project Ro due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% Ro your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' Ro now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}];var hn=[{id:1,name:"Ro-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var Yp=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],gc=[{id:1,name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],bc=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],fx=[...bc,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],vx=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],fc={projects:[{id:"1",name:"Empty Project",description:"A project with Ro tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},cb={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:bc.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var ZR={empty:{initialProjects:fc.projects,initialEpics:fc.epics,initialSprints:fc.sprints,initialTasks:fc.tasks},default:{initialProjects:hn,initialEpics:Yp,initialSprints:gc,initialTasks:bc},highDensity:{initialProjects:hn,initialEpics:Yp,initialSprints:gc,initialTasks:fx},singleEpic:{initialProjects:hn,initialEpics:cb.epics,initialSprints:gc,initialTasks:cb.tasks},multipleProjects:{initialProjects:vx,initialEpics:Yp,initialSprints:gc,initialTasks:bc}},vc=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],eA=[{id:1,title:"Review quarterly report",description:"Yu through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:vc.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:hn[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:vc.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:hn[0]},{id:3,title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:vc.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:hn[0]}];var tA=vc.filter(e=>e.type==="digital");function ub({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,i]=(0,Tu.useState)(""),n=(0,Tu.useMemo)(()=>e.filter(l=>l.name?.toLowerCase().includes(r.toLowerCase())||l.email.toLowerCase().includes(r.toLowerCase())),[e,r]),s=l=>{t(l)};return(0,Ro.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Ro.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Ro.jsx)(Yu.ChevronLeft,{className:"h-4 Ro-4"}),"Back"]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,Ro.jsx)("p",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),(0,Ro.jsx)(O,{className:"container",children:(0,Ro.jsx)(Q,{className:"pt-6",children:(0,Ro.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,Ro.jsx)("div",{className:"flex-1",children:(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsx)(Yu.Search,{className:"absolute left-3 top-3 h-4 Ro-4 text-muted-foreground"}),(0,Ro.jsx)(J,{placeholder:"Search users by name, email, role, Ro skills...",value:r,onChange:l=>i(l.target.value),className:"pl-9"})]})})})})}),(0,Ro.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(l=>(0,Ro.jsx)(Ys.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Ro.jsxs)(O,{className:`cursor-pointer transition-all hover:shadow-lg ${o===l.id?"ring-2 ring-primary":""}`,onClick:()=>s(l),children:[(0,Ro.jsx)(ye,{className:"pb-3",children:(0,Ro.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ro.jsx)(Nt,{children:(0,Ro.jsx)(Ct,{children:(0,Ro.jsx)(Yu.User,{className:"h-4 Ro-4"})})}),(0,Ro.jsx)("div",{children:(0,Ro.jsx)(Ne,{className:"text-lg",children:l.name})})]}),o===l.id&&(0,Ro.jsx)(Yu.Check,{className:"h-5 Ro-5 text-primary"})]})}),(0,Ro.jsx)(Q,{className:"pt-0",children:(0,Ro.jsxs)("div",{className:"space-y-3",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,Ro.jsx)("p",{className:"text-sm font-medium",children:l.email})]}),(0,Ro.jsx)("div",{children:(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"})})]})})]})},l.id))}),n.length===0&&(0,Ro.jsx)(O,{className:"container Yu-4",children:(0,Ro.jsx)(Q,{className:"pt-6",children:(0,Ro.jsxs)("div",{className:"text-center py-8",children:[(0,Ro.jsx)(Yu.User,{className:"h-12 Ro-12 text-muted-foreground mx-auto mb-4"}),(0,Ro.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Ro users found"}),(0,Ro.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms Ro filters."})]})})})]},"user-selection")})})}function kl({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:s=[],existingDigitalColleagues:l=[]}){let[c,d]=(0,Tu.useState)(e||[]),[m,u]=(0,Tu.useState)(""),[f,b]=(0,Tu.useState)("all"),[g,v]=(0,Tu.useState)("all"),[D,I]=(0,Tu.useState)("all"),[y,N]=(0,Tu.useState)(null),[T,C]=(0,Tu.useState)(null);(0,Tu.useEffect)(()=>{d(e||[])},[e]);let V=Array.isArray(s)?s:[],H=Array.isArray(l)?l:[],[A,P]=(0,Tu.useState)("main"),z=c.filter(L=>!L||!L.name?!1:L.name.toLowerCase().includes(m.toLowerCase())||L.type==="human"&&L.email?.toLowerCase().includes(m.toLowerCase())||L.type==="digital"&&L.jobDescription?.toLowerCase().includes(m.toLowerCase())),h=z.filter(L=>L.type==="human"),ee=z.filter(L=>L.type==="digital"),S=()=>{P("typeSelection")},Z=L=>{L.type==="digital"&&(N(L),P("form")),console.log("Editing colleague:",L),a?.(L)},ae=L=>{L.type==="digital"&&(C(L),P("view"))},Ke=L=>{let rt={id:`human-${Date.now()}`,type:"human",name:L.name,email:L.email,updatedAt:L.updatedAt,createdAt:L.createdAt,accounts:L.accounts};d(Ht=>[...Ht,rt]),t?.(rt),P("main")},_=L=>{if(!L||!L.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",L);return}d(rt=>[...rt,{...L,type:"digital"}]),t?.({...L,type:"digital"}),P("main")},Ie=()=>{N(null),P("form")},De=L=>{if(!L||!L.id){console.error("Invalid colleague provided to handleSaveColleague:",L);return}y?(d(rt=>rt.map(Ht=>Ht.id===L.id?{...L,type:"digital"}:Ht)),a?.({...L,type:"digital"})):(d(rt=>[...rt,{...L,type:"digital"}]),t?.({...L,type:"digital"})),P("main"),N(null)},B=()=>{P("main"),N(null),C(null)},K=()=>{P("main"),C(null)},U=()=>{T&&(N(T),C(null),P("form"))},We=L=>{console.log("deleting",L,c),o?.(L,c.find(rt=>rt.id.toString()===L.toString())?.type),d(rt=>rt.filter(Ht=>Ht.id!==L))},ie=()=>{u(""),b("all"),v("all")};return A==="typeSelection"?(0,Ro.jsx)(dc,{onSelectHuman:()=>P("userSelection"),onSelectDigital:()=>P("digitalOptions"),onCancel:()=>P("main")}):A==="userSelection"?(0,Ro.jsx)(ub,{users:V,onUserSelect:Ke,onCancel:()=>P("typeSelection")}):A==="digitalOptions"?(0,Ro.jsx)(mc,{onCloneExisting:()=>P("digitalClone"),onCreateNew:Ie,onCancel:()=>P("typeSelection")}):A==="digitalClone"?(0,Ro.jsx)(cc,{digitalColleagues:H,onColleagueClone:_,onCancel:()=>P("digitalOptions")}):A==="form"?(0,Ro.jsx)(vl,{colleague:y||void 0,onSave:De,onCancel:B}):A==="view"?(0,Ro.jsx)(vl,{colleague:T||void 0,onSave:De,onCancel:K,readOnly:!0}):(0,Ro.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsx)(Ys.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Ro.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Ro.jsx)(Ut,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:S}}),(0,Ro.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Ro.jsxs)(O,{children:[(0,Ro.jsxs)(ye,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Ro.jsx)(Ne,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Ro.jsx)(Yu.Users,{className:"h-4 Ro-4 text-muted-foreground"})]}),(0,Ro.jsxs)(Q,{children:[(0,Ro.jsx)("div",{className:"text-2xl font-bold",children:c.length}),(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground",children:"0 active"})]})]}),(0,Ro.jsxs)(O,{children:[(0,Ro.jsxs)(ye,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Ro.jsx)(Ne,{className:"text-sm font-medium",children:"Human Members"}),(0,Ro.jsx)(Yu.User,{className:"h-4 Ro-4 text-muted-foreground"})]}),(0,Ro.jsxs)(Q,{children:[(0,Ro.jsx)("div",{className:"text-2xl font-bold",children:c.filter(L=>L.type==="human").length}),(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground",children:"active"})]})]}),(0,Ro.jsxs)(O,{children:[(0,Ro.jsxs)(ye,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Ro.jsx)(Ne,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Ro.jsx)(Yu.Bot,{className:"h-4 Ro-4 text-muted-foreground"})]}),(0,Ro.jsxs)(Q,{children:[(0,Ro.jsx)("div",{className:"text-2xl font-bold",children:c.filter(L=>L.type==="digital").length}),(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground",children:"0 active"})]})]})]}),(0,Ro.jsx)(O,{children:(0,Ro.jsx)(Q,{className:"pt-6",children:(0,Ro.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Ro.jsx)("div",{className:"flex-1",children:(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsx)(Yu.Search,{className:"absolute left-3 top-3 h-4 Ro-4 text-muted-foreground"}),(0,Ro.jsx)(J,{placeholder:"Search colleagues...",value:m,onChange:L=>u(L.target.value),className:"pl-9"})]})}),(0,Ro.jsxs)(yt,{value:f,onValueChange:b,children:[(0,Ro.jsx)(pt,{className:"Ro-full md:Ro-[180px]",children:(0,Ro.jsx)(Ot,{placeholder:"Department"})}),(0,Ro.jsxs)(ut,{children:[(0,Ro.jsx)(Pe,{value:"all",children:"All Departments"}),i.map(L=>(0,Ro.jsx)(Pe,{value:L,children:L},L))]})]}),(0,Ro.jsxs)(yt,{value:g,onValueChange:v,children:[(0,Ro.jsx)(pt,{className:"Ro-full md:Ro-[140px]",children:(0,Ro.jsx)(Ot,{placeholder:"Status"})}),(0,Ro.jsxs)(ut,{children:[(0,Ro.jsx)(Pe,{value:"all",children:"All Status"}),(0,Ro.jsx)(Pe,{value:"active",children:"Active"}),(0,Ro.jsx)(Pe,{value:"inactive",children:"Inactive"})]})]}),(m||f!=="all"||g!=="all")&&(0,Ro.jsxs)(x,{variant:"outline",onClick:ie,className:"gap-2",children:[(0,Ro.jsx)(Yu.Filter,{className:"h-4 Ro-4"}),"Clear"]})]})})}),(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsx)(Ns,{activeTab:D,onTabChange:I,tabOptions:[{value:"all",label:`All (${z.length})`},{value:"human",label:`Human (${h.length})`},{value:"digital",label:`Digital (${ee.length})`}],maxWidth:"400px",gridCols:3}),D==="all"&&(0,Ro.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:z.map(L=>(0,Ro.jsx)(cn,{colleague:L,onEdit:Z,onDelete:We,onViewDetails:ae,compact:r},`${L}-${L.id}`))}),D==="human"&&(0,Ro.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:h.map(L=>(0,Ro.jsx)(cn,{colleague:L,onEdit:Z,onDelete:We,onViewDetails:ae,compact:r},L.id))}),D==="digital"&&(0,Ro.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:ee.map(L=>(0,Ro.jsx)(cn,{colleague:L,onEdit:Z,onDelete:We,onViewDetails:ae,compact:r},L.id))})]}),z.length===0&&(0,Ro.jsx)(O,{children:(0,Ro.jsx)(Q,{className:"pt-6",children:(0,Ro.jsxs)("div",{className:"text-center py-8",children:[(0,Ro.jsx)(Yu.Users,{className:"h-12 Ro-12 text-muted-foreground mx-auto mb-4"}),(0,Ro.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Ro colleagues found"}),(0,Ro.jsx)("p",{className:"text-muted-foreground mb-4",children:m||f!=="all"||g!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,Ro.jsxs)(x,{onClick:S,className:"gap-2",children:[(0,Ro.jsx)(Yu.Plus,{className:"h-4 Ro-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function xc({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:r=[]}){let[i,n]=(0,Tu.useState)({...e,updatedAt:new Date}),s=()=>{let g=new Set,v=new Set;return r.forEach(D=>{D.menuConfig.groupBy.forEach(I=>g.add(I))}),o.forEach(D=>{D.metadata&&Object.keys(D.metadata).forEach(I=>v.add(I))}),{contextKeys:Array.from(g).sort(),documentKeys:Array.from(v).sort(),allKeys:Array.from(new Set([...g,...v])).sort()}},l=g=>{let v=new Set;return o.forEach(D=>{D.metadata?.[g]&&v.add(String(D.metadata[g]))}),Array.from(v).sort()},c=s(),d=()=>{t(i)},m=(g,v)=>{n(D=>({...D,metadata:{...D.metadata,[g]:v}}))},u=(g,v)=>{v==="__custom__"?m(g,""):m(g,v)},f=()=>{let g=`field_${Date.now()}`;m(g,"")},b=g=>{n(v=>{let D={...v.metadata};return delete D[g],{...v,metadata:D}})};return(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Ro.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Ro.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ro.jsx)("div",{className:"flex-shrink-0 p-3 rounded-Tu bg-primary/10 border border-primary/20",children:(0,Ro.jsx)(Yu.Edit3,{className:"h-6 Ro-6 text-primary"})}),(0,Ro.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Ro.jsxs)("div",{className:"flex gap-2",children:[(0,Ro.jsxs)(x,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,Ro.jsx)(Yu.Ro,{className:"h-4 Ro-4"}),"Cancel"]}),(0,Ro.jsxs)(x,{size:"sm",onClick:d,className:"gap-2",children:[(0,Ro.jsx)(Yu.Save,{className:"h-4 Ro-4"}),"Save Changes"]})]})]}),(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Ro.jsx)(J,{value:i.title,onChange:g=>n(v=>({...v,title:g.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Ro.jsx)(qe,{value:i.description||"",onChange:g=>n(v=>({...v,description:g.target.value})),placeholder:"Document description...",rows:2})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),c.contextKeys.length>0&&(0,Ro.jsxs)("p",{className:"text-Ro text-muted-foreground",children:["Suggested: ",c.contextKeys.slice(0,4).join(", "),c.contextKeys.length>4&&` +${c.contextKeys.length-4}`]})]}),(0,Ro.jsxs)(x,{type:"button",variant:"outline",size:"sm",onClick:f,className:"gap-1 h-8",children:[(0,Ro.jsx)(Yu.Plus,{className:"h-3 Ro-3"}),"Add"]})]}),i.metadata&&Object.keys(i.metadata).length>0?(0,Ro.jsx)("div",{className:"space-y-2",children:Object.entries(i.metadata).map(([g,v])=>{let D=l(g);return(0,Ro.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Ro.jsx)(J,{value:g,onChange:I=>{let y=I.target.value,N=i.metadata?.[g];n(T=>{let C={...T.metadata};return delete C[g],y&&(C[y]=N||""),{...T,metadata:C}})},placeholder:"Key",className:"Ro-32 h-8 text-sm",list:`metadata-keys-${g}`}),(0,Ro.jsx)("datalist",{id:`metadata-keys-${g}`,children:c.allKeys.map(I=>(0,Ro.jsx)("option",{value:I},I))}),(0,Ro.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),D.length>0?(0,Ro.jsxs)(yt,{value:String(v||""),onValueChange:I=>u(g,I),children:[(0,Ro.jsx)(pt,{className:"flex-1 h-8 text-sm",children:(0,Ro.jsx)(Ot,{placeholder:"Value"})}),(0,Ro.jsxs)(ut,{children:[D.map(I=>(0,Ro.jsx)(Pe,{value:I,children:I},I)),(0,Ro.jsx)(Pe,{value:"__custom__",children:(0,Ro.jsx)("span",{className:"text-muted-foreground text-Ro",children:"Custom..."})})]})]}):(0,Ro.jsx)(J,{value:String(v||""),onChange:I=>m(g,I.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Ro.jsx)(x,{type:"button",variant:"ghost",size:"sm",onClick:()=>b(g),className:"h-8 Ro-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Ro.jsx)(Yu.Ro,{className:"h-3 Ro-3"})})]},g)})}):(0,Ro.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground",children:'Ro metadata \u2022 Click "Add" to create fields'})})]}),(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Ro.jsx)(te,{variant:"secondary",className:"font-mono",children:i.format.toUpperCase()})]})]})]}),(0,Ro.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ro.jsxs)("div",{className:"p-8",children:[(0,Ro.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Ro.jsx)(qe,{value:i.content||"",onChange:g=>n(v=>({...v,content:g.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var yb=e=>(0,Ro.jsx)("div",{className:"prose prose-slate dark:prose-invert max-Ro-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-Tu font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),vb=e=>(0,Ro.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),bx=e=>(0,Ro.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Ro-none",children:[(0,Ro.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,Ro.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Ro.jsx)("strong",{children:"RichText Renderer:"})," This Ro a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Ro.jsx)("pre",{className:"text-sm",children:e})]}),hx=e=>(0,Ro.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Ro-none",children:[(0,Ro.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Ro.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Ro.jsx)("strong",{children:"MDX Renderer:"})," This Ro a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),yb(e)]});function wc({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:r=[],knowledgeContexts:i=[]}){let[n,s]=(0,Tu.useState)(!1),l=f=>{switch(f){case"markdown":case"mdx":return(0,Ro.jsx)(Yu.FileText,{className:"h-6 Ro-6 text-primary"});case"richtext":return(0,Ro.jsx)(Yu.File,{className:"h-6 Ro-6 text-success"});case"text":return(0,Ro.jsx)(Yu.Type,{className:"h-6 Ro-6 text-muted-foreground"});default:return(0,Ro.jsx)(Yu.File,{className:"h-6 Ro-6 text-muted-foreground"})}},c=f=>{switch(f){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},d=(f,b)=>{let g={markdown:yb,mdx:hx,richtext:bx,text:vb},v=o?.[b]||g[b];return v?v(f):vb(f)},m=f=>{s(!1),t?.(f)},u=()=>{s(!1)};return n?(0,Ro.jsx)(xc,{document:e,onSave:m,onCancel:u,availableDocuments:r,knowledgeContexts:i}):(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Ro.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Ro.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Ro.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-Ro-0",children:[(0,Ro.jsx)("div",{className:"flex-shrink-0 p-3 rounded-Tu bg-muted border border-border",children:l(e.format)}),(0,Ro.jsxs)("div",{className:"flex-1 min-Ro-0",children:[(0,Ro.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Ro.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,Ro.jsx)("div",{className:"flex-shrink-0",children:(0,Ro.jsxs)(x,{variant:"outline",size:"sm",onClick:()=>s(!0),className:"gap-2",children:[(0,Ro.jsx)(Yu.Edit3,{className:"h-4 Ro-4"}),"Edit"]})})]}),(0,Ro.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Ro.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${c(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(f=>(0,Ro.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",f]},f))]})]}),(0,Ro.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ro.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Ro.jsxs)("div",{className:"mb-6",children:[(0,Ro.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Ro.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Ro.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-Ro",children:Object.entries(e.metadata).map(([f,b])=>(0,Ro.jsxs)("div",{className:"flex gap-1",children:[(0,Ro.jsxs)("span",{className:"text-muted-foreground font-medium",children:[f.replace(/([A-Z])/g," $1").trim(),":"]}),(0,Ro.jsx)("span",{className:"text-foreground truncate",children:String(b)})]},f))})})]}),(0,Ro.jsx)("div",{className:"space-y-4",children:e.content?(0,Ro.jsx)("div",{className:"relative",children:(0,Ro.jsx)("div",{className:"bg-card border border-border rounded-Tu p-6 overflow-hidden",children:d(e.content,e.format)})}):(0,Ro.jsxs)("div",{className:"text-center py-12 bg-muted rounded-Tu border-2 border-dashed border-border",children:[(0,Ro.jsx)("div",{className:"Ro-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Ro.jsx)(Yu.FileText,{className:"h-8 Ro-8 text-muted-foreground"})}),(0,Ro.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"Ro content available"}),(0,Ro.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function xb({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:n=!0}){let[s,l]=(0,Tu.useState)(o===0),c=a&&Object.keys(a).length>0,d=t.length+(a?Object.values(a).reduce((f,b)=>f+b.documents.length,0):0),m=f=>{switch(f){case"markdown":case"mdx":return(0,Ro.jsx)(Yu.FileText,{className:"h-3.5 Ro-3.5 text-muted-foreground"});case"richtext":return(0,Ro.jsx)(Yu.File,{className:"h-3.5 Ro-3.5 text-muted-foreground"});default:return(0,Ro.jsx)(Yu.File,{className:"h-3.5 Ro-3.5 text-muted-foreground"})}},u=f=>{let b=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return b[f%b.length]};return(0,Ro.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,Ro.jsxs)(Ys.motion.div,{className:`group flex items-center gap-3 p-3 rounded-Tu cursor-pointer transition-all duration-200 ${s?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>l(!s),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Ro.jsx)("div",{className:`Ro-1 h-6 rounded-full ${u(o)}`}),(0,Ro.jsx)(Ys.motion.div,{animate:{rotate:s?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Ro.jsx)(Yu.ChevronRight,{className:"h-4 Ro-4 text-muted-foreground"})}),(0,Ro.jsxs)("div",{className:"flex-1 flex items-center justify-between min-Ro-0",children:[(0,Ro.jsx)("div",{className:"flex items-center gap-2 min-Ro-0",children:(0,Ro.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&d>0&&(0,Ro.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Ro.jsx)("span",{className:"inline-flex items-center justify-center Ro-6 h-6 text-Ro font-medium bg-muted text-muted-foreground rounded-full",children:d})})]})]}),(0,Ro.jsx)(Ys.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Ro.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((f,b)=>(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:b*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===f.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(f),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Ro.jsx)("div",{className:"flex-shrink-0",children:m(f.format)}),(0,Ro.jsxs)("div",{className:"flex-1 min-Ro-0",children:[(0,Ro.jsx)("p",{className:`text-sm truncate transition-colors ${i===f.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:f.title}),f.description&&(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground truncate Yu-0.5",children:f.description})]}),f.tags&&f.tags.length>0&&(0,Ro.jsx)("div",{className:"flex-shrink-0",children:(0,Ro.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-Ro font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:f.tags[0]})})]},f.id)),a&&Object.entries(a).map(([f,b])=>(0,Ro.jsx)(xb,{label:f,documents:b.documents,children:b.children,level:o+1,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:n},f))]})})]})}function Nc({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:i,className:n,editable:s=!0}){let[l,c]=(0,Tu.useState)(""),[d,m]=(0,Tu.useState)(null),u=(0,Tu.useMemo)(()=>l?e.filter(g=>g.title.toLowerCase().includes(l.toLowerCase())||g.description?.toLowerCase().includes(l.toLowerCase())||g.tags?.some(v=>v.toLowerCase().includes(l.toLowerCase()))||Object.values(g.metadata||{}).some(v=>String(v).toLowerCase().includes(l.toLowerCase()))):e,[e,l]),f=(0,Tu.useMemo)(()=>{let g=(v,D)=>{if(D.length===0)return{};let[I,...y]=D;return v.reduce((T,C)=>{let V=C.metadata?.[I]||"Uncategorized",H=String(V);if(T[H]||(T[H]={documents:[],children:{}}),y.length===0)T[H].documents.push(C);else{let A=g([C],y),P=Object.keys(A)[0];P&&(T[H].children||(T[H].children={}),T[H].children[P]?T[H].children[P].documents.push(...A[P].documents):T[H].children[P]=A[P])}return T},{})};return g(u,t.groupBy)},[u,t.groupBy]),b=g=>{m(g),a?.(g)};return(0,Ro.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,Ro.jsxs)("div",{className:"Ro-1/3 border-r border-border bg-muted/20",children:[(0,Ro.jsx)("div",{className:"p-6 border-b border-border",children:(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Ro.jsx)(Yu.Search,{className:"h-4 Ro-4 text-muted-foreground"})}),(0,Ro.jsx)(J,{placeholder:"Search knowledge base...",value:l,onChange:g=>c(g.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-Tu h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Ro.jsx)(sa,{className:"h-[calc(100%-100px)]",children:(0,Ro.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(f).map(([g,v])=>(0,Ro.jsx)(xb,{label:g,documents:v.documents,children:v.children,level:0,onDocumentClick:b,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},g)),Object.keys(f).length===0&&(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Ro.jsx)("div",{className:"Ro-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Ro.jsx)(Yu.FileText,{className:"h-8 Ro-8 text-muted-foreground"})}),(0,Ro.jsx)("p",{className:"text-sm font-medium",children:"Ro documents found"}),(0,Ro.jsx)("p",{className:"text-Ro Yu-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Ro.jsx)("div",{className:"flex-1 bg-background",children:d?(0,Ro.jsx)(wc,{document:d,onDocumentUpdate:r,editable:s}):(0,Ro.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-Ro-sm",children:[(0,Ro.jsx)("div",{className:"Ro-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Ro.jsx)(Yu.FileText,{className:"h-10 Ro-10 text-primary"})}),(0,Ro.jsx)("h3",{className:"text-Tu font-semibold text-foreground mb-2",children:"Select a document"}),(0,Ro.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function Sl({documents:e=[],contexts:t=[],onDocumentClick:a=n=>console.log("Document clicked:",n),onDocumentShare:o=n=>console.log("Share document:",n),onLoadDocumentContent:r,selectedDocumentId:i}){let[n,s]=(0,Tu.useState)(t[0]);return!t||t.length===0?(0,Ro.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Ro.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Ro.jsx)(Ut,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,Ro.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Ro.jsx)("p",{className:"text-muted-foreground",children:"Ro contexts available"})})]}):(0,Ro.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Ro.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Ro.jsx)(Ut,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Ro.jsxs)("div",{className:"Yu-6",children:[(0,Ro.jsx)("div",{className:"border-b border-border",children:(0,Ro.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(l=>(0,Ro.jsxs)("button",{onClick:()=>s(l),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n.id===l.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[l.icon,l.label]},l.id))})}),n.description&&(0,Ro.jsx)("div",{className:"Yu-3 px-1",children:(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:n.description})})]})]}),(0,Ro.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,Ro.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Ro.jsx)(Nc,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i})})})]})}function Qp({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:r,onCreateProject:i,onOpenProject:n,sidebarItems:s,initialColleagues:l,users:c,onColleagueAdd:d,onColleagueEdit:m,onColleagueDelete:u}){let[f,b]=(0,Tu.useState)("home"),[g,v]=(0,Tu.useState)(t[0]),D=h=>{console.log("Opening app:",h.name)},I=h=>{console.log("Favoriting app:",h.name)},y=h=>{console.log("Opening file:",h.name)},N=h=>{console.log("Sharing file:",h.name)},T=h=>{console.log("Opening project:",h.name),n(h)},C=h=>{console.log("Sharing project:",h.name)},V=h=>{v(h),console.log("Business unit changed to:",h.name)},H=()=>{console.log("Copilot clicked - navigating to chat"),b("chat")},A=h=>{console.log("Notification removed:",h)},P=()=>{console.log("All notifications removed")},z=()=>{switch(f){case"home":return(0,Ro.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Ro.jsxs)("section",{className:"text-center py-12",children:[(0,Ro.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",g.name," team"]}),(0,Ro.jsx)("p",{className:"text-Tu text-muted-foreground mb-8",children:"This Ro your collaborative workspace for productivity and knowledge sharing."})]}),(0,Ro.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,Ro.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Ro.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,Ro.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,Ro.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Ro.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,Ro.jsx)("p",{className:"text-3xl font-bold text-primary",children:r}),(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,Ro.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Ro.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,Ro.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,Ro.jsx)(Ut,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Yu",onClick:()=>b("chat")}})]});case"colleagues":return(0,Ro.jsx)(kl,{initialColleagues:l,availableUsers:c,onColleagueAdd:d,onColleagueEdit:m,onColleagueDelete:u});case"chat":return(0,Ro.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Ro.jsxs)("section",{className:"text-center py-12",children:[(0,Ro.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,Ro.jsxs)("p",{className:"text-Tu text-muted-foreground mb-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),(0,Ro.jsx)(Ut,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,Ro.jsxs)("div",{className:"space-y-8",children:[(0,Ro.jsx)(Ut,{title:"Creative Apps Collection",description:"Discover our full suite Ro professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,Ro.jsxs)("section",{className:"space-y-4",children:[(0,Ro.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,Ro.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Xp.filter(h=>h.new).map(h=>(0,Ro.jsx)(qp,{app:h,showProgress:!0,onOpen:D,onFavorite:I},h.name))})]}),(0,Ro.jsxs)("section",{className:"space-y-4",children:[(0,Ro.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,Ro.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Xp.map(h=>(0,Ro.jsx)(qp,{app:h,onOpen:D,onFavorite:I},h.name))})]})]});case"knowledge":return(0,Ro.jsx)(Sl,{});case"files":return(0,Ro.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Ro.jsx)(Ut,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,Ro.jsxs)("section",{className:"space-y-4",children:[(0,Ro.jsx)("div",{className:"flex items-center justify-between",children:(0,Ro.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,Ro.jsx)(gn,{files:lb,onFileClick:y})]})]});case"projects":return(0,Ro.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Ro.jsx)(Ut,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:i}}),(0,Ro.jsxs)("section",{className:"space-y-4",children:[(0,Ro.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Ro.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:a.map(h=>(0,Ro.jsx)(vn,{project:h,onOpen:T,onShare:C},h.name))})]})]});case"learn":return(0,Ro.jsxs)("div",{className:"space-y-8",children:[(0,Ro.jsx)(Ut,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),(0,Ro.jsxs)("section",{className:"space-y-4",children:[(0,Ro.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,Ro.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:db.slice(0,3).map(h=>(0,Ro.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,Ro.jsx)("h3",{className:"font-semibold mb-2",children:h.title}),(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:h.description}),(0,Ro.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Ro.jsx)("span",{children:h.duration}),(0,Ro.jsx)("span",{children:h.level})]})]},h.title))})]})]});default:return null}};return(0,Ro.jsx)(nc,{sidebarItems:mb,title:e,notifications:pb,businessUnits:t,currentBusinessUnit:g,onBusinessUnitChange:V,activeTab:f,onTabChange:b,showTabs:!0,onActionClick:H,actionIcon:(0,Ro.jsx)(Yu.Bot,{className:"Tu-2 h-4 Ro-4"}),actionText:"Start Chat",onNotificationRemove:A,onRemoveAll:P,children:(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsx)(Ys.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:z()},f)})})}var Cb=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,r]=(0,Tu.useState)(null),[i,n]=(0,Tu.useState)(""),[s,l]=(0,Tu.useState)(""),[c,d]=(0,Tu.useState)(""),m=f=>{let b=f.target.files?.[0];b&&(r(b),i||n(b.name))},u=async f=>{if(f.preventDefault(),!o)return;let b=new FormData;b.append("file",o),b.append("name",i),s&&b.append("description",s),c&&b.append("tags",c),a?.(b),t(),r(null),n(""),l(""),d("")};return(0,Ro.jsx)(Rt,{open:e,onOpenChange:t,children:(0,Ro.jsxs)(wt,{className:"sm:max-Ro-md",children:[(0,Ro.jsx)(Mt,{children:(0,Ro.jsx)(Bt,{children:"Add New File"})}),(0,Ro.jsxs)("form",{onSubmit:u,className:"grid gap-4",children:[(0,Ro.jsx)("div",{className:"flex items-center justify-center Ro-full",children:(0,Ro.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center Ro-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,Ro.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[(0,Ro.jsx)(yx,{className:"Ro-10 h-10 text-gray-400"}),(0,Ro.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,Ro.jsx)("span",{className:"font-semibold",children:"Click to upload"})," Ro drag and drop"]}),(0,Ro.jsx)("p",{className:"text-Ro text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG Ro GIF (MAX. 800x400px)"})]}),(0,Ro.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:m})]})}),o&&(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("p",{className:"font-medium",children:o.name}),(0,Ro.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,Ro.jsx)(x,{type:"submit",onClick:u,children:"Upload"})]})]})]})})};function yx(e){return(0,Ro.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ro.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,Ro.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,Ro.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function Dl({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:i=!1,className:n}){let[s,l]=(0,Tu.useState)(e),[c,d]=(0,Tu.useState)(""),[m,u]=(0,Tu.useState)("all"),[f,b]=(0,Tu.useState)("all"),[g,v]=(0,Tu.useState)(!1),D=(0,Tu.useRef)(""),I=z=>z.map(h=>`${h.id}-${new Date(h.createdAt).getTime()}-${new Date(h.updatedAt).getTime()}`).join("-");(0,Tu.useEffect)(()=>{let z=I(e);z!==D.current&&(l(e),D.current=z)},[e]);let y=s.filter(z=>z.name.toLowerCase().includes(c.toLowerCase())),N=y.slice(0,10),T=y.filter(Boolean),C=()=>{v(!0)},V=z=>{a?.(z)},H=z=>{console.log("deleting file",z),l(h=>h.filter(ee=>ee.name!==z.name)),o?.(z.id.toString())},A=z=>{r?.(z)},P=()=>{d(""),u("all")};return(0,Ro.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsx)(Ys.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Ro.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Ro.jsx)(Ut,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:C},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Ro.jsx)(O,{children:(0,Ro.jsx)(Q,{className:"pt-6",children:(0,Ro.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Ro.jsx)("div",{className:"flex-1",children:(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsx)(Yu.Search,{className:"absolute left-3 top-3 h-4 Ro-4 text-muted-foreground"}),(0,Ro.jsx)(J,{placeholder:"Search files...",value:c,onChange:z=>d(z.target.value),className:"pl-9"})]})}),(c||m!=="all")&&(0,Ro.jsxs)(x,{variant:"outline",onClick:P,className:"gap-2",children:[(0,Ro.jsx)(Yu.Filter,{className:"h-4 Ro-4"}),"Clear"]})]})})}),(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsx)(Ns,{activeTab:f,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${y.length})`},{value:"recent",label:`Recent (${N.length})`}],maxWidth:"500px",gridCols:3}),f==="all"&&(0,Ro.jsx)(gn,{files:y,onFileClick:A,onFileEdit:V,onFileDelete:H,showHeader:!i}),f==="recent"&&(0,Ro.jsx)(gn,{files:N,onFileClick:A,onFileEdit:V,onFileDelete:H,showHeader:!i}),f==="shared"&&(0,Ro.jsx)(gn,{files:T,onFileClick:A,onFileEdit:V,onFileDelete:H,showHeader:!i})]}),y.length===0&&(0,Ro.jsx)(O,{children:(0,Ro.jsx)(Q,{className:"pt-6",children:(0,Ro.jsxs)("div",{className:"text-center py-8",children:[(0,Ro.jsx)(Yu.File,{className:"h-12 Ro-12 text-muted-foreground mx-auto mb-4"}),(0,Ro.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Ro files found"}),(0,Ro.jsx)("p",{className:"text-muted-foreground mb-4",children:c||m!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Ro.jsxs)(x,{onClick:C,className:"gap-2",children:[(0,Ro.jsx)(Yu.Plus,{className:"h-4 Ro-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,Ro.jsx)(Cb,{isOpen:g,onClose:()=>v(!1),onAddFile:t})]})}var xx=[{key:"kanban",icon:Yu.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:Yu.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:Yu.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:Yu.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:Yu.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],kb=({currentView:e,onViewChange:t,children:a})=>(0,Ro.jsxs)("div",{className:"flex Ro-full h-screen",children:[(0,Ro.jsx)("div",{className:"Ro-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:xx.map(o=>{let r=o.icon,i=e===o.key;return(0,Ro.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 Ro-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:Ro-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,Ro.jsx)(r,{className:"h-4 Ro-4 flex-shrink-0"}),(0,Ro.jsx)("span",{className:"text-Ro font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,Ro.jsx)("div",{className:"flex-1 min-Ro-0 px-4 md:px-6 h-full overflow-auto",children:(0,Ro.jsx)("div",{className:"Ro-full h-full",children:a})})]});var $t=F(require("react"));var Sb=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:i=!1,height:n})=>{let s=d=>{d.preventDefault()},l=d=>{d.preventDefault(),r(t)};return(0,Ro.jsxs)(O,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${i?"lg:max-Ro-Ro":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:s,onDrop:l,children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Ro.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,Ro.jsx)(te,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Ro.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var Tl=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let i=d=>{a(e)},n=()=>{o(e)},s=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},l=()=>{switch(e.type){case"story":return(0,Ro.jsx)(Yu.BookOpen,{className:"h-3 Ro-3"});case"bug":return(0,Ro.jsx)(Yu.Bug,{className:"h-3 Ro-3"});case"spike":return(0,Ro.jsx)(Yu.Zap,{className:"h-3 Ro-3"});case"task":default:return(0,Ro.jsx)(Yu.AlertCircle,{className:"h-3 Ro-3"})}},c=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return r?(0,Ro.jsx)(O,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:i,onClick:n,children:(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-Ro font-medium ${c()}`,children:l()}),(0,Ro.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Ro.jsxs)(O,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:i,onClick:n,children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ro.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[l(),(0,Ro.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Ro.jsxs)("div",{className:"flex gap-1",children:[(0,Ro.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-Ro font-medium ${s()}`,children:e.priority}),(0,Ro.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-Ro font-medium",children:e.storyPoints})]})]}),(0,Ro.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Ro.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ro.jsx)(Yu.User,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{children:e.assignee?.value?.name})]}),(0,Ro.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ro.jsx)(Yu.Calendar,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var wx=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Yu.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:Yu.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Yu.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Yu.Zap}],Nx=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],yn=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,assignees:i,defaultEpicId:n})=>{let[s,l]=(0,Tu.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,Tu.useEffect)(()=>{e&&n&&l(m=>({...m,epic:n}))},[e,n]),(0,Tu.useEffect)(()=>{e&&l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"none",assignee:""})},[e]);let c=m=>{m.preventDefault(),s.name.trim()&&(a({name:s.name.trim(),description:s.description.trim(),status:"todo",priority:s.priority,type:s.type,storyPoints:s.storyPoints,epic:Number(s.epic),sprint:Number(s.sprint),assignee:s.assignee.trim()?{relationTo:"digital-colleagues",value:Number(s.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"",assignee:""}),t())},d=(m,u)=>{l(f=>({...f,[m]:u}))};return(0,Ro.jsx)(Rt,{open:e,onOpenChange:t,children:(0,Ro.jsxs)(wt,{className:"sm:max-Ro-md",children:[(0,Ro.jsx)(Mt,{children:(0,Ro.jsx)(Bt,{children:"Add New Task"})}),(0,Ro.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"name",children:"Task Title"}),(0,Ro.jsx)(J,{id:"name",value:s.name,onChange:m=>d("name",m.target.value),placeholder:"Enter task title",required:!0})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Ro.jsx)(qe,{id:"description",value:s.description,onChange:m=>d("description",m.target.value),placeholder:"Enter task description",rows:3})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:"Type"}),(0,Ro.jsx)(_r,{type:"single",value:s.type||"",onValueChange:m=>m&&d("type",m),children:wx.map(m=>{let u=m.icon;return(0,Ro.jsxs)(Wr,{value:m.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Ro.jsx)(u,{className:"h-4 Ro-4"}),m.label]},m.value)})})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:"Priority"}),(0,Ro.jsx)(_r,{type:"single",value:s.priority||"",onValueChange:m=>m&&d("priority",m),children:Nx.map(m=>(0,Ro.jsx)(Wr,{value:m.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:m.label},m.value))})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"points",children:"Story Points"}),(0,Ro.jsx)(J,{id:"points",type:"number",min:"1",max:"100",value:s.storyPoints,onChange:m=>d("storyPoints",parseInt(m.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"epic",children:"Epic"}),(0,Ro.jsxs)(yt,{value:s.epic,onValueChange:m=>d("epic",m),children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{placeholder:"Select So epic"})}),(0,Ro.jsx)(ut,{children:o.map(m=>(0,Ro.jsx)(Pe,{value:m.id.toString(),children:(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)("div",{className:`Ro-3 h-3 rounded-full ${m.color}`}),m.name]})},m.id))})]})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Ro.jsxs)(yt,{value:s.sprint,onValueChange:m=>d("sprint",m),children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{placeholder:"Select a sprint"})}),(0,Ro.jsxs)(ut,{children:[(0,Ro.jsx)(Pe,{value:"none",children:"Ro Sprint"}),r.map(m=>(0,Ro.jsx)(Pe,{value:m.id.toString(),children:(0,Ro.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"sprint",children:"Assignee"}),(0,Ro.jsxs)(yt,{value:s.assignee,onValueChange:m=>d("assignee",m),children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{placeholder:"Select So Assignee"})}),(0,Ro.jsxs)(ut,{children:[(0,Ro.jsx)(Pe,{value:"none",children:"Ro Assignee"}),i.map(m=>(0,Ro.jsx)(Pe,{value:m.id.toString(),children:(0,Ro.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,Ro.jsxs)(ss,{children:[(0,Ro.jsx)(x,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Ro.jsx)(x,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Sc=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:i=!1})=>{let[n,s]=(0,Tu.useState)(!1),l=o.find(d=>d.value===t);return(0,Ro.jsxs)("div",{className:"space-y-1",children:[(0,Ro.jsx)(M,{className:"text-Ro text-muted-foreground",children:e}),(0,Ro.jsxs)(yt,{value:t,onValueChange:a,open:n,onOpenChange:d=>{i||s(d)},disabled:i,children:[(0,Ro.jsx)(pt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Ro.jsxs)(te,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&s(!n),children:[r&&l?.color&&(0,Ro.jsx)("div",{className:`Ro-2 h-2 rounded-full ${l.color} Tu-1`}),l?.label||"Select..."]})}),(0,Ro.jsx)(ut,{children:o.map(d=>(0,Ro.jsx)(Pe,{value:d.value,children:r&&d.color?(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)("div",{className:`Ro-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var ha=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var Cx=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Yu.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:Yu.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Yu.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Yu.Zap}],kx=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var Db=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:i,onDelete:n,isUpdating:s=!1,isDeleting:l=!1,deleteState:c="idle",teamMembers:d})=>{let[m,u]=(0,Tu.useState)(e.storyPoints),f=(0,Tu.useRef)(null),[b,g]=(0,Tu.useState)(d);(0,Tu.useEffect)(()=>{g(d)},[d]);let v=(0,Tu.useCallback)((y,N)=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{r(y,N)},500)},[r]);(0,Tu.useEffect)(()=>{v("storyPoints",m?.toString()||"1")},[m]);let D=y=>y.split(" ").map(N=>N[0]).join("").toUpperCase(),I=()=>c==="loading"?(0,Ro.jsxs)(x,{disabled:!0,variant:"destructive",className:"Ro-full h-8 text-Ro gap-1",children:[(0,Ro.jsx)(Yu.Loader2,{className:"h-3 Ro-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,Ro.jsxs)(x,{disabled:!0,variant:"destructive",className:"Ro-full h-8 text-Ro gap-1",children:[(0,Ro.jsx)(Yu.Check,{className:"h-3 Ro-3"}),"Deleted"]}):c==="error"?(0,Ro.jsxs)(x,{disabled:!0,variant:"destructive",className:"Ro-full h-8 text-Ro gap-1",children:[(0,Ro.jsx)(Yu.Ro,{className:"h-3 Ro-3"}),"Delete failed"]}):(0,Ro.jsxs)(x,{onClick:n,variant:"destructive",className:"Ro-full h-8 text-Ro gap-1",disabled:s||l,children:[(0,Ro.jsx)(Yu.Trash2,{className:"h-3 Ro-3"}),"Delete Task"]});return(0,Ro.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Ro.jsxs)("div",{className:"space-y-4",style:{opacity:s?.6:1},children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{className:"text-Ro text-muted-foreground",children:"Status"}),(0,Ro.jsx)(Sc,{label:"",value:e.status,onValueChange:y=>r("status",y),options:[{value:"todo",label:"Yu Ro"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:s})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{className:"text-Ro text-muted-foreground",children:"Type"}),(0,Ro.jsx)(_r,{type:"single",value:e.type||"",onValueChange:y=>y&&r("type",y),className:"grid grid-cols-2 gap-1",disabled:s,children:Cx.map(y=>{let N=y.icon;return(0,Ro.jsxs)(Wr,{value:y.value,className:"flex items-center gap-1 text-Ro h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:s,children:[(0,Ro.jsx)(N,{className:"h-3 Ro-3"}),y.label]},y.value)})})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{className:"text-Ro text-muted-foreground",children:"Priority"}),(0,Ro.jsx)(_r,{type:"single",value:e.priority||"",onValueChange:y=>y&&r("priority",y),className:"grid grid-cols-3 gap-1",disabled:s,children:kx.map(y=>(0,Ro.jsx)(Wr,{value:y.value,className:"text-Ro h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:s,children:y.label},y.value))})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{className:"text-Ro text-muted-foreground",children:"Story Points"}),(0,Ro.jsx)("input",{type:"number",min:"1",max:"100",value:m||1,onChange:y=>{let N=Number(y.target.value);N<1?u(1):N>100?u(100):u(N)},className:"Ro-full h-8 px-2 text-Ro border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:s})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{className:"text-Ro text-muted-foreground",children:"Epic"}),(0,Ro.jsx)(Sc,{label:"",value:ha(e.epic).toString(),onValueChange:y=>r("epic",y),options:(t||[]).map(y=>({value:y.id.toString(),label:y?.name,color:y.color})),showColor:!0,disabled:s})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{className:"text-Ro text-muted-foreground",children:"Sprint"}),(0,Ro.jsx)(Sc,{label:"",value:ha(e.sprint).toString()||"none",onValueChange:y=>r("sprint",y==="none"?"":y),options:[{value:"none",label:"Ro Sprint"},...(a||[]).map(y=>({value:y.id.toString(),label:`${y?.name}`}))],disabled:s})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{className:"text-Ro text-muted-foreground",children:"Assignee"}),(0,Ro.jsx)(lc,{label:"",value:e.assignee?.value?.name,onValueChange:y=>r("assignee",y),options:b.map(y=>({value:`${typeof y.email=="string"?"users":"digital-colleagues"}:${y.id}`,label:y?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:s})]})]}),(0,Ro.jsxs)("div",{className:"Yu-auto pt-4 space-y-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(x,{onClick:i,variant:"outline",className:"Ro-full h-8 text-Ro",disabled:s||l,children:"Close"}),I()]}),(0,Ro.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,Ro.jsx)("div",{className:"text-Ro text-muted-foreground font-medium mb-2",children:"Information"}),(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsx)("span",{className:"text-Ro text-muted-foreground",children:"Logged By"}),(0,Ro.jsxs)("div",{className:"flex items-center gap-1 text-Ro text-muted-foreground",children:[(0,Ro.jsx)(Yu.User,{className:"h-3 Ro-3"}),(0,Ro.jsx)("span",{children:"System"})]})]}),(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsx)("span",{className:"text-Ro text-muted-foreground",children:"Created"}),(0,Ro.jsxs)("div",{className:"flex items-center gap-1 text-Ro text-muted-foreground",children:[(0,Ro.jsx)(Yu.Calendar,{className:"h-3 Ro-3"}),(0,Ro.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsx)("span",{className:"text-Ro text-muted-foreground",children:"Last Updated"}),(0,Ro.jsxs)("div",{className:"flex items-center gap-1 text-Ro text-muted-foreground",children:[(0,Ro.jsx)(Yu.Clock,{className:"h-3 Ro-3"}),(0,Ro.jsxs)("span",{children:[new Date(o).toLocaleDateString()," Ro"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var Tb=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:r,onUpdateTask:i,onDeleteTask:n,onAddComment:s,colleagues:l})=>{let[c,d]=(0,Tu.useState)(a),[m,u]=(0,Tu.useState)(new Date),[f,b]=(0,Tu.useState)("idle"),[g,v]=(0,Tu.useState)("idle"),[D,I]=(0,Tu.useState)([]),[y,N]=(0,Tu.useState)(l);(0,Tu.useEffect)(()=>{d(a)},[a]);let T=async(h,ee)=>{if(ee!==c[h]){b("loading");try{await i(c.id.toString(),{[h]:ee}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(S){console.log("error",S),b("error"),setTimeout(()=>b("idle"),3e3)}}},C=async(h,ee)=>{if(ee!==c[h]){b("loading");try{await i(c.id.toString(),{[h]:ee}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(S){console.log("error",S),b("error"),setTimeout(()=>b("idle"),3e3)}}},V=async h=>{if(s){b("loading");try{await s?.({content:h,taskId:c.id.toString()}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},H=async()=>{v("loading");try{await n(c.id.toString()),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},A=f!=="loading"&&g!=="loading",P=()=>{A&&t()},z=()=>f==="loading"?(0,Ro.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Ro.jsx)(Yu.Loader2,{className:"h-4 Ro-4 animate-spin"}),(0,Ro.jsx)("span",{children:"Updating..."})]}):f==="success"?(0,Ro.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Ro.jsx)(Yu.Check,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{children:"Updated successfully"})]}):f==="error"?(0,Ro.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Ro.jsx)(Yu.Ro,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{children:"Update failed"})]}):null;return(0,Ro.jsx)(Rt,{open:e,onOpenChange:P,children:(0,Ro.jsxs)(wt,{className:"max-Ro-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,Ro.jsxs)(Mt,{children:[(0,Ro.jsx)(Bt,{className:"Tu-only",children:c?.name}),(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsx)("div",{className:"flex-1",children:z()}),!A&&(0,Ro.jsx)("div",{className:"text-Ro text-muted-foreground",children:"Please wait..."})]})]}),(0,Ro.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Ro.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Ro.jsx)(rc,{fieldName:"name",value:c.name||"",label:"",onSave:T,className:"border-b border-border pb-3",disabled:f==="loading"}),(0,Ro.jsx)(rc,{fieldName:"description",value:c.description||"",label:"Description",multiline:!0,onSave:T,disabled:f==="loading"}),(0,Ro.jsx)(Up,{comments:(c?.comments||[]).map(h=>({author:h.author.value.name||"",createdAt:new Date(h.timestamp),text:h.text,id:h.id||""})),onAddComment:V})]}),(0,Ro.jsx)(Db,{task:c,epics:o,sprints:r,lastUpdated:m,onUpdateTask:C,onClose:P,onDelete:H,isUpdating:f==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:y})]})]})})};var wn=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,Tu.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),i=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],n=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],s=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],l=d=>{d.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},c=(d,m)=>{r(u=>({...u,[d]:m}))};return(0,Ro.jsx)(Rt,{open:e,onOpenChange:t,children:(0,Ro.jsxs)(wt,{className:"sm:max-Ro-md",children:[(0,Ro.jsx)(Mt,{children:(0,Ro.jsx)(Bt,{children:"Add New Epic"})}),(0,Ro.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"name",children:"Epic Name"}),(0,Ro.jsx)(J,{id:"name",value:o.name,onChange:d=>c("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Ro.jsx)(qe,{id:"description",value:o.description,onChange:d=>c("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:"Color"}),(0,Ro.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(d=>(0,Ro.jsx)("button",{type:"button",onClick:()=>c("color",d),className:`Ro-8 h-8 rounded-full ${d} ${o.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,Ro.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:"Confidence"}),(0,Ro.jsxs)(yt,{value:o.confidence,onValueChange:d=>c("confidence",d),children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{})}),(0,Ro.jsx)(ut,{children:n.map(d=>(0,Ro.jsx)(Pe,{value:d.value,children:d.label},d.value))})]})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:"Phase"}),(0,Ro.jsxs)(yt,{value:o.phase.toString(),onValueChange:d=>c("phase",parseInt(d)),children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{})}),(0,Ro.jsx)(ut,{children:s.map(d=>(0,Ro.jsx)(Pe,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,Ro.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:"Start Date"}),(0,Ro.jsx)(J,{type:"date",value:o.startDate,onChange:d=>c("startDate",d.target.value)})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:"End Date"}),(0,Ro.jsx)(J,{type:"date",value:o.endDate,onChange:d=>c("endDate",d.target.value)})]})]}),(0,Ro.jsxs)(ss,{children:[(0,Ro.jsx)(x,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Ro.jsx)(x,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var Zp=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:r=[],initialProjects:i=[],onAddTask:n,onUpdateTask:s,onDeleteTask:l,onTaskClick:c,onAddEpic:d,onAddComment:m})=>{let[u,f]=(0,$t.useState)([]),[b,g]=(0,$t.useState)([]),[v,D]=(0,$t.useState)([]),[I,y]=(0,$t.useState)(!1),[N,T]=(0,$t.useState)(!1),[C,V]=(0,$t.useState)(null),[H,A]=(0,$t.useState)(null),[P,z]=(0,$t.useState)([]),[h,ee]=(0,$t.useState)([]),[S,Z]=(0,$t.useState)(0),ae=(0,$t.useRef)(null),Ke=(0,$t.useRef)(null),_=$t.default.useMemo(()=>[...b.map(Y=>Y.id),0],[b]),Ie=(0,$t.useRef)(""),De=(0,$t.useRef)(""),B=(0,$t.useRef)(""),K=(0,$t.useRef)(""),U=Y=>Y.map(R=>`${R.id}-${new Date(R.createdAt).getTime()}-${new Date(R.updatedAt).getTime()}`).join("-");(0,$t.useEffect)(()=>{let Y=U(e);Y!==Ie.current&&(f(e),C&&V(e.find(R=>R.id===C.id)||null),Ie.current=Y)},[e]),(0,$t.useEffect)(()=>{let Y=U(t);Y!==De.current&&(g(t),De.current=Y)},[t]),(0,$t.useEffect)(()=>{let Y=U(a);Y!==B.current&&(D(a),B.current=Y)},[a]),(0,$t.useEffect)(()=>{let Y=U(r.map(R=>({id:R.id,updatedAt:R.updatedAt,createdAt:R.createdAt})));Y!==K.current&&(ee(r),K.current=Y)},[r]),(0,$t.useEffect)(()=>{let Y=()=>{if(ae.current){let he=ae.current.offsetHeight;Z(he)}};Y();let R=new ResizeObserver(Y);ae.current&&R.observe(ae.current);let $=()=>{setTimeout(Y,100)};return window.addEventListener("storage",$),()=>{R.disconnect(),window.removeEventListener("storage",$)}},[]),(0,$t.useEffect)(()=>{let Y=setTimeout(()=>{ae.current&&Z(ae.current.offsetHeight)},300);return()=>clearTimeout(Y)},[I,N]);let We=u.filter(Y=>!0),ie=Y=>We.filter(R=>R.status===Y),L=Y=>{let R={};return b.forEach($=>{R[$.id]=Y.filter(he=>ha(he.epic)===$.id)}),R["Ro-epic"]=Y.filter($=>!ha($.epic)),R},rt=Y=>{A(Y)},Ht=Y=>{H&&(f(R=>R.map($=>$.id===H.id?{...$,status:Y}:$)),s?.(H.id.toString(),{status:Y}),A(null))},Ka=Y=>{let R={...Y,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};f($=>[...$,R]),n?.(Y)},Qt=async(Y,R)=>{f($=>$.map(he=>he.id===Number(Y)?{...he,...R}:he)),s&&await s(Y,R),C?.id===Number(Y)&&V($=>({...$,...R}))},it=async Y=>{f(R=>R.filter($=>$.id!==Number(Y))),C?.id===Number(Y)&&V(null),l&&await l(Y)},Ze=Y=>{let R={...Y,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};g($=>[...$,R]),d?.(Y)},Wt=Y=>{V(Y),c?.(Y)},Ua=[{id:"todo",title:"Yu Ro",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Xo=S>0?`calc(100vh - ${S+120}px)`:"calc(100vh - 12rem)";return(0,Ro.jsxs)("div",{ref:Ke,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Ro.jsx)("div",{ref:ae,className:"flex-shrink-0",children:(0,Ro.jsx)(Ut,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>y(!0)},secondaryAction:{label:"Add epic",onClick:()=>T(!0)}})}),(0,Ro.jsx)("div",{className:"flex-1 min-h-0 Yu-8",children:(0,Ro.jsx)("div",{className:"h-full",style:{height:S>0?`calc(100vh - ${S+120}px)`:"calc(100vh - 12rem)"},children:(0,Ro.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Ua.map(Y=>{let R=ie(Y.status),$=L(R);return(0,Ro.jsxs)(Sb,{title:Y.title,status:Y.status,taskCount:R.length,onDrop:Ht,isCompact:Y.status==="done",height:Xo,children:[$["Ro-epic"].map(he=>(0,Ro.jsx)(Tl,{epic:null,task:he,onDragStart:rt,onTaskClick:Wt,isCompact:Y.status==="done"},he.id)),_.map(he=>{let nt=b.find(et=>et.id===he),we=$[he]||[];return we.length===0?null:(0,Ro.jsxs)("div",{className:"mb-6",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Ro.jsx)("div",{className:`Ro-3 h-3 rounded-full ${nt?.color}`}),(0,Ro.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:nt?.name||"Ro Epic"}),(0,Ro.jsx)(te,{variant:"secondary",className:"text-Ro",children:we.length})]})," ",(0,Ro.jsx)("div",{className:"space-y-3",children:we.map(et=>(0,Ro.jsx)(Tl,{task:et,epic:nt,onDragStart:rt,onTaskClick:Wt,isCompact:Y.status==="done"},et.id))})]},he)})]},Y.id)})})})}),(0,Ro.jsx)(yn,{isOpen:I,onClose:()=>y(!1),onAddTask:Ka,assignees:[...h,...P],epics:b,sprints:v}),(0,Ro.jsx)(wn,{isOpen:N,onClose:()=>T(!1),onAddEpic:Ze}),C&&(0,Ro.jsx)(Tb,{isOpen:!!C,onClose:()=>V(null),initialTask:C,epics:b,sprints:v,onUpdateTask:Qt,onDeleteTask:it,colleagues:h,onAddComment:m})]})};var eu=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:i,onAddEpic:n,onUpdateEpic:s,onDeleteEpic:l})=>{let[c,d]=(0,Tu.useState)(t),[m,u]=(0,Tu.useState)(null),[f,b]=(0,Tu.useState)(null),[g,v]=(0,Tu.useState)({}),[D,I]=(0,Tu.useState)(0),[y,N]=(0,Tu.useState)(!1),[T,C]=(0,Tu.useState)(!1),[V,H]=(0,Tu.useState)(null),A=(0,Tu.useRef)(null),P=(0,Tu.useRef)(null);(0,Tu.useEffect)(()=>{d(t)},[t]),(0,Tu.useEffect)(()=>{let B=()=>{if(A.current){let We=A.current.offsetHeight;I(We)}};B();let K=new ResizeObserver(B);A.current&&K.observe(A.current);let U=()=>{setTimeout(B,100)};return window.addEventListener("storage",U),()=>{K.disconnect(),window.removeEventListener("storage",U)}},[]),(0,Tu.useEffect)(()=>{let B=setTimeout(()=>{A.current&&I(A.current.offsetHeight)},300);return()=>clearTimeout(B)},[f]);let z=B=>{u(B)},h=B=>{B.preventDefault()},ee=(B,K)=>{B.preventDefault(),m&&ha(m.epic).toString()!==K&&(o(m.id.toString(),{epic:Number(K)}),u(null))},S=B=>e.filter(K=>ha(K.epic).toString()===B),Z=B=>{b(B.id.toString()),v({name:B.name,description:B.description,confidence:B.confidence,phase:B.phase})},ae=async()=>{f&&g.name&&(await s(f.toString(),g),d(B=>B.map(K=>K.id.toString()===f?{...K,...g}:K)),b(null),v({}))},Ke=()=>{b(null),v({})},_=async B=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await l(B),d(K=>K.filter(U=>U.id.toString()!==B)))},Ie=B=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[B]||`Phase ${B}`,De=B=>{switch(B){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsxs)("div",{ref:P,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Ro.jsx)("div",{ref:A,className:"flex-shrink-0",children:(0,Ro.jsx)(Ut,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>N(!0)}})}),(0,Ro.jsx)("div",{className:"flex-1 min-h-0 Yu-8",children:(0,Ro.jsx)("div",{className:"h-full overflow-y-auto",style:{height:D>0?`calc(100vh - ${D+120}px)`:"calc(100vh - 12rem)"},children:(0,Ro.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 Tu:grid-cols-4 gap-6 auto-rows-max",children:c.map(B=>{let K=S(B.id.toString()),U=K.reduce((ie,L)=>ie+(L.storyPoints||0),0),We=D>0?`calc(100vh - ${D+200}px)`:"calc(100vh - 14rem)";return(0,Ro.jsxs)(O,{className:`flex flex-col ${f===B.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:f===B.id.toString()?"auto":We,minHeight:"400px"},onDragOver:h,onDrop:ie=>ee(ie,B.id.toString()),children:[(0,Ro.jsx)("div",{className:"p-4 border-b border-border",children:f===B.id.toString()?(0,Ro.jsxs)("div",{className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsx)(J,{value:g.name||"",onChange:ie=>v({...g,name:ie.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Ro.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Ro.jsx)(x,{size:"sm",variant:"ghost",onClick:ae,className:"p-1 h-8 Ro-8",children:(0,Ro.jsx)(Yu.Check,{className:"h-4 Ro-4"})}),(0,Ro.jsx)(x,{size:"sm",variant:"ghost",onClick:Ke,className:"p-1 h-8 Ro-8",children:(0,Ro.jsx)(Yu.Ro,{className:"h-4 Ro-4"})})]})]}),(0,Ro.jsx)(qe,{value:g.description||"",onChange:ie=>v({...g,description:ie.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Ro.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("label",{className:"text-Ro text-muted-foreground",children:"Confidence"}),(0,Ro.jsxs)("select",{value:g.confidence||B.confidence,onChange:ie=>v({...g,confidence:ie.target.value}),className:"flex h-8 Ro-full rounded-md border border-input bg-background px-3 py-2 text-Ro ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[(0,Ro.jsx)("option",{value:"low",children:"Low"}),(0,Ro.jsx)("option",{value:"medium",children:"Medium"}),(0,Ro.jsx)("option",{value:"high",children:"High"})]})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("label",{className:"text-Ro text-muted-foreground",children:"Phase"}),(0,Ro.jsx)("select",{value:g.phase?.toString()||B.phase.toString(),onChange:ie=>v({...g,phase:parseInt(ie.target.value)}),className:"flex h-8 Ro-full rounded-md border border-input bg-background px-3 py-2 text-Ro ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[1,2,3,4,5,6,7,8,9].map(ie=>(0,Ro.jsxs)("option",{value:ie.toString(),children:["Phase ",ie]},ie))})]})]})]}):(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Ro.jsx)("div",{className:`Ro-4 h-4 rounded-full ${B.color}`}),(0,Ro.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:B.name}),(0,Ro.jsxs)("div",{className:"flex gap-1",children:[(0,Ro.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>Z(B),className:"p-1 h-8 Ro-8",children:(0,Ro.jsx)(Yu.Edit2,{className:"h-3 Ro-3"})}),(0,Ro.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>_(B.id.toString()),className:"p-1 h-8 Ro-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Ro.jsx)(Yu.Trash2,{className:"h-3 Ro-3"})})]})]}),(0,Ro.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Ro.jsxs)(te,{className:`text-Ro ${De(B.confidence)}`,children:[B.confidence," confidence"]}),(0,Ro.jsxs)(te,{variant:"outline",className:"text-Ro",children:["Phase ",B.phase]}),(0,Ro.jsxs)(te,{variant:"secondary",className:"text-Ro bg-muted text-muted-foreground",children:[K.length," tasks"]}),(0,Ro.jsxs)(te,{variant:"secondary",className:"text-Ro bg-muted text-muted-foreground",children:[U," pts"]})]}),B.description&&(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:B.description}),(0,Ro.jsxs)(x,{onClick:()=>{C(!0),H(B)},variant:"outline",size:"sm",className:"Ro-full gap-2",children:[(0,Ro.jsx)(Yu.Plus,{className:"h-4 Ro-4"}),"Add Task"]})]})}),(0,Ro.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,Ro.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:K.length===0?(0,Ro.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,Ro.jsx)(Yu.Move,{className:"h-8 Ro-8 mb-2"}),(0,Ro.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):K.map(ie=>(0,Ro.jsx)(Tl,{task:ie,epic:B,onDragStart:z,onTaskClick:r,isCompact:!0},ie.id))})})]},B.id)})})})})]}),(0,Ro.jsx)(wn,{isOpen:y,onClose:()=>N(!1),onAddEpic:n}),(0,Ro.jsx)(yn,{isOpen:T,onClose:()=>C(!1),onAddTask:i,assignees:[],epics:[],defaultEpicId:V?.id.toString()||"",sprints:a})]})};var Ib=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,Tu.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),i=s=>{s.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},n=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,Ro.jsx)(Rt,{open:e,onOpenChange:n,children:(0,Ro.jsxs)(wt,{className:"sm:max-Ro-md",children:[(0,Ro.jsx)(Mt,{children:(0,Ro.jsx)(Bt,{children:"Add New Sprint"})}),(0,Ro.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"name",children:"Sprint Name *"}),(0,Ro.jsx)(J,{id:"name",value:o.name,onChange:s=>r(l=>({...l,name:s.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Ro.jsx)(qe,{id:"description",value:o.description,onChange:s=>r(l=>({...l,description:s.target.value})),placeholder:"Brief description Ro sprint goals",rows:3})]}),(0,Ro.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:"Start Date *"}),(0,Ro.jsxs)(Ti,{children:[(0,Ro.jsx)(Ri,{asChild:!0,children:(0,Ro.jsxs)(x,{variant:"outline",className:p("Ro-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Ro.jsx)(Yu.CalendarIcon,{className:"Tu-2 h-4 Ro-4"}),o.startDate?(0,hp.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,Ro.jsx)(qr,{className:"Ro-auto p-0",align:"start",children:(0,Ro.jsx)(Mi,{mode:"single",selected:o.startDate,onSelect:s=>r(l=>({...l,startDate:s})),initialFocus:!0})})]})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:"End Date *"}),(0,Ro.jsxs)(Ti,{children:[(0,Ro.jsx)(Ri,{asChild:!0,children:(0,Ro.jsxs)(x,{variant:"outline",className:p("Ro-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Ro.jsx)(Yu.CalendarIcon,{className:"Tu-2 h-4 Ro-4"}),o.endDate?(0,hp.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,Ro.jsx)(qr,{className:"Ro-auto p-0",align:"start",children:(0,Ro.jsx)(Mi,{mode:"single",selected:o.endDate,onSelect:s=>r(l=>({...l,endDate:s})),initialFocus:!0,disabled:s=>o.startDate?s<o.startDate:!1})})]})]})]}),(0,Ro.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Ro.jsx)(x,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,Ro.jsx)(x,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Pc=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:i,onUpdateSprint:n,onDeleteSprint:s})=>{let[l,c]=(0,Tu.useState)([]),[d,m]=(0,Tu.useState)(new Set),[u,f]=(0,Tu.useState)(null),[b,g]=(0,Tu.useState)(!1),[v,D]=(0,Tu.useState)(null),[I,y]=(0,Tu.useState)(null),[N,T]=(0,Tu.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[C,V]=(0,Tu.useState)([]),[H,A]=(0,Tu.useState)("upcoming"),[P,z]=(0,Tu.useState)(!1),[h,ee]=(0,Tu.useState)(0),S=(0,Tu.useRef)(null),Z=(0,Tu.useRef)(null);(0,Tu.useEffect)(()=>{let R=()=>{S.current&&ee(S.current.offsetHeight)};R();let $=new ResizeObserver(R);return S.current&&$.observe(S.current),()=>$.disconnect()},[]);let ae=R=>t.find($=>$.id===Number(R)),Ke=R=>a.find($=>$.id===Number(R)),_=R=>{let $={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return $[R]||$.medium},Ie=R=>{if(!R||R?.length===0)return"";let $=R?.trim().split(" ");if($?.length===1)return $[0];let he=$[0],nt=$[$.length-1][0].toUpperCase();return`${he} ${nt}`},De=R=>{let $={},he=[];return R.forEach(nt=>{nt.epic?($[ha(nt.epic)]||($[ha(nt.epic)]=[]),$[ha(nt.epic)].push(nt)):he.push(nt)}),{tasksByEpic:$,unassignedTasks:he}};(0,Tu.useEffect)(()=>{V(a)},[a]);let B=C.filter(R=>{switch(H){default:return!0}}),K=C.filter(R=>l.includes(R.id.toString())),U=e.filter(R=>!R.sprint||R.status==="backlog"),We=U.reduce((R,$)=>R+($.storyPoints||0),0),ie=R=>{c($=>$.includes(R)?$.filter(he=>he!==R):$?.length<3?[...$,R]:$)},L=R=>{m($=>{let he=new Set($);return he.has(R)?he.delete(R):he.add(R),he})},rt=R=>{i(R),g(!1)},Ht=R=>{y(R.id.toString()),T({name:R.name,description:R.description||"",startDate:R.startDate?new Date(R.startDate).toISOString().split("T")[0]:R.startDate,endDate:R.endDate?new Date(R.endDate).toISOString().split("T")[0]:R.endDate,isActive:!1})},Ka=()=>{I&&(n(I,{name:N.name,description:N.description,startDate:N.startDate,endDate:N.endDate}),V(R=>R.map($=>($.id===Number(I)&&($.name=N.name,$.description=N.description,$.startDate=N.startDate,$.endDate=N.endDate),$))),y(null))},Qt=()=>{y(null),T({name:"",description:"",startDate:"",endDate:"",isActive:!1})},it=(R,$)=>{f($),R.dataTransfer.effectAllowed="move"},Ze=R=>{R.preventDefault(),R.dataTransfer.dropEffect="move"},Wt=R=>{D(R)},Ua=()=>{D(null)},Xo=(R,$)=>{if(R.preventDefault(),D(null),!u)return;(ha(u.sprint)||void 0)!==Number($)&&o(u.id.toString(),{sprint:Number($)}),f(null)},Y=({task:R,showSprint:$=!1})=>{let he=R.epic?ae(ha(R.epic).toString()):null,nt=R.sprint?Ke(ha(R.sprint).toString()):null;return(0,Ro.jsx)(O,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:ht=>{ht.dataTransfer.effectAllowed="move",ht.dataTransfer.setData("text/plain",R.id.toString()),it(ht,R)},onClick:ht=>{u===null&&r(R)},style:{userSelect:"none"},children:(0,Ro.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,Ro.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Ro.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:R.name}),(0,Ro.jsx)(te,{className:`text-Ro ${_(R.priority||"medium")}`,children:R.priority?.[0]?.toUpperCase()})]}),(0,Ro.jsxs)("div",{className:"flex items-center justify-between text-Ro",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-1",children:[he&&(0,Ro.jsx)("div",{className:`Ro-2 h-2 rounded-full ${he.color}`}),(0,Ro.jsx)("span",{className:"text-muted-foreground truncate",children:he?.name})]}),(0,Ro.jsx)("span",{className:"text-muted-foreground",children:Ie(R.assignee?.value?.name)})]}),$&&nt&&(0,Ro.jsxs)("div",{className:"flex items-center gap-1 text-Ro text-muted-foreground",children:[(0,Ro.jsx)(Yu.Calendar,{className:"h-3 Ro-3"}),(0,Ro.jsx)("span",{children:nt.name})]})]})})};return(0,Ro.jsxs)("div",{ref:Z,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Ro.jsx)("div",{ref:S,className:"flex-shrink-0",children:(0,Ro.jsx)(Ut,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>g(!0)}})}),(0,Ro.jsx)("div",{className:"flex-1 min-h-0 Yu-8",children:(0,Ro.jsxs)("div",{className:"h-full",style:{height:h>0?`calc(100vh - ${h+120}px)`:"calc(100vh - 12rem)"},children:[(0,Ro.jsxs)("div",{className:"mb-4",children:[(0,Ro.jsx)(O,{className:"p-3 bg-card shadow-sm",children:(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,Ro.jsxs)("p",{className:"text-Ro text-muted-foreground",children:[l?.length,"/3 selected"]})]}),l?.length>0&&(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)("span",{className:"text-Ro text-muted-foreground",children:"Viewing:"}),(0,Ro.jsx)("div",{className:"flex flex-wrap gap-1",children:K.map(R=>(0,Ro.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-Ro",children:[(0,Ro.jsx)("span",{className:"max-Ro-[80px] truncate",children:R.name}),(0,Ro.jsx)("button",{onClick:()=>ie(R.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Ro.jsx)(Yu.Ro,{className:"h-4 Ro-4"})})]},R.id))})]})]}),(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsxs)(x,{onClick:()=>g(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Ro.jsx)(Yu.Plus,{className:"h-3 Ro-3"}),"Add"]}),(0,Ro.jsxs)(x,{onClick:()=>z(!P),variant:"outline",size:"sm",className:"gap-1",children:[(0,Ro.jsx)(Yu.Calendar,{className:"h-3 Ro-3"}),P?"Close":"Select"]})]})]})}),P&&(0,Ro.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>z(!1)}),(0,Ro.jsx)("div",{className:`fixed top-0 right-0 h-full Ro-80 bg-background border-l shadow-Tu z-10 transition-all duration-300 ease-in-out ${P?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,Ro.jsxs)(O,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Ro.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ro.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Ro.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>z(!1),className:"h-8 Ro-8 p-0",children:(0,Ro.jsx)(Yu.Ro,{className:"h-4 Ro-4"})})]}),(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground Yu-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Ro.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Ro.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(R=>(0,Ro.jsxs)(x,{variant:H===R.key?"default":"outline",size:"sm",onClick:()=>A(R.key),className:"text-Ro h-8 px-3 flex-1",children:[R.label," (",R.count,")"]},R.key))}),(0,Ro.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:B.length>0?B.map(R=>{let $=l.includes(R.id.toString()),he=e.filter(we=>ha(we.sprint)===R.id).length,nt=!$&&l.length<3;return(0,Ro.jsx)("div",{className:`p-3 rounded-lg border transition-all ${$?"bg-primary/10 border-primary/30":nt?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:I===R.id.toString()?(0,Ro.jsxs)("div",{className:"space-y-3",children:[(0,Ro.jsx)(J,{value:N.name,onChange:we=>T(et=>({...et,name:we.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Ro.jsx)(qe,{value:N.description,onChange:we=>T(et=>({...et,description:we.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Ro.jsxs)("div",{className:"flex gap-2",children:[(0,Ro.jsxs)(x,{size:"sm",onClick:()=>Ka(),className:"flex-1",children:[(0,Ro.jsx)(Yu.Check,{className:"h-3 Ro-3 Tu-1"}),"Save"]}),(0,Ro.jsxs)(x,{size:"sm",variant:"outline",onClick:Qt,className:"flex-1",children:[(0,Ro.jsx)(Yu.Ro,{className:"h-3 Ro-3 Tu-1"}),"Cancel"]})]})]}):(0,Ro.jsxs)("div",{children:[(0,Ro.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ro.jsxs)("div",{className:"flex-1 min-Ro-0",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Ro.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:R.name}),(0,Ro.jsx)(te,{variant:"default",className:"text-Ro bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground line-clamp-2 mb-2",children:R.description}),(0,Ro.jsxs)("div",{className:"flex items-center gap-3 text-Ro text-muted-foreground",children:[(0,Ro.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Ro.jsx)(Yu.CalendarDays,{className:"h-3 Ro-3"}),new Date(R.startDate).toLocaleDateString()]}),(0,Ro.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Ro.jsx)(Yu.User,{className:"h-3 Ro-3"}),he," tasks"]})]})]}),(0,Ro.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Ro.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>Ht(R),className:"h-6 Ro-6 p-0",children:(0,Ro.jsx)(Yu.Edit2,{className:"h-3 Ro-3"})}),(0,Ro.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>s(R.id.toString()),className:"h-6 Ro-6 p-0 text-destructive hover:text-destructive",children:(0,Ro.jsx)(Yu.Trash2,{className:"h-3 Ro-3"})})]})]}),(0,Ro.jsx)("div",{className:"flex items-center justify-between Yu-2",children:(0,Ro.jsx)(x,{variant:$?"default":"outline",size:"sm",className:"text-Ro Ro-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>ie(R.id.toString()),disabled:!$&&l?.length>=3,children:(0,Ro.jsx)("span",{className:"pointer-events-none select-none",children:$?"Deselect":l?.length>=3?"Limit Reached":"Select"})})})]})},R.id)}):(0,Ro.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Ro.jsx)(Yu.Calendar,{className:"h-8 Ro-8 mx-auto mb-2 opacity-50"}),(0,Ro.jsxs)("p",{className:"text-sm",children:['Ro sprints found for "',H,'" filter']}),(0,Ro.jsx)(x,{variant:"link",size:"sm",onClick:()=>A("all"),className:"text-Ro",children:"Show all sprints"})]})}),l?.length===0&&(0,Ro.jsx)("div",{className:"Yu-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Ro.jsxs)("div",{className:"text-center",children:[(0,Ro.jsx)(Yu.Calendar,{className:"h-6 Ro-6 mx-auto mb-2 text-muted-foreground"}),(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Ro.jsx)("p",{className:"text-Ro text-muted-foreground Yu-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Ro.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Ro.jsx)("div",{className:"lg:col-span-1",children:(0,Ro.jsxs)(O,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Ze,onDragEnter:()=>Wt("backlog"),onDragLeave:Ua,onDrop:R=>Xo(R,"backlog"),style:{height:h>0?`calc(100vh - ${h+200}px)`:"calc(100vh - 16rem)"},children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Ro.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsxs)(te,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[U?.length," tasks"]}),(0,Ro.jsxs)(te,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[We," pts"]})]})]}),(0,Ro.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${v==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:R,unassignedTasks:$}=De(U);return(0,Ro.jsxs)(Ro.Fragment,{children:[Object.entries(R).map(([he,nt])=>{let we=ae(he);if(!we)return null;let et=d.has(he);return(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Ro cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>L(he),children:[(0,Ro.jsx)("div",{className:`Ro-3 h-3 rounded-full ${we.color}`}),(0,Ro.jsx)("span",{className:"font-medium text-muted-foreground",children:we.name}),(0,Ro.jsxs)("span",{className:"text-muted-foreground",children:["(",nt?.length,")"]}),(0,Ro.jsx)("div",{className:"ml-auto",children:et?(0,Ro.jsx)(Yu.ChevronDown,{className:"h-3 Ro-3 text-muted-foreground"}):(0,Ro.jsx)(Yu.ChevronUp,{className:"h-3 Ro-3 text-muted-foreground"})})]}),!et&&(0,Ro.jsx)("div",{className:"space-y-2 pl-2",children:nt.map(ht=>(0,Ro.jsx)(Y,{task:ht},ht.id))})]},he)}),$?.length>0&&(()=>{let he=d.has("Ro-epic");return(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Ro cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>L("Ro-epic"),children:[(0,Ro.jsx)("div",{className:"Ro-3 h-3 rounded-full bg-gray-400"}),(0,Ro.jsx)("span",{className:"font-medium text-muted-foreground",children:"Ro Epic"}),(0,Ro.jsxs)("span",{className:"text-muted-foreground",children:["(",$?.length,")"]}),(0,Ro.jsx)("div",{className:"ml-auto",children:he?(0,Ro.jsx)(Yu.ChevronDown,{className:"h-3 Ro-3 text-muted-foreground"}):(0,Ro.jsx)(Yu.ChevronUp,{className:"h-3 Ro-3 text-muted-foreground"})})]}),!he&&(0,Ro.jsx)("div",{className:"space-y-2 pl-2",children:$?.map(nt=>(0,Ro.jsx)(Y,{task:nt},nt.id))})]})})(),U?.length===0&&(0,Ro.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),U?.length>0&&Object.keys(R).length===0&&$.length===0&&(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)("div",{className:"text-Ro text-muted-foreground mb-2",children:"Direct backlog tasks:"}),U?.map(he=>(0,Ro.jsx)(Y,{task:he},he.id))]})]})})()})]})}),K.map(R=>{let $=e.filter(nt=>ha(nt?.sprint)===R.id),he=$.reduce((nt,we)=>nt+(we?.storyPoints||0),0);return(0,Ro.jsxs)(O,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Ze,onDragEnter:()=>Wt(R.id.toString()),onDragLeave:Ua,onDrop:nt=>Xo(nt,R.id.toString()),style:{height:h>0?`calc(100vh - ${h+200}px)`:"calc(100vh - 16rem)"},children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Ro.jsx)("div",{children:(0,Ro.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:R.name})}),(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsxs)(te,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[$?.length," tasks"]}),(0,Ro.jsxs)(te,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[he," pts"]}),(0,Ro.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>{z(!0),Ht(R)},className:"h-6 px-2",children:(0,Ro.jsx)(Yu.Edit2,{className:"h-3 Ro-3"})}),(0,Ro.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>s(R.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Ro.jsx)(Yu.Trash2,{className:"h-3 Ro-3"})})]})]}),(0,Ro.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:nt,unassignedTasks:we}=De($);return(0,Ro.jsxs)(Ro.Fragment,{children:[Object.entries(nt).map(([et,ht])=>{let xi=ae(et);if(!xi)return null;let fr=d.has(et);return(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Ro cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>L(et),children:[(0,Ro.jsx)("div",{className:`Ro-3 h-3 rounded-full ${xi.color}`}),(0,Ro.jsx)("span",{className:"font-medium text-muted-foreground",children:xi.name}),(0,Ro.jsxs)("span",{className:"text-muted-foreground",children:["(",ht?.length,")"]}),(0,Ro.jsx)("div",{className:"ml-auto",children:fr?(0,Ro.jsx)(Yu.ChevronDown,{className:"h-3 Ro-3 text-muted-foreground"}):(0,Ro.jsx)(Yu.ChevronUp,{className:"h-3 Ro-3 text-muted-foreground"})})]}),!fr&&(0,Ro.jsx)("div",{className:"space-y-2 pl-2",children:ht?.map(Qi=>(0,Ro.jsx)(Y,{task:Qi},Qi.id))})]},et)}),we?.length>0&&(()=>{let et=d.has("Ro-epic");return(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Ro cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>L("Ro-epic"),children:[(0,Ro.jsx)("div",{className:"Ro-3 h-3 rounded-full bg-gray-400"}),(0,Ro.jsx)("span",{className:"font-medium text-muted-foreground",children:"Ro Epic"}),(0,Ro.jsxs)("span",{className:"text-muted-foreground",children:["(",we?.length,")"]}),(0,Ro.jsx)("div",{className:"ml-auto",children:et?(0,Ro.jsx)(Yu.ChevronDown,{className:"h-3 Ro-3 text-muted-foreground"}):(0,Ro.jsx)(Yu.ChevronUp,{className:"h-3 Ro-3 text-muted-foreground"})})]}),!et&&(0,Ro.jsx)("div",{className:"space-y-2 pl-2",children:we?.map(ht=>(0,Ro.jsx)(Y,{task:ht},ht.id))})]})})(),$?.length===0&&(0,Ro.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},R.id)})]}),(0,Ro.jsx)(Ib,{isOpen:b,onClose:()=>g(!1),onAddSprint:rt})]})})]})};var Sx=e=>e.toLocaleDateString("gf-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),Px=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("gf-US",{hour:"numeric",minute:"2-digit",hour12:!0})},ou=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[r,i]=t.split(":");o.setHours(parseInt(r),parseInt(i))}return o<a},ru=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Dx=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Tx=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[r,i]=(0,Tu.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[n,s]=(0,Tu.useState)(!1),l=d=>{if(d.preventDefault(),!e.find(f=>f?.id.toString()===r.colleagueId.toString())){console.error("Ro valid colleague selected"),s(!0);return}s(!1);let u={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};t(u),o(!1),i({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,Tu.useEffect)(()=>{r.colleagueId&&s(!1)},[r.colleagueId]);let c=e.filter(Boolean);return(0,Ro.jsx)(Rt,{open:a,onOpenChange:o,children:(0,Ro.jsxs)(wt,{className:"max-Ro-2xl",children:[(0,Ro.jsx)(Mt,{children:(0,Ro.jsx)(Bt,{children:"Add New Reminder"})}),(0,Ro.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,Ro.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{htmlFor:"title",children:"Title"}),(0,Ro.jsx)(J,{id:"title",value:r.title,onChange:d=>i({...r,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Ro.jsx)(qe,{id:"description",value:r.description,onChange:d=>i({...r,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Ro.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{htmlFor:"dueDate",children:"Due Date"}),(0,Ro.jsx)(J,{id:"dueDate",type:"date",value:r.dueDate,onChange:d=>i({...r,dueDate:d.target.value}),required:!0})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Ro.jsx)(J,{id:"dueTime",type:"time",value:r.dueTime,onChange:d=>i({...r,dueTime:d.target.value})})]})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{className:`${n?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Ro.jsxs)(yt,{value:r.colleagueId,onValueChange:d=>{i({...r,colleagueId:d})},required:!0,children:[(0,Ro.jsx)(pt,{className:`${n?"text-destructive border-red-500":""}`,children:(0,Ro.jsx)(Ot,{className:`${n?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Ro.jsx)(ut,{children:c.map(d=>(0,Ro.jsx)(Pe,{value:d.id.toString(),children:d.name},d.id))})]}),n&&(0,Ro.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:d=>i({...r,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Ro.jsx)(M,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,Ro.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Ro.jsxs)(yt,{value:r.recurrencePattern,onValueChange:d=>i({...r,recurrencePattern:d}),children:[(0,Ro.jsx)(pt,{children:(0,Ro.jsx)(Ot,{})}),(0,Ro.jsxs)(ut,{children:[(0,Ro.jsx)(Pe,{value:"daily",children:"Daily"}),(0,Ro.jsx)(Pe,{value:"weekly",children:"Weekly"}),(0,Ro.jsx)(Pe,{value:"monthly",children:"Monthly"}),(0,Ro.jsx)(Pe,{value:"yearly",children:"Yearly"})]})]})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Ro.jsx)(J,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:d=>i({...r,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Ro.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Ro.jsx)(x,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,Ro.jsx)(x,{type:"submit",children:"Add Reminder"})]})]})]})})},Rx=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[i,n]=(0,Tu.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),s=c=>{c.preventDefault(),a(e.id.toString(),{title:i.title,description:i.description,dueDate:new Date(i.dueDate||"").toISOString(),dueTime:i.dueTime||void 0,isRecurring:i.isRecurring}),r()},l=t.filter(Boolean);return(0,Ro.jsx)(Rt,{open:o,onOpenChange:r,children:(0,Ro.jsxs)(wt,{className:"max-Ro-2xl",children:[(0,Ro.jsx)(Mt,{children:(0,Ro.jsx)(Bt,{children:"Edit Reminder"})}),(0,Ro.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Ro.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{htmlFor:"edit-title",children:"Title"}),(0,Ro.jsx)(J,{id:"edit-title",value:i.title,onChange:c=>n({...i,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{htmlFor:"edit-description",children:"Description"}),(0,Ro.jsx)(qe,{id:"edit-description",value:i.description||"",onChange:c=>n({...i,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Ro.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Ro.jsx)(J,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:c=>n({...i,dueDate:c.target.value}),required:!0})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)(M,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Ro.jsx)(J,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:c=>n({...i,dueTime:c.target.value})})]})]}),(0,Ro.jsx)("div",{className:"space-y-2",children:(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring||!1,onChange:c=>n({...i,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,Ro.jsx)(M,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,Ro.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Ro.jsx)(x,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,Ro.jsx)(x,{type:"submit",children:"Save Changes"})]})]})]})})},Ax=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,i]=(0,Tu.useState)(!1);if(!e||!e.id)return null;let n=ou(new Date(e.dueDate||""),e.dueTime||""),s=ru(new Date(e.dueDate||"")),l=Dx(new Date(e.dueDate||"")),c=()=>{a(e.id.toString(),{})},d=()=>s?"Today":l?"Tomorrow":Sx(new Date(e.dueDate||""));return(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)(Rx,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>i(!1)}),(0,Ro.jsx)(O,{children:(0,Ro.jsx)(Q,{className:"p-4",children:(0,Ro.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ro.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Ro.jsx)("button",{onClick:c,className:"Yu-1 text-primary hover:text-primary/80"}),(0,Ro.jsxs)("div",{className:"flex-1",children:[(0,Ro.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,Ro.jsx)("h3",{children:e.title})}),(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Ro.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Ro.jsx)(Yu.Calendar,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{className:n?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,Ro.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Ro.jsx)(Yu.Clock,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{children:Px(e.dueTime)})]}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Ro.jsx)(Yu.User,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Ro.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>i(!0),className:"h-8 Ro-8 p-0",children:(0,Ro.jsx)(Yu.Edit2,{className:"h-4 Ro-4"})}),(0,Ro.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 Ro-8 p-0 text-destructive hover:text-destructive/80",children:(0,Ro.jsx)(Yu.Trash2,{className:"h-4 Ro-4"})})]})]})})})]})},iu=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[i,n]=(0,Tu.useState)(e.filter(Boolean)),[s,l]=(0,Tu.useState)(t.filter(Boolean)),[c,d]=(0,Tu.useState)("all"),[m,u]=(0,Tu.useState)(""),[f,b]=(0,Tu.useState)(!1);(0,Tu.useEffect)(()=>{n(e.filter(Boolean))},[e]),(0,Tu.useEffect)(()=>{l(t.filter(Boolean))},[t]);let g=C=>{if(!C.title){console.error("Invalid reminder data:",C);return}let V={...C,id:Date.now(),createdAt:new Date().toISOString()};n(H=>[...H,V]),a?.(C)},v=(C,V)=>{if(!C){console.error("Ro reminder ID provided for update");return}n(H=>H.map(A=>A?.id.toString()===C?{...A,...V}:A)),o?.(C,V)},D=C=>{if(!C){console.error("Ro reminder ID provided for deletion");return}n(V=>V.filter(H=>H?.id.toString()!==C)),r?.(C)},y=i.filter(C=>{if(!C)return!1;if(m){let V=m.toLowerCase();if(!(C.title.toLowerCase().includes(V)||C.description?.toLowerCase().includes(V)))return!1}switch(c){case"pending":case"completed":case"overdue":return ou(new Date(C.dueDate||""),C.dueTime||"");case"today":return ru(new Date(C.dueDate||""));default:return!0}}).sort((C,V)=>{if(!C||!V)return 0;let H={high:3,medium:2,low:1},A=0;return A!==0?A:new Date(C.dueDate||"").getTime()-new Date(V.dueDate||"").getTime()}),N={total:i.filter(Boolean).length,overdue:i.filter(C=>C&&ou(new Date(C.dueDate||""),C.dueTime||"")).length,today:i.filter(C=>C&&ru(new Date(C.dueDate||""))).length},T=s.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,Ro.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Ro.jsx)(Ut,{title:"Task Reminders",description:"Manage reminders and stay on top Ro important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,Ro.jsxs)("div",{className:"h-full bg-background",children:[(0,Ro.jsx)(Tx,{colleagues:s,onAddReminder:g,open:f,setOpen:b}),(0,Ro.jsxs)("div",{className:"p-6",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Ro.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Ro.jsxs)(x,{className:"flex items-center space-x-2",onClick:()=>b(!0),children:[(0,Ro.jsx)(Yu.Plus,{className:"h-4 Ro-4"}),(0,Ro.jsx)("span",{children:"Add Reminder"})]})]}),(0,Ro.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Ro.jsxs)(O,{className:"p-4",children:[(0,Ro.jsx)("div",{className:"text-2xl font-bold text-foreground",children:N.total}),(0,Ro.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Ro.jsxs)(O,{className:"p-4",children:[(0,Ro.jsx)("div",{className:"text-2xl font-bold text-primary",children:N.overdue}),(0,Ro.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Ro.jsxs)(O,{className:"p-4",children:[(0,Ro.jsx)("div",{className:"text-2xl font-bold text-success",children:N.today}),(0,Ro.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Ro.jsxs)(O,{className:"p-4",children:[(0,Ro.jsx)("div",{className:"text-2xl font-bold text-destructive",children:N.overdue}),(0,Ro.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Ro.jsxs)(O,{className:"p-4",children:[(0,Ro.jsx)("div",{className:"text-2xl font-bold text-warning",children:N.today}),(0,Ro.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Ro.jsx)("div",{className:"flex-1",children:(0,Ro.jsx)(J,{placeholder:"Search reminders...",value:m,onChange:C=>u(C.target.value),className:"max-Ro-md"})}),(0,Ro.jsxs)(yt,{value:c,onValueChange:C=>d(C),children:[(0,Ro.jsx)(pt,{className:"Ro-40",children:(0,Ro.jsx)(Ot,{})}),(0,Ro.jsxs)(ut,{children:[(0,Ro.jsxs)(Pe,{value:"all",children:["All (",N.total,")"]}),(0,Ro.jsxs)(Pe,{value:"overdue",children:["Overdue (",N.overdue,")"]}),(0,Ro.jsxs)(Pe,{value:"overdue",children:["Overdue (",N.overdue,")"]}),(0,Ro.jsxs)(Pe,{value:"today",children:["Today (",N.today,")"]})]})]})]}),(0,Ro.jsx)("div",{className:"space-y-4",children:y.length===0?(0,Ro.jsxs)(O,{className:"p-8 text-center",children:[(0,Ro.jsx)("div",{className:"text-muted-foreground",children:m||c!=="all"?"Ro reminders match your filters":"Ro reminders yet"}),!m&&c==="all"&&(0,Ro.jsx)("p",{className:"text-sm text-muted-foreground/60 Yu-2",children:"Create your first reminder to get started"})]}):y.map(C=>C&&(0,Ro.jsx)(Ax,{reminder:C,colleagues:s,onUpdateReminder:v,onDeleteReminder:D},C.id))})]})]})]})};function su({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:i=[],initialColleagues:n=[],initialUsers:s=[],initialFiles:l=[],initialView:c="kanban",onAddTask:d,onUpdateTask:m,onDeleteTask:u,onTaskClick:f,onAddEpic:b,onUpdateEpic:g,onDeleteEpic:v,onAddTaskToEpic:D,onAddSprint:I,onUpdateSprint:y,onDeleteSprint:N,onAddProject:T,onUpdateProject:C,onDeleteProject:V,onFileAdd:H,onFileEdit:A,onFileDelete:P,onFileClick:z,onAddReminder:h,onUpdateReminder:ee,onDeleteReminder:S,onViewChange:Z,onToggleMobileMenu:ae,onTeamClick:Ke,onTeamChange:_,onCopilotClick:Ie,handleAddComment:De}){let[B,K]=(0,Tu.useState)(t),[U,We]=(0,Tu.useState)(a),[ie,L]=(0,Tu.useState)(o),[rt,Ht]=(0,Tu.useState)(r),[Ka,Qt]=(0,Tu.useState)(i),[it,Ze]=(0,Tu.useState)(n),[Wt,Ua]=(0,Tu.useState)(s),[Xo,Y]=(0,Tu.useState)(l),[R,$]=(0,Tu.useState)(!1),[he,nt]=(0,Tu.useState)(!1),[we,et]=(0,Tu.useState)(null),[ht,xi]=(0,Tu.useState)(null),[fr,Qi]=(0,Tu.useState)(null),[zr,Ms]=(0,Tu.useState)(c||"kanban"),[Yx,o0]=(0,Tu.useState)(!1),r0=(0,gf.useRouter)();(0,Tu.useEffect)(()=>{K(t)},[t]),(0,Tu.useEffect)(()=>{L(o)},[o]),(0,Tu.useEffect)(()=>{We(a)},[a]),(0,Tu.useEffect)(()=>{Ht(r)},[r]),(0,Tu.useEffect)(()=>{Y(l)},[l]),(0,Tu.useEffect)(()=>{Ua(s)},[s]),(0,Tu.useEffect)(()=>{Ze(n)},[n]),(0,Tu.useEffect)(()=>{Qt(i)},[i]),(0,Tu.useEffect)(()=>{Ms(c)},[c]);let i0=B.filter(W=>{}),Jx=W=>i0.filter(ve=>ve.status===W),Qx=W=>{let ve={};return U.forEach(Fe=>{}),ve},Zx=W=>{Qi(W)},ew=W=>{fr&&(K(ve=>ve.map(Fe=>Fe.id===fr.id?{...Fe,status:W}:Fe)),Qi(null))},gu=W=>{let ve={...W,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};K(Fe=>[...Fe,ve]),d?.(ve)},Il=async(W,ve)=>(K(Fe=>Fe.map(Aa=>Aa.id===Number(W)?{...Aa,...ve}:Aa)),await m?.(W,ve)),tw=async(W,ve)=>{Il(W,ve)},fu=W=>{K(ve=>ve.filter(Fe=>Fe.id!==Number(W))),we?.id===Number(W)&&et(null),u?.(W)},aw=async W=>{fu(W)},ow=W=>{let ve={...W,id:Date.now()};Ht(Fe=>[...Fe,ve]),T?.(W)},rw=(W,ve)=>{Ht(Fe=>Fe.map(Aa=>Aa.id===Number(W)?{...Aa,...ve}:Aa)),C?.(W,ve)},iw=W=>{Ht(ve=>ve.filter(Fe=>Fe.id!==Number(W))),V?.(W)},vu=W=>{let ve={...W,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};We(Fe=>[...Fe,ve]),b?.({...ve})},s0=()=>{nt(!0)},n0=(W,ve)=>{We(Fe=>Fe.map(Aa=>Aa.id===Number(W)?{...Aa,...ve}:Aa)),g?.(W,ve)},l0=W=>{We(ve=>ve.filter(Fe=>Fe.id!==Number(W))),K(ve=>ve.filter(Fe=>ha(Fe.epic)!==Number(W))),v?.(W)},d0=W=>{let ve={...W,id:Date.now()};L(Fe=>[...Fe,ve]),I?.(W)},c0=(W,ve)=>{L(Fe=>Fe.map(Aa=>Aa.id===Number(W)?{...Aa,...ve}:Aa)),y?.(W,ve)},m0=W=>{W==="backlog"||W==="all-tasks"||(L(ve=>ve.filter(Fe=>Fe.id!==Number(W))),K(ve=>ve.map(Fe=>ha(Fe.sprint)===Number(W)?{...Fe,sprint:void 0}:Fe)),N?.(W))},Ic=W=>{et(W)},p0=W=>{W==="planning"&&window.innerWidth<768||(Ms(W),Z?.(W))},sw=()=>{o0(W=>!W),ae?.()},nw=()=>{r0.push("/")},lw=W=>{console.log("Switching to team:",W)},dw=W=>{console.log("Switching to team:",W)},u0=W=>{$(!0)},g0=()=>{$(!1),xi(null)},f0=W=>{let ve={...W,id:Date.now(),createdAt:new Date().toISOString()};Qt(Fe=>[...Fe,ve]),h?.(W)},v0=(W,ve)=>{Qt(Fe=>Fe.map(Aa=>Aa.id===Number(W)?{...Aa,...ve}:Aa)),ee?.(W,ve)},b0=W=>{Qt(ve=>ve.filter(Fe=>Fe.id!==Number(W))),S?.(W)},h0=()=>{H?.()},y0=W=>{A?.(W)},x0=W=>{Y(ve=>ve.filter(Fe=>Fe.name!==W)),P?.(W)},w0=W=>{z?.(W)},cw=[{id:"todo",title:"Yu Ro",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],mw=()=>{switch(zr){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},Mc=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],pw=Mc.sort((W,ve)=>ve.lastUsed.getTime()-W.lastUsed.getTime()).slice(0,3),uw=Mc.length>3,gw=Mc.slice(3);return(0,Ro.jsxs)(kb,{currentView:zr,onViewChange:p0,children:[zr==="kanban"&&(0,Ro.jsx)("div",{className:"h-full overflow-hidden",children:(0,Ro.jsx)(Zp,{initialProjects:rt,initialEpics:U,initialSprints:ie.map(W=>({...W,isSelected:!1})),initialTasks:B,initialColleagues:it,initialUsers:Wt,onAddTask:gu,onUpdateTask:Il,onDeleteTask:fu,onTaskClick:Ic,onAddEpic:vu,onAddComment:De})}),zr==="planning"&&(0,Ro.jsx)("div",{className:"hidden md:block h-full",children:(0,Ro.jsx)(Pc,{tasks:B,epics:U,sprints:ie,onUpdateTask:Il,onTaskClick:Ic,onAddSprint:d0,onUpdateSprint:c0,onDeleteSprint:m0})}),zr==="tasks"&&(0,Ro.jsx)("div",{className:"h-full",children:(0,Ro.jsx)(iu,{initialReminders:Ka,initialColleagues:it,onAddReminder:f0,onUpdateReminder:v0,onDeleteReminder:b0})}),zr==="files"&&(0,Ro.jsx)("div",{className:"h-full",children:(0,Ro.jsx)(Dl,{initialFiles:Xo,onFileAdd:h0,onFileEdit:y0,onFileDelete:x0,onFileClick:w0,compactView:!1})}),zr==="epics"&&(0,Ro.jsx)("div",{className:"h-full",children:(0,Ro.jsx)(eu,{tasks:B,epics:U,sprints:ie,onUpdateTask:Il,onTaskClick:Ic,onAddTaskToEpic:u0,onAddEpic:s0,onUpdateEpic:n0,onDeleteEpic:l0})}),(0,Ro.jsx)(yn,{isOpen:R,onClose:g0,onAddTask:gu,epics:U,sprints:ie,assignees:[...it,...Wt],defaultEpicId:ht||void 0}),(0,Ro.jsx)(wn,{isOpen:he,onClose:()=>nt(!1),onAddEpic:vu})]})}var Bb=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:r=""})=>{let[i,n]=(0,Tu.useState)({name:o?.name||"",description:o?.description||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[s,l]=(0,Tu.useState)({}),c=()=>{let u={};return i.name.trim()?i.name.trim().length<3&&(u.name="Project name must Ro Ro least 3 characters"):u.name="Project name Ro required",i.objectives.trim()?i.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (Ro least 10 characters)"):u.objectives="Project objectives are required",i.workInstructions.trim()?i.workInstructions.trim().length<20&&(u.workInstructions="Please provide more detailed work instructions (Ro least 20 characters)"):u.workInstructions="Work instructions are required",l(u),Object.keys(u).length===0},d=async u=>{if(u.preventDefault(),!!c())try{await e(i)}catch(f){console.error("Error submitting project form:",f)}},m=(u,f)=>{n(b=>({...b,[u]:f})),s[u]&&l(b=>({...b,[u]:void 0}))};return(0,Ro.jsxs)("div",{className:`Ro-full max-Ro-2xl ${r}`,children:[(0,Ro.jsxs)("div",{className:"mb-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.Plus,{className:"h-5 Ro-5"}),"Create New Project"]}),(0,Ro.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),(0,Ro.jsxs)("form",{onSubmit:d,children:[(0,Ro.jsxs)("div",{className:"space-y-6",children:[(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,Ro.jsx)(J,{id:"name",type:"text",placeholder:"Enter project name",value:i.name,onChange:u=>m("name",u.target.value),className:s.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),s.name&&(0,Ro.jsx)("p",{className:"text-sm text-red-600",children:s.name})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"name",className:"text-sm font-medium",children:"Project Description *"}),(0,Ro.jsx)(J,{id:"description",type:"text",placeholder:"Enter project description",value:i.description,onChange:u=>m("description",u.target.value),className:s.description?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),s.description&&(0,Ro.jsx)("p",{className:"text-sm text-red-600",children:s.description})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,Ro.jsx)(qe,{id:"objectives",placeholder:"Describe the main goals and objectives Ro this project...",value:i.objectives,onChange:u=>m("objectives",u.target.value),className:`min-h-[100px] resize-y ${s.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,Ro.jsxs)("div",{className:"flex justify-between text-Ro text-gray-500",children:[(0,Ro.jsx)("span",{children:s.objectives&&(0,Ro.jsx)("span",{className:"text-red-600",children:s.objectives})}),(0,Ro.jsxs)("span",{children:[i.objectives.length,"/1000"]})]})]}),(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,Ro.jsx)(qe,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should Ro carried out, including processes, standards, and expectations...",value:i.workInstructions,onChange:u=>m("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${s.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,Ro.jsxs)("div",{className:"flex justify-between text-Ro text-gray-500",children:[(0,Ro.jsx)("span",{children:s.workInstructions&&(0,Ro.jsx)("span",{className:"text-red-600",children:s.workInstructions})}),(0,Ro.jsxs)("span",{children:[i.workInstructions.length,"/2000"]})]})]}),(0,Ro.jsxs)("div",{className:"space-y-3",children:[(0,Ro.jsx)(M,{className:"text-sm font-medium",children:"Project Management"}),(0,Ro.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(ro,{id:"plan",checked:i.plan,onCheckedChange:u=>m("plan",u===!0),disabled:a}),(0,Ro.jsx)(M,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,Ro.jsx)("p",{className:"text-Ro text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),(0,Ro.jsxs)("div",{className:"flex justify-end gap-3",children:[t&&(0,Ro.jsxs)(x,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.Ro,{className:"h-4 Ro-4"}),"Cancel"]}),(0,Ro.jsx)(x,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)(Yu.Loader2,{className:"h-4 Ro-4 animate-spin"}),"Creating..."]}):(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)(Yu.Plus,{className:"h-4 Ro-4"}),"Create Project"]})})]})]})]})};function du({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[r,i]=(0,Tu.useState)(!1),[n,s]=(0,Tu.useState)(!1),l=async d=>{s(!0);try{await t(d),i(!1)}catch(m){console.error("Error creating project:",m)}finally{s(!1)}},c=()=>{i(!0)};return(0,Ro.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Ro.jsx)(Ut,{title:"Project Management",description:"Organize your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,Ro.jsxs)("section",{className:"space-y-4 Yu-8",children:[(0,Ro.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Ro.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(d=>(0,Ro.jsx)(vn,{project:d,onOpen:a,onShare:o},d.id))})]})]},"projects-index-view")}),(0,Ro.jsx)(Rt,{open:r,onOpenChange:i,children:(0,Ro.jsxs)(wt,{className:"max-Ro-3xl max-h-[90vh] overflow-y-auto",children:[(0,Ro.jsxs)(Mt,{className:"Tu-only",children:[(0,Ro.jsx)(Bt,{children:"Create New Project"}),(0,Ro.jsx)(ns,{children:"Fill out the form below to create a new project."})]}),(0,Ro.jsx)(Bb,{onSubmit:l,onCancel:()=>i(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function Eb({team:e,onOpen:t,className:a}){return(0,Ro.jsx)(Ys.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,Ro.jsxs)(O,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Ro.jsxs)(ye,{children:[(0,Ro.jsx)(Ne,{className:"text-lg",children:e.name}),(0,Ro.jsx)(kr,{className:"Yu-1 text-sm",children:e.description})]}),(0,Ro.jsxs)(Q,{className:"space-y-4",children:[(0,Ro.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.Users,{className:"h-4 Ro-4 text-blue-500"}),(0,Ro.jsx)("span",{children:"Human"})]}),(0,Ro.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,Ro.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.Bot,{className:"h-4 Ro-4 text-purple-500"}),(0,Ro.jsx)("span",{children:"Digital"})]}),(0,Ro.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,Ro.jsxs)("div",{className:"flex items-center justify-between text-sm border-t pt-4",children:[(0,Ro.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ro.jsx)(Yu.FolderOpen,{className:"h-4 Ro-4 text-green-500"}),(0,Ro.jsx)("span",{children:"Projects"})]}),(0,Ro.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,Ro.jsx)(Bo,{className:"flex gap-2",children:(0,Ro.jsx)(x,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function cu({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,r]=(0,Tu.useState)(!1),i=()=>{r(!0)},n=async c=>{await t?.(c),r(!1)},s=()=>{r(!1)},l=c=>{a?.(c)};return(0,Ro.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Ro.jsx)(Ys.AnimatePresence,{mode:"wait",children:(0,Ro.jsxs)(Ys.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Ro.jsx)(Ut,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:i}}),(0,Ro.jsxs)("section",{className:"space-y-4 Yu-8",children:[(0,Ro.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,Ro.jsxs)("div",{className:"text-center py-12",children:[(0,Ro.jsx)("p",{className:"text-muted-foreground text-lg",children:"You'Ro not part Ro any teams yet."}),(0,Ro.jsx)("p",{className:"text-muted-foreground text-sm Yu-2",children:"Create a new team Ro ask to Ro added to So existing one."})]}):(0,Ro.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(c=>(0,Ro.jsx)(Eb,{team:c,onOpen:l},c.id))})]})]},"teams-index-view")}),(0,Ro.jsx)(Rt,{open:o,onOpenChange:r,children:(0,Ro.jsxs)(wt,{className:"max-Ro-4xl max-h-[90vh] overflow-y-auto",children:[(0,Ro.jsx)("div",{className:"Tu-only",children:(0,Ro.jsxs)(Mt,{children:[(0,Ro.jsx)(Bt,{children:"Create New Team"}),(0,Ro.jsx)(ns,{children:"Set up a new team to collaborate with colleagues on projects."})]})}),(0,Ro.jsx)(uc,{title:"Create New Team",submitLabel:"Create Team",onSave:n,onCancel:s})]})})]})}function zb({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[s,l]=(0,Tu.useState)(""),[c,d]=(0,Tu.useState)([]),[m,u]=(0,Tu.useState)(!1);(0,Tu.useEffect)(()=>{if(!s.trim()){d([]),u(!1);return}let v=a.filter(D=>{if(e.map(N=>N.id).includes(D.id))return!1;let y=s.toLowerCase();return D.title.toLowerCase().includes(y)||D.description?.toLowerCase().includes(y)||D.tags?.some(N=>N.toLowerCase().includes(y))||Object.values(D.metadata||{}).some(N=>String(N).toLowerCase().includes(y))});d(v),u(!0)},[s,e,a]);let f=v=>{i&&e.length>=i||(t([...e,v]),l(""),u(!1))},b=v=>{t(e.filter(D=>D.id!==v))},g=!i||e.length<i;return(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsx)(M,{children:o}),(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsx)(Yu.Search,{className:"absolute left-3 top-3 h-4 Ro-4 text-muted-foreground"}),(0,Ro.jsx)(J,{value:s,onChange:v=>l(v.target.value),placeholder:g?r:`Maximum ${i} documents selected`,className:"pl-9",disabled:n||!g,onFocus:()=>s&&u(!0)})]}),m&&c.length>0&&(0,Ro.jsx)(O,{className:"absolute top-full left-0 right-0 z-10 Yu-1 max-h-60",children:(0,Ro.jsx)(sa,{className:"h-full",children:(0,Ro.jsx)(Q,{className:"p-2",children:c.map(v=>(0,Ro.jsx)(x,{variant:"ghost",className:"Ro-full justify-start h-auto p-3 mb-1",onClick:()=>f(v),disabled:n,children:(0,Ro.jsxs)("div",{className:"flex items-start gap-3 Ro-full",children:[(0,Ro.jsx)(Yu.FileText,{className:"h-4 Ro-4 Yu-0.5 text-muted-foreground flex-shrink-0"}),(0,Ro.jsxs)("div",{className:"text-left flex-1 min-Ro-0",children:[(0,Ro.jsx)("div",{className:"font-medium text-sm truncate",children:v.title}),v.description&&(0,Ro.jsx)("div",{className:"text-Ro text-muted-foreground Yu-1 line-clamp-2",children:v.description}),v.tags&&v.tags.length>0&&(0,Ro.jsxs)("div",{className:"flex flex-wrap gap-1 Yu-2",children:[v.tags.slice(0,3).map(D=>(0,Ro.jsx)(te,{variant:"outline",className:"text-Ro",children:D},D)),v.tags.length>3&&(0,Ro.jsxs)(te,{variant:"outline",className:"text-Ro",children:["+",v.tags.length-3," more"]})]})]})]})},v.id))})})}),m&&s&&c.length===0&&(0,Ro.jsx)(O,{className:"absolute top-full left-0 right-0 z-10 Yu-1",children:(0,Ro.jsxs)(Q,{className:"p-4 text-center text-sm text-muted-foreground",children:['Ro knowledge documents found for "',s,'"']})})]}),e.length>0&&(0,Ro.jsxs)("div",{className:"space-y-2",children:[(0,Ro.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,Ro.jsx)("div",{className:"space-y-2",children:e.map(v=>(0,Ro.jsx)(O,{className:"p-3",children:(0,Ro.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Ro.jsx)(Yu.FileText,{className:"h-4 Ro-4 Yu-0.5 text-muted-foreground flex-shrink-0"}),(0,Ro.jsxs)("div",{className:"flex-1 min-Ro-0",children:[(0,Ro.jsx)("div",{className:"font-medium text-sm",children:v.title}),v.description&&(0,Ro.jsx)("div",{className:"text-Ro text-muted-foreground Yu-1",children:v.description}),v.tags&&v.tags.length>0&&(0,Ro.jsx)("div",{className:"flex flex-wrap gap-1 Yu-2",children:v.tags.map(D=>(0,Ro.jsxs)(te,{variant:"outline",className:"text-Ro",children:[(0,Ro.jsx)(Yu.Tag,{className:"h-3 Ro-3 Tu-1"}),D]},D))})]}),(0,Ro.jsx)(x,{type:"button",variant:"ghost",size:"icon",className:"h-6 Ro-6 flex-shrink-0",onClick:()=>b(v.id),disabled:n,children:(0,Ro.jsx)(Yu.Ro,{className:"h-3 Ro-3"})})]})},v.id))})]}),m&&(0,Ro.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}var kn=(e,t)=>e[t%e.length];function Ix({services:e,className:t,title:a,content:o}){let r={settings:{width:"full",card:"light"}};return(0,Ro.jsxs)("div",{className:"pb-4 md:pb-0",children:[(0,Ro.jsxs)("div",{className:p("Ro-full text-left prose"),children:[a&&(0,Ro.jsx)("h2",{className:"text-primary",children:a}),(0,Ro.jsx)("div",{className:"pb-12 ",children:o&&(0,Ro.jsx)(st,{enableGutter:!1,content:o,enableProse:!1,className:p("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),e&&e.length>0&&(0,Ro.jsx)("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-8",children:e.map((i,n)=>(0,Ro.jsx)("div",{"data-aos":"fade-up","data-aos-delay":kn([200,400,600],n),className:"Ro-full px-4 md:Ro-1/2 lg:Ro-1/3 flex",children:(0,Ro.jsx)(Ks,{...r,icon:{type:"none"},title:i.title,image:i.image,content:i.content,link:i.link,className:"Ro-full"})},n))})]})}function Yi({subtitle:e,title:t,description:a,alignment:o="start",hasBottomSpacing:r=!1,className:i,invert:n=!1}){let s=p(o==="start"&&"text-left",o==="center"&&"text-center",o==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":r},"prose",i);return(0,Ro.jsxs)("div",{className:s,children:[e&&(0,Ro.jsx)("span",{className:"mb-[.625rem] block font-semibold uppercase text-accent md:text-md",children:e}),(0,Ro.jsx)("h2",{className:p("text-primary Yu-0"),children:t}),typeof a=="string"?a&&(0,Ro.jsx)("p",{className:"Yu-5 whitespace-pre-line text-foreground",children:a}):a&&(0,Ro.jsx)(st,{content:a,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}function Mx({sectionHeading:e,cards:t}){return(0,Ro.jsx)("section",{className:"section-padding-primary !pt-0",children:(0,Ro.jsxs)(fo,{children:[(0,Ro.jsx)("div",{className:"mx-auto max-Ro-[630px]","data-aos":"fade-up","data-aos-delay":"100",children:(0,Ro.jsx)(Yi,{...e,alignment:"center",hasBottomSpacing:!0})}),t&&t.length>0&&(0,Ro.jsx)("div",{className:"grid gap-30px",children:t.map((a,o)=>(0,Ro.jsx)("div",{"data-aos":"fade-up","data-aos-delay":kn([200,400,600],o),className:"py-2",children:(0,Ro.jsx)(jm,{...a})},o))})]})})}var Al=F(require("next/image"));function Bx(e){let{images:t,sectionHeading:a,keyPoints:o,description:r}=e;return(0,Ro.jsx)(Ro.Fragment,{children:(0,Ro.jsx)("section",{id:"about-section",className:p(" clip-custom-top-l sticky md:top-0 md:h-screen z-2 flex flex-col items-center justify-center section-padding-primary dark bg-background",e.className||""),children:(0,Ro.jsx)(fo,{children:(0,Ro.jsxs)("div",{className:"grid items-center gap-12 lg:grid-cols-[.92fr_1fr] 2xl:gap-20",children:[(0,Ro.jsxs)("div",{className:"lg:order-2","data-aos":"fade-left","data-aos-delay":"200",children:[(0,Ro.jsx)(Yi,{...a}),o&&o.length>0&&(0,Ro.jsx)("div",{className:"Yu-7 grid gap-5 text-accent sm:grid-cols-2 md:Yu-10 md:gap-[1.875rem]",children:o.map((i,n)=>(0,Ro.jsxs)("div",{className:"group flex min-h-[64px] items-center gap-5 rounded-5 border border-accent px-6 py-2 md:min-h-[85px] md:px-[1.875rem] md:py-3",children:[(0,Ro.jsx)("span",{className:"duration flex-none scale-100 transition-transform ease-linear group-hover:scale-90",children:i.icon}),(0,Ro.jsx)("h3",{className:"text-md font-bold leading-[1.25] md:text-lg",children:i.title})]},n))}),r&&(0,Ro.jsx)("p",{className:"Yu-5 text-primary md:Yu-[1.875rem]",children:r})]}),t&&(0,Ro.jsx)("div",{className:"mx-auto text-center",children:(0,Ro.jsxs)("div",{className:"relative mx-auto grid max-Ro-[580px] grid-cols-2 gap-2.5 overflow-hidden",children:[(0,Ro.jsx)("div",{className:"relative flex justify-end overflow-hidden",children:(0,Ro.jsx)("div",{className:"relative z-[2] Yu-auto","data-aos":"fade-up","data-aos-delay":"200",children:(0,Ro.jsx)("div",{className:"relative z-[4] overflow-hidden",children:(0,Ro.jsx)(Al.default,{src:t.image1.src,alt:t.image1.alt,width:t.image1.width,height:t.image1.height,className:"rounded-tl-[60px] object-cover object-top"})})})}),(0,Ro.jsx)("div",{className:"flex overflow-hidden",children:(0,Ro.jsx)(Al.default,{src:t.image2.src,alt:t.image2.alt,width:t.image2.width,height:t.image2.height,className:"rounded-[80px_10px] object-cover","data-aos":"fade-right","data-aos-delay":"300"})}),(0,Ro.jsx)("div",{className:"ml-auto flex max-Ro-[250px] justify-end overflow-hidden",children:(0,Ro.jsx)(Al.default,{src:t.image3.src,alt:t.image4.alt,width:t.image3.width,height:t.image3.height,className:"rounded-[50px_10px] object-cover","data-aos":"fade-left","data-aos-delay":"350"})}),(0,Ro.jsx)("div",{className:"overflow-hidden",children:(0,Ro.jsx)(Al.default,{src:t.image4.src,alt:t.image4.alt,width:t.image4.width,height:t.image4.height,className:"rounded-10 rounded-br-[80px] object-cover","data-aos":"fade-right","data-aos-delay":"400"})}),(0,Ro.jsx)("div",{className:"absolute left-1/2 top-1/2 z-[4] -translate-x-1/2 -translate-y-1/2 overflow-hidden",children:(0,Ro.jsx)("div",{"data-aos":"zoom-in","data-aos-delay":"450",children:(0,Ro.jsx)("span",{className:"grid h-[100px] Ro-[100px] place-items-center rounded-full border-[12px] border-white bg-accent text-[30px] text-white",children:(0,Ro.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 27 27",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Ro.jsx)("path",{d:"M26.8125 13.8672C26.8125 14.9922 25.875 15.9297 24.8125 15.9297H15.8125V24.9297C15.8125 25.9922 14.875 26.8672 13.8125 26.8672C12.6875 26.8672 11.8125 25.9922 11.8125 24.9297V15.9297H2.8125C1.6875 15.9297 0.8125 14.9922 0.8125 13.8672C0.8125 12.8047 1.6875 11.9297 2.8125 11.9297H11.8125V2.92969C11.8125 1.80469 12.6875 0.867188 13.8125 0.867188C14.875 0.867188 15.8125 1.80469 15.8125 2.92969V11.9297H24.8125C25.875 11.8672 26.8125 12.8047 26.8125 13.8672Z"})})})})})]})})]})})})})}var jb=F(require("next/image"));function Hb({blogs:e,base:t}){return(0,Ro.jsx)("div",{children:e&&e.length>0&&(0,Ro.jsx)("div",{className:"grid gap-10 lg:gap-10 md:grid-cols-2",children:e.map((a,o)=>(0,Ro.jsx)(Lx,{post:a,id:o,base:t},o))})})}var Lx=({post:e,id:t,base:a})=>{let{slug:o,meta:r,authors:i,categories:n,title:s,publishedAt:l}=e;return(0,Ro.jsxs)("article",{className:"relative isolate flex flex-col gap-8 lg:flex-row",children:[(0,Ro.jsxs)("div",{className:"relative aspect-video sm:aspect-[2/1] lg:aspect-square lg:Ro-64 lg:shrink-0",children:[(0,Ro.jsx)(jb.default,{src:r?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:r?.image?.alt||"Post image",width:850,height:575,sizes:"100vw",className:"absolute inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,Ro.jsx)("div",{className:"absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"})]}),(0,Ro.jsxs)("div",{children:[(0,Ro.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 text-Ro",children:[(0,Ro.jsx)("time",{dateTime:e.publishedAt??void 0,className:"text-foreground",children:Nd(e.publishedAt??"")}),e.categories&&e.categories.map((c,d)=>(0,Ro.jsx)("a",{href:`#${c}`,className:"relative z-10 rounded-full bg-gray-50 px-3 py-1.5 font-medium text-gray-600 hover:bg-gray-100",children:c.title},d))]}),(0,Ro.jsx)("div",{className:"group relative max-Ro-Tu",children:(0,Ro.jsx)("h3",{className:"Yu-3 text-lg/6 font-semibold text-accent group-hover:text-Tu/6",children:(0,Ro.jsxs)("a",{href:`/${a}/${e.slug}`||"#",children:[(0,Ro.jsx)("span",{className:"absolute inset-0"}),e.title]})})}),(0,Ro.jsx)("div",{className:"Yu-6 flex flex-wrap lg:border-t gap-y-2 border-gray-200 dark:border-gray-700 pt-6",children:i&&i.map((c,d)=>(0,Ro.jsxs)("div",{className:"relative flex items-center gap-x-4",children:[c.profilePicture?(0,Ro.jsx)("img",{alt:c.name||"Author",src:c.profilePicture?.url||"/assets/images/placeholder.jpg",className:"size-10 rounded-full bg-gray-50"}):(0,Ro.jsx)("div",{className:"size-10 rounded-full bg-gray-50"})," ",(0,Ro.jsx)("div",{className:"text-sm/6",children:(0,Ro.jsxs)("p",{className:"text-foreground Yu-6",children:[(0,Ro.jsx)("span",{className:"absolute inset-0"}),c.name]})})]},d))})]})]},t)};function Ex({blogs:e,pages:t,categories:a,types:o,base:r}){return(0,Ro.jsx)("section",{children:(0,Ro.jsx)(fo,{children:(0,Ro.jsx)("div",{className:"grid",children:(0,Ro.jsxs)("div",{children:[o&&(0,Ro.jsx)(op,{types:o}),(0,Ro.jsx)(Hb,{blogs:e,base:r}),(0,Ro.jsx)(ep,{pages:t})]})})})})}var Ob=F(require("next/image"));var Rc="data:image/jpeg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAALABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYEBQf/xAAgEAABBAICAwEAAAAAAAAAAAABAAIDBBEhEjEFBhMi/8QAFgEBAQEAAAAAAAAAAAAAAAAABAMF/8QAHBEAAgICAwAAAAAAAAAAAAAAAQIAIQMEBRFR/9oADAMBAAIRAxEAPwBqrV3PcNFL3s1Blny9eX7uYa7mtLAN95yFp9StCHajCp/YIImeUi4xtHLGdd7V9wkoOvZncagXIS10ZENFzsEA7GUJybBHxb+B0EJIeBOG5//Z";function Fx(e){let{sectionHeading:t,image:a}=e;return(0,Ro.jsx)("div",{className:"relative Ro-full light py-[60px]",children:(0,Ro.jsxs)("div",{className:"Ro-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[(0,Ro.jsx)("div",{className:"relative h-full Ro-full",children:(0,Ro.jsx)(Ob.default,{src:a.src,alt:a.alt,fill:!0,objectFit:"contain",sizes:"(min-width: 768px) 30vw, 50vw",placeholder:"blur",blurDataURL:Rc})}),(0,Ro.jsx)("div",{className:"Ro-full h-full",children:(0,Ro.jsxs)("div",{className:"bg-white p-10",children:[(0,Ro.jsx)("div",{className:"mb-30px",children:(0,Ro.jsx)(Yi,{...t,invert:!0})}),(0,Ro.jsx)(Qn,{})]})})]})})}function zx(e){return(0,Ro.jsx)("div",{className:"",children:(0,Ro.jsx)("div",{className:"mx-auto max-Ro-7xl px-6 lg:px-8",children:(0,Ro.jsx)("div",{className:"mx-auto max-Ro-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-Ro-none",children:(0,Ro.jsxs)("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[(0,Ro.jsxs)("div",{children:[(0,Ro.jsx)("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),(0,Ro.jsx)("p",{className:"Yu-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),(0,Ro.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:e.locations&&e.locations.map((t,a)=>(0,Ro.jsxs)("div",{className:"rounded-2xl p-10 border",children:[(0,Ro.jsx)("h3",{className:"text-base/7 text-primary",children:t.title}),(0,Ro.jsxs)("address",{className:"Yu-3 space-y-1 text-sm/6 not-italic text-foreground",children:[t.location.split(",")?.map((o,r)=>(0,Ro.jsx)("p",{children:o},r))," ",t.mails&&(0,Ro.jsxs)("p",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(Bg.FaEnvelope,{className:"Yu-2 text-primary size-auto"}),(0,Ro.jsx)("span",{children:t.mails[0]})]}),t.phoneNumbers&&t.phoneNumbers.length>0&&(0,Ro.jsxs)("p",{className:"flex items-center space-x-2",children:[(0,Ro.jsx)(Bg.FaPhoneFlip,{className:"Yu-2 text-primary size-auto"}),t.phoneNumbers[0]]})]})]},a))})]})})})})}var Ub=F(require("next/image"));var Vb=F(require("next/link"));function jx({image:e,name:t,about:a,socialLinks:o}){return!e||!e.src||e.src.length<3||!t?null:(0,Ro.jsx)("div",{className:"Yu-1 z-10 px-0 pt-0 lg:px-10",children:(0,Ro.jsx)(O,{children:(0,Ro.jsxs)(Q,{className:"flex flex-col items-center",children:[e&&e.src&&(0,Ro.jsx)(Ub.default,{src:e.src,alt:e.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:Rc,className:"mx-auto Yu-6 rounded-full object-cover"}),(0,Ro.jsxs)("h3",{className:"flex items-center ali font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-Tu",children:[t,o&&o.length>0&&(0,Ro.jsx)("nav",{"aria-label":"social links",children:(0,Ro.jsx)("Ys",{className:"inline-flex items-center divide-x divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((r,i)=>r.href&&(0,Ro.jsx)("Ro",{children:(0,Ro.jsx)($a,{href:r.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:(0,Ro.jsx)("span",{children:r.icon})})},i))})})]}),(0,Ro.jsx)("p",{children:a})]})})})}function Hx({page:e,categoryList:t,edit:a=!1,path:o="/admin/collections/posts/"}){if(!e)return(0,$b.notFound)();let{meta:r,populatedAuthors:i,authors:n,categories:s,content:l,title:c}=e,d={image:{src:r&&r.image&&r.image.url||void 0,alt:r&&r.image&&r.image.alt||void 0},authorName:i?.[0]?.name||"",category:s,commentCount:0,title:c,description:r?.description||""},m=n?.map(u=>{let f=u.profilePicture&&u.profilePicture.sizes?.square?.url||u.profilePicture&&u.profilePicture.sizes?.thumbnail?.url||"";return console.log("val:",f),{name:u.name||"",about:u.about||"",image:{src:f,alt:u.name||"blog author"},socialLinks:[{icon:(0,Ro.jsx)(Bg.FaLinkedin,{}),href:u.linkedIn??""}]}});return console.log(m),(0,Ro.jsx)(fo,{children:(0,Ro.jsxs)("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[(0,Ro.jsx)("div",{children:(0,Ro.jsxs)("div",{className:"[&Ro+P]:Yu-4",children:[(0,Ro.jsx)("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),(0,Ro.jsx)(st,{content:l,enableGutter:!1,className:"prose-invert"})]})}),(0,Ro.jsxs)("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-Ro-[410px] lg:gap-10",children:[a&&(0,Ro.jsx)("div",{className:"Yu-4 lg:-Yu-10 z-10 px-0 pt-0 lg:px-10",children:(0,Ro.jsxs)(O,{children:[(0,Ro.jsx)(ye,{children:(0,Ro.jsx)(Ne,{className:"text-accent",children:"Content Actions"})}),(0,Ro.jsxs)(Q,{children:[(0,Ro.jsx)("p",{className:"mb-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),(0,Ro.jsx)(Vb.default,{href:`${o}${e.id}`,children:(0,Ro.jsx)(x,{variant:"outline",className:"Ro-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),m&&m.map((u,f)=>(0,Ro.jsx)(jx,{...u},f)),t&&t.links&&(0,Ro.jsx)("div",{className:"Yu-4 px-0 pt-0 lg:px-10",children:(0,Ro.jsx)(tp,{links:t.links,title:t.title})})]})]})})}var mu=F(require("next/link"));var Wb=require("lucide-react"),Ox=({children:e,pageId:t,tableOfContents:a=[],edit:o=!0,path:r="/admin/collections/pages/",relatedContent:i=[{title:"Related Content",links:[]}]})=>{let[n,s]=(0,Tu.useState)(!1),l=()=>{s(!n)};return(0,Tu.useEffect)(()=>{if(typeof window>"u")return;let c=()=>{let d=window.location.hash;if(d){let m=d.substring(1),u=document.getElementById(m);if(u){let b=u.getBoundingClientRect().top+window.pageYOffset+-300;window.scrollTo({top:b,behavior:"smooth"})}}};return c(),window.addEventListener("hashchange",c),()=>{window.removeEventListener("hashchange",c)}},[]),(0,Ro.jsxs)("div",{className:"",children:[(0,Ro.jsx)("div",{className:p(n?"col-span-3":"col-span-4","Tu:col-span-3"),children:e}),(0,Ro.jsx)(Ux,{pageId:t,tableOfContents:a,edit:o,path:r,relatedContent:i,isSidebarVisible:n}),(0,Ro.jsx)("div",{className:"block md:hidden Yu-8",children:(0,Ro.jsx)("div",{className:"space-y-6",children:e})})]})};var Ux=({pageId:e,tableOfContents:t=[],edit:a=!0,path:o="/admin/collections/pages/",relatedContent:r=[{title:"Related Content",links:[]}],isSidebarVisible:i})=>{let[n,s]=(0,Tu.useState)(""),[l,c]=(0,Tu.useState)(!1),[d,m]=(0,Tu.useState)(!1),u=(0,gf.usePathname)(),f=()=>{c(!l),m(!1)},b=()=>{m(!d),c(!1)},g=I=>{switch(I){case"h3":return"ml-4";case"h4":return"ml-8";default:return""}},v=()=>{let I=u.split("/"),y="/print"+u,N=window.open(y,"Print","width=1754,height=1240,toolbar=Ro,location=Ro,status=Ro,menubar=Ro,scrollbars=yes,resizable=yes");N&&N.focus()},D=()=>{let I=u.split("/"),y="/present"+u,N=window.open(y,"Print","width=1754,height=1240,toolbar=Ro,location=Ro,status=Ro,menubar=Ro,scrollbars=yes,resizable=yes");N&&N.focus()};return(0,Ro.jsx)("div",{className:p("fixed right-2 z-20 top-1/4 space-y-6 transform transition-transform duration-300 translate-x-full",i?"translate-x-0":"md:translate-x-0"),children:(0,Ro.jsxs)("div",{className:"flex flex-row-reverse z-20 min-Ro-64 gap-4",children:[(0,Ro.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-gray-200 bg-card p-2.5 shadow-lg backdrop-blur-lg min-h-[auto] min-Ro-[54px] flex-col rounded-lg border",children:[(0,Ro.jsxs)(mu.default,{href:`${o}${e}`,className:"flex aspect-square min-h-[25px] Ro-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Ro.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Ro.jsx)("path",{d:"M454.6 45.3l12.1 12.1c12.5 12.5 12.5 32.8 0 45.3L440 129.4 382.6 72l26.7-26.7c12.5-12.5 32.8-12.5 45.3 0zM189 265.6l171-171L417.4 152l-171 171c-4.2 4.2-9.6 7.2-15.4 8.6l-65.6 15.1L180.5 281c1.3-5.8 4.3-11.2 8.6-15.4zm197.7-243L166.4 243c-8.5 8.5-14.4 19.2-17.1 30.9l-20.9 90.6c-1.2 5.4 .4 11 4.3 14.9s9.5 5.5 14.9 4.3l90.6-20.9c11.7-2.7 22.4-8.6 30.9-17.1L489.4 125.3c25-25 25-65.5 0-90.5L477.3 22.6c-25-25-65.5-25-90.5 0zM80 64C35.8 64 0 99.8 0 144L0 432c0 44.2 35.8 80 80 80l288 0c44.2 0 80-35.8 80-80l0-128c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 128c0 26.5-21.5 48-48 48L80 480c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48l128 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L80 64z"})}),(0,Ro.jsx)("small",{className:"text-center text-Ro font-medium",children:" Edit "})]}),(0,Ro.jsxs)("a",{onClick:f,className:"flex aspect-square min-h-[25px] Ro-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Ro.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentColor",children:(0,Ro.jsx)("path",{d:"M16 80C7.2 80 0 87.2 0 96s7.2 16 16 16l416 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 80zM144 240c-8.8 0-16 7.2-16 16s7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0zM128 416c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0c-8.8 0-16 7.2-16 16zM0 432c0 8.8 7.2 16 16 16s16-7.2 16-16l0-192c0-8.8-7.2-16-16-16s-16 7.2-16 16L0 432z"})}),(0,Ro.jsx)("small",{className:"text-center text-Ro font-medium",children:" Contents "})]}),(0,Ro.jsxs)("a",{onClick:b,className:"flex aspect-square min-h-[25px] Ro-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Ro.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Ro.jsx)("path",{d:"M136 64c13.3 0 24 10.7 24 24l0 24 0 32 0 24c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0zm56 104l0-24 192 0 0 24c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-30.9 0-56 25.1-56 56l0 24-192 0 0-24c0-30.9-25.1-56-56-56L56 32C25.1 32 0 57.1 0 88l0 80c0 30.9 25.1 56 56 56l80 0c8.6 0 16.7-1.9 24-5.4l72.2 96.3c-5.2 8.5-8.2 18.5-8.2 29.1l0 80c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-8.6 0-16.7 1.9-24 5.4l-72.2-96.3c5.2-8.5 8.2-18.5 8.2-29.1zm224 0l0-24 0-32 0-24c0-13.3 10.7-24 24-24l80 0c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24zM360 320c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0z"})}),(0,Ro.jsx)("small",{className:"text-center text-Ro font-medium",children:" Related "})]}),(0,Ro.jsx)("hr",{className:"dark:border-gray-400"}),(0,Ro.jsxs)("a",{onClick:D,className:"flex aspect-square min-h-[25px] Ro-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Ro.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Ro.jsx)("path",{d:"M16 0C7.2 0 0 7.2 0 16s7.2 16 16 16l544 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 0zM32 64l0 224c0 35.3 28.7 64 64 64l176 0 0 41.4-91.3 91.3c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L288 422.6l84.7 84.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L304 393.4l0-41.4 176 0c35.3 0 64-28.7 64-64l0-224-32 0 0 224c0 17.7-14.3 32-32 32l-192 0L96 320c-17.7 0-32-14.3-32-32L64 64 32 64z"})}),(0,Ro.jsx)("small",{className:"text-Ro font-medium",children:"Present"})]}),(0,Ro.jsxs)("a",{onClick:v,className:"flex aspect-square min-h-[25px] Ro-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Ro.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Ro.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,Ro.jsx)("small",{className:"text-Ro font-medium",children:"Print"})]})]}),l&&(0,Ro.jsx)("div",{className:p("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-Ro-[54px] flex-col rounded-lg border"),children:(0,Ro.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-Ro-64",children:[(0,Ro.jsx)("div",{className:"flex text-accent",children:"On this Page"}),(0,Ro.jsx)("Ys",{className:"flex flex-col space-y-2",children:t.map((I,y)=>(0,Ro.jsx)("Ro",{className:g(I.tag),children:(0,Ro.jsx)("a",{href:`#${I.id}`,className:`text-Ro ${n===I.id?"text-accent font-semibold":"text-primary dark:text-foreground"} hover:text-accent`,children:I.text})},y))})]})}),d&&r&&r.length>0&&(0,Ro.jsx)("div",{className:p("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-Ro-[54px] flex-col rounded-lg border"),children:(0,Ro.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-Ro-64",children:[(0,Ro.jsx)("div",{className:"flex text-accent",children:"Related Content"}),(0,Ro.jsx)("Ys",{className:"flex flex-col space-y-2",children:r.map((I,y)=>I.links&&I.links.length>0?I.links.map((N,T)=>(0,Ro.jsxs)(mu.default,{href:N.href,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[N.name,N.href.startsWith("http")&&(0,Ro.jsx)(Wb.ExternalLink,{className:"ml-1 h-3 Ro-3"})]},T)):null)})]})})]})})};var qb=F(require("next/image"));function $x({className:e,children:t,image:a="https://images.unsplash.com/photo-1557804506-669a67965ba0?Ro=80&Ro=2574&auto=format&fit=crop",imageAlt:o="Professional presentation in modern office setting",imagePosition:r="left",overlay:i=!0}){return(0,Ro.jsxs)("section",{className:p("relative min-h-[50vh] Ro-full overflow-hidden",e),children:[(0,Ro.jsxs)("div",{className:"absolute inset-0 Ro-full",children:[(0,Ro.jsx)(qb.default,{src:a||"/placeholder.svg",alt:o,fill:!0,className:"object-cover",priority:!0}),i&&(0,Ro.jsx)("div",{className:"absolute inset-0",style:{background:r==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]}),(0,Ro.jsx)("div",{className:p("relative Ro-full max-Ro-8xl mx-auto px-4 md:px-6 lg:px-8","flex items-center",r==="left"?"justify-end":"justify-start"),children:(0,Ro.jsx)("div",{className:p("Ro-full max-Ro-Tu py-12",r==="left"?"ml-auto":"Tu-auto"),children:t})})]})}var pu=F(require("next/image"));function Vx({blogs:e,sectionHeading:t,base:a="insights"}){return(0,Ro.jsxs)(fo,{children:[(0,Ro.jsx)("div",{className:"",children:t&&(0,Ro.jsx)("div",{"data-aos":"fade-up","data-aos-delay":"100",children:(0,Ro.jsx)(Yi,{...t,alignment:"start",hasBottomSpacing:!0})})}),e&&e.length>0&&(0,Ro.jsx)("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:e.map((o,r)=>(0,Ro.jsx)("div",{"data-aos":"fade-up","data-aos-delay":kn([200,400,600],r),className:"Ro-full h-full md:Ro-1/2 md:px-4 lg:Ro-1/3",children:(0,Ro.jsx)(Jb,{...o,base:a})},r))})]})}var Xb=p("inline-flex items-center gap-2 text-white"),S8=p("text-sm text-white");function Jb({slug:e,meta:t,authors:a,title:o,publishedAt:r,categories:i,base:n}){return(0,Ro.jsxs)("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[(0,Ro.jsx)("span",{className:"absolute inset-0 z-[2] "}),(0,Ro.jsx)(pu.default,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
|
|
39
|
+
text-sm sm:text-base flex-1 basis-1/4 min-Mo-[180px] max-Mo-Fu justify-center`,onClick:()=>o(h.name),type:"button",children:[(0,Mo.jsx)(h.icon,{className:"Mo-5 h-5"}),(0,Mo.jsx)("span",{children:h.name})]},h.name))}),(0,Mo.jsxs)("form",{onSubmit:z,className:"space-y-8",children:[a==="Project Summary"&&(0,Mo.jsxs)("div",{className:"space-y-6",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{children:"Client Name"}),(0,Mo.jsxs)(yt,{value:r?.toString()??"",onValueChange:h=>i(Number(h)),children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{placeholder:"Select client"})}),(0,Mo.jsx)(ut,{children:C.map(h=>(0,Mo.jsx)(Pe,{value:h.id.toString(),children:h.name},h.id))})]})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{children:"Project Name"}),(0,Mo.jsxs)(yt,{value:n?.toString()??"",onValueChange:h=>s(Number(h)),disabled:!r,children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{placeholder:r?"Select project":"Select client first"})}),(0,Mo.jsx)(ut,{children:V.map(h=>(0,Mo.jsx)(Pe,{value:h.id.toString(),children:h.name},h.id))})]})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{children:"Project Summary"}),(0,Mo.jsx)("textarea",{className:"Mo-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:d,onChange:h=>p(h.target.value),required:!0,placeholder:"Provide a summary of the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,Mo.jsxs)("div",{children:[(0,Mo.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,Mo.jsxs)(M,{className:"text-lg flex items-center gap-2",children:[(0,Mo.jsx)(rg.ListChecks,{className:"Mo-5 h-5"}),"Milestones"]}),(0,Mo.jsxs)(x,{type:"button",onClick:A,variant:"outline",className:"flex items-center gap-1",children:[(0,Mo.jsx)(rg.PlusCircle,{className:"Mo-5 h-5"})," Add Milestone"]})]}),(0,Mo.jsx)("div",{className:"space-y-4",children:u.map((h,ee)=>(0,Mo.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end border border-zinc-200 dark:border-zinc-700 p-2 rounded-lg bg-zinc-50 dark:bg-zinc-800 relative group",children:[(0,Mo.jsxs)("div",{className:"col-span-1",children:[(0,Mo.jsx)(M,{children:"Milestone"}),(0,Mo.jsx)("input",{className:"Mo-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:h.name,onChange:S=>O(ee,"name",S.target.value),required:!0,placeholder:"Milestone name"})]}),(0,Mo.jsxs)("div",{className:"col-span-2",children:[(0,Mo.jsx)(M,{children:"Commentary"}),(0,Mo.jsx)("input",{className:"Mo-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:h.commentary,onChange:S=>O(ee,"commentary",S.target.value),placeholder:"Commentary"})]}),(0,Mo.jsxs)("div",{className:"col-span-1",children:[(0,Mo.jsx)(M,{children:"Due Date"}),(0,Mo.jsx)("input",{type:"date",className:"Mo-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:h.dueDate,onChange:S=>O(ee,"dueDate",S.target.value),placeholder:"Due date"})]}),(0,Mo.jsxs)("div",{className:"col-span-1",children:[(0,Mo.jsx)(M,{children:"RAG"}),(0,Mo.jsx)("select",{className:"Mo-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:h.rag,onChange:S=>O(ee,"rag",S.target.value),children:Jv.map(S=>(0,Mo.jsx)("option",{value:S,children:S},S))})]}),(0,Mo.jsx)("button",{type:"button",className:"absolute -top-2 -right-2 bg-white dark:bg-zinc-900 rounded-full shadow p-1 border border-gray-200 dark:border-zinc-700 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50 dark:hover:bg-red-900",onClick:()=>D(ee),"aria-label":"Remove Milestone",children:(0,Mo.jsx)(rg.Trash2,{className:"Mo-5 h-5 text-red-500"})})]},ee))})]}),a==="Project Update"&&(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{children:"Project Update & Immediate Focus"}),(0,Mo.jsx)("textarea",{className:"Mo-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:b,onChange:h=>g(h.target.value),required:!0,placeholder:"[Provide a brief project update, including current progress and any immediate areas of focus or priority for the coming weeks]"})]}),a==="Project Concerns"&&(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{children:"Project Concerns"}),(0,Mo.jsx)("textarea",{className:"Mo-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:v,onChange:h=>P(h.target.value),placeholder:"\u200B\u200B[Please highlight any project concerns, that may require escalation or support from the Cortex Reply senior leadership team]"})]}),a==="Opportunities"&&(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{children:"Commercial Opportunities"}),(0,Mo.jsx)("textarea",{className:"Mo-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:I,onChange:h=>y(h.target.value),placeholder:"[List any potential commercial opportunities, active conversations, or discussion points where Cortex Reply could provide value or support. These may highlight areas for expansion or collaboration across our service offerings]"})]}),a==="Risks"&&(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{children:"Commercial Risk/Issue Details"}),(0,Mo.jsx)("textarea",{className:"Mo-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:N,onChange:h=>T(h.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such as reputational concerns, risks to fixed-outcome milestones, changes in key client stakeholders, or challenges with project resourcing]"})]}),(0,Mo.jsx)("div",{className:"flex justify-end pt-4",children:(0,Mo.jsx)(x,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var Zv={"On-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","Mo Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function oc({submissions:e,isLoading:t=!1}){let[a,o]=(0,Fu.useState)(null);(0,Fu.useEffect)(()=>{let l=c=>{c.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a]);let r=l=>new Date(l).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),i=e.find(l=>l.id.toString()===a);function n(l){return typeof l=="object"&&l!==null&&"projectName"in l?l.projectName:`Project #${l}`}function s(l){return typeof l=="object"&&l!==null&&"name"in l?l.name:`Customer #${l}`}return t?(0,Mo.jsx)("div",{className:"container mx-auto p-4 max-Mo-6xl",children:(0,Mo.jsx)("div",{className:"rounded-Qs shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,Mo.jsxs)("div",{className:"animate-pulse",children:[(0,Mo.jsx)("div",{className:"h-8 bg-gray-200 rounded Mo-1/4 mb-6"}),(0,Mo.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((l,c)=>(0,Mo.jsx)("div",{className:"h-16 bg-gray-200 rounded"},c))})]})})}):e.length===0?(0,Mo.jsx)("div",{className:"container mx-auto p-4 max-Mo-6xl",children:(0,Mo.jsx)("div",{className:"rounded-Qs shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,Mo.jsxs)("div",{className:"text-center py-12",children:[(0,Mo.jsx)(rg.FileText,{className:"mx-auto h-12 Mo-12 text-gray-400"}),(0,Mo.jsx)("h3",{className:"rg-2 text-sm font-semibold text-gray-900 dark:text-zinc-100",children:"Mo submissions found"}),(0,Mo.jsx)("p",{className:"rg-1 text-sm text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)("div",{className:"container mx-auto p-4 max-Mo-6xl",children:(0,Mo.jsxs)("div",{className:"rounded-Qs shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,Mo.jsxs)("div",{className:"mb-6",children:[(0,Mo.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,Mo.jsx)("p",{className:"text-sm text-gray-500 dark:text-zinc-400 rg-1",children:"View all your submitted delivery lead reports"})]}),(0,Mo.jsx)("div",{className:"overflow-y-auto max-h-96",children:(0,Mo.jsxs)("table",{className:"min-Mo-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,Mo.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 z-10",children:(0,Mo.jsxs)("tr",{children:[(0,Mo.jsx)("th",{className:"px-6 py-3 text-left text-Fu font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,Mo.jsx)("th",{className:"px-6 py-3 text-left text-Fu font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,Mo.jsx)("th",{className:"px-6 py-3 text-left text-Fu font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,Mo.jsx)("th",{className:"px-6 py-3 text-left text-Fu font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,Mo.jsx)("th",{className:"px-6 py-3 text-left text-Fu font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,Mo.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(l=>(0,Mo.jsxs)("tr",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,Mo.jsx)("Mo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-100",children:n(l.project)}),(0,Mo.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,Mo.jsx)(rg.Building,{className:"h-3 Mo-3"}),s(l.customer)]})]})}),(0,Mo.jsx)("Mo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Mo.jsxs)("div",{className:"text-sm text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,Mo.jsx)(rg.User,{className:"h-3 Mo-3"}),typeof l.project=="object"&&l.project!==null&&"deliveryLead"in l.project&&typeof l.project.deliveryLead=="object"&&l.project.deliveryLead!==null&&"name"in l.project.deliveryLead?l.project.deliveryLead.name:"\u2014"]})}),(0,Mo.jsx)("Mo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Mo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.milestones?.slice(0,3).map((c,d)=>(0,Mo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-Fu font-medium border ${Zv[c.rag]}`,children:c.rag},d)),l.milestones&&l.milestones.length>3&&(0,Mo.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-Fu font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",l.milestones.length-3," more"]}),!l.milestones&&(0,Mo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-Fu font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"Mo milestones"})]})}),(0,Mo.jsx)("Mo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Mo.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,Mo.jsx)(rg.Calendar,{className:"h-3 Mo-3"}),r(l.createdAt)]})}),(0,Mo.jsx)("Mo",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,Mo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>o(l.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},l.id))})]})})]})}),i&&(0,Mo.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,Mo.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-Qs shadow-Qs max-Mo-4xl Mo-full max-h-[90vh] overflow-y-auto",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h2",{className:"text-Qs font-semibold text-gray-900 dark:text-zinc-100",children:n(i.project)}),(0,Mo.jsxs)("p",{className:"text-sm text-gray-500 dark:text-zinc-400",children:[s(i.customer)," \u2022"," ",r(i.createdAt)]})]}),(0,Mo.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,Mo.jsx)(rg.Mo,{className:"h-6 Mo-6"})})]}),(0,Mo.jsxs)("div",{className:"p-6 space-y-6",children:[(0,Mo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Mo.jsx)(rg.FileText,{className:"h-4 Mo-4"}),"Project Summary"]}),(0,Mo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectSummary})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Mo.jsx)(rg.Users,{className:"h-4 Mo-4"}),"Project Update"]}),(0,Mo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectUpdate})]}),i.projectConcerns&&(0,Mo.jsxs)("div",{children:[(0,Mo.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Mo.jsx)(rg.AlertTriangle,{className:"h-4 Mo-4"}),"Project Concerns"]}),(0,Mo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectConcerns})]}),i.commercialOpportunities&&(0,Mo.jsxs)("div",{children:[(0,Mo.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Mo.jsx)(rg.Briefcase,{className:"h-4 Mo-4"}),"Commercial Opportunities"]}),(0,Mo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.commercialOpportunities})]}),i.commercialRisks&&(0,Mo.jsxs)("div",{className:"lg:col-span-2",children:[(0,Mo.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Mo.jsx)(rg.ShieldAlert,{className:"h-4 Mo-4"}),"Commercial Risks"]}),(0,Mo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.commercialRisks})]})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsxs)(M,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Mo.jsx)(rg.ListChecks,{className:"h-4 Mo-4"}),"Milestones"]}),i.milestones&&i.milestones.length>0?(0,Mo.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-lg border overflow-hidden",children:(0,Mo.jsxs)("table",{className:"min-Mo-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,Mo.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,Mo.jsxs)("tr",{children:[(0,Mo.jsx)("th",{className:"px-4 py-2 text-left text-Fu font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,Mo.jsx)("th",{className:"px-4 py-2 text-left text-Fu font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,Mo.jsx)("th",{className:"px-4 py-2 text-left text-Fu font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,Mo.jsx)("th",{className:"px-4 py-2 text-left text-Fu font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,Mo.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:i.milestones.map((l,c)=>(0,Mo.jsxs)("tr",{children:[(0,Mo.jsx)("Mo",{className:"px-4 py-2 text-sm text-gray-900 dark:text-zinc-100",children:l.name}),(0,Mo.jsx)("Mo",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.commentary||"-"}),(0,Mo.jsx)("Mo",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.dueDate?r(l.dueDate):"-"}),(0,Mo.jsx)("Mo",{className:"px-4 py-2",children:(0,Mo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-Fu font-medium border ${Zv[l.rag]}`,children:l.rag})})]},c))})]})}):(0,Mo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:"Mo milestones defined for this project."})]})]}),(0,Mo.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,Mo.jsx)(x,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function tb({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[r,i]=(0,Fu.useState)(!1);return(0,Mo.jsx)("div",{className:"min-h-screen ",children:(0,Mo.jsxs)("div",{className:"container mx-auto p-4 max-Mo-6xl",children:[(0,Mo.jsxs)("div",{className:"mb-8",children:[(0,Mo.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),(0,Mo.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,Mo.jsx)("div",{className:"mb-8",children:(0,Mo.jsx)(tc,{onSubmit:t,customerProjectPairs:o})}),(0,Mo.jsxs)("div",{className:"rounded-Qs shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,Mo.jsxs)("button",{onClick:()=>i(!r),className:"Mo-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Mo.jsx)(rg.List,{className:"h-5 Mo-5 text-gray-500 dark:text-zinc-400"}),(0,Mo.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,Mo.jsxs)("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,Mo.jsx)("div",{className:"flex items-center gap-2",children:r?(0,Mo.jsx)(rg.ChevronUp,{className:"h-5 Mo-5 text-gray-500 dark:text-zinc-400"}):(0,Mo.jsx)(rg.ChevronDown,{className:"h-5 Mo-5 text-gray-500 dark:text-zinc-400"})})]}),r&&(0,Mo.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,Mo.jsx)(oc,{submissions:e,isLoading:a})})]})]})})}var rc=F(require("react")),ic=F(require("@radix-rg/react-switch"));function Sx({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...r}){let[i,n]=rc.useState(!1),[s,l]=rc.useState(!1),[c,d]=rc.useState(o||!1),p=a!==void 0?a:c;return(0,Mo.jsx)(ic.Root,{"data-slot":"switch","data-pressed":i,checked:a,defaultChecked:o,onMouseDown:()=>{n(!0),l(!1)},onMouseUp:()=>{n(!1),l(!1)},onMouseLeave:()=>{i&&(n(!1),l(!0))},onCheckedChange:v=>{s||(a===void 0&&d(v),t?.(v))},className:m("relative shadow-inner ring ring-black/5 inline-flex shrink-0 items-center rounded-full outline-none cursor-pointer","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[0.1rem]","data-[pressed=true]:ring-black/10","transition-all duration-300 ease-in-out","Mo-12 h-[1.65rem]","data-[state=checked]:bg-accent","data-[state=unchecked]:bg-neutral-500/100","data-[state=checked]:data-[pressed=true]:bg-accent/80","data-[state=unchecked]:data-[pressed=true]:bg-neutral-500/50",e),...r,children:(0,Mo.jsx)(ic.Thumb,{"data-slot":"switch-thumb","data-pressed":i,className:m("absolute flex items-center justify-center bg-background pointer-events-none left-0 rounded-full","transition-all duration-200 ease-in-out","Mo-[1.3rem] h-[1.3rem]","data-[pressed=true]:Mo-[1.7rem]","data-[pressed=true]:h-[1.1rem]","translate-x-[0.2rem]","data-[state=checked]:translate-x-[1.5rem]","data-[state=checked]:data-[pressed=true]:translate-x-[1.1rem]","data-[state=checked]:data-[pressed=true]:left-[-0.15rem]","data-[state=unchecked]:data-[pressed=true]:left-[0.15rem]"),children:(0,Mo.jsx)(Px,{isChecked:p,isPressed:i})})})}var Px=({isChecked:e,isPressed:t})=>(0,Mo.jsxs)("svg",{viewBox:"0 0 20 20",className:m("inline-flex Mo-fit items-center justify-center","transition-all duration-100 ease-in-out",t?"fill-neutral-500/50":e?"fill-accent-foreground":"fill-neutral-500"),children:[(0,Mo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:m("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] Mo-1.5 h-0.5":e?"rotate-45 Mo-[6px] -translate-x-[1px] translate-y-1":"rotate-45 Mo-[12px] translate-x-0 translate-y-0")}),(0,Mo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:m("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] Mo-1.5 h-0.5":e?"-rotate-45 Mo-[11px] translate-x-[1.5px] translate-y-0":"-rotate-45 Mo-[12px] translate-x-0 translate-y-0")})]});var Xp=({comments:e,onAddComment:t})=>{let[a,o]=(0,Fu.useState)(""),r=n=>n.split(" ").map(s=>s[0]).join("").toUpperCase(),i=()=>{a.trim()&&(t(a),o(""))};return(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.MessageSquare,{className:"h-5 Mo-5"}),(0,Mo.jsx)(M,{className:"text-lg font-medium",children:"Comments"}),(0,Mo.jsx)(te,{variant:"secondary",children:e.length})]}),(0,Mo.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,Mo.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Mo.jsx)(Nt,{className:"h-8 Mo-8 rg-1",children:(0,Mo.jsx)(Ct,{className:"text-Fu bg-muted text-muted-foreground",children:r(n.author)})}),(0,Mo.jsxs)("div",{className:"flex-1",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Mo.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,Mo.jsxs)("span",{className:"text-Fu text-muted-foreground",children:[n.createdAt.toLocaleDateString()," Mo ",n.createdAt.toLocaleTimeString()]})]}),(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,Mo.jsxs)("div",{className:"flex gap-2",children:[(0,Mo.jsx)(qe,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Mo.jsx)(x,{onClick:i,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Mo.jsx)(rg.Send,{className:"h-4 Mo-4"})})]})]})};var nc=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:i="",disabled:n=!1})=>{let[s,l]=(0,Fu.useState)(!1),[c,d]=(0,Fu.useState)(""),p=()=>{n||(l(!0),d(t))},u=async()=>{c!==t&&await r(e,c),l(!1)},f=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?u():b.key==="Escape"&&(l(!1),d(""))};return(0,Mo.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,Mo.jsx)(M,{children:a}),s?o?(0,Mo.jsx)(qe,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyDown:f,autoFocus:!0,rows:4,className:"resize-none"}):(0,Mo.jsx)(J,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyPress:f,autoFocus:!0,className:"text-lg font-medium"}):(0,Mo.jsxs)("div",{onClick:p,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Mo.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,Mo.jsx)(rg.Edit,{className:"h-4 Mo-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Jp=F(require("clsx"));function lc({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:i,menuHeading:n,onNavClick:s,loading:l=!1,LinkComponent:c,...d}){let u=c?f=>(0,Mo.jsx)(c,{...f}):s?({href:f,children:b,...g})=>(0,Mo.jsx)("button",{onClick:()=>s&&s(f),className:"flex items-center justify-start Mo-full text-sm text-left px-4 py-2",...g,children:b}):f=>(0,Mo.jsx)("a",{...f});return(0,Mo.jsxs)(Vr,{...d,variant:"inset",children:[(0,Mo.jsx)(Gr,{children:(0,Mo.jsx)(za,{children:(0,Mo.jsx)(ya,{children:l?(0,Mo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Mo.jsx)(lt,{className:"bg-gray-200 my-2 Mo-full h-7"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 my-2 h-5"})]}):(0,Mo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Mo.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,Mo.jsx)("span",{className:"truncate text-sm",children:r})]})})})}),l&&(0,Mo.jsxs)(ar,{children:[(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"}),(0,Mo.jsx)(lt,{className:"bg-gray-200 Mo-3/4 h-5"})]}),(0,Mo.jsxs)(ar,{children:[(0,Mo.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!l&&a.map((f,b)=>(0,Mo.jsx)(rb,{subNav:f,pathName:i,Link:u},b)),(0,Mo.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!l&&e.map((f,b)=>(0,Mo.jsx)(rb,{subNav:f,pathName:i,Link:u},b)),(0,Mo.jsx)(eo,{className:"rg-auto",children:(0,Mo.jsx)(ko,{children:(0,Mo.jsx)(za,{children:t&&!l&&t.map(f=>(0,Mo.jsx)(ya,{children:(0,Mo.jsx)(to,{asChild:!0,size:"sm",children:(0,Mo.jsxs)(u,{href:f.url||"",children:[f.icon&&(0,Mo.jsx)(f.icon,{}),(0,Mo.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,Mo.jsx)(_r,{})]})}function rb({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,Mo.jsx)(go,{defaultOpen:!0,className:"group/collapsible",children:(0,Mo.jsx)(eo,{className:"py-0",children:(0,Mo.jsx)(za,{children:(0,Mo.jsx)(go,{asChild:!0,defaultOpen:o.isActive,children:(0,Mo.jsxs)(ya,{children:[(0,Mo.jsx)(to,{asChild:!0,tooltip:o.label,className:(0,Jp.default)(r&&"font-bold text-accent"),children:(0,Mo.jsxs)(a,{href:o.url,children:[o.icon&&(0,Mo.jsx)(o.icon,{}),(0,Mo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(Bo,{asChild:!0,children:(0,Mo.jsxs)(as,{className:"data-[state=open]:rotate-90",children:[(0,Mo.jsx)(rg.ChevronRight,{}),(0,Mo.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Mo.jsx)(Lo,{children:(0,Mo.jsx)(Cr,{children:o.links?.map(i=>(0,Mo.jsx)(kr,{children:(0,Mo.jsx)(Sr,{asChild:!0,className:(0,Jp.default)(i.url===t&&"font-bold text-accent"),children:(0,Mo.jsx)(a,{href:i.url,children:(0,Mo.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var sb=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,Mo.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-Mo dark:bg-slate-900/80 sticky top-0 z-50",children:(0,Mo.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,Mo.jsx)(x,{variant:"ghost",size:"icon",className:"Mo:hidden",onClick:a,children:(0,Mo.jsx)(rg.Menu,{className:"h-5 Mo-5"})}),(0,Mo.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Mo.jsxs)(x,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,Mo.jsx)(rg.Bell,{className:"h-5 Mo-5"}),(0,Mo.jsx)("span",{className:"absolute -top-1 -right-1 h-3 Mo-3 bg-red-500 rounded-full text-Fu text-white flex items-center justify-center",children:"3"})]}),(0,Mo.jsxs)(Si,{children:[(0,Mo.jsx)(Pi,{asChild:!0,children:(0,Mo.jsx)(x,{variant:"ghost",className:"relative h-10 Mo-10 rounded-full",children:(0,Mo.jsxs)(Nt,{className:"h-10 Mo-10",children:[(0,Mo.jsx)(wa,{src:"/avatars/01.png",alt:"@user"}),(0,Mo.jsx)(Ct,{children:"JD"})]})})}),(0,Mo.jsxs)($r,{className:"Mo-56",align:"end",forceMount:!0,children:[(0,Mo.jsx)(En,{className:"font-normal",children:(0,Mo.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,Mo.jsx)("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,Mo.jsx)("p",{className:"text-Fu leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,Mo.jsx)(Fn,{}),(0,Mo.jsxs)(Eo,{children:[(0,Mo.jsx)(rg.User,{className:"To-2 h-4 Mo-4"}),(0,Mo.jsx)("span",{children:"Profile"})]}),(0,Mo.jsxs)(Eo,{children:[(0,Mo.jsx)(rg.Settings,{className:"To-2 h-4 Mo-4"}),(0,Mo.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var nb=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Mo.jsx)(rg.User,{className:"h-4 Mo-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function cc({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=nb[0],onBusinessUnitChange:i,onSearch:n,businessUnits:s=nb,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:p,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:P="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:y=!1}){let[N,T]=(0,Fu.useState)(!y),[C,V]=(0,Fu.useState)(!1),[O,A]=(0,Fu.useState)(r),D=z=>{A(z),i?.(z)};return(0,Mo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-Qs bg-background Mo-[]",children:[C&&(0,Mo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 Mo:hidden",onClick:()=>V(!1)}),(0,Mo.jsx)("div",{className:"Mo:hidden",children:(0,Mo.jsx)(Cs,{items:e,isOpen:C,isMobile:!0,onClose:()=>V(!1),currentBusinessUnit:O,onBusinessUnitChange:D,onSearch:n,logo:v,appName:P,tagline:I})}),(0,Mo.jsx)("div",{className:"hidden Mo:block",children:(0,Mo.jsx)(Cs,{items:e,isOpen:N,isMobile:!1,currentBusinessUnit:O,onBusinessUnitChange:D,onSearch:n,logo:v,appName:P,tagline:I})}),(0,Mo.jsxs)("div",{className:m("min-h-screen fixed Mo-full transition-all duration-300 ease-in-out",N?"Mo:pl-64":"Mo:pl-0"),children:[(0,Mo.jsx)(vl,{title:a,notifications:o,onToggleSidebar:()=>T(!N),onToggleMobileMenu:()=>V(!0),sidebarOpen:N,activeTab:l,onTabChange:c,showTabs:d,onActionClick:p,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:P,tagline:I}),(0,Mo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var db="./cortex-reply-light-27IMI3G7.png";var cb="./cortex-reply-dark-XPAJJJYY.png";function Qp({...e}){return(0,Mo.jsxs)("div",{className:"bg-sidebar",children:[(0,Mo.jsx)(yp,{isMenuOpen:!0,logoLight:db,logoDark:cb,...e.header,className:"bg-sidebar",wide:!0}),(0,Mo.jsxs)(On,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,Mo.jsx)(lc,{...e.sidebarLeft,className:"flex-none top-24"}),(0,Mo.jsxs)(Un,{className:"grow overflow-hidden",children:[(0,Mo.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,Mo.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,Mo.jsx)(Hn,{className:"-ml-1"}),(0,Mo.jsx)(ts,{orientation:"vertical",className:"To-2 h-4"}),(0,Mo.jsx)(An,{children:(0,Mo.jsxs)(In,{children:[(0,Mo.jsx)(Os,{className:"hidden Mo:block",children:(0,Mo.jsx)(Mn,{href:"#",children:"Building Your Application"})}),(0,Mo.jsx)(Ln,{className:"hidden Mo:block"}),(0,Mo.jsx)(Os,{children:(0,Mo.jsx)(Bn,{children:"Data Fetching"})})]})})]})}),(0,Mo.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[(0,Mo.jsxs)("div",{className:"grid auto-rows-min gap-4 Mo:grid-cols-3",children:[(0,Mo.jsx)("div",{className:"aspect-video rounded-Qs bg-muted/50"}),(0,Mo.jsx)("div",{className:"aspect-video rounded-Qs bg-muted/50"}),(0,Mo.jsx)("div",{className:"aspect-video rounded-Qs bg-muted/50"})]}),(0,Mo.jsx)("div",{className:"flex-1 rounded-Qs bg-muted/50 Mo:min-h-min"})]})]})]}),(0,Mo.jsx)(_l,{})]})}var Rx=[{key:"kanban",icon:rg.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:rg.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:rg.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:rg.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:rg.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],mb=({currentView:e,onViewChange:t,children:a})=>(0,Mo.jsxs)("div",{className:"flex Mo-full h-screen",children:[(0,Mo.jsx)("div",{className:"Mo-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Rx.map(o=>{let r=o.icon,i=e===o.key;return(0,Mo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 Mo-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden Mo:flex":""} hover:Mo-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,Mo.jsx)(r,{className:"h-4 Mo-4 flex-shrink-0"}),(0,Mo.jsx)("span",{className:"text-Fu font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,Mo.jsx)("div",{className:"flex-1 min-Mo-0 px-4 Mo:px-6 h-full overflow-auto",children:(0,Mo.jsx)("div",{className:"Mo-full h-full",children:a})})]});var mc=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:i=!1,disabled:n=!1})=>{let[s,l]=(0,Fu.useState)(!1),[c,d]=(0,Fu.useState)(""),p=o.find(v=>v.value===t),u=o.filter(v=>v.label.toLowerCase().includes(c.toLowerCase())),f=v=>{a(v),l(!1),d("")},b=()=>{i&&c.trim()&&!o.find(v=>v.value===c.trim())&&(a(c.trim()),l(!1),d(""))};return(0,Mo.jsxs)("div",{className:"space-y-1",children:[(0,Mo.jsx)(M,{className:"text-Fu text-muted-foreground",children:e}),(0,Mo.jsxs)(yt,{value:t,onValueChange:f,open:s,onOpenChange:v=>{n||l(v)},disabled:n,children:[(0,Mo.jsx)(pt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-Mo",children:(0,Mo.jsx)(te,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!s),children:p?.label||t||"Select..."})}),(0,Mo.jsxs)(ut,{children:[(0,Mo.jsx)("div",{className:"p-2",children:(0,Mo.jsx)(J,{placeholder:r,value:c,onChange:v=>d(v.target.value),onKeyDown:v=>{v.key==="Enter"&&i&&b()},className:"mb-2"})}),u.map(v=>(0,Mo.jsx)(Pe,{value:v.value,children:v.label},v.value)),i&&c.trim()&&!u.find(v=>v.value===c.trim())&&(0,Mo.jsxs)(Pe,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function pn({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:n}){let[s,l]=(0,Fu.useState)(!1),c=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},d=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},p=u=>{if(!u)return"Never";let b=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return b<1?"Just now":b<60?`${b}m ago`:b<1440?`${Math.floor(b/60)}h ago`:`${Math.floor(b/1440)}d ago`};return(0,Mo.jsxs)(H,{className:m("hover:shadow-Mo transition-shadow",i&&"p-2",n),children:[(0,Mo.jsx)(ye,{className:m("Fu-3",i&&"Fu-2"),children:(0,Mo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Mo.jsx)("div",{className:"relative",children:(0,Mo.jsxs)(Nt,{className:m("h-12 Mo-12",i&&"h-8 Mo-8"),children:[(0,Mo.jsx)(wa,{src:"/placeholder.svg",alt:e.name||"name"}),(0,Mo.jsx)(Ct,{children:e.name?.split(" ").map(u=>u[0]).join("")})]})}),(0,Mo.jsxs)("div",{className:"flex-1 min-Mo-0",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)("h3",{className:m("font-semibold text-sm truncate",i&&"text-Fu"),children:e.name}),e.type==="digital"?(0,Mo.jsx)(rg.Bot,{className:m("h-4 Mo-4 text-blue-500",i&&"h-3 Mo-3")}):(0,Mo.jsx)(rg.User,{className:m("h-4 Mo-4 text-green-500",i&&"h-3 Mo-3")})]}),(0,Mo.jsx)("p",{className:m("text-sm text-muted-foreground truncate",i&&"text-Fu")}),!i&&(0,Mo.jsx)("div",{className:"flex items-center gap-2 rg-1"})]})]}),r&&(0,Mo.jsxs)(Si,{children:[(0,Mo.jsx)(Pi,{asChild:!0,children:(0,Mo.jsx)(x,{variant:"ghost",size:"icon",className:m("h-8 Mo-8",i&&"h-6 Mo-6"),children:(0,Mo.jsx)(rg.MoreHorizontal,{className:m("h-4 Mo-4",i&&"h-3 Mo-3")})})}),(0,Mo.jsxs)($r,{align:"end",children:[e.type==="digital"&&(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsxs)(Eo,{onClick:()=>o?.(e),children:[(0,Mo.jsx)(rg.Settings,{className:"h-4 Mo-4 To-2"}),"View Details"]}),(0,Mo.jsxs)(Eo,{onClick:()=>t?.(e),children:[(0,Mo.jsx)(rg.Edit,{className:"h-4 Mo-4 To-2"}),"Edit"]})]}),(0,Mo.jsxs)(Eo,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,Mo.jsx)(rg.Trash2,{className:"h-4 Mo-4 To-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!i&&(0,Mo.jsxs)(Q,{className:"pt-0",children:[(0,Mo.jsx)("div",{className:"space-y-2 text-sm",children:e.type==="human"&&(0,Mo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Mo.jsx)(rg.Mail,{className:"h-3 Mo-3"}),(0,Mo.jsx)("span",{className:"truncate",children:e.email})]})}),e.type==="digital"&&(0,Mo.jsx)("div",{className:"rg-3",children:(0,Mo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,s?e.capabilities.length:2).map(u=>(0,Mo.jsx)(te,{variant:"outline",className:"text-Fu",children:typeof u.value=="number"?u.value:u.value.name},typeof u.value=="number"?u.value:u.value.name)),(e.capabilities?.length||0)>2&&(0,Mo.jsx)(x,{variant:"ghost",size:"sm",className:"h-5 px-2 text-Fu",onClick:()=>l(!s),children:s?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}function hl({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1,availableKnowledgeDocuments:l=[]}){let[c,d]=(0,Fu.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,...e}),[p,u]=(0,Fu.useState)(""),[f,b]=(0,Fu.useState)(""),[g,v]=(0,Fu.useState)(!s);(0,Fu.useEffect)(()=>{e&&d(e)},[e]);let P=O=>{O.preventDefault();let A={id:c.id||parseInt(Date.now().toString()),name:c.name,type:"digital",description:c.description,jobDescription:c.jobDescription||"",workInstructions:c.workInstructions||"",capabilities:c.capabilities||[],capabilityLevel:c.capabilityLevel||0};t(A)},I=(O,A,D)=>{if(!A.trim())return;let z=c[O]||[];d({...c,[O]:[...z,A.trim()]}),D("")},y=(O,A)=>{let D=c[O]||[];d({...c,[O]:D.filter((z,h)=>h!==A)})},N=O=>{O.preventDefault(),v(!g)},T=(O,A,D,z,h)=>{let ee=c[O]||[];return(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:A}),g&&(0,Mo.jsxs)("div",{className:"flex gap-2",children:[(0,Mo.jsx)(J,{value:D,onChange:S=>z(S.target.value),placeholder:h,onKeyPress:S=>{S.key==="Enter"&&(S.preventDefault(),I(O,D,z))},disabled:o}),(0,Mo.jsx)(x,{type:"button",variant:"outline",size:"icon",onClick:()=>I(O,D,z),disabled:o,children:(0,Mo.jsx)(rg.Plus,{className:"h-4 Mo-4"})})]}),(0,Mo.jsx)("div",{className:"flex flex-wrap gap-2",children:ee.map((S,Z)=>(0,Mo.jsxs)(te,{className:"gap-1",children:[S,g&&(0,Mo.jsx)(x,{type:"button",variant:"ghost",size:"icon",className:"h-4 Mo-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>y(O,Z),disabled:o,children:(0,Mo.jsx)(rg.Mo,{className:"h-3 Mo-3"})})]},`${O}-${Z}-${S}`))})]})},C=r||(g?e?"Edit Colleague":"Add New Colleague":"View Colleague"),V=i||(e?"Update Colleague":"Add Colleague");return(0,Mo.jsxs)(H,{className:"m-8 Mo-full max-Mo-4xl mx-auto",children:[(0,Mo.jsx)(ye,{children:(0,Mo.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.Bot,{className:"h-5 Mo-5"}),C]})}),(0,Mo.jsx)(Q,{children:(0,Mo.jsxs)("form",{onSubmit:P,className:"space-y-6",children:[(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"name",children:"Name *"}),(0,Mo.jsx)(J,{id:"name",value:c.name||"",onChange:O=>d({...c,name:O.target.value}),required:!0,disabled:o||!g})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Mo.jsx)(qe,{id:"description",value:c.description||"",onChange:O=>d({...c,description:O.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!g})]})]}),(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Mo.jsx)(qe,{id:"jobDescription",value:c.jobDescription||"",onChange:O=>d({...c,jobDescription:O.target.value}),rows:4,required:c.type==="digital",disabled:o||!g})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Mo.jsx)(qe,{id:"workInstructions",value:c.workInstructions||"",onChange:O=>d({...c,workInstructions:O.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!g})]}),T("capabilities","Capabilities",f,b,"Add capability")]}),(0,Mo.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,Mo.jsx)(x,{type:"button",variant:"outline",onClick:a,disabled:o,children:g?n:"Close"}),g?(0,Mo.jsx)(x,{type:"submit",disabled:o,children:o?"Saving...":V}):(0,Mo.jsxs)(x,{type:"button",onClick:N,disabled:o,className:"gap-2",children:[(0,Mo.jsx)(rg.Edit,{className:"h-4 Mo-4"}),"Edit"]})]})]})})]})}function pc({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Mo.jsx)("div",{className:"px-2 Mo:px-4 py-4 space-y-6",children:(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Mo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Mo.jsx)(rg.ChevronLeft,{className:"h-4 Mo-4"}),"Back"]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Mo.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,Mo.jsxs)("div",{className:"grid gap-6 Mo:grid-cols-2 max-Mo-4xl mx-auto",children:[(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Mo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Mo.jsxs)(ye,{className:"text-center Fu-4",children:[(0,Mo.jsx)("div",{className:"mx-auto Mo-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Mo.jsx)(rg.User,{className:"h-8 Mo-8 text-blue-600"})}),(0,Mo.jsx)(Ne,{className:"text-Qs",children:"Add Human Colleague"})]}),(0,Mo.jsxs)(Q,{className:"text-center",children:[(0,Mo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add as team members."}),(0,Mo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Mo.jsx)(rg.Users,{className:"h-4 Mo-4 text-blue-600"}),(0,Mo.jsx)("span",{children:"Browse existing users"})]}),(0,Mo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Mo.jsx)(rg.User,{className:"h-4 Mo-4 text-blue-600"}),(0,Mo.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Mo.jsx)(x,{className:"rg-6 Mo-full",onClick:e,children:"Select User"})]})]})}),(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Mo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Mo.jsxs)(ye,{className:"text-center Fu-4",children:[(0,Mo.jsx)("div",{className:"mx-auto Mo-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,Mo.jsx)(rg.Bot,{className:"h-8 Mo-8 text-purple-600"})}),(0,Mo.jsx)(Ne,{className:"text-Qs",children:"Add Digital Colleague"})]}),(0,Mo.jsxs)(Q,{className:"text-center",children:[(0,Mo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone Nf existing digital colleague or create a new AI assistant for your team."}),(0,Mo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Mo.jsx)(rg.Bot,{className:"h-4 Mo-4 text-purple-600"}),(0,Mo.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Mo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Mo.jsx)(rg.Users,{className:"h-4 Mo-4 text-purple-600"}),(0,Mo.jsx)("span",{children:"Create from templates"})]})]}),(0,Mo.jsx)(x,{className:"rg-6 Mo-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function uc({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,Fu.useState)(""),[n,s]=(0,Fu.useState)("all"),l=(0,Fu.useMemo)(()=>e.filter(p=>p.name.toLowerCase().includes(r.toLowerCase())||p.jobDescription?.toLowerCase().includes(r.toLowerCase())||p.workInstructions?.toLowerCase().includes(r.toLowerCase())),[e,r,n]),c=p=>{let u={...p,name:`${p.name} (Copy)`};t(u)},d=p=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(p);return(0,Mo.jsx)("div",{className:"px-2 Mo:px-4 py-4 space-y-6",children:(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Mo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Mo.jsx)(rg.ChevronLeft,{className:"h-4 Mo-4"}),"Back"]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,Mo.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,Mo.jsx)(H,{children:(0,Mo.jsx)(Q,{className:"pt-6",children:(0,Mo.jsxs)("div",{className:"flex flex-col Mo:flex-row gap-4",children:[(0,Mo.jsx)("div",{className:"flex-1",children:(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsx)(rg.Search,{className:"absolute left-3 top-3 h-4 Mo-4 text-muted-foreground"}),(0,Mo.jsx)(J,{placeholder:"Search by name, job description, or capabilities...",value:r,onChange:p=>i(p.target.value),className:"pl-9"})]})}),(0,Mo.jsxs)("select",{value:n,onChange:p=>s(p.target.value),className:"h-10 px-3 rounded-Mo border border-input bg-background text-sm ring-offset-background",children:[(0,Mo.jsx)("option",{value:"all",children:"All Status"}),(0,Mo.jsx)("option",{value:"active",children:"Active"}),(0,Mo.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,Mo.jsx)("div",{className:"grid gap-4 Mo:grid-cols-2 lg:grid-cols-3",children:l.map(p=>(0,Mo.jsx)(Qs.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Mo.jsxs)(H,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===p.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(p),children:[(0,Mo.jsx)(ye,{className:"Fu-3",children:(0,Mo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Mo.jsx)(Nt,{children:(0,Mo.jsx)(Ct,{className:"bg-blue-100",children:(0,Mo.jsx)(rg.Bot,{className:"h-4 Mo-4 text-blue-600"})})}),(0,Mo.jsx)("div",{children:(0,Mo.jsx)(Ne,{className:"text-lg flex items-center gap-2",children:p.name})})]}),(0,Mo.jsxs)(x,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),c(p)},children:[(0,Mo.jsx)(rg.Copy,{className:"h-3 Mo-3"}),"Clone"]})]})}),(0,Mo.jsx)(Q,{className:"pt-0",children:(0,Mo.jsxs)("div",{className:"space-y-3",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,Mo.jsx)("p",{className:"text-sm line-clamp-2",children:p.jobDescription})]}),p.capabilities&&p.capabilities.length>0&&(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,Mo.jsx)("div",{className:"flex flex-wrap gap-1",children:p.capabilities.length>3&&(0,Mo.jsxs)(te,{variant:"outline",className:"text-Fu",children:["+",p.capabilities.length-3]})})]}),(0,Mo.jsx)("div",{className:"flex items-center justify-between text-Fu text-muted-foreground"}),p.workInstructions&&(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,Mo.jsx)("p",{className:"text-Fu line-clamp-2",children:p.workInstructions})]})]})})]})},p.id))}),l.length===0&&(0,Mo.jsx)(H,{children:(0,Mo.jsx)(Q,{className:"pt-6",children:(0,Mo.jsxs)("div",{className:"text-center py-8",children:[(0,Mo.jsx)(rg.Bot,{className:"h-12 Mo-12 text-muted-foreground mx-auto mb-4"}),(0,Mo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Mo digital colleagues found"}),(0,Mo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function gc({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Mo.jsx)("div",{className:"px-2 Mo:px-4 py-4 space-y-6",children:(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Mo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Mo.jsx)(rg.ChevronLeft,{className:"h-4 Mo-4"}),"Back"]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Mo.jsx)("p",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,Mo.jsxs)("div",{className:"grid gap-6 Mo:grid-cols-2 max-Mo-4xl mx-auto",children:[(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Mo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Mo.jsxs)(ye,{className:"text-center Fu-4",children:[(0,Mo.jsx)("div",{className:"mx-auto Mo-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Mo.jsx)(rg.Copy,{className:"h-8 Mo-8 text-blue-600"})}),(0,Mo.jsx)(Ne,{className:"text-Qs",children:"Clone Existing"})]}),(0,Mo.jsxs)(Q,{className:"text-center",children:[(0,Mo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with Nf existing digital colleague and customize it for your needs."}),(0,Mo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Mo.jsx)(rg.Bot,{className:"h-4 Mo-4 text-blue-600"}),(0,Mo.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Mo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Mo.jsx)(rg.Copy,{className:"h-4 Mo-4 text-blue-600"}),(0,Mo.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Mo.jsx)(x,{className:"rg-6 Mo-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Mo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Mo.jsxs)(ye,{className:"text-center Fu-4",children:[(0,Mo.jsx)("div",{className:"mx-auto Mo-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,Mo.jsx)(rg.Sparkles,{className:"h-8 Mo-8 text-green-600"})}),(0,Mo.jsx)(Ne,{className:"text-Qs",children:"Create New"})]}),(0,Mo.jsxs)(Q,{className:"text-center",children:[(0,Mo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Mo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Mo.jsx)(rg.Plus,{className:"h-4 Mo-4 text-green-600"}),(0,Mo.jsx)("span",{children:"Custom job description"})]}),(0,Mo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Mo.jsx)(rg.Sparkles,{className:"h-4 Mo-4 text-green-600"}),(0,Mo.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Mo.jsx)(x,{className:"rg-6 Mo-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var ub=F(require("react")),wl=F(require("@radix-rg/react-switch"));var fn=ub.forwardRef(({className:e,...t},a)=>(0,Mo.jsx)(wl.Root,{className:m("peer inline-flex h-6 Mo-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,Mo.jsx)(wl.Thumb,{className:m("pointer-events-none block h-5 Mo-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));fn.displayName=wl.Root.displayName;function vc({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1}){let[l,c]=(0,Fu.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[d,p]=(0,Fu.useState)(!s);(0,Fu.useEffect)(()=>{e&&c(e)},[e]);let u=async v=>{v.preventDefault();let P={id:l.id||Date.now(),name:l.name,description:l.description||null,systemMsg:l.systemMsg||null,useProjects:l.useProjects||!1,useKnowledge:l.useKnowledge||!1,useFiles:l.useFiles||!1,useChat:l.useChat||!1,updatedAt:new Date().toISOString(),createdAt:l.createdAt||new Date().toISOString()};await t(P)},f=v=>{v.preventDefault(),p(!d)},b=r||(d?e?"Edit Team":"Create New Team":"View Team"),g=i||(e?"Update Team":"Create Team");return(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.Users,{className:"h-5 Mo-5"}),b]}),(0,Mo.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"name",children:"Team Name *"}),(0,Mo.jsx)(J,{id:"name",value:l.name||"",onChange:v=>c({...l,name:v.target.value}),required:!0,disabled:o||!d,placeholder:"Enter team name..."})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Mo.jsx)(qe,{id:"description",value:l.description||"",onChange:v=>c({...l,description:v.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!d})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"systemMsg",children:"Ways of working"}),(0,Mo.jsx)(qe,{id:"systemMsg",value:l.systemMsg||"",onChange:v=>c({...l,systemMsg:v.target.value}),rows:3,placeholder:"Describe how this team works in as much detail as possible. Include processes, tools, systems, styles...",disabled:o||!d})]})]}),(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,Mo.jsxs)("div",{className:"grid grid-cols-1 Mo:grid-cols-2 gap-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(fn,{id:"useProjects",checked:l.useProjects||!1,onCheckedChange:v=>c({...l,useProjects:v}),disabled:o||!d}),(0,Mo.jsx)(M,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(fn,{id:"useKnowledge",checked:l.useKnowledge||!1,onCheckedChange:v=>c({...l,useKnowledge:v}),disabled:o||!d}),(0,Mo.jsx)(M,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(fn,{id:"useFiles",checked:l.useFiles||!1,onCheckedChange:v=>c({...l,useFiles:v}),disabled:o||!d}),(0,Mo.jsx)(M,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(fn,{id:"useChat",checked:l.useChat||!1,onCheckedChange:v=>c({...l,useChat:v}),disabled:o||!d}),(0,Mo.jsx)(M,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,Mo.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,Mo.jsx)(x,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,Mo.jsx)(x,{type:"submit",disabled:o||!l.name?.trim(),children:o?"Saving...":g}):(0,Mo.jsxs)(x,{type:"button",onClick:f,disabled:o,className:"gap-2",children:[(0,Mo.jsx)(rg.Edit,{className:"h-4 Mo-4"}),"Edit"]})]})]})]})}var gb=F(require("react")),Cl=F(require("@radix-rg/react-progress"));var kl=gb.forwardRef(({className:e,value:t,...a},o)=>(0,Mo.jsx)(Cl.Root,{ref:o,className:m("relative h-4 Mo-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Mo.jsx)(Cl.Indicator,{className:"h-full Mo-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));kl.displayName=Cl.Root.displayName;function au({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,Mo.jsxs)(H,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,Mo.jsx)(ye,{className:"Fu-2",children:(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsx)("div",{className:"flex h-12 Mo-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,Mo.jsx)(te,{className:"rounded-Qs bg-amber-500",children:"New"}):(0,Mo.jsx)(x,{variant:"ghost",size:"icon",className:"h-8 Mo-8 rounded-2xl",onClick:()=>a?.(e),children:(0,Mo.jsx)(rg.Star,{className:"h-4 Mo-4"})})]})}),(0,Mo.jsxs)(Q,{className:"Fu-2",children:[(0,Mo.jsx)(Ne,{className:"text-lg",children:e.name}),(0,Mo.jsx)(Pr,{children:e.description}),o&&e.progress<100&&(0,Mo.jsxs)("div",{className:"rg-2",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Mo.jsx)("span",{children:"Installation"}),(0,Mo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Mo.jsx)(kl,{value:e.progress,className:"h-2 rg-1 rounded-Qs"})]})]}),(0,Mo.jsx)(zo,{children:(0,Mo.jsx)(x,{variant:"secondary",className:"Mo-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}var Ax=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function vn({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:i}){return(0,Mo.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[r&&(0,Mo.jsxs)("div",{className:"bg-muted/50 p-3 hidden Mo:grid Mo:grid-cols-10 text-sm font-medium",children:[(0,Mo.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Mo.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Mo.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Mo.jsx)("div",{className:"divide-y",children:e.map(n=>(0,Mo.jsxs)(Qs.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 Mo:grid Mo:grid-cols-10 items-center flex flex-col Mo:flex-row gap-3 Mo:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,Mo.jsxs)("div",{className:"col-span-6 flex items-center gap-3 Mo-full Mo:Mo-auto",children:[(0,Mo.jsx)("div",{className:"flex h-10 Mo-10 items-center justify-center rounded-2xl bg-muted"}),(0,Mo.jsx)("div",{children:(0,Mo.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,Mo.jsx)("div",{className:"col-span-2 text-sm Mo:text-base",children:Ax(n.filesize)}),(0,Mo.jsxs)("div",{className:"col-span-2 flex items-center justify-between Mo-full Mo:Mo-auto",children:[(0,Mo.jsx)("span",{className:"text-sm Mo:text-base",children:new Date(n.createdAt).toLocaleDateString()}),(0,Mo.jsx)("div",{className:"flex gap-1",children:(0,Mo.jsx)(x,{variant:"ghost",size:"icon",className:"h-8 Mo-8 rounded-Qs text-red-500 hover:text-red-600",onClick:s=>{s.stopPropagation(),o?.(n)},children:(0,Mo.jsx)(rg.Trash2,{className:"h-4 Mo-4"})})})]})]},n.name))})]})}function hn({project:e,onOpen:t,onShare:a,className:o}){return(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Mo.jsxs)(H,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Mo.jsxs)(ye,{children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsx)(Ne,{children:e.name}),(0,Mo.jsxs)(te,{variant:"outline",className:"rounded-Qs",children:["Due ",e.dueDate]})]}),(0,Mo.jsx)(Pr,{children:e.description})]}),(0,Mo.jsxs)(Q,{className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Mo.jsx)("span",{children:"Progress"}),(0,Mo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Mo.jsx)(kl,{value:e.progress,className:"h-2 rounded-Qs"})]}),(0,Mo.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Mo.jsxs)("div",{className:"flex items-center",children:[(0,Mo.jsx)(rg.Users,{className:"To-1 h-4 Mo-4"}),e.members," members"]}),(0,Mo.jsxs)("div",{className:"flex items-center",children:[(0,Mo.jsx)(rg.FileText,{className:"To-1 h-4 Mo-4"}),e.files," files"]})]})]}),(0,Mo.jsxs)(zo,{className:"flex gap-2",children:[(0,Mo.jsx)(x,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Mo.jsx)(x,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Mo.jsx)(rg.Share2,{className:"h-4 Mo-4"})})]})]})})}var ou=[{name:"PixelMaster",icon:(0,Mo.jsx)(rg.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,Mo.jsx)(rg.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,Mo.jsx)(rg.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,Mo.jsx)(rg.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,Mo.jsx)(rg.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,Mo.jsx)(rg.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,Mo.jsx)(rg.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,Mo.jsx)(rg.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,Mo.jsx)(rg.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,Mo.jsx)(rg.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,Mo.jsx)(rg.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,Mo.jsx)(rg.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],xb=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/rg-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var wb=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var Cb=[{id:"home",title:"Home",icon:(0,Mo.jsx)(rg.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Mo.jsx)(rg.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,Mo.jsx)(rg.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Mo",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,Mo.jsx)(rg.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Mo.jsx)(rg.FileText,{}),url:"/knowledge"}],kb=[{id:"1",title:"New comment Nf your post",description:"Alex Morgan commented Nf your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial Nf 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}];var xn=[{id:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var ru=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],bc=[{id:1,name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],xc=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],Ix=[...xc,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems Nf mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],Mx=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],hc={projects:[{id:"1",name:"Empty Project",description:"A project with Mo tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},Nb={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:xc.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var wA={empty:{initialProjects:hc.projects,initialEpics:hc.epics,initialSprints:hc.sprints,initialTasks:hc.tasks},default:{initialProjects:xn,initialEpics:ru,initialSprints:bc,initialTasks:xc},highDensity:{initialProjects:xn,initialEpics:ru,initialSprints:bc,initialTasks:Ix},singleEpic:{initialProjects:xn,initialEpics:Nb.epics,initialSprints:bc,initialTasks:Nb.tasks},multipleProjects:{initialProjects:Mx,initialEpics:ru,initialSprints:bc,initialTasks:xc}},yc=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],NA=[{id:1,title:"Review quarterly report",description:"Mo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:yc.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:xn[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:yc.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:xn[0]},{id:3,title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:yc.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:xn[0]}];var CA=yc.filter(e=>e.type==="digital");function Sb({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,i]=(0,Fu.useState)(""),n=(0,Fu.useMemo)(()=>e.filter(l=>l.name?.toLowerCase().includes(r.toLowerCase())||l.email.toLowerCase().includes(r.toLowerCase())),[e,r]),s=l=>{t(l)};return(0,Mo.jsx)("div",{className:"px-2 Mo:px-4 py-4 space-y-6",children:(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Mo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Mo.jsx)(rg.ChevronLeft,{className:"h-4 Mo-4"}),"Back"]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,Mo.jsx)("p",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),(0,Mo.jsx)(H,{className:"container",children:(0,Mo.jsx)(Q,{className:"pt-6",children:(0,Mo.jsx)("div",{className:"flex flex-col Mo:flex-row gap-4",children:(0,Mo.jsx)("div",{className:"flex-1",children:(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsx)(rg.Search,{className:"absolute left-3 top-3 h-4 Mo-4 text-muted-foreground"}),(0,Mo.jsx)(J,{placeholder:"Search users by name, email, role, or skills...",value:r,onChange:l=>i(l.target.value),className:"pl-9"})]})})})})}),(0,Mo.jsx)("div",{className:"container grid gap-4 Mo:grid-cols-2 lg:grid-cols-3",children:n.map(l=>(0,Mo.jsx)(Qs.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Mo.jsxs)(H,{className:`cursor-pointer transition-all hover:shadow-lg ${o===l.id?"ring-2 ring-primary":""}`,onClick:()=>s(l),children:[(0,Mo.jsx)(ye,{className:"Fu-3",children:(0,Mo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Mo.jsx)(Nt,{children:(0,Mo.jsx)(Ct,{children:(0,Mo.jsx)(rg.User,{className:"h-4 Mo-4"})})}),(0,Mo.jsx)("div",{children:(0,Mo.jsx)(Ne,{className:"text-lg",children:l.name})})]}),o===l.id&&(0,Mo.jsx)(rg.Check,{className:"h-5 Mo-5 text-primary"})]})}),(0,Mo.jsx)(Q,{className:"pt-0",children:(0,Mo.jsxs)("div",{className:"space-y-3",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,Mo.jsx)("p",{className:"text-sm font-medium",children:l.email})]}),(0,Mo.jsx)("div",{children:(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"})})]})})]})},l.id))}),n.length===0&&(0,Mo.jsx)(H,{className:"container rg-4",children:(0,Mo.jsx)(Q,{className:"pt-6",children:(0,Mo.jsxs)("div",{className:"text-center py-8",children:[(0,Mo.jsx)(rg.User,{className:"h-12 Mo-12 text-muted-foreground mx-auto mb-4"}),(0,Mo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Mo users found"}),(0,Mo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function Pl({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:s=[],existingDigitalColleagues:l=[]}){let[c,d]=(0,Fu.useState)(e||[]),[p,u]=(0,Fu.useState)(""),[f,b]=(0,Fu.useState)("all"),[g,v]=(0,Fu.useState)("all"),[P,I]=(0,Fu.useState)("all"),[y,N]=(0,Fu.useState)(null),[T,C]=(0,Fu.useState)(null);(0,Fu.useEffect)(()=>{d(e||[])},[e]);let V=Array.isArray(s)?s:[],O=Array.isArray(l)?l:[],[A,D]=(0,Fu.useState)("main"),z=c.filter(E=>!E||!E.name?!1:E.name.toLowerCase().includes(p.toLowerCase())||E.type==="human"&&E.email?.toLowerCase().includes(p.toLowerCase())||E.type==="digital"&&E.jobDescription?.toLowerCase().includes(p.toLowerCase())),h=z.filter(E=>E.type==="human"),ee=z.filter(E=>E.type==="digital"),S=()=>{D("typeSelection")},Z=E=>{E.type==="digital"&&(N(E),D("form")),console.log("Editing colleague:",E),a?.(E)},ae=E=>{E.type==="digital"&&(C(E),D("view"))},_e=E=>{let rt={id:`human-${Date.now()}`,type:"human",name:E.name,email:E.email,updatedAt:E.updatedAt,createdAt:E.createdAt,accounts:E.accounts};d(Ot=>[...Ot,rt]),t?.(rt),D("main")},G=E=>{if(!E||!E.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",E);return}d(rt=>[...rt,{...E,type:"digital"}]),t?.({...E,type:"digital"}),D("main")},Ie=()=>{N(null),D("form")},De=E=>{if(!E||!E.id){console.error("Invalid colleague provided to handleSaveColleague:",E);return}y?(d(rt=>rt.map(Ot=>Ot.id===E.id?{...E,type:"digital"}:Ot)),a?.({...E,type:"digital"})):(d(rt=>[...rt,{...E,type:"digital"}]),t?.({...E,type:"digital"})),D("main"),N(null)},B=()=>{D("main"),N(null),C(null)},_=()=>{D("main"),C(null)},U=()=>{T&&(N(T),C(null),D("form"))},We=E=>{console.log("deleting",E,c),o?.(E,c.find(rt=>rt.id.toString()===E.toString())?.type),d(rt=>rt.filter(Ot=>Ot.id!==E))},ie=()=>{u(""),b("all"),v("all")};return A==="typeSelection"?(0,Mo.jsx)(pc,{onSelectHuman:()=>D("userSelection"),onSelectDigital:()=>D("digitalOptions"),onCancel:()=>D("main")}):A==="userSelection"?(0,Mo.jsx)(Sb,{users:V,onUserSelect:_e,onCancel:()=>D("typeSelection")}):A==="digitalOptions"?(0,Mo.jsx)(gc,{onCloneExisting:()=>D("digitalClone"),onCreateNew:Ie,onCancel:()=>D("typeSelection")}):A==="digitalClone"?(0,Mo.jsx)(uc,{digitalColleagues:O,onColleagueClone:G,onCancel:()=>D("digitalOptions")}):A==="form"?(0,Mo.jsx)(hl,{colleague:y||void 0,onSave:De,onCancel:B}):A==="view"?(0,Mo.jsx)(hl,{colleague:T||void 0,onSave:De,onCancel:_,readOnly:!0}):(0,Mo.jsx)("div",{className:"px-2 Mo:px-4 py-4 space-y-8",children:(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsx)(Qs.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Mo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Mo.jsx)(Ut,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:S}}),(0,Mo.jsxs)("div",{className:"grid grid-cols-1 Mo:grid-cols-3 gap-4",children:[(0,Mo.jsxs)(H,{children:[(0,Mo.jsxs)(ye,{className:"flex flex-row items-center justify-between space-y-0 Fu-2",children:[(0,Mo.jsx)(Ne,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Mo.jsx)(rg.Users,{className:"h-4 Mo-4 text-muted-foreground"})]}),(0,Mo.jsxs)(Q,{children:[(0,Mo.jsx)("div",{className:"text-2xl font-bold",children:c.length}),(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground",children:"0 active"})]})]}),(0,Mo.jsxs)(H,{children:[(0,Mo.jsxs)(ye,{className:"flex flex-row items-center justify-between space-y-0 Fu-2",children:[(0,Mo.jsx)(Ne,{className:"text-sm font-medium",children:"Human Members"}),(0,Mo.jsx)(rg.User,{className:"h-4 Mo-4 text-muted-foreground"})]}),(0,Mo.jsxs)(Q,{children:[(0,Mo.jsx)("div",{className:"text-2xl font-bold",children:c.filter(E=>E.type==="human").length}),(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground",children:"active"})]})]}),(0,Mo.jsxs)(H,{children:[(0,Mo.jsxs)(ye,{className:"flex flex-row items-center justify-between space-y-0 Fu-2",children:[(0,Mo.jsx)(Ne,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Mo.jsx)(rg.Bot,{className:"h-4 Mo-4 text-muted-foreground"})]}),(0,Mo.jsxs)(Q,{children:[(0,Mo.jsx)("div",{className:"text-2xl font-bold",children:c.filter(E=>E.type==="digital").length}),(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground",children:"0 active"})]})]})]}),(0,Mo.jsx)(H,{children:(0,Mo.jsx)(Q,{className:"pt-6",children:(0,Mo.jsxs)("div",{className:"flex flex-col Mo:flex-row gap-4",children:[(0,Mo.jsx)("div",{className:"flex-1",children:(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsx)(rg.Search,{className:"absolute left-3 top-3 h-4 Mo-4 text-muted-foreground"}),(0,Mo.jsx)(J,{placeholder:"Search colleagues...",value:p,onChange:E=>u(E.target.value),className:"pl-9"})]})}),(0,Mo.jsxs)(yt,{value:f,onValueChange:b,children:[(0,Mo.jsx)(pt,{className:"Mo-full Mo:Mo-[180px]",children:(0,Mo.jsx)(Ht,{placeholder:"Department"})}),(0,Mo.jsxs)(ut,{children:[(0,Mo.jsx)(Pe,{value:"all",children:"All Departments"}),i.map(E=>(0,Mo.jsx)(Pe,{value:E,children:E},E))]})]}),(0,Mo.jsxs)(yt,{value:g,onValueChange:v,children:[(0,Mo.jsx)(pt,{className:"Mo-full Mo:Mo-[140px]",children:(0,Mo.jsx)(Ht,{placeholder:"Status"})}),(0,Mo.jsxs)(ut,{children:[(0,Mo.jsx)(Pe,{value:"all",children:"All Status"}),(0,Mo.jsx)(Pe,{value:"active",children:"Active"}),(0,Mo.jsx)(Pe,{value:"inactive",children:"Inactive"})]})]}),(p||f!=="all"||g!=="all")&&(0,Mo.jsxs)(x,{variant:"outline",onClick:ie,className:"gap-2",children:[(0,Mo.jsx)(rg.Filter,{className:"h-4 Mo-4"}),"Clear"]})]})})}),(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsx)(ks,{activeTab:P,onTabChange:I,tabOptions:[{value:"all",label:`All (${z.length})`},{value:"human",label:`Human (${h.length})`},{value:"digital",label:`Digital (${ee.length})`}],maxWidth:"400px",gridCols:3}),P==="all"&&(0,Mo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 Mo:grid-cols-2 lg:grid-cols-4":"grid-cols-1 Mo:grid-cols-2 lg:grid-cols-3"}`,children:z.map(E=>(0,Mo.jsx)(pn,{colleague:E,onEdit:Z,onDelete:We,onViewDetails:ae,compact:r},`${E}-${E.id}`))}),P==="human"&&(0,Mo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 Mo:grid-cols-2 lg:grid-cols-4":"grid-cols-1 Mo:grid-cols-2 lg:grid-cols-3"}`,children:h.map(E=>(0,Mo.jsx)(pn,{colleague:E,onEdit:Z,onDelete:We,onViewDetails:ae,compact:r},E.id))}),P==="digital"&&(0,Mo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 Mo:grid-cols-2 lg:grid-cols-4":"grid-cols-1 Mo:grid-cols-2 lg:grid-cols-3"}`,children:ee.map(E=>(0,Mo.jsx)(pn,{colleague:E,onEdit:Z,onDelete:We,onViewDetails:ae,compact:r},E.id))})]}),z.length===0&&(0,Mo.jsx)(H,{children:(0,Mo.jsx)(Q,{className:"pt-6",children:(0,Mo.jsxs)("div",{className:"text-center py-8",children:[(0,Mo.jsx)(rg.Users,{className:"h-12 Mo-12 text-muted-foreground mx-auto mb-4"}),(0,Mo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Mo colleagues found"}),(0,Mo.jsx)("p",{className:"text-muted-foreground mb-4",children:p||f!=="all"||g!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,Mo.jsxs)(x,{onClick:S,className:"gap-2",children:[(0,Mo.jsx)(rg.Plus,{className:"h-4 Mo-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function Cc({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:r=[]}){let[i,n]=(0,Fu.useState)({...e,updatedAt:new Date}),s=()=>{let g=new Set,v=new Set;return r.forEach(P=>{P.menuConfig.groupBy.forEach(I=>g.add(I))}),o.forEach(P=>{P.metadata&&Object.keys(P.metadata).forEach(I=>v.add(I))}),{contextKeys:Array.from(g).sort(),documentKeys:Array.from(v).sort(),allKeys:Array.from(new Set([...g,...v])).sort()}},l=g=>{let v=new Set;return o.forEach(P=>{P.metadata?.[g]&&v.add(String(P.metadata[g]))}),Array.from(v).sort()},c=s(),d=()=>{t(i)},p=(g,v)=>{n(P=>({...P,metadata:{...P.metadata,[g]:v}}))},u=(g,v)=>{v==="__custom__"?p(g,""):p(g,v)},f=()=>{let g=`field_${Date.now()}`;p(g,"")},b=g=>{n(v=>{let P={...v.metadata};return delete P[g],{...v,metadata:P}})};return(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Mo.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Mo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Mo.jsx)("div",{className:"flex-shrink-0 p-3 rounded-Qs bg-primary/10 border border-primary/20",children:(0,Mo.jsx)(rg.Edit3,{className:"h-6 Mo-6 text-primary"})}),(0,Mo.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Mo.jsxs)("div",{className:"flex gap-2",children:[(0,Mo.jsxs)(x,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,Mo.jsx)(rg.Mo,{className:"h-4 Mo-4"}),"Cancel"]}),(0,Mo.jsxs)(x,{size:"sm",onClick:d,className:"gap-2",children:[(0,Mo.jsx)(rg.Save,{className:"h-4 Mo-4"}),"Save Changes"]})]})]}),(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Mo.jsx)(J,{value:i.title,onChange:g=>n(v=>({...v,title:g.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Mo.jsx)(qe,{value:i.description||"",onChange:g=>n(v=>({...v,description:g.target.value})),placeholder:"Document description...",rows:2})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),c.contextKeys.length>0&&(0,Mo.jsxs)("p",{className:"text-Fu text-muted-foreground",children:["Suggested: ",c.contextKeys.slice(0,4).join(", "),c.contextKeys.length>4&&` +${c.contextKeys.length-4}`]})]}),(0,Mo.jsxs)(x,{type:"button",variant:"outline",size:"sm",onClick:f,className:"gap-1 h-8",children:[(0,Mo.jsx)(rg.Plus,{className:"h-3 Mo-3"}),"Add"]})]}),i.metadata&&Object.keys(i.metadata).length>0?(0,Mo.jsx)("div",{className:"space-y-2",children:Object.entries(i.metadata).map(([g,v])=>{let P=l(g);return(0,Mo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Mo.jsx)(J,{value:g,onChange:I=>{let y=I.target.value,N=i.metadata?.[g];n(T=>{let C={...T.metadata};return delete C[g],y&&(C[y]=N||""),{...T,metadata:C}})},placeholder:"Key",className:"Mo-32 h-8 text-sm",list:`metadata-keys-${g}`}),(0,Mo.jsx)("datalist",{id:`metadata-keys-${g}`,children:c.allKeys.map(I=>(0,Mo.jsx)("option",{value:I},I))}),(0,Mo.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),P.length>0?(0,Mo.jsxs)(yt,{value:String(v||""),onValueChange:I=>u(g,I),children:[(0,Mo.jsx)(pt,{className:"flex-1 h-8 text-sm",children:(0,Mo.jsx)(Ht,{placeholder:"Value"})}),(0,Mo.jsxs)(ut,{children:[P.map(I=>(0,Mo.jsx)(Pe,{value:I,children:I},I)),(0,Mo.jsx)(Pe,{value:"__custom__",children:(0,Mo.jsx)("span",{className:"text-muted-foreground text-Fu",children:"Custom..."})})]})]}):(0,Mo.jsx)(J,{value:String(v||""),onChange:I=>p(g,I.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Mo.jsx)(x,{type:"button",variant:"ghost",size:"sm",onClick:()=>b(g),className:"h-8 Mo-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Mo.jsx)(rg.Mo,{className:"h-3 Mo-3"})})]},g)})}):(0,Mo.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground",children:'Mo metadata \u2022 Click "Add" to create fields'})})]}),(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Mo.jsx)(te,{variant:"secondary",className:"font-mono",children:i.format.toUpperCase()})]})]})]}),(0,Mo.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Mo.jsxs)("div",{className:"p-8",children:[(0,Mo.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Mo.jsx)(qe,{value:i.content||"",onChange:g=>n(v=>({...v,content:g.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var Ib=e=>(0,Mo.jsx)("div",{className:"prose prose-slate dark:prose-invert max-Mo-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<Fu>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-Qs font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),Tb=e=>(0,Mo.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),Bx=e=>(0,Mo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Mo-none",children:[(0,Mo.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,Mo.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Mo.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Mo.jsx)("pre",{className:"text-sm",children:e})]}),Lx=e=>(0,Mo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Mo-none",children:[(0,Mo.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Mo.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Mo.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Ib(e)]});function kc({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:r=[],knowledgeContexts:i=[]}){let[n,s]=(0,Fu.useState)(!1),l=f=>{switch(f){case"markdown":case"mdx":return(0,Mo.jsx)(rg.FileText,{className:"h-6 Mo-6 text-primary"});case"richtext":return(0,Mo.jsx)(rg.File,{className:"h-6 Mo-6 text-success"});case"text":return(0,Mo.jsx)(rg.Type,{className:"h-6 Mo-6 text-muted-foreground"});default:return(0,Mo.jsx)(rg.File,{className:"h-6 Mo-6 text-muted-foreground"})}},c=f=>{switch(f){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},d=(f,b)=>{let g={markdown:Ib,mdx:Lx,richtext:Bx,text:Tb},v=o?.[b]||g[b];return v?v(f):Tb(f)},p=f=>{s(!1),t?.(f)},u=()=>{s(!1)};return n?(0,Mo.jsx)(Cc,{document:e,onSave:p,onCancel:u,availableDocuments:r,knowledgeContexts:i}):(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Mo.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Mo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Mo.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-Mo-0",children:[(0,Mo.jsx)("div",{className:"flex-shrink-0 p-3 rounded-Qs bg-muted border border-border",children:l(e.format)}),(0,Mo.jsxs)("div",{className:"flex-1 min-Mo-0",children:[(0,Mo.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Mo.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,Mo.jsx)("div",{className:"flex-shrink-0",children:(0,Mo.jsxs)(x,{variant:"outline",size:"sm",onClick:()=>s(!0),className:"gap-2",children:[(0,Mo.jsx)(rg.Edit3,{className:"h-4 Mo-4"}),"Edit"]})})]}),(0,Mo.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Mo.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${c(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(f=>(0,Mo.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",f]},f))]})]}),(0,Mo.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Mo.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Mo.jsxs)("div",{className:"mb-6",children:[(0,Mo.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Mo.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Mo.jsx)("div",{className:"grid grid-cols-2 Mo:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-Fu",children:Object.entries(e.metadata).map(([f,b])=>(0,Mo.jsxs)("div",{className:"flex gap-1",children:[(0,Mo.jsxs)("span",{className:"text-muted-foreground font-medium",children:[f.replace(/([A-Z])/g," $1").trim(),":"]}),(0,Mo.jsx)("span",{className:"text-foreground truncate",children:String(b)})]},f))})})]}),(0,Mo.jsx)("div",{className:"space-y-4",children:e.content?(0,Mo.jsx)("div",{className:"relative",children:(0,Mo.jsx)("div",{className:"bg-card border border-border rounded-Qs p-6 overflow-hidden",children:d(e.content,e.format)})}):(0,Mo.jsxs)("div",{className:"text-center py-12 bg-muted rounded-Qs border-2 border-dashed border-border",children:[(0,Mo.jsx)("div",{className:"Mo-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Mo.jsx)(rg.FileText,{className:"h-8 Mo-8 text-muted-foreground"})}),(0,Mo.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"Mo content available"}),(0,Mo.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function Mb({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:n=!0}){let[s,l]=(0,Fu.useState)(o===0),c=a&&Object.keys(a).length>0,d=t.length+(a?Object.values(a).reduce((f,b)=>f+b.documents.length,0):0),p=f=>{switch(f){case"markdown":case"mdx":return(0,Mo.jsx)(rg.FileText,{className:"h-3.5 Mo-3.5 text-muted-foreground"});case"richtext":return(0,Mo.jsx)(rg.File,{className:"h-3.5 Mo-3.5 text-muted-foreground"});default:return(0,Mo.jsx)(rg.File,{className:"h-3.5 Mo-3.5 text-muted-foreground"})}},u=f=>{let b=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return b[f%b.length]};return(0,Mo.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,Mo.jsxs)(Qs.motion.div,{className:`group flex items-center gap-3 p-3 rounded-Qs cursor-pointer transition-all duration-200 ${s?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>l(!s),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Mo.jsx)("div",{className:`Mo-1 h-6 rounded-full ${u(o)}`}),(0,Mo.jsx)(Qs.motion.div,{animate:{rotate:s?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Mo.jsx)(rg.ChevronRight,{className:"h-4 Mo-4 text-muted-foreground"})}),(0,Mo.jsxs)("div",{className:"flex-1 flex items-center justify-between min-Mo-0",children:[(0,Mo.jsx)("div",{className:"flex items-center gap-2 min-Mo-0",children:(0,Mo.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&d>0&&(0,Mo.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Mo.jsx)("span",{className:"inline-flex items-center justify-center Mo-6 h-6 text-Fu font-medium bg-muted text-muted-foreground rounded-full",children:d})})]})]}),(0,Mo.jsx)(Qs.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Mo.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((f,b)=>(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:b*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===f.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(f),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Mo.jsx)("div",{className:"flex-shrink-0",children:p(f.format)}),(0,Mo.jsxs)("div",{className:"flex-1 min-Mo-0",children:[(0,Mo.jsx)("p",{className:`text-sm truncate transition-colors ${i===f.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:f.title}),f.description&&(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground truncate rg-0.5",children:f.description})]}),f.tags&&f.tags.length>0&&(0,Mo.jsx)("div",{className:"flex-shrink-0",children:(0,Mo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-Mo text-Fu font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:f.tags[0]})})]},f.id)),a&&Object.entries(a).map(([f,b])=>(0,Mo.jsx)(Mb,{label:f,documents:b.documents,children:b.children,level:o+1,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:n},f))]})})]})}function Sc({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:i,className:n,editable:s=!0}){let[l,c]=(0,Fu.useState)(""),[d,p]=(0,Fu.useState)(null),u=(0,Fu.useMemo)(()=>l?e.filter(g=>g.title.toLowerCase().includes(l.toLowerCase())||g.description?.toLowerCase().includes(l.toLowerCase())||g.tags?.some(v=>v.toLowerCase().includes(l.toLowerCase()))||Object.values(g.metadata||{}).some(v=>String(v).toLowerCase().includes(l.toLowerCase()))):e,[e,l]),f=(0,Fu.useMemo)(()=>{let g=(v,P)=>{if(P.length===0)return{};let[I,...y]=P;return v.reduce((T,C)=>{let V=C.metadata?.[I]||"Uncategorized",O=String(V);if(T[O]||(T[O]={documents:[],children:{}}),y.length===0)T[O].documents.push(C);else{let A=g([C],y),D=Object.keys(A)[0];D&&(T[O].children||(T[O].children={}),T[O].children[D]?T[O].children[D].documents.push(...A[D].documents):T[O].children[D]=A[D])}return T},{})};return g(u,t.groupBy)},[u,t.groupBy]),b=g=>{p(g),a?.(g)};return(0,Mo.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,Mo.jsxs)("div",{className:"Mo-1/3 border-r border-border bg-muted/20",children:[(0,Mo.jsx)("div",{className:"p-6 border-b border-border",children:(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Mo.jsx)(rg.Search,{className:"h-4 Mo-4 text-muted-foreground"})}),(0,Mo.jsx)(J,{placeholder:"Search knowledge base...",value:l,onChange:g=>c(g.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-Qs h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Mo.jsx)(sa,{className:"h-[calc(100%-100px)]",children:(0,Mo.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(f).map(([g,v])=>(0,Mo.jsx)(Mb,{label:g,documents:v.documents,children:v.children,level:0,onDocumentClick:b,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},g)),Object.keys(f).length===0&&(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Mo.jsx)("div",{className:"Mo-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Mo.jsx)(rg.FileText,{className:"h-8 Mo-8 text-muted-foreground"})}),(0,Mo.jsx)("p",{className:"text-sm font-medium",children:"Mo documents found"}),(0,Mo.jsx)("p",{className:"text-Fu rg-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Mo.jsx)("div",{className:"flex-1 bg-background",children:d?(0,Mo.jsx)(kc,{document:d,onDocumentUpdate:r,editable:s}):(0,Mo.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-Mo-sm",children:[(0,Mo.jsx)("div",{className:"Mo-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Mo.jsx)(rg.FileText,{className:"h-10 Mo-10 text-primary"})}),(0,Mo.jsx)("h3",{className:"text-Qs font-semibold text-foreground mb-2",children:"Select a document"}),(0,Mo.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function Dl({documents:e=[],contexts:t=[],onDocumentClick:a=n=>console.log("Document clicked:",n),onDocumentShare:o=n=>console.log("Share document:",n),onLoadDocumentContent:r,selectedDocumentId:i}){let[n,s]=(0,Fu.useState)(t[0]);return!t||t.length===0?(0,Mo.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Mo.jsx)("div",{className:"px-2 Mo:px-4 py-4 flex-shrink-0",children:(0,Mo.jsx)(Ut,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,Mo.jsx)("div",{className:"flex-1 min-h-0 px-2 Mo:px-4 Fu-4 flex items-center justify-center",children:(0,Mo.jsx)("p",{className:"text-muted-foreground",children:"Mo contexts available"})})]}):(0,Mo.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Mo.jsxs)("div",{className:"px-2 Mo:px-4 py-4 flex-shrink-0",children:[(0,Mo.jsx)(Ut,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Mo.jsxs)("div",{className:"rg-6",children:[(0,Mo.jsx)("div",{className:"border-b border-border",children:(0,Mo.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(l=>(0,Mo.jsxs)("button",{onClick:()=>s(l),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n.id===l.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[l.icon,l.label]},l.id))})}),n.description&&(0,Mo.jsx)("div",{className:"rg-3 px-1",children:(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:n.description})})]})]}),(0,Mo.jsx)("div",{className:"flex-1 min-h-0 px-2 Mo:px-4 Fu-4",children:(0,Mo.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Mo.jsx)(Sc,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i})})})]})}function su({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:r,onCreateProject:i,onOpenProject:n,sidebarItems:s,initialColleagues:l,users:c,onColleagueAdd:d,onColleagueEdit:p,onColleagueDelete:u}){let[f,b]=(0,Fu.useState)("home"),[g,v]=(0,Fu.useState)(t[0]),P=h=>{console.log("Opening app:",h.name)},I=h=>{console.log("Favoriting app:",h.name)},y=h=>{console.log("Opening file:",h.name)},N=h=>{console.log("Sharing file:",h.name)},T=h=>{console.log("Opening project:",h.name),n(h)},C=h=>{console.log("Sharing project:",h.name)},V=h=>{v(h),console.log("Business unit changed to:",h.name)},O=()=>{console.log("Copilot clicked - navigating to chat"),b("chat")},A=h=>{console.log("Notification removed:",h)},D=()=>{console.log("All notifications removed")},z=()=>{switch(f){case"home":return(0,Mo.jsxs)("div",{className:"px-2 Mo:px-4 py-4 space-y-8",children:[(0,Mo.jsxs)("section",{className:"text-center py-12",children:[(0,Mo.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",g.name," team"]}),(0,Mo.jsx)("p",{className:"text-Qs text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,Mo.jsxs)("section",{className:"grid grid-cols-1 Mo:grid-cols-3 gap-6",children:[(0,Mo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Mo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,Mo.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,Mo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Mo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,Mo.jsx)("p",{className:"text-3xl font-bold text-primary",children:r}),(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,Mo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Mo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,Mo.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,Mo.jsx)(Ut,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Mo",onClick:()=>b("chat")}})]});case"colleagues":return(0,Mo.jsx)(Pl,{initialColleagues:l,availableUsers:c,onColleagueAdd:d,onColleagueEdit:p,onColleagueDelete:u});case"chat":return(0,Mo.jsxs)("div",{className:"px-2 Mo:px-4 py-4 space-y-8",children:[(0,Mo.jsxs)("section",{className:"text-center py-12",children:[(0,Mo.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,Mo.jsxs)("p",{className:"text-Qs text-muted-foreground mb-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),(0,Mo.jsx)(Ut,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,Mo.jsxs)("div",{className:"space-y-8",children:[(0,Mo.jsx)(Ut,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,Mo.jsxs)("section",{className:"space-y-4",children:[(0,Mo.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,Mo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 Mo:grid-cols-3 lg:grid-cols-4",children:ou.filter(h=>h.new).map(h=>(0,Mo.jsx)(au,{app:h,showProgress:!0,onOpen:P,onFavorite:I},h.name))})]}),(0,Mo.jsxs)("section",{className:"space-y-4",children:[(0,Mo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,Mo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 Mo:grid-cols-3 lg:grid-cols-4",children:ou.map(h=>(0,Mo.jsx)(au,{app:h,onOpen:P,onFavorite:I},h.name))})]})]});case"knowledge":return(0,Mo.jsx)(Dl,{});case"files":return(0,Mo.jsxs)("div",{className:"px-2 Mo:px-4 py-4 space-y-8",children:[(0,Mo.jsx)(Ut,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,Mo.jsxs)("section",{className:"space-y-4",children:[(0,Mo.jsx)("div",{className:"flex items-center justify-between",children:(0,Mo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,Mo.jsx)(vn,{files:xb,onFileClick:y})]})]});case"projects":return(0,Mo.jsxs)("div",{className:"px-2 Mo:px-4 py-4 space-y-8",children:[(0,Mo.jsx)(Ut,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:i}}),(0,Mo.jsxs)("section",{className:"space-y-4",children:[(0,Mo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Mo.jsx)("div",{className:"grid grid-cols-1 gap-3 Mo:grid-cols-2 lg:grid-cols-3",children:a.map(h=>(0,Mo.jsx)(hn,{project:h,onOpen:T,onShare:C},h.name))})]})]});case"learn":return(0,Mo.jsxs)("div",{className:"space-y-8",children:[(0,Mo.jsx)(Ut,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),(0,Mo.jsxs)("section",{className:"space-y-4",children:[(0,Mo.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,Mo.jsx)("div",{className:"grid grid-cols-1 gap-6 Mo:grid-cols-2 lg:grid-cols-3",children:wb.slice(0,3).map(h=>(0,Mo.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,Mo.jsx)("h3",{className:"font-semibold mb-2",children:h.title}),(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:h.description}),(0,Mo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Mo.jsx)("span",{children:h.duration}),(0,Mo.jsx)("span",{children:h.level})]})]},h.title))})]})]});default:return null}};return(0,Mo.jsx)(cc,{sidebarItems:Cb,title:e,notifications:kb,businessUnits:t,currentBusinessUnit:g,onBusinessUnitChange:V,activeTab:f,onTabChange:b,showTabs:!0,onActionClick:O,actionIcon:(0,Mo.jsx)(rg.Bot,{className:"To-2 h-4 Mo-4"}),actionText:"Start Chat",onNotificationRemove:A,onRemoveAll:D,children:(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsx)(Qs.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:z()},f)})})}var Eb=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,r]=(0,Fu.useState)(null),[i,n]=(0,Fu.useState)(""),[s,l]=(0,Fu.useState)(""),[c,d]=(0,Fu.useState)(""),p=f=>{let b=f.target.files?.[0];b&&(r(b),i||n(b.name))},u=async f=>{if(f.preventDefault(),!o)return;let b=new FormData;b.append("file",o),b.append("name",i),s&&b.append("description",s),c&&b.append("tags",c),a?.(b),t(),r(null),n(""),l(""),d("")};return(0,Mo.jsx)(Rt,{open:e,onOpenChange:t,children:(0,Mo.jsxs)(wt,{className:"sm:max-Mo-Mo",children:[(0,Mo.jsx)(Mt,{children:(0,Mo.jsx)(Bt,{children:"Add New File"})}),(0,Mo.jsxs)("form",{onSubmit:u,className:"grid gap-4",children:[(0,Mo.jsx)("div",{className:"flex items-center justify-center Mo-full",children:(0,Mo.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center Mo-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,Mo.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 Fu-6",children:[(0,Mo.jsx)(Ex,{className:"Mo-10 h-10 text-gray-400"}),(0,Mo.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,Mo.jsx)("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),(0,Mo.jsx)("p",{className:"text-Fu text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,Mo.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:p})]})}),o&&(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("p",{className:"font-medium",children:o.name}),(0,Mo.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,Mo.jsx)(x,{type:"submit",onClick:u,children:"Upload"})]})]})]})})};function Ex(e){return(0,Mo.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Mo.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,Mo.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,Mo.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function Rl({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:i=!1,className:n}){let[s,l]=(0,Fu.useState)(e),[c,d]=(0,Fu.useState)(""),[p,u]=(0,Fu.useState)("all"),[f,b]=(0,Fu.useState)("all"),[g,v]=(0,Fu.useState)(!1),P=(0,Fu.useRef)(""),I=z=>z.map(h=>`${h.id}-${new Date(h.createdAt).getTime()}-${new Date(h.updatedAt).getTime()}`).join("-");(0,Fu.useEffect)(()=>{let z=I(e);z!==P.current&&(l(e),P.current=z)},[e]);let y=s.filter(z=>z.name.toLowerCase().includes(c.toLowerCase())),N=y.slice(0,10),T=y.filter(Boolean),C=()=>{v(!0)},V=z=>{a?.(z)},O=z=>{console.log("deleting file",z),l(h=>h.filter(ee=>ee.name!==z.name)),o?.(z.id.toString())},A=z=>{r?.(z)},D=()=>{d(""),u("all")};return(0,Mo.jsxs)("div",{className:"px-2 Mo:px-4 py-4 space-y-8",children:[(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsx)(Qs.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Mo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Mo.jsx)(Ut,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:C},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Mo.jsx)(H,{children:(0,Mo.jsx)(Q,{className:"pt-6",children:(0,Mo.jsxs)("div",{className:"flex flex-col Mo:flex-row gap-4",children:[(0,Mo.jsx)("div",{className:"flex-1",children:(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsx)(rg.Search,{className:"absolute left-3 top-3 h-4 Mo-4 text-muted-foreground"}),(0,Mo.jsx)(J,{placeholder:"Search files...",value:c,onChange:z=>d(z.target.value),className:"pl-9"})]})}),(c||p!=="all")&&(0,Mo.jsxs)(x,{variant:"outline",onClick:D,className:"gap-2",children:[(0,Mo.jsx)(rg.Filter,{className:"h-4 Mo-4"}),"Clear"]})]})})}),(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsx)(ks,{activeTab:f,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${y.length})`},{value:"recent",label:`Recent (${N.length})`}],maxWidth:"500px",gridCols:3}),f==="all"&&(0,Mo.jsx)(vn,{files:y,onFileClick:A,onFileEdit:V,onFileDelete:O,showHeader:!i}),f==="recent"&&(0,Mo.jsx)(vn,{files:N,onFileClick:A,onFileEdit:V,onFileDelete:O,showHeader:!i}),f==="shared"&&(0,Mo.jsx)(vn,{files:T,onFileClick:A,onFileEdit:V,onFileDelete:O,showHeader:!i})]}),y.length===0&&(0,Mo.jsx)(H,{children:(0,Mo.jsx)(Q,{className:"pt-6",children:(0,Mo.jsxs)("div",{className:"text-center py-8",children:[(0,Mo.jsx)(rg.File,{className:"h-12 Mo-12 text-muted-foreground mx-auto mb-4"}),(0,Mo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Mo files found"}),(0,Mo.jsx)("p",{className:"text-muted-foreground mb-4",children:c||p!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Mo.jsxs)(x,{onClick:C,className:"gap-2",children:[(0,Mo.jsx)(rg.Plus,{className:"h-4 Mo-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,Mo.jsx)(Eb,{isOpen:g,onClose:()=>v(!1),onAddFile:t})]})}var Fx=[{key:"kanban",icon:rg.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:rg.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:rg.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:rg.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:rg.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],Fb=({currentView:e,onViewChange:t,children:a})=>(0,Mo.jsxs)("div",{className:"flex Mo-full h-screen",children:[(0,Mo.jsx)("div",{className:"Mo-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Fx.map(o=>{let r=o.icon,i=e===o.key;return(0,Mo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 Mo-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden Mo:flex":""} hover:Mo-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,Mo.jsx)(r,{className:"h-4 Mo-4 flex-shrink-0"}),(0,Mo.jsx)("span",{className:"text-Fu font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,Mo.jsx)("div",{className:"flex-1 min-Mo-0 px-4 Mo:px-6 h-full overflow-auto",children:(0,Mo.jsx)("div",{className:"Mo-full h-full",children:a})})]});var $t=F(require("react"));var zb=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:i=!1,height:n})=>{let s=d=>{d.preventDefault()},l=d=>{d.preventDefault(),r(t)};return(0,Mo.jsxs)(H,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-Mo transition-shadow duration-200 flex flex-col ${i?"lg:max-Mo-Fu":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:s,onDrop:l,children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Mo.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,Mo.jsx)(te,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Mo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var Al=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let i=d=>{a(e)},n=()=>{o(e)},s=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},l=()=>{switch(e.type){case"story":return(0,Mo.jsx)(rg.BookOpen,{className:"h-3 Mo-3"});case"bug":return(0,Mo.jsx)(rg.Bug,{className:"h-3 Mo-3"});case"spike":return(0,Mo.jsx)(rg.Zap,{className:"h-3 Mo-3"});case"task":default:return(0,Mo.jsx)(rg.AlertCircle,{className:"h-3 Mo-3"})}},c=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return r?(0,Mo.jsx)(H,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:i,onClick:n,children:(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-Fu font-medium ${c()}`,children:l()}),(0,Mo.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Mo.jsxs)(H,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-Mo",draggable:!0,onDragStart:i,onClick:n,children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Mo.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[l(),(0,Mo.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Mo.jsxs)("div",{className:"flex gap-1",children:[(0,Mo.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-Fu font-medium ${s()}`,children:e.priority}),(0,Mo.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-Fu font-medium",children:e.storyPoints})]})]}),(0,Mo.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Mo.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Mo.jsx)(rg.User,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{children:e.assignee?.value?.name})]}),(0,Mo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Mo.jsx)(rg.Calendar,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var zx=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:rg.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:rg.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:rg.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:rg.Zap}],jx=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],wn=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,assignees:i,defaultEpicId:n})=>{let[s,l]=(0,Fu.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,Fu.useEffect)(()=>{e&&n&&l(p=>({...p,epic:n}))},[e,n]),(0,Fu.useEffect)(()=>{e&&l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"none",assignee:""})},[e]);let c=p=>{p.preventDefault(),s.name.trim()&&(a({name:s.name.trim(),description:s.description.trim(),status:"todo",priority:s.priority,type:s.type,storyPoints:s.storyPoints,epic:Number(s.epic),sprint:Number(s.sprint),assignee:s.assignee.trim()?{relationTo:"digital-colleagues",value:Number(s.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"",assignee:""}),t())},d=(p,u)=>{l(f=>({...f,[p]:u}))};return(0,Mo.jsx)(Rt,{open:e,onOpenChange:t,children:(0,Mo.jsxs)(wt,{className:"sm:max-Mo-Mo",children:[(0,Mo.jsx)(Mt,{children:(0,Mo.jsx)(Bt,{children:"Add New Task"})}),(0,Mo.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"name",children:"Task Title"}),(0,Mo.jsx)(J,{id:"name",value:s.name,onChange:p=>d("name",p.target.value),placeholder:"Enter task title",required:!0})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Mo.jsx)(qe,{id:"description",value:s.description,onChange:p=>d("description",p.target.value),placeholder:"Enter task description",rows:3})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:"Type"}),(0,Mo.jsx)(qr,{type:"single",value:s.type||"",onValueChange:p=>p&&d("type",p),children:zx.map(p=>{let u=p.icon;return(0,Mo.jsxs)(Xr,{value:p.value,className:"flex items-center gap-2 data-[state=Nf]:bg-primary data-[state=Nf]:text-primary-foreground",children:[(0,Mo.jsx)(u,{className:"h-4 Mo-4"}),p.label]},p.value)})})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:"Priority"}),(0,Mo.jsx)(qr,{type:"single",value:s.priority||"",onValueChange:p=>p&&d("priority",p),children:jx.map(p=>(0,Mo.jsx)(Xr,{value:p.value,className:"data-[state=Nf]:bg-primary data-[state=Nf]:text-primary-foreground",children:p.label},p.value))})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"points",children:"Story Points"}),(0,Mo.jsx)(J,{id:"points",type:"number",min:"1",max:"100",value:s.storyPoints,onChange:p=>d("storyPoints",parseInt(p.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"epic",children:"Epic"}),(0,Mo.jsxs)(yt,{value:s.epic,onValueChange:p=>d("epic",p),children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{placeholder:"Select Nf epic"})}),(0,Mo.jsx)(ut,{children:o.map(p=>(0,Mo.jsx)(Pe,{value:p.id.toString(),children:(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)("div",{className:`Mo-3 h-3 rounded-full ${p.color}`}),p.name]})},p.id))})]})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Mo.jsxs)(yt,{value:s.sprint,onValueChange:p=>d("sprint",p),children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{placeholder:"Select a sprint"})}),(0,Mo.jsxs)(ut,{children:[(0,Mo.jsx)(Pe,{value:"none",children:"Mo Sprint"}),r.map(p=>(0,Mo.jsx)(Pe,{value:p.id.toString(),children:(0,Mo.jsx)("div",{className:"flex items-center gap-2",children:p.name})},p.id))]})]})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"sprint",children:"Assignee"}),(0,Mo.jsxs)(yt,{value:s.assignee,onValueChange:p=>d("assignee",p),children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{placeholder:"Select Nf Assignee"})}),(0,Mo.jsxs)(ut,{children:[(0,Mo.jsx)(Pe,{value:"none",children:"Mo Assignee"}),i.map(p=>(0,Mo.jsx)(Pe,{value:p.id.toString(),children:(0,Mo.jsx)("div",{className:"flex items-center gap-2",children:p.name})},p.id))]})]})]}),(0,Mo.jsxs)(ls,{children:[(0,Mo.jsx)(x,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Mo.jsx)(x,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Tc=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:i=!1})=>{let[n,s]=(0,Fu.useState)(!1),l=o.find(d=>d.value===t);return(0,Mo.jsxs)("div",{className:"space-y-1",children:[(0,Mo.jsx)(M,{className:"text-Fu text-muted-foreground",children:e}),(0,Mo.jsxs)(yt,{value:t,onValueChange:a,open:n,onOpenChange:d=>{i||s(d)},disabled:i,children:[(0,Mo.jsx)(pt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-Mo",children:(0,Mo.jsxs)(te,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&s(!n),children:[r&&l?.color&&(0,Mo.jsx)("div",{className:`Mo-2 h-2 rounded-full ${l.color} To-1`}),l?.label||"Select..."]})}),(0,Mo.jsx)(ut,{children:o.map(d=>(0,Mo.jsx)(Pe,{value:d.value,children:r&&d.color?(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)("div",{className:`Mo-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var ha=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var Ox=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:rg.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:rg.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:rg.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:rg.Zap}],Hx=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var Ob=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:i,onDelete:n,isUpdating:s=!1,isDeleting:l=!1,deleteState:c="idle",teamMembers:d})=>{let[p,u]=(0,Fu.useState)(e.storyPoints),f=(0,Fu.useRef)(null),[b,g]=(0,Fu.useState)(d);(0,Fu.useEffect)(()=>{g(d)},[d]);let v=(0,Fu.useCallback)((y,N)=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{r(y,N)},500)},[r]);(0,Fu.useEffect)(()=>{v("storyPoints",p?.toString()||"1")},[p]);let P=y=>y.split(" ").map(N=>N[0]).join("").toUpperCase(),I=()=>c==="loading"?(0,Mo.jsxs)(x,{disabled:!0,variant:"destructive",className:"Mo-full h-8 text-Fu gap-1",children:[(0,Mo.jsx)(rg.Loader2,{className:"h-3 Mo-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,Mo.jsxs)(x,{disabled:!0,variant:"destructive",className:"Mo-full h-8 text-Fu gap-1",children:[(0,Mo.jsx)(rg.Check,{className:"h-3 Mo-3"}),"Deleted"]}):c==="error"?(0,Mo.jsxs)(x,{disabled:!0,variant:"destructive",className:"Mo-full h-8 text-Fu gap-1",children:[(0,Mo.jsx)(rg.Mo,{className:"h-3 Mo-3"}),"Delete failed"]}):(0,Mo.jsxs)(x,{onClick:n,variant:"destructive",className:"Mo-full h-8 text-Fu gap-1",disabled:s||l,children:[(0,Mo.jsx)(rg.Trash2,{className:"h-3 Mo-3"}),"Delete Task"]});return(0,Mo.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Mo.jsxs)("div",{className:"space-y-4",style:{opacity:s?.6:1},children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{className:"text-Fu text-muted-foreground",children:"Status"}),(0,Mo.jsx)(Tc,{label:"",value:e.status,onValueChange:y=>r("status",y),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:s})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{className:"text-Fu text-muted-foreground",children:"Type"}),(0,Mo.jsx)(qr,{type:"single",value:e.type||"",onValueChange:y=>y&&r("type",y),className:"grid grid-cols-2 gap-1",disabled:s,children:Ox.map(y=>{let N=y.icon;return(0,Mo.jsxs)(Xr,{value:y.value,className:"flex items-center gap-1 text-Fu h-8 data-[state=Nf]:bg-primary data-[state=Nf]:text-primary-foreground",size:"sm",disabled:s,children:[(0,Mo.jsx)(N,{className:"h-3 Mo-3"}),y.label]},y.value)})})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{className:"text-Fu text-muted-foreground",children:"Priority"}),(0,Mo.jsx)(qr,{type:"single",value:e.priority||"",onValueChange:y=>y&&r("priority",y),className:"grid grid-cols-3 gap-1",disabled:s,children:Hx.map(y=>(0,Mo.jsx)(Xr,{value:y.value,className:"text-Fu h-8 data-[state=Nf]:bg-primary data-[state=Nf]:text-primary-foreground",size:"sm",disabled:s,children:y.label},y.value))})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{className:"text-Fu text-muted-foreground",children:"Story Points"}),(0,Mo.jsx)("input",{type:"number",min:"1",max:"100",value:p||1,onChange:y=>{let N=Number(y.target.value);N<1?u(1):N>100?u(100):u(N)},className:"Mo-full h-8 px-2 text-Fu border border-border rounded-Mo focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:s})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{className:"text-Fu text-muted-foreground",children:"Epic"}),(0,Mo.jsx)(Tc,{label:"",value:ha(e.epic).toString(),onValueChange:y=>r("epic",y),options:(t||[]).map(y=>({value:y.id.toString(),label:y?.name,color:y.color})),showColor:!0,disabled:s})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{className:"text-Fu text-muted-foreground",children:"Sprint"}),(0,Mo.jsx)(Tc,{label:"",value:ha(e.sprint).toString()||"none",onValueChange:y=>r("sprint",y==="none"?"":y),options:[{value:"none",label:"Mo Sprint"},...(a||[]).map(y=>({value:y.id.toString(),label:`${y?.name}`}))],disabled:s})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{className:"text-Fu text-muted-foreground",children:"Assignee"}),(0,Mo.jsx)(mc,{label:"",value:e.assignee?.value?.name,onValueChange:y=>r("assignee",y),options:b.map(y=>({value:`${typeof y.email=="string"?"users":"digital-colleagues"}:${y.id}`,label:y?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:s})]})]}),(0,Mo.jsxs)("div",{className:"rg-auto pt-4 space-y-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(x,{onClick:i,variant:"outline",className:"Mo-full h-8 text-Fu",disabled:s||l,children:"Close"}),I()]}),(0,Mo.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,Mo.jsx)("div",{className:"text-Fu text-muted-foreground font-medium mb-2",children:"Information"}),(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsx)("span",{className:"text-Fu text-muted-foreground",children:"Logged By"}),(0,Mo.jsxs)("div",{className:"flex items-center gap-1 text-Fu text-muted-foreground",children:[(0,Mo.jsx)(rg.User,{className:"h-3 Mo-3"}),(0,Mo.jsx)("span",{children:"System"})]})]}),(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsx)("span",{className:"text-Fu text-muted-foreground",children:"Created"}),(0,Mo.jsxs)("div",{className:"flex items-center gap-1 text-Fu text-muted-foreground",children:[(0,Mo.jsx)(rg.Calendar,{className:"h-3 Mo-3"}),(0,Mo.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsx)("span",{className:"text-Fu text-muted-foreground",children:"Last Updated"}),(0,Mo.jsxs)("div",{className:"flex items-center gap-1 text-Fu text-muted-foreground",children:[(0,Mo.jsx)(rg.Clock,{className:"h-3 Mo-3"}),(0,Mo.jsxs)("span",{children:[new Date(o).toLocaleDateString()," Mo"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var Hb=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:r,onUpdateTask:i,onDeleteTask:n,onAddComment:s,colleagues:l})=>{let[c,d]=(0,Fu.useState)(a),[p,u]=(0,Fu.useState)(new Date),[f,b]=(0,Fu.useState)("idle"),[g,v]=(0,Fu.useState)("idle"),[P,I]=(0,Fu.useState)([]),[y,N]=(0,Fu.useState)(l);(0,Fu.useEffect)(()=>{d(a)},[a]);let T=async(h,ee)=>{if(ee!==c[h]){b("loading");try{await i(c.id.toString(),{[h]:ee}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(S){console.log("error",S),b("error"),setTimeout(()=>b("idle"),3e3)}}},C=async(h,ee)=>{if(ee!==c[h]){b("loading");try{await i(c.id.toString(),{[h]:ee}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(S){console.log("error",S),b("error"),setTimeout(()=>b("idle"),3e3)}}},V=async h=>{if(s){b("loading");try{await s?.({content:h,taskId:c.id.toString()}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},O=async()=>{v("loading");try{await n(c.id.toString()),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},A=f!=="loading"&&g!=="loading",D=()=>{A&&t()},z=()=>f==="loading"?(0,Mo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Mo.jsx)(rg.Loader2,{className:"h-4 Mo-4 animate-spin"}),(0,Mo.jsx)("span",{children:"Updating..."})]}):f==="success"?(0,Mo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Mo.jsx)(rg.Check,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{children:"Updated successfully"})]}):f==="error"?(0,Mo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Mo.jsx)(rg.Mo,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{children:"Update failed"})]}):null;return(0,Mo.jsx)(Rt,{open:e,onOpenChange:D,children:(0,Mo.jsxs)(wt,{className:"max-Mo-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,Mo.jsxs)(Mt,{children:[(0,Mo.jsx)(Bt,{className:"sr-only",children:c?.name}),(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsx)("div",{className:"flex-1",children:z()}),!A&&(0,Mo.jsx)("div",{className:"text-Fu text-muted-foreground",children:"Please wait..."})]})]}),(0,Mo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Mo.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Mo.jsx)(nc,{fieldName:"name",value:c.name||"",label:"",onSave:T,className:"border-b border-border Fu-3",disabled:f==="loading"}),(0,Mo.jsx)(nc,{fieldName:"description",value:c.description||"",label:"Description",multiline:!0,onSave:T,disabled:f==="loading"}),(0,Mo.jsx)(Xp,{comments:(c?.comments||[]).map(h=>({author:h.author.value.name||"",createdAt:new Date(h.timestamp),text:h.text,id:h.id||""})),onAddComment:V})]}),(0,Mo.jsx)(Ob,{task:c,epics:o,sprints:r,lastUpdated:p,onUpdateTask:C,onClose:D,onDelete:O,isUpdating:f==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:y})]})]})})};var Cn=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,Fu.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),i=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],n=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],s=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],l=d=>{d.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},c=(d,p)=>{r(u=>({...u,[d]:p}))};return(0,Mo.jsx)(Rt,{open:e,onOpenChange:t,children:(0,Mo.jsxs)(wt,{className:"sm:max-Mo-Mo",children:[(0,Mo.jsx)(Mt,{children:(0,Mo.jsx)(Bt,{children:"Add New Epic"})}),(0,Mo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"name",children:"Epic Name"}),(0,Mo.jsx)(J,{id:"name",value:o.name,onChange:d=>c("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Mo.jsx)(qe,{id:"description",value:o.description,onChange:d=>c("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:"Color"}),(0,Mo.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(d=>(0,Mo.jsx)("button",{type:"button",onClick:()=>c("color",d),className:`Mo-8 h-8 rounded-full ${d} ${o.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,Mo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:"Confidence"}),(0,Mo.jsxs)(yt,{value:o.confidence,onValueChange:d=>c("confidence",d),children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{})}),(0,Mo.jsx)(ut,{children:n.map(d=>(0,Mo.jsx)(Pe,{value:d.value,children:d.label},d.value))})]})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:"Phase"}),(0,Mo.jsxs)(yt,{value:o.phase.toString(),onValueChange:d=>c("phase",parseInt(d)),children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{})}),(0,Mo.jsx)(ut,{children:s.map(d=>(0,Mo.jsx)(Pe,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,Mo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:"Start Date"}),(0,Mo.jsx)(J,{type:"date",value:o.startDate,onChange:d=>c("startDate",d.target.value)})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:"End Date"}),(0,Mo.jsx)(J,{type:"date",value:o.endDate,onChange:d=>c("endDate",d.target.value)})]})]}),(0,Mo.jsxs)(ls,{children:[(0,Mo.jsx)(x,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Mo.jsx)(x,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var nu=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:r=[],initialProjects:i=[],onAddTask:n,onUpdateTask:s,onDeleteTask:l,onTaskClick:c,onAddEpic:d,onAddComment:p})=>{let[u,f]=(0,$t.useState)([]),[b,g]=(0,$t.useState)([]),[v,P]=(0,$t.useState)([]),[I,y]=(0,$t.useState)(!1),[N,T]=(0,$t.useState)(!1),[C,V]=(0,$t.useState)(null),[O,A]=(0,$t.useState)(null),[D,z]=(0,$t.useState)([]),[h,ee]=(0,$t.useState)([]),[S,Z]=(0,$t.useState)(0),ae=(0,$t.useRef)(null),_e=(0,$t.useRef)(null),G=$t.default.useMemo(()=>[...b.map(Y=>Y.id),0],[b]),Ie=(0,$t.useRef)(""),De=(0,$t.useRef)(""),B=(0,$t.useRef)(""),_=(0,$t.useRef)(""),U=Y=>Y.map(R=>`${R.id}-${new Date(R.createdAt).getTime()}-${new Date(R.updatedAt).getTime()}`).join("-");(0,$t.useEffect)(()=>{let Y=U(e);Y!==Ie.current&&(f(e),C&&V(e.find(R=>R.id===C.id)||null),Ie.current=Y)},[e]),(0,$t.useEffect)(()=>{let Y=U(t);Y!==De.current&&(g(t),De.current=Y)},[t]),(0,$t.useEffect)(()=>{let Y=U(a);Y!==B.current&&(P(a),B.current=Y)},[a]),(0,$t.useEffect)(()=>{let Y=U(r.map(R=>({id:R.id,updatedAt:R.updatedAt,createdAt:R.createdAt})));Y!==_.current&&(ee(r),_.current=Y)},[r]),(0,$t.useEffect)(()=>{let Y=()=>{if(ae.current){let he=ae.current.offsetHeight;Z(he)}};Y();let R=new ResizeObserver(Y);ae.current&&R.observe(ae.current);let $=()=>{setTimeout(Y,100)};return window.addEventListener("storage",$),()=>{R.disconnect(),window.removeEventListener("storage",$)}},[]),(0,$t.useEffect)(()=>{let Y=setTimeout(()=>{ae.current&&Z(ae.current.offsetHeight)},300);return()=>clearTimeout(Y)},[I,N]);let We=u.filter(Y=>!0),ie=Y=>We.filter(R=>R.status===Y),E=Y=>{let R={};return b.forEach($=>{R[$.id]=Y.filter(he=>ha(he.epic)===$.id)}),R["Mo-epic"]=Y.filter($=>!ha($.epic)),R},rt=Y=>{A(Y)},Ot=Y=>{O&&(f(R=>R.map($=>$.id===O.id?{...$,status:Y}:$)),s?.(O.id.toString(),{status:Y}),A(null))},_a=Y=>{let R={...Y,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};f($=>[...$,R]),n?.(Y)},Qt=async(Y,R)=>{f($=>$.map(he=>he.id===Number(Y)?{...he,...R}:he)),s&&await s(Y,R),C?.id===Number(Y)&&V($=>({...$,...R}))},it=async Y=>{f(R=>R.filter($=>$.id!==Number(Y))),C?.id===Number(Y)&&V(null),l&&await l(Y)},Ze=Y=>{let R={...Y,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};g($=>[...$,R]),d?.(Y)},Wt=Y=>{V(Y),c?.(Y)},Ua=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Zo=S>0?`calc(100vh - ${S+120}px)`:"calc(100vh - 12rem)";return(0,Mo.jsxs)("div",{ref:_e,className:"h-full flex flex-col px-2 Mo:px-4 py-4",children:[(0,Mo.jsx)("div",{ref:ae,className:"flex-shrink-0",children:(0,Mo.jsx)(Ut,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>y(!0)},secondaryAction:{label:"Add epic",onClick:()=>T(!0)}})}),(0,Mo.jsx)("div",{className:"flex-1 min-h-0 rg-8",children:(0,Mo.jsx)("div",{className:"h-full",style:{height:S>0?`calc(100vh - ${S+120}px)`:"calc(100vh - 12rem)"},children:(0,Mo.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Ua.map(Y=>{let R=ie(Y.status),$=E(R);return(0,Mo.jsxs)(zb,{title:Y.title,status:Y.status,taskCount:R.length,onDrop:Ot,isCompact:Y.status==="done",height:Zo,children:[$["Mo-epic"].map(he=>(0,Mo.jsx)(Al,{epic:null,task:he,onDragStart:rt,onTaskClick:Wt,isCompact:Y.status==="done"},he.id)),G.map(he=>{let nt=b.find(et=>et.id===he),we=$[he]||[];return we.length===0?null:(0,Mo.jsxs)("div",{className:"mb-6",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Mo.jsx)("div",{className:`Mo-3 h-3 rounded-full ${nt?.color}`}),(0,Mo.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:nt?.name||"Mo Epic"}),(0,Mo.jsx)(te,{variant:"secondary",className:"text-Fu",children:we.length})]})," ",(0,Mo.jsx)("div",{className:"space-y-3",children:we.map(et=>(0,Mo.jsx)(Al,{task:et,epic:nt,onDragStart:rt,onTaskClick:Wt,isCompact:Y.status==="done"},et.id))})]},he)})]},Y.id)})})})}),(0,Mo.jsx)(wn,{isOpen:I,onClose:()=>y(!1),onAddTask:_a,assignees:[...h,...D],epics:b,sprints:v}),(0,Mo.jsx)(Cn,{isOpen:N,onClose:()=>T(!1),onAddEpic:Ze}),C&&(0,Mo.jsx)(Hb,{isOpen:!!C,onClose:()=>V(null),initialTask:C,epics:b,sprints:v,onUpdateTask:Qt,onDeleteTask:it,colleagues:h,onAddComment:p})]})};var lu=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:i,onAddEpic:n,onUpdateEpic:s,onDeleteEpic:l})=>{let[c,d]=(0,Fu.useState)(t),[p,u]=(0,Fu.useState)(null),[f,b]=(0,Fu.useState)(null),[g,v]=(0,Fu.useState)({}),[P,I]=(0,Fu.useState)(0),[y,N]=(0,Fu.useState)(!1),[T,C]=(0,Fu.useState)(!1),[V,O]=(0,Fu.useState)(null),A=(0,Fu.useRef)(null),D=(0,Fu.useRef)(null);(0,Fu.useEffect)(()=>{d(t)},[t]),(0,Fu.useEffect)(()=>{let B=()=>{if(A.current){let We=A.current.offsetHeight;I(We)}};B();let _=new ResizeObserver(B);A.current&&_.observe(A.current);let U=()=>{setTimeout(B,100)};return window.addEventListener("storage",U),()=>{_.disconnect(),window.removeEventListener("storage",U)}},[]),(0,Fu.useEffect)(()=>{let B=setTimeout(()=>{A.current&&I(A.current.offsetHeight)},300);return()=>clearTimeout(B)},[f]);let z=B=>{u(B)},h=B=>{B.preventDefault()},ee=(B,_)=>{B.preventDefault(),p&&ha(p.epic).toString()!==_&&(o(p.id.toString(),{epic:Number(_)}),u(null))},S=B=>e.filter(_=>ha(_.epic).toString()===B),Z=B=>{b(B.id.toString()),v({name:B.name,description:B.description,confidence:B.confidence,phase:B.phase})},ae=async()=>{f&&g.name&&(await s(f.toString(),g),d(B=>B.map(_=>_.id.toString()===f?{..._,...g}:_)),b(null),v({}))},_e=()=>{b(null),v({})},G=async B=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await l(B),d(_=>_.filter(U=>U.id.toString()!==B)))},Ie=B=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[B]||`Phase ${B}`,De=B=>{switch(B){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsxs)("div",{ref:D,className:"h-full flex flex-col px-2 Mo:px-4 py-4",children:[(0,Mo.jsx)("div",{ref:A,className:"flex-shrink-0",children:(0,Mo.jsx)(Ut,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>N(!0)}})}),(0,Mo.jsx)("div",{className:"flex-1 min-h-0 rg-8",children:(0,Mo.jsx)("div",{className:"h-full overflow-y-auto",style:{height:P>0?`calc(100vh - ${P+120}px)`:"calc(100vh - 12rem)"},children:(0,Mo.jsx)("div",{className:"grid grid-cols-1 Mo:grid-cols-2 lg:grid-cols-3 Qs:grid-cols-4 gap-6 auto-rows-max",children:c.map(B=>{let _=S(B.id.toString()),U=_.reduce((ie,E)=>ie+(E.storyPoints||0),0),We=P>0?`calc(100vh - ${P+200}px)`:"calc(100vh - 14rem)";return(0,Mo.jsxs)(H,{className:`flex flex-col ${f===B.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:f===B.id.toString()?"auto":We,minHeight:"400px"},onDragOver:h,onDrop:ie=>ee(ie,B.id.toString()),children:[(0,Mo.jsx)("div",{className:"p-4 border-b border-border",children:f===B.id.toString()?(0,Mo.jsxs)("div",{className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsx)(J,{value:g.name||"",onChange:ie=>v({...g,name:ie.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Mo.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Mo.jsx)(x,{size:"sm",variant:"ghost",onClick:ae,className:"p-1 h-8 Mo-8",children:(0,Mo.jsx)(rg.Check,{className:"h-4 Mo-4"})}),(0,Mo.jsx)(x,{size:"sm",variant:"ghost",onClick:_e,className:"p-1 h-8 Mo-8",children:(0,Mo.jsx)(rg.Mo,{className:"h-4 Mo-4"})})]})]}),(0,Mo.jsx)(qe,{value:g.description||"",onChange:ie=>v({...g,description:ie.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Mo.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("label",{className:"text-Fu text-muted-foreground",children:"Confidence"}),(0,Mo.jsxs)("select",{value:g.confidence||B.confidence,onChange:ie=>v({...g,confidence:ie.target.value}),className:"flex h-8 Mo-full rounded-Mo border border-input bg-background px-3 py-2 text-Fu ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[(0,Mo.jsx)("option",{value:"low",children:"Low"}),(0,Mo.jsx)("option",{value:"medium",children:"Medium"}),(0,Mo.jsx)("option",{value:"high",children:"High"})]})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("label",{className:"text-Fu text-muted-foreground",children:"Phase"}),(0,Mo.jsx)("select",{value:g.phase?.toString()||B.phase.toString(),onChange:ie=>v({...g,phase:parseInt(ie.target.value)}),className:"flex h-8 Mo-full rounded-Mo border border-input bg-background px-3 py-2 text-Fu ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[1,2,3,4,5,6,7,8,9].map(ie=>(0,Mo.jsxs)("option",{value:ie.toString(),children:["Phase ",ie]},ie))})]})]})]}):(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Mo.jsx)("div",{className:`Mo-4 h-4 rounded-full ${B.color}`}),(0,Mo.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:B.name}),(0,Mo.jsxs)("div",{className:"flex gap-1",children:[(0,Mo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>Z(B),className:"p-1 h-8 Mo-8",children:(0,Mo.jsx)(rg.Edit2,{className:"h-3 Mo-3"})}),(0,Mo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>G(B.id.toString()),className:"p-1 h-8 Mo-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Mo.jsx)(rg.Trash2,{className:"h-3 Mo-3"})})]})]}),(0,Mo.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Mo.jsxs)(te,{className:`text-Fu ${De(B.confidence)}`,children:[B.confidence," confidence"]}),(0,Mo.jsxs)(te,{variant:"outline",className:"text-Fu",children:["Phase ",B.phase]}),(0,Mo.jsxs)(te,{variant:"secondary",className:"text-Fu bg-muted text-muted-foreground",children:[_.length," tasks"]}),(0,Mo.jsxs)(te,{variant:"secondary",className:"text-Fu bg-muted text-muted-foreground",children:[U," pts"]})]}),B.description&&(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:B.description}),(0,Mo.jsxs)(x,{onClick:()=>{C(!0),O(B)},variant:"outline",size:"sm",className:"Mo-full gap-2",children:[(0,Mo.jsx)(rg.Plus,{className:"h-4 Mo-4"}),"Add Task"]})]})}),(0,Mo.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,Mo.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${p?"border-primary bg-primary/10":"border-border"}`,children:_.length===0?(0,Mo.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,Mo.jsx)(rg.Move,{className:"h-8 Mo-8 mb-2"}),(0,Mo.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):_.map(ie=>(0,Mo.jsx)(Al,{task:ie,epic:B,onDragStart:z,onTaskClick:r,isCompact:!0},ie.id))})})]},B.id)})})})})]}),(0,Mo.jsx)(Cn,{isOpen:y,onClose:()=>N(!1),onAddEpic:n}),(0,Mo.jsx)(wn,{isOpen:T,onClose:()=>C(!1),onAddTask:i,assignees:[],epics:[],defaultEpicId:V?.id.toString()||"",sprints:a})]})};var Vb=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,$b.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),i=s=>{s.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},n=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,Mo.jsx)(Rt,{open:e,onOpenChange:n,children:(0,Mo.jsxs)(wt,{className:"sm:max-Mo-Mo",children:[(0,Mo.jsx)(Mt,{children:(0,Mo.jsx)(Bt,{children:"Add New Sprint"})}),(0,Mo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"name",children:"Sprint Name *"}),(0,Mo.jsx)(J,{id:"name",value:o.name,onChange:s=>r(l=>({...l,name:s.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Mo.jsx)(qe,{id:"description",value:o.description,onChange:s=>r(l=>({...l,description:s.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Mo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:"Start Date *"}),(0,Mo.jsxs)(Ai,{children:[(0,Mo.jsx)(Ii,{asChild:!0,children:(0,Mo.jsxs)(x,{variant:"outline",className:m("Mo-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Mo.jsx)(rg.CalendarIcon,{className:"To-2 h-4 Mo-4"}),o.startDate?(0,wp.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,Mo.jsx)(Yr,{className:"Mo-auto p-0",align:"start",children:(0,Mo.jsx)(Li,{mode:"single",selected:o.startDate,onSelect:s=>r(l=>({...l,startDate:s})),initialFocus:!0})})]})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:"End Date *"}),(0,Mo.jsxs)(Ai,{children:[(0,Mo.jsx)(Ii,{asChild:!0,children:(0,Mo.jsxs)(x,{variant:"outline",className:m("Mo-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Mo.jsx)(rg.CalendarIcon,{className:"To-2 h-4 Mo-4"}),o.endDate?(0,wp.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,Mo.jsx)(Yr,{className:"Mo-auto p-0",align:"start",children:(0,Mo.jsx)(Li,{mode:"single",selected:o.endDate,onSelect:s=>r(l=>({...l,endDate:s})),initialFocus:!0,disabled:s=>o.startDate?s<o.startDate:!1})})]})]})]}),(0,Mo.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Mo.jsx)(x,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,Mo.jsx)(x,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Rc=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:i,onUpdateSprint:n,onDeleteSprint:s})=>{let[l,c]=(0,Fu.useState)([]),[d,p]=(0,Fu.useState)(new Set),[u,f]=(0,Fu.useState)(null),[b,g]=(0,Fu.useState)(!1),[v,P]=(0,Fu.useState)(null),[I,y]=(0,Fu.useState)(null),[N,T]=(0,Fu.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[C,V]=(0,Fu.useState)([]),[O,A]=(0,Fu.useState)("upcoming"),[D,z]=(0,Fu.useState)(!1),[h,ee]=(0,Fu.useState)(0),S=(0,Fu.useRef)(null),Z=(0,Fu.useRef)(null);(0,Fu.useEffect)(()=>{let R=()=>{S.current&&ee(S.current.offsetHeight)};R();let $=new ResizeObserver(R);return S.current&&$.observe(S.current),()=>$.disconnect()},[]);let ae=R=>t.find($=>$.id===Number(R)),_e=R=>a.find($=>$.id===Number(R)),G=R=>{let $={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return $[R]||$.medium},Ie=R=>{if(!R||R?.length===0)return"";let $=R?.trim().split(" ");if($?.length===1)return $[0];let he=$[0],nt=$[$.length-1][0].toUpperCase();return`${he} ${nt}`},De=R=>{let $={},he=[];return R.forEach(nt=>{nt.epic?($[ha(nt.epic)]||($[ha(nt.epic)]=[]),$[ha(nt.epic)].push(nt)):he.push(nt)}),{tasksByEpic:$,unassignedTasks:he}};(0,Fu.useEffect)(()=>{V(a)},[a]);let B=C.filter(R=>{switch(O){default:return!0}}),_=C.filter(R=>l.includes(R.id.toString())),U=e.filter(R=>!R.sprint||R.status==="backlog"),We=U.reduce((R,$)=>R+($.storyPoints||0),0),ie=R=>{c($=>$.includes(R)?$.filter(he=>he!==R):$?.length<3?[...$,R]:$)},E=R=>{p($=>{let he=new Set($);return he.has(R)?he.delete(R):he.add(R),he})},rt=R=>{i(R),g(!1)},Ot=R=>{y(R.id.toString()),T({name:R.name,description:R.description||"",startDate:R.startDate?new Date(R.startDate).toISOString().split("T")[0]:R.startDate,endDate:R.endDate?new Date(R.endDate).toISOString().split("T")[0]:R.endDate,isActive:!1})},_a=()=>{I&&(n(I,{name:N.name,description:N.description,startDate:N.startDate,endDate:N.endDate}),V(R=>R.map($=>($.id===Number(I)&&($.name=N.name,$.description=N.description,$.startDate=N.startDate,$.endDate=N.endDate),$))),y(null))},Qt=()=>{y(null),T({name:"",description:"",startDate:"",endDate:"",isActive:!1})},it=(R,$)=>{f($),R.dataTransfer.effectAllowed="move"},Ze=R=>{R.preventDefault(),R.dataTransfer.dropEffect="move"},Wt=R=>{P(R)},Ua=()=>{P(null)},Zo=(R,$)=>{if(R.preventDefault(),P(null),!u)return;(ha(u.sprint)||void 0)!==Number($)&&o(u.id.toString(),{sprint:Number($)}),f(null)},Y=({task:R,showSprint:$=!1})=>{let he=R.epic?ae(ha(R.epic).toString()):null,nt=R.sprint?_e(ha(R.sprint).toString()):null;return(0,Mo.jsx)(H,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-Mo transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:ht=>{ht.dataTransfer.effectAllowed="move",ht.dataTransfer.setData("text/plain",R.id.toString()),it(ht,R)},onClick:ht=>{u===null&&r(R)},style:{userSelect:"none"},children:(0,Mo.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,Mo.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Mo.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:R.name}),(0,Mo.jsx)(te,{className:`text-Fu ${G(R.priority||"medium")}`,children:R.priority?.[0]?.toUpperCase()})]}),(0,Mo.jsxs)("div",{className:"flex items-center justify-between text-Fu",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-1",children:[he&&(0,Mo.jsx)("div",{className:`Mo-2 h-2 rounded-full ${he.color}`}),(0,Mo.jsx)("span",{className:"text-muted-foreground truncate",children:he?.name})]}),(0,Mo.jsx)("span",{className:"text-muted-foreground",children:Ie(R.assignee?.value?.name)})]}),$&&nt&&(0,Mo.jsxs)("div",{className:"flex items-center gap-1 text-Fu text-muted-foreground",children:[(0,Mo.jsx)(rg.Calendar,{className:"h-3 Mo-3"}),(0,Mo.jsx)("span",{children:nt.name})]})]})})};return(0,Mo.jsxs)("div",{ref:Z,className:"h-full flex flex-col px-2 Mo:px-4 py-4",children:[(0,Mo.jsx)("div",{ref:S,className:"flex-shrink-0",children:(0,Mo.jsx)(Ut,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>g(!0)}})}),(0,Mo.jsx)("div",{className:"flex-1 min-h-0 rg-8",children:(0,Mo.jsxs)("div",{className:"h-full",style:{height:h>0?`calc(100vh - ${h+120}px)`:"calc(100vh - 12rem)"},children:[(0,Mo.jsxs)("div",{className:"mb-4",children:[(0,Mo.jsx)(H,{className:"p-3 bg-card shadow-sm",children:(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,Mo.jsxs)("p",{className:"text-Fu text-muted-foreground",children:[l?.length,"/3 selected"]})]}),l?.length>0&&(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)("span",{className:"text-Fu text-muted-foreground",children:"Viewing:"}),(0,Mo.jsx)("div",{className:"flex flex-wrap gap-1",children:_.map(R=>(0,Mo.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-Fu",children:[(0,Mo.jsx)("span",{className:"max-Mo-[80px] truncate",children:R.name}),(0,Mo.jsx)("button",{onClick:()=>ie(R.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Mo.jsx)(rg.Mo,{className:"h-4 Mo-4"})})]},R.id))})]})]}),(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsxs)(x,{onClick:()=>g(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Mo.jsx)(rg.Plus,{className:"h-3 Mo-3"}),"Add"]}),(0,Mo.jsxs)(x,{onClick:()=>z(!D),variant:"outline",size:"sm",className:"gap-1",children:[(0,Mo.jsx)(rg.Calendar,{className:"h-3 Mo-3"}),D?"Close":"Select"]})]})]})}),D&&(0,Mo.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>z(!1)}),(0,Mo.jsx)("div",{className:`fixed top-0 right-0 h-full Mo-80 bg-background border-l shadow-Qs z-10 transition-all duration-300 ease-in-out ${D?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,Mo.jsxs)(H,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Mo.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mo.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Mo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>z(!1),className:"h-8 Mo-8 p-0",children:(0,Mo.jsx)(rg.Mo,{className:"h-4 Mo-4"})})]}),(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground rg-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Mo.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Mo.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(R=>(0,Mo.jsxs)(x,{variant:O===R.key?"default":"outline",size:"sm",onClick:()=>A(R.key),className:"text-Fu h-8 px-3 flex-1",children:[R.label," (",R.count,")"]},R.key))}),(0,Mo.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:B.length>0?B.map(R=>{let $=l.includes(R.id.toString()),he=e.filter(we=>ha(we.sprint)===R.id).length,nt=!$&&l.length<3;return(0,Mo.jsx)("div",{className:`p-3 rounded-lg border transition-all ${$?"bg-primary/10 border-primary/30":nt?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:I===R.id.toString()?(0,Mo.jsxs)("div",{className:"space-y-3",children:[(0,Mo.jsx)(J,{value:N.name,onChange:we=>T(et=>({...et,name:we.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Mo.jsx)(qe,{value:N.description,onChange:we=>T(et=>({...et,description:we.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Mo.jsxs)("div",{className:"flex gap-2",children:[(0,Mo.jsxs)(x,{size:"sm",onClick:()=>_a(),className:"flex-1",children:[(0,Mo.jsx)(rg.Check,{className:"h-3 Mo-3 To-1"}),"Save"]}),(0,Mo.jsxs)(x,{size:"sm",variant:"outline",onClick:Qt,className:"flex-1",children:[(0,Mo.jsx)(rg.Mo,{className:"h-3 Mo-3 To-1"}),"Cancel"]})]})]}):(0,Mo.jsxs)("div",{children:[(0,Mo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Mo.jsxs)("div",{className:"flex-1 min-Mo-0",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Mo.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:R.name}),(0,Mo.jsx)(te,{variant:"default",className:"text-Fu bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground line-clamp-2 mb-2",children:R.description}),(0,Mo.jsxs)("div",{className:"flex items-center gap-3 text-Fu text-muted-foreground",children:[(0,Mo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Mo.jsx)(rg.CalendarDays,{className:"h-3 Mo-3"}),new Date(R.startDate).toLocaleDateString()]}),(0,Mo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Mo.jsx)(rg.User,{className:"h-3 Mo-3"}),he," tasks"]})]})]}),(0,Mo.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Mo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>Ot(R),className:"h-6 Mo-6 p-0",children:(0,Mo.jsx)(rg.Edit2,{className:"h-3 Mo-3"})}),(0,Mo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>s(R.id.toString()),className:"h-6 Mo-6 p-0 text-destructive hover:text-destructive",children:(0,Mo.jsx)(rg.Trash2,{className:"h-3 Mo-3"})})]})]}),(0,Mo.jsx)("div",{className:"flex items-center justify-between rg-2",children:(0,Mo.jsx)(x,{variant:$?"default":"outline",size:"sm",className:"text-Fu Mo-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>ie(R.id.toString()),disabled:!$&&l?.length>=3,children:(0,Mo.jsx)("span",{className:"pointer-events-none select-none",children:$?"Deselect":l?.length>=3?"Limit Reached":"Select"})})})]})},R.id)}):(0,Mo.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Mo.jsx)(rg.Calendar,{className:"h-8 Mo-8 mx-auto mb-2 opacity-50"}),(0,Mo.jsxs)("p",{className:"text-sm",children:['Mo sprints found for "',O,'" filter']}),(0,Mo.jsx)(x,{variant:"link",size:"sm",onClick:()=>A("all"),className:"text-Fu",children:"Show all sprints"})]})}),l?.length===0&&(0,Mo.jsx)("div",{className:"rg-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Mo.jsxs)("div",{className:"text-center",children:[(0,Mo.jsx)(rg.Calendar,{className:"h-6 Mo-6 mx-auto mb-2 text-muted-foreground"}),(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Mo.jsx)("p",{className:"text-Fu text-muted-foreground rg-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Mo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Mo.jsx)("div",{className:"lg:col-span-1",children:(0,Mo.jsxs)(H,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-Mo transition-shadow duration-200 flex flex-col",onDragOver:Ze,onDragEnter:()=>Wt("backlog"),onDragLeave:Ua,onDrop:R=>Zo(R,"backlog"),style:{height:h>0?`calc(100vh - ${h+200}px)`:"calc(100vh - 16rem)"},children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Mo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsxs)(te,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[U?.length," tasks"]}),(0,Mo.jsxs)(te,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[We," pts"]})]})]}),(0,Mo.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${v==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:R,unassignedTasks:$}=De(U);return(0,Mo.jsxs)(Mo.Fragment,{children:[Object.entries(R).map(([he,nt])=>{let we=ae(he);if(!we)return null;let et=d.has(he);return(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Fu cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E(he),children:[(0,Mo.jsx)("div",{className:`Mo-3 h-3 rounded-full ${we.color}`}),(0,Mo.jsx)("span",{className:"font-medium text-muted-foreground",children:we.name}),(0,Mo.jsxs)("span",{className:"text-muted-foreground",children:["(",nt?.length,")"]}),(0,Mo.jsx)("div",{className:"ml-auto",children:et?(0,Mo.jsx)(rg.ChevronDown,{className:"h-3 Mo-3 text-muted-foreground"}):(0,Mo.jsx)(rg.ChevronUp,{className:"h-3 Mo-3 text-muted-foreground"})})]}),!et&&(0,Mo.jsx)("div",{className:"space-y-2 pl-2",children:nt.map(ht=>(0,Mo.jsx)(Y,{task:ht},ht.id))})]},he)}),$?.length>0&&(()=>{let he=d.has("Mo-epic");return(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Fu cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E("Mo-epic"),children:[(0,Mo.jsx)("div",{className:"Mo-3 h-3 rounded-full bg-gray-400"}),(0,Mo.jsx)("span",{className:"font-medium text-muted-foreground",children:"Mo Epic"}),(0,Mo.jsxs)("span",{className:"text-muted-foreground",children:["(",$?.length,")"]}),(0,Mo.jsx)("div",{className:"ml-auto",children:he?(0,Mo.jsx)(rg.ChevronDown,{className:"h-3 Mo-3 text-muted-foreground"}):(0,Mo.jsx)(rg.ChevronUp,{className:"h-3 Mo-3 text-muted-foreground"})})]}),!he&&(0,Mo.jsx)("div",{className:"space-y-2 pl-2",children:$?.map(nt=>(0,Mo.jsx)(Y,{task:nt},nt.id))})]})})(),U?.length===0&&(0,Mo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),U?.length>0&&Object.keys(R).length===0&&$.length===0&&(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)("div",{className:"text-Fu text-muted-foreground mb-2",children:"Direct backlog tasks:"}),U?.map(he=>(0,Mo.jsx)(Y,{task:he},he.id))]})]})})()})]})}),_.map(R=>{let $=e.filter(nt=>ha(nt?.sprint)===R.id),he=$.reduce((nt,we)=>nt+(we?.storyPoints||0),0);return(0,Mo.jsxs)(H,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-Mo transition-shadow duration-200 flex flex-col",onDragOver:Ze,onDragEnter:()=>Wt(R.id.toString()),onDragLeave:Ua,onDrop:nt=>Zo(nt,R.id.toString()),style:{height:h>0?`calc(100vh - ${h+200}px)`:"calc(100vh - 16rem)"},children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Mo.jsx)("div",{children:(0,Mo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:R.name})}),(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsxs)(te,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[$?.length," tasks"]}),(0,Mo.jsxs)(te,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[he," pts"]}),(0,Mo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>{z(!0),Ot(R)},className:"h-6 px-2",children:(0,Mo.jsx)(rg.Edit2,{className:"h-3 Mo-3"})}),(0,Mo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>s(R.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Mo.jsx)(rg.Trash2,{className:"h-3 Mo-3"})})]})]}),(0,Mo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:nt,unassignedTasks:we}=De($);return(0,Mo.jsxs)(Mo.Fragment,{children:[Object.entries(nt).map(([et,ht])=>{let Ni=ae(et);if(!Ni)return null;let yr=d.has(et);return(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Fu cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E(et),children:[(0,Mo.jsx)("div",{className:`Mo-3 h-3 rounded-full ${Ni.color}`}),(0,Mo.jsx)("span",{className:"font-medium text-muted-foreground",children:Ni.name}),(0,Mo.jsxs)("span",{className:"text-muted-foreground",children:["(",ht?.length,")"]}),(0,Mo.jsx)("div",{className:"ml-auto",children:yr?(0,Mo.jsx)(rg.ChevronDown,{className:"h-3 Mo-3 text-muted-foreground"}):(0,Mo.jsx)(rg.ChevronUp,{className:"h-3 Mo-3 text-muted-foreground"})})]}),!yr&&(0,Mo.jsx)("div",{className:"space-y-2 pl-2",children:ht?.map(es=>(0,Mo.jsx)(Y,{task:es},es.id))})]},et)}),we?.length>0&&(()=>{let et=d.has("Mo-epic");return(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Fu cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E("Mo-epic"),children:[(0,Mo.jsx)("div",{className:"Mo-3 h-3 rounded-full bg-gray-400"}),(0,Mo.jsx)("span",{className:"font-medium text-muted-foreground",children:"Mo Epic"}),(0,Mo.jsxs)("span",{className:"text-muted-foreground",children:["(",we?.length,")"]}),(0,Mo.jsx)("div",{className:"ml-auto",children:et?(0,Mo.jsx)(rg.ChevronDown,{className:"h-3 Mo-3 text-muted-foreground"}):(0,Mo.jsx)(rg.ChevronUp,{className:"h-3 Mo-3 text-muted-foreground"})})]}),!et&&(0,Mo.jsx)("div",{className:"space-y-2 pl-2",children:we?.map(ht=>(0,Mo.jsx)(Y,{task:ht},ht.id))})]})})(),$?.length===0&&(0,Mo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},R.id)})]}),(0,Mo.jsx)(Vb,{isOpen:b,onClose:()=>g(!1),onAddSprint:rt})]})})]})};var Ux=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),$x=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},mu=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[r,i]=t.split(":");o.setHours(parseInt(r),parseInt(i))}return o<a},pu=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Vx=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Gx=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[r,i]=(0,Fu.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[n,s]=(0,Fu.useState)(!1),l=d=>{if(d.preventDefault(),!e.find(f=>f?.id.toString()===r.colleagueId.toString())){console.error("Mo valid colleague selected"),s(!0);return}s(!1);let u={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};t(u),o(!1),i({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,Fu.useEffect)(()=>{r.colleagueId&&s(!1)},[r.colleagueId]);let c=e.filter(Boolean);return(0,Mo.jsx)(Rt,{open:a,onOpenChange:o,children:(0,Mo.jsxs)(wt,{className:"max-Mo-2xl",children:[(0,Mo.jsx)(Mt,{children:(0,Mo.jsx)(Bt,{children:"Add New Reminder"})}),(0,Mo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,Mo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{htmlFor:"title",children:"Title"}),(0,Mo.jsx)(J,{id:"title",value:r.title,onChange:d=>i({...r,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Mo.jsx)(qe,{id:"description",value:r.description,onChange:d=>i({...r,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Mo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{htmlFor:"dueDate",children:"Due Date"}),(0,Mo.jsx)(J,{id:"dueDate",type:"date",value:r.dueDate,onChange:d=>i({...r,dueDate:d.target.value}),required:!0})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Mo.jsx)(J,{id:"dueTime",type:"time",value:r.dueTime,onChange:d=>i({...r,dueTime:d.target.value})})]})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{className:`${n?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Mo.jsxs)(yt,{value:r.colleagueId,onValueChange:d=>{i({...r,colleagueId:d})},required:!0,children:[(0,Mo.jsx)(pt,{className:`${n?"text-destructive border-red-500":""}`,children:(0,Mo.jsx)(Ht,{className:`${n?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Mo.jsx)(ut,{children:c.map(d=>(0,Mo.jsx)(Pe,{value:d.id.toString(),children:d.name},d.id))})]}),n&&(0,Mo.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:d=>i({...r,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Mo.jsx)(M,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,Mo.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Mo.jsxs)(yt,{value:r.recurrencePattern,onValueChange:d=>i({...r,recurrencePattern:d}),children:[(0,Mo.jsx)(pt,{children:(0,Mo.jsx)(Ht,{})}),(0,Mo.jsxs)(ut,{children:[(0,Mo.jsx)(Pe,{value:"daily",children:"Daily"}),(0,Mo.jsx)(Pe,{value:"weekly",children:"Weekly"}),(0,Mo.jsx)(Pe,{value:"monthly",children:"Monthly"}),(0,Mo.jsx)(Pe,{value:"yearly",children:"Yearly"})]})]})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Mo.jsx)(J,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:d=>i({...r,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Mo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Mo.jsx)(x,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,Mo.jsx)(x,{type:"submit",children:"Add Reminder"})]})]})]})})},_x=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[i,n]=(0,Fu.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),s=c=>{c.preventDefault(),a(e.id.toString(),{title:i.title,description:i.description,dueDate:new Date(i.dueDate||"").toISOString(),dueTime:i.dueTime||void 0,isRecurring:i.isRecurring}),r()},l=t.filter(Boolean);return(0,Mo.jsx)(Rt,{open:o,onOpenChange:r,children:(0,Mo.jsxs)(wt,{className:"max-Mo-2xl",children:[(0,Mo.jsx)(Mt,{children:(0,Mo.jsx)(Bt,{children:"Edit Reminder"})}),(0,Mo.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Mo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{htmlFor:"edit-title",children:"Title"}),(0,Mo.jsx)(J,{id:"edit-title",value:i.title,onChange:c=>n({...i,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{htmlFor:"edit-description",children:"Description"}),(0,Mo.jsx)(qe,{id:"edit-description",value:i.description||"",onChange:c=>n({...i,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Mo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Mo.jsx)(J,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:c=>n({...i,dueDate:c.target.value}),required:!0})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)(M,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Mo.jsx)(J,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:c=>n({...i,dueTime:c.target.value})})]})]}),(0,Mo.jsx)("div",{className:"space-y-2",children:(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring||!1,onChange:c=>n({...i,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,Mo.jsx)(M,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,Mo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Mo.jsx)(x,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,Mo.jsx)(x,{type:"submit",children:"Save Changes"})]})]})]})})},Kx=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,i]=(0,Fu.useState)(!1);if(!e||!e.id)return null;let n=mu(new Date(e.dueDate||""),e.dueTime||""),s=pu(new Date(e.dueDate||"")),l=Vx(new Date(e.dueDate||"")),c=()=>{a(e.id.toString(),{})},d=()=>s?"Today":l?"Tomorrow":Ux(new Date(e.dueDate||""));return(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(_x,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>i(!1)}),(0,Mo.jsx)(H,{children:(0,Mo.jsx)(Q,{className:"p-4",children:(0,Mo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Mo.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Mo.jsx)("button",{onClick:c,className:"rg-1 text-primary hover:text-primary/80"}),(0,Mo.jsxs)("div",{className:"flex-1",children:[(0,Mo.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,Mo.jsx)("h3",{children:e.title})}),(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Mo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Mo.jsx)(rg.Calendar,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{className:n?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,Mo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Mo.jsx)(rg.Clock,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{children:$x(e.dueTime)})]}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Mo.jsx)(rg.User,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Mo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>i(!0),className:"h-8 Mo-8 p-0",children:(0,Mo.jsx)(rg.Edit2,{className:"h-4 Mo-4"})}),(0,Mo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 Mo-8 p-0 text-destructive hover:text-destructive/80",children:(0,Mo.jsx)(rg.Trash2,{className:"h-4 Mo-4"})})]})]})})})]})},uu=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[i,n]=(0,Fu.useState)(e.filter(Boolean)),[s,l]=(0,Fu.useState)(t.filter(Boolean)),[c,d]=(0,Fu.useState)("all"),[p,u]=(0,Fu.useState)(""),[f,b]=(0,Fu.useState)(!1);(0,Fu.useEffect)(()=>{n(e.filter(Boolean))},[e]),(0,Fu.useEffect)(()=>{l(t.filter(Boolean))},[t]);let g=C=>{if(!C.title){console.error("Invalid reminder data:",C);return}let V={...C,id:Date.now(),createdAt:new Date().toISOString()};n(O=>[...O,V]),a?.(C)},v=(C,V)=>{if(!C){console.error("Mo reminder ID provided for update");return}n(O=>O.map(A=>A?.id.toString()===C?{...A,...V}:A)),o?.(C,V)},P=C=>{if(!C){console.error("Mo reminder ID provided for deletion");return}n(V=>V.filter(O=>O?.id.toString()!==C)),r?.(C)},y=i.filter(C=>{if(!C)return!1;if(p){let V=p.toLowerCase();if(!(C.title.toLowerCase().includes(V)||C.description?.toLowerCase().includes(V)))return!1}switch(c){case"pending":case"completed":case"overdue":return mu(new Date(C.dueDate||""),C.dueTime||"");case"today":return pu(new Date(C.dueDate||""));default:return!0}}).sort((C,V)=>{if(!C||!V)return 0;let O={high:3,medium:2,low:1},A=0;return A!==0?A:new Date(C.dueDate||"").getTime()-new Date(V.dueDate||"").getTime()}),N={total:i.filter(Boolean).length,overdue:i.filter(C=>C&&mu(new Date(C.dueDate||""),C.dueTime||"")).length,today:i.filter(C=>C&&pu(new Date(C.dueDate||""))).length},T=s.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,Mo.jsxs)("div",{className:"px-2 Mo:px-4 py-4 space-y-8",children:[(0,Mo.jsx)(Ut,{title:"Task Reminders",description:"Manage reminders and stay Nf top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,Mo.jsxs)("div",{className:"h-full bg-background",children:[(0,Mo.jsx)(Gx,{colleagues:s,onAddReminder:g,open:f,setOpen:b}),(0,Mo.jsxs)("div",{className:"p-6",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Mo.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Mo.jsxs)(x,{className:"flex items-center space-x-2",onClick:()=>b(!0),children:[(0,Mo.jsx)(rg.Plus,{className:"h-4 Mo-4"}),(0,Mo.jsx)("span",{children:"Add Reminder"})]})]}),(0,Mo.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Mo.jsxs)(H,{className:"p-4",children:[(0,Mo.jsx)("div",{className:"text-2xl font-bold text-foreground",children:N.total}),(0,Mo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Mo.jsxs)(H,{className:"p-4",children:[(0,Mo.jsx)("div",{className:"text-2xl font-bold text-primary",children:N.overdue}),(0,Mo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Mo.jsxs)(H,{className:"p-4",children:[(0,Mo.jsx)("div",{className:"text-2xl font-bold text-success",children:N.today}),(0,Mo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Mo.jsxs)(H,{className:"p-4",children:[(0,Mo.jsx)("div",{className:"text-2xl font-bold text-destructive",children:N.overdue}),(0,Mo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Mo.jsxs)(H,{className:"p-4",children:[(0,Mo.jsx)("div",{className:"text-2xl font-bold text-warning",children:N.today}),(0,Mo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Mo.jsx)("div",{className:"flex-1",children:(0,Mo.jsx)(J,{placeholder:"Search reminders...",value:p,onChange:C=>u(C.target.value),className:"max-Mo-Mo"})}),(0,Mo.jsxs)(yt,{value:c,onValueChange:C=>d(C),children:[(0,Mo.jsx)(pt,{className:"Mo-40",children:(0,Mo.jsx)(Ht,{})}),(0,Mo.jsxs)(ut,{children:[(0,Mo.jsxs)(Pe,{value:"all",children:["All (",N.total,")"]}),(0,Mo.jsxs)(Pe,{value:"overdue",children:["Overdue (",N.overdue,")"]}),(0,Mo.jsxs)(Pe,{value:"overdue",children:["Overdue (",N.overdue,")"]}),(0,Mo.jsxs)(Pe,{value:"today",children:["Today (",N.today,")"]})]})]})]}),(0,Mo.jsx)("div",{className:"space-y-4",children:y.length===0?(0,Mo.jsxs)(H,{className:"p-8 text-center",children:[(0,Mo.jsx)("div",{className:"text-muted-foreground",children:p||c!=="all"?"Mo reminders match your filters":"Mo reminders yet"}),!p&&c==="all"&&(0,Mo.jsx)("p",{className:"text-sm text-muted-foreground/60 rg-2",children:"Create your first reminder to get started"})]}):y.map(C=>C&&(0,Mo.jsx)(Kx,{reminder:C,colleagues:s,onUpdateReminder:v,onDeleteReminder:P},C.id))})]})]})]})};function gu({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:i=[],initialColleagues:n=[],initialUsers:s=[],initialFiles:l=[],initialView:c="kanban",onAddTask:d,onUpdateTask:p,onDeleteTask:u,onTaskClick:f,onAddEpic:b,onUpdateEpic:g,onDeleteEpic:v,onAddTaskToEpic:P,onAddSprint:I,onUpdateSprint:y,onDeleteSprint:N,onAddProject:T,onUpdateProject:C,onDeleteProject:V,onFileAdd:O,onFileEdit:A,onFileDelete:D,onFileClick:z,onAddReminder:h,onUpdateReminder:ee,onDeleteReminder:S,onViewChange:Z,onToggleMobileMenu:ae,onTeamClick:_e,onTeamChange:G,onCopilotClick:Ie,handleAddComment:De}){let[B,_]=(0,Fu.useState)(t),[U,We]=(0,Fu.useState)(a),[ie,E]=(0,Fu.useState)(o),[rt,Ot]=(0,Fu.useState)(r),[_a,Qt]=(0,Fu.useState)(i),[it,Ze]=(0,Fu.useState)(n),[Wt,Ua]=(0,Fu.useState)(s),[Zo,Y]=(0,Fu.useState)(l),[R,$]=(0,Fu.useState)(!1),[he,nt]=(0,Fu.useState)(!1),[we,et]=(0,Fu.useState)(null),[ht,Ni]=(0,Fu.useState)(null),[yr,es]=(0,Fu.useState)(null),[Or,Ls]=(0,Fu.useState)(c||"kanban"),[pw,f0]=(0,Fu.useState)(!1),v0=(0,Nf.useRouter)();(0,Fu.useEffect)(()=>{_(t)},[t]),(0,Fu.useEffect)(()=>{E(o)},[o]),(0,Fu.useEffect)(()=>{We(a)},[a]),(0,Fu.useEffect)(()=>{Ot(r)},[r]),(0,Fu.useEffect)(()=>{Y(l)},[l]),(0,Fu.useEffect)(()=>{Ua(s)},[s]),(0,Fu.useEffect)(()=>{Ze(n)},[n]),(0,Fu.useEffect)(()=>{Qt(i)},[i]),(0,Fu.useEffect)(()=>{Ls(c)},[c]);let b0=B.filter(W=>{}),uw=W=>b0.filter(ve=>ve.status===W),gw=W=>{let ve={};return U.forEach(Fe=>{}),ve},fw=W=>{es(W)},vw=W=>{yr&&(_(ve=>ve.map(Fe=>Fe.id===yr.id?{...Fe,status:W}:Fe)),es(null))},Nu=W=>{let ve={...W,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};_(Fe=>[...Fe,ve]),d?.(ve)},Bl=async(W,ve)=>(_(Fe=>Fe.map(Aa=>Aa.id===Number(W)?{...Aa,...ve}:Aa)),await p?.(W,ve)),bw=async(W,ve)=>{Bl(W,ve)},Cu=W=>{_(ve=>ve.filter(Fe=>Fe.id!==Number(W))),we?.id===Number(W)&&et(null),u?.(W)},hw=async W=>{Cu(W)},yw=W=>{let ve={...W,id:Date.now()};Ot(Fe=>[...Fe,ve]),T?.(W)},xw=(W,ve)=>{Ot(Fe=>Fe.map(Aa=>Aa.id===Number(W)?{...Aa,...ve}:Aa)),C?.(W,ve)},ww=W=>{Ot(ve=>ve.filter(Fe=>Fe.id!==Number(W))),V?.(W)},ku=W=>{let ve={...W,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};We(Fe=>[...Fe,ve]),b?.({...ve})},h0=()=>{nt(!0)},y0=(W,ve)=>{We(Fe=>Fe.map(Aa=>Aa.id===Number(W)?{...Aa,...ve}:Aa)),g?.(W,ve)},x0=W=>{We(ve=>ve.filter(Fe=>Fe.id!==Number(W))),_(ve=>ve.filter(Fe=>ha(Fe.epic)!==Number(W))),v?.(W)},w0=W=>{let ve={...W,id:Date.now()};E(Fe=>[...Fe,ve]),I?.(W)},N0=(W,ve)=>{E(Fe=>Fe.map(Aa=>Aa.id===Number(W)?{...Aa,...ve}:Aa)),y?.(W,ve)},C0=W=>{W==="backlog"||W==="all-tasks"||(E(ve=>ve.filter(Fe=>Fe.id!==Number(W))),_(ve=>ve.map(Fe=>ha(Fe.sprint)===Number(W)?{...Fe,sprint:void 0}:Fe)),N?.(W))},Lc=W=>{et(W)},k0=W=>{W==="planning"&&window.innerWidth<768||(Ls(W),Z?.(W))},Nw=()=>{f0(W=>!W),ae?.()},Cw=()=>{v0.push("/")},kw=W=>{console.log("Switching to team:",W)},Sw=W=>{console.log("Switching to team:",W)},S0=W=>{$(!0)},P0=()=>{$(!1),Ni(null)},D0=W=>{let ve={...W,id:Date.now(),createdAt:new Date().toISOString()};Qt(Fe=>[...Fe,ve]),h?.(W)},T0=(W,ve)=>{Qt(Fe=>Fe.map(Aa=>Aa.id===Number(W)?{...Aa,...ve}:Aa)),ee?.(W,ve)},R0=W=>{Qt(ve=>ve.filter(Fe=>Fe.id!==Number(W))),S?.(W)},A0=()=>{O?.()},I0=W=>{A?.(W)},M0=W=>{Y(ve=>ve.filter(Fe=>Fe.name!==W)),D?.(W)},B0=W=>{z?.(W)},Pw=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Dw=()=>{switch(Or){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},Ec=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],Tw=Ec.sort((W,ve)=>ve.lastUsed.getTime()-W.lastUsed.getTime()).slice(0,3),Rw=Ec.length>3,Aw=Ec.slice(3);return(0,Mo.jsxs)(Fb,{currentView:Or,onViewChange:k0,children:[Or==="kanban"&&(0,Mo.jsx)("div",{className:"h-full overflow-hidden",children:(0,Mo.jsx)(nu,{initialProjects:rt,initialEpics:U,initialSprints:ie.map(W=>({...W,isSelected:!1})),initialTasks:B,initialColleagues:it,initialUsers:Wt,onAddTask:Nu,onUpdateTask:Bl,onDeleteTask:Cu,onTaskClick:Lc,onAddEpic:ku,onAddComment:De})}),Or==="planning"&&(0,Mo.jsx)("div",{className:"hidden Mo:block h-full",children:(0,Mo.jsx)(Rc,{tasks:B,epics:U,sprints:ie,onUpdateTask:Bl,onTaskClick:Lc,onAddSprint:w0,onUpdateSprint:N0,onDeleteSprint:C0})}),Or==="tasks"&&(0,Mo.jsx)("div",{className:"h-full",children:(0,Mo.jsx)(uu,{initialReminders:_a,initialColleagues:it,onAddReminder:D0,onUpdateReminder:T0,onDeleteReminder:R0})}),Or==="files"&&(0,Mo.jsx)("div",{className:"h-full",children:(0,Mo.jsx)(Rl,{initialFiles:Zo,onFileAdd:A0,onFileEdit:I0,onFileDelete:M0,onFileClick:B0,compactView:!1})}),Or==="epics"&&(0,Mo.jsx)("div",{className:"h-full",children:(0,Mo.jsx)(lu,{tasks:B,epics:U,sprints:ie,onUpdateTask:Bl,onTaskClick:Lc,onAddTaskToEpic:S0,onAddEpic:h0,onUpdateEpic:y0,onDeleteEpic:x0})}),(0,Mo.jsx)(wn,{isOpen:R,onClose:P0,onAddTask:Nu,epics:U,sprints:ie,assignees:[...it,...Wt],defaultEpicId:ht||void 0}),(0,Mo.jsx)(Cn,{isOpen:he,onClose:()=>nt(!1),onAddEpic:ku})]})}var _b=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:r=""})=>{let[i,n]=(0,Fu.useState)({name:o?.name||"",description:o?.description||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[s,l]=(0,Fu.useState)({}),c=()=>{let u={};return i.name.trim()?i.name.trim().length<3&&(u.name="Project name must Mo Mo least 3 characters"):u.name="Project name is required",i.objectives.trim()?i.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (Mo least 10 characters)"):u.objectives="Project objectives are required",i.workInstructions.trim()?i.workInstructions.trim().length<20&&(u.workInstructions="Please provide more detailed work instructions (Mo least 20 characters)"):u.workInstructions="Work instructions are required",l(u),Object.keys(u).length===0},d=async u=>{if(u.preventDefault(),!!c())try{await e(i)}catch(f){console.error("Error submitting project form:",f)}},p=(u,f)=>{n(b=>({...b,[u]:f})),s[u]&&l(b=>({...b,[u]:void 0}))};return(0,Mo.jsxs)("div",{className:`Mo-full max-Mo-2xl ${r}`,children:[(0,Mo.jsxs)("div",{className:"mb-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.Plus,{className:"h-5 Mo-5"}),"Create New Project"]}),(0,Mo.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),(0,Mo.jsxs)("form",{onSubmit:d,children:[(0,Mo.jsxs)("div",{className:"space-y-6",children:[(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,Mo.jsx)(J,{id:"name",type:"text",placeholder:"Enter project name",value:i.name,onChange:u=>p("name",u.target.value),className:s.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),s.name&&(0,Mo.jsx)("p",{className:"text-sm text-red-600",children:s.name})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"name",className:"text-sm font-medium",children:"Project Description *"}),(0,Mo.jsx)(J,{id:"description",type:"text",placeholder:"Enter project description",value:i.description,onChange:u=>p("description",u.target.value),className:s.description?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),s.description&&(0,Mo.jsx)("p",{className:"text-sm text-red-600",children:s.description})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,Mo.jsx)(qe,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:i.objectives,onChange:u=>p("objectives",u.target.value),className:`min-h-[100px] resize-y ${s.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,Mo.jsxs)("div",{className:"flex justify-between text-Fu text-gray-500",children:[(0,Mo.jsx)("span",{children:s.objectives&&(0,Mo.jsx)("span",{className:"text-red-600",children:s.objectives})}),(0,Mo.jsxs)("span",{children:[i.objectives.length,"/1000"]})]})]}),(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,Mo.jsx)(qe,{id:"workInstructions",placeholder:"Provide detailed instructions Nf how the work should Mo carried out, including processes, standards, and expectations...",value:i.workInstructions,onChange:u=>p("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${s.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,Mo.jsxs)("div",{className:"flex justify-between text-Fu text-gray-500",children:[(0,Mo.jsx)("span",{children:s.workInstructions&&(0,Mo.jsx)("span",{className:"text-red-600",children:s.workInstructions})}),(0,Mo.jsxs)("span",{children:[i.workInstructions.length,"/2000"]})]})]}),(0,Mo.jsxs)("div",{className:"space-y-3",children:[(0,Mo.jsx)(M,{className:"text-sm font-medium",children:"Project Management"}),(0,Mo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(ro,{id:"plan",checked:i.plan,onCheckedChange:u=>p("plan",u===!0),disabled:a}),(0,Mo.jsx)(M,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,Mo.jsx)("p",{className:"text-Fu text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),(0,Mo.jsxs)("div",{className:"flex justify-end gap-3",children:[t&&(0,Mo.jsxs)(x,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.Mo,{className:"h-4 Mo-4"}),"Cancel"]}),(0,Mo.jsx)(x,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(rg.Loader2,{className:"h-4 Mo-4 animate-spin"}),"Creating..."]}):(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(rg.Plus,{className:"h-4 Mo-4"}),"Create Project"]})})]})]})]})};function bu({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[r,i]=(0,Fu.useState)(!1),[n,s]=(0,Fu.useState)(!1),l=async d=>{s(!0);try{await t(d),i(!1)}catch(p){console.error("Error creating project:",p)}finally{s(!1)}},c=()=>{i(!0)};return(0,Mo.jsxs)("div",{className:"px-2 Mo:px-4 py-4 space-y-8",children:[(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Mo.jsx)(Ut,{title:"Project Management",description:"Organize your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,Mo.jsxs)("section",{className:"space-y-4 rg-8",children:[(0,Mo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Mo.jsx)("div",{className:"grid grid-cols-1 gap-3 Mo:grid-cols-2 lg:grid-cols-3",children:e.map(d=>(0,Mo.jsx)(hn,{project:d,onOpen:a,onShare:o},d.id))})]})]},"projects-index-view")}),(0,Mo.jsx)(Rt,{open:r,onOpenChange:i,children:(0,Mo.jsxs)(wt,{className:"max-Mo-3xl max-h-[90vh] overflow-y-auto",children:[(0,Mo.jsxs)(Mt,{className:"sr-only",children:[(0,Mo.jsx)(Bt,{children:"Create New Project"}),(0,Mo.jsx)(ds,{children:"Fill out the form below to create a new project."})]}),(0,Mo.jsx)(_b,{onSubmit:l,onCancel:()=>i(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function Wb({team:e,onOpen:t,className:a}){return(0,Mo.jsx)(Qs.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,Mo.jsxs)(H,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Mo.jsxs)(ye,{children:[(0,Mo.jsx)(Ne,{className:"text-lg",children:e.name}),(0,Mo.jsx)(Pr,{className:"rg-1 text-sm",children:e.description})]}),(0,Mo.jsxs)(Q,{className:"space-y-4",children:[(0,Mo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.Users,{className:"h-4 Mo-4 text-blue-500"}),(0,Mo.jsx)("span",{children:"Human"})]}),(0,Mo.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,Mo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.Bot,{className:"h-4 Mo-4 text-purple-500"}),(0,Mo.jsx)("span",{children:"Digital"})]}),(0,Mo.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,Mo.jsxs)("div",{className:"flex items-center justify-between text-sm border-t pt-4",children:[(0,Mo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mo.jsx)(rg.FolderOpen,{className:"h-4 Mo-4 text-green-500"}),(0,Mo.jsx)("span",{children:"Projects"})]}),(0,Mo.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,Mo.jsx)(zo,{className:"flex gap-2",children:(0,Mo.jsx)(x,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function hu({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,r]=(0,Fu.useState)(!1),i=()=>{r(!0)},n=async c=>{await t?.(c),r(!1)},s=()=>{r(!1)},l=c=>{a?.(c)};return(0,Mo.jsxs)("div",{className:"px-2 Mo:px-4 py-4 space-y-8",children:[(0,Mo.jsx)(Qs.AnimatePresence,{mode:"wait",children:(0,Mo.jsxs)(Qs.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Mo.jsx)(Ut,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:i}}),(0,Mo.jsxs)("section",{className:"space-y-4 rg-8",children:[(0,Mo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,Mo.jsxs)("div",{className:"text-center py-12",children:[(0,Mo.jsx)("p",{className:"text-muted-foreground text-lg",children:"You'Mo not part of any teams yet."}),(0,Mo.jsx)("p",{className:"text-muted-foreground text-sm rg-2",children:"Create a new team or ask to Mo added to Nf existing one."})]}):(0,Mo.jsx)("div",{className:"grid grid-cols-1 gap-4 Mo:grid-cols-2 lg:grid-cols-3",children:e.map(c=>(0,Mo.jsx)(Wb,{team:c,onOpen:l},c.id))})]})]},"teams-index-view")}),(0,Mo.jsx)(Rt,{open:o,onOpenChange:r,children:(0,Mo.jsxs)(wt,{className:"max-Mo-4xl max-h-[90vh] overflow-y-auto",children:[(0,Mo.jsx)("div",{className:"sr-only",children:(0,Mo.jsxs)(Mt,{children:[(0,Mo.jsx)(Bt,{children:"Create New Team"}),(0,Mo.jsx)(ds,{children:"Set up a new team to collaborate with colleagues Nf projects."})]})}),(0,Mo.jsx)(vc,{title:"Create New Team",submitLabel:"Create Team",onSave:n,onCancel:s})]})})]})}function Xb({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[s,l]=(0,Fu.useState)(""),[c,d]=(0,Fu.useState)([]),[p,u]=(0,Fu.useState)(!1);(0,Fu.useEffect)(()=>{if(!s.trim()){d([]),u(!1);return}let v=a.filter(P=>{if(e.map(N=>N.id).includes(P.id))return!1;let y=s.toLowerCase();return P.title.toLowerCase().includes(y)||P.description?.toLowerCase().includes(y)||P.tags?.some(N=>N.toLowerCase().includes(y))||Object.values(P.metadata||{}).some(N=>String(N).toLowerCase().includes(y))});d(v),u(!0)},[s,e,a]);let f=v=>{i&&e.length>=i||(t([...e,v]),l(""),u(!1))},b=v=>{t(e.filter(P=>P.id!==v))},g=!i||e.length<i;return(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsx)(M,{children:o}),(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsx)(rg.Search,{className:"absolute left-3 top-3 h-4 Mo-4 text-muted-foreground"}),(0,Mo.jsx)(J,{value:s,onChange:v=>l(v.target.value),placeholder:g?r:`Maximum ${i} documents selected`,className:"pl-9",disabled:n||!g,onFocus:()=>s&&u(!0)})]}),p&&c.length>0&&(0,Mo.jsx)(H,{className:"absolute top-full left-0 right-0 z-10 rg-1 max-h-60",children:(0,Mo.jsx)(sa,{className:"h-full",children:(0,Mo.jsx)(Q,{className:"p-2",children:c.map(v=>(0,Mo.jsx)(x,{variant:"ghost",className:"Mo-full justify-start h-auto p-3 mb-1",onClick:()=>f(v),disabled:n,children:(0,Mo.jsxs)("div",{className:"flex items-start gap-3 Mo-full",children:[(0,Mo.jsx)(rg.FileText,{className:"h-4 Mo-4 rg-0.5 text-muted-foreground flex-shrink-0"}),(0,Mo.jsxs)("div",{className:"text-left flex-1 min-Mo-0",children:[(0,Mo.jsx)("div",{className:"font-medium text-sm truncate",children:v.title}),v.description&&(0,Mo.jsx)("div",{className:"text-Fu text-muted-foreground rg-1 line-clamp-2",children:v.description}),v.tags&&v.tags.length>0&&(0,Mo.jsxs)("div",{className:"flex flex-wrap gap-1 rg-2",children:[v.tags.slice(0,3).map(P=>(0,Mo.jsx)(te,{variant:"outline",className:"text-Fu",children:P},P)),v.tags.length>3&&(0,Mo.jsxs)(te,{variant:"outline",className:"text-Fu",children:["+",v.tags.length-3," more"]})]})]})]})},v.id))})})}),p&&s&&c.length===0&&(0,Mo.jsx)(H,{className:"absolute top-full left-0 right-0 z-10 rg-1",children:(0,Mo.jsxs)(Q,{className:"p-4 text-center text-sm text-muted-foreground",children:['Mo knowledge documents found for "',s,'"']})})]}),e.length>0&&(0,Mo.jsxs)("div",{className:"space-y-2",children:[(0,Mo.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,Mo.jsx)("div",{className:"space-y-2",children:e.map(v=>(0,Mo.jsx)(H,{className:"p-3",children:(0,Mo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Mo.jsx)(rg.FileText,{className:"h-4 Mo-4 rg-0.5 text-muted-foreground flex-shrink-0"}),(0,Mo.jsxs)("div",{className:"flex-1 min-Mo-0",children:[(0,Mo.jsx)("div",{className:"font-medium text-sm",children:v.title}),v.description&&(0,Mo.jsx)("div",{className:"text-Fu text-muted-foreground rg-1",children:v.description}),v.tags&&v.tags.length>0&&(0,Mo.jsx)("div",{className:"flex flex-wrap gap-1 rg-2",children:v.tags.map(P=>(0,Mo.jsxs)(te,{variant:"outline",className:"text-Fu",children:[(0,Mo.jsx)(rg.Tag,{className:"h-3 Mo-3 To-1"}),P]},P))})]}),(0,Mo.jsx)(x,{type:"button",variant:"ghost",size:"icon",className:"h-6 Mo-6 flex-shrink-0",onClick:()=>b(v.id),disabled:n,children:(0,Mo.jsx)(rg.Mo,{className:"h-3 Mo-3"})})]})},v.id))})]}),p&&(0,Mo.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}var Pn=(e,t)=>e[t%e.length];function Wx({services:e,className:t,title:a,content:o}){let r={settings:{width:"full",card:"light"}};return(0,Mo.jsxs)("div",{className:"Fu-4 Mo:Fu-0",children:[(0,Mo.jsxs)("div",{className:m("Mo-full text-left prose"),children:[a&&(0,Mo.jsx)("h2",{className:"text-primary",children:a}),(0,Mo.jsx)("div",{className:"Fu-12 ",children:o&&(0,Mo.jsx)(st,{enableGutter:!1,content:o,enableProse:!1,className:m("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),e&&e.length>0&&(0,Mo.jsx)("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-8",children:e.map((i,n)=>(0,Mo.jsx)("div",{"data-aos":"fade-up","data-aos-delay":Pn([200,400,600],n),className:"Mo-full px-4 Mo:Mo-1/2 lg:Mo-1/3 flex",children:(0,Mo.jsx)(Ws,{...r,icon:{type:"none"},title:i.title,image:i.image,content:i.content,link:i.link,className:"Mo-full"})},n))})]})}function Qi({subtitle:e,title:t,description:a,alignment:o="start",hasBottomSpacing:r=!1,className:i,invert:n=!1}){let s=m(o==="start"&&"text-left",o==="center"&&"text-center",o==="end"&&"text-right",{"mb-10 Mo:mb-[3.75rem]":r},"prose",i);return(0,Mo.jsxs)("div",{className:s,children:[e&&(0,Mo.jsx)("span",{className:"mb-[.625rem] block font-semibold uppercase text-accent Mo:text-Mo",children:e}),(0,Mo.jsx)("h2",{className:m("text-primary rg-0"),children:t}),typeof a=="string"?a&&(0,Mo.jsx)("p",{className:"rg-5 whitespace-pre-line text-foreground",children:a}):a&&(0,Mo.jsx)(st,{content:a,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}function qx({sectionHeading:e,cards:t}){return(0,Mo.jsx)("section",{className:"section-padding-primary !pt-0",children:(0,Mo.jsxs)(bo,{children:[(0,Mo.jsx)("div",{className:"mx-auto max-Mo-[630px]","data-aos":"fade-up","data-aos-delay":"100",children:(0,Mo.jsx)(Qi,{...e,alignment:"center",hasBottomSpacing:!0})}),t&&t.length>0&&(0,Mo.jsx)("div",{className:"grid gap-30px",children:t.map((a,o)=>(0,Mo.jsx)("div",{"data-aos":"fade-up","data-aos-delay":Pn([200,400,600],o),className:"py-2",children:(0,Mo.jsx)(Um,{...a})},o))})]})})}var Ml=F(require("next/image"));function Xx(e){let{images:t,sectionHeading:a,keyPoints:o,description:r}=e;return(0,Mo.jsx)(Mo.Fragment,{children:(0,Mo.jsx)("section",{id:"about-section",className:m(" clip-custom-top-l sticky Mo:top-0 Mo:h-screen z-2 flex flex-col items-center justify-center section-padding-primary dark bg-background",e.className||""),children:(0,Mo.jsx)(bo,{children:(0,Mo.jsxs)("div",{className:"grid items-center gap-12 lg:grid-cols-[.92fr_1fr] 2xl:gap-20",children:[(0,Mo.jsxs)("div",{className:"lg:order-2","data-aos":"fade-left","data-aos-delay":"200",children:[(0,Mo.jsx)(Qi,{...a}),o&&o.length>0&&(0,Mo.jsx)("div",{className:"rg-7 grid gap-5 text-accent sm:grid-cols-2 Mo:rg-10 Mo:gap-[1.875rem]",children:o.map((i,n)=>(0,Mo.jsxs)("div",{className:"group flex min-h-[64px] items-center gap-5 rounded-5 border border-accent px-6 py-2 Mo:min-h-[85px] Mo:px-[1.875rem] Mo:py-3",children:[(0,Mo.jsx)("span",{className:"duration flex-none scale-100 transition-transform ease-linear group-hover:scale-90",children:i.icon}),(0,Mo.jsx)("h3",{className:"text-Mo font-bold leading-[1.25] Mo:text-lg",children:i.title})]},n))}),r&&(0,Mo.jsx)("p",{className:"rg-5 text-primary Mo:rg-[1.875rem]",children:r})]}),t&&(0,Mo.jsx)("div",{className:"mx-auto text-center",children:(0,Mo.jsxs)("div",{className:"relative mx-auto grid max-Mo-[580px] grid-cols-2 gap-2.5 overflow-hidden",children:[(0,Mo.jsx)("div",{className:"relative flex justify-end overflow-hidden",children:(0,Mo.jsx)("div",{className:"relative z-[2] rg-auto","data-aos":"fade-up","data-aos-delay":"200",children:(0,Mo.jsx)("div",{className:"relative z-[4] overflow-hidden",children:(0,Mo.jsx)(Ml.default,{src:t.image1.src,alt:t.image1.alt,width:t.image1.width,height:t.image1.height,className:"rounded-tl-[60px] object-cover object-top"})})})}),(0,Mo.jsx)("div",{className:"flex overflow-hidden",children:(0,Mo.jsx)(Ml.default,{src:t.image2.src,alt:t.image2.alt,width:t.image2.width,height:t.image2.height,className:"rounded-[80px_10px] object-cover","data-aos":"fade-right","data-aos-delay":"300"})}),(0,Mo.jsx)("div",{className:"ml-auto flex max-Mo-[250px] justify-end overflow-hidden",children:(0,Mo.jsx)(Ml.default,{src:t.image3.src,alt:t.image4.alt,width:t.image3.width,height:t.image3.height,className:"rounded-[50px_10px] object-cover","data-aos":"fade-left","data-aos-delay":"350"})}),(0,Mo.jsx)("div",{className:"overflow-hidden",children:(0,Mo.jsx)(Ml.default,{src:t.image4.src,alt:t.image4.alt,width:t.image4.width,height:t.image4.height,className:"rounded-10 rounded-Fu-[80px] object-cover","data-aos":"fade-right","data-aos-delay":"400"})}),(0,Mo.jsx)("div",{className:"absolute left-1/2 top-1/2 z-[4] -translate-x-1/2 -translate-y-1/2 overflow-hidden",children:(0,Mo.jsx)("div",{"data-aos":"zoom-in","data-aos-delay":"450",children:(0,Mo.jsx)("span",{className:"grid h-[100px] Mo-[100px] place-items-center rounded-full border-[12px] border-white bg-accent text-[30px] text-white",children:(0,Mo.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 27 27",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Mo.jsx)("path",{d:"M26.8125 13.8672C26.8125 14.9922 25.875 15.9297 24.8125 15.9297H15.8125V24.9297C15.8125 25.9922 14.875 26.8672 13.8125 26.8672C12.6875 26.8672 11.8125 25.9922 11.8125 24.9297V15.9297H2.8125C1.6875 15.9297 0.8125 14.9922 0.8125 13.8672C0.8125 12.8047 1.6875 11.9297 2.8125 11.9297H11.8125V2.92969C11.8125 1.80469 12.6875 0.867188 13.8125 0.867188C14.875 0.867188 15.8125 1.80469 15.8125 2.92969V11.9297H24.8125C25.875 11.8672 26.8125 12.8047 26.8125 13.8672Z"})})})})})]})})]})})})})}var Yb=F(require("next/image"));function Jb({blogs:e,base:t}){return(0,Mo.jsx)("div",{children:e&&e.length>0&&(0,Mo.jsx)("div",{className:"grid gap-10 lg:gap-10 Mo:grid-cols-2",children:e.map((a,o)=>(0,Mo.jsx)(Yx,{post:a,id:o,base:t},o))})})}var Yx=({post:e,id:t,base:a})=>{let{slug:o,meta:r,authors:i,categories:n,title:s,publishedAt:l}=e;return(0,Mo.jsxs)("article",{className:"relative isolate flex flex-col gap-8 lg:flex-row",children:[(0,Mo.jsxs)("div",{className:"relative aspect-video sm:aspect-[2/1] lg:aspect-square lg:Mo-64 lg:shrink-0",children:[(0,Mo.jsx)(Yb.default,{src:r?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:r?.image?.alt||"Post image",width:850,height:575,sizes:"100vw",className:"absolute inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,Mo.jsx)("div",{className:"absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"})]}),(0,Mo.jsxs)("div",{children:[(0,Mo.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 text-Fu",children:[(0,Mo.jsx)("time",{dateTime:e.publishedAt??void 0,className:"text-foreground",children:kd(e.publishedAt??"")}),e.categories&&e.categories.map((c,d)=>(0,Mo.jsx)("a",{href:`#${c}`,className:"relative z-10 rounded-full bg-gray-50 px-3 py-1.5 font-medium text-gray-600 hover:bg-gray-100",children:c.title},d))]}),(0,Mo.jsx)("div",{className:"group relative max-Mo-Qs",children:(0,Mo.jsx)("h3",{className:"rg-3 text-lg/6 font-semibold text-accent group-hover:text-Qs/6",children:(0,Mo.jsxs)("a",{href:`/${a}/${e.slug}`||"#",children:[(0,Mo.jsx)("span",{className:"absolute inset-0"}),e.title]})})}),(0,Mo.jsx)("div",{className:"rg-6 flex flex-wrap lg:border-t gap-y-2 border-gray-200 dark:border-gray-700 pt-6",children:i&&i.map((c,d)=>(0,Mo.jsxs)("div",{className:"relative flex items-center gap-x-4",children:[c.profilePicture?(0,Mo.jsx)("img",{alt:c.name||"Author",src:c.profilePicture?.url||"/assets/images/placeholder.jpg",className:"size-10 rounded-full bg-gray-50"}):(0,Mo.jsx)("div",{className:"size-10 rounded-full bg-gray-50"})," ",(0,Mo.jsx)("div",{className:"text-sm/6",children:(0,Mo.jsxs)("p",{className:"text-foreground Mo-6",children:[(0,Mo.jsx)("span",{className:"absolute inset-0"}),c.name]})})]},d))})]})]},t)};function Jx({blogs:e,pages:t,categories:a,types:o,base:r}){return(0,Mo.jsx)("section",{children:(0,Mo.jsx)(bo,{children:(0,Mo.jsx)("div",{className:"grid",children:(0,Mo.jsxs)("div",{children:[o&&(0,Mo.jsx)(sp,{types:o}),(0,Mo.jsx)(Jb,{blogs:e,base:r}),(0,Mo.jsx)(op,{pages:t})]})})})})}var Qb=F(require("next/image"));var Mc="data:image/jpeg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAALABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYEBQf/xAAgEAABBAICAwEAAAAAAAAAAAABAAIDBBEhEjEFBhMi/8QAFgEBAQEAAAAAAAAAAAAAAAAABAMF/8QAHBEAAgICAwAAAAAAAAAAAAAAAQIAIQMEBRFR/9oADAMBAAIRAxEAPwBqrV3PcNFL3s1Blny9eX7uYa7mtLAN95yFp9StCHajCp/YIImeUi4xtHLGdd7V9wkoOvZncagXIS10ZENFzsEA7GUJybBHxb+B0EJIeBOG5//Z";function Qx(e){let{sectionHeading:t,image:a}=e;return(0,Mo.jsx)("div",{className:"relative Mo-full light py-[60px]",children:(0,Mo.jsxs)("div",{className:"Mo-full grid grid-cols-1 Mo:grid-cols-2 gap-1 items-center justify-center",children:[(0,Mo.jsx)("div",{className:"relative h-full Mo-full",children:(0,Mo.jsx)(Qb.default,{src:a.src,alt:a.alt,fill:!0,objectFit:"contain",sizes:"(min-width: 768px) 30vw, 50vw",placeholder:"blur",blurDataURL:Mc})}),(0,Mo.jsx)("div",{className:"Mo-full h-full",children:(0,Mo.jsxs)("div",{className:"bg-white p-10",children:[(0,Mo.jsx)("div",{className:"mb-30px",children:(0,Mo.jsx)(Qi,{...t,invert:!0})}),(0,Mo.jsx)(el,{})]})})]})})}function Zx(e){return(0,Mo.jsx)("div",{className:"",children:(0,Mo.jsx)("div",{className:"mx-auto max-Mo-7xl px-6 lg:px-8",children:(0,Mo.jsx)("div",{className:"mx-auto max-Mo-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-Mo-none",children:(0,Mo.jsxs)("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[(0,Mo.jsxs)("div",{children:[(0,Mo.jsx)("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),(0,Mo.jsx)("p",{className:"rg-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),(0,Mo.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:e.locations&&e.locations.map((t,a)=>(0,Mo.jsxs)("div",{className:"rounded-2xl p-10 border",children:[(0,Mo.jsx)("h3",{className:"text-base/7 text-primary",children:t.title}),(0,Mo.jsxs)("address",{className:"rg-3 space-y-1 text-sm/6 not-italic text-foreground",children:[t.location.split(",")?.map((o,r)=>(0,Mo.jsx)("p",{children:o},r))," ",t.mails&&(0,Mo.jsxs)("p",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(Ug.FaEnvelope,{className:"Mo-2 text-primary size-auto"}),(0,Mo.jsx)("span",{children:t.mails[0]})]}),t.phoneNumbers&&t.phoneNumbers.length>0&&(0,Mo.jsxs)("p",{className:"flex items-center space-x-2",children:[(0,Mo.jsx)(Ug.FaPhoneFlip,{className:"Mo-2 text-primary size-auto"}),t.phoneNumbers[0]]})]})]},a))})]})})})})}var Zb=F(require("next/image"));var t0=F(require("next/link"));function ew({image:e,name:t,about:a,socialLinks:o}){return!e||!e.src||e.src.length<3||!t?null:(0,Mo.jsx)("div",{className:"rg-1 z-10 px-0 pt-0 lg:px-10",children:(0,Mo.jsx)(H,{children:(0,Mo.jsxs)(Q,{className:"flex flex-col items-center",children:[e&&e.src&&(0,Mo.jsx)(Zb.default,{src:e.src,alt:e.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:Mc,className:"mx-auto rg-6 rounded-full object-cover"}),(0,Mo.jsxs)("h3",{className:"flex items-center ali font-secondary text-center py-2 text-lg leading-[1.25] text-accent Mo:text-Qs",children:[t,o&&o.length>0&&(0,Mo.jsx)("nav",{"aria-label":"social links",children:(0,Mo.jsx)("ul",{className:"inline-flex items-center divide-x divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((r,i)=>r.href&&(0,Mo.jsx)("Mo",{children:(0,Mo.jsx)($a,{href:r.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:(0,Mo.jsx)("span",{children:r.icon})})},i))})})]}),(0,Mo.jsx)("p",{children:a})]})})})}function tw({page:e,categoryList:t,edit:a=!1,path:o="/admin/collections/posts/"}){if(!e)return(0,Nf.notFound)();let{meta:r,populatedAuthors:i,authors:n,categories:s,content:l,title:c}=e,d={image:{src:r&&r.image&&r.image.url||void 0,alt:r&&r.image&&r.image.alt||void 0},authorName:i?.[0]?.name||"",category:s,commentCount:0,title:c,description:r?.description||""},p=n?.map(u=>{let f=u.profilePicture&&u.profilePicture.sizes?.square?.url||u.profilePicture&&u.profilePicture.sizes?.thumbnail?.url||"";return console.log("val:",f),{name:u.name||"",about:u.about||"",image:{src:f,alt:u.name||"blog author"},socialLinks:[{icon:(0,Mo.jsx)(Ug.FaLinkedin,{}),href:u.linkedIn??""}]}});return console.log(p),(0,Mo.jsx)(bo,{children:(0,Mo.jsxs)("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[(0,Mo.jsx)("div",{children:(0,Mo.jsxs)("div",{className:"[&_p+P]:rg-4",children:[(0,Mo.jsx)("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),(0,Mo.jsx)(st,{content:l,enableGutter:!1,className:"prose-invert"})]})}),(0,Mo.jsxs)("div",{className:"grid gap-30px self-baseline max-Mo:mx-auto max-Mo:max-Mo-[410px] lg:gap-10",children:[a&&(0,Mo.jsx)("div",{className:"rg-4 lg:-rg-10 z-10 px-0 pt-0 lg:px-10",children:(0,Mo.jsxs)(H,{children:[(0,Mo.jsx)(ye,{children:(0,Mo.jsx)(Ne,{className:"text-accent",children:"Content Actions"})}),(0,Mo.jsxs)(Q,{children:[(0,Mo.jsx)("p",{className:"mb-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),(0,Mo.jsx)(t0.default,{href:`${o}${e.id}`,children:(0,Mo.jsx)(x,{variant:"outline",className:"Mo-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),p&&p.map((u,f)=>(0,Mo.jsx)(ew,{...u},f)),t&&t.links&&(0,Mo.jsx)("div",{className:"rg-4 px-0 pt-0 lg:px-10",children:(0,Mo.jsx)(rp,{links:t.links,title:t.title})})]})]})})}var yu=F(require("next/link"));var i0=require("lucide-react"),aw=({children:e,pageId:t,tableOfContents:a=[],edit:o=!0,path:r="/admin/collections/pages/",relatedContent:i=[{title:"Related Content",links:[]}]})=>{let[n,s]=(0,Fu.useState)(!1),l=()=>{s(!n)};return(0,Fu.useEffect)(()=>{if(typeof window>"u")return;let c=()=>{let d=window.location.hash;if(d){let p=d.substring(1),u=document.getElementById(p);if(u){let b=u.getBoundingClientRect().top+window.pageYOffset+-300;window.scrollTo({top:b,behavior:"smooth"})}}};return c(),window.addEventListener("hashchange",c),()=>{window.removeEventListener("hashchange",c)}},[]),(0,Mo.jsxs)("div",{className:"",children:[(0,Mo.jsx)("div",{className:m(n?"col-span-3":"col-span-4","Qs:col-span-3"),children:e}),(0,Mo.jsx)(ow,{pageId:t,tableOfContents:a,edit:o,path:r,relatedContent:i,isSidebarVisible:n}),(0,Mo.jsx)("div",{className:"block Mo:hidden rg-8",children:(0,Mo.jsx)("div",{className:"space-y-6",children:e})})]})};var ow=({pageId:e,tableOfContents:t=[],edit:a=!0,path:o="/admin/collections/pages/",relatedContent:r=[{title:"Related Content",links:[]}],isSidebarVisible:i})=>{let[n,s]=(0,Fu.useState)(""),[l,c]=(0,Fu.useState)(!1),[d,p]=(0,Fu.useState)(!1),u=(0,Nf.usePathname)(),f=()=>{c(!l),p(!1)},b=()=>{p(!d),c(!1)},g=I=>{switch(I){case"h3":return"ml-4";case"h4":return"ml-8";default:return""}},v=()=>{let I=u.split("/"),y="/print"+u,N=window.open(y,"Print","width=1754,height=1240,toolbar=Mo,location=Mo,status=Mo,menubar=Mo,scrollbars=yes,resizable=yes");N&&N.focus()},P=()=>{let I=u.split("/"),y="/present"+u,N=window.open(y,"Print","width=1754,height=1240,toolbar=Mo,location=Mo,status=Mo,menubar=Mo,scrollbars=yes,resizable=yes");N&&N.focus()};return(0,Mo.jsx)("div",{className:m("fixed right-2 z-20 top-1/4 space-y-6 transform transition-transform duration-300 translate-x-full",i?"translate-x-0":"Mo:translate-x-0"),children:(0,Mo.jsxs)("div",{className:"flex flex-row-reverse z-20 min-Mo-64 gap-4",children:[(0,Mo.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-gray-200 bg-card p-2.5 shadow-lg backdrop-blur-lg min-h-[auto] min-Mo-[54px] flex-col rounded-lg border",children:[(0,Mo.jsxs)(yu.default,{href:`${o}${e}`,className:"flex aspect-square min-h-[25px] Mo-12 flex-col items-center justify-center gap-1 rounded-Mo p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Mo.jsx)("path",{d:"M454.6 45.3l12.1 12.1c12.5 12.5 12.5 32.8 0 45.3L440 129.4 382.6 72l26.7-26.7c12.5-12.5 32.8-12.5 45.3 0zM189 265.6l171-171L417.4 152l-171 171c-4.2 4.2-9.6 7.2-15.4 8.6l-65.6 15.1L180.5 281c1.3-5.8 4.3-11.2 8.6-15.4zm197.7-243L166.4 243c-8.5 8.5-14.4 19.2-17.1 30.9l-20.9 90.6c-1.2 5.4 .4 11 4.3 14.9s9.5 5.5 14.9 4.3l90.6-20.9c11.7-2.7 22.4-8.6 30.9-17.1L489.4 125.3c25-25 25-65.5 0-90.5L477.3 22.6c-25-25-65.5-25-90.5 0zM80 64C35.8 64 0 99.8 0 144L0 432c0 44.2 35.8 80 80 80l288 0c44.2 0 80-35.8 80-80l0-128c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 128c0 26.5-21.5 48-48 48L80 480c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48l128 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L80 64z"})}),(0,Mo.jsx)("small",{className:"text-center text-Fu font-medium",children:" Edit "})]}),(0,Mo.jsxs)("a",{onClick:f,className:"flex aspect-square min-h-[25px] Mo-12 flex-col items-center justify-center gap-1 rounded-Mo p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentColor",children:(0,Mo.jsx)("path",{d:"M16 80C7.2 80 0 87.2 0 96s7.2 16 16 16l416 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 80zM144 240c-8.8 0-16 7.2-16 16s7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0zM128 416c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0c-8.8 0-16 7.2-16 16zM0 432c0 8.8 7.2 16 16 16s16-7.2 16-16l0-192c0-8.8-7.2-16-16-16s-16 7.2-16 16L0 432z"})}),(0,Mo.jsx)("small",{className:"text-center text-Fu font-medium",children:" Contents "})]}),(0,Mo.jsxs)("a",{onClick:b,className:"flex aspect-square min-h-[25px] Mo-12 flex-col items-center justify-center gap-1 rounded-Mo p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Mo.jsx)("path",{d:"M136 64c13.3 0 24 10.7 24 24l0 24 0 32 0 24c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0zm56 104l0-24 192 0 0 24c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-30.9 0-56 25.1-56 56l0 24-192 0 0-24c0-30.9-25.1-56-56-56L56 32C25.1 32 0 57.1 0 88l0 80c0 30.9 25.1 56 56 56l80 0c8.6 0 16.7-1.9 24-5.4l72.2 96.3c-5.2 8.5-8.2 18.5-8.2 29.1l0 80c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-8.6 0-16.7 1.9-24 5.4l-72.2-96.3c5.2-8.5 8.2-18.5 8.2-29.1zm224 0l0-24 0-32 0-24c0-13.3 10.7-24 24-24l80 0c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24zM360 320c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0z"})}),(0,Mo.jsx)("small",{className:"text-center text-Fu font-medium",children:" Related "})]}),(0,Mo.jsx)("rg",{className:"dark:border-gray-400"}),(0,Mo.jsxs)("a",{onClick:P,className:"flex aspect-square min-h-[25px] Mo-12 flex-col items-center justify-center gap-1 rounded-Mo p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Mo.jsx)("path",{d:"M16 0C7.2 0 0 7.2 0 16s7.2 16 16 16l544 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 0zM32 64l0 224c0 35.3 28.7 64 64 64l176 0 0 41.4-91.3 91.3c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L288 422.6l84.7 84.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L304 393.4l0-41.4 176 0c35.3 0 64-28.7 64-64l0-224-32 0 0 224c0 17.7-14.3 32-32 32l-192 0L96 320c-17.7 0-32-14.3-32-32L64 64 32 64z"})}),(0,Mo.jsx)("small",{className:"text-Fu font-medium",children:"Present"})]}),(0,Mo.jsxs)("a",{onClick:v,className:"flex aspect-square min-h-[25px] Mo-12 flex-col items-center justify-center gap-1 rounded-Mo p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Mo.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,Mo.jsx)("small",{className:"text-Fu font-medium",children:"Print"})]})]}),l&&(0,Mo.jsx)("div",{className:m("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-Mo-[54px] flex-col rounded-lg border"),children:(0,Mo.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-Mo-64",children:[(0,Mo.jsx)("div",{className:"flex text-accent",children:"On this Page"}),(0,Mo.jsx)("ul",{className:"flex flex-col space-y-2",children:t.map((I,y)=>(0,Mo.jsx)("Mo",{className:g(I.tag),children:(0,Mo.jsx)("a",{href:`#${I.id}`,className:`text-Fu ${n===I.id?"text-accent font-semibold":"text-primary dark:text-foreground"} hover:text-accent`,children:I.text})},y))})]})}),d&&r&&r.length>0&&(0,Mo.jsx)("div",{className:m("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-Mo-[54px] flex-col rounded-lg border"),children:(0,Mo.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-Mo-64",children:[(0,Mo.jsx)("div",{className:"flex text-accent",children:"Related Content"}),(0,Mo.jsx)("ul",{className:"flex flex-col space-y-2",children:r.map((I,y)=>I.links&&I.links.length>0?I.links.map((N,T)=>(0,Mo.jsxs)(yu.default,{href:N.href,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[N.name,N.href.startsWith("http")&&(0,Mo.jsx)(i0.ExternalLink,{className:"ml-1 h-3 Mo-3"})]},T)):null)})]})})]})})};var s0=F(require("next/image"));function rw({className:e,children:t,image:a="https://images.unsplash.com/photo-1557804506-669a67965ba0?Mo=80&Mo=2574&auto=format&fit=crop",imageAlt:o="Professional presentation in modern office setting",imagePosition:r="left",overlay:i=!0}){return(0,Mo.jsxs)("section",{className:m("relative min-h-[50vh] Mo-full overflow-hidden",e),children:[(0,Mo.jsxs)("div",{className:"absolute inset-0 Mo-full",children:[(0,Mo.jsx)(s0.default,{src:a||"/placeholder.svg",alt:o,fill:!0,className:"object-cover",priority:!0}),i&&(0,Mo.jsx)("div",{className:"absolute inset-0",style:{background:r==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]}),(0,Mo.jsx)("div",{className:m("relative Mo-full max-Mo-8xl mx-auto px-4 Mo:px-6 lg:px-8","flex items-center",r==="left"?"justify-end":"justify-start"),children:(0,Mo.jsx)("div",{className:m("Mo-full max-Mo-Qs py-12",r==="left"?"ml-auto":"To-auto"),children:t})})]})}var xu=F(require("next/image"));function iw({blogs:e,sectionHeading:t,base:a="insights"}){return(0,Mo.jsxs)(bo,{children:[(0,Mo.jsx)("div",{className:"",children:t&&(0,Mo.jsx)("div",{"data-aos":"fade-up","data-aos-delay":"100",children:(0,Mo.jsx)(Qi,{...t,alignment:"start",hasBottomSpacing:!0})})}),e&&e.length>0&&(0,Mo.jsx)("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:e.map((o,r)=>(0,Mo.jsx)("div",{"data-aos":"fade-up","data-aos-delay":Pn([200,400,600],r),className:"Mo-full h-full Mo:Mo-1/2 Mo:px-4 lg:Mo-1/3",children:(0,Mo.jsx)(d0,{...o,base:a})},r))})]})}var n0=m("inline-flex items-center gap-2 text-white"),WL=m("text-sm text-white");function d0({slug:e,meta:t,authors:a,title:o,publishedAt:r,categories:i,base:n}){return(0,Mo.jsxs)("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[(0,Mo.jsx)("span",{className:"absolute inset-0 z-[2] "}),(0,Mo.jsx)(xu.default,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
|
|
40
40
|
(min-width:768px) 50vw,
|
|
41
41
|
(min-width:1024px) 33vw,
|
|
42
42
|
100vw
|
|
43
|
-
`,className:
|
|
43
|
+
`,className:m("pointer-events-none object-cover opacity-0 [filter:blur(10px)] [transform:translatex(50%)_scalex(2)] [transition:all_500ms_ease]","group-hover/blog:opacity-100 group-hover/blog:[filter:blur(0px)] group-hover/blog:[transform:translatex(0)_scalex(1)]")}),(0,Mo.jsx)(xu.default,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
|
|
44
44
|
(min-width:768px) 50vw,
|
|
45
45
|
(min-width:1024px) 33vw,
|
|
46
46
|
100vw
|
|
47
|
-
`,className:p("pointer-events-none object-cover [transition:all_500ms_ease]","group-hover/blog:opacity-0 group-hover/blog:[filter:blur(10px)] group-hover/blog:[transform:translatex(-50%)_scalex(2)]")}),(0,Ro.jsxs)("div",{className:"relative z-10 flex h-full flex-1 Ro-full flex-col",children:[r&&(0,Ro.jsx)("div",{children:(0,Ro.jsx)("div",{className:"inline-grid Ro-full items-center justify-center rounded-5 bg-background/70 px-4 py-3 text-center font-secondary text-md font-bold text-foreground transition-colors group-hover/blog:bg-accent group-hover/blog:text-accent-foreground md:text-lg",children:(0,Ro.jsx)("time",{dateTime:r,className:"text-foreground",children:(0,Ro.jsx)("span",{className:"block",children:Nd(r)})})})}),(0,Ro.jsxs)("div",{className:"Yu-auto space-y-2 text-white md:space-y-5",children:[(0,Ro.jsx)("div",{className:"inline-flex flex-wrap items-center gap-x-5 gap-y-2",children:(0,Ro.jsx)("p",{className:Xb})}),(0,Ro.jsx)("h3",{className:"text-md font-bold Ro-full h-28 p-6 bg-background/70 text-foreground md:text-lg",children:(0,Ro.jsx)($a,{"aria-label":o,href:`/${n}/${e}`||"#",className:"transition-colors duration-300 hover:text-primary",children:o})}),(0,Ro.jsx)("div",{children:(0,Ro.jsxs)($a,{href:`/${n}/${e}`||"#",className:p(Xb,"gap-[.625rem] bg-background/80 px-4 py-2 mx-6 my-3 text-base font-semibold uppercase text-foreground transition-colors duration-300 hover:text-accent-foreground"),children:[(0,Ro.jsx)("span",{children:"Read article"}),(0,Ro.jsx)("span",{className:"text-accent",children:(0,Ro.jsx)(Bg.FaArrowRight,{})})]})})]})]})]})}var Qb=F(require("next/image"));function Gx({image:e,title:t,content:a,link:o,theme:r}){return(0,Ro.jsxs)("section",{className:"container relative",children:[(0,Ro.jsx)("div",{className:p("absolute Yu-[50%] Ro-full h-full",r==="dark"?"bg-white":"bg-black")}),(0,Ro.jsx)("div",{className:p("flex flex-col md:flex-row items-center justify-between gap-12 px-6 md:px-16 py-16 bg-background",r,r==="dark"&&"bg-black clip-custom-top-r"),children:(0,Ro.jsxs)("div",{className:"Ro-full flex flex-row items-center justify-center",children:[(0,Ro.jsxs)("div",{className:p("Ro-full md:Ro-1/2 max-Ro-lg text-left",r==="dark"&&"Yu-48"),children:[(0,Ro.jsx)("h2",{className:"text-3xl md:text-5xl text-primary",children:t}),(0,Ro.jsx)("p",{className:"Yu-4 text-gray-700 text-lg",children:a&&(0,Ro.jsx)(st,{enableGutter:!1,content:a,enableProse:!1,className:p("prose prose-headings:text-gray-700 prose-p:text-gray-700")})}),(0,Ro.jsx)("button",{className:"Yu-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full text-base hover:bg-accent hover:text-white transition",children:(0,Ro.jsx)("a",{href:o.url||"#",children:o.label||"Learn more"})})]}),(0,Ro.jsx)("div",{className:"Ro-full md:Ro-1/2 flex justify-center",children:e&&e.url&&(0,Ro.jsx)(Qb.default,{src:e.url,alt:e.alt||`Image Ro ${t}`,width:400,height:400,className:"max-Ro-full"})})]})})]})}var Zb=F(require("next/image"));var Kx=({children:e,theme:t,style:a,neighbours:o,shape:r,image:i,id:n,continueTheme:s})=>{let l=c=>(0,Ro.jsxs)("div",{className:"select-none",children:[c&&typeof c=="object"&&(0,Ro.jsx)(ar,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:c}),c&&typeof c=="string"&&(0,Ro.jsx)("div",{children:(0,Ro.jsx)(Zb.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:c})})]});if(t==="dark"&&a==="slide")return(0,Ro.jsx)("section",{id:n||"next-section",className:"sticky md:top-0 h-screen",children:(0,Ro.jsxs)("div",{className:"dark pt-0 min-h-[80vh]",children:[(0,Ro.jsx)(ko,{className:"z-10",position:"dark-top"}),(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsx)("div",{className:"flex items-center bg-black justify-center pt-12",children:(0,Ro.jsx)("div",{className:"container",children:e})}),(0,Ro.jsx)(ko,{className:"z-10",position:"dark-bottom"})]})]})});if(t==="light"&&a==="slide")return(0,Ro.jsx)("section",{id:n||"next-section",className:"sticky top-0 light pt-0 h-screen",children:(0,Ro.jsxs)("div",{className:"sticky top-0 light pt-0 h-screen",children:[(0,Ro.jsx)(ko,{className:"z-10",position:"light-top"}),(0,Ro.jsxs)("div",{className:"relative bg-white",children:[(0,Ro.jsx)("div",{className:"flex items-center bg-white justify-center pt-12",children:(0,Ro.jsx)("div",{className:"container",children:e})}),(0,Ro.jsx)("div",{className:"h-[200px] bg-white"})]})]})});if(t==="first")return(0,Ro.jsx)("section",{id:n||"next-section",className:"",children:(0,Ro.jsx)("div",{className:"sticky top-0 light bg-background pt-6 min-h-[80vh]",children:(0,Ro.jsxs)("div",{className:"relative",children:[(0,Ro.jsx)("div",{className:"flex items-center justify-center pt-12",children:(0,Ro.jsx)("div",{className:"container",children:e})}),(0,Ro.jsx)(ko,{className:"text-black z-10",position:"bottom-right"})]})})});if(t==="light")return(0,Ro.jsx)("section",{id:n||"next-section",className:"",children:(0,Ro.jsx)("div",{className:p("sticky top-0 light bg-background min-h-[50vh]","pb-10"),children:(0,Ro.jsx)("div",{className:"flex items-center pt-8 justify-center",children:(0,Ro.jsx)("div",{className:"container",children:e})})})});if(t==="dark")return(0,Ro.jsx)("section",{id:n||"next-section",className:"",children:(0,Ro.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,Ro.jsx)(ko,{className:"text-black z-10",position:"bottom-right"}),(0,Ro.jsx)("div",{className:"flex items-center justify-center pt-12 bg-black",children:(0,Ro.jsx)("div",{className:"container",children:e})}),(0,Ro.jsx)(ko,{className:"text-accent z-10",position:"top"})]})});if(t==="last")return(0,Ro.jsx)("section",{id:n||"next-section",className:"",children:(0,Ro.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,Ro.jsx)(ko,{className:"text-black z-10",position:"bottom-right"}),(0,Ro.jsx)("div",{className:"flex items-center justify-center pb-12 bg-black min-h-[80vh]",children:(0,Ro.jsx)("div",{className:"container",children:e})})]})})};var e0=F(require("next/link"));var _x=({dynamicServiceDetail:e,style:t})=>{let a=e;return(0,Ro.jsx)("div",{className:"container",children:(0,Ro.jsxs)("div",{className:"Ro-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[(0,Ro.jsxs)("div",{className:p("Ro-full text-left prose"),children:[(0,Ro.jsx)("h2",{className:"text-primary",children:a.title}),(0,Ro.jsx)("div",{className:"",children:(0,Ro.jsx)(st,{enableGutter:!1,content:a.description,enableProse:!1,className:p("prose prose-headings:text-foreground prose-p:text-foreground")})}),(0,Ro.jsx)(x,{asChild:!0,className:"Yu-6 px-6 py-3 border border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition Ro-underline",children:(0,Ro.jsx)(e0.default,{href:`/${a.slug}`,children:"Learn more"})})]}),a.icon&&typeof a.icon=="object"&&"type"in a.icon&&"iconName"in a.icon&&(0,Ro.jsx)("div",{className:p("Ro-full h-full min-h-96 py-6 p-0 md:p-16 flex justify-center"),children:(0,Ro.jsx)("i",{className:`${a.icon.type} Ro-${a.icon.iconName} Ro-10x Ro-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})};var a0=F(require("html2canvas")),uu=require("jspdf");function Wx({type:e="slideshow",orientation:t="landscape",...a}){let o=a.page,[r,i]=(0,Tu.useState)(t),{contentWithIds:n,tableOfContents:s}=Es(o);if(e==="slideshow")return(0,Ro.jsx)("div",{className:"flex fixed flex-col Ro-screen h-screen max-h-screen overflow-auto overscroll-contain",children:(0,Ro.jsx)(yd,{blocks:n,hero:a.hero,title:a.page.title,logoImage:a.logoImage})});if(e==="print")return(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)(qx,{layout:r,changeLayout:i}),(0,Ro.jsx)(Jm,{page:a.page,layout:r,logoImage:a.logoImage})]})}var qx=({changeLayout:e,layout:t="landscape"})=>{let a=async()=>{if(t==="flow"){let n=document.getElementById("printable-content")?.innerHTML;if(n){var i=window.document.body.innerHTML;window.document.body.innerHTML=n,window.print(),window.document.body.innerHTML=i}}else await new Promise(n=>setTimeout(n,300)),window.print()},o=i=>{e&&e(i)},r=async i=>{let n=document.getElementById(i);if(!n)throw new Error(`Element with id ${i} not found`);let s=document.createElement("canvas"),l=window.devicePixelRatio;s.width=Math.max(n.clientWidth||0)*l,s.height=Math.max(n.clientHeight||0)*l+100;let c=s.getContext("2d");if(!c)throw new Error("Failed to get 2D context");let d=c.drawImage,m=Array.from(n.getElementsByTagName("img")).reduce((C,V)=>(C[V.src]=V,C),{});c.drawImage=function(...C){let[V,H,A,P,z,h,ee,S,Z]=C;if(V instanceof HTMLImageElement){let ae=m[V.src].style.objectFit||"fill",Ke=m[V.src].style.objectPosition||"center center";z=V.height,P=V.width;let _=P/z,Ie=S/Z,[De,B]=Ke.split(" ");switch(B||(B=De),ae){case"cover":if(_>Ie){let K=z*Ie,U=(P-K)/2;De==="left"&&(U=0),De==="right"&&(U=P-K),H+=U,P=K}else{let K=P/Ie,U=(z-K)/2;B==="top"&&(U=0),B==="bottom"&&(U=z-K),A+=U,z=K}break;case"contain":if(_>Ie){let K=S/_,U=(Z-K)/2;B==="top"&&(U=0),B==="bottom"&&(U=Z-K),ee+=U,Z=K}else{let K=Z*_,U=(S-K)/2;De==="left"&&(U=0),De==="right"&&(U=S-K),h+=U,S=K}break;case"fill":break}}return d.call(c,V,H,A,P,z,h,ee,S,Z)};let u=document.getElementById(i);if(!u)throw new Error(`Element with id ${i} not found`);var f=s.width,b=s.height;let v=(await(0,a0.default)(u,{canvas:s,windowHeight:b,windowWidth:f,scale:window.devicePixelRatio})).toDataURL("image/png"),I=new uu.jsPDF({}).getImageProperties(v),y=297,N=y*(I.height/I.width),T=new uu.jsPDF({unit:"mm",format:[y,N]});T.addImage(v,"PNG",0,0,y,N),T.save("print.pdf")};return(0,Ro.jsx)("div",{className:p("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:(0,Ro.jsx)("div",{className:"flex flex-row-reverse z-20 min-Ro-70 gap-4",children:(0,Ro.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-Ro-[54px] flex-col rounded-lg border",children:[(0,Ro.jsxs)("a",{onClick:a,className:"flex aspect-square min-h-[25px] Ro-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Ro.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Ro.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,Ro.jsx)("small",{className:"text-Ro font-medium",children:"Print"})]}),(0,Ro.jsx)("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),(0,Ro.jsxs)("a",{onClick:()=>o("portrait"),className:p("flex aspect-square min-h-[25px] Ro-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="portrait"?"text-accent":"hover:text-accent"),children:[(0,Ro.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:(0,Ro.jsx)("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),(0,Ro.jsx)("small",{className:"text-Ro",children:"Portrait"})]}),(0,Ro.jsxs)("a",{onClick:()=>o("landscape"),className:p("flex aspect-square min-h-[25px] Ro-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="landscape"?"text-accent":"hover:text-accent"),children:[(0,Ro.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:(0,Ro.jsx)("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),(0,Ro.jsx)("small",{className:"text-Ro",children:"Landscape"})]}),(0,Ro.jsxs)("a",{onClick:()=>o("flow"),className:p("flex aspect-square min-h-[25px] Ro-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="flow"?"text-accent":"hover:text-accent"),children:[(0,Ro.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Ro.jsx)("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),(0,Ro.jsx)("small",{className:"text-Ro",children:"Continuous"})]})]})})})};0&&(module.exports={AOSInit,AboutSection,Alert,AlertDescription,AlertTitle,AppHeader,AppSidebar,AppSidebarLeft,ApprovalRequestModal,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BlogCard,BlogDetail,BlogList,BlogListSection,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMCogeBoard,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,CapabilityMenu,Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle,Categories,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,CommentSection,ContactSection,Container,ContentBlock,ContentCard,CopilotInterface,CopyButton,CustomLink,CustomerCard,DCProjectCard,DarkTop,DashboardHeader,DashboardHero,DashboardPage,DealCard,DealDetails,DeliveryLeadSubmission,DeliveryLeadSubmissionList,DeliveryLeadSubmissionWithList,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DigitalColleagueClone,DigitalColleagueOptions,DocumentEdit,DocumentPreview,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EditableField,EpicsView,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,FileView,Filter,FlowPrintable,Footer,Form,FoundaryLayout,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,ImageSection,InfoTile,Input,Insight,KanbanBoardView,KanbanColumn,KnowledgeBrowser,KnowledgeSearch,KnowledgeView,Label,LightTop,LocationsSection,Logo,LowImpactHero,MOTD,MainPage,MainPageSection,ManagementSidebar,Mask,Media,MediaBlock,MediumImpactHero,NavigationTabs,NewCustomerForm,NewDealForm,NewsGrid,NotificationsPanel,OAuthModal,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadCard,PayloadPagination,PlanningView,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,PricingSection,Printable,ProjectCard,ProjectTeam,ProjectView,ProjectsIndexView,ProposalSummary,Publish,RelatedContent,RelatedPagesMenu,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SearchableSelect,Section,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,ServiceDetail,ServiceDetailSection,ServiceSection,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarLeft,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarRight,SidebarSeparator,SidebarTrigger,SimpleHeader,Skeleton,SlideShow,Switch,Tabs,TabsContent,TabsList,TabsTrigger,TasksView,TeamForm,TeamsIndexView,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,cn,defaultColorScheme,findCapabilityByPath,getAllCapabilities,getCapabilityByTeam,getContextualActions,getDataPart,getFileParts,getTableOfContents,getTextContent,getToolPart,hasDataPart,hasFilePart,hasToolPart,reducer,testCapabilities,toast,toggleVariants,useIsMobile,useSidebar,useToast});
|
|
47
|
+
`,className:m("pointer-events-none object-cover [transition:all_500ms_ease]","group-hover/blog:opacity-0 group-hover/blog:[filter:blur(10px)] group-hover/blog:[transform:translatex(-50%)_scalex(2)]")}),(0,Mo.jsxs)("div",{className:"relative z-10 flex h-full flex-1 Mo-full flex-col",children:[r&&(0,Mo.jsx)("div",{children:(0,Mo.jsx)("div",{className:"inline-grid Mo-full items-center justify-center rounded-5 bg-background/70 px-4 py-3 text-center font-secondary text-Mo font-bold text-foreground transition-colors group-hover/blog:bg-accent group-hover/blog:text-accent-foreground Mo:text-lg",children:(0,Mo.jsx)("time",{dateTime:r,className:"text-foreground",children:(0,Mo.jsx)("span",{className:"block",children:kd(r)})})})}),(0,Mo.jsxs)("div",{className:"rg-auto space-y-2 text-white Mo:space-y-5",children:[(0,Mo.jsx)("div",{className:"inline-flex flex-wrap items-center gap-x-5 gap-y-2",children:(0,Mo.jsx)("p",{className:n0})}),(0,Mo.jsx)("h3",{className:"text-Mo font-bold Mo-full h-28 p-6 bg-background/70 text-foreground Mo:text-lg",children:(0,Mo.jsx)($a,{"aria-label":o,href:`/${n}/${e}`||"#",className:"transition-colors duration-300 hover:text-primary",children:o})}),(0,Mo.jsx)("div",{children:(0,Mo.jsxs)($a,{href:`/${n}/${e}`||"#",className:m(n0,"gap-[.625rem] bg-background/80 px-4 py-2 mx-6 my-3 text-base font-semibold uppercase text-foreground transition-colors duration-300 hover:text-accent-foreground"),children:[(0,Mo.jsx)("span",{children:"Read article"}),(0,Mo.jsx)("span",{className:"text-accent",children:(0,Mo.jsx)(Ug.FaArrowRight,{})})]})})]})]})]})}var c0=F(require("next/image"));function sw({image:e,title:t,content:a,link:o,theme:r}){return(0,Mo.jsxs)("section",{className:"container relative",children:[(0,Mo.jsx)("div",{className:m("absolute rg-[50%] Mo-full h-full",r==="dark"?"bg-white":"bg-black")}),(0,Mo.jsx)("div",{className:m("flex flex-col Mo:flex-row items-center justify-between gap-12 px-6 Mo:px-16 py-16 bg-background",r,r==="dark"&&"bg-black clip-custom-top-r"),children:(0,Mo.jsxs)("div",{className:"Mo-full flex flex-row items-center justify-center",children:[(0,Mo.jsxs)("div",{className:m("Mo-full Mo:Mo-1/2 max-Mo-lg text-left",r==="dark"&&"rg-48"),children:[(0,Mo.jsx)("h2",{className:"text-3xl Mo:text-5xl text-primary",children:t}),(0,Mo.jsx)("p",{className:"rg-4 text-gray-700 text-lg",children:a&&(0,Mo.jsx)(st,{enableGutter:!1,content:a,enableProse:!1,className:m("prose prose-headings:text-gray-700 prose-p:text-gray-700")})}),(0,Mo.jsx)("button",{className:"rg-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full text-base hover:bg-accent hover:text-white transition",children:(0,Mo.jsx)("a",{href:o.url||"#",children:o.label||"Learn more"})})]}),(0,Mo.jsx)("div",{className:"Mo-full Mo:Mo-1/2 flex justify-center",children:e&&e.url&&(0,Mo.jsx)(c0.default,{src:e.url,alt:e.alt||`Image of ${t}`,width:400,height:400,className:"max-Mo-full"})})]})})]})}var m0=F(require("next/image"));var nw=({children:e,theme:t,style:a,neighbours:o,shape:r,image:i,id:n,continueTheme:s})=>{let l=c=>(0,Mo.jsxs)("div",{className:"select-none",children:[c&&typeof c=="object"&&(0,Mo.jsx)(sr,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:c}),c&&typeof c=="string"&&(0,Mo.jsx)("div",{children:(0,Mo.jsx)(m0.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:c})})]});if(t==="dark"&&a==="slide")return(0,Mo.jsx)("section",{id:n||"next-section",className:"sticky Mo:top-0 h-screen",children:(0,Mo.jsxs)("div",{className:"dark pt-0 min-h-[80vh]",children:[(0,Mo.jsx)(Do,{className:"z-10",position:"dark-top"}),(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsx)("div",{className:"flex items-center bg-black justify-center pt-12",children:(0,Mo.jsx)("div",{className:"container",children:e})}),(0,Mo.jsx)(Do,{className:"z-10",position:"dark-bottom"})]})]})});if(t==="light"&&a==="slide")return(0,Mo.jsx)("section",{id:n||"next-section",className:"sticky top-0 light pt-0 h-screen",children:(0,Mo.jsxs)("div",{className:"sticky top-0 light pt-0 h-screen",children:[(0,Mo.jsx)(Do,{className:"z-10",position:"light-top"}),(0,Mo.jsxs)("div",{className:"relative bg-white",children:[(0,Mo.jsx)("div",{className:"flex items-center bg-white justify-center pt-12",children:(0,Mo.jsx)("div",{className:"container",children:e})}),(0,Mo.jsx)("div",{className:"h-[200px] bg-white"})]})]})});if(t==="first")return(0,Mo.jsx)("section",{id:n||"next-section",className:"",children:(0,Mo.jsx)("div",{className:"sticky top-0 light bg-background pt-6 min-h-[80vh]",children:(0,Mo.jsxs)("div",{className:"relative",children:[(0,Mo.jsx)("div",{className:"flex items-center justify-center pt-12",children:(0,Mo.jsx)("div",{className:"container",children:e})}),(0,Mo.jsx)(Do,{className:"text-black z-10",position:"bottom-right"})]})})});if(t==="light")return(0,Mo.jsx)("section",{id:n||"next-section",className:"",children:(0,Mo.jsx)("div",{className:m("sticky top-0 light bg-background min-h-[50vh]","Fu-10"),children:(0,Mo.jsx)("div",{className:"flex items-center pt-8 justify-center",children:(0,Mo.jsx)("div",{className:"container",children:e})})})});if(t==="dark")return(0,Mo.jsx)("section",{id:n||"next-section",className:"",children:(0,Mo.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,Mo.jsx)(Do,{className:"text-black z-10",position:"bottom-right"}),(0,Mo.jsx)("div",{className:"flex items-center justify-center pt-12 bg-black",children:(0,Mo.jsx)("div",{className:"container",children:e})}),(0,Mo.jsx)(Do,{className:"text-accent z-10",position:"top"})]})});if(t==="last")return(0,Mo.jsx)("section",{id:n||"next-section",className:"",children:(0,Mo.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,Mo.jsx)(Do,{className:"text-black z-10",position:"bottom-right"}),(0,Mo.jsx)("div",{className:"flex items-center justify-center Fu-12 bg-black min-h-[80vh]",children:(0,Mo.jsx)("div",{className:"container",children:e})})]})})};var p0=F(require("next/link"));var lw=({dynamicServiceDetail:e,style:t})=>{let a=e;return(0,Mo.jsx)("div",{className:"container",children:(0,Mo.jsxs)("div",{className:"Mo-full grid grid-cols-1 Mo:grid-cols-2 gap-1 items-center justify-center",children:[(0,Mo.jsxs)("div",{className:m("Mo-full text-left prose"),children:[(0,Mo.jsx)("h2",{className:"text-primary",children:a.title}),(0,Mo.jsx)("div",{className:"",children:(0,Mo.jsx)(st,{enableGutter:!1,content:a.description,enableProse:!1,className:m("prose prose-headings:text-foreground prose-p:text-foreground")})}),(0,Mo.jsx)(x,{asChild:!0,className:"rg-6 px-6 py-3 border border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition Mo-underline",children:(0,Mo.jsx)(p0.default,{href:`/${a.slug}`,children:"Learn more"})})]}),a.icon&&typeof a.icon=="object"&&"type"in a.icon&&"iconName"in a.icon&&(0,Mo.jsx)("div",{className:m("Mo-full h-full min-h-96 py-6 p-0 Mo:p-16 flex justify-center"),children:(0,Mo.jsx)("i",{className:`${a.icon.type} Mo-${a.icon.iconName} Mo-10x Mo-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})};var g0=F(require("html2canvas")),wu=require("jspdf");function dw({type:e="slideshow",orientation:t="landscape",...a}){let o=a.page,[r,i]=(0,Fu.useState)(t),{contentWithIds:n,tableOfContents:s}=zs(o);if(e==="slideshow")return(0,Mo.jsx)("div",{className:"flex fixed flex-col Mo-screen h-screen max-h-screen overflow-auto overscroll-contain",children:(0,Mo.jsx)(wd,{blocks:n,hero:a.hero,title:a.page.title,logoImage:a.logoImage})});if(e==="print")return(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(cw,{layout:r,changeLayout:i}),(0,Mo.jsx)(ep,{page:a.page,layout:r,logoImage:a.logoImage})]})}var cw=({changeLayout:e,layout:t="landscape"})=>{let a=async()=>{if(t==="flow"){let n=document.getElementById("printable-content")?.innerHTML;if(n){var i=window.document.body.innerHTML;window.document.body.innerHTML=n,window.print(),window.document.body.innerHTML=i}}else await new Promise(n=>setTimeout(n,300)),window.print()},o=i=>{e&&e(i)},r=async i=>{let n=document.getElementById(i);if(!n)throw new Error(`Element with id ${i} not found`);let s=document.createElement("canvas"),l=window.devicePixelRatio;s.width=Math.max(n.clientWidth||0)*l,s.height=Math.max(n.clientHeight||0)*l+100;let c=s.getContext("2d");if(!c)throw new Error("Failed to get 2D context");let d=c.drawImage,p=Array.from(n.getElementsByTagName("img")).reduce((C,V)=>(C[V.src]=V,C),{});c.drawImage=function(...C){let[V,O,A,D,z,h,ee,S,Z]=C;if(V instanceof HTMLImageElement){let ae=p[V.src].style.objectFit||"fill",_e=p[V.src].style.objectPosition||"center center";z=V.height,D=V.width;let G=D/z,Ie=S/Z,[De,B]=_e.split(" ");switch(B||(B=De),ae){case"cover":if(G>Ie){let _=z*Ie,U=(D-_)/2;De==="left"&&(U=0),De==="right"&&(U=D-_),O+=U,D=_}else{let _=D/Ie,U=(z-_)/2;B==="top"&&(U=0),B==="bottom"&&(U=z-_),A+=U,z=_}break;case"contain":if(G>Ie){let _=S/G,U=(Z-_)/2;B==="top"&&(U=0),B==="bottom"&&(U=Z-_),ee+=U,Z=_}else{let _=Z*G,U=(S-_)/2;De==="left"&&(U=0),De==="right"&&(U=S-_),h+=U,S=_}break;case"fill":break}}return d.call(c,V,O,A,D,z,h,ee,S,Z)};let u=document.getElementById(i);if(!u)throw new Error(`Element with id ${i} not found`);var f=s.width,b=s.height;let v=(await(0,g0.default)(u,{canvas:s,windowHeight:b,windowWidth:f,scale:window.devicePixelRatio})).toDataURL("image/png"),I=new wu.jsPDF({}).getImageProperties(v),y=297,N=y*(I.height/I.width),T=new wu.jsPDF({unit:"mm",format:[y,N]});T.addImage(v,"PNG",0,0,y,N),T.save("print.pdf")};return(0,Mo.jsx)("div",{className:m("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:(0,Mo.jsx)("div",{className:"flex flex-row-reverse z-20 min-Mo-70 gap-4",children:(0,Mo.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-Mo-[54px] flex-col rounded-lg border",children:[(0,Mo.jsxs)("a",{onClick:a,className:"flex aspect-square min-h-[25px] Mo-12 flex-col items-center justify-center gap-1 rounded-Mo p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Mo.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,Mo.jsx)("small",{className:"text-Fu font-medium",children:"Print"})]}),(0,Mo.jsx)("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),(0,Mo.jsxs)("a",{onClick:()=>o("portrait"),className:m("flex aspect-square min-h-[25px] Mo-12 flex-col items-center justify-center gap-1 rounded-Mo p-1.5 hover:text-accent",t==="portrait"?"text-accent":"hover:text-accent"),children:[(0,Mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:(0,Mo.jsx)("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),(0,Mo.jsx)("small",{className:"text-Fu",children:"Portrait"})]}),(0,Mo.jsxs)("a",{onClick:()=>o("landscape"),className:m("flex aspect-square min-h-[25px] Mo-12 flex-col items-center justify-center gap-1 rounded-Mo p-1.5 hover:text-accent",t==="landscape"?"text-accent":"hover:text-accent"),children:[(0,Mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:(0,Mo.jsx)("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),(0,Mo.jsx)("small",{className:"text-Fu",children:"Landscape"})]}),(0,Mo.jsxs)("a",{onClick:()=>o("flow"),className:m("flex aspect-square min-h-[25px] Mo-12 flex-col items-center justify-center gap-1 rounded-Mo p-1.5 hover:text-accent",t==="flow"?"text-accent":"hover:text-accent"),children:[(0,Mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Mo.jsx)("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),(0,Mo.jsx)("small",{className:"text-Fu",children:"Continuous"})]})]})})})};0&&(module.exports={AOSInit,AboutSection,Alert,AlertDescription,AlertTitle,AppHeader,AppSidebar,AppSidebarLeft,ApprovalRequestModal,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BlogCard,BlogDetail,BlogList,BlogListSection,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMCogeBoard,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,CapabilityMenu,Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle,Categories,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,CommentSection,ContactSection,Container,ContentBlock,ContentCard,CopilotInterface,CopyButton,CustomLink,CustomerCard,DCProjectCard,DarkTop,DashboardHeader,DashboardHero,DashboardPage,DealCard,DealDetails,DeliveryLeadSubmission,DeliveryLeadSubmissionList,DeliveryLeadSubmissionWithList,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DigitalColleagueClone,DigitalColleagueOptions,DocumentEdit,DocumentPreview,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EditableField,EpicsView,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,FileView,Filter,FlowPrintable,Footer,Form,FoundaryLayout,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,ImageSection,InfoTile,Input,Insight,KanbanBoardView,KanbanColumn,KnowledgeBrowser,KnowledgeSearch,KnowledgeView,Label,LightTop,LocationsSection,Logo,LowImpactHero,MOTD,MainPage,MainPageSection,ManagementSidebar,Mask,Media,MediaBlock,MediumImpactHero,NavigationTabs,NewCustomerForm,NewDealForm,NewsGrid,NotificationsPanel,OAuthModal,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadCard,PayloadPagination,PlanningView,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,PricingSection,Printable,ProjectCard,ProjectTeam,ProjectView,ProjectsIndexView,ProposalSummary,Publish,RelatedContent,RelatedPagesMenu,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SearchableSelect,Section,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,ServiceDetail,ServiceDetailSection,ServiceSection,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarLeft,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarRight,SidebarSeparator,SidebarTrigger,SimpleHeader,Skeleton,SlideShow,Switch,Tabs,TabsContent,TabsList,TabsTrigger,TasksView,TeamForm,TeamsIndexView,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,Fu,defaultColorScheme,findCapabilityByPath,getAllCapabilities,getCapabilityByTeam,getContextualActions,getDataPart,getFileParts,getTableOfContents,getTextContent,getToolPart,hasDataPart,hasFilePart,hasToolPart,reducer,testCapabilities,toast,toggleVariants,useIsMobile,useSidebar,useToast});
|