PageSourceSearch

https://dopost.co/_next/static/chunks/7650.2fdfc7e65e55f042.js

js dopost.co collected 2026-10-08 10:30:36 UTC 177,366 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7650,8035],{688:(e,t,s)=>{s.d(t,{s:()=>i});var a=s(7778);function i(e){let{className:t,color:s}=e,i=s||"#A1A1AA",n="#000000"===i.toLowerCase()?{className:"fill-black dark:fill-white"}:{fill:i};return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",className:t,xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M4 4 C2.89543 4 2 4.89543 2 6 V18 C2 19.1046 2.89543 20 4 20 H20 C21.1046 20 22 19.1046 22 18 V8 C22 6.89543 21.1046 6 20 6 H12 L10.4142 4.41421 C10.0391 4.03914 9.53043 4 9 4 H4 Z",...n}),(0,a.jsx)("path",{d:"M 3.5 8.5 A 1 1 0 0 1 4.5 7.5 H 19.5 A 1 1 0 0 1 20.5 8.5 V 17.5 A 1 1 0 0 1 19.5 18.5 H 4.5 A 1 1 0 0 1 3.5 17.5 Z",...n})]})}s(85418)},3295:(e,t,s)=>{s.d(t,{QE:()=>a.QE,TC:()=>a.TC,Vk:()=>a.Vk,ao:()=>a.ao,hF:()=>a.hF,hH:()=>a.hH,iY:()=>a.iY,kk:()=>a.kk,oC:()=>a.oC});var a=s(95150)},4327:(e,t,s)=>{s.d(t,{o4:()=>a.o4,qX:()=>a.qX});var a=s(94799)},38035:(e,t,s)=>{s.r(t),s.d(t,{Badge:()=>r,badgeVariants:()=>l});var a=s(7778);s(85418);var i=s(45088),n=s(25065);let l=(0,i.F)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-100 text-green-800"},size:{default:"px-2.5 py-0.5 text-xs",sm:"px-1.5 py-0.25 text-xs",lg:"px-3 py-0.75 text-sm"}},defaultVariants:{variant:"default",size:"default"}});function r(e){let{className:t,variant:s,size:i,...r}=e;return(0,a.jsx)("div",{className:(0,n.cn)(l({variant:s,size:i}),t),...r})}},47650:(e,t,s)=>{s.r(t),s.d(t,{OnboardingWrapper:()=>tI,TOUR_SKIP_REQUESTED_EVENT:()=>tM});var a=s(7778),i=s(85418),n=s(80546),l=s(20389),r=s(82253);function o(e){let{targetElement:t,padding:s=8,type:n}=e,[l,r]=(0,i.useState)(null),o=(0,i.useRef)(null);if((0,i.useEffect)(()=>{let e,s=()=>{r(t.getBoundingClientRect())};s(),e=0,o.current=()=>{let t=Date.now();t-e>=16&&(e=t,s())};let a=o.current;return window.addEventListener("scroll",a,{capture:!0,passive:!0}),window.addEventListener("resize",a,{passive:!0}),()=>{window.removeEventListener("scroll",a,{capture:!0}),window.removeEventListener("resize",a)}},[t]),!l)return null;let c={position:"fixed",top:l.top-s,left:l.left-s,width:l.width+2*s,height:l.height+2*s,pointerEvents:"none",zIndex:9997};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 z-[9996]",style:{background:"rgba(0, 0, 0, 0.0)",pointerEvents:"auto"}}),(0,a.jsx)("div",{className:"rounded-lg transition-all duration-300 will-change-transform",style:{...c,boxShadow:"spotlight"===n?"0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.5)":"0 0 0 2px rgba(59, 130, 246, 0.8), 0 0 20px rgba(59, 130, 246, 0.4)",border:"tooltip"===n?"2px solid rgb(59, 130, 246)":"none"}}),(0,a.jsx)("div",{style:{...c,pointerEvents:"auto",zIndex:9998}})]})}var c=s(61814),d=s(18545),u=s(94335),m=s(50330),x=s(27005),p=s(25065);function h(e){let{className:t,value:s,...i}=e;return(0,a.jsx)(x.bL,{"data-slot":"progress",className:(0,p.cn)("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...i,children:(0,a.jsx)(x.C1,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:"translateX(-".concat(100-(s||0),"%)")}})})}var f=s(94340);function g(e){var t,s,o,x,p,g,b,v,j,w,y,N;let{step:k,targetElement:C,position:T="bottom",onSkipRequested:P}=e,[A,S]=(0,i.useState)({}),{progress:z,canGoBack:R,isLastStep:E,nextStep:M,previousStep:B}=(0,n.z)(),I=(0,r.a)(),L=(0,l.useMessages)(),F=null!=(t=null==L?void 0:L.onboarding)?t:{},D=null!=(s=null==F?void 0:F.steps)?s:{},$=null!=(o=null==F?void 0:F.actions)?o:{},_=null!=(x=D[k.id])?x:{},O=null!=(p=_.title)?p:k.title,U=I&&"welcome"===k.id&&null!=_.descriptionMobile?_.descriptionMobile:null!=(g=_.description)?g:k.description,G=null!=(b=$.back)?b:"Back",K=null!=(v=$.skip)?v:"Skip",H=null!=(j=$.complete)?j:"Complete",Y=null!=(w=I?$.keyboardHintMobile:$.keyboardHint)?w:"You can use the keyboard arrows to 
1navigate the steps or click Continue.",q="welcome"===k.id,X="replay-reminder"===k.id,W="completion"===k.id,J=()=>{M()};return(0,i.useEffect)(()=>{if("completion"===k.id||"replay-reminder"===k.id)return;let e=e=>{if("Enter"===e.key||"ArrowRight"===e.key){if(E)return;e.preventDefault(),J();return}"ArrowLeft"===e.key&&R&&"completion"!==k.id&&(e.preventDefault(),B())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[E,M,R,B,k.id]),(0,i.useEffect)(()=>{if(!C)return void S({});let e=()=>{var e,t;let s=C.getBoundingClientRect(),a={position:"fixed",width:null!=(e=k.popoverWidth)?e:400,maxWidth:"calc(100vw - 32px)",zIndex:9999};switch(T){case"top":{let e=48*("replay-reminder"===k.id);a.bottom=window.innerHeight-s.top+16+e,a.left=s.left+s.width/2,a.transform="translateX(-50%)";break}case"bottom":a.top=s.bottom+16,a.left=s.left+s.width/2,a.transform="translateX(-50%)";break;case"left":a.right=window.innerWidth-s.left+16,a.top=s.top+s.height/2,a.transform="translateY(-50%)";break;case"right":{let e="replay-reminder"===k.id?-66:0;a.left=s.right+16,a.top=s.top+s.height/2+e,a.transform="translateY(-50%)";break}default:a.top="50%",a.left="50%",a.transform="translate(-50%, -50%)",a.width=null!=(t=k.popoverWidth)?t:500,a.maxWidth="min(500px, calc(100vw - 32px))"}S(a)};return e(),window.addEventListener("scroll",e,{capture:!0,passive:!0}),window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("scroll",e,{capture:!0}),window.removeEventListener("resize",e)}},[C,T,k.popoverWidth]),(0,a.jsxs)("div",{className:"bg-white dark:bg-neutral-800 rounded-lg overflow-hidden flex flex-col",style:{...A,boxShadow:"-3rem 2rem 7rem -2rem rgba(255, 228, 230, 0.4), 3rem -2rem 7rem -2rem rgba(224, 242, 254, 0.4)"},children:["welcome-gradient"===k.component&&(0,a.jsxs)("div",{className:"relative w-full h-40 flex items-center justify-center overflow-hidden bg-white dark:bg-slate-950",children:[(0,a.jsx)("div",{className:"absolute w-80 h-80 rounded-full blur-[100px] pointer-events-none bg-brand-gradient-theme",style:{right:"-10%",bottom:"-20%"}}),(0,a.jsxs)("div",{className:"relative z-10",children:[(0,a.jsx)(f.default,{src:"/images/logos/LogoFullBlack.svg",alt:"dopost",width:88,height:22,className:"object-contain dark:hidden h-5 w-auto",priority:!0}),(0,a.jsx)(f.default,{src:"/images/logos/LogoFullWhite.svg",alt:"dopost",width:88,height:22,className:"object-contain hidden dark:block h-5 w-auto",priority:!0})]})]}),!k.component&&(k.imageUrl||k.gifUrl)&&(0,a.jsx)("div",{className:"relative w-full bg-neutral-100 dark:bg-neutral-900",children:k.imageUrl&&k.imageUrl.endsWith(".mp4")?(0,a.jsx)("video",{src:k.imageUrl,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"w-full h-auto object-cover"}):k.imageUrl?(0,a.jsx)(f.default,{src:k.imageUrl,alt:k.title,width:1e3,height:562,className:"w-full h-auto object-cover",quality:100,priority:!0}):k.gifUrl?(0,a.jsx)(f.default,{src:k.gifUrl,alt:k.title,width:1e3,height:562,className:"w-full h-auto object-cover",quality:100,unoptimized:!0}):null}),(0,a.jsxs)("div",{className:"p-6 space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[O&&!X&&(0,a.jsx)("h3",{className:"text-lg font-semibold text-neutral-900 dark:text-white",children:O}
1),(0,a.jsx)("p",{className:"text-neutral-600 dark:text-neutral-300",children:U}),q&&"welcome"!==k.id&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:Y})]}),(0,a.jsxs)("div",{className:"flex gap-4 pt-2 ".concat(I?"flex-col":"items-center justify-between"),children:[k.order>0&&!X&&(0,a.jsx)("div",{className:I?"w-full":"flex-1 max-w-xs",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("span",{className:"text-sm text-neutral-600 dark:text-neutral-400 whitespace-nowrap",children:[z.currentStep,"/",z.totalSteps]}),(0,a.jsx)(h,{value:z.percentage,className:"h-1.5 flex-1"})]})}),(0,a.jsxs)("div",{className:"flex items-center gap-3 ".concat(I?"w-full justify-between":"ml-auto"),children:[R&&!X&&(0,a.jsxs)(m.$,{variant:"outline",size:"sm",onClick:B,className:"gap-2",children:[(0,a.jsx)(c.A,{className:"w-4 h-4"}),G]}),!E&&!W&&(0,a.jsx)(m.$,{variant:"ghost",size:"sm",onClick:()=>{window.dispatchEvent(new CustomEvent(tM)),null==P||P()},children:K}),(0,a.jsx)(m.$,{onClick:J,size:"sm",className:"gap-2",children:E||W?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.A,{className:"w-4 h-4"}),H]}):(0,a.jsxs)(a.Fragment,{children:[null!=(N=null!=(y=$.next)?y:k.actionLabel)?N:"Next",(0,a.jsx)(u.A,{className:"w-4 h-4"})]})})]})]})]})]})}var b=s(45870),v=s(33166),j=s(43945),w=s(93832),y=s(30976),N=s(251),k=s(19426),C=s(14552),T=s(2921),P=s(65770),A=s(73367),S=s(16323),z=s(12688),R=s(84542),E=s(76080),M=s(30605),B=s(18947),I=s(64435),L=s(31724),F=s(51157),D=s(23279),$=s(85191),_=s(97640),O=s(56746),U=s(79638);let G=(0,i.createContext)(1);function K(){return(0,i.useContext)(G)}var H=s(89822),Y=s(73324),q=s(91703),X=s(70745),W=s(82439),J=s(20400),Z=s(62361),V=s(4646),Q=s(43083),ee=s(46074),et=s(72755),es=s(95150);function ea(e){let{show:t,x:s,y:i,clicked:n}=e;return(0,a.jsx)(w.N,{children:t&&(0,a.jsx)(j.P.div,{initial:{opacity:0,scale:0},animate:{opacity:1,scale:1,x:s,y:i},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:120,damping:20},className:"absolute z-[100] pointer-events-none",style:{left:"-16px",top:"-16px"},children:(0,a.jsx)("div",{className:(0,p.cn)("w-8 h-8 rounded-full bg-primary/20 border-2 border-primary/40 transition-transform",n&&"scale-75 bg-primary/40")})})})}function ei(e){let{onClick:t,replayLabel:s}=e;return(0,a.jsx)(j.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"absolute bottom-4 inset-x-0 flex justify-center z-50 pointer-events-auto",children:(0,a.jsxs)("button",{onClick:t,className:"flex items-center gap-1.5 rounded-full bg-background/80 backdrop-blur-sm px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider shadow-sm border border-border hover:bg-background transition-colors",children:[(0,a.jsx)(H.A,{className:"h-3.5 w-3.5"}),null!=s?s:"Replay"]})})}let en=[{id:"instagram",label:"Instagram",username:"@dopost",bg:"bg-gradient-to-br from-purple-500 via-red-500 to-orange-400",badgeIcon:(0,a.jsx)(es.ao,{className:"h-2.5 w-2.5 text-white"})},{id:"facebook",label:"Facebook",username:"dopost Page",bg:"bg-[#1877F2]",badgeIcon:(0,a.jsx)(es.iY,{className:"h-2.5 w-2.5 text-white"})},{id:"x",label:"X",username:"@dopost",bg:"bg-black",badgeIcon:(0,a.jsx)(es.TC,{className:"h-2.5 w-2.5 text-white"})},{id:"linkedin",label:"LinkedIn",username:"dopost",bg:"bg-[#0077B5]",badgeIcon:(0,a.jsx)(es.QE,{className:"h-2.5 w-2.5 text-white"})},{id:"tiktok",label:"TikTok",username:"@dopost",bg:"bg-black",badgeIcon:(0,a.jsx)(es.kk,{className:"h-2.5 w-2.5 text-white"})}];function el(e){let{platformId:t,isSelected:s=!1}=e,i=en.find(e=>e.id===t);return(0,a.jsxs)("div",{className:"relative h-8 w-8",children:[(0,a.jsx)("div",{className:(0,p.cn)("rounded-full h-8 w-8 overflow-hidden bg-black",s&&"ring-2 ring-green-500 ring-offset-2 ring-offset-background"),children:(0,a.jsx)("img",{src:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp",alt:"",className:"h-full w-full object-cover"})}),(0,a.jsx)("div",{className:(0,p.cn)("absolute -bottom-0.5 -right-0.5 h-4 w-4 rounded-full border-2 border-background flex items-center justify-center",i.bg),children:i.badgeIcon})]})}function er(e){let{platformId:t,expanded:s,chevronUp:i}=e,n=en.find(e=>e.id===t),l=i||s?E.A:M.A;return(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between px-4 py-2 border-b cursor-pointer hover:bg-muted/40 transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(el,{platformId:t}),(0,a.jsx)("span",{className:"text-sm leading-none text-foreground",children:n.username})]}),(0,a.jsx)(l,{className:"h-4 w-4 text-muted-foreground"})]})}function eo(e){let{value:t,showCursor:s,showCopy:i,aiBtnRef:n,copyBtnRef:l,charLimit:r=280}=e,o=r-t.length;return(0,a.jsxs)("div",{className:"relative w-full rounded-md border border-input min-h-[130px]",children:[(0,a.jsx)("div",{className:"min-h-[130px] px-3 py-2 pb-8 text-sm text-foreground whitespace-pre-wrap break-words",children:t?(0,a.jsxs)(a.Fragment,{children:[t,s&&(0,a.jsx)("span",{className:"inline-block w-0.5 h-3.5 bg-foreground ml-0.5 align-middle animate-pulse"})]}):null}),(0,a.jsxs)("div",{className:"absolute bottom-1 right-1 flex items-center gap-0.5 pr-1 rounded-md bg-white/80 dark:bg-transparent backdrop-blur-sm z-20",children:[i&&(0,a.jsx)("button",{ref:l,className:"h-8 w-8 flex items-center justify-center rounded hover:bg-muted transition-colors",children:(0,a.jsx)(R.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsx)("button",{ref:n,className:"h-8 w-8 flex items-center justify-center rounded hover:bg-muted transition-colors",children:(0,a.jsx)(Y.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsx)("button",{className:"h-8 w-8 flex items-center justify-center rounded hover:bg-muted transition-colors",children:(0,a.jsx)(q.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsx)("button",{className:"h-8 w-8 flex items-center justify-center rounded hover:bg-muted transition-colors",children:(0,a.jsx)(X.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsx)("div",{className:"border rounded-md py-1 px-2 ml-2 text-xs font-medium text-muted-foreground",children:o})]})]})}let ec="Check out our latest summer collection! ☀️ New arrivals every week. #summer #fashion",ed=[{id:"team",n
1ame:"Team Content",accountIds:["instagram","facebook"]},{id:"personal",name:"Personal",accountIds:["x","linkedin","tiktok"]}];function eu(){var e,t,s,n,r,o,c;let d=(0,l.useMessages)(),u=null==d||null==(e=d.onboarding)?void 0:e.animations,m=null==u?void 0:u.createPost,[x,h]=(0,i.useState)([]),[f,g]=(0,i.useState)(null),[b,v]=(0,i.useState)(!1),[y,N]=(0,i.useState)(!1),[k,C]=(0,i.useState)({x:0,y:0}),[T,P]=(0,i.useState)(!1),[A,S]=(0,i.useState)(!1),z=(0,i.useRef)(null),R=(0,i.useRef)([]),E=(0,i.useRef)(null),B=(0,i.useRef)(null),I=(0,i.useRef)(null),L=(0,i.useRef)(null),F=(0,i.useRef)(!1),D=K(),$=(0,i.useRef)(D);(0,i.useEffect)(()=>{$.current=D},[D]),f&&en.filter(e=>{var t;return null==(t=ed.find(e=>e.id===f))?void 0:t.accountIds.includes(e.id)});let _=async()=>{if(F.current)return;F.current=!0,h([]),g(null),v(!1),N(!1),P(!1),S(!1),await new Promise(e=>setTimeout(e,600));let e=async e=>{if(!e||!z.current)return;let t=e.getBoundingClientRect(),s=z.current.getBoundingClientRect(),a=$.current;C({x:(t.left-s.left+t.width/2)/a,y:(t.top-s.top+t.height/2)/a}),N(!0),await new Promise(e=>setTimeout(e,500))},t=async()=>{P(!0),await new Promise(e=>setTimeout(e,150)),P(!1)};await e(E.current),await t(),v(!0),await new Promise(e=>setTimeout(e,400)),await e(B.current),await t(),v(!1),g("team"),h(["instagram","facebook"]),N(!1),await new Promise(e=>setTimeout(e,900)),await e(I.current),await t(),g(null),N(!1),await new Promise(e=>setTimeout(e,500)),await e(L.current),await t(),h(e=>[...e,"x"]),N(!1),await new Promise(e=>setTimeout(e,800)),S(!0),F.current=!1};return(0,i.useEffect)(()=>{_()},[]),(0,a.jsxs)("div",{ref:z,className:"relative w-full h-full min-h-[350px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsx)(ea,{show:y,x:k.x,y:k.y,clicked:T}),(0,a.jsxs)("div",{className:"w-full max-w-[500px] bg-background rounded-xl border border-border flex flex-col",children:[(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center flex-1 min-w-0 py-0.5",children:[en.map(e=>{var t;let s=!f||(null==(t=ed.find(e=>e.id===f))?void 0:t.accountIds.includes(e.id));return(0,a.jsx)(j.P.div,{animate:{width:40*!!s,marginRight:8*!!s,opacity:+!!s},transition:{duration:.18},style:{overflow:"hidden",flexShrink:0,height:40},children:(0,a.jsx)("button",{ref:t=>{R.current[en.findIndex(t=>t.id===e.id)]=t,"x"===e.id&&(L.current=t)},className:(0,p.cn)("rounded-full h-10 w-10 p-0 border-2 flex-shrink-0 flex items-center justify-center transition-colors",x.includes(e.id)?"border-primary bg-background":"border-transparent bg-transparent"),children:(0,a.jsx)(el,{platformId:e.id,isSelected:x.includes(e.id)})})},e.id)}),(0,a.jsx)(j.P.div,{animate:{width:110*!!f,opacity:+!!f},transition:{duration:.18},style:{overflow:"hidden",flexShrink:0,height:28},children:(0,a.jsx)("button",{ref:I,className:"flex items-center justify-center h-7 min-w-[6rem] px-3 rounded-full border border-muted-foreground/40 bg-muted/30 text-[11px] font-medium text-muted-foreground whitespace-nowrap",children:null!=(s=null==m?void 0:m.showAll)?s:"Show All"})})]}),(0,a.jsxs)("div",{className:"flex-shrink-0 relative",children:[(0,a.jsxs)("button",{ref:E,className:"flex items-center gap-2 rounded-md border border-border bg-background px-3 h-9 text-sm min-w-[130px] justify-between hover:bg-muted transition-colors",children:[(0,a.jsx)("span",{className:"font-medium text-sm",children:f?null==(t=ed.find(e=>e.id===f))?void 0:t.name:null!=(n=null==m?void 0:m.allAccounts)?n:"All Accounts"}),(0,a.jsx)(M.A,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"})]}),(0,a.jsx)(w.N,{children:b&&(0,a.jsxs)(j.P.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:"absolute top-full right-0 mt-1 w-44 rounded-lg border border-border bg-card shadow-lg z-50 overflow-hidden py-1",children:[(0,a.jsx)("div",{className:"px-3 py-2 text-sm text-muted-foreground hover:bg-muted cursor-pointer transition-colors",children:null!=(r=null==m?void 0:m.allAccounts)?r:"All Accounts"}),(0,a.jsx)("div",{className:"mx-2 border-t border-border my-0.5"}),(0,a.jsx)("div",{ref:B,className:"px-3 py-2 text-sm font-medium hover:bg-muted cursor-pointer transition-colors",children:null!=(o=null==m?void 0:m.teamContent)?o:"Team Content"}),(0,a.jsx)("div",{className:"px-3 py-2 text-sm hover:bg-muted cursor-pointer transition-colors",children:null!=(c=null==m?void 0:m.personal)?c:"Personal"})]})})]})]}),(0,a.jsx)("div",{className:"px-3 pb-3 space-y-1.5",children:["instagram","facebook","x"].map(e=>{let t=en.find(t=>
1t.id===e),s=x.includes(e);return(0,a.jsx)(j.P.div,{animate:{opacity:+!!s},transition:{duration:.2},className:"rounded-lg border border-border bg-background overflow-hidden shadow-none",children:(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between px-4 py-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(el,{platformId:e}),(0,a.jsx)("span",{className:"text-sm leading-none text-foreground",children:t.username})]}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)(M.A,{className:"h-4 w-4 text-muted-foreground"})})]})},e)})})]}),A&&(0,a.jsx)(ei,{onClick:_,replayLabel:null==m?void 0:m.replay})]})}function em(){var e,t,s,n,r,o,c,d;let u=(0,l.useMessages)(),m=null==u||null==(e=u.onboarding)?void 0:e.animations,x=null==m?void 0:m.createPost,h=null!=(t=null==x?void 0:x.aiCaptionPrompt)?t:"Summer sale new collection launch",f=null!=(s=null==x?void 0:x.aiCaptionResult)?s:"Summer is here and so is our biggest sale yet! \uD83D\uDD25 Shop the new collection before it sells out. Fresh styles, unbeatable prices. \uD83D\uDECD️ #SummerSale #NewCollection #ShopNow",[g,b]=(0,i.useState)(""),[v,y]=(0,i.useState)(""),[N,k]=(0,i.useState)(!1),[C,T]=(0,i.useState)(!1),[P,A]=(0,i.useState)(!1),[S,z]=(0,i.useState)(!1),[R,E]=(0,i.useState)({x:0,y:0}),[B,I]=(0,i.useState)(!1),[L,F]=(0,i.useState)(!1),D=(0,i.useRef)(null),$=(0,i.useRef)(null),_=(0,i.useRef)(null),O=(0,i.useRef)(null),U=(0,i.useRef)(!1),G=K(),H=(0,i.useRef)(G);(0,i.useEffect)(()=>{H.current=G},[G]);let et=async()=>{if(U.current)return;U.current=!0,b(""),y(""),k(!1),T(!1),A(!1),z(!1),I(!1),F(!1),await new Promise(e=>setTimeout(e,600));let e=async e=>{if(!e||!D.current)return;let t=e.getBoundingClientRect(),s=D.current.getBoundingClientRect(),a=H.current;E({x:(t.left-s.left+t.width/2)/a,y:(t.top-s.top+t.height/2)/a}),z(!0),await new Promise(e=>setTimeout(e,450))},t=async()=>{I(!0),await new Promise(e=>setTimeout(e,150)),I(!1)};await e($.current),await t(),z(!1),await new Promise(e=>setTimeout(e,200));for(let e=0;e<=h.length;e++)b(h.slice(0,e)),await new Promise(e=>setTimeout(e,40));await new Promise(e=>setTimeout(e,400)),await e(_.current),await t(),k(!0),await new Promise(e=>setTimeout(e,450)),await e(O.current),await t(),k(!1),z(!1),T(!0),await new Promise(e=>setTimeout(e,1400)),y(f),T(!1),A(!0),await new Promise(e=>setTimeout(e,550)),A(!1),await new Promise(e=>setTimeout(e,900)),F(!0),U.current=!1};(0,i.useEffect)(()=>{et()},[]);let es=v||g,eo=280-es.length;return(0,a.jsxs)("div",{ref:D,className:"relative w-full h-full min-h-[350px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsx)(ea,{show:S,x:R.x,y:R.y,clicked:B}),(0,a.jsxs)("div",{className:"w-full max-w-[500px] bg-background rounded-xl border border-border flex flex-col overflow-visible",children:[(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center gap-4",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0 py-0.5",children:en.map(e=>(0,a.jsx)("div",{className:(0,p.cn)("rounded-full h-10 w-10 p-0 border-2 flex-shrink-0 flex items-center justify-center","instagram"===e.id?"border-primary bg-background":"border-transparent bg-transparent"),children:(0,a.jsx)(el,{platformId:e.id,isSelected:"instagram"===e.id})},e.id))}),(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-background px-3 h-9 text-sm min-w-[130px] justify-between",children:[(0,a.jsx)("span",{className:"font-medium text-sm",children:null!=(n=null==x?void 0:x.allAccounts)?n:"All Accounts"}),(0,a.jsx)(M.A,{className:"h-4 w-4 text-muted-foreground"})]})})]}),(0,a.jsx)("div",{className:"px-3 pb-3",children:(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-background overflow-visible",children:[(0,a.jsx)(er,{platformId:"instagram",expanded:!0}),(0,a.jsx)("div",{className:"p-2",children:(0,a.jsxs)("div",{className:"relative w-full rounded-md border border-input",children:[(0,a.jsxs)("div",{ref:$,className:"relative min-h-[150px] px-3 py-2 pb-9 text-sm whitespace-pre-wrap break-words overflow-hidden",children:[(0,a.jsx)("span",{className:(0,p.cn)(C||P?"text-transparent":"text-foreground"),children:es||""}),!C&&!P&&!v&&g&&g.length<h.length&&(0,a.jsx)("span",{className:"inline-block w-0.5 h-3.5 bg-foreground ml-0.5 align-middle animate-pulse"}),(0,a.jsx)(w.N,{children:(C||P)&&(0,a.jsx)(j.P.div,{initial:{opacity:+!C,clipPath:"pol
1ygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)"},animate:P?{clipPath:"polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%)",opacity:1}:{opacity:1,clipPath:"polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)"},exit:{opacity:0},transition:{duration:P?.5:.3,ease:"easeInOut"},className:"absolute inset-0 pointer-events-none px-3 py-2 pb-9 text-sm whitespace-pre-wrap break-words",children:(0,a.jsx)(j.P.span,{className:"bg-clip-text text-transparent",style:{backgroundImage:"linear-gradient(to right, #fecdd3, #f5d0fe, #bae6fd, #f5d0fe, #fecdd3)",backgroundSize:"200% auto"},animate:C?{backgroundPosition:["0% center","-200% center"]}:{},transition:{duration:1.5,repeat:1/0,ease:"linear"},children:g})},"shimmer")}),(0,a.jsx)(w.N,{children:P&&(0,a.jsx)(j.P.div,{initial:{clipPath:"polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%)"},animate:{clipPath:"polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)"},transition:{duration:.5,ease:"easeInOut"},className:"absolute inset-0 pointer-events-none px-3 py-2 pb-9 text-sm whitespace-pre-wrap break-words text-foreground",children:f},"reveal")})]}),(0,a.jsxs)("div",{className:"absolute bottom-1 right-1 flex items-center gap-0.5 z-20",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("button",{ref:_,className:"h-8 w-8 flex items-center justify-center rounded hover:bg-muted transition-colors",children:(0,a.jsx)(Y.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsx)(w.N,{children:N&&(0,a.jsxs)(j.P.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:"absolute bottom-full right-0 mb-1 w-64 rounded-lg border border-border bg-background shadow-lg z-50 p-2",children:[(0,a.jsxs)("div",{ref:O,className:"flex items-center gap-2 px-2 py-2 text-xs font-medium rounded-md mb-1.5 border border-border bg-background hover:bg-accent cursor-pointer",children:[(0,a.jsx)(W.A,{className:"h-3.5 w-3.5 shrink-0"}),null!=(r=null==x?void 0:x.generateFromCaption)?r:"Generate from Caption",(0,a.jsxs)("span",{className:"ml-auto flex items-center gap-0.5 text-muted-foreground",children:[(0,a.jsx)(J.A,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"text-[10px]",children:"+"}),(0,a.jsx)(Z.A,{className:"h-3 w-3"})]})]}),(0,a.jsx)("div",{className:"space-y-0.5",children:[{icon:V.A,key:"fixGrammar",label:null!=(o=null==x?void 0:x.fixGrammar)?o:"Fix Grammar"},{icon:Q.A,key:"rephrase",label:null!=(c=null==x?void 0:x.rephrase)?c:"Rephrase"},{icon:ee.A,key:"translate",label:null!=(d=null==x?void 0:x.translate)?d:"Translate"}].map(e=>{let{icon:t,key:s,label:i}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 text-xs text-muted-foreground rounded hover:bg-accent cursor-pointer",children:[(0,a.jsx)(t,{className:"h-3.5 w-3.5 shrink-0"}),i]},s)})})]})})]}),(0,a.jsx)("button",{className:"h-8 w-8 flex items-center justify-center rounded hover:bg-muted transition-colors",children:(0,a.jsx)(q.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsx)("button",{className:"h-8 w-8 flex items-center justify-center rounded hover:bg-muted transition-colors",children:(0,a.jsx)(X.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsx)("div",{className:"border rounded-md py-1 px-1.5 ml-1 text-xs font-medium text-muted-foreground w-[34px] text-center tabular-nums",children:eo})]})]})})]})})]}),L&&(0,a.jsx)(ei,{onClick:et,replayLabel:null==x?void 0:x.replay})]})}let ex=["instagram","facebook","x"];function ep(e){let{platformId:t,caption:s,typing:i=!1,captionCopyRef:n,showCaptionCopy:l=!1,captionCopyFlash:r=!1,captionCopyAriaLabel:o,mediaAttached:c=!1,mediaSelectRef:d,mediaCopyRef:u,showMediaCopy:m=!1,addMediaLabel:x,copyMediaLabel:h,copyMediaAriaLabel:f}=e;return(0,a.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-background",children:[(0,a.jsx)(er,{platformId:t,chevronUp:!0}),(0,a.jsxs)("div",{className:"flex gap-2 p-2",children:[(0,a.jsxs)("div",{className:"w-[88px] shrink-0",children:[(0,a.jsx)("button",{ref:d,type:"button","aria-label":x,className:"flex h-[68px] w-full items-center justify-center overflow-hidden rounded-md border border-border bg-muted/20",children:c?(0,a.jsx)("img",{src:"/images/blog/content-batching.webp",alt:"",className:"size-full object-cover"}):(0,a.jsx)(et.A,{className:"size-5 text-muted-foreground"})}),m&&(0,a.jsxs)("button",{ref:u,type:"button","aria-label":f,className:"mt-1 flex h-6 w-full items-center justify-center gap-1 rounded-md border border-border bg-background text-[11px] font-medium",children:[(0,a.jsx)(R.A,{className:"size-3"}),h]})]}),(0,a.jsxs)("div",{className:"relative min-h-[94px] min-w-0 flex-1 rounded-md border border-input",children:[(0,a.jsxs)("div",{className:"px-2 py-1.5 pb-7 text-xs leading-4 whitespace-pre-wrap break-words",children:[s,i&&(0,a.jsx)("span",{className:"ml-0.5 inline-block h-3 w-0.5 animate-pulse bg-foreground align-middle"})]}),(0,a.jsxs)("div",{className:"absolute bottom-1 right-1 flex items-center gap-0.5 rounded-md bg-background/80",children:[l&&(0,a.jsx)("button",{ref:n,type:"button","aria-label":o,className:(0,p.cn)("flex size-6 items-center justify-center rounded",r&&"bg-primary text-primary-foreground"),children:(0,a.jsx)(R.A,{className:(0,p.cn)("size-3.5",!r&&"text-muted-foreground")})}),(0,a.jsx)(Y.A,{className:"size-3.5 text-muted-foreground"}),(0,a.jsx)(q.A,{className:"ml-1 size-3.5 text-muted-foreground"}),(0,a.jsx)(X.A,{className:"ml-1 size-3.5 text-muted-foreground"}),(0,a.jsx)("span",{className:"ml-1 rounded border px-1 text-[10px] text-muted-foreground tabular-nums",children:280-s.length})]})]})]})]})}function eh(){var e,t,s;let n=(0,l.useMessages)(),r=null==n||null==(e=n.onboarding)?void 0:e.animations,o=null==r?void 0:r.createPost,c=null!=(t=null==o?void 0:o.copyToAllCaption)?t:ec,[d,u]=(0,i.useState)({instagram:"",facebook:"",x:""}),[m,x]=(0,i.useState)(!1),[p,h]=(0,i.useState)({x:0,y:0}),[f,g]=(0,i.useState)(!1),[b,v]=(0,i.useState)(!1),[j,w]=(0,i.useState)(!1),[y,N]=(0,i.useState)(!1),[k,C]=(0,i.useState)(!1),T=(0,i.useRef)(null),P=(0,i.useRef)(null),A=(0,i.useRef)(null),S=(0,i.useRef)(null),z=K(),R=(0,i.useRef)(z);(0,i.useEffect)(()=>{R.current=z},[z]);let M=(0,i.useRef)(!1),B=async()=>
1{if(M.current)return;M.current=!0,u({instagram:"",facebook:"",x:""}),w(!1),N(!1),C(!1),x(!1),g(!1),v(!1),await new Promise(e=>setTimeout(e,400));for(let e=0;e<=c.length;e++)u(t=>({...t,instagram:c.slice(0,e)})),await new Promise(e=>setTimeout(e,22));if(await new Promise(e=>setTimeout(e,500)),P.current&&T.current){let e=T.current.getBoundingClientRect(),t=P.current.getBoundingClientRect(),s=R.current;h({x:(t.left-e.left+t.width/2)/s,y:(t.top-e.top+t.height/2)/s}),x(!0),await new Promise(e=>setTimeout(e,700)),g(!0),w(!0),await new Promise(e=>setTimeout(e,150)),g(!1),x(!1)}await new Promise(e=>setTimeout(e,150)),u(e=>({...e,facebook:c})),await new Promise(e=>setTimeout(e,120)),u(e=>({...e,x:c})),await new Promise(e=>setTimeout(e,350)),w(!1);let e=async e=>{if(!e.current||!T.current)return;let t=T.current.getBoundingClientRect(),s=e.current.getBoundingClientRect(),a=R.current;h({x:(s.left-t.left+s.width/2)/a,y:(s.top-t.top+s.height/2)/a}),x(!0),await new Promise(e=>setTimeout(e,700)),g(!0),await new Promise(e=>setTimeout(e,150)),g(!1),x(!1)};await new Promise(e=>setTimeout(e,400)),await e(A),N(!0),await new Promise(e=>setTimeout(e,500)),await e(S),C(!0),await new Promise(e=>setTimeout(e,800)),v(!0),M.current=!1};return(0,i.useEffect)(()=>{B()},[]),(0,a.jsxs)("div",{ref:T,className:"relative w-full h-full min-h-[350px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsx)(ea,{show:m,x:p.x,y:p.y,clicked:f}),(0,a.jsxs)("div",{className:"w-full max-w-[520px] bg-background rounded-xl border border-border overflow-hidden flex flex-col",children:[(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center gap-4",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0 py-0.5",children:ex.map(e=>(0,a.jsx)("div",{className:"rounded-full h-10 w-10 p-0 border-2 border-primary bg-background flex items-center justify-center flex-shrink-0",children:(0,a.jsx)(el,{platformId:e,isSelected:!0})},e))}),(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-background px-3 h-9 text-sm min-w-[130px] justify-between",children:[(0,a.jsx)("span",{className:"font-medium text-sm",children:null!=(s=null==o?void 0:o.allAccounts)?s:"All Accounts"}),(0,a.jsx)(E.A,{className:"h-4 w-4 text-muted-foreground"})]})})]}),(0,a.jsx)("div",{className:"p-3 space-y-2",children:ex.map((e,t)=>{var s,i,n,l;return(0,a.jsx)(ep,{platformId:e,caption:d[e],typing:0===t&&d[e].length>0&&d[e].length<c.length,showCaptionCopy:!0,captionCopyRef:0===t?P:void 0,captionCopyFlash:j&&0===t,captionCopyAriaLabel:null!=(s=null==o?void 0:o.copyCaptionToAll)?s:"Copy caption to all accounts",mediaAttached:0===t?y:k,mediaSelectRef:0===t?A:void 0,mediaCopyRef:0===t?S:void 0,showMediaCopy:0===t?y:k,addMediaLabel:null!=(i=null==o?void 0:o.addMedia)?i:"Add media",copyMediaLabel:null!=(n=null==o?void 0:o.copyMedia)?n:"Copy",copyMediaAriaLabel:null!=(l=null==o?void 0:o.copyMediaToAll)?l:"Copy media to all accounts"},e)})})]}),b&&(0,a.jsx)(ei,{onClick:B,replayLabel:null==o?void 0:o.replay})]})}function ef(){var e,t,s,n,r,o,c,d,u,m;let x=(0,l.useMessages)(),h=null==x||null==(e=x.onboarding)?void 0:e.animations,f=null==h?void 0:h.createPost,g=null!=(t=null==f?void 0:f.copyToAllCaption)?t:ec,[b,v]=(0,i.useState)("publish"),[y,N]=(0,i.useState)(!1),[k,C]=(0,i.useState)(!1),[T,P]=(0,i.useState)(!1),[A,S]=(0,i.useState)({x:0,y:0}),[z,R]=(0,i.useState)(!1),[B,L]=(0,i.useState)(!1),F=(0,i.useRef)(null),D=(0,i.useRef)(null),$=(0,i.useRef)(null),_=(0,i.useRef)(null),O=(0,i.useRef)(null),U=(0,i.useRef)(!1),G=K(),H=(0,i.useRef)(G);(0,i.useEffect)(()=>{H.current=G},[G]);let Y=async()=>{if(U.current)return;U.current=!0,v("publish"),N(!1),C(!1),P(!1),R(!1),L(!1),await new Promise(e=>setTimeout(e,700));let e=async e=>{if(!e.current||!F.current)return;let t=F.current.getBoundingClientRect(),s=e.current.getBoundingClientRect(),a=H.current;S({x:(s.left-t.left+s.width/2)/a,y:(s.top-t.top+s.height/2)/a}),P(!0),await new Promise(e=>setTimeout(e,600))},t=async()=>{R(!0),await new Promise(e=>setTimeout(e,150)),R(!1)};await e(D),await t(),N(!0),await new Promise(e=>setTimeout(e,400)),await e($),await new Promise(e=>
1setTimeout(e,300)),await t(),N(!1),P(!1),v("schedule"),C(!0),await new Promise(e=>setTimeout(e,1200)),await e(D),await t(),N(!0),await new Promise(e=>setTimeout(e,400)),await e(_),await new Promise(e=>setTimeout(e,300)),await t(),N(!1),P(!1),v("draft"),C(!1),await new Promise(e=>setTimeout(e,1e3)),await e(D),await t(),N(!0),await new Promise(e=>setTimeout(e,400)),await e(O),await new Promise(e=>setTimeout(e,300)),await t(),N(!1),P(!1),v("publish"),await new Promise(e=>setTimeout(e,800)),L(!0),U.current=!1};return(0,i.useEffect)(()=>{Y()},[]),(0,a.jsxs)("div",{ref:F,className:"relative w-full h-full min-h-[350px] flex items-center justify-center bg-muted/5 overflow-hidden px-4 pt-4 pb-6",children:[(0,a.jsx)(ea,{show:T,x:A.x,y:A.y,clicked:z}),(0,a.jsxs)("div",{className:"w-full max-w-[500px] bg-background rounded-xl border border-border flex flex-col",children:[(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center gap-4",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0 py-0.5",children:(0,a.jsx)("div",{className:"rounded-full h-10 w-10 p-0 border-2 border-primary bg-background flex items-center justify-center flex-shrink-0",children:(0,a.jsx)(el,{platformId:"instagram",isSelected:!0})})}),(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-background px-3 h-9 text-sm min-w-[130px] justify-between",children:[(0,a.jsx)("span",{className:"font-medium text-sm",children:null!=(s=null==f?void 0:f.allAccounts)?s:"All Accounts"}),(0,a.jsx)(M.A,{className:"h-4 w-4 text-muted-foreground"})]})})]}),(0,a.jsx)("div",{className:"px-3 pb-2",children:(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-background overflow-hidden shadow-none",children:[(0,a.jsx)(er,{platformId:"instagram",expanded:!0}),(0,a.jsx)("div",{className:"p-2",children:(0,a.jsx)(eo,{value:g})})]})}),(0,a.jsx)("div",{className:"px-3 py-3 bg-background/90 backdrop-blur-sm relative z-30 rounded-b-xl",children:(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("button",{className:"h-8 px-3 rounded-md border border-border bg-background text-sm font-medium text-foreground hover:bg-muted transition-colors",children:null!=(n=null==f?void 0:f.cancel)?n:"Cancel"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(w.N,{children:k&&(0,a.jsxs)(j.P.button,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},className:"h-8 w-[120px] px-2 rounded-md border border-border bg-background text-sm font-normal text-left flex items-center",children:[(0,a.jsx)("span",{className:"flex-1",children:"15/03 10:00"}),(0,a.jsx)(I.A,{className:"h-4 w-4 opacity-50 flex-shrink-0"})]})}),(0,a.jsxs)("div",{className:"relative flex items-center",children:[(0,a.jsx)(j.P.button,{initial:{opacity:.8},animate:{opacity:1},className:"h-8 rounded-l-md rounded-r-none px-4 text-sm font-medium brand-gradient-outline",children:"publish"===b?null!=(r=null==f?void 0:f.postNow)?r:"Post Now":"schedule"===b?null!=(o=null==f?void 0:f.schedule)?o:"Schedule":null!=(c=null==f?void 0:f.saveDraft)?c:"Save Draft"},b),(0,a.jsx)("button",{ref:D,className:"h-8 w-8 rounded-r-md rounded-l-none flex items-center justify-center bg-secondary text-secondary-foreground hover:bg-secondary/80",children:(0,a.jsx)(E.A,{className:"h-4 w-4"})}),(0,a.jsx)(w.N,{children:y&&(0,a.jsxs)(j.P.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.15},className:"absolute bottom-full right-0 mb-1.5 w-36 rounded-md border border-border bg-popover shadow-md z-50 p-1",children:[(0,a.jsx)("div",{ref:O,className:(0,p.cn)("px-2 py-1.5 text-sm rounded-sm cursor-pointer hover:bg-accent transition-colors","publish"===b&&"opacity-40 pointer-events-none"),children:null!=(d=null==f?void 0:f.postNow)?d:"Post Now"}),(0,a.jsx)("div",{ref:$,className:(0,p.cn)("px-2 py-1.5 text-sm rounded-sm cursor-pointer hover:bg-accent transition-colors","schedule"===b&&"opacity-40 pointer-events-none"),children:null!=(u=null==f?void 0:f.schedule)?u:"Schedule"}),(0,a.jsx)("div",{ref:_,className:(0,p.cn)("px-2 py-1.5 text-sm rounded-sm cursor-pointer hover:bg-accent transition-colors","draft"===b&&"opacity-40 pointer-events-none"),children:null!=(m=null==f?void 0:f.saveDraft)?m:"Save Draft"})]})})]})]})]})})]}),B&&(0,a.jsx)(ei,{onClick:Y,replayLabel:null==f?void 0:f.replay})]})}var eg=s(42749),eb=s(12777),ev=s(12882),ej=s(52766),ew=s(55754),ey=s(79536),eN=s(70576),ek=s(97237),eC=s(91571),eT=s(688);function eP(e){let{className:t}=e;
1return(0,a.jsxs)("svg",{viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:(0,p.cn)("h-auto w-auto",t),children:[(0,a.jsx)("path",{d:"M32 64C49.6731 64 64 49.6731 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"#7D2AE7"}),(0,a.jsx)("path",{d:"M32 64C49.6731 64 64 49.6731 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"url(#canva_icon_paint0_radial)"}),(0,a.jsx)("path",{d:"M32 64C49.6731 64 64 49.6731 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"url(#canva_icon_paint1_radial)"}),(0,a.jsx)("path",{d:"M32 64C49.6731 64 64 49.6731 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"url(#canva_icon_paint2_radial)"}),(0,a.jsx)("path",{d:"M32 64C49.6731 64 64 49.6731 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"url(#canva_icon_paint3_radial)"}),(0,a.jsx)("path",{d:"M45.8152 38.5644C45.5511 38.5644 45.3187 38.7874 45.0769 39.2745C42.3458 44.8125 37.6286 48.731 32.17 48.731C25.8582 48.731 21.9495 43.0333 21.9495 35.1619C21.9495 21.8286 29.3785 14.1195 35.9037 14.1195C38.9527 14.1195 40.8148 16.0357 40.8148 19.0849C40.8148 22.7039 38.7587 24.62 38.7587 25.8964C38.7587 26.4693 39.1151 26.8162 39.8218 26.8162C42.661 26.8162 45.9934 23.5538 45.9934 18.9449C45.9934 14.476 42.1039 11.1912 35.5789 11.1912C24.7951 11.1912 15.2113 21.1888 15.2113 35.0218C15.2113 45.7294 21.3257 52.8051 30.7599 52.8051C40.7734 52.8051 46.5634 42.8423 46.5634 39.6086C46.5634 38.8925 46.1972 38.5644 45.8152 38.5644Z",fill:"white"}),(0,a.jsxs)("defs",{children:[(0,a.jsxs)("radialGradient",{id:"canva_icon_paint0_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.3621 56.7242) rotate(-49.4156) scale(49.4986)",children:[(0,a.jsx)("stop",{stopColor:"#6420FF"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#6420FF",stopOpacity:"0"})]}),(0,a.jsxs)("radialGradient",{id:"canva_icon_paint1_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16.9432 7.27579) rotate(54.7035) scale(55.8188)",children:[(0,a.jsx)("stop",{stopColor:"#00C4CC"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#00C4CC",stopOpacity:"0"})]}),(0,a.jsxs)("radialGradient",{id:"canva_icon_paint2_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.3621 56.7242) rotate(-45.1954) scale(48.8994 22.4895)",children:[(0,a.jsx)("stop",{stopColor:"#6420FF"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#6420FF",stopOpacity:"0"})]}),(0,a.jsxs)("radialGradient",{id:"canva_icon_paint3_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(26.1726 8.62316) rotate(66.5198) scale(50.3869 84.4093)",children:[(0,a.jsx)("stop",{stopColor:"#00C4CC",stopOpacity:"0.725916"}),(0,a.jsx)("stop",{offset:"0.0001",stopColor:"#00C4CC"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#00C4CC",stopOpacity:"0"})]})]})]})}let eA=[{id:"1",name:"product-shot.jpg",type:"image/jpeg",url:"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=400&h=400&fit=crop"},{id:"2",name:"lifestyle.png",type:"image/png",url:"https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=400&h=400&fit=crop"},{id:"3",name:"promo-video.mp4",type:"video/mp4",url:"https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=400&h=400&fit=crop"}],eS=[{id:"side-1",name:"campaign-banner.jpg",url:"https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=400&h=400&fit=crop"},{id:"side-2",name:"team-photo.jpg",url:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400&h=400&fit=crop"},{id:"side-3",name:"sunset-view.jpg",url:"https://images.unsplash.com/photo-1501854140801-50d01698950b?w=400&h=400&fit=crop"}];function ez(e){var t;let{item:s,isSelected:i=!1,isDragging:n=!1,preview:l,processingLabel:r}=e;return(0,a.jsxs)(eN.Zp,{className:(0,p.cn)("group relative w-full aspect-square shadow-none transition-all duration-300 border-0 p-0 rounded-lg overflow-hidden bg-background select-none",i?"ring-2 ring-primary bg-accent":"hover:ring-2 hover:ring-primary/20",n&&"opacity-0"),children:[(0,a.jsx)("div",{className:"absolute top-1.5 left-1.5 z-10",children:(0,a.jsx)(ek.S,{checked:i,className:(0,p.cn)("bg-white cursor-default transition-opacity",i?"opacity-100":"opacity-0 group-hover:opacity-100")})}),(0,a.jsx)("div",{className:"absolute inset-0 rounded-[inherit] overflow-hidden",children:(0,a.jsxs)("div",{className:"h-full w-full relative overflow-hidden rounded-[inherit] bg-muted flex items-center justify-center",children:[null!=l?l:(0,a.jsx)("img",{src:s.url,alt:s.name,className:"object-cover group-hover:object-contain w-full h-full"}),r&&(0,a.jsxs)("div",{className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-2 rounded-sm bg-background/75",children:[(0,a.jsx)($.A,{className:"size-6 animate-spin text-muted-foreground"}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:r})]}),(null==(t=s.type)?void 0:t.startsWith("video/"))&&(0,a.jsx)("div",{className:"absolute top-1.5 right-1.5 bg-black/70 rounded p-1",children:(0,a.jsx)(eg.A,{className:"h-3 w-3 text-white fill-white"})}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/80 to-transparent px-2 pb-2 pt-6 text-white transition-opacity [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover:opacity-100",children:(0,a.jsx)("p",{className:"text-[11px] font-medium truncate text-center w-full",children:s.name})})]})})]})}function eR(e){let{name:t,color:s="#bfdbfe",isSelected:i=!1,isDragging:n=!1,isOver:l=!1}=e;return(0,a.jsxs)(eN.Zp,{className:(0,p.cn)("group relative w-full aspect-square shadow-none transition-all duration-150 border border-border select-none",i?"ring-2 ring-primary bg-accent":"hover:ring-2 hover:ring-primary/20",l&&"ring-2 ring-primary/60 bg-primary/5",n&&"opacity-0"),children:[(0,a.jsx)("div",{className:"absolute top-[7px] left-2 z-10",children:(0,a.jsx)(ek.S,{checked:i,className:(0,p.cn)("bg-white cursor-default transition-opacity",i?"opacity-100":"opacity-0 group-hover:opacity-100")})}),(0,a.jsxs)("div",{className:"h-full w-full flex flex-col items-center justify-center p-2 gap-1",children:[(0,a.jsx)("div",{className:"w-12 h-12 flex items-center justify-center",children:(0,a.jsx)(eT.s,{color:s,className:"w-full h-full"})}),(0,a.jsx)("p",{className:"absolute inset-x-0 bottom-2 text-xs font-medium truncate text-center px-2",children:t})]})]})}function eE(e){var t,s,i,n;let{uploadBtnRef:l,folderBtnRef:r,canvaBtnRef:o,convertLabel:c,convertTarget:d=!1,labels:u}=e,x=null!=(t=null==u?void 0:u.mediaLibrary)?t:"Media Library",p=null!=(s=null==u?void 0:u.createFolder)?s:"Create Folder",h=null!=(i=null==u?void 0:u.upload)?i:"Upload",f=null!=(n=null==u?void 0:u.editInCanva)?n:"Edit in Canva";return(0,a.jsxs)("div",{className:"sticky top-0 z-10 pt-4 pb-4 flex flex-row items-center justify-between gap-2 md:gap-4 px-4",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:(0,a.jsxs)("div",{className:"flex items-center text-sm font-medium text-foreground truncate",children:[(0,a.jsx)(C.A,{className:"h-4 w-4 mr-1.5 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:x})]})}),(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0 flex-nowrap",children:[c&&(0,a.jsxs)(m.$,{variant:"outline",size:"sm",className:"h-9 gap-2","data-demo-target":d||void 0,children:[(0,a.jsx)(eb.A,{className:"size-4"}),(0,a.jsx)("span",{className:"text-xs",children:c})]}),r&&(0,a.jsxs)(m.$,{ref:r,variant:"outline",size:"sm",className:"h-9 px-3 gap-2",children:[(0,a.jsx)(ev.A,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"text-xs",children:p})]}),l&&(0,a.jsxs)(m.$,{ref:l,size:"sm",className:"h-9 gap-2",children:[(0,a.jsx)(ej.A,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"text-xs",children:h})]}),o&&(0,a.jsxs)(m.$,{ref:o,variant:"outline",size:"sm",className:"h-9 gap-2 border-primary/20 hover:border-primary/40 hover:bg-primary/5 transition-all",children:[(0,a.jsx)(eP,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"text-xs font-bold",children:f})]})]})]})}function eM(){var e,t,s;let n=(0,l.useMessages)(),r=null==n||null==(e=n.onboarding)?void 0:e.animations,o=null==r?void 0:r.media,[c,d]=(0,i.useState)(!1),u=(0,i.useRef)(null),x=async()=>{d(!1),await new Promise(e=>setTimeout(e,3e3)),d(!0)};(0,i.useEffect)(()=>{x()},[]);let p=[{id:"upload",icon:(0,a.jsx)(ej.A,{className:"h-10 w-10 text-muted-foreground"})},{id:"dropbox",icon:(0,a.jsx)(eC.KZi,{className:"h-10 w-10 text-[#0061FF]"})},{id:"canva",icon:(0,a.jsx)(eP,{className:"h-10 w-10"})}];return(0,a.jsxs)("div",{ref:u,className:"relative w-full h-full min-h-[400px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-12",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-12",children:p.map((e,t)=>(0,a.jsx)(j.P.div,{initial:{opacity:0,scale:.5,y:20}
1,animate:{opacity:1,scale:1,y:0},transition:{delay:.2*t,type:"spring",stiffness:260,damping:20},className:"flex flex-col items-center gap-4",children:(0,a.jsx)("div",{className:"w-20 h-20 rounded-2xl bg-background border shadow-sm flex items-center justify-center hover:shadow-md transition-shadow",children:e.icon})},e.id))}),(0,a.jsx)(j.P.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.8},className:"text-sm font-medium text-muted-foreground",children:null!=(t=null==o?void 0:o.uploadFromComputerDropboxCanva)?t:"Upload from computer, Dropbox, or Canva"})]}),c&&(0,a.jsx)(j.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"absolute bottom-4 inset-x-0 flex justify-center z-50 pointer-events-auto",children:(0,a.jsxs)(m.$,{variant:"secondary",size:"sm",onClick:x,className:"rounded-full h-8 px-3 gap-1.5 shadow-sm border bg-background/80 backdrop-blur-sm hover:bg-background",children:[(0,a.jsx)(H.A,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:null!=(s=null==o?void 0:o.replay)?s:"Replay"})]})})]})}function eB(){var e,t,s;let n=(0,l.useMessages)(),r=null==n||null==(e=n.onboarding)?void 0:e.animations,o=null==r?void 0:r.media,[c,d]=(0,i.useState)(!1),[u,x]=(0,i.useState)({x:0,y:0}),[h,f]=(0,i.useState)(!1),[g,b]=(0,i.useState)(!1),[v,y]=(0,i.useState)(!1),[N,k]=(0,i.useState)(!1),[C,T]=(0,i.useState)(!1),P=(0,i.useRef)(null),A=(0,i.useRef)(null),S=(0,i.useRef)(null),z=K(),R=(0,i.useRef)(z);(0,i.useEffect)(()=>{R.current=z},[z]);let E=async()=>{if(k(!1),b(!1),y(!1),d(!1),f(!1),T(!1),await new Promise(e=>setTimeout(e,700)),!A.current||!S.current||!P.current)return;let e=P.current.getBoundingClientRect(),t=R.current,s=A.current.getBoundingClientRect();if(x({x:(s.left-e.left+s.width/2)/t,y:(s.top-e.top+s.height/2)/t}),d(!0),await new Promise(e=>setTimeout(e,800)),T(!0),f(!0),await new Promise(e=>setTimeout(e,200)),f(!1),await new Promise(e=>setTimeout(e,600)),!S.current)return;let a=S.current.getBoundingClientRect();x({x:(a.left-e.left+a.width/2)/t,y:(a.top-e.top+a.height/2)/t}),await new Promise(e=>setTimeout(e,1e3)),f(!0),await new Promise(e=>setTimeout(e,200)),f(!1),d(!1),b(!0),await new Promise(e=>setTimeout(e,2e3)),b(!1),y(!0),T(!1),await new Promise(e=>setTimeout(e,1400)),k(!0)};return(0,i.useEffect)(()=>{E()},[]),(0,a.jsxs)("div",{ref:P,className:"relative w-full h-full min-h-[400px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsx)(w.N,{children:c&&(0,a.jsx)(j.P.div,{initial:{opacity:0,scale:0},animate:{opacity:1,scale:1,x:u.x,y:u.y},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:120,damping:20},className:"absolute z-[100] pointer-events-none left-0 top-0",style:{left:"-16px",top:"-16px"},children:(0,a.jsx)("div",{className:(0,p.cn)("w-8 h-8 rounded-full bg-primary/20 border-2 border-primary/40 transition-transform",h&&"scale-75 bg-primary/40")})})}),(0,a.jsxs)("div",{className:"w-full max-w-4xl",children:[(0,a.jsx)(eE,{canvaBtnRef:S,labels:{mediaLibrary:null==o?void 0:o.mediaLibrary,editInCanva:null==o?void 0:o.editInCanva}}),(0,a.jsx)("div",{className:"p-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-4",children:[(0,a.jsx)("div",{children:(0,a.jsx)(ez,{item:eS[0]})}),(0,a.jsx)("div",{ref:A,children:(0,a.jsx)(ez,{item:eA[0],isSelected:C,preview:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.P.img,{initial:{opacity:0}
1,animate:{opacity:1},src:eA[0].url,alt:eA[0].name,className:"h-full w-full object-cover group-hover:object-contain"},v?"edited":"original"),v&&(0,a.jsx)(j.P.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},className:"absolute inset-0 flex items-center justify-center rounded-sm",children:(0,a.jsx)("div",{className:"bg-black/75 backdrop-blur-md px-4 py-1.5 rounded-md border border-white/10 shadow-2xl",children:(0,a.jsx)("p",{className:"text-white font-black text-[14px] tracking-tight uppercase",children:null!=(t=null==o?void 0:o.summerSale)?t:"SUMMER SALE"})})}),(0,a.jsx)(w.N,{children:g&&(0,a.jsx)(j.P.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 z-30 bg-background/80 backdrop-blur-sm flex flex-col items-center justify-center p-4 text-center rounded-sm",children:(0,a.jsxs)("div",{className:"relative flex items-center justify-center",children:[(0,a.jsx)(j.P.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},className:"w-12 h-12 rounded-full border-2 border-primary/20 border-t-primary"}),(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsx)(eP,{className:"h-6 w-6"})})]})})})]})})}),(0,a.jsx)("div",{children:(0,a.jsx)(ez,{item:eS[1]})}),(0,a.jsx)("div",{children:(0,a.jsx)(ez,{item:eS[2]})})]})})]}),N&&(0,a.jsx)(j.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"absolute bottom-4 inset-x-0 flex justify-center z-50 pointer-events-auto",children:(0,a.jsxs)(m.$,{variant:"secondary",size:"sm",onClick:E,className:"rounded-full h-8 px-3 gap-1.5 shadow-sm border bg-background/80 backdrop-blur-sm hover:bg-background",children:[(0,a.jsx)(H.A,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:null!=(s=null==o?void 0:o.replay)?s:"Replay"})]})})]})}function eI(){var e,t,s,n,r,o,c,d,u,x,h;let f=(0,l.useMessages)(),g=null==f||null==(e=f.onboarding)?void 0:e.animations,b=null==g?void 0:g.media,[v,y]=(0,i.useState)(!1),[N,k]=(0,i.useState)({x:0,y:0}),[C,T]=(0,i.useState)(!1),[P,A]=(0,i.useState)(!1),[S,z]=(0,i.useState)(""),[R,E]=(0,i.useState)(!1),[M,B]=(0,i.useState)(new Set),[I,L]=(0,i.useState)(new Set),[F,D]=(0,i.useState)(!1),[$,_]=(0,i.useState)(!1),O=(0,i.useRef)(null),U=(0,i.useRef)(null),G=(0,i.useRef)(null),Y=(0,i.useRef)(null),q=(0,i.useRef)({}),X=K(),W=(0,i.useRef)(X);(0,i.useEffect)(()=>{W.current=X},[X]);let[J,Z]=(0,i.useState)(null),[V,Q]=(0,i.useState)(null),ee=async()=>{var e;if(D(!1),A(!1),E(!1),z(""),B(new Set),L(new Set),_(!1),y(!1),T(!1),Z(null),Q(null),await new Promise(e=>setTimeout(e,700)),!U.current||!O.current)return;let t=O.current.getBoundingClientRect(),s=U.current.getBoundingClientRect(),a=W.current;k({x:(s.left-t.left+s.width/2)/a,y:(s.top-t.top+s.height/2)/a}),y(!0),await new Promise(e=>setTimeout(e,700)),T(!0),await new Promise(e=>setTimeout(e,200)),T(!1),y(!1),A(!0);let i=null!=(e=null==b?void 0:b.summerCampaignFolderName)?e:"Summer Campaign";for(let e=0;e<=i.length;e++)z(i.slice(0,e)),await new Promise(e=>setTimeout(e,40));if(await new Promise(e=>setTimeout(e,500)),G.current){let e=G.current.getBoundingClientRect(),s=W.current;k({x:(e.left-t.left+e.width/2)/s,y:(e.top-t.top+e.height/2)/s}),y(!0),await new Promise(e=>setTimeout(e,700)),T(!0),await new Promise(e=>setTimeout(e,200)),T(!1),y(!1)}for(let e of(A(!1),E(!0),await new Promise(e=>setTimeout(e,700)),["1","2"])){let t=q.current[e];if(t&&O.current){let s=O.current.getBoundingClientRect(),a=t.getBoundingClientRect(),i=W.current;k({x:(a.left-s.left+a.width/2)/i,y:(a.top-s.top+a.height/2)/i}),y(!0),await new Promise(e=>setTimeout(e,600)),T(!0),B(t=>new Set([...Array.from(t),e])),await new Promise(e=>setTimeout(e,200)),T(!1)}}await new Promise(e=>setTimeout(e,600));let n=q.current["2"];if(n&&Y.current&&O.current){let e=O.current.getBoundingClientRect(),t=n.getBoundingClientRect(),s=Y.current.getBoundingClientRect(),a=W.current,i=(t.left-e.left+t.width/2)/a,l=(t.top-e.top+t.height/2)/a,r=(s.left-e.left+s.width/2)/a,o=(s.top-e.top+s.height/2)/a;k({x:i,y:l}),await new Promise(e=>setTimeout(e,500)),T(!0),await new Promise(e=>setTimeout(e,200)),Z("2"),y(!1);for(let e=0;e<=40;e++){let t=e/40,s=1-Math.pow(1-t,3);Q({x:i+(r-i)*s,y:l+(o-l)*s}),t>.5&&_(!0),await new Promise(e=>setTimeout(e,15))}Z(null),Q(null),T(!1),y(!1),L(new Set(["1","2"])),await new Promise(e=>setTimeout(e,350)),_(!1)}await new Promise(e=>setTimeout(e,1200)),D(!0)};return(0,i.useEffect)(()=>{ee()},[]),(0,a.jsxs)("div",{ref:O,className:"relative w-full h-full min-h-[400px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsx)(w.N,{children:v&&(0,a.jsx)(j.P.div,{initial:{opacity:0,scale:0}
1,animate:{opacity:1,scale:1,x:N.x,y:N.y},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:120,damping:20},className:"absolute z-[100] pointer-events-none",style:{left:"-16px",top:"-16px"},children:(0,a.jsx)("div",{className:(0,p.cn)("w-8 h-8 rounded-full bg-primary/20 border-2 border-primary/40 transition-transform",C&&"scale-75 bg-primary/40")})})}),(0,a.jsxs)("div",{className:"w-full max-w-4xl",children:[(0,a.jsx)(eE,{folderBtnRef:U,labels:{mediaLibrary:null==b?void 0:b.mediaLibrary,createFolder:null==b?void 0:b.createFolder}}),(0,a.jsx)("div",{className:"p-4 relative",children:(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-4",children:[R&&(0,a.jsx)("div",{ref:Y,children:(0,a.jsx)(eR,{name:null!=(t=null==b?void 0:b.summerCampaignFolderName)?t:"Summer Campaign",color:"#bfdbfe",isOver:$})}),eA.map(e=>{let t=I.has(e.id),s=M.has(e.id),i=J===e.id||"2"===J&&("1"===e.id||"2"===e.id);return t&&!J?null:(0,a.jsx)("div",{ref:t=>{q.current[e.id]=t},children:(0,a.jsx)(ez,{item:e,isSelected:s,isDragging:i})},e.id)})]})})]}),(0,a.jsx)(w.N,{children:P&&(0,a.jsx)(j.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-40 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4",children:(0,a.jsxs)(j.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:"bg-background rounded-lg shadow-2xl w-full max-w-[420px] overflow-hidden",children:[(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)("h3",{className:"font-bold text-sm",children:null!=(s=null==b?void 0:b.createFolder)?s:"Create Folder"})}),(0,a.jsxs)("div",{className:"p-5 space-y-5",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(ey.J,{className:"text-xs font-semibold text-muted-foreground",children:null!=(n=null==b?void 0:b.folderLocation)?n:"Folder location"}),(0,a.jsx)("div",{className:"h-9 rounded-md border px-3 flex items-center justify-between text-xs text-muted-foreground bg-background",children:(0,a.jsx)("span",{children:null!=(r=null==b?void 0:b.home)?r:"Home"})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(ey.J,{className:"text-xs font-semibold text-muted-foreground",children:null!=(o=null==b?void 0:b.folderNameLabel)?o:"Folder name"}),(0,a.jsx)(ew.p,{value:S,readOnly:!0,className:"h-9",placeholder:null!=(c=null==b?void 0:b.summerCampaignFolderName)?c:"Summer Campaign"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(ey.J,{className:"text-xs font-semibold text-muted-foreground",children:null!=(d=null==b?void 0:b.color)?d:"Color"}),(0,a.jsx)("div",{className:"grid grid-cols-6 gap-2",children:["#000000","#bfdbfe","#bbf7d0","#fef08a","#fec
1dd3","#e9d5ff"].map(e=>(0,a.jsx)("button",{type:"button",className:(0,p.cn)("h-8 w-8 rounded-md flex items-center justify-center border","#bfdbfe"===e&&"ring-2 ring-primary"),children:(0,a.jsx)(eT.s,{className:"h-5 w-5",color:e})},e))})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-1",children:[(0,a.jsx)(m.$,{variant:"outline",size:"sm",children:null!=(u=null==b?void 0:b.cancel)?u:"Cancel"}),(0,a.jsx)(m.$,{ref:G,size:"sm",children:null!=(x=null==b?void 0:b.create)?x:"Create"})]})]})]})})}),(0,a.jsx)(w.N,{children:J&&V&&(0,a.jsx)(j.P.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"pointer-events-none absolute z-[100]",style:{left:V.x,top:V.y,transform:"translate(-50%, -50%)"},children:(0,a.jsxs)("div",{className:"relative",style:{width:"160px",height:"160px"},children:[(0,a.jsx)("div",{className:"relative w-full h-full",style:{zIndex:10,opacity:.8},children:(0,a.jsx)(ez,{item:eA[0]})}),(0,a.jsx)("div",{className:"absolute rounded-lg shadow-md pointer-events-none",style:{top:"0px",right:"0px",width:"64px",height:"64px",opacity:.8,zIndex:11},children:(0,a.jsx)(ez,{item:eA[1]})}),(0,a.jsx)("div",{className:"absolute bg-primary text-primary-foreground rounded-full text-xs font-semibold shadow-lg border-2 border-primary-foreground flex items-center justify-center pointer-events-none",style:{top:"-8px",right:"-8px",width:"28px",height:"28px",zIndex:50},children:"2"})]})})}),F&&(0,a.jsx)(j.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"absolute bottom-4 inset-x-0 flex justify-center z-50 pointer-events-auto",children:(0,a.jsxs)(m.$,{variant:"secondary",size:"sm",onClick:ee,className:"rounded-full h-8 px-3 gap-1.5 shadow-sm border bg-background/80 backdrop-blur-sm hover:bg-background",children:[(0,a.jsx)(H.A,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:null!=(h=null==b?void 0:b.replay)?h:"Replay"})]})})]})}var eL=s(60307);function eF(e){let{visible:t,height:s,reduceMotion:i,children:n}=e;return(0,a.jsx)("div",{"aria-hidden":!t,className:"overflow-hidden",style:{height:t?s:0,opacity:+!!t,pointerEvents:t?"auto":"none",transition:i||t?"none":"opacity 110ms ease-out, height 110ms ease-out"},children:n})}function eD(e){let t,{kind:s}=e,n=(0,l.useTranslations)("onboarding.demo"),r=(0,l.useTranslations)("onboarding.animations.media"),o=(0,l.useTranslations)("SettingsHub"),c=(0,l.useTranslations)("Calendar.dates"),u=(0,l.useFormatter)(),x=n.raw("phases.".concat(s)),[h,f]=(0,i.useState)(0),[g,b]=(0,i.useState)(""),[G,H]=(0,i.useState)(""),[Y,q]=(0,i.useState)(null),X=(0,i.useRef)(null),W=(0,i.useRef)(null),J=K(),[Z,V]=(0,i.useState)({x:0,y:0,clicked:!1,show:!1}),[Q,ee]=(0,i.useState)({x:0,y:0}),et=(0,v.I)(),es=x.length-1,en=n("searchSettings"),er=n("searchWorkspace"),eo=n("searchPost"),ec=n("syncExample"),ed=e=>({initial:!et&&{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.3*!et,delay:et?0:e}});switch((0,i.useEffect)(()=>{var e,t,a,i,n,l,r;if(h>=es)return;let o=setTimeout(()=>f(e=>e+1),"ai-conversation-animation"===s?null!=(e=[2e3,3300,2e3,2500,2e3][h])?e:2500:"ai-clients-animation"===s?null!=(t=[1600,2600][h])?t:1600:"recurring-post-animation"===s?null!=(a=[1700,1700,1500][h])?a:1500:"settings-workspace-animation"===s||"settings-other-animation"===s?850:"social-link-animation"===s?null!=(i=[1650,2400,1800][h])?i:1800:"quick-search-animation"===s?null!=(n=[1200,1400,1600,1200,500,1400,1600,1200,500,1400][h])?n:1400:"media-convert-animation"===s?null!=(l=[1300,1300,1800][h])?l:1300:"calendar-planning-animation"===s?null!=(r=[1700,3100][h])?r:1700:"calendar-dates-animation"===s?1600:"caption-sync-animation"===s?0===h?1450:65*ec.length+350:3200);return()=>clearTimeout(o)},[h,es,s,ec]),(0,i.useEffect)(()=>{var e,t,a,i,n,l,r;if(h>=es||et||"quick-search-animation"===s)return void V(e=>({...e,show:!1}));if("calendar-planning-animation"===s){if(V(e=>({...e,show:!1})),0===h)ee({x:0,y:0});else if(1===h){let e=null==(a=X.current)?void 0:a.querySelector("[data-demo-target]"),t=null==(i=X.current)?void 0:i.querySelector("[data-demo-drop-target]"),s=null==e||null==(n=e.parentElement)?void 0:n.getBoundingClientRect(),l=null==t?void 0:t.getBoundingClientRect();if(s&&l){let e=J>=.8?.88:1;ee({x:(l.left-s.left)/(J*e),y:(l.top-s.top)/(J*e)})}}return}let o=null==(e=X.current)?void 0:e.querySelector("[data-demo-target]"),c=null==(t=X.current)?void 0:t.getBoundingClientRect(),d=null==o?void 0:o.getBoundingClientRect();if(!c||!d)return void V(e=>({...e,show:!1}));if("ai-clients-animation"===s){let e={x:(d.left-c.left+d.width/2)/J,y:(d.top-c.top+d.height/2)/J};V(e=>({...e,show:!1,clicked:!1}));let t=setTimeout(()=>{V({...e,clicked:!1,show:!0})},0===h?250:900),s=setTimeout(()=>q(h),0===h?700:1450),a=setTimeout(()=>{V(e=>({...e,clicked:!0}))},0===h?1050:1950);return()=>{clearTimeout(t),clearTimeout(s),clearTimeout(a)}}V({x:(d.left-c.left+d.width/2)/J,y:(d.top-c.top+d.height/2)/J,clicked:!1,show:!0});let u=setTimeout(()=>V(e=>({...e,clicked:!0})),"media-convert-animation"===s||"caption-sync-animation"===s?750:"ai-conversation-animation"===s?1150:"calendar-dates-animation"===s?1e3:"recurring-post-animation"===s?null!=(l=[950,950,850][h])?l:900:"social-link-animation"===s?null!=(r=[1050,1750,1150][h])?r:1050:2600);return()=>clearTimeout(u)},[h,s,es,et,J]),(0,i.useEffect)(()=>
1{if("ai-conversation-animation"!==s||!W.current)return;let e=W.current,t=window.requestAnimationFrame(()=>{e.scrollTo({top:e.scrollHeight,behavior:et?"auto":"smooth"})});return()=>window.cancelAnimationFrame(t)},[s,h,et]),(0,i.useEffect)(()=>{if("quick-search-animation"!==s)return;let e=1===h?en:5===h?er:9===h?eo:null,t=3===h?en:7===h?er:null;if(et){var a;b(null!=(a=null!=e?e:t)?a:2===h?en:6===h?er:10===h?eo:"");return}if(e){b("");let t=0,s=setInterval(()=>{t+=1,b(e.slice(0,t)),t>=e.length&&clearInterval(s)},260);return()=>clearInterval(s)}if(t){let e=t.length;b(t);let s=setInterval(()=>{e-=1,b(t.slice(0,e)),e<=0&&clearInterval(s)},240);return()=>clearInterval(s)}b(2===h?en:6===h?er:10===h?eo:"")},[s,h,et,en,er,eo]),(0,i.useEffect)(()=>{if("caption-sync-animation"!==s)return;if(0===h)return void H("");if(h>=2||et)return void H(ec);let e=0;H("");let t=setInterval(()=>{e+=1,H(ec.slice(0,e)),e>=ec.length&&clearInterval(t)},65);return()=>clearInterval(t)},[s,h,et,ec]),s){case"quick-search-animation":{let e=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase().trim(),s=e(g),i=function(){for(var t=arguments.length,a=Array(t),i=0;i<t;i++)a[i]=arguments[i];return!s||s.split(/\s+/).every(t=>e(a.join(" ")).includes(t))},l=[{key:"posts",Icon:y.A},{key:"calendar",Icon:N.A},{key:"analytics",Icon:k.A},{key:"media",Icon:C.A},{key:"connections",Icon:T.A},{key:"settings",Icon:P.A}],r=l.filter(e=>{let{key:t}=e;return i(n(t))}),o=i(n("createPost"),"new publication"),c={"settings-general":n("general"),"settings-members":n("members"),"settings-publishing":n("publishing"),"settings-api-keys":n("settingsApiKeys"),"settings-profile":n("settingsProfile"),"settings-preferences":n("preferences"),"settings-notifications":n("notifications"),"settings-billing":n("settingsBilling"),"settings-mcp":n("mcp")},u=s?eL.j4.filter(e=>i(n("settings"),c[e.id],e.aliases)):[],m=["summerStore","studio"].filter(e=>i(n(e))),x=s.length>=2&&i(n("caption")),f=Number(o)+u.length+r.length+m.length+Number(x);t=(0,a.jsxs)("div",{className:"relative flex h-full w-full items-start justify-center bg-background pt-[52px]",children:[(0,a.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background/35 backdrop-blur-sm"}),(0,a.jsxs)("div",{className:"relative z-10 w-[520px] max-h-[400px] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg",children:[(0,a.jsxs)("div",{className:"flex h-16 items-center gap-3 border-b px-4",children:[(0,a.jsx)(A.A,{className:"size-4 shrink-0 opacity-50"}),(0,a.jsxs)("span",{className:(0,p.cn)("min-w-0 flex-1 truncate text-base",!g&&"text-muted-foreground"),children:[g||n("searchPlaceholder"),[1,2,3,5,6,7,9,10].includes(h)&&(0,a.jsx)("span",{className:"ml-0.5 inline-block h-4 w-px animate-pulse bg-foreground align-middle"})]}),(0,a.jsx)("span",{className:"text-lg leading-none text-muted-foreground","aria-hidden":"true",children:"\xd7"})]}),(0,a.jsxs)("div",{className:"max-h-[330px] overflow-y-auto p-2 text-sm",children:[(0,a.jsxs)("div",{className:"transition-[padding] duration-[110ms] ease-out",style:{padding:4*!!o},children:[(0,a.jsx)(eF,{visible:o,height:24,reduceMotion:et,children:(0,a.jsx)("p",{className:"px-2 py-1 text-xs font-medium text-muted-foreground",children:n("actions")})}),(0,a.jsx)(eF,{visible:o,height:36,reduceMotion:et,children:(0,a.jsxs)("div",{className:"flex h-9 items-center gap-3 rounded-md px-2",children:[(0,a.jsx)(S.A,{className:"size-4"}),(0,a.jsx)("span",{className:"flex-1",children:n("createPost")}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"↵"})]})})]}),(0,a.jsxs)("div",{className:"transition-[padding] duration-[110ms] ease-out",style:{padding:4*!!u.length},children:[(0,a.jsx)(eF,{visible:u.length>0,height:24,reduceMotion:et,children:(0,a.jsx)("p",{className:"px-2 py-1 text-xs font-medium text-muted-foreground",children:n("settings")})}),eL.j4.map(e=>(0,a.jsx)(eF,{visible:s.length>0&&i(n("settings"),c[e.id],e.aliases),height:36,reduceMotion:et,children:(0,a.jsxs)("div",{className:"flex h-9 items-center gap-3 rounded-md px-2",children:[(0,a.jsx)(e.icon,{className:"size-4 shrink-0"}),(0,a.jsxs)("span",{className:"min-w-0 flex-1 truncate",children:[(0,a.jsxs)("span",{className:"text-muted-foreground",children:[n("settings")," ›"," "]}),c[e.id]]}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"↵"})]})},e.id))]}),(0,a.jsxs)("div",{className:"transition-[padding] duration-[110ms] ease-out",style:{padding:4*!!r.length},children:[(0,a.jsx)(eF,{visible:r.length>0,height:24,reduceMotion:et,children:(0,a.jsx)("p",{className:"px-2 py-1 text-xs font-medium text-muted-foreground",children:n("pages")})}),l.map(e=>{let{key:t,Icon:s}=e;return(0,a.jsx)(eF,{visible:i(n(t)),height:36,reduceMotion:et,children:(0,a.jsxs)("div",{className:"flex h-9 items-center gap-3 rounded-md px-2",children:[(0,a.jsx)(s,{className:"size-4 shrink-0"}),(0,a.jsx)("span",{className:"flex-1",children:n(t)}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"posts"===t?n("currentPage"):"↵"})]})},t)})]}),(0,a.jsxs)("div",{className:"transition-[padding] duration-[110ms] ease-out",style:{padding:4*!!m.length},children:[(0,a.jsx)(eF,{visible:m.length>0,height:24,reduceMotion:et,children:(0,a.jsx)("p",{className:"px-2 py-1 text-xs font-medium text-muted-foreground",children:n("workspaces")})}),["summerStore","studio"].map(e=>(0,a.jsx)(eF,{visible:i(n(e)),height:40,reduceMotion:et,children:(0,a.jsxs)("div",{className:"flex h-10 items-center gap-3 rounded-md px-2",children:[(0,a.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-brand-gradient-theme text-xs text-primary-foreground",children:"studio"===e?"C":"S"}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:n(e)}),"summerStore"===e?(0,a.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,a.jsx)(d.A,{className:"size-3"}),n("activeWorkspace")]}):null]})},e))]}),(0,a.jsxs)("div",{className:"transition-[padding] duration-[110ms] ease-out",style:{padding:4*!!x},children:[(0,a.jsx)(eF,{visible:x,height:24,reduceMotion:et,children:(0,a.jsx)("p",{className:"px-2 py-1 text-xs font-medium text-muted-foreground",children:n("matchingPosts")})}),(0,a.jsx)(eF,{visible:x,height:70,reduceMotion:et,children:(0,a.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-transparent p-2",children:[(0,a.jsx)("div",{className:"size-12 shrink-0 overflow-hidden rounded-md border",children:(0,a.jsx)("img",{src:"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=100&h=100&fit=crop",alt:"",className:"size-full object-cover"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,a.jsx)("span",{className:"flex-1",children:"X \xb7 @dopost"}),(0,a.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px]",children:n("scheduled")})]}),(0,a.jsx)("p",{className:"mt-1.5",children:n("caption")})]})]})})]}),0===f&&(0,a.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:n("noResults")})]})]})]});break}case"social-link-animation":t=(0,a.jsxs)("div",{className:"relative mx-auto flex items-center justify-center",style:{width:640,height:340},children:[(0,a.jsxs)(m.$,{variant:"outline","data-demo-target":0===h||void 0,children:[(0,a.jsx)(z.A,{className:"mr-2 size-4"}),n("clientLink")]}),h>=1&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center backdrop-blur-sm p-5",children:(0,a.jsxs)("div",{className:"w-[480px] rounded-lg border bg-background p-6 shadow-xl",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:n("socialLink")}),(0,a.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:n("connectionLinkDescription")}),(0,a.jsx)("div",{className:"mt-5",children:1===h?(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:n("connectionLinkPrivacy")}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(ew.p,{readOnly:!0,value:"https://dopost.co/connect-socials/Wm9S2D7e
1Ky4oCx8Ra1tQp6Lz3Vf0Nn5JhUuB_iEgAcM"}),(0,a.jsx)(m.$,{"data-demo-target":2===h||void 0,size:"icon",children:3===h?(0,a.jsx)(d.A,{className:"size-4"}):(0,a.jsx)(R.A,{className:"size-4"})})]}),(0,a.jsx)("p",{className:"mt-3 text-sm text-muted-foreground",children:n("connectionLinkExpiry",{date:u.dateTime(new Date(Date.now()+1728e5),{dateStyle:"medium",timeStyle:"short"})})})]})}),(0,a.jsxs)("div",{className:"mt-6 flex justify-between",children:[(0,a.jsx)("span",{}),1===h?(0,a.jsxs)(m.$,{"data-demo-target":!0,children:[(0,a.jsx)(z.A,{className:"mr-2 size-4"}),n("createLink")]}):(0,a.jsx)(m.$,{children:n("replaceLink")})]})]})}),3===h&&(0,a.jsxs)("div",{className:"absolute bottom-4 right-4 z-10 flex items-center gap-2 rounded-lg border bg-background px-3 py-2 text-sm font-medium shadow-lg",children:[(0,a.jsx)(d.A,{className:"size-4 text-emerald-600"}),n("linkCopied")]})]});break;case"settings-workspace-animation":case"settings-other-animation":{let e="settings-workspace-animation"===s,i=e=>(0,a.jsxs)("section",{className:"px-1 py-0.5",children:[(0,a.jsx)("h2",{className:"mb-1 px-2 text-[11px] font-medium text-muted-foreground",children:o("groups.".concat(e))}),(0,a.jsx)("div",{className:"space-y-0.5",children:eL.j4.filter(t=>t.group===e).map(e=>(0,a.jsxs)("div",{className:"flex h-7 items-center gap-2 rounded-md px-2 text-xs font-medium",children:[(0,a.jsx)(e.icon,{"aria-hidden":"true",className:"size-3.5 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:o(e.labelKey)})]},e.id))})]},e),l="bg-primary/5 ring-2 ring-primary/40";t=(0,a.jsx)("div",{className:"mx-auto w-[300px] rounded-lg border bg-background p-3 shadow-sm",children:(0,a.jsxs)("nav",{"aria-label":n("settings"),className:"space-y-3",children:[(0,a.jsx)("div",{className:(0,p.cn)("rounded-md p-1.5 transition-[background-color,box-shadow,opacity] duration-300",h>=1&&(e?l:"opacity-45")),children:i("workspace")}),(0,a.jsx)("div",{className:(0,p.cn)("space-y-3 rounded-md p-1.5 transition-[background-color,box-shadow,opacity] duration-300",h>=1&&(e?"opacity-45":l)),children:["personal","account","integrations"].map(i)})]})});break}case"media-convert-animation":{let e="/images/blog/content-batching.webp";t=(0,a.jsxs)("div",{className:"mx-auto w-full max-w-4xl",children:[(0,a.jsx)(eE,{convertLabel:h>=1?n("convert"):void 0,convertTarget:1===h,labels:{mediaLibrary:r("mediaLibrary")}}),(0,a.jsx)("div",{className:"p-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-4",children:[(0,a.jsx)(ez,{item:{id:"gallery-side-1",name:"product-shot.jpg",url:"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=400&h=400&fit=crop"}}),(0,a.jsx)(ez,{item:{id:"gallery-side-2",name:"lifestyle.png",url:"https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=400&h=400&fit=crop"}}),(0,a.jsx)("div",{"data-demo-target":0===h||void 0,children:(0,a.jsx)(ez,{item:{id:"convert-source",name:"campaign.jpg",url:e},isSelected:h>=1})}),h>=2&&(0,a.jsx)(ez,{item:{id:"convert-result",name:"campaign-story.jpg",url:e},preview:(0,a.jsx)("div",{className:"flex size-full items-center justify-center",children:(0,a.jsxs)("div",{className:"relative mx-auto shrink-0 overflow-hidden bg-muted shadow-sm ring-1 ring-border",style:{height:150,width:84.375},children:[(0,a.jsx)("img",{src:e,alt:"",className:"absolute inset-0 size-full scale-150 object-cover blur-lg"}),(0,a.jsx)("img",{src:e,alt:"",className:"absolute top-1/2 aspect-square w-full -translate-y-1/2 object-cover"})]})}),processingLabel:2===h?n("processing"):void 0})]})})]});break}case"caption-sync-animation":t=(0,a.jsxs)("div",{className:"mx-auto w-full max-w-[520px] overflow-hidden rounded-xl border border-border bg-background",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 px-3 py-2.5",children:[(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-2 py-0.5",children:["instagram","facebook","x"].map(e=>(0,a.jsx)("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-full border-2 border-primary bg-background",children:(0,a.jsx)(el,{platformId:e,isSelected:!0})},e))}),(0,a.jsxs)("div",{className:"flex h-9 min-w-[130px] items-center justify-between gap-2 rounded-md border px-3 text-sm font-medium",children:[n("allAccounts"),(0,a.jsx)(E.A,{className:"size-4 text-muted-foreground"})]}),(0,a.jsx)(m.$,{variant:"outline",size:"icon","data-demo-target":0===h||void 0,"aria-label":n("sync"),"aria-pressed":h>=1,className:(0,p.cn)("size-8 shrink-0",h>=1&&"border-primary/40 bg-primary/10 text-primary"),children:(0,a.jsx)(z.A,{className:(0,p.cn)("size-4",h>=1&&"text-green-600 dark:text-green-400")})})]}),(0,a.jsx)("div",{className:"space-y-2 p-3 pt-0",children:["instagram","facebook","x"].map((e,t)=>(0,a.jsx)(ep,{platformId:e,caption:G,typing:1===h&&0===t,addMediaLabel:n("addMedia"),copyMediaLabel:n("copyMedia"),copyMediaAriaLabel:n("copyMediaToAll"),captionCopyAriaLabel:n("copyCaptionToAll")},e))})]});break;
1case"recurring-post-animation":{let e=new Date;e.setDate(e.getDate()+((5-e.getDay()+7)%7||7));let s=new Date(e.getFullYear(),e.getMonth(),1);s.setDate(1-(s.getDay()+6)%7),t=(0,a.jsxs)("div",{className:"relative mx-auto rounded-xl border bg-background shadow-sm",style:{width:500,height:510},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2.5",children:[(0,a.jsx)("div",{className:"flex size-10 items-center justify-center rounded-full border-2 border-primary bg-background",children:(0,a.jsx)(el,{platformId:"x",isSelected:!0})}),(0,a.jsxs)("div",{className:"flex h-9 min-w-[130px] items-center justify-between gap-2 rounded-md border px-3 text-sm font-medium",children:[n("allAccounts"),(0,a.jsx)(M.A,{className:"size-4 text-muted-foreground"})]})]}),(0,a.jsx)("div",{className:"px-3 pb-2",children:(0,a.jsx)(ep,{platformId:"x",caption:n("caption"),mediaAttached:!0,addMediaLabel:n("addMedia"),copyMediaLabel:n("copyMedia"),copyMediaAriaLabel:n("copyMediaToAll"),captionCopyAriaLabel:n("copyCaptionToAll")})}),(0,a.jsxs)("div",{className:"absolute inset-x-0 bottom-0 flex items-center justify-between rounded-b-xl bg-background/90 px-3 py-3 backdrop-blur-sm",children:[(0,a.jsx)(m.$,{variant:"outline",size:"sm",children:n("cancelPost")}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(m.$,{variant:"outline",size:"sm",className:"h-8 max-w-[180px] gap-2","data-demo-target":0===h||void 0,children:[h>=3?(0,a.jsx)(B.A,{className:"size-4 text-primary"}):(0,a.jsx)(I.A,{className:"size-4"}),n("friday")," \xb7 ",n("time")]}),(0,a.jsx)(m.$,{size:"sm",className:"rounded-r-none brand-gradient-outline",children:n("schedule")}),(0,a.jsx)(m.$,{size:"sm",variant:"secondary",className:"-ml-2 w-8 rounded-l-none px-0",children:(0,a.jsx)(E.A,{className:"size-4"})})]})]}),h>=1&&(0,a.jsxs)("div",{className:"absolute right-3 z-30 w-[380px] rounded-md border bg-popover p-3 shadow-xl",style:{bottom:64},children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 rounded-md bg-muted p-1 text-xs",children:[(0,a.jsx)("span",{className:(0,p.cn)("rounded px-3 py-2 text-center",1===h&&"bg-background shadow-sm"),children:n("dateTime")}),(0,a.jsx)("span",{"data-demo-target":1===h||void 0,className:(0,p.cn)("rounded px-3 py-2 text-center",h>=2&&"bg-background shadow-sm"),children:n("repeat")})]}),1===h?(0,a.jsxs)("div",{className:"mt-3 h-[330px] overflow-hidden rounded-md border bg-background",children:[(0,a.jsx)("div",{className:"border-b px-3 py-2 text-xs font-medium",children:u.dateTime(e,{month:"long",year:"numeric"})}),(0,a.jsxs)("div",{className:"flex h-[296px]",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-7 content-start gap-1 p-2 text-center text-[10px]",children:[Array.from({length:7},(e,t)=>{let i=new Date(s);return i.setDate(i.getDate()+t),(0,a.jsx)("span",{className:"flex size-7 items-center justify-center text-muted-foreground",children:u.dateTime(i,{weekday:"narrow"})},"weekday-".concat(t))}),Array.from({length:42},(t,i)=>{let n=new Date(s);return n.setDate(n.getDate()+i),(0,a.jsx)("span",{className:(0,p.cn)("flex size-7 items-center justify-center rounded-md",n.getMonth()!==e.getMonth()&&"text-muted-foreground/50",n.toDateString()===e.toDateString()&&"bg-primary text-primary-foreground"),children:n.getDate()},i)})]}),(0,a.jsxs)("div",{className:"flex shrink-0 border-l text-[10px]",children:[(0,a.jsx)("div",{className:"flex w-10 flex-col items-center gap-1 border-r p-1",children:["08","09","10","11","12"].map(e=>(0,a.jsx)("span",{className:(0,p.cn)("flex size-7 items-center justify-center rounded-md","10"===e&&"bg-primary text-primary-foreground"),children:e},e))}),(0,a.jsx)("div",{className:"flex w-10 flex-col items-center gap-1 p-1",children:["00","15","30","45"].map(e=>(0,a.jsx)("span",{className:(0,p.cn)("flex size-7 items-center justify-center rounded-md","00"===e&&"bg-primary text-primary-foreground"),children:e},e))})]})]})]}):(0,a.jsxs)("div",{className:"mt-3 h-[330px] space-y-2 overflow-hidden text-xs",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-md border p-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:n("repeatThisPost")}),(0,a.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:n("repeatFromSelectedDate")})]}),(0,a.jsx)(m.$,{size:"sm",variant:h>=3?"secondary":"outline","data-demo-target":2===h||void 0,children:n(h>=3?"onState":"offState")})]}),h>=3&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"mb-1 font-medium",children:n("frequency")}),(0,a.jsxs)("div",{className:"flex h-9 items-center justify-between rounded-md border px-3",children:[n("weekly"),(0,a.jsx)(M.A,{className:"size-4"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_100px] items-end gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"mb-1 font-medium",children:n("repeatEvery")}),(0,a.jsx)(ew.p,{readOnly:!0,value:"1",className:"h-9"})]}),(0,a.jsx)("p",{className:"pb-2 text-muted-foreground",children:n("weekUnit")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"mb-1 font-medium",children:n("on")}),(0,a.jsx)("div",{className:"flex justify-between gap-1",children:["M","T","W","T","F","S","S"].map((e,t)=>(0,a.jsx)("div",{className:(0,p.cn)("flex size-8 items-center justify-center rounded-full border text-xs",4===t&&"bg-primary text-primary-foreground"),children:e},t))})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("p",{className:"mb-1 font-medium",children:n("ends")}),(0,a.jsxs)("div",{className:"flex h-9 items-center justify-between rounded-md border px-3",children:[n("never"),(0,a.jsx)(M.A,{className:"size-4"})]})]})]})]})]})]});break}case"calendar-planning-animation":case"calendar-dates-animation":{let e="calendar-planning-animation"===s,i=new Date,l=new Date(i.getFullYear(),i.getMonth(),1),r=new Date(l);r.setDate(r.getDate()-(r.getDay()+6)%7);let o=(e,t)=>{let s=new Date(e);return s.setDate(s.getDate()+t),s},d=(l.getDay()+6)%7,x=!e&&h>=2,f=t=>(0,a.jsxs)(j.P.div,{"data-demo-target":!!e&&1===h&&!!t||void 0,initial:!1,animate:e&&1===h&&t?{x:Q.x,y:Q.y,scale:1.05}:{x:0,y:0,scale:1},transition:{duration:1.2*!et,delay:.85*!et,ease:"easeInOut"},className:(0,p.cn)("relative h-[52px] w-full rounded-lg border bg-gray-100 p-0.5 shadow-sm dark:bg-zinc-900",e&&1===h&&t?"z-40 overflow-visible shadow-lg":"overflow-hidden"),children:[(0,a.jsx)("img",{src:"/images/blog/content-batching.webp",alt:"",className:"h-full w-full rounded-[5px] object-cover"}),(0,a.jsx)("span",{className:"absolute left-1 right-1 top-1 flex h-4 items-center justify-center rounded bg-blue-100/95 px-1 text-[8px] font-medium text-blue-700 backdrop-blur-sm dark:bg-blue-800 dark:text-blue-100",children:n("scheduled").toUpperCase()}),(0,a.jsxs)("span",{className:"absolute bottom-1 left-1 right-1 inline-flex h-4 items-center justify-center gap-0.5 rounded bg-background/90 px-1 text-[9px] font-medium backdrop-blur-sm",children:[(0,a.jsx)(I.A,{className:"size-2.5"}),"10:00"]}),e&&1===h&&t&&(0,a.jsx)("span",{className:"pointer-events-none absolute left-1/2 top-1/2 z-50 size-8 -translate-x-1/2 -translate-y-1/2 roun
1ded-full border-2 border-primary/40 bg-primary/30"})]});t=(0,a.jsxs)("div",{className:"relative mx-auto overflow-hidden rounded-lg border bg-background",style:{width:680},children:[(0,a.jsxs)("div",{className:"flex h-14 items-center justify-between gap-2 px-3",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(m.$,{variant:"outline",size:"icon",className:"size-8 rounded-r-none border-r-0",children:(0,a.jsx)(L.A,{className:"size-4"})}),(0,a.jsx)("div",{className:"flex h-8 min-w-[120px] items-center justify-center whitespace-nowrap border border-input bg-background px-2 text-xs font-medium",children:u.dateTime(l,{month:"long",year:"numeric"})}),(0,a.jsx)(m.$,{variant:"outline",size:"icon",className:"size-8 rounded-l-none border-l-0",children:(0,a.jsx)(F.A,{className:"size-4"})}),(0,a.jsx)(m.$,{variant:"outline",size:"sm",className:"ml-2 h-8 px-2 text-xs",children:n("today")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(m.$,{variant:"outline",size:"icon",className:"size-8","aria-label":n("filter"),children:(0,a.jsx)(D.A,{className:"size-4"})}),(0,a.jsx)(m.$,{variant:"outline",size:"icon",className:"size-8","data-demo-target":!e&&0===h||void 0,"aria-label":n("calendars"),children:(0,a.jsx)(N.A,{className:"size-4"})}),(0,a.jsx)("div",{className:"flex h-8 overflow-hidden rounded-md border",children:["month","week","day"].map(e=>(0,a.jsx)(m.$,{variant:"month"===e?"default":"ghost",className:"h-8 rounded-none border-r px-2 text-xs shadow-none last:border-r-0",children:n("day"===e?"list":e)},e))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-7 border-t",children:[Array.from({length:7},(e,t)=>(0,a.jsx)("div",{className:"flex h-8 items-center justify-center bg-muted/40 text-xs font-medium text-muted-foreground",children:(e=>{let t=u.dateTime(e,{weekday:"short"});return t.charAt(0).toUpperCase()+t.slice(1)})(o(r,t))},"weekday-".concat(t))),Array.from({length:28},(t,s)=>{let l=o(r,s),c=h>=2?12:9,u=x?s===d+4?"eventLaunch":s===d+11?"eventReview":s===d+18?"eventDeadline":null:null;return(0,a.jsxs)("div",{"data-demo-drop-target":!!e&&1===h&&12===s||void 0,className:(0,p.cn)("h-[84px] min-w-0 border-r border-t p-1.5",l.getMonth()!==i.getMonth()&&"bg-muted/20 text-muted-foreground"),children:[(0,a.jsx)("p",{className:"mb-1 text-xs font-medium",children:l.getDate()}),e&&s===c&&f(1===h),!e&&16===s&&f(!1),u&&(0,a.jsx)("div",{className:"flex min-h-4 min-w-0 items-center rounded bg-blue-500/20 px-1.5 py-0.5 text-[10px] font-medium leading-3 shadow-xs",children:(0,a.jsx)("span",{className:"truncate",children:n(u)})})]},l.toDateString())})]}),!e&&1===h&&(0,a.jsxs)("div",{className:"absolute right-[126px] top-[52px] z-30 w-72 rounded-md border bg-popover p-3 shadow-md",children:[(0,a.jsx)("h3",{className:"mb-2 text-sm font-medium",children:c("manager.calendars")}),(0,a.jsx)("p",{className:"mb-3 text-xs text-muted-foreground",children:c("manager.empty")}),(0,a.jsxs)(m.$,{"data-demo-target":!0,size:"sm",className:"w-full text-xs",children:[(0,a.jsx)(S.A,{className:"mr-1 size-3.5"}),c("manager.add")]})]})]});break}case"ai-clients-animation":t=(0,a.jsx)("div",{className:"relative mx-auto flex items-center justify-center",style:{width:550,height:350},children:0===h?(0,a.jsx)("div",{className:"grid grid-cols-3 gap-4",children:[["ChatGPT","/llm-icons/openai.svg"],["Claude","/llm-icons/claude.svg"],["Cursor","/llm-icons/cursor.svg"],["Gemini","/llm-icons/gemini-color.svg"],["Grok","/llm-icons/grok.svg"],["OpenClaw","/llm-icons/openclaw-color.svg"]].map(e=>{let[t,s]=e;return(0,a.jsxs)("button",{type:"button","aria-label":t,"data-demo-target":"ChatGPT"===t||void 0,className:(0,p.cn)("flex h-24 w-28 flex-col items-center justify-center gap-2 rounded-xl border bg-muted/80 shadow-sm transition-colors dark:bg-white/10","ChatGPT"===t&&Y===h&&Z.show&&"bg-accent dark:bg-white/20"),children:[(0,a.jsx)("img",{src:s,alt:"",className:(0,p.cn)("size-9 object-contain",("ChatGPT"===t||"Cursor"===t||"Grok"===t)&&"dark:invert")}),(0,a.jsx)("span",{className:"text-xs font-medium",children:t})]},t)})}):(0,a.jsxs)("div",{className:"flex h-[320px] w-80 flex-col p-5",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-center gap-3",children:[(0,a.jsxs)("div",{className:"relative grid size-10 place-items-center",children:[(0,a.jsx)("img",{src:"/llm-icons/openai.svg",alt:"ChatGPT",className:"size-8 dark:invert"}),h>=2&&(0,a.jsx)(j.P.span,{initial:{opacity:0,scale:.5}
1,animate:{opacity:1,scale:1},className:"absolute -bottom-1 -right-1 grid size-5 place-items-center rounded-full border-2 border-background bg-emerald-600 text-white",children:(0,a.jsx)(d.A,{className:"size-3"})})]}),(0,a.jsx)("div",{className:"h-px w-7 bg-border"}),(0,a.jsxs)("div",{className:"relative grid size-10 place-items-center rounded-xl bg-brand-gradient-theme",children:[(0,a.jsx)("img",{src:"/images/logos/LogoSymbolWhite.svg",alt:"dopost",className:"size-5"}),h>=2&&(0,a.jsx)(j.P.span,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},className:"absolute -bottom-1 -right-1 grid size-5 place-items-center rounded-full border-2 border-background bg-emerald-600 text-white",children:(0,a.jsx)(d.A,{className:"size-3"})})]})]}),1===h?(0,a.jsxs)("div",{className:"flex flex-1 flex-col justify-center",children:[(0,a.jsx)("h3",{className:"text-center text-sm font-semibold",children:n("authorizeChatgpt")}),(0,a.jsx)("div",{className:"my-4 space-y-2 rounded-lg bg-muted/50 p-3 text-xs",children:["oauthAccounts","oauthPublish","oauthAnalytics"].map(e=>(0,a.jsxs)("p",{className:"flex items-center gap-2",children:[(0,a.jsx)(d.A,{className:"size-3 text-emerald-600"}),n(e)]},e))}),(0,a.jsx)(m.$,{"data-demo-target":!0,size:"sm",className:(0,p.cn)("w-full gap-2",Y===h&&Z.show&&"brightness-90"),children:Z.clicked?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($.A,{className:"size-4 animate-spin"}),n("authorizing")]}):n("authorizeContinue")})]}):(0,a.jsx)("p",{className:"flex flex-1 items-center justify-center text-center text-sm font-semibold",children:n("chatgptConnected")})]})});break;case"ai-conversation-animation":t=(0,a.jsxs)("div",{className:"mx-auto flex flex-col overflow-hidden rounded-xl border bg-white text-[#0d0d0d] shadow-sm dark:bg-[#212121] dark:text-[#ececec]",style:{width:520,height:350},children:[(0,a.jsxs)("div",{className:"relative flex h-12 shrink-0 items-center justify-between px-4",children:[(0,a.jsx)(_.A,{className:"size-4 text-[#676767] dark:text-[#b4b4b4]"}),(0,a.jsxs)("div",{className:"absolute left-1/2 flex -translate-x-1/2 items-center gap-1 text-sm font-semibold",children:["ChatGPT ",(0,a.jsx)(M.A,{className:"size-3 text-[#676767]"})]}),(0,a.jsx)("div",{className:"size-6 rounded-full bg-gradient-to-br from-sky-200 via-fuchsia-200 to-rose-200 ring-1 ring-black/10 dark:ring-white/10"})]}),0===h?(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center px-5 text-center",children:[(0,a.jsx)("img",{src:"/llm-icons/openai.svg",alt:"",className:"mb-3 size-7 dark:invert"}),(0,a.jsx)(j.P.p,{...ed(.1),className:"mb-4 text-sm font-medium",children:n("promptExamples")}),(0,a.jsx)("div",{className:"flex max-w-[440px] flex-wrap justify-center gap-2",children:["ideasPrompt","exampleSchedulePrompt","exampleAnalyticsPrompt"].map((e,t)=>(0,a.jsx)(j.P.div,{...ed(.25+.15*t),"data-demo-target":"ideasPrompt"===e||void 0,className:"max-w-[215px] rounded-full border border-black/10 bg-[#f7f7f8] px-3 py-2 text-xs leading-4 dark:border-white/10 dark:bg-[#303030]",children:n(e)},e))})]}):(0,a.jsxs)("div",{ref:W,className:"min-h-0 flex-1 space-y-3 overflow-y-auto px-5 py-3 text-xs leading-5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[(0,a.jsx)(j.P.div,{...ed(.15),className:"ml-auto w-fit max-w-[84%] rounded-3xl bg-[#f4f4f4] px-3 py-2 dark:bg-[#303030]",children:n("ideasPrompt")}),(0,a.jsxs)("div",{children:[(0,a.jsx)(j.P.p,{...ed(.7),className:"mb-1",children:n("ideasIntro")}),(0,a.jsx)("ol",{className:"list-decimal space-y-1 pl-5",children:["idea1","idea2","idea3"].map((e,t)=>(0,a.jsx)(j.P.li,{...ed(1+.25*t),children:n(e)},e))})]}),h>=2&&(0,a.jsx)(j.P.div,{...ed(.2),className:"ml-auto w-fit max-w-[84%] rounded-3xl bg-[#f4f4f4] px-3 py-2 dark:bg-[#303030]",children:n("publishPrompt")}),2===h&&(0,a.jsx)(j.P.p,{...ed(.8),className:"text-[#676767] dark:text-[#b4b4b4]",children:n("submitting")}),h>=3&&(0,a.jsxs)("div",{children:[(0,a.jsx)(j.P.p,{...ed(.25),children:n("idea2")}),(0,a.jsxs)(j.P.p,{...ed(.75),className:"mt-1 flex items-center gap-1 font-medium text-emerald-700 dark:text-emerald-400",children:[(0,a.jsx)(d.A,{className:"size-3"}),n("publishedResult")]})]}),h>=4&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.P.div,{...ed(.1),className:"text-center text-[10px] text-[#8e8e8e]",children:n("later")}),(0,a.jsx)(j.P.div,{...ed(.45),className:"ml-auto w-fit max-w-[84%] rounded-3xl bg-[#f4f4f4] px-3 py-2 dark:bg-[#303030]",children:n("analyticsPrompt")}),(0,a.jsx)("div",{className:"min-h-[100px]",children:(0,a.jsx)(w.N,{mode:"wait",children:4===h?(0,a.jsxs)(j.P.div,{...ed(.9),exit:{opacity:0}
1,className:"flex items-center gap-2 text-[#676767] dark:text-[#b4b4b4]",children:[n("analyzingPerformance"),(0,a.jsx)("span",{className:"flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(e=>(0,a.jsx)(j.P.span,{animate:et?{opacity:1}:{opacity:[.25,1,.25]},transition:et?void 0:{duration:1,repeat:1/0,delay:.16*e},className:"size-1 rounded-full bg-current"},e))})]},"analytics-thinking"):(0,a.jsxs)(j.P.div,{...ed(.2),children:[(0,a.jsx)("p",{children:n("analyticsResult")}),(0,a.jsx)("ul",{className:"mt-1 list-disc space-y-0.5 pl-5 marker:text-[#8e8e8e]",children:[["impressions",1240],["likes",72],["replies",9],["reposts",5]].map((e,t)=>{let[s,i]=e;return(0,a.jsxs)(j.P.li,{...ed(.45+.15*t),children:[(0,a.jsxs)("strong",{children:[n(s),":"]})," ",u.number(i)]},s)})})]},"analytics-result")})})]})]}),(0,a.jsxs)("div",{className:"mx-4 mb-3 shrink-0 rounded-[18px] border border-black/10 bg-white p-2 shadow-sm dark:border-white/10 dark:bg-[#303030]",children:[(0,a.jsx)("p",{className:"px-1 pb-2 text-xs text-[#8e8e8e]",children:n("askAnything")}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"grid size-6 place-items-center rounded-full border border-black/10 dark:border-white/15",children:(0,a.jsx)(S.A,{className:"size-3"})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(O.A,{className:"size-3.5 text-[#676767] dark:text-[#b4b4b4]"}),(0,a.jsx)("div",{className:"grid size-6 place-items-center rounded-full bg-[#0d0d0d] text-white dark:bg-white dark:text-[#0d0d0d]",children:(0,a.jsx)(U.A,{className:"size-3"})})]})]})]})]})}return(0,a.jsxs)("div",{ref:X,className:(0,p.cn)("relative flex h-full w-full items-center justify-center overflow-hidden p-4","media-convert-animation"===s?"min-h-[400px]":"min-h-[350px]","bg-muted/5"),"data-tour-demo":s,children:[(0,a.jsx)("div",{className:(0,p.cn)("relative w-full","quick-search-animation"===s&&"h-full"),style:{transform:"recurring-post-animation"===s||["social-link-animation","calendar-planning-animation","calendar-dates-animation"].includes(s)&&J>=.8?"scale(0.88)":void 0},children:t}),(0,a.jsx)(ea,{...Z}),h===es&&(0,a.jsx)(ei,{onClick:()=>f(0),replayLabel:n("replay")})]})}var e$=s(70572),e_=s(3295),eO=s(4327),eU=s(29140);let eG=[{id:"FACEBOOK",label:"Facebook",icon:(0,a.jsx)(e_.iY,{className:"h-5 w-5"}),color:"bg-[#1877F2] text-white hover:bg-[#1877F2]/90"},{id:"LINKEDIN",label:"LinkedIn",icon:(0,a.jsx)(e_.QE,{className:"h-5 w-5"}),color:"bg-[#0077B5] text-white hover:bg-[#0077B5]/90"},{id:"INSTAGRAM",label:"Instagram",icon:(0,a.jsx)(e_.ao,{className:"h-5 w-5"}),color:"bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600"},{id:"X",label:"X (Twitter)",icon:(0,a.jsx)(e_.TC,{className:"h-5 w-5"}),color:"bg-black text-white hover:bg-gray-800"},{id:"TIKTOK",label:"TikTok",icon:(0,a.jsx)(e_.kk,{className:"h-5 w-5"}),color:"bg-black text-white hover:bg-gray-800"},{id:"THREADS",label:"Threads",icon:(0,a.jsx)(eO.qX,{className:"h-5 w-5"}),color:"bg-black text-white hover:bg-gray-800"},{id:"MASTODON",label:"Mastodon",icon:(0,a.jsx)(e_.hH,{className:"h-5 w-5"}),color:"bg-[#6364FF] text-white hover:bg-[#6364FF]/90"},{id:"BLUESKY",label:"Bluesky",icon:(0,a.jsx)(eO.o4,{className:"h-5 w-5"}),color:"bg-[#0085FF] text-white hover:bg-[#0085FF]/90"},{id:"PINTEREST",label:"Pinterest",icon:(0,a.jsx)(e_.oC,{className:"h-5 w-5"}),color:"bg-[#E60023] text-white hover:bg-[#E60023]/90"},{id:"YOUTUBE",label:"YouTube",icon:(0,a.jsx)(e_.Vk,{className:"h-5 w-5"}),color:"bg-[#FF0000] text-white hover:bg-[#FF0000]/90"},{id:"TELEGRAM",label:"Telegram",icon:(0,a.jsx)(e_.hF,{className:"h-5 w-5"}),color:"bg-[#229ED9] text-white hover:bg-[#229ED9]/90"},{id:"GOOGLE_BUSINESS",label:"Google Business",icon:(0,a.jsx)(eU.$,{className:"h-5 w-5"}),color:"bg-white text-[#4285F4] ring-1 ring-border hover:bg-gray-50"}],eK=[{id:"1",name:"dopost",platform:"INSTAGRAM",username:"@dopost",type:"Instagram",color:"bg-gradient-to-br from-purple-500 to-pink-500",icon:(0,a.jsx)(e_.ao,{className:"h-3 w-3"}),image:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp"},{id:"2",name:"dopost",platform:"FACEBOOK",username:"dopost Page",type:"Facebook",color:"bg-[#1877F2]",icon:(0,a.jsx)(e_.iY,{className:"h-3 w-3"}),image:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp"},{id:"3",name:"dopost",platform:"X",username:"@dopost",type:"X/Twitter",color:"bg-black",icon:(0,a.jsx)(e_.TC,{className:"h-3 w-3"}),image:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp"},{id:"4",name:"dopost",platform:"LINKEDIN",username:"dopost Company",type:"LinkedIn",color:"bg-[#0077B5]",icon:(0,a.jsx)(e_.QE,{className:"h-3 w-3"}),image:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp"},{id:"5",name:"dopost",platform:"TIKTOK",username:"@dopost",type:"TikTok",color:"bg-black",icon:(0,a.jsx)(e_.kk,{className:"h-3 w-3"}),image:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp"}];function eH(){var e,t,s,n;let r=(0,l.useMessages)(),o=null==r||null==(e=r.onboarding)?void 0:e.animations,c=null==o?void 0:o.connectAccounts,[d,u]=(0,i.useState)(0),[x,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)({x:0,y:0}),[b,v]=(0,i.useState)(!1),[y,N]=(0,i.useState)(null),[k,C]=(0,i.useState)(0),[T,A]=(0,i.useState)(!1),z=(0,i.useRef)(null),R=(0,i.useRef)(null),E=(0,i.useRef)(null),M=K(),B=(0,i.useRef)(M);(0,i.useEffect)(()=>{B.current=M},[M]);let I=async()=>
1{if(A(!1),u(0),v(!1),h(!1),N(null),C(0),await new Promise(e=>setTimeout(e,1e3)),R.current&&z.current){let e=R.current.getBoundingClientRect(),t=z.current.getBoundingClientRect(),s=B.current;if(g({x:(e.left-t.left+e.width/2)/s,y:(e.top-t.top+e.height/2)/s}),h(!0),await new Promise(e=>setTimeout(e,800)),v(!0),await new Promise(e=>setTimeout(e,200)),v(!1),h(!1),await new Promise(e=>setTimeout(e,300)),u(1),await new Promise(e=>setTimeout(e,800)),E.current&&z.current){let e=E.current.getBoundingClientRect(),t=z.current.getBoundingClientRect(),s=B.current;g({x:(e.left-t.left+e.width/2)/s,y:(e.top-t.top+e.height/2)/s}),h(!0),await new Promise(e=>setTimeout(e,800)),v(!0),N("INSTAGRAM"),await new Promise(e=>setTimeout(e,200)),v(!1),h(!1),await new Promise(e=>setTimeout(e,2e3)),u(2);for(let e=1;e<=eK.length;e++)C(e),await new Promise(t=>setTimeout(t,400+150*e));await new Promise(e=>setTimeout(e,1e3)),A(!0)}}};return(0,i.useEffect)(()=>{I()},[]),(0,a.jsxs)("div",{ref:z,className:"w-full h-full min-h-[350px] flex items-center justify-center bg-muted/5 overflow-hidden relative p-4",children:[(0,a.jsx)(w.N,{children:x&&(0,a.jsx)(j.P.div,{initial:{opacity:0,scale:0},animate:{opacity:1,scale:1,x:f.x,y:f.y},exit:{opacity:0,scale:0},transition:{x:{type:"spring",stiffness:120,damping:20},y:{type:"spring",stiffness:120,damping:20},opacity:{duration:.2}},className:"absolute z-50 pointer-events-none left-0 top-0",children:(0,a.jsx)("div",{className:(0,p.cn)("w-8 h-8 rounded-full bg-primary/20 border-2 border-primary/40 transition-transform",b&&"scale-75 bg-primary/40")})})}),(0,a.jsx)("div",{className:"w-full max-w-2xl flex flex-col min-h-[300px] relative",children:(0,a.jsxs)(w.N,{mode:"wait",children:[0===d&&(0,a.jsx)(j.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"flex-1 flex items-center justify-center p-8",children:(0,a.jsxs)(m.$,{ref:R,variant:"outline",className:(0,p.cn)("w-auto cursor-pointer transition-all duration-200",b?"scale-95 brightness-90":"hover:scale-105"),children:[(0,a.jsx)(S.A,{className:"h-4 w-4 mr-2"}),null!=(t=null==c?void 0:c.newConnection)?t:"New Connection"]})},"phase0"),1===d&&(0,a.jsx)(j.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,scale:1.05},className:"flex-1",children:(0,a.jsx)("div",{className:"grid grid-cols-2 gap-4",children:eG.map((e,t)=>{var s;let i=y===e.id;return(0,a.jsx)(j.P.div,{ref:"INSTAGRAM"===e.id?E:null,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.05*t},children:(0,a.jsx)(m.$,{variant:"outline",className:(0,p.cn)("flex h-14 items-center justify-start w-full overflow-hidden transition-all rounded-md border-input bg-background text-foreground hover:bg-accent px-4 group",i&&"opacity-80"),children:(0,a.jsxs)("div",{className:"flex items-center gap-3 w-full justify-start",children:[(0,a.jsx)("div",{className:(0,p.cn)("h-9 w-9 shrink-0 rounded-full flex items-center justify-center text-white transition-all group-hover:scale-110",e.color,i&&"animate-pulse"),children:i?(0,a.jsx)($.A,{className:"h-5 w-5 animate-spin text-white"}):e.icon}),(0,a.jsx)("div",{className:"flex flex-col items-start min-w-0",children:(0,a.jsx)("span",{className:"font-semibold text-sm truncate",children:i?null!=(s=null==c?void 0:c.connecting)?s:"Connecting...":e.label})})]})})},e.id)})})},"phase1"),2===d&&(0,a.jsxs)(j.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"flex-1",children:[(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsxs)("h3",{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[null!=(s=null==c?void 0:c.activeAccounts)?s:"Active Accounts"," ",(0,a.jsx)("span",{className:"inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground text-xs w-5 h-5",children:k})]})}),(0,a.jsx)("div",{className:"",children:eK.slice(0,k).map((e,t)=>{let s=t===k-1,i="overflow-hidden border-x bg-background ";return 1===k?i+="border-y rounded-md":0===t?i+="border-t rounded-t-md":s?i+="border-y rounded-b-md":i+="border-t",(0,a.jsx)(j.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:i,children:(0,a.jsxs)("div",{className:"p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsxs)("div",{className:"relative shrink-0",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-background flex items-center justify-center overflow-hidden border",children:(0,a.jsx)("img",{src:e.image,alt:e.name,className:"w-full h-full object-cover"})}),(0,a.jsx)("div",{className:(0,p.cn)("absolute -bottom-1 -right-1 w-5 h-5 rounded-full border-2 border-background flex items-center justify-center text-white shadow-sm",e.color),children:e.icon})]}),(0,a.jsxs)("div",{className:"min-w-0 overflow-hidden flex flex-col text-left",children:[(0,a.jsx)("div",{className:"font-medium truncate",children:e.name}),(0,a.jsx)("div",{className:"flex items-center gap-2 flex-wrap mt-0.5 min-h-[20px]",children:(0,a.jsx)("span",{className:"text-xs text-muted-foreground truncate",children:e.type})})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)(m.$,{variant:"ghost",size:"sm",className:"gap-1.5 cursor-pointer",children:(0,a.jsx)(P.A,{className:"h-4 w-4"})})})]})},e.id)})})]},"phase2")]})}),T&&(0,a.jsx)(j.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"absolute bottom-4 inset-x-0 flex justify-center z-50 pointer-events-auto",children:(0,a.jsxs)(m.$,{variant:"secondary",size:"sm",onClick:I,className:"rounded-full h-8 px-3 gap-1.5 shadow-sm border bg-background/80 backdrop-blur-sm hover:bg-background",children:[(0,a.jsx)(H.A,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:null!=(n=null==c?void 0:c.replay)?n:"Replay"})]})})]})}var eY=s(94799),eq=s(17739),eX=s(6478),eW=s(38035);let eJ=[{id:"1",name:"dopost",platform:"INSTAGRAM",color:"bg-gradient-to-br from-purple-500 to-pink-500",icon:(0,a.jsx)(es.ao,{className:"h-3 w-3"}),type:"Instagram"},{id:"2",name:"dopost",platform:"FACEBOOK",color:"bg-[#1877F2]",icon:(0,a.jsx)(es.iY,{className:"h-3 w-3"}),type:"Facebook"},{id:"3",name:"dopost",platform:"X",color:"bg-black",icon:(0,a.jsx)(es.TC,{className:"h-3 w-3"}),type:"X/Twitter"},{id:"4",name:"dopost",platform:"LINKEDIN",color:"bg-[#0077B5]",icon:(0,a.jsx)(es.QE,{className:"h-3 w-3"}),type:"LinkedIn"},{id:"5",name:"dopost",platform:"TIKTOK",color:"bg-black",icon:(0,a.jsx)(es.kk,{className:"h-3 w-3"}),type:"TikTok"},{id:"6",name:"dopost",platform:"YOUTUBE",color:"bg-[#FF0000]",icon:(0,a.jsx)(es.Vk,{className:"h-3 w-3"}),type:"YouTube"},{id:"7",name:"dopost",platform:"THREADS",color:"bg-black",icon:(0,a.jsx)(eY.qX,{className:"h-3 w-3"}),type:"Threads"}];function eZ(){var e,t,s,n,r,o,c,d,u,x,h,f,g,b;let v=(0,l.useMessages)(),y=null==v||null==(e=v.onboarding)?void 0:e.animations,N=null==y?void 0:y.groups,k=K(),C=(0,i.useRef)(k);(0,i.useEffect)(()=>{C.current=k},[k]);let[T,P]=(0,i.useState)(!1),[A,z]=(0,i.useState)(!1),[R,E]=(0,i.useState)(!1),[M,B]=(0,i.useState)({x:0,y:0}),[I,L]=(0,i.useState)(!1),[F,D]=(0,i.useState)(""),[$,_]=(0,i.useState)(new Set),[O,U]=(0,i.useState)(0),[G,Y]=(0,i.useState)(!1),q=(0,i.useRef)(null),X=(0,i.useRef)(null),W=(0,i.useRef)(null),J=(0,i.useRef)(null),Z=(0,i.useRef)({}),V=async()=>{if(Y(!1),P(!1),z(!1),L(!1),E(!1),D(""),_(new Set),U(0),await new Promise(e=>setTimeout(e,1e3)),X.current&&q.current){var e;let t=X.current.getBoundingClientRect(),s=q.current.getBoundingClientRect(),a=C.current;B({x:(t.left-s.left+t.width/2)/a,y:(t.top-s.top+t.height/2)/a}),E(!0),await new Promise(e=>setTimeout(e,800)),L(!0),await new Promise(e=>setTimeout(e,200)),L(!1),E(!1),await new Promise(e=>
1setTimeout(e,300)),P(!0),await new Promise(e=>setTimeout(e,600));let i=null!=(e=null==N?void 0:N.officialDopost)?e:"Official dopost";for(let e=0;e<=i.length;e++)D(i.slice(0,e)),await new Promise(e=>setTimeout(e,60+40*Math.random()));await new Promise(e=>setTimeout(e,500));let n=eJ.slice(0,3);for(let e=0;e<n.length;e++){let t=n[e];if(Z.current[t.id]&&q.current){let s=Z.current[t.id].getBoundingClientRect(),a=q.current.getBoundingClientRect(),i=C.current;B({x:(s.right-a.left-30)/i,y:(s.top-a.top+s.height/2)/i}),E(!0),await new Promise(e=>setTimeout(e,600)),L(!0),_(e=>new Set(e).add(t.id)),await new Promise(e=>setTimeout(e,150)),L(!1),await new Promise(e=>setTimeout(e,300)),e<n.length-1&&(U((e+1)*65),await new Promise(e=>setTimeout(e,600)))}}if(W.current&&q.current){let e=W.current.getBoundingClientRect(),t=q.current.getBoundingClientRect(),s=C.current;B({x:(e.left-t.left+e.width/2)/s,y:(e.top-t.top+e.height/2)/s}),await new Promise(e=>setTimeout(e,800)),L(!0),await new Promise(e=>setTimeout(e,200)),L(!1),E(!1),await new Promise(e=>setTimeout(e,300)),P(!1),await new Promise(e=>setTimeout(e,400)),z(!0),await new Promise(e=>setTimeout(e,1e3)),Y(!0)}}};return(0,i.useEffect)(()=>{V()},[]),(0,a.jsxs)("div",{ref:q,className:"w-full h-full min-h-[450px] flex items-center justify-center bg-muted/5 overflow-hidden relative p-4",children:[(0,a.jsx)(w.N,{children:R&&(0,a.jsx)(j.P.div,{initial:{opacity:0,scale:0},animate:{opacity:1,scale:1,x:M.x,y:M.y},exit:{opacity:0,scale:0},transition:{x:{type:"spring",stiffness:120,damping:20},y:{type:"spring",stiffness:120,damping:20},opacity:{duration:.2}},className:"absolute z-[100] pointer-events-none",style:{left:"-16px",top:"-16px"},children:(0,a.jsx)("div",{className:(0,p.cn)("w-8 h-8 rounded-full bg-primary/20 border-2 border-primary/40 transition-transform",I&&"scale-75 bg-primary/40")})})}),(0,a.jsxs)("div",{className:"w-full max-w-2xl space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:null!=(t=null==N?void 0:N.groups)?t:"Groups"}),(0,a.jsx)(eq.A,{className:"h-3 w-3 text-muted-foreground"})]}),(0,a.jsxs)(m.$,{ref:X,variant:"outline",size:"sm",className:"gap-2",children:[(0,a.jsx)(S.A,{className:"h-4 w-4"}),null!=(s=null==N?void 0:N.createGroup)?s:"Create Group"]})]}),A?(0,a.jsx)(j.P.div,{initial:{opacity:0,y:-6},animate:{opacity:1,y:0},className:"overflow-hidden border rounded-md bg-background",children:(0,a.jsxs)("div",{className:"w-full p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center min-w-0 gap-2",children:[(0,a.jsx)("h4",{className:"font-medium truncate whitespace-nowrap text-sm",children:null!=(r=null==N?void 0:N.officialDopost)?r:"Official dopost"}),(0,a.jsx)(eW.Badge,{variant:"secondary",className:"text-[10px] shrink-0",children:null!=(o=null==N?void 0:N.default)?o:"DEFAULT"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 flex-nowrap",children:eJ.slice(0,3).map(e=>(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-background flex items-center justify-center overflow-hidden border",children:(0,a.jsx)("img",{src:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp",className:"w-full h-full object-cover",alt:""})}),(0,a.jsx)("div",{className:(0,p.cn)("absolute -bottom-0.5 -right-0.5 w-4 h-4 rounded-full border-2 border-background flex items-center justify-center text-white",e.color),children:e.icon})]},e.id))}),(0,a.jsx)(m.$,{variant:"ghost",size:"icon",className:"h-8 w-8",children:(0,a.jsx)(eX.A,{className:"h-4 w-4"})})]})]})}):(0,a.jsx)("div",{className:"text-center py-8 border rounded-lg",children:(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:null!=(n=null==N?void 0:N.noGroupsYet)?n:"No groups created yet."})})]}),(0,a.jsx)(w.N,{children:T&&(0,a.jsx)(j.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-40 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4",children:(0,a.jsxs)(j.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:"bg-background rounded-lg shadow-2xl w-full max-w-[480px] overflow-hidden flex flex-col max-h-[420px]",children:[(0,a.jsx)("div",{className:"p-4 pb-3",children:(0,a.jsx)("h3",{className:"text-sm font-semibold leading-none",children:null!=(c=null==N?void 0:N.createGroup)?c:"Create Group"})}),(0,a.jsxs)("div",{className:"flex-1 overflow-hidden px-4 pb-4 space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(ey.J,{htmlFor:"group-name",className:"text-xs font-medium",children:null!=(d=null==N?void 0:N.groupName)?d:"Group Name"}),(0,a.jsx)(ew.p,{id:"group-name",placeholder:null!=(u=null==N?void 0:N.enterGroupName)?u:"Enter group name",value:F,readOnly:!0,className:"h-9"})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(ek.S,{id:"is-default",checked:!0,disabled:!0}),(0,a.jsx)(ey.J,{htmlFor:"is-default",className:"text-sm font-normal",children:null!=(x=null==N?void 0:N.useAsDefault)?x:"Use as default group"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(ey.J,{className:"text-xs font-medium",children:null!=(h=null==N?void 0:N.selectAccounts)?h:"Select Accounts"}),(0,a.jsx)("div",{className:"border rounded-md overflow-hidden relative h-[180px]",children:(0,a.jsx)(j.P.div,{ref:J,animate:{y:-O},transition:{type:"spring",stiffness:100,damping:20},className:"absolute inset-x-0 top-0",children:eJ.map((e,t)=>{let s=$.has(e.id);return(0,a.jsxs)("div",{ref:t=>{Z.current[e.id]=t},className:(0,p.cn)("flex items-center justify-between p-3 transition-colors border-t",0===t&&"border-t-0",s?"bg-muted/30":"bg-background"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-background border flex items-center justify-center overflow-hidden",children:(0,a.jsx)("img",{src:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp",className:"w-full h-full object-cover",alt:""})}),(0,a.jsx)("div",{className:(0,p.cn)("absolute -bottom-0.5 -right-0.5 w-4 h-4 rounded-full border-2 border-background flex items-center justify-center text-white",e.color),children:e.icon})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium leading-none",children:e.name}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:e.type})]})]}),(0,a.jsx)(ek.S,{checked:s,disabled:!0})]},e.id)})})})]})]}),(0,a.jsxs)("div",{className:"px-4 py-3 border-t bg-background flex justify-end gap-3",children:[(0,a.jsx)(m.$,{variant:"outline",size:"sm",children:null!=(f=null==N?void 0:N.cancel)?f:"Cancel"}),(0,a.jsx)(m.$,{ref:W,size:"sm",children:null!=(g=null==N?void 0:N.createGroupButton)?g:"Create Group"})]})]})})}),G&&(0,a.jsx)(j.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"absolute bottom-4 inset-x-0 flex justify-center z-50 pointer-events-auto",children:(0,a.jsxs)(m.$,{variant:"secondary",size:"sm",onClick:V,className:"rounded-full h-8 px-3 gap-1.5 shadow-sm border bg-background/80 backdrop-blur-sm hover:bg-background",children:[(0,a.jsx)(H.A,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:null!=(b=null==N?void 0:N.replay)?b:"Replay"})]})})]})}var eV=s(36451);let eQ=[{id:"1",name:"dopost",platform:"INSTAGRAM",type:"Instagram",color:"bg-gradient-to-br from-purple-500 to-pink-500",icon:(0,a.jsx)(es.ao,{className:"h-3 w-3"}),image:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp"},{id:"2",name:"dopost",platform:"FACEBOOK",type:"Facebook",color:"bg-[#1877F2]",icon:(0,a.jsx)(es.iY,{className:"h-3 w-3"}),image:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp"},{id:"3",name:"dopost",platform:"X",type:"X/Twitter",color:"bg-black",icon:(0,a.jsx)(es.TC,{className:"h-3 w-3"}),image:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp"},{id:"4",name:"dopost",platform:"LINKEDIN",type:"LinkedIn",color:"bg-[#0077B5]",icon:(0,a.jsx)(es.QE,{className:"h-3 w-3"}),image:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp"},{id:"5",name:"dopost",platform:"TIKTOK",type:"TikTok",color:"bg-black",icon:(0,a.jsx)(es.kk,{className:"h-3 w-3"}),image:"https://media.dopost.co/assets/dopost_landing_socialAvatar.webp"}];function e0(){var e,t,s;let n=(0,l.useMessages)(),r=null==n||null==(e=n.onboarding)?void 0:e.animations,o=null==r?void 0:r.refreshAccounts,[c,d]=(0,i.useState)(!0),[u,x]=(0,i.useState)(!1),[h,f]=(0,i.useState)(!1),[g,b]=(0,i.useState)({x:0,y:0}),[v,y]=(0,i.useState)(!1),[N,k]=(0,i.useState)(!1),C=(0,i.useRef)(null),T=(0,i.useRef)(null),A=K(),S=(0,i.useRef)(A);(0,i.useEffect)(()=>{S.current=A},[A]);let z=async()=>
1{if(k(!1),d(!0),x(!1),y(!1),f(!1),await new Promise(e=>setTimeout(e,1e3)),T.current&&C.current){let e=T.current.getBoundingClientRect(),t=C.current.getBoundingClientRect(),s=S.current;b({x:(e.left-t.left+e.width/2)/s,y:(e.top-t.top+e.height/2)/s}),f(!0),await new Promise(e=>setTimeout(e,800)),y(!0),x(!0),await new Promise(e=>setTimeout(e,200)),y(!1),f(!1),await new Promise(e=>setTimeout(e,2500)),x(!1),d(!1),await new Promise(e=>setTimeout(e,1500)),k(!0)}};return(0,i.useEffect)(()=>{z()},[]),(0,a.jsxs)("div",{ref:C,className:"w-full h-full min-h-[400px] flex items-center justify-center bg-muted/5 overflow-hidden relative p-4",children:[(0,a.jsx)(w.N,{children:h&&(0,a.jsx)(j.P.div,{initial:{opacity:0,scale:0},animate:{opacity:1,scale:1,x:g.x,y:g.y},exit:{opacity:0,scale:0},transition:{x:{type:"spring",stiffness:120,damping:20},y:{type:"spring",stiffness:120,damping:20},opacity:{duration:.2}},className:"absolute z-50 pointer-events-none left-0 top-0",children:(0,a.jsx)("div",{className:(0,p.cn)("w-8 h-8 rounded-full bg-primary/20 border-2 border-primary/40 transition-transform",v&&"scale-75 bg-primary/40")})})}),(0,a.jsxs)("div",{className:"w-full max-w-2xl flex flex-col relative",children:[(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsxs)("h3",{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[null!=(t=null==o?void 0:o.activeAccounts)?t:"Active Accounts"," ",(0,a.jsx)("span",{className:"inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground text-xs w-5 h-5",children:eQ.length})]})}),(0,a.jsx)("div",{className:"",children:eQ.map((e,t)=>{var s,i,n;let l=t===eQ.length-1,r="INSTAGRAM"===e.platform,d="overflow-hidden border-x bg-background ";return 1===eQ.length?d+="border-y rounded-md":0===t?d+="border-t rounded-t-md":l?d+="border-y rounded-b-md":d+="border-t",(0,a.jsx)("div",{className:d,children:(0,a.jsxs)("div",{className:"p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsxs)("div",{className:"relative shrink-0",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-background flex items-center justify-center overflow-hidden border",children:(0,a.jsx)("img",{src:e.image,alt:e.name,className:"w-full h-full object-cover"})}),(0,a.jsx)("div",{className:(0,p.cn)("absolute -bottom-1 -right-1 w-5 h-5 rounded-full border-2 border-background flex items-center justify-center text-white shadow-sm",e.color),children:e.icon})]}),(0,a.jsxs)("div",{className:"min-w-0 overflow-hidden flex flex-col text-left",children:[(0,a.jsx)("div",{className:"font-medium truncate",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap mt-0.5 min-h-[20px]",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground truncate",children:e.type}),(0,a.jsx)(w.N,{mode:"wait",children:r&&c&&(0,a.jsxs)(j.P.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:-5},className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-400 whitespace-nowrap",children:null!=(s=null==o?void 0:o.daysLeft)?s:"7 days left"}),!u&&(0,a.jsxs)(m.$,{ref:T,variant:"outline",size:"sm",className:"h-5 px-1.5 text-[9px] gap-1",children:[(0,a.jsx)(eV.A,{className:"h-2.5 w-2.5"}),null!=(i=null==o?void 0:o.reconnect)?i:"Reconnect"]}),u&&(0,a.jsxs)("div",{className:"flex items-center gap-1 text-[9px] text-muted-foreground ml-1",children:[(0,a.jsx)($.A,{className:"h-2.5 w-2.5 animate-spin"}),null!=(n=null==o?void 0:o.reconnecting)?n:"Reconnecting..."]})]},"warning")})]})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 flex-shrink-0",children:(0,a.jsx)(m.$,{variant:"ghost",size:"sm",className:"gap-1.5 cursor-pointer",children:(0,a.jsx)(P.A,{className:"h-4 w-4"})})})]})},e.id)})})]}),N&&(0,a.jsx)(j.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"absolute bottom-4 inset-x-0 flex justify-center z-50 pointer-events-auto",children:(0,a.jsxs)(m.$,{variant:"secondary",size:"sm",onClick:z,className:"rounded-full h-8 px-3 gap-1.5 shadow-sm border bg-background/80 backdrop-blur-sm hover:bg-background",children:[(0,a.jsx)(H.A,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:null!=(s=null==o?void 0:o.replay)?s:"Replay"})]})})]})}var e1=s(2858),e2=s(47191),e4=s(66020),e5=s(6187),e3=s(77528),e8=s(94745),e6=s(53623),e9=s(55967);function e7(e){let{show:t,x:s,y:i,clicked:n}=e;return(0,a.jsx)(w.N,{children:t&&(0,a.jsx)(j.P.div,{initial:{opacity:0,scale:0}
1,animate:{opacity:1,scale:1,x:s,y:i},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:120,damping:20},className:"absolute z-[100] pointer-events-none",style:{left:"-16px",top:"-16px"},children:(0,a.jsx)("div",{className:(0,p.cn)("w-8 h-8 rounded-full bg-primary/20 border-2 border-primary/40 transition-transform",n&&"scale-75 bg-primary/40")})})})}function te(e){let{onClick:t,replayLabel:s}=e;return(0,a.jsx)(j.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"absolute bottom-4 inset-x-0 flex justify-center z-50 pointer-events-auto",children:(0,a.jsxs)(m.$,{variant:"secondary",size:"sm",onClick:t,className:"rounded-full h-8 px-3 gap-1.5 shadow-sm border bg-background/80 backdrop-blur-sm hover:bg-background",children:[(0,a.jsx)(H.A,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:null!=s?s:"Replay"})]})})}let tt=[{id:"1",name:"Alex Hernandez",email:"[email protected]",initials:"AH",color:"bg-violet-500",role:"OWNER"},{id:"2",name:"Maria Garcia",email:"[email protected]",initials:"MG",color:"bg-blue-500",role:"ADMIN"}],ts={OWNER:{label:"Owner",classes:"bg-yellow-100 text-yellow-800 border-yellow-200",icon:(0,a.jsx)(e1.A,{className:"h-3 w-3 text-yellow-600"})},ADMIN:{label:"Admin",classes:"bg-blue-100 text-blue-800 border-blue-200",icon:(0,a.jsx)(e2.A,{className:"h-3 w-3 text-blue-600"})},EDITOR:{label:"Editor",classes:"bg-green-100 text-green-800 border-green-200",icon:(0,a.jsx)(e2.A,{className:"h-3 w-3 text-green-600"})}};function ta(e){let{member:t,visible:s}=e,i=ts[t.role];return(0,a.jsx)(w.N,{children:s&&(0,a.jsxs)(j.P.div,{initial:{opacity:0,y:-6},animate:{opacity:1,y:0},className:"flex items-center justify-between p-3 border-b last:border-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("div",{className:(0,p.cn)("h-8 w-8 rounded-full flex items-center justify-center text-white text-xs font-bold shrink-0",t.color),children:t.initials}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-medium",children:t.name}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:t.email})]})]}),(0,a.jsxs)(eW.Badge,{variant:"outline",className:(0,p.cn)("text-[10px] flex items-center gap-1",i.classes),children:[i.icon,i.label]})]})})}function ti(e){let{email:t,visible:s,invitationSentLabel:i,pendingLabel:n}=e;return(0,a.jsx)(w.N,{children:s&&(0,a.jsxs)(j.P.div,{initial:{opacity:0,y:-6},animate:{opacity:1,y:0},className:"flex items-center justify-between p-3 border-b last:border-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("div",{className:"h-8 w-8 rounded-full bg-muted flex items-center justify-center shrink-0",children:(0,a.jsx)(e4.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-medium",children:t}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:null!=i?i:"Invitation sent"})]})]}),(0,a.jsx)(eW.Badge,{variant:"outline",className:"text-[10px] text-muted-foreground",children:null!=n?n:"Pending"})]})})}function tn(){var e,t,s,n,r,o,c,d,u,x;let p=(0,l.useMessages)(),h=null==p||null==(e=p.onboarding)?void 0:e.animations,f=null==h?void 0:h.settings,[g,b]=(0,i.useState)(!1),[v,y]=(0,i.useState)({x:0,y:0}),[N,k]=(0,i.useState)(!1),[C,T]=(0,i.useState)(!1),[P,A]=(0,i.useState)(""),[S,z]=(0,i.useState)(!1),[R,E]=(0,i.useState)(!1),M=(0,i.useRef)(null),B=(0,i.useRef)(null),I=(0,i.useRef)(null),L=K(),F=(0,i.useRef)(L);(0,i.useEffect)(()=>{F.current=L},[L]);let D=async()=>{if(b(!1),k(!1),T(!1),A(""),z(!1),E(!1),await new Promise(e=>setTimeout(e,800)),!B.current||!M.current)return;let e=M.current.getBoundingClientRect(),t=B.current.getBoundingClientRect(),s=F.current;y({x:(t.left-e.left+t.width/2)/s,y:(t.top-e.top+t.height/2)/s}),b(!0),await new Promise(e=>setTimeout(e,700)),k(!0),await new Promise(e=>setTimeout(e,200)),k(!1),b(!1),T(!0),await new Promise(e=>setTimeout(e,400));let a="[email protected]";for(let e=0;e<=a.length;e++)A(a.slice(0,e)),await new Promise(e=>setTimeout(e,45));if(await new Promise(e=>setTimeout(e,600)),I.current&&M.current){let e=I.current.getBoundingClientRect(),t=M.current.getBoundingClientRect(),s=F.current;y({x:(e.left-t.left+e.width/2)/s,y:(e.top-t.top+e.height/2)/s}),b(!0),await new Promise(e=>setTimeout(e,600)),k(!0),await new Promise(e=>setTimeout(e,200)),k(!1),b(!1)}T(!1),await new Promise(e=>
1setTimeout(e,300)),z(!0),await new Promise(e=>setTimeout(e,1e3)),E(!0)};return(0,i.useEffect)(()=>{D()},[]),(0,a.jsxs)("div",{ref:M,className:"relative w-full h-full min-h-[350px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsx)(e7,{show:g,x:v.x,y:v.y,clicked:N}),(0,a.jsxs)("div",{className:"w-full max-w-md space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-semibold",children:null!=(t=null==f?void 0:f.teamMembers)?t:"Team Members"}),(0,a.jsx)("span",{className:"h-5 w-5 rounded-full bg-primary text-primary-foreground text-[10px] font-bold flex items-center justify-center",children:S?3:2})]}),(0,a.jsxs)(m.$,{ref:B,variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",children:[(0,a.jsx)(e5.A,{className:"h-3.5 w-3.5"}),null!=(s=null==f?void 0:f.inviteMemberButton)?s:"Invite Member"]})]}),(0,a.jsxs)("div",{className:"overflow-hidden rounded-md border bg-background",children:[tt.map(e=>(0,a.jsx)(ta,{member:e,visible:!0},e.id)),(0,a.jsx)(ti,{email:"[email protected]",visible:S,invitationSentLabel:null==f?void 0:f.invitationSent,pendingLabel:null==f?void 0:f.pending})]})]}),(0,a.jsx)(w.N,{children:C&&(0,a.jsx)(j.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-40 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4",children:(0,a.jsxs)(j.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:"bg-background rounded-lg shadow-2xl w-full max-w-[360px] overflow-hidden",children:[(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:null!=(n=null==f?void 0:f.inviteTeamMember)?n:"Invite Team Member"}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:null!=(r=null==f?void 0:f.sendEmailInvite)?r:"Send an email invitation to your workspace."})]}),(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(ey.J,{className:"text-xs font-medium",children:null!=(o=null==f?void 0:f.emailAddress)?o:"Email address"}),(0,a.jsx)(ew.p,{value:P,readOnly:!0,className:"h-8 text-xs",placeholder:"[email protected]"})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(ey.J,{className:"text-xs font-medium",children:null!=(c=null==f?void 0:f.role)?c:"Role"}),(0,a.jsxs)("div",{className:"h-8 rounded-md border px-3 flex items-center gap-2 text-xs bg-background",children:[(0,a.jsx)(e2.A,{className:"h-3.5 w-3.5 text-blue-500"}),(0,a.jsx)("span",{children:null!=(d=null==f?void 0:f.editor)?d:"Editor"})]})]})]}),(0,a.jsxs)("div",{className:"p-4 pt-0 flex justify-end gap-2",children:[(0,a.jsx)(m.$,{variant:"outline",size:"sm",className:"h-8 text-xs",children:null!=(u=null==f?void 0:f.cancel)?u:"Cancel"}),(0,a.jsx)(m.$,{ref:I,size:"sm",className:"h-8 text-xs",children:null!=(x=null==f?void 0:f.sendInvite)?x:"Send Invite"})]})]})})}),R&&(0,a.jsx)(te,{onClick:D,replayLabel:null==f?void 0:f.replay})]})}let tl=[{label:"London",country:"United Kingdom",offset:"UTC+0:00",code:"GB"},{label:"Paris",country:"France",offset:"UTC+1:00",code:"FR"},{label:"New York",country:"United States",offset:"UTC-5:00",code:"US"},{label:"Los Angeles",country:"United States",offset:"UTC-8:00",code:"US"},{label:"Mexico City",country:"Mexico",offset:"UTC-6:00",code:"MX"},{label:"S\xe3o Paulo",country:"Brazil",offset:"UTC-3:00",code:"BR"},{label:"Dubai",country:"UAE",offset:"UTC+4:00",code:"AE"},{label:"Tokyo",country:"Japan",offset:"UTC+9:00",code:"JP"}];function tr(e){let{code:t,size:s="md"}=e,i=e9[t];return i?(0,a.jsx)("div",{className:"sm"===s?"w-5 rounded-sm overflow-hidden aspect-[3/2]":"w-6 rounded-sm overflow-hidden aspect-[3/2]",children:(0,a.jsx)(i,{className:"w-full h-full"})}):(0,a.jsx)(e3.A,{className:"sm"===s?"w-4 h-4":"w-5 h-5"})}function to(){var e,t,s,n,r;let o=(0,l.useMessages)(),c=null==o||null==(e=o.onboarding)?void 0:e.animations,d=null==c?void 0:c.settings,[u,x]=(0,i.useState)(!1),[h,f]=(0,i.useState)({x:0,y:0}),[g,b]=(0,i.useState)(!1),[v,y]=(0,i.useState)(!1),[N,k]=(0,i.useState)(""),[C,T]=(0,i.useState)(tl[0]),[P,A]=(0,i.useState)(null),[z,R]=(0,i.useState)(!1),E=(0,i.useRef)(null),M=(0,i.useRef)(null),B=(0,i.useRef)(null),I=K(),L=(0,i.useRef)(I);(0,i.useEffect)(()=>{L.current=I},[I]);let F=N?tl.filter(e=>e.label.toLowerCase().includes(N.toLowerCase())):tl,D=async()=>{if(x(!1),b(!1),y(!1),k(""),T(tl[0]),A(null),R(!1),await new Promise(e=>setTimeout(e,800)),!M.current||!E.current)return;let e=E.current.getBoundingClientRect(),t=M.current.getBoundingClientRect(),s=L.current;f({x:(t.left-e.left+t.width/2)/s,y:(t.top-e.top+t.height/2)/s}),x(!0),await new Promise(e=>setTimeout(e,700)),b(!0),await new Promise(e=>setTimeout(e,200)),b(!1),x(!1),y(!0),await new Promise(e=>setTimeout(e,500));let a="New York";for(let e=0;e<=a.length;e++)k(a.slice(0,e)),await new Promise(e=>setTimeout(e,55));if(await new Promise(e=>setTimeout(e,600)),B.current&&E.current){let e=E.current.getBoundingClientRect(),t=B.current.getBoundingClientRect(),s=L.current;f({x:(t.left-e.left+t.width/2)/s,y:(t.top-e.top+t.height/2)/s}),x(!0),await new Promise(e=>setTimeout(e,450)),A("New York"),await new Promise(e=>setTimeout(e,200)),b(!0),await new Promise(e=>setTimeout(e,200)),b(!1),x(!1)}T(tl[2]),y(!1),await new Promise(e=>setTimeout(e,1e3)),R(!0)};return(0,i.useEffect)(()=>{D()},[]),(0,a.jsxs)("div",{ref:E,className:"relative w-full h-full min-h-[350px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsx)(e7,{show:u,x:h.x,y:h.y,clicked:g}
1),(0,a.jsxs)("div",{className:"w-full max-w-md space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm font-semibold",children:null!=(t=null==d?void 0:d.timezone)?t:"Timezone"}),(0,a.jsxs)(m.$,{ref:M,variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",children:[(0,a.jsx)(S.A,{className:"h-3.5 w-3.5"}),null!=(s=null==d?void 0:d.changeTimezone)?s:"Change"]})]}),(0,a.jsxs)(j.P.div,{initial:{opacity:.8},animate:{opacity:1},className:"p-4 border rounded-lg bg-background flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 flex items-center justify-center flex-shrink-0",children:(0,a.jsx)(tr,{code:C.code,size:"md"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:C.label}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:[C.country," \xb7 ",C.offset]})]}),(0,a.jsx)(e3.A,{className:"h-4 w-4 text-muted-foreground ml-auto"})]},C.label)]}),(0,a.jsx)(w.N,{children:v&&(0,a.jsx)(j.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-40 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4",children:(0,a.jsxs)(j.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:"bg-background rounded-lg shadow-2xl w-full max-w-[360px] overflow-hidden",children:[(0,a.jsx)("div",{className:"p-4 border-b",children:(0,a.jsx)("h3",{className:"font-semibold text-sm",children:null!=(n=null==d?void 0:d.selectTimezone)?n:"Select Timezone"})}),(0,a.jsx)("div",{className:"p-3 border-b",children:(0,a.jsx)(ew.p,{value:N,readOnly:!0,className:"h-8 text-xs",placeholder:null!=(r=null==d?void 0:d.searchCityPlaceholder)?r:"Search city or country…"})}),(0,a.jsx)("div",{className:"overflow-y-auto h-[200px]",children:F.map(e=>(0,a.jsxs)("div",{ref:"New York"===e.label?B:void 0,className:(0,p.cn)("flex items-center justify-between px-3 py-2 cursor-pointer text-xs border-b last:border-0",P===e.label?"bg-primary text-primary-foreground":"hover:bg-accent"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(tr,{code:e.code,size:"sm"}),(0,a.jsx)("span",{className:"font-medium",children:e.label}),(0,a.jsx)("span",{className:(0,p.cn)("text-[11px]",P===e.label?"text-primary-foreground/70":"text-muted-foreground"),children:e.country})]}),(0,a.jsx)("span",{className:(0,p.cn)("text-[11px] font-mono",P===e.label?"text-primary-foreground/80":"text-muted-foreground"),children:e.offset})]},e.label))})]})})}),z&&(0,a.jsx)(te,{onClick:D,replayLabel:null==d?void 0:d.replay})]})}let tc=[{id:"1",name:"General Marketing",tags:["#marketing","#socialmedia","#growth","#branding"]}],td=["#summer","#summervibes","#sunshine","#summertime","#beachday","#summergoals","#hotdays","#sunsets"],tu=["#summer","#summervibes","#sunshine"];function tm(){var e,t,s;let n=(0,l.useMessages)(),r=null==n||null==(e=n.onboarding)?void 0:e.animations,o=null==r?void 0:r.settings,c=(e,t)=>String(null!=e?e:t),d=Array.isArray(null==o?void 0:o.hashtagsToSelect)?o.hashtagsToSelect:tu,u=Array.isArray(null==o?void 0:o.aiGeneratedHashtags)?o.aiGeneratedHashtags:td,x=null!=(t=null==o?void 0:o.hashtagSummerCampaignName)?t:"Summer Campaign",h=null!=(s=null==o?void 0:o.hashtagKeyword)?s:"summer",[f,g]=(0,i.useState)(!1),[b,v]=(0,i.useState)({x:0,y:0}),[y,N]=(0,i.useState)(!1),[k,C]=(0,i.useState)(!1),[T,P]=(0,i.useState)(""),[A,z]=(0,i.useState)(""),[R,E]=(0,i.useState)(!1),[M,B]=(0,i.useState)(!1),[I,L]=(0,i.useState)([]),[F,D]=(0,i.useState)([]),[$,_]=(0,i.useState)(null),[O,U]=(0,i.useState)(!1),G=(0,i.useRef)(null),H=(0,i.useRef)(null),q=(0,i.useRef)(null),X=(0,i.useRef)(null),W=(0,i.useRef)(null),J=(0,i.useRef)({}),Z=(0,i.useRef)(0),V=K(),Q=(0,i.useRef)(V);(0,i.useEffect)(()=>{Q.current=V},[V]);let ee=async()=>{let e=++Z.current;if(g(!1),N(!1),C(!1),P(""),z(""),E(!1),B(!1),L([]),D([]),_(null),U(!1),await new Promise(e=>setTimeout(e,800)),e!==Z.current||!H.current||!G.current)return;let t=G.current.getBoundingClientRect(),s=H.current.getBoundingClientRect(),a=Q.current;if(v({x:(s.left-t.left+s.width/2)/a,y:(s.top-t.top+s.height/2)/a}),g(!0),await new Promise(e=>setTimeout(e,700)),N(!0),await new Promise(e=>setTimeout(e,200)),N(!1),g(!1),C(!0),await new Promise(e=>setTimeout(e,400)),e!==Z.current)return;for(let e=0;e<=x.length;e++)P(x.slice(0,e)),await new Promise(e=>setTimeout(e,40));if(await new Promise(e=>setTimeout(e,400)),e!==Z.current)return;for(let e=0;e<=h.length;e++)z(h.slice(0,e)),await new Promise(e=>setTimeout(e,55));if(await new Promise(e=>setTimeout(e,400)),e===Z.current){if(q.current&&G.current){let e=G.current.getBoundingClientRect(),t=q.current.getBoundingClientRect(),s=Q.current;v({x:(t.left-e.left+t.width/2)/s,y:(t.top-e.top+t.height/2)/s}),g(!0),await new Promise(e=>setTimeout(e,600)),N(!0),await new Promise(e=>setTimeout(e,200)),N(!1),g(!1)}if((E(!0),await new Promise(e=>setTimeout(e,1200)),e===Z.current)&&(E(!1),B(!0),await new Promise(e=>setTimeout(e,500)),e===Z.current)){for(let t of d){if(e!==Z.current)return;let s=J.current[t];if(s&&G.current){let a=G.current.getBoundingClientRect(),i=s.getBoundingClientRect(),n=Q.current;if(v({x:(i.left-a.left+i.width/2)/n,y:(i.top-a.top+i.height/2)/n}),g(!0),await new Promise(e=>setTimeout(e,500)),e!==Z.current)return;N(!0),L(e=>e.includes(t)?e:[...e,t]),await new Promise(e=>setTimeout(e,200)),N(!1),g(!1),await new Promise(e=>setTimeout(e,250))}}
1if(await new Promise(e=>setTimeout(e,400)),X.current&&G.current){let e=G.current.getBoundingClientRect(),t=X.current.getBoundingClientRect(),s=Q.current;v({x:(t.left-e.left+t.width/2)/s,y:(t.top-e.top+t.height/2)/s}),g(!0),await new Promise(e=>setTimeout(e,600)),N(!0),await new Promise(e=>setTimeout(e,200)),N(!1),g(!1)}if(D(d),B(!1),L([]),z(""),await new Promise(e=>setTimeout(e,600)),W.current&&G.current){let e=G.current.getBoundingClientRect(),t=W.current.getBoundingClientRect(),s=Q.current;v({x:(t.left-e.left+t.width/2)/s,y:(t.top-e.top+t.height/2)/s}),g(!0),await new Promise(e=>setTimeout(e,600)),N(!0),await new Promise(e=>setTimeout(e,200)),N(!1),g(!1)}C(!1),_({name:x,tags:d}),await new Promise(e=>setTimeout(e,1e3)),U(!0)}}};return(0,i.useEffect)(()=>{ee()},[]),(0,a.jsxs)("div",{ref:G,className:"relative w-full h-full min-h-[350px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsx)(e7,{show:f,x:b.x,y:b.y,clicked:y}),(0,a.jsxs)("div",{className:"w-full max-w-md space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)("span",{className:"text-sm font-semibold",children:c(null==o?void 0:o.hashtagCollections,"Hashtag Collections")})}),(0,a.jsxs)(m.$,{ref:H,variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",children:[(0,a.jsx)(S.A,{className:"h-3.5 w-3.5"}),c(null==o?void 0:o.newCollection,"New Collection")]})]}),(0,a.jsxs)("div",{className:"overflow-hidden rounded-md border bg-background",children:[(Array.isArray(null==o?void 0:o.hashtagInitialTags)&&(null==o?void 0:o.hashtagInitialCollectionName)?[{id:"1",name:o.hashtagInitialCollectionName,tags:o.hashtagInitialTags}]:tc).map(e=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 p-3 border-b last:border-0",children:[(0,a.jsxs)("div",{className:"flex-1 space-y-1.5",children:[(0,a.jsx)("p",{className:"text-xs font-medium",children:String(e.name)}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:e.tags.map(e=>(0,a.jsx)(eW.Badge,{variant:"secondary",className:"text-[10px] font-normal",children:String(e)},String(e)))})]}),(0,a.jsx)(m.$,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",children:(0,a.jsx)(eX.A,{className:"h-3.5 w-3.5"})})]},e.id)),(0,a.jsx)(w.N,{children:$&&(0,a.jsxs)(j.P.div,{initial:{opacity:0,y:-6},animate:{opacity:1,y:0},className:"flex items-start justify-between gap-3 p-3 border-b last:border-0",children:[(0,a.jsxs)("div",{className:"flex-1 space-y-1.5",children:[(0,a.jsx)("p",{className:"text-xs font-medium",children:$.name}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:$.tags.map(e=>(0,a.jsx)(eW.Badge,{variant:"secondary",className:"text-[10px] font-normal",children:e},e))})]}),(0,a.jsx)(m.$,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",children:(0,a.jsx)(eX.A,{className:"h-3.5 w-3.5"})})]})})]})]}),(0,a.jsx)(w.N,{children:k&&(0,a.jsx)(j.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-40 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4",children:(0,a.jsxs)(j.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:"bg-background rounded-lg shadow-2xl w-full max-w-[440px] overflow-visible",children:[(0,a.jsx)("div",{className:"p-4 border-b",children:(0,a.jsx)("h3",{className:"font-semibold text-sm",children:c(null==o?void 0:o.newHashtagCollection,"New Hashtag Collection")})}),(0,a.jsxs)("div",{className:"p-4 space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(ey.J,{className:"text-xs font-medium",children:c(null==o?void 0:o.collectionName,"Collection name")}),(0,a.jsx)(ew.p,{value:T,readOnly:!0,className:"h-9 text-sm",placeholder:c(null==o?void 0:o.hashtagPlaceholder,"e.g. Summer Campaign")})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(ey.J,{className:"text-xs font-medium",children:c(null==o?void 0:o.addHashtags,"Add hashtags")}),(0,a.jsxs)("div",{className:"flex gap-2 relative",children:[(0,a.jsx)(ew.p,{value:A,readOnly:!0,className:"h-9 text-sm flex-1",placeholder:c(null==o?void 0:o.enterKeywordPlaceholder,"Enter a keyword…")}),(0,a.jsx)(m.$,{type:"button",variant:"outline",size:"sm",className:"h-9 px-3 shrink-0",children:c(null==o?void 0:o.addButton,"Add")}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(m.$,{ref:q,type:"button",variant:"outline",size:"sm",className:"h-9 w-9 p-0 shrink-0",children:R?(0,a.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}):(0,a.jsx)(Y.A,{className:"h-4 w-4"})}),(0,a.jsx)(w.N,{children:M&&(0,a.jsxs)(j.P.div,{initial:{opacity:0,y:-4,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-4,scale:.97},className:"absolute top-full right-0 mt-2 w-72 bg-popover border rounded-lg shadow-lg z-[60] p-3 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(ey.J,{className:"text-xs font-medium",children:c(null==o?void 0:o.aiSuggestions,"AI Suggestions")}),I.length>0&&(0,a.jsxs)(m.$,{ref:X,type:"button",size:"sm",className:"h-7 px-2 text-xs",children:[c(null==o?void 0:o.addSelected,"Add Selected")," (",I.length,")"]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:u.map(e=>{let t=I.includes(e);return(0,a.jsx)("div",{ref:t=>{J.current[e]=t},children:(0,a.jsx)(eW.Badge,{variant:t?"default":"secondary",className:(0,p.cn)("cursor-pointer transition-all text-[11px]",t?"ring-2 ring-primary/20 scale-105":"hover:bg-primary/10"),children:e})},e)})})]})})]})]})]}),F.length>0&&(0,a.jsx)(j.P.div,{initial:{opacity:0}
1,animate:{opacity:1},className:"flex flex-wrap gap-1.5",children:F.map(e=>(0,a.jsxs)(eW.Badge,{variant:"secondary",className:"text-xs font-normal flex items-center gap-1.5 pr-1.5",children:[e,(0,a.jsx)(e8.A,{className:"h-3 w-3 text-muted-foreground"})]},e))})]}),(0,a.jsxs)("div",{className:"p-4 pt-0 flex justify-end gap-2",children:[(0,a.jsx)(m.$,{variant:"outline",size:"sm",className:"h-9 text-sm",children:c(null==o?void 0:o.cancel,"Cancel")}),(0,a.jsx)(m.$,{ref:W,size:"sm",className:"h-9 text-sm",children:c(null==o?void 0:o.createCollection,"Create Collection")})]})]})})}),O&&(0,a.jsx)(te,{onClick:ee,replayLabel:null==o?void 0:o.replay})]})}let tx=[{id:"1",name:"Call to Action",texts:["Check the link in bio for more!","Follow us for daily updates \uD83D\uDCF2"]}];function tp(e,t){return e.length>t?e.slice(0,t)+"…":e}let th=["Don't miss our limited-time offer! \uD83D\uDD25","Shop now and save 20% with code SUMMER"];function tf(){var e,t,s;let n=(0,l.useMessages)(),r=null==n||null==(e=n.onboarding)?void 0:e.animations,o=null==r?void 0:r.settings,c=(e,t)=>String(null!=e?e:t),d=null!=(t=null==o?void 0:o.initialSnippetCollectionName)?t:"Call to Action",u=Array.isArray(null==o?void 0:o.initialSnippetTexts)?o.initialSnippetTexts:tx[0].texts,x=null!=(s=null==o?void 0:o.specialOfferCollectionName)?s:"Special Offer",p=Array.isArray(null==o?void 0:o.snippetsToAdd)?o.snippetsToAdd:th,[h,f]=(0,i.useState)(!1),[g,b]=(0,i.useState)({x:0,y:0}),[v,y]=(0,i.useState)(!1),[N,k]=(0,i.useState)(!1),[C,T]=(0,i.useState)(""),[P,A]=(0,i.useState)(""),[z,R]=(0,i.useState)([]),[E,M]=(0,i.useState)(null),[B,I]=(0,i.useState)(!1),L=(0,i.useRef)(null),F=(0,i.useRef)(null),D=(0,i.useRef)(null),$=(0,i.useRef)(null),_=(0,i.useRef)(!1),O=K(),U=(0,i.useRef)(O);(0,i.useEffect)(()=>{U.current=O},[O]);let G=async()=>{if(_.current||(_.current=!0,f(!1),y(!1),k(!1),T(""),A(""),R([]),M(null),I(!1),await new Promise(e=>setTimeout(e,800)),!F.current||!L.current))return;let e=L.current.getBoundingClientRect(),t=F.current.getBoundingClientRect(),s=U.current;b({x:(t.left-e.left+t.width/2)/s,y:(t.top-e.top+t.height/2)/s}),f(!0),await new Promise(e=>setTimeout(e,700)),y(!0),await new Promise(e=>setTimeout(e,200)),y(!1),f(!1),k(!0),await new Promise(e=>setTimeout(e,400));for(let e=0;e<=x.length;e++)T(x.slice(0,e)),await new Promise(e=>setTimeout(e,45));for(let e of p){await new Promise(e=>setTimeout(e,350));for(let t=0;t<=e.length;t++)A(e.slice(0,t)),await new Promise(e=>setTimeout(e,28));if(await new Promise(e=>setTimeout(e,300)),D.current&&L.current){let e=L.current.getBoundingClientRect(),t=D.current.getBoundingClientRect(),s=U.current;b({x:(t.left-e.left+t.width/2)/s,y:(t.top-e.top+t.height/2)/s}),f(!0),await new Promise(e=>setTimeout(e,500)),y(!0),await new Promise(e=>setTimeout(e,200)),y(!1),f(!1)}R(t=>[...t,e]),A(""),await new Promise(e=>setTimeout(e,200))}if(await new Promise(e=>setTimeout(e,500)),$.current&&L.current){let e=L.current.getBoundingClientRect(),t=$.current.getBoundingClientRect(),s=U.current;b({x:(t.left-e.left+t.width/2)/s,y:(t.top-e.top+t.height/2)/s}),f(!0),await new Promise(e=>setTimeout(e,600)),y(!0),await new Promise(e=>setTimeout(e,200)),y(!1),f(!1)}k(!1),M({name:x,texts:p}),await new Promise(e=>setTimeout(e,1e3)),I(!0),_.current=!1};return(0,i.useEffect)(()=>{G()},[]),(0,a.jsxs)("div",{ref:L,className:"relative w-full h-full min-h-[350px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsx)(e7,{show:h,x:g.x,y:g.y,clicked:v}
1),(0,a.jsxs)("div",{className:"w-full max-w-md space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)("span",{className:"text-sm font-semibold",children:c(null==o?void 0:o.textSnippets,"Text Snippets")})}),(0,a.jsxs)(m.$,{ref:F,variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",children:[(0,a.jsx)(S.A,{className:"h-3.5 w-3.5"}),c(null==o?void 0:o.newCollection,"New Collection")]})]}),(0,a.jsxs)("div",{className:"overflow-hidden rounded-md border bg-background",children:[[{id:"1",name:d,texts:u}].map(e=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4 p-4 border-b last:border-0",children:[(0,a.jsxs)("div",{className:"flex-1 space-y-1.5",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:e.texts.map(e=>(0,a.jsxs)(eW.Badge,{variant:"secondary",className:"font-normal flex items-center gap-1 text-xs",children:[(0,a.jsx)(e6.A,{className:"h-3 w-3 shrink-0"}),tp(e,30)]},e))})]}),(0,a.jsx)(m.$,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",children:(0,a.jsx)(eX.A,{className:"h-4 w-4"})})]},e.id)),(0,a.jsx)(w.N,{children:E&&(0,a.jsxs)(j.P.div,{initial:{opacity:0,y:-6},animate:{opacity:1,y:0},className:"flex items-start justify-between gap-4 p-4 border-b last:border-0",children:[(0,a.jsxs)("div",{className:"flex-1 space-y-1.5",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:E.name}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:E.texts.map(e=>(0,a.jsxs)(eW.Badge,{variant:"secondary",className:"font-normal flex items-center gap-1 text-xs",children:[(0,a.jsx)(e6.A,{className:"h-3 w-3 shrink-0"}),tp(e,30)]},e))})]}),(0,a.jsx)(m.$,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",children:(0,a.jsx)(eX.A,{className:"h-4 w-4"})})]})})]})]}),(0,a.jsx)(w.N,{children:N&&(0,a.jsx)(j.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-40 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4",children:(0,a.jsxs)(j.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:"bg-background rounded-lg shadow-2xl w-full max-w-[560px] overflow-hidden",children:[(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)("h3",{className:"font-semibold text-sm",children:c(null==o?void 0:o.newTextCollection,"New Text Collection")})}),(0,a.jsxs)("div",{className:"px-4 pb-4 space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(ey.J,{className:"text-xs font-medium",children:c(null==o?void 0:o.collectionName,"Collection name")}),(0,a.jsx)(ew.p,{value:C,readOnly:!0,className:"h-9 text-sm",placeholder:c(null==o?void 0:o.snippetPlaceholder,"e.g. Special Offer")})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(ey.J,{className:"text-xs font-medium",children:c(null==o?void 0:o.addSnippet,"Add snippet")}),(0,a.jsxs)("div",{className:"relative rounded-md border bg-background focus-within:border-primary/30",children:[(0,a.jsxs)("div",{className:"min-h-[44px] w-full p-3 pb-1 text-sm whitespace-pre-wrap break-words text-foreground",style:{fontFamily:"inherit"},children:[P,(0,a.jsx)("span",{className:"inline-block w-0.5 h-4 bg-foreground ml-0.5 animate-pulse align-middle"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-1 px-2 pb-2",children:[(0,a.jsx)("div",{className:"h-6 w-6 rounded flex items-center justify-center text-muted-foreground",children:(0,a.jsx)(Y.A,{className:"h-4 w-4"})}),(0,a.jsx)("div",{className:"h-6 w-6 rounded flex items-center justify-center text-muted-foreground",children:(0,a.jsx)(q.A,{className:"h-4 w-4"})}),(0,a.jsx)("div",{className:"h-6 w-6 rounded flex items-center justify-center text-muted-foreground",children:(0,a.jsx)(X.A,{className:"h-4 w-4"})})]})]}),(0,a.jsx)(m.$,{ref:D,type:"button",className:"w-full h-9 text-sm",disabled:!P.trim(),children:c(null==o?void 0:o.addSnippetButton,"Add snippet")})]}),z.length>0&&(0,a.jsxs)(j.P.div,{initial:{opacity:0}
1,animate:{opacity:1},className:"space-y-2",children:[(0,a.jsx)(ey.J,{className:"text-xs font-medium",children:c(null==o?void 0:o.snippets,"Snippets")}),(0,a.jsx)("div",{className:"space-y-2 max-h-32 overflow-y-auto",children:z.map((e,t)=>(0,a.jsxs)(j.P.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},className:"flex items-start gap-2 p-2 border rounded-md",children:[(0,a.jsx)(e6.A,{className:"h-4 w-4 mt-0.5 text-muted-foreground shrink-0"}),(0,a.jsx)("p",{className:"flex-1 text-sm leading-snug",children:e}),(0,a.jsx)(m.$,{variant:"ghost",size:"icon",className:"h-6 w-6 p-0 text-muted-foreground shrink-0",children:(0,a.jsx)(e8.A,{className:"h-3 w-3"})})]},t))})]})]}),(0,a.jsxs)("div",{className:"p-4 pt-0 flex justify-end gap-2",children:[(0,a.jsx)(m.$,{variant:"outline",size:"sm",className:"h-9 text-sm",children:c(null==o?void 0:o.cancel,"Cancel")}),(0,a.jsx)(m.$,{ref:$,size:"sm",className:"h-9 text-sm",children:c(null==o?void 0:o.createCollection,"Create Collection")})]})]})})}),B&&(0,a.jsx)(te,{onClick:G,replayLabel:null==o?void 0:o.replay})]})}var tg=s(35974);function tb(e){let{show:t,x:s,y:i,clicked:n}=e;return(0,a.jsx)(w.N,{children:t&&(0,a.jsx)(j.P.div,{className:"pointer-events-none absolute z-50",initial:{opacity:0}
1,animate:{opacity:1,left:s,top:i},exit:{opacity:0},transition:{left:{type:"spring",stiffness:300,damping:30},top:{type:"spring",stiffness:300,damping:30},opacity:{duration:.15}},style:{left:s,top:i},children:(0,a.jsx)(j.P.div,{animate:{scale:n?.8:1},transition:{duration:.1},children:(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,a.jsx)("path",{d:"M4 2L16 10L10 11.5L7.5 17L4 2Z",fill:"white",stroke:"#374151",strokeWidth:"1.5",strokeLinejoin:"round"})})})})})}let tv={instagram:{icon:es.ao,color:"text-pink-500"},facebook:{icon:es.iY,color:"text-blue-500"},twitter:{icon:es.TC,color:"text-foreground"},linkedin:{icon:es.QE,color:"text-blue-600"}},tj=[{id:"1",text:"Summer collection launch \uD83C\uDF0A Check out our new arrivals and get 20% off this week!",status:"published",accounts:["instagram","facebook"],timeLabel:"2 hours ago",image:"https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=64&h=64&fit=crop"},{id:"2",text:"Weekend vibes ✨ Join us at the pop-up event this Saturday. Tag a friend!",status:"published",accounts:["instagram"],timeLabel:"Yesterday",image:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=64&h=64&fit=crop"},{id:"3",text:"Excited to share our Q3 product launch! Stay tuned for something really special...",status:"scheduled",accounts:["linkedin","twitter"],timeLabel:"Tomorrow, 10:00 AM",image:null},{id:"4",text:"Tips for growing your audience organically in 2025. Thread coming soon \uD83E\uDDF5",status:"scheduled",accounts:["instagram","twitter"],timeLabel:"Friday, 2:00 PM",image:"https://images.unsplash.com/photo-1501854140801-50d01698950b?w=64&h=64&fit=crop"},{id:"5",text:"Working on some new content ideas for next month. Here's a sneak peek...",status:"draft",accounts:["facebook"],timeLabel:"Edited just now",image:null}];function tw(e){var t,s,i;let{status:n,labels:l}=e;return"published"===n?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",children:[(0,a.jsx)(tg.A,{className:"h-2.5 w-2.5"}),null!=(t=null==l?void 0:l.published)?t:"Published"]}):"scheduled"===n?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",children:[(0,a.jsx)(I.A,{className:"h-2.5 w-2.5"}),null!=(s=null==l?void 0:l.scheduled)?s:"Scheduled"]}):(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-muted text-muted-foreground",children:[(0,a.jsx)(e6.A,{className:"h-2.5 w-2.5"}),null!=(i=null==l?void 0:l.draft)?i:"Draft"]})}function ty(){var e,t,s,n,r;let o=(0,l.useMessages)(),c=null==o||null==(e=o.onboarding)?void 0:e.animations,d=null==c?void 0:c.posts,u=[{key:"all",label:null!=(t=null==d?void 0:d.all)?t:"All"},{key:"published",label:null!=(s=null==d?void 0:d.published)?s:"Published"},{key:"scheduled",label:null!=(n=null==d?void 0:d.scheduled)?n:"Scheduled"},{key:"draft",label:null!=(r=null==d?void 0:d.draft)?r:"Draft"}],[m,x]=(0,i.useState)(!1),[h,f]=(0,i.useState)({x:0,y:0}),[g,b]=(0,i.useState)(!1),[v,y]=(0,i.useState)("all"),N=(0,i.useRef)(null),k=(0,i.useRef)({}),C=(0,i.useRef)(!0),T=K(),P=(0,i.useRef)(T);(0,i.useEffect)(()=>{P.current=T},[T]);let A="all"===v?tj:tj.filter(e=>e.status===v),S=(0,i.useCallback)(async e=>{let t=k.current[e];if(!t||!N.current||!C.current)return;let s=N.current.getBoundingClientRect(),a=t.getBoundingClientRect(),i=P.current;f({x:(a.left-s.left+a.width/2)/i,y:(a.top-s.top+a.height/2)/i}),x(!0),await new Promise(e=>setTimeout(e,500)),C.current&&(b(!0),await new Promise(e=>setTimeout(e,150)),C.current&&(b(!1),y(e),x(!1)))},[]),z=(0,i.useCallback)(async()=>{if(x(!1),b(!1),y("all"),await new Promise(e=>setTimeout(e,900)),C.current&&(await S("draft"),await new Promise(e=>setTimeout(e,900)),C.current))await S("scheduled"),await new Promise(e=>setTimeout(e,900)),C.current&&(await S("published"),await new Promise(e=>setTimeout(e,900)),C.current&&(await S("all"),await new Promise(e=>setTimeout(e,800))))},[S]);return(0,i.useEffect)(()=>(C.current=!0,(async()=>{for(;C.current;)await z(),await new Promise(e=>setTimeout(e,600))})(),()=>{C.current=!1}),[z]),(0,a.jsxs)("div",{ref:N,className:"relative w-full h-full min-h-[350px] flex items-center justify-center bg-muted/5 overflow-hidden p-4",children:[(0,a.jsx)(tb,{show:m,x:h.x,y:h.y,clicked:g}
1),(0,a.jsxs)("div",{className:"w-full max-w-md space-y-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-1 bg-muted/50 rounded-lg p-1",children:u.map(e=>(0,a.jsx)("button",{ref:t=>{k.current[e.key]=t},className:(0,p.cn)("flex-1 text-xs font-medium py-1.5 px-2 rounded-md transition-all",v===e.key?"bg-background shadow-sm text-foreground":"text-muted-foreground"),children:e.label},e.key))}),(0,a.jsx)("div",{className:"overflow-hidden rounded-md border bg-background divide-y",children:(0,a.jsx)(w.N,{mode:"popLayout",initial:!1,children:A.map(e=>(0,a.jsxs)(j.P.div,{layout:!0,initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,height:0,padding:0},transition:{duration:.2},className:"flex items-start gap-3 p-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-md overflow-hidden bg-muted flex-shrink-0",children:e.image?(0,a.jsx)("img",{src:e.image,alt:"",className:"w-full h-full object-cover"}):(0,a.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,a.jsx)(e6.A,{className:"h-4 w-4 text-muted-foreground"})})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 space-y-1.5",children:[(0,a.jsx)("p",{className:"text-xs text-foreground line-clamp-2 leading-relaxed",children:e.text}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex items-center gap-1",children:e.accounts.map(e=>{let t=tv[e];if(!t)return null;let{icon:s,color:i}=t;return(0,a.jsx)(s,{className:(0,p.cn)("h-3 w-3",i)},e)})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(tw,{status:e.status,labels:d}),(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.timeLabel})]})]})]})]},e.id))})})]})]})}function tN(e){var t,s,x,p,g,v,j,w,y,N,k,C,T,P,A,S,z,R;let{step:E,onSkipRequested:M}=e,{progress:B,canGoBack:I,isLastStep:L,nextStep:F,previousStep:D}=(0,n.z)(),[$,_]=(0,i.useState)(0),[O,U]=(0,i.useState)(null),K=(0,i.useRef)(null),H=(0,i.useRef)(null),Y=(0,i.useRef)(null),q=(0,i.useRef)(null),[X,W]=(0,i.useState)(1),J=(0,l.useLocale)(),Z=(0,l.useMessages)(),V=null!=(x=null==Z?void 0:Z.onboarding)?x:{},Q=null!=(p=null==V?void 0:V.steps)?p:{},ee=null!=(g=null==V?void 0:V.actions)?g:{},et=null!=(v=Q[E.id])?v:{},es=null!=(j=et.slides)?j:{},ea=null!=(w=ee.back)?w:"Back",ei=null!=(y=ee.skip)?y:"Skip",en=null!=(N=ee.complete)?N:"Complete",el=null!=(k=ee.next)?k:"Next",er=(0,r.a)(),eo=(0,i.useMemo)(()=>(0,b.V)(),[]),ec=E.images||[],ed=ec.length>0,ex=ec[$],ep=(0,e$.OG)(null==ex?void 0:ex.component)?ex.component:null;(0,i.useEffect)(()=>{let e=Y.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect(),s=t.width,a=t.height,i=Math.min(1,s/800);((null==ex?void 0:ex.component)==="copy-to-all-animation"||"caption-sync-animation"===ep)&&(i=Math.min(i,a/620)),"recurring-post-animation"===ep&&(i=Math.min(i,a/490)),W(i)};t();let s=new ResizeObserver(t);return s.observe(e),()=>s.disconnect()},[ed,null==ex?void 0:ex.component,ep]);let eg=(0,i.useCallback)(async e=>{try{let t=await eo.waitForElement(e,8e3);U(t)}catch(e){U(null)}},[eo]);(0,i.useEffect)(()=>{E.targetSelector?eg(E.targetSelector):U(null)},[E.targetSelector,eg]);let eb=()=>{L&&$===ec.length-1?F():$<ec.length-1?_($+1):F()},ev=()=>{$>0?_($-1):D()},ej=(0,i.useCallback)(e=>{var t;let s=null!=(t=e.touches[0])?t:e.targetTouches[0];s?(K.current=s.clientX,H.current=s.clientY):(K.current=null,H.current=null)},[]),ew=(0,i.useCallback)(e=>{if(null==K.current)return;let t=e.changedTouches[0];if(!t){K.current=null,H.current=null;return}let s=t.clientX-K.current;K.current=null,H.current=null,50>Math.abs(s)||(s<0?eb():ev())},[eb,ev]);return(0,i.useEffect)(()=>{let e=q.current;if(!e)return;let t=e=>{if(null==K.current||null==H.current)return;let t=e.touches[0];if(!t)return;let s=t.clientX-K.current,a=t.clientY-H.current;Math.abs(s)>15&&Math.abs(s)>Math.abs(a)&&e.preventDefault()};return e.addEventListener("touchmove",t,{passive:!1}),()=>e.removeEventListener("touchmove",t)},[]),(0,i.useEffect)(()=>{let e=e=>{if(!("Enter"===e.key&&e.target instanceof Element&&e.target.closest("a, button, input"))){if("Enter"===e.key||"ArrowRight"===e.key){if(L)return;e.preventDefault(),eb();return}"ArrowLeft"===e.key&&(e.preventDefault(),ev())}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[$,ec.length,L]),(0,a.jsxs)(a.Fragment,{children:[O&&(0,a.jsx)(o,{targetElement:O,padding:null!=(C=E.highlightPadding)?C:8,type:"spotlight"}),(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-[9998] pointer-events-auto"}),(0,a.jsx)("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4 pointer-events-none",children:(0,a.jsx)("div",{className:"pointer-events-auto w-full max-w-4xl",children:(0,a.jsxs)("div",{ref:q,className:"rounded-lg overflow-y-auto max-h-[95dvh] flex flex-col select-none bg-white dark:bg-neutral-800",style:{boxShadow:"-3rem 2rem 7rem -2rem rgba(255, 228, 230, 0.4), 3rem -2rem 7rem -2rem rgba(224, 242, 254, 0.4)",touchAction:"pan-y"},onTouchStart:ej,onTouchEnd:ew,children:[ed&&ex&&(0,a.jsx)("div",{ref:Y,className:"relative shrink-0 pointer-events-none aspect-video bg-neutral-100 dar
1k:bg-neutral-900",children:"component"===ex.type?(0,a.jsx)(G.Provider,{value:X,children:(0,a.jsx)("div",{className:"absolute inset-0 overflow-hidden",style:X<1?{display:"flex",alignItems:"center",justifyContent:"center"}:void 0,children:(0,a.jsx)("div",{style:X<1?{width:"".concat(100/X,"%"),height:"".concat(100/X,"%"),transform:"scale(".concat(X,")"),transformOrigin:"center center",position:"relative",flexShrink:0}:{width:"100%",height:"100%",position:"relative"},children:ep?(0,a.jsx)(eD,{kind:ep},ex.component):"connect-accounts-animation"===ex.component?(0,a.jsx)(eH,{}):"groups-animation"===ex.component?(0,a.jsx)(eZ,{}):"refresh-accounts-animation"===ex.component?(0,a.jsx)(e0,{}):"media-upload-animation"===ex.component?(0,a.jsx)(eM,{}):"media-canva-animation"===ex.component?(0,a.jsx)(eB,{}):"media-folders-animation"===ex.component?(0,a.jsx)(eI,{}):"invite-members-animation"===ex.component?(0,a.jsx)(tn,{}):"timezone-animation"===ex.component?(0,a.jsx)(to,{}):"hashtag-collection-animation"===ex.component?(0,a.jsx)(tm,{}):"text-snippets-animation"===ex.component?(0,a.jsx)(tf,{}):"select-accounts-animation"===ex.component?(0,a.jsx)(eu,{}):"ai-caption-animation"===ex.component?(0,a.jsx)(em,{}):"copy-to-all-animation"===ex.component?(0,a.jsx)(eh,{}):"publish-options-animation"===ex.component?(0,a.jsx)(ef,{}):"posts-list-animation"===ex.component?(0,a.jsx)(ty,{}):null})})}):"video"===ex.type?(0,a.jsx)("video",{src:ex.url,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"w-full h-full object-contain"}):(0,a.jsx)(f.default,{src:ex.url,alt:ex.title,fill:!0,className:"object-contain",priority:0===$,unoptimized:"gif"===ex.type,quality:100,sizes:"(max-width: 896px) 100vw, 896px"})}),(0,a.jsxs)("div",{className:"p-4 sm:p-6 space-y-4 ".concat("quick-search-animation"===ep?"rounded-b-lg bg-white dark:bg-neutral-800":""),children:[(0,a.jsxs)("div",{className:"space-y-2 text-left",children:[(0,a.jsx)("h3",{className:"text-2xl font-semibold text-neutral-900 dark:text-white",children:null!=(A=null!=(P=null!=(T=(null==ex?void 0:ex.component)?null==(t=es[ex.component])?void 0:t.title:void 0)?T:null==ex?void 0:ex.title)?P:et.title)?A:E.title}
1),(0,a.jsx)("p",{className:"text-base text-neutral-600 dark:text-neutral-300",children:null!=(R=null!=(z=null!=(S=(null==ex?void 0:ex.component)?null==(s=es[ex.component])?void 0:s.description:void 0)?S:null==ex?void 0:ex.description)?z:et.description)?R:E.description})]}),(null==ex?void 0:ex.linkAction)&&(0,a.jsxs)("a",{href:(0,e$.l)(J,ex.linkAction.path),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-primary/30 px-3 py-2 text-sm font-medium text-primary hover:bg-primary/10",children:[ee[ex.linkAction.labelKey],(0,a.jsx)("span",{"aria-hidden":"true",children:"↗"}),(0,a.jsx)("span",{className:"sr-only",children:ee.opensNewTab})]}),ed&&ec.length>1&&(0,a.jsx)("div",{className:"flex justify-center gap-2 py-2",children:ec.map((e,t)=>{var s;return(0,a.jsx)("button",{onClick:()=>_(t),className:"h-2 rounded-full transition-all ".concat(t===$?"w-8 bg-neutral-900 dark:bg-white":"w-2 bg-neutral-300 dark:bg-neutral-600"),"aria-label":(null!=(s=ee.goToSlide)?s:"Go to slide {number}").replace("{number}",String(t+1)),"aria-current":t===$?"step":void 0},t)})}),(0,a.jsxs)("div",{className:"flex gap-4 pt-2 ".concat(er?"flex-col":"items-center justify-between"),children:[E.order>0&&(0,a.jsx)("div",{className:er?"w-full":"flex-1 max-w-xs",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("span",{className:"text-sm text-neutral-600 dar
1k:text-neutral-400 whitespace-nowrap",children:[B.currentStep,"/",B.totalSteps]}),(0,a.jsx)(h,{value:B.percentage,className:"h-1.5 flex-1"})]})}),(0,a.jsxs)("div",{className:"flex items-center gap-3 ".concat(er?"w-full justify-between":"ml-auto"),children:[(I||$>0)&&(0,a.jsxs)(m.$,{variant:"outline",size:"sm",onClick:ev,className:"gap-2",children:[(0,a.jsx)(c.A,{className:"w-4 h-4"}),ea]}),(0,a.jsx)(m.$,{variant:"ghost",size:"sm",onClick:()=>{window.dispatchEvent(new CustomEvent(tM)),null==M||M()},children:ei}),(0,a.jsx)(m.$,{onClick:eb,size:"sm",className:"gap-2",children:L&&$===ec.length-1?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.A,{className:"w-4 h-4"}),en]}):(0,a.jsxs)(a.Fragment,{children:[el,(0,a.jsx)(u.A,{className:"w-4 h-4"})]})})]})]})]})]})})})]})}var tk=s(7553),tC=s(10481),tT=s(99273),tP=s(45895),tA=s(7994),tS=s(56354);let tz=[{stepId:"sidebar-create-post",icon:S.A,labelKey:"navigation.createPost"},{stepId:"sidebar-posts",icon:y.A,labelKey:"navigation.posts"},{stepId:"sidebar-calendar",icon:N.A,labelKey:"navigation.calendar"},{stepId:"sidebar-analytics",icon:k.A,labelKey:"navigation.analytics"},{stepId:"sidebar-media",icon:C.A,labelKey:"navigation.media"},{stepId:"sidebar-connections",icon:T.A,labelKey:"navigation.connections"},{stepId:"sidebar-settings",icon:P.A,labelKey:"navigation.settings"}],tR=[{icon:tk.A,labelKey:"userMenu.feedback"},{icon:tC.A,labelKey:"userMenu.changelog"},{icon:tT.A,labelKey:"userMenu.support"},{icon:tP.A,labelKey:"userMenu.productTour"},{icon:tA.A,labelKey:"theme.darkMode"},{icon:tS.A,labelKey:"userMenu.signOut",destructive:!0}];function tE(e){var t,s,r,o,x,f,g,b,v,j;let{step:w,onSkipRequested:y}=e,{progress:N,canGoBack:k,isLastStep:C,nextStep:T,previousStep:P}=(0,n.z)(),z=(0,l.useTranslations)("Dashboard"),R=(0,l.useMessages)(),M=null!=(t=null==R?void 0:R.onboarding)?t:{},B=null!=(s=null==M?void 0:M.steps)?s:{},I=null!=(r=null==M?void 0:M.actions)?r:{},L=null!=(o=B[w.id])?o:{},F=(0,i.useRef)(null),D=(0,i.useRef)(null),$=(0,i.useRef)(null),_=(0,i.useRef)(null),O=(0,i.useRef)(null),[U,G]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(!F.current||!D.current)return void G(null);let e=()=>{let e=F.current,t=D.current;if(!e||!t)return void G(null);let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();G({left:s.left-a.left-8,top:s.top-a.top-8,width:s.width+16,height:s.height+16,containerWidth:a.width,containerHeight:a.height})};e();let t=new ResizeObserver(e);return t.observe(F.current),t.observe(D.current),()=>t.disconnect()},[w.id]);let K=null!=(x=L.title)?x:w.title,H=null!=(f=L.description)?f:w.description,Y=null!=(g=I.back)?g:"Back",q=null!=(b=I.skip)?b:"Skip",X=null!=(v=I.complete)?v:"Complete",W=null!=(j=I.next)?j:"Next",J="replay-reminder"===w.id,Z="completion"===w.id,V=w.order>0&&!J,Q=()=>{T()},ee=(0,i.useCallback)(e=>{let t=e.touches[0];t?(_.current=t.clientX,O.current=t.clientY):(_.current=null,O.current=null)},[]),et=(0,i.useCallback)(e=>{if(null==_.current)return;let t=e.changedTouches[0];if(!t){_.current=null,O.current=null;return}let s=t.clientX-_.current;_.current=null,O.current=null,!(50>Math.abs(s))&&(s<0?Q():k&&P())},[Q,P,k]);return(0,i.useEffect)(()=>{let e=$.current;if(!e)return;let t=e=>{if(null==_.current||null==O.current)return;let t=e.touches[0];if(!t)return;let s=t.clientX-_.current,a=t.clientY-O.current;Math.abs(s)>15&&Math.abs(s)>Math.abs(a)&&e.preventDefault()};return e.addEventListener("touchmove",t,{passive:!1}),()=>e.removeEventListener("touchmove",t)},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 z-[9996] pointer-events-auto"}),(0,a.jsx)("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] px-4 py-8 pointer-events-none",children:(0,a.jsxs)("div",{ref:$,className:"pointer-events-auto w-full max-w-lg bg-white dark:bg-neutral-800 rounded-lg overflow-hidden flex flex-col select-none origin-center",style:{boxShadow:"-3rem 2rem 7rem -2rem rgba(255, 228, 230, 0.4), 3rem -2rem 7rem -2rem rgba(224, 242, 254, 0.4)",touchAction:"pan-y",transform:"scale(0.92)"},onTouchStart:ee,onTouchEnd:et,children:[(0,a.jsxs)("div",{ref:D,className:(0,p.cn)("relative flex flex-col","bg-[hsl(var(--sidebar-background))] text-sidebar-foreground","border-b border-sidebar-border",J?"p-2":"pt-4 px-2 pb-2"),children:[J?(0,a.jsxs)("div",{className:"flex flex-col items-center w-full",children:[(0,a.jsx)("div",{className:"w-[200px] bg-background rounded-md border border-border shadow-sm overflow-hidden",children:tR.map((e,t)=>{let s=e.icon,i="userMenu.productTour"===e.labelKey;return(0,a.jsxs)("div",{children:[(4===t||5===t)&&(0,a.jsx)("div",{className:"h-px bg-border my-1"}),(0,a.jsxs)("div",{ref:i?F:void 0,className:(0,p.cn)("flex items-center gap-2 px-3 py-2 cursor-default text-foreground",i&&"rounded-md"),children:[(0,a.jsx)(s,{className:(0,p.cn)("h-4 w-4 shrink-0",e.destructive&&"text-destructive")}
1),(0,a.jsx)("span",{className:(0,p.cn)("text-sm",e.destructive&&"text-destructive"),children:z(e.labelKey)})]})]},e.labelKey)})}),(0,a.jsxs)("div",{className:"flex items-center gap-3 w-[200px] h-10 mt-2 rounded-md px-2",children:[(0,a.jsx)("div",{className:"flex-shrink-0 flex items-center justify-center w-8 h-8 rounded-md bg-brand-gradient-theme text-primary-foreground text-xs font-medium",children:"U"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-sidebar-foreground truncate",children:z("userMenu.userLabel")}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:z("workspace.workspaceLabel")})]}),(0,a.jsx)(E.A,{className:"h-4 w-4 text-muted-foreground shrink-0"})]})]}):(0,a.jsx)("div",{className:"flex justify-center w-full",children:(0,a.jsxs)("div",{className:"flex flex-col gap-1 w-[200px]",children:[tz.map(e=>{let t=e.icon,s=e.stepId===w.id;return"sidebar-create-post"===e.stepId?(0,a.jsx)("div",{ref:s?F:void 0,className:"w-full transition-all rounded-md brand-gradient-outline",children:(0,a.jsxs)("div",{className:"flex items-center py-2 px-2",children:[(0,a.jsx)("div",{className:"flex-shrink-0 flex items-center justify-center w-8",children:(0,a.jsx)(S.A,{className:"h-4 w-4"})}),(0,a.jsx)("span",{className:"text-sm font-medium whitespace-nowrap flex-1",children:z(e.labelKey)})]})},e.stepId):(0,a.jsx)("div",{ref:s?F:void 0,className:(0,p.cn)("w-full transition-all rounded-md",!s&&"hover:bg-sidebar-accent"),children:(0,a.jsxs)("div",{className:(0,p.cn)("flex items-center py-2 px-2 rounded-md text-sidebar-foreground",s&&"text-theme-active-nav nav-item-active bg-theme-active-nav"),children:[(0,a.jsx)("div",{className:"flex-shrink-0 flex items-center w-8",children:(0,a.jsx)(t,{className:"h-4 w-4"})}),(0,a.jsx)("span",{className:"text-sm font-medium flex-1 truncate",children:z(e.labelKey)})]})},e.stepId)}),"sidebar-quick-search"===w.id&&(0,a.jsxs)("div",{ref:F,className:"mt-3 flex h-9 items-center gap-2 rounded-md border border-border bg-background px-2.5 text-sm text-muted-foreground",children:[(0,a.jsx)(A.A,{className:"size-4 shrink-0"}),(0,a.jsx)("span",{children:z("smartSearch.placeholder")})]})]})}),U&&(0,a.jsx)("div",{className:"absolute inset-0 pointer-events-none overflow-hidden","aria-hidden":!0,children:(0,a.jsxs)("svg",{className:"w-full h-full transition-all duration-300",viewBox:"0 0 ".concat(U.containerWidth," ").concat(U.containerHeight),preserveAspectRatio:"none",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("mask",{id:"mobile-menu-highlight-mask-".concat(w.id),children:[(0,a.jsx)("rect",{width:U.containerWidth,height:U.containerHeight,fill:"white"}),(0,a.jsx)("rect",{x:U.left,y:U.top,width:U.width,height:U.height,rx:6,ry:6,fill:"black"})]})}),(0,a.jsx)("rect",{width:U.containerWidth,height:U.containerHeight,fill:"rgba(0, 0, 0, 0.5)",mask:"url(#mobile-menu-highlight-mask-".concat(w.id,")")})]})})]}),(0,a.jsxs)("div",{className:"p-6 space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[K&&!J&&(0,a.jsx)("h3",{className:"text-lg font-semibold text-neutral-900 dark:text-white",children:K}
1),(0,a.jsx)("p",{className:"text-neutral-600 dark:text-neutral-300",children:H})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 pt-2",children:[V&&(0,a.jsx)("div",{className:"w-full",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("span",{className:"text-sm text-neutral-600 dark:text-neutral-400 whitespace-nowrap",children:[N.currentStep,"/",N.totalSteps]}),(0,a.jsx)(h,{value:N.percentage,className:"h-1.5 flex-1"})]})}),(0,a.jsxs)("div",{className:(0,p.cn)("flex items-center gap-3 w-full",J?"justify-end":"justify-between"),children:[k&&!J&&(0,a.jsxs)(m.$,{variant:"outline",size:"sm",onClick:P,className:"gap-2",children:[(0,a.jsx)(c.A,{className:"w-4 h-4"}),Y]}),!C&&!Z&&(0,a.jsx)(m.$,{variant:"ghost",size:"sm",onClick:()=>{window.dispatchEvent(new CustomEvent(tM)),null==y||y()},children:q}),(0,a.jsx)(m.$,{onClick:Q,size:"sm",className:"gap-2",children:C||Z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.A,{className:"w-4 h-4"}),X]}):(0,a.jsxs)(a.Fragment,{children:[W,(0,a.jsx)(u.A,{className:"w-4 h-4"})]})})]})]})]})]})})]})}let tM="tour-skip-requested",tB=new Set(["sidebar-quick-search","sidebar-connections","sidebar-media","sidebar-settings","sidebar-create-post","sidebar-calendar","sidebar-posts","sidebar-analytics","replay-reminder"]);function tI(){var e;let{shouldShow:t,currentStep:s,isLoading:c,nextStep:d}=(0,n.z)(),u=(0,r.a)(),[m,x]=(0,i.useState)(null),[p,h]=(0,i.useState)(!1),f=(0,i.useRef)(null),v=(0,i.useRef)(null),j=(0,i.useRef)(null),w=(0,i.useMemo)(()=>(0,b.V)(),[]),y=(0,l.useMessages)();null==y||y.onboarding;let N=(0,i.useCallback)(async e=>{h(!0);try{let t=await w.waitForElement(e,8e3);x(t)}catch(t){console.warn("Element not found: ".concat(e)),x(null)}finally{h(!1)}},[w]);(0,i.useEffect)(()=>{if(!t||!s||"modal"===s.type||"gallery"===s.type||"replay-reminder"===s.id||u&&"spotlight"===s.type&&tB.has(s.id))return void x(null);if(s.targetSelector){let e=setTimeout(()=>{N(s.targetSelector)},50);return()=>clearTimeout(e)}},[t,s,N,u]);let k=(0,i.useCallback)(()=>{w.goToStep("replay-reminder")},[w]),C=(0,i.useCallback)(e=>{let t=e.touches[0];t?(v.current=t.clientX,j.current=t.clientY):(v.current=null,j.current=null)},[]),T=(0,i.useCallback)(e=>{if(null==v.current)return;let t=e.changedTouches[0];if(!t){v.current=null,j.current=null;return}let s=t.clientX-v.current;v.current=null,j.current=null,s<-50&&d()},[d]);return((0,i.useEffect)(()=>{let e=f.current;if(!e||!u||(null==s?void 0:s.type)!=="modal")return;let t=e=>{if(null==v.current||null==j.current)return;let t=e.touches[0];if(!t)return;let s=t.clientX-v.current,a=t.clientY-j.current;Math.abs(s)>15&&Math.abs(s)>Math.abs(a)&&e.preventDefault()};return e.addEventListener("touchmove",t,{passive:!1}),()=>e.removeEventListener("touchmove",t)},[u,null==s?void 0:s.type]),!c&&t&&s)?"gallery"===s.type?(0,a.jsx)(tN,{step:s,onSkipRequested:k},s.id):"modal"===s.type?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 z-[9998] pointer-events-auto"}),(0,a.jsx)("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4 pointer-events-none overflow-y-auto",children:(0,a.jsx)("div",{ref:f,className:"pointer-events-auto w-full max-w-lg flex flex-col select-none rounded-lg ".concat(u?"max-h-[90vh] overflow-y-auto my-auto":""),style:u?{touchAction:"pan-y"}:void 0,onTouchStart:u?C:void 0,onTouchEnd:u?T:void 0,children:(0,a.jsx)(g,{step:s,onSkipRequested:k})})})]}):"replay-reminder"===s.id||u&&"spotlight"===s.type&&tB.has(s.id)?(0,a.jsx)(tE,{step:s,onSkipRequested:k}):!m||p?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o,{targetElement:m,padding:null!=(e=s.highlightPadding)?e:8,type:s.type}),(0,a.jsx)(g,{step:s,targetElement:m,position:s.position,onSkipRequested:k})]}):null}},70576:(e,t,s)=>{s.d(t,{BT:()=>c,Wu:()=>d,ZB:()=>o,Zp:()=>l,aR:()=>r,wL:()=>u});var a=s(7778),i=s(85418),n=s(25065);let l=i.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,a.jsx)("div",{ref:t,className:(0,n.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...i})});l.displayName="Card";let r=i.forwardRef((e,t)=>
1{let{className:s,...i}=e;return(0,a.jsx)("div",{ref:t,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",s),...i})});r.displayName="CardHeader";let o=i.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,a.jsx)("h3",{ref:t,className:(0,n.cn)("text-2xl font-semibold leading-none tracking-tight",s),...i})});o.displayName="CardTitle";let c=i.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,a.jsx)("p",{ref:t,className:(0,n.cn)("text-sm text-muted-foreground",s),...i})});c.displayName="CardDescription";let d=i.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,a.jsx)("div",{ref:t,className:(0,n.cn)("p-6 pt-0",s),...i})});d.displayName="CardContent";let u=i.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,a.jsx)("div",{ref:t,className:(0,n.cn)("flex items-center p-6 pt-0",s),...i})});u.displayName="CardFooter"},94799:(e,t,s)=>{s.d(t,{o4:()=>n,qX:()=>i}),s(7778);var a=s(11576);let i=a.F.threads,n=a.F.bluesky},97237:(e,t,s)=>{s.d(t,{S:()=>o});var a=s(7778),i=s(85418),n=s(34304),l=s(18545),r=s(25065);let o=i.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,a.jsx)(n.bL,{ref:t,className:(0,r.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...i,children:(0,a.jsx)(n.C1,{className:(0,r.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(l.A,{className:"h-4 w-4"})})})});o.displayName=n.bL.displayName}}]);

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.