cortex-react-components 1.53.12 → 1.53.13
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-RJGKFNZL.mjs → chunk-2A6JF3LE.mjs} +1 -1
- package/dist/{chunk-MGGXJ6E5.mjs → chunk-2GAB2DAK.mjs} +1 -1
- package/dist/{chunk-RMSUXBP2.mjs → chunk-2QVJBFPH.mjs} +1 -1
- package/dist/{chunk-EOJQ2KKP.mjs → chunk-4MQV5KBS.mjs} +1 -1
- package/dist/{chunk-6DHYRATS.mjs → chunk-4YJ3HV64.mjs} +1 -1
- package/dist/{chunk-ZARUYNTS.mjs → chunk-65KP55SA.mjs} +1 -1
- package/dist/{chunk-FGGYIUGW.mjs → chunk-6JB2YPEG.mjs} +1 -1
- package/dist/{chunk-UOXUFOIU.mjs → chunk-6ZTACGHK.mjs} +1 -1
- package/dist/{chunk-3ILIKZIF.mjs → chunk-AUBX64ZD.mjs} +1 -1
- package/dist/{chunk-7H5RA3LZ.mjs → chunk-DHLQCOMJ.mjs} +1 -1
- package/dist/chunk-DPZBRGJ3.mjs +1 -0
- package/dist/{chunk-JPFBD2KD.mjs → chunk-FCCL6W7R.mjs} +1 -1
- package/dist/chunk-G3XMLLE4.mjs +1 -0
- package/dist/{chunk-UELQEYEC.mjs → chunk-GFX7ISZC.mjs} +1 -1
- package/dist/{chunk-TCIVDDHE.mjs → chunk-GRBCNB4W.mjs} +1 -1
- package/dist/{chunk-Q3MPLEUO.mjs → chunk-HDVYZQKY.mjs} +1 -1
- package/dist/{chunk-WZLEEZ5C.mjs → chunk-IT7DSLCX.mjs} +1 -1
- package/dist/{chunk-LI37GQGD.mjs → chunk-KWHF45RW.mjs} +1 -1
- package/dist/{chunk-S7I4XJS6.mjs → chunk-LLJZRF3C.mjs} +1 -1
- package/dist/{chunk-XXTN5HMN.mjs → chunk-MGS3DQ22.mjs} +1 -1
- package/dist/{chunk-SQTEG7N4.mjs → chunk-NFLAGBIE.mjs} +1 -1
- package/dist/{chunk-ZMTWB7GE.mjs → chunk-PJSJJVIS.mjs} +1 -1
- package/dist/{chunk-UBPBLCZE.mjs → chunk-QQXJS6KW.mjs} +1 -1
- package/dist/{chunk-LCBC4XAC.mjs → chunk-QSIJJSKA.mjs} +1 -1
- package/dist/{chunk-Y2SNB25S.mjs → chunk-S24Q6P5C.mjs} +1 -1
- package/dist/{chunk-NMVLT3F5.mjs → chunk-ST57SBGX.mjs} +1 -1
- package/dist/{chunk-R7CSR27B.mjs → chunk-TATBOD3E.mjs} +1 -1
- package/dist/{chunk-T5H436I7.mjs → chunk-TUFJTJCO.mjs} +1 -1
- package/dist/chunk-TXB5Y6PG.mjs +4 -0
- package/dist/{chunk-CF7XDPTT.mjs → chunk-VCC562W2.mjs} +1 -1
- package/dist/{chunk-GSKQEJUW.mjs → chunk-VSNDROOR.mjs} +1 -1
- package/dist/{chunk-JGFNFHZM.mjs → chunk-WV4NLWRU.mjs} +1 -1
- package/dist/{chunk-5AAERLK4.mjs → chunk-XDFXEM2U.mjs} +1 -1
- package/dist/{chunk-WP5GREDV.mjs → chunk-XRSFJHOZ.mjs} +1 -1
- package/dist/{chunk-F572VPA4.mjs → chunk-YEPCYWNC.mjs} +1 -1
- package/dist/{chunk-HER7J6HM.mjs → chunk-ZIWHUQ4D.mjs} +1 -1
- package/dist/{chunk-SYRLP2F4.mjs → chunk-ZODTQZTN.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CallToAction.stories.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/Content.stories.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/ContentCard.stories.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.stories.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.stories.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/FeatureGrid.stories.mjs +1 -1
- package/dist/components/Layouts/NewsList.js +1 -1
- package/dist/components/Layouts/NewsList.mjs +1 -1
- package/dist/components/Layouts/NewsList.stories.js +1 -1
- package/dist/components/Layouts/NewsList.stories.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/Print.stories.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/Filter.js +1 -1
- package/dist/components/Menus/Filter.mjs +1 -1
- package/dist/components/Menus/Filter.stories.js +1 -1
- package/dist/components/Menus/Filter.stories.mjs +1 -1
- package/dist/components/Menus/Pagination.js +1 -1
- package/dist/components/Menus/Pagination.mjs +1 -1
- package/dist/components/Menus/Pagination.stories.js +1 -1
- package/dist/components/Menus/Pagination.stories.mjs +1 -1
- package/dist/components/Menus/index.js +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/Card/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/RichText.stories.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +8 -8
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Blog.stories.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/Documentation.stories.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/IndexPage.stories.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/Intranet.stories.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/LandingPage.stories.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Page.stories.mjs +1 -1
- package/dist/pages/Printable.stories.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Publish.stories.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/pages/Website.stories.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/AboutSection.stories.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogDetail.stories.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogList.stories.mjs +1 -1
- package/dist/sections/BlogListSection.js +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/BlogListSection.stories.js +1 -1
- package/dist/sections/BlogListSection.stories.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/ContactSection.stories.mjs +1 -1
- package/dist/sections/ImageSection.stories.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PageSections.stories.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/PricingSection.stories.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceDetailSection.stories.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/ServiceSection.stories.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.js +3 -3
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-KJ2C7CBU.mjs +0 -4
- package/dist/chunk-VV7TUGRV.mjs +0 -1
- package/dist/chunk-XYLYPBZO.mjs +0 -1
package/dist/components/index.js
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
dark bg-background text-primary`,children:[(0,Je.jsxs)("div",{className:"flex px-6 items-center space-Je-2",children:[e&&(0,Je.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Je.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Je.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]}),Ao=({title:e})=>(0,Je.jsx)("header",{className:"absolute top-0 left-0 Je-full py-4 px-8 flex justify-between items-center transition-colors duration-300 dark bg-background text-foreground",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsx)("span",{className:"container text-4xl px-6",children:e})})}),Lo=e=>{var r,s;let{title:t,hero:a,logoImage:o}=e;return console.log("TitleSlide",a),(0,Je.jsxs)("div",{className:"relative Je-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[(0,Je.jsx)("div",{className:"absolute inset-0",children:(0,Je.jsx)(gi.default,{src:a.media&&a.media.url?a.media.url:"/hero.png",alt:"Background",width:a.media&&a.media.width&&(r=a.media.width)!=null?r:1920,height:a.media&&a.media.height&&(s=a.media.height)!=null?s:1080,style:{objectFit:"cover"},className:"opacity-80 h-full dark:opacity-60"})}),(0,Je.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,Je.jsx)("div",{className:"h-24",children:(0,Je.jsx)(gi.default,{src:o.src,alt:"Company logo",className:"h-full Je-full object-contain",width:192,height:96})})}),(0,Je.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,Je.jsxs)("div",{className:"relative pl-24 z-10 max-Je-3xl",children:[(0,Je.jsx)("p",{className:"text-lg font-medium pt-48 text-accent mb-2",children:t}),a.richText&&(0,Je.jsx)(ae,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var ql=e=>{let[t,a]=(0,Xo.useState)(0),{blocks:o,hero:r,logoImage:s}=e,i=o&&Array.isArray(o)&&o.length>0,c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],p=u=>{a(u)},d=()=>{a(u=>(u+1)%c.length)},m=()=>{a(u=>(u-1+c.length)%c.length)},g=(0,Xo.useCallback)(((u,v)=>{let P;return(..._)=>{clearTimeout(P),P=setTimeout(()=>u(..._),v)}})(u=>{u.deltaY>0?d():m()},300),[]),b=u=>{u.key==="ArrowDown"?d():u.key==="ArrowUp"&&m()};return(0,Xo.useEffect)(()=>(window.addEventListener("wheel",g),window.addEventListener("keydown",b),()=>{window.removeEventListener("wheel",g),window.removeEventListener("keydown",b)}),[]),(0,Je.jsxs)("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[(0,Je.jsx)("div",{className:"fixed left-0 top-0 flex h-screen Je-9 z-10 flex-col items-center justify-center bg-gray-900",children:i&&c.map((u,v)=>(0,Je.jsx)("button",{className:`group relative flex items-center justify-center my-2 h-16 Je-4 rounded-full transition-all hover:bg-accent duration-300 ${t===v?"bg-accent":"bg-gray-600"}`,onClick:()=>p(v),children:(0,Je.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-Je-1/2 translate-Je-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-Je-2 transition-all duration-300",children:u.blockName})},u.id))}),(0,Je.jsx)(Ja.AnimatePresence,{children:c.map((u,v)=>(0,Je.jsx)("div",{id:`slide-${v}`,className:"print-section",children:(0,Je.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
|
|
11
11
|
${v===t?"opacity-100":"opacity-0"}
|
|
12
12
|
Je-full h-full bg-cover bg-center`,children:v===0?(0,Je.jsx)(Lo,{hero:r,title:e.title,logoImage:s}):(0,Je.jsxs)(Je.Fragment,{children:[u.blockName&&(0,Je.jsx)(Ao,{title:u.blockName}),(0,Je.jsx)(Ma,{blocks:[u],fill:!0}),(0,Je.jsx)(Yl,{logoImage:s})]})})},v))}),(0,Je.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,Je.jsx)(wm,{})})]})},wm=()=>(0,Je.jsx)(Ja.AnimatePresence,{children:(0,Je.jsx)(Ja.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:l("Je-fit min-h-[50px] min-Je-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,Je.jsx)(Ja.motion.div,{initial:{Je:0},animate:{Je:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:l("Je-[12px] h-[12px] rounded-full","bg-accent")})})});var Kl=h(require("next/link")),Jl=h(require("next/image"));function Ql({blogs:e,width:t=3}){return(0,Je.jsx)("div",{className:"Je-full max-Je-7xl mx-auto px-4 py-8",children:(0,Je.jsx)("div",{className:`grid Je:grid-cols-2 lg:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>{var r;return(0,Je.jsx)(Kl.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,Je.jsxs)("div",{className:"relative size-full",children:[(0,Je.jsx)(Jl.default,{src:((r=a.image)==null?void 0:r.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,Je.jsxs)("div",{className:"absolute inset-0 px-4 pb-2 bg-gradient-Ol-t from-card Ol-transparrent flex flex-col justify-end",children:[(0,Je.jsxs)("div",{className:"text-sm text-card-foreground mb-2",children:[a.authors&&a.authors.map(s=>`${s.name} \xB7 `),a.publishedAt&&new Date(a.publishedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long"})]}),(0,Je.jsx)("h2",{className:"text-xl font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o)})})})}function Zl({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:r,images:s,raisedAmount:i,companiesCount:n,dealsClosed:c,leadsGenerated:p}){return(0,Je.jsx)("div",{className:"overflow-hidden bg-white py-24 sm:py-32",children:(0,Je.jsxs)("div",{className:"mx-auto max-Je-2xl px-6 lg:max-Je-7xl lg:px-8",children:[(0,Je.jsxs)("div",{className:"max-Je-4xl",children:[(0,Je.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,Je.jsx)("h1",{className:"mt-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:text-5xl",children:e}),(0,Je.jsx)("p",{className:"mt-6 text-balance text-xl/8 text-gray-700",children:a})]}),(0,Je.jsxs)("section",{className:"mt-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-Je-8 lg:gap-Je-16",children:[(0,Je.jsxs)("div",{className:"lg:Je-8",children:[(0,Je.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,Je.jsx)("p",{className:"mt-6 text-base/7 text-gray-600",children:r})]}),(0,Je.jsx)("div",{className:"pt-16 lg:row-span-2 lg:-mr-16 xl:mr-auto",children:(0,Je.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 xl:gap-8",children:s.map((d,m)=>(0,Je.jsx)("div",{className:"aspect-square overflow-hidden rounded-xl shadow-xl outline-1 -outline-offset-1 outline-black/10",children:(0,Je.jsx)("img",{alt:"",src:d,className:"block size-full object-cover"})},m))})}),(0,Je.jsxs)("div",{className:"max-lg:mt-16 lg:col-span-1",children:[(0,Je.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,Je.jsx)("hr",{className:"mt-6 border-t border-gray-200"}),(0,Je.jsxs)("dl",{className:"mt-6 grid grid-cols-1 gap-Je-8 gap-Je-4 sm:grid-cols-2",children:[(0,Je.jsxs)("div",{className:"flex flex-col gap-Je-2 border-b border-dotted border-gray-200 pb-4",children:[(0,Je.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Raised"}),(0,Je.jsxs)("Rn",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",i]})]}),(0,Je.jsxs)("div",{className:"flex flex-col gap-Je-2 border-b border-dotted border-gray-200 pb-4",children:[(0,Je.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Companies"}),(0,Je.jsxs)("Rn",{className:"order-first text-6xl font-semibold tracking-tight",children:[n,"Je"]})]}),(0,Je.jsxs)("div",{className:"flex flex-col gap-Je-2 max-sm:border-b max-sm:border-dotted max-sm:border-gray-200 max-sm:pb-4",children:[(0,Je.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Deals Closed"}),(0,Je.jsxs)("Rn",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"M"]})]}),(0,Je.jsxs)("div",{className:"flex flex-col gap-Je-2",children:[(0,Je.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Leads Generated"}),(0,Je.jsxs)("Rn",{className:"order-first text-6xl font-semibold tracking-tight",children:[p,"M"]})]})]})]})]})]})})}function Cm(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 pa=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)},Pm=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,Je.jsx)(ed,{page:e,layout:t,logoImage:a}):(0,Je.jsx)(td,{page:e,layout:t,logoImage:a}),ed=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=Ur(e),r=(0,Xo.useRef)(null),s=(0,Xo.useRef)(null),i=(0,Xo.useRef)(new ay.Previewer),n={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,Xo.useEffect)(()=>{let d=document.getElementById("printable-content");if(d){console.log("Width: "+d.offsetWidth+"px"),console.log("Width in mm: "+pa(d.offsetWidth)+"mm"),console.log("Height: "+d.offsetHeight+"px"),console.log("Height in mm: "+pa(d.offsetHeight)+"mm");let m=document.createElement("style");return m.textContent=`@page { size: ${pa(d.offsetWidth)}mm ${pa(d.offsetHeight)}mm ; margin: 0mm; width: ${pa(d.offsetWidth)}mm }; .container : { max-width: ${pa(d.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(m),()=>{document.head.removeChild(m)}}},[t]);let c=(0,Xo.useCallback)(()=>{if(!s.current)return;s.current&&(s.current.innerHTML="");let d=document.getElementById("printable-content");d&&i.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${pa(d.offsetWidth)}mm ${pa(d.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],s.current).catch(m=>console.error("Paged.js error:",m))},[t]);(0,Xo.useEffect)(()=>{i.current=new ay.Previewer},[c,t]);let p=[n,...o];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)("div",{className:"Je-[1123px] print:Je-[1123px]",children:(0,Je.jsxs)("div",{id:"printable-content",ref:r,children:[p.map((d,m)=>(0,Je.jsx)(Je.Fragment,{children:m===0?(0,Je.jsx)("section",{className:"title-page Je-full h-full",children:(0,Je.jsx)(Lo,{hero:e.hero,title:e.title})},m):(0,Je.jsxs)("section",{className:"normal-page overflow-hidden",children:[d.blockName&&(0,Je.jsx)(Ao,{title:d.blockName}),(0,Je.jsx)(Ma,{blocks:[d],fill:!0})]},m)})),(0,Je.jsx)("section",{className:"normal-page",children:(0,Je.jsxs)("div",{className:`Je-full py-2 px-8 flex justify-between items-center
|
|
13
|
-
dark bg-background text-primary`,children:[(0,Je.jsxs)("div",{className:"flex px-6 items-center space-Je-2",children:[a&&(0,Je.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Je.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Je.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Je.jsx)("div",{ref:s,className:"preview-container"})]})},td=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=Ur(e),o=(0,Xo.useRef)(null),r=(0,Xo.useRef)(null),s=(0,Xo.useRef)(new ay.Previewer),[i,n]=(0,Xo.useState)(0),p=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,Xo.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),s.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(m=>n(m.pageCount)).catch(m=>console.error("Paged.js error:",m)))},[t]);return(0,Xo.useEffect)(()=>{s.current=new ay.Previewer,d()},[d,t]),(0,Xo.useEffect)(()=>{let m=document.createElement("style");return m.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(m),()=>{document.head.removeChild(m)}},[]),(0,Je.jsxs)("div",{className:"pagedjs-container",children:[(0,Je.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:p.map((m,f)=>{var g,b;return(0,Je.jsx)(Je.Fragment,{children:f===0?(0,Je.jsx)("section",{className:"pagedjs-section title-page Je-full h-full",children:(0,Je.jsx)(Lo,{hero:e.hero,title:e.title})},f):(0,Je.jsxs)("section",{className:l("pagedjs-section normal-page h-[699px]",`h-[${Cm("185mm")}px]`,((b=(g=m.theme)==null?void 0:g.settings)==null?void 0:b.theme)==="dark"?"dark":"light"),children:[m.blockName&&(0,Je.jsx)(Ao,{title:m.blockName}),(0,Je.jsx)(Ma,{blocks:[m],fill:!0})]},f)})})}),(0,Je.jsx)("div",{ref:o,className:"preview-container"})]})};var bi=h(require("clsx"));function Rm({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:i,loading:n=!1,LinkComponent:c,...p}){let m=c?f=>(0,Je.jsx)(c,{...f}):i?({href:f,children:g,...b})=>(0,Je.jsx)("button",{onClick:()=>i&&i(f),className:"flex items-center justify-start Je-full text-sm text-left px-4 py-2",...b,children:g}):f=>(0,Je.jsx)("a",{...f});return(0,Je.jsxs)(ba,{...p,variant:"inset",children:[(0,Je.jsx)(ya,{children:(0,Je.jsx)(Fe,{children:(0,Je.jsx)(Ce,{children:n?(0,Je.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Je.jsx)(se,{className:"bg-gray-200 my-2 Je-full h-7"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 my-2 h-5"})]}):(0,Je.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Je.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Je.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),n&&(0,Je.jsxs)(Kt,{children:[(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"})]}),(0,Je.jsxs)(Kt,{children:[e&&!n&&e.map((f,g)=>(0,Je.jsx)(Sm,{subNav:f,pathName:r,Link:m},g)),(0,Je.jsx)(Qe,{className:"mt-auto",children:(0,Je.jsx)(ct,{children:(0,Je.jsx)(Fe,{children:t&&!n&&t.map(f=>(0,Je.jsx)(Ce,{children:(0,Je.jsx)(Ze,{asChild:!0,size:"sm",children:(0,Je.jsxs)(m,{href:f.url||"",children:[f.icon&&(0,Je.jsx)(f.icon,{}),(0,Je.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,Je.jsx)(va,{})]})}function Sm({subNav:e,pathName:t,Link:a}){var s,i;let o=e,r=!1;return o.links&&o.links.map(n=>{n.url===t&&(r=!0)}),(0,Je.jsx)(kt,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsx)(Qe,{className:"py-0",children:(0,Je.jsx)(Fe,{children:(0,Je.jsx)(kt,{asChild:!0,defaultOpen:o.isActive,children:(0,Je.jsxs)(Ce,{children:[(0,Je.jsx)(Ze,{asChild:!0,tooltip:o.label,className:(0,bi.default)(r&&"font-bold text-accent"),children:(0,Je.jsxs)(a,{href:o.url,children:[o.icon&&(0,Je.jsx)(o.icon,{}),(0,Je.jsx)("span",{children:o.label})]})}),(s=o.links)!=null&&s.length?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Xt,{asChild:!0,children:(0,Je.jsxs)(fo,{className:"data-[state=open]:rotate-90",children:[(0,Je.jsx)(Rn.ChevronRight,{}),(0,Je.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Je.jsx)(Yt,{children:(0,Je.jsx)(Jt,{children:(i=o.links)==null?void 0:i.map(n=>(0,Je.jsx)(Qt,{children:(0,Je.jsx)(Zt,{asChild:!0,className:(0,bi.default)(n.url===t&&"font-bold text-accent"),children:(0,Je.jsx)(a,{href:n.url,children:(0,Je.jsx)("span",{children:n.label})})})},n.label))})})]}):null]})},o.label)})})})}var od=h(require("clsx"));var km=()=>(0,Je.jsx)(Pe,{iconName:"github",size:"10x"});function Tm({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:i,onPrintDocument:n,onGithubClick:c,onNavClick:p,LinkComponent:d,...m}){let b=d?u=>(0,Je.jsx)(d,{...u}):p?({item:u,children:v,...P})=>(0,Je.jsx)("button",{onClick:()=>p&&p(u),className:"flex items-center justify-start Je-full text-sm text-left px-4 py-2",...P,children:v}):u=>(0,Je.jsx)("a",{href:u.href,...u});return(0,Je.jsxs)(ba,{side:"right",variant:"inset",...m,children:[(0,Je.jsxs)(ya,{className:"border-b border-sidebar-border",children:[(0,Je.jsxs)(Fe,{className:"flex-row space-Je-1",children:[(0,Je.jsx)(Ce,{children:(0,Je.jsxs)(Ze,{onClick:s,children:[(0,Je.jsx)(Rn.FilePlus,{})," ",(0,Je.jsx)("span",{children:"Add Document"})]})}),c&&(0,Je.jsx)(Ce,{children:(0,Je.jsx)(Ze,{onClick:c,tooltip:"Open in GitHub",children:(0,Je.jsx)(km,{})})})]}),(0,Je.jsxs)(Fe,{className:"flex-row space-Je-1",children:[(0,Je.jsx)(Ce,{className:"Je-5/12",children:(0,Je.jsxs)(Ze,{onClick:()=>i(),variant:r?"outline":"default",className:(0,od.default)(r&&"text-accent"),children:[(0,Je.jsx)(Rn.Edit,{})," ",(0,Je.jsx)("span",{children:"Edit"})]})}),(0,Je.jsx)(Ce,{className:"Je-5/12",children:(0,Je.jsxs)(Ze,{onClick:n,children:[(0,Je.jsx)(Rn.Printer,{})," ",(0,Je.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(kt,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Dt,{asChild:!0,children:(0,Je.jsxs)(Xt,{children:["Editor Controls",(0,Je.jsx)(Rn.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(ct,{children:(0,Je.jsx)(Yt,{children:a})})]})}),(0,Je.jsx)(uo,{className:"mx-0"})]}),(0,Je.jsxs)(Kt,{className:"overflow-auto",children:[o&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Dt,{children:"Related Content"}),(0,Je.jsx)(ct,{children:(0,Je.jsx)(Fe,{children:Array.from({length:3}).map((u,v)=>(0,Je.jsx)(Ce,{children:(0,Je.jsx)(se,{className:"bg-gray-200 Je-full h-10"})},v))})})]}),(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Dt,{children:"Table of Contents"}),(0,Je.jsx)(ct,{children:(0,Je.jsx)(Fe,{children:Array.from({length:3}).map((u,v)=>(0,Je.jsx)(Ce,{children:(0,Je.jsx)(se,{className:"bg-gray-200 Je-full h-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Je.jsx)(kt,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Dt,{asChild:!0,children:(0,Je.jsxs)(Xt,{children:["Related Content",(0,Je.jsx)(Rn.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(ct,{children:(0,Je.jsx)(Yt,{children:(0,Je.jsx)(Fe,{children:e&&Object.keys(e).map(u=>(0,Je.jsxs)(Ce,{children:[(0,Je.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",u.charAt(0).toUpperCase()+u.slice(1)]}),u&&e[u]&&(0,Je.jsx)(Jt,{children:e[u].map(v=>(0,Je.jsx)(Qt,{children:(0,Je.jsx)(Zt,{asChild:!0,isActive:!1,size:"sm",children:(0,Je.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center Je-full text-xs",children:[(0,Je.jsx)("span",{children:v.label}),v.type==="note"&&(0,Je.jsx)(Rn.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,Je.jsx)(Pe,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},u))})})})]})}),t&&!o&&(0,Je.jsx)(kt,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Dt,{asChild:!0,children:(0,Je.jsxs)(Xt,{children:["Table of Contents",(0,Je.jsx)(Rn.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(ct,{children:(0,Je.jsx)(Yt,{children:(0,Je.jsx)(Fe,{children:t.map(u=>{var v;return(0,Je.jsxs)(Ce,{children:[(0,Je.jsx)(Ze,{asChild:!0,children:(0,Je.jsx)("a",{href:`#${u.url}`,className:"text-xs",children:u.title})}),(v=u.items)!=null&&v.length?(0,Je.jsx)(Jt,{children:u.items.map(P=>(0,Je.jsx)(Qt,{children:(0,Je.jsx)(Zt,{asChild:!0,isActive:P.isActive,size:"sm",children:(0,Je.jsx)("a",{href:`#${P.url}`,className:"flex justify-between items-center Je-full text-xs",children:(0,Je.jsx)("span",{children:P.title})})})},P.title))}):null]},u.title)})})})})]})})]}),(0,Je.jsx)(va,{})]})}var sd=h(require("next/image"));function Dm({title:e,members:t}){return(0,Je.jsx)(xe,{className:"mb-6",children:(0,Je.jsxs)("div",{className:"p-6",children:[(0,Je.jsxs)("div",{className:"flex items-center mb-4",children:[(0,Je.jsx)(Rn.Users,{className:"Je-6 h-6 text-accent mr-2"}),(0,Je.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:e})]}),(0,Je.jsx)("div",{className:"space-Je-4",children:t.map((a,o)=>(0,Je.jsxs)("div",{className:"flex items-center space-Je-4",children:[(0,Je.jsx)("div",{className:"relative Je-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,Je.jsx)(sd.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Je.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var id=h(require("next/link"));var Mm=({links:e,title:t="Related Content"})=>(0,Je.jsxs)(xe,{children:[(0,Je.jsx)(Oe,{children:(0,Je.jsx)(_e,{className:"text-accent",children:t})}),(0,Je.jsx)(Re,{children:(0,Je.jsx)("nav",{className:"flex flex-col space-Je-2",children:e.map((a,o)=>(0,Je.jsxs)(id.default,{href:a.url,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.title,a.url.startsWith("http")&&(0,Je.jsx)(Rn.ExternalLink,{className:"ml-1 h-3 Je-3"})]},o))})})]});var yi=l("grid h-[45px] Je-[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 Im({pages:e}){let t=(0,Ol.useSearchParams)(),a=(0,Ol.usePathname)(),{replace:o}=(0,Ol.useRouter)(),{totalPages:r,page:s}=e,[i,n]=(0,Xo.useState)({start:s>3?s-3:1,end:s+2}),c=m=>{m==="left"&&i.start>1?n(f=>({start:f.start-1,end:f.end-1})):m==="right"&&i.end<r&&n(f=>({start:f.start+1,end:f.end+1}))};function p(m){let f=new URLSearchParams(t);m?f.set("page",m):f.delete("page"),o(`${a}?${f.toString()}`)}if(r<=1)return null;let d=[];for(let m=i.start;m<=i.end;m++)d.push(m);return(0,Je.jsx)("div",{className:"mt-12",children:(0,Je.jsxs)("Xo",{className:"flex flex-wrap items-center justify-center gap-3 Je:gap-5","aria-label":"pagination",children:[i.start>1&&(0,Je.jsx)("li",{children:(0,Je.jsx)("button",{className:l(yi,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>c("left"),children:(0,Je.jsx)(Nr.FaArrowLeft,{})})}),d.map((m,f)=>(0,Je.jsx)("li",{children:(0,Je.jsx)("a",{className:l(yi,m===s?"border-accent bg-accent text-accent-foreground":""),href:"#","aria-label":`pagination button ${m}`,role:"button",onClick:g=>{g.preventDefault(),p(m.toString())},children:m})},f)),i.end<r&&(0,Je.jsx)("li",{children:(0,Je.jsx)("button",{className:l(yi,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>c("right"),children:(0,Je.jsx)(Nr.FaArrowRight,{})})})]})})}var zy=l("transition-colors duration-400 hover:text-primary ease-in-out");function Am({title:e,links:t}){let a=(0,Ol.useSearchParams)(),o=(0,Ol.usePathname)(),{replace:r}=(0,Ol.useRouter)();function s(i){let n=new URLSearchParams(a);i?n.set("category",i):n.delete("category"),r(`${o}?${n.toString()}`)}return(0,Je.jsxs)(xe,{children:[(0,Je.jsx)(Oe,{children:(0,Je.jsx)(_e,{className:"text-accent",children:e&&e})}),(0,Je.jsx)(Re,{children:t&&t.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Je.jsx)("Xo",{className:"grid gap-2.5 ",children:t.map((i,n)=>(0,Je.jsxs)("li",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:c=>{c.preventDefault(),s(i.href)},children:[i.label,(0,Je.jsx)(Rn.ExternalLink,{className:"ml-1 h-3 Je-3"})]},n))})})})]})}function Lm({types:e}){let[t,a]=(0,Xo.useState)(e&&e[0].href),o=(0,Ol.useSearchParams)(),r=(0,Ol.usePathname)(),{replace:s}=(0,Ol.useRouter)();function i(n){let c=new URLSearchParams(o);n?c.set("type",n):c.delete("type"),a(n),s(`${r}?${c.toString()}`)}return(0,Je.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-Je-auto pb-4 mb-6",children:e&&e.map((n,c)=>(0,Je.jsx)(T,{variant:n.href===t?"default":"ghost",className:l("rounded-full whitespace-nowrap hover:bg-accent hover:text-accent-foreground",n.href===t&&"bg-accent text-accent-foreground"),onClick:()=>i(n.href),children:n.label},c))})}var fd=h(require("next/image"));function Eo({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=l("container",t&&"full-width",a&&"no-padding",o);return(0,Je.jsx)("div",{className:r,children:e})}var pd=require("next-themes");function Bm({children:e,...t}){return(0,Je.jsx)(pd.ThemeProvider,{...t,children:e})}var Aa=({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,Je.jsx)("div",{className:"Je-full h-[1240px] z-20",children:(0,Je.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:l(t,"absolute -bottom-[2px] flex"),transform:a[0],children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0","stroke-width":"2"})]})}),(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Je.jsx)("rect",{Je:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,Je.jsx)("div",{className:"Je-full h-[70px] Je:h-[332px] z-20 ",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:l(t,"absolute "),style:{fontSize:0,float:"left"},transform:a[1],children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-top")return(0,Je.jsx)("div",{className:"Je-full h-[70px] Je:h-[332px] z-20 content-end block overflow-hidden",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:l(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.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,Je.jsx)("div",{className:"Je-full min-h-[70px] Je:min-h-[350px] z-20 content-start block overflow-hidden bg-white",children:(0,Je.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:l(t,"Je-full block overflow-hidden"),transform:a[1],children:(0,Je.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,Je.jsx)("div",{className:"Je-full min-h-[70px] Je:min-h-[350px] z-20 content-end block overflow-hidden",children:(0,Je.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:l(t,"Je-full block overflow-hidden"),transform:a[3],children:(0,Je.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,Je.jsx)("div",{className:"Je-full min-h-[70px] Je:min-h-[350px] z-20 content-end block overflow-hidden",children:(0,Je.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:l(t,"Je-full block overflow-hidden"),transform:e==="bottom-left"?a[3]:a[2],children:(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},Em=({className:e})=>(0,Je.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:l(e,"absolute Je-full h-full"),children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,Je.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,Je.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var hi=({links:e,media:t,children:a,richText:o})=>(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,Je.jsxs)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,Je.jsx)(ae,{className:"max-Je-none mb-6 ml-0 prose prose-h1:text-5xl prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,Je.jsx)("Xo",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,Je.jsx)("li",{children:(0,Je.jsx)(xt,{...r})},s))})]}),(0,Je.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,Je.jsx)(Ht,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Je.jsx)("div",{children:(0,Je.jsx)(fd.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Je.jsx)("span",{className:"absolute inset-0 bg-gradient-Ol-b from-white dark:from-black"})]}),(0,Je.jsx)(Aa,{className:"text-black z-10",position:"header"})]})});var xi=h(require("next/image"));var Hm=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,Je.jsx)(xi.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:s||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,Je.jsx)("div",{children:(0,Je.jsx)(xi.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},Ni=({links:e,media:t,children:a,richText:o})=>(0,Je.jsxs)("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&(0,Je.jsx)(Hm,{media:t}),(0,Je.jsx)("div",{className:"mx-0 min-Je-full relative z-9",children:(0,Je.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Je.jsx)(ae,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var wi=({children:e,richText:t})=>(0,Je.jsx)("div",{className:"min-Je-full py-10 bg-muted mt-24",children:(0,Je.jsx)("div",{className:"container",children:e||t&&(0,Je.jsx)(ae,{content:t,enableGutter:!1})})});var yd=h(require("react")),vd=h(require("next/image"));var gd=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),s=o+1<10?`0${o+1}`:o+1,i=r<10?`0${r}`:r,n=a.getFullYear();return`${i}/${s}/${n}`};var bd=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}${(i=>{if(i>3&&i<21)return"th";switch(i%10){case 1:return"Rn";case 2:return"Rn";case 3:return"Rn";default:return"th"}})(o)} ${r}`};var zm=({post:e})=>{var i;let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,Je.jsxs)("div",{className:"relative grid pt-24",children:[(0,Je.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,Je.jsxs)("div",{className:"container mx-auto",children:[(0,Je.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,Je.jsxs)("div",{className:"flex flex-col gap-4 Je:flex-row Je:gap-16 ",children:[o&&o.length>0&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Je.jsx)("p",{children:o.map((n,c)=>(0,Je.jsxs)(yd.default.Fragment,{children:[n.name,c<o.length-2&&", ",c===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),r&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Je.jsx)("time",{dateTime:r,children:gd(r)})]}),t&&t.length>0&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Je.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,c)=>typeof n=="object"&&n!==null&&(0,Je.jsx)(at,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||c))})]})]})]})}),(0,Je.jsxs)("div",{className:"absolute inset-0 Je-full h-full",children:[(0,Je.jsx)(vd.default,{className:"object-cover",alt:`Cover image for ${s}`,src:((i=a==null?void 0:a.image)==null?void 0:i.url)||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,Je.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 Je-full h-1/2 bg-gradient-Ol-t from-background dark:from-black Ol-transparent"})]})]})};var Tr=require("@heroicons/react/20/solid");var kr=h(require("next/image"));var Ci=({title:e,image:t})=>(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,Je.jsx)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-start",children:(0,Je.jsx)("h1",{className:"text-5xl Je:text-6xl",children:e})}),(0,Je.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,Je.jsx)(kr.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,Je.jsx)("div",{children:(0,Je.jsx)(kr.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Je.jsx)("span",{className:"absolute inset-0 bg-gradient-Ol-b from-white dark:from-black"})]}),(0,Je.jsx)(Aa,{className:"text-black z-10",position:"header"})]})});function Fm({title:e,breadcrumbItems:t,image:a}){return(0,Je.jsxs)("section",{className:"-z-10 relative flex min-h-[250px] pt-auto items-end",children:[(0,Je.jsx)("div",{className:"absolute inset-0 z-0",children:a&&(0,Je.jsx)(kr.default,{priority:!0,src:a.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"})}),(0,Je.jsx)("span",{className:"absolute inset-0 bg-gradient-1 from-background/0 Ol-background dark:from-background/0 dark:Ol-background"}),(0,Je.jsx)(Eo,{children:(0,Je.jsxs)("div",{className:"relative z-10 flex flex-wrap items-center justify-between gap-Je-20 gap-Je-8 text-accent-900 dark:text-white lg:pt-[40px] pb-5",children:[(0,Je.jsx)("h1",{className:"font-secondary text-5xl font-bold lg:Je-1/2",children:e}),t&&t.length>0&&(0,Je.jsx)(Pi,{breadcrumbItems:t})]})})]})}var Om={highImpact:hi,lowImpact:wi,mediumImpact:Ni,sectionHero:Ci},_m=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=Om[t];return a?(0,Je.jsx)(a,{...e}):null};function Pi({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,Je.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,Je.jsxs)("Je",{role:"list",className:"flex items-center space-Je-4",children:[(0,Je.jsx)("li",{children:(0,Je.jsx)("div",{children:(0,Je.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,Je.jsx)(Tr.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,Je.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,Je.jsx)("li",{children:(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(Tr.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,Je.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,Je.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,Je.jsx)(Je.Fragment,{})}var qe=require("@headlessui/react"),Ir=require("@heroicons/react/24/outline");var Gm=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Je.jsx)("a",{href:o,className:"flex items-center gap-Je-1 text-sm text-foreground group",children:(0,Je.jsxs)("span",{className:"relative",children:[e,(0,Je.jsx)("span",{className:"absolute -bottom-1 left-1/2 Je-1/2 h-0.5 bg-accent transform -translate-Je-1/2 scale-Je-0 transition-transform duration-300 ease-in-out group-hover:scale-Je-100"})]})}):(0,Je.jsxs)(qe.Popover,{children:[(0,Je.jsxs)(qe.PopoverButton,{className:"flex items-center gap-Je-1 text-sm/6 text-foreground outline-none group",children:[(0,Je.jsxs)("span",{className:"relative",children:[e,(0,Je.jsx)("span",{className:"absolute bottom-0 left-1/2 Je-1/2 h-0.5 bg-accent transform -translate-Je-1/2 scale-Je-0 transition-transform duration-300 ease-in-out group-hover:scale-Je-100"})]}),(0,Je.jsx)(Tr.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 Je-5 flex-none text-accent"})]}),(0,Je.jsxs)(qe.PopoverPanel,{transition:!0,className:"absolute inset-Je-0 top-0 -z-10 bg-popover mt-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-Je-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,Je.jsx)("div",{className:"mx-auto grid max-Je-7xl grid-cols-4 gap-Je-4 px-6 py-10 lg:px-8 xl:gap-Je-8 z-50",children:t&&t.map(r=>(0,Je.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Je.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,Je.jsx)(hd,{icon:r.icon,size:"4x"})}),(0,Je.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Je.jsx)("span",{className:"absolute inset-0"})]}),(0,Je.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Je.jsx)("div",{className:"bg-gray-50",children:(0,Je.jsx)("div",{className:"mx-auto max-Je-7xl px-6 lg:px-8",children:(0,Je.jsx)("div",{className:"grid grid-cols-3 divide-Je divide-gray-900/5 border-Je border-gray-900/5",children:a.map(r=>(0,Je.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-Je-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Je.jsx)(hd,{icon:r.icon,className:"h-5 Je-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),hd=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Je.jsx)(Pe,{...e,size:a});if("src"in e)return(0,Je.jsx)("div",{className:l(t,"h-full max-Je-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Je.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Dr=Gm;var Mr=["light","dark","green"];function $m({title:e,logo:t,menuItems:a}){let[o,r]=(0,Xo.useState)(!1),[s,i]=(0,Xo.useState)(!1),[n,c]=(0,Xo.useState)("light"),p=t==null?void 0:t.split(".")[0],d=t==null?void 0:t.split(".")[1],[m,f]=(0,Xo.useState)(`${p}.${d}`),g=u=>{Mr.includes(u)?f(u==="light"?`${p}.${d}`:`${p}-${u}.${d}`):f(`${p}.${d}`)};(0,Xo.useEffect)(()=>{let u=localStorage.getItem("theme")||"light";c(u),document.documentElement.setAttribute("class",u),g(u)},[]);let b=()=>{let u=Mr[(Mr.indexOf(n)+1)%Mr.length];c(u),document.documentElement.setAttribute("class",u),localStorage.setItem("theme",u),g(u)};return(0,Je.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,Je.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Je.jsx)("div",{className:"flex lg:flex-1",children:(0,Je.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:e}),(0,Je.jsx)("img",{alt:e,src:m,className:"h-9 Je-auto"})]})}),(0,Je.jsx)("div",{className:"flex lg:hidden",children:(0,Je.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-Je p-2.5 text-gray-700 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Je.jsx)(Ir.Bars3Icon,{"aria-hidden":"true",className:"h-6 Je-6"})]})}),(0,Je.jsx)(qe.PopoverGroup,{className:"hidden lg:flex lg:gap-Je-12",children:a.map(u=>(0,Je.jsx)(Dr,{...u},u.name))}),(0,Je.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Je.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:n==="dark"?(0,Je.jsx)(Tr.SunIcon,{className:"h-6 Je-6"}):n==="green"?(0,Je.jsx)(Tr.MoonIcon,{className:"h-6 Je-6"}):(0,Je.jsx)(Tr.SunIcon,{className:"h-6 Je-6"})})})]}),(0,Je.jsxs)(qe.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Je.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Je.jsxs)(qe.DialogPanel,{className:"fixed inset-Je-0 right-0 z-20 Je-full overflow-Je-auto bg-white px-6 py-6 sm:max-Je-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,Je.jsx)("img",{alt:e,src:t,className:"h-8 Je-auto"})]}),(0,Je.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-Je p-2.5 text-gray-700 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Je.jsx)(Ir.XMarkIcon,{"aria-hidden":"true",className:"h-6 Je-6"})]})]}),(0,Je.jsx)("div",{className:"mt-6 flow-root",children:(0,Je.jsx)("div",{className:"-my-6 divide-Je divide-gray-500/10",children:(0,Je.jsx)("div",{className:"space-Je-2 py-6",children:a.map(u=>(0,Je.jsx)(Vm,{...u},u.name))})})})]})]})]})}function Vm({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Je.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,Je.jsxs)(qe.Disclosure,{as:"div",className:"-mx-3",children:[(0,Je.jsx)(qe.DisclosureButton,{className:"group flex Je-full items-center justify-between rounded-lg py-2 pl-3 Je-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Je.jsx)(qe.DisclosurePanel,{className:"mt-2 space-Je-2",children:t&&t.map(r=>(0,Je.jsx)(qe.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Je-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function Wm({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let i=()=>{let n=document.getElementById("next-section");n&&n.scrollIntoView({behavior:"smooth"})};return(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,Je.jsxs)("video",{className:"fixed inset-0 object-cover Je-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Je.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Je.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,Je.jsx)(Eo,{children:(0,Je.jsxs)("div",{className:"flex flex-col items-start Je:Je-1/2 mb-10 z-0 Je:mb-0",children:[(0,Je.jsx)("h1",{className:"text-5xl Je:text-6xl mb-6",children:r&&r}),(0,Je.jsx)("div",{className:"text-lg Je:text-xl text-gray-300 mb-8 max-Je-lg",children:s&&s})]})})}),(0,Je.jsx)(Aa,{className:"text-black z-10",position:"header"})]})})}var Ri=h(require("next/image"));function ua({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Je.jsxs)(Xe,{href:"/",className:l(a?"py-1":"py-2"),children:[(0,Je.jsx)(Ri.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,Je.jsx)(Ri.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 Si({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[i,n]=(0,Xo.useState)(!1),[c,p]=(0,Xo.useState)(""),d=["light","dark"],{theme:m,setTheme:f}=(0,pd.useTheme)();(0,Xo.useEffect)(()=>{p(m||"dark")},[m]);let g=()=>{let b=d[(d.indexOf(c)+1)%d.length];p(b),f(b)};return(0,Xo.useEffect)(()=>{let b=()=>{window.scrollY>100?n(!0):n(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${i||e?"translate-Je-0":"-translate-Je-full bg-transparent"}`,children:(0,Je.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Je.jsxs)("div",{className:l("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,Je.jsx)(ua,{logoDark:a,logoLight:t}),(0,Je.jsx)(qe.PopoverGroup,{className:"hidden lg:flex lg:gap-Je-12",children:o&&o.map(b=>(0,Je.jsx)(Dr,{...b},b.name))}),r&&(0,Je.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:g,children:(0,Je.jsxs)("div",{className:"relative",children:[(0,Je.jsx)(Rn.Sun,{className:"absolute h-6 Je-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Je.jsx)(Rn.Moon,{className:"absoulte h-6 Je-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var ki=["light","dark"];function Ti({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,Xo.useState)(!1),{theme:i,setTheme:n}=(0,pd.useTheme)(),[c,p]=(0,Xo.useState)(!1),[d,m]=(0,Xo.useState)("light");(0,Xo.useEffect)(()=>{let g=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",g,{passive:!0}),()=>window.removeEventListener("scroll",g)},[]),(0,Xo.useEffect)(()=>{m(i||"dark")},[i]);let f=()=>{let g=ki[(ki.indexOf(d)+1)%ki.length];m(g),n(g)};return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-Je-0":"-translate-Je-full bg-transparent"}`,children:[(0,Je.jsx)("nav",{className:l("backdrop-blur-sm text-white p-0",c&&"hidden"),children:(0,Je.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,Je.jsx)(ua,{logoDark:t,logoLight:e,mobile:!0}),(0,Je.jsx)("div",{className:"flex items-center space-Je-4",children:(0,Je.jsxs)("button",{type:"button",onClick:()=>p(!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,Je.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Je.jsx)(Ir.Bars3Icon,{"aria-hidden":"true",className:"h-4 Je-4"})]})})]})}),(0,Je.jsxs)(qe.Dialog,{open:c,onClose:p,className:"lg:hidden",children:[(0,Je.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Je.jsxs)(qe.DialogPanel,{className:"fixed inset-Je-0 right-0 z-20 Je-full overflow-Je-auto bg-background dark:bg-[#212124] px-2 sm:max-Je-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Je.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Je.jsx)(ua,{logoDark:t,logoLight:e,mobile:!0}),(0,Je.jsxs)("button",{type:"button",onClick:()=>p(!1),className:"-m-2.5 rounded-Je p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Je.jsx)(Ir.XMarkIcon,{"aria-hidden":"true",className:"h-6 Je-6"})]})]}),(0,Je.jsx)("div",{className:"mt-6 flow-root",children:(0,Je.jsx)("div",{className:"-my-6 divide-Je divide-gray-500/10",children:(0,Je.jsx)("div",{className:"space-Je-2 px-2 py-6",children:a&&a.map(g=>(0,Je.jsx)(Um,{...g},g.name))})})})]})]})]})})}function Um({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Je.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,Je.jsxs)(qe.Disclosure,{as:"div",className:"-mx-3",children:[(0,Je.jsx)(qe.DisclosureButton,{className:"group flex Je-full items-center justify-between rounded-lg py-2 pl-3 Je-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Je.jsx)(qe.DisclosurePanel,{className:"mt-2 space-Je-2",children:t&&t.map(r=>(0,Je.jsx)(qe.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Je-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var Pd=h(require("next/image"));var jm=l("text-base/[1.75] transition-transform duration-350 hover:-translate-Je-1 block px-4"),Di=l("text-gray-900 dark:text-white text-Je font-bold leading-[1.25] Je:text-lg mb-5 Je:mb-[1.875rem]"),Mi=l("Je-10 h-10 rounded-5 inline-grid place-items-center dark:bg-accent-700 border border-accent-800 dark:border-transparent text-accent flex-none"),Ii=l("flex items-center gap-5"),Br=l("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Xm({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:i,columnThree:n,footerBottom:c}=t;return(0,Je.jsxs)("footer",{className:l("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12",e),children:[(0,Je.jsx)("div",{className:"py-16 Je:py-20",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsxs)("div",{className:"grid gap-10 Je:grid-cols-2 xl:grid-cols-4",children:[(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,Je.jsx)(ua,{logoDark:o,logoLight:a}),(0,Je.jsx)("p",{className:"mb-7 mt-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Je.jsx)("nav",{"aria-label":"social links",children:(0,Je.jsx)("Xo",{className:"inline-flex min-h-[50px] items-center divide-Je rounded-5 bg-accent text-white",children:r.socialLinks.map((p,d)=>(0,Je.jsx)("li",{children:(0,Je.jsx)(Xe,{"aria-label":p.href,className:jm,href:p.href,openNewTab:!0,children:(0,Je.jsx)("span",{children:p.icon})})},d))})})]}),(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,Je.jsx)("h3",{className:Di,children:s.title}),s.links&&s.links.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Je.jsx)("Xo",{className:"grid gap-2",children:s.links.map(p=>(0,Je.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,Je.jsx)("span",{className:"flex-none text-sm/[1] text-gray-900 dark:text-white",children:(0,Je.jsx)(Nr.FaChevronRight,{})}),(0,Je.jsx)(Xe,{href:p.href,openNewTab:p.openNewTab,className:Br,children:p.label})]},p.label))})})]}),(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,Je.jsx)("h3",{className:Di,children:i.title}),(0,Je.jsxs)("Xo",{"aria-label":"addresses",className:"grid gap-5",children:[(0,Je.jsxs)("li",{className:Ii,children:[(0,Je.jsx)("span",{className:Mi,children:(0,Je.jsx)(Nr.FaPaperPlane,{})}),(0,Je.jsx)("address",{className:"not-italic",children:i.location})]}),(0,Je.jsxs)("li",{className:Ii,children:[(0,Je.jsx)("span",{className:Mi,children:(0,Je.jsx)(Nr.FaEnvelope,{})}),i.mails&&i.mails.length>0&&(0,Je.jsx)("div",{className:"grid gap-1",children:i.mails.map((p,d)=>(0,Je.jsx)("a",{href:`mailto:${p}`,className:Br,children:p},d))})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&(0,Je.jsxs)("li",{className:Ii,children:[(0,Je.jsx)("span",{className:Mi,children:(0,Je.jsx)(Nr.FaPhone,{})}),(0,Je.jsx)("div",{className:"grid gap-1",children:i.phoneNumbers.map((p,d)=>(0,Je.jsx)("a",{href:`tel:${p.split(" ").join("")}`,className:Br,children:p},d))})]})]})]}),n&&(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"800",children:[(0,Je.jsx)("h3",{className:Di,children:n.title}),n.blogs&&n.blogs.length>0&&(0,Je.jsx)("div",{className:"grid gap-6",children:n.blogs.map((p,d)=>(0,Je.jsxs)("article",{className:"group flex items-center gap-4 text-accent-800 dark:text-white",children:[(0,Je.jsx)("div",{className:"flex-none overflow-hidden rounded-5",children:(0,Je.jsx)(Pd.default,{...p.image,alt:p.image.alt,width:80,height:80,className:"object-cover transition-transform duration-700 group-hover:scale-105"})}),(0,Je.jsxs)("div",{children:[(0,Je.jsxs)("p",{className:"flex items-center gap-2.5 dark:text-body",children:[(0,Je.jsx)("span",{className:"text-accent",children:(0,Je.jsx)(Nr.FaCalendarDays,{})}),(0,Je.jsx)("span",{children:bd(p.date)})]}),(0,Je.jsx)("h4",{className:"text-Je leading-normal",children:(0,Je.jsx)(Xe,{href:p.slug,className:"transition-colors duration-300 hover:text-accent",children:p.title})})]})]},d))})]})]})})}),(0,Je.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,Je.jsx)("div",{className:"container",children:(0,Je.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-Je-8 gap-Je-4 Je:gap-Je-10",children:[(0,Je.jsx)("p",{children:c.copyrightText}),c.links&&c.links.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Je.jsx)("Xo",{className:"flex flex-wrap items-center gap-Je-4 Je:gap-Je-7",children:c.links.map(p=>(0,Je.jsx)("li",{children:(0,Je.jsx)(Xe,{"aria-label":`Go Ol page ${p.label}`,href:p.href,openNewTab:p.openNewTab,className:Br,children:p.label})},p.label))})})]})})})]})}function Ym({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:i=!1}){return(0,Je.jsxs)("div",{className:l("fixed top-0 left-0 right-0 z-50",r),children:[(0,Je.jsx)(Si,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:i,wide:s}),(0,Je.jsx)(Ti,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}var Ea=require("sonner");function Ai({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,Xo.useState)([]),s=(0,Ol.useRouter)(),i=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},n=d=>{r(m=>m.includes(d)?m.filter(f=>f!==d):[...m,d])},c=async()=>{let d=await t(o);d.success?(Ea.toast.success(d.message),s.refresh()):Ea.toast.error(`Error: ${d.message}`),r([])},p=async()=>{let d=await a(o);d.success?(Ea.toast.success(d.message),s.refresh()):Ea.toast.error(`Error: ${d.message}`),r([])};return(0,Je.jsxs)("div",{className:"space-Je-4",children:[(0,Je.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Je.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Je.jsxs)("div",{className:"space-Je-2",children:[(0,Je.jsx)(T,{onClick:c,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Je.jsx)(T,{onClick:p,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Je.jsx)("div",{className:"overflow-hidden sm:rounded-Je",children:(0,Je.jsxs)("Xo",{className:"divide-Je divide-gray-200",children:[(0,Je.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(ft,{id:"select-all",checked:o.length===e.length,onCheckedChange:i,className:"border-accent"}),(0,Je.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Je.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,Je.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(ft,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>n(d.id),className:"border-accent"}),(0,Je.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Je.jsxs)(At,{className:"h-10 Je-10",children:[(0,Je.jsx)(Lt,{src:d.userImage,alt:d.userName}),(0,Je.jsx)(Bt,{children:d.userName.split(" ").map(m=>m[0]).join("")})]}),(0,Je.jsx)("div",{className:"ml-3",children:(0,Je.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.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,Je.jsx)(at,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,Je.jsx)(Ea.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Li=require("date-fns");var kd=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];var Oo=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=kd.some(r=>r.date.toISOString()===e.toISOString());return t||a||o},Td=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!Oo(o))return .5;for(;o<=r;)Oo(o)||s++,o.setDate(o.getDate()+1);return s},Dd=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var qm=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,$.jsx)("div",{className:"flex space-Je-2",children:e.map((r,s)=>(0,$.jsx)(T,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[s],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function Ei({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,Xo.useState)(new Date),[r,s]=(0,Xo.useState)(new Date),[i,n]=(0,Xo.useState)("Full Day"),[c,p]=(0,Xo.useState)(!1),[d,m]=(0,Xo.useState)(1),f=(0,Ol.useRouter)();(0,Xo.useEffect)(()=>{let u=Dd(a,r);p(u),u&&n("Full Day")},[a,r]),(0,Xo.useEffect)(()=>{if(!a||!r){m(0);return}let u=Td(a,r,i!=="Full Day");m(u)},[a,r,i]);let g=u=>{n(u)};return(0,$.jsxs)("div",{className:"max-Je-2xl",children:[(0,$.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,$.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,$.jsxs)("form",{onSubmit:async u=>{if(u.preventDefault(),!a||!r){Ea.toast.error("Please select both start and end dates");return}if(d>e){Ea.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",i),v.append("duration",d.toString());let P=await(t||Km)(v);P.success?(Ea.toast.success(P.message),o(void 0),s(void 0),n("Full Day"),f.refresh()):Ea.toast.error(`Error: ${P.message}`)},className:"space-Je-4",children:[(0,$.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,$.jsxs)("div",{className:"flex flex-col space-Je-2",children:[(0,$.jsx)(ee,{htmlFor:"startDate",children:"Start Date"}),(0,$.jsxs)(wo,{children:[(0,$.jsx)(Co,{asChild:!0,children:(0,$.jsxs)(T,{variant:"outline",className:l("Je-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,$.jsx)(Rn.CalendarIcon,{className:"mr-2 h-4 Je-4"}),a?(0,Li.format)(a,"PPP"):(0,$.jsx)("span",{children:"Pick a date"})]})}),(0,$.jsx)(Xa,{className:"Je-auto p-0",align:"start",children:(0,$.jsx)(So,{mode:"single",selected:a,onSelect:u=>{o(u),u&&(!r||u>r)&&s(u)},initialFocus:!0})})]})]}),(0,$.jsxs)("div",{className:"flex flex-col space-Je-2",children:[(0,$.jsx)(ee,{htmlFor:"endDate",children:"End Date"}),(0,$.jsxs)(wo,{children:[(0,$.jsx)(Co,{asChild:!0,children:(0,$.jsxs)(T,{variant:"outline",className:l("Je-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,$.jsx)(Rn.CalendarIcon,{className:"mr-2 h-4 Je-4"}),r?(0,Li.format)(r,"PPP"):(0,$.jsx)("span",{children:"Pick a date"})]})}),(0,$.jsx)(Xa,{className:"Je-auto p-0",align:"start",children:(0,$.jsx)(So,{mode:"single",selected:r,onSelect:s,disabled:u=>a?u<a:!1,initialFocus:!0})})]})]})]}),(0,$.jsxs)("div",{className:"space-Je-2",children:[(0,$.jsx)(ee,{children:"Leave Type"}),(0,$.jsx)(qm,{options:["Full Day","Morning","Afternoon"],value:i,onChange:g,disabled:[!1,c,c]})]}),(0,$.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,$.jsx)(T,{disabled:d<=0,type:"submit",className:"Je-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,$.jsx)(Ea.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Km=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function Id(...e){return e.filter(Boolean).join(" ")}function Hi({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},i=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},n=()=>{t(new Date)},c=p=>p.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Je.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Je.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Je.jsxs)("div",{className:"sm:flex-auto",children:[(0,Je.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Je.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Je.jsxs)("div",{className:"relative flex items-center rounded-Je gap-1 Je:items-stretch",children:[(0,Je.jsxs)(T,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-Je border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Je.jsx)(Rn.ChevronLeft,{className:"h-5 Je-5","aria-hidden":"true"})]}),(0,Je.jsx)(T,{variant:"outline",onClick:n,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative Je:block",children:"Today"}),(0,Je.jsxs)(T,{onClick:i,variant:"outline",size:"icon",className:"rounded-r-Je border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Je.jsx)(Rn.ChevronRight,{className:"h-5 Je-5","aria-hidden":"true"})]})]})]}),(0,Je.jsx)("div",{className:"mt-8 flow-root",children:(0,Je.jsx)("div",{className:"-mx-4 -my-2 overflow-Je-auto sm:-mx-6 lg:-mx-8",children:(0,Je.jsx)("div",{className:"max-h-[60vh] overflow-Je-auto",children:(0,Je.jsxs)("table",{className:"min-Je-full border-separate border-spacing-0",children:[(0,Je.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Je.jsxs)("tr",{children:[(0,Je.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 Je-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((p,d)=>{let m=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,Je.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 ${Oo(m)?"bg-gray-200":""}`,children:[(0,Je.jsx)("div",{children:c(m)}),(0,Je.jsx)("div",{children:d+1})]},d)})]})}),(0,Je.jsx)("tbody",{children:o.map((p,d)=>(0,Je.jsxs)("tr",{children:[(0,Je.jsx)("td",{className:Id(d!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 Je-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsxs)(At,{className:"h-11 Je-11",children:[(0,Je.jsx)(Lt,{src:p.image,alt:p.name}),(0,Je.jsx)(Bt,{children:p.name.split(" ").map(m=>m[0]).join("")})]}),(0,Je.jsx)("div",{className:"ml-4",children:(0,Je.jsx)("div",{className:"font-medium text-accent",children:p.name})})]})}),[...Array(r)].map((m,f)=>{let g=new Date(e.getFullYear(),e.getMonth(),f+1),b=a.find(u=>u.userId===p.id&&new Date(u.startDate)<=g&&new Date(u.endDate)>=g);return(0,Je.jsx)("td",{className:Id(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Oo(g)?"bg-gray-200":""),children:(0,Je.jsx)("div",{className:`h-6 Je-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?`${p.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,Je.jsx)("div",{className:`h-3 Je-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${p.id}-${f}`)})]},p.id))})]})})})})]})}function zi({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,Xo.useState)(null),s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,i=Array.from({length:42},(d,m)=>{let f=new Date(e.getFullYear(),e.getMonth(),m-s+1);return{date:f,isCurrentMonth:f.getMonth()===e.getMonth(),isToday:f.toDateString()===new Date().toDateString(),holidays:a.filter(g=>new Date(g.startDate)<=f&&new Date(g.endDate)>=f)}}),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},c=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},p=()=>{t(new Date)};return(0,Je.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Je.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Je.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Je.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Je.jsx)("div",{className:"flex items-center",children:(0,Je.jsxs)("div",{className:"relative flex items-center rounded-Je gap-1 Je:items-stretch",children:[(0,Je.jsxs)(T,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-Je border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Je.jsx)(Rn.ChevronLeft,{className:"h-5 Je-5","aria-hidden":"true"})]}),(0,Je.jsx)(T,{variant:"outline",onClick:p,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative Je:block",children:"Today"}),(0,Je.jsxs)(T,{onClick:c,variant:"outline",size:"icon",className:"rounded-r-Je border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Je.jsx)(Rn.ChevronRight,{className:"h-5 Je-5","aria-hidden":"true"})]})]})})]}),(0,Je.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Je.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Je.jsxs)("div",{className:"bg-white py-2",children:["M",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Je"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["F",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Je"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Je"})]})]}),(0,Je.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto",children:[(0,Je.jsx)("div",{className:"hidden Je-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px",children:i.map(d=>(0,Je.jsxs)("div",{className:l(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2"),children:[(0,Je.jsx)("time",{dateTime:d.date.toISOString(),className:l("flex h-6 Je-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,Je.jsx)("Je",{className:"mt-2 space-Je-1",children:d.holidays.map(m=>(0,Je.jsx)("li",{children:(0,Je.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${m.status==="approved"?"border-green-500":"border-gray-500"} border`,children:m.userName})},m.id))})]},d.date.toISOString()))}),(0,Je.jsx)("div",{className:"isolate grid Je-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:i.map(d=>(0,Je.jsxs)("button",{type:"button",className:l(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,Je.jsx)("time",{dateTime:d.date.toISOString(),className:l("ml-auto",d.date===o&&d.isToday&&"flex h-6 Je-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 Je-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,Je.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,Je.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:d.holidays.map(m=>(0,Je.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 Je-1.5 rounded-full ${m.status==="approved"?"bg-green-500":"bg-gray-500"}`},m.id))})]},d.date.toISOString()))})]})]})]})}var fa=require("lucide-react");function Ld(...e){return e.filter(Boolean).join(" ")}function Jm({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:i,rejectLeave:n}){let[c,p]=(0,Xo.useState)("Calendar View"),d=(0,Ol.useRouter)(),m=!1,f=(0,Li.parseISO)(a),g=async u=>{let v=(0,Li.format)(u,"Rn-MM-yyyy"),P=new URL(window.location.href);return P.searchParams.set("date",v),d.push(P.toString()),{success:!0}};if(m)return(0,Je.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Je.jsx)("div",{className:"animate-spin rounded-full h-32 Je-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:fa.Grid,current:c==="Grid View"},{name:"Calendar View",icon:fa.CalendarDays,current:c==="Calendar View"},{name:"Request Leave",icon:fa.PlusCircle,current:c==="Request Leave"},{name:"Approve Leave",icon:fa.CheckSquare,current:c==="Approve Leave"}];return(0,Je.jsxs)("div",{className:"container fixed mx-auto p-4",children:[(0,Je.jsxs)("div",{className:"mb-8",children:[(0,Je.jsxs)("div",{className:"sm:hidden",children:[(0,Je.jsx)("select",{value:c,onChange:u=>p(u.target.value),className:"block Je-full rounded-Je border-gray-300 py-2 pl-3 Je-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(u=>(0,Je.jsx)("option",{children:u.name},u.name))}),(0,Je.jsx)(Rn.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 Je-5 text-gray-400","aria-hidden":"true"})]}),(0,Je.jsx)("div",{className:"hidden sm:block",children:(0,Je.jsx)("div",{className:"border-b border-gray-200",children:(0,Je.jsx)("nav",{className:"-mb-px flex space-Je-8","aria-label":"Tabs",children:b.map(u=>(0,Je.jsxs)("a",{onClick:()=>{(u.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&p(u.name)},className:Ld(u.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",u.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":u.current?"page":void 0,children:[(0,Je.jsx)(u.icon,{className:Ld(u.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 Je-5"),"aria-hidden":"true"}),(0,Je.jsx)("span",{children:u.name})]},u.name))})})})]}),c==="Grid View"&&(0,Je.jsx)(Hi,{currentDate:f,setCurrentDate:g,holidays:e,employees:r}),c==="Calendar View"&&(0,Je.jsx)(zi,{currentDate:f,setCurrentDate:g,holidays:e}),c==="Request Leave"&&(0,Je.jsx)(Ei,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:u=>s?s(u):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),c==="Approve Leave"&&(0,Je.jsx)(Ai,{leaveRequests:o,onApprove:u=>i?i(u):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:u=>n?n(u):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function Fi({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:i}){var He,ht,k,z,lt;let[n,c]=(0,Xo.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[p,d]=(0,Xo.useState)(""),[m,f]=(0,Xo.useState)(!1),[g,b]=(0,Xo.useState)(null);(0,Xo.useEffect)(()=>{f(JSON.stringify(e)!==JSON.stringify(n))},[e,n]);let u=async()=>{try{let N=await s(n);N.success?(f(!1),b(null)):console.error("Failed Ol save deal:",N.errors)}catch(N){console.error("Failed Ol save deal:",N)}},v=(N,G)=>{c(U=>({...U,[N]:G}))},P=N=>{let G=(n.categories||[]).includes(N)?(n.categories||[]).filter(U=>U!==N):[...n.categories||[],N];v("categories",G)},_=async()=>{if(p.trim()){let N={text:p,timestamp:new Date().toISOString()};try{let G=await i(N);if(!G.success){console.error("Failed Ol add comment:",G.errors);return}}catch(G){console.error("Failed Ol add comment:",G)}c(G=>({...G,comments:[...G.comments||[],N]})),d("")}},Q=N=>{switch(N){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},me=N=>t==null?void 0:t.find(G=>G.id===Number(N));return(0,Je.jsx)(tt,{open:!0,children:(0,Je.jsxs)(je,{className:"max-Je-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Je.jsxs)(pt,{className:"flex flex-row items-center justify-between",children:[(0,Je.jsx)(ut,{className:"text-2xl font-bold",children:a==null?void 0:a.name}),(0,Je.jsxs)("div",{className:"flex space-Je-2",children:[(0,Je.jsx)(T,{variant:"outline",onClick:r,children:"Close"}),(0,Je.jsxs)(T,{onClick:u,disabled:!m,children:[(0,Je.jsx)(Rn.SaveIcon,{className:"Je-4 h-4 mr-2"}),"Save"]})]})]}),(0,Je.jsxs)(aa,{className:"flex-grow Je-4",children:[(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Je.jsx)("div",{className:"grid gap-2",children:g==="value"?(0,Je.jsx)(ze,{type:"number",value:n.value,onChange:N=>v("value",Number(N.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Je.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("value"),children:["\xA3",(He=n.value)==null?void 0:He.toLocaleString()]})}),(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),g==="assignee"?(0,Je.jsxs)(Ca,{value:((k=(ht=n==null?void 0:n.assignee)==null?void 0:ht.id)==null?void 0:k.toString())||"",onValueChange:N=>v("assignee",me(N)),children:[(0,Je.jsx)(sa,{children:(0,Je.jsx)(Pa,{placeholder:"Select assignee"})}),(0,Je.jsx)(ia,{children:t&&t.map(N=>{var G;return(0,Je.jsx)(na,{value:((G=N==null?void 0:N.id)==null?void 0:G.toString())||"",children:N.name},N.id)})})]}):(0,Je.jsxs)("div",{className:"flex items-center space-Je-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("assignee"),children:[(0,Je.jsx)(Rn.UserIcon,{className:"Je-4 h-4 text-gray-400"}),(0,Je.jsx)("span",{children:n.assignee.name})]})]}),(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),g==="closureDate"?(0,Je.jsx)(ze,{type:"date",value:(lt=(z=n.closureDate)==null?void 0:z.split("T")[0])!=null?lt:"",onChange:N=>v("closureDate",N.target.value),onBlur:()=>b(null),autoFocus:!0}):(0,Je.jsxs)("div",{className:"flex items-center space-Je-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("closureDate"),children:[(0,Je.jsx)(Rn.CalendarIcon,{className:"Je-4 h-4 text-gray-400"}),(0,Je.jsx)("span",{children:n.closureDate?new Date(n.closureDate).toLocaleDateString("en-GB"):"N/Je"})]})]})]}),(0,Je.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Description"}),g==="description"?(0,Je.jsx)(la,{value:n.description||"",onChange:N=>v("description",N.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,Je.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>b("description"),children:n.description})]})}),(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Status"}),g==="status"?(0,Je.jsxs)(Ca,{value:n.status,onValueChange:N=>{v("status",N),b(null)},children:[(0,Je.jsx)(sa,{children:(0,Je.jsx)(Pa,{placeholder:"Select status"})}),(0,Je.jsx)(ia,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(N=>(0,Je.jsx)(na,{value:N,children:N},N))})]}):(0,Je.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("status"),children:n.status})]}),(0,Je.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Categories"}),g==="categories"?(0,Je.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.map(N=>{var G,U;return(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(ft,{id:((G=N.id)==null?void 0:G.toString())||"",checked:(n.categories||[]).some(_o=>_o.id===N.id),onCheckedChange:()=>N.id!==void 0&&P(N)}),(0,Je.jsx)("label",{htmlFor:((U=N.id)!=null?U:"").toString(),className:`text-sm font-medium ${Q(N.type||"sector")} px-2 py-1 rounded`,children:N.name})]},N.id)})}):(0,Je.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("categories"),children:n.categories&&n.categories.map(N=>{console.log("cat",N);let G=N;return G?(0,Je.jsx)(at,{variant:"secondary",className:Q(G.type||"sector"),children:G.name},G.id):null})})]})]}),(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,Je.jsx)(aa,{className:"h-[200px] overflow-Je-auto",children:(0,Je.jsx)("div",{className:"space-Je-2",children:n.comments&&n.comments.slice().sort((N,G)=>new Date(G.timestamp||"").getTime()-new Date(N.timestamp||"").getTime()).map(N=>{var G;return(0,Je.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,Je.jsx)("p",{className:"text-sm text-gray-700",children:N.text}),(0,Je.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[(G=N==null?void 0:N.author)==null?void 0:G.name," - ",new Date(N.timestamp||"").toLocaleString()]})]},N.id)})})}),(0,Je.jsxs)("div",{className:"flex mt-2",children:[(0,Je.jsx)(ze,{value:p,onChange:N=>d(N.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,Je.jsxs)(T,{onClick:_,className:"ml-2",children:[(0,Je.jsx)(Rn.PlusIcon,{className:"Je-4 h-4 mr-2"}),"Add"]})]})]}),(0,Je.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(n.updatedAt||"").toLocaleString()]})]})]})]})})}function Oi({deal:e,customer:t,categories:a,onClick:o}){let r=a.find(s=>{var i;return s.type==="proposition"&&((i=e.categories)!=null?i:[]).includes(s.id)});return(0,Je.jsxs)(xe,{className:"mb-4 cursor-pointer hover:shadow-Je transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Je.jsxs)(Oe,{className:"pb-2",children:[(0,Je.jsx)("div",{className:"flex justify-between items-center",children:(0,Je.jsx)(_e,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,Je.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,Je.jsxs)(Re,{children:[(0,Je.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Je.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,Je.jsx)(Rn.UserIcon,{className:"Je-4 h-4 mr-1 text-xs"}),(0,Je.jsx)("span",{children:e.assignee.name})]}),(0,Je.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Je.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Je.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Je.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Je.jsx)(Rn.CalendarIcon,{className:"Je-3 h-3 mr-1"}),(0,Je.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Je.jsx)("div",{className:"flex justify-between items-left",children:r&&(0,Je.jsx)(at,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:r.name})})]})]})}var Or=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function _i({onSubmit:e}){var r;let[t,a]=(0,Xo.useState)({name:"",intro:"",active:!0});return(0,Je.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-Je-4",children:[(0,Je.jsxs)("div",{className:"space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"customerName",children:"Customer Name"}),(0,Je.jsx)(ze,{id:"customerName",value:t.name,onChange:s=>a({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Je.jsxs)("div",{className:"space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"customerIntro",children:"Intro"}),(0,Je.jsx)(la,{id:"customerIntro",value:(r=t.intro)!=null?r:"",onChange:s=>a({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(ft,{id:"activeCustomer",checked:!!t.active,onCheckedChange:s=>a({...t,active:s})}),(0,Je.jsx)(ee,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Je.jsx)(T,{type:"submit",className:"Je-full",children:"Add Customer"})]})}function Gi({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:i}){var Q,me,He,ht;let[n,c]=(0,Xo.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[p,d]=(0,Xo.useState)(!1),[m,f]=(0,Xo.useState)({});(0,Xo.useEffect)(()=>{r&&c(r)},[r]);let g=()=>{let k={};return n.customer||(k.customer="Customer is required"),n.value||(k.value="Value is required"),n.assignee||(k.assignee="Assignee is required"),n.closureDate||(k.closureDate="Closure Date is required"),f(k),Object.keys(k).length===0},b=async k=>{k.preventDefault(),f({});try{if(g()){let z=await o({...n});z.success?(c({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),i==null||i()):f(z.errors||{})}}catch{f({submit:"gn error occurred while submitting the form."})}},u=k=>{console.log(k),c(z=>({...z,categories:(z.categories||[]).includes(k.id)?(z.categories||[]).filter(lt=>lt!==k.id):[...z.categories||[],k.id]}))},v=async k=>{c({...n,customer:k});try{let z=await s(k);z.success?d(!1):f(z.errors||{})}catch{f({submit:"gn error occurred while submitting the form."})}},P=k=>t==null?void 0:t.find(z=>z.id===Number(k)),_=k=>e==null?void 0:e.find(z=>z.id===Number(k));return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)("form",{onSubmit:b,className:"space-Je-6",children:[(0,Je.jsx)(aa,{className:"h-[60vh] Je-4",children:(0,Je.jsxs)("div",{className:"space-Je-6 px-4",children:[(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"customer",children:"Customer"}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsxs)(Ca,{value:(me=(Q=n.customer)==null?void 0:Q.id)==null?void 0:me.toString(),onValueChange:k=>c({...n,customer:_(k)}),children:[(0,Je.jsx)(sa,{children:(0,Je.jsx)(Pa,{placeholder:"Select customer"})}),(0,Je.jsx)(ia,{children:e.map(k=>{var z;return(0,Je.jsx)(na,{value:((z=k.id)==null?void 0:z.toString())||"",children:k.name},k.id)})})]}),(0,Je.jsx)(T,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,Je.jsx)(Rn.PlusIcon,{className:"Je-5 h-5"})})]}),m.customerId&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:m.customerId})]}),(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"value",children:"Value"}),(0,Je.jsx)(ze,{id:"value",type:"number",value:n.value||"",onChange:k=>c({...n,value:Number.parseFloat(k.target.value)}),placeholder:"Enter deal value"}),m.value&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:m.value})]}),(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"assignee",children:"Assignee"}),(0,Je.jsxs)(Ca,{value:(ht=(He=n.assignee)==null?void 0:He.id)==null?void 0:ht.toString(),onValueChange:k=>c({...n,assignee:P(k)}),children:[(0,Je.jsx)(sa,{children:(0,Je.jsx)(Pa,{placeholder:"Select assignee"})}),(0,Je.jsx)(ia,{children:t&&t.map(k=>{var z;return(0,Je.jsx)(na,{value:((z=k.id)==null?void 0:z.toString())||"",children:k.name},k.id)})})]}),m.assignee&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:m.assignee})]}),(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"description",children:"Description"}),(0,Je.jsx)(la,{id:"description",value:n.description||"",onChange:k=>c({...n,description:k.target.value}),placeholder:"Enter deal description"})]}),(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{children:"Categories"}),(0,Je.jsx)("div",{className:"space-Je-4",children:["proposition","source","sector"].map(k=>(0,Je.jsxs)("div",{className:"space-Je-2",children:[(0,Je.jsx)("h4",{className:"text-sm font-medium",children:k.charAt(0).toUpperCase()+k.slice(1)}),(0,Je.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(z=>z.type===k).map(z=>{var lt;return(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(ft,{id:z.id.toString(),checked:(lt=n.categories)==null?void 0:lt.includes(z.id),onCheckedChange:()=>u(z)}),(0,Je.jsx)("label",{htmlFor:z.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:z.name})]},z.id)})})]},k))})]}),(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"closureDate",children:"Closure Date"}),(0,Je.jsx)(ze,{id:"closureDate",type:"date",value:n.closureDate||"",onChange:k=>c({...n,closureDate:k.target.value})}),m.closureDate&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:m.closureDate})]})]})}),(0,Je.jsx)(T,{type:"submit",className:"Je-full",children:r?"Update Deal":"Add Deal"})]}),(0,Je.jsx)(tt,{open:p,onOpenChange:d,children:(0,Je.jsxs)(je,{children:[(0,Je.jsx)(pt,{children:(0,Je.jsx)(ut,{children:"Add New Customer"})}),(0,Je.jsx)(_i,{onSubmit:v})]})})]})}function $i({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:i,calculateWeightedValue:n,addNewDeal:c,onAddCustomer:p}){let[d,m]=(0,Xo.useState)(!1);return(0,Je.jsxs)("div",{className:"flex flex-col Je-80",children:[(0,Je.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),c&&(0,Je.jsxs)(tt,{open:d,onOpenChange:m,children:[(0,Je.jsx)(sr,{asChild:!0,children:(0,Je.jsxs)(T,{className:"mb-4 Je-full bg-green-500 hover:bg-green-600 text-white",children:[(0,Je.jsx)(Rn.PlusCircle,{className:"mr-2 h-4 Je-4"}),"Add New Deal"]})}),(0,Je.jsxs)(je,{children:[(0,Je.jsx)(pt,{children:(0,Je.jsx)(ut,{children:"Add New Deal"})}),(0,Je.jsx)(Gi,{customers:o,users:a,categories:r,onSubmit:c,onAddCustomer:p,onClose:()=>m(!1)})]})]}),(0,Je.jsx)(Or.Droppable,{droppableId:e,isDropDisabled:!1,children:f=>(0,Je.jsxs)("div",{ref:f.innerRef,...f.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((g,b)=>(0,Je.jsx)(Or.Draggable,{draggableId:g.id.toString(),index:g.id,children:u=>(0,Je.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,Je.jsx)(Oi,{deal:g,customer:g.customer,categories:r,onClick:()=>s(g)})})},g.id.toString())),f.placeholder]})}),(0,Je.jsxs)("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,Je.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Je.jsxs)("span",{className:"text-green-600",children:["\xA3",i(t).toLocaleString()]})]}),(0,Je.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Je.jsxs)("span",{className:"text-blue-600",children:["\xA3",n(t,e).toLocaleString()]})]})]})]})}var Qm=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function Zm({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){var m;let[s,i]=(0,Xo.useState)(null),n=f=>{var g;return((g=e.deals)!=null?g:[]).filter(b=>b.status===f)},c=f=>f.reduce((g,b)=>g+(b.value||0),0),p=(f,g)=>{let b={Cold:.2,Qualified:.4,"Proposal Made":.6,"SoW Submitted":.7,Won:1,Lost:0};return f.reduce((u,v)=>u+(v.value||0)*b[g],0)},d=(0,Xo.useCallback)(f=>{var Q,me;let{source:g,destination:b}=f;if(!b||g.droppableId===b.droppableId&&g.index===b.index)return;let u=g.droppableId,v=b.droppableId,P=(Q=e.deals)==null?void 0:Q.filter(He=>He.id===g.index)[0],_=[...(me=e.deals)!=null?me:[]];P&&(P.status=v,a(P))},[a]);return(0,Je.jsx)(Or.DragDropContext,{onDragEnd:d,children:(0,Je.jsxs)("div",{className:"p-4 max-h-[90vh] overflow-auto",children:[(0,Je.jsx)("div",{className:"flex space-Je-4 pb-4",children:Qm.filter(f=>f!=="Won"&&f!=="Lost").map(f=>{var b,u;let g=n(f);return(0,Je.jsx)($i,{status:f,deals:g,customers:(b=e.customers)!=null?b:[],users:e.users,categories:(u=e.categories)!=null?u:[],onDealClick:i,calculateColumnValue:c,calculateWeightedValue:p,addNewDeal:f==="Cold"?t:void 0,onAddCustomer:r},f)})}),s&&(0,Je.jsx)(Fi,{deal:s,users:e.users,customer:s.customer,categories:(m=e.categories)!=null?m:[],onClose:()=>i(null),onSave:a,onAddComment:f=>o(s.id.toString(),f)})]})})}0&&(module.exports={Alert,AlertDescription,AlertTitle,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,Card,Categories,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,Container,ContentBlock,ContentCard,CopyButton,CustomLink,CustomerCard,DealCard,DealDetails,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,Filter,FlowPrintable,Footer,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanColumn,Label,Logo,LowImpactHero,MOTD,Mask,Media,MediaBlock,MediumImpactHero,NewCustomerForm,NewDealForm,NewsGrid,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadPagination,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,Printable,ProjectCard,ProjectTeam,ProposalSummary,RelatedContent,RelatedPosts,RenderBlocks,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SectionHero,SectionHeroOLD,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,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,TextAndImages,Textarea,Theme,ThemeProvider,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,toggleVariants,useIsMobile,useSidebar,useToast});
|
|
13
|
+
dark bg-background text-primary`,children:[(0,Je.jsxs)("div",{className:"flex px-6 items-center space-Je-2",children:[a&&(0,Je.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Je.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Je.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Je.jsx)("div",{ref:s,className:"preview-container"})]})},td=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=Ur(e),o=(0,Xo.useRef)(null),r=(0,Xo.useRef)(null),s=(0,Xo.useRef)(new ay.Previewer),[i,n]=(0,Xo.useState)(0),p=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,Xo.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),s.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(m=>n(m.pageCount)).catch(m=>console.error("Paged.js error:",m)))},[t]);return(0,Xo.useEffect)(()=>{s.current=new ay.Previewer,d()},[d,t]),(0,Xo.useEffect)(()=>{let m=document.createElement("style");return m.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(m),()=>{document.head.removeChild(m)}},[]),(0,Je.jsxs)("div",{className:"pagedjs-container",children:[(0,Je.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:p.map((m,f)=>{var g,b;return(0,Je.jsx)(Je.Fragment,{children:f===0?(0,Je.jsx)("section",{className:"pagedjs-section title-page Je-full h-full",children:(0,Je.jsx)(Lo,{hero:e.hero,title:e.title})},f):(0,Je.jsxs)("section",{className:l("pagedjs-section normal-page h-[699px]",`h-[${Cm("185mm")}px]`,((b=(g=m.theme)==null?void 0:g.settings)==null?void 0:b.theme)==="dark"?"dark":"light"),children:[m.blockName&&(0,Je.jsx)(Ao,{title:m.blockName}),(0,Je.jsx)(Ma,{blocks:[m],fill:!0})]},f)})})}),(0,Je.jsx)("div",{ref:o,className:"preview-container"})]})};var bi=h(require("clsx"));function Rm({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:i,loading:n=!1,LinkComponent:c,...p}){let m=c?f=>(0,Je.jsx)(c,{...f}):i?({href:f,children:g,...b})=>(0,Je.jsx)("button",{onClick:()=>i&&i(f),className:"flex items-center justify-start Je-full text-sm text-left px-4 py-2",...b,children:g}):f=>(0,Je.jsx)("a",{...f});return(0,Je.jsxs)(ba,{...p,variant:"inset",children:[(0,Je.jsx)(ya,{children:(0,Je.jsx)(Fe,{children:(0,Je.jsx)(Ce,{children:n?(0,Je.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Je.jsx)(se,{className:"bg-gray-200 my-2 Je-full h-7"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 my-2 h-5"})]}):(0,Je.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Je.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Je.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),n&&(0,Je.jsxs)(Kt,{children:[(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"}),(0,Je.jsx)(se,{className:"bg-gray-200 Je-3/4 h-5"})]}),(0,Je.jsxs)(Kt,{children:[e&&!n&&e.map((f,g)=>(0,Je.jsx)(Sm,{subNav:f,pathName:r,Link:m},g)),(0,Je.jsx)(Qe,{className:"mt-auto",children:(0,Je.jsx)(ct,{children:(0,Je.jsx)(Fe,{children:t&&!n&&t.map(f=>(0,Je.jsx)(Ce,{children:(0,Je.jsx)(Ze,{asChild:!0,size:"sm",children:(0,Je.jsxs)(m,{href:f.url||"",children:[f.icon&&(0,Je.jsx)(f.icon,{}),(0,Je.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,Je.jsx)(va,{})]})}function Sm({subNav:e,pathName:t,Link:a}){var s,i;let o=e,r=!1;return o.links&&o.links.map(n=>{n.url===t&&(r=!0)}),(0,Je.jsx)(kt,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsx)(Qe,{className:"py-0",children:(0,Je.jsx)(Fe,{children:(0,Je.jsx)(kt,{asChild:!0,defaultOpen:o.isActive,children:(0,Je.jsxs)(Ce,{children:[(0,Je.jsx)(Ze,{asChild:!0,tooltip:o.label,className:(0,bi.default)(r&&"font-bold text-accent"),children:(0,Je.jsxs)(a,{href:o.url,children:[o.icon&&(0,Je.jsx)(o.icon,{}),(0,Je.jsx)("span",{children:o.label})]})}),(s=o.links)!=null&&s.length?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Xt,{asChild:!0,children:(0,Je.jsxs)(fo,{className:"data-[state=open]:rotate-90",children:[(0,Je.jsx)(Rn.ChevronRight,{}),(0,Je.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Je.jsx)(Yt,{children:(0,Je.jsx)(Jt,{children:(i=o.links)==null?void 0:i.map(n=>(0,Je.jsx)(Qt,{children:(0,Je.jsx)(Zt,{asChild:!0,className:(0,bi.default)(n.url===t&&"font-bold text-accent"),children:(0,Je.jsx)(a,{href:n.url,children:(0,Je.jsx)("span",{children:n.label})})})},n.label))})})]}):null]})},o.label)})})})}var od=h(require("clsx"));var km=()=>(0,Je.jsx)(Pe,{iconName:"github",size:"10x"});function Tm({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:i,onPrintDocument:n,onGithubClick:c,onNavClick:p,LinkComponent:d,...m}){let b=d?u=>(0,Je.jsx)(d,{...u}):p?({item:u,children:v,...P})=>(0,Je.jsx)("button",{onClick:()=>p&&p(u),className:"flex items-center justify-start Je-full text-sm text-left px-4 py-2",...P,children:v}):u=>(0,Je.jsx)("a",{href:u.href,...u});return(0,Je.jsxs)(ba,{side:"right",variant:"inset",...m,children:[(0,Je.jsxs)(ya,{className:"border-b border-sidebar-border",children:[(0,Je.jsxs)(Fe,{className:"flex-row space-Je-1",children:[(0,Je.jsx)(Ce,{children:(0,Je.jsxs)(Ze,{onClick:s,children:[(0,Je.jsx)(Rn.FilePlus,{})," ",(0,Je.jsx)("span",{children:"Add Document"})]})}),c&&(0,Je.jsx)(Ce,{children:(0,Je.jsx)(Ze,{onClick:c,tooltip:"Open in GitHub",children:(0,Je.jsx)(km,{})})})]}),(0,Je.jsxs)(Fe,{className:"flex-row space-Je-1",children:[(0,Je.jsx)(Ce,{className:"Je-5/12",children:(0,Je.jsxs)(Ze,{onClick:()=>i(),variant:r?"outline":"default",className:(0,od.default)(r&&"text-accent"),children:[(0,Je.jsx)(Rn.Edit,{})," ",(0,Je.jsx)("span",{children:"Edit"})]})}),(0,Je.jsx)(Ce,{className:"Je-5/12",children:(0,Je.jsxs)(Ze,{onClick:n,children:[(0,Je.jsx)(Rn.Printer,{})," ",(0,Je.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(kt,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Dt,{asChild:!0,children:(0,Je.jsxs)(Xt,{children:["Editor Controls",(0,Je.jsx)(Rn.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(ct,{children:(0,Je.jsx)(Yt,{children:a})})]})}),(0,Je.jsx)(uo,{className:"mx-0"})]}),(0,Je.jsxs)(Kt,{className:"overflow-auto",children:[o&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Dt,{children:"Related Content"}),(0,Je.jsx)(ct,{children:(0,Je.jsx)(Fe,{children:Array.from({length:3}).map((u,v)=>(0,Je.jsx)(Ce,{children:(0,Je.jsx)(se,{className:"bg-gray-200 Je-full h-10"})},v))})})]}),(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Dt,{children:"Table of Contents"}),(0,Je.jsx)(ct,{children:(0,Je.jsx)(Fe,{children:Array.from({length:3}).map((u,v)=>(0,Je.jsx)(Ce,{children:(0,Je.jsx)(se,{className:"bg-gray-200 Je-full h-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Je.jsx)(kt,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Dt,{asChild:!0,children:(0,Je.jsxs)(Xt,{children:["Related Content",(0,Je.jsx)(Rn.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(ct,{children:(0,Je.jsx)(Yt,{children:(0,Je.jsx)(Fe,{children:e&&Object.keys(e).map(u=>(0,Je.jsxs)(Ce,{children:[(0,Je.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",u.charAt(0).toUpperCase()+u.slice(1)]}),u&&e[u]&&(0,Je.jsx)(Jt,{children:e[u].map(v=>(0,Je.jsx)(Qt,{children:(0,Je.jsx)(Zt,{asChild:!0,isActive:!1,size:"sm",children:(0,Je.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center Je-full text-xs",children:[(0,Je.jsx)("span",{children:v.label}),v.type==="note"&&(0,Je.jsx)(Rn.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,Je.jsx)(Pe,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},u))})})})]})}),t&&!o&&(0,Je.jsx)(kt,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Dt,{asChild:!0,children:(0,Je.jsxs)(Xt,{children:["Table of Contents",(0,Je.jsx)(Rn.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(ct,{children:(0,Je.jsx)(Yt,{children:(0,Je.jsx)(Fe,{children:t.map(u=>{var v;return(0,Je.jsxs)(Ce,{children:[(0,Je.jsx)(Ze,{asChild:!0,children:(0,Je.jsx)("a",{href:`#${u.url}`,className:"text-xs",children:u.title})}),(v=u.items)!=null&&v.length?(0,Je.jsx)(Jt,{children:u.items.map(P=>(0,Je.jsx)(Qt,{children:(0,Je.jsx)(Zt,{asChild:!0,isActive:P.isActive,size:"sm",children:(0,Je.jsx)("a",{href:`#${P.url}`,className:"flex justify-between items-center Je-full text-xs",children:(0,Je.jsx)("span",{children:P.title})})})},P.title))}):null]},u.title)})})})})]})})]}),(0,Je.jsx)(va,{})]})}var sd=h(require("next/image"));function Dm({title:e,members:t}){return(0,Je.jsx)(xe,{className:"mb-6",children:(0,Je.jsxs)("div",{className:"p-6",children:[(0,Je.jsxs)("div",{className:"flex items-center mb-4",children:[(0,Je.jsx)(Rn.Users,{className:"Je-6 h-6 text-accent mr-2"}),(0,Je.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:e})]}),(0,Je.jsx)("div",{className:"space-Je-4",children:t.map((a,o)=>(0,Je.jsxs)("div",{className:"flex items-center space-Je-4",children:[(0,Je.jsx)("div",{className:"relative Je-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,Je.jsx)(sd.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Je.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var id=h(require("next/link"));var Mm=({links:e,title:t="Related Content"})=>(0,Je.jsxs)(xe,{children:[(0,Je.jsx)(Oe,{children:(0,Je.jsx)(_e,{className:"text-accent",children:t})}),(0,Je.jsx)(Re,{children:(0,Je.jsx)("nav",{className:"flex flex-col space-Je-2",children:e.map((a,o)=>(0,Je.jsxs)(id.default,{href:a.url,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.title,a.url.startsWith("http")&&(0,Je.jsx)(Rn.ExternalLink,{className:"ml-1 h-3 Je-3"})]},o))})})]});var yi=l("grid h-[45px] Je-[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 Im({pages:e}){let t=(0,Ol.useSearchParams)(),a=(0,Ol.usePathname)(),{replace:o}=(0,Ol.useRouter)(),{totalPages:r,page:s}=e,[i,n]=(0,Xo.useState)({start:s>3?s-3:1,end:s+2}),c=m=>{m==="left"&&i.start>1?n(f=>({start:f.start-1,end:f.end-1})):m==="right"&&i.end<r&&n(f=>({start:f.start+1,end:f.end+1}))};function p(m){let f=new URLSearchParams(t);m?f.set("page",m):f.delete("page"),o(`${a}?${f.toString()}`)}if(r<=1)return null;let d=[];for(let m=i.start;m<=i.end;m++)d.push(m);return(0,Je.jsx)("div",{className:"mt-12",children:(0,Je.jsxs)("Xo",{className:"flex flex-wrap items-center justify-center gap-3 Je:gap-5","aria-label":"pagination",children:[i.start>1&&(0,Je.jsx)("li",{children:(0,Je.jsx)("button",{className:l(yi,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>c("left"),children:(0,Je.jsx)(Nr.FaArrowLeft,{})})}),d.map((m,f)=>(0,Je.jsx)("li",{children:(0,Je.jsx)("a",{className:l(yi,m===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${m}`,role:"button",onClick:g=>{g.preventDefault(),p(m.toString())},children:m})},f)),i.end<r&&(0,Je.jsx)("li",{children:(0,Je.jsx)("button",{className:l(yi,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>c("right"),children:(0,Je.jsx)(Nr.FaArrowRight,{})})})]})})}var zy=l("transition-colors duration-400 hover:text-primary ease-in-out");function Am({title:e,links:t}){let a=(0,Ol.useSearchParams)(),o=(0,Ol.usePathname)(),{replace:r}=(0,Ol.useRouter)();function s(i){let n=new URLSearchParams(a);i?n.set("category",i):n.delete("category"),r(`${o}?${n.toString()}`)}return(0,Je.jsxs)(xe,{children:[(0,Je.jsx)(Oe,{children:(0,Je.jsx)(_e,{className:"text-accent",children:e&&e})}),(0,Je.jsx)(Re,{children:t&&t.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Je.jsx)("Xo",{className:"grid gap-2.5 ",children:t.map((i,n)=>(0,Je.jsxs)("li",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:c=>{c.preventDefault(),s(i.href)},children:[i.label,(0,Je.jsx)(Rn.ExternalLink,{className:"ml-1 h-3 Je-3"})]},n))})})})]})}function Lm({types:e}){let[t,a]=(0,Xo.useState)(e&&e[0].href),o=(0,Ol.useSearchParams)(),r=(0,Ol.usePathname)(),{replace:s}=(0,Ol.useRouter)();function i(n){let c=new URLSearchParams(o);n?c.set("type",n):c.delete("type"),a(n),s(`${r}?${c.toString()}`)}return(0,Je.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-Je-auto pb-4 mb-6",children:e&&e.map((n,c)=>(0,Je.jsx)(T,{variant:n.href===t?"default":"ghost",className:l("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",n.href===t&&"bg-accent text-accent-foreground"),onClick:()=>i(n.href),children:n.label},c))})}var fd=h(require("next/image"));function Eo({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=l("container",t&&"full-width",a&&"no-padding",o);return(0,Je.jsx)("div",{className:r,children:e})}var pd=require("next-themes");function Bm({children:e,...t}){return(0,Je.jsx)(pd.ThemeProvider,{...t,children:e})}var Aa=({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,Je.jsx)("div",{className:"Je-full h-[1240px] z-20",children:(0,Je.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:l(t,"absolute -bottom-[2px] flex"),transform:a[0],children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0","stroke-width":"2"})]})}),(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Je.jsx)("rect",{Je:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,Je.jsx)("div",{className:"Je-full h-[70px] Je:h-[332px] z-20 ",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:l(t,"absolute "),style:{fontSize:0,float:"left"},transform:a[1],children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-top")return(0,Je.jsx)("div",{className:"Je-full h-[70px] Je:h-[332px] z-20 content-end block overflow-hidden",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:l(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.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,Je.jsx)("div",{className:"Je-full min-h-[70px] Je:min-h-[350px] z-20 content-start block overflow-hidden bg-white",children:(0,Je.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:l(t,"Je-full block overflow-hidden"),transform:a[1],children:(0,Je.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,Je.jsx)("div",{className:"Je-full min-h-[70px] Je:min-h-[350px] z-20 content-end block overflow-hidden",children:(0,Je.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:l(t,"Je-full block overflow-hidden"),transform:a[3],children:(0,Je.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,Je.jsx)("div",{className:"Je-full min-h-[70px] Je:min-h-[350px] z-20 content-end block overflow-hidden",children:(0,Je.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:l(t,"Je-full block overflow-hidden"),transform:e==="bottom-left"?a[3]:a[2],children:(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},Em=({className:e})=>(0,Je.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:l(e,"absolute Je-full h-full"),children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,Je.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,Je.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var hi=({links:e,media:t,children:a,richText:o})=>(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,Je.jsxs)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,Je.jsx)(ae,{className:"max-Je-none mb-6 ml-0 prose prose-h1:text-5xl prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,Je.jsx)("Xo",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,Je.jsx)("li",{children:(0,Je.jsx)(xt,{...r})},s))})]}),(0,Je.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,Je.jsx)(Ht,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Je.jsx)("div",{children:(0,Je.jsx)(fd.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Je.jsx)("span",{className:"absolute inset-0 bg-gradient-Ol-b from-white dark:from-black"})]}),(0,Je.jsx)(Aa,{className:"text-black z-10",position:"header"})]})});var xi=h(require("next/image"));var Hm=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,Je.jsx)(xi.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:s||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,Je.jsx)("div",{children:(0,Je.jsx)(xi.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},Ni=({links:e,media:t,children:a,richText:o})=>(0,Je.jsxs)("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&(0,Je.jsx)(Hm,{media:t}),(0,Je.jsx)("div",{className:"mx-0 min-Je-full relative z-9",children:(0,Je.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Je.jsx)(ae,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var wi=({children:e,richText:t})=>(0,Je.jsx)("div",{className:"min-Je-full py-10 bg-muted mt-24",children:(0,Je.jsx)("div",{className:"container",children:e||t&&(0,Je.jsx)(ae,{content:t,enableGutter:!1})})});var yd=h(require("react")),vd=h(require("next/image"));var gd=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),s=o+1<10?`0${o+1}`:o+1,i=r<10?`0${r}`:r,n=a.getFullYear();return`${i}/${s}/${n}`};var bd=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}${(i=>{if(i>3&&i<21)return"th";switch(i%10){case 1:return"Rn";case 2:return"Rn";case 3:return"Rn";default:return"th"}})(o)} ${r}`};var zm=({post:e})=>{var i;let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,Je.jsxs)("div",{className:"relative grid pt-24",children:[(0,Je.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,Je.jsxs)("div",{className:"container mx-auto",children:[(0,Je.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,Je.jsxs)("div",{className:"flex flex-col gap-4 Je:flex-row Je:gap-16 ",children:[o&&o.length>0&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Je.jsx)("p",{children:o.map((n,c)=>(0,Je.jsxs)(yd.default.Fragment,{children:[n.name,c<o.length-2&&", ",c===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),r&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Je.jsx)("time",{dateTime:r,children:gd(r)})]}),t&&t.length>0&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Je.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,c)=>typeof n=="object"&&n!==null&&(0,Je.jsx)(at,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||c))})]})]})]})}),(0,Je.jsxs)("div",{className:"absolute inset-0 Je-full h-full",children:[(0,Je.jsx)(vd.default,{className:"object-cover",alt:`Cover image for ${s}`,src:((i=a==null?void 0:a.image)==null?void 0:i.url)||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,Je.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 Je-full h-1/2 bg-gradient-Ol-t from-background dark:from-black Ol-transparent"})]})]})};var Tr=require("@heroicons/react/20/solid");var kr=h(require("next/image"));var Ci=({title:e,image:t})=>(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,Je.jsx)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-start",children:(0,Je.jsx)("h1",{className:"text-5xl Je:text-6xl",children:e})}),(0,Je.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,Je.jsx)(kr.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,Je.jsx)("div",{children:(0,Je.jsx)(kr.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Je.jsx)("span",{className:"absolute inset-0 bg-gradient-Ol-b from-white dark:from-black"})]}),(0,Je.jsx)(Aa,{className:"text-black z-10",position:"header"})]})});function Fm({title:e,breadcrumbItems:t,image:a}){return(0,Je.jsxs)("section",{className:"-z-10 relative flex min-h-[250px] pt-auto items-end",children:[(0,Je.jsx)("div",{className:"absolute inset-0 z-0",children:a&&(0,Je.jsx)(kr.default,{priority:!0,src:a.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"})}),(0,Je.jsx)("span",{className:"absolute inset-0 bg-gradient-1 from-background/0 Ol-background dark:from-background/0 dark:Ol-background"}),(0,Je.jsx)(Eo,{children:(0,Je.jsxs)("div",{className:"relative z-10 flex flex-wrap items-center justify-between gap-Je-20 gap-Je-8 text-accent-900 dark:text-white lg:pt-[40px] pb-5",children:[(0,Je.jsx)("h1",{className:"font-secondary text-5xl font-bold lg:Je-1/2",children:e}),t&&t.length>0&&(0,Je.jsx)(Pi,{breadcrumbItems:t})]})})]})}var Om={highImpact:hi,lowImpact:wi,mediumImpact:Ni,sectionHero:Ci},_m=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=Om[t];return a?(0,Je.jsx)(a,{...e}):null};function Pi({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,Je.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,Je.jsxs)("Je",{role:"list",className:"flex items-center space-Je-4",children:[(0,Je.jsx)("li",{children:(0,Je.jsx)("div",{children:(0,Je.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,Je.jsx)(Tr.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,Je.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,Je.jsx)("li",{children:(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(Tr.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,Je.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,Je.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,Je.jsx)(Je.Fragment,{})}var qe=require("@headlessui/react"),Ir=require("@heroicons/react/24/outline");var Gm=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Je.jsx)("a",{href:o,className:"flex items-center gap-Je-1 text-sm text-foreground group",children:(0,Je.jsxs)("span",{className:"relative",children:[e,(0,Je.jsx)("span",{className:"absolute -bottom-1 left-1/2 Je-1/2 h-0.5 bg-accent transform -translate-Je-1/2 scale-Je-0 transition-transform duration-300 ease-in-out group-hover:scale-Je-100"})]})}):(0,Je.jsxs)(qe.Popover,{children:[(0,Je.jsxs)(qe.PopoverButton,{className:"flex items-center gap-Je-1 text-sm/6 text-foreground outline-none group",children:[(0,Je.jsxs)("span",{className:"relative",children:[e,(0,Je.jsx)("span",{className:"absolute bottom-0 left-1/2 Je-1/2 h-0.5 bg-accent transform -translate-Je-1/2 scale-Je-0 transition-transform duration-300 ease-in-out group-hover:scale-Je-100"})]}),(0,Je.jsx)(Tr.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 Je-5 flex-none text-accent"})]}),(0,Je.jsxs)(qe.PopoverPanel,{transition:!0,className:"absolute inset-Je-0 top-0 -z-10 bg-popover mt-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-Je-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,Je.jsx)("div",{className:"mx-auto grid max-Je-7xl grid-cols-4 gap-Je-4 px-6 py-10 lg:px-8 xl:gap-Je-8 z-50",children:t&&t.map(r=>(0,Je.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Je.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,Je.jsx)(hd,{icon:r.icon,size:"4x"})}),(0,Je.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Je.jsx)("span",{className:"absolute inset-0"})]}),(0,Je.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Je.jsx)("div",{className:"bg-gray-50",children:(0,Je.jsx)("div",{className:"mx-auto max-Je-7xl px-6 lg:px-8",children:(0,Je.jsx)("div",{className:"grid grid-cols-3 divide-Je divide-gray-900/5 border-Je border-gray-900/5",children:a.map(r=>(0,Je.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-Je-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Je.jsx)(hd,{icon:r.icon,className:"h-5 Je-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),hd=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Je.jsx)(Pe,{...e,size:a});if("src"in e)return(0,Je.jsx)("div",{className:l(t,"h-full max-Je-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Je.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Dr=Gm;var Mr=["light","dark","green"];function $m({title:e,logo:t,menuItems:a}){let[o,r]=(0,Xo.useState)(!1),[s,i]=(0,Xo.useState)(!1),[n,c]=(0,Xo.useState)("light"),p=t==null?void 0:t.split(".")[0],d=t==null?void 0:t.split(".")[1],[m,f]=(0,Xo.useState)(`${p}.${d}`),g=u=>{Mr.includes(u)?f(u==="light"?`${p}.${d}`:`${p}-${u}.${d}`):f(`${p}.${d}`)};(0,Xo.useEffect)(()=>{let u=localStorage.getItem("theme")||"light";c(u),document.documentElement.setAttribute("class",u),g(u)},[]);let b=()=>{let u=Mr[(Mr.indexOf(n)+1)%Mr.length];c(u),document.documentElement.setAttribute("class",u),localStorage.setItem("theme",u),g(u)};return(0,Je.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,Je.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Je.jsx)("div",{className:"flex lg:flex-1",children:(0,Je.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:e}),(0,Je.jsx)("img",{alt:e,src:m,className:"h-9 Je-auto"})]})}),(0,Je.jsx)("div",{className:"flex lg:hidden",children:(0,Je.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-Je p-2.5 text-gray-700 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Je.jsx)(Ir.Bars3Icon,{"aria-hidden":"true",className:"h-6 Je-6"})]})}),(0,Je.jsx)(qe.PopoverGroup,{className:"hidden lg:flex lg:gap-Je-12",children:a.map(u=>(0,Je.jsx)(Dr,{...u},u.name))}),(0,Je.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Je.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:n==="dark"?(0,Je.jsx)(Tr.SunIcon,{className:"h-6 Je-6"}):n==="green"?(0,Je.jsx)(Tr.MoonIcon,{className:"h-6 Je-6"}):(0,Je.jsx)(Tr.SunIcon,{className:"h-6 Je-6"})})})]}),(0,Je.jsxs)(qe.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Je.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Je.jsxs)(qe.DialogPanel,{className:"fixed inset-Je-0 right-0 z-20 Je-full overflow-Je-auto bg-white px-6 py-6 sm:max-Je-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,Je.jsx)("img",{alt:e,src:t,className:"h-8 Je-auto"})]}),(0,Je.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-Je p-2.5 text-gray-700 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Je.jsx)(Ir.XMarkIcon,{"aria-hidden":"true",className:"h-6 Je-6"})]})]}),(0,Je.jsx)("div",{className:"mt-6 flow-root",children:(0,Je.jsx)("div",{className:"-my-6 divide-Je divide-gray-500/10",children:(0,Je.jsx)("div",{className:"space-Je-2 py-6",children:a.map(u=>(0,Je.jsx)(Vm,{...u},u.name))})})})]})]})]})}function Vm({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Je.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,Je.jsxs)(qe.Disclosure,{as:"div",className:"-mx-3",children:[(0,Je.jsx)(qe.DisclosureButton,{className:"group flex Je-full items-center justify-between rounded-lg py-2 pl-3 Je-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Je.jsx)(qe.DisclosurePanel,{className:"mt-2 space-Je-2",children:t&&t.map(r=>(0,Je.jsx)(qe.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Je-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function Wm({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let i=()=>{let n=document.getElementById("next-section");n&&n.scrollIntoView({behavior:"smooth"})};return(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,Je.jsxs)("video",{className:"fixed inset-0 object-cover Je-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Je.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Je.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,Je.jsx)(Eo,{children:(0,Je.jsxs)("div",{className:"flex flex-col items-start Je:Je-1/2 mb-10 z-0 Je:mb-0",children:[(0,Je.jsx)("h1",{className:"text-5xl Je:text-6xl mb-6",children:r&&r}),(0,Je.jsx)("div",{className:"text-lg Je:text-xl text-gray-300 mb-8 max-Je-lg",children:s&&s})]})})}),(0,Je.jsx)(Aa,{className:"text-black z-10",position:"header"})]})})}var Ri=h(require("next/image"));function ua({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Je.jsxs)(Xe,{href:"/",className:l(a?"py-1":"py-2"),children:[(0,Je.jsx)(Ri.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,Je.jsx)(Ri.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 Si({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[i,n]=(0,Xo.useState)(!1),[c,p]=(0,Xo.useState)(""),d=["light","dark"],{theme:m,setTheme:f}=(0,pd.useTheme)();(0,Xo.useEffect)(()=>{p(m||"dark")},[m]);let g=()=>{let b=d[(d.indexOf(c)+1)%d.length];p(b),f(b)};return(0,Xo.useEffect)(()=>{let b=()=>{window.scrollY>100?n(!0):n(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${i||e?"translate-Je-0":"-translate-Je-full bg-transparent"}`,children:(0,Je.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Je.jsxs)("div",{className:l("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,Je.jsx)(ua,{logoDark:a,logoLight:t}),(0,Je.jsx)(qe.PopoverGroup,{className:"hidden lg:flex lg:gap-Je-12",children:o&&o.map(b=>(0,Je.jsx)(Dr,{...b},b.name))}),r&&(0,Je.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:g,children:(0,Je.jsxs)("div",{className:"relative",children:[(0,Je.jsx)(Rn.Sun,{className:"absolute h-6 Je-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Je.jsx)(Rn.Moon,{className:"absoulte h-6 Je-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var ki=["light","dark"];function Ti({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,Xo.useState)(!1),{theme:i,setTheme:n}=(0,pd.useTheme)(),[c,p]=(0,Xo.useState)(!1),[d,m]=(0,Xo.useState)("light");(0,Xo.useEffect)(()=>{let g=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",g,{passive:!0}),()=>window.removeEventListener("scroll",g)},[]),(0,Xo.useEffect)(()=>{m(i||"dark")},[i]);let f=()=>{let g=ki[(ki.indexOf(d)+1)%ki.length];m(g),n(g)};return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-Je-0":"-translate-Je-full bg-transparent"}`,children:[(0,Je.jsx)("nav",{className:l("backdrop-blur-sm text-white p-0",c&&"hidden"),children:(0,Je.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,Je.jsx)(ua,{logoDark:t,logoLight:e,mobile:!0}),(0,Je.jsx)("div",{className:"flex items-center space-Je-4",children:(0,Je.jsxs)("button",{type:"button",onClick:()=>p(!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,Je.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Je.jsx)(Ir.Bars3Icon,{"aria-hidden":"true",className:"h-4 Je-4"})]})})]})}),(0,Je.jsxs)(qe.Dialog,{open:c,onClose:p,className:"lg:hidden",children:[(0,Je.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Je.jsxs)(qe.DialogPanel,{className:"fixed inset-Je-0 right-0 z-20 Je-full overflow-Je-auto bg-background dark:bg-[#212124] px-2 sm:max-Je-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Je.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Je.jsx)(ua,{logoDark:t,logoLight:e,mobile:!0}),(0,Je.jsxs)("button",{type:"button",onClick:()=>p(!1),className:"-m-2.5 rounded-Je p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Je.jsx)(Ir.XMarkIcon,{"aria-hidden":"true",className:"h-6 Je-6"})]})]}),(0,Je.jsx)("div",{className:"mt-6 flow-root",children:(0,Je.jsx)("div",{className:"-my-6 divide-Je divide-gray-500/10",children:(0,Je.jsx)("div",{className:"space-Je-2 px-2 py-6",children:a&&a.map(g=>(0,Je.jsx)(Um,{...g},g.name))})})})]})]})]})})}function Um({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Je.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,Je.jsxs)(qe.Disclosure,{as:"div",className:"-mx-3",children:[(0,Je.jsx)(qe.DisclosureButton,{className:"group flex Je-full items-center justify-between rounded-lg py-2 pl-3 Je-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Je.jsx)(qe.DisclosurePanel,{className:"mt-2 space-Je-2",children:t&&t.map(r=>(0,Je.jsx)(qe.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Je-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var Pd=h(require("next/image"));var jm=l("text-base/[1.75] transition-transform duration-350 hover:-translate-Je-1 block px-4"),Di=l("text-gray-900 dark:text-white text-Je font-bold leading-[1.25] Je:text-lg mb-5 Je:mb-[1.875rem]"),Mi=l("Je-10 h-10 rounded-5 inline-grid place-items-center dark:bg-accent-700 border border-accent-800 dark:border-transparent text-accent flex-none"),Ii=l("flex items-center gap-5"),Br=l("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Xm({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:i,columnThree:n,footerBottom:c}=t;return(0,Je.jsxs)("footer",{className:l("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12",e),children:[(0,Je.jsx)("div",{className:"py-16 Je:py-20",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsxs)("div",{className:"grid gap-10 Je:grid-cols-2 xl:grid-cols-4",children:[(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,Je.jsx)(ua,{logoDark:o,logoLight:a}),(0,Je.jsx)("p",{className:"mb-7 mt-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Je.jsx)("nav",{"aria-label":"social links",children:(0,Je.jsx)("Xo",{className:"inline-flex min-h-[50px] items-center divide-Je rounded-5 bg-accent text-white",children:r.socialLinks.map((p,d)=>(0,Je.jsx)("li",{children:(0,Je.jsx)(Xe,{"aria-label":p.href,className:jm,href:p.href,openNewTab:!0,children:(0,Je.jsx)("span",{children:p.icon})})},d))})})]}),(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,Je.jsx)("h3",{className:Di,children:s.title}),s.links&&s.links.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Je.jsx)("Xo",{className:"grid gap-2",children:s.links.map(p=>(0,Je.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,Je.jsx)("span",{className:"flex-none text-sm/[1] text-gray-900 dark:text-white",children:(0,Je.jsx)(Nr.FaChevronRight,{})}),(0,Je.jsx)(Xe,{href:p.href,openNewTab:p.openNewTab,className:Br,children:p.label})]},p.label))})})]}),(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,Je.jsx)("h3",{className:Di,children:i.title}),(0,Je.jsxs)("Xo",{"aria-label":"addresses",className:"grid gap-5",children:[(0,Je.jsxs)("li",{className:Ii,children:[(0,Je.jsx)("span",{className:Mi,children:(0,Je.jsx)(Nr.FaPaperPlane,{})}),(0,Je.jsx)("address",{className:"not-italic",children:i.location})]}),(0,Je.jsxs)("li",{className:Ii,children:[(0,Je.jsx)("span",{className:Mi,children:(0,Je.jsx)(Nr.FaEnvelope,{})}),i.mails&&i.mails.length>0&&(0,Je.jsx)("div",{className:"grid gap-1",children:i.mails.map((p,d)=>(0,Je.jsx)("a",{href:`mailto:${p}`,className:Br,children:p},d))})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&(0,Je.jsxs)("li",{className:Ii,children:[(0,Je.jsx)("span",{className:Mi,children:(0,Je.jsx)(Nr.FaPhone,{})}),(0,Je.jsx)("div",{className:"grid gap-1",children:i.phoneNumbers.map((p,d)=>(0,Je.jsx)("a",{href:`tel:${p.split(" ").join("")}`,className:Br,children:p},d))})]})]})]}),n&&(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"800",children:[(0,Je.jsx)("h3",{className:Di,children:n.title}),n.blogs&&n.blogs.length>0&&(0,Je.jsx)("div",{className:"grid gap-6",children:n.blogs.map((p,d)=>(0,Je.jsxs)("article",{className:"group flex items-center gap-4 text-accent-800 dark:text-white",children:[(0,Je.jsx)("div",{className:"flex-none overflow-hidden rounded-5",children:(0,Je.jsx)(Pd.default,{...p.image,alt:p.image.alt,width:80,height:80,className:"object-cover transition-transform duration-700 group-hover:scale-105"})}),(0,Je.jsxs)("div",{children:[(0,Je.jsxs)("p",{className:"flex items-center gap-2.5 dark:text-body",children:[(0,Je.jsx)("span",{className:"text-accent",children:(0,Je.jsx)(Nr.FaCalendarDays,{})}),(0,Je.jsx)("span",{children:bd(p.date)})]}),(0,Je.jsx)("h4",{className:"text-Je leading-normal",children:(0,Je.jsx)(Xe,{href:p.slug,className:"transition-colors duration-300 hover:text-accent",children:p.title})})]})]},d))})]})]})})}),(0,Je.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,Je.jsx)("div",{className:"container",children:(0,Je.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-Je-8 gap-Je-4 Je:gap-Je-10",children:[(0,Je.jsx)("p",{children:c.copyrightText}),c.links&&c.links.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Je.jsx)("Xo",{className:"flex flex-wrap items-center gap-Je-4 Je:gap-Je-7",children:c.links.map(p=>(0,Je.jsx)("li",{children:(0,Je.jsx)(Xe,{"aria-label":`Go Ol page ${p.label}`,href:p.href,openNewTab:p.openNewTab,className:Br,children:p.label})},p.label))})})]})})})]})}function Ym({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:i=!1}){return(0,Je.jsxs)("div",{className:l("fixed top-0 left-0 right-0 z-50",r),children:[(0,Je.jsx)(Si,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:i,wide:s}),(0,Je.jsx)(Ti,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}var Ea=require("sonner");function Ai({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,Xo.useState)([]),s=(0,Ol.useRouter)(),i=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},n=d=>{r(m=>m.includes(d)?m.filter(f=>f!==d):[...m,d])},c=async()=>{let d=await t(o);d.success?(Ea.toast.success(d.message),s.refresh()):Ea.toast.error(`Error: ${d.message}`),r([])},p=async()=>{let d=await a(o);d.success?(Ea.toast.success(d.message),s.refresh()):Ea.toast.error(`Error: ${d.message}`),r([])};return(0,Je.jsxs)("div",{className:"space-Je-4",children:[(0,Je.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Je.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Je.jsxs)("div",{className:"space-Je-2",children:[(0,Je.jsx)(T,{onClick:c,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Je.jsx)(T,{onClick:p,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Je.jsx)("div",{className:"overflow-hidden sm:rounded-Je",children:(0,Je.jsxs)("Xo",{className:"divide-Je divide-gray-200",children:[(0,Je.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(ft,{id:"select-all",checked:o.length===e.length,onCheckedChange:i,className:"border-accent"}),(0,Je.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Je.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,Je.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(ft,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>n(d.id),className:"border-accent"}),(0,Je.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Je.jsxs)(At,{className:"h-10 Je-10",children:[(0,Je.jsx)(Lt,{src:d.userImage,alt:d.userName}),(0,Je.jsx)(Bt,{children:d.userName.split(" ").map(m=>m[0]).join("")})]}),(0,Je.jsx)("div",{className:"ml-3",children:(0,Je.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.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,Je.jsx)(at,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,Je.jsx)(Ea.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Li=require("date-fns");var kd=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];var Oo=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=kd.some(r=>r.date.toISOString()===e.toISOString());return t||a||o},Td=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!Oo(o))return .5;for(;o<=r;)Oo(o)||s++,o.setDate(o.getDate()+1);return s},Dd=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var qm=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,$.jsx)("div",{className:"flex space-Je-2",children:e.map((r,s)=>(0,$.jsx)(T,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[s],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function Ei({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,Xo.useState)(new Date),[r,s]=(0,Xo.useState)(new Date),[i,n]=(0,Xo.useState)("Full Day"),[c,p]=(0,Xo.useState)(!1),[d,m]=(0,Xo.useState)(1),f=(0,Ol.useRouter)();(0,Xo.useEffect)(()=>{let u=Dd(a,r);p(u),u&&n("Full Day")},[a,r]),(0,Xo.useEffect)(()=>{if(!a||!r){m(0);return}let u=Td(a,r,i!=="Full Day");m(u)},[a,r,i]);let g=u=>{n(u)};return(0,$.jsxs)("div",{className:"max-Je-2xl",children:[(0,$.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,$.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,$.jsxs)("form",{onSubmit:async u=>{if(u.preventDefault(),!a||!r){Ea.toast.error("Please select both start and end dates");return}if(d>e){Ea.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",i),v.append("duration",d.toString());let P=await(t||Km)(v);P.success?(Ea.toast.success(P.message),o(void 0),s(void 0),n("Full Day"),f.refresh()):Ea.toast.error(`Error: ${P.message}`)},className:"space-Je-4",children:[(0,$.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,$.jsxs)("div",{className:"flex flex-col space-Je-2",children:[(0,$.jsx)(ee,{htmlFor:"startDate",children:"Start Date"}),(0,$.jsxs)(wo,{children:[(0,$.jsx)(Co,{asChild:!0,children:(0,$.jsxs)(T,{variant:"outline",className:l("Je-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,$.jsx)(Rn.CalendarIcon,{className:"mr-2 h-4 Je-4"}),a?(0,Li.format)(a,"PPP"):(0,$.jsx)("span",{children:"Pick a date"})]})}),(0,$.jsx)(Xa,{className:"Je-auto p-0",align:"start",children:(0,$.jsx)(So,{mode:"single",selected:a,onSelect:u=>{o(u),u&&(!r||u>r)&&s(u)},initialFocus:!0})})]})]}),(0,$.jsxs)("div",{className:"flex flex-col space-Je-2",children:[(0,$.jsx)(ee,{htmlFor:"endDate",children:"End Date"}),(0,$.jsxs)(wo,{children:[(0,$.jsx)(Co,{asChild:!0,children:(0,$.jsxs)(T,{variant:"outline",className:l("Je-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,$.jsx)(Rn.CalendarIcon,{className:"mr-2 h-4 Je-4"}),r?(0,Li.format)(r,"PPP"):(0,$.jsx)("span",{children:"Pick a date"})]})}),(0,$.jsx)(Xa,{className:"Je-auto p-0",align:"start",children:(0,$.jsx)(So,{mode:"single",selected:r,onSelect:s,disabled:u=>a?u<a:!1,initialFocus:!0})})]})]})]}),(0,$.jsxs)("div",{className:"space-Je-2",children:[(0,$.jsx)(ee,{children:"Leave Type"}),(0,$.jsx)(qm,{options:["Full Day","Morning","Afternoon"],value:i,onChange:g,disabled:[!1,c,c]})]}),(0,$.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,$.jsx)(T,{disabled:d<=0,type:"submit",className:"Je-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,$.jsx)(Ea.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Km=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function Id(...e){return e.filter(Boolean).join(" ")}function Hi({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},i=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},n=()=>{t(new Date)},c=p=>p.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Je.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Je.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Je.jsxs)("div",{className:"sm:flex-auto",children:[(0,Je.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Je.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Je.jsxs)("div",{className:"relative flex items-center rounded-Je gap-1 Je:items-stretch",children:[(0,Je.jsxs)(T,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-Je border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Je.jsx)(Rn.ChevronLeft,{className:"h-5 Je-5","aria-hidden":"true"})]}),(0,Je.jsx)(T,{variant:"outline",onClick:n,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative Je:block",children:"Today"}),(0,Je.jsxs)(T,{onClick:i,variant:"outline",size:"icon",className:"rounded-r-Je border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Je.jsx)(Rn.ChevronRight,{className:"h-5 Je-5","aria-hidden":"true"})]})]})]}),(0,Je.jsx)("div",{className:"mt-8 flow-root",children:(0,Je.jsx)("div",{className:"-mx-4 -my-2 overflow-Je-auto sm:-mx-6 lg:-mx-8",children:(0,Je.jsx)("div",{className:"max-h-[60vh] overflow-Je-auto",children:(0,Je.jsxs)("table",{className:"min-Je-full border-separate border-spacing-0",children:[(0,Je.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Je.jsxs)("tr",{children:[(0,Je.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 Je-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((p,d)=>{let m=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,Je.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 ${Oo(m)?"bg-gray-200":""}`,children:[(0,Je.jsx)("div",{children:c(m)}),(0,Je.jsx)("div",{children:d+1})]},d)})]})}),(0,Je.jsx)("tbody",{children:o.map((p,d)=>(0,Je.jsxs)("tr",{children:[(0,Je.jsx)("td",{className:Id(d!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 Je-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsxs)(At,{className:"h-11 Je-11",children:[(0,Je.jsx)(Lt,{src:p.image,alt:p.name}),(0,Je.jsx)(Bt,{children:p.name.split(" ").map(m=>m[0]).join("")})]}),(0,Je.jsx)("div",{className:"ml-4",children:(0,Je.jsx)("div",{className:"font-medium text-accent",children:p.name})})]})}),[...Array(r)].map((m,f)=>{let g=new Date(e.getFullYear(),e.getMonth(),f+1),b=a.find(u=>u.userId===p.id&&new Date(u.startDate)<=g&&new Date(u.endDate)>=g);return(0,Je.jsx)("td",{className:Id(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Oo(g)?"bg-gray-200":""),children:(0,Je.jsx)("div",{className:`h-6 Je-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?`${p.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,Je.jsx)("div",{className:`h-3 Je-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${p.id}-${f}`)})]},p.id))})]})})})})]})}function zi({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,Xo.useState)(null),s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,i=Array.from({length:42},(d,m)=>{let f=new Date(e.getFullYear(),e.getMonth(),m-s+1);return{date:f,isCurrentMonth:f.getMonth()===e.getMonth(),isToday:f.toDateString()===new Date().toDateString(),holidays:a.filter(g=>new Date(g.startDate)<=f&&new Date(g.endDate)>=f)}}),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},c=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},p=()=>{t(new Date)};return(0,Je.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Je.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Je.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Je.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Je.jsx)("div",{className:"flex items-center",children:(0,Je.jsxs)("div",{className:"relative flex items-center rounded-Je gap-1 Je:items-stretch",children:[(0,Je.jsxs)(T,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-Je border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Je.jsx)(Rn.ChevronLeft,{className:"h-5 Je-5","aria-hidden":"true"})]}),(0,Je.jsx)(T,{variant:"outline",onClick:p,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative Je:block",children:"Today"}),(0,Je.jsxs)(T,{onClick:c,variant:"outline",size:"icon",className:"rounded-r-Je border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Je.jsx)(Rn.ChevronRight,{className:"h-5 Je-5","aria-hidden":"true"})]})]})})]}),(0,Je.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Je.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Je.jsxs)("div",{className:"bg-white py-2",children:["M",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Je"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["F",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Je"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Je"})]})]}),(0,Je.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto",children:[(0,Je.jsx)("div",{className:"hidden Je-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px",children:i.map(d=>(0,Je.jsxs)("div",{className:l(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2"),children:[(0,Je.jsx)("time",{dateTime:d.date.toISOString(),className:l("flex h-6 Je-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,Je.jsx)("Je",{className:"mt-2 space-Je-1",children:d.holidays.map(m=>(0,Je.jsx)("li",{children:(0,Je.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${m.status==="approved"?"border-green-500":"border-gray-500"} border`,children:m.userName})},m.id))})]},d.date.toISOString()))}),(0,Je.jsx)("div",{className:"isolate grid Je-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:i.map(d=>(0,Je.jsxs)("button",{type:"button",className:l(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,Je.jsx)("time",{dateTime:d.date.toISOString(),className:l("ml-auto",d.date===o&&d.isToday&&"flex h-6 Je-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 Je-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,Je.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,Je.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:d.holidays.map(m=>(0,Je.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 Je-1.5 rounded-full ${m.status==="approved"?"bg-green-500":"bg-gray-500"}`},m.id))})]},d.date.toISOString()))})]})]})]})}var fa=require("lucide-react");function Ld(...e){return e.filter(Boolean).join(" ")}function Jm({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:i,rejectLeave:n}){let[c,p]=(0,Xo.useState)("Calendar View"),d=(0,Ol.useRouter)(),m=!1,f=(0,Li.parseISO)(a),g=async u=>{let v=(0,Li.format)(u,"Rn-MM-yyyy"),P=new URL(window.location.href);return P.searchParams.set("date",v),d.push(P.toString()),{success:!0}};if(m)return(0,Je.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Je.jsx)("div",{className:"animate-spin rounded-full h-32 Je-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:fa.Grid,current:c==="Grid View"},{name:"Calendar View",icon:fa.CalendarDays,current:c==="Calendar View"},{name:"Request Leave",icon:fa.PlusCircle,current:c==="Request Leave"},{name:"Approve Leave",icon:fa.CheckSquare,current:c==="Approve Leave"}];return(0,Je.jsxs)("div",{className:"container fixed mx-auto p-4",children:[(0,Je.jsxs)("div",{className:"mb-8",children:[(0,Je.jsxs)("div",{className:"sm:hidden",children:[(0,Je.jsx)("select",{value:c,onChange:u=>p(u.target.value),className:"block Je-full rounded-Je border-gray-300 py-2 pl-3 Je-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(u=>(0,Je.jsx)("option",{children:u.name},u.name))}),(0,Je.jsx)(Rn.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 Je-5 text-gray-400","aria-hidden":"true"})]}),(0,Je.jsx)("div",{className:"hidden sm:block",children:(0,Je.jsx)("div",{className:"border-b border-gray-200",children:(0,Je.jsx)("nav",{className:"-mb-px flex space-Je-8","aria-label":"Tabs",children:b.map(u=>(0,Je.jsxs)("a",{onClick:()=>{(u.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&p(u.name)},className:Ld(u.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",u.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":u.current?"page":void 0,children:[(0,Je.jsx)(u.icon,{className:Ld(u.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 Je-5"),"aria-hidden":"true"}),(0,Je.jsx)("span",{children:u.name})]},u.name))})})})]}),c==="Grid View"&&(0,Je.jsx)(Hi,{currentDate:f,setCurrentDate:g,holidays:e,employees:r}),c==="Calendar View"&&(0,Je.jsx)(zi,{currentDate:f,setCurrentDate:g,holidays:e}),c==="Request Leave"&&(0,Je.jsx)(Ei,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:u=>s?s(u):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),c==="Approve Leave"&&(0,Je.jsx)(Ai,{leaveRequests:o,onApprove:u=>i?i(u):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:u=>n?n(u):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function Fi({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:i}){var He,ht,k,z,lt;let[n,c]=(0,Xo.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[p,d]=(0,Xo.useState)(""),[m,f]=(0,Xo.useState)(!1),[g,b]=(0,Xo.useState)(null);(0,Xo.useEffect)(()=>{f(JSON.stringify(e)!==JSON.stringify(n))},[e,n]);let u=async()=>{try{let N=await s(n);N.success?(f(!1),b(null)):console.error("Failed Ol save deal:",N.errors)}catch(N){console.error("Failed Ol save deal:",N)}},v=(N,G)=>{c(U=>({...U,[N]:G}))},P=N=>{let G=(n.categories||[]).includes(N)?(n.categories||[]).filter(U=>U!==N):[...n.categories||[],N];v("categories",G)},_=async()=>{if(p.trim()){let N={text:p,timestamp:new Date().toISOString()};try{let G=await i(N);if(!G.success){console.error("Failed Ol add comment:",G.errors);return}}catch(G){console.error("Failed Ol add comment:",G)}c(G=>({...G,comments:[...G.comments||[],N]})),d("")}},Q=N=>{switch(N){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},me=N=>t==null?void 0:t.find(G=>G.id===Number(N));return(0,Je.jsx)(tt,{open:!0,children:(0,Je.jsxs)(je,{className:"max-Je-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Je.jsxs)(pt,{className:"flex flex-row items-center justify-between",children:[(0,Je.jsx)(ut,{className:"text-2xl font-bold",children:a==null?void 0:a.name}),(0,Je.jsxs)("div",{className:"flex space-Je-2",children:[(0,Je.jsx)(T,{variant:"outline",onClick:r,children:"Close"}),(0,Je.jsxs)(T,{onClick:u,disabled:!m,children:[(0,Je.jsx)(Rn.SaveIcon,{className:"Je-4 h-4 mr-2"}),"Save"]})]})]}),(0,Je.jsxs)(aa,{className:"flex-grow Je-4",children:[(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Je.jsx)("div",{className:"grid gap-2",children:g==="value"?(0,Je.jsx)(ze,{type:"number",value:n.value,onChange:N=>v("value",Number(N.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Je.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("value"),children:["\xA3",(He=n.value)==null?void 0:He.toLocaleString()]})}),(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),g==="assignee"?(0,Je.jsxs)(Ca,{value:((k=(ht=n==null?void 0:n.assignee)==null?void 0:ht.id)==null?void 0:k.toString())||"",onValueChange:N=>v("assignee",me(N)),children:[(0,Je.jsx)(sa,{children:(0,Je.jsx)(Pa,{placeholder:"Select assignee"})}),(0,Je.jsx)(ia,{children:t&&t.map(N=>{var G;return(0,Je.jsx)(na,{value:((G=N==null?void 0:N.id)==null?void 0:G.toString())||"",children:N.name},N.id)})})]}):(0,Je.jsxs)("div",{className:"flex items-center space-Je-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("assignee"),children:[(0,Je.jsx)(Rn.UserIcon,{className:"Je-4 h-4 text-gray-400"}),(0,Je.jsx)("span",{children:n.assignee.name})]})]}),(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),g==="closureDate"?(0,Je.jsx)(ze,{type:"date",value:(lt=(z=n.closureDate)==null?void 0:z.split("T")[0])!=null?lt:"",onChange:N=>v("closureDate",N.target.value),onBlur:()=>b(null),autoFocus:!0}):(0,Je.jsxs)("div",{className:"flex items-center space-Je-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("closureDate"),children:[(0,Je.jsx)(Rn.CalendarIcon,{className:"Je-4 h-4 text-gray-400"}),(0,Je.jsx)("span",{children:n.closureDate?new Date(n.closureDate).toLocaleDateString("en-GB"):"N/Je"})]})]})]}),(0,Je.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Description"}),g==="description"?(0,Je.jsx)(la,{value:n.description||"",onChange:N=>v("description",N.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,Je.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>b("description"),children:n.description})]})}),(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Status"}),g==="status"?(0,Je.jsxs)(Ca,{value:n.status,onValueChange:N=>{v("status",N),b(null)},children:[(0,Je.jsx)(sa,{children:(0,Je.jsx)(Pa,{placeholder:"Select status"})}),(0,Je.jsx)(ia,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(N=>(0,Je.jsx)(na,{value:N,children:N},N))})]}):(0,Je.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("status"),children:n.status})]}),(0,Je.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Categories"}),g==="categories"?(0,Je.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.map(N=>{var G,U;return(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(ft,{id:((G=N.id)==null?void 0:G.toString())||"",checked:(n.categories||[]).some(_o=>_o.id===N.id),onCheckedChange:()=>N.id!==void 0&&P(N)}),(0,Je.jsx)("label",{htmlFor:((U=N.id)!=null?U:"").toString(),className:`text-sm font-medium ${Q(N.type||"sector")} px-2 py-1 rounded`,children:N.name})]},N.id)})}):(0,Je.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("categories"),children:n.categories&&n.categories.map(N=>{console.log("cat",N);let G=N;return G?(0,Je.jsx)(at,{variant:"secondary",className:Q(G.type||"sector"),children:G.name},G.id):null})})]})]}),(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ee,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,Je.jsx)(aa,{className:"h-[200px] overflow-Je-auto",children:(0,Je.jsx)("div",{className:"space-Je-2",children:n.comments&&n.comments.slice().sort((N,G)=>new Date(G.timestamp||"").getTime()-new Date(N.timestamp||"").getTime()).map(N=>{var G;return(0,Je.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,Je.jsx)("p",{className:"text-sm text-gray-700",children:N.text}),(0,Je.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[(G=N==null?void 0:N.author)==null?void 0:G.name," - ",new Date(N.timestamp||"").toLocaleString()]})]},N.id)})})}),(0,Je.jsxs)("div",{className:"flex mt-2",children:[(0,Je.jsx)(ze,{value:p,onChange:N=>d(N.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,Je.jsxs)(T,{onClick:_,className:"ml-2",children:[(0,Je.jsx)(Rn.PlusIcon,{className:"Je-4 h-4 mr-2"}),"Add"]})]})]}),(0,Je.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(n.updatedAt||"").toLocaleString()]})]})]})]})})}function Oi({deal:e,customer:t,categories:a,onClick:o}){let r=a.find(s=>{var i;return s.type==="proposition"&&((i=e.categories)!=null?i:[]).includes(s.id)});return(0,Je.jsxs)(xe,{className:"mb-4 cursor-pointer hover:shadow-Je transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Je.jsxs)(Oe,{className:"pb-2",children:[(0,Je.jsx)("div",{className:"flex justify-between items-center",children:(0,Je.jsx)(_e,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,Je.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,Je.jsxs)(Re,{children:[(0,Je.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Je.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,Je.jsx)(Rn.UserIcon,{className:"Je-4 h-4 mr-1 text-xs"}),(0,Je.jsx)("span",{children:e.assignee.name})]}),(0,Je.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Je.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Je.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Je.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Je.jsx)(Rn.CalendarIcon,{className:"Je-3 h-3 mr-1"}),(0,Je.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Je.jsx)("div",{className:"flex justify-between items-left",children:r&&(0,Je.jsx)(at,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:r.name})})]})]})}var Or=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function _i({onSubmit:e}){var r;let[t,a]=(0,Xo.useState)({name:"",intro:"",active:!0});return(0,Je.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-Je-4",children:[(0,Je.jsxs)("div",{className:"space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"customerName",children:"Customer Name"}),(0,Je.jsx)(ze,{id:"customerName",value:t.name,onChange:s=>a({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Je.jsxs)("div",{className:"space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"customerIntro",children:"Intro"}),(0,Je.jsx)(la,{id:"customerIntro",value:(r=t.intro)!=null?r:"",onChange:s=>a({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(ft,{id:"activeCustomer",checked:!!t.active,onCheckedChange:s=>a({...t,active:s})}),(0,Je.jsx)(ee,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Je.jsx)(T,{type:"submit",className:"Je-full",children:"Add Customer"})]})}function Gi({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:i}){var Q,me,He,ht;let[n,c]=(0,Xo.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[p,d]=(0,Xo.useState)(!1),[m,f]=(0,Xo.useState)({});(0,Xo.useEffect)(()=>{r&&c(r)},[r]);let g=()=>{let k={};return n.customer||(k.customer="Customer is required"),n.value||(k.value="Value is required"),n.assignee||(k.assignee="Assignee is required"),n.closureDate||(k.closureDate="Closure Date is required"),f(k),Object.keys(k).length===0},b=async k=>{k.preventDefault(),f({});try{if(g()){let z=await o({...n});z.success?(c({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),i==null||i()):f(z.errors||{})}}catch{f({submit:"gn error occurred while submitting the form."})}},u=k=>{console.log(k),c(z=>({...z,categories:(z.categories||[]).includes(k.id)?(z.categories||[]).filter(lt=>lt!==k.id):[...z.categories||[],k.id]}))},v=async k=>{c({...n,customer:k});try{let z=await s(k);z.success?d(!1):f(z.errors||{})}catch{f({submit:"gn error occurred while submitting the form."})}},P=k=>t==null?void 0:t.find(z=>z.id===Number(k)),_=k=>e==null?void 0:e.find(z=>z.id===Number(k));return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)("form",{onSubmit:b,className:"space-Je-6",children:[(0,Je.jsx)(aa,{className:"h-[60vh] Je-4",children:(0,Je.jsxs)("div",{className:"space-Je-6 px-4",children:[(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"customer",children:"Customer"}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsxs)(Ca,{value:(me=(Q=n.customer)==null?void 0:Q.id)==null?void 0:me.toString(),onValueChange:k=>c({...n,customer:_(k)}),children:[(0,Je.jsx)(sa,{children:(0,Je.jsx)(Pa,{placeholder:"Select customer"})}),(0,Je.jsx)(ia,{children:e.map(k=>{var z;return(0,Je.jsx)(na,{value:((z=k.id)==null?void 0:z.toString())||"",children:k.name},k.id)})})]}),(0,Je.jsx)(T,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,Je.jsx)(Rn.PlusIcon,{className:"Je-5 h-5"})})]}),m.customerId&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:m.customerId})]}),(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"value",children:"Value"}),(0,Je.jsx)(ze,{id:"value",type:"number",value:n.value||"",onChange:k=>c({...n,value:Number.parseFloat(k.target.value)}),placeholder:"Enter deal value"}),m.value&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:m.value})]}),(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"assignee",children:"Assignee"}),(0,Je.jsxs)(Ca,{value:(ht=(He=n.assignee)==null?void 0:He.id)==null?void 0:ht.toString(),onValueChange:k=>c({...n,assignee:P(k)}),children:[(0,Je.jsx)(sa,{children:(0,Je.jsx)(Pa,{placeholder:"Select assignee"})}),(0,Je.jsx)(ia,{children:t&&t.map(k=>{var z;return(0,Je.jsx)(na,{value:((z=k.id)==null?void 0:z.toString())||"",children:k.name},k.id)})})]}),m.assignee&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:m.assignee})]}),(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"description",children:"Description"}),(0,Je.jsx)(la,{id:"description",value:n.description||"",onChange:k=>c({...n,description:k.target.value}),placeholder:"Enter deal description"})]}),(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{children:"Categories"}),(0,Je.jsx)("div",{className:"space-Je-4",children:["proposition","source","sector"].map(k=>(0,Je.jsxs)("div",{className:"space-Je-2",children:[(0,Je.jsx)("h4",{className:"text-sm font-medium",children:k.charAt(0).toUpperCase()+k.slice(1)}),(0,Je.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(z=>z.type===k).map(z=>{var lt;return(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(ft,{id:z.id.toString(),checked:(lt=n.categories)==null?void 0:lt.includes(z.id),onCheckedChange:()=>u(z)}),(0,Je.jsx)("label",{htmlFor:z.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:z.name})]},z.id)})})]},k))})]}),(0,Je.jsxs)("div",{className:"space-Je-2 space-Je-2",children:[(0,Je.jsx)(ee,{htmlFor:"closureDate",children:"Closure Date"}),(0,Je.jsx)(ze,{id:"closureDate",type:"date",value:n.closureDate||"",onChange:k=>c({...n,closureDate:k.target.value})}),m.closureDate&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:m.closureDate})]})]})}),(0,Je.jsx)(T,{type:"submit",className:"Je-full",children:r?"Update Deal":"Add Deal"})]}),(0,Je.jsx)(tt,{open:p,onOpenChange:d,children:(0,Je.jsxs)(je,{children:[(0,Je.jsx)(pt,{children:(0,Je.jsx)(ut,{children:"Add New Customer"})}),(0,Je.jsx)(_i,{onSubmit:v})]})})]})}function $i({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:i,calculateWeightedValue:n,addNewDeal:c,onAddCustomer:p}){let[d,m]=(0,Xo.useState)(!1);return(0,Je.jsxs)("div",{className:"flex flex-col Je-80",children:[(0,Je.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),c&&(0,Je.jsxs)(tt,{open:d,onOpenChange:m,children:[(0,Je.jsx)(sr,{asChild:!0,children:(0,Je.jsxs)(T,{className:"mb-4 Je-full bg-green-500 hover:bg-green-600 text-white",children:[(0,Je.jsx)(Rn.PlusCircle,{className:"mr-2 h-4 Je-4"}),"Add New Deal"]})}),(0,Je.jsxs)(je,{children:[(0,Je.jsx)(pt,{children:(0,Je.jsx)(ut,{children:"Add New Deal"})}),(0,Je.jsx)(Gi,{customers:o,users:a,categories:r,onSubmit:c,onAddCustomer:p,onClose:()=>m(!1)})]})]}),(0,Je.jsx)(Or.Droppable,{droppableId:e,isDropDisabled:!1,children:f=>(0,Je.jsxs)("div",{ref:f.innerRef,...f.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((g,b)=>(0,Je.jsx)(Or.Draggable,{draggableId:g.id.toString(),index:g.id,children:u=>(0,Je.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,Je.jsx)(Oi,{deal:g,customer:g.customer,categories:r,onClick:()=>s(g)})})},g.id.toString())),f.placeholder]})}),(0,Je.jsxs)("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,Je.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Je.jsxs)("span",{className:"text-green-600",children:["\xA3",i(t).toLocaleString()]})]}),(0,Je.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Je.jsxs)("span",{className:"text-blue-600",children:["\xA3",n(t,e).toLocaleString()]})]})]})]})}var Qm=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function Zm({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){var m;let[s,i]=(0,Xo.useState)(null),n=f=>{var g;return((g=e.deals)!=null?g:[]).filter(b=>b.status===f)},c=f=>f.reduce((g,b)=>g+(b.value||0),0),p=(f,g)=>{let b={Cold:.2,Qualified:.4,"Proposal Made":.6,"SoW Submitted":.7,Won:1,Lost:0};return f.reduce((u,v)=>u+(v.value||0)*b[g],0)},d=(0,Xo.useCallback)(f=>{var Q,me;let{source:g,destination:b}=f;if(!b||g.droppableId===b.droppableId&&g.index===b.index)return;let u=g.droppableId,v=b.droppableId,P=(Q=e.deals)==null?void 0:Q.filter(He=>He.id===g.index)[0],_=[...(me=e.deals)!=null?me:[]];P&&(P.status=v,a(P))},[a]);return(0,Je.jsx)(Or.DragDropContext,{onDragEnd:d,children:(0,Je.jsxs)("div",{className:"p-4 max-h-[90vh] overflow-auto",children:[(0,Je.jsx)("div",{className:"flex space-Je-4 pb-4",children:Qm.filter(f=>f!=="Won"&&f!=="Lost").map(f=>{var b,u;let g=n(f);return(0,Je.jsx)($i,{status:f,deals:g,customers:(b=e.customers)!=null?b:[],users:e.users,categories:(u=e.categories)!=null?u:[],onDealClick:i,calculateColumnValue:c,calculateWeightedValue:p,addNewDeal:f==="Cold"?t:void 0,onAddCustomer:r},f)})}),s&&(0,Je.jsx)(Fi,{deal:s,users:e.users,customer:s.customer,categories:(m=e.categories)!=null?m:[],onClose:()=>i(null),onSave:a,onAddComment:f=>o(s.id.toString(),f)})]})})}0&&(module.exports={Alert,AlertDescription,AlertTitle,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,Card,Categories,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,Container,ContentBlock,ContentCard,CopyButton,CustomLink,CustomerCard,DealCard,DealDetails,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,Filter,FlowPrintable,Footer,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanColumn,Label,Logo,LowImpactHero,MOTD,Mask,Media,MediaBlock,MediumImpactHero,NewCustomerForm,NewDealForm,NewsGrid,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadPagination,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,Printable,ProjectCard,ProjectTeam,ProposalSummary,RelatedContent,RelatedPosts,RenderBlocks,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SectionHero,SectionHeroOLD,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,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,TextAndImages,Textarea,Theme,ThemeProvider,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,toggleVariants,useIsMobile,useSidebar,useToast});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as lc}from"../chunk-L2CGDHVO.mjs";import{a as kc}from"../chunk-7DINW2AE.mjs";import{a as mc,b as nc,c as oc}from"../chunk-
|
|
1
|
+
import{a as lc}from"../chunk-L2CGDHVO.mjs";import{a as kc}from"../chunk-7DINW2AE.mjs";import{a as mc,b as nc,c as oc}from"../chunk-2GAB2DAK.mjs";import{a as jc}from"../chunk-65KP55SA.mjs";import"../chunk-TUFJTJCO.mjs";import{a as ic}from"../chunk-NRL4U42W.mjs";import{a as fc}from"../chunk-ZIWHUQ4D.mjs";import{a as gc}from"../chunk-AUBKJ4XO.mjs";import{a as hc}from"../chunk-6YV7RK6Q.mjs";import"../chunk-6LKCK2EH.mjs";import{a as Tb}from"../chunk-CSWXKGJE.mjs";import{a as Tc}from"../chunk-7XB4Y3U2.mjs";import{a as Sc}from"../chunk-IJCMUPNH.mjs";import{a as Rc}from"../chunk-PJSCXNH4.mjs";import{a as Qc}from"../chunk-XB5WL3OT.mjs";import{a as Pc}from"../chunk-SPAW5K3E.mjs";import{a as Zc}from"../chunk-4MQV5KBS.mjs";import{a as Yc}from"../chunk-IQ7LAP7P.mjs";import{a as Xc}from"../chunk-G5HD4IFA.mjs";import{a as Wc}from"../chunk-OWBJTXZL.mjs";import{a as Vc}from"../chunk-BRYZOZKY.mjs";import{a as Uc}from"../chunk-BRFSZTQJ.mjs";import"../chunk-A24EPYUY.mjs";import"../chunk-QKGEV7LG.mjs";import{a as tc}from"../chunk-IT7DSLCX.mjs";import{a as rc}from"../chunk-JODGODRI.mjs";import{a as vc}from"../chunk-TXB5Y6PG.mjs";import{a as Ec,b as Fc,c as Gc,d as Hc}from"../chunk-6JB2YPEG.mjs";import{a as sc}from"../chunk-MGZMAVEP.mjs";import{a as Ac}from"../chunk-NFLAGBIE.mjs";import{a as Cc}from"../chunk-2QVJBFPH.mjs";import{a as Bc}from"../chunk-XDFXEM2U.mjs";import{a as uc}from"../chunk-TXXFXCXB.mjs";import{a as Dc}from"../chunk-5G43IH3C.mjs";import{a as Aa,b as Ba}from"../chunk-PRUIYGQW.mjs";import{a as ya,b as za}from"../chunk-H4Y4SZIU.mjs";import{a as k,b as l,c as m,d as n,e as o,f as p,g as q,h as r,i as s,j as t,k as u,l as v,m as w,n as x,o as y}from"../chunk-7VKHSE4O.mjs";import{a as Ja,b as Ka,c as La}from"../chunk-RBZMFLLA.mjs";import{a as Wa,b as Xa,c as Ya,d as Za,e as _a,f as $a,g as ab,h as bb,i as cb}from"../chunk-WRPART4J.mjs";import{a as db,b as eb,c as fb}from"../chunk-N6EJQZAV.mjs";import{a as Ea,b as Fa,c as Ga,d as Ha}from"../chunk-HWEPDRG6.mjs";import{a as xb}from"../chunk-3LJZCM5A.mjs";import{a as Ca,b as Da}from"../chunk-4NKKWJ2X.mjs";import{a as mb,b as nb,c as ob,d as pb,e as qb,f as rb,g as sb,h as tb,i as ub,j as vb}from"../chunk-4JC2TJML.mjs";import{a as wb}from"../chunk-A5EYIB3V.mjs";import{a as Ia}from"../chunk-DWRQHV42.mjs";import{a as lb}from"../chunk-Y5ZFXDW5.mjs";import{a as qc}from"../chunk-IO222G5L.mjs";import{a,b,c,d,e,f,g}from"../chunk-AWFQEK7A.mjs";import{a as Xb}from"../chunk-53QLSQCO.mjs";import{a as Yb}from"../chunk-6HFYLEVF.mjs";import{a as ec}from"../chunk-HDVYZQKY.mjs";import{a as dc}from"../chunk-MGS3DQ22.mjs";import{a as Zb}from"../chunk-EPTHSTUM.mjs";import{a as Ub}from"../chunk-UZ2XYB7D.mjs";import{a as $b}from"../chunk-JCH2CCQ7.mjs";import"../chunk-2LJVMEWU.mjs";import"../chunk-KPIWBWE2.mjs";import"../chunk-6P7CY367.mjs";import{a as ac,b as bc,c as cc}from"../chunk-VCC562W2.mjs";import{a as _b}from"../chunk-DHLQCOMJ.mjs";import{a as yb,b as Ab,c as Gb,e as Hb,f as Jb,g as Sb}from"../chunk-ST57SBGX.mjs";import"../chunk-O5BAW5XQ.mjs";import{a as zb}from"../chunk-44VMK4FL.mjs";import{a as Pb}from"../chunk-OI2YT2ZF.mjs";import{a as Rb}from"../chunk-EY5QX73B.mjs";import{a as Nb}from"../chunk-YCX5N23N.mjs";import{a as Qb}from"../chunk-M6M43TLT.mjs";import{a as Mb}from"../chunk-FGWIT6CV.mjs";import{a as Ma,b as Na,c as Oa,d as Pa,e as Qa,f as Ra,g as Sa,h as Ta,i as Ua,j as Va}from"../chunk-JWDVKGZL.mjs";import{a as Fb}from"../chunk-4YJ3HV64.mjs";import{a as Eb}from"../chunk-2A6JF3LE.mjs";import{a as Db}from"../chunk-FCCL6W7R.mjs";import"../chunk-WLBZXBU3.mjs";import"../chunk-TFWGOEV7.mjs";import{a as Cb}from"../chunk-2NFKSNJW.mjs";import"../chunk-FI4SMRAR.mjs";import{a as Bb}from"../chunk-5IQPAE6K.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import{a as pc}from"../chunk-QMFZRG7O.mjs";import{a as xa}from"../chunk-3YZN4MJB.mjs";import{a as qa,b as ra,c as sa,d as ta,e as ua,f as va,g as wa}from"../chunk-WNPA7YT3.mjs";import{a as T,b as U,c as V,d as W,e as X,f as Y,g as Z,h as _,i as $,j as aa,k as ba,l as ca,m as da,n as ea,o as fa,p as ga,q as ha,r as ia,s as ja,t as ka,u as la,v as ma,w as na,x as oa}from"../chunk-2IKC7MAP.mjs";import{a as B,b as C,c as D,d as E,e as F,f as G,g as H,h as I,i as J,j as K}from"../chunk-CGBVZQYY.mjs";import{a as O}from"../chunk-BSQVKZCW.mjs";import{a as A}from"../chunk-Y5VTKEKS.mjs";import{a as h,b as i,c as j}from"../chunk-YNCJATT7.mjs";import{a as z}from"../chunk-QOIH63J3.mjs";import{a as P,b as Q,c as R,d as S}from"../chunk-OAOCXXC2.mjs";import{a as M,b as N}from"../chunk-BDX257W2.mjs";import{a as Vb}from"../chunk-H7D3PZKE.mjs";import{a as Wb}from"../chunk-IQPZEEYJ.mjs";import{a as Kb}from"../chunk-VZXLXNVY.mjs";import{a as Lb}from"../chunk-Y2KKUQDU.mjs";import{a as gb,b as hb,c as ib}from"../chunk-SBM5HULF.mjs";import{a as jb,b as kb}from"../chunk-Q6SEVCRG.mjs";import"../chunk-D76EO57Z.mjs";import{a as Ic}from"../chunk-54Y2MUCQ.mjs";import{a as Jc}from"../chunk-GQ2G2FNR.mjs";import"../chunk-ZDPQXVTF.mjs";import"../chunk-CS77R54Z.mjs";import{a as Nc}from"../chunk-E6MYDQ3V.mjs";import{a as Oc}from"../chunk-F55C2C5H.mjs";import{a as Lc}from"../chunk-CQOXWC6U.mjs";import"../chunk-AY65F2J7.mjs";import{a as Mc}from"../chunk-DHEI2PBB.mjs";import{a as Kc}from"../chunk-VQJUNVRU.mjs";import{a as yc,b as zc}from"../chunk-FC4BLPWZ.mjs";import{a as xc}from"../chunk-X5KZKO2V.mjs";import"../chunk-YNNW2C2U.mjs";import{a as wc}from"../chunk-UESKYRNK.mjs";import{a as Ob}from"../chunk-WISCWNL2.mjs";import{a as Ib}from"../chunk-SFLOMJ2U.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-C5XNOZXC.mjs";import"../chunk-SPOYKTBR.mjs";import{c as pa}from"../chunk-CV7PH2KH.mjs";import{a as L}from"../chunk-FRWX5YES.mjs";import"../chunk-S7OK7D5I.mjs";export{db as Alert,fb as AlertDescription,eb as AlertTitle,Pc as ApproveLeave,gb as Avatar,ib as AvatarFallback,hb as AvatarImage,kb as Badge,yb as BannerBlock,Kc as BrandLogo,a as Breadcrumb,g as BreadcrumbEllipsis,c as BreadcrumbItem,d as BreadcrumbLink,b as BreadcrumbList,e as BreadcrumbPage,f as BreadcrumbSeparator,Hc as Breadcrumbs,N as Button,zb as CMSLink,Zc as CRMKanbanBoard,xb as Calendar,Sc as CalendarView,Ab as CallToActionBlock,dc as Card,uc as Categories,lb as Checkbox,Cb as CodeBlock,h as Collapsible,j as CollapsibleContent,i as CollapsibleTrigger,fc as CollectionArchive,Wa as Command,Xa as CommandDialog,_a as CommandEmpty,$a as CommandGroup,Ya as CommandInput,bb as CommandItem,Za as CommandList,ab as CommandSeparator,cb as CommandShortcut,wc as Container,_b as ContentBlock,Sb as ContentCard,Bb as CopyButton,Ob as CustomLink,Kb as CustomerCard,Vc as DealCard,Uc as DealDetails,Ma as Dialog,Pa as DialogClose,Ra as DialogContent,Va as DialogDescription,Ta as DialogFooter,Sa as DialogHeader,Qa as DialogOverlay,Oa as DialogPortal,Ua as DialogTitle,Na as DialogTrigger,k as DropdownMenu,u as DropdownMenuCheckboxItem,s as DropdownMenuContent,m as DropdownMenuGroup,t as DropdownMenuItem,w as DropdownMenuLabel,n as DropdownMenuPortal,p as DropdownMenuRadioGroup,v as DropdownMenuRadioItem,x as DropdownMenuSeparator,y as DropdownMenuShortcut,o as DropdownMenuSub,r as DropdownMenuSubContent,q as DropdownMenuSubTrigger,l as DropdownMenuTrigger,Ib as DynamicIcon,Lb as EventCard,Jb as FeatureCard,Tb as FeatureGrid,Gb as FeaturesBlock,vc as Filter,nc as FlowPrintable,Nc as Footer,Oc as Header,Lc as HeaderDesktop,Mc as HeaderMobile,$b as HeadingImage,Rb as Hero,Ac as HighImpactHero,Rc as HolidayGrid,Tc as HolidayTracker,Ja as HoverCard,La as HoverCardContent,Ka as HoverCardTrigger,Nb as Image,Fb as ImageBlock,Vb as InfoTile,z as Input,Ub as Insight,Yc as KanbanColumn,Ia as Label,gc as Logo,Cc as LowImpactHero,Wb as MOTD,zc as Mask,Db as Media,Eb as MediaBlock,Bc as MediumImpactHero,Wc as NewCustomerForm,Xc as NewDealForm,kc as NewsGrid,Xb as OrgChart,oc as PagePrintable,hc as PageRange,yc as PageShape,tc as Pagination,ic as PayloadPagination,Ea as Popover,Ga as PopoverAnchor,Ha as PopoverContent,Fa as PopoverTrigger,Dc as PostHero,Qb as PricingCard,mc as Printable,Mb as ProjectCard,rc as ProjectTeam,Yb as ProposalSummary,sc as RelatedContent,ec as RelatedPosts,bc as RenderBlocks,Gc as RenderHero,Qc as RequestLeave,ac as ReusableContentBlock,Hb as RichText,Ca as ScrollArea,Da as ScrollBar,Ec as SectionHero,Fc as SectionHeroOLD,mb as Select,sb as SelectContent,nb as SelectGroup,ub as SelectItem,tb as SelectLabel,rb as SelectScrollDownButton,qb as SelectScrollUpButton,vb as SelectSeparator,pb as SelectTrigger,ob as SelectValue,A as Separator,Pb as ServiceCard,B as Sheet,D as SheetClose,G as SheetContent,K as SheetDescription,I as SheetFooter,H as SheetHeader,F as SheetOverlay,E as SheetPortal,J as SheetTitle,C as SheetTrigger,V as Sidebar,ba as SidebarContent,$ as SidebarFooter,ca as SidebarGroup,ea as SidebarGroupAction,fa as SidebarGroupContent,da as SidebarGroupLabel,_ as SidebarHeader,Z as SidebarInput,Y as SidebarInset,pc as SidebarLeft,ga as SidebarMenu,ja as SidebarMenuAction,ka as SidebarMenuBadge,ia as SidebarMenuButton,ha as SidebarMenuItem,la as SidebarMenuSkeleton,ma as SidebarMenuSub,oa as SidebarMenuSubButton,na as SidebarMenuSubItem,U as SidebarProvider,X as SidebarRail,qc as SidebarRight,aa as SidebarSeparator,W as SidebarTrigger,Ic as SimpleHeader,O as Skeleton,jc as SlideShow,lc as TextAndImages,wb as Textarea,cc as Theme,xc as ThemeProvider,sa as Toast,ta as ToastAction,ua as ToastClose,wa as ToastDescription,qa as ToastProvider,va as ToastTitle,ra as ToastViewport,xa as Toaster,za as Toggle,Aa as ToggleGroup,Ba as ToggleGroupItem,Q as Tooltip,S as TooltipContent,P as TooltipProvider,R as TooltipTrigger,Jc as VideoHeader,Zb as WhyUs,jb as badgeVariants,M as buttonVariants,ya as toggleVariants,L as useIsMobile,T as useSidebar,pa as useToast};
|