@rizom/brain 0.2.0-alpha.11 → 0.2.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/site.js
CHANGED
|
@@ -829,10 +829,12 @@ ${H}`,templateName:"blog:excerpt"})).excerpt,await this.reportProgress($,{progre
|
|
|
829
829
|
prose-pre:rounded-lg prose-pre:my-6 prose-pre:p-4 prose-pre:overflow-x-auto prose-pre:text-sm
|
|
830
830
|
prose-blockquote:border-l-2 prose-blockquote:border-brand prose-blockquote:pl-6 prose-blockquote:py-2 prose-blockquote:mt-8 prose-blockquote:mb-2 prose-blockquote:text-lg prose-blockquote:leading-relaxed prose-blockquote:font-light prose-blockquote:not-italic
|
|
831
831
|
prose-hr:my-12
|
|
832
|
-
prose-img:rounded-lg prose-img:shadow-md prose-img:my-8`,$),dangerouslySetInnerHTML:{__html:w}},void 0,!1,void 0,this)};import{jsxDEV as QR0}from"preact/jsx-dev-runtime";var jn=O1("",{variants:{level:{1:"text-4xl font-bold mb-8 mt-0 leading-tight tracking-tight",2:"text-3xl font-semibold mt-16 mb-6 border-b pb-4 leading-snug tracking-tight",3:"text-2xl font-semibold mt-10 mb-4 leading-snug tracking-tight"}},defaultVariants:{level:1}});import{jsxDEV as KH}from"preact/jsx-dev-runtime";var fR=O1("bg-theme-subtle rounded-lg border border-theme hover:shadow-lg transition-shadow",{variants:{variant:{vertical:"flex flex-col p-6",horizontal:"flex flex-col sm:flex-row items-start gap-4 p-6",compact:"flex flex-col p-4"}},defaultVariants:{variant:"vertical"}}),sw=({href:w,variant:$,className:X,children:W})=>{let Y=b0(fR({variant:$}),X);if(w)return KH("article",{className:b0(Y,"group"),children:KH("a",{href:w,className:"contents",children:W},void 0,!1,void 0,this)},void 0,!1,void 0,this);return KH("article",{className:Y,children:W},void 0,!1,void 0,this)};import{jsxDEV as NR0}from"preact/jsx-dev-runtime";var Cn=O1("object-cover rounded-lg",{variants:{size:{small:"w-full sm:w-32 h-48 sm:h-32 flex-shrink-0",medium:"w-full sm:w-48 h-48",large:"w-full h-48"}},defaultVariants:{size:"medium"}});import{jsxDEV as KR}from"preact/jsx-dev-runtime";var HH=({src:w,alt:$,width:X,height:W,srcset:Y,sizes:J,className:G})=>{return KR("div",{className:b0("w-full overflow-hidden",G),children:KR("img",{src:w,alt:$,width:X,height:W,...Y&&{srcset:Y},...J&&{sizes:J},loading:"lazy",decoding:"async",style:{aspectRatio:`${X}/${W}`},className:"w-full h-auto rounded-lg"},void 0,!1,void 0,this)},void 0,!1,void 0,this)};import{jsxDEV as ER0}from"preact/jsx-dev-runtime";import{jsxDEV as CR0}from"preact/jsx-dev-runtime";import{jsxDEV as xR0}from"preact/jsx-dev-runtime";import{jsxDEV as gR0}from"preact/jsx-dev-runtime";var u8=(w,$={})=>{let{style:X="short",includeTime:W=!1}=$,Y=typeof w==="string"?new Date(w):w;if(W)return Y.toLocaleString();switch(X){case"long":return Y.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"});case"full":return Y.toLocaleDateString(void 0,{weekday:"long",year:"numeric",month:"long",day:"numeric"});case"short":default:return Y.toLocaleDateString()}};import{jsxDEV as hH}from"preact/jsx-dev-runtime";var g8=O1("rounded-full",{variants:{variant:{default:"bg-theme-muted text-theme",muted:"bg-theme text-theme-muted",accent:"bg-accent/10 text-accent"},size:{xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1",md:"text-sm px-3 py-1 font-medium",lg:"text-sm px-4 py-2 font-medium"}},defaultVariants:{variant:"default",size:"xs"}}),UH=({tags:w,maxVisible:$=5,variant:X,size:W,className:Y})=>{let J=w.slice(0,$),G=w.length-$;return hH("div",{className:b0("flex flex-wrap gap-2",Y),children:[J.map((f)=>hH("span",{className:b0(g8({variant:X,size:W})),children:f},f,!1,void 0,this)),G>0&&hH("span",{className:b0(g8({size:W}),"bg-transparent text-theme-muted"),children:["+",G," more"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as aR0}from"preact/jsx-dev-runtime";import{jsxDEV as Xq0}from"preact/jsx-dev-runtime";var bn=O1("",{variants:{titleSize:{"3xl":"text-3xl","4xl":"text-4xl"}},defaultVariants:{titleSize:"4xl"}});import{jsxDEV as fq0}from"preact/jsx-dev-runtime";var In=O1("px-2 py-1 rounded-full",{variants:{variant:{default:"bg-theme",muted:"bg-theme-muted"}},defaultVariants:{variant:"default"}});import{jsxDEV as Uq0}from"preact/jsx-dev-runtime";import{jsxDEV as Oq0}from"preact/jsx-dev-runtime";import{jsxDEV as _q0}from"preact/jsx-dev-runtime";import{jsxDEV as qq0}from"preact/jsx-dev-runtime";var Sn=O1("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",{variants:{status:{draft:"bg-status-neutral text-status-neutral",queued:"bg-status-info text-status-info",sent:"bg-status-success text-status-success",failed:"bg-status-danger text-status-danger",published:"bg-status-success text-status-success",pending:"bg-status-warning text-status-warning",captured:"bg-status-info text-status-info",available:"bg-status-success text-status-success","early access":"bg-status-info text-status-info","coming soon":"bg-status-warning text-status-warning",planned:"bg-status-neutral text-status-neutral"}},defaultVariants:{status:"draft"}});import{jsxDEV as tw}from"preact/jsx-dev-runtime";var AH=({url:w,title:$,date:X,description:W,series:Y,featured:J})=>{return tw("li",{children:tw("a",{href:w,className:"group block",children:[Y&&tw("span",{className:"text-xs font-medium text-accent uppercase tracking-wide",children:[String(Y.index).padStart(3,"0")," ",Y.name]},void 0,!0,void 0,this),tw("h3",{className:b0("font-medium text-heading group-hover:underline mb-2",J?"text-2xl md:text-3xl":"text-lg"),children:$},void 0,!1,void 0,this),tw("time",{className:"text-sm text-theme-muted block mb-3",children:new Date(X).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})},void 0,!1,void 0,this),W&&tw("p",{className:"text-sm text-theme-muted leading-relaxed",children:W},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)};import{jsxDEV as s1,Fragment as HR}from"preact/jsx-dev-runtime";var V3=({title:w,items:$,children:X,viewAllUrl:W,emptyMessage:Y,variant:J="divided"})=>{let H=!(($&&$.length>0)??X)?s1("p",{className:"text-theme-muted italic",children:Y??`No ${w.toLowerCase()} yet.`},void 0,!1,void 0,null):X?s1(HR,{children:[X,W&&s1("div",{className:"mt-10",children:s1("a",{href:W,className:"text-sm font-medium text-brand hover:text-brand-dark uppercase tracking-wide",children:"Learn More \u2192"},void 0,!1,void 0,null)},void 0,!1,void 0,null)]},void 0,!0,void 0,null):s1(HR,{children:[s1("ul",{className:"space-y-10",children:$?.map((h,U)=>s1(AH,{url:h.url,title:h.title,date:h.date,description:h.description,series:h.series,featured:U===0},h.id,!1,void 0,this))},void 0,!1,void 0,null),W&&s1("div",{className:"mt-10",children:s1("a",{href:W,className:"text-sm font-medium text-brand hover:text-brand-dark uppercase tracking-wide",children:["View All ",w," \u2192"]},void 0,!0,void 0,null)},void 0,!1,void 0,null)]},void 0,!0,void 0,null);if(J==="stacked")return s1("section",{children:s1("div",{className:"border-t border-theme pt-8",children:[s1("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-8",children:w},void 0,!1,void 0,this),s1("div",{children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return s1("section",{children:s1("div",{className:"grid md:grid-cols-[200px_1px_1fr] gap-y-2 gap-x-0 md:gap-12 items-start",children:[s1("h2",{className:"text-xl md:text-2xl font-semibold text-heading",children:w},void 0,!1,void 0,this),s1("div",{className:"border-t md:border-t-0 md:border-l border-theme md:self-stretch"},void 0,!1,void 0,this),s1("div",{className:"mt-6 md:mt-0",children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)};import{createContext as xn,h as bq0}from"preact";import{useContext as yn}from"preact/hooks";var hR=xn(null);function QH(){return yn(hR)}function p1(w){let $=QH();if($)$.setHeadProps(w);return null}import{jsxDEV as mn}from"preact/jsx-dev-runtime";var M4=({markdown:w,className:$})=>{let X=V4();return mn(fH,{html:X(w),...$&&{className:$}},void 0,!1,void 0,this)};import{jsxDEV as M3}from"preact/jsx-dev-runtime";function FH(w,$){if($===1)return w;return`${w.endsWith("/")?w.slice(0,-1):w}/page/${$}`}function un(w,$,X){let W=[];W.push(1);let Y=Math.max(2,w-X),J=Math.min($-1,w+X);if(Y>2)W.push("ellipsis");for(let G=Y;G<=J;G++)W.push(G);if(J<$-1)W.push("ellipsis");if($>1)W.push($);return W}var OH="px-3 py-2 text-sm font-medium text-theme rounded-lg hover:text-brand hover:bg-theme-subtle transition-colors",gn="px-3 py-2 text-sm font-semibold text-brand bg-theme-subtle rounded-lg",UR="px-3 py-2 text-sm font-medium text-theme-muted cursor-not-allowed",ZH=({currentPage:w,totalPages:$,baseUrl:X,siblingCount:W=1})=>{if($<=1)return null;let Y=un(w,$,W),J=w>1,G=w<$;return M3("nav",{"aria-label":"Pagination",className:"flex items-center justify-center gap-1 mt-12",children:[J?M3("a",{href:FH(X,w-1),className:OH,"aria-label":"Previous page",children:"\u2190 Prev"},void 0,!1,void 0,this):M3("span",{className:UR,children:"\u2190 Prev"},void 0,!1,void 0,this),M3("div",{className:"flex items-center gap-1 mx-2",children:Y.map((f,H)=>f==="ellipsis"?M3("span",{className:"px-2 py-2 text-sm text-theme-muted",children:"\u2026"},`ellipsis-${H}`,!1,void 0,this):f===w?M3("span",{className:gn,"aria-current":"page",children:f},f,!1,void 0,this):M3("a",{href:FH(X,f),className:OH,children:f},f,!1,void 0,this))},void 0,!1,void 0,this),G?M3("a",{href:FH(X,w+1),className:OH,"aria-label":"Next page",children:"Next \u2192"},void 0,!1,void 0,this):M3("span",{className:UR,children:"Next \u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as ew}from"preact/jsx-dev-runtime";function zH({items:w}){return ew("nav",{"aria-label":"Breadcrumb",className:"text-sm text-theme-muted mb-6",children:ew("ol",{className:"flex flex-wrap items-center gap-1",children:w.map(($,X)=>{let W=X===w.length-1;return ew("li",{className:"flex items-center gap-1",children:[X>0&&ew("span",{className:"mx-1","aria-hidden":"true",children:"/"},void 0,!1,void 0,this),W||!$.href?ew("span",{className:"text-heading font-medium",children:$.label},void 0,!1,void 0,this):ew("a",{href:$.href,className:"hover:text-brand transition-colors",children:$.label},void 0,!1,void 0,this)]},X,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this)}import{jsxDEV as oq0}from"preact/jsx-dev-runtime";var ln=O1("newsletter-signup",{variants:{variant:{inline:"",card:"p-6 rounded-lg bg-theme-subtle",section:"py-16 text-center"}},defaultVariants:{variant:"card"}});J0();import{useState as tq0}from"preact/hooks";import{jsxDEV as Xv0}from"preact/jsx-dev-runtime";var wv0=Z.record(Z.unknown());J0();import{jsxDEV as fv0}from"preact/jsx-dev-runtime";var VH=Z.object({id:Z.string(),type:Z.string().optional(),name:Z.string().optional(),count:Z.number().optional(),priority:Z.string().optional(),status:Z.string().optional()}),Jv0=Z.object({jobs:Z.array(VH).optional(),batches:Z.array(VH).optional(),items:Z.array(VH).optional()});J0();import{jsxDEV as Av0}from"preact/jsx-dev-runtime";var hv0=Z.record(Z.unknown());J0();import{useState as Ov0}from"preact/hooks";import{jsxDEV as Mv0}from"preact/jsx-dev-runtime";var pn=Z.object({id:Z.string(),title:Z.string(),type:Z.string(),status:Z.enum(["draft","queued","published","failed"]),scheduledFor:Z.string().optional(),retryInfo:Z.string().optional()}),zv0=Z.object({summary:Z.object({draft:Z.number(),queued:Z.number(),published:Z.number(),failed:Z.number()}),items:Z.array(pn)});J0();import{jsxDEV as Rv0}from"preact/jsx-dev-runtime";var Nv0=Z.object({name:Z.string(),role:Z.string(),purpose:Z.string(),values:Z.array(Z.string())});J0();import{jsxDEV as Ev0}from"preact/jsx-dev-runtime";var kv0=Z.object({name:Z.string(),description:Z.string().optional(),links:Z.array(Z.object({label:Z.string(),url:Z.string()})).optional()});J0();import{jsxDEV as bv0}from"preact/jsx-dev-runtime";var jv0=Z.object({version:Z.string(),plugins:Z.string(),rendered:Z.string(),links:Z.array(Z.object({label:Z.string(),url:Z.string()})).optional()});import{jsxDEV as w9,Fragment as en}from"preact/jsx-dev-runtime";var MH=({posts:w,pageTitle:$,pagination:X,baseUrl:W="/posts"})=>{let Y=w.map((H)=>({id:H.id,url:H.url,title:H.metadata.title,date:H.metadata.publishedAt||H.created,description:H.frontmatter.excerpt,series:H.frontmatter.seriesName&&H.frontmatter.seriesIndex?{name:H.frontmatter.seriesName,index:H.frontmatter.seriesIndex}:void 0})),J=$??"Essays",G=X?.totalItems??w.length,f=`Browse all ${G} ${G===1?"essay":"essays"}`;return w9(en,{children:[w9(p1,{title:J,description:f},void 0,!1,void 0,this),w9("div",{className:"blog-list bg-theme",children:w9("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl py-16 md:py-24",children:[w9(V3,{title:J,items:Y},void 0,!1,void 0,this),X&&X.totalPages>1&&w9(ZH,{currentPage:X.currentPage,totalPages:X.totalPages,baseUrl:W},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};J0();import{jsxDEV as L1}from"preact/jsx-dev-runtime";var QR=({currentPost:w,seriesPosts:$})=>{if(!w.frontmatter.seriesName||!$)return null;let W=$.findIndex((J)=>J.id===w.id)+1,Y=$.length;return L1("aside",{className:"hidden lg:block w-64 shrink-0",children:L1("div",{className:"sticky top-8",children:L1(sw,{variant:"compact",children:[L1("h3",{className:"font-semibold text-theme text-sm mb-1",children:w.frontmatter.seriesName},void 0,!1,void 0,this),L1("p",{className:"text-xs text-theme-muted mb-4",children:["Part ",W," of ",Y]},void 0,!0,void 0,this),L1("ol",{className:"space-y-2 text-sm",children:$.map((J,G)=>L1("li",{className:J.id===w.id?"text-brand font-medium":"text-theme-muted hover:text-theme",children:J.id===w.id?L1("span",{className:"flex gap-2",children:[L1("span",{className:"text-brand",children:[G+1,"."]},void 0,!0,void 0,this),L1("span",{children:J.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this):L1("a",{href:J.url,className:"flex gap-2 hover:text-brand",children:[L1("span",{children:[G+1,"."]},void 0,!0,void 0,this),L1("span",{children:J.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},J.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},FR=({currentPost:w,seriesPosts:$})=>{if(!w.frontmatter.seriesName||!$)return null;let W=$.findIndex((J)=>J.id===w.id)+1,Y=$.length;return L1("details",{className:"lg:hidden bg-theme-subtle rounded-lg mb-8",children:[L1("summary",{className:"cursor-pointer p-4 text-sm font-medium text-theme",children:["Series: ",w.frontmatter.seriesName," (Part ",W," of ",Y,")"]},void 0,!0,void 0,this),L1("ol",{className:"px-4 pb-4 space-y-2 text-sm",children:$.map((J,G)=>L1("li",{className:J.id===w.id?"text-brand font-medium":"text-theme-muted",children:J.id===w.id?L1("span",{className:"flex gap-2",children:[L1("span",{className:"text-brand",children:[G+1,"."]},void 0,!0,void 0,this),L1("span",{children:J.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this):L1("a",{href:J.url,className:"flex gap-2 hover:text-brand",children:[L1("span",{children:[G+1,"."]},void 0,!0,void 0,this),L1("span",{children:J.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},J.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as _3}from"preact/jsx-dev-runtime";var OR=({prevPost:w,nextPost:$})=>{if(!w&&!$)return null;return _3("nav",{className:"border-t border-theme pt-8 mt-16",children:_3("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[w?_3(sw,{href:w.url,variant:"compact",children:[_3("span",{className:"text-xs text-theme-muted uppercase tracking-wide",children:"Previous"},void 0,!1,void 0,this),_3("span",{className:"block mt-1 font-medium text-heading group-hover:text-brand transition-colors truncate",children:w.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this):_3("div",{},void 0,!1,void 0,this),$&&_3(sw,{href:$.url,variant:"compact",className:"md:text-right",children:[_3("span",{className:"text-xs text-theme-muted uppercase tracking-wide",children:"Next"},void 0,!1,void 0,this),_3("span",{className:"block mt-1 font-medium text-heading group-hover:text-brand transition-colors truncate",children:$.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)};import{jsxDEV as eX}from"preact/jsx-dev-runtime";var ZR=({publishedAt:w,readingTime:$,className:X=""})=>{return eX("div",{className:`text-sm text-theme-muted ${X}`,children:[w&&eX("span",{children:u8(w,{style:"long"})},void 0,!1,void 0,this),w&&$&&eX("span",{children:" \u2022 "},void 0,!1,void 0,this),$&&eX("span",{children:[$," min read"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as g2,Fragment as wo}from"preact/jsx-dev-runtime";var l8=({post:w,prevPost:$,nextPost:X,seriesPosts:W})=>{let Y=Cf(w.body),J=Boolean(w.frontmatter.seriesName&&W),G=[{label:"Home",href:"/"},{label:w.listLabel,href:w.listUrl}];if(w.frontmatter.seriesName)G.push({label:w.frontmatter.seriesName,href:w.seriesUrl});return G.push({label:w.frontmatter.title}),g2(wo,{children:[g2(p1,{title:w.frontmatter.title,description:w.frontmatter.excerpt,...w.coverImageUrl&&{ogImage:w.coverImageUrl},ogType:"article"},void 0,!1,void 0,this),g2("section",{className:"blog-post-section",children:g2("div",{className:"container mx-auto px-6 md:px-8 py-12 md:py-20",children:g2("div",{className:`flex gap-12 ${J?"max-w-5xl":"max-w-3xl"} mx-auto`,children:[g2("div",{className:"flex-1 min-w-0 max-w-3xl",children:[g2(zH,{items:G},void 0,!1,void 0,this),w.coverImageUrl&&w.coverImageWidth&&w.coverImageHeight&&g2(HH,{src:w.coverImageUrl,alt:w.frontmatter.title,width:w.coverImageWidth,height:w.coverImageHeight,srcset:w.coverImageSrcset,sizes:w.coverImageSizes,className:"mb-8 shadow-lg"},void 0,!1,void 0,this),g2("h1",{className:"text-4xl md:text-5xl font-bold text-heading leading-tight tracking-tight mb-4",children:w.frontmatter.title},void 0,!1,void 0,this),g2(ZR,{publishedAt:w.frontmatter.publishedAt,readingTime:Y,className:"mb-8"},void 0,!1,void 0,this),g2(FR,{currentPost:w,seriesPosts:W},void 0,!1,void 0,this),g2(M4,{markdown:w.body},void 0,!1,void 0,this),g2(OR,{prevPost:$,nextPost:X},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g2(QR,{currentPost:w,seriesPosts:W},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};J0();n0();var $o=Z.object({title:Z.string().max(80).describe("A short, punchy title (2-4 words) that's memorable and evocative"),content:Z.string().describe("Blog post content in markdown format, relatively concise (30-80 lines), with flowing narrative style"),excerpt:Z.string().describe("A concise 1-2 sentence summary that captures the essence of the post")}),zR=Z1({name:"blog:generation",description:"Template for AI to generate complete blog posts from prompts",schema:$o,dataSourceId:"shell:ai-content",requiredPermission:"public",basePrompt:`You are writing blog posts in a distinctive voice that blends philosophy, technology, and culture.
|
|
832
|
+
prose-img:rounded-lg prose-img:shadow-md prose-img:my-8`,$),dangerouslySetInnerHTML:{__html:w}},void 0,!1,void 0,this)};import{jsxDEV as QR0}from"preact/jsx-dev-runtime";var jn=O1("",{variants:{level:{1:"text-4xl font-bold mb-8 mt-0 leading-tight tracking-tight",2:"text-3xl font-semibold mt-16 mb-6 border-b pb-4 leading-snug tracking-tight",3:"text-2xl font-semibold mt-10 mb-4 leading-snug tracking-tight"}},defaultVariants:{level:1}});import{jsxDEV as KH}from"preact/jsx-dev-runtime";var fR=O1("bg-theme-subtle rounded-lg border border-theme hover:shadow-lg transition-shadow",{variants:{variant:{vertical:"flex flex-col p-6",horizontal:"flex flex-col sm:flex-row items-start gap-4 p-6",compact:"flex flex-col p-4"}},defaultVariants:{variant:"vertical"}}),sw=({href:w,variant:$,className:X,children:W})=>{let Y=b0(fR({variant:$}),X);if(w)return KH("article",{className:b0(Y,"group"),children:KH("a",{href:w,className:"contents",children:W},void 0,!1,void 0,this)},void 0,!1,void 0,this);return KH("article",{className:Y,children:W},void 0,!1,void 0,this)};import{jsxDEV as NR0}from"preact/jsx-dev-runtime";var Cn=O1("object-cover rounded-lg",{variants:{size:{small:"w-full sm:w-32 h-48 sm:h-32 flex-shrink-0",medium:"w-full sm:w-48 h-48",large:"w-full h-48"}},defaultVariants:{size:"medium"}});import{jsxDEV as KR}from"preact/jsx-dev-runtime";var HH=({src:w,alt:$,width:X,height:W,srcset:Y,sizes:J,className:G})=>{return KR("div",{className:b0("w-full overflow-hidden",G),children:KR("img",{src:w,alt:$,width:X,height:W,...Y&&{srcset:Y},...J&&{sizes:J},loading:"lazy",decoding:"async",style:{aspectRatio:`${X}/${W}`},className:"w-full h-auto rounded-lg"},void 0,!1,void 0,this)},void 0,!1,void 0,this)};import{jsxDEV as ER0}from"preact/jsx-dev-runtime";import{jsxDEV as CR0}from"preact/jsx-dev-runtime";import{jsxDEV as xR0}from"preact/jsx-dev-runtime";import{jsxDEV as gR0}from"preact/jsx-dev-runtime";var u8=(w,$={})=>{let{style:X="short",includeTime:W=!1}=$,Y=typeof w==="string"?new Date(w):w;if(W)return Y.toLocaleString();switch(X){case"long":return Y.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"});case"full":return Y.toLocaleDateString(void 0,{weekday:"long",year:"numeric",month:"long",day:"numeric"});case"short":default:return Y.toLocaleDateString()}};import{jsxDEV as hH}from"preact/jsx-dev-runtime";var g8=O1("rounded-full",{variants:{variant:{default:"bg-theme-muted text-theme",muted:"bg-theme text-theme-muted",accent:"bg-accent/10 text-accent"},size:{xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1",md:"text-sm px-3 py-1 font-medium",lg:"text-sm px-4 py-2 font-medium"}},defaultVariants:{variant:"default",size:"xs"}}),UH=({tags:w,maxVisible:$=5,variant:X,size:W,className:Y})=>{let J=w.slice(0,$),G=w.length-$;return hH("div",{className:b0("flex flex-wrap gap-2",Y),children:[J.map((f)=>hH("span",{className:b0(g8({variant:X,size:W})),children:f},f,!1,void 0,this)),G>0&&hH("span",{className:b0(g8({size:W}),"bg-transparent text-theme-muted"),children:["+",G," more"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as aR0}from"preact/jsx-dev-runtime";import{jsxDEV as Xq0}from"preact/jsx-dev-runtime";var bn=O1("",{variants:{titleSize:{"3xl":"text-3xl","4xl":"text-4xl"}},defaultVariants:{titleSize:"4xl"}});import{jsxDEV as fq0}from"preact/jsx-dev-runtime";var In=O1("px-2 py-1 rounded-full",{variants:{variant:{default:"bg-theme",muted:"bg-theme-muted"}},defaultVariants:{variant:"default"}});import{jsxDEV as Uq0}from"preact/jsx-dev-runtime";import{jsxDEV as Oq0}from"preact/jsx-dev-runtime";import{jsxDEV as _q0}from"preact/jsx-dev-runtime";import{jsxDEV as qq0}from"preact/jsx-dev-runtime";var Sn=O1("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",{variants:{status:{draft:"bg-status-neutral text-status-neutral",queued:"bg-status-info text-status-info",sent:"bg-status-success text-status-success",failed:"bg-status-danger text-status-danger",published:"bg-status-success text-status-success",pending:"bg-status-warning text-status-warning",captured:"bg-status-info text-status-info",available:"bg-status-success text-status-success","early access":"bg-status-info text-status-info","coming soon":"bg-status-warning text-status-warning",planned:"bg-status-neutral text-status-neutral"}},defaultVariants:{status:"draft"}});import{jsxDEV as tw}from"preact/jsx-dev-runtime";var AH=({url:w,title:$,date:X,description:W,series:Y,featured:J})=>{return tw("li",{children:tw("a",{href:w,className:"group block",children:[Y&&tw("span",{className:"text-xs font-medium text-accent uppercase tracking-wide",children:[String(Y.index).padStart(3,"0")," ",Y.name]},void 0,!0,void 0,this),tw("h3",{className:b0("font-medium text-heading group-hover:underline mb-2",J?"text-2xl md:text-3xl":"text-lg"),children:$},void 0,!1,void 0,this),tw("time",{className:"text-sm text-theme-muted block mb-3",children:new Date(X).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})},void 0,!1,void 0,this),W&&tw("p",{className:"text-sm text-theme-muted leading-relaxed",children:W},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)};import{jsxDEV as s1,Fragment as HR}from"preact/jsx-dev-runtime";var V3=({title:w,items:$,children:X,viewAllUrl:W,emptyMessage:Y,variant:J="divided"})=>{let H=!(($&&$.length>0)??X)?s1("p",{className:"text-theme-muted italic",children:Y??`No ${w.toLowerCase()} yet.`},void 0,!1,void 0,null):X?s1(HR,{children:[X,W&&s1("div",{className:"mt-10",children:s1("a",{href:W,className:"text-sm font-medium text-brand hover:text-brand-dark uppercase tracking-wide",children:"Learn More \u2192"},void 0,!1,void 0,null)},void 0,!1,void 0,null)]},void 0,!0,void 0,null):s1(HR,{children:[s1("ul",{className:"space-y-10",children:$?.map((h,U)=>s1(AH,{url:h.url,title:h.title,date:h.date,description:h.description,series:h.series,featured:U===0},h.id,!1,void 0,this))},void 0,!1,void 0,null),W&&s1("div",{className:"mt-10",children:s1("a",{href:W,className:"text-sm font-medium text-brand hover:text-brand-dark uppercase tracking-wide",children:["View All ",w," \u2192"]},void 0,!0,void 0,null)},void 0,!1,void 0,null)]},void 0,!0,void 0,null);if(J==="stacked")return s1("section",{children:s1("div",{className:"border-t border-theme pt-8",children:[s1("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-8",children:w},void 0,!1,void 0,this),s1("div",{children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return s1("section",{children:s1("div",{className:"grid md:grid-cols-[200px_1px_1fr] gap-y-2 gap-x-0 md:gap-12 items-start",children:[s1("h2",{className:"text-xl md:text-2xl font-semibold text-heading",children:w},void 0,!1,void 0,this),s1("div",{className:"border-t md:border-t-0 md:border-l border-theme md:self-stretch"},void 0,!1,void 0,this),s1("div",{className:"mt-6 md:mt-0",children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)};import{createContext as xn,h as bq0}from"preact";import{useContext as yn}from"preact/hooks";var hR=xn(null);function QH(){return yn(hR)}function p1(w){let $=QH();if($)$.setHeadProps(w);return null}import{jsxDEV as mn}from"preact/jsx-dev-runtime";var M4=({markdown:w,className:$})=>{let X=V4();return mn(fH,{html:X(w),...$&&{className:$}},void 0,!1,void 0,this)};import{jsxDEV as M3}from"preact/jsx-dev-runtime";function FH(w,$){if($===1)return w;return`${w.endsWith("/")?w.slice(0,-1):w}/page/${$}`}function un(w,$,X){let W=[];W.push(1);let Y=Math.max(2,w-X),J=Math.min($-1,w+X);if(Y>2)W.push("ellipsis");for(let G=Y;G<=J;G++)W.push(G);if(J<$-1)W.push("ellipsis");if($>1)W.push($);return W}var OH="px-3 py-2 text-sm font-medium text-theme rounded-lg hover:text-brand hover:bg-theme-subtle transition-colors",gn="px-3 py-2 text-sm font-semibold text-brand bg-theme-subtle rounded-lg",UR="px-3 py-2 text-sm font-medium text-theme-muted cursor-not-allowed",ZH=({currentPage:w,totalPages:$,baseUrl:X,siblingCount:W=1})=>{if($<=1)return null;let Y=un(w,$,W),J=w>1,G=w<$;return M3("nav",{"aria-label":"Pagination",className:"flex items-center justify-center gap-1 mt-12",children:[J?M3("a",{href:FH(X,w-1),className:OH,"aria-label":"Previous page",children:"\u2190 Prev"},void 0,!1,void 0,this):M3("span",{className:UR,children:"\u2190 Prev"},void 0,!1,void 0,this),M3("div",{className:"flex items-center gap-1 mx-2",children:Y.map((f,H)=>f==="ellipsis"?M3("span",{className:"px-2 py-2 text-sm text-theme-muted",children:"\u2026"},`ellipsis-${H}`,!1,void 0,this):f===w?M3("span",{className:gn,"aria-current":"page",children:f},f,!1,void 0,this):M3("a",{href:FH(X,f),className:OH,children:f},f,!1,void 0,this))},void 0,!1,void 0,this),G?M3("a",{href:FH(X,w+1),className:OH,"aria-label":"Next page",children:"Next \u2192"},void 0,!1,void 0,this):M3("span",{className:UR,children:"Next \u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as ew}from"preact/jsx-dev-runtime";function zH({items:w}){return ew("nav",{"aria-label":"Breadcrumb",className:"text-sm text-theme-muted mb-6",children:ew("ol",{className:"flex flex-wrap items-center gap-1",children:w.map(($,X)=>{let W=X===w.length-1;return ew("li",{className:"flex items-center gap-1",children:[X>0&&ew("span",{className:"mx-1","aria-hidden":"true",children:"/"},void 0,!1,void 0,this),W||!$.href?ew("span",{className:"text-heading font-medium",children:$.label},void 0,!1,void 0,this):ew("a",{href:$.href,className:"hover:text-brand transition-colors",children:$.label},void 0,!1,void 0,this)]},X,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this)}import{jsxDEV as oq0}from"preact/jsx-dev-runtime";var ln=O1("newsletter-signup",{variants:{variant:{inline:"",card:"p-6 rounded-lg bg-theme-subtle",section:"py-16 text-center"}},defaultVariants:{variant:"card"}});J0();import{useState as tq0}from"preact/hooks";import{jsxDEV as Xv0}from"preact/jsx-dev-runtime";var wv0=Z.record(Z.unknown());J0();import{jsxDEV as fv0}from"preact/jsx-dev-runtime";var VH=Z.object({id:Z.string(),type:Z.string().optional(),name:Z.string().optional(),count:Z.number().optional(),priority:Z.string().optional(),status:Z.string().optional()}),Jv0=Z.object({jobs:Z.array(VH).optional(),batches:Z.array(VH).optional(),items:Z.array(VH).optional()});J0();import{jsxDEV as Av0}from"preact/jsx-dev-runtime";var hv0=Z.record(Z.unknown());J0();import{useState as Ov0}from"preact/hooks";import{jsxDEV as Mv0}from"preact/jsx-dev-runtime";var pn=Z.object({id:Z.string(),title:Z.string(),type:Z.string(),status:Z.enum(["draft","queued","published","failed"]),scheduledFor:Z.string().optional(),retryInfo:Z.string().optional()}),zv0=Z.object({summary:Z.object({draft:Z.number(),queued:Z.number(),published:Z.number(),failed:Z.number()}),items:Z.array(pn)});J0();import{jsxDEV as Rv0}from"preact/jsx-dev-runtime";var Nv0=Z.object({name:Z.string(),role:Z.string(),purpose:Z.string(),values:Z.array(Z.string())});J0();import{jsxDEV as Ev0}from"preact/jsx-dev-runtime";var kv0=Z.object({name:Z.string(),description:Z.string().optional(),links:Z.array(Z.object({label:Z.string(),url:Z.string()})).optional()});J0();import{jsxDEV as bv0}from"preact/jsx-dev-runtime";var jv0=Z.object({version:Z.string(),plugins:Z.string(),rendered:Z.string(),links:Z.array(Z.object({label:Z.string(),url:Z.string()})).optional()});import{jsxDEV as w9,Fragment as en}from"preact/jsx-dev-runtime";var MH=({posts:w,pageTitle:$,pagination:X,baseUrl:W="/posts"})=>{let Y=w.map((H)=>({id:H.id,url:H.url,title:H.metadata.title,date:H.metadata.publishedAt||H.created,description:H.frontmatter.excerpt,series:H.frontmatter.seriesName&&H.frontmatter.seriesIndex?{name:H.frontmatter.seriesName,index:H.frontmatter.seriesIndex}:void 0})),J=$??"Essays",G=X?.totalItems??w.length,f=`Browse all ${G} ${G===1?"essay":"essays"}`;return w9(en,{children:[w9(p1,{title:J,description:f},void 0,!1,void 0,this),w9("div",{className:"blog-list bg-theme",children:w9("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl py-16 md:py-24",children:[w9(V3,{title:J,items:Y},void 0,!1,void 0,this),X&&X.totalPages>1&&w9(ZH,{currentPage:X.currentPage,totalPages:X.totalPages,baseUrl:W},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};J0();import{jsxDEV as L1}from"preact/jsx-dev-runtime";var QR=({currentPost:w,seriesPosts:$})=>{if(!w.frontmatter.seriesName||!$)return null;let W=$.findIndex((J)=>J.id===w.id)+1,Y=$.length;return L1("aside",{className:"hidden lg:block w-64 shrink-0",children:L1("div",{className:"sticky top-8",children:L1(sw,{variant:"compact",children:[L1("h3",{className:"font-semibold text-theme text-sm mb-1",children:w.frontmatter.seriesName},void 0,!1,void 0,this),L1("p",{className:"text-xs text-theme-muted mb-4",children:["Part ",W," of ",Y]},void 0,!0,void 0,this),L1("ol",{className:"space-y-2 text-sm",children:$.map((J,G)=>L1("li",{className:J.id===w.id?"text-brand font-medium":"text-theme-muted hover:text-theme",children:J.id===w.id?L1("span",{className:"flex gap-2",children:[L1("span",{className:"text-brand",children:[G+1,"."]},void 0,!0,void 0,this),L1("span",{children:J.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this):L1("a",{href:J.url,className:"flex gap-2 hover:text-brand",children:[L1("span",{children:[G+1,"."]},void 0,!0,void 0,this),L1("span",{children:J.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},J.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},FR=({currentPost:w,seriesPosts:$})=>{if(!w.frontmatter.seriesName||!$)return null;let W=$.findIndex((J)=>J.id===w.id)+1,Y=$.length;return L1("details",{className:"lg:hidden bg-theme-subtle rounded-lg mb-8",children:[L1("summary",{className:"cursor-pointer p-4 text-sm font-medium text-theme",children:["Series: ",w.frontmatter.seriesName," (Part ",W," of ",Y,")"]},void 0,!0,void 0,this),L1("ol",{className:"px-4 pb-4 space-y-2 text-sm",children:$.map((J,G)=>L1("li",{className:J.id===w.id?"text-brand font-medium":"text-theme-muted",children:J.id===w.id?L1("span",{className:"flex gap-2",children:[L1("span",{className:"text-brand",children:[G+1,"."]},void 0,!0,void 0,this),L1("span",{children:J.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this):L1("a",{href:J.url,className:"flex gap-2 hover:text-brand",children:[L1("span",{children:[G+1,"."]},void 0,!0,void 0,this),L1("span",{children:J.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},J.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as _3}from"preact/jsx-dev-runtime";var OR=({prevPost:w,nextPost:$})=>{if(!w&&!$)return null;return _3("nav",{className:"border-t border-theme pt-8 mt-16",children:_3("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[w?_3(sw,{href:w.url,variant:"compact",children:[_3("span",{className:"text-xs text-theme-muted uppercase tracking-wide",children:"Previous"},void 0,!1,void 0,this),_3("span",{className:"block mt-1 font-medium text-heading group-hover:text-brand transition-colors truncate",children:w.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this):_3("div",{},void 0,!1,void 0,this),$&&_3(sw,{href:$.url,variant:"compact",className:"md:text-right",children:[_3("span",{className:"text-xs text-theme-muted uppercase tracking-wide",children:"Next"},void 0,!1,void 0,this),_3("span",{className:"block mt-1 font-medium text-heading group-hover:text-brand transition-colors truncate",children:$.frontmatter.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)};import{jsxDEV as eX}from"preact/jsx-dev-runtime";var ZR=({publishedAt:w,readingTime:$,className:X=""})=>{return eX("div",{className:`text-sm text-theme-muted ${X}`,children:[w&&eX("span",{children:u8(w,{style:"long"})},void 0,!1,void 0,this),w&&$&&eX("span",{children:" \u2022 "},void 0,!1,void 0,this),$&&eX("span",{children:[$," min read"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as g2,Fragment as wo}from"preact/jsx-dev-runtime";var l8=({post:w,prevPost:$,nextPost:X,seriesPosts:W})=>{let Y=Cf(w.body),J=Boolean(w.frontmatter.seriesName&&W),G=[{label:"Home",href:"/"},{label:w.listLabel,href:w.listUrl}];if(w.frontmatter.seriesName)G.push({label:w.frontmatter.seriesName,href:w.seriesUrl});return G.push({label:w.frontmatter.title}),g2(wo,{children:[g2(p1,{title:w.frontmatter.title,description:w.frontmatter.excerpt,...w.coverImageUrl&&{ogImage:w.coverImageUrl},ogType:"article"},void 0,!1,void 0,this),g2("section",{className:"blog-post-section",children:g2("div",{className:"container mx-auto px-6 md:px-8 py-12 md:py-20",children:g2("div",{className:`flex gap-12 ${J?"max-w-5xl":"max-w-3xl"} mx-auto`,children:[g2("div",{className:"flex-1 min-w-0 max-w-3xl",children:[g2(zH,{items:G},void 0,!1,void 0,this),w.coverImageUrl&&w.coverImageWidth&&w.coverImageHeight&&g2(HH,{src:w.coverImageUrl,alt:w.frontmatter.title,width:w.coverImageWidth,height:w.coverImageHeight,srcset:w.coverImageSrcset,sizes:w.coverImageSizes,className:"mb-8 shadow-lg"},void 0,!1,void 0,this),g2("h1",{className:"text-4xl md:text-5xl font-bold text-heading leading-tight tracking-tight mb-4",children:w.frontmatter.title},void 0,!1,void 0,this),g2(ZR,{publishedAt:w.frontmatter.publishedAt,readingTime:Y,className:"mb-8"},void 0,!1,void 0,this),g2(FR,{currentPost:w,seriesPosts:W},void 0,!1,void 0,this),g2(M4,{markdown:w.body},void 0,!1,void 0,this),g2(OR,{prevPost:$,nextPost:X},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g2(QR,{currentPost:w,seriesPosts:W},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};J0();n0();var $o=Z.object({title:Z.string().trim().min(1).max(80).describe("A short, punchy title (2-4 words) that's memorable and evocative. Must not be empty."),content:Z.string().trim().min(1).describe("Blog post content in markdown format, relatively concise (30-80 lines), with flowing narrative style. Must not be empty."),excerpt:Z.string().trim().min(1).describe("A concise 1-2 sentence summary that captures the essence of the post. Must not be empty.")}),zR=Z1({name:"blog:generation",description:"Template for AI to generate complete blog posts from prompts",schema:$o,dataSourceId:"shell:ai-content",requiredPermission:"public",basePrompt:`You are writing blog posts in a distinctive voice that blends philosophy, technology, and culture.
|
|
833
833
|
|
|
834
834
|
Your task is to generate a complete blog post based on the user's prompt.
|
|
835
835
|
|
|
836
|
+
Always return non-empty values for title, content, and excerpt. Never return empty strings or placeholder-only output.
|
|
837
|
+
|
|
836
838
|
Style guidelines:
|
|
837
839
|
1. Title: Short and punchy (2-4 words). Evocative, not SEO-optimized. Examples: "False Media", "Foam Party", "The Low End Theory"
|
|
838
840
|
2. Opening: Start with a relevant quote - song lyrics (hip-hop, funk, etc.) or a philosopher/thinker quote in blockquote format
|
|
@@ -857,7 +859,7 @@ The excerpt should be clear, concise, and compelling.`});J0();l5();s5();import{j
|
|
|
857
859
|
Note: This is part of a series called "${X.seriesName}".`:""}`;return w.ai.generate({prompt:W,templateName:"blog:generation"})}),w.eval.registerHandler("generateExcerpt",async($)=>{let X=Uo.parse($);return w.ai.generate({prompt:`Title: ${X.title}
|
|
858
860
|
|
|
859
861
|
Content:
|
|
860
|
-
${X.content}`,templateName:"blog:excerpt"})})}var vR={name:"@brains/blog",private:!0,version:"0.2.0-alpha.11",description:"AI-powered blog post generation from existing brain content",type:"module",exports:{".":"./src/index.ts"},scripts:{typecheck:"tsc --noEmit",test:"bun test",lint:"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix",eval:"cd evals && bun run brain-eval"},dependencies:{"@brains/plugins":"workspace:*","@brains/utils":"workspace:*"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"latest","bun-types":"latest",eslint:"^8.56.0",typescript:"^5.3.3"}};class PR extends J6{entityType=Z4.entityType;schema=nw;adapter=Z4;constructor(w={}){super("blog",vR,w,nK)}getEntityTypeConfig(){return{weight:2}}createGenerationHandler(w){return new oK(this.logger.child("BlogGenerationJobHandler"),w)}getTemplates(){return _R()}getDataSources(){return[new sK(this.logger.child("BlogDataSource"))]}async onRegister(w){let{RSSDataSource:$}=await Promise.resolve().then(() => (ER(),LR));w.entities.registerDataSource(new $(this.logger.child("RSSDataSource"))),await BR(w,this.logger),NR(w,this.logger),RR(w,this.logger),qR(w),this.logger.info("Blog plugin registered (routes auto-generated at /posts/)")}}s5();I8();n0();n0();J0();n2();var TR=Z.enum(["png","jpg","jpeg","webp","gif","svg"]),jR=Z.object({title:Z.string().optional(),alt:Z.string().optional(),format:TR,width:Z.number(),height:Z.number(),sourceUrl:Z.string().url().optional()}),_H=Y2.extend({entityType:Z.literal("image"),metadata:jR}),Fo=Z.object({url:Z.string(),alt:Z.string(),title:Z.string(),width:Z.number(),height:Z.number()});J0();function $W(w){let $=w.match(/^data:image\/([a-z+]+);base64,(.+)$/i);if(!$?.[1]||!$[2])throw Error("Invalid image data URL");return{format:$[1].toLowerCase(),base64:$[2]}}var Oo={png:"iVBORw",jpg:"/9j/",gif:"R0lGOD",webp:"UklGR"};function BH(w){for(let[$,X]of Object.entries(Oo))if(w.startsWith(X))return $;return null}function XW(w){let $=Buffer.from(w,"base64");if($[0]===137&&$[1]===80&&$[2]===78&&$[3]===71){let X=$.readUInt32BE(16),W=$.readUInt32BE(20);return{width:X,height:W}}if($[0]===255&&$[1]===216){let X=2;while(X<$.length-8){if($[X]!==255){X++;continue}let W=$[X+1];if(W===192||W===194){let J=$.readUInt16BE(X+5);return{width:$.readUInt16BE(X+7),height:J}}let Y=$.readUInt16BE(X+2);X+=2+Y}}if($[0]===71&&$[1]===73&&$[2]===70){let X=$.readUInt16LE(6),W=$.readUInt16LE(8);return{width:X,height:W}}if($.length>=30&&$[0]===82&&$[1]===73&&$[2]===70&&$[3]===70){if($[12]===86&&$[13]===80&&$[14]===56){if($[15]===32){let X=$[26]??0,W=$[27]??0,Y=$[28]??0,J=$[29]??0,G=(X|W<<8)&16383,f=(Y|J<<8)&16383;return{width:G,height:f}}if($[15]===76&&$.length>=25){let X=$.readUInt32LE(21),W=(X&16383)+1,Y=(X>>14&16383)+1;return{width:W,height:Y}}}}return null}class NH{entityType="image";schema=_H;toMarkdown(w){return w.content}fromMarkdown(w){let{format:$,base64:X}=$W(w),W=XW(X);return{entityType:"image",content:w,metadata:{format:$,width:W?.width??0,height:W?.height??0}}}extractMetadata(w){return w.metadata}parseFrontMatter(w,$){return $.parse({})}generateFrontMatter(w){return""}getBodyTemplate(){return""}createImageEntity(w){let{dataUrl:$,title:X,alt:W}=w,{format:Y,base64:J}=$W($),G=XW(J),H=BH(J)??Y;return{entityType:"image",content:$,metadata:{title:X,alt:W??X,format:H,width:G?.width??0,height:G?.height??0}}}}var Zo=new NH;n2();J0();var zo=Z.object({coverImageId:Z.string().optional()}).passthrough();async function CR(w,$){let X=await $.getEntity("image",w);if(!X)return null;return{url:X.content,alt:X.metadata.alt??"",title:X.metadata.title??"",width:X.metadata.width,height:X.metadata.height}}function DH(w){try{let{metadata:$}=k1(w.content,zo);return $.coverImageId}catch{return}}async function WW(w,$){let X=DH(w);if(!X)return;return await CR(X,$)??void 0}J0();J0();var Vo=Z.object({environment:Z.enum(["preview","production"]),outputDir:Z.string(),workingDir:Z.string().optional(),sharedImagesDir:Z.string().default("./dist/images"),enableContentGeneration:Z.boolean().default(!1),cleanBeforeBuild:Z.boolean().default(!0),siteConfig:Z.object({title:Z.string(),description:Z.string(),url:Z.string().optional(),copyright:Z.string().optional(),themeMode:Z.enum(["light","dark"]).optional(),analyticsScript:Z.string().optional()}),layouts:Z.record(Z.any()),themeCSS:Z.string().optional()}),pE0=Z.object({success:Z.boolean(),outputDir:Z.string(),filesGenerated:Z.number(),routesBuilt:Z.number(),errors:Z.array(Z.string()).optional(),warnings:Z.array(Z.string()).optional()});import{render as xb0}from"preact-render-to-string";import{h as mb0}from"preact";var D1=b5(Lv(),1);var CP0=D1.default.stringify,bP0=D1.default.fromJSON,IP0=D1.default.plugin,SP0=D1.default.parse,xP0=D1.default.list,yP0=D1.default.document,mP0=D1.default.comment,uP0=D1.default.atRule,gP0=D1.default.rule,lP0=D1.default.decl,pP0=D1.default.root,rP0=D1.default.CssSyntaxError,dP0=D1.default.Declaration,cP0=D1.default.Container,iP0=D1.default.Processor,nP0=D1.default.Document,oP0=D1.default.Comment,aP0=D1.default.Warning,sP0=D1.default.AtRule,tP0=D1.default.Result,eP0=D1.default.Input,wT0=D1.default.Rule,$T0=D1.default.Root,XT0=D1.default.Node;var MC=b5(Tv(),1);var I4=b5(sE(),1);import*as bY from"module";import{pathToFileURL as Y40}from"url";var $P=b5(eE(),1);import{createRequire as wP}from"module";function u10(w){throw w}var g10=(w)=>import(w),Sh;function l10(...w){if(!Sh)Sh=wP(import.meta.url)("../dist/babel.cjs");return Sh(...w)}function XP(w,$={}){if(!$.transform)$={...$,transform:l10};return $P.default(w,$,{onError:u10,nativeImport:g10,createRequire:wP})}import vU from"fs";import pj from"fs/promises";import TY from"path";import{pathToFileURL as Vj}from"url";var pW={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},mauve:{50:"oklch(98.5% 0 0)",100:"oklch(96% 0.003 325.6)",200:"oklch(92.2% 0.005 325.62)",300:"oklch(86.5% 0.012 325.68)",400:"oklch(71.1% 0.019 323.02)",500:"oklch(54.2% 0.034 322.5)",600:"oklch(43.5% 0.029 321.78)",700:"oklch(36.4% 0.029 323.89)",800:"oklch(26.3% 0.024 320.12)",900:"oklch(21.2% 0.019 322.12)",950:"oklch(14.5% 0.008 326)"},olive:{50:"oklch(98.8% 0.003 106.5)",100:"oklch(96.6% 0.005 106.5)",200:"oklch(93% 0.007 106.5)",300:"oklch(88% 0.011 106.6)",400:"oklch(73.7% 0.021 106.9)",500:"oklch(58% 0.031 107.3)",600:"oklch(46.6% 0.025 107.3)",700:"oklch(39.4% 0.023 107.4)",800:"oklch(28.6% 0.016 107.4)",900:"oklch(22.8% 0.013 107.4)",950:"oklch(15.3% 0.006 107.1)"},mist:{50:"oklch(98.7% 0.002 197.1)",100:"oklch(96.3% 0.002 197.1)",200:"oklch(92.5% 0.005 214.3)",300:"oklch(87.2% 0.007 219.6)",400:"oklch(72.3% 0.014 214.4)",500:"oklch(56% 0.021 213.5)",600:"oklch(45% 0.017 213.2)",700:"oklch(37.8% 0.015 216)",800:"oklch(27.5% 0.011 216.9)",900:"oklch(21.8% 0.008 223.9)",950:"oklch(14.8% 0.004 228.8)"},taupe:{50:"oklch(98.6% 0.002 67.8)",100:"oklch(96% 0.002 17.2)",200:"oklch(92.2% 0.005 34.3)",300:"oklch(86.8% 0.007 39.5)",400:"oklch(71.4% 0.014 41.2)",500:"oklch(54.7% 0.021 43.1)",600:"oklch(43.8% 0.017 39.3)",700:"oklch(36.7% 0.016 35.7)",800:"oklch(26.8% 0.011 36.5)",900:"oklch(21.4% 0.009 43.1)",950:"oklch(14.7% 0.004 49.3)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};var p10=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","transparent","currentcolor","canvas","canvastext","linktext","visitedtext","activetext","buttonface","buttontext","buttonborder","field","fieldtext","highlight","highlighttext","selecteditem","selecteditemtext","mark","marktext","graytext","accentcolor","accentcolortext"]),r10=/^(rgba?|hsla?|hwb|color|(ok)?(lab|lch)|light-dark|color-mix)\(/i;function d10(w){return w.charCodeAt(0)===35||r10.test(w)||p10.has(w.toLowerCase())}var xh=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"];function cW(w){return w.indexOf("(")!==-1&&xh.some(($)=>w.includes(`${$}(`))}function JP(w){if(!xh.some((J)=>w.includes(J)))return w;let $="",X=[],W=null,Y=null;for(let J=0;J<w.length;J++){let G=w.charCodeAt(J);if(G>=48&&G<=57||W!==null&&(G===37||G>=97&&G<=122||G>=65&&G<=90)?W=J:(Y=W,W=null),G===40){$+=w[J];let f=J;for(let h=J-1;h>=0;h--){let U=w.charCodeAt(h);if(U>=48&&U<=57)f=h;else if(U>=97&&U<=122)f=h;else break}let H=w.slice(f,J);if(xh.includes(H)){X.unshift(!0);continue}else if(X[0]&&H===""){X.unshift(!0);continue}X.unshift(!1);continue}else if(G===41)$+=w[J],X.shift();else if(G===44&&X[0]){$+=", ";continue}else{if(G===32&&X[0]&&$.charCodeAt($.length-1)===32)continue;if((G===43||G===42||G===47||G===45)&&X[0]){let f=$.trimEnd(),H=f.charCodeAt(f.length-1),h=f.charCodeAt(f.length-2),U=w.charCodeAt(J+1);if((H===101||H===69)&&h>=48&&h<=57){$+=w[J];continue}else if(H===43||H===42||H===47||H===45){$+=w[J];continue}else if(H===40||H===44){$+=w[J];continue}else w.charCodeAt(J-1)===32?$+=`${w[J]} `:H>=48&&H<=57||U>=48&&U<=57||H===41||U===40||U===43||U===42||U===47||U===45||Y!==null&&Y===J-1?$+=` ${w[J]} `:$+=w[J]}else $+=w[J]}}return $}var rW=new Uint8Array(256);function P0(w,$){let X=0,W=[],Y=0,J=w.length,G=$.charCodeAt(0);for(let f=0;f<J;f++){let H=w.charCodeAt(f);if(X===0&&H===G){W.push(w.slice(Y,f)),Y=f+1;continue}switch(H){case 92:f+=1;break;case 39:case 34:for(;++f<J;){let h=w.charCodeAt(f);if(h===92){f+=1;continue}if(h===H)break}break;case 40:rW[X]=41,X++;break;case 91:rW[X]=93,X++;break;case 123:rW[X]=125,X++;break;case 93:case 125:case 41:X>0&&H===rW[X-1]&&X--;break}}return W.push(w.slice(Y)),W}var c10={color:d10,length:F9,percentage:yh,ratio:J20,number:fP,integer:h0,url:GP,position:K20,"bg-size":H20,"line-width":n10,image:s10,"family-name":e10,"generic-name":t10,"absolute-size":w20,"relative-size":$20,angle:A20,vector:F20};function q1(w,$){if(w.startsWith("var("))return null;for(let X of $)if(c10[X]?.(w))return X;return null}var i10=/^url\(.*\)$/;function GP(w){return i10.test(w)}function n10(w){return P0(w," ").every(($)=>F9($)||fP($)||$==="thin"||$==="medium"||$==="thick")}var o10=/^(?:element|image|cross-fade|image-set)\(/,a10=/^(repeating-)?(conic|linear|radial)-gradient\(/;function s10(w){let $=0;for(let X of P0(w,","))if(!X.startsWith("var(")){if(GP(X)){$+=1;continue}if(a10.test(X)){$+=1;continue}if(o10.test(X)){$+=1;continue}return!1}return $>0}function t10(w){return w==="serif"||w==="sans-serif"||w==="monospace"||w==="cursive"||w==="fantasy"||w==="system-ui"||w==="ui-serif"||w==="ui-sans-serif"||w==="ui-monospace"||w==="ui-rounded"||w==="math"||w==="emoji"||w==="fangsong"}function e10(w){let $=0;for(let X of P0(w,",")){let W=X.charCodeAt(0);if(W>=48&&W<=57)return!1;X.startsWith("var(")||($+=1)}return $>0}function w20(w){return w==="xx-small"||w==="x-small"||w==="small"||w==="medium"||w==="large"||w==="x-large"||w==="xx-large"||w==="xxx-large"}function $20(w){return w==="larger"||w==="smaller"}var R3=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,X20=new RegExp(`^${R3.source}$`);function fP(w){return X20.test(w)||cW(w)}var W20=new RegExp(`^${R3.source}%$`);function yh(w){return W20.test(w)||cW(w)}var Y20=new RegExp(`^${R3.source}s*/s*${R3.source}$`);function J20(w){return Y20.test(w)||cW(w)}var G20=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],f20=new RegExp(`^${R3.source}(${G20.join("|")})$`);function F9(w){return f20.test(w)||cW(w)}function K20(w){let $=0;for(let X of P0(w," ")){if(X==="center"||X==="top"||X==="right"||X==="bottom"||X==="left"){$+=1;continue}if(!X.startsWith("var(")){if(F9(X)||yh(X)){$+=1;continue}return!1}}return $>0}function H20(w){let $=0;for(let X of P0(w,",")){if(X==="cover"||X==="contain"){$+=1;continue}let W=P0(X," ");if(W.length!==1&&W.length!==2)return!1;if(W.every((Y)=>Y==="auto"||F9(Y)||yh(Y))){$+=1;continue}}return $>0}var h20=["deg","rad","grad","turn"],U20=new RegExp(`^${R3.source}(${h20.join("|")})$`);function A20(w){return U20.test(w)}var Q20=new RegExp(`^${R3.source} +${R3.source} +${R3.source}$`);function F20(w){return Q20.test(w)}function h0(w){let $=Number(w);return Number.isInteger($)&&$>=0&&String($)===String(w)}function mh(w){let $=Number(w);return Number.isInteger($)&&$>0&&String($)===String(w)}function f2(w){return KP(w,0.25)}function iW(w){return KP(w,0.25)}function KP(w,$){let X=Number(w);return X>=0&&X%$===0&&String(X)===String(w)}function k4(w){return{__BARE_VALUE__:w}}var v5=k4((w)=>{if(h0(w.value))return w.value}),V2=k4((w)=>{if(h0(w.value))return`${w.value}%`}),Z6=k4((w)=>{if(h0(w.value))return`${w.value}px`}),WP=k4((w)=>{if(h0(w.value))return`${w.value}ms`}),dW=k4((w)=>{if(h0(w.value))return`${w.value}deg`}),O20=k4((w)=>{if(w.fraction===null)return;let[$,X]=P0(w.fraction,"/");if(!(!h0($)||!h0(X)))return w.fraction}),YP=k4((w)=>{if(h0(Number(w.value)))return`repeat(${w.value}, minmax(0, 1fr))`}),HP={accentColor:({theme:w})=>w("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...O20},backdropBlur:({theme:w})=>w("blur"),backdropBrightness:({theme:w})=>({...w("brightness"),...V2}),backdropContrast:({theme:w})=>({...w("contrast"),...V2}),backdropGrayscale:({theme:w})=>({...w("grayscale"),...V2}),backdropHueRotate:({theme:w})=>({...w("hueRotate"),...dW}),backdropInvert:({theme:w})=>({...w("invert"),...V2}),backdropOpacity:({theme:w})=>({...w("opacity"),...V2}),backdropSaturate:({theme:w})=>({...w("saturate"),...V2}),backdropSepia:({theme:w})=>({...w("sepia"),...V2}),backgroundColor:({theme:w})=>w("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:w})=>w("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:w})=>({DEFAULT:"currentcolor",...w("colors")}),borderOpacity:({theme:w})=>w("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:w})=>w("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...Z6},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:w})=>w("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...V2},caretColor:({theme:w})=>w("colors"),colors:()=>({...pW}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...v5},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...V2},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:w})=>w("borderColor"),divideOpacity:({theme:w})=>w("borderOpacity"),divideWidth:({theme:w})=>({...w("borderWidth"),...Z6}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:w})=>w("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:w})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...w("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...v5},flexShrink:{0:"0",DEFAULT:"1",...v5},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:w})=>w("spacing"),gradientColorStops:({theme:w})=>w("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...V2},grayscale:{0:"0",DEFAULT:"100%",...V2},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...v5},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...v5},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...v5},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...v5},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...YP},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...YP},height:({theme:w})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...dW},inset:({theme:w})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...w("spacing")}),invert:{0:"0",DEFAULT:"100%",...V2},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:w})=>({auto:"auto",...w("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...v5},maxHeight:({theme:w})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),maxWidth:({theme:w})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...w("spacing")}),minHeight:({theme:w})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),minWidth:({theme:w})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...V2},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...v5},outlineColor:({theme:w})=>w("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},padding:({theme:w})=>w("spacing"),placeholderColor:({theme:w})=>w("colors"),placeholderOpacity:({theme:w})=>w("opacity"),ringColor:({theme:w})=>({DEFAULT:"currentcolor",...w("colors")}),ringOffsetColor:({theme:w})=>w("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},ringOpacity:({theme:w})=>({DEFAULT:"0.5",...w("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...dW},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...V2},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...V2},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:w})=>w("spacing"),scrollPadding:({theme:w})=>w("spacing"),sepia:{0:"0",DEFAULT:"100%",...V2},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...dW},space:({theme:w})=>w("spacing"),spacing:{px:"1px",0:"0px",0.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:w})=>({none:"none",...w("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...v5},supports:{},data:{},textColor:({theme:w})=>w("colors"),textDecorationColor:({theme:w})=>w("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},textIndent:({theme:w})=>w("spacing"),textOpacity:({theme:w})=>w("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1000:"1000ms",...WP},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1000:"1000ms",...WP},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:w})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...w("spacing")}),size:({theme:w})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),width:({theme:w})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...v5}};var Z20="4.2.1";function z20(w){let $=[0];for(let Y=0;Y<w.length;Y++)w.charCodeAt(Y)===10&&$.push(Y+1);function X(Y){let J=0,G=$.length;for(;G>0;){let H=(G|0)>>1,h=J+H;$[h]<=Y?(J=h+1,G=G-H-1):G=H}J-=1;let f=Y-$[J];return{line:J+1,column:f}}function W({line:Y,column:J}){Y-=1,Y=Math.min(Math.max(Y,0),$.length-1);let G=$[Y],f=$[Y+1]??G;return Math.min(Math.max(G+J,0),f)}return{find:X,findOffset:W}}var Q7=92,nW=47,oW=42,hP=34,UP=39,V20=58,$Y=59,k5=10,WY=13,F7=32,O7=9,AP=123,uh=125,rh=40,QP=41,M20=91,_20=93,FP=45,gh=64,B20=33,v3=class w extends Error{loc;constructor($,X){if(X){let W=X[0],Y=z20(W.code).find(X[1]);$=`${W.file}:${Y.line}:${Y.column+1}: ${$}`}super($),this.name="CssSyntaxError",this.loc=X,Error.captureStackTrace&&Error.captureStackTrace(this,w)}};function hT(w,$){let X=$?.from?{file:$.from,code:w}:null;w[0]==="\uFEFF"&&(w=" "+w.slice(1));let W=[],Y=[],J=[],G=null,f=null,H="",h="",U=0,A;for(let F=0;F<w.length;F++){let O=w.charCodeAt(F);if(!(O===WY&&(A=w.charCodeAt(F+1),A===k5)))if(O===Q7)H===""&&(U=F),H+=w.slice(F,F+2),F+=1;else if(O===nW&&w.charCodeAt(F+1)===oW){let M=F;for(let q=F+2;q<w.length;q++)if(A=w.charCodeAt(q),A===Q7)q+=1;else if(A===oW&&w.charCodeAt(q+1)===nW){F=q+1;break}let N=w.slice(M,F+1);if(N.charCodeAt(2)===B20){let q=QT(N.slice(2,-2));Y.push(q),X&&(q.src=[X,M,F+1],q.dst=[X,M,F+1])}}else if(O===UP||O===hP){let M=OP(w,F,O,X);H+=w.slice(F,M+1),F=M}else{if((O===F7||O===k5||O===O7)&&(A=w.charCodeAt(F+1))&&(A===F7||A===k5||A===O7||A===WY&&(A=w.charCodeAt(F+2))&&A==k5))continue;if(O===k5){if(H.length===0)continue;A=H.charCodeAt(H.length-1),A!==F7&&A!==k5&&A!==O7&&(H+=" ")}else if(O===FP&&w.charCodeAt(F+1)===FP&&H.length===0){let M="",N=F,q=-1;for(let T=F+2;T<w.length;T++)if(A=w.charCodeAt(T),A===Q7)T+=1;else if(A===UP||A===hP)T=OP(w,T,A,X);else if(A===nW&&w.charCodeAt(T+1)===oW){for(let j=T+2;j<w.length;j++)if(A=w.charCodeAt(j),A===Q7)j+=1;else if(A===oW&&w.charCodeAt(j+1)===nW){T=j+1;break}}else if(q===-1&&A===V20)q=H.length+T-N;else if(A===$Y&&M.length===0){H+=w.slice(N,T),F=T;break}else if(A===rh)M+=")";else if(A===M20)M+="]";else if(A===AP)M+="}";else if((A===uh||w.length-1===T)&&M.length===0){F=T-1,H+=w.slice(N,T);break}else(A===QP||A===_20||A===uh)&&M.length>0&&w[T]===M[M.length-1]&&(M=M.slice(0,-1));let P=lh(H,q);if(!P)throw new v3("Invalid custom property, expected a value",X?[X,N,F]:null);X&&(P.src=[X,N,F],P.dst=[X,N,F]),G?G.nodes.push(P):W.push(P),H=""}else if(O===$Y&&H.charCodeAt(0)===gh)f=XY(H),X&&(f.src=[X,U,F],f.dst=[X,U,F]),G?G.nodes.push(f):W.push(f),H="",f=null;else if(O===$Y&&h[h.length-1]!==")"){let M=lh(H);if(!M){if(H.length===0)continue;throw new v3(`Invalid declaration: \`${H.trim()}\``,X?[X,U,F]:null)}X&&(M.src=[X,U,F],M.dst=[X,U,F]),G?G.nodes.push(M):W.push(M),H=""}else if(O===AP&&h[h.length-1]!==")")h+="}",f=t1(H.trim()),X&&(f.src=[X,U,F],f.dst=[X,U,F]),G&&G.nodes.push(f),J.push(G),G=f,H="",f=null;else if(O===uh&&h[h.length-1]!==")"){if(h==="")throw new v3("Missing opening {",X?[X,F,F]:null);if(h=h.slice(0,-1),H.length>0)if(H.charCodeAt(0)===gh)f=XY(H),X&&(f.src=[X,U,F],f.dst=[X,U,F]),G?G.nodes.push(f):W.push(f),H="",f=null;else{let N=H.indexOf(":");if(G){let q=lh(H,N);if(!q)throw new v3(`Invalid declaration: \`${H.trim()}\``,X?[X,U,F]:null);X&&(q.src=[X,U,F],q.dst=[X,U,F]),G.nodes.push(q)}}let M=J.pop()??null;M===null&&G&&W.push(G),G=M,H="",f=null}else if(O===rh)h+=")",H+="(";else if(O===QP){if(h[h.length-1]!==")")throw new v3("Missing opening (",X?[X,F,F]:null);h=h.slice(0,-1),H+=")"}else{if(H.length===0&&(O===F7||O===k5||O===O7))continue;H===""&&(U=F),H+=String.fromCharCode(O)}}}if(H.charCodeAt(0)===gh){let F=XY(H);X&&(F.src=[X,U,w.length],F.dst=[X,U,w.length]),W.push(F)}if(h.length>0&&G){if(G.kind==="rule")throw new v3(`Missing closing } at ${G.selector}`,G.src?[G.src[0],G.src[1],G.src[1]]:null);if(G.kind==="at-rule")throw new v3(`Missing closing } at ${G.name} ${G.params}`,G.src?[G.src[0],G.src[1],G.src[1]]:null)}return Y.length>0?Y.concat(W):W}function XY(w,$=[]){let X=w,W="";for(let Y=5;Y<w.length;Y++){let J=w.charCodeAt(Y);if(J===F7||J===O7||J===rh){X=w.slice(0,Y),W=w.slice(Y);break}}return e0(X.trim(),W.trim(),$)}function lh(w,$=w.indexOf(":")){if($===-1)return null;let X=w.indexOf("!important",$+1);return _(w.slice(0,$).trim(),w.slice($+1,X===-1?w.length:X).trim(),X!==-1)}function OP(w,$,X,W=null){let Y;for(let J=$+1;J<w.length;J++)if(Y=w.charCodeAt(J),Y===Q7)J+=1;else{if(Y===X)return J;if(Y===$Y&&(w.charCodeAt(J+1)===k5||w.charCodeAt(J+1)===WY&&w.charCodeAt(J+2)===k5))throw new v3(`Unterminated string: ${w.slice($,J+1)+String.fromCharCode(X)}`,W?[W,$,J+1]:null);if(Y===k5||Y===WY&&w.charCodeAt(J+1)===k5)throw new v3(`Unterminated string: ${w.slice($,J)+String.fromCharCode(X)}`,W?[W,$,J+1]:null)}return $}function AY(w){if(arguments.length===0)throw TypeError("`CSS.escape` requires an argument.");let $=String(w),X=$.length,W=-1,Y,J="",G=$.charCodeAt(0);if(X===1&&G===45)return"\\"+$;for(;++W<X;){if(Y=$.charCodeAt(W),Y===0){J+="\uFFFD";continue}if(Y>=1&&Y<=31||Y===127||W===0&&Y>=48&&Y<=57||W===1&&Y>=48&&Y<=57&&G===45){J+="\\"+Y.toString(16)+" ";continue}if(Y>=128||Y===45||Y===95||Y>=48&&Y<=57||Y>=65&&Y<=90||Y>=97&&Y<=122){J+=$.charAt(W);continue}J+="\\"+$.charAt(W)}return J}function M7(w){return w.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,($)=>$.length>2?String.fromCodePoint(Number.parseInt($.slice(1).trim(),16)):$[1])}var UT=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-decoration-color","--text-decoration-thickness","--text-indent","--text-shadow","--text-underline-offset"]],["--grid-column",["--grid-column-start","--grid-column-end"]],["--grid-row",["--grid-row-start","--grid-row-end"]]]);function ZP(w,$){return(UT.get($)??[]).some((X)=>w===X||w.startsWith(`${X}-`))}var N20=class{constructor(w=new Map,$=new Set([])){this.values=w,this.keyframes=$}prefix=null;get size(){return this.values.size}add(w,$,X=0,W){if(w.endsWith("-*")){if($!=="initial")throw Error(`Invalid theme value \`${$}\` for namespace \`${w}\``);w==="--*"?this.values.clear():this.clearNamespace(w.slice(0,-2),0)}if(X&4){let Y=this.values.get(w);if(Y&&!(Y.options&4))return}$==="initial"?this.values.delete(w):this.values.set(w,{value:$,options:X,src:W})}keysInNamespaces(w){let $=[];for(let X of w){let W=`${X}-`;for(let Y of this.values.keys())Y.startsWith(W)&&Y.indexOf("--",2)===-1&&(ZP(Y,X)||$.push(Y.slice(W.length)))}return $}get(w){for(let $ of w){let X=this.values.get($);if(X)return X.value}return null}hasDefault(w){return(this.getOptions(w)&4)===4}getOptions(w){return w=M7(this.#X(w)),this.values.get(w)?.options??0}entries(){return this.prefix?Array.from(this.values,(w)=>(w[0]=this.prefixKey(w[0]),w)):this.values.entries()}prefixKey(w){return this.prefix?`--${this.prefix}-${w.slice(2)}`:w}#X(w){return this.prefix?`--${w.slice(3+this.prefix.length)}`:w}clearNamespace(w,$){let X=UT.get(w)??[];w:for(let W of this.values.keys())if(W.startsWith(w)){if($!==0&&(this.getOptions(W)&$)!==$)continue;for(let Y of X)if(W.startsWith(Y))continue w;this.values.delete(W)}}#$(w,$){for(let X of $){let W=w!==null?`${X}-${w}`:X;if(!this.values.has(W))if(w!==null&&w.includes(".")){if(W=`${X}-${w.replaceAll(".","_")}`,!this.values.has(W))continue}else continue;if(!ZP(W,X))return W}return null}#w(w){let $=this.values.get(w);if(!$)return null;let X=null;return $.options&2&&(X=$.value),`var(${AY(this.prefixKey(w))}${X?`, ${X}`:""})`}markUsedVariable(w){let $=M7(this.#X(w)),X=this.values.get($);if(!X)return!1;let W=X.options&16;return X.options|=16,!W}resolve(w,$,X=0){let W=this.#$(w,$);if(!W)return null;let Y=this.values.get(W);return(X|Y.options)&1?Y.value:this.#w(W)}resolveValue(w,$){let X=this.#$(w,$);return X?this.values.get(X).value:null}resolveWith(w,$,X=[]){let W=this.#$(w,$);if(!W)return null;let Y={};for(let G of X){let f=`${W}${G}`,H=this.values.get(f);H&&(H.options&1?Y[G]=H.value:Y[G]=this.#w(f))}let J=this.values.get(W);return J.options&1?[J.value,Y]:[this.#w(W),Y]}namespace(w){let $=new Map,X=`${w}-`;for(let[W,Y]of this.values)W===w?$.set(null,Y.value):W.startsWith(`${X}-`)?$.set(W.slice(w.length),Y.value):W.startsWith(X)&&$.set(W.slice(X.length),Y.value);return $}addKeyframes(w){this.keyframes.add(w)}getKeyframes(){return Array.from(this.keyframes)}},j0=class extends Map{constructor(w){super();this.factory=w}get(w){let $=super.get(w);return $===void 0&&($=this.factory(w,this),this.set(w,$)),$}};function L5(w){return{kind:"word",value:w}}function D20(w,$){return{kind:"function",value:w,nodes:$}}function R20(w){return{kind:"separator",value:w}}function R1(w){let $="";for(let X of w)switch(X.kind){case"word":case"separator":{$+=X.value;break}case"function":$+=X.value+"("+R1(X.nodes)+")"}return $}var zP=92,q20=41,VP=58,MP=44,v20=34,_P=61,BP=62,NP=60,DP=10,k20=40,L20=39,E20=47,RP=32,qP=9;function J1(w){w=w.replaceAll(`\r
|
|
862
|
+
${X.content}`,templateName:"blog:excerpt"})})}var vR={name:"@brains/blog",private:!0,version:"0.2.0-alpha.13",description:"AI-powered blog post generation from existing brain content",type:"module",exports:{".":"./src/index.ts"},scripts:{typecheck:"tsc --noEmit",test:"bun test",lint:"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix",eval:"cd evals && bun run brain-eval"},dependencies:{"@brains/plugins":"workspace:*","@brains/utils":"workspace:*"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"latest","bun-types":"latest",eslint:"^8.56.0",typescript:"^5.3.3"}};class PR extends J6{entityType=Z4.entityType;schema=nw;adapter=Z4;constructor(w={}){super("blog",vR,w,nK)}getEntityTypeConfig(){return{weight:2}}createGenerationHandler(w){return new oK(this.logger.child("BlogGenerationJobHandler"),w)}getTemplates(){return _R()}getDataSources(){return[new sK(this.logger.child("BlogDataSource"))]}async onRegister(w){let{RSSDataSource:$}=await Promise.resolve().then(() => (ER(),LR));w.entities.registerDataSource(new $(this.logger.child("RSSDataSource"))),await BR(w,this.logger),NR(w,this.logger),RR(w,this.logger),qR(w),this.logger.info("Blog plugin registered (routes auto-generated at /posts/)")}}s5();I8();n0();n0();J0();n2();var TR=Z.enum(["png","jpg","jpeg","webp","gif","svg"]),jR=Z.object({title:Z.string().optional(),alt:Z.string().optional(),format:TR,width:Z.number(),height:Z.number(),sourceUrl:Z.string().url().optional()}),_H=Y2.extend({entityType:Z.literal("image"),metadata:jR}),Fo=Z.object({url:Z.string(),alt:Z.string(),title:Z.string(),width:Z.number(),height:Z.number()});J0();function $W(w){let $=w.match(/^data:image\/([a-z+]+);base64,(.+)$/i);if(!$?.[1]||!$[2])throw Error("Invalid image data URL");return{format:$[1].toLowerCase(),base64:$[2]}}var Oo={png:"iVBORw",jpg:"/9j/",gif:"R0lGOD",webp:"UklGR"};function BH(w){for(let[$,X]of Object.entries(Oo))if(w.startsWith(X))return $;return null}function XW(w){let $=Buffer.from(w,"base64");if($[0]===137&&$[1]===80&&$[2]===78&&$[3]===71){let X=$.readUInt32BE(16),W=$.readUInt32BE(20);return{width:X,height:W}}if($[0]===255&&$[1]===216){let X=2;while(X<$.length-8){if($[X]!==255){X++;continue}let W=$[X+1];if(W===192||W===194){let J=$.readUInt16BE(X+5);return{width:$.readUInt16BE(X+7),height:J}}let Y=$.readUInt16BE(X+2);X+=2+Y}}if($[0]===71&&$[1]===73&&$[2]===70){let X=$.readUInt16LE(6),W=$.readUInt16LE(8);return{width:X,height:W}}if($.length>=30&&$[0]===82&&$[1]===73&&$[2]===70&&$[3]===70){if($[12]===86&&$[13]===80&&$[14]===56){if($[15]===32){let X=$[26]??0,W=$[27]??0,Y=$[28]??0,J=$[29]??0,G=(X|W<<8)&16383,f=(Y|J<<8)&16383;return{width:G,height:f}}if($[15]===76&&$.length>=25){let X=$.readUInt32LE(21),W=(X&16383)+1,Y=(X>>14&16383)+1;return{width:W,height:Y}}}}return null}class NH{entityType="image";schema=_H;toMarkdown(w){return w.content}fromMarkdown(w){let{format:$,base64:X}=$W(w),W=XW(X);return{entityType:"image",content:w,metadata:{format:$,width:W?.width??0,height:W?.height??0}}}extractMetadata(w){return w.metadata}parseFrontMatter(w,$){return $.parse({})}generateFrontMatter(w){return""}getBodyTemplate(){return""}createImageEntity(w){let{dataUrl:$,title:X,alt:W}=w,{format:Y,base64:J}=$W($),G=XW(J),H=BH(J)??Y;return{entityType:"image",content:$,metadata:{title:X,alt:W??X,format:H,width:G?.width??0,height:G?.height??0}}}}var Zo=new NH;n2();J0();var zo=Z.object({coverImageId:Z.string().optional()}).passthrough();async function CR(w,$){let X=await $.getEntity("image",w);if(!X)return null;return{url:X.content,alt:X.metadata.alt??"",title:X.metadata.title??"",width:X.metadata.width,height:X.metadata.height}}function DH(w){try{let{metadata:$}=k1(w.content,zo);return $.coverImageId}catch{return}}async function WW(w,$){let X=DH(w);if(!X)return;return await CR(X,$)??void 0}J0();J0();var Vo=Z.object({environment:Z.enum(["preview","production"]),outputDir:Z.string(),workingDir:Z.string().optional(),sharedImagesDir:Z.string().default("./dist/images"),enableContentGeneration:Z.boolean().default(!1),cleanBeforeBuild:Z.boolean().default(!0),siteConfig:Z.object({title:Z.string(),description:Z.string(),url:Z.string().optional(),copyright:Z.string().optional(),themeMode:Z.enum(["light","dark"]).optional(),analyticsScript:Z.string().optional()}),layouts:Z.record(Z.any()),themeCSS:Z.string().optional()}),pE0=Z.object({success:Z.boolean(),outputDir:Z.string(),filesGenerated:Z.number(),routesBuilt:Z.number(),errors:Z.array(Z.string()).optional(),warnings:Z.array(Z.string()).optional()});import{render as xb0}from"preact-render-to-string";import{h as mb0}from"preact";var D1=b5(Lv(),1);var CP0=D1.default.stringify,bP0=D1.default.fromJSON,IP0=D1.default.plugin,SP0=D1.default.parse,xP0=D1.default.list,yP0=D1.default.document,mP0=D1.default.comment,uP0=D1.default.atRule,gP0=D1.default.rule,lP0=D1.default.decl,pP0=D1.default.root,rP0=D1.default.CssSyntaxError,dP0=D1.default.Declaration,cP0=D1.default.Container,iP0=D1.default.Processor,nP0=D1.default.Document,oP0=D1.default.Comment,aP0=D1.default.Warning,sP0=D1.default.AtRule,tP0=D1.default.Result,eP0=D1.default.Input,wT0=D1.default.Rule,$T0=D1.default.Root,XT0=D1.default.Node;var MC=b5(Tv(),1);var I4=b5(sE(),1);import*as bY from"module";import{pathToFileURL as Y40}from"url";var $P=b5(eE(),1);import{createRequire as wP}from"module";function u10(w){throw w}var g10=(w)=>import(w),Sh;function l10(...w){if(!Sh)Sh=wP(import.meta.url)("../dist/babel.cjs");return Sh(...w)}function XP(w,$={}){if(!$.transform)$={...$,transform:l10};return $P.default(w,$,{onError:u10,nativeImport:g10,createRequire:wP})}import vU from"fs";import pj from"fs/promises";import TY from"path";import{pathToFileURL as Vj}from"url";var pW={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},mauve:{50:"oklch(98.5% 0 0)",100:"oklch(96% 0.003 325.6)",200:"oklch(92.2% 0.005 325.62)",300:"oklch(86.5% 0.012 325.68)",400:"oklch(71.1% 0.019 323.02)",500:"oklch(54.2% 0.034 322.5)",600:"oklch(43.5% 0.029 321.78)",700:"oklch(36.4% 0.029 323.89)",800:"oklch(26.3% 0.024 320.12)",900:"oklch(21.2% 0.019 322.12)",950:"oklch(14.5% 0.008 326)"},olive:{50:"oklch(98.8% 0.003 106.5)",100:"oklch(96.6% 0.005 106.5)",200:"oklch(93% 0.007 106.5)",300:"oklch(88% 0.011 106.6)",400:"oklch(73.7% 0.021 106.9)",500:"oklch(58% 0.031 107.3)",600:"oklch(46.6% 0.025 107.3)",700:"oklch(39.4% 0.023 107.4)",800:"oklch(28.6% 0.016 107.4)",900:"oklch(22.8% 0.013 107.4)",950:"oklch(15.3% 0.006 107.1)"},mist:{50:"oklch(98.7% 0.002 197.1)",100:"oklch(96.3% 0.002 197.1)",200:"oklch(92.5% 0.005 214.3)",300:"oklch(87.2% 0.007 219.6)",400:"oklch(72.3% 0.014 214.4)",500:"oklch(56% 0.021 213.5)",600:"oklch(45% 0.017 213.2)",700:"oklch(37.8% 0.015 216)",800:"oklch(27.5% 0.011 216.9)",900:"oklch(21.8% 0.008 223.9)",950:"oklch(14.8% 0.004 228.8)"},taupe:{50:"oklch(98.6% 0.002 67.8)",100:"oklch(96% 0.002 17.2)",200:"oklch(92.2% 0.005 34.3)",300:"oklch(86.8% 0.007 39.5)",400:"oklch(71.4% 0.014 41.2)",500:"oklch(54.7% 0.021 43.1)",600:"oklch(43.8% 0.017 39.3)",700:"oklch(36.7% 0.016 35.7)",800:"oklch(26.8% 0.011 36.5)",900:"oklch(21.4% 0.009 43.1)",950:"oklch(14.7% 0.004 49.3)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};var p10=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","transparent","currentcolor","canvas","canvastext","linktext","visitedtext","activetext","buttonface","buttontext","buttonborder","field","fieldtext","highlight","highlighttext","selecteditem","selecteditemtext","mark","marktext","graytext","accentcolor","accentcolortext"]),r10=/^(rgba?|hsla?|hwb|color|(ok)?(lab|lch)|light-dark|color-mix)\(/i;function d10(w){return w.charCodeAt(0)===35||r10.test(w)||p10.has(w.toLowerCase())}var xh=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"];function cW(w){return w.indexOf("(")!==-1&&xh.some(($)=>w.includes(`${$}(`))}function JP(w){if(!xh.some((J)=>w.includes(J)))return w;let $="",X=[],W=null,Y=null;for(let J=0;J<w.length;J++){let G=w.charCodeAt(J);if(G>=48&&G<=57||W!==null&&(G===37||G>=97&&G<=122||G>=65&&G<=90)?W=J:(Y=W,W=null),G===40){$+=w[J];let f=J;for(let h=J-1;h>=0;h--){let U=w.charCodeAt(h);if(U>=48&&U<=57)f=h;else if(U>=97&&U<=122)f=h;else break}let H=w.slice(f,J);if(xh.includes(H)){X.unshift(!0);continue}else if(X[0]&&H===""){X.unshift(!0);continue}X.unshift(!1);continue}else if(G===41)$+=w[J],X.shift();else if(G===44&&X[0]){$+=", ";continue}else{if(G===32&&X[0]&&$.charCodeAt($.length-1)===32)continue;if((G===43||G===42||G===47||G===45)&&X[0]){let f=$.trimEnd(),H=f.charCodeAt(f.length-1),h=f.charCodeAt(f.length-2),U=w.charCodeAt(J+1);if((H===101||H===69)&&h>=48&&h<=57){$+=w[J];continue}else if(H===43||H===42||H===47||H===45){$+=w[J];continue}else if(H===40||H===44){$+=w[J];continue}else w.charCodeAt(J-1)===32?$+=`${w[J]} `:H>=48&&H<=57||U>=48&&U<=57||H===41||U===40||U===43||U===42||U===47||U===45||Y!==null&&Y===J-1?$+=` ${w[J]} `:$+=w[J]}else $+=w[J]}}return $}var rW=new Uint8Array(256);function P0(w,$){let X=0,W=[],Y=0,J=w.length,G=$.charCodeAt(0);for(let f=0;f<J;f++){let H=w.charCodeAt(f);if(X===0&&H===G){W.push(w.slice(Y,f)),Y=f+1;continue}switch(H){case 92:f+=1;break;case 39:case 34:for(;++f<J;){let h=w.charCodeAt(f);if(h===92){f+=1;continue}if(h===H)break}break;case 40:rW[X]=41,X++;break;case 91:rW[X]=93,X++;break;case 123:rW[X]=125,X++;break;case 93:case 125:case 41:X>0&&H===rW[X-1]&&X--;break}}return W.push(w.slice(Y)),W}var c10={color:d10,length:F9,percentage:yh,ratio:J20,number:fP,integer:h0,url:GP,position:K20,"bg-size":H20,"line-width":n10,image:s10,"family-name":e10,"generic-name":t10,"absolute-size":w20,"relative-size":$20,angle:A20,vector:F20};function q1(w,$){if(w.startsWith("var("))return null;for(let X of $)if(c10[X]?.(w))return X;return null}var i10=/^url\(.*\)$/;function GP(w){return i10.test(w)}function n10(w){return P0(w," ").every(($)=>F9($)||fP($)||$==="thin"||$==="medium"||$==="thick")}var o10=/^(?:element|image|cross-fade|image-set)\(/,a10=/^(repeating-)?(conic|linear|radial)-gradient\(/;function s10(w){let $=0;for(let X of P0(w,","))if(!X.startsWith("var(")){if(GP(X)){$+=1;continue}if(a10.test(X)){$+=1;continue}if(o10.test(X)){$+=1;continue}return!1}return $>0}function t10(w){return w==="serif"||w==="sans-serif"||w==="monospace"||w==="cursive"||w==="fantasy"||w==="system-ui"||w==="ui-serif"||w==="ui-sans-serif"||w==="ui-monospace"||w==="ui-rounded"||w==="math"||w==="emoji"||w==="fangsong"}function e10(w){let $=0;for(let X of P0(w,",")){let W=X.charCodeAt(0);if(W>=48&&W<=57)return!1;X.startsWith("var(")||($+=1)}return $>0}function w20(w){return w==="xx-small"||w==="x-small"||w==="small"||w==="medium"||w==="large"||w==="x-large"||w==="xx-large"||w==="xxx-large"}function $20(w){return w==="larger"||w==="smaller"}var R3=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,X20=new RegExp(`^${R3.source}$`);function fP(w){return X20.test(w)||cW(w)}var W20=new RegExp(`^${R3.source}%$`);function yh(w){return W20.test(w)||cW(w)}var Y20=new RegExp(`^${R3.source}s*/s*${R3.source}$`);function J20(w){return Y20.test(w)||cW(w)}var G20=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],f20=new RegExp(`^${R3.source}(${G20.join("|")})$`);function F9(w){return f20.test(w)||cW(w)}function K20(w){let $=0;for(let X of P0(w," ")){if(X==="center"||X==="top"||X==="right"||X==="bottom"||X==="left"){$+=1;continue}if(!X.startsWith("var(")){if(F9(X)||yh(X)){$+=1;continue}return!1}}return $>0}function H20(w){let $=0;for(let X of P0(w,",")){if(X==="cover"||X==="contain"){$+=1;continue}let W=P0(X," ");if(W.length!==1&&W.length!==2)return!1;if(W.every((Y)=>Y==="auto"||F9(Y)||yh(Y))){$+=1;continue}}return $>0}var h20=["deg","rad","grad","turn"],U20=new RegExp(`^${R3.source}(${h20.join("|")})$`);function A20(w){return U20.test(w)}var Q20=new RegExp(`^${R3.source} +${R3.source} +${R3.source}$`);function F20(w){return Q20.test(w)}function h0(w){let $=Number(w);return Number.isInteger($)&&$>=0&&String($)===String(w)}function mh(w){let $=Number(w);return Number.isInteger($)&&$>0&&String($)===String(w)}function f2(w){return KP(w,0.25)}function iW(w){return KP(w,0.25)}function KP(w,$){let X=Number(w);return X>=0&&X%$===0&&String(X)===String(w)}function k4(w){return{__BARE_VALUE__:w}}var v5=k4((w)=>{if(h0(w.value))return w.value}),V2=k4((w)=>{if(h0(w.value))return`${w.value}%`}),Z6=k4((w)=>{if(h0(w.value))return`${w.value}px`}),WP=k4((w)=>{if(h0(w.value))return`${w.value}ms`}),dW=k4((w)=>{if(h0(w.value))return`${w.value}deg`}),O20=k4((w)=>{if(w.fraction===null)return;let[$,X]=P0(w.fraction,"/");if(!(!h0($)||!h0(X)))return w.fraction}),YP=k4((w)=>{if(h0(Number(w.value)))return`repeat(${w.value}, minmax(0, 1fr))`}),HP={accentColor:({theme:w})=>w("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...O20},backdropBlur:({theme:w})=>w("blur"),backdropBrightness:({theme:w})=>({...w("brightness"),...V2}),backdropContrast:({theme:w})=>({...w("contrast"),...V2}),backdropGrayscale:({theme:w})=>({...w("grayscale"),...V2}),backdropHueRotate:({theme:w})=>({...w("hueRotate"),...dW}),backdropInvert:({theme:w})=>({...w("invert"),...V2}),backdropOpacity:({theme:w})=>({...w("opacity"),...V2}),backdropSaturate:({theme:w})=>({...w("saturate"),...V2}),backdropSepia:({theme:w})=>({...w("sepia"),...V2}),backgroundColor:({theme:w})=>w("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:w})=>w("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:w})=>({DEFAULT:"currentcolor",...w("colors")}),borderOpacity:({theme:w})=>w("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:w})=>w("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...Z6},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:w})=>w("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...V2},caretColor:({theme:w})=>w("colors"),colors:()=>({...pW}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...v5},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...V2},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:w})=>w("borderColor"),divideOpacity:({theme:w})=>w("borderOpacity"),divideWidth:({theme:w})=>({...w("borderWidth"),...Z6}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:w})=>w("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:w})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...w("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...v5},flexShrink:{0:"0",DEFAULT:"1",...v5},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:w})=>w("spacing"),gradientColorStops:({theme:w})=>w("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...V2},grayscale:{0:"0",DEFAULT:"100%",...V2},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...v5},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...v5},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...v5},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...v5},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...YP},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...YP},height:({theme:w})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...dW},inset:({theme:w})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...w("spacing")}),invert:{0:"0",DEFAULT:"100%",...V2},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:w})=>({auto:"auto",...w("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...v5},maxHeight:({theme:w})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),maxWidth:({theme:w})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...w("spacing")}),minHeight:({theme:w})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),minWidth:({theme:w})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...V2},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...v5},outlineColor:({theme:w})=>w("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},padding:({theme:w})=>w("spacing"),placeholderColor:({theme:w})=>w("colors"),placeholderOpacity:({theme:w})=>w("opacity"),ringColor:({theme:w})=>({DEFAULT:"currentcolor",...w("colors")}),ringOffsetColor:({theme:w})=>w("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},ringOpacity:({theme:w})=>({DEFAULT:"0.5",...w("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...dW},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...V2},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...V2},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:w})=>w("spacing"),scrollPadding:({theme:w})=>w("spacing"),sepia:{0:"0",DEFAULT:"100%",...V2},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...dW},space:({theme:w})=>w("spacing"),spacing:{px:"1px",0:"0px",0.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:w})=>({none:"none",...w("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...v5},supports:{},data:{},textColor:({theme:w})=>w("colors"),textDecorationColor:({theme:w})=>w("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},textIndent:({theme:w})=>w("spacing"),textOpacity:({theme:w})=>w("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...Z6},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1000:"1000ms",...WP},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1000:"1000ms",...WP},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:w})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...w("spacing")}),size:({theme:w})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),width:({theme:w})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...w("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...v5}};var Z20="4.2.1";function z20(w){let $=[0];for(let Y=0;Y<w.length;Y++)w.charCodeAt(Y)===10&&$.push(Y+1);function X(Y){let J=0,G=$.length;for(;G>0;){let H=(G|0)>>1,h=J+H;$[h]<=Y?(J=h+1,G=G-H-1):G=H}J-=1;let f=Y-$[J];return{line:J+1,column:f}}function W({line:Y,column:J}){Y-=1,Y=Math.min(Math.max(Y,0),$.length-1);let G=$[Y],f=$[Y+1]??G;return Math.min(Math.max(G+J,0),f)}return{find:X,findOffset:W}}var Q7=92,nW=47,oW=42,hP=34,UP=39,V20=58,$Y=59,k5=10,WY=13,F7=32,O7=9,AP=123,uh=125,rh=40,QP=41,M20=91,_20=93,FP=45,gh=64,B20=33,v3=class w extends Error{loc;constructor($,X){if(X){let W=X[0],Y=z20(W.code).find(X[1]);$=`${W.file}:${Y.line}:${Y.column+1}: ${$}`}super($),this.name="CssSyntaxError",this.loc=X,Error.captureStackTrace&&Error.captureStackTrace(this,w)}};function hT(w,$){let X=$?.from?{file:$.from,code:w}:null;w[0]==="\uFEFF"&&(w=" "+w.slice(1));let W=[],Y=[],J=[],G=null,f=null,H="",h="",U=0,A;for(let F=0;F<w.length;F++){let O=w.charCodeAt(F);if(!(O===WY&&(A=w.charCodeAt(F+1),A===k5)))if(O===Q7)H===""&&(U=F),H+=w.slice(F,F+2),F+=1;else if(O===nW&&w.charCodeAt(F+1)===oW){let M=F;for(let q=F+2;q<w.length;q++)if(A=w.charCodeAt(q),A===Q7)q+=1;else if(A===oW&&w.charCodeAt(q+1)===nW){F=q+1;break}let N=w.slice(M,F+1);if(N.charCodeAt(2)===B20){let q=QT(N.slice(2,-2));Y.push(q),X&&(q.src=[X,M,F+1],q.dst=[X,M,F+1])}}else if(O===UP||O===hP){let M=OP(w,F,O,X);H+=w.slice(F,M+1),F=M}else{if((O===F7||O===k5||O===O7)&&(A=w.charCodeAt(F+1))&&(A===F7||A===k5||A===O7||A===WY&&(A=w.charCodeAt(F+2))&&A==k5))continue;if(O===k5){if(H.length===0)continue;A=H.charCodeAt(H.length-1),A!==F7&&A!==k5&&A!==O7&&(H+=" ")}else if(O===FP&&w.charCodeAt(F+1)===FP&&H.length===0){let M="",N=F,q=-1;for(let T=F+2;T<w.length;T++)if(A=w.charCodeAt(T),A===Q7)T+=1;else if(A===UP||A===hP)T=OP(w,T,A,X);else if(A===nW&&w.charCodeAt(T+1)===oW){for(let j=T+2;j<w.length;j++)if(A=w.charCodeAt(j),A===Q7)j+=1;else if(A===oW&&w.charCodeAt(j+1)===nW){T=j+1;break}}else if(q===-1&&A===V20)q=H.length+T-N;else if(A===$Y&&M.length===0){H+=w.slice(N,T),F=T;break}else if(A===rh)M+=")";else if(A===M20)M+="]";else if(A===AP)M+="}";else if((A===uh||w.length-1===T)&&M.length===0){F=T-1,H+=w.slice(N,T);break}else(A===QP||A===_20||A===uh)&&M.length>0&&w[T]===M[M.length-1]&&(M=M.slice(0,-1));let P=lh(H,q);if(!P)throw new v3("Invalid custom property, expected a value",X?[X,N,F]:null);X&&(P.src=[X,N,F],P.dst=[X,N,F]),G?G.nodes.push(P):W.push(P),H=""}else if(O===$Y&&H.charCodeAt(0)===gh)f=XY(H),X&&(f.src=[X,U,F],f.dst=[X,U,F]),G?G.nodes.push(f):W.push(f),H="",f=null;else if(O===$Y&&h[h.length-1]!==")"){let M=lh(H);if(!M){if(H.length===0)continue;throw new v3(`Invalid declaration: \`${H.trim()}\``,X?[X,U,F]:null)}X&&(M.src=[X,U,F],M.dst=[X,U,F]),G?G.nodes.push(M):W.push(M),H=""}else if(O===AP&&h[h.length-1]!==")")h+="}",f=t1(H.trim()),X&&(f.src=[X,U,F],f.dst=[X,U,F]),G&&G.nodes.push(f),J.push(G),G=f,H="",f=null;else if(O===uh&&h[h.length-1]!==")"){if(h==="")throw new v3("Missing opening {",X?[X,F,F]:null);if(h=h.slice(0,-1),H.length>0)if(H.charCodeAt(0)===gh)f=XY(H),X&&(f.src=[X,U,F],f.dst=[X,U,F]),G?G.nodes.push(f):W.push(f),H="",f=null;else{let N=H.indexOf(":");if(G){let q=lh(H,N);if(!q)throw new v3(`Invalid declaration: \`${H.trim()}\``,X?[X,U,F]:null);X&&(q.src=[X,U,F],q.dst=[X,U,F]),G.nodes.push(q)}}let M=J.pop()??null;M===null&&G&&W.push(G),G=M,H="",f=null}else if(O===rh)h+=")",H+="(";else if(O===QP){if(h[h.length-1]!==")")throw new v3("Missing opening (",X?[X,F,F]:null);h=h.slice(0,-1),H+=")"}else{if(H.length===0&&(O===F7||O===k5||O===O7))continue;H===""&&(U=F),H+=String.fromCharCode(O)}}}if(H.charCodeAt(0)===gh){let F=XY(H);X&&(F.src=[X,U,w.length],F.dst=[X,U,w.length]),W.push(F)}if(h.length>0&&G){if(G.kind==="rule")throw new v3(`Missing closing } at ${G.selector}`,G.src?[G.src[0],G.src[1],G.src[1]]:null);if(G.kind==="at-rule")throw new v3(`Missing closing } at ${G.name} ${G.params}`,G.src?[G.src[0],G.src[1],G.src[1]]:null)}return Y.length>0?Y.concat(W):W}function XY(w,$=[]){let X=w,W="";for(let Y=5;Y<w.length;Y++){let J=w.charCodeAt(Y);if(J===F7||J===O7||J===rh){X=w.slice(0,Y),W=w.slice(Y);break}}return e0(X.trim(),W.trim(),$)}function lh(w,$=w.indexOf(":")){if($===-1)return null;let X=w.indexOf("!important",$+1);return _(w.slice(0,$).trim(),w.slice($+1,X===-1?w.length:X).trim(),X!==-1)}function OP(w,$,X,W=null){let Y;for(let J=$+1;J<w.length;J++)if(Y=w.charCodeAt(J),Y===Q7)J+=1;else{if(Y===X)return J;if(Y===$Y&&(w.charCodeAt(J+1)===k5||w.charCodeAt(J+1)===WY&&w.charCodeAt(J+2)===k5))throw new v3(`Unterminated string: ${w.slice($,J+1)+String.fromCharCode(X)}`,W?[W,$,J+1]:null);if(Y===k5||Y===WY&&w.charCodeAt(J+1)===k5)throw new v3(`Unterminated string: ${w.slice($,J)+String.fromCharCode(X)}`,W?[W,$,J+1]:null)}return $}function AY(w){if(arguments.length===0)throw TypeError("`CSS.escape` requires an argument.");let $=String(w),X=$.length,W=-1,Y,J="",G=$.charCodeAt(0);if(X===1&&G===45)return"\\"+$;for(;++W<X;){if(Y=$.charCodeAt(W),Y===0){J+="\uFFFD";continue}if(Y>=1&&Y<=31||Y===127||W===0&&Y>=48&&Y<=57||W===1&&Y>=48&&Y<=57&&G===45){J+="\\"+Y.toString(16)+" ";continue}if(Y>=128||Y===45||Y===95||Y>=48&&Y<=57||Y>=65&&Y<=90||Y>=97&&Y<=122){J+=$.charAt(W);continue}J+="\\"+$.charAt(W)}return J}function M7(w){return w.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,($)=>$.length>2?String.fromCodePoint(Number.parseInt($.slice(1).trim(),16)):$[1])}var UT=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-decoration-color","--text-decoration-thickness","--text-indent","--text-shadow","--text-underline-offset"]],["--grid-column",["--grid-column-start","--grid-column-end"]],["--grid-row",["--grid-row-start","--grid-row-end"]]]);function ZP(w,$){return(UT.get($)??[]).some((X)=>w===X||w.startsWith(`${X}-`))}var N20=class{constructor(w=new Map,$=new Set([])){this.values=w,this.keyframes=$}prefix=null;get size(){return this.values.size}add(w,$,X=0,W){if(w.endsWith("-*")){if($!=="initial")throw Error(`Invalid theme value \`${$}\` for namespace \`${w}\``);w==="--*"?this.values.clear():this.clearNamespace(w.slice(0,-2),0)}if(X&4){let Y=this.values.get(w);if(Y&&!(Y.options&4))return}$==="initial"?this.values.delete(w):this.values.set(w,{value:$,options:X,src:W})}keysInNamespaces(w){let $=[];for(let X of w){let W=`${X}-`;for(let Y of this.values.keys())Y.startsWith(W)&&Y.indexOf("--",2)===-1&&(ZP(Y,X)||$.push(Y.slice(W.length)))}return $}get(w){for(let $ of w){let X=this.values.get($);if(X)return X.value}return null}hasDefault(w){return(this.getOptions(w)&4)===4}getOptions(w){return w=M7(this.#X(w)),this.values.get(w)?.options??0}entries(){return this.prefix?Array.from(this.values,(w)=>(w[0]=this.prefixKey(w[0]),w)):this.values.entries()}prefixKey(w){return this.prefix?`--${this.prefix}-${w.slice(2)}`:w}#X(w){return this.prefix?`--${w.slice(3+this.prefix.length)}`:w}clearNamespace(w,$){let X=UT.get(w)??[];w:for(let W of this.values.keys())if(W.startsWith(w)){if($!==0&&(this.getOptions(W)&$)!==$)continue;for(let Y of X)if(W.startsWith(Y))continue w;this.values.delete(W)}}#$(w,$){for(let X of $){let W=w!==null?`${X}-${w}`:X;if(!this.values.has(W))if(w!==null&&w.includes(".")){if(W=`${X}-${w.replaceAll(".","_")}`,!this.values.has(W))continue}else continue;if(!ZP(W,X))return W}return null}#w(w){let $=this.values.get(w);if(!$)return null;let X=null;return $.options&2&&(X=$.value),`var(${AY(this.prefixKey(w))}${X?`, ${X}`:""})`}markUsedVariable(w){let $=M7(this.#X(w)),X=this.values.get($);if(!X)return!1;let W=X.options&16;return X.options|=16,!W}resolve(w,$,X=0){let W=this.#$(w,$);if(!W)return null;let Y=this.values.get(W);return(X|Y.options)&1?Y.value:this.#w(W)}resolveValue(w,$){let X=this.#$(w,$);return X?this.values.get(X).value:null}resolveWith(w,$,X=[]){let W=this.#$(w,$);if(!W)return null;let Y={};for(let G of X){let f=`${W}${G}`,H=this.values.get(f);H&&(H.options&1?Y[G]=H.value:Y[G]=this.#w(f))}let J=this.values.get(W);return J.options&1?[J.value,Y]:[this.#w(W),Y]}namespace(w){let $=new Map,X=`${w}-`;for(let[W,Y]of this.values)W===w?$.set(null,Y.value):W.startsWith(`${X}-`)?$.set(W.slice(w.length),Y.value):W.startsWith(X)&&$.set(W.slice(X.length),Y.value);return $}addKeyframes(w){this.keyframes.add(w)}getKeyframes(){return Array.from(this.keyframes)}},j0=class extends Map{constructor(w){super();this.factory=w}get(w){let $=super.get(w);return $===void 0&&($=this.factory(w,this),this.set(w,$)),$}};function L5(w){return{kind:"word",value:w}}function D20(w,$){return{kind:"function",value:w,nodes:$}}function R20(w){return{kind:"separator",value:w}}function R1(w){let $="";for(let X of w)switch(X.kind){case"word":case"separator":{$+=X.value;break}case"function":$+=X.value+"("+R1(X.nodes)+")"}return $}var zP=92,q20=41,VP=58,MP=44,v20=34,_P=61,BP=62,NP=60,DP=10,k20=40,L20=39,E20=47,RP=32,qP=9;function J1(w){w=w.replaceAll(`\r
|
|
861
863
|
`,`
|
|
862
864
|
`);let $=[],X=[],W=null,Y="",J;for(let G=0;G<w.length;G++){let f=w.charCodeAt(G);switch(f){case zP:{Y+=w[G]+w[G+1],G++;break}case E20:{if(Y.length>0){let h=L5(Y);W?W.nodes.push(h):$.push(h),Y=""}let H=L5(w[G]);W?W.nodes.push(H):$.push(H);break}case VP:case MP:case _P:case BP:case NP:case DP:case RP:case qP:{if(Y.length>0){let A=L5(Y);W?W.nodes.push(A):$.push(A),Y=""}let H=G,h=G+1;for(;h<w.length&&(J=w.charCodeAt(h),!(J!==VP&&J!==MP&&J!==_P&&J!==BP&&J!==NP&&J!==DP&&J!==RP&&J!==qP));h++);G=h-1;let U=R20(w.slice(H,h));W?W.nodes.push(U):$.push(U);break}case L20:case v20:{let H=G;for(let h=G+1;h<w.length;h++)if(J=w.charCodeAt(h),J===zP)h+=1;else if(J===f){G=h;break}Y+=w.slice(H,G+1);break}case k20:{let H=D20(Y,[]);Y="",W?W.nodes.push(H):$.push(H),X.push(H),W=H;break}case q20:{let H=X.pop();if(Y.length>0){let h=L5(Y);H?.nodes.push(h),Y=""}X.length>0?W=X[X.length-1]:W=null;break}default:Y+=String.fromCharCode(f)}}return Y.length>0&&$.push(L5(Y)),$}var dh=((w)=>(w[w.Continue=0]="Continue",w[w.Skip=1]="Skip",w[w.Stop=2]="Stop",w[w.Replace=3]="Replace",w[w.ReplaceSkip=4]="ReplaceSkip",w[w.ReplaceStop=5]="ReplaceStop",w))(dh||{}),Z0={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:(w)=>({kind:3,nodes:Array.isArray(w)?w:[w]}),ReplaceSkip:(w)=>({kind:4,nodes:Array.isArray(w)?w:[w]}),ReplaceStop:(w)=>({kind:5,nodes:Array.isArray(w)?w:[w]})};function N0(w,$){typeof $=="function"?vP(w,$):vP(w,$.enter,$.exit)}function vP(w,$=()=>Z0.Continue,X=()=>Z0.Continue){let W={value:[w,0,null],prev:null},Y={parent:null,depth:0,path(){let J=[],G=W;for(;G;){let f=G.value[2];f&&J.push(f),G=G.prev}return J.reverse(),J}};for(;W!==null;){let J=W.value,G=J[0],f=J[1],H=J[2];if(f>=G.length){W=W.prev,Y.depth-=1;continue}if(Y.parent=H,f>=0){let F=G[f],O=$(F,Y)??Z0.Continue;switch(O.kind){case 0:{F.nodes&&F.nodes.length>0&&(Y.depth+=1,W={value:[F.nodes,0,F],prev:W}),J[1]=~f;continue}case 2:return;case 1:{J[1]=~f;continue}case 3:{G.splice(f,1,...O.nodes);continue}case 5:{G.splice(f,1,...O.nodes);return}case 4:{G.splice(f,1,...O.nodes),J[1]+=O.nodes.length;continue}default:throw Error(`Invalid \`WalkAction.${dh[O.kind]??`Unknown(${O.kind})`}\` in enter.`)}}let h=~f,U=G[h],A=X(U,Y)??Z0.Continue;switch(A.kind){case 0:J[1]=h+1;continue;case 2:return;case 3:{G.splice(h,1,...A.nodes),J[1]=h+A.nodes.length;continue}case 5:{G.splice(h,1,...A.nodes);return}case 4:{G.splice(h,1,...A.nodes),J[1]=h+A.nodes.length;continue}default:throw Error(`Invalid \`WalkAction.${dh[A.kind]??`Unknown(${A.kind})`}\` in exit.`)}}}function AT(w){let $=[];return N0(J1(w),(X)=>{if(!(X.kind!=="function"||X.value!=="var"))return N0(X.nodes,(W)=>{W.kind!=="word"||W.value[0]!=="-"||W.value[1]!=="-"||$.push(W.value)}),Z0.Skip}),$}var P20=64;function Y1(w,$=[]){return{kind:"rule",selector:w,nodes:$}}function e0(w,$="",X=[]){return{kind:"at-rule",name:w,params:$,nodes:X}}function t1(w,$=[]){return w.charCodeAt(0)===P20?XY(w,$):Y1(w,$)}function _(w,$,X=!1){return{kind:"declaration",property:w,value:$,important:X}}function QT(w){return{kind:"comment",value:w}}function E4(w,$){return{kind:"context",context:w,nodes:$}}function c0(w){return{kind:"at-root",nodes:w}}function H5(w){switch(w.kind){case"rule":return{kind:w.kind,selector:w.selector,nodes:w.nodes.map(H5),src:w.src,dst:w.dst};case"at-rule":return{kind:w.kind,name:w.name,params:w.params,nodes:w.nodes.map(H5),src:w.src,dst:w.dst};case"at-root":return{kind:w.kind,nodes:w.nodes.map(H5),src:w.src,dst:w.dst};case"context":return{kind:w.kind,context:{...w.context},nodes:w.nodes.map(H5),src:w.src,dst:w.dst};case"declaration":return{kind:w.kind,property:w.property,value:w.value,important:w.important,src:w.src,dst:w.dst};case"comment":return{kind:w.kind,value:w.value,src:w.src,dst:w.dst};default:throw Error(`Unknown node kind: ${w.kind}`)}}function wU(w){return{depth:w.depth,get context(){let $={};for(let X of w.path())X.kind==="context"&&Object.assign($,X.context);return Object.defineProperty(this,"context",{value:$}),$},get parent(){let $=this.path().pop()??null;return Object.defineProperty(this,"parent",{value:$}),$},path(){return w.path().filter(($)=>$.kind!=="context")}}}function Z7(w,$,X=3){let W=[],Y=new Set,J=new j0(()=>new Set),G=new j0(()=>new Set),f=new Set,H=new Set,h=[],U=[],A=new j0(()=>new Set);function F(M,N,q={},P=0){if(M.kind==="declaration"){if(M.property==="--tw-sort"||M.value===void 0||M.value===null)return;if(q.theme&&M.property[0]==="-"&&M.property[1]==="-"){if(M.value==="initial"){M.value=void 0;return}q.keyframes||J.get(N).add(M)}if(M.value.includes("var("))if(q.theme&&M.property[0]==="-"&&M.property[1]==="-")for(let T of AT(M.value))A.get(T).add(M.property);else $.trackUsedVariables(M.value);if(M.property==="animation")for(let T of kP(M.value))H.add(T);X&2&&M.value.includes("color-mix(")&&!q.supportsColorMix&&!q.keyframes&&G.get(N).add(M),N.push(M)}else if(M.kind==="rule"){let T=[];for(let p of M.nodes)F(p,T,q,P+1);let j={},d=new Set;for(let p of T){if(p.kind!=="declaration")continue;let y=`${p.property}:${p.value}:${p.important}`;j[y]??=[],j[y].push(p)}for(let p in j)for(let y=0;y<j[p].length-1;++y)d.add(j[p][y]);if(d.size>0&&(T=T.filter((p)=>!d.has(p))),T.length===0)return;M.selector==="&"?N.push(...T):N.push({...M,nodes:T})}else if(M.kind==="at-rule"&&M.name==="@property"&&P===0){if(Y.has(M.params))return;if(X&1){let j=M.params,d=null,p=!1;for(let R of M.nodes)R.kind==="declaration"&&(R.property==="initial-value"?d=R.value:R.property==="inherits"&&(p=R.value==="true"));let y=_(j,d??"initial");y.src=M.src,p?h.push(y):U.push(y)}Y.add(M.params);let T={...M,nodes:[]};for(let j of M.nodes)F(j,T.nodes,q,P+1);N.push(T)}else if(M.kind==="at-rule"){M.name==="@keyframes"?q={...q,keyframes:!0}:M.name==="@supports"&&M.params.includes("color-mix(")&&(q={...q,supportsColorMix:!0});let T={...M,nodes:[]};for(let j of M.nodes)F(j,T.nodes,q,P+1);M.name==="@keyframes"&&q.theme&&f.add(T),(T.nodes.length>0||T.name==="@layer"||T.name==="@charset"||T.name==="@custom-media"||T.name==="@namespace"||T.name==="@import")&&N.push(T)}else if(M.kind==="at-root")for(let T of M.nodes){let j=[];F(T,j,q,0);for(let d of j)W.push(d)}else if(M.kind==="context"){if(M.context.reference)return;for(let T of M.nodes)F(T,N,{...q,...M.context},P)}else M.kind==="comment"&&N.push(M)}let O=[];for(let M of w)F(M,O,{},0);w:for(let[M,N]of J)for(let q of N){if(FT(q.property,$.theme,A)){if(q.property.startsWith($.theme.prefixKey("--animate-")))for(let T of kP(q.value))H.add(T);continue}let P=M.indexOf(q);if(M.splice(P,1),M.length===0){let T=T20(O,(j)=>j.kind==="rule"&&j.nodes===M);if(!T||T.length===0)continue w;T.unshift({kind:"at-root",nodes:O});do{let j=T.pop();if(!j)break;let d=T[T.length-1];if(!d||d.kind!=="at-root"&&d.kind!=="at-rule")break;let p=d.nodes.indexOf(j);if(p===-1)break;d.nodes.splice(p,1)}while(!0);continue w}}for(let M of f)if(!H.has(M.params)){let N=W.indexOf(M);W.splice(N,1)}if(O=O.concat(W),X&2)for(let[M,N]of G)for(let q of N){let P=M.indexOf(q);if(P===-1||q.value==null)continue;let T=J1(q.value),j=!1;if(N0(T,(y)=>{if(y.kind!=="function"||y.value!=="color-mix")return;let R=!1,a=!1;if(N0(y.nodes,(s)=>{if(s.kind=="word"&&s.value.toLowerCase()==="currentcolor"){a=!0,j=!0;return}let W0=s,H0=null,A0=new Set;do{if(W0.kind!=="function"||W0.value!=="var")return;let X0=W0.nodes[0];if(!X0||X0.kind!=="word")return;let V=X0.value;if(A0.has(V)){R=!0;return}if(A0.add(V),j=!0,H0=$.theme.resolveValue(null,[X0.value]),!H0){R=!0;return}if(H0.toLowerCase()==="currentcolor"){a=!0;return}H0.startsWith("var(")?W0=J1(H0)[0]:W0=null}while(W0);return Z0.Replace({kind:"word",value:H0})}),R||a){let s=y.nodes.findIndex((H0)=>H0.kind==="separator"&&H0.value.trim().includes(","));if(s===-1)return;let W0=y.nodes.length>s?y.nodes[s+1]:null;return W0?Z0.Replace(W0):void 0}else if(j){let s=y.nodes[2];s.kind==="word"&&(s.value==="oklab"||s.value==="oklch"||s.value==="lab"||s.value==="lch")&&(s.value="srgb")}}),!j)continue;let d={...q,value:R1(T)},p=t1("@supports (color: color-mix(in lab, red, red))",[q]);p.src=q.src,M.splice(P,1,d,p)}if(X&1){let M=[];if(h.length>0){let N=t1(":root, :host",h);N.src=h[0].src,M.push(N)}if(U.length>0){let N=t1("*, ::before, ::after, ::backdrop",U);N.src=U[0].src,M.push(N)}if(M.length>0){let N=O.findIndex((T)=>!(T.kind==="comment"||T.kind==="at-rule"&&(T.name==="@charset"||T.name==="@import"))),q=e0("@layer","properties",[]);q.src=M[0].src,O.splice(N<0?O.length:N,0,q);let P=t1("@layer properties",[e0("@supports","((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))",M)]);P.src=M[0].src,P.nodes[0].src=M[0].src,O.push(P)}}return O}function E3(w,$){let X=0,W={file:null,code:""};function Y(G,f=0){let H="",h=" ".repeat(f);if(G.kind==="declaration"){if(H+=`${h}${G.property}: ${G.value}${G.important?" !important":""};
|
|
863
865
|
`,$){X+=h.length;let U=X;X+=G.property.length,X+=2,X+=G.value?.length??0,G.important&&(X+=11);let A=X;X+=2,G.dst=[W,U,A]}}else if(G.kind==="rule"){if(H+=`${h}${G.selector} {
|
|
@@ -928,7 +930,7 @@ ${$.join(`
|
|
|
928
930
|
`;if($){X+=h.length;let A=X;X+=G.name.length,X+=1,X+=G.params.length;let F=X;X+=2,G.dst=[W,A,F]}return U}if(H+=`${h}${G.name}${G.params?` ${G.params} `:" "}{
|
|
929
931
|
`,$){X+=h.length;let U=X;X+=G.name.length,G.params&&(X+=1,X+=G.params.length),X+=1;let A=X;G.dst=[W,U,A],X+=2}for(let U of G.nodes)H+=Y(U,f+1);H+=`${h}}
|
|
930
932
|
`,$&&(X+=h.length,X+=2)}else if(G.kind==="comment"){if(H+=`${h}/*${G.value}*/
|
|
931
|
-
`,$){X+=h.length;let U=X;X+=2+G.value.length+2;let A=X;G.dst=[W,U,A],X+=1}}else if(G.kind==="context"||G.kind==="at-root")return"";return H}let J="";for(let G of w)J+=Y(G,0);return W.code=J,J}var K90=33;function H90(w,$,X){let W=new y4((h)=>new w.Input(h.code,{map:X?.input.map,from:h.file??void 0})),Y=new y4((h)=>ow0(h.code)),J=w.root();J.source=X;function G(h){if(!h||!h[0])return;let U=Y.get(h[0]),A=U.find(h[1]),F=U.find(h[2]);return{input:W.get(h[0]),start:{line:A.line,column:A.column+1,offset:h[1]},end:{line:F.line,column:F.column+1,offset:h[2]}}}function f(h,U){let A=G(U);A?h.source=A:delete h.source}function H(h,U){if(h.kind==="declaration"){let A=w.decl({prop:h.property,value:h.value??"",important:h.important});f(A,h.src),U.append(A)}else if(h.kind==="rule"){let A=w.rule({selector:h.selector});f(A,h.src),A.raws.semicolon=!0,U.append(A);for(let F of h.nodes)H(F,A)}else if(h.kind==="at-rule"){let A=w.atRule({name:h.name.slice(1),params:h.params});f(A,h.src),A.raws.semicolon=!0,U.append(A);for(let F of h.nodes)H(F,A)}else if(h.kind==="comment"){let A=w.comment({text:h.value});A.raws.left="",A.raws.right="",f(A,h.src),U.append(A)}else h.kind==="at-root"||h.kind}for(let h of $)H(h,J);return J}function h90(w){let $=new y4((J)=>({file:J.file??J.id??null,code:J.css}));function X(J){let G=J.source;if(!G)return;let f=G.input;if(f&&G.start!==void 0&&G.end!==void 0)return[$.get(f),G.start.offset,G.end.offset]}function W(J,G){if(J.type==="decl"){let f=J90(J.prop,J.value,J.important);f.src=X(J),G.push(f)}else if(J.type==="rule"){let f=Y90(J.selector);f.src=X(J),J.each((H)=>W(H,f.nodes)),G.push(f)}else if(J.type==="atrule"){let f=DC(`@${J.name}`,J.params);f.src=X(J),J.each((H)=>W(H,f.nodes)),G.push(f)}else if(J.type==="comment"){if(J.text.charCodeAt(0)!==K90)return;let f=G90(J.text);f.src=X(J),G.push(f)}}let Y=[];return w.each((J)=>W(J,Y)),Y}var PU="'",TU='"';function U90(){let w=new WeakSet;function $(X){let W=X.root().source?.input.file;if(!W)return;let Y=X.source?.input.file;if(!Y||w.has(X))return;let J=X.params[0],G=J[0]===TU&&J[J.length-1]===TU?TU:J[0]===PU&&J[J.length-1]===PU?PU:null;if(!G)return;let f=X.params.slice(1,-1),H="";if(f.startsWith("!")&&(f=f.slice(1),H="!"),!f.startsWith("./")&&!f.startsWith("../"))return;let h=mY.posix.join(m7(mY.dirname(Y)),f),U=mY.posix.dirname(m7(W)),A=mY.posix.relative(U,h);A.startsWith(".")||(A="./"+A),X.params=G+H+A+G,w.add(X)}return{postcssPlugin:"tailwindcss-postcss-fix-relative-paths",Once(X){X.walkAtRules(/source|plugin|config/,$)}}}var $1=qU.DEBUG,jU=new MC.default({maxSize:50});function A90(w,$,X){let W=`${$}:${X.base??""}:${JSON.stringify(X.optimize)}`;if(jU.has(W))return jU.get(W);let Y={mtimes:new Map,compiler:null,scanner:null,tailwindCssAst:[],cachedPostCssAst:w.root(),optimizedPostCssAst:w.root(),fullRebuildPaths:[]};return jU.set(W,Y),Y}function Q90(w={}){let $=w.base??process.cwd(),X=w.optimize??!1,W=w.transformAssetUrls??!0;return{postcssPlugin:"@tailwindcss/postcss",plugins:[U90(),{postcssPlugin:"tailwindcss",async Once(Y,{result:J,postcss:G}){var f=[];try{let U=vw0(f,new tj),A=J.opts.from??"",F=A.endsWith(".module.css");$1&&U.start(`[@tailwindcss/postcss] ${JC($,A)}`);{$1&&U.start("Quick bail check");let P=!0;if(Y.walkAtRules((T)=>{if(T.name==="import"||T.name==="reference"||T.name==="theme"||T.name==="variant"||T.name==="config"||T.name==="plugin"||T.name==="apply"||T.name==="tailwind")return P=!1,!1}),P)return;$1&&U.end("Quick bail check")}let O=A90(G,A,w),M=D6.dirname(D6.resolve(A)),N=O.compiler===null;async function q(){$1&&U.start("Setup compiler"),O.fullRebuildPaths.length>0&&!N&&_C.clearRequireCache(O.fullRebuildPaths),O.fullRebuildPaths=[],$1&&U.start("PostCSS AST -> Tailwind CSS AST");let P=h90(Y);$1&&U.end("PostCSS AST -> Tailwind CSS AST"),$1&&U.start("Create compiler");let T=await sj(P,{from:J.opts.from,base:M,shouldRewriteUrls:W,onDependency:(j)=>O.fullRebuildPaths.push(j),polyfills:F?j4.All^j4.AtProperty:j4.All});return $1&&U.end("Create compiler"),$1&&U.end("Setup compiler"),T}try{if(O.compiler??=q(),(await O.compiler).features===C4.None)return;let P="incremental";$1&&U.start("Register full rebuild paths");{for(let y of O.fullRebuildPaths)J.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:D6.resolve(y),parent:J.opts.from});let p=J.messages.flatMap((y)=>y.type!=="dependency"?[]:y.file);p.push(A);for(let y of p){let R=Ew0.statSync(y,{throwIfNoEntry:!1})?.mtimeMs??null;if(R===null){y===A&&(P="full");continue}O.mtimes.get(y)!==R&&(P="full",O.mtimes.set(y,R))}}$1&&U.end("Register full rebuild paths"),P==="full"&&!N&&(O.compiler=q());let T=await O.compiler;if(O.scanner===null||P==="full"){$1&&U.start("Setup scanner");let p=(T.root==="none"?[]:T.root===null?[{base:$,pattern:"**/*",negated:!1}]:[{...T.root,negated:!1}]).concat(T.sources);O.scanner=new Lw0({sources:p}),$1&&U.end("Setup scanner")}$1&&U.start("Scan for candidates");let j=T.features&C4.Utilities?O.scanner.scan():[];if($1&&U.end("Scan for candidates"),T.features&C4.Utilities){$1&&U.start("Register dependency messages");let p=D6.resolve($,A);for(let y of O.scanner.files){let R=D6.resolve(y);R!==p&&J.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:R,parent:J.opts.from})}for(let{base:y,pattern:R}of O.scanner.globs)R==="*"&&$===y||(R===""?J.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:D6.resolve(y),parent:J.opts.from}):J.messages.push({type:"dir-dependency",plugin:"@tailwindcss/postcss",dir:D6.resolve(y),glob:R,parent:J.opts.from}));$1&&U.end("Register dependency messages")}$1&&U.start("Build utilities");let d=T.build(j);if($1&&U.end("Build utilities"),O.tailwindCssAst!==d)if(X){$1&&U.start("Optimization"),$1&&U.start("AST -> CSS");let p=f90(d);$1&&U.end("AST -> CSS"),$1&&U.start("Lightning CSS");let y=ej(p,{minify:typeof X=="object"?X.minify:!0});$1&&U.end("Lightning CSS"),$1&&U.start("CSS -> PostCSS AST"),O.optimizedPostCssAst=G.parse(y.code,J.opts),$1&&U.end("CSS -> PostCSS AST"),$1&&U.end("Optimization")}else $1&&U.start("Transform Tailwind CSS AST into PostCSS AST"),O.cachedPostCssAst=H90(G,d,Y.source),$1&&U.end("Transform Tailwind CSS AST into PostCSS AST");O.tailwindCssAst=d,$1&&U.start("Update PostCSS AST"),Y.removeAll(),Y.append(X?O.optimizedPostCssAst.clone().nodes:O.cachedPostCssAst.clone().nodes),Y.raws.indent=" ",$1&&U.end("Update PostCSS AST"),$1&&U.end(`[@tailwindcss/postcss] ${JC($,A)}`)}catch(P){O.compiler=null;for(let T of O.fullRebuildPaths)J.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:D6.resolve(T),parent:J.opts.from});throw console.error(P),P&&typeof P=="object"&&"message"in P?Y.error(`${P.message}`):Y.error(`${P}`)}}catch(U){var H=U,h=!0}finally{kw0(f,H,h)}}}]}}var F90=Object.assign(Q90,{postcss:!0});J0();J0();n0();J0();n0();var RC=Z.object({}),lY=Y2.extend({id:Z.literal("site-info"),entityType:Z.literal("site-info"),metadata:RC}),u4=Z.object({heading:Z.string().describe("Main CTA heading text"),buttonText:Z.string().describe("Call-to-action button text"),buttonLink:Z.string().describe("URL or anchor for the CTA button")}),X3=Z.object({title:Z.string().describe("The site's title"),description:Z.string().describe("The site's description"),copyright:Z.string().optional().describe("Copyright notice text"),logo:Z.boolean().optional().describe("Whether to display logo instead of title text in header"),themeMode:Z.enum(["light","dark"]).optional().describe("Default theme mode"),cta:u4.optional().describe("Call-to-action configuration")});n0();class W3 extends E2{constructor(){super({entityType:"site-info",schema:lY,frontmatterSchema:X3,isSingleton:!0,hasBody:!1})}createSiteInfoContent(w){let $=X3.parse(w);return this.buildMarkdown("",$)}parseSiteInfoBody(w){return this.parseFrontmatter(w)}toMarkdown(w){return w.content}fromMarkdown(w){return{content:w,entityType:"site-info"}}extractMetadata(w){return{}}generateFrontMatter(w){let $=this.parseFrontmatter(w.content);return this.buildMarkdown("",$)}}var JI0=new W3;var ZI0=new W3;var V90=new W3;async function v6(w){let X=(await w.listEntities("site-info",{limit:1}))[0];if(!X)throw Error("Site info not found \u2014 create a site-info entity");return V90.parseSiteInfoBody(X.content)}J0();var M90=X3.extend({navigation:Z.object({primary:Z.array(Z.object({label:Z.string(),href:Z.string(),priority:Z.number()})),secondary:Z.array(Z.object({label:Z.string(),href:Z.string(),priority:Z.number()}))}),copyright:Z.string(),socialLinks:Z.array(Z.object({platform:Z.enum(["github","instagram","linkedin","email","website"]).describe("Social media platform"),url:Z.string().describe("Profile or contact URL"),label:Z.string().optional().describe("Optional display label")})).optional().describe("Social media links from profile entity")});J0();J0();var WS0=Y2.extend({metadata:Z.object({slug:Z.string()}).passthrough()});n0();J0();n0();J0();n0();J0();var N90=Z.object({environment:Z.enum(["preview","production"]).optional(),outputDir:Z.string(),workingDir:Z.string().optional(),enableContentGeneration:Z.boolean().optional(),siteConfig:Z.object({title:Z.string(),description:Z.string(),url:Z.string().optional(),analyticsScript:Z.string().optional()}).optional()});J0();J0();n0();var bS0=Z.object({slot:Z.enum(cw).optional().default("primary"),limit:Z.number().optional()});n0();J0();var yS0=Z.object({environment:Z.enum(["preview","production"]).optional().describe("Build environment (defaults to production, or preview if configured)")});J0();n0();var D90=Z.object({previewOutputDir:Z.string().describe("Output directory for preview builds").default("./dist/site-preview"),productionOutputDir:Z.string().describe("Output directory for production builds").default("./dist/site-production"),sharedImagesDir:Z.string().describe("Shared directory for optimized images (used by both preview and production)").default("./dist/images"),workingDir:Z.string().optional().describe("Working directory for builds").default("./.preact-work"),siteInfo:X3.default({title:"Brain",description:"A knowledge management system"}),themeCSS:Z.string().describe("Custom CSS theme overrides to inject into builds").optional(),analyticsScript:Z.string().describe("Analytics tracking script to inject into page head (e.g., Cloudflare Web Analytics)").optional(),templates:Z.any().optional().describe("Template definitions to register"),routes:Z.array(P8).optional().describe("Routes to register"),layouts:Z.record(Z.any()).optional().describe("Layout components (at least 'default' required)"),autoRebuild:Z.boolean().default(!0).describe("Automatically rebuild site when content changes"),rebuildDebounce:Z.number().min(100).describe("Debounce time in ms before triggering site rebuild after content changes").default(5000),entityDisplay:Z.record(Z.object({label:Z.string().describe("Display label for entity type (e.g., 'Essay')"),pluralName:Z.string().optional().describe("URL path segment (defaults to label.toLowerCase() + 's')"),layout:Z.string().optional().describe("Layout name for this entity type's generated routes (defaults to 'default')"),paginate:Z.boolean().optional().describe("Enable pagination for list pages"),pageSize:Z.number().optional().describe("Items per page (default: 10)"),navigation:Z.object({show:Z.boolean().optional().describe("Show in navigation"),slot:Z.enum(cw).optional().describe("Navigation slot (primary or secondary)"),priority:Z.number().min(0).max(100).optional().describe("Navigation priority (0-100)")}).optional().describe("Navigation settings for this entity type")})).optional().describe("Display metadata per entity type \u2014 label, plural name, layout, pagination, navigation slot. Consulted when auto-generating routes for active entity plugins."),staticAssets:Z.record(Z.string()).optional().describe("Static files to write to the output directory at build time. Keys are output paths (e.g. '/canvases/tree.js'), values are file contents as strings. Typically supplied by a SitePackage via text imports."),cms:Z.object({}).optional().describe("Sveltia CMS configuration (enables /admin/ CMS, requires git-sync plugin)")});J0();var v90=X3.extend({navigation:Z.object({primary:Z.array(Z.object({label:Z.string(),href:Z.string(),priority:Z.number()})),secondary:Z.array(Z.object({label:Z.string(),href:Z.string(),priority:Z.number()}))}),copyright:Z.string(),socialLinks:Z.array(Z.object({platform:Z.enum(["github","instagram","linkedin","email","website"]).describe("Social media platform"),url:Z.string().describe("Profile or contact URL"),label:Z.string().optional().describe("Optional display label")})).optional().describe("Social media links from profile entity")});import{h as k90,Fragment as L90}from"preact";function SU({name:w,slots:$}){if(!$?.hasSlot(w))return null;let W=$.getSlot(w).map((Y)=>Y.render());return k90(L90,{},...W)}n0();var pY=iw,k6=n5.extend(pY.shape);n0();F4();J0();var E90=new G5;class rY{postsListUrl;id="personal:homepage";name="Personal Homepage DataSource";description="Fetches profile and blog posts for a personal homepage";constructor(w){this.postsListUrl=w}async fetch(w,$,X){let W=X.entityService,[Y,J,G]=await Promise.all([i5(W),W.listEntities("post",{limit:20}),v6(W)]),f=E90.parseProfileBody(Y,k6),H=J.sort(Iw).slice(0,6).map(z4);if(!G.cta)throw Error("CTA not configured in site-info");let h={profile:f,posts:H,postsListUrl:this.postsListUrl,cta:G.cta};return $.parse(h)}}n0();F4();var P90=new G5;class dY{id="personal:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(w,$,X){let W=await i5(X.entityService),J={profile:P90.parseProfileBody(W,k6)};return $.parse(J)}}import{jsxDEV as V1,Fragment as j90}from"preact/jsx-dev-runtime";function T90(w){return new Date(w).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}var xU=({profile:w,posts:$,postsListUrl:X,cta:W})=>{let Y=w.tagline??w.description;return V1(j90,{children:[V1(p1,{title:w.name,description:w.description??Y??"Personal site",ogType:"website"},void 0,!1,void 0,this),V1("header",{className:"hero-bg-pattern relative flex flex-col items-center pt-20 pb-[60px] px-6 md:px-12 gap-5 bg-theme-gradient overflow-hidden",children:V1("div",{className:"relative z-10 w-full max-w-[700px] mx-auto text-center",children:[Y&&V1("h1",{className:"text-2xl sm:text-4xl md:text-[56px] md:leading-[1.15] font-bold text-brand mb-5 font-heading tracking-[-0.03em] text-balance",children:Y},void 0,!1,void 0,this),w.description&&V1("p",{className:"text-lg leading-[1.6] text-theme max-w-[520px] mx-auto mb-6",children:w.description},void 0,!1,void 0,this),V1("div",{className:"flex flex-wrap justify-center gap-3",children:[V1("a",{href:X,className:"rounded-full py-3.5 px-8 bg-brand text-theme-inverse font-bold text-[15px] hover:bg-brand-dark transition-colors",children:"Read the Blog"},void 0,!1,void 0,this),V1("a",{href:"/about",className:"rounded-full py-3.5 px-8 border-2 border-accent text-accent font-bold text-[15px] hover:bg-accent hover:text-theme-inverse transition-colors",children:["About ",w.name.split(" ")[0]]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.length>0&&V1("section",{className:"flex flex-col py-[60px] px-6 md:px-12 gap-8 bg-theme",children:[V1("div",{className:"flex justify-between items-baseline max-w-layout mx-auto w-full",children:[V1("h2",{className:"text-2xl md:text-[32px] font-bold text-heading font-heading",children:"Recent Posts"},void 0,!1,void 0,this),V1("a",{href:X,className:"text-brand font-semibold text-sm hover:text-brand-dark transition-colors",children:"View all \u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V1("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(min(100%,280px),360px))] justify-center gap-6 max-w-layout mx-auto w-full",children:$.map((J)=>V1("a",{href:J.url,className:"flex flex-col rounded-[20px] gap-4 bg-white border border-theme p-6 hover:shadow-lg transition-shadow no-underline",children:[J.coverImageUrl?V1("img",{src:J.coverImageUrl,alt:J.metadata.title,className:"card-cover-gradient w-full h-40 rounded-[14px] object-cover shrink-0 text-transparent"},void 0,!1,void 0,this):V1("div",{className:"w-full h-40 rounded-[14px] shrink-0 card-cover-gradient"},void 0,!1,void 0,this),J.frontmatter.seriesName&&V1("div",{className:"flex gap-2",children:V1("span",{className:"rounded-full py-0.5 px-2.5 bg-bg-muted text-brand text-[11px] font-semibold leading-[14px]",children:J.frontmatter.seriesName},void 0,!1,void 0,this)},void 0,!1,void 0,this),V1("h3",{className:"text-heading font-heading font-bold text-xl leading-6",children:J.metadata.title},void 0,!1,void 0,this),J.frontmatter.excerpt&&V1("p",{className:"text-sm text-theme-muted leading-[1.5]",children:J.frontmatter.excerpt},void 0,!1,void 0,this),V1("span",{className:"text-theme-light text-xs leading-4",children:T90(J.metadata.publishedAt??J.created)},void 0,!1,void 0,this)]},J.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V1("section",{className:"cta-bg-pattern relative flex flex-col items-center py-[60px] px-6 md:px-12 gap-4 bg-brand overflow-hidden",children:[V1("h2",{className:"text-center text-theme-inverse font-heading font-bold text-2xl md:text-[28px]",children:W.heading},void 0,!1,void 0,this),W.subtitle&&V1("p",{className:"text-center text-cta-subtitle text-base max-w-[400px]",children:W.subtitle},void 0,!1,void 0,this),V1("a",{href:W.buttonLink,className:"rounded-full py-3.5 px-8 bg-white text-brand font-bold text-[15px] hover:bg-theme-subtle transition-colors",children:W.buttonText},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as p2,Fragment as C90}from"preact/jsx-dev-runtime";var yU=({profile:w})=>{let $=`About ${w.name}`,X=w.description??w.intro??"About page";return p2(C90,{children:[p2(p1,{title:$,description:X,ogType:"profile"},void 0,!1,void 0,this),p2("div",{className:"about-page bg-theme",children:[p2("section",{className:"hero-bg-pattern relative flex flex-col pt-20 pb-[60px] px-6 md:px-12 bg-theme-gradient overflow-hidden",children:p2("div",{className:"relative z-10 w-full max-w-3xl mx-auto",children:[p2("h1",{className:"text-2xl sm:text-3xl md:text-[48px] md:leading-[1.15] font-bold text-brand mb-4 font-heading tracking-[-0.03em] text-balance",children:w.name},void 0,!1,void 0,this),w.description&&p2("p",{className:"text-lg leading-[1.6] text-theme max-w-2xl",children:w.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),w.story&&p2("section",{className:"py-[60px] px-6 md:px-12 bg-theme",children:p2("div",{className:"max-w-3xl mx-auto",children:p2(M4,{markdown:w.story},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),(w.email??w.website)&&p2("section",{className:"py-[60px] px-6 md:px-12 bg-theme",children:p2("div",{className:"max-w-3xl mx-auto flex flex-wrap gap-4",children:[w.email&&p2(P2,{href:`mailto:${w.email}`,variant:"primary",children:"Get in Touch"},void 0,!1,void 0,this),w.website&&p2(P2,{href:w.website,variant:"outline",children:"Website"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};var qC={name:"@brains/site-personal",private:!0,version:"0.2.0-alpha.11",description:"Personal site composition package",type:"module",exports:{".":"./src/index.ts"},files:["src"],scripts:{typecheck:"tsc --noEmit",lint:"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix"},dependencies:{"@brains/blog":"workspace:*","@brains/identity-service":"workspace:*","@brains/plugins":"workspace:*","@brains/site-builder-plugin":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"latest","bun-types":"latest",eslint:"^8.56.0",typescript:"^5.3.3"}};var I90=Z.object({entityDisplay:Z.object({post:Z.object({label:Z.string().default("Post"),pluralName:Z.string().optional()}).default({})}).default({})});class mU extends Q4{dependencies=["blog"];constructor(w={}){super("personal-site",qC,w,I90)}async onRegister(w){w.entities.extendFrontmatterSchema("anchor-profile",pY);let $=this.config.entityDisplay.post,X=`/${$.pluralName??$.label.toLowerCase()+"s"}`,W=new rY(X);w.entities.registerDataSource(W);let Y=new dY;w.entities.registerDataSource(Y);let J=Z.object({profile:k6,posts:Z.array(M5),postsListUrl:Z.string(),cta:u4}),G=Z.object({profile:k6});w.templates.register({homepage:Z1({name:"homepage",description:"Personal homepage with recent blog posts",schema:J,dataSourceId:"personal:homepage",requiredPermission:"public",layout:{component:xU}}),about:Z1({name:"about",description:"About page with profile",schema:G,dataSourceId:"personal:about",requiredPermission:"public",layout:{component:yU}})}),this.logger.info("Personal site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function vC(w){return new mU(w??{})}var uU=[{id:"home",path:"/",title:"Home",description:"Personal site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"personal-site:homepage",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"personal-site:about",dataQuery:{}}]}];import{jsxDEV as t2}from"preact/jsx-dev-runtime";function kC({sections:w,siteInfo:$}){let X=[...$.navigation.primary,...$.navigation.secondary].filter((W)=>W.label!=="Home");return t2("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[t2(m8,{title:$.title,titleClassName:"font-heading font-bold text-2xl",navigation:$.navigation.primary,showThemeToggle:!0,themeToggleClassName:"bg-theme-toggle text-theme-toggle-icon hover:bg-theme-toggle-hover rounded-[10px]",...$.logo!==void 0?{logo:$.logo}:{}},void 0,!1,void 0,this),t2("main",{className:"flex-grow flex flex-col",children:w},void 0,!1,void 0,this),t2("footer",{className:"bg-footer text-footer border-t border-theme",children:t2("div",{className:"max-w-layout mx-auto flex flex-col md:flex-row justify-between items-center py-8 px-6 md:px-8",children:[t2("div",{className:"flex flex-col gap-1 mb-4 md:mb-0",children:[t2("span",{className:"text-brand font-heading font-bold text-lg",children:$.title},void 0,!1,void 0,this),$.description&&t2("span",{className:"text-theme-muted text-xs",children:$.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),t2("nav",{className:"flex flex-wrap justify-center gap-x-6 gap-y-2 mb-4 md:mb-0",children:X.map((W)=>t2("a",{href:W.href,className:"text-theme-muted text-[13px] hover:text-brand transition-colors",children:W.label},W.href,!1,void 0,this))},void 0,!1,void 0,this),t2("div",{className:"flex items-center gap-4",children:[$.copyright&&t2("span",{className:"text-theme-light text-[11px]",children:$.copyright},void 0,!1,void 0,this),t2(h6,{variant:"footer",size:"sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}n0();J0();l5();n0();J0();n0();J0();J0();n0();var S90=Z.enum(["draft","queued","published"]),L6=Z.object({title:Z.string(),slug:Z.string().optional(),description:Z.string().optional(),author:Z.string().optional(),status:S90,publishedAt:Z.string().datetime().optional(),event:Z.string().optional(),coverImageId:Z.string().optional()}),x90=L6.pick({title:!0,description:!0,status:!0,publishedAt:!0,coverImageId:!0}).extend({slug:Z.string()}),cY=Y2.extend({entityType:Z.literal("deck"),metadata:x90}),iY=cY.extend({frontmatter:L6,body:Z.string()}),p7=iY.extend({url:Z.string().optional(),typeLabel:Z.string().optional(),listUrl:Z.string().optional(),listLabel:Z.string().optional(),coverImageUrl:Z.string().optional(),coverImageWidth:Z.number().optional(),coverImageHeight:Z.number().optional()});class gU extends E2{constructor(){super({entityType:"deck",schema:cY,frontmatterSchema:L6,supportsCoverImage:!0})}validateSlideStructure(w){if(!/^---$/gm.test(w))throw Error("Invalid deck: markdown must contain slide separators (---) to be a valid presentation")}toMarkdown(w){let $=this.extractBody(w.content);this.validateSlideStructure($);try{let X=this.parseFrontMatter(w.content,L6),W={...X,slug:X.slug??w.metadata.slug};return this.buildMarkdown($,W)}catch{return $}}fromMarkdown(w){let $=this.parseFrontmatter(w),X=this.extractBody(w);this.validateSlideStructure(X);let W=$.slug??Y5($.title),Y=$.status;return{entityType:"deck",content:w,metadata:{slug:W,title:$.title,description:$.description,status:Y,publishedAt:$.publishedAt,coverImageId:$.coverImageId}}}generateTitle(w){return w.metadata.title}generateSummary(w){if(w.metadata.description)return w.metadata.description;return`Presentation: ${w.metadata.title}`}generateFrontMatter(w){return this.toMarkdown(w)}}var r7=new gU;J0();l5();var y90=Z.object({markdown:Z.string().describe("Markdown content with slide separators (---)")}),lU=Z1({name:"deck-detail",description:"Render a presentation deck as Reveal.js slides",schema:y90,dataSourceId:"decks:entities",requiredPermission:"public",layout:{component:$H,fullscreen:!0}});l5();J0();var pU=Z.object({decks:Z.array(iY)}),rU=Z.object({decks:Z.array(p7),pageTitle:Z.string().optional()});import{jsxDEV as dU}from"preact/jsx-dev-runtime";var cU=({decks:w,pageTitle:$})=>{let X=w.map((W)=>({id:W.id,url:W.url,title:W.frontmatter.title,date:W.frontmatter.publishedAt??W.created,description:W.frontmatter.description}));return dU("div",{className:"deck-list bg-theme",children:dU("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl py-16 md:py-24",children:dU(V3,{title:$??"Presentations",items:X},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)};J0();class nY extends VX{constructor(){super(pU,{title:"Deck List",mappings:[{key:"decks",label:"Decks",type:"array",itemType:"object"}]})}}var iU=Z1({name:"deck-list",description:"List view of all presentation decks",schema:rU,dataSourceId:"decks:entities",requiredPermission:"public",formatter:new nY,layout:{component:cU}});J0();n0();var m90=Z.object({title:Z.string().max(80).describe("A short, punchy title (2-5 words) that's memorable and evocative"),content:Z.string().describe("Full slide deck content in markdown format with slide separators (---). Each slide should have a header and focused content."),description:Z.string().describe("A concise 1-2 sentence summary that captures the essence of the talk")}),LC=Z1({name:"decks:generation",description:"Template for AI to generate complete slide decks from prompts",schema:m90,dataSourceId:"shell:ai-content",requiredPermission:"public",basePrompt:`You are creating slide decks in a distinctive voice that blends philosophy, technology, and culture.
|
|
933
|
+
`,$){X+=h.length;let U=X;X+=2+G.value.length+2;let A=X;G.dst=[W,U,A],X+=1}}else if(G.kind==="context"||G.kind==="at-root")return"";return H}let J="";for(let G of w)J+=Y(G,0);return W.code=J,J}var K90=33;function H90(w,$,X){let W=new y4((h)=>new w.Input(h.code,{map:X?.input.map,from:h.file??void 0})),Y=new y4((h)=>ow0(h.code)),J=w.root();J.source=X;function G(h){if(!h||!h[0])return;let U=Y.get(h[0]),A=U.find(h[1]),F=U.find(h[2]);return{input:W.get(h[0]),start:{line:A.line,column:A.column+1,offset:h[1]},end:{line:F.line,column:F.column+1,offset:h[2]}}}function f(h,U){let A=G(U);A?h.source=A:delete h.source}function H(h,U){if(h.kind==="declaration"){let A=w.decl({prop:h.property,value:h.value??"",important:h.important});f(A,h.src),U.append(A)}else if(h.kind==="rule"){let A=w.rule({selector:h.selector});f(A,h.src),A.raws.semicolon=!0,U.append(A);for(let F of h.nodes)H(F,A)}else if(h.kind==="at-rule"){let A=w.atRule({name:h.name.slice(1),params:h.params});f(A,h.src),A.raws.semicolon=!0,U.append(A);for(let F of h.nodes)H(F,A)}else if(h.kind==="comment"){let A=w.comment({text:h.value});A.raws.left="",A.raws.right="",f(A,h.src),U.append(A)}else h.kind==="at-root"||h.kind}for(let h of $)H(h,J);return J}function h90(w){let $=new y4((J)=>({file:J.file??J.id??null,code:J.css}));function X(J){let G=J.source;if(!G)return;let f=G.input;if(f&&G.start!==void 0&&G.end!==void 0)return[$.get(f),G.start.offset,G.end.offset]}function W(J,G){if(J.type==="decl"){let f=J90(J.prop,J.value,J.important);f.src=X(J),G.push(f)}else if(J.type==="rule"){let f=Y90(J.selector);f.src=X(J),J.each((H)=>W(H,f.nodes)),G.push(f)}else if(J.type==="atrule"){let f=DC(`@${J.name}`,J.params);f.src=X(J),J.each((H)=>W(H,f.nodes)),G.push(f)}else if(J.type==="comment"){if(J.text.charCodeAt(0)!==K90)return;let f=G90(J.text);f.src=X(J),G.push(f)}}let Y=[];return w.each((J)=>W(J,Y)),Y}var PU="'",TU='"';function U90(){let w=new WeakSet;function $(X){let W=X.root().source?.input.file;if(!W)return;let Y=X.source?.input.file;if(!Y||w.has(X))return;let J=X.params[0],G=J[0]===TU&&J[J.length-1]===TU?TU:J[0]===PU&&J[J.length-1]===PU?PU:null;if(!G)return;let f=X.params.slice(1,-1),H="";if(f.startsWith("!")&&(f=f.slice(1),H="!"),!f.startsWith("./")&&!f.startsWith("../"))return;let h=mY.posix.join(m7(mY.dirname(Y)),f),U=mY.posix.dirname(m7(W)),A=mY.posix.relative(U,h);A.startsWith(".")||(A="./"+A),X.params=G+H+A+G,w.add(X)}return{postcssPlugin:"tailwindcss-postcss-fix-relative-paths",Once(X){X.walkAtRules(/source|plugin|config/,$)}}}var $1=qU.DEBUG,jU=new MC.default({maxSize:50});function A90(w,$,X){let W=`${$}:${X.base??""}:${JSON.stringify(X.optimize)}`;if(jU.has(W))return jU.get(W);let Y={mtimes:new Map,compiler:null,scanner:null,tailwindCssAst:[],cachedPostCssAst:w.root(),optimizedPostCssAst:w.root(),fullRebuildPaths:[]};return jU.set(W,Y),Y}function Q90(w={}){let $=w.base??process.cwd(),X=w.optimize??!1,W=w.transformAssetUrls??!0;return{postcssPlugin:"@tailwindcss/postcss",plugins:[U90(),{postcssPlugin:"tailwindcss",async Once(Y,{result:J,postcss:G}){var f=[];try{let U=vw0(f,new tj),A=J.opts.from??"",F=A.endsWith(".module.css");$1&&U.start(`[@tailwindcss/postcss] ${JC($,A)}`);{$1&&U.start("Quick bail check");let P=!0;if(Y.walkAtRules((T)=>{if(T.name==="import"||T.name==="reference"||T.name==="theme"||T.name==="variant"||T.name==="config"||T.name==="plugin"||T.name==="apply"||T.name==="tailwind")return P=!1,!1}),P)return;$1&&U.end("Quick bail check")}let O=A90(G,A,w),M=D6.dirname(D6.resolve(A)),N=O.compiler===null;async function q(){$1&&U.start("Setup compiler"),O.fullRebuildPaths.length>0&&!N&&_C.clearRequireCache(O.fullRebuildPaths),O.fullRebuildPaths=[],$1&&U.start("PostCSS AST -> Tailwind CSS AST");let P=h90(Y);$1&&U.end("PostCSS AST -> Tailwind CSS AST"),$1&&U.start("Create compiler");let T=await sj(P,{from:J.opts.from,base:M,shouldRewriteUrls:W,onDependency:(j)=>O.fullRebuildPaths.push(j),polyfills:F?j4.All^j4.AtProperty:j4.All});return $1&&U.end("Create compiler"),$1&&U.end("Setup compiler"),T}try{if(O.compiler??=q(),(await O.compiler).features===C4.None)return;let P="incremental";$1&&U.start("Register full rebuild paths");{for(let y of O.fullRebuildPaths)J.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:D6.resolve(y),parent:J.opts.from});let p=J.messages.flatMap((y)=>y.type!=="dependency"?[]:y.file);p.push(A);for(let y of p){let R=Ew0.statSync(y,{throwIfNoEntry:!1})?.mtimeMs??null;if(R===null){y===A&&(P="full");continue}O.mtimes.get(y)!==R&&(P="full",O.mtimes.set(y,R))}}$1&&U.end("Register full rebuild paths"),P==="full"&&!N&&(O.compiler=q());let T=await O.compiler;if(O.scanner===null||P==="full"){$1&&U.start("Setup scanner");let p=(T.root==="none"?[]:T.root===null?[{base:$,pattern:"**/*",negated:!1}]:[{...T.root,negated:!1}]).concat(T.sources);O.scanner=new Lw0({sources:p}),$1&&U.end("Setup scanner")}$1&&U.start("Scan for candidates");let j=T.features&C4.Utilities?O.scanner.scan():[];if($1&&U.end("Scan for candidates"),T.features&C4.Utilities){$1&&U.start("Register dependency messages");let p=D6.resolve($,A);for(let y of O.scanner.files){let R=D6.resolve(y);R!==p&&J.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:R,parent:J.opts.from})}for(let{base:y,pattern:R}of O.scanner.globs)R==="*"&&$===y||(R===""?J.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:D6.resolve(y),parent:J.opts.from}):J.messages.push({type:"dir-dependency",plugin:"@tailwindcss/postcss",dir:D6.resolve(y),glob:R,parent:J.opts.from}));$1&&U.end("Register dependency messages")}$1&&U.start("Build utilities");let d=T.build(j);if($1&&U.end("Build utilities"),O.tailwindCssAst!==d)if(X){$1&&U.start("Optimization"),$1&&U.start("AST -> CSS");let p=f90(d);$1&&U.end("AST -> CSS"),$1&&U.start("Lightning CSS");let y=ej(p,{minify:typeof X=="object"?X.minify:!0});$1&&U.end("Lightning CSS"),$1&&U.start("CSS -> PostCSS AST"),O.optimizedPostCssAst=G.parse(y.code,J.opts),$1&&U.end("CSS -> PostCSS AST"),$1&&U.end("Optimization")}else $1&&U.start("Transform Tailwind CSS AST into PostCSS AST"),O.cachedPostCssAst=H90(G,d,Y.source),$1&&U.end("Transform Tailwind CSS AST into PostCSS AST");O.tailwindCssAst=d,$1&&U.start("Update PostCSS AST"),Y.removeAll(),Y.append(X?O.optimizedPostCssAst.clone().nodes:O.cachedPostCssAst.clone().nodes),Y.raws.indent=" ",$1&&U.end("Update PostCSS AST"),$1&&U.end(`[@tailwindcss/postcss] ${JC($,A)}`)}catch(P){O.compiler=null;for(let T of O.fullRebuildPaths)J.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:D6.resolve(T),parent:J.opts.from});throw console.error(P),P&&typeof P=="object"&&"message"in P?Y.error(`${P.message}`):Y.error(`${P}`)}}catch(U){var H=U,h=!0}finally{kw0(f,H,h)}}}]}}var F90=Object.assign(Q90,{postcss:!0});J0();J0();n0();J0();n0();var RC=Z.object({}),lY=Y2.extend({id:Z.literal("site-info"),entityType:Z.literal("site-info"),metadata:RC}),u4=Z.object({heading:Z.string().describe("Main CTA heading text"),buttonText:Z.string().describe("Call-to-action button text"),buttonLink:Z.string().describe("URL or anchor for the CTA button")}),X3=Z.object({title:Z.string().describe("The site's title"),description:Z.string().describe("The site's description"),copyright:Z.string().optional().describe("Copyright notice text"),logo:Z.boolean().optional().describe("Whether to display logo instead of title text in header"),themeMode:Z.enum(["light","dark"]).optional().describe("Default theme mode"),cta:u4.optional().describe("Call-to-action configuration")});n0();class W3 extends E2{constructor(){super({entityType:"site-info",schema:lY,frontmatterSchema:X3,isSingleton:!0,hasBody:!1})}createSiteInfoContent(w){let $=X3.parse(w);return this.buildMarkdown("",$)}parseSiteInfoBody(w){return this.parseFrontmatter(w)}toMarkdown(w){return w.content}fromMarkdown(w){return{content:w,entityType:"site-info"}}extractMetadata(w){return{}}generateFrontMatter(w){let $=this.parseFrontmatter(w.content);return this.buildMarkdown("",$)}}var JI0=new W3;var ZI0=new W3;var V90=new W3;async function v6(w){let X=(await w.listEntities("site-info",{limit:1}))[0];if(!X)throw Error("Site info not found \u2014 create a site-info entity");return V90.parseSiteInfoBody(X.content)}J0();var M90=X3.extend({navigation:Z.object({primary:Z.array(Z.object({label:Z.string(),href:Z.string(),priority:Z.number()})),secondary:Z.array(Z.object({label:Z.string(),href:Z.string(),priority:Z.number()}))}),copyright:Z.string(),socialLinks:Z.array(Z.object({platform:Z.enum(["github","instagram","linkedin","email","website"]).describe("Social media platform"),url:Z.string().describe("Profile or contact URL"),label:Z.string().optional().describe("Optional display label")})).optional().describe("Social media links from profile entity")});J0();J0();var WS0=Y2.extend({metadata:Z.object({slug:Z.string()}).passthrough()});n0();J0();n0();J0();n0();J0();var N90=Z.object({environment:Z.enum(["preview","production"]).optional(),outputDir:Z.string(),workingDir:Z.string().optional(),enableContentGeneration:Z.boolean().optional(),siteConfig:Z.object({title:Z.string(),description:Z.string(),url:Z.string().optional(),analyticsScript:Z.string().optional()}).optional()});J0();J0();n0();var bS0=Z.object({slot:Z.enum(cw).optional().default("primary"),limit:Z.number().optional()});n0();J0();var yS0=Z.object({environment:Z.enum(["preview","production"]).optional().describe("Build environment (defaults to production, or preview if configured)")});J0();n0();var D90=Z.object({previewOutputDir:Z.string().describe("Output directory for preview builds").default("./dist/site-preview"),productionOutputDir:Z.string().describe("Output directory for production builds").default("./dist/site-production"),sharedImagesDir:Z.string().describe("Shared directory for optimized images (used by both preview and production)").default("./dist/images"),workingDir:Z.string().optional().describe("Working directory for builds").default("./.preact-work"),siteInfo:X3.default({title:"Brain",description:"A knowledge management system"}),themeCSS:Z.string().describe("Custom CSS theme overrides to inject into builds").optional(),analyticsScript:Z.string().describe("Analytics tracking script to inject into page head (e.g., Cloudflare Web Analytics)").optional(),templates:Z.any().optional().describe("Template definitions to register"),routes:Z.array(P8).optional().describe("Routes to register"),layouts:Z.record(Z.any()).optional().describe("Layout components (at least 'default' required)"),autoRebuild:Z.boolean().default(!0).describe("Automatically rebuild site when content changes"),rebuildDebounce:Z.number().min(100).describe("Debounce time in ms before triggering site rebuild after content changes").default(5000),entityDisplay:Z.record(Z.object({label:Z.string().describe("Display label for entity type (e.g., 'Essay')"),pluralName:Z.string().optional().describe("URL path segment (defaults to label.toLowerCase() + 's')"),layout:Z.string().optional().describe("Layout name for this entity type's generated routes (defaults to 'default')"),paginate:Z.boolean().optional().describe("Enable pagination for list pages"),pageSize:Z.number().optional().describe("Items per page (default: 10)"),navigation:Z.object({show:Z.boolean().optional().describe("Show in navigation"),slot:Z.enum(cw).optional().describe("Navigation slot (primary or secondary)"),priority:Z.number().min(0).max(100).optional().describe("Navigation priority (0-100)")}).optional().describe("Navigation settings for this entity type")})).optional().describe("Display metadata per entity type \u2014 label, plural name, layout, pagination, navigation slot. Consulted when auto-generating routes for active entity plugins."),staticAssets:Z.record(Z.string()).optional().describe("Static files to write to the output directory at build time. Keys are output paths (e.g. '/canvases/tree.js'), values are file contents as strings. Typically supplied by a SitePackage via text imports."),cms:Z.object({}).optional().describe("Sveltia CMS configuration (enables /admin/ CMS, requires git-sync plugin)")});J0();var v90=X3.extend({navigation:Z.object({primary:Z.array(Z.object({label:Z.string(),href:Z.string(),priority:Z.number()})),secondary:Z.array(Z.object({label:Z.string(),href:Z.string(),priority:Z.number()}))}),copyright:Z.string(),socialLinks:Z.array(Z.object({platform:Z.enum(["github","instagram","linkedin","email","website"]).describe("Social media platform"),url:Z.string().describe("Profile or contact URL"),label:Z.string().optional().describe("Optional display label")})).optional().describe("Social media links from profile entity")});import{h as k90,Fragment as L90}from"preact";function SU({name:w,slots:$}){if(!$?.hasSlot(w))return null;let W=$.getSlot(w).map((Y)=>Y.render());return k90(L90,{},...W)}n0();var pY=iw,k6=n5.extend(pY.shape);n0();F4();J0();var E90=new G5;class rY{postsListUrl;id="personal:homepage";name="Personal Homepage DataSource";description="Fetches profile and blog posts for a personal homepage";constructor(w){this.postsListUrl=w}async fetch(w,$,X){let W=X.entityService,[Y,J,G]=await Promise.all([i5(W),W.listEntities("post",{limit:20}),v6(W)]),f=E90.parseProfileBody(Y,k6),H=J.sort(Iw).slice(0,6).map(z4);if(!G.cta)throw Error("CTA not configured in site-info");let h={profile:f,posts:H,postsListUrl:this.postsListUrl,cta:G.cta};return $.parse(h)}}n0();F4();var P90=new G5;class dY{id="personal:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(w,$,X){let W=await i5(X.entityService),J={profile:P90.parseProfileBody(W,k6)};return $.parse(J)}}import{jsxDEV as V1,Fragment as j90}from"preact/jsx-dev-runtime";function T90(w){return new Date(w).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}var xU=({profile:w,posts:$,postsListUrl:X,cta:W})=>{let Y=w.tagline??w.description;return V1(j90,{children:[V1(p1,{title:w.name,description:w.description??Y??"Personal site",ogType:"website"},void 0,!1,void 0,this),V1("header",{className:"hero-bg-pattern relative flex flex-col items-center pt-20 pb-[60px] px-6 md:px-12 gap-5 bg-theme-gradient overflow-hidden",children:V1("div",{className:"relative z-10 w-full max-w-[700px] mx-auto text-center",children:[Y&&V1("h1",{className:"text-2xl sm:text-4xl md:text-[56px] md:leading-[1.15] font-bold text-brand mb-5 font-heading tracking-[-0.03em] text-balance",children:Y},void 0,!1,void 0,this),w.description&&V1("p",{className:"text-lg leading-[1.6] text-theme max-w-[520px] mx-auto mb-6",children:w.description},void 0,!1,void 0,this),V1("div",{className:"flex flex-wrap justify-center gap-3",children:[V1("a",{href:X,className:"rounded-full py-3.5 px-8 bg-brand text-theme-inverse font-bold text-[15px] hover:bg-brand-dark transition-colors",children:"Read the Blog"},void 0,!1,void 0,this),V1("a",{href:"/about",className:"rounded-full py-3.5 px-8 border-2 border-accent text-accent font-bold text-[15px] hover:bg-accent hover:text-theme-inverse transition-colors",children:["About ",w.name.split(" ")[0]]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.length>0&&V1("section",{className:"flex flex-col py-[60px] px-6 md:px-12 gap-8 bg-theme",children:[V1("div",{className:"flex justify-between items-baseline max-w-layout mx-auto w-full",children:[V1("h2",{className:"text-2xl md:text-[32px] font-bold text-heading font-heading",children:"Recent Posts"},void 0,!1,void 0,this),V1("a",{href:X,className:"text-brand font-semibold text-sm hover:text-brand-dark transition-colors",children:"View all \u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V1("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(min(100%,280px),360px))] justify-center gap-6 max-w-layout mx-auto w-full",children:$.map((J)=>V1("a",{href:J.url,className:"flex flex-col rounded-[20px] gap-4 bg-white border border-theme p-6 hover:shadow-lg transition-shadow no-underline",children:[J.coverImageUrl?V1("img",{src:J.coverImageUrl,alt:J.metadata.title,className:"card-cover-gradient w-full h-40 rounded-[14px] object-cover shrink-0 text-transparent"},void 0,!1,void 0,this):V1("div",{className:"w-full h-40 rounded-[14px] shrink-0 card-cover-gradient"},void 0,!1,void 0,this),J.frontmatter.seriesName&&V1("div",{className:"flex gap-2",children:V1("span",{className:"rounded-full py-0.5 px-2.5 bg-bg-muted text-brand text-[11px] font-semibold leading-[14px]",children:J.frontmatter.seriesName},void 0,!1,void 0,this)},void 0,!1,void 0,this),V1("h3",{className:"text-heading font-heading font-bold text-xl leading-6",children:J.metadata.title},void 0,!1,void 0,this),J.frontmatter.excerpt&&V1("p",{className:"text-sm text-theme-muted leading-[1.5]",children:J.frontmatter.excerpt},void 0,!1,void 0,this),V1("span",{className:"text-theme-light text-xs leading-4",children:T90(J.metadata.publishedAt??J.created)},void 0,!1,void 0,this)]},J.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V1("section",{className:"cta-bg-pattern relative flex flex-col items-center py-[60px] px-6 md:px-12 gap-4 bg-brand overflow-hidden",children:[V1("h2",{className:"text-center text-theme-inverse font-heading font-bold text-2xl md:text-[28px]",children:W.heading},void 0,!1,void 0,this),W.subtitle&&V1("p",{className:"text-center text-cta-subtitle text-base max-w-[400px]",children:W.subtitle},void 0,!1,void 0,this),V1("a",{href:W.buttonLink,className:"rounded-full py-3.5 px-8 bg-white text-brand font-bold text-[15px] hover:bg-theme-subtle transition-colors",children:W.buttonText},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as p2,Fragment as C90}from"preact/jsx-dev-runtime";var yU=({profile:w})=>{let $=`About ${w.name}`,X=w.description??w.intro??"About page";return p2(C90,{children:[p2(p1,{title:$,description:X,ogType:"profile"},void 0,!1,void 0,this),p2("div",{className:"about-page bg-theme",children:[p2("section",{className:"hero-bg-pattern relative flex flex-col pt-20 pb-[60px] px-6 md:px-12 bg-theme-gradient overflow-hidden",children:p2("div",{className:"relative z-10 w-full max-w-3xl mx-auto",children:[p2("h1",{className:"text-2xl sm:text-3xl md:text-[48px] md:leading-[1.15] font-bold text-brand mb-4 font-heading tracking-[-0.03em] text-balance",children:w.name},void 0,!1,void 0,this),w.description&&p2("p",{className:"text-lg leading-[1.6] text-theme max-w-2xl",children:w.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),w.story&&p2("section",{className:"py-[60px] px-6 md:px-12 bg-theme",children:p2("div",{className:"max-w-3xl mx-auto",children:p2(M4,{markdown:w.story},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),(w.email??w.website)&&p2("section",{className:"py-[60px] px-6 md:px-12 bg-theme",children:p2("div",{className:"max-w-3xl mx-auto flex flex-wrap gap-4",children:[w.email&&p2(P2,{href:`mailto:${w.email}`,variant:"primary",children:"Get in Touch"},void 0,!1,void 0,this),w.website&&p2(P2,{href:w.website,variant:"outline",children:"Website"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};var qC={name:"@brains/site-personal",private:!0,version:"0.2.0-alpha.13",description:"Personal site composition package",type:"module",exports:{".":"./src/index.ts"},files:["src"],scripts:{typecheck:"tsc --noEmit",lint:"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix"},dependencies:{"@brains/blog":"workspace:*","@brains/identity-service":"workspace:*","@brains/plugins":"workspace:*","@brains/site-builder-plugin":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"latest","bun-types":"latest",eslint:"^8.56.0",typescript:"^5.3.3"}};var I90=Z.object({entityDisplay:Z.object({post:Z.object({label:Z.string().default("Post"),pluralName:Z.string().optional()}).default({})}).default({})});class mU extends Q4{dependencies=["blog"];constructor(w={}){super("personal-site",qC,w,I90)}async onRegister(w){w.entities.extendFrontmatterSchema("anchor-profile",pY);let $=this.config.entityDisplay.post,X=`/${$.pluralName??$.label.toLowerCase()+"s"}`,W=new rY(X);w.entities.registerDataSource(W);let Y=new dY;w.entities.registerDataSource(Y);let J=Z.object({profile:k6,posts:Z.array(M5),postsListUrl:Z.string(),cta:u4}),G=Z.object({profile:k6});w.templates.register({homepage:Z1({name:"homepage",description:"Personal homepage with recent blog posts",schema:J,dataSourceId:"personal:homepage",requiredPermission:"public",layout:{component:xU}}),about:Z1({name:"about",description:"About page with profile",schema:G,dataSourceId:"personal:about",requiredPermission:"public",layout:{component:yU}})}),this.logger.info("Personal site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function vC(w){return new mU(w??{})}var uU=[{id:"home",path:"/",title:"Home",description:"Personal site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"personal-site:homepage",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"personal-site:about",dataQuery:{}}]}];import{jsxDEV as t2}from"preact/jsx-dev-runtime";function kC({sections:w,siteInfo:$}){let X=[...$.navigation.primary,...$.navigation.secondary].filter((W)=>W.label!=="Home");return t2("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[t2(m8,{title:$.title,titleClassName:"font-heading font-bold text-2xl",navigation:$.navigation.primary,showThemeToggle:!0,themeToggleClassName:"bg-theme-toggle text-theme-toggle-icon hover:bg-theme-toggle-hover rounded-[10px]",...$.logo!==void 0?{logo:$.logo}:{}},void 0,!1,void 0,this),t2("main",{className:"flex-grow flex flex-col",children:w},void 0,!1,void 0,this),t2("footer",{className:"bg-footer text-footer border-t border-theme",children:t2("div",{className:"max-w-layout mx-auto flex flex-col md:flex-row justify-between items-center py-8 px-6 md:px-8",children:[t2("div",{className:"flex flex-col gap-1 mb-4 md:mb-0",children:[t2("span",{className:"text-brand font-heading font-bold text-lg",children:$.title},void 0,!1,void 0,this),$.description&&t2("span",{className:"text-theme-muted text-xs",children:$.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),t2("nav",{className:"flex flex-wrap justify-center gap-x-6 gap-y-2 mb-4 md:mb-0",children:X.map((W)=>t2("a",{href:W.href,className:"text-theme-muted text-[13px] hover:text-brand transition-colors",children:W.label},W.href,!1,void 0,this))},void 0,!1,void 0,this),t2("div",{className:"flex items-center gap-4",children:[$.copyright&&t2("span",{className:"text-theme-light text-[11px]",children:$.copyright},void 0,!1,void 0,this),t2(h6,{variant:"footer",size:"sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}n0();J0();l5();n0();J0();n0();J0();J0();n0();var S90=Z.enum(["draft","queued","published"]),L6=Z.object({title:Z.string(),slug:Z.string().optional(),description:Z.string().optional(),author:Z.string().optional(),status:S90,publishedAt:Z.string().datetime().optional(),event:Z.string().optional(),coverImageId:Z.string().optional()}),x90=L6.pick({title:!0,description:!0,status:!0,publishedAt:!0,coverImageId:!0}).extend({slug:Z.string()}),cY=Y2.extend({entityType:Z.literal("deck"),metadata:x90}),iY=cY.extend({frontmatter:L6,body:Z.string()}),p7=iY.extend({url:Z.string().optional(),typeLabel:Z.string().optional(),listUrl:Z.string().optional(),listLabel:Z.string().optional(),coverImageUrl:Z.string().optional(),coverImageWidth:Z.number().optional(),coverImageHeight:Z.number().optional()});class gU extends E2{constructor(){super({entityType:"deck",schema:cY,frontmatterSchema:L6,supportsCoverImage:!0})}validateSlideStructure(w){if(!/^---$/gm.test(w))throw Error("Invalid deck: markdown must contain slide separators (---) to be a valid presentation")}toMarkdown(w){let $=this.extractBody(w.content);this.validateSlideStructure($);try{let X=this.parseFrontMatter(w.content,L6),W={...X,slug:X.slug??w.metadata.slug};return this.buildMarkdown($,W)}catch{return $}}fromMarkdown(w){let $=this.parseFrontmatter(w),X=this.extractBody(w);this.validateSlideStructure(X);let W=$.slug??Y5($.title),Y=$.status;return{entityType:"deck",content:w,metadata:{slug:W,title:$.title,description:$.description,status:Y,publishedAt:$.publishedAt,coverImageId:$.coverImageId}}}generateTitle(w){return w.metadata.title}generateSummary(w){if(w.metadata.description)return w.metadata.description;return`Presentation: ${w.metadata.title}`}generateFrontMatter(w){return this.toMarkdown(w)}}var r7=new gU;J0();l5();var y90=Z.object({markdown:Z.string().describe("Markdown content with slide separators (---)")}),lU=Z1({name:"deck-detail",description:"Render a presentation deck as Reveal.js slides",schema:y90,dataSourceId:"decks:entities",requiredPermission:"public",layout:{component:$H,fullscreen:!0}});l5();J0();var pU=Z.object({decks:Z.array(iY)}),rU=Z.object({decks:Z.array(p7),pageTitle:Z.string().optional()});import{jsxDEV as dU}from"preact/jsx-dev-runtime";var cU=({decks:w,pageTitle:$})=>{let X=w.map((W)=>({id:W.id,url:W.url,title:W.frontmatter.title,date:W.frontmatter.publishedAt??W.created,description:W.frontmatter.description}));return dU("div",{className:"deck-list bg-theme",children:dU("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl py-16 md:py-24",children:dU(V3,{title:$??"Presentations",items:X},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)};J0();class nY extends VX{constructor(){super(pU,{title:"Deck List",mappings:[{key:"decks",label:"Decks",type:"array",itemType:"object"}]})}}var iU=Z1({name:"deck-list",description:"List view of all presentation decks",schema:rU,dataSourceId:"decks:entities",requiredPermission:"public",formatter:new nY,layout:{component:cU}});J0();n0();var m90=Z.object({title:Z.string().max(80).describe("A short, punchy title (2-5 words) that's memorable and evocative"),content:Z.string().describe("Full slide deck content in markdown format with slide separators (---). Each slide should have a header and focused content."),description:Z.string().describe("A concise 1-2 sentence summary that captures the essence of the talk")}),LC=Z1({name:"decks:generation",description:"Template for AI to generate complete slide decks from prompts",schema:m90,dataSourceId:"shell:ai-content",requiredPermission:"public",basePrompt:`You are creating slide decks in a distinctive voice that blends philosophy, technology, and culture.
|
|
932
934
|
|
|
933
935
|
Your task is to generate a complete slide deck based on the user's prompt.
|
|
934
936
|
|
|
@@ -996,12 +998,12 @@ Add your conclusion here`,H=H??`Presentation: ${G}`,await this.reportProgress($,
|
|
|
996
998
|
Note: This presentation is for "${Y}".`:""}`,P=await this.context.ai.generate({prompt:q,templateName:"decks:generation"});G=G??P.title,f=f??P.content,H=H??P.description,await this.reportProgress($,{progress:50,message:`Generated deck: "${G}"`})}else if(!H)await this.reportProgress($,{progress:30,message:"Generating description with AI"}),H=(await this.context.ai.generate({prompt:`Title: ${G}
|
|
997
999
|
|
|
998
1000
|
Content:
|
|
999
|
-
${f}`,templateName:"decks:description"})).description,await this.reportProgress($,{progress:50,message:"Description generated"});else await this.reportProgress($,{progress:50,message:"Using provided content"});if(!G||!f)this.failEarly("Title and content are required");let U={slug:Y5(G),title:G,status:"draft"},A=await E8({entityType:"deck",title:G,deriveId:(M)=>M,regeneratePrompt:"Generate a different presentation deck title on the same topic.",context:this.context});if(A!==G)U.title=A,U.slug=Y5(A);let F={title:U.title,status:U.status,slug:U.slug,description:H,author:W,event:Y},O=Y6(f,F);return{id:A,content:O,metadata:U,title:A,resultExtras:{title:A,slug:U.slug},createOptions:{deduplicateId:!0}}}summarizeDataForLog(w){return{prompt:w.prompt,title:w.title}}}var PC={name:"@brains/decks",private:!0,version:"0.2.0-alpha.
|
|
1001
|
+
${f}`,templateName:"decks:description"})).description,await this.reportProgress($,{progress:50,message:"Description generated"});else await this.reportProgress($,{progress:50,message:"Using provided content"});if(!G||!f)this.failEarly("Title and content are required");let U={slug:Y5(G),title:G,status:"draft"},A=await E8({entityType:"deck",title:G,deriveId:(M)=>M,regeneratePrompt:"Generate a different presentation deck title on the same topic.",context:this.context});if(A!==G)U.title=A,U.slug=Y5(A);let F={title:U.title,status:U.status,slug:U.slug,description:H,author:W,event:Y},O=Y6(f,F);return{id:A,content:O,metadata:U,title:A,resultExtras:{title:A,slug:U.slug},createOptions:{deduplicateId:!0}}}summarizeDataForLog(w){return{prompt:w.prompt,title:w.title}}}var PC={name:"@brains/decks",private:!0,version:"0.2.0-alpha.13",description:"Presentation decks plugin for creating and viewing slide presentations",type:"module",exports:{".":"./src/index.ts"},scripts:{typecheck:"tsc --noEmit",test:"bun test",lint:"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix",eval:"cd evals && bun run brain-eval"},dependencies:{"@brains/image":"workspace:*","@brains/plugins":"workspace:*","@brains/utils":"workspace:*"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"latest","bun-types":"latest",eslint:"^8.56.0",typescript:"^5.3.3"}};class TC extends J6{entityType=r7.entityType;schema=r7.schema;adapter=r7;constructor(){super("decks",PC)}createGenerationHandler(w){return new oU(this.logger.child("DeckGenerationJobHandler"),w)}getTemplates(){return{"deck-detail":lU,"deck-list":iU,generation:LC,description:EC}}getDataSources(){return[new nU(this.logger)]}getEntityTypeConfig(){return{weight:1.5}}async onRegister(w){await this.registerWithPublishPipeline(w),this.subscribeToPublishExecute(w),this.registerEvalHandlers(w),this.logger.info("Decks plugin registered")}async registerWithPublishPipeline(w){await w.messaging.send("publish:register",{entityType:"deck",provider:{name:"internal",publish:async()=>({id:"internal"})}})}subscribeToPublishExecute(w){w.messaging.subscribe("publish:execute",async($)=>{let{entityType:X,entityId:W}=$.payload;if(X!=="deck")return{success:!0};try{let Y=await w.entityService.getEntity("deck",W);if(!Y)return await w.messaging.send("publish:report:failure",{entityType:X,entityId:W,error:`Deck not found: ${W}`}),{success:!0};if(Y.metadata.status==="published")return{success:!0};let J=new Date().toISOString(),G={...Y,metadata:{...Y.metadata,status:"published",publishedAt:J}};await w.entityService.updateEntity({...G,content:this.adapter.toMarkdown(G)}),await w.messaging.send("publish:report:success",{entityType:X,entityId:W,result:{id:W}})}catch(Y){await w.messaging.send("publish:report:failure",{entityType:X,entityId:W,error:y1(Y)})}return{success:!0}})}registerEvalHandlers(w){w.eval.registerHandler("generateDeck",async($)=>{let X=Z.object({prompt:Z.string(),event:Z.string().optional()}).parse($);return w.ai.generate({prompt:`${X.prompt}${X.event?`
|
|
1000
1002
|
|
|
1001
1003
|
Note: This presentation is for "${X.event}".`:""}`,templateName:"decks:generation"})}),w.eval.registerHandler("generateDescription",async($)=>{let X=Z.object({title:Z.string(),content:Z.string()}).parse($);return w.ai.generate({prompt:`Title: ${X.title}
|
|
1002
1004
|
|
|
1003
1005
|
Content:
|
|
1004
|
-
${X.content}`,templateName:"decks:description"})})}}J0();n0();var oY=iw.extend({expertise:Z.array(Z.string()).optional().describe("Skills, domains, areas of focus"),currentFocus:Z.string().optional().describe("What you're currently working on"),availability:Z.string().optional().describe("What you're open to (consulting, speaking, etc.)")}),E6=n5.extend(oY.shape);n0();F4();J0();var p90=new G5;class aY{postsListUrl;decksListUrl;id="professional:homepage-list";name="Homepage List DataSource";description="Fetches profile, blog posts, and presentation decks for homepage";constructor(w,$){this.postsListUrl=w;this.decksListUrl=$}async fetch(w,$,X){let W=X.entityService,[Y,J,G,f]=await Promise.all([i5(W),W.listEntities("post",{limit:20}),W.listEntities("deck",{limit:20}),v6(W)]),H=p90.parseProfileBody(Y,E6),h=J.sort(Iw).slice(0,3).map(z4),U=G.sort(Iw).slice(0,3).map(d7);if(!f.cta)throw Error("CTA not configured in site-info");let A={profile:H,posts:h,decks:U,postsListUrl:this.postsListUrl,decksListUrl:this.decksListUrl,cta:f.cta};return $.parse(A)}}n0();F4();var r90=new G5;class sY{id="professional:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(w,$,X){let W=await i5(X.entityService),J={profile:r90.parseProfileBody(W,E6)};return $.parse(J)}}import{jsxDEV as I1,Fragment as jC}from"preact/jsx-dev-runtime";var aU=({profile:w,posts:$,decks:X,postsListUrl:W,decksListUrl:Y,cta:J})=>{let G=w.tagline||w.description,f=$.map((A)=>({id:A.id,url:A.url,title:A.metadata.title,date:A.metadata.publishedAt||A.created,description:A.frontmatter.excerpt,series:A.frontmatter.seriesName&&A.frontmatter.seriesIndex?{name:A.frontmatter.seriesName,index:A.frontmatter.seriesIndex}:void 0})),H=X.map((A)=>({id:A.id,url:A.url,title:A.frontmatter.title||A.id,date:A.frontmatter.publishedAt??A.created,description:A.frontmatter.description})),h=w.name||"Home",U=w.intro||w.description||G||"Professional site";return I1(jC,{children:[I1(p1,{title:h,description:U,ogType:"website"},void 0,!1,void 0,this),I1("div",{className:"homepage-list bg-theme",children:[I1("header",{className:"hero-bg-pattern relative w-full min-h-[70vh] flex items-end px-6 md:px-12 bg-theme overflow-hidden",children:I1("div",{className:"relative z-10 max-w-6xl mx-auto w-full pb-16 md:pb-24",children:[G&&I1("h1",{className:"text-5xl md:text-6xl lg:text-7xl font-semibold text-heading leading-[1.08] tracking-tight",children:G},void 0,!1,void 0,this),w.intro&&I1(jC,{children:[I1("div",{className:"w-12 border-t border-theme mt-8 mb-6 md:mt-10 md:mb-8"},void 0,!1,void 0,this),I1("p",{className:"text-lg md:text-xl text-theme-muted leading-relaxed max-w-xl md:max-w-lg",children:w.intro},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),I1("div",{className:"section-divider"},void 0,!1,void 0,this),I1("div",{className:"container mx-auto px-6 md:px-12 max-w-5xl py-16 md:py-24",children:[I1("div",{className:"content-section-reveal mb-20 md:mb-32",children:I1(V3,{title:"Essays",items:f,viewAllUrl:W},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.length>0&&I1("div",{className:"content-section-reveal mb-20 md:mb-32",children:I1(V3,{title:"Presentations",items:H,viewAllUrl:Y},void 0,!1,void 0,this)},void 0,!1,void 0,this),(w.description||w.expertise&&w.expertise.length>0)&&I1("div",{className:"content-section-reveal mb-20 md:mb-32",children:I1(V3,{title:"About",viewAllUrl:"/about",variant:"stacked",children:I1("div",{className:"space-y-6",children:[w.description&&I1("p",{className:"text-lg text-theme leading-relaxed",children:w.description},void 0,!1,void 0,this),w.expertise&&w.expertise.length>0&&I1(UH,{tags:w.expertise,variant:"accent",size:"sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I1(WH,{cta:J,variant:"editorial",socialLinks:w.socialLinks},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as K1,Fragment as d90}from"preact/jsx-dev-runtime";var sU=({profile:w})=>{let $=`About ${w.name||"Me"}`,X=w.description||w.intro||"About page",W=w.expertise&&w.expertise.length>0||w.currentFocus||w.availability||w.email||w.website||w.socialLinks&&w.socialLinks.length>0;return K1(d90,{children:[K1(p1,{title:$,description:X,ogType:"profile"},void 0,!1,void 0,this),K1("div",{className:"about-page bg-theme",children:[K1("header",{className:"hero-bg-pattern relative w-full py-16 md:py-24 px-6 md:px-12 bg-theme overflow-hidden",children:K1("div",{className:"relative z-10 max-w-4xl mx-auto",children:[K1("h1",{className:"text-5xl md:text-6xl font-semibold mb-6 text-heading",children:["About ",w.name||"Me"]},void 0,!0,void 0,this),w.description&&K1("p",{className:"text-xl md:text-2xl text-theme-muted leading-relaxed",children:w.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),K1("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl py-12 md:py-16",children:[w.story&&K1("section",{className:"content-section-reveal mb-20 md:mb-28",children:K1(M4,{markdown:w.story},void 0,!1,void 0,this)},void 0,!1,void 0,this),W&&K1("div",{className:"content-section-reveal grid md:grid-cols-2 gap-x-16 gap-y-12",children:[w.expertise&&w.expertise.length>0&&K1("section",{children:[K1("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Expertise"},void 0,!1,void 0,this),K1("ul",{className:"flex flex-wrap gap-3",children:w.expertise.map((Y,J)=>K1("li",{className:g8({variant:"accent",size:"lg"}),children:Y},J,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.currentFocus&&K1("section",{children:[K1("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Current Focus"},void 0,!1,void 0,this),K1("p",{className:"text-lg text-theme leading-relaxed",children:w.currentFocus},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.availability&&K1("section",{children:[K1("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Availability"},void 0,!1,void 0,this),K1("p",{className:"text-lg text-theme leading-relaxed",children:w.availability},void 0,!1,void 0,this)]},void 0,!0,void 0,this),(w.email||w.website||w.socialLinks&&w.socialLinks.length>0)&&K1("section",{children:[K1("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Contact"},void 0,!1,void 0,this),K1("div",{className:"space-y-4",children:[w.email&&K1("p",{className:"text-lg",children:K1("a",{href:`mailto:${w.email}`,className:"text-brand hover:text-brand-dark transition-colors",children:w.email},void 0,!1,void 0,this)},void 0,!1,void 0,this),w.website&&K1("p",{className:"text-lg",children:K1("a",{href:w.website,target:"_blank",rel:"noopener noreferrer",className:"text-brand hover:text-brand-dark transition-colors",children:w.website},void 0,!1,void 0,this)},void 0,!1,void 0,this),w.socialLinks&&w.socialLinks.length>0&&K1("div",{className:"flex flex-wrap gap-4 mt-4",children:w.socialLinks.map((Y,J)=>K1(P2,{href:Y.url,external:!0,variant:"secondary",size:"md",children:Y.label||Y.platform},J,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as B2,Fragment as CC}from"preact/jsx-dev-runtime";var tU=()=>{return B2(CC,{children:[B2(p1,{title:"Thanks for subscribing!",description:"You've successfully subscribed to the newsletter."},void 0,!1,void 0,this),B2("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:B2("div",{className:"text-center max-w-md",children:[B2("div",{className:"text-6xl mb-6",children:"\uD83C\uDF89"},void 0,!1,void 0,this),B2("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Thanks for subscribing!"},void 0,!1,void 0,this),B2("p",{className:"text-lg text-theme-muted mb-8",children:"You'll receive a confirmation email shortly. Check your inbox to confirm your subscription."},void 0,!1,void 0,this),B2(P2,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},eU=()=>{return B2(CC,{children:[B2(p1,{title:"Subscription failed",description:"There was a problem with your subscription."},void 0,!1,void 0,this),B2("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:B2("div",{className:"text-center max-w-md",children:[B2("div",{className:"text-6xl mb-6",children:"\uD83D\uDE22"},void 0,!1,void 0,this),B2("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Something went wrong"},void 0,!1,void 0,this),B2("p",{className:"text-lg text-theme-muted mb-8",children:"We couldn't process your subscription. Please try again or contact us if the problem persists."},void 0,!1,void 0,this),B2(P2,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};J0();var bC=Z.object({label:Z.string().describe("Display label for entity type (e.g., 'Essay')"),pluralName:Z.string().optional().describe("URL path segment (defaults to label.toLowerCase() + 's')")}),IC=Z.object({entityDisplay:Z.object({post:bC,deck:bC}).describe("Display metadata for post and deck entity types (required for homepage)")});var SC={name:"@brains/site-professional",private:!0,version:"0.2.0-alpha.11",description:"Professional site composition package",type:"module",exports:{".":"./src/index.ts"},files:["src"],scripts:{typecheck:"tsc --noEmit",lint:"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix"},dependencies:{"@brains/blog":"workspace:*","@brains/decks":"workspace:*","@brains/identity-service":"workspace:*","@brains/plugins":"workspace:*","@brains/site-builder-plugin":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"latest","bun-types":"latest",eslint:"^8.56.0",typescript:"^5.3.3"}};class wA extends Q4{dependencies=["blog","decks"];constructor(w){super("professional-site",SC,w,IC)}async onRegister(w){w.entities.extendFrontmatterSchema("anchor-profile",oY);let $=this.config.entityDisplay.post,X=this.config.entityDisplay.deck,W=`/${$.pluralName??$.label.toLowerCase()+"s"}`,Y=`/${X.pluralName??X.label.toLowerCase()+"s"}`,J=new aY(W,Y);w.entities.registerDataSource(J);let G=new sY;w.entities.registerDataSource(G);let f=Z.object({profile:E6,posts:Z.array(M5),decks:Z.array(p7),postsListUrl:Z.string(),decksListUrl:Z.string(),cta:u4}),H=Z.object({profile:E6}),h=Z.object({});w.templates.register({"homepage-list":Z1({name:"homepage-list",description:"Professional homepage with essays and presentations",schema:f,dataSourceId:"professional:homepage-list",requiredPermission:"public",layout:{component:aU}}),about:Z1({name:"about",description:"About page with full profile information",schema:H,dataSourceId:"professional:about",requiredPermission:"public",layout:{component:sU}}),"subscribe-thanks":Z1({name:"subscribe-thanks",description:"Newsletter subscription success page",schema:h,requiredPermission:"public",layout:{component:tU}}),"subscribe-error":Z1({name:"subscribe-error",description:"Newsletter subscription error page",schema:h,requiredPermission:"public",layout:{component:eU}})}),this.logger.info("Professional site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function xC(w){return new wA(w??{})}var yC=[{id:"home",path:"/",title:"Home",description:"Professional site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"professional-site:homepage-list",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"professional-site:about",dataQuery:{}}]},{id:"subscribe-thanks",path:"/subscribe/thanks",title:"Thanks for subscribing",description:"Newsletter subscription confirmation",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-thanks",template:"professional-site:subscribe-thanks",dataQuery:{},content:{}}]},{id:"subscribe-error",path:"/subscribe/error",title:"Subscription failed",description:"Newsletter subscription error",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-error",template:"professional-site:subscribe-error",dataQuery:{},content:{}}]}];import{jsxDEV as _9}from"preact/jsx-dev-runtime";function mC({sections:w,siteInfo:$,slots:X}){return _9("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[_9(m8,{title:$.title,navigation:$.navigation.primary,...$.logo!==void 0?{logo:$.logo}:{}},void 0,!1,void 0,this),_9("main",{className:"flex-grow flex flex-col bg-theme",children:w},void 0,!1,void 0,this),_9("div",{className:"section-divider"},void 0,!1,void 0,this),_9(JH,{primaryNavigation:$.navigation.primary,secondaryNavigation:$.navigation.secondary,copyright:$.copyright,socialLinks:$.socialLinks,children:_9(SU,{name:"footer-top",slots:X},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}export{uU as routes,xC as professionalSitePlugin,yC as professionalRoutes,vC as personalSitePlugin,uU as personalRoutes,mC as ProfessionalLayout,kC as PersonalLayout};
|
|
1006
|
+
${X.content}`,templateName:"decks:description"})})}}J0();n0();var oY=iw.extend({expertise:Z.array(Z.string()).optional().describe("Skills, domains, areas of focus"),currentFocus:Z.string().optional().describe("What you're currently working on"),availability:Z.string().optional().describe("What you're open to (consulting, speaking, etc.)")}),E6=n5.extend(oY.shape);n0();F4();J0();var p90=new G5;class aY{postsListUrl;decksListUrl;id="professional:homepage-list";name="Homepage List DataSource";description="Fetches profile, blog posts, and presentation decks for homepage";constructor(w,$){this.postsListUrl=w;this.decksListUrl=$}async fetch(w,$,X){let W=X.entityService,[Y,J,G,f]=await Promise.all([i5(W),W.listEntities("post",{limit:20}),W.listEntities("deck",{limit:20}),v6(W)]),H=p90.parseProfileBody(Y,E6),h=J.sort(Iw).slice(0,3).map(z4),U=G.sort(Iw).slice(0,3).map(d7);if(!f.cta)throw Error("CTA not configured in site-info");let A={profile:H,posts:h,decks:U,postsListUrl:this.postsListUrl,decksListUrl:this.decksListUrl,cta:f.cta};return $.parse(A)}}n0();F4();var r90=new G5;class sY{id="professional:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(w,$,X){let W=await i5(X.entityService),J={profile:r90.parseProfileBody(W,E6)};return $.parse(J)}}import{jsxDEV as I1,Fragment as jC}from"preact/jsx-dev-runtime";var aU=({profile:w,posts:$,decks:X,postsListUrl:W,decksListUrl:Y,cta:J})=>{let G=w.tagline||w.description,f=$.map((A)=>({id:A.id,url:A.url,title:A.metadata.title,date:A.metadata.publishedAt||A.created,description:A.frontmatter.excerpt,series:A.frontmatter.seriesName&&A.frontmatter.seriesIndex?{name:A.frontmatter.seriesName,index:A.frontmatter.seriesIndex}:void 0})),H=X.map((A)=>({id:A.id,url:A.url,title:A.frontmatter.title||A.id,date:A.frontmatter.publishedAt??A.created,description:A.frontmatter.description})),h=w.name||"Home",U=w.intro||w.description||G||"Professional site";return I1(jC,{children:[I1(p1,{title:h,description:U,ogType:"website"},void 0,!1,void 0,this),I1("div",{className:"homepage-list bg-theme",children:[I1("header",{className:"hero-bg-pattern relative w-full min-h-[70vh] flex items-end px-6 md:px-12 bg-theme overflow-hidden",children:I1("div",{className:"relative z-10 max-w-6xl mx-auto w-full pb-16 md:pb-24",children:[G&&I1("h1",{className:"text-5xl md:text-6xl lg:text-7xl font-semibold text-heading leading-[1.08] tracking-tight",children:G},void 0,!1,void 0,this),w.intro&&I1(jC,{children:[I1("div",{className:"w-12 border-t border-theme mt-8 mb-6 md:mt-10 md:mb-8"},void 0,!1,void 0,this),I1("p",{className:"text-lg md:text-xl text-theme-muted leading-relaxed max-w-xl md:max-w-lg",children:w.intro},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),I1("div",{className:"section-divider"},void 0,!1,void 0,this),I1("div",{className:"container mx-auto px-6 md:px-12 max-w-5xl py-16 md:py-24",children:[I1("div",{className:"content-section-reveal mb-20 md:mb-32",children:I1(V3,{title:"Essays",items:f,viewAllUrl:W},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.length>0&&I1("div",{className:"content-section-reveal mb-20 md:mb-32",children:I1(V3,{title:"Presentations",items:H,viewAllUrl:Y},void 0,!1,void 0,this)},void 0,!1,void 0,this),(w.description||w.expertise&&w.expertise.length>0)&&I1("div",{className:"content-section-reveal mb-20 md:mb-32",children:I1(V3,{title:"About",viewAllUrl:"/about",variant:"stacked",children:I1("div",{className:"space-y-6",children:[w.description&&I1("p",{className:"text-lg text-theme leading-relaxed",children:w.description},void 0,!1,void 0,this),w.expertise&&w.expertise.length>0&&I1(UH,{tags:w.expertise,variant:"accent",size:"sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I1(WH,{cta:J,variant:"editorial",socialLinks:w.socialLinks},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as K1,Fragment as d90}from"preact/jsx-dev-runtime";var sU=({profile:w})=>{let $=`About ${w.name||"Me"}`,X=w.description||w.intro||"About page",W=w.expertise&&w.expertise.length>0||w.currentFocus||w.availability||w.email||w.website||w.socialLinks&&w.socialLinks.length>0;return K1(d90,{children:[K1(p1,{title:$,description:X,ogType:"profile"},void 0,!1,void 0,this),K1("div",{className:"about-page bg-theme",children:[K1("header",{className:"hero-bg-pattern relative w-full py-16 md:py-24 px-6 md:px-12 bg-theme overflow-hidden",children:K1("div",{className:"relative z-10 max-w-4xl mx-auto",children:[K1("h1",{className:"text-5xl md:text-6xl font-semibold mb-6 text-heading",children:["About ",w.name||"Me"]},void 0,!0,void 0,this),w.description&&K1("p",{className:"text-xl md:text-2xl text-theme-muted leading-relaxed",children:w.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),K1("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl py-12 md:py-16",children:[w.story&&K1("section",{className:"content-section-reveal mb-20 md:mb-28",children:K1(M4,{markdown:w.story},void 0,!1,void 0,this)},void 0,!1,void 0,this),W&&K1("div",{className:"content-section-reveal grid md:grid-cols-2 gap-x-16 gap-y-12",children:[w.expertise&&w.expertise.length>0&&K1("section",{children:[K1("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Expertise"},void 0,!1,void 0,this),K1("ul",{className:"flex flex-wrap gap-3",children:w.expertise.map((Y,J)=>K1("li",{className:g8({variant:"accent",size:"lg"}),children:Y},J,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.currentFocus&&K1("section",{children:[K1("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Current Focus"},void 0,!1,void 0,this),K1("p",{className:"text-lg text-theme leading-relaxed",children:w.currentFocus},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.availability&&K1("section",{children:[K1("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Availability"},void 0,!1,void 0,this),K1("p",{className:"text-lg text-theme leading-relaxed",children:w.availability},void 0,!1,void 0,this)]},void 0,!0,void 0,this),(w.email||w.website||w.socialLinks&&w.socialLinks.length>0)&&K1("section",{children:[K1("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Contact"},void 0,!1,void 0,this),K1("div",{className:"space-y-4",children:[w.email&&K1("p",{className:"text-lg",children:K1("a",{href:`mailto:${w.email}`,className:"text-brand hover:text-brand-dark transition-colors",children:w.email},void 0,!1,void 0,this)},void 0,!1,void 0,this),w.website&&K1("p",{className:"text-lg",children:K1("a",{href:w.website,target:"_blank",rel:"noopener noreferrer",className:"text-brand hover:text-brand-dark transition-colors",children:w.website},void 0,!1,void 0,this)},void 0,!1,void 0,this),w.socialLinks&&w.socialLinks.length>0&&K1("div",{className:"flex flex-wrap gap-4 mt-4",children:w.socialLinks.map((Y,J)=>K1(P2,{href:Y.url,external:!0,variant:"secondary",size:"md",children:Y.label||Y.platform},J,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as B2,Fragment as CC}from"preact/jsx-dev-runtime";var tU=()=>{return B2(CC,{children:[B2(p1,{title:"Thanks for subscribing!",description:"You've successfully subscribed to the newsletter."},void 0,!1,void 0,this),B2("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:B2("div",{className:"text-center max-w-md",children:[B2("div",{className:"text-6xl mb-6",children:"\uD83C\uDF89"},void 0,!1,void 0,this),B2("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Thanks for subscribing!"},void 0,!1,void 0,this),B2("p",{className:"text-lg text-theme-muted mb-8",children:"You'll receive a confirmation email shortly. Check your inbox to confirm your subscription."},void 0,!1,void 0,this),B2(P2,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},eU=()=>{return B2(CC,{children:[B2(p1,{title:"Subscription failed",description:"There was a problem with your subscription."},void 0,!1,void 0,this),B2("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:B2("div",{className:"text-center max-w-md",children:[B2("div",{className:"text-6xl mb-6",children:"\uD83D\uDE22"},void 0,!1,void 0,this),B2("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Something went wrong"},void 0,!1,void 0,this),B2("p",{className:"text-lg text-theme-muted mb-8",children:"We couldn't process your subscription. Please try again or contact us if the problem persists."},void 0,!1,void 0,this),B2(P2,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};J0();var bC=Z.object({label:Z.string().describe("Display label for entity type (e.g., 'Essay')"),pluralName:Z.string().optional().describe("URL path segment (defaults to label.toLowerCase() + 's')")}),IC=Z.object({entityDisplay:Z.object({post:bC,deck:bC}).describe("Display metadata for post and deck entity types (required for homepage)")});var SC={name:"@brains/site-professional",private:!0,version:"0.2.0-alpha.13",description:"Professional site composition package",type:"module",exports:{".":"./src/index.ts"},files:["src"],scripts:{typecheck:"tsc --noEmit",lint:"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix"},dependencies:{"@brains/blog":"workspace:*","@brains/decks":"workspace:*","@brains/identity-service":"workspace:*","@brains/plugins":"workspace:*","@brains/site-builder-plugin":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"latest","bun-types":"latest",eslint:"^8.56.0",typescript:"^5.3.3"}};class wA extends Q4{dependencies=["blog","decks"];constructor(w){super("professional-site",SC,w,IC)}async onRegister(w){w.entities.extendFrontmatterSchema("anchor-profile",oY);let $=this.config.entityDisplay.post,X=this.config.entityDisplay.deck,W=`/${$.pluralName??$.label.toLowerCase()+"s"}`,Y=`/${X.pluralName??X.label.toLowerCase()+"s"}`,J=new aY(W,Y);w.entities.registerDataSource(J);let G=new sY;w.entities.registerDataSource(G);let f=Z.object({profile:E6,posts:Z.array(M5),decks:Z.array(p7),postsListUrl:Z.string(),decksListUrl:Z.string(),cta:u4}),H=Z.object({profile:E6}),h=Z.object({});w.templates.register({"homepage-list":Z1({name:"homepage-list",description:"Professional homepage with essays and presentations",schema:f,dataSourceId:"professional:homepage-list",requiredPermission:"public",layout:{component:aU}}),about:Z1({name:"about",description:"About page with full profile information",schema:H,dataSourceId:"professional:about",requiredPermission:"public",layout:{component:sU}}),"subscribe-thanks":Z1({name:"subscribe-thanks",description:"Newsletter subscription success page",schema:h,requiredPermission:"public",layout:{component:tU}}),"subscribe-error":Z1({name:"subscribe-error",description:"Newsletter subscription error page",schema:h,requiredPermission:"public",layout:{component:eU}})}),this.logger.info("Professional site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function xC(w){return new wA(w??{})}var yC=[{id:"home",path:"/",title:"Home",description:"Professional site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"professional-site:homepage-list",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"professional-site:about",dataQuery:{}}]},{id:"subscribe-thanks",path:"/subscribe/thanks",title:"Thanks for subscribing",description:"Newsletter subscription confirmation",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-thanks",template:"professional-site:subscribe-thanks",dataQuery:{},content:{}}]},{id:"subscribe-error",path:"/subscribe/error",title:"Subscription failed",description:"Newsletter subscription error",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-error",template:"professional-site:subscribe-error",dataQuery:{},content:{}}]}];import{jsxDEV as _9}from"preact/jsx-dev-runtime";function mC({sections:w,siteInfo:$,slots:X}){return _9("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[_9(m8,{title:$.title,navigation:$.navigation.primary,...$.logo!==void 0?{logo:$.logo}:{}},void 0,!1,void 0,this),_9("main",{className:"flex-grow flex flex-col bg-theme",children:w},void 0,!1,void 0,this),_9("div",{className:"section-divider"},void 0,!1,void 0,this),_9(JH,{primaryNavigation:$.navigation.primary,secondaryNavigation:$.navigation.secondary,copyright:$.copyright,socialLinks:$.socialLinks,children:_9(SU,{name:"footer-top",slots:X},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}export{uU as routes,xC as professionalSitePlugin,yC as professionalRoutes,vC as personalSitePlugin,uU as personalRoutes,mC as ProfessionalLayout,kC as PersonalLayout};
|
|
1005
1007
|
|
|
1006
|
-
//# debugId=
|
|
1008
|
+
//# debugId=938BB5E50F32195164756E2164756E21
|
|
1007
1009
|
//# sourceMappingURL=site.js.map
|