UNPKG

@questionable-focus/stationery-cupboard

Version:

A collection of business document templates for React applications

1,094 lines (1,091 loc) 51.5 kB
import { jsx as n, jsxs as d } from "react/jsx-runtime"; import * as ae from "react"; const A = { fontFamily: { heading: "Inter, system-ui, sans-serif", body: "Inter, system-ui, sans-serif" }, fontSize: { heading1: "2rem", heading2: "1.5rem", heading3: "1.25rem", body: "1rem", small: "0.875rem" }, colors: { primary: "#3b82f6", secondary: "#6b7280", accent: "#10b981", background: "#ffffff", text: "#1f2937", muted: "#9ca3af", border: "#e5e7eb", success: "#10b981", error: "#ef4444" }, spacing: { xs: "0.25rem", sm: "0.5rem", md: "1rem", lg: "1.5rem", xl: "2rem" }, documents: { header: { background: "#f9fafb", color: "#1f2937" }, footer: { background: "#f9fafb", color: "#1f2937" }, table: { headerBackground: "#ffffff", headerColor: "#1f2937", rowBackground: "#ffffff", rowColor: "#1f2937", alternateRowBackground: "#ffffff" } } }; function $(t = {}) { var a, r, o; return { fontFamily: { ...A.fontFamily, ...t.fontFamily }, fontSize: { ...A.fontSize, ...t.fontSize }, colors: { ...A.colors, ...t.colors }, spacing: { ...A.spacing, ...t.spacing }, documents: { header: { ...A.documents.header, ...(a = t.documents) == null ? void 0 : a.header }, footer: { ...A.documents.footer, ...(r = t.documents) == null ? void 0 : r.footer }, table: { ...A.documents.table, ...(o = t.documents) == null ? void 0 : o.table } } }; } const oe = ({ theme: t = {}, children: a }) => { const r = $(t); return /* @__PURE__ */ n( "div", { className: "w-full max-w-4xl mx-auto p-8 print:p-0 bg-white", style: { fontFamily: r.fontFamily.body, color: r.colors.text, backgroundColor: r.colors.background }, children: a } ); }, De = ({ paymentDetails: t }) => { const a = { bankName: "Bank", accountName: "Account Name", accountNumber: "Account Number", routingNumber: "Routing Number", sortCode: "Sort Code", iban: "IBAN", swiftCode: "SWIFT Code", bic: "BIC", reference: "Reference", additionalInfo: "Additional Information" }, r = Object.entries(t).filter(([o, s]) => s !== void 0).map(([o]) => o); return /* @__PURE__ */ n("div", { className: "inline-block md:ml-auto print:ml-auto", children: /* @__PURE__ */ n("table", { className: "text-xs w-auto", children: /* @__PURE__ */ n("tbody", { children: r.map((o) => /* @__PURE__ */ d("tr", { children: [ /* @__PURE__ */ n("td", { className: "pr-4 py-1 text-left text-xs font-medium text-gray-500", children: a[o] }), /* @__PURE__ */ n("td", { className: "pl-4 py-1 text-xs whitespace-nowrap", children: t[o] }) ] }, o)) }) }) }); }, Ie = (t) => De(t), Lt = ({ data: t, theme: a = {}, children: r }) => { const o = $(a), s = t.currency || "USD", i = t.items.reduce( (b, e) => b + e.quantity * e.unitPrice, 0 ), h = t.taxRate ? i * t.taxRate / 100 : 0, g = t.discountAmount || 0, f = i + h - g; function w(b) { const e = new Date(b); return new Intl.DateTimeFormat("en-GB", { day: "numeric", month: "short", year: "numeric" }).format(e); } const k = (b) => b.toLocaleString("en-US", { style: "currency", currency: s }); return /* @__PURE__ */ n(oe, { theme: a, children: /* @__PURE__ */ d("div", { children: [ /* @__PURE__ */ d("div", { className: "flex justify-between items-start", children: [ /* @__PURE__ */ n( "h2", { className: "text-4xl font-bold text-gray-900", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading1 }, children: "Invoice" } ), /* @__PURE__ */ d("div", { className: "text-right", children: [ t.companyDetails.logo ? /* @__PURE__ */ n( "img", { src: t.companyDetails.logo, alt: "Company Logo", className: "h-16 mb-2 ml-auto" } ) : /* @__PURE__ */ n( "h3", { className: "text-lg font-semibold text-gray-900", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading3 }, children: t.companyDetails.name } ), /* @__PURE__ */ n("div", { className: "mt-1 text-xs text-gray-500", children: t.companyDetails.address.map((b, e) => /* @__PURE__ */ n("div", { children: b }, e)) }), t.companyDetails.contactInfo && /* @__PURE__ */ d("div", { className: "mt-1 text-xs text-gray-500", children: [ t.companyDetails.contactInfo.contactName && /* @__PURE__ */ n("div", { children: t.companyDetails.contactInfo.contactName }), t.companyDetails.contactInfo.phone && /* @__PURE__ */ n("div", { children: t.companyDetails.contactInfo.phone }), t.companyDetails.contactInfo.email && /* @__PURE__ */ n("div", { children: t.companyDetails.contactInfo.email }), t.companyDetails.contactInfo.website && /* @__PURE__ */ n("div", { children: t.companyDetails.contactInfo.website }) ] }) ] }) ] }), /* @__PURE__ */ d("div", { className: "flex justify-between mt-16", children: [ /* @__PURE__ */ d("div", { className: "mb-8 md:mb-0 print:mb-0", children: [ /* @__PURE__ */ n("h3", { className: "text-lg font-semibold text-gray-900", children: t.clientDetails.name }), /* @__PURE__ */ n("div", { className: "mt-1 text-sm text-gray-500", children: t.clientDetails.address.map((b, e) => /* @__PURE__ */ n("div", { children: b }, e)) }), t.clientDetails.contactInfo && /* @__PURE__ */ d("div", { className: "mt-1 text-sm text-gray-500", children: [ t.clientDetails.contactInfo.contactName && /* @__PURE__ */ n("div", { children: t.clientDetails.contactInfo.contactName }), t.clientDetails.contactInfo.phone && /* @__PURE__ */ n("div", { children: t.clientDetails.contactInfo.phone }), t.clientDetails.contactInfo.email && /* @__PURE__ */ n("div", { children: t.clientDetails.contactInfo.email }), t.clientDetails.contactInfo.website && /* @__PURE__ */ n("div", { children: t.clientDetails.contactInfo.website }) ] }) ] }), /* @__PURE__ */ n("div", { className: "md:text-right print:text-right", children: /* @__PURE__ */ n("table", { className: "md:ml-auto print:ml-auto", children: /* @__PURE__ */ d("tbody", { children: [ /* @__PURE__ */ d("tr", { children: [ /* @__PURE__ */ n("th", { className: "pr-4 py-1 text-left text-xs font-medium text-gray-500", children: "Invoice reference" }), /* @__PURE__ */ n("td", { className: "pl-4 py-1 text-xs", children: t.invoiceNumber }) ] }), /* @__PURE__ */ d("tr", { children: [ /* @__PURE__ */ n("th", { className: "pr-4 py-1 text-left text-xs font-medium text-gray-500", children: "Invoice date" }), /* @__PURE__ */ n("td", { className: "pl-4 py-1 text-xs", children: w(t.issueDate) }) ] }), /* @__PURE__ */ d("tr", { children: [ /* @__PURE__ */ n("th", { className: "pr-4 py-1 text-left text-xs font-medium text-gray-500", children: "Due date" }), /* @__PURE__ */ n("td", { className: "pl-4 py-1 text-xs", children: w(t.dueDate) }) ] }) ] }) }) }) ] }), /* @__PURE__ */ n("div", { className: "mt-16", children: /* @__PURE__ */ d("table", { className: "w-full", children: [ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ d( "tr", { className: "border-b border-gray-200", style: { backgroundColor: o.documents.table.headerBackground }, children: [ /* @__PURE__ */ n("th", { className: "py-3 text-left text-sm font-medium text-gray-500 uppercase tracking-wider", children: "Item" }), /* @__PURE__ */ n("th", { className: "py-3 text-center text-sm font-medium text-gray-500 uppercase tracking-wider w-24", children: "Qty" }), /* @__PURE__ */ n("th", { className: "py-3 text-right text-sm font-medium text-gray-500 uppercase tracking-wider w-32", children: "Unit" }), /* @__PURE__ */ n("th", { className: "py-3 text-right text-sm font-medium text-gray-500 uppercase tracking-wider w-32", children: "Total" }) ] } ) }), /* @__PURE__ */ n("tbody", { children: t.items.map((b, e) => /* @__PURE__ */ d( "tr", { className: "border-b border-gray-100", style: { backgroundColor: e % 2 === 0 ? o.documents.table.rowBackground : o.documents.table.alternateRowBackground }, children: [ /* @__PURE__ */ d("td", { className: "py-2", children: [ /* @__PURE__ */ n("div", { className: "font-medium", children: b.name }), b.description && /* @__PURE__ */ n("div", { className: "text-sm text-gray-500", children: b.description }) ] }), /* @__PURE__ */ n("td", { className: "py-2 text-center", children: b.quantity }), /* @__PURE__ */ n("td", { className: "py-2 text-right", children: k(b.unitPrice) }), /* @__PURE__ */ n("td", { className: "py-2 text-right font-medium", children: k(b.quantity * b.unitPrice) }) ] }, e )) }), /* @__PURE__ */ d("tfoot", { children: [ (t.taxRate || t.discountAmount) && /* @__PURE__ */ d("tr", { children: [ /* @__PURE__ */ n("td", { colSpan: 2 }), /* @__PURE__ */ n("th", { className: "pt-4 text-right text-sm font-semibold text-gray-900", children: "Subtotal" }), /* @__PURE__ */ n("td", { className: "pt-4 text-right text-sm font-bold text-gray-900", children: k(i) }) ] }), t.taxRate && /* @__PURE__ */ d("tr", { children: [ /* @__PURE__ */ n("td", { colSpan: 2 }), /* @__PURE__ */ d("th", { className: "py-2 text-right text-sm font-semibold text-gray-900", children: [ "Tax (", t.taxRate, "%)" ] }), /* @__PURE__ */ n("td", { className: "py-2 text-right text-sm font-bold text-gray-900", children: k(h) }) ] }), t.discountAmount && /* @__PURE__ */ d("tr", { children: [ /* @__PURE__ */ n("td", { colSpan: 2 }), /* @__PURE__ */ n("th", { className: "py-2 text-right text-sm font-semibold text-gray-900", children: "Discount" }), /* @__PURE__ */ n("td", { className: "py-2 text-right text-sm font-bold text-gray-900", children: k(g) }) ] }), /* @__PURE__ */ d("tr", { children: [ /* @__PURE__ */ n("td", { colSpan: 2 }), /* @__PURE__ */ n("th", { className: "py-4 text-right text-base font-semibold text-gray-900", children: "Total due" }), /* @__PURE__ */ n("td", { className: "py-4 text-right text-xl font-bold text-gray-900", children: k(f) }) ] }) ] }) ] }) }), /* @__PURE__ */ d("div", { className: "mt-16 flex flex-col md:flex-row print:flex-row justify-between", children: [ t.notes && /* @__PURE__ */ d("div", { className: "mb-8 md:mb-0 print:mb-0 md:w-1/2 print:w-1/2 pr-4", children: [ /* @__PURE__ */ n( "h3", { className: "text-sm font-semibold text-gray-900 mb-2", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading3 }, children: "Notes" } ), /* @__PURE__ */ n("p", { className: "text-xs text-gray-600", children: t.notes }) ] }), t.paymentDetails && /* @__PURE__ */ d( "div", { className: `${t.notes ? "md:w-1/2 print:w-1/2" : "w-full"} md:text-right print:text-right`, children: [ /* @__PURE__ */ n( "h4", { className: "text-xs font-semibold text-gray-900 mb-2", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading3 }, children: "Payment Details" } ), /* @__PURE__ */ n(Ie, { paymentDetails: t.paymentDetails }) ] } ) ] }), r ] }) }); }; function M() { return M = Object.assign ? Object.assign.bind() : function(t) { for (var a = 1; a < arguments.length; a++) { var r = arguments[a]; for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]); } return t; }, M.apply(this, arguments); } const Ce = ["children", "options"], p = { blockQuote: "0", breakLine: "1", breakThematic: "2", codeBlock: "3", codeFenced: "4", codeInline: "5", footnote: "6", footnoteReference: "7", gfmTask: "8", heading: "9", headingSetext: "10", htmlBlock: "11", htmlComment: "12", htmlSelfClosing: "13", image: "14", link: "15", linkAngleBraceStyleDetector: "16", linkBareUrlDetector: "17", linkMailtoDetector: "18", newlineCoalescer: "19", orderedList: "20", paragraph: "21", ref: "22", refImage: "23", refLink: "24", table: "25", text: "27", textBolded: "28", textEmphasized: "29", textEscaped: "30", textMarked: "31", textStrikethroughed: "32", unorderedList: "33" }; var K; (function(t) { t[t.MAX = 0] = "MAX", t[t.HIGH = 1] = "HIGH", t[t.MED = 2] = "MED", t[t.LOW = 3] = "LOW", t[t.MIN = 4] = "MIN"; })(K || (K = {})); const Y = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((t, a) => (t[a.toLowerCase()] = a, t), { class: "className", for: "htmlFor" }), ee = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, Fe = ["style", "script"], Be = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Ae = /mailto:/i, Me = /\n{2,}$/, ce = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Te = /^ *> ?/gm, $e = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Le = /^ {2,}\n/, Re = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, ie = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, se = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, Ue = /^(`+)((?:\\`|[^`])+)\1/, Ee = /^(?:\n *)*\n/, Oe = /\r\n?/g, Pe = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, je = /^\[\^([^\]]+)]/, qe = /\f/g, _e = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, He = /^\s*?\[(x|\s)\]/, de = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, me = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, pe = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, G = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, We = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, he = /^<!--[\s\S]*?(?:-->)/, Ge = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Z = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Ze = /^\{.*\}$/, Qe = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Ve = /^<([^ >]+@[^ >]+)>/, Xe = /^<([^ >]+:\/[^ >]+)>/, Je = /-([a-z])?/gi, ue = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Ke = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Ye = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, et = /^\[([^\]]*)\] ?\[([^\]]*)\]/, tt = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, nt = /\t/g, rt = /(^ *\||\| *$)/g, lt = /^ *:-+: *$/, at = /^ *:-+ *$/, ot = /^ *-+: *$/, O = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", ct = new RegExp(`^([*_])\\1${O}\\1\\1(?!\\1)`), it = new RegExp(`^([*_])${O}\\1(?!\\1)`), st = new RegExp(`^(==)${O}\\1`), dt = new RegExp(`^(~~)${O}\\1`), mt = /^\\([^0-9A-Za-z\s])/, j = /\\([^0-9A-Za-z\s])/g, pt = /^([\s\S](?:(?! |[0-9]\.)[^*_~\-\n<`\\\[!])*)/, ht = /^\n+/, ut = /^([ \t]*)/, ft = /\\([^\\])/g, gt = /(?:^|\n)( *)$/, Q = "(?:\\d+\\.)", V = "(?:[*+-])"; function fe(t) { return "( *)(" + (t === 1 ? Q : V) + ") +"; } const ge = fe(1), ye = fe(2); function xe(t) { return new RegExp("^" + (t === 1 ? ge : ye)); } const yt = xe(1), xt = xe(2); function be(t) { return new RegExp("^" + (t === 1 ? ge : ye) + "[^\\n]*(?:\\n(?!\\1" + (t === 1 ? Q : V) + " )[^\\n]*)*(\\n|$)", "gm"); } const bt = be(1), Nt = be(2); function Ne(t) { const a = t === 1 ? Q : V; return new RegExp("^( *)(" + a + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + a + " (?!" + a + " ))\\n*|\\s*\\n*$)"); } const ke = Ne(1), we = Ne(2); function te(t, a) { const r = a === 1, o = r ? ke : we, s = r ? bt : Nt, i = r ? yt : xt; return { match: T(function(h, g) { const f = gt.exec(g.prevCapture); return f && (g.list || !g.inline && !g.simple) ? o.exec(h = f[1] + h) : null; }), order: 1, parse(h, g, f) { const w = r ? +h[2] : void 0, k = h[0].replace(Me, ` `).match(s); let b = !1; return { items: k.map(function(e, c) { const l = i.exec(e)[0].length, u = new RegExp("^ {1," + l + "}", "gm"), m = e.replace(u, "").replace(i, ""), y = c === k.length - 1, x = m.indexOf(` `) !== -1 || y && b; b = x; const v = f.inline, z = f.list; let D; f.list = !0, x ? (f.inline = !1, D = U(m) + ` `) : (f.inline = !0, D = U(m)); const N = g(D, f); return f.inline = v, f.list = z, N; }), ordered: r, start: w }; }, render: (h, g, f) => t(h.ordered ? "ol" : "ul", { key: f.key, start: h.type === p.orderedList ? h.start : void 0 }, h.items.map(function(w, k) { return t("li", { key: k }, g(w, f)); })) }; } const kt = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), wt = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, ve = [ce, ie, se, de, pe, me, ue, ke, we], vt = [...ve, /^[^\n]+(?: \n|\n{2,})/, G, he, Z]; function U(t) { let a = t.length; for (; a > 0 && t[a - 1] <= " "; ) a--; return t.slice(0, a); } function L(t) { return t.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase(); } function St(t) { return ot.test(t) ? "right" : lt.test(t) ? "center" : at.test(t) ? "left" : null; } function ne(t, a, r, o) { const s = r.inTable; r.inTable = !0; let i = [[]], h = ""; function g() { if (!h) return; const f = i[i.length - 1]; f.push.apply(f, a(h, r)), h = ""; } return t.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((f, w, k) => { f.trim() === "|" && (g(), o) ? w !== 0 && w !== k.length - 1 && i.push([]) : h += f; }), g(), r.inTable = s, i; } function zt(t, a, r) { r.inline = !0; const o = t[2] ? t[2].replace(rt, "").split("|").map(St) : [], s = t[3] ? function(h, g, f) { return h.trim().split(` `).map(function(w) { return ne(w, g, f, !0); }); }(t[3], a, r) : [], i = ne(t[1], a, r, !!s.length); return r.inline = !1, s.length ? { align: o, cells: s, header: i, type: p.table } : { children: i, type: p.paragraph }; } function re(t, a) { return t.align[a] == null ? {} : { textAlign: t.align[a] }; } function T(t) { return t.inline = 1, t; } function F(t) { return T(function(a, r) { return r.inline ? t.exec(a) : null; }); } function B(t) { return T(function(a, r) { return r.inline || r.simple ? t.exec(a) : null; }); } function C(t) { return function(a, r) { return r.inline || r.simple ? null : t.exec(a); }; } function R(t) { return T(function(a) { return t.exec(a); }); } function Dt(t, a) { if (a.inline || a.simple) return null; let r = ""; t.split(` `).every((s) => (s += ` `, !ve.some((i) => i.test(s)) && (r += s, !!s.trim()))); const o = U(r); return o == "" ? null : [r, , o]; } function It(t) { try { if (decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g, "").match(/^\s*(javascript|vbscript|data(?!:image)):/i)) return null; } catch { return null; } return t; } function le(t) { return t.replace(ft, "$1"); } function E(t, a, r) { const o = r.inline || !1, s = r.simple || !1; r.inline = !0, r.simple = !0; const i = t(a, r); return r.inline = o, r.simple = s, i; } function Ct(t, a, r) { const o = r.inline || !1, s = r.simple || !1; r.inline = !1, r.simple = !0; const i = t(a, r); return r.inline = o, r.simple = s, i; } function Ft(t, a, r) { const o = r.inline || !1; r.inline = !1; const s = t(a, r); return r.inline = o, s; } const q = (t, a, r) => ({ children: E(a, t[2], r) }); function _() { return {}; } function H() { return null; } function Bt(...t) { return t.filter(Boolean).join(" "); } function W(t, a, r) { let o = t; const s = a.split("."); for (; s.length && (o = o[s[0]], o !== void 0); ) s.shift(); return o || r; } function At(t = "", a = {}) { function r(e, c, ...l) { const u = W(a.overrides, `${e}.props`, {}); return a.createElement(function(m, y) { const x = W(y, m); return x ? typeof x == "function" || typeof x == "object" && "render" in x ? x : W(y, `${m}.component`, m) : m; }(e, a.overrides), M({}, c, u, { className: Bt(c == null ? void 0 : c.className, u.className) || void 0 }), ...l); } function o(e) { e = e.replace(_e, ""); let c = !1; a.forceInline ? c = !0 : a.forceBlock || (c = tt.test(e) === !1); const l = w(f(c ? e : `${U(e).replace(ht, "")} `, { inline: c })); for (; typeof l[l.length - 1] == "string" && !l[l.length - 1].trim(); ) l.pop(); if (a.wrapper === null) return l; const u = a.wrapper || (c ? "span" : "div"); let m; if (l.length > 1 || a.forceWrapper) m = l; else { if (l.length === 1) return m = l[0], typeof m == "string" ? r("span", { key: "outer" }, m) : m; m = null; } return a.createElement(u, { key: "outer" }, m); } function s(e, c) { const l = c.match(Be); return l ? l.reduce(function(u, m) { const y = m.indexOf("="); if (y !== -1) { const x = function(N) { return N.indexOf("-") !== -1 && N.match(Ge) === null && (N = N.replace(Je, function(S, I) { return I.toUpperCase(); })), N; }(m.slice(0, y)).trim(), v = function(N) { const S = N[0]; return (S === '"' || S === "'") && N.length >= 2 && N[N.length - 1] === S ? N.slice(1, -1) : N; }(m.slice(y + 1).trim()), z = Y[x] || x; if (z === "ref") return u; const D = u[z] = function(N, S, I, Se) { return S === "style" ? I.split(/;\s?/).reduce(function(X, P) { const J = P.slice(0, P.indexOf(":")); return X[J.trim().replace(/(-[a-z])/g, (ze) => ze[1].toUpperCase())] = P.slice(J.length + 1).trim(), X; }, {}) : S === "href" || S === "src" ? Se(I, N, S) : (I.match(Ze) && (I = I.slice(1, I.length - 1)), I === "true" || I !== "false" && I); }(e, x, v, a.sanitizer); typeof D == "string" && (G.test(D) || Z.test(D)) && (u[z] = o(D.trim())); } else m !== "style" && (u[Y[m] || m] = !0); return u; }, {}) : null; } a.overrides = a.overrides || {}, a.sanitizer = a.sanitizer || It, a.slugify = a.slugify || L, a.namedCodesToUnicode = a.namedCodesToUnicode ? M({}, ee, a.namedCodesToUnicode) : ee, a.createElement = a.createElement || ae.createElement; const i = [], h = {}, g = { [p.blockQuote]: { match: C(ce), order: 1, parse(e, c, l) { const [, u, m] = e[0].replace(Te, "").match($e); return { alert: u, children: c(m, l) }; }, render(e, c, l) { const u = { key: l.key }; return e.alert && (u.className = "markdown-alert-" + a.slugify(e.alert.toLowerCase(), L), e.children.unshift({ attrs: {}, children: [{ type: p.text, text: e.alert }], noInnerParse: !0, type: p.htmlBlock, tag: "header" })), r("blockquote", u, c(e.children, l)); } }, [p.breakLine]: { match: R(Le), order: 1, parse: _, render: (e, c, l) => r("br", { key: l.key }) }, [p.breakThematic]: { match: C(Re), order: 1, parse: _, render: (e, c, l) => r("hr", { key: l.key }) }, [p.codeBlock]: { match: C(se), order: 0, parse: (e) => ({ lang: void 0, text: U(e[0].replace(/^ {4}/gm, "")).replace(j, "$1") }), render: (e, c, l) => r("pre", { key: l.key }, r("code", M({}, e.attrs, { className: e.lang ? `lang-${e.lang}` : "" }), e.text)) }, [p.codeFenced]: { match: C(ie), order: 0, parse: (e) => ({ attrs: s("code", e[3] || ""), lang: e[2] || void 0, text: e[4].replace(j, "$1"), type: p.codeBlock }) }, [p.codeInline]: { match: B(Ue), order: 3, parse: (e) => ({ text: e[2].replace(j, "$1") }), render: (e, c, l) => r("code", { key: l.key }, e.text) }, [p.footnote]: { match: C(Pe), order: 0, parse: (e) => (i.push({ footnote: e[2], identifier: e[1] }), {}), render: H }, [p.footnoteReference]: { match: F(je), order: 1, parse: (e) => ({ target: `#${a.slugify(e[1], L)}`, text: e[1] }), render: (e, c, l) => r("a", { key: l.key, href: a.sanitizer(e.target, "a", "href") }, r("sup", { key: l.key }, e.text)) }, [p.gfmTask]: { match: F(He), order: 1, parse: (e) => ({ completed: e[1].toLowerCase() === "x" }), render: (e, c, l) => r("input", { checked: e.completed, key: l.key, readOnly: !0, type: "checkbox" }) }, [p.heading]: { match: C(a.enforceAtxHeadings ? me : de), order: 1, parse: (e, c, l) => ({ children: E(c, e[2], l), id: a.slugify(e[2], L), level: e[1].length }), render: (e, c, l) => r(`h${e.level}`, { id: e.id, key: l.key }, c(e.children, l)) }, [p.headingSetext]: { match: C(pe), order: 0, parse: (e, c, l) => ({ children: E(c, e[1], l), level: e[2] === "=" ? 1 : 2, type: p.heading }) }, [p.htmlBlock]: { match: R(G), order: 1, parse(e, c, l) { const [, u] = e[3].match(ut), m = new RegExp(`^${u}`, "gm"), y = e[3].replace(m, ""), x = (v = y, vt.some((I) => I.test(v)) ? Ft : E); var v; const z = e[1].toLowerCase(), D = Fe.indexOf(z) !== -1, N = (D ? z : e[1]).trim(), S = { attrs: s(N, e[2]), noInnerParse: D, tag: N }; return l.inAnchor = l.inAnchor || z === "a", D ? S.text = e[3] : S.children = x(c, y, l), l.inAnchor = !1, S; }, render: (e, c, l) => r(e.tag, M({ key: l.key }, e.attrs), e.text || (e.children ? c(e.children, l) : "")) }, [p.htmlSelfClosing]: { match: R(Z), order: 1, parse(e) { const c = e[1].trim(); return { attrs: s(c, e[2] || ""), tag: c }; }, render: (e, c, l) => r(e.tag, M({}, e.attrs, { key: l.key })) }, [p.htmlComment]: { match: R(he), order: 1, parse: () => ({}), render: H }, [p.image]: { match: B(wt), order: 1, parse: (e) => ({ alt: e[1], target: le(e[2]), title: e[3] }), render: (e, c, l) => r("img", { key: l.key, alt: e.alt || void 0, title: e.title || void 0, src: a.sanitizer(e.target, "img", "src") }) }, [p.link]: { match: F(kt), order: 3, parse: (e, c, l) => ({ children: Ct(c, e[1], l), target: le(e[2]), title: e[3] }), render: (e, c, l) => r("a", { key: l.key, href: a.sanitizer(e.target, "a", "href"), title: e.title }, c(e.children, l)) }, [p.linkAngleBraceStyleDetector]: { match: F(Xe), order: 0, parse: (e) => ({ children: [{ text: e[1], type: p.text }], target: e[1], type: p.link }) }, [p.linkBareUrlDetector]: { match: T((e, c) => c.inAnchor || a.disableAutoLink ? null : F(Qe)(e, c)), order: 0, parse: (e) => ({ children: [{ text: e[1], type: p.text }], target: e[1], title: void 0, type: p.link }) }, [p.linkMailtoDetector]: { match: F(Ve), order: 0, parse(e) { let c = e[1], l = e[1]; return Ae.test(l) || (l = "mailto:" + l), { children: [{ text: c.replace("mailto:", ""), type: p.text }], target: l, type: p.link }; } }, [p.orderedList]: te(r, 1), [p.unorderedList]: te(r, 2), [p.newlineCoalescer]: { match: C(Ee), order: 3, parse: _, render: () => ` ` }, [p.paragraph]: { match: T(Dt), order: 3, parse: q, render: (e, c, l) => r("p", { key: l.key }, c(e.children, l)) }, [p.ref]: { match: F(Ke), order: 0, parse: (e) => (h[e[1]] = { target: e[2], title: e[4] }, {}), render: H }, [p.refImage]: { match: B(Ye), order: 0, parse: (e) => ({ alt: e[1] || void 0, ref: e[2] }), render: (e, c, l) => h[e.ref] ? r("img", { key: l.key, alt: e.alt, src: a.sanitizer(h[e.ref].target, "img", "src"), title: h[e.ref].title }) : null }, [p.refLink]: { match: F(et), order: 0, parse: (e, c, l) => ({ children: c(e[1], l), fallbackChildren: e[0], ref: e[2] }), render: (e, c, l) => h[e.ref] ? r("a", { key: l.key, href: a.sanitizer(h[e.ref].target, "a", "href"), title: h[e.ref].title }, c(e.children, l)) : r("span", { key: l.key }, e.fallbackChildren) }, [p.table]: { match: C(ue), order: 1, parse: zt, render(e, c, l) { const u = e; return r("table", { key: l.key }, r("thead", null, r("tr", null, u.header.map(function(m, y) { return r("th", { key: y, style: re(u, y) }, c(m, l)); }))), r("tbody", null, u.cells.map(function(m, y) { return r("tr", { key: y }, m.map(function(x, v) { return r("td", { key: v, style: re(u, v) }, c(x, l)); })); }))); } }, [p.text]: { match: R(pt), order: 4, parse: (e) => ({ text: e[0].replace(We, (c, l) => a.namedCodesToUnicode[l] ? a.namedCodesToUnicode[l] : c) }), render: (e) => e.text }, [p.textBolded]: { match: B(ct), order: 2, parse: (e, c, l) => ({ children: c(e[2], l) }), render: (e, c, l) => r("strong", { key: l.key }, c(e.children, l)) }, [p.textEmphasized]: { match: B(it), order: 3, parse: (e, c, l) => ({ children: c(e[2], l) }), render: (e, c, l) => r("em", { key: l.key }, c(e.children, l)) }, [p.textEscaped]: { match: B(mt), order: 1, parse: (e) => ({ text: e[1], type: p.text }) }, [p.textMarked]: { match: B(st), order: 3, parse: q, render: (e, c, l) => r("mark", { key: l.key }, c(e.children, l)) }, [p.textStrikethroughed]: { match: B(dt), order: 3, parse: q, render: (e, c, l) => r("del", { key: l.key }, c(e.children, l)) } }; a.disableParsingRawHTML === !0 && (delete g[p.htmlBlock], delete g[p.htmlSelfClosing]); const f = function(e) { let c = Object.keys(e); function l(u, m) { let y, x, v = [], z = "", D = ""; for (m.prevCapture = m.prevCapture || ""; u; ) { let N = 0; for (; N < c.length; ) { if (z = c[N], y = e[z], m.inline && !y.match.inline) { N++; continue; } const S = y.match(u, m); if (S) { D = S[0], m.prevCapture += D, u = u.substring(D.length), x = y.parse(S, l, m), x.type == null && (x.type = z), v.push(x); break; } N++; } } return m.prevCapture = "", v; } return c.sort(function(u, m) { let y = e[u].order, x = e[m].order; return y !== x ? y - x : u < m ? -1 : 1; }), function(u, m) { return l(function(y) { return y.replace(Oe, ` `).replace(qe, "").replace(nt, " "); }(u), m); }; }(g), w = (k = /* @__PURE__ */ function(e, c) { return function(l, u, m) { const y = e[l.type].render; return c ? c(() => y(l, u, m), l, u, m) : y(l, u, m); }; }(g, a.renderRule), function e(c, l = {}) { if (Array.isArray(c)) { const u = l.key, m = []; let y = !1; for (let x = 0; x < c.length; x++) { l.key = x; const v = e(c[x], l), z = typeof v == "string"; z && y ? m[m.length - 1] += v : v !== null && m.push(v), y = z; } return l.key = u, m; } return k(c, e, l); }); var k; const b = o(t); return i.length ? r("div", null, b, r("footer", { key: "footer" }, i.map(function(e) { return r("div", { id: a.slugify(e.identifier, L), key: e.identifier }, e.identifier, w(f(e.footnote, { inline: !0 }))); }))) : b; } const Mt = (t) => { let { children: a = "", options: r } = t, o = function(s, i) { if (s == null) return {}; var h, g, f = {}, w = Object.keys(s); for (g = 0; g < w.length; g++) i.indexOf(h = w[g]) >= 0 || (f[h] = s[h]); return f; }(t, Ce); return ae.cloneElement(At(a, r), o); }, Tt = ({ content: t, theme: a = {} }) => { const r = $(a); return /* @__PURE__ */ n( Mt, { options: { overrides: { h1: { component: "h1", props: { className: "text-2xl font-bold mb-4", style: { fontFamily: r.fontFamily.heading, fontSize: r.fontSize.heading1 } } }, h2: { component: "h2", props: { className: "text-xl font-bold mb-3", style: { fontFamily: r.fontFamily.heading, fontSize: r.fontSize.heading2 } } }, h3: { component: "h3", props: { className: "text-lg font-bold mb-2", style: { fontFamily: r.fontFamily.heading, fontSize: r.fontSize.heading3 } } }, p: { component: "p", props: { className: "mb-4", style: { fontFamily: r.fontFamily.body, fontSize: r.fontSize.body } } }, ul: { component: "ul", props: { className: "list-disc pl-5 mb-4" } }, ol: { component: "ol", props: { className: "list-decimal pl-5 mb-4" } }, li: { component: "li", props: { className: "mb-1" } }, a: { component: "a", props: { className: "text-blue-600 hover:underline", style: { color: r.colors.primary } } }, blockquote: { component: "blockquote", props: { className: "border-l-4 pl-4 italic my-4", style: { borderColor: r.colors.muted } } }, hr: { component: "hr", props: { className: "my-6", style: { borderColor: r.colors.border } } } } }, children: t } ); }, Rt = ({ data: t, theme: a = {}, children: r }) => { const o = $(a); return /* @__PURE__ */ n(oe, { theme: a, children: /* @__PURE__ */ d("div", { className: "flex flex-col space-y-6", children: [ /* @__PURE__ */ d("div", { className: "flex justify-between items-start", children: [ /* @__PURE__ */ d("div", { children: [ /* @__PURE__ */ n( "h1", { className: "text-2xl font-bold mb-2", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading1 }, children: t.title } ), /* @__PURE__ */ d("div", { className: "text-gray-600", children: [ /* @__PURE__ */ d("p", { children: [ "Date: ", t.date ] }), /* @__PURE__ */ d("p", { children: [ "Time: ", t.startTime, " - ", t.endTime ] }), t.location && /* @__PURE__ */ d("p", { children: [ "Location: ", t.location ] }) ] }) ] }), (t.organizationLogo || t.organizationName) && /* @__PURE__ */ d("div", { className: "text-right", children: [ t.organizationLogo && /* @__PURE__ */ n( "img", { src: t.organizationLogo, alt: "Organization Logo", className: "h-16 mb-2 ml-auto" } ), t.organizationName && /* @__PURE__ */ n("p", { className: "font-semibold", children: t.organizationName }) ] }) ] }), /* @__PURE__ */ d("div", { children: [ /* @__PURE__ */ n( "h2", { className: "text-xl font-semibold mb-3", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading2, color: o.colors.primary }, children: "Participants" } ), /* @__PURE__ */ n("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: t.participants.map((s, i) => /* @__PURE__ */ d( "div", { className: "p-2 rounded", style: { backgroundColor: i % 2 === 0 ? o.documents.table.rowBackground : o.documents.table.alternateRowBackground }, children: [ /* @__PURE__ */ n("p", { className: "font-semibold", children: s.name }), s.role && /* @__PURE__ */ n("p", { className: "text-sm", children: s.role }), s.organization && /* @__PURE__ */ n("p", { className: "text-sm", children: s.organization }), s.email && /* @__PURE__ */ n("p", { className: "text-sm text-gray-500", children: s.email }) ] }, `participants-${i}` )) }) ] }), t.absentees && t.absentees.length > 0 && /* @__PURE__ */ d("div", { children: [ /* @__PURE__ */ n( "h2", { className: "text-xl font-semibold mb-3", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading2, color: o.colors.secondary }, children: "Absentees" } ), /* @__PURE__ */ n("ul", { className: "list-disc pl-5", children: t.absentees.map((s, i) => /* @__PURE__ */ d("li", { children: [ /* @__PURE__ */ n("span", { className: "font-semibold", children: s.name }), s.role && ` (${s.role})`, s.organization && ` - ${s.organization}` ] }, `absentees-${i}`)) }) ] }), /* @__PURE__ */ d("div", { children: [ /* @__PURE__ */ n( "h2", { className: "text-xl font-semibold mb-3", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading2, color: o.colors.primary }, children: "Agenda" } ), /* @__PURE__ */ n("ol", { className: "list-decimal pl-5", children: t.agendaItems.map((s, i) => /* @__PURE__ */ d("li", { className: "mb-2", children: [ /* @__PURE__ */ n("span", { className: "font-semibold", children: s.title }), s.description && /* @__PURE__ */ n("p", { className: "text-gray-600 ml-2", children: s.description }) ] }, `agenda-${i}`)) }) ] }), /* @__PURE__ */ d("div", { children: [ /* @__PURE__ */ n( "h2", { className: "text-xl font-semibold mb-3", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading2, color: o.colors.primary }, children: "Meeting Minutes" } ), /* @__PURE__ */ n( "div", { className: "p-4 rounded", style: { backgroundColor: o.documents.table.rowBackground }, children: /* @__PURE__ */ n(Tt, { content: t.minutesMarkdown, theme: a }) } ) ] }), t.actionItems && t.actionItems.length > 0 && /* @__PURE__ */ d("div", { children: [ /* @__PURE__ */ n( "h2", { className: "text-xl font-semibold mb-3", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading2, color: o.colors.primary }, children: "Action Items" } ), /* @__PURE__ */ d("table", { className: "min-w-full border-collapse mb-4", children: [ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ d( "tr", { style: { backgroundColor: o.documents.table.headerBackground }, children: [ /* @__PURE__ */ n("th", { className: "border border-gray-300 p-2 text-left", children: "Action" }), /* @__PURE__ */ n("th", { className: "border border-gray-300 p-2 text-left", children: "Assignee" }), /* @__PURE__ */ n("th", { className: "border border-gray-300 p-2 text-left", children: "Due Date" }), /* @__PURE__ */ n("th", { className: "border border-gray-300 p-2 text-left", children: "Status" }) ] } ) }), /* @__PURE__ */ n("tbody", { children: t.actionItems.map((s, i) => { let h; switch (s.status) { case "completed": h = o.colors.success; break; case "in-progress": h = o.colors.accent; break; case "deferred": h = o.colors.secondary; break; default: h = o.colors.error; } return /* @__PURE__ */ d( "tr", { style: { backgroundColor: i % 2 === 0 ? o.documents.table.rowBackground : o.documents.table.alternateRowBackground }, children: [ /* @__PURE__ */ n("td", { className: "border border-gray-300 p-2", children: s.action }), /* @__PURE__ */ n("td", { className: "border border-gray-300 p-2", children: s.assignee }), /* @__PURE__ */ n("td", { className: "border border-gray-300 p-2", children: s.dueDate || "N/A" }), /* @__PURE__ */ n("td", { className: "border border-gray-300 p-2", children: /* @__PURE__ */ n( "span", { className: "px-2 py-1 rounded-md text-white", style: { backgroundColor: h }, children: s.status || "pending" } ) }) ] }, `actions-${i}` ); }) }) ] }) ] }), t.followUpMeeting && /* @__PURE__ */ d("div", { children: [ /* @__PURE__ */ n( "h2", { className: "text-xl font-semibold mb-3", style: { fontFamily: o.fontFamily.heading, fontSize: o.fontSize.heading2, color: o.colors.primary }, children: "Follow-up Meeting" } ), /* @__PURE__ */ d( "div", { className: "p-4 rounded-md", style: { backgroundColor: o.documents.table.rowBackground }, children: [ t.followUpMeeting.date && /* @__PURE__ */ d("p", { children: [ /* @__PURE__ */ n("span", { className: "font-semibold", children: "Date: " }), t.followUpMeeting.date ] }), t.followUpMeeting.time && /* @__PURE__ */ d("p", { children: [ /* @__PURE__ */ n("span", { className: "font-semibold", children: "Time: " }), t.followUpMeeting.time ] }), t.followUpMeeting.location && /* @__PURE__ */ d("p", { children: [ /* @__PURE__ */ n("span", { className: "font-semibold", children: "Location: " }), t.followUpMeeting.location ] }) ] } ) ] }), r ] }) }); }, Ut = ({ invoices: t, theme: a = {}, onRowClick: r }) => { const o = $(a), s = (i) => { const h = i.items.reduce( (w, k) => w + k.quantity * k.unitPrice, 0 ), g = i.taxRate ? h * i.taxRate / 100 : 0, f = i.discountAmount || 0; return h + g - f; }; return /* @__PURE__ */ n("div", { className: "overflow-x-auto", children: /* @__PURE__ */ d("table", { className: "min-w-full bg-white shadow-md rounded-lg overflow-hidden", children: [ /* @__PURE__ */ n( "thead", { style: { backgroundColor: o.documents.table.headerBackground }, children: /* @__PURE__ */ d("tr", { children: [ /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Invoice #" }), /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Date" }), /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Due Date" }), /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Client" }), /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Amount" }), /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Status" }) ] }) } ), /* @__PURE__ */ n("tbody", { className: "divide-y divide-gray-200", children: t.map((i, h) => { const w = new Date(i.dueDate) < /* @__PURE__ */ new Date(); let k = "Paid", b = o.colors.success; w ? (k = "Overdue", b = o.colors.error) : (k = "Pending", b = o.colors.accent); const e = s(i), c = i.currency || "USD"; return /* @__PURE__ */ d( "tr", { className: r ? "cursor-pointer hover:bg-gray-50" : "", onClick: () => r && r(i), style: { backgroundColor: h % 2 === 0 ? o.documents.table.rowBackground : o.documents.table.alternateRowBackground }, children: [ /* @__PURE__ */ n("td", { className: "px-6 py-4 whitespace-nowrap text-sm", children: i.invoiceNumber }), /* @__PURE__ */ n("td", { className: "px-6 py-4 whitespace-nowrap text-sm", children: i.issueDate }), /* @__PURE__ */ n("td", { className: "px-6 py-4 whitespace-nowrap text-sm", children: i.dueDate }), /* @__PURE__ */ n("td", { className: "px-6 py-4 whitespace-nowrap text-sm", children: i.clientDetails.name }), /* @__PURE__ */ n("td", { className: "px-6 py-4 whitespace-nowrap text-sm", children: e.toLocaleString("en-US", { style: "currency", currency: c }) }), /* @__PURE__ */ n("td", { className: "px-6 py-4 whitespace-nowrap text-sm", children: /* @__PURE__ */ n( "span", { className: "px-2 inline-flex text-xs leading-5 font-semibold rounded-full", style: { color: b, backgroundColor: `${b}20` }, children: k } ) }) ] }, i.invoiceNumber ); }) }) ] }) }); }, Et = ({ meetings: t, theme: a = {}, onRowClick: r }) => { const o = $(a), s = (i) => { if (!i.actionItems || i.actionItems.length === 0) return { total: 0, completed: 0 }; const h = i.actionItems.length, g = i.actionItems.filter( (f) => f.status === "completed" ).length; return { total: h, completed: g }; }; return /* @__PURE__ */ n("div", { className: "overflow-x-auto", children: /* @__PURE__ */ d("table", { className: "min-w-full bg-white shadow-md rounded-lg overflow-hidden", children: [ /* @__PURE__ */ n( "thead", { style: { backgroundColor: o.documents.table.headerBackground }, children: /* @__PURE__ */ d("tr", { children: [ /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Meeting" }), /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Date" }), /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Time" }), /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Participants" }), /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Action Items" }), /* @__PURE__ */ n("th", { className: "px-6 py-3 text-left text-xs font-medium uppercase tracking-wider", children: "Next Meeting" }) ] }) } ), /* @__PURE__ */ n("tbody", { className: "divide-y divide-gray-200", children: t.map((i, h) => { var f; const g = s(i); return /* @__PURE__ */ d( "tr", { className: r ? "cursor-pointer hover:bg-gray-50" : "", onClick: () => r && r(i), style: { backgroundColor: h % 2 === 0 ? o.documents.table.rowBackground : o.documents.table.alternateRowBackground }, children: [ /* @__PURE__ */ d("td", { className: "px-6 py-4 text-sm", children: [ /* @__PURE__ */ n("div", { className: "font-medium", children: i.title }), i.location && /* @__PURE__ */ n("div", { className: "text-xs text-gray-500", children: i.location }) ] }), /* @__PURE__ */ n("td", { className: "px-6 py-4 whitespace-nowrap text-sm", children: i.date }), /* @__PURE__ */ d("td", { className: "px-6 py-4 whitespace-nowrap text-sm", children: [ i.startTime, " - ", i.endTime ] }), /* @__PURE__ */ d("td", { className: "px-6 py-4 whitespace-nowrap text-sm", children: [ i.participants.length, " participants" ] }), /* @__PURE__ */ n("td", { className: "px-6 py-4 wh