cortex-react-components 2.29.0-beta.3 → 2.29.0-beta.4
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-M3DLWHPQ.mjs → chunk-2FHOBKU5.mjs} +1 -1
- package/dist/{chunk-BLOKJ7Y2.mjs → chunk-2W5UZALU.mjs} +1 -1
- package/dist/{chunk-VWHOSOCB.mjs → chunk-3DXSTAQP.mjs} +1 -1
- package/dist/{chunk-ZKTIH47I.mjs → chunk-4745QCXP.mjs} +1 -1
- package/dist/{chunk-BEUDMDIW.mjs → chunk-4AACW32B.mjs} +1 -1
- package/dist/{chunk-C6RV2I5S.mjs → chunk-6MFAWZRQ.mjs} +1 -1
- package/dist/{chunk-3PAS4AKZ.mjs → chunk-76U5MXTI.mjs} +1 -1
- package/dist/{chunk-7HIL4GBK.mjs → chunk-7GWTDITT.mjs} +1 -1
- package/dist/{chunk-5ISPA3SI.mjs → chunk-AJ7A2ZQ3.mjs} +1 -1
- package/dist/{chunk-QDK5I675.mjs → chunk-CKJEMPZR.mjs} +1 -1
- package/dist/{chunk-5G7LCLOY.mjs → chunk-CMEGGDTF.mjs} +1 -1
- package/dist/{chunk-GFYO6B7H.mjs → chunk-CTDGP5H4.mjs} +1 -1
- package/dist/{chunk-HCHZUZUK.mjs → chunk-DHYTERFI.mjs} +1 -1
- package/dist/{chunk-LRNWBTXT.mjs → chunk-DNZWIOML.mjs} +1 -1
- package/dist/{chunk-JGKLAY6J.mjs → chunk-DP6Q6ZTN.mjs} +1 -1
- package/dist/{chunk-EDRIV2VR.mjs → chunk-E4QGOITF.mjs} +1 -1
- package/dist/{chunk-TCZNV2C2.mjs → chunk-EDTWODQF.mjs} +1 -1
- package/dist/{chunk-K7NFBXL3.mjs → chunk-FJ4JWNKL.mjs} +1 -1
- package/dist/{chunk-PAERB6R2.mjs → chunk-G4S2QIU4.mjs} +1 -1
- package/dist/{chunk-DDYANYQB.mjs → chunk-GPXPR7VT.mjs} +1 -1
- package/dist/{chunk-2LQLKZYT.mjs → chunk-HDLKX5L3.mjs} +1 -1
- package/dist/{chunk-2AZMG5X5.mjs → chunk-HOKWKEDE.mjs} +1 -1
- package/dist/{chunk-WAM7RYAU.mjs → chunk-I75BFMO7.mjs} +1 -1
- package/dist/chunk-IP5TOSWC.mjs +4 -0
- package/dist/{chunk-TGJ74O6U.mjs → chunk-IXCX7SAL.mjs} +1 -1
- package/dist/{chunk-2UVHBGOC.mjs → chunk-JJSIBEFX.mjs} +1 -1
- package/dist/{chunk-TBKC2B4Z.mjs → chunk-JMJUFHDA.mjs} +1 -1
- package/dist/{chunk-LL7CRB4U.mjs → chunk-KZXYV2BA.mjs} +1 -1
- package/dist/{chunk-UG7FEEFM.mjs → chunk-LFXMB6YE.mjs} +1 -1
- package/dist/{chunk-VR75QVWG.mjs → chunk-MIM3VFET.mjs} +1 -1
- package/dist/{chunk-LMDGHBG2.mjs → chunk-NBWQTY4K.mjs} +1 -1
- package/dist/{chunk-I3G2R2J2.mjs → chunk-NK3XCHIN.mjs} +1 -1
- package/dist/{chunk-FOO5RONL.mjs → chunk-OK7X567A.mjs} +1 -1
- package/dist/{chunk-T23BJQBB.mjs → chunk-P5Q2KBKF.mjs} +1 -1
- package/dist/{chunk-LHO4WFYP.mjs → chunk-QLKS32RD.mjs} +1 -1
- package/dist/{chunk-ORCATWOS.mjs → chunk-R7YCUNIS.mjs} +1 -1
- package/dist/{chunk-LPCO4T25.mjs → chunk-RK5JHVD4.mjs} +1 -1
- package/dist/{chunk-EVQAIFAP.mjs → chunk-RKLOWJVN.mjs} +1 -1
- package/dist/{chunk-3MK7GU65.mjs → chunk-S3R55V74.mjs} +1 -1
- package/dist/{chunk-MQ7ZFZRG.mjs → chunk-SG5BHIQF.mjs} +1 -1
- package/dist/{chunk-2OGUZJVD.mjs → chunk-TEJHZXUT.mjs} +1 -1
- package/dist/{chunk-DLX4NQ3T.mjs → chunk-V7PGZR23.mjs} +1 -1
- package/dist/{chunk-PG4VW7VP.mjs → chunk-Z5W2WY26.mjs} +1 -1
- package/dist/{chunk-OAK45GQL.mjs → chunk-ZGDSCGLC.mjs} +1 -1
- package/dist/{chunk-KRDGYYCK.mjs → chunk-ZI77NERP.mjs} +1 -1
- package/dist/{chunk-6A2O63AU.mjs → chunk-ZPJJOZY4.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/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/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/RichText/index.mjs +1 -1
- package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/document-edit.mjs +1 -1
- package/dist/components/Foundary/document-preview-examples.mjs +1 -1
- package/dist/components/Foundary/document-preview.mjs +1 -1
- package/dist/components/Foundary/file-edit.mjs +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Foundary/knowledge-browser.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.js +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarLeftMulti.css +1 -0
- package/dist/components/Menus/SidebarLeftMulti.d.ts +42 -0
- package/dist/components/Menus/SidebarLeftMulti.js +4 -0
- package/dist/components/Menus/SidebarLeftMulti.mjs +2 -0
- package/dist/components/Menus/index.d.ts +1 -0
- 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/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/FileView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
- package/dist/components/Projects/file-list.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +22 -22
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/decorators/Intranet.css +1 -1
- package/dist/decorators/Intranet.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.js +37 -37
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.js +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.js +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.js +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-SV7NMNDI.mjs";import{f as s,g as m}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-SV7NMNDI.mjs";import{f as s,g as m}from"./chunk-ZGDSCGLC.mjs";import{a as o}from"./chunk-MDJREBVI.mjs";import{jsx as e,jsxs as p}from"react/jsx-runtime";function x({services:t,className:f,title:r,content:i}){let d={settings:{width:"full",card:"light"}};return p("div",{className:"pb-4 md:pb-0",children:[p("div",{className:o("w-full text-left prose"),children:[r&&e("h2",{className:"text-primary",children:r}),e("div",{className:"pb-12 ",children:i&&e(s,{enableGutter:!1,content:i,enableProse:!1,className:o("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),t&&t.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-8",children:t.map((a,l)=>e("div",{"data-aos":"fade-up","data-aos-delay":n([200,400,600],l),className:"w-full px-4 md:w-1/2 lg:w-1/3 flex",children:e(m,{...d,icon:{type:"none"},title:a.title,image:a.image,content:a.content,link:a.link,className:"w-full"})},l))})]})}export{x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as J}from"./chunk-
|
|
1
|
+
import{a as J}from"./chunk-V7PGZR23.mjs";import{a as q}from"./chunk-KZCIHFTM.mjs";import{a as S}from"./chunk-KG7HG2VO.mjs";import{a as Q}from"./chunk-L3V5YDPH.mjs";import{a as G}from"./chunk-QC2UWZWL.mjs";import{a as V}from"./chunk-HF33ZXKX.mjs";import{a as w}from"./chunk-UVHMI3PU.mjs";import{b as z}from"./chunk-CSBGSBEU.mjs";import Te,{useEffect as c,useState as n,useRef as l}from"react";import{jsx as a,jsxs as v}from"react/jsx-runtime";var Ne=({initialTasks:p=[],initialEpics:T=[],initialSprints:h=[],initialUsers:he=[],initialColleagues:A=[],initialProjects:Ae=[],onAddTask:W,onUpdateTask:D,onDeleteTask:x,onTaskClick:X,onAddEpic:Y,onAddComment:Z,onUploadFile:_,onDeleteFile:ee,onFileUpdate:te})=>{let[se,u]=n([]),[d,y]=n([]),[O,ie]=n([]),[H,N]=n(!1),[P,U]=n(!1),[r,m]=n(null),[C,I]=n(null),[ae,De]=n([]),[M,ne]=n([]),[g,B]=n(0),o=l(null),re=l(null),oe=Te.useMemo(()=>[...d.map(e=>e.id),0],[d]),j=l(""),F=l(""),R=l(""),$=l(""),f=(e,t)=>e.map(s=>`${s.id}-${new Date(s.createdAt).getTime()}-${new Date(s.updatedAt).getTime()}`).join("-")+(t?`-${t}`:"");c(()=>{let e=p.map(s=>s.files?.filter(i=>typeof i=="object").map(i=>new Date(i.updatedAt).getTime())).flat(),t=f(p,e.join("-"));t!==j.current&&(u(p),r&&m(p.find(s=>s.id===r.id)||null),j.current=t)},[p]),c(()=>{let e=f(T);e!==F.current&&(y(T),F.current=e)},[T]),c(()=>{let e=f(h);e!==R.current&&(ie(h),R.current=e)},[h]),c(()=>{let e=f(A.map(t=>({id:t.id,updatedAt:t.updatedAt,createdAt:t.createdAt})));e!==$.current&&(ne(A),$.current=e)},[A]),c(()=>{let e=()=>{if(o.current){let i=o.current.offsetHeight;B(i)}};e();let t=new ResizeObserver(e);o.current&&t.observe(o.current);let s=()=>{setTimeout(e,100)};return window.addEventListener("storage",s),()=>{t.disconnect(),window.removeEventListener("storage",s)}},[]),c(()=>{let e=setTimeout(()=>{o.current&&B(o.current.offsetHeight)},300);return()=>clearTimeout(e)},[H,P]);let de=se.filter(e=>!0),ce=e=>de.filter(t=>t.status===e),le=e=>{let t={};return d.forEach(s=>{t[s.id]=e.filter(i=>w(i.epic)===s.id)}),t["no-epic"]=e.filter(s=>!w(s.epic)),t},K=e=>{I(e)},pe=e=>{C&&(u(t=>t.map(s=>s.id===C.id?{...s,status:e}:s)),D?.(C.id.toString(),{status:e}),I(null))},ue=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};u(s=>[...s,t]),W?.(e)},me=async(e,t)=>{u(s=>s.map(i=>i.id===Number(e)?{...i,...t}:i)),D&&await D(e,t),r?.id===Number(e)&&m(s=>({...s,...t}))},ge=async e=>{u(t=>t.filter(s=>s.id!==Number(e))),r?.id===Number(e)&&m(null),x&&await x(e)},fe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};y(s=>[...s,t]),Y?.(e)},L=e=>{m(e),X?.(e)},ke=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ve=g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)";return v("div",{ref:re,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[a("div",{ref:o,className:"flex-shrink-0",children:a(V,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>N(!0)},secondaryAction:{label:"Add epic",onClick:()=>U(!0)}})}),a("div",{className:"flex-1 min-h-0 mt-8",children:a("div",{className:"h-full",style:{height:g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)"},children:a("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:ke.map(e=>{let t=ce(e.status),s=le(t);return v(q,{title:e.title,status:e.status,taskCount:t.length,onDrop:pe,isCompact:e.status==="done",height:ve,children:[s["no-epic"].map(i=>a(S,{epic:null,task:i,onDragStart:K,onTaskClick:L,isCompact:e.status==="done"},i.id)),oe.map(i=>{let E=d.find(k=>k.id===i),b=s[i]||[];return b.length===0?null:v("div",{className:"mb-6",children:[v("div",{className:"flex items-center gap-2 mb-3",children:[a("div",{className:`w-3 h-3 rounded-full ${E?.color}`}),a("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:E?.name||"No Epic"}),a(z,{variant:"secondary",className:"text-xs",children:b.length})]})," ",a("div",{className:"space-y-3",children:b.map(k=>a(S,{task:k,epic:E,onDragStart:K,onTaskClick:L,isCompact:e.status==="done"},k.id))})]},i)})]},e.id)})})})}),a(G,{isOpen:H,onClose:()=>N(!1),onAddTask:ue,assignees:[...M,...ae],epics:d,sprints:O}),a(Q,{isOpen:P,onClose:()=>U(!1),onAddEpic:fe}),r&&a(J,{isOpen:!!r,onClose:()=>m(null),initialTask:r,epics:d,sprints:O,onUpdateTask:me,onDeleteTask:ge,colleagues:M,onUploadFile:_,onDeleteFile:ee,onFileUpdate:te,onAddComment:Z})]})};export{Ne as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as g}from"./chunk-AQQCH7Z2.mjs";import{a as p}from"./chunk-
|
|
4
|
+
import{a as g}from"./chunk-AQQCH7Z2.mjs";import{a as p}from"./chunk-HDLKX5L3.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-ZFUP5NVF.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as f}from"./chunk-WU3JMLSC.mjs";import{a as S}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:S,logoDark:f,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(g,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),e(u,{})]})}export{h as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as u}from"./chunk-
|
|
4
|
+
import{a as u}from"./chunk-FJ4JWNKL.mjs";import{d as m}from"./chunk-RKS7CWAP.mjs";import{a as c}from"./chunk-BZEGLKRZ.mjs";import{AutoFocusPlugin as f}from"@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin";import{LexicalComposer as g}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposer";import{ContentEditable as x}from"@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable";import{LexicalErrorBoundary as y}from"@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary";import{HistoryPlugin as C}from"@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin";import{RichTextPlugin as N}from"@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin";import{ListPlugin as E}from"@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin";import{ListItemNode as S,ListNode as R}from"@payloadcms/richtext-lexical/lexical/list";import{HeadingNode as b}from"@payloadcms/richtext-lexical/lexical/rich-text";import{OnChangePlugin as P}from"@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin";import{useEffect as h,useRef as L}from"react";import{useLexicalComposerContext as v}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext";import{Fragment as k,jsx as t,jsxs as d}from"react/jsx-runtime";var T=({setValue:l,value:e,name:a,editable:i=!0})=>{let[r]=v(),o=L(null),p=n=>{n.read(()=>{let s=n.toJSON();JSON.stringify(s)!==JSON.stringify(o.current)&&(o.current=s,l?.(()=>s))})};return h(()=>{r.setEditable(i)},[i,r]),h(()=>{e&&JSON.stringify(e)!==JSON.stringify(o.current)&&r.update(()=>{try{let n=r.parseEditorState(e);r.setEditorState(n),o.current=e}catch(n){console.error("Error parsing editor state:",n)}},{discrete:!0})},[e,r]),t("div",{className:"w-full",children:d("div",{className:" ",children:[i&&t(u,{}),d("div",{className:"px-4 my-4 border-l border-[#222222]",children:[t(N,{contentEditable:t(x,{name:a,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:y}),i&&d(k,{children:[t(C,{}),t(f,{}),t(E,{}),t(P,{onChange:p}),t(m,{})]})]})]})})},O=({setValue:l,value:e,name:a,editable:i=!0})=>t(g,{initialConfig:{namespace:"Lexical editor",nodes:[R,S,b,c],onError(o){throw console.error("Lexical error:",o),o},theme:{code:"editor-code",heading:{h1:"text-4xl text-primary",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:t(T,{value:e,setValue:l,name:a,editable:i})}),X=O;export{X as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{f as t}from"./chunk-
|
|
4
|
+
import{f as t}from"./chunk-ZGDSCGLC.mjs";import{a}from"./chunk-MDJREBVI.mjs";import n from"react";import*as l from"@radix-ui/react-collapsible";import{ChevronDownIcon as c,ChevronUpIcon as m}from"@radix-ui/react-icons";import{jsx as e,jsxs as s}from"react/jsx-runtime";var h=({title:p,richText:r})=>{let[o,i]=n.useState(!1);return e("div",{className:"border rounded-lg overflow-hidden",children:s(l.Root,{className:a("w-full"),open:o,onOpenChange:i,children:[s(l.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[e("h2",{className:"text-lg font-medium",children:p}),o?e(m,{className:"h-6 w-6"}):e(c,{className:"h-6 w-6"})]}),e(l.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:e("div",{className:"px-4 py-3 bg-white",children:e(t,{content:r||{},enableGutter:!1})})})]})})};export{h as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as Q}from"./chunk-5WTGNFUL.mjs";import{a as
|
|
4
|
+
import{a as Q}from"./chunk-5WTGNFUL.mjs";import{a as z}from"./chunk-2W5UZALU.mjs";import{a as L}from"./chunk-QHIZOLWH.mjs";import{a as J}from"./chunk-T46EPXCV.mjs";import{a as q}from"./chunk-L3V5YDPH.mjs";import{a as W}from"./chunk-QC2UWZWL.mjs";import{a as H}from"./chunk-NBWQTY4K.mjs";import{a as K}from"./chunk-EOR2BAI2.mjs";import{a as O}from"./chunk-UVHMI3PU.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Je}from"next/navigation";import{jsx as a,jsxs as Qe}from"react/jsx-runtime";function Le({title:Xe="",initialTasks:f=[],initialEpics:h=[],initialSprints:A=[],initialProjects:D=[],initialReminders:v=[],initialColleagues:S=[],initialUsers:E=[],initialFiles:w=[],initialView:C="kanban",onAddTask:X,onUpdateTask:Y,onDeleteTask:Z,onTaskClick:Ye,onAddEpic:_,onUpdateEpic:$,onDeleteEpic:ee,onAddTaskToEpic:Ze,onAddSprint:te,onUpdateSprint:ne,onDeleteSprint:ie,onAddProject:se,onUpdateProject:ae,onDeleteProject:oe,onFileAdd:de,onFileEdit:re,onFileDelete:le,onFileClick:ce,onAddReminder:pe,onUpdateReminder:me,onDeleteReminder:ke,onViewChange:Te,onToggleMobileMenu:ue,onTeamClick:_e,onTeamChange:$e,onCopilotClick:et,handleAddComment:ge}){let[c,d]=s(f),[l,p]=s(h),[m,k]=s(A),[fe,T]=s(D),[he,u]=s(v),[P,Ae]=s(S),[F,De]=s(E),[ve,y]=s(w),[Se,R]=s(!1),[Ee,M]=s(!1),[we,N]=s(null),[Ce,Pe]=s(null),[V,j]=s(null),[r,I]=s(C||"kanban"),[tt,Ue]=s(!1),be=Je();o(()=>{d(f)},[f]),o(()=>{k(A)},[A]),o(()=>{p(h)},[h]),o(()=>{T(D)},[D]),o(()=>{y(w)},[w]),o(()=>{De(E)},[E]),o(()=>{Ae(S)},[S]),o(()=>{u(v)},[v]),o(()=>{I(C)},[C]);let Oe=c.filter(e=>{}),nt=e=>Oe.filter(t=>t.status===e),it=e=>{let t={};return l.forEach(n=>{}),t},st=e=>{j(e)},at=e=>{V&&(d(t=>t.map(n=>n.id===V.id?{...n,status:e}:n)),j(null))},B=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};d(n=>[...n,t]),X?.(t)},g=async(e,t)=>(d(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),await Y?.(e,t)),ot=async(e,t)=>{g(e,t)},x=e=>{d(t=>t.filter(n=>n.id!==Number(e))),we?.id===Number(e)&&N(null),Z?.(e)},dt=async e=>{x(e)},rt=e=>{let t={...e,id:Date.now()};T(n=>[...n,t]),se?.(e)},lt=(e,t)=>{T(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ae?.(e,t)},ct=e=>{T(t=>t.filter(n=>n.id!==Number(e))),oe?.(e)},G=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(n=>[...n,t]),_?.({...t})},Fe=()=>{M(!0)},ye=(e,t)=>{p(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),$?.(e,t)},Re=e=>{p(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.filter(n=>O(n.epic)!==Number(e))),ee?.(e)},Me=e=>{let t={...e,id:Date.now()};k(n=>[...n,t]),te?.(e)},Ne=(e,t)=>{k(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ne?.(e,t)},Ve=e=>{e==="backlog"||e==="all-tasks"||(k(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.map(n=>O(n.sprint)===Number(e)?{...n,sprint:void 0}:n)),ie?.(e))},U=e=>{N(e)},je=e=>{e==="planning"&&window.innerWidth<768||(I(e),Te?.(e))},pt=()=>{Ue(e=>!e),ue?.()},mt=()=>{be.push("/")},kt=e=>{console.log("Switching to team:",e)},Tt=e=>{console.log("Switching to team:",e)},Ie=e=>{R(!0)},Be=()=>{R(!1),Pe(null)},xe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString()};u(n=>[...n,t]),pe?.(e)},Ge=(e,t)=>{u(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),me?.(e,t)},He=e=>{u(t=>t.filter(n=>n.id!==Number(e))),ke?.(e)},Ke=()=>{de?.()},We=e=>{re?.(e)},qe=e=>{y(t=>t.filter(n=>n.name!==e)),le?.(e)},ze=e=>{ce?.(e)},ut=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],gt=()=>{switch(r){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},b=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ft=b.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=b.length>3,At=b.slice(3);return Qe(K,{currentView:r,onViewChange:je,children:[r==="kanban"&&a("div",{className:"h-full overflow-hidden",children:a(z,{initialProjects:fe,initialEpics:l,initialSprints:m.map(e=>({...e,isSelected:!1})),initialTasks:c,initialColleagues:P,initialUsers:F,onAddTask:B,onUpdateTask:g,onDeleteTask:x,onTaskClick:U,onAddEpic:G,onAddComment:ge})}),r==="planning"&&a("div",{className:"hidden md:block h-full",children:a(L,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddSprint:Me,onUpdateSprint:Ne,onDeleteSprint:Ve})}),r==="tasks"&&a("div",{className:"h-full",children:a(Q,{initialReminders:he,initialColleagues:P,onAddReminder:xe,onUpdateReminder:Ge,onDeleteReminder:He})}),r==="files"&&a("div",{className:"h-full",children:a(H,{initialFiles:ve,onFileAdd:Ke,onFileEdit:We,onFileDelete:qe,onFileClick:ze,compactView:!1})}),r==="epics"&&a("div",{className:"h-full",children:a(J,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddTaskToEpic:Ie,onAddEpic:Fe,onUpdateEpic:ye,onDeleteEpic:Re})}),a(W,{isOpen:Se,onClose:Be,onAddTask:B,epics:l,sprints:m,assignees:[...P,...F],defaultEpicId:Ce||void 0}),a(q,{isOpen:Ee,onClose:()=>M(!1),onAddEpic:G})]})}export{Le as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-KML6U7IE.mjs";import{a as C}from"./chunk-KGEIN56Y.mjs";import{f as v}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-KML6U7IE.mjs";import{a as C}from"./chunk-KGEIN56Y.mjs";import{f as v}from"./chunk-ZGDSCGLC.mjs";import{a as b}from"./chunk-FMJBJ3HN.mjs";import{a as h}from"./chunk-WISCWNL2.mjs";import{a as c,b as g,c as x,e as p}from"./chunk-YO3GQYRJ.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import U from"next/image";import{notFound as M}from"next/navigation";import w from"next/link";import{FaLinkedin as I}from"react-icons/fa6";import{jsx as e,jsxs as s}from"react/jsx-runtime";function L({image:t,name:i,about:l,socialLinks:o}){return!t||!t.src||t.src.length<3||!i?null:e("div",{className:"mt-1 z-10 px-0 pt-0 lg:px-10",children:e(c,{children:s(p,{className:"flex flex-col items-center",children:[t&&t.src&&e(U,{src:t.src,alt:t.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:u,className:"mx-auto mt-6 rounded-full object-cover"}),s("h3",{className:"flex items-center ali font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-xl",children:[i,o&&o.length>0&&e("nav",{"aria-label":"social links",children:e("ul",{className:"inline-flex items-center divide-x divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((a,m)=>a.href&&e("li",{children:e(h,{href:a.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:e("span",{children:a.icon})})},m))})})]}),e("p",{children:l})]})})})}function j({page:t,categoryList:i,edit:l=!1,path:o="/admin/collections/posts/"}){if(!t)return M();let{meta:a,populatedAuthors:m,authors:P,categories:N,content:k,title:y}=t,A={image:{src:a&&a.image&&a.image.url||void 0,alt:a&&a.image&&a.image.alt||void 0},authorName:m?.[0]?.name||"",category:N,commentCount:0,title:y,description:a?.description||""},d=P?.map(r=>{let n=r.profilePicture&&r.profilePicture.sizes?.square?.url||r.profilePicture&&r.profilePicture.sizes?.thumbnail?.url||"";return console.log("val:",n),{name:r.name||"",about:r.about||"",image:{src:n,alt:r.name||"blog author"},socialLinks:[{icon:e(I,{}),href:r.linkedIn??""}]}});return console.log(d),e(b,{children:s("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[e("div",{children:s("div",{className:"[&_p+P]:mt-4",children:[e("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),e(v,{content:k,enableGutter:!1,className:"prose-invert"})]})}),s("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:[l&&e("div",{className:"mt-4 lg:-mt-10 z-10 px-0 pt-0 lg:px-10",children:s(c,{children:[e(g,{children:e(x,{className:"text-accent",children:"Content Actions"})}),s(p,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),e(w,{href:`${o}${t.id}`,children:e(f,{variant:"outline",className:"w-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),d&&d.map((r,n)=>e(L,{...r},n)),i&&i.links&&e("div",{className:"mt-4 px-0 pt-0 lg:px-10",children:e(C,{links:i.links,title:i.title})})]})]})})}export{j as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as D}from"./chunk-
|
|
4
|
+
import{a as D}from"./chunk-4745QCXP.mjs";import{a as $}from"./chunk-DFIXTV2M.mjs";import{a as F}from"./chunk-B4H6T2GP.mjs";import{b as k}from"./chunk-ZUA4KNIR.mjs";import{motion as A}from"motion/react";import{File as S,FileText as I,Type as L,Loader2 as E,X as K,Save as M}from"lucide-react";import{useEffect as _,useRef as B,useState as b}from"react";import{Fragment as W,jsx as u,jsxs as T}from"react/jsx-runtime";var w=n=>"mimeType"in n&&"url"in n&&!("format"in n),P=n=>{if(!n?.root?.children)return"";let l=[],i=e=>{if(!e)return"";switch(e.type){case"heading":{let t=e.tag?parseInt(e.tag.replace("h","")):1,s=a(e.children||[]);return"#".repeat(t)+" "+s}case"paragraph":return e.children&&e.children.some(o=>o.type==="text"?o.text&&o.text.trim().length>0:(o.type==="linebreak",!0))?a(e.children||[]):"";case"list":{let t=[],s=e.listType==="number"?"1.":"-";return e.children?.forEach((o,m)=>{if(o.type==="listitem"){let p=a(o.children||[]),x=e.listType==="number"?`${m+1}.`:s;t.push(`${x} ${p}`)}}),t.join(`
|
|
5
5
|
`)}case"listitem":return a(e.children||[]);case"text":{let t=e.text||"";if(e.format){let s=(e.format&1)!==0,o=(e.format&2)!==0,m=(e.format&4)!==0,p=(e.format&8)!==0;(e.format&16)!==0?t=`\`${t}\``:(s&&(t=`**${t}**`),o&&(t=`*${t}*`),m&&(t=`~~${t}~~`),p&&(t=`<u>${t}</u>`))}return t}default:return e.children?a(e.children):""}},a=e=>e.map(t=>{if(t.type==="text"){let s=t.text||"";if(t.format){let o=(t.format&1)!==0,m=(t.format&2)!==0,p=(t.format&4)!==0,x=(t.format&8)!==0;(t.format&16)!==0?s=`\`${s}\``:(o&&(s=`**${s}**`),m&&(s=`*${s}*`),p&&(s=`~~${s}~~`),x&&(s=`<u>${s}</u>`))}return s}else{if(t.type==="paragraph")return a(t.children||[]);if(t.type==="listitem")return a(t.children||[]);if(t.type==="linebreak")return`
|
|
6
6
|
`}return i(t)}).filter(Boolean).join("");n.root.children.forEach(e=>{let t=i(e);e.type==="paragraph"?l.push(t||""):t&&l.push(t)});let r=[];for(let e=0;e<l.length;e++)r.push(l[e]),e<l.length-1&&(l[e]===""||l[e+1]===""||r.push(""));return r.join(`
|
|
7
7
|
`)},y=n=>{let l=[],i=0;for(;i<n.length;){let r=n.slice(i).match(/^<u\s*[^>]*>([\s\S]*?)<\/u>/i);if(r&&r[0]){let c=r[1]||"",d=c?y(c):[];d.length>0?(d.forEach(f=>{f.type==="text"&&(f.format=(f.format||0)|8)}),l.push(...d)):c===""&&l.push({type:"text",text:"",format:8}),i+=r[0].length;continue}if(n.slice(i).startsWith("</u>")){i+=4;continue}let e=n.slice(i).match(/^(`+)([^`]+)\1/);if(e){let c=e[2];c&&l.push({type:"text",text:c,format:16}),i+=e[0].length;continue}let t=n.slice(i).match(/^(~~)(.+?)\1/);if(t){let c=t[2],d=y(c);d.forEach(f=>{f.type==="text"&&(f.format=(f.format||0)|4)}),l.push(...d),i+=t[0].length;continue}let s=n.slice(i).match(/^(\*\*|__)(.+?)\1/);if(s){let c=s[2],d=y(c);d.forEach(f=>{f.type==="text"&&(f.format=(f.format||0)|1)}),l.push(...d),i+=s[0].length;continue}let o=n.slice(i).match(/^(\*|_)([^*_\n]+?)\1(?!\*|_)/);if(o&&o[0].length>2){let c=o[2],d=y(c);d.forEach(f=>{f.type==="text"&&(f.format=(f.format||0)|2)}),l.push(...d),i+=o[0].length;continue}if(n[i]===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as r}from"./chunk-
|
|
1
|
+
import{f as r}from"./chunk-ZGDSCGLC.mjs";import{jsx as e}from"react/jsx-runtime";var c=({children:o,richText:t})=>e("div",{className:"min-w-full py-10 bg-muted mt-24",children:e("div",{className:"container",children:o||t&&e(r,{content:t,enableGutter:!1})})});export{c as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{b as w,c as C}from"./chunk-
|
|
4
|
+
import{b as w,c as C}from"./chunk-SG5BHIQF.mjs";import{b as y}from"./chunk-DNZWIOML.mjs";import{a as P}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-Q3G5UAAD.mjs";import{useEffect as d,useRef as s,useState as H,useCallback as x}from"react";import{Previewer as p}from"pagedjs";import{Fragment as N,jsx as n,jsxs as l}from"react/jsx-runtime";function T(r){var e=document.createElement("div");e.style.display="block",e.style.height=r,document.body.appendChild(e);var i=parseFloat(window.getComputedStyle(e,null).height);return e.parentNode&&e.parentNode.removeChild(e),Math.floor(i)}var m=r=>{let e=document.createElement("div");e.style.height="1mm",document.body.appendChild(e);let i=parseFloat(window.getComputedStyle(e).height);return document.body.removeChild(e),Math.floor(r/i)},F=({page:r,layout:e="portrait",logoImage:i})=>e==="flow"?n(E,{page:r,layout:e,logoImage:i}):n(B,{page:r,layout:e,logoImage:i}),E=({page:r,layout:e="portrait",logoImage:i})=>{let{contentWithIds:c}=b(r),u=s(null),a=s(null),h=s(new p),f={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};d(()=>{let o=document.getElementById("printable-content");if(o){let t=document.createElement("style");return t.textContent=`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; width: ${m(o.offsetWidth)}mm }; .container : { max-width: ${m(o.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[e]);let k=x(()=>{if(!a.current)return;a.current&&(a.current.innerHTML="");let o=document.getElementById("printable-content");o&&h.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],a.current).catch(t=>console.error("Paged.js error:",t))},[e]);d(()=>{h.current=new p},[k,e]);let g=[f,...c];return l("div",{children:[n("div",{className:"w-[1123px] print:w-[1123px]",children:l("div",{id:"printable-content",ref:u,children:[g.map((o,t)=>n(N,{children:t===0?n("section",{className:"title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},t):l("section",{className:"normal-page overflow-hidden",children:[o.blockName&&n(w,{title:o.blockName}),n(y,{blocks:[o],fill:!0})]},t)})),n("section",{className:"normal-page",children:l("div",{className:`w-full py-2 px-8 flex justify-between items-center
|
|
5
5
|
dark bg-background text-primary`,children:[l("div",{className:"flex px-6 items-center space-x-2",children:[i&&n("img",{src:i.src,alt:"Cortex Reply Logo",className:"h-8"}),n("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),n("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),n("div",{ref:a,className:"preview-container"})]})},B=({page:r,layout:e="portrait"})=>{let{contentWithIds:i}=b(r),c=s(null),u=s(null),a=s(new p),[h,f]=H(0),g=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...i],o=x(()=>{c.current&&(c.current&&(c.current.innerHTML=""),a.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",e==="landscape"?"./landscape.css":"./portrait.css"],c.current).then(t=>f(t.pageCount)).catch(t=>console.error("Paged.js error:",t)))},[e]);return d(()=>{a.current=new p,o()},[o,e]),d(()=>{let t=document.createElement("style");return t.textContent=`@page { size: A4 ${e} ; margin: 0mm; };`,document.head.appendChild(t),()=>{document.head.removeChild(t)}},[]),l("div",{className:"pagedjs-container",children:[n("div",{id:"printable-content",ref:u,style:{display:"none"},className:"pagedjs-content",children:g.map((t,v)=>n(N,{children:v===0?n("section",{className:"pagedjs-section title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},v):l("section",{className:P("pagedjs-section normal-page h-[699px]",`h-[${T("185mm")}px]`,t.theme?.settings?.theme==="dark"?"dark":"light"),children:[t.blockName&&n(w,{title:t.blockName}),n(y,{blocks:[t],fill:!0})]},v)}))}),n("div",{ref:c,className:"preview-container"})]})};export{F as a,E as b,B as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as b}from"./chunk-XTUH2DJE.mjs";import{a as I}from"./chunk-Q35D7SUU.mjs";import{a as S}from"./chunk-
|
|
4
|
+
import{a as b}from"./chunk-XTUH2DJE.mjs";import{a as I}from"./chunk-Q35D7SUU.mjs";import{a as S}from"./chunk-DP6Q6ZTN.mjs";import{useChat as me}from"@ai-sdk/react";import{useState as l}from"react";import{motion as fe,AnimatePresence as he}from"motion/react";import{Users as ye}from"lucide-react";import{jsx as n,jsxs as Ce}from"react/jsx-runtime";function Le({aiConfig:w,useCustomChat:F,enableAI:T=!0,messages:D=[],businessUnits:R=[],capabilities:B=[],sidebarItems:x=[],notifications:N=[],sessions:M=[],onNewChat:A,onSessionSelect:L,onSessionDelete:P,onSessionEdit:k=()=>{},onBusinessUnitChange:E=()=>{},onNotificationRemove:K=()=>{},onRemoveAll:O=()=>{},onActionClick:$=()=>{},onSearch:q=p=>console.log("Search query:",p),initialTeam:z="design",currentSession:m=null,showCapabilities:ve=!0,title:W="Digital Colleagues",enableFileUpload:f=!0,maxFileSize:h=10,allowedFileTypes:y=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:H="/headerlogo.png",appName:X="Nuvia",tagline:G="AI-Powered Workspace",actionIcon:J=n(ye,{className:"mr-2 h-4 w-4"}),actionText:Q="Collaborate",sidebarInitiallyClosed:V=!1}){let p={...w,onError:e=>{i?.setMessages(t=>[...t,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:e.message}]}]),console.error("Error in CopilotInterface:",e)}},Y=me(p||{}),i=T?F||Y:null,[Z,u]=l(""),[_,C]=l(!1),j=i?.messages||D,r=Z,ee=i?.status==="submitted"||_,se=i?.addToolResult?(e,t,s)=>{i.addToolResult({tool:t,toolCallId:e,output:s}),console.log("Tool result added:",{toolCallId:e,tool:t,output:s}),i.sendMessage()}:()=>{console.log("addToolResult not available")},o=R||[],te={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ie,ne]=l(()=>o.length===0?te:o.find(e=>e.id===z)||o[0]),[a,c]=l([]),[oe,ae]=l(!1),le=e=>{if(!e||!f)return;let t=[];Array.from(e).forEach(s=>{if(s.size>h*1024*1024){alert(`File ${s.name} is too large. Maximum size is ${h}MB.`);return}if(y.length>0&&!y.some(d=>s.type.match(d))){alert(`File type ${s.type} is not allowed.`);return}let U={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:s,status:"pending",progress:0};if(s.type.startsWith("image/")){let d=new FileReader;d.onload=ue=>{c(ge=>ge.map(g=>g.id===U.id?{...g,preview:ue.target?.result}:g))},d.readAsDataURL(s)}t.push(U)}),c(s=>[...s,...t])},re=e=>{c(t=>t.filter(s=>s.id!==e))},v=()=>{if(!(!r.trim()&&a.length===0)){if(i){let e=a.length>0?ce(a.map(t=>t.file)):void 0;i.sendMessage({text:r,files:e},{body:{timestamp:Date.now()}}),u("")}else console.log("Message to send:",r),console.log("Files to upload:",a),u(""),C(!0),setTimeout(()=>{C(!1)},1500);c([])}},ce=e=>{let t=new DataTransfer;return e.forEach(s=>t.items.add(s)),t.files},de=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),v())},pe=e=>{u(e)};return n(b,{sidebarItems:x||[],title:W,notifications:N||[],businessUnits:o,currentBusinessUnit:ie,onBusinessUnitChange:e=>{e&&(ne(e),E?.(e))},onSearch:q,showTabs:!1,onActionClick:$,actionIcon:J,actionText:Q,onNotificationRemove:K,onRemoveAll:O,logo:H,appName:X,tagline:G,sidebarInitiallyClosed:V,children:n(he,{mode:"wait",children:n(fe.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Ce("div",{className:"h-full flex",children:[n("div",{className:"w-80 flex-shrink-0 h-full p-2",children:n(I,{sessions:M||[],currentSession:m,teams:o,onNewChat:A,onSessionSelect:L,onSessionEdit:k,onSessionDelete:P})}),n("div",{className:"flex-1 h-full p-2",children:n(S,{messages:j||[],input:r,isTyping:ee,currentSessionTitle:m?.title,capabilities:B||[],onInputChange:pe,addToolResult:se,onSendMessage:v,onKeyPress:de,fileUploads:a,isDragOver:oe,enableFileUpload:f,onFileUpload:le,onRemoveFile:re,onDragOver:ae})})]})},"chat-interface")})})}export{Le as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as
|
|
4
|
+
import{a as x}from"./chunk-WLI2YTOQ.mjs";import{a as w}from"./chunk-I6XKBCH4.mjs";import{a as f}from"./chunk-ZPJJOZY4.mjs";import{a as c,b as p,i as u,j as m}from"./chunk-OCPX4QPC.mjs";import{b as g}from"./chunk-ZUA4KNIR.mjs";import{useEffect as S,useState as l}from"react";import{ChevronDown as j,Loader2 as P}from"lucide-react";import{Fragment as B,jsx as e,jsxs as t}from"react/jsx-runtime";function U({documents:v=[],contexts:o=[],onDocumentClick:C=n=>console.log("Document clicked:",n),onDocumentShare:D=n=>console.log("Share document:",n),onLoadDocumentContent:L,selectedDocumentId:K,onAddKnowledge:s,onDocumentUpdate:b,onAddTeamContext:h,onUpdateTeamContext:N,onDeleteTeamContext:y}){let[n,i]=l(o[0]),[M,r]=l(!1),[A,a]=l(!1),[k,I]=l(!1);S(()=>{if(!n&&o&&o.length>0)i(o[0]);else{let d=o.find(O=>O.id===n?.id);i(d||o[0])}},[o]);let T=d=>{s&&(I(!0),s(d)),r(!1)};return t("div",{className:"flex flex-col h-full",children:[t("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[k&&t("div",{className:"absolute inset-0 bg-background/90 z-[9999] flex flex-col items-center justify-center gap-4",children:[e(P,{className:"h-8 w-8 animate-spin text-primary"}),e("p",{className:"font-semibold text-lg",children:"Initializing document..."})]}),o&&o.length>0&&t("div",{className:"",children:[e("div",{className:"",children:t("nav",{className:"-mb-px flex justify-between items-center",children:[e("div",{className:"flex space-x-8 overflow-x-auto",children:o.map(d=>t("button",{onClick:()=>i(d),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n?.id===d.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[d.icon,d.label]},d.id))}),t(c,{children:[e(p,{children:t("div",{className:"inline-flex border border-primary rounded-xl items-center justify-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:["Actions ",e(j,{className:"h-4 w-4"})]})}),t(u,{children:[e(m,{onClick:()=>r(!0),children:"Add Knowledge"}),e(m,{onClick:()=>a(!0),children:"Manage Contexts"})]})]})]})}),n?.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-primary",children:n?.description})})]})]}),n?e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:e("div",{className:"h-full rounded-xl border overflow-hidden",children:e(f,{documents:v,menuConfig:n?.menuConfig,onDocumentClick:C,onDocumentShare:D,selectedDocumentId:K,onDocumentUpdate:b})})}):t("div",{children:[e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e("p",{className:"text-muted-foreground",children:"No contexts available"})}),e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e(g,{onClick:()=>a(!0),children:"Add Context"})})]}),t(B,{children:[e(x,{isOpen:A,onClose:()=>a(!1),knowledgeSources:o,onCreate:h,onUpdate:N,onDelete:y}),e(w,{isOpen:M,onClose:()=>r(!1),onAddKnowledge:T,knowledgeContexts:o})]})]})}export{U as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as
|
|
4
|
+
import{a as c}from"./chunk-WISC5QJV.mjs";import{a as m}from"./chunk-Q5XT55O3.mjs";import{a as o}from"./chunk-MDJREBVI.mjs";import{useState as d,useEffect as p}from"react";import{useTheme as S}from"next-themes";import{Moon as N,Sun as y}from"lucide-react";import{PopoverGroup as D}from"@headlessui/react";import{Fragment as H,jsx as e,jsxs as u}from"react/jsx-runtime";function z({isMenuOpen:h,logoLight:f,logoDark:g,menuItems:a,themeControl:b=!1,wide:n=!1}){let[v,s]=d(!1),[k,l]=d(""),r=["light","dark"],{theme:i,setTheme:w}=S();p(()=>{l(i||"dark")},[i]);let x=()=>{let t=r[(r.indexOf(k)+1)%r.length];l(t),w(t)};return p(()=>{let t=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[]),e(H,{children:e("header",{className:`z-50 pb-0 transition-all duration-300 hidden lg:block ${v||h?"translate-y-0":"-translate-y-full bg-transparent"}`,children:e("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:u("div",{className:o("flex items-center justify-between px-9 py-0",!n&&"container"),children:[e(m,{logoDark:g,logoLight:f}),e(D,{className:o("hidden lg:flex lg:gap-x-12",n&&"pr-20"),children:a&&a.map(t=>e(c,{...t},t.name))}),b&&e("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:x,children:u("div",{className:"relative",children:[e(y,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),e(N,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as v}from"./chunk-IXCX7SAL.mjs";import{a as p}from"./chunk-4AACW32B.mjs";import{c as b,d as h}from"./chunk-ZGDSCGLC.mjs";import{a as k}from"./chunk-UZSBX5GO.mjs";import{a}from"./chunk-MDJREBVI.mjs";import{Fragment as x}from"react";import R from"next/image";import{jsx as t,jsxs as g}from"react/jsx-runtime";var y={content:v,cta:b,mediaBlock:k,collapsibleArea:p,imageBlock:k,features:h,reusableContentBlock:C},P=e=>{let{blocks:n}=e;return n&&Array.isArray(n)&&n.length>0?t("section",{id:"render-blocks",className:a(e.fill?"h-full w-full":""),children:n.map((i,s)=>{let{blockType:r}=i,m=i?.theme;if(r&&r in y){let o=y[r];if(r==="reusableContentBlock")return t(x,{children:t(P,{blocks:i.reusableContent.layout})},s);if(o)return g("div",{className:a("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[t(B,{block:i,index:s}),t("div",{className:a("container h-full relative",m?.settings?.theme||"dark"),children:t(o,{...i})})]},s)}return null})}):null},B=e=>{if(!("theme"in e.block))return t("div",{className:a("absolute inset-0 w-screen h-full dark bg-background")});let n=e.block?.theme;if(n.settings.background==="image"){let u={imagePosition:n.settings.imagePosition||"left",overlay:n.settings.overlay!==void 0?n.settings.overlay:!0};return g("div",{className:a("absolute inset-0 w-full h-full bg-background",n.settings.theme||"dark"),children:[t(R,{src:n.settings?.image?.url||"/placeholder.svg",alt:n.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),n.settings.overlay&&t("div",{className:"absolute inset-0",style:{background:u.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return t("div",{className:a("absolute inset-0 w-screen h-full bg-background",n.settings.theme||"dark")})},E=e=>{let{blocks:n}=e;return n&&Array.isArray(n)&&n.length>0?t("main",{id:"content-blocks",className:a(e.fill?"h-full w-full":""),children:n.map((i,s)=>{let{blockType:r}=i,m=i?.theme;if(r&&r in y){let o=y[r];if(r==="reusableContentBlock")return t(x,{children:t(P,{blocks:i.reusableContent.layout})},s);if(o)return t(A,{block:i,allBlocks:n,index:s,children:t(o,{...i})})}return null})}):null},A=e=>{if(e.index===0)return g("section",{className:"relative flex w-full",children:[t("div",{className:a("absolute inset-0 w-screen h-full light bg-background")}),t("div",{className:a("container h-full relative pt-6 pb-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let n=l=>l%2===0?"light":"dark",u=({index:l,allBlocks:c})=>l===1?t(N,{position:"left"}):s(l,c)==="dark"&&m(l,c)==="light"?t(w,{position:"left"}):s(l,c)==="light"&&m(l,c)==="dark"?t(N,{position:"left"}):null,i=({index:l,allBlocks:c})=>r(l,c)==="light"&&m(l,c)==="dark"?t(w,{position:"left"}):null,s=(l,c)=>{if(l===1)return"light";let d=c[l-1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},r=(l,c)=>{if(l===c.length-1)return"dark";if(l===0)return"light";let d=c[l+1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},m=(l,c)=>{if(l===c.length-1)return"dark";let d=c[l];return d.theme&&d.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return s(e.index,e.allBlocks)==="dark"?g("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full pt-12",children:[t("div",{className:a("absolute inset-0 w-screen dark bg-background")}),t("div",{className:a("container relative","dark bg-background py-1"),children:e.children})]}):g("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[t(u,{index:e.index,allBlocks:e.allBlocks}),t("div",{className:a("absolute inset-0 w-screen")}),t("div",{className:"bg-black",children:t("div",{className:a("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||s(e.index,e.allBlocks)===m(e.index,e.allBlocks)){let l=m(e.index,e.allBlocks);return g("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full pt-20",children:[t("div",{className:a("absolute inset-0 w-screen bg-background",l)}),t("div",{className:a("container relative bg-background py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(s(e.index,e.allBlocks)!==m(e.index,e.allBlocks)){let l=m(e.index,e.allBlocks);return g("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[t(u,{index:e.index,allBlocks:e.allBlocks}),t("div",{className:a("absolute inset-0 w-screen bg-background",l)}),t("div",{className:a("container relative bg-background min-h-[22em] content-center py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return g("div",{className:a("container h-full relative","dark"),children:[t("div",{className:a("absolute inset-0 w-screen h-full dark bg-background py-1")}),e.children]});let o=e.block?.theme;if(o.settings.background==="image"){let l={imagePosition:o.settings.imagePosition||"left",overlay:o.settings.overlay!==void 0?o.settings.overlay:!0};return g("div",{className:a("absolute inset-0 w-full h-full bg-background",o.settings.theme||"dark"),children:[t(R,{src:o.settings?.image?.url||"/placeholder.svg",alt:o.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),o.settings.overlay&&t("div",{className:"absolute inset-0",style:{background:l.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return t("div",{className:a("absolute inset-0 w-screen h-full bg-background",o.settings.theme||"dark")})},N=({position:e})=>t("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:a("w-full block overflow-hidden"),children:t("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),w=({position:e})=>t("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:g("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:a("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[t("defs",{children:g("mask",{id:"mask",children:[t("rect",{width:"100%",height:"100%",fill:"white"}),t("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),t("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});import{Fragment as F,jsx as f,jsxs as I}from"react/jsx-runtime";var C=e=>{let{customId:n,reusableContent:u}=e;return typeof u=="object"&&u!==null?f(S,{blocks:u.layout}):f(F,{})},T={content:v,cta:b,mediaBlock:k,imageBlock:k,features:h},S=e=>{let{blocks:n}=e;return n&&Array.isArray(n)&&n.length>0?f(F,{children:n.map((i,s)=>{let{blockType:r}=i,m=i?.theme;if(r&&r in T){let o=T[r];if(o)return I("div",{className:"py-6 relative",children:[f(B,{block:i,index:s}),f("div",{className:a(m?.settings?.theme==="dark"?"dark":m?.settings?.theme==="green"?"green":""),children:f(o,{...i})})]},s)}return null})}):null};export{C as a,P as b,B as c,E as d,A as e,N as f,w as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as z,b as R}from"./chunk-TIAA3ZN3.mjs";import{a as S}from"./chunk-
|
|
1
|
+
import{a as z,b as R}from"./chunk-TIAA3ZN3.mjs";import{a as S}from"./chunk-KZXYV2BA.mjs";import{a as k,b as D,c as E,d as B}from"./chunk-YRDJBAYA.mjs";import{d as f}from"./chunk-Q2DPE66H.mjs";import{a as M}from"./chunk-L5JPAKPM.mjs";import{b as n}from"./chunk-ZUA4KNIR.mjs";import{useRef as p,useEffect as F,useState as T}from"react";import{Send as X,Menu as Y,Paperclip as Z,X as _,FileText as j,Image as ee,File as te,MessageSquareIcon as ae}from"lucide-react";import{jsx as t,jsxs as o}from"react/jsx-runtime";function be({messages:i,input:g,isTyping:v=!1,currentSessionTitle:A,capabilities:h,fileUploads:c,isDragOver:se,enableFileUpload:C,onInputChange:H,addToolResult:O,onSendMessage:L,onKeyPress:$,onFileUpload:x,onRemoveFile:P,onDragOver:m,className:K,status:U="ready"}){let b=p(null),ne=p(null),N=p(null),[l,u]=T(!1),[d,oe]=T({path:[],selectedItems:[],filters:{}});F(()=>{b.current?.scrollIntoView({behavior:"smooth"})},[i]),F(()=>{l&&setTimeout(()=>{b.current?.scrollIntoView({behavior:"smooth"})},100)},[l]);let y=()=>f(d),w=()=>{let e=[];return h.forEach(a=>{a.actions&&a.actions.forEach(s=>{e.push({label:s.label,action:()=>I(s.id,{path:[a],selectedItems:[],filters:{}})})}),a.children&&a.children.forEach(s=>{s.type==="list"&&s.data&&e.push({label:`View ${s.name}`,action:()=>u(!0)})})}),e.slice(0,5)},I=(e,a)=>{console.log("Capability action:",e,a);let s=`Executing ${e} with context: ${JSON.stringify(a.path.map(r=>r.name))}`;u(!1)},V=f({path:[],selectedItems:[],filters:{}}),J=e=>{x(e.target.files),e.target.files&&(e.target.value="")},ie=e=>{e.preventDefault(),m(!0)},le=e=>{e.preventDefault(),m(!1)},re=e=>{e.preventDefault(),m(!1),x(e.dataTransfer.files)},Q=e=>{if(e===0)return"0 Bytes";let a=1024,s=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,r)).toFixed(2))+" "+s[r]},W=e=>e.startsWith("image/")?t(ee,{className:"h-4 w-4"}):e.startsWith("text/")?t(j,{className:"h-4 w-4"}):t(te,{className:"h-4 w-4"}),q={messages:i,currentSessionTitle:A,capabilities:h,currentCapabilityContext:d,contextualActions:V,getQuickSuggestions:w().map(e=>e.label)},G=()=>{navigator.clipboard.writeText(JSON.stringify(q,null,2)),alert("Debug info copied to clipboard")};return o("div",{className:`h-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${K||""}`,children:[o(k,{className:"relative flex-1 h-full size-full",children:[t(D,{children:i.length===0?t(E,{description:"Messages will appear here as the conversation progresses.",icon:t(ae,{className:"size-6"}),title:"Start a conversation"}):i.map((e,a)=>t(z,{from:e.role,children:t(R,{children:S({message:e,addToolResult:O??(()=>{}),status:U,messages:i})})},a))}),t(B,{})]}),c.length>0&&t("div",{className:"p-4 border-t bg-muted/10",children:t("div",{className:"flex flex-wrap gap-2",children:c.map(e=>o("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[W(e.file.type),t("span",{className:"text-sm font-medium",children:e.file.name}),t("span",{className:"text-xs text-muted-foreground",children:Q(e.file.size)}),t(n,{variant:"ghost",size:"sm",onClick:()=>P(e.id),className:"h-6 w-6 p-0",children:t(_,{className:"h-4 w-4"})})]},e.id))})}),o("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[o("div",{className:"flex gap-3",children:[t(M,{value:g,onChange:e=>H(e.target.value),onKeyPress:$,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:v}),C&&t(n,{variant:"outline",size:"icon",onClick:()=>N.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:t(Z,{className:"h-4 w-4"})}),t(n,{onClick:L,disabled:!g.trim()&&c.length===0||v,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:t(X,{className:"h-4 w-4"})})]}),o("div",{className:"flex items-center gap-3 mt-3",children:[o(n,{onClick:()=>u(!l),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[t(Y,{className:"h-3 w-3 mr-1"}),l?"Hide":"Show"," Capabilities"]}),o("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[y().map((e,a)=>t(n,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>I(e.id,d),children:e.label},`context-${e.id}`)),y().length===0&&w().map((e,a)=>t(n,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:e.action,children:e.label},`suggestion-${a}`)),t(n,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:G,children:"Debug"})]})]}),C&&t("input",{ref:N,type:"file",multiple:!0,onChange:J,className:"hidden"})]})]})}export{be as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as t}from"./chunk-
|
|
1
|
+
import{f as t}from"./chunk-ZGDSCGLC.mjs";import{b as o}from"./chunk-ZUA4KNIR.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import s from"next/link";import{jsx as i,jsxs as n}from"react/jsx-runtime";var p=({dynamicServiceDetail:c,style:a})=>{let e=c;return i("div",{className:"container",children:n("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[n("div",{className:r("w-full text-left prose"),children:[i("h2",{className:"text-primary",children:e.title}),i("div",{className:"",children:i(t,{enableGutter:!1,content:e.description,enableProse:!1,className:r("prose prose-headings:text-foreground prose-p:text-foreground")})}),i(o,{asChild:!0,className:"mt-6 px-6 py-3 border border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition no-underline",children:i(s,{href:`/${e.slug}`,children:"Learn more"})})]}),e.icon&&typeof e.icon=="object"&&"type"in e.icon&&"iconName"in e.icon&&i("div",{className:r("w-full h-full min-h-96 py-6 p-0 md:p-16 flex justify-center"),children:i("i",{className:`${e.icon.type} fa-${e.icon.iconName} fa-10x w-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})};export{p as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as F}from"./chunk-
|
|
4
|
+
import{a as F}from"./chunk-CKJEMPZR.mjs";import{a as T}from"./chunk-R7YCUNIS.mjs";import{a as v}from"./chunk-MDJREBVI.mjs";import{a as R}from"./chunk-Q3G5UAAD.mjs";import{useState as A}from"react";import G from"html2canvas";import{jsPDF as W}from"jspdf";import{Fragment as J,jsx as e,jsxs as g}from"react/jsx-runtime";function ae({type:p="slideshow",orientation:d="landscape",...c}){let h=c.page,[C,n]=A(d),{contentWithIds:a,tableOfContents:i}=R(h);if(p==="slideshow")return e("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:e(T,{blocks:a,hero:c.hero,title:c.page.title,logoImage:c.logoImage})});if(p==="print")return g(J,{children:[e(U,{layout:C,changeLayout:n}),e(F,{page:c.page,layout:C,logoImage:c.logoImage})]})}var U=({changeLayout:p,layout:d="landscape"})=>{let c=async()=>{if(d==="flow"){let a=document.getElementById("printable-content")?.innerHTML;if(a){var n=window.document.body.innerHTML;window.document.body.innerHTML=a,window.print(),window.document.body.innerHTML=n}}else await new Promise(a=>setTimeout(a,300)),window.print()},h=n=>{p&&p(n)},C=async n=>{let a=document.getElementById(n);if(!a)throw new Error(`Element with id ${n} not found`);let i=document.createElement("canvas"),P=window.devicePixelRatio;i.width=Math.max(a.clientWidth||0)*P,i.height=Math.max(a.clientHeight||0)*P+100;let u=i.getContext("2d");if(!u)throw new Error("Failed to get 2D context");let q=u.drawImage,z=Array.from(a.getElementsByTagName("img")).reduce((y,s)=>(y[s.src]=s,y),{});u.drawImage=function(...y){let[s,S,j,l,r,D,B,m,w]=y;if(s instanceof HTMLImageElement){let Y=z[s.src].style.objectFit||"fill",$=z[s.src].style.objectPosition||"center center";r=s.height,l=s.width;let L=l/r,b=m/w,[x,f]=$.split(" ");switch(f||(f=x),Y){case"cover":if(L>b){let t=r*b,o=(l-t)/2;x==="left"&&(o=0),x==="right"&&(o=l-t),S+=o,l=t}else{let t=l/b,o=(r-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=r-t),j+=o,r=t}break;case"contain":if(L>b){let t=m/L,o=(w-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=w-t),B+=o,w=t}else{let t=w*L,o=(m-t)/2;x==="left"&&(o=0),x==="right"&&(o=m-t),D+=o,m=t}break;case"fill":break}}return q.call(u,s,S,j,l,r,D,B,m,w)};let k=document.getElementById(n);if(!k)throw new Error(`Element with id ${n} not found`);var O=i.width,X=i.height;let I=(await G(k,{canvas:i,windowHeight:X,windowWidth:O,scale:window.devicePixelRatio})).toDataURL("image/png"),N=new W({}).getImageProperties(I),M=297,E=M*(N.height/N.width),H=new W({unit:"mm",format:[M,E]});H.addImage(I,"PNG",0,0,M,E),H.save("print.pdf")};return e("div",{className:v("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:e("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:g("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[g("a",{onClick:c,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:e("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),e("small",{className:"text-xs font-medium",children:"Print"})]}),e("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),g("a",{onClick:()=>h("portrait"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="portrait"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:e("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),e("small",{className:"text-xs",children:"Portrait"})]}),g("a",{onClick:()=>h("landscape"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="landscape"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:e("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),e("small",{className:"text-xs",children:"Landscape"})]}),g("a",{onClick:()=>h("flow"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="flow"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:e("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),e("small",{className:"text-xs",children:"Continuous"})]})]})})})};export{ae as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as L}from"./chunk-T3F3RQIC.mjs";import{a as P}from"./chunk-UP67R64J.mjs";import{a as F}from"./chunk-6QERRKM4.mjs";import{a as H}from"./chunk-VSU7LYXZ.mjs";import{b as E,c as S}from"./chunk-RKS7CWAP.mjs";import{b as _}from"./chunk-BZEGLKRZ.mjs";import{a as U}from"./chunk-IPRG56MW.mjs";import{a as j,b as B,c as J,d as z,e as G}from"./chunk-HFEN3KJC.mjs";import{a as
|
|
1
|
+
import{a as $}from"./chunk-L2UJOICL.mjs";import{a as L}from"./chunk-T3F3RQIC.mjs";import{a as P}from"./chunk-UP67R64J.mjs";import{a as F}from"./chunk-6QERRKM4.mjs";import{a as H}from"./chunk-VSU7LYXZ.mjs";import{b as E,c as S}from"./chunk-RKS7CWAP.mjs";import{b as _}from"./chunk-BZEGLKRZ.mjs";import{a as U}from"./chunk-IPRG56MW.mjs";import{a as j,b as B,c as J,d as z,e as G}from"./chunk-HFEN3KJC.mjs";import{a as f,b as p,i as u,j as g}from"./chunk-OCPX4QPC.mjs";import{a as I,b as A,c as R,d as O}from"./chunk-KY7WQYN4.mjs";import{a as y}from"./chunk-MDJREBVI.mjs";import{useLexicalComposerContext as he}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext";import{$insertNodeToNearestRoot as Ce,mergeRegister as X}from"@payloadcms/richtext-lexical/lexical/utils";import{$createParagraphNode as ke,$getPreviousSelection as ve,$getRoot as Ne,$getSelection as k,$isParagraphNode as Y,$isRangeSelection as v,CAN_REDO_COMMAND as Te,CAN_UNDO_COMMAND as De,COMMAND_PRIORITY_EDITOR as Me,FORMAT_ELEMENT_COMMAND as m,FORMAT_TEXT_COMMAND as c,SELECTION_CHANGE_COMMAND as xe,UNDO_COMMAND as q}from"@payloadcms/richtext-lexical/lexical";import{$setBlocksType as K}from"@payloadcms/richtext-lexical/lexical/selection";import{INSERT_ORDERED_LIST_COMMAND as we,INSERT_UNORDERED_LIST_COMMAND as ye}from"@payloadcms/richtext-lexical/lexical/list";import{AlignCenter as Ie,AlignJustify as Ae,AlignLeft as Re,AlignRight as Oe,ChevronDown as N,ImageUp as _e,List as Ee,ListOrdered as Se,Plus as Ue,RotateCcw as $e,RotateCw as He}from"lucide-react";import{Fragment as Le,useCallback as Pe,useEffect as Fe,useRef as je,useState as s}from"react";import{$createHeadingNode as Be}from"@payloadcms/richtext-lexical/lexical/rich-text";import{jsx as o,jsxs as a}from"react/jsx-runtime";var T=1;function Je(){return o("span",{className:"border border-[#222222]"})}function ze(){let[t]=he(),Q=je(null),[V,W]=s(!1),[Z,ee]=s(!1),[oe,te]=s(!1),[ie,ne]=s(!1),[ae,se]=s(!1),[re,ce]=s(!1),[le,de]=s(!1),[fe,pe]=s(!1),[D,M]=s(!1),[x,ue]=s("left"),[w,ge]=s("p"),l=e=>{t.update(()=>{let i=k();v(i)&&(e==="p"?K(i,()=>ke()):K(i,()=>Be(e)))})},b=Pe(()=>{let e=k();if(v(e)){te(e.hasFormat("bold")),ne(e.hasFormat("italic")),se(e.hasFormat("underline")),ce(e.hasFormat("strikethrough")),de(e.hasFormat("subscript")),pe(e.hasFormat("superscript"));let i=e.anchor.getNode(),n=i;for(;n&&!Y(n)&&n!==Ne();){let r=n.getParent();r&&(n=r)}if(n){let r=n.getFormatType();ue(r||"left")}let d=i.getTopLevelElement()?.__tag;ge(d||"p")}},[]);Fe(()=>X(t.registerUpdateListener(({editorState:e})=>{e.read(()=>{b()})}),t.registerCommand(xe,(e,i)=>(b(),!1),T),t.registerCommand(De,e=>(W(e),!1),T),t.registerCommand(Te,e=>(ee(e),!1),T),X(t.registerCommand(E,e=>(t.update(()=>{let i=k()||ve();if(v(i)){let n=_({id:e.id,fields:e.fields,relationTo:e.relationTo,value:e.value}),{focus:d}=i,r=d.getNode();Ce(n),Y(r)&&!r.__first&&r.remove()}}),!0),Me))),[t,b]);let me=[[{label:"Undo",icon:o($e,{width:15,height:15}),onClick:()=>{t.dispatchCommand(q,void 0)},disabled:!V},{label:"Redo",icon:o(He,{width:15,height:15}),onClick:()=>{t.dispatchCommand(q,void 0)},disabled:!Z}],[{label:"Bold",icon:o(U,{}),onClick:()=>{t.dispatchCommand(c,"bold")},value:"bold",active:oe},{label:"Italic",icon:o($,{}),onClick:()=>{t.dispatchCommand(c,"italic")},value:"italic",active:ie},{label:"Underline",icon:o(H,{}),onClick:()=>{t.dispatchCommand(c,"underline")},value:"underline",active:ae},{label:"Strikethrough",icon:o(L,{}),onClick:()=>{t.dispatchCommand(c,"strikethrough")},value:"strikethrough",active:re},{label:"Subscript",icon:o(P,{}),onClick:()=>{t.dispatchCommand(c,"subscript")},value:"subscript",active:le},{label:"Superscript",icon:o(F,{}),onClick:()=>{t.dispatchCommand(c,"superscript")},value:"superscript",active:fe}]],h=[{label:"Left Align",direction:"left",icon:o(Re,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"left")}},{label:"Center Align",direction:"center",icon:o(Ie,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"center")}},{label:"Right Align",direction:"right",icon:o(Oe,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"right")}},{label:"Justify Align",direction:"justify",icon:o(Ae,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"justify")}}],C=[{label:"Normal Text",value:"p",icon:o(j,{}),onClick:()=>l("p")},{label:"Heading 1",value:"h1",icon:o(B,{}),onClick:()=>l("h1")},{label:"Heading 2",value:"h2",icon:o(J,{}),onClick:()=>l("h2")},{label:"Heading 3",value:"h3",icon:o(z,{}),onClick:()=>l("h3")},{label:"Heading 4",value:"h4",icon:o(G,{}),onClick:()=>l("h4")},...[{label:"Unordered List",value:"ul",icon:o(Ee,{width:15,height:15}),onClick:()=>{t.dispatchCommand(ye,void 0)}},{label:"Ordered List",value:"ol",icon:o(Se,{width:15,height:15}),onClick:()=>{t.dispatchCommand(we,void 0)}}]],be=[{label:"Insert Image",icon:o(_e,{width:15,height:15}),onClick:()=>{M(!0)},disabled:!1}];return o("div",{className:"flex justify-between border border-[#222222] py-2 px-2 sticky top-0 bg-black z-50",children:a("div",{className:"flex gap-2 ",ref:Q,children:[me.map((e,i)=>a(Le,{children:[o("div",{className:"flex items-center gap-2",children:e.map((n,d)=>o("div",{role:"button","aria-disabled":n.disabled||!1,onClick:n.onClick,className:y("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",n.active&&"bg-[#3c3c3c]"),"aria-label":n.label,children:o(I,{children:a(A,{children:[o(R,{className:"text-[#b5b5b5]",children:n.icon}),o(O,{children:o("p",{children:n.label})})]})})},d))}),o(Je,{})]},`toolbar-option-${e.length}-${i}`)),a(f,{children:[a(p,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[h.find(e=>e.direction===x)?.icon,h.find(e=>e.direction===x)?.label,o(N,{width:15,height:15})]}),o(u,{className:"bg-black hover:bg-black",children:h.map((e,i)=>a(g,{onClick:e.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},`${e.label}-${i}`))})]}),a(f,{children:[a(p,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[C.find(e=>e.value===w)?.icon,C.find(e=>e.value===w)?.label,o(N,{width:15,height:15})]}),o(u,{className:"bg-black hover:bg-black",children:C.map((e,i)=>a(g,{onClick:e.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},`heading-option-${e.label}-${i}`))})]}),a(f,{children:[a(p,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[o(Ue,{width:15,height:15}),o(N,{width:15,height:15})]}),o(u,{className:"bg-black hover:bg-black",children:be.map((e,i)=>a(g,{onClick:e.onClick,disabled:e.disabled,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},i))})]}),D&&o(S,{activeEditor:t,onClose:()=>{M(!1)},isOpen:D})]})})}export{ze as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as c}from"./chunk-SV7NMNDI.mjs";import{a as d}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-SV7NMNDI.mjs";import{a as d}from"./chunk-LFXMB6YE.mjs";import{c as g}from"./chunk-YNNW2C2U.mjs";import{a as p}from"./chunk-FMJBJ3HN.mjs";import{a as l}from"./chunk-WISCWNL2.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import f from"next/image";import{FaArrowRight as x}from"react-icons/fa6";import{jsx as e,jsxs as r}from"react/jsx-runtime";function z({blogs:a,sectionHeading:t,base:n="insights"}){return r(p,{children:[e("div",{className:"",children:t&&e("div",{"data-aos":"fade-up","data-aos-delay":"100",children:e(d,{...t,alignment:"start",hasBottomSpacing:!0})})}),a&&a.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:a.map((s,o)=>e("div",{"data-aos":"fade-up","data-aos-delay":c([200,400,600],o),className:"w-full h-full md:w-1/2 md:px-4 lg:w-1/3",children:e(v,{...s,base:n})},o))})]})}var u=i("inline-flex items-center gap-2 text-white"),L=i("text-sm text-white");function v({slug:a,meta:t,authors:n,title:s,publishedAt:o,categories:h,base:m}){return r("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[e("span",{className:"absolute inset-0 z-[2] "}),e(f,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
|
|
2
2
|
(min-width:768px) 50vw,
|
|
3
3
|
(min-width:1024px) 33vw,
|
|
4
4
|
100vw
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-LFXMB6YE.mjs";import{a as r}from"./chunk-KML6U7IE.mjs";import{a as o}from"./chunk-SRUG246N.mjs";import p from"next/image";import{FaEnvelope as c,FaPhoneFlip as d}from"react-icons/fa6";import{jsx as e,jsxs as t}from"react/jsx-runtime";function f(s){let{sectionHeading:i,image:a}=s;return e("div",{className:"relative w-full light py-[60px]",children:t("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[e("div",{className:"relative h-full w-full",children:e(p,{src:a.src,alt:a.alt,fill:!0,objectFit:"contain",sizes:"(min-width: 768px) 30vw, 50vw",placeholder:"blur",blurDataURL:r})}),e("div",{className:"w-full h-full",children:t("div",{className:"bg-white p-10",children:[e("div",{className:"mb-30px",children:e(l,{...i,invert:!0})}),e(o,{})]})})]})})}function y(s){return e("div",{className:"",children:e("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:e("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:t("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[t("div",{children:[e("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),e("p",{className:"mt-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),e("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:s.locations&&s.locations.map((i,a)=>t("div",{className:"rounded-2xl p-10 border",children:[e("h3",{className:"text-base/7 text-primary",children:i.title}),t("address",{className:"mt-3 space-y-1 text-sm/6 not-italic text-foreground",children:[i.location.split(",")?.map((m,n)=>e("p",{children:m},n))," ",i.mails&&t("p",{className:"flex items-center space-x-2",children:[e(c,{className:"pr-2 text-primary size-auto"}),e("span",{children:i.mails[0]})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&t("p",{className:"flex items-center space-x-2",children:[e(d,{className:"pr-2 text-primary size-auto"}),i.phoneNumbers[0]]})]})]},a))})]})})})})}export{f as a,y as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-PDY7JYY3.mjs";import{a as i}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-PDY7JYY3.mjs";import{a as i}from"./chunk-DHYTERFI.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import{jsx as n,jsxs as d}from"react/jsx-runtime";function u({isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,className:p,wide:l,themeControl:s=!1}){return d("div",{className:r("fixed top-0 left-0 right-0 z-50",p),children:[n(i,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,themeControl:s,wide:l}),n(m,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a})]})}export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-T5HJS6OF.mjs";import{f as s}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-T5HJS6OF.mjs";import{f as s}from"./chunk-ZGDSCGLC.mjs";import d from"clsx";import{jsx as t,jsxs as l}from"react/jsx-runtime";var g=a=>{let{className:i,docs:n,introContent:o}=a;return l("div",{className:d("container",i),children:[o&&t(s,{content:o,enableGutter:!1}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:n?.map((e,p)=>typeof e=="string"?null:t(r,{doc:e,relationTo:"posts",showCategories:!0},p))})]})};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-SV7NMNDI.mjs";import{a as r}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-SV7NMNDI.mjs";import{a as r}from"./chunk-LFXMB6YE.mjs";import{a as o}from"./chunk-LF55USCD.mjs";import{a as e}from"./chunk-FMJBJ3HN.mjs";import{jsx as i,jsxs as c}from"react/jsx-runtime";function S({sectionHeading:p,cards:a}){return i("section",{className:"section-padding-primary !pt-0",children:c(e,{children:[i("div",{className:"mx-auto max-w-[630px]","data-aos":"fade-up","data-aos-delay":"100",children:i(r,{...p,alignment:"center",hasBottomSpacing:!0})}),a&&a.length>0&&i("div",{className:"grid gap-30px",children:a.map((d,t)=>i("div",{"data-aos":"fade-up","data-aos-delay":n([200,400,600],t),className:"py-2",children:i(o,{...d})},t))})]})})}export{S as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
import{c as v,h as R,i as x,k as f,l as p,m as w,o as L,p as c,q as d,r as y,s as P,v as B,w as T,x as F}from"./chunk-ZFUP5NVF.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as S,b as N,c as k}from"./chunk-YNCJATT7.mjs";import{ChevronRight as H}from"lucide-react";import G from"clsx";import{Fragment as z,jsx as e,jsxs as r}from"react/jsx-runtime";function Q({mainNav:o,secondaryNav:s,title:u,subTitle:t,pathName:b,menuHeading:i,onNavClick:m,loading:l=!1,LinkComponent:h,...I}){let M=h?a=>e(h,{...a}):m?({href:a,children:C,...g})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...g,children:C}):a=>e("a",{...a});return r(v,{...I,variant:"inset",children:[e(R,{children:e(c,{children:e(d,{children:l?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:u}),t&&e("span",{className:"truncate text-sm",children:t})]})})})}),l&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[o&&!l&&o.map((a,C)=>r(p,{children:[e(w,{children:a.name}),a&&!l&&a.nav.map((g,A)=>e(O,{subNav:g,pathName:b,Link:M},A))]})),e(p,{className:"mt-auto",children:e(L,{children:e(c,{children:s&&!l&&s.map(a=>e(d,{children:e(y,{asChild:!0,size:"sm",children:r(M,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(x,{})]})}function O({subNav:o,pathName:s,Link:u}){let t=o,b=!1;return t.links&&t.links.map(i=>{i.url===s&&(b=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(p,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(y,{asChild:!0,tooltip:t.label,className:G(b&&"font-bold text-accent"),children:r(u,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(z,{children:[e(N,{asChild:!0,children:r(P,{className:"data-[state=open]:rotate-90",children:[e(H,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(k,{children:e(B,{children:t.links?.map(i=>e(T,{children:e(F,{asChild:!0,className:G(i.url===s&&"font-bold text-accent"),children:e(u,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{Q as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as u}from"./chunk-
|
|
1
|
+
import{f as u}from"./chunk-ZGDSCGLC.mjs";import{a as m}from"./chunk-2QZUKVBA.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{jsx as r,jsxs as h}from"react/jsx-runtime";var B=g=>{let{columns:a,theme:i}=g,y={full:"12",half:"6",oneThird:"4",twoThirds:"8"},b={none:"",line:"border border-primary p-4 rounded-lg"},c=e=>{if(e.type&&e.type==="block"&&e.fields&&(e.fields.blockType==="imageBlock"||e.fields.blockType==="mediaBlock"))return!0;if(e.root&&e.root.children){for(let o of e.root.children)if(c(o))return!0}if(e.children){for(let o of e.children)if(c(o))return!0}return!1},k=(e,o,n)=>{if(o==="none"||n==="full")return{processedRichText:e,heading:null};let l=e,t=null;return e&&e.root&&e.root.children&&e.root.children[0].tag==="h2"&&(l={...e,root:{...e.root,children:e.root.children.slice(1)}},t=e.root.children[0]),{processedRichText:l,heading:t}};return r("div",{className:"my-6",children:r("div",{className:d("grid grid-cols-4 lg:grid-cols-12 gap-y-8",i?.settings?.box?"gap-x-8":"gap-x-16"),children:a&&a.length>0&&a.map((e,o)=>{let{enableLink:n,link:l,richText:t,size:s}=e,{processedRichText:p,heading:f}=k(t,i?.settings?.box||"none",s||"full");return h("div",{className:d(`col-span-4 lg:col-span-${y[s]}`,{"md:col-span-2":s!=="full"},b[s!=="full"&&!c(t)&&i?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${o+1}00`),children:[f&&r("div",{className:"bg-primary text-primary-foreground mb-4 -mt-4 -mx-4 px-4 py-2 text-xl",children:f.children[0].text}),p&&r(u,{content:p,enableGutter:!1,className:"rich-text"}),n&&r(m,{...l})]},o)})})})};export{B as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{f as l}from"./chunk-
|
|
4
|
+
import{f as l}from"./chunk-ZGDSCGLC.mjs";import{a as r}from"./chunk-2QZUKVBA.mjs";import{a as s}from"./chunk-VRE6VCHX.mjs";import h from"next/image";import{jsx as e,jsxs as t}from"react/jsx-runtime";var x=({links:o,media:i,children:m,richText:a})=>e("div",{children:t("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[t("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[m||a&&e(l,{className:"max-w-none p-0 mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:a,enableGutter:!0}),Array.isArray(o)&&o.length>0&&e("ul",{className:"flex justify-center gap-4",children:o.map(({link:n},d)=>e("li",{children:e(r,{...n})},d))})]}),t("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[i&&typeof i=="object"&&e(s,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:i}),i&&typeof i=="string"&&e("div",{children:e(h,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:i})}),e("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),e(p,{})]})}),p=()=>e("div",{className:"w-full h-[1240px] z-10",children:t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[e("defs",{children:t("mask",{id:"mask",children:[e("rect",{width:"1920",height:"332",fill:"white"}),e("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),e("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),e("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});export{x as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as y}from"./chunk-
|
|
4
|
+
import{a as y}from"./chunk-7GWTDITT.mjs";import{a as x,c as N,e as w,i as h}from"./chunk-3UMMMQEH.mjs";import{b as n}from"./chunk-ZUA4KNIR.mjs";import{a as p}from"./chunk-MDJREBVI.mjs";import{motion as b}from"motion/react";import{Trash2 as F,Edit as D}from"lucide-react";import*as C from"@radix-ui/react-dialog";import{Loader2 as L}from"lucide-react";import{useState as v}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var k=s=>{if(!s||s<=0)return"0 KB";let o=s/1024;return o<1024?`${o.toFixed(2)} KB`:`${(o/1024).toFixed(2)} MB`};function q({files:s,onFileClick:o,onFileDelete:m,onFileUpdate:z,showHeader:T=!0,className:P,viewMode:l="list"}){let[S,r]=v(!1),[B,g]=v(!1),[d,c]=v(null),u=()=>{r(!1),c(null)},E=()=>{g(!0),setTimeout(()=>{g(!1),r(!1),c(null)},500)},f=t=>{c(t),r(!0)};return a("div",{className:p("rounded-3xl border overflow-hidden",P),children:[a("div",{className:"bg-muted/50 p-3 flex items-center justify-between",children:[T&&l==="list"&&a("div",{className:"hidden md:grid md:grid-cols-10 text-sm font-medium flex-1",children:[e("div",{className:"col-span-6",children:"Name"}),e("div",{className:"col-span-2",children:"Size"}),e("div",{className:"col-span-2",children:"Modified"})]}),l==="card"&&e("div",{className:"text-sm font-medium",children:"Files"})]}),l==="list"&&e("div",{className:"divide-y",children:s.map(t=>a(b.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>o?.(t),children:[a("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),e("div",{children:e("p",{className:"font-medium",children:t.name})})]}),e("div",{className:"col-span-2 text-sm md:text-base",children:k(t.filesize)}),a("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[e("span",{className:"text-sm md:text-base",children:new Date(t.createdAt).toLocaleDateString()}),a("div",{className:"flex gap-1",children:[t.mimeType==="text/markdown"&&e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),f(t)},children:e(D,{className:"h-4 w-4"})}),e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),m?.(t)},children:e(F,{className:"h-4 w-4"})})]})]})]},t.name))}),l==="card"&&e("div",{className:"p-4 grid grid-cols-1 gap-4",children:s.map(t=>e(b.div,{whileHover:{scale:1.02},className:"border rounded-lg p-4 bg-card hover:bg-muted/50 transition-colors cursor-pointer",onClick:()=>o?.(t),children:a("div",{className:"flex items-start justify-between gap-4",children:[a("div",{className:"flex-1 min-w-0 space-y-2",children:[a("div",{className:"flex items-center gap-3",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted flex-shrink-0"}),e("div",{className:"min-w-0 flex-1",children:e("p",{className:"font-medium truncate",children:t.name})})]}),a("div",{className:"space-y-1 text-sm text-muted-foreground pl-[52px]",children:[a("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-medium",children:"Size:"}),e("span",{children:k(t.filesize)})]}),a("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-medium",children:"Modified:"}),e("span",{children:new Date(t.createdAt).toLocaleDateString()})]})]})]}),a("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[t.mimeType==="text/markdown"&&e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),f(t)},title:"Edit",children:e(D,{className:"h-4 w-4"})}),e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),m?.(t)},title:"Delete",children:e(F,{className:"h-4 w-4"})})]})]})},t.name))}),e(x,{open:S,onOpenChange:t=>!t&&u(),children:a(N,{children:[e(w,{}),a(C.Content,{className:p("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[e(h,{className:"sr-only",children:d?`Edit ${d.name}`:"Edit File"}),B&&e("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:e(L,{className:"h-8 w-8 animate-spin text-primary"})}),d&&e(y,{document:d,onSave:E,onFileUpdate:z,onCancel:u})]})]})})]})}export{q as a};
|