1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[282],{2854:(e,t,r)=>{function a(e){if(!e)return!1;let t=String(e.format||"").toLowerCase(),r=String(e.platform||"").toLowerCase();return!(!(t.includes("reel")||t.includes("short")||"tiktok"===t||t.includes("video"))&&("tiktok"!==r||t.includes("photo")))}function n(e){return e&&a(e)?"manual_upload":"ai"}r.d(t,{Z_:()=>n,_s:()=>a})},7871:(e,t,r)=>{r.d(t,{c:()=>a});function a(e){let t=[];for(let r of e.split("\n")){let e=r.replace(/\r$/,"");!(!e||e.startsWith(":"))&&e.startsWith("data:")&&t.push(e.slice(5).trimStart())}return 0===t.length?null:t.join("\n")}},12414:(e,t,r)=>{r.d(t,{Ey:()=>n,IA:()=>i,Nl:()=>o,e8:()=>s,p:()=>a,xQ:()=>l});let a="I approve the design plan in Content Studio. Call render_design with the pending design spec and do not set compositePolish, or set compositePolish: false (use read_preview_context if the spec is not in context). For a blog/article outline-only plan (content_mode blog), call create_social_content with type blog using that outline as the core prompt instead of render_design.",n="I approve the design plan in Content Studio and I want the optional Gemini polish pass on the final composite(s). Call render_design with compositePolish: true and the pending design spec (use read_preview_context if the spec is not in context). For a blog/article outline-only plan (content_mode blog), call create_social_content with type blog using that outline as the core prompt instead of render_design.",i="I want to revise the design plan before rendering â adjust copy, typography/placement, or the background scene (revise_design_spec_stage), or regenerate the design spec / blog outline if needed.",s={approve:"Approved plan â render",approvePolish:"Approve + image polish",revise:"Revision \xb7 adjust spec",polish:"Refine shipped render"};function o(e){let t=(e||"").trim();return t===a.trim()?s.approve:t===n.trim()?s.approvePolish:t===i.trim()?s.revise:t==="I want to adjust the shipped static render (copy, typography, or scene). Call read_preview_context (lastRenderedDesignSpec, lastDesignBackgroundUrls), then refine_rendered_design with focus copy | typography | scene | both and a concrete instruction; explain credit cost briefly.".trim()?s.polish:null}function l(e){let t=e||"";return!!(/^\s*\[Strategy AI\]/i.test(t)||/subject:\s*\S/i.test(t)&&/placement:\s*\S/i.test(t)&&/rendering_style:\s*\S/i.test(t))}},32106:(e,t,r)=>{r.d(t,{cC:()=>a});
1function a(){let e="https://content-creator-python-t2bqjdww6q-as.a.run.app".trim();return e||("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?"http://127.0.0.1:8080":"https://content-creator-python-t2bqjdww6q-as.a.run.app")}},45723:(e,t,r)=>{r.d(t,{a8:()=>y,cE:()=>x,oX:()=>b});var a=r(31992),n=r(92551),i=r(47868),s=r(70948),o=r(73884),l=r(50057),d=r(31829),c=r(71252),p=r(32257),m=r(47798),g=r(60383),h=r(59435),u=r(82925);let x={instagram:{post:[{id:"inst-post-1",name:"Clean Graphic",description:"Minimalist design â white space, bold headline, product hero with clean graphic framing.",icon:a.A},{id:"inst-post-2",name:"Bold Statement",description:"Large impactful typography, high contrast color blocks, designed to stop the scroll.",icon:n.A},{id:"inst-post-3",name:"Product Feature",description:"Product as the hero element â graphic treatment with bold accents, badges, or callouts.",icon:i.A},{id:"inst-post-4",name:"Lifestyle Scene",description:"Talent + product in a natural scene with branded graphic overlays and color grading.",icon:s.A},{id:"inst-post-5",name:"Retro Aesthetic",description:"Vintage-inspired design â film grain, retro color palette, nostalgic typography and textures.",icon:o.A},{id:"inst-post-6",name:"Editorial Design",description:"Magazine-style layout â overlapping elements, editorial typography, sophisticated composition.",icon:l.A}],reel:[{id:"inst-reel-1",name:"Scenic Text Hook",description:"Moving scenery (walk, drive, pan) with bold animated text overlay that hooks viewers. Cinematic B-roll carries the visual while the text delivers the message.",icon:d.A},{id:"inst-reel-2",name:"Activity Opening",description:"Hook by opening mid-action â cooking, pouring, crafting, unboxing. Satisfying close-up process shots pull viewers in before the main content.",icon:d.A},{id:"inst-reel-3",name:"Transition Montage",description:"Creative zoom-throughs, whip pans, finger-snap cuts, outfit changes, match cuts. Rhythm-synced transitions that keep viewers watching.",icon:d.A},{id:"inst-reel-4",name:"Street Vox Pop",description:"Vlog-style asking random people a provocative question. Raw handheld footage, genuine reactions, unexpected answers.",icon:d.A},{id:"inst-reel-5",name:"Trending Audio Sync",description:"Movement, dance, or lip-sync perfectly timed to a trending sound. The audio-visual sync IS the hook.",icon:d.A},{id:"inst-reel-6",name:"Problem â Solution",description:"Open with the pain point or problem, dramatic pause/transition, then satisfying solution reveal. Curiosity gap drives watch-through.",icon:d.A}],story:[{id:"inst-story-1",name:"Bold Graphic",description:"Big bold text overlay, color blocks, product cutout with graphic frames. Scroll-stopping design.",icon:c.A},{id:"inst-story-2",name:"Hype Drop",description:"Countdown/launch energy â gradient bursts, bold headline, product hero with glow effects.",icon:c.A},{id:"inst-story-3",name:"Quick Tip",description:"Educational card â numbered steps, clean icons, branded header bar. Saveable content.",icon:c.A},{id:"inst-story-4",name:"Poll/Question",description:"Engagement-first â bold question text, two-option layout, vibrant interactive design cues.",icon:c.A},{id:"inst-story-5",name:"Flash Promo",description:"Urgency design â price callouts, limited-time badge, product hero with bold CTA text.",icon:c.A},{id:"inst-story-6",name:"Aesthetic Collage",description:"Mood board style â layered product shots, texture overlays, handwritten-style accents.",icon:c.A}],carousel:[{id:"inst-car-1",name:"Educational Guide",description:"Informative slides with a structured flow.",icon:l.A},{id:"inst-car-2",name:"Storytelling Journey",description:"Narrative sequence with a beginning, middle, and end.",icon:l.A},{id:"inst-car-3",name:"Portfolio Showcase",description:"Multiple works presented in a cohesive theme.",icon:l.A},{id:"inst-car-4",name:"Feature Comparison",description:"Side-by-side analysis of products or ideas.",icon:l.A},{id:"inst-car-5",name:"Event Recap",description:"Chronological highlights from a recent gathering.",icon:l.A},{id:"inst-car-6",name:"Client Testimonials",description:"Success stories and feedback from customers.",icon:l.A}]}
1,tiktok:{video:[{id:"tt-vid-1",name:"Text-on-Motion Hook",description:"Bold text appears over moving scenery or B-roll â the text alone hooks in under 1 second. Walking, nature, city timelapse with provocative question overlay.",icon:d.A},{id:"tt-vid-2",name:"Process Hook",description:"Open mid-activity â pouring coffee, chopping, unpacking, assembling. The satisfying process IS the hook that keeps viewers watching before the message lands.",icon:d.A},{id:"tt-vid-3",name:"Zoom & Cut Transitions",description:"Creative camera tricks â punch-in zooms, jump cuts to the beat, object-to-object match cuts, POV transitions. Technique-first visual storytelling.",icon:d.A},{id:"tt-vid-4",name:"Street Interview",description:'"Asking strangers..." format. Handheld, raw, genuine reactions. The unpredictability of real people is the hook.',icon:d.A},{id:"tt-vid-5",name:"Sound-Sync Performance",description:"Dance, lip-sync, or physical comedy timed to trending audio. The rhythm and timing IS the content. Loop-friendly ending.",icon:d.A},{id:"tt-vid-6",name:"Storytime Over Activity",description:"Narrating a story while doing a mundane activity (cooking, getting ready, walking). Dual-track attention â the activity hooks, the story retains.",icon:d.A}],photo:[{id:"tt-photo-1",name:"Photo Carousel",description:"Photo Mode slides with music. Visual storytelling, text overlays per slide.",icon:l.A},{id:"tt-photo-2",name:"Before & After",description:"Transformation showcase. Sequential reveal of change with comparison text.",icon:l.A},{id:"tt-photo-3",name:"Aesthetic Dump",description:"Mood curation with cohesive color palette. Minimal text, vibes-first.",icon:l.A},{id:"tt-photo-4",name:"Tutorial Steps",description:"Instructional sequence. Numbered step slides with clear visuals.",icon:l.A},{id:"tt-photo-5",name:"Product Showcase",description:"Product gallery: hero â details â lifestyle â pricing/CTA slide.",icon:l.A},{id:"tt-photo-6",name:"Meme Carousel",description:"Humor series. Relatable text-heavy slides, trending format adaptation.",icon:l.A}],story:[{id:"tt-story-1",name:"Quick Update",description:"Spontaneous message for the followers.",icon:c.A},{id:"tt-story-2",name:"Teaser/Sneak Peek",description:"Brief look at upcoming main feed content.",icon:c.A},{id:"tt-story-3",name:"Mood Board",description:"Visual inspiration and aesthetic vibes.",icon:c.A},{id:"tt-story-4",name:"Direct Q&A",description:"Replying to comments with a short video.",icon:c.A},{id:"tt-story-5",name:"Unboxing Clip",description:"Satisfying product reveal in seconds.",icon:c.A},{id:"tt-story-6",name:"Daily Checklist",description:"Productivity or routine sharing.",icon:c.A}]},linkedin:{post:[{id:"li-post-1",name:"Thought Leadership",description:"In-depth analysis of industry trends.",icon:n.A},{id:"li-post-2",name:"Company News",description:"Updates on milestones and achievements.",icon:i.A},{id:"li-post-3",name:"Professional Tips",description:"Actionable advice for career growth.",icon:o.A},{id:"li-post-4",name:"Industry Poll",description:"Engaging the community on key topics.",icon:a.A},{id:"li-post-5",name:"Event Announcement",description:"Promoting webinars and conferences.",icon:i.A},{id:"li-post-6",name:"Client Success Story",description:"Showcasing real-world impact.",icon:p.A}],article:[{id:"li-art-1",name:"Technical Deep Dive",description:"Comprehensive guide to complex subjects.",icon:n.A},{id:"li-art-2",name:"Opinion Piece",description:"Bold perspectives on industry shifts.",icon:n.A},{id:"li-art-3",name:"Year in Review",description:"Summarizing key learnings and progress.",icon:l.A},{id:"li-art-4",name:"Expert Interview",description:"Insights from leading professionals.",icon:c.A},{id:"li-art-5",name:"Case Study",description:"Detailed breakdown of project outcomes.",icon:i.A},{id:"li-art-6",name:"How-to Guide",description:"Structured steps for achieving results.",icon:o.A}],carousel:[{id:"li-car-1",name:"Executive Framework",description:"Document carousel: hook â insight â framework â CTA. Keynote-clean, one idea per slide.",icon:l.A},{id:"li-car-2",name:"Metrics & Proof",description:"KPIs, trends, and before/after numbers â
1credible, not fake UI chrome.",icon:a.A},{id:"li-car-3",name:"Case Study Arc",description:"Challenge â approach â outcome â lesson with a consistent B2B visual thread.",icon:i.A},{id:"li-car-4",name:"Thought Leadership Series",description:"Thesis, supporting points, and a sharp takeaway â editorial type + restrained imagery.",icon:n.A},{id:"li-car-5",name:"Playbook / How-To",description:"Numbered steps and checklist energy; icons as structure, not decoration soup.",icon:p.A},{id:"li-car-6",name:"Before / After Transformation",description:"Contrast narrative: old vs new, problem vs solved â split or sequential layouts.",icon:m.A}]},twitter:{post:[{id:"tw-post-1",name:"Breaking News",description:"Real-time updates on trending topics.",icon:m.A},{id:"tw-post-2",name:"Hot Take",description:"Engaging and provocative opinions.",icon:o.A},{id:"tw-post-3",name:"Quick Resource",description:"Valuable links and recommendations.",icon:g.A},{id:"tw-post-4",name:"Quote Highlight",description:"Impactful words from key figures.",icon:n.A},{id:"tw-post-5",name:"Engagement Prompt",description:"Asking questions to spark conversation.",icon:c.A},{id:"tw-post-6",name:"Event Live-tweet",description:"Continuous coverage of live events.",icon:d.A}],thread:[{id:"tw-thr-1",name:"Educational Thread",description:"Step-by-step breakdown of a topic.",icon:l.A},{id:"tw-thr-2",name:"Personal Narrative",description:"Compelling stories told in parts.",icon:n.A},{id:"tw-thr-3",name:"Curated Listicle",description:"Best tools, books, or resources.",icon:a.A},{id:"tw-thr-4",name:"Tutorial Thread",description:"Guided instructions for a task.",icon:d.A},{id:"tw-thr-5",name:"Comparison Thread",description:"Analyzing pros and cons of options.",icon:l.A},{id:"tw-thr-6",name:"Research Summary",description:"Key findings from a recent study.",icon:n.A}]},youtube:{video:[{id:"yt-vid-1",name:"Educational Long-form",description:"In-depth tutorial or explanation.",icon:d.A},{id:"yt-vid-2",name:"Product Review",description:"Detailed analysis of features and benefits.",icon:h.A},{id:"yt-vid-3",name:"Vlog Lifestyle",description:"Personal stories and daily experiences.",icon:c.A},{id:"yt-vid-4",name:"Documentary Style",description:"High-production narrative content.",icon:u.A},{id:"yt-vid-5",name:"Podcast/Interview",description:"Conversational format with experts.",icon:c.A},{id:"yt-vid-6",name:"Livestream Highlight",description:"Best moments from a live broadcast.",icon:m.A}],short:[{id:"yt-sh-1",name:"Instant Value Hook",description:"No intro â jump straight into the tip/fact/revelation. Bold text overlay reinforces the hook. Value delivered in the first 3 seconds.",icon:d.A},{id:"yt-sh-2",name:"Satisfying Process",description:"Satisfying activity as the visual hook â crafting, cleaning, organizing, cooking. Commentary or text overlay adds context while the visuals retain.",icon:o.A},{id:"yt-sh-3",name:"Dramatic Zoom Reveal",description:"Camera zooms in or out to reveal something unexpected. The curiosity gap created by the zoom movement itself drives watch-through.",icon:d.A},{id:"yt-sh-4",name:"Person-on-Street",description:"Asking random people a question or giving them a challenge. Raw documentary feel, unexpected answers drive engagement and shares.",icon:c.A},{id:"yt-sh-5",name:"Before/After Snap",description:"Quick transformation with a visual snap or transition. The dramatic change between states is the hook â works for any topic.",icon:m.A},{id:"yt-sh-6",name:"Reaction & Commentary",description:"Split-screen or direct-to-camera reaction to something surprising. Genuine emotion and hot takes drive shares and comments.",icon:n.A}]},blog:{post:[{id:"bl-post-1",name:"Ultimate Guide",description:"Comprehensive resource on a specific topic.",icon:n.A},{id:"bl-post-2",name:"Listicle",description:"Top tips, tools, or resources in a list.",icon:a.A},{id:"bl-post-3",name:"Case Study",description:"Detailed success stories and metrics.",icon:i.A},{id:"bl-post-4",name:"How-To Tutorial",description:"Step-by-step instructions for a task.",icon:o.A},{id:"bl-post-5",name:"Opinion Editorial",description:"Bold perspectives on industry trends.",icon:n.A},{id:"bl-post-6",name:"Product Update",description:"Announcing new features and improvements.",icon:m.A}],newsletter:[{id:"bl-nl-1",name:"Weekly Digest",description:"Curated links and news from the week.",icon:l.A},{id:"bl-nl-2",name:"Expert Insights",description:"Exclusive commentary from industry leaders.",icon:n.A},{id:"bl-nl-3",name:"Community Spotlight",description:"Highlighting user stories and feedback.",icon:a.A},{id:"bl-nl-4",name:"Tool Roundup",description:"Reviews of the best tools and resources.",icon:h.A},{id:"bl-nl-5",name:"Event Preview",description:"Upcoming webinars and conferences.",icon:i.A},{id:"bl-nl-6",name:"Behind the Brand",description:"Personal stories from the company team.",icon:c.A}]}},b={instagram:[{value:"post",label:"Post"},{value:"reel",label:"Reel"},{value:"story",label:"Story"},{value:"carousel",label:"Carousel"}],tiktok:[{value:"video",label:"Video"},{value:"photo",label:"Photo Mode"},{value:"story",label:"Story"}],youtube:[{value:"video",label:"Long-form video"},{value:"short",label:"Short"}],linkedin:[{value:"post",label:"Post"},{value:"article",label:"Article"},{value:"carousel",label:"Carousel (document)"}],twitter:[{value:"post",label:"Post"},{value:"thread",label:"Thread"}],blog:[{value:"post",label:"Blog post"},{value:"newsletter",label:"Newsletter"}]};function y(e,t){let r=String(e||"").toLowerCase(),a=String(t||"").toLowerCase(),n=x["x"===r?"twitter":r];return n&&n[a]||[]}},47459:(e,t,r)=>{r.d(t,{q:()=>x});var a=r(37876);r(14232);var n=r(27506),i=r(15782),s=r(51244),o=r(59533),l=r(32257),d=r(47658),c=r(35739),p=r(54410),m=r(16075),g=r(12414),h=r(56672),u=r(58262);function x(e){var t,r,x,b,y,v;let{message:f,agentStep:k,isWaitingForFirstChunk:w,isAgentLoading:_,onDownload:j,assistantContentSize:N="default"}=e,A="comfortable"===N&&"agent"===f.sender,S="system"===f.uiVariant&&"agent"===f.sender,C=A?"text-[12px] sm:text-[13px]":"text-[11px]",P=f.id.startsWith("streaming-agent-"),R=P&&_||"processing"===f.status,T=!(null==(t=f.content)?void 0:t.trim())&&!(null==(r=f.thought)?void 0:r.trim())&&(!f.actions||0===f.actions.length)&&!f.sentinelReview,L=P&&_&&!(null==(x=f.content)?void 0:x.trim()),E=P&&(w||T)||"agent"===f.sender&&T&&(_||"processing"===f.status)||L,B=(e,t)=>{if(j)j(e,t);else{let r=document.createElement("a");r.href=e,r.download=t,r.target="_blank",r.click()}},z=e=>{if("string"!=typeof e||e.length<8)return!1;try{let t=new URL(e.trim());return"http:"===t.protocol||"https:"===t.protocol}catch(e){return!1}}
1,I=new Set(["discover_visuals","search_google_images","search_brand_visual_references"]),D="string"==typeof f.content?f.content:"",M=(0,g.Nl)(D),U="user"===f.sender&&(0,g.xQ)(D),q="user"===f.sender?f.shortcutLabel||M||(U?"Strategy AI \xb7 briefing":void 0):void 0,H=!!q;return(0,a.jsxs)(n.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex flex-col ".concat("user"===f.sender?"items-end":"items-start"),children:[(0,a.jsx)("div",{className:"flex items-center gap-2 mb-1.5",children:(0,a.jsx)("span",{className:"text-[9px] font-black uppercase tracking-widest ".concat("user"===f.sender?"text-gray-400":S?"text-slate-500 dark:text-slate-400":"text-xerpihan-primary-500"),children:H?"Inserted instruction":f.role})}),"process"===f.type?(0,a.jsxs)("div",{className:"bg-xerpihan-primary-50/50 dark:bg-xerpihan-primary-900/10 px-4 py-2 rounded-xl flex items-center gap-2.5 chat-message-serif",children:[(0,a.jsx)("div",{className:"w-1 h-1 rounded-full bg-xerpihan-primary-500 animate-ping"}),(0,a.jsxs)("span",{className:"text-[12px] font-bold text-xerpihan-primary-600 dark:text-xerpihan-primary-400 italic leading-relaxed",children:['"',f.content,'"']})]}):"result"===f.type?(0,a.jsxs)("div",{className:"bg-emerald-50/50 dark:bg-emerald-900/10 px-4 py-2 rounded-xl flex items-center gap-2.5 chat-message-serif",children:[(0,a.jsx)(l.A,{className:"w-3 h-3 text-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] font-bold text-emerald-600 dark:text-emerald-400 uppercase tracking-widest leading-relaxed",children:"Synthesis Complete"})]}):H&&q?(0,a.jsxs)("div",{className:"flex max-w-[min(100%,420px)] flex-col items-end gap-1.5",children:[(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full border border-dashed border-xerpihan-primary-400/45 bg-xerpihan-primary-500/[0.07] dark:bg-xerpihan-primary-500/10 pl-2.5 pr-3 py-1.5 text-left",title:U?"Creative briefing for your Content Studio workflow":void 0,children:[(0,a.jsx)(d.A,{className:"w-3.5 h-3.5 shrink-0 text-xerpihan-primary-500 opacity-80"}),(0,a.jsx)("span",{className:"text-[11px] font-semibold text-gray-800 dark:text-gray-100 leading-snug",children:q})]}),U&&D.length>40&&(0,a.jsxs)("details",{className:"max-w-full text-left rounded-xl border border-black/[0.06] dark:border-white/[0.08] bg-gray-50/80 dark:bg-white/[0.03] px-3 py-2",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-[9px] font-bold uppercase tracking-widest text-gray-400 list-none [&::-webkit-details-marker]:hidden",children:"View full briefing"}),(0,a.jsx)("p",{className:"mt-2 text-[10px] text-gray-600 dark:text-gray-400 whitespace-pre-wrap leading-relaxed max-h-48 overflow-y-auto custom-scrollbar",children:D})]})]}):(0,a.jsxs)("div",{className:"flex max-w-[90%] flex-col gap-0",children:[(0,a.jsxs)("div",{className:"chat-message-serif ".concat("user"===f.sender?"bg-xerpihan-primary-600 text-white rounded-tr-none":S?"rounded-tl-none bg-slate-100/95 text-slate-800 dark:bg-slate-800/50 dark:text-slate-100":"rounded-tl-none bg-brand-white text-gray-900 dark:bg-zinc-900 dark:text-gray-100"," p-4 rounded-2xl overflow-x-hidden overflow-y-visible relative min-h-[44px]"),children:[(()=>{let e=!!f.thought,t=f.actions&&f.actions.length>0,r=f.sentinelReview,n=!!(r&&"object"==typeof r&&Object.keys(r).length>0),i=(0,u.Q2)(f.pipelineLabels),s=i.length>0,o=e||t||n||s,d=e=>(0,u.w6)(f.actions,f.actionResults).map(t=>({key:t.key,title:t.title,steps:(0,u.VW)(t.actions,t.actionResults,e).map(e=>({...e,key:"".concat(t.key,"-").concat(e.key)})),actionResults:t.actionResults}));if(E){var m;let e=d({agentStep:k,isWaitingForFirstChunk:w,isStillWorking:R,thoughtSnippet:f.thought?(null==(m=f.thought.split(/[.!?\n]/).filter(Boolean).pop())?void 0:m.trim())||f.thought.slice(0,96):void 0}),t=e.length>0,n=t||!(i.length>0)||f.actions&&0!==f.actions.length?[]:(0,u.tz)(i,R),s=i.length>0?i[i.length-1]:"",o=(f.pipelineLabels||[]).filter(e=>"string"==typeof e&&e.trim().length>0),l=o.length>0?o[o.length-1].trim():"",c=s||k||l||(w?"Connectingâ¦":"Workingâ¦"),p=n;return t||0!==p.length||(p=[{key:"activity-loading",label:c,state:"active"}]),(0,a.jsx)(h.fU,{stepGroups:t?e:void 0,steps:t?[]:p,statusLine:c,isStreaming:R,isWaitingForFirstChunk:w,thought:f.thought,sentinelReview:r})}if(!o)return null;let g=d({agentStep:"",isWaitingForFirstChunk:!1,isStillWorking:R,thoughtSnippet:void 0}),x=[];!t&&i.length>0&&(x=(0,u.tz)(i,!1));let b=g.length>0||x.length>0;return(0,a.jsxs)("div",{className:"mb-3 rounded-xl bg-gray-50/40 dark:bg-zinc-900/35 px-3 py-2.5 max-h-[min(18rem,40vh)] overflow-y-auto overscroll-y-contain [scrollbar-gutter:stable]",children:[b?(0,a.jsx)("h4",{className:"text-[10px] font-semibold uppercase tracking-wide text-gray-600 dark:text-gray-400 mb-2",children:"Agent steps"}):null,g.length>0?(0,a.jsx)(h.En,{groups:g}):x.length>0?(0,a.jsx)("ul",{className:"space-y-2","aria-label":"Agent steps",children:x.map(e=>(0,a.jsxs)("li",{className:"flex gap-2.5 items-start",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-4 h-4 rounded-full border shrink-0 mt-0.5 ".concat("done"===e.state?"border-emerald-500/60 bg-emerald-500/15 text-emerald-600 dark:text-emerald-400":"active"===e.state?"border-xerpihan-primary-500 bg-xerpihan-primary-500 text-white":"border-gray-300/80 dark:border-zinc-600 bg-gray-50 dark:bg-zinc-800/80 text-gray-400"),children:"done"===e.state?(0,a.jsx)(l.A,{className:"w-2.5 h-2.5",strokeWidth:3}):"active"===e.state?(0,a.jsx)(c.A,{className:"w-2.5 h-2.5 animate-spin"}):(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-current opacity-40"})}),(0,a.jsx)("span",{className:"text-[10px] leading-snug pt-0.5 ".concat("active"===e.state?"text-xerpihan-primary-800 dark:text-xerpihan-primary-200 font-semibold":"text-gray-700 dark:text-gray-300"),children:e.label})]},e.key))}):null,n&&r&&(0,a.jsx)("div",{className:"mt-2.5 pt-2.5 border-t border-amber-200/45 dark:border-amber-800/35",children:(0,a.jsxs)("div",{className:"rounded-lg border border-amber-200/70 dark:border-amber-800/45 bg-amber-50/50 dark:bg-amber-950/25 px-2.5 py-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1 flex-wrap",children:[(0,a.jsx)(p.A,{className:"w-3 h-3 text-amber-600 dar
1k:text-amber-400 shrink-0","aria-hidden":!0}),(0,a.jsx)("span",{className:"text-[9px] font-semibold text-amber-900 dark:text-amber-200",children:"Sentinel"}),"string"==typeof r.verdict&&r.verdict.trim()?(0,a.jsx)("span",{className:"text-[9px] text-amber-800 dark:text-amber-100/90",children:r.verdict.trim()}):null]}),Array.isArray(r.issues)&&r.issues.length>0?(0,a.jsx)("ul",{className:"mt-1 space-y-0.5 text-[9px] text-amber-900/90 dark:text-amber-100/80 list-disc pl-3.5",children:r.issues.slice(0,6).map((e,t)=>(0,a.jsx)("li",{children:String(e)},t))}):null,"string"==typeof r.executor_hint&&r.executor_hint.trim()?(0,a.jsxs)("p",{className:"mt-1.5 text-[9px] text-amber-800/90 dark:text-amber-200/85 leading-snug italic border-t border-amber-200/40 dark:border-amber-700/30 pt-1.5",children:["Next: ",r.executor_hint.trim()]}):null]})}),e?(0,a.jsxs)("div",{className:"mt-2.5 pt-2.5 border-t border-black/[0.06] dark:border-white/[0.08]",children:[(0,a.jsx)("div",{className:"text-[9px] font-medium text-gray-400 dark:text-gray-500 mb-1",children:"Notes"}),(0,a.jsx)(h.Ui,{thought:f.thought||""})]}):null]})})(),"agent"===f.sender&&f.actionResults&&f.actionResults.length>0&&(0,a.jsx)("div",{className:"space-y-3",children:f.actionResults.map((e,t)=>{var r;let n=String((null==e?void 0:e.name)||(null==e||null==(r=e.functionResponse)?void 0:r.name)||"").trim();if(I.has(n))return null;let i=e.response||e,s=Array.isArray(null==i?void 0:i.urls)?i.urls.filter(e=>z(e)):[],o=(null==i?void 0:i.url)||(null==i?void 0:i.imageUrl)||(null==i?void 0:i.result_url),l=z(o)?o:void 0,d=(null==i?void 0:i.videoUrl)||(null==i?void 0:i.video_url),c=z(d)?d:void 0,p=(null==i?void 0:i.job_type)==="video"||(null==i?void 0:i.job_type)==="video-extension"||(null==i?void 0:i.job_type)==="video-next-scene"||(null==i?void 0:i.job_type)==="video-finalization"||(null==i?void 0:i.type)==="video-scene"||!!c,g=p&&c||l;return s.length>1&&!p?(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2 rounded-xl overflow-hidden border border-black/5 dark:border-white/5 shadow-sm",children:s.map((e,t)=>(0,a.jsxs)("div",{"data-agent-inline-visual":!0,className:"relative group/agent-img overflow-hidden bg-black/5 dark:bg-white/5",children:[(0,a.jsx)("img",{src:e,alt:"Reference ".concat(t+1),className:"w-full h-auto object-cover max-h-[200px] transition-transform duration-500 group-hover/agent-img:scale-105",onError:e=>{let t=e.currentTarget.closest("[data-agent-inline-visual]");t instanceof HTMLElement&&(t.hidden=!0)}}),(0,a.jsx)("div",{className:"absolute inset-0 bg-black/20 opacity-0 group-hover/agent-img:opacity-100 transition-opacity flex items-center justify-center",children:(0,a.jsx)("button",{type:"button",onClick:()=>B(e,"xerpihan-reference-".concat(t+1,".png")),className:"p-2 bg-brand-white/20 backdrop-blur-md rounded-xl text-white hover:bg-brand-white/40 transition-all",title:"Download",children:(0,a.jsx)(m.A,{className:"w-4 h-4"})})})]},t))},t):g?(0,a.jsx)("div",{"data-agent-inline-visual":!0,className:"rounded-xl overflow-hidden border border-black/5 dark:border-white/5 shadow-sm group/agent-img relative",children:p?(0,a.jsx)("video",{src:g,controls:!0,className:"w-full h-auto max-h-[300px] bg-black",preload:"metadata",onError:e=>{let t=e.currentTarget.closest("[data-agent-inline-visual]");t instanceof HTMLElement&&(t.hidden=!0)}}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("img",{src:g,alt:"Agent visual",className:"w-full h-auto object-cover max-h-[300px] transition-transform duration-500 group-hover/agent-img:scale-105",onError:e=>{let t=e.currentTarget.closest("[data-agent-inline-visual]");t instanceof HTMLElement&&(t.hidden=!0)}}),(0,a.jsx)("div",{className:"absolute inset-0 bg-black/20 opacity-0 group-hover/agent-img:opacity-100 transition-opacity flex items-center justify-center",children:(0,a.jsx)("button",{onClick:()=>B(g,"xerpihan-agent-visual.png"),className:"p-2 bg-brand-white/20 backdrop-blur-md rounded-xl text-white hover:bg-brand-white/40 transition-all",title:"Download Image",children:(0,a.jsx)(m.A,{className:"w-4 h-4"})})})]})},t):null})}),(null==(b=f.content)?void 0:b.trim())&&(0,a.jsx)("div",{className:"markdown-content chat-message-serif prose-pre:p-2 prose-pre:rounded-lg prose-a:underline max-w-none ".concat("user"===f.sender?"text-[15px] sm:text-[16
1px] leading-[1.7] font-normal prose prose-base prose-p:leading-[1.7] prose-invert text-white prose-p:text-white prose-headings:text-white prose-strong:text-white prose-code:text-white prose-code:bg-brand-white/20 prose-pre:bg-brand-white/10":A?"leading-[1.7] font-normal prose prose-base prose-p:leading-[1.7] ".concat(S?"text-[15px] sm:text-[17px] prose-slate text-slate-800 dark:text-slate-100 prose-strong:text-slate-900 dark:prose-strong:text-slate-50 prose-code:text-slate-800 dark:prose-code:text-slate-200 prose-pre:bg-slate-200/45 dark:prose-pre:bg-slate-900/55 prose-a:text-slate-700 dark:prose-a:text-slate-300":"text-[15px] sm:text-[17px] prose-zinc dark:prose-invert text-gray-900 dark:text-gray-100 prose-strong:text-xerpihan-primary-600 dark:prose-strong:text-xerpihan-primary-400 prose-code:text-xerpihan-primary-600 dark:prose-code:text-xerpihan-primary-400 prose-pre:bg-black/5 dark:prose-pre:bg-brand-white/5 prose-a:text-xerpihan-primary-500"):"text-[14px] sm:text-[15px] leading-[1.65] font-normal prose prose-base prose-p:leading-[1.65] ".concat(S?"prose-slate text-slate-800 dark:text-slate-100 prose-strong:text-slate-900 dark:prose-strong:text-slate-50 prose-code:text-slate-800 dark:prose-code:text-slate-200 prose-pre:bg-slate-200/45 dark:prose-pre:bg-slate-900/55 prose-a:text-slate-700 dark:prose-a:text-slate-300":"prose-zinc dark:prose-invert text-gray-900 dark:text-gray-100 prose-strong:text-xerpihan-primary-600 dark:prose-strong:text-xerpihan-primary-400 prose-code:text-xerpihan-primary-600 dark:prose-code:text-xerpihan-primary-400 prose-pre:bg-black/5 dark:prose-pre:bg-brand-white/5 prose-a:text-xerpihan-primary-500")," ").concat("agent"===f.sender&&(null==(y=f.actionResults)?void 0:y.length)?"mt-3":""),children:(0,a.jsx)(i.oz,{remarkPlugins:[s.A],rehypePlugins:[o.A],components:{p:e=>{let{node:t,...r}=e;return(0,a.jsx)("p",{className:"mb-2 last:mb-0",...r})},ul:e=>{let{node:t,...r}=e;return(0,a.jsx)("ul",{className:"list-disc ml-4 mb-2",...r})},ol:e=>{let{node:t,...r}=e;return(0,a.jsx)("ol",{className:"list-decimal ml-4 mb-2",...r})},li:e=>{let{node:t,...r}=e;return(0,a.jsx)("li",{className:"mb-1",...r})},code:e=>{let{node:t,className:r,children:n,...i}=e;return/language-(\w+)/.exec(r||"")||(null==r?void 0:r.includes("block"))?(0,a.jsx)("code",{className:"my-2 block overflow-x-auto whitespace-pre-wrap rounded p-2 font-mono ".concat(C," bg-current/5"),...i,children:n}):(0,a.jsx)("code",{className:"rounded bg-current/10 px-1 font-mono ".concat(C),...i,children:n})},h1:e=>{let{node:t,...r}=e;return(0,a.jsx)("h1",{className:"mb-2 border-b border-current/10 pb-1 font-bold ".concat(A?"text-lg sm:text-xl":"text-base"),...r})},h2:e=>{let{node:t,...r}=e;return(0,a.jsx)("h2",{className:"mb-2 font-bold ".concat(A?"text-base sm:text-lg":"text-sm"),...r})},h3:e=>{let{node:t,...r}=e;return(0,a.jsx)("h3",{className:"mb-1 font-bold ".concat(A?"text-[15px] sm:text-[16px]":"text-[13px]"),...r})},strong:e=>{let{node:t,...r}=e;return(0,a.jsx)("strong",{className:"font-black",...r})},blockquote:e=>{let{node:t,...r}=e;return(0,a.jsx)("blockquote",{className:"my-2 border-l-2 border-current/30 pl-3 italic opacity-80",...r})}},children:f.content})})]}),f.attachments&&f.attachments.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1 justify-end",children:f.attachments.map((e,t)=>(0,a.jsx)("div",{className:"w-12 h-12 rounded-lg overflow-hidden border border-black/5 dark:border-white/5",children:(0,a.jsx)("img",{src:e.url,className:"w-full h-full object-cover",alt:""})},t))})]})]},null!=(v=f.reactListKey)?v:f.id)}},56672:(e,t,r)=>{r.d(t,{fU:()=>x,En:()=>p,Ui:()=>u});var a=r(37876);r(14232);var n=r(15782),i=r(51244),s=r(59533),o=r(32257),l=r(35739),d=r(54410),c=r(58262);function p(e){let{groups:t}=e;return(0,a.jsx)("div",{className:"space-y-3",children:t.map(e=>(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[9px] font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1.5",children:e.title}),(0,a.jsx)("ul",{className:"space-y-1.5 border-l border-gray-200/75 dark:border-zinc-600/70 pl-2.5 ml-0.5","aria-label":e.title,children:e.steps.map((t,r)=>{var n;let i="done"===t.state,s="active"===t.state,d=null==(n=e.actionResults)?void 0:n[r];return(0,a.jsxs)("li",{className:"flex flex-col gap-0",children:[(0,a.jsxs)("div",{className:"flex gap-2.5 items-start",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-4 h-4 rounded-full border shrink-0 mt-0.5 ".concat(s?"border-xerpihan-primary-500 bg-xerpihan-primary-500 text-white":i?"border-emerald-500/60 bg-emerald-500/15 text-emerald-600 dark:text-emerald-400":"border-gray-300/80 dark:border-zinc-600 bg-gray-50 dark:bg-zinc-800/80 text-gray-400"),children:i?(0,a.jsx)(o.A,{className:"w-2.5 h-2.5",strokeWidth:3}):s?(0,a.jsx)(l.A,{className:"w-2.5 h-2.5 animate-spin"}):(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-current opacity-40"})}),(0,a.jsx)("span",{className:"text-[10px] leading-snug pt-0.5 min-w-0 ".concat(s?"text-xerpihan-primary-800 dark:text-xerpihan-primary-200 font-semibold":i?"text-gray-700 dark:text-gray-300":"text-gray-400 dark:text-gray-600"),title:t.label,children:t.label})]}),d?(0,a.jsx)(m,{result:d}):null]},t.key)})})]},e.key))})}function m(e){var t,r,n;let{result:i}=e;if(!i)return null;let s=String((null==i?void 0:i.name)||"").trim(),o=(null==i?void 0:i.response)&&"object"==typeof i.response?i.response:i,l=i.evaluation||(null==o?void 0:o.evaluation)||(null==(t=i.response)?void 0:t.evaluation),d=i.observation||(null==o?void 0:o.observation)||(null==(r=i.response)?void 0:r.observation),c=null==o?void 0:o.status,p=Array.isArray(null==o?void 0:o.issues)?o.issues:[],m=null==o?void 0:o.qualitySignals,g=Array.isArray(null==m?void 0:m.issues)?m.issues:[],h=function(e,t,r){let a=(t||"").toLowerCase();
1if("wait_for_content_strategy_job"===e){if("success"===a)return{hideDefaultBadge:!0,headline:"Plan loaded â review alignment & qualitySignals next",tone:"ok"};if("timeout"===a)return{hideDefaultBadge:!0,headline:"Strategy Engine still running â retry wait_for or check the dashboard",tone:"warn"};if("failed"===a||(null==r?void 0:r.error))return{hideDefaultBadge:!0,headline:"string"==typeof(null==r?void 0:r.error)?r.error:"Strategy job failed",tone:"bad"}}return"release_strategy_calendar_preview"===e&&"success"===a?{hideDefaultBadge:!0,headline:"Calendar preview unlocked for the user",tone:"ok"}:{hideDefaultBadge:!1}}(s,c,o),u=null==o?void 0:o.reflection_summary,x={approve:"bg-emerald-50 dark:bg-emerald-900/20 border-emerald-200 dark:border-emerald-800 text-emerald-700 dark:text-emerald-300",needs_revision:"bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-800 text-amber-700 dark:text-amber-300",reject:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800 text-red-700 dark:text-red-300"},b=!!(u&&(u.current_understanding||u.proposed_plan||u.key_uncertainties||u.hypothesis_for_next_action)),y=l?"line-clamp-3":"max-h-[min(14rem,32vh)] overflow-y-auto overscroll-y-contain [scrollbar-gutter:stable] whitespace-pre-wrap";return(0,a.jsxs)("div",{className:"mt-1 ml-0.5 pl-2.5 border-l border-gray-200/80 dark:border-zinc-600/80 space-y-1.5 w-full min-w-0",children:[h.headline?(0,a.jsx)("span",{className:"inline-block text-[8px] font-semibold leading-snug px-1.5 py-0.5 rounded ".concat("ok"===h.tone?"bg-emerald-100/80 dark:bg-emerald-900/20 text-emerald-900 dark:text-emerald-200":"bad"===h.tone?"bg-red-100/80 dark:bg-red-900/25 text-red-900 dark:text-red-200":"bg-amber-100/80 dark:bg-amber-900/20 text-amber-950 dark:text-amber-100"),children:h.headline}):null,"wait_for_content_strategy_job"===s&&(null==m?void 0:m.verdict)?(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 text-[8px]",children:[(0,a.jsx)("span",{className:"font-semibold text-gray-500 dark:text-gray-400",children:"Alignment signals"}),(0,a.jsx)("span",{className:"font-bold uppercase tracking-wide px-1.5 py-0.5 rounded ".concat("good"===m.verdict?"bg-emerald-100/90 dark:bg-emerald-900/30 text-emerald-800 dark:text-emerald-200":"bg-amber-100/90 dark:bg-amber-900/30 text-amber-950 dark:text-amber-100"),children:"good"===m.verdict?"Looks aligned":"Needs review"})]}):null,c&&!h.hideDefaultBadge?(0,a.jsx)("span",{className:"inline-block text-[8px] font-bold uppercase tracking-wide px-1.5 py-0.5 rounded ".concat("plan_looks_solid"===c?"bg-emerald-100/80 dark:bg-emerald-900/20 text-emerald-800 dark:text-emerald-200":"bg-amber-100/80 dark:bg-amber-900/20 text-amber-900 dark:text-amber-200"),children:c.replace(/_/g," ")}):null,b?(0,a.jsxs)("div",{className:"space-y-1.5 text-[9px] text-gray-600 dark:text-gray-400 leading-snug",children:[(null==u?void 0:u.current_understanding)?(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold text-gray-500 dark:text-gray-500",children:"Understanding"}),(0,a.jsx)("p",{className:"mt-0.5 whitespace-pre-wrap",children:u.current_understanding})]}):null,(null==u?void 0:u.key_uncertainties)?(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold text-gray-500 dark:text-gray-500",children:"Uncertainties"}),(0,a.jsx)("p",{className:"mt-0.5 whitespace-pre-wrap",children:u.key_uncertainties})]}):null,(null==u?void 0:u.proposed_plan)?(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold text-gray-500 dark:text-gray-500",children:"Plan"}),(0,a.jsx)("p",{className:"mt-0.5 whitespace-pre-wrap",children:u.proposed_plan})]}):null,(null==u?void 0:u.hypothesis_for_next_action)?(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold text-gray-500 dark:text-gray-500",children:"Next hypothesis"}),(0,a.jsx)("p",{className:"mt-0.5 whitespace-pre-wrap",children:u.hypothesis_for_next_action})]}):null]}):null,p.length>0?(0,a.jsx)("ul",{className:"text-[9px] text-amber-900/90 dark:text-amber-100/85 list-disc pl-3.5 space-y-0.5 leading-snug",children:p.slice(0,8).map((e,t)=>(0,a.jsx)("li",{children:String(e)},t))}):null,g.length>
10&&"wait_for_content_strategy_job"===s?(0,a.jsx)("ul",{className:"text-[9px] text-gray-700 dark:text-gray-300 list-disc pl-3.5 space-y-0.5 leading-snug",children:g.slice(0,8).map((e,t)=>(0,a.jsx)("li",{children:String(e)},"qs-".concat(t)))}):null,d?(0,a.jsx)("p",{className:"text-[9px] text-gray-500 dark:text-gray-500 leading-relaxed ".concat(y),children:d}):null,l?(0,a.jsxs)("div",{className:"p-2 rounded-md border text-[9px] ".concat(x[l.verdict]||x.needs_revision),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-1 mb-0.5",children:[(0,a.jsxs)("span",{className:"font-bold uppercase tracking-wider text-[7px] flex items-center gap-0.5",children:[(0,a.jsx)("span",{children:{approve:"â",needs_revision:"â ",reject:"â"}[l.verdict]||"?"}),null==(n=l.verdict)?void 0:n.replace(/_/g," ")]}),null!=l.overall_score?(0,a.jsxs)("span",{className:"font-bold tabular-nums",children:[l.overall_score,"/10"]}):null]}),l.summary?(0,a.jsx)("p",{className:"opacity-85 text-[8px] leading-snug",children:l.summary}):null,(()=>{let e=l.scores||l.best_pair_scores;return e&&0!==Object.keys(e).length?(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:Object.entries(e).sort((e,t)=>{let[r]=e,[a]=t;return r.localeCompare(a)}).map(e=>{let[t,r]=e;return(0,a.jsxs)("span",{className:"px-1 py-0.5 rounded text-[7px] font-bold whitespace-nowrap ".concat(r>=8?"bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-300":r>=6?"bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300":"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300"),children:[t.replace(/_/g," "),": ",r]},t)})}):null})(),l.has_revised_prompt?(0,a.jsx)("p",{className:"mt-1 text-[7px] opacity-70 italic",children:"Improved prompt available for re-rendering"}):null]}):null]})}function g(e){let{visible:t}=e;return t?(0,a.jsx)("div",{className:"flex h-5 w-full items-end justify-center gap-[1.5px] overflow-hidden rounded-md bg-gradient-to-r from-transparent via-xerpihan-primary-500/[0.06] to-transparent px-1.5 pb-0.5 pt-0.5 dark:via-xerpihan-primary-400/[0.1]",role:"presentation","aria-hidden":!0,children:Array.from({length:9}).map((e,t)=>{let r=-6+t%5*2,n=1.55+t%5*.1,i=(t%2==0?1:-1)*(1+t%3);return(0,a.jsx)("span",{className:"block w-[3px] shrink-0 rounded-[0.5px] bg-gradient-to-t from-xerpihan-primary-600/80 via-violet-500/70 to-violet-300/55 motion-safe:animate-agent-shard dark:from-xerpihan-primary-400 dark:via-violet-400/75 dark:to-violet-200/45",style:{height:5+2*t%4*2,clipPath:"polygon(15% 0%, 100% 5%, 85% 100%, 0% 95%)",transformOrigin:"50% 100%","--shard-r":"".concat(r,"deg"),"--shard-x":"".concat(i,"px"),"--shard-dur":"".concat(n,"s"),"--shard-delay":"".concat(.06*t,"s")}},t)})}):null}let h={remarkPlugins:[i.A],rehypePlugins:[s.A]};function u(e){var t;let{thought:r}=e,i=(t=function(e){if(!e||"string"!=typeof e)return"";let t=e.indexOf("---PLAN_JSON---");return -1===t?e:e.slice(0,t).trimEnd()}(r))&&"string"==typeof t?t.replace(/^(?:\[Frontier plan\]\s*)+/i,"[Frontier plan] "):"",s=(0,c.bL)(i);return(null==i?void 0:i.trim())?(0,a.jsx)("div",{className:"max-h-[min(13rem,28vh)] min-h-0 overflow-y-auto overscroll-y-contain [scrollbar-gutter:stable] text-[11px] leading-relaxed tracking-wide",children:s.length>1?(0,a.jsx)("ol",{className:"list-none space-y-2",children:s.map((e,t)=>(0,a.jsxs)("li",{className:"flex gap-2 text-[11px] text-gray-500 dark:text-gray-400 leading-relaxed",children:[(0,a.jsx)("span",{className:"font-mono text-[8px] font-bold text-xerpihan-primary-500/90 w-3.5 shrink-0 pt-0.5",children:t+1}),(0,a.jsx)("div",{className:"prose prose-sm max-w-none chat-message-serif prose-p:my-0.5 prose-headings:my-0.5 prose-headings:text-[11px] prose-zinc dark:prose-invert min-w-0 [&_p]:text-[11px] [&_p]:leading-relaxed",children:(0,a.jsx)(n.oz,{...h,children:e})})]},t))}):(0,a.jsx)("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 leading-relaxed prose prose-sm max-w-none chat-message-serif prose-p:my-0.5 prose-zinc dark:prose-invert [&_p]:text-[11px] [&_p]:leading-relaxed",children:(0,a.jsx)(n.oz,{...h,children:i})})}):null}function x(e){let{stepGroups:t,steps:r,statusLine:n,isStreaming:i,isWaitingForFirstChunk:s,thought:c,sentinelReview:h,actionResults:x}=e,b=s?"Connectingâ¦":null,y=(null==n?void 0:n.trim())||"",v=t&&t.length>0?t.flatMap(e=>e.steps.map(e=>e.label.trim())):r.map(e=>e.label.trim()),f=y.length>0&&v.some(e=>e===y),k=i&&(!!(null==t?void 0:t.length)||r.length>0||!!y.trim());return(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-xerpihan-primary-200/35 dar
1k:border-xerpihan-primary-800/40 bg-xerpihan-primary-50/40 dark:bg-xerpihan-primary-950/25 px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-between gap-2 mb-2",children:[(0,a.jsx)("h4",{className:"text-[10px] font-semibold uppercase tracking-wide text-gray-600 dark:text-gray-400",children:"Agent steps"}),b?(0,a.jsx)("span",{className:"text-[9px] text-xerpihan-primary-600 dark:text-xerpihan-400 tabular-nums shrink-0",children:b}):null]}),y&&!f?(0,a.jsx)("p",{className:"text-[10px] text-gray-500 dark:text-gray-500 leading-snug mb-2",children:y}):null,t&&t.length>0?(0,a.jsx)(p,{groups:t}):r.length>0?(0,a.jsx)("ul",{className:"space-y-2","aria-label":"Agent steps",children:r.map((e,t)=>{let r="done"===e.state,n="active"===e.state,i=null==x?void 0:x[t];return(0,a.jsxs)("li",{className:"flex flex-col gap-0",children:[(0,a.jsxs)("div",{className:"flex gap-2.5 items-start",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-4 h-4 rounded-full border shrink-0 mt-0.5 ".concat(n?"border-xerpihan-primary-500 bg-xerpihan-primary-500 text-white":r?"border-emerald-500/60 bg-emerald-500/15 text-emerald-600 dark:text-emerald-400":"border-gray-300/80 dark:border-zinc-600 bg-gray-50 dark:bg-zinc-800/80 text-gray-400"),children:r?(0,a.jsx)(o.A,{className:"w-2.5 h-2.5",strokeWidth:3}):n?(0,a.jsx)(l.A,{className:"w-2.5 h-2.5 animate-spin"}):(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-current opacity-40"})}),(0,a.jsx)("span",{className:"text-[10px] leading-snug pt-0.5 min-w-0 ".concat(n?"text-xerpihan-primary-800 dark:text-xerpihan-primary-200 font-semibold":r?"text-gray-700 dark:text-gray-300":"text-gray-400 dark:text-gray-600"),title:e.label,children:e.label})]}),i?(0,a.jsx)(m,{result:i}):null]},e.key)})}):null,(null==c?void 0:c.trim())?(0,a.jsxs)("div",{className:"mt-2.5 pt-2.5 border-t border-black/[0.06] dark:border-white/[0.08]",children:[(0,a.jsx)("div",{className:"text-[9px] font-medium text-gray-400 dark:text-gray-500 mb-1",children:"Notes"}),(0,a.jsx)(u,{thought:c})]}):null,h&&"object"==typeof h&&Object.keys(h).length>0&&"string"==typeof h.verdict&&h.verdict.trim()?(0,a.jsx)("div",{className:"mt-2.5 pt-2.5 border-t border-amber-200/50 dark:border-amber-800/40 rounded-b-lg",children:(0,a.jsxs)("div",{className:"rounded-lg border border-amber-200/70 dark:border-amber-800/45 bg-amber-50/50 dark:bg-amber-950/25 px-2.5 py-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,a.jsx)(d.A,{className:"w-3 h-3 text-amber-600 dark:text-amber-400 shrink-0","aria-hidden":!0}),(0,a.jsxs)("span",{className:"text-[9px] font-semibold text-amber-900 dark:text-amber-200",children:["Sentinel \xb7 ",h.verdict.trim()]})]}),Array.isArray(h.issues)&&h.issues.length>0?(0,a.jsx)("ul",{className:"text-[9px] text-amber-950/90 dark:text-amber-100/85 list-disc pl-3.5 space-y-0.5",children:h.issues.slice(0,5).map((e,t)=>(0,a.jsx)("li",{children:String(e)},t))}):null]})}):null]}),(0,a.jsx)(g,{visible:k})]})}},58262:(e,t,r)=>{r.d(t,{G4:()=>n,Q2:()=>s,VW:()=>d,bL:()=>c,tz:()=>p,w6:()=>l});let a={read_preview_context:"Reading project context",read_operational_skill:"Loading platform knowledge",reflect_on_progress:"Planning approach",verify_strategy_alignment:"Verifying strategy",create_social_content:"Generating content",evaluate_generation_result:"Evaluating output",refine_video_direction:"Refining video direction",rerender_video:"Re-rendering video",generate_next_scene:"Generating next scene",finalize_video:"Preparing merge & music",update_architectural_copy:"Updating copy",google_search:"Searching the web",delegate_to_specialist:"Consulting specialist",transfer_to_agent:"Handing off to specialist agent",generate_chat_visual:"Generating visual preview",research_visual_references:"Finding reference images",recall_memories:"Recalling past learnings",save_memory:"Saving insight",read_playbook:"Reading strategic playbook",list_knowledge:"Browsing knowledge directory",write_knowledge_file:"Writing knowledge file",read_knowledge_file:"Reading knowledge file",bake_video:"Rendering scene video",get_current_datetime:"Current date & time",read_research_context:"Reading research & strategy context",scrape_website:"Reviewing website",discover_visual
1s:"Discovering visual references",search_google_images:"Searching Google Images",update_strategy_config:"Updating strategy tuning",infer_color_mood_from_visuals:"Inferring color palette",save_onboarding_data:"Saving onboarding",generate_fast_content_plan:"Generating 7-day plan",generate_content_strategy:"Generating 30-day strategy",wait_for_content_strategy_job:"Loading plan & alignment signals",release_strategy_calendar_preview:"Showing calendar on dashboard",extend_content_calendar:"Extending calendar",list_content_strategy_jobs:"Listing strategy calendars",read_content_calendar:"Reading content calendar",read_content_calendar_item:"Reading calendar item",update_content_calendar_item:"Updating calendar item",add_content_calendar_item:"Adding calendar item",remove_content_calendar_item:"Removing calendar item",remove_all_content_calendar_items:"Clearing entire calendar",search_content_calendar:"Searching calendar",read_content_studio_thread:"Reading Content Studio chat",delegate_to_studio_agent:"Updating Content Studio session (legacy)",ensure_content_studio_session:"Opening Content Studio session",read_content_studio_status:"Reading Content Studio status",list_batch_studio_sessions:"Checking batch studio sessions",set_content_studio_template:"Setting Content Studio template",set_content_studio_brand_asset:"Pinning brand asset on Content Studio",evaluate_social_draft_eligibility:"Checking draft scheduler readiness",handoff_to_strategy_agent:"Messaging strategy partner",sync_multi_agent_session:"Syncing multi-agent session",generate_design_spec:"Building design layout (JSON spec)",polish_design_spec_copy:"Polishing on-image copy",revise_design_spec_stage:"Revising design plan",refine_rendered_design:"Refining rendered design",render_design:"Rendering final image(s)"};function n(e){if(!e||"string"!=typeof e)return"Working";let t=e.trim();return a[t]?a[t]:t.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}let i=new Set(["Connectingâ¦","Loading attachmentsâ¦","Calling modelâ¦"]);function s(e){return(e||[]).filter(e=>"string"==typeof e&&e.trim()&&!i.has(e.trim()))}let o=new Set(["read_preview_context","read_operational_skill","read_research_context","reflect_on_progress","get_current_datetime","recall_memories","save_memory","read_playbook","list_knowledge","read_knowledge_file","write_knowledge_file","list_content_strategy_jobs","read_content_calendar","read_content_calendar_item","search_content_calendar","read_content_studio_thread","sync_multi_agent_session"]);function l(e,t){let r=t||[],a=[],n=[],i=[],s=[];(e||[]).forEach((e,t)=>{var l;let d=String((null==e?void 0:e.name)||(null==e||null==(l=e.functionCall)?void 0:l.name)||"").trim(),c=t<r.length?r[t]:void 0;d&&o.has(d)?(a.push(e),n.push(c)):(i.push(e),s.push(c))});let l=[];return a.length>0&&l.push({key:"context",title:"Context & knowledge",actions:a,actionResults:n}),i.length>0&&l.push({key:"delivery",title:"Deliverables",actions:i,actionResults:s}),l}function d(e,t,r){let{agentStep:a,isWaitingForFirstChunk:i,isStillWorking:s,thoughtSnippet:o}=r,l=e||[],d=t||[],c=[];if(0===l.length){let e=a&&a.trim()||(i?"Connectingâ¦":(null==o?void 0:o.trim())||"Thinkingâ¦");return c.push({key:"phase-0",label:e,state:"active"}),c}return l.forEach((e,t)=>{var r;let a,i;a=(null==e?void 0:e.language)!=null&&(null==e?void 0:e.code)!=null?(null==e?void 0:e.language)?"Running ".concat(String(e.language)):"Running code":n((null==e?void 0:e.name)||(null==e||null==(r=e.functionCall)?void 0:r.name)||""),i=null!=d[t]?"done":t===l.length-1&&s?"active":"pending",c.push({key:"tool-".concat(t),label:a,state:i})}),c}function c(e){let t=(e||"").trim();if(!t)return[];let r=t.split(/\n{2,}/).map(e=>e.trim()).filter(Boolean);return r.length>0?r.slice(0,14):[]}function p(e,t){let r=(e||[]).filter(e=>"string"==typeof e&&e.trim().length>0);return 0===r.length?[]:r.map((e,a)=>({key:"pl-".concat(a,"-").concat(e.slice(0,24)),label:e.trim(),state:a<r.length-1?"done":t?"active":"done"}))}},64019:(e,t,r)=>{r.d(t,{ZP:()=>n});let a=new Set(["[email protected]","[email protected]"]);function n(e,t){return function(e){let t=e.trim();return"Website"===t||"YouTube"===t||"Instagram"===t}(e)&&!(t&&"string"==typeof t&&a.has(t.trim().toLowerCase()))}},77178:(e,t,r)=>{r.d(t,{L:()=>c,n:()=>d});
1var a=r(37876),n=r(14232),i=r(27506),s=r(35739),o=r(56672),l=r(58262);function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e5;if(!(null==e?void 0:e.updatedAt))return!1;let r=e.updatedAt;return"function"==typeof r.toMillis&&Date.now()-r.toMillis()>t}function c(e){let{title:t,run:r,show:c=!0}=e,p=(0,n.useMemo)(()=>r?(0,l.tz)((0,l.Q2)(r.pipelineLabels||[]),!0):[],[r]);return!c||!r||d(r)?null:(0,a.jsxs)(i.P.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},className:"mb-5 flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[9px] font-black uppercase tracking-widest text-xerpihan-primary-500",children:t}),(0,a.jsx)(s.A,{className:"h-3.5 w-3.5 shrink-0 animate-spin text-xerpihan-primary-500"})]}),(0,a.jsx)(o.fU,{steps:p,statusLine:r.stepLabel,isStreaming:!0,isWaitingForFirstChunk:0===p.length})]})}},79225:(e,t,r)=>{r.d(t,{u:()=>h});var a=r(37876),n=r(14232),i=r(27506),s=r(27212),o=r(72502),l=r(21156),d=r(35739),c=r(467),p=r(34287),m=r(58725),g=r(29053);function h(e){let{title:t,plan:r,accent:h="default",defaultExpanded:u=!1,dockAboveComposer:x=!1,inlineDock:b=!1,emptyHint:y=null}=e,[v,f]=(0,n.useState)(u),k=!!(x&&b),w=(0,n.useMemo)(()=>(null==r?void 0:r.steps)&&Array.isArray(r.steps)?r.steps.slice(0,24):[],[null==r?void 0:r.steps]);if(0===w.length){if(!(null==y?void 0:y.trim()))return null;let e="strategy"===h?"border-violet-200/60 dark:border-violet-500/20":"border-xerpihan-primary-200/60 dark:border-xerpihan-primary-500/20",r="strategy"===h?"bg-violet-50/40 dark:bg-violet-950/15":"bg-xerpihan-primary-50/30 dark:bg-xerpihan-primary-950/15",n="strategy"===h?"text-violet-600 dark:text-violet-400":"text-xerpihan-primary-600 dark:text-xerpihan-primary-400";return k?(0,a.jsxs)("div",{className:"inline-flex max-w-[min(100%,240px)] min-w-0 items-center gap-1.5 rounded-full border ".concat(e," ").concat(r," px-2.5 py-1 shadow-sm"),title:y,children:[(0,a.jsx)(p.A,{className:"h-3 w-3 shrink-0 ".concat(n),"aria-hidden":!0}),(0,a.jsx)("span",{className:"truncate text-[9px] font-black uppercase tracking-widest ".concat(n),children:t})]}):(0,a.jsx)("div",{className:"rounded-2xl border ".concat(e," ").concat(r," px-3.5 py-2.5 ").concat(x?"mb-0 shadow-sm":"mb-4"),children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)(p.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 ".concat(n)}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,a.jsx)("span",{className:"text-[9px] font-black uppercase tracking-widest ".concat(n),children:t}),(0,a.jsx)("p",{className:"text-[11px] font-medium leading-snug text-gray-600 dark:text-gray-400",children:y})]})]})})}let _=w.filter(e=>"done"===e.status||"skipped"===e.status).length,j=w.length,N=j>0?Math.round(_/j*100):0,A="strategy"===h?"border-violet-200/60 dark:border-violet-500/20":"border-xerpihan-primary-200/60 dark:border-xerpihan-primary-500/20",S="strategy"===h?"bg-violet-50/40 dark:bg-violet-950/15":"bg-xerpihan-primary-50/30 dark:bg-xerpihan-primary-950/15",C="strategy"===h?"text-violet-600 dark:text-violet-400":"text-xerpihan-primary-600 dark:text-xerpihan-primary-400",P=(0,a.jsx)("div",{className:"shrink-0 overflow-hidden rounded-full bg-black/5 dark:bg-white/5 ".concat(k?"mx-2 h-0.5":"mx-3.5 h-1"),children:(0,a.jsx)(i.P.div,{className:"h-full rounded-full ".concat("strategy"===h?"bg-violet-500":"bg-xerpihan-primary-500"),initial:{width:0},animate:{width:"".concat(N,"%")},transition:{duration:.5,ease:"easeOut"}})}),R=(0,a.jsxs)("button",{type:"button",onClick:()=>f(e=>!e),className:"flex w-full items-center gap-1.5 text-left transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] ".concat(k?"shrink-0 px-2 py-1.5":"gap-2 px-3.5 py-2.5"," ").concat(x&&!k?"shrink-0":""),children:[(0,a.jsx)(p.A,{className:"shrink-0 ".concat(k?"h-3 w-3":"h-3.5 w-3.5"," ").concat(C)}),(0,a.jsx)("span",{className:"min-w-0 font-black uppercase tracking-widest ".concat(C," ").concat(k?"max-w-[5.5rem] truncate text-[8px] sm:max-w-[7rem]":"text-[9px]"),children:t}),(0,a.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-1 sm:gap-2",children:[(0,a.jsxs)("span",{className:"font-bold text-gray-500 tabular-nums ".concat(k?"text-[9px]":"text-[10px]"),children:[_,"/",j]}),v?(0,a.jsx)(m.A,{className:"text-gray-400 ".concat(k?"h-3 w-3":"h-3.5 w-3.5")}):(0,a.jsx)(g.A,{className:"text-gray-400 ".concat(k?"h-3 w-3":"h-3.5 w-3.5")})]})]}),T=(0,a.jsx)("ul",{className:"space-y-0.5 px-3.5 pb-3 pt-2",children:w.map(e=>{var t;let n=e.id===(null==r?void 0:r.currentStepId),i="done"===e.status||"skipped"===e.status;return(0,a.jsxs)("li",{className:"flex items-start gap-2 rounded-lg px-2 py-1.5 text-[11px] font-semibold leading-snug transition-colors ".concat(n?"bg-black/[0.04] dark:bg-white/[0.06]":""," ").concat(i?"text-gray-400 dark:text-gray-500":"text-gray-700 dark:text-gray-300"),children:[(t=e.status,"done"===t?(0,a.jsx)(o.A,{className:"h-3.5 w-3.5 shrink-0 text-emerald-500"}):"skipped"===t?(0,a.jsx)(l.A,{className:"h-3.5 w-3.5 shrink-0 text-gray-400"}):"in_progress"===t?(0,a.jsx)(d.A,{className:"h-3.5 w-3.5 shrink-0 animate-spin text-xerpihan-primary-500"}):(0,a.jsx)(c.A,{className:"h-3.5 w-3.5 shrink-0 text-gray-300 dark:text-gray-600"})),(0,a.jsx)("span",{className:i?"line-through decoration-gray-300 dark:decoration-gray-600":"",children:e.label})]},e.id)})}),L=(0,a.jsx)(s.N,{initial:!1,children:v&&(0,a.jsxs)(i.P.div,{initial:{height:0,opacity:0}
1,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"min-h-0 overflow-hidden",children:[T,(null==r?void 0:r.source)&&(0,a.jsxs)("p",{className:"px-5 pb-2.5 text-[9px] text-gray-400",children:["Source: ",r.source]})]})}),E=(0,a.jsx)(s.N,{initial:!1,children:v&&(0,a.jsxs)(i.P.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.15},className:"absolute bottom-full left-0 z-[130] mb-1.5 max-h-[min(50vh,280px)] w-[min(calc(100vw-1.5rem),20rem)] overflow-y-auto rounded-xl border border-black/10 bg-brand-white shadow-xl dark:border-white/10 dark:bg-black",children:[T,(null==r?void 0:r.source)&&(0,a.jsxs)("p",{className:"px-3.5 pb-2.5 pt-0 text-[9px] text-gray-400",children:["Source: ",r.source]})]})});return k?(0,a.jsxs)("div",{className:"relative inline-flex min-h-[2.375rem] min-w-0 max-w-[min(100%,260px)] flex-col overflow-visible rounded-xl border ".concat(A," ").concat(S," shadow-sm"),children:[E,R,P]}):(0,a.jsx)("div",{className:"rounded-2xl border ".concat(A," ").concat(S," overflow-hidden ").concat(x?"mb-0 flex max-h-[min(50vh,380px)] min-h-0 flex-col justify-end overflow-y-auto shadow-sm":"mb-4"),children:x?(0,a.jsxs)(a.Fragment,{children:[L,P,R]}):(0,a.jsxs)(a.Fragment,{children:[R,P,L]})})}}}]);
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.