1import{j as e,X as Se,S as Pe,C as Ie,b as De,c as Fe,H as oe,d as b,B as v,L as B,A as ne,u as Te,e as ze,f as Le,g as Ae,r as p,h as P,i as Ee,k as re,l as J,s as K,m as qe,n as Ge,P as ie,v as Re,o as Z,p as ee,q as He,E as Ke,t as Be,I as le,w as $e,x as Qe,y as Oe,z as de}from"./index-DL0d_lAK.js";import{u as H}from"./useMutation-D_ZYaUMO.js";import{c as te}from"./upload-DGmusEJv.js";import{d as Ue,P as We,w as Me}from"./PostDialog-DdRtyTJW.js";import{p as Ve,c as Ye,a as Xe}from"./BestTimeChips-DKGbKGbB.js";import{F as Je}from"./FirstPosts-1qzqH7db.js";import{u as Ze,C as et,S as tt}from"./ComingSoonChannels-CLXhiAGO.js";import{F as st}from"./filter-select-BrIOUJFK.js";import{t as se,u as at,a as ot,b as nt,c as rt,r as it,d as lt,g as dt,G as ct,R as ae,P as ut,A as mt,e as pt}from"./GrowthTaskDialog-DuQZ72A7.js";import{T as gt}from"./tooltip-DE3ztT2v.js";import{I as xt}from"./info-Dh3CvvvX.js";import{U as ht}from"./user-plus-DV_MbM1V.js";import{F as ft,a as bt,b as wt}from"./fan-deck-AGI8ZwYp.js";import{P as yt}from"./PageHeader-C6rx3uss.js";import{I as jt}from"./InstagramConnect-B0_E5wPE.js";import{u as vt,c as kt,i as Nt,s as Ct}from"./growthMath-X7q6xDst.js";import{u as _t}from"./useBrandAssets-BgjUMr2B.js";import{B as St}from"./building-2-CQswwx2O.js";import{G as Pt}from"./gallery-horizontal-end-CjDJGEBk.js";import{L as It}from"./list-BpKExd-V.js";import{C as Dt}from"./clock-NU_a80La.js";import{C as Ft}from"./copy-Cw_kODYa.js";import{P as Tt}from"./pencil-C2hosQyU.js";import{T as zt}from"./trash-2-DHhGh4SX.js";import"./compose-DOjjQ7ye.js";import"./useCreditPrice-BF5NDqiX.js";import"./useImageModels-D1B3HlzB.js";import"./input-BZVgYfh9.js";import"./InstagramPreview-DnJAVGZO.js";import"./refresh-cw-D6LjrvwT.js";import"./chevron-left-D7Y-UJRg.js";import"./chevron-right-Bnb0q334.js";import"./renderImage-BWv-M-n1.js";import"./MediaLibraryDialog-Di896w4t.js";import"./card-DnGeKDac.js";import"./sparkle-C-SzCLEl.js";import"./image-plus-C46YF3W0.js";import"./EmptyState-BWePa1hl.js";import"./list-filter-CGqFwn1t.js";import"./upload-CRc1gxYv.js";import"./star-wjux-bxy.js";import"./external-link-Dcz4p2aP.js";import"./download-fXEMRr1g.js";import"./type-BewEBZ4p.js";import"./settings-2-DdEblyGZ.js";import"./carousel-BSHhh02V.js";import"./play-DYt6T6WR.js";import"./select-DCy2S0v2.js";import"./chip-BlU4hIu0.js";import"./file-upload-BLNZQkWD.js";import"./ModelPicker-CtRKTCqa.js";import"./scroll-row-4D5ytrZp.js";import"./chevron-down-CIYFcfTQ.js";import"./textTags-BjQI4wYd.js";import"./pen-line-C2Hn2z6G.js";import"./font-picker-gaR7P3mg.js";import"./ring-DOI_kVyQ.js";import"./lightbulb-C5M0oYT_.js";import"./facebook-BbOQPb3V.js";import"./SectionLayout-C49x_sxr.js";import"./useCalendar-BBK-uIN_.js";import"./wizard-steps-CJsUeFyd.js";import"./igOauth-BKYGYQLv.js";const Lt={like:oe,comment:Fe,follow:ht},At="A growth task: a short round of real engagement on accounts we picked for your niche, done by you in Instagram. Likes, comments and follows, up to three rounds a day.",Et={like:"A like on a post from your niche tells Instagram who your account belongs next to, and puts your name in front of people who already care.",comment:"A real comment is the strongest signal there is: the account sees you, their followers see you, and the algorithm counts the conversation.",follow:"Following the right accounts shapes what Instagram shows you and who it shows you to. Letting go of the ones that never followed back keeps the ratio healthy."};function qt(s){return s<=0?{x:-365,scale:.96,opacity:1,z:50}:{x:-365,scale:.5,opacity:0,z:0}}function Gt({state:s,task:a,left:o=0,active:i,onStart:l,onDismiss:n,onMore:r}){if(!s)return null;const d=(a==null?void 0:a.type)??"like",m=s==="done"||s==="capped"?Ie:s==="start"?De:Lt[d]??oe,{x:h,scale:g,opacity:k,z:y}=qt(i),f=k===0,x=!f&&s==="open";return e.jsxs("div",{role:x?"button":void 0,tabIndex:x?0:-1,"aria-hidden":f,"aria-label":s==="open"?`Start today's growth task: ${se(a)}`:"Growth task",onClick:x?l:void 0,onKeyDown:x?c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),l())}:void 0,className:b("absolute top-[260px] w-[300px] rounded-2xl border border-border bg-card p-6 text-center shadow-[0_18px_36px_-18px_rgb(28_27_25/0.4)] transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",f?"pointer-events-none":x?"cursor-pointer hover:shadow-menu":""),style:{left:"50%",zIndex:y,opacity:k,transform:`translateX(calc(-50% + ${h}px)) translateY(-50%) scale(${g})`},children:[e.jsx("span",{className:"absolute left-4 top-3.5 text-[10px] font-semibold uppercase tracking-[0.14em] text-muted-foreground",children:"Growth task"}),e.jsxs("div",{className:"absolute right-3 top-3 flex items-center gap-1",children:[e.jsx(gt,{label:"What is this?",detail:`${At} ${Et[d]}`,cost:null,side:"top",align:"end",children:e.jsx("button",{type:"button","aria-label":"What is a growth task",onClick:c=>c.stopPropagation(),className:"grid h-6 w-6 place-items-center rounded-full text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:e.jsx(xt,{size:15})})}),(s==="done"||s==="capped")&&n&&e.jsx("button",{type:"button","aria-label":"Dismiss for today",onClick:c=>{c.stopPropagation(),n()},className:"grid h-6 w-6 place-items-center rounded-full text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:e.jsx(Se,{size:15})})]}),e.jsx("span",{className:b("mx-auto grid h-12 w-12 place-items-center rounded-full",s==="done"||s==="capped"?"bg-emerald-500/10 text-emerald-600":"bg-secondary text-foreground"),children:s==="working"?e.jsx(Pe,{className:"h-5 w-5"}):e.jsx(m,{size:22})}),s==="start"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-5 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground",children:"Today"}),e.jsx("p",{className:"mt-1 text-base font-semibold",children:"A round of real engagement"}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:"Accounts picked for your niche, done by you in Instagram. Under a minute, free."}),e.jsx(v,{variant:"default",className:"mt-5 w-full rounded-full",onClick:c=>{c.stopPropagation(),r==null||r()},children:"Give me today's tasks"})]}),s==="working"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-5 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground",children:"Working"}),e.jsx("p",{className:"mt-1 text-base font-semibold",children:"Picking today's accountsâ¦"}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:"When your list runs low we find new accounts first. Up to a minute."})]}),s==="open"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-5 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground",children:"Today"}),e.jsx("p",{className:"mt-1 text-base font-semibold",children:se(a)}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:"Less than a minute, all in Instagram. It is what moves reach between posts."}),e.jsx(v,{variant:"default",className:"mt-5 w-full rounded-full",tabIndex:-1,
1children:"Start"})]}),s==="done"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-5 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground",children:"Today"}),e.jsx("p",{className:"mt-1 text-base font-semibold",children:"Round done"}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:o===1?"One more round left today.":`${o} more rounds left today.`}),e.jsx(v,{variant:"outline",className:"mt-5 w-full rounded-full",onClick:c=>{c.stopPropagation(),r==null||r()},children:"Give me more"})]}),s==="capped"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-5 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground",children:"Today"}),e.jsx("p",{className:"mt-1 text-base font-semibold",children:"That's plenty for today"}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:"Come back tomorrow for more actions to lift your account."})]})]})}function Rt({brandId:s}){const{data:a}=_t(s),{data:o=[]}=vt(s);if((a==null?void 0:a.status)!=="connected"||!o.length)return null;const i=kt(o,"followers"),l=o[o.length-1].following,n=Nt(o,"30d").map(m=>m.followers),r=i.delta>0,d=i.delta<0;return e.jsxs(B,{to:"/analytics#followers",className:"group block w-48 shrink-0 rounded-2xl border border-border bg-card p-3 transition-shadow hover:shadow-pill focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsxs("div",{className:"flex items-center justify-between text-[13px] font-semibold leading-tight",children:["Followers",e.jsx(ne,{size:11,className:"text-muted-foreground transition-transform group-hover:translate-x-0.5"})]}),e.jsxs("div",{className:"mt-1 flex items-end justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-xl font-bold tabular-nums leading-none",children:i.current.toLocaleString()}),i.delta!=null&&i.delta!==0&&e.jsxs("span",{className:b("text-[11px] font-semibold tabular-nums",r&&"text-green-700 dark:text-green-400",d&&"text-red-700 dark:text-red-400"),title:"Change over the last 7 days",children:[r?"â²":"â¼"," ",Ct(i.delta).replace("-","")]})]}),e.jsxs("div",{className:"mt-1 text-[11px] text-muted-foreground tabular-nums",children:[l.toLocaleString()," following",i.previous==null?" · tracking started":""]})]}),e.jsx(Ht,{values:n})]})]})}function Ht({values:s}){if(!s.length)return null;const l=Math.min(...s),n=Math.max(...s),r=m=>n===l?24/2:3+(1-(m-l)/(n-l))*(24-2*3),d=m=>s.length===1?53:3+m/(s.length-1)*(56-2*3);return e.jsxs("svg",{width:56,height:24,viewBox:"0 0 56 24",className:"shrink-0 text-brand","aria-hidden":"true",children:[s.length>1&&e.jsx("polyline",{points:s.map((m,h)=>`${d(h)},${r(m)}`).join(" "),fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:d(s.length-1),cy:r(s[s.length-1]),r:"3",fill:"currentColor"})]})}const Kt=["all","draft","scheduled","published","failed"],Bt=s=>new Date(s.scheduled_at??s.published_at??s.created_at).toLocaleDateString(void 0,{month:"short",day:"numeric"});function I(s,a,o){return re({queryKey:["dash-mini",s,o],enabled:!!o,queryFn:async()=>de(await K.from(s).select(a).eq("brand_id",o).order("created_at",{ascending:!1}))})}function D({to:s,label:a,items:o,thumb:i}){const l=(o??[]).map(i).filter(Boolean).slice(0,3),n=Math.max(0,((o==null?void 0:o.length)??0)-l.length);return e.jsxs(B,{to:s,className:"group block w-40 shrink-0 rounded-2xl border border-border bg-card p-3 transition-shadow hover:shadow-pill focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx("div",{className:"text-[13px] font-semibold leading-tight",children:a}),e.jsxs("div",{className:"text-[11px] text-muted-foreground",children:["Manage ",e.jsx(ne,{size:10,className:"inline align-[-1px] transition-transform group-hover:translate-x-0.5"})]}),e.jsxs("div",{className:"mt-2 flex h-7 items-center",children:[l.length===0?e.jsx("span",{className:"grid h-7 w-7 place-items-center rounded-lg border border-dashed border-input text-muted-foreground",children:e.jsx(ie,{size:12})}):l.map((r,d)=>e.jsx(le,{src:r,alt:"",className:b("h-7 w-7 rounded-lg bg-background object-cover ring-2 ring-card",d>
10&&"-ml-2"),style:{zIndex:l.length-d}},d)),n>0&&e.jsxs("span",{className:"ml-1.5 rounded-full bg-background px-1.5 py-0.5 text-[10px] font-semibold text-muted-foreground",children:["+",n]})]})]})}const $t=s=>{var a;return s.image_url??(Array.isArray(s.slides)?(a=s.slides.find(o=>o==null?void 0:o.image_url))==null?void 0:a.image_url:null)};function Qt({post:s,focused:a,neighbor:o,menuItems:i,onFocus:l}){const n=$t(s);return e.jsxs("div",{className:b("relative rounded-2xl border border-border bg-card transition-shadow",a&&"shadow-menu",o&&"shadow-[0_18px_36px_-18px_rgb(28_27_25/0.4)]"),children:[e.jsxs("div",{className:"relative aspect-[4/5] overflow-hidden rounded-t-2xl bg-background",children:[n?e.jsx(le,{src:n,alt:"",className:"h-full w-full object-cover",draggable:!1}):e.jsx("div",{className:"grid h-full place-items-center text-muted-foreground text-sm",children:"No image"}),s.type==="carousel"&&e.jsx("span",{title:"Carousel",className:"absolute left-2 top-2 grid h-6 w-6 place-items-center rounded-full bg-ink/60 text-white backdrop-blur",children:e.jsx($e,{size:13})})]}),e.jsxs("div",{className:"absolute right-2 top-2 z-10 flex items-center gap-1.5",children:[e.jsxs("span",{className:"inline-flex h-[22px] items-center gap-1.5 rounded-full bg-card/90 px-2 text-[10px] font-bold uppercase tracking-wide text-foreground shadow-sm backdrop-blur",children:[e.jsx("span",{className:b("h-1.5 w-1.5 rounded-full",Qe(s.status))})," ",s.status]}),e.jsx("div",{onClickCapture:a?void 0:r=>{r.stopPropagation(),l()},onClick:r=>r.stopPropagation(),children:e.jsx(Oe,{label:"Post actions",items:i,iconSize:14,triggerClassName:"h-[22px] w-[22px] bg-card/90 text-foreground shadow-sm backdrop-blur hover:bg-card"})})]}),e.jsxs("div",{className:"p-3 pt-2.5",children:[e.jsx("p",{className:"line-clamp-1 text-[12px] leading-snug text-muted-foreground",dir:"auto",children:s.caption||"(no caption)"}),e.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground",children:Bt(s)})]})]})}function Ot({posts:s,onOpen:a,menuFor:o,onCreate:i,growth:l}){return e.jsx(wt,{items:s,onOpen:a,onCreate:i,before:n=>e.jsx(Gt,{...l,active:n}),renderCard:(n,{focused:r,neighbor:d,onFocus:m})=>e.jsx(Qt,{post:n,focused:r,neighbor:d,menuItems:o(n),onFocus:m})})}const Ut=()=>e.jsx(ft,{}),Wt=({onCreate:s})=>e.jsx(bt,{onCreate:s});function aa(){const{activeBrand:s,activeBrandId:a,isLoading:o,readOnly:i}=Te(),{openCreate:l}=ze()??{},n=Le(),r=Ae(),[d,m]=p.useState(()=>localStorage.getItem("dash-view")??"deck"),h=t=>{m(t),localStorage.setItem("dash-view",t)},[g,k]=p.useState("all"),[y,f]=p.useState(null),x=at(),c=x.data??[],F=x.isSuccess&&!x.isFetching,N=ot(),T=nt(c,N),$=rt(c,N),z=it(c,N),L=lt(),C=`growth-done-dismissed:${a}:${N}`,[ce,A]=p.useState(()=>{try{return localStorage.getItem(C)==="1"}catch{return!1}});p.useEffect(()=>{try{A(localStorage.getItem(C)==="1")}catch{A(!1)}},[C]);const ue=()=>{try{localStorage.setItem(C,"1")}catch{}A(!0)},me=dt({ready:F&&!i&&(s==null?void 0:s.growth_enabled)!==!1,working:L.isPending,due:T,rounds:z,finished:$,dismissed:ce}),[_,w]=p.useState(null),j=_?c.find(t=>t.id===_.id)??null:null;p.useEffect(()=>{_&&F&&!j&&(w(null),P("That task was refreshed; open it again."))},[_,j,F]);const Q=t=>L.mutate(void 0,{onSuccess:u=>{u!=null&&u.task_id?t&&w({id:u.task_id}):(t&&w(null),P(pt(u==null?void 0:u.reason)))}}),[O,S]=p.useState(null),[U,pe]=p.useState(()=>Ee()),[E,ge]=p.useState(()=>localStorage.getItem("cal-hide-holidays")==="1"),W=()=>ge(t=>(localStorage.setItem("cal-hide-holidays",t?"0":"1"),!t)),{data:q=[],isPending:xe,isError:he,refetch:fe}=re({queryKey:["dash-creations",a],enabled:!!a,queryFn:async()=>de(await K.from("posts").select("*").eq("brand_id",a).order("created_at",{ascending:!1}).limit(20))}),M=p.useMemo(()=>g==="all"?q:q.filter(t=>t.status===g),[q,g]),be=Ze(s),we=I("brand_voices","id,name,avatar_url,created_at",a),ye=I("products","id,primary_image_url,created_at",a),je=I("knowledge_items","id,url,created_at",a),ve=I("competitors","id,website,created_at",a),V=H({mutationFn:async t=>{const u=t.image_url?await te(t.image_url,a):null;let Y=null;t.type==="carousel"&&Array.isArray(t.slides)&&(Y=await Promise.all(t.slides.map(async R=>({...R,image_url:R.image_url?await te(R.image_url,a):null}))));const{error:X}=await K.from("posts").insert({brand_id:a,type:t.type??"post",caption:t.caption??"",image_url:u,slides:Y,image_prompt:t.image_prompt??null,status:"draft",generation_input:t.generation_input??null});if(X)throw X},onSuccess:()=>{P("Duplicated as a draft."),n.invalidateQueries({queryKey:["dash-creations",a]}),n.invalidateQueries({queryKey:["posts",a]})},onError:t=>J(t)}),ke=H({mutationFn:t=>Ue(t),onSuccess:()=>{n.invalidateQueries({queryKey:["dash-creations",a]}),n.invalidateQueries({queryKey:["posts",a]}),n.invalidateQueries({queryKey:["calendar",a]})},onError:t=>J(t)}),Ne=t=>{confirm("Delete this creation? This cannot be undone.")&&ke.mutate(t)},Ce=H({mutationFn:t=>qe("publish-instagram",{post_id:t}),onSuccess:t=>{P(Ve(t)),n.invalidateQueries({queryKey:["dash-creations",a]}),n.invalidateQueries({queryKey:["posts",a]}),n.invalidateQueries({queryKey:["calendar",a]})}}),_e=t=>{const u=[{icon:Ke,label:t.status==="published"?"Preview":"Preview / edit",onClick:()=>S(t)}];
1return i||(t.status!=="published"&&t.status!=="publishing"&&u.unshift({icon:Be,label:"Publish now",hint:"Posts to Instagram immediately",onClick:()=>{confirm("Publish this post to Instagram now?")&&Ce.mutate(t.id)}},{icon:Dt,label:t.status==="scheduled"?"Re-schedule":"Schedule",hint:t.status==="scheduled"?Me(t.scheduled_at):void 0,onClick:()=>S(t)}),Ye(t)&&u.push({icon:Ft,label:"Duplicate as draft",disabled:V.isPending,onClick:()=>V.mutate(t)}),t.ig_permalink&&u.push({icon:Tt,label:"View on Instagram",onClick:()=>window.open(t.ig_permalink,"_blank","noopener")}),Xe(t)&&u.push({icon:zt,label:"Delete",hint:"Cannot be undone",onClick:()=>Ne(t)})),u};if(o)return e.jsx("p",{className:"text-muted-foreground",children:"Loadingâ¦"});if(!s)return e.jsxs("div",{className:"max-w-xl",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-extrabold tracking-tight",children:"Welcome"}),e.jsx("p",{className:"text-muted-foreground mt-6 mb-6",children:"Create your first brand to start generating posts."}),e.jsx(v,{asChild:!0,variant:"brand",size:"lg",children:e.jsxs(B,{to:"/brand",children:[e.jsx(St,{size:18})," Create a brand"]})})]});const G=t=>b("grid h-9 w-9 place-items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",d===t?"bg-primary text-primary-foreground shadow-pill":"text-muted-foreground hover:bg-card hover:text-foreground");return e.jsxs("div",{children:[e.jsx(yt,{title:e.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[e.jsx(Ge,{brand:s,size:28}),e.jsx("span",{className:"truncate",children:s.name})]}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(jt,{brandId:s.id,compact:!0}),e.jsx(et,{})]})}),e.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-4",children:[e.jsx("p",{className:"max-w-5xl flex-1 basis-[42rem] text-muted-foreground line-clamp-2",children:s.description}),!i&&e.jsxs(v,{variant:"brand",className:"v2-breathe w-[170px] shrink-0",onClick:()=>l(),children:[e.jsx(ie,{size:16})," Create"]})]}),e.jsxs("div",{className:"mb-6 flex flex-wrap items-center gap-3",children:[e.jsx(tt,{progress:be,align:"start",onPick:t=>t.to?r(t.to):r("/brand",{state:{focusPanel:t.panel}})}),e.jsx(D,{to:"/voices",label:"Brand Voices",items:we.data,thumb:Re}),e.jsx(D,{to:"/products",label:"Products",items:ye.data,thumb:t=>t.primary_image_url}),e.jsx(D,{to:"/knowledge",label:"Sources",items:je.data,thumb:t=>t.url?Z(ee(t.url)):null}),e.jsx(D,{to:"/competitors",label:"Competitors",items:ve.data,thumb:t=>t.website?Z(ee(t.website)):null}),e.jsx(Rt,{brandId:s.id}),e.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[e.jsx(st,{className:"mb-0",label:"Filter by status",value:g,onChange:k,options:Kt.map(t=>({value:t,label:t==="all"?"All":t[0].toUpperCase()+t.slice(1)})),extraItems:d==="deck"?[]:[{label:E?"Show holidays":"Hide holidays",hint:"Holiday + commercial dates",active:E,onClick:W}]}),e.jsx("button",{type:"button",title:"Recent creations",onClick:()=>h("deck"),className:G("deck"),children:e.jsx(Pt,{size:16})}),e.jsx("button",{type:"button",title:"List",onClick:()=>h("list"),className:G("list"),children:e.jsx(It,{size:16})}),e.jsx("button",{type:"button",title:"Calendar",onClick:()=>h("calendar"),className:G("calendar"),children:e.jsx(He,{size:16})})]})]}),j&&e.jsx(ct,{task:j,tasks:c,onClose:()=>w(null),onMore:z<ae?()=>Q(!0):void 0,moreBusy:L.isPending},j.id),U&&U.brandId===a?e.jsx(Je,{brandId:a,onAllDone:()=>pe(null)}):d==="calendar"||d==="list"?e.jsxs(e.Fragment,{children:[e.jsx(ut,{title:null,hideControls:!0,mode:d==="calendar"?"month":"list",filter:g,hideHolidays:E,onToggleHolidays:W,onDayClick:i?void 0:t=>f({date:t}),onEventClick:i?void 0:t=>f({event:t}),onGrowthClick:w}),y&&e.jsx(mt,{date:y.date,event:y.event,onClose:()=>f(null)})]}):xe?e.jsx(Ut,{}):he?e.jsxs("p",{className:"py-16 text-center text-sm text-muted-foreground",children:["Couldnât load your creations."," ",e.jsx("button",{type:"button",onClick:()=>fe(),className:"font-medium text-brand hover:underline",children:"Try again"})]}):M.length===0?g==="all"?e.jsx(Wt,{onCreate:l}):e.jsxs("p",{className:"py-16 text-center text-sm text-muted-foreground",children:["No â",g,"â creations."]}):e.jsx(Ot,{posts:M,onOpen:S,menuFor:_e,onCreate:l,growth:{state:me,task:T??$,left:ae-z,onStart:()=>w(T),onDismiss:ue,onMore:()=>Q(!1)}}),O&&e.jsx(We,{post:O,onClose:()=>S(null)})]})}export{aa as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.