1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[58974],{24019:(e,t,n)=>{"use strict";n.d(t,{BusinessLineChat:()=>th});var a=n(95155),s=n(12115),l=n(2821),r=n(75889);function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.QP)((0,l.$)(t))}var o=n(79350),c=n(88809),d=n(24407),u=n(64443),p=n(2186),m=n(47650),x=n(15532),h=n(95585);function f(e){var t,n;let{open:l,onClose:r,images:o,initialIndex:c=0}=e,[d,u]=(0,s.useState)(c),f=o.length>1;(0,s.useEffect)(()=>{l&&u(c)},[l,c]);let g=(0,s.useCallback)(e=>{null==e||e.stopPropagation(),u(e=>e>0?e-1:o.length-1)},[o.length]),b=(0,s.useCallback)(e=>{null==e||e.stopPropagation(),u(e=>e<o.length-1?e+1:0)},[o.length]);if((0,s.useEffect)(()=>{if(!l)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),e.stopPropagation(),r();break;case"ArrowLeft":f&&g();break;case"ArrowRight":f&&b()}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[l,f,r,g,b]),(0,s.useEffect)(()=>{if(!l)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[l]),"undefined"==typeof document||!l)return null;let v=null!=(t=o[d])?t:o[0];return(null==v?void 0:v.url)?(0,m.createPortal)((0,a.jsxs)("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/90 backdrop-blur-sm",onClick:r,children:[(0,a.jsx)("button",{type:"button",onClick:r,"aria-label":"Close fullscreen (Esc)",className:"absolute top-4 right-4 z-10 inline-flex size-9 items-center justify-center rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,a.jsx)(p.A,{className:"size-5"})}),f&&(0,a.jsx)("button",{type:"button",onClick:g,"aria-label":"Previous image (â)",className:"absolute left-4 top-1/2 z-10 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,a.jsx)(x.A,{className:"size-6"})}),(0,a.jsx)("img",{src:v.url,alt:null!=(n=v.filename)?n:"Image preview",className:"max-w-[90vw] max-h-[85vh] object-contain select-none",onClick:e=>e.stopPropagation(),draggable:!1}),f&&(0,a.jsx)("button",{type:"button",onClick:b,"aria-label":"Next image (â)",className:"absolute right-4 top-1/2 z-10 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,a.jsx)(h.A,{className:"size-6"})}),f&&(0,a.jsxs)("div",{className:"absolute bottom-6 left-1/2 -translate-x-1/2 flex flex-col items-center gap-3",children:[(0,a.jsx)("div",{className:"flex gap-2",children:o.map((e,t)=>(0,a.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),u(t)},"aria-label":"Go to image ".concat(t+1),className:i("size-2 rounded-full transition-all",t===d?"bg-white scale-125":"bg-white/40 hover:bg-white/60")},t))}),(0,a.jsxs)("span",{className:"text-white/70 text-sm",children:[d+1," / ",o.length]})]})]}),document.body):null}function g(e){let{id:t,filename:n,size:l,isImage:r,url:m,onRemove:x,className:h,display:g="chip",enableImagePreview:b=!0}=e,[v,j]=(0,s.useState)(!1),[y,k]=(0,s.useState)(!1),N=function(e,t){var n;if(t)return"image";let a=null==(n=e.split(".").pop())?void 0:n.toLowerCase();return["js","ts","jsx","tsx","py","rb","go","rs","java","kt","swift","c","cpp","h","hpp","cs","php"].includes(a||"")?"code":["json","yaml","yml","xml"].includes(a||"")?"data":"text"}(n,r),w="image-only"===g&&r&&!!m,A=!!(b&&r&&m),C=e=>{e.stopPropagation(),k(!0)};return(0,a.jsxs)("div",{className:i("relative bg-muted/50 rounded-[calc(var(--an-input-border-radius)-var(--an-context-padding))]",w?"size-10 flex items-center justify-center":"flex items-center gap-2 pl-1 pr-2 py-1 min-w-[120px] max-w-[200px]",h),onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:[w?(0,a.jsx)("div",{className:i("size-8 overflow-hidden shrink-0 rounded-[calc(var(--an-input-border-radius)-var(--an-context-padding)-2px)]",A&&"cursor-pointer"),onClick:A?C:void 0,children:(0,a.jsx)("img",{src:m,alt:n,className:"w-full h-full object-cover"})}):(0,a.jsxs)(a.Fragment,{children:[r&&m?(0,a.jsx)("div",{className:i("w-8 self-stretch overflow-hidden shrink-0 rounded-[calc(var(--an-input-border-radius)-var(--an-context-padding)-2px)]",A&&"cursor-pointer"),onClick:A?C:void 0,children:(0,a.jsx)("img",{src:m,alt:n,className:"w-full h-full object-cover aspect-square"})}):(0,a.jsx)("div",{className:"flex items-center justify-center w-8 self-stretch bg-muted shrink-0 rounded-[calc(var(--an-input-border-radius)-var(--an-context-padding)-2px)]",children:function(e){switch(e){case"image":return(0,a.jsx)(o.A,{className:"size-4 text-muted-foreground"});case"code":return(0,a.jsx)(c.A,{className:"size-4 text-muted-foreground"});case"data":return(0,a.jsx)(d.A,{className:"size-4 text-muted-foreground"});default:return(0,a.jsx)(u.A,{className:"size-4 text-muted-foreground"})}}(N)}),(0,a.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-foreground truncate",title:n,children:n}),void 0!==l&&(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground",children:l<1024?"".concat(l," B"):l<1048576?"".concat((l/1024).toFixed(1)," KB"):"".concat((l/1048576).toFixed(1)," MB")})]})]}),x&&(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),x()},className:"absolute -top-1.5 -right-1.5 size-4 rounded-full bg-background border border-border\n flex items-center justify-center transition-[opacity,transform] duration-150 ease-out active:scale-[0.97] z-10\n text-muted-foreground hover:text-foreground\n ".concat(v?"opacity-100":"opacity-0"),type:"button",children:(0,a.jsx)(p.A,{className:"size-3"})}),A&&m&&(0,a.jsx)(f,{open:y,onClose:()=>k(!1),images:[{id:t,url:m,filename:n}]})]})}function b(e){return"object"==typeof e&&null!==e}function v(e){return"text"===e.type&&"string"==typeof e.text}let j=(0,s.memo)(function(e){var t,n,l,r;let{message:o,className:c,enableImagePreview:d=!0}
1=e,[u,p]=(0,s.useState)(null),m=(null!=(n=null==(t=o.parts)?void 0:t.filter(v))?n:[]).map(e=>e.text).join(""),x=[],h=[];for(let e of null!=(l=o.parts)?l:[]){let t=function(e){var t,n,a,s,l;if(!b(e))return null;let r=e.type;if("string"!=typeof r)return null;if("image"===r)return null!=(n=null!=(t=e.url)?t:e.image)?n:null;if("data-image"===r)return null!=(s=null==(a=e.data)?void 0:a.url)?s:null;if("file"===r&&(null==(l=e.mimeType)?void 0:l.startsWith("image/"))){if(e.url)return e.url;if(e.data)return"data:".concat(e.mimeType,";base64,").concat(e.data)}return null}(e);t&&x.push(t);let n=function(e){var t,n;if(!b(e)||"file"!==e.type)return null;let a=e.filename||e.name||e.fileName||"Attachment";return null!=(n=null==(t=e.mimeType)?void 0:t.startsWith("image/"))&&n?null:{filename:a,size:e.size}}(e);n&&h.push(n)}if(b(o)&&Array.isArray(o.experimental_attachments))for(let e of o.experimental_attachments)(null==(r=e.contentType)?void 0:r.startsWith("image/"))&&e.url&&x.push(e.url);if(!m&&0===x.length&&0===h.length)return null;let j=x.map((e,t)=>({id:"".concat(o.id,"-img-").concat(t),url:e,filename:"image-".concat(t+1)}));return(0,a.jsxs)("div",{className:i("flex flex-col items-end gap-1",c),children:[x.length>0&&x.map((e,t)=>(0,a.jsx)("div",{className:i("max-w-[200px] p-1.5 bg-an-foreground/4 rounded-an-message",d&&"cursor-pointer"),onClick:d?()=>p(t):void 0,children:(0,a.jsx)("img",{src:e,alt:"attachment",className:"block object-cover max-w-[184px] max-h-[120px] rounded-an-message-inner"})},t)),d&&j.length>0&&(0,a.jsx)(f,{open:null!==u,onClose:()=>p(null),images:j,initialIndex:null!=u?u:0}),h.length>0&&(0,a.jsx)("div",{className:"flex flex-col items-end gap-2",children:h.map((e,t)=>(0,a.jsx)(g,{id:"".concat(e.filename,"-").concat(t),filename:e.filename,size:e.size},"".concat(e.filename,"-").concat(t)))}),m&&(0,a.jsx)("div",{className:"max-w-[calc(95%-40px)] ms-[70px]",children:(0,a.jsx)("div",{className:"px-3.5 py-1.5 text-sm transition-colors rounded-an-message bg-an-user-message-bg text-an-user-message-text",children:(0,a.jsx)("p",{className:"leading-5 whitespace-pre-wrap wrap-break-word",children:m})})})]})});var y=n(79572),k=n(72139);let N=new Set(["bash","diff","html","js","json","jsx","md","markdown","sh","shell","text","ts","tsx","yml","yaml"]),w=(0,k.V)({themes:["github-light","github-dark"]});
1function A(e){let{content:t,className:n}=e,s=t.replace(/^(\d+)\.\s*\n+\s*\n*/gm,"$1. ").replace(/```([^\n]*)/g,(e,t)=>{let n=String(t||"").trim().toLowerCase();if(!n)return"```";let a=n.split(/\s+/)[0];return N.has(a)?"```".concat(a):"```text"});return(0,a.jsx)("div",{className:i("an-markdown","overflow-hidden wrap-break-word","[&_li>p]:inline [&_li>p]:mb-0",n),children:(0,a.jsx)(y.jH,{components:{h1:e=>{let{children:t,...n}=e;return(0,a.jsx)("h1",{className:"an-md-h1 text-base font-semibold mt-3 mb-1.5",...n,children:t})},h2:e=>{let{children:t,...n}=e;return(0,a.jsx)("h2",{className:"an-md-h2 text-base font-semibold mt-3 mb-1.5",...n,children:t})},h3:e=>{let{children:t,...n}=e;return(0,a.jsx)("h3",{className:"an-md-h3 text-sm font-semibold mt-2 mb-1",...n,children:t})},h4:e=>{let{children:t,...n}=e;return(0,a.jsx)("h4",{className:"an-md-h4 text-sm font-medium mt-2 mb-1",...n,children:t})},p:e=>{let{children:t,...n}=e;return(0,a.jsx)("p",{className:"an-md-p text-sm leading-relaxed text-an-foreground/80",...n,children:t})},ul:e=>{let{children:t,...n}=e;return(0,a.jsx)("ul",{className:"an-md-ul list-disc list-outside space-y-0.5 text-sm mb-2 pl-4 text-an-foreground/80",...n,children:t})},ol:e=>{let{children:t,...n}=e;return(0,a.jsx)("ol",{className:"an-md-ol list-decimal list-outside space-y-0.5 text-sm mb-2 pl-5 text-an-foreground/80",...n,children:t})},li:e=>{let{children:t,...n}=e;return(0,a.jsx)("li",{className:"an-md-li text-sm pl-0.5 text-an-foreground/80",...n,children:t})},strong:e=>{let{children:t,...n}=e;return(0,a.jsx)("strong",{className:"font-medium text-an-foreground",...n,children:t})},a:e=>{let{href:t,children:n,...s}=e;if(!t)return(0,a.jsx)("span",{children:n});let l=t.startsWith("http")||t.startsWith("mailto:");return(0,a.jsx)("a",{...s,href:t,target:l?"_blank":void 0,rel:l?"noopener noreferrer":void 0,className:"an-md-link hover:underline underline-offset-2 text-an-primary-color",children:n})},blockquote:e=>{let{children:t,...n}=e;return(0,a.jsx)("blockquote",{className:"an-md-blockquote pl-3 italic mb-2 text-sm border-l-2 border-an-border-color text-an-foreground/70",...n,children:t})},hr:e=>{let{...t}=e;return(0,a.jsx)("hr",{className:"an-md-hr my-4 border-an-border-color",...t})},table:e=>{let{children:t,...n}=e;return(0,a.jsx)("div",{className:"overflow-x-auto my-3 border border-an-border-color rounded-an-tool-border-radius",children:(0,a.jsx)("table",{className:"an-md-table w-full text-sm [&>thead]:bg-an-tool-background [&>thead>tr>th]:bg-an-tool-background",...n,children:t})})},th:e=>{let{children:t,...n}=e;return(0,a.jsx)("th",{className:"text-left font-medium px-3 py-2 bg-an-background-secondary",...n,children:t})},td:e=>{let{children:t,...n}=e;return(0,a.jsx)("td",{className:"px-3 py-2 border-t border-an-border-color text-an-foreground/80",...n,children:t})}},plugins:{code:w},children:s})})}let C=(0,s.memo)(function(e){let{title:t="Something went wrong",message:n,className:s}=e;return(0,a.jsx)("div",{className:i("flex justify-start",s),children:(0,a.jsxs)("div",{className:"border border-red-500/30 bg-red-500/10 px-4 py-2.5 text-sm text-an-foreground rounded-[8px]",children:[(0,a.jsx)("div",{className:"font-medium text-an-foreground",children:t}),(0,a.jsx)("div",{className:"mt-0.5 text-an-foreground-muted",children:n})]})})});var S=n(90382),P=n(21548),_=n(24008);let M=s.memo(function(e){let{children:t,as:n="p",className:s,duration:l=2,spread:r=100,delay:o=0}=e;return(0,a.jsx)(n,{className:i("an-text-shimmer","an-text-shimmer--active",s),style:{"--an-shimmer-duration":"".concat(l,"s"),"--an-shimmer-spread":"".concat(r,"px"),animationDelay:o>0?"".concat(o,"s"):void 0,animationDuration:"".concat(l,"s"),animationIterationCount:"infinite",animationTimingFunction:"linear"},children:t})});function L(e){let{icon:t,shimmerLabel:n,completeLabel:s,isAnimating:l,detail:r,trailingContent:o,expandable:c=!1,expanded:d,defaultOpen:u=!1,onToggleExpand:p,children:m}=e,x=!l,f=null!=d&&d,g=c&&(x||f||l),b=(0,a.jsxs)("div",{className:i("flex items-center max-w-full select-none gap-1 rounded-an-tool-border-radius",g?"cursor-pointer":"cursor-default"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0 text-sm text-muted-foreground",children:[t&&(0,a.jsx)("span",{className:"flex items-center justify-center size-3 shrink-0",children:t}),(0,a.jsx)("span",{className:"font-[450] whitespace-nowrap shrink-0",children:l&&n?(0,a.jsx)(M,{as:"span",duration:1.2,className:"inline-flex items-center leading-none h-4 m-0",children:n}):s}),r&&(0,a.jsx)("span",{className:"font-normal truncate min-w-0 flex-1 text-an-foreground-muted/60",children:r}),o]}),c&&(x||f||l)&&(0,a.jsx)("div",{children:(0,a.jsx)(h.A,{className:i("shrink-0 text-muted-foreground transition-transform duration-150 ease-out","size-3","rotate-0 group-data-panel-open:rotate-90")})})]});return c?(0,a.jsxs)(S.N,{className:"flex flex-col gap-2 w-full",...void 0===d?{defaultOpen:u}:{open:d,onOpenChange:p},children:[(0,a.jsx)(P.R,{className:"group flex",disabled:!g,"aria-disabled":!g,children:b}),(0,a.jsx)(_.j,{className:i("overflow-hidden","h-[var(--collapsible-panel-height)] transition-all duration-150 ease-out","data-ending-style:h-0 data-starting-style:h-0","[&[hidden]:not([hidden='until-found'])]:hidden"),children:m})]}):(0,a.jsx)("div",{className:"flex flex-col gap-1",children:b})}var R=n(26195),W=n(47522),T=n(84193),I=n(77252),z=n(86980),E=n(26545),O=n(57402),F=n(9580),q=n(96825),B=n(65546),D=n(69950),Q=n(73790),G=n(65590);function H(e){if(!e)return"";for(let t of["/project/sandbox/repo/","/project/sandbox/","/project/","/workspace/"])if(e.startsWith(t))return e.slice(t.length);let t=e.match(/\.21st\/worktrees\/[^/]+\/[^/]+\/(.+)$/);if(t)return t[1];if(e.startsWith("/")){let t=e.split("/"),n=["apps","packages","src","lib","components"],a=t.findIndex(e=>n.includes(e));if(a>0)return t.slice(a).join("/")}return e}let V={"tool-Task":{icon:T.A,title:e=>{var t;let n="output-available"!==e.state&&"output-error"!==e.state,a=(null==(t=e.input)?void 0:t.subagent_type)||"Agent";return n?"Running ".concat(a):"".concat(a," completed")},subtitle:e=>{var t;let n=(null==(t=e.input)?void 0:t.description)||"";return n.length>50?n.slice(0,47)+"...":n},variant:"simple"},"tool-Agent":{icon:T.A,title:e=>{var t;let n="output-available"!==e.state&&"output-error"!==e.state,a=(null==(t=e.input)?void 0:t.subagent_type)||"Agent";return n?"Running ".concat(a):"".concat(a," completed")},subtitle:e=>{var t;let n=(null==(t=e.input)?void 0:t.description)||"";return n.length>50?n.slice(0,47)+"...":n},variant:"simple"},"tool-Skill":{icon:T.A,title:()=>"Skill",subtitle:e=>{var t;return(null==(t=e.input)?void 0:t.skill)||""},variant:"simple"},"tool-Grep":{icon:I.A,title:e=>{var t;if("output-available"!==e.state&&"output-error"!==e.state)return"Grepping";let n=(null==(t=e.output)?void 0:t.numFiles)||0;return n>0?"Grepped ".concat(n," files"):"No matches"},subtitle:e=>{var t,n;let a=(null==(t=e.input)?void 0:t.pattern)||"",s=(null==(n=e.input)?void 0:n.path)||"";if(s){let e="".concat(a," in ").concat(H(s));return e.length>40?e.slice(0,37)+"...":e}return a.length>40?a.slice(0,37)+"...":a},variant:"simple"},"tool-Glob":{icon:z.A,title:e=>{var t;if("output-available"!==e.state&&"output-error"!==e.state)return"Exploring files";let n=(null==(t=e.output)?void 0:t.numFiles)||0;return n>0?"Found ".concat(n," files"):"No files found"},subtitle:e=>{var t;let n=(null==(t=e.input)?void 0:t.pattern)||"";return n.length>40?n.slice(0,37)+"...":n},variant:"simple"},"tool-Read":{icon:E.A,title:e=>"output-available"!==e.state&&"output-error"!==e.state?"Reading":"Read",subtitle:e=>{var t;let n=(null==(t=e.input)?void 0:t.file_path)||"";return n&&n.split("/").pop()||""},variant:"simple"},"tool-Edit":{icon:c.A,title:e=>{var t;let n=(null==(t=e.input)?void 0:t.file_path)||"";return n&&n.split("/").pop()||"Edit"},subtitle:e=>{var t,n;if("output-available"!==e.state&&"output-error"!==e.state)return"";
1let a=(null==(t=e.input)?void 0:t.old_string)||"",s=(null==(n=e.input)?void 0:n.new_string)||"";if(!a&&!s)return"";if(a!==s){let{addedLines:e,removedLines:t}=function(e,t){let n=e.split("\n"),a=t.split("\n"),s=Math.max(n.length,a.length),l=0,r=0;for(let e=0;e<s;e++)void 0!==n[e]&&void 0!==a[e]?n[e]!==a[e]&&(r++,l++):void 0!==n[e]?r++:void 0!==a[e]&&l++;return{addedLines:l,removedLines:r}}(a,s);return"+".concat(e," -").concat(t)}return""},variant:"simple"},"tool-Write":{icon:O.A,title:()=>"Create",subtitle:e=>{var t;let n=(null==(t=e.input)?void 0:t.file_path)||"";return n&&n.split("/").pop()||""},variant:"simple"},"tool-Bash":{icon:F.A,title:e=>"output-available"!==e.state&&"output-error"!==e.state?"Running command":"Ran command",subtitle:e=>{var t;let n=(null==(t=e.input)?void 0:t.command)||"";if(!n)return"";let a=n.replace(/\\\s*\n\s*/g," ").trim();return(a=a.replace(/\/(?:Users|home|root)\/[^\s"']+/g,e=>H(e))).length>50?a.slice(0,47)+"...":a},variant:"simple"},"tool-WebFetch":{icon:q.A,title:e=>"output-available"!==e.state&&"output-error"!==e.state?"Fetching":"Fetched",subtitle:e=>{var t;let n=(null==(t=e.input)?void 0:t.url)||"";try{return new URL(n).hostname.replace("www.","")}catch(e){return n.slice(0,30)}},variant:"simple"},"tool-WebSearch":{icon:I.A,title:e=>"output-available"!==e.state&&"output-error"!==e.state?"Searching web":"Searched web",subtitle:e=>{var t;let n=(null==(t=e.input)?void 0:t.query)||"";return n.length>40?n.slice(0,37)+"...":n},variant:"collapsible"},"tool-TodoWrite":{icon:B.A,title:e=>{var t;let n="output-available"!==e.state&&"output-error"!==e.state,a=(null==(t=e.input)?void 0:t.action)||"update";return n?"add"===a?"Adding todo":"Updating todos":"add"===a?"Added todo":"Updated todos"},subtitle:e=>{var t;let n=(null==(t=e.input)?void 0:t.todos)||[];return 0===n.length?"":"".concat(n.length," ").concat(1===n.length?"item":"items")},variant:"simple"},"tool-PlanWrite":{icon:T.A,title:e=>{var t,n,a;let s="output-available"!==e.state&&"output-error"!==e.state,l=(null==(t=e.input)?void 0:t.action)||"create";if(s)return"create"===l?"Creating plan":"approve"===l?"Approving plan":"Updating plan";let r=null==(a=e.input)||null==(n=a.plan)?void 0:n.status;return"awaiting_approval"===r?"Plan ready for review":"approved"===r?"Plan approved":"completed"===r?"Plan completed":"create"===l?"Created plan":"Updated plan"},variant:"simple"},"tool-ExitPlanMode":{icon:D.A,title:e=>"output-available"!==e.state&&"output-error"!==e.state?"Finishing plan":"Plan complete",variant:"simple"},"tool-NotebookEdit":{icon:c.A,title:e=>"output-available"!==e.state&&"output-error"!==e.state?"Editing notebook":"Edited notebook",subtitle:e=>{var t;let n=(null==(t=e.input)?void 0:t.file_path)||"";return n&&n.split("/").pop()||""},variant:"simple"},"tool-BashOutput":{icon:F.A,title:e=>"output-available"!==e.state&&"output-error"!==e.state?"Getting output":"Command output",subtitle:e=>{var t;let n=e.output;if("string"==typeof n&&n.trim())return n.trim();let a=(null==(t=e.input)?void 0:t.command)||"";if(!a)return"";let s=a.replace(/\\\s*\n\s*/g," ").trim();return(s=s.replace(/\/(?:Users|home|root)\/[^\s"']+/g,e=>H(e))).length>50?s.slice(0,47)+"...":s},variant:"simple"},"tool-KillShell":{icon:Q.A,title:e=>"output-available"!==e.state&&"output-error"!==e.state?"Stopping shell":"Shell stopped",subtitle:e=>{var t;let n=null==(t=e.input)?void 0:t.pid;return"number"==typeof n?"pid ".concat(n):""},variant:"simple"},"tool-cloning":{icon:G.A,title:e=>"output-available"!==e.state&&"output-error"!==e.state?"Cloning repo":"Repo cloned",subtitle:e=>{var t,n;return null!=(n=null==(t=e.input)?void 0:t.repo)?n:""},variant:"simple"},"tool-Thinking":{icon:T.A,title:e=>"output-available"!==e.state&&"output-error"!==e.state?"Thinking...":"Thought",variant:"collapsible"}},Y="tool-mcp__",U={"tool-ListMcpResources":{serverName:"mcp",toolName:"list_resources",displayName:"List Resources",category:"list"},"tool-ListMcpResourcesTool":{serverName:"mcp",toolName:"list_resources",displayName:"List Resources",category:"list"},"tool-ReadMcpResource":{serverName:"mcp",toolName:"read_resource",displayName:"Read Resource",category:"get"},"tool-ReadMcpResourceTool":{serverName:"mcp",toolName:"read_resource",displayName:"Read Resource",category:"get"}},J=new Map;function $(e,t){var n;return!!function(e,t){if(e.toolCallId!==t.toolCallId||e.type!==t.type)return!1;let n=t.toolCallId;return n?!function(e,t){let n=J.get(e),a={state:t.state,inputJson:JSON.stringify(t.input||{}),outputJson:JSON.stringify(t.output||{})};if(!n)return J.set(e,a),!0;let s=n.state!==a.state||n.inputJson!==a.inputJson||n.outputJson!==a.outputJson;return s&&J.set(e,a),s}(n,t):e.state===t.state}(e.part,t.part)&&(void 0!==(n=t.part).output&&null!==n.output||"error"===n.state||"result"===n.state||e.chatStatus===t.chatStatus)}function K(e,t){var n;let a="output-available"!==e.state&&"output-error"!==e.state,s="output-error"===e.state||"output-
1available"===e.state&&(null==(n=e.output)?void 0:n.success)===!1,l="output-available"===e.state&&!s;return{isPending:a&&"streaming"===t,isError:s,isSuccess:l,isInterrupted:a&&"streaming"!==t&&void 0!==t}}function X(e,t,n){let a=(0,s.useRef)(n);a.current=n,(0,s.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>a.current(),t);return()=>clearTimeout(n)},[e,t])}let Z=(0,s.memo)(function(e){let{icon:t,title:n,subtitle:s,isPending:l}=e;return(0,a.jsx)(L,{icon:t?(0,a.jsx)(t,{className:"w-full h-full shrink-0 text-muted-foreground"}):void 0,shimmerLabel:n,completeLabel:n,isAnimating:l,detail:s})});function ee(e){return"result"===e?"complete":"animating"}function et(e,t){var n,a,s;let{toolName:l,args:r={},result:i}=t,o={id:e,type:"tool-call",toolName:"PlanWrite"===l?"Plan":"TodoWrite"===l?"Todo":l,toolDetail:function(e,t){switch(e){case"Bash":return(null==t?void 0:t.command)?String(t.command).slice(0,80):"";case"Edit":case"Write":case"Read":var n;return(null==t?void 0:t.file_path)&&null!=(n=String(t.file_path).split("/").pop())?n:"";case"Grep":case"Glob":return(null==t?void 0:t.pattern)?String(t.pattern):"";case"WebSearch":case"web_search":return(null==t?void 0:t.query)?String(t.query):"";case"WebFetch":case"web_fetch":return(null==t?void 0:t.url)?String(t.url).slice(0,60):"";default:return""}}(l,r),duration:Number.MAX_SAFE_INTEGER,toolVariant:function(e){let t=e.toLowerCase();return"thinking"===t||"reasoning"===t?"thinking":"websearch"===t||"web_search"===t||"grep"===t||"glob"===t||"webfetch"===t||"web_fetch"===t?"search":void 0}(l)};if("Bash"===l&&(o.bashCommand=(null==r?void 0:r.command)?String(r.command):void 0,"result"===t.state&&i))if("string"==typeof i)o.bashOutput=i,o.bashSuccess=!0;else if("object"==typeof i){let e="string"==typeof(null==i?void 0:i.stdout)?i.stdout:"string"==typeof(null==i?void 0:i.output)?i.output:"",t="string"==typeof(null==i?void 0:i.stderr)?i.stderr:"";o.bashOutput=[e,t].filter(Boolean).join(e&&t?"\n":"");let a=null!=(n=null==i?void 0:i.exitCode)?n:null==i?void 0:i.exit_code;o.bashSuccess=void 0===a||0===a}else o.bashOutput=JSON.stringify(i),o.bashSuccess=!0;if(("Edit"===l||"Write"===l||"Read"===l)&&(o.filePath=(null==r?void 0:r.file_path)?String(r.file_path):void 0),"Write"===l){let e="string"==typeof(null==i?void 0:i.content)?i.content:"string"==typeof(null==r?void 0:r.content)?r.content:"";if(e){let t=e.split("\n");o.diffStats="+".concat(t.length),o.diffLines=t.map(e=>({type:"add",content:e}))}}return"Edit"===l&&Array.isArray(null==i?void 0:i.structuredPatch)&&(o.diffStats=function(e){let t=0,n=0;for(let a of e)if(a.lines)for(let e of a.lines)e.startsWith("+")?t++:e.startsWith("-")&&n++;if(0===t&&0===n)return;let a=[];return t>0&&a.push("+".concat(t)),n>0&&a.push("-".concat(n)),a.join(" ")}(i.structuredPatch),o.diffLines=function(e){let t=[];for(let n of e)if(n.lines)for(let e of n.lines)e.startsWith("+")?t.push({type:"add",content:e.slice(1)}):e.startsWith("-")?t.push({type:"remove",content:e.slice(1)}):e.startsWith(" ")&&t.push({type:"context",content:e.slice(1)});return t}(i.structuredPatch)),("WebSearch"===l||"web_search"===l||"Grep"===l||"Glob"===l)&&(o.searchQuery=(null!=(a=null==r?void 0:r.query)?a:null==r?void 0:r.pattern)?String(null!=(s=null==r?void 0:r.query)?s:null==r?void 0:r.pattern):void 0,o.searchSource="WebSearch"===l||"web_search"===l?"web":"code"),("thinking"===l.toLowerCase()||"reasoning"===l.toLowerCase())&&(o.thoughtContent="string"==typeof(null==r?void 0:r.thought)?r.thought:"string"==typeof i?i:void 0),o}let en=(0,s.memo)(function(e){let{isPending:t,approveLabel:n,rejectLabel:l,onApprove:r,onReject:i}=e,[o,c]=(0,s.useState)(null),d=(0,s.useMemo)(()=>"approved"===o?{label:"Waiting",dots:!0}:"rejected"===o?{label:"Canceled",dots:!1}:t?{label:"Starting",dots:!0}:null,[o,t]);return(0,a.jsxs)("div",{className:"flex items-center justify-between py-1 pl-3 pr-2 border-t border-border bg-an-tool-background",children:[d?(0,a.jsxs)("span",{className:"text-xs text-an-tool-color-muted",children:[d.label,d.dots&&(0,a.jsxs)("span",{className:"inline-flex","aria-hidden":"true",children:[(0,a.jsx)("span",{className:"text-an-tool-color-muted animate-[loading-dots_1.4s_infinite_0.2s]",children:"."}),(0,a.jsx)("span",{className:"text-an-tool-color-muted animate-[loading-dots_1.4s_infinite_0.4s]",children:"."}),(0,a.jsx)("span",{className:"text-an-tool-color-muted animate-[loading-dots_1.4s_infinite_0.6s]",children:"."})]})]}):(0,a.jsx)("span",{"aria-hidden":"true"}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{o||(c("rejected"),null==i||i())},disabled:!!o,className:"h-5 px-1.5 rounded-[4px] text-xs text-muted-foreground hover:text-an-tool-color hover:bg-muted/50 active:scale-[0.98] transition-[background-color,color,transform] duration-150 disabled:opacity-60 disabled:hover:bg-transparent disabled:active:scale-100",children:"rejected"===o?"Skipped":null!=l?l:"Skip"}),(0,a.jsx)("button",{type:"button",onClick:()=>{o||(c("approved"),null==r||r())},disabled:!!o,className:"h-5 px-1.5 rounded-[4px] text-xs font-medium bg-an-primary-color text-an-send-button-color hover:bg-an-primary-color/90 active:scale-[0.98] transition-[background-color,transform] duration-150 disabled:opacity-60 disabled:hover:bg-an-primary-color disabled:active:scale-100",children:"approved"===o?"Approved":null!=n?n:"Next"})]})]})});function ea(e){var t;let{step:n,state:s,onComplete:l,approval:r}=e;X("animating"===s,n.duration,l);let i="animating"===s,o=null!=(t=n.bashCommand)?t:n.toolDetail,c=o.split("|").map(e=>{var t;return null!=(t=e.trim().split(/\s+/)[0])?t:""}
1).filter(Boolean).slice(0,4).join(", ");return(0,a.jsxs)("div",{className:"rounded-an-tool-border-radius border border-border bg-an-tool-background overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between pl-2.5 pr-2 h-7",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 min-w-0 overflow-hidden",children:i?(0,a.jsxs)(M,{as:"span",duration:1.2,className:"inline-flex items-center text-xs leading-none h-full m-0 truncate",children:["Running command: ",c]}):(0,a.jsxs)("span",{className:"text-xs text-muted-foreground truncate",children:["Ran command: ",c]})}),i&&(0,a.jsx)("svg",{className:"w-3 h-3 text-muted-foreground animate-spin shrink-0",viewBox:"0 0 16 16",fill:"none",children:(0,a.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"28",strokeDashoffset:"7",strokeLinecap:"round"})})]}),(0,a.jsxs)("div",{className:"border-t border-border px-2.5 py-1.5 font-mono text-[12px] leading-[16px] overflow-hidden bg-background",children:[(0,a.jsxs)("div",{className:"break-all",children:[(0,a.jsxs)("span",{className:"text-amber-600 dark:text-amber-400 select-none",children:["$"," "]}),(0,a.jsx)("span",{className:"text-foreground",children:o})]}),!i&&n.bashOutput&&(0,a.jsx)("div",{className:"mt-1 text-muted-foreground whitespace-pre-line max-h-[80px] overflow-hidden",children:n.bashOutput})]}),r&&(0,a.jsx)(en,{isPending:i,...r})]})}let es=(0,s.memo)(function(e){var t,n,s,l,r,i,o,c;let{part:d}=e,u=null!=(s=null==(t=d.input)?void 0:t.approval)?s:null==(n=d.args)?void 0:n.approval,p=et(null!=(r=null!=(l=d.toolCallId)?l:d.id)?r:"bash",{toolName:"Bash",args:null!=(o=null!=(i=d.input)?i:d.args)?o:{},state:"output-available"===d.state?"result":"input-streaming"===d.state?"partial-call":"call",result:null!=(c=d.output)?c:d.result}),m=ee("output-available"===d.state?"result":"input-streaming"===d.state?"partial-call":"call");return(0,a.jsx)(ea,{step:p,state:m,onComplete:()=>{},approval:u})});var el=n(76991),er=n(99099);function ei(e){var t,n;let{filename:s,className:l}=e,r=null!=(n=null==(t=s.split(".").pop())?void 0:t.toLowerCase())?n:"",i=null!=l?l:"w-2.5 h-2.5 shrink-0";return"ts"===r||"tsx"===r?(0,a.jsx)("svg",{viewBox:"0 0 32 32",className:i,children:(0,a.jsx)("path",{d:"M23.827,8.243A4.424,4.424,0,0,1,26.05,9.524a5.853,5.853,0,0,1,.852,1.143c.011.045-1.534,1.083-2.471,1.662-.034.023-.169-.124-.322-.35a2.014,2.014,0,0,0-1.67-1c-1.077-.074-1.771.49-1.766,1.433a1.3,1.3,0,0,0,.153.666c.237.49.677.784,2.059,1.383,2.544,1.095,3.636,1.817,4.31,2.843a5.158,5.158,0,0,1,.416,4.333,4.764,4.764,0,0,1-3.932,2.815,10.9,10.9,0,0,1-2.708-.028,6.531,6.531,0,0,1-3.616-1.884,6.278,6.278,0,0,1-.926-1.371,2.655,2.655,0,0,1,.327-.208c.158-.09.756-.434,1.32-.761L19.1,19.6l.214.312a4.771,4.771,0,0,0,1.35,1.292,3.3,3.3,0,0,0,3.458-.175,1.545,1.545,0,0,0,.2-1.974c-.276-.395-.84-.727-2.443-1.422a8.8,8.8,0,0,1-3.349-2.055,4.687,4.687,0,0,1-.976-1.777,7.116,7.116,0,0,1-.062-2.268,4.332,4.332,0,0,1,3.644-3.374A9,9,0,0,1,23.827,8.243ZM15.484,9.726l.011,1.454h-4.63V24.328H7.6V11.183H2.97V9.755A13.986,13.986,0,0,1,3.01,8.289c.017-.023,2.832-.034,6.245-.028l6.211.017Z",fill:"#007acc"})}):"js"===r||"mjs"===r||"cjs"===r||"jsx"===r?(0,a.jsxs)("svg",{viewBox:"0 0 32 32",className:i,children:[(0,a.jsx)("rect",{x:"2",y:"2",width:"28",height:"28",rx:"1.312",fill:"#f5de19"}),(0,a.jsx)("path",{d:"M20.809,23.875a2.866,2.866,0,0,0,2.6,1.6c1.09,0,1.787-.545,1.787-1.3,0-.9-.715-1.222-1.916-1.747l-.658-.282c-1.9-.809-3.16-1.822-3.16-3.964,0-1.973,1.5-3.476,3.853-3.476a3.889,3.889,0,0,1,3.742,2.107L25,18.128A1.789,1.789,0,0,0,23.311,17a1.145,1.145,0,0,0-1.259,1.128c0,.789.489,1.109,1.618,1.6l.658.282c2.236.959,3.5,1.936,3.5,4.133,0,2.369-1.861,3.667-4.36,3.667a5.055,5.055,0,0,1-4.795-2.691Zm-9.295.228c.413.733.789,1.353,1.693,1.353.864,0,1.41-.338,1.41-1.653V14.856h2.631v8.982c0,2.724-1.6,3.964-3.929,3.964a4.085,4.085,0,0,1-3.947-2.4Z",fill:"#000"})]}):"json"===r||"jsonc"===r?(0,a.jsxs)("svg",{viewBox:"0 0 32 32",className:i,children:[(0,a.jsx)("path",{d:"M4.014,14.976a2.51,2.51,0,0,0,1.567-.518A2.377,2.377,0,0,0,6.386,13l.129-1.334A5.435,5.435,0,0,1,7.6,9.071,3.157,3.157,0,0,1,10.519,8h1.316v1.86H10.937a1.257,1.257,0,0,0-1.1.465,3.405,3.405,0,0,0-.357,1.585l-.127,1.244a3.283,3.283,0,0,1-.573,1.61A2.482,2.482,0,0,1,7.6,15.537a2.482,2.482,0,0,1,1.18.773A3.283,3.283,0,0,1,9.349,17.9l.127,1.244a3.405,3.405,0,0,0,.357,1.585,1.257,1.257,0,0,0,1.1.465h.9V23.06H10.519A3.157,3.157,0,0,1,7.6,21.981
1a5.435,5.435,0,0,1-1.082-2.595L6.386,18.05a2.377,2.377,0,0,0-.805-1.456A2.51,2.51,0,0,0,4.014,16.07Z",fill:"#fbc02d"}),(0,a.jsx)("path",{d:"M27.986,16.07a2.51,2.51,0,0,0-1.567.518,2.377,2.377,0,0,0-.805,1.456l-.129,1.334a5.435,5.435,0,0,1-1.082,2.595A3.157,3.157,0,0,1,21.481,23.06H20.165V21.2h.9a1.257,1.257,0,0,0,1.1-.465,3.405,3.405,0,0,0,.357-1.585l.127-1.244a3.283,3.283,0,0,1,.573-1.61,2.482,2.482,0,0,1,1.18-.773,2.482,2.482,0,0,1-1.18-.773,3.283,3.283,0,0,1-.573-1.61L22.527,11.9a3.405,3.405,0,0,0-.357-1.585,1.257,1.257,0,0,0-1.1-.465h-.9V8h1.316a3.157,3.157,0,0,1,2.924,1.071,5.435,5.435,0,0,1,1.082,2.595l.129,1.334A2.377,2.377,0,0,0,26.419,14.458a2.51,2.51,0,0,0,1.567.518Z",fill:"#fbc02d"})]}):null}function eo(e){var t,n;let{step:l,state:r,onComplete:i,input:o,output:c,isCollapsible:d=!1,approval:u}=e;X("animating"===r,l.duration,i);let p="animating"===r,m=null!=(n=null==(t=l.filePath)?void 0:t.split("/").pop())?n:l.toolDetail,x=!!m,h="Write"===l.toolName,[f,g]=s.useState("light"),[b,v]=s.useState(!d);s.useEffect(()=>{let e=()=>{g(document.documentElement.classList.contains("dark")?"dark":"light")};e();let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{t.disconnect()}},[]),s.useEffect(()=>{v(!d)},[d]);let j=s.useMemo(()=>{var e,t,n,a,s,r;let i=m||"file",d="string"==typeof(null==c?void 0:c.old_content)?c.old_content:void 0,u="string"==typeof(null==c?void 0:c.content)?c.content:void 0,p=d||"string"!=typeof(null==o?void 0:o.old_string)?void 0:o.old_string,x=u||"string"!=typeof(null==o?void 0:o.new_string)?void 0:o.new_string,h=null==(e=l.diffLines)?void 0:e.filter(e=>"add"!==e.type).map(e=>e.content).join("\n"),f=null==(t=l.diffLines)?void 0:t.filter(e=>"remove"!==e.type).map(e=>e.content).join("\n"),g=null!=(a=null!=(n=null!=p?p:d)?n:h)?a:"",b=null!=(r=null!=(s=null!=x?x:u)?s:f)?r:"";return g||b?{oldFile:{name:i,contents:g},newFile:{name:i,contents:b}}:null},[m,o,c,l.diffLines]),y=s.useMemo(()=>"dark"===f?{"--diffs-bg":"#000","--diffs-bg-buffer-override":"#000","--diffs-bg-context-override":"#000","--diffs-bg-hover-override":"#0a0a0a","--diffs-bg-separator-override":"#0f0f0f"}:void 0,[f]),k=s.useMemo(()=>"dark"===f?"\n[data-diff],\n[data-file],\n[data-diffs-header],\n[data-error-wrapper],\n[data-virtualizer-buffer] {\n --diffs-bg: #000;\n --diffs-bg-buffer-override: #000;\n --diffs-bg-context-override: #000;\n --diffs-bg-hover-override: #0a0a0a;\n --diffs-bg-separator-override: #0f0f0f;\n}\n":void 0,[f]),N="an-edit-diff dark:bg-black dark:[--diffs-bg:#000] dark:[--diffs-bg-buffer-override:#000] dark:[--diffs-bg-context-override:#000] dark:[--diffs-bg-hover-override:#0a0a0a] dark:[--diffs-bg-separator-override:#0f0f0f]";return(0,a.jsxs)("div",{className:"an-edit-tool-card rounded-an-tool-border-radius border border-an-tool-border-color bg-an-tool-background dark:bg-black overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-0 h-7 bg-an-tool-background "+(p&&!j?"":"border-b border-an-tool-border-color"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[x&&(0,a.jsx)(ei,{filename:m,className:"w-3 h-3 shrink-0"}),p&&!j?(0,a.jsx)(M,{as:"span",duration:1.2,className:"text-xs",children:"Generating..."}):p?(0,a.jsxs)(M,{as:"span",duration:1.2,className:"text-xs",children:[h?"Creating":"Editing"," ",m]}):(0,a.jsxs)("span",{className:"text-xs text-an-tool-color-muted truncate",children:[h?"Created":"Edited"," ",m]})]}),l.diffStats&&!p&&(0,a.jsx)("span",{className:"text-[11px] font-mono text-an-tool-color-muted inline-flex gap-2",children:l.diffStats.split(" ").map(e=>(0,a.jsx)("span",{className:e.startsWith("+")?"text-an-diff-added-text":e.startsWith("-")?"text-an-diff-removed-text":void 0,children:e},e))})]}),j?(0,a.jsx)("div",{className:"".concat(N," text-[12px]"),style:y,children:(0,a.jsxs)("div",{className:d?"group/edit-diff relative":"relative",children:[(0,a.jsx)("div",{className:d&&!b?"max-h-[260px] overflow-hidden":void 0,children:(0,a.jsx)(el.T,{oldFile:j.oldFile,newFile:j.newFile,className:N,style:y,options:{theme:{dark:"github-dark",light:"github-light"},themeType:f,unsafeCSS:k,diffStyle:"unified",disableFileHeader:!0}},f)}),d&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("button",{type:"button",onClick:()=>v(e=>!e),"aria-label":b?"Hide":"Show more",className:"group absolute inset-x-0 bottom-0 h-16 flex items-end justify-center pb-2 text-muted-foreground "+(b?"bg-transparent":"bg-linear-to-b from-transparent to-background"),children:(0,a.jsx)(er.A,{className:"w-4 h-4 transition-opacity duration-150 opacity-0 group-hover:opacity-100 "+(b?"rotate-180":"rotate-0")})})})]})}):null,u&&(0,a.jsx)(en,{isPending:p,...u})]})}
1let ec=(0,s.memo)(function(e){var t,n,s,l,r,i,o,c,d,u,p;let{part:m,isCollapsible:x=!1}=e,h=null!=(l=null==(t=m.input)?void 0:t.approval)?l:null==(n=m.args)?void 0:n.approval,f=(null==(s=m.type)?void 0:s.replace("tool-",""))||"Edit",g=et(null!=(i=null!=(r=m.toolCallId)?r:m.id)?i:"edit",{toolName:f,args:null!=(c=null!=(o=m.input)?o:m.args)?c:{},state:"output-available"===m.state?"result":"input-streaming"===m.state?"partial-call":"call",result:null!=(d=m.output)?d:m.result}),b=ee("output-available"===m.state?"result":"input-streaming"===m.state?"partial-call":"call");return(0,a.jsx)(eo,{step:g,state:b,onComplete:()=>{},input:null!=(u=m.input)?u:m.args,output:null!=(p=m.output)?p:m.result,isCollapsible:x,approval:h})});function ed(e){let{className:t,...n}=e;return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",className:null!=t?t:"animate-spin will-change-transform text-muted-foreground",...n,children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none",opacity:.2}),(0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})}function eu(e){return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e,children:(0,a.jsx)("path",{d:"M5 12.75L10 19L19 5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function ep(e){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",width:"24",height:"24",...e,children:[(0,a.jsx)("path",{d:"M14 6L20 12L14 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M19 12H4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}let em=e=>{let{status:t,isPending:n}=e;if(n&&"in_progress"===t)return(0,a.jsx)("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center shrink-0 border border-an-foreground-muted/60",children:(0,a.jsx)(ep,{className:"w-2 h-2 text-an-foreground-muted/70"})});switch(t){case"completed":return(0,a.jsx)("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center shrink-0 border border-an-foreground-muted/40",children:(0,a.jsx)(eu,{className:"w-2 h-2 text-an-foreground-muted/70"})});case"in_progress":return(0,a.jsx)("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center shrink-0 border border-an-foreground-muted/60",children:(0,a.jsx)(ep,{className:"w-2 h-2 text-an-foreground-muted/70"})});default:return(0,a.jsx)("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center shrink-0 border border-an-foreground-muted/60"})}},ex=(0,s.memo)(function(e){let{todo:t,isPending:n}=e;return(0,a.jsxs)("div",{className:i("flex items-start gap-2"),children:[(0,a.jsx)("div",{className:"mt-[2px]",children:(0,a.jsx)(em,{status:t.status,isPending:n})}),(0,a.jsx)("span",{className:i("text-sm","completed"===t.status&&"line-through",n||"completed"===t.status||"pending"===t.status?"text-an-foreground/60":"text-an-foreground/80"),children:t.content})]})}),eh=(0,s.memo)(function(e){var t,n,l;let{part:r,chatStatus:i}=e,{isPending:o}=K(r,i),c="input-streaming"===r.state,d=(null==(t=r.output)?void 0:t.oldTodos)||[],u=(null==(n=r.input)?void 0:n.todos)||(null==(l=r.output)?void 0:l.newTodos)||[],p=0===d.length,m=(0,s.useMemo)(()=>(function(e,t){if(!e||0===e.length)return{type:"creation",items:t.map((e,t)=>({todo:e,newStatus:e.status,index:t}))};let n=[];return(t.forEach((t,a)=>{let s=e[a];s&&s.status===t.status||n.push({todo:t,oldStatus:null==s?void 0:s.status,newStatus:t.status,index:a})}),1===n.length)?{type:"single",items:n}:{type:"multiple",items:n}})(d,u),[d,u]);return c||0===u.length?(0,a.jsx)("div",{className:"space-y-2 text-sm leading-relaxed text-an-foreground/80",children:(0,a.jsx)("div",{className:"text-an-foreground/60",children:(0,a.jsx)(M,{as:"span",duration:1.2,className:"inline-flex items-center text-sm leading-none h-4 m-0",children:p?"Creating to-do list...":"Updating to-dos..."})})}):"single"===m.type||"multiple"===m.type?(0,a.jsx)("div",{className:"space-y-2 text-sm leading-relaxed text-an-foreground
1/80",children:u.map((e,t)=>(0,a.jsx)(ex,{todo:e,isPending:o},t))}):(0,a.jsx)("div",{className:"space-y-2 text-sm leading-relaxed text-an-foreground/80",children:u.map((e,t)=>(0,a.jsx)(ex,{todo:e,isPending:o},t))})},$);var ef=n(78730),eg=n(23371),eb=n(12108);let ev=(0,s.memo)(function(e){var t,n,l,r,o,c;let{part:d,chatStatus:u}=e,{isPending:p}=K(d,u),m=null==(t=d.input)?void 0:t.plan,[x,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1);if(!m)return null;let b=function(e){var t;let n=null==(t=e.id)?void 0:t.trim();return n?n.endsWith(".md")?n:"plan-".concat(n,".md"):"plan-working.md"}(m),v=null!=(o=null==(n=m.summary)?void 0:n.trim())?o:"",j=v.length>0,y=null!=(c=null==(l=d.input)?void 0:l.approveLabel)?c:"Approve",k=(null==(r=d.input)?void 0:r.approved)||f,N=k?"Approved":y,w=()=>{var e;k||(g(!0),"function"==typeof(null==(e=d.input)?void 0:e.onApprove)&&d.input.onApprove())};return(0,a.jsxs)("div",{className:"an-tool-plan rounded-an-tool-border-radius border border-border bg-an-tool-background overflow-hidden",children:[(0,a.jsxs)("div",{className:"h-7 pl-3 pr-2.5 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0 flex items-center gap-1",children:[p?(0,a.jsx)(ed,{className:"w-3 h-3 text-an-tool-color-muted animate-spin shrink-0"}):(0,a.jsx)(ef.A,{className:"w-3.5 h-3.5 text-an-tool-color-muted shrink-0"}),(0,a.jsx)("span",{className:"text-xs text-an-tool-color-muted truncate",children:b})]}),(0,a.jsx)("button",{type:"button",onClick:()=>h(e=>!e),"aria-label":x?"Collapse plan":"Expand plan",className:"size-5 inline-flex items-center justify-center text-an-tool-color-muted",children:x?(0,a.jsx)(eg.A,{className:"w-3.5 h-3.5"}):(0,a.jsx)(eb.A,{className:"w-3.5 h-3.5"})})]}),(0,a.jsxs)("div",{className:"border-t border-border bg-background pt-2",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("div",{className:"text-sm text-an-tool-color px-3",children:m.title}),j?(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:i("px-3","text-sm text-an-tool-color-muted",!x&&"max-h-[94px] overflow-hidden"),children:(0,a.jsx)(A,{content:v,className:"text-sm"})}),!x&&(0,a.jsxs)("div",{className:"absolute inset-x-0 bottom-0 h-16 pb-2 pl-3.5 pr-2",children:[(0,a.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-full w-full bg-linear-to-b from-transparent from-0% to-background to-50%"}),(0,a.jsxs)("div",{className:"h-full flex items-end justify-between relative",children:[(0,a.jsx)("button",{type:"button",onClick:()=>h(!0),className:"-mx-2 h-5 px-1.5 rounded-[4px] text-xs text-muted-foreground hover:text-an-tool-color",children:"Read detailed plan"}),!k&&(0,a.jsx)("button",{type:"button",onClick:w,className:"h-5 px-1.5 rounded-[4px] text-xs font-medium bg-an-primary-color text-an-send-button-color hover:bg-an-primary-color/90 active:scale-[0.98] transition-[background-color,transform] duration-150",children:N})]})]})]}):(0,a.jsx)("div",{className:"text-xs text-an-tool-color-muted",children:"No plan summary provided."})]}),(x||!j)&&(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between pt-1.5 pb-2 pl-3.5 pr-2 border-t border-border bg-an-tool-background",children:[(0,a.jsx)("button",{type:"button",onClick:()=>h(e=>!e),className:"-mx-2 h-5 px-1.5 rounded-[4px] text-xs text-muted-foreground hover:text-an-tool-color",children:x?"Hide detailed plan":"Read detailed plan"}),!k&&(0,a.jsx)("button",{type:"button",onClick:w,className:"h-5 px-1.5 rounded-[4px] text-xs font-medium bg-an-primary-color text-an-send-button-color hover:bg-an-primary-color/90 active:scale-[0.98] transition-[background-color,transform] duration-150",children:N})]})]})]})},$);function ej(e,t){return"".concat(e," ").concat(1===e?t:"".concat(t,"s"))}let ey=(0,s.memo)(function(e){var t,n,l,r,o,c,d,u,p;let{part:m,nestedTools:x=[],chatStatus:h,completeLabel:f,shimmerLabel:g,interruptedLabel:b,maxVisibleTools:v=5,defaultOpen:j,showElapsed:y=!0}=e,{isPending:k,isInterrupted:N}=K(m,h),w=(null==(t=m.input)?void 0:t.description)||"",[A,C]=(0,s.useState)(0),[S,P]=(0,s.useState)(null!=j&&j),[_,M]=(0,s.use
1State)(0),R=null!=(d=null==(l=m.callProviderMetadata)||null==(n=l.custom)?void 0:n.startedAt)?d:m.startedAt,W=x.length>0,T=null!=(p=null!=(u=m.toolCallId)?u:m.id)?p:"",I=(null==(r=m.output)?void 0:r.totalDurationMs)||(null==(o=m.output)?void 0:o.duration)||(null==(c=m.output)?void 0:c.duration_ms),z=28*Math.max(1,v),E=k?Math.max(_,0):x.length,O=(0,s.useRef)(k),F=(0,s.useRef)(!1),q=(0,s.useRef)(null),{fileCount:B,searchCount:D}=(0,s.useMemo)(()=>{var e=k?x.slice(0,Math.max(_,0)):x;let t=new Set(["tool-Read","tool-Edit","tool-Write"]),n=new Set(["tool-Search","tool-Grep","tool-Glob","tool-WebSearch"]),a=0,s=0;for(let l of e)t.has(l.type)?a+=1:n.has(l.type)&&(s+=1);return{fileCount:a,searchCount:s}},[k,x,_]),Q=function(e,t){let n=[];return e>0&&n.push(ej(e,"file")),t>0&&n.push("".concat(t," ").concat(1===t?"search":"searches")),n.join(", ")}(B,D),G=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(k&&R){C(Date.now()-R);let e=setInterval(()=>{C(Date.now()-R)},1e3);return()=>clearInterval(e)}},[k,R]),(0,s.useEffect)(()=>{let e=O.current;return q.current&&(window.clearTimeout(q.current),q.current=null),!k||e||F.current||!1===j||(P(!1),q.current=window.setTimeout(()=>{P(!0)},60)),!k&&e&&(P(!1),F.current=!1),O.current=k,()=>{q.current&&(window.clearTimeout(q.current),q.current=null)}},[j,k]),(0,s.useEffect)(()=>{if(!k||0===x.length)return void M(x.length);let e=1;M(Math.min(1,x.length));let t=setInterval(()=>{M(Math.min(e+=1,x.length)),e>=x.length&&clearInterval(t)},450);return()=>clearInterval(t)},[k,x.length,T]),(0,s.useEffect)(()=>{k&&G.current&&(G.current.scrollTop=G.current.scrollHeight)},[k,_]);let H=(()=>{if(k&&W)return Q;if(!k&&W){let e=function(e){if(0===e.length)return"";let t=new Set(["tool-Read","tool-Edit","tool-Write"]),n=new Set(["tool-Search","tool-Grep","tool-Glob","tool-WebSearch"]),a=new Set(["tool-Bash"]),s=0,l=0,r=0;for(let i of e)t.has(i.type)?s+=1:n.has(i.type)?l+=1:a.has(i.type)&&(r+=1);let i=[];return(s>0&&i.push(ej(s,"file")),l>0&&i.push("".concat(l," ").concat(1===l?"search":"searches")),r>0&&i.push(ej(r,"command")),0===i.length)?"":1===i.length?i[0]:2===i.length?"".concat(i[0]," and ").concat(i[1]):"".concat(i.slice(0,-1).join(", "),", and ").concat(i[i.length-1])}(x);if(e)return e}return w?w.length>60?"".concat(w.slice(0,57),"..."):w:""})(),Y=function(e){if(e<1e3)return"";let t=Math.floor(e/1e3);if(t<60)return"".concat(t,"s");let n=Math.floor(t/60),a=t%60;return 0===a?"".concat(n,"m"):"".concat(n,"m ").concat(a,"s")}(!k&&I?I:A);return N&&!m.output?(0,a.jsx)(L,{completeLabel:b,isAnimating:!1}):(0,a.jsx)(L,{completeLabel:f,shimmerLabel:g,isAnimating:k,detail:H,expandable:W,expanded:S,onToggleExpand:()=>{F.current=!0,P(e=>!e)},trailingContent:y&&Y?(0,a.jsx)("span",{className:"font-normal tabular-nums shrink-0 text-an-foreground-muted/60",children:Y}):void 0,children:(0,a.jsxs)("div",{className:"relative",children:[k&&S&&E>4&&(0,a.jsx)("div",{className:"absolute inset-x-0 top-0 h-10 z-10 pointer-events-none bg-linear-to-b from-an-background to-transparent"}),(0,a.jsx)("div",{ref:G,className:i(x.length>1?"space-y-2":"space-y-0",k&&S&&E>4&&"overflow-y-auto"),style:k&&S&&E>4?{height:"".concat(z,"px")}:void 0,children:(k?x.slice(0,Math.max(_,0)):x).map((e,t)=>{var n;let s=k?{...e,state:t===_-1?"input-streaming":"output-available"}:e,l=V[s.type];if(!l)return null;let{isPending:r,isError:i}=K(s,h);return(0,a.jsx)(Z,{icon:l.icon,title:l.title(s),subtitle:null==(n=l.subtitle)?void 0:n.call(l,s),isPending:r,isError:i},t)})})]})})}),ek=["query","question","email","name","id","customer","url","issue","body","summary","title"],eN={List:"Listing",Get:"Getting",Create:"Creating",Update:"Updating",Delete:"Deleting",Search:"Searching",Fetch:"Fetching",Retrieve:"Retrieving",Send:"Sending",Generate:"Generating",Add:"Adding",Remove:"Removing",Modify:"Modifying",Draft:"Drafting",Manage:"Managing",Query:"Querying",Start:"Starting",Set:"Setting",Check:"Checking",Find:"Finding"},ew={List:"Listed",Get:"Got",Create:"Created",Update:"Updated",Delete:"Deleted",Search:"Searched",Fetch:"Fetched",Retrieve:"Retrieved",Send:"Sent",Generate:"Generated",Add:"Added",Remove:"Removed",Modify:"Modified",Draft:"Drafted",Manage:"Managed",Query:"Queried",Start:"Started",Set:"Set",Check:"Checked",Find:"Found"};function eA(e){if(!e)return e;if(Array.isArray(e)){let t=[];for(let n of e)(null==n?void 0:n.type)==="text"&&"string"==typeof(null==n?void 0:n.text)&&t.push(n.text);if(t.length>0){let e=t.join("");try{return JSON.parse(e)}catch(t){return e}}return e}if((null==e?void 0:e.type)==="text"&&"string"==typeof(null==e?void 0:e.text))try{return JSON.parse(e.text)}catch(t){return e.text}if("string"==typeof e)try{return JSON.parse(e)}catch(e){}return e}let eC=(0,k.V)({themes:["github-light","github-dark"]}),eS=(0,s.memo)(function(e){let{part:t,mcpInfo:n,chatStatus:l,defaultOpen:r}=e,{isPending:i,isInterrupted:o}=K(t,l),c=(0,s.useMemo)(()=>
1{if("input-streaming"===t.state)return"Preparing ".concat(n.displayName);if(i){let e=n.displayName.split(" "),t=e[0],a=e.slice(1).join(" "),s=eN[t];return s?a?"".concat(s," ").concat(a):s:n.displayName}let e=n.displayName.split(" "),a=e[0],s=e.slice(1).join(" "),l=ew[a];return l?s?"".concat(l," ").concat(s):l:n.displayName},[t.state,i,n]),d=(0,s.useMemo)(()=>"input-streaming"===t.state?"":function(e){if(!e||"object"!=typeof e)return"";let t=Object.entries(e).filter(e=>{let[,t]=e;return null!=t&&""!==t});if(0===t.length)return"";let n=[...t].sort((e,t)=>{let[n]=e,[a]=t,s=ek.indexOf(n),l=ek.indexOf(a);return -1!==s&&-1!==l?s-l:-1!==s?-1:+(-1!==l)}),a=[];for(let[e,t]of n){if(a.length>=2)break;let n="string"==typeof t?t:JSON.stringify(t),s=n.length>30?n.slice(0,27)+"...":n;a.push("".concat(e,": ").concat(s))}return a.join(" ")}(t.input),[t.input,t.state]),u=(0,s.useMemo)(()=>{if(!t.output)return null;let e=eA(t.output);if("string"==typeof e)return e.length>3e3?e.slice(0,3e3)+"\n...":e;let n=JSON.stringify(e,null,2);return n.length>3e3?n.slice(0,3e3)+"\n...":n},[t.output]),p=(0,s.useMemo)(()=>{if(!u)return null;let e=u.trim();if(!e)return null;let t=e.startsWith("{")||e.startsWith("[")?"json":"text";return"```".concat(t,"\n").concat(u,"\n```")},[u]),m=!!p&&!i;return o&&!t.output?(0,a.jsxs)("span",{className:"text-sm text-an-tool-color-muted",children:[n.displayName," interrupted"]}):(0,a.jsx)("div",{className:"an-tool-mcp",children:(0,a.jsx)(L,{shimmerLabel:c,completeLabel:c,isAnimating:i,detail:d||void 0,trailingContent:void 0,expandable:m,defaultOpen:r,children:p&&(0,a.jsx)("div",{className:"an-markdown text-[12px]",children:(0,a.jsx)(y.jH,{plugins:{code:eC},controls:{code:!1},children:p})})})})},$);function eP(e){let{step:t,state:n,onComplete:s,defaultOpen:l,expanded:r,onToggleExpand:i}=e;return X("animating"===n,t.duration,s),(0,a.jsx)(L,{shimmerLabel:"Thinking",completeLabel:"Thought",isAnimating:"animating"===n,expandable:!!t.thoughtContent,defaultOpen:l,expanded:r,onToggleExpand:i,children:(0,a.jsx)("div",{className:"max-h-[175px] overflow-y-auto",children:(0,a.jsx)("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:t.thoughtContent})})})}let e_=(0,s.memo)(function(e){let t,n,s,{part:l,step:r,state:i,onComplete:o,defaultOpen:c,expanded:d,onToggleExpand:u}=e;if(r&&i&&o)t=r,n=i,s=o;else{var p,m,x,h,f;if(!l)return null;t=et(null!=(m=null!=(p=l.toolCallId)?p:l.id)?m:"thinking",{toolName:"Thinking",args:null!=(h=null!=(x=l.input)?x:l.args)?h:{},state:"output-available"===l.state?"result":"input-streaming"===l.state?"partial-call":"call",result:null!=(f=l.output)?f:l.result}),n=ee("output-available"===l.state?"result":"input-streaming"===l.state?"partial-call":"call"),s=()=>{}}return(0,a.jsx)(eP,{step:t,state:n,onComplete:s,defaultOpen:c,expanded:d,onToggleExpand:u})});function eM(e){var t,n;let{toolSteps:s,stepStates:l,onStepComplete:r,results:o=[],defaultOpen:c}=e,d=s.some(e=>"animating"===l[e.id]),p=null!=(n=null==(t=s.find(e=>e.searchQuery))?void 0:t.searchQuery)?n:"searching...",m=o.length;function x(e){let{step:t}=e;return X("animating"===l[t.id],t.duration,()=>r(t.id)),null}return(0,a.jsxs)(a.Fragment,{children:[s.map(e=>(0,a.jsx)(x,{step:e},e.id)),(0,a.jsx)(L,{shimmerLabel:"Searching...",completeLabel:"Found ".concat(m," results"),isAnimating:d,expandable:m>0,defaultOpen:c,children:(0,a.jsxs)("div",{className:"rounded-an-tool-border-radius overflow-hidden bg-an-tool-background border border-border",children:[(0,a.jsxs)("div",{className:"flex items-center px-2.5 py-0 border-b border-an-tool-border-color h-7 text-xs gap-1",children:[(0,a.jsx)("span",{className:"text-foreground font-medium",children:"Searched for"})," ",(0,a.jsxs)("span",{className:"text-muted-foreground truncate",children:["â",p,"â"]})]}),(0,a.jsx)("div",{className:"max-h-[200px] overflow-y-auto bg-background",children:(0,a.jsx)("div",{className:"flex flex-col gap-1 p-1",children:o.map((e,t)=>(0,a.jsxs)("div",{className:i("flex items-center gap-2 px-2 py-1 rounded-[calc(var(--an-tool-border-radius)-4px)] cursor-default","hover:bg-muted/50"),children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-muted-foreground",children:(0,a.jsx)(u.A,{className:"w-4 h-4"})}
1),(0,a.jsx)("span",{className:"text-sm text-foreground/90 truncate flex-1 min-w-0",children:e.title}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground shrink-0 whitespace-nowrap",children:e.date||e.source})]},t))})})]})})]})}function eL(e){if(!Array.isArray(e))return;let t=e.map(e=>{if(!e||"object"!=typeof e)return null;let t=e.source,n=e.title,a=e.date;return"string"!=typeof t||"string"!=typeof n||"string"!=typeof a?null:{source:t,title:n,date:a}}).filter(e=>!!e);return t.length>0?t:void 0}let eR=(0,s.memo)(function(e){var t,n,s,l,r,i,o,c,d;let{part:u,results:p,defaultOpen:m}=e,x=et(null!=(r=null!=(l=u.toolCallId)?l:u.id)?r:"search",{toolName:(null==(t=u.type)?void 0:t.replace("tool-",""))||"WebSearch",args:null!=(o=null!=(i=u.input)?i:u.args)?o:{},state:"output-available"===u.state?"result":"input-streaming"===u.state?"partial-call":"call",result:null!=(c=u.output)?c:u.result}),h=ee("output-available"===u.state?"result":"input-streaming"===u.state?"partial-call":"call"),f={[x.id]:h};return(0,a.jsx)(eM,{toolSteps:[x],stepStates:f,onStepComplete:()=>{},results:null!=(d=null!=p?p:eL(null==(n=u.output)?void 0:n.results))?d:eL(null==(s=u.result)?void 0:s.results),defaultOpen:m})});var eW=n(87771),eT=n(33016);let eI="__custom__";function ez(e){return String.fromCharCode(65+e)}function eE(e){var t,n,l,r,o,c;let{questions:d,questionIndex:u=1,totalQuestions:p,onPreviousQuestion:m,onNextQuestion:x,submitLabel:h="Send",nextLabel:f="Next",skipLabel:g="Skip",allowSkip:b=!0,initialAnswer:v,onSubmit:j,onSkip:y,className:k}=e,[N,w]=(0,s.useState)([]),[A,C]=(0,s.useState)(""),[S,P]=(0,s.useState)(""),_=null!=p?p:d.length,M=Math.max(1,Math.min(u,_)),L=d[M-1],R=null!=(l=null==L?void 0:L.allowCustom)&&l,W=_>1&&(!!m||!!x),T=M>1,I=M<_,z=M>=_;(0,s.useEffect)(()=>{var e,t,n;if(!v||"skip"===v.kind){w([]),C(""),P("");return}if((null==L?void 0:L.kind)==="text"){w([]),C(""),P(null!=(e=v.text)?e:"");return}let a=new Set(null!=(t=v.selectedIds)?t:[]),s=null!=(n=v.text)?n:"";R&&s.trim().length>0&&a.add(eI),w(Array.from(a)),C(s),P("")},[null==L?void 0:L.kind,M,R,null==v?void 0:v.kind,null==v?void 0:v.text,null==v||null==(t=v.selectedIds)?void 0:t.join("|")]);let E=(0,s.useMemo)(()=>{var e;if((null==L?void 0:L.kind)==="text")return S.trim().length>0;let t=N.filter(e=>e!==eI).length+ +(A.trim().length>0);if((null==L?void 0:L.kind)==="single")return 1===t;let n=null!=(e=null==L?void 0:L.minSelections)?e:1,a=null==L?void 0:L.maxSelections;return!(t<n)&&("number"!=typeof a||!(t>a))&&t>0},[null==L?void 0:L.kind,null==L?void 0:L.minSelections,null==L?void 0:L.maxSelections,N,A,S]);return L?(0,a.jsxs)("div",{className:i("px-3 py-2 space-y-2 bg-background",k),children:[(0,a.jsx)("div",{className:"flex items-center justify-between gap-px","data-total-questions":_,children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-an-tool-color",children:[(0,a.jsx)("span",{className:"h-5 min-w-5 px-1 rounded-[4px] inline-flex items-center justify-center text-sm font-medium text-an-tool-color-muted",children:M}),(0,a.jsx)("span",{children:L.title})]})}),"text"!==L.kind&&(null!=(r=null==(n=L.options)?void 0:n.length)?r:0)>0&&(0,a.jsxs)("div",{className:"space-y-px",children:[L.options.map((e,t)=>{let n=N.includes(e.id);return(0,a.jsxs)("button",{type:"button",onClick:()=>{if("single"===L.kind)w([e.id]),R&&C("");else{var t;t=e.id,w(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])}},className:"w-full text-left rounded-md px-2 py-1.5 flex items-center gap-2 hover:bg-an-background-secondary -mx-2",children:[(0,a.jsx)("span",{className:i("h-5 min-w-5 px-1 rounded-[4px] inline-flex items-center justify-center text-sm font-medium border",n?"bg-an-primary-color text-an-send-button-color border-an-primary-color":"bg-transparent text-an-tool-color-muted border-border"),children:ez(t)}),(0,a.jsxs)("span",{className:"text-sm text-an-tool-color",children:[e.label,e.description&&(0,a.jsxs)("span",{className:"text-an-tool-color-muted",children:[" ",e.description]})]})]},e.id)}),R&&(0,a.jsxs)("div",{className:"pt-1 flex items-center gap-2",children:[(0,a.jsx)("span",{className:i("h-5 min-w-5 px-1 rounded-[4px] inline-flex items-center justify-center text-sm font-medium border",N.includes(eI)?"bg-an-primary-color text-an-send-button-color border-an-primary-color":"bg-transparent text-an-tool-color-muted border-border"),children:ez(L.options.length)}),(0,a.jsx)("input",{value:A,onChange:e=>(e=>{if(C(e),L){if("single"===L.kind)return void w(e.trim().length>0?[eI]:[]);w(t=>{let n=t.includes(eI);return e.trim().length>0&&!n?[...t,eI]:0===e.trim().length&&n?t.filter(e=>e!==eI):t})}})(e.target.value),placeholder:null!=(o=L.customPlaceholder)?o:"Type your answer",className:"w-full h-7 rounded-md border border-border bg-background px-2 text-sm text-an-tool-color"})]})]}),"text"===L.kind&&(0,a.jsx)("textarea",{value:S,onChange:e=>P(e.target.value),placeholder:null!=(c=L.placeholder)?c:"Type your answer",rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-sm text-an-tool-color resize-y"}),(0,a.jsxs)("div",{className:i("flex items-center gap-1.5",W?"justify-between":"justify-end"),children:[W&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[m&&(0,a.jsx)("button",{type:"button",onClick:m,disabled:!T,className:"h-6 px-2 rounded-[4px] text-sm text-muted-foreground hover:text-an-tool-color disabled:opacity-60",children:"Previous"}),x&&(0,a.jsx)("button",{type:"button",onClick:x,disabled:!I,className:"h-6 px-2 rounded-[4px] text-sm text-muted-foreground hover:text-an-tool-color disabled:opacity-60",children:"Next"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[b&&(0,a.jsx)("button",{type:"button",onClick:()=>{null==y||y(),j({kind:"skip"})},className:"h-6 px-2 rounded-[4px] text-sm text-muted-foreground hover:text-an-tool-color hover:bg-muted/50 active:scale-[0.98] transition-[background-color,color,transform] duration-150",children:g}),(0,a.jsx)("button",{type:"button",onClick:()=>
1{if(!E||!L)return;if("text"===L.kind)return void j({kind:"text",text:S.trim()});let e=N.filter(e=>e!==eI),t=A.trim()||void 0;j({kind:L.kind,selectedIds:e,text:t||void 0})},disabled:!E,className:"h-6 px-2.5 rounded-[4px] text-sm font-medium bg-an-primary-color text-an-send-button-color hover:bg-an-primary-color/90 active:scale-[0.98] transition-[background-color,transform] duration-150 disabled:opacity-60 disabled:hover:bg-an-primary-color disabled:active:scale-100",children:z?h:f})]})]})]}):null}function eO(e){var t;if("skip"===e.kind)return"Skipped";if("text"===e.kind)return e.text||"Answered";let n=(null==(t=e.selectedIds)?void 0:t.length)?e.selectedIds.join(", "):"";return e.text?n?"".concat(n," (").concat(e.text,")"):e.text:n||"Answered"}function eF(e){var t,n,l,r,i,o,c,d,u,p,m,x,h,f,g,b,v;let{part:j}=e,[y,k]=(0,s.useState)(null!=(h=null==(t=j.input)?void 0:t.questionIndex)?h:1),N=null!=(f=null==(n=j.input)?void 0:n.questions)?f:[],w=null!=(g=null==(l=j.input)?void 0:l.totalQuestions)?g:N.length,A="number"==typeof(null==(r=j.input)?void 0:r.questionIndex),C=Math.max(1,Math.min(A?null!=(b=null==(i=j.input)?void 0:i.questionIndex)?b:1:N.length>0?y:null!=(v=null==(o=j.input)?void 0:o.questionIndex)?v:1,w)),S=N[C-1],[P,_]=(0,s.useState)({});if((0,s.useEffect)(()=>{var e;"number"==typeof(null==(e=j.input)?void 0:e.questionIndex)&&k(j.input.questionIndex)},[null==(c=j.input)?void 0:c.questionIndex]),(0,s.useEffect)(()=>{var e,t;_({}),k(null!=(t=null==(e=j.input)?void 0:e.questionIndex)?t:1)},[j.toolCallId]),!S)return null;let M=null==(d=j.output)?void 0:d.answer,L=Object.keys(P).length,R=1===w?!!M||L>=1:w>0&&L>=w,W=w>1&&!R,T=C>1,I=C<w,z=(0,s.useMemo)(()=>!R||w<=1?[]:Array.from({length:w},(e,t)=>({index:t+1,answer:P[t+1]})),[R,P,w]),E=(0,s.useMemo)(()=>R?z.length>0?z.map(e=>"".concat(e.index,": ").concat(e.answer?eO(e.answer):"Pending")).join(" ⢠"):M?eO(M):P[C]?eO(P[C]):"Pending":"",[R,z,M,P,C]),O=()=>{var e,t;I&&(null==(t=j.input)||null==(e=t.onNextQuestion)||e.call(t),A||k(e=>Math.min(w,e+1)))};return(0,a.jsxs)("div",{className:"rounded-an-tool-border-radius border border-border bg-an-tool-background overflow-hidden",children:[(0,a.jsxs)("div",{className:"h-7 border-b border-border px-3 flex items-center justify-between text-xs text-an-tool-color-muted",children:[(0,a.jsxs)("div",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(eW.A,{className:"w-3.5 h-3.5"}),"Question"]}),W&&(0,a.jsxs)("div",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{var e,t;T&&(null==(t=j.input)||null==(e=t.onPreviousQuestion)||e.call(t),A||k(e=>Math.max(1,e-1)))},disabled:!T,className:"size-5 inline-flex items-center justify-center rounded-[4px] hover:bg-an-background-secondary disabled:opacity-40","aria-label":"Previous question",children:(0,a.jsx)(eT.A,{className:"w-3.5 h-3.5"})}),(0,a.jsxs)("span",{children:[C," of ",w]}),(0,a.jsx)("button",{type:"button",onClick:O,disabled:!I,className:"size-5 inline-flex items-center justify-center rounded-[4px] hover:bg-an-background-secondary disabled:opacity-40","aria-label":"Next question",children:(0,a.jsx)(er.A,{className:"w-3.5 h-3.5"})})]})]}),R?(0,a.jsx)("div",{className:"px-3 py-2 text-xs text-an-tool-color-muted bg-background",children:E}):(0,a.jsx)(eE,{questions:N,questionIndex:C,totalQuestions:w,initialAnswer:P[C],submitLabel:null==(u=j.input)?void 0:u.submitLabel,nextLabel:null==(p=j.input)?void 0:p.nextLabel,skipLabel:null==(m=j.input)?void 0:m.skipLabel,allowSkip:null==(x=j.input)?void 0:x.allowSkip,onSubmit:e=>{var t,n;_(t=>({...t,[C]:e})),null==(n=j.input)||null==(t=n.onSubmitAnswer)||t.call(n,e),C<w&&O()}},"".concat(C,"-").concat(S.title))]})}let eq=(0,s.memo)(function(e){var t,n;let{part:s,nestedTools:l,chatStatus:r,toolRenderers:i}=e,o=s.type;switch(o){case"tool-Bash":return(0,a.jsx)(es,{part:s});case"tool-Edit":case"tool-Write":return(0,a.jsx)(ec,{part:s});case"tool-WebSearch":case"tool-Grep":case"tool-Glob":return(0,a.jsx)(eR,{part:s});case"tool-PlanWrite":return(0,a.jsx)(ev,{part:s,chatStatus:r});case"tool-TodoWrite":return(0,a.jsx)(eh,{part:s,chatStatus:r});case"tool-Question":return(0,a.jsx)(eF,{part:s,chatStatus:r});case"tool-Task":case"tool-Agent":let c="tool-Agent"===s.type?"Agent":"Task";return(0,a.jsx)(ey,{part:s,nestedTools:l,chatStatus:r,completeLabel:"".concat(c," completed"),shimmerLabel:"Running ".concat(c.toLowerCase()),interruptedLabel:"".concat(c," interrupted"),defaultOpen:!1});case"tool-Thinking":return(0,a.jsx)(e_,{part:s})}let d=function(e){let t=U[e];if(t)return t;if(!e.startsWith(Y))return null;let n=e.slice(Y.length),a=n.indexOf("__");if(-1===a)return null;let s=n.slice(0,a),l=n.slice(a+2);return{serverName:s,toolName:l,displayName:l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim(),category:"other"}}(o);if(d){if(i&&"user-tools"===d.serverName){let e=i[d.toolName];if(e)return(0,a.jsx)(e,{name:d.toolName,input:null!=(t=s.input)?t:{},output:s.output?eA(s.output):void 0,status:function(e,t){if("input-streaming"===e.state)return"streaming";if("output-available"===e.state)return"success";if("output-error"===e.state)return"error";let{isPending:n}=K(e,t);return n?"pending":"success"}(s,r)})}return(0,a.jsx)(eS,{part:s,mcpInfo:d,chatStatus:r})}let u=V[o];if(u){let{isPending:e,isError:t}=K(s,r);
1return(0,a.jsx)(Z,{title:u.title(s),subtitle:null==(n=u.subtitle)?void 0:n.call(u,s),isPending:e,isError:t})}let p=o.startsWith("tool-")?o.slice(5):o,{isPending:m,isError:x}=K(s,r);return(0,a.jsx)(Z,{title:m?"Running ".concat(p):p,isPending:m,isError:x})});function eB(e){return"object"==typeof e&&null!==e}function eD(e){if("string"!=typeof e)return e;let t=e.trim();if(!t)return e;try{let n=JSON.parse(t);return eB(n)||Array.isArray(n)?n:e}catch(t){return e}}var eQ=n(67909);let eG={nm:"spiral2",h:16,w:16,meta:{g:"@lottiefiles/toolkit-js 0.71.7"},layers:[{ty:4,nm:"Vector 5821 copy Outlines",sr:1,st:0,op:30,ip:0,ln:"18",hasMask:!1,ao:0,ks:{a:{a:0,k:[12.5,6.5,0]},s:{a:0,k:[100,100,100]},p:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[12,8,0],t:0},{s:[4,8,0],t:29}]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:24}},shapes:[{ty:"gr",nm:"Group 1",it:[{ty:"sh",nm:"Path 1",d:1,ks:{a:0,k:{c:!1,i:[[0,0],[-.289,3.296],[2.218,0],[-.23,-2.627],[-4.452,0],[-.289,3.296],[2.218,0],[-.23,-2.627],[-4.452,0],[-.289,3.296],[2.218,0],[-.232,-2.627],[-4.443,0]],o:[[4.452,0],[.23,-2.627],[-2.218,0],[.289,3.296],[4.452,0],[.23,-2.627],[-2.218,0],[.289,3.296],[4.452,0],[.23,-2.627],[-2.218,0],[.292,3.296],[0,0]],v:[[-12,6],[-4.975,-1.012],[-8,-6],[-11.025,-1.012],[-4,6],[3.025,-1.012],[0,-6],[-3.025,-1.012],[4,6],[11.025,-1.012],[8,-6],[4.98,-1.012],[12,6]]}}},{ty:"st",nm:"Stroke 1",lc:2,lj:2,ml:4,o:{a:0,k:100},w:{a:0,k:1.4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},p:{a:0,k:[12.5,6.5]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"tm",nm:"Trim Paths 1",e:{a:1,k:[{o:{x:.341,y:.488},i:{x:.269,y:.75},s:[44],t:0},{s:[77],t:29}]},o:{a:0,k:0},s:{a:1,k:[{o:{x:.32,y:.154},i:{x:.826,y:.579},s:[23],t:0},{s:[57],t:29}]},m:1}],ind:1}],v:"5.7.0",fr:60,op:30,ip:0,assets:[]},eH={nm:"spiral1",h:16,w:16,meta:{g:"@lottiefiles/toolkit-js 0.71.7"},layers:[{ty:4,nm:"Vector 5821 copy Outlines",sr:1,st:0,op:60,ip:0,ln:"18",hasMask:!1,ao:0,ks:{a:{a:0,k:[12.5,6.5,0]},s:{a:0,k:[100,100,100]},p:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[12,8,0],t:0},{s:[4,8,0],t:59}]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:24}},shapes:[{ty:"gr",nm:"Group 1",it:[{ty:"sh",nm:"Path 1",d:1,ks:{a:0,k:{c:!1,i:[[0,0],[-.289,3.296],[2.218,0],[-.23,-2.627],[-4.452,0],[-.289,3.296],[2.218,0],[-.23,-2.627],[-4.452,0],[-.289,3.296],[2.218,0],[-.232,-2.627],[-4.443,0]],o:[[4.452,0],[.23,-2.627],[-2.218,0],[.289,3.296],[4.452,0],[.23,-2.627],[-2.218,0],[.289,3.296],[4.452,0],[.23,-2.627],[-2.218,0],[.292,3.296],[0,0]],v:[[-12,6],[-4.975,-1.012],[-8,-6],[-11.025,-1.012],[-4,6],[3.025,-1.012],[0,-6],[-3.025,-1.012],[4,6],[11.025,-1.012],[8,-6],[4.98,-1.012],[12,6]]}}},{ty:"st",nm:"Stroke 1",lc:2,lj:2,ml:4,o:{a:0,k:100},w:{a:0,k:1.4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},p:{a:0,k:[12.5,6.5]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"tm",nm:"Trim Paths 1",e:{a:1,k:[{o:{x:.341,y:.992},i:{x:.269,y:.491},s:[44],t:0},{s:[77],t:59}]},o:{a:0,k:0},s:{a:1,k:[{o:{x:.32,y:.313},i:{x:.826,y:.143},s:[23],t:0},{s:[57],t:59}]},m:1}],ind:1}],v:"5.7.0",fr:60,op:60,ip:0,assets:[]};var eV=n(5379);let eY=(0,eQ.default)(()=>Promise.all([n.e(69066),n.e(67853)]).then(n.t.bind(n,67853,23)),{loadableGenerated:{webpack:()=>[67853]},ssr:!1});function eU(e){let{size:t=16,className:n}=e,[l,r]=(0,s.useState)(!1),[o,c]=(0,s.useState)("fast"),d=(0,s.useRef)(0),u=(0,s.useRef)(null),p=(0,s.useRef)(null),{resolvedTheme:m}=(0,eV.D)();(0,s.useEffect)(()=>{r(!0)},[]);let x=(0,s.useCallback)(()=>{var e,t;d.current=0,c("fast"),null==(e=p.current)||e.stop(),null==(t=u.current)||t.goToAndPlay(0,!0)},[]),h=(0,s.useCallback)(()=>{var e,t;d.current=0,c("slow"),null==(e=u.current)||e.stop(),null==(t=p.current)||t.goToAndPlay(0,!0)},[]),f=(0,s.useCallback)(()=>{if(d.current+=1,d.current<4){var e;null==(e=u.current)||e.goToAndPlay(0,!0)}else h()},[h]),g=(0,s.useCallback)(()=>{if(d.current+=1,d.current<2){var e;null==(e=p.current)||e.goToAndPlay(0,!0)}else x()},[x]);if(!l)return null;let b="dark"!==m;return(0,a.jsxs)("div",{className:i("relative shrink-0",n),style:{width:t,height:t},children:[(0,a.jsx)("div",{className:i("absolute inset-0 transition-opacity duration-75",b&&"invert","fast"===o?"opacity-100":"opacity-0"),children:(0,a.jsx)(eY,{lottieRef:u,animationData:eG,loop:!1,autoplay:!0,onComplete:f,style:{width:"100%",height:"100%"}})}),(0,a.jsx)("div",{className:i("absolute inset-0 transition-opacity duration-75",b&&"invert","slow"===o?"opacity-100":"opacity-0"),children:(0,a.jsx)(eY,{lottieRef:p,animationData:eH,loop:!1,autoplay:!1,onComplete:g,style:{width:"100%",height:"100%"}})})]})}let eJ=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}),e$=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"});function eK(e){return"object"==typeof e&&null!==e}function eX(e){return eK(e)&&"text"===e.type&&"string"==typeof e.text}function eZ(e){if(!eK(e))return!1;let t=e.type;return"dynamic-tool"===t||"string"==typeof t&&t.startsWith("tool-")}function e0(e,t){return e.filter(eX).map(e=>e.text).join(t)}function e1(e){let{text:t,onCopied:n}
1=e,[l,r]=(0,s.useState)(!1),o=(0,s.useRef)(null);return(0,a.jsx)("button",{type:"button",tabIndex:-1,onClick:()=>{navigator.clipboard.writeText(t),r(!0),o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{r(!1),o.current=null},2e3),null==n||n()},onPointerDown:e=>{e.stopPropagation()},onMouseDown:e=>e.stopPropagation(),className:i("size-6 flex items-center justify-center rounded-md active:scale-[0.97] transition-[background-color,opacity,transform] duration-150 ease-out","opacity-50 bg-transparent hover:opacity-100 hover:bg-an-foreground/10"),children:(0,a.jsxs)("div",{className:"relative w-3.5 h-3.5",children:[(0,a.jsx)(R.A,{className:i("absolute inset-0 w-3.5 h-3.5 text-an-foreground-muted transition-[opacity,transform] duration-150 ease-out",l?"opacity-0 scale-50":"opacity-100 scale-100")}),(0,a.jsx)(W.A,{className:i("absolute inset-0 w-3.5 h-3.5 text-an-foreground-muted transition-[opacity,transform] duration-150 ease-out",l?"opacity-100 scale-100":"opacity-0 scale-50")})]})})}function e2(e){let{text:t,timestamp:n,heightClass:s,hoverClass:l,isVisible:r,alignClass:o,onCopied:c}=e;return(0,a.jsxs)("div",{className:i("flex items-center gap-1 pt-1 text-xs text-an-foreground-muted/70 opacity-0 transition-opacity duration-100 pointer-events-none",s,o,l,r&&"opacity-100 pointer-events-auto"),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:[n&&(0,a.jsx)("span",{children:n}),t&&(0,a.jsx)(e1,{text:t,onCopied:c})]})}let e5=(0,s.memo)(function(e){var t,n,l,r;let{messages:o,status:c,className:d,showCopyToolbar:u=!0,suppressQuestionTool:p=!1,initialScrollBehavior:m="bottom",enableImagePreview:x=!0,slots:h,classNames:f,toolRenderers:g}=e,b=(0,s.useRef)(null),v=(0,s.useRef)(null),y=(0,s.useRef)(null),k=(0,s.useRef)(!0),N=(0,s.useRef)(0),w=(0,s.useRef)(null!=(n=null==(t=o[o.length-1])?void 0:t.id)?n:null),A=(0,s.useRef)(!1),[C,S]=(0,s.useState)(null),[P,_]=(0,s.useState)(!1),M=(null==h?void 0:h.UserMessage)||j,R=(null==h?void 0:h.ToolRenderer)||eq,W=(0,s.useCallback)(e=>{S(e)},[]);(0,s.useEffect)(()=>{_(!0)},[]),(0,s.useEffect)(()=>{let e=()=>{S(null)};return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[]);let T="streaming"===c||"submitted"===c,I=(0,s.useCallback)(e=>{if(b.current=e,y.current&&(y.current.disconnect(),y.current=null),e){e.style.setProperty("--chat-container-height","".concat(e.clientHeight,"px"));let t=new ResizeObserver(t=>{var n,a;let s=null!=(a=null==(n=t[0])?void 0:n.contentRect.height)?a:0;e.style.setProperty("--chat-container-height","".concat(s,"px"))});t.observe(e),y.current=t}},[]);(0,s.useEffect)(()=>()=>{y.current&&y.current.disconnect()},[]);let z=(0,s.useCallback)(()=>{let e=b.current;e&&(e.scrollTop=e.scrollHeight)},[]),E=(0,s.useCallback)(()=>{let e=0,t=0;return z(),e=requestAnimationFrame(()=>{z(),t=requestAnimationFrame(()=>{z()})}),()=>{cancelAnimationFrame(e),cancelAnimationFrame(t)}},[z]),O=(0,s.useCallback)(()=>{let e=b.current;return!e||e.scrollHeight-e.scrollTop-e.clientHeight<80},[]),F=(0,s.useCallback)(()=>{let e=b.current;if(!e)return;let t=e.scrollTop,n=N.current;if(N.current=t,t<n){k.current=!1;return}k.current=O()},[O]);(0,s.useLayoutEffect)(()=>{let e=b.current,t=v.current;if(!e||!t)return;"top"===m?(e.scrollTop=0,k.current=!1):(e.scrollTop=e.scrollHeight,k.current=!0);let n=t.getBoundingClientRect().height,a=e.scrollHeight,s=new ResizeObserver(()=>{let s=t.getBoundingClientRect().height;if(s!==n){if(n=s,!k.current){let t=e.scrollHeight;if(t!==a&&a>0){let n=t-a;e.scrollTop=e.scrollTop+n}}a=e.scrollHeight}});return s.observe(t),()=>s.disconnect()},[]);let q=(0,s.useMemo)(()=>(function(e){let t=!1,n=e.map(e=>{var n;if(Array.isArray(e.parts)&&e.parts.length>0)return e;let a=null!=(n=e.content)?n:e.text;return"string"==typeof a&&a?(t=!0,{...e,parts:[{type:"text",text:a}]}):e});return t?n:e})(o),[o]),B=q[q.length-1],D=null!=(l=null==B?void 0:B.id)?l:null,Q=null!=(r=null==B?void 0:B.role)?r:null,G=(0,s.useMemo)(()=>(function(e){for(let t=e.length-1;t>=0;t-=1){let n=e[t];if((null==n?void 0:n.role)==="user")return n.id}return null})(q),[q]),H=(0,s.useRef)(G),V=(0,s.useRef)(null);(0,s.useLayoutEffect)(()=>
1{if(G&&G!==H.current){k.current=!0,V.current=G;let e=E();return H.current=G,e}},[G,E]);let Y=(0,s.useMemo)(()=>(function(e){let t=[],n=null;for(let a of e)"user"===a.role?(n&&t.push(n),n={userMsg:a,assistantMsgs:[]}):"assistant"===a.role&&(n||(n={assistantMsgs:[]}),n.assistantMsgs.push(a));return n&&t.push(n),t})(q),[q]),U=(0,s.useMemo)(()=>{let e=q[q.length-1];if(!e)return!1;let t=Y[Y.length-1],n=!!(t&&t.assistantMsgs.length>0);return"user"===e.role&&!n||T&&!function(e){for(let n=e.length-1;n>=0;n-=1){var t;let a=e[n];if((null==a?void 0:a.role)==="assistant")return(null!=(t=a.parts)?t:[]).some(e=>eX(e)?e.text.trim().length>0:eZ(e))}return!1}(q)},[T,q,Y]),J="assistant"===Q&&!!D&&D!==w.current,$=U||A.current||J;return(0,s.useEffect)(()=>{"assistant"===Q&&D&&D!==w.current&&(A.current=!0),"user"===Q&&(A.current=!1),w.current=D},[D,Q]),(0,s.useLayoutEffect)(()=>{if(!U||!G||V.current!==G)return;let e=E();return V.current=null,e},[G,U,E]),(0,a.jsx)("div",{ref:I,onScroll:F,className:i("an-message-list flex-1 min-h-0 overflow-y-auto",d),children:(0,a.jsxs)("div",{ref:v,className:"mx-auto px-4 py-6 max-w-an",children:[(0,a.jsx)("div",{className:"space-y-2",children:Y.map((e,t)=>{var n,s;let l=t===Y.length-1,r=null!=(s=null==(n=e.userMsg)?void 0:n.id)?s:"turn-".concat(t);return(0,a.jsxs)("div",{className:"relative space-y-2",children:[e.userMsg&&(()=>{var t,n,s;let l=e0(null!=(n=e.userMsg.parts)?n:[],""),r=(null!=(s=e.userMsg.parts)?s:[]).length>0;if(!l&&!r)return null;let i=null==(t=e.userMsg)?void 0:t.createdAt,o="user-".concat(e.userMsg.id),c=P&&i?function(e){let t=new Date;return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()?eJ.format(e):e$.format(e)}(new Date(i)):void 0;return(0,a.jsxs)("div",{className:"group/user-message",children:[(0,a.jsx)(M,{message:e.userMsg,className:null==f?void 0:f.userMessage,enableImagePreview:x}),(u&&!!l||!!c)&&(0,a.jsx)(e2,{text:u?l:"",timestamp:c,heightClass:"h-[28px]",hoverClass:"group-hover/user-message:opacity-100 group-hover/user-message:pointer-events-auto",isVisible:C===o,alignClass:"justify-end",onCopied:()=>W(o)})]})})(),e.assistantMsgs.length>0&&!(l&&U)&&(()=>{let t=e0(e.assistantMsgs.flatMap(e=>{var t;return null!=(t=e.parts)?t:[]}),"\n\n"),n=T&&l,s=u&&!!t.trim()&&!n,i="assistant-".concat(r,"-all"),o=u?t:"";return(0,a.jsxs)("div",{className:"group/assistant-turn",children:[(0,a.jsx)("div",{className:"flex flex-col gap-3",children:e.assistantMsgs.map((t,n)=>{let s=l&&n===e.assistantMsgs.length-1;return(0,a.jsx)(e3,{msg:t,isLast:s,isStreaming:T,suppressQuestionTool:p,ToolRendererComponent:R,toolRenderers:g},t.id)})}),s?(0,a.jsx)(e2,{text:o,heightClass:"h-[48px] flex items-start w-full",hoverClass:"group-hover/assistant-turn:opacity-100 group-hover/assistant-turn:pointer-events-auto",isVisible:C===i,alignClass:"justify-start",onCopied:()=>W(i)}):C===i?(0,a.jsx)(e2,{text:o,heightClass:"h-[48px] flex items-start w-full",hoverClass:"group-hover/assistant-turn:opacity-100 group-hover/assistant-turn:pointer-events-auto",isVisible:!0,alignClass:"justify-start",onCopied:()=>W(i)}):null]})})(),l&&U&&(0,a.jsx)(L,{icon:(0,a.jsx)(eU,{size:12}),shimmerLabel:"Processing...",completeLabel:"Done",isAnimating:!0})]},r)})}),$&&(0,a.jsx)("div",{"aria-hidden":"true",className:"min-h-[max(140px,24vh)] mx-auto max-w-an w-full"})]})})});function e3(e){let{msg:t,isLast:n,isStreaming:l,suppressQuestionTool:r,ToolRendererComponent:i,toolRenderers:o}=e,c=(0,s.useMemo)(()=>{var e,n=null!=(e=t.parts)?e:[];let a=!1,s=n.map(e=>{let t=function(e){if(!eB(e)||"string"!=typeof e.type||!e.type.startsWith("tool-"))return e;let t=eD(e.input),n=eD(e.output),a=eD(e.result),s=t!==e.input,l=n!==e.output,r=a!==e.result;if(!s&&!l&&!r)return e;let i={...e};return s&&(i.input=t),l&&(i.output=n),r&&(i.result=a),i}(e);return t!==e&&(a=!0),t});return a?s:n},[t.parts]),{elements:d}=(0,s.useMemo)(()=>{let e=[],s=new Set(c.filter(e=>eZ(e)&&("tool-Task"===e.type||"tool-Agent"===e.type)&&"string"==typeof e.toolCallId).map(e=>e.toolCallId)),d=new Map,u=new Set;for(let e of c){if(!eZ(e)||"tool-TaskOutput"===e.type||!e.toolCallId||!e.toolCallId.includes(":"))continue;let t=e.toolCallId.split(":")[0];
1s.has(t)&&(d.has(t)||d.set(t,[]),d.get(t).push(e),u.add(e.toolCallId))}let p=0;for(;p<c.length;){var m;let s=c[p];if(eZ(s)&&"tool-TaskOutput"===s.type){p++;continue}if(eX(s)){let n=s.text;n&&e.push((0,a.jsx)("div",{className:"group/assistant-text text-[14px]",children:(0,a.jsx)(A,{content:n,className:"leading-relaxed [&_p]:leading-relaxed"})},"".concat(t.id,"-text-").concat(p))),p++;continue}if(eK(s)&&"error"===s.type&&"string"==typeof s.message){e.push((0,a.jsx)(C,{title:s.title,message:s.message},"".concat(t.id,"-error-").concat(p))),p++;continue}if(eZ(s)){if(r&&"tool-Question"===s.type||s.toolCallId&&u.has(s.toolCallId)){p++;continue}let c=n&&l?"streaming":void 0,x=s.toolCallId,h=("tool-Task"===s.type||"tool-Agent"===s.type)&&x?d.get(x)||[]:void 0;e.push((0,a.jsx)(i,{part:s,nestedTools:h,chatStatus:c,toolRenderers:o},null!=(m=s.toolCallId)?m:"".concat(t.id,"-tool-").concat(p))),p++;continue}p++}return{elements:e}},[c,t.id,n,l,r,i,o]);return d.length>1?(0,a.jsx)("div",{className:"group/assistant-turn flex flex-col gap-3",children:d}):(0,a.jsx)("div",{className:"group/assistant-turn",children:d})}var e4=n(52519),e6=n(74814);function e8(e){let{state:t}=e,n="typing"===t;return"streaming"===t?(0,a.jsx)("div",{className:"size-7 rounded-full bg-foreground flex items-center justify-center cursor-pointer",children:(0,a.jsx)(e4.A,{className:"size-4 text-background"})}):(0,a.jsx)("div",{className:i("size-7 rounded-full flex items-center justify-center",n?"bg-an-send-button-bg cursor-pointer":"bg-muted cursor-default"),children:(0,a.jsx)(e6.A,{className:i("size-4",n?"text-an-send-button-color":"text-neutral-400 dark:text-neutral-600")})})}var e7=n(14538),e9=n(89712);let te=(0,s.memo)(function(e){let t,{onClick:n,icon:s="plus"}=e,l="w-4 h-4 text-neutral-400 dark:text-neutral-600";return t="plus"===s||"paperclip"===s?"paperclip"===s?(0,a.jsx)(e7.A,{className:l,strokeWidth:2}):(0,a.jsx)(e9.A,{className:l,strokeWidth:2}):s,(0,a.jsx)("button",{type:"button",onClick:n,className:"size-7 rounded-full flex items-center justify-center hover:bg-muted transition-colors cursor-pointer","aria-label":"Attach",children:t})});function tt(e){let{items:t,onSelect:n,disabled:s,className:l,itemClassName:r}=e;return 0===t.length?null:(0,a.jsx)("div",{className:i("flex flex-wrap items-center gap-2",l),children:t.map(e=>(0,a.jsxs)("button",{type:"button",disabled:s,onClick:()=>n(e),className:i("inline-flex h-7 items-center gap-1 rounded-[6px] border border-border bg-transparent px-2 text-sm text-an-foreground-muted transition-colors hover:bg-an-background-secondary/40 hover:text-an-foreground disabled:opacity-50 disabled:pointer-events-none",r,e.className),children:[e.icon&&(0,a.jsx)("span",{className:"inline-flex shrink-0",children:e.icon}),e.label]},e.id))})}let tn={inputBarPlaceholder:"Send a message...",attachmentButtonPosition:"left",attachmentPreviewStyle:"thumbnail"},ta=(0,s.memo)(function(e){var t,n,l,r,o,c,d,u,m,x;let{onSend:h,status:f,onStop:b,placeholder:v,className:j,onAttach:y,attachedImages:k=[],attachedFiles:N=[],onRemoveImage:w,onRemoveFile:A,onPaste:C,isDragOver:S,enableImagePreview:P=!0,value:_,onChange:M,disabled:L,autoFocus:R,suggestions:W=[],typingAnimation:T,infoBar:I,questionBar:z,leftActions:E,rightActions:O}=e,[F,q]=(0,s.useState)(""),[B,D]=(0,s.useState)(!0),[Q,G]=(0,s.useState)(null),[H,V]=(0,s.useState)(1),Y=void 0!==_,U=Y?_:F,J=(0,s.useCallback)(e=>{Y?null==M||M(e):q(e)},[Y,M]),$=(0,s.useRef)(null),K="streaming"===f||"submitted"===f,X=null!=(t=null==T?void 0:T.isActive)&&t,{displayedText:Z,showImage:ee}=function(e,t,n,a){let[l,r]=(0,s.useState)(0),[i,o]=(0,s.useState)(!1),c=(0,s.useRef)(a);return c.current=a,(0,s.useEffect)(()=>{if(!n){r(0),o(!1);return}let a=.1*t,s=.15*t,l=.7*t,i=l/e.length,d=.15*t,u=[];u.push(setTimeout(()=>o(!0),a));for(let t=0;t<e.length;t++)u.push(setTimeout(()=>r(t+1),s+i*t));return u.push(setTimeout(()=>c.current(),s+l+d)),()=>u.forEach(clearTimeout)},[n,e,t]),{displayedText:e.slice(0,l),showImage:i}}(null!=(n=null==T?void 0:T.text)?n:"",null!=(l=null==T?void 0:T.duration)?l:2e3,X,null!=(r=null==T?void 0:T.onComplete)?r:()=>{}),et=null!=v?v:tn.inputBarPlaceholder,en=!!y,ea="right"===tn.attachmentButtonPosition;(0,s.useEffect)(()=>{let e=$.current;if(!e)return;e.style.height="0";let t=Math.min(e.scrollHeight,120);e.style.height="".concat(t,"px"),e.style.overflowY=e.scrollHeight>120?"auto":"hidden",e.style.overflowX="hidden"},[U]),(0,s.useEffect)(()=>{var e;R&&(null==(e=$.current)||e.focus())},[R]);let es=(0,s.useCallback)(()=>{let e=U.trim();!e||K||L||(h({role:"user",content:e}),J(""))},[U,K,L,h,J]),el=(0,s.useCallback)(()=>{var e;D(!1),null==I||null==(e=I.onClose)||e.call(I)},[I]),ei=null!=(o=null==I?void 0:I.position)?o:"top",eo=!!(I&&(I.title||I.description)),ec=null!=I?I:{},ed=eo?(0,a.jsxs)("div",{className:i("flex items-center justify-between gap-3 px-3 h-[34px]","transition-all duration-150 ease-out overflow-hidden",B?"opacity-100 max-h-[34px]":"opacity-0 max-h-0","top"===ei?"rounded-t-an-input-border-radius":"rounded-b-an-input-border-radius"),children:[(0,a.jsxs)("div",{className:"min-w-0 truncate text-xs text-an-foreground",children:[ec.title&&(0,a.jsx)("span",{className:"font-medium",children:ec.title}),ec.description&&(0,a.jsx)("span",{className:"text-an-foreground-muted/80",children:ec.title?" ".concat(ec.description):ec.description})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[ec.action&&(0,a.jsx)("button",{type:"button",onClick:ec.action.onClick,className:"h-6 px-2 rounded-[4px] text-xs font-medium bg-an-primary-color text-an-send-button-color hover:bg-an-primary-color/90 active:scale-[0.98] transition-[background-color,transform] duration-150",children:ec.action.label}),ec.onClose&&(0,a.jsx)("button",{type:"button",onClick:el,className:"shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-md text-an-foreground-muted/70 hover:text-an-foreground hover:bg-an-background-secondary","aria-label":"Close",children:(0,a.jsx)(p.A,{className:"w-3.5 h-3.5",strokeWidth:2})})]})]}):null,eu=!!(z&&z.id!==Q),ep=null!=(c=null==z?void 0:z.questions)?c:[],em=ep.length>0,ex=em?ep.length:1,eh=null!=(d=null==z?void 0:z.totalQuestions)?d:ex,ef=Math.max(1,Math.min((null==z?void 0:z.onPreviousQuestion)||(null==z?void 0:z.onNextQuestion)?null!=(u=null==z?void 0:z.questionIndex)?u:1:H,eh)),eg=em?ep[ef-1]:void 0,eb=eh>1,ev=ef>1,ej=ef<eh,ey=(0,s.useCallback)(()=>
1{if(ev){if(null==z?void 0:z.onPreviousQuestion)return void z.onPreviousQuestion();V(e=>Math.max(1,e-1))}},[ev,z]),ek=(0,s.useCallback)(()=>{if(ej){if(null==z?void 0:z.onNextQuestion)return void z.onNextQuestion();V(e=>Math.min(eh,e+1))}},[ej,z,eh]),eN=eu&&eg?(0,a.jsxs)("div",{className:i("border-t border-x border-border max-w-[calc(100%-24px)] w-full mx-auto",eo&&"bottom"!==ei?null:"rounded-t-an-input-border-radius"),children:[(0,a.jsxs)("div",{className:"h-7 border-b border-border px-3 flex items-center justify-between text-xs text-an-tool-color-muted",children:[(0,a.jsxs)("div",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(eW.A,{className:"w-3.5 h-3.5"}),"Question"]}),eb&&(0,a.jsxs)("div",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:ey,disabled:!ev,className:"size-5 inline-flex items-center justify-center rounded-[4px] hover:bg-an-background-secondary disabled:opacity-40","aria-label":"Previous question",children:(0,a.jsx)(eT.A,{className:"w-3.5 h-3.5"})}),(0,a.jsxs)("span",{children:[ef," of ",eh]}),(0,a.jsx)("button",{type:"button",onClick:ek,disabled:!ej,className:"size-5 inline-flex items-center justify-center rounded-[4px] hover:bg-an-background-secondary disabled:opacity-40","aria-label":"Next question",children:(0,a.jsx)(er.A,{className:"w-3.5 h-3.5"})})]})]}),(0,a.jsx)(eE,{questions:ep,questionIndex:ef,totalQuestions:eh,submitLabel:z.submitLabel,skipLabel:z.skipLabel,allowSkip:z.allowSkip,onSubmit:e=>{z.onSubmit(e),G(z.id)},onSkip:()=>{var e;null==(e=z.onSkip)||e.call(z)}},"".concat(ef,"-").concat(null!=(m=null==eg?void 0:eg.title)?m:"question"))]}):null,ew=(0,s.useCallback)(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),es())},[es]),eA=U.trim().length>0,eC=(k.length>0||N.length>0)&&"hidden"!==tn.attachmentPreviewStyle,eS="thumbnail"===tn.attachmentPreviewStyle?"image-only":"chip",eP=(0,s.useCallback)(e=>{if(e.target===e.currentTarget||!e.target.closest("button, textarea")){var t;null==(t=$.current)||t.focus()}},[]),e_=(0,s.useCallback)(e=>{var t;L||K||(J(null!=(t=e.value)?t:e.label),requestAnimationFrame(()=>{let e=$.current;if(!e)return;e.focus();let t=e.value.length;e.setSelectionRange(t,t)}))},[L,K,J]),eM=Array.isArray(W)?W:null!=(x=null==W?void 0:W.items)?x:[],eL=Array.isArray(W)||null==W?void 0:W.className,eR=Array.isArray(W)||null==W?void 0:W.itemClassName;return(0,a.jsx)("div",{className:i("shrink-0 px-3 pb-3",j),children:(0,a.jsx)("div",{className:"mx-auto max-w-an",children:(0,a.jsxs)("div",{className:i("flex flex-col gap-0",eo?"bg-an-background-tertiary rounded-an-input-border-radius":null),children:["top"===ei&&ed,eN,(0,a.jsxs)("div",{className:i("relative cursor-text rounded-an-input-border-radius bg-an-input-background shadow-2xs ring-1 ring-foreground/10",S&&"ring-2 ring-an-primary-color"),onClick:eP,children:[(0,a.jsx)("div",{className:i("grid transition-[grid-template-rows] duration-200 ease-out grid-rows-[0fr]",eC&&"grid-rows-[1fr]"),children:(0,a.jsx)("div",{className:"overflow-hidden",children:eC&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-[6px] px-an-context-padding pt-an-context-padding pb-0.5",children:[k.map(e=>(0,a.jsx)(g,{id:e.id,filename:e.filename,size:e.size,isImage:!0,url:e.url,display:eS,enableImagePreview:P,onRemove:w?()=>w(e.id):void 0},e.id)),N.map(e=>(0,a.jsx)(g,{id:e.id,filename:e.filename,size:e.size,onRemove:A?()=>A(e.id):void 0},e.id))]})})}),X&&(null==T?void 0:T.image)&&ee&&(0,a.jsx)("div",{className:"flex gap-2 flex-wrap px-3 pt-3",children:(0,a.jsx)("div",{className:"relative overflow-hidden shrink-0 w-16 h-16 rounded-md",children:(0,a.jsx)("img",{src:T.image,alt:"",className:"w-full h-full object-cover"})})}),(0,a.jsx)("div",{className:"pt-3 pb-0 pr-3 pl-3.5 min-h-[44px]",children:X?(0,a.jsxs)("div",{className:"w-full text-[14px] leading-[1.6] text-an-foreground-muted",children:[(0,a.jsx)("span",{children:Z}),(0,a.jsx)("span",{className:"inline-block w-[2px] h-[1em] ml-px align-text-bottom bg-an-foreground animate-an-blink"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("textarea",{ref:$,value:U,onChange:e=>J(e.target.value),onKeyDown:ew,onPaste:C,placeholder:et,disabled:L,rows:1,className:i("peer w-full resize-none bg-transparent border-0 outline-none text-[14px] leading-[1.6] text-an-foreground placeholder:text-an-input-placeholder-color","overflow-hidden",L&&"opacity-50 cursor-not-allowed")}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 rounded-an-input-border-radius outline-2 outline-an-input-focus-outline opacity-0 transition-opacity duration-75 peer-focus-visible:opacity-100 peer-focus:opacity-100 z-20 ease-in-out"})]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 px-2 pt-1 pb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1 min-w-0",children:[!ea&&en&&y&&(0,a.jsx)(te,{onClick:y}
1),E]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[O,ea&&en&&y&&(0,a.jsx)(te,{onClick:y}),(0,a.jsx)("div",{onClick:()=>{K?b():eA&&es()},className:"cursor-pointer",children:(0,a.jsx)(e8,{state:K?"streaming":eA&&!L?"typing":"idle"})})]})]})]}),eM.length>0&&(0,a.jsx)(tt,{items:eM,onSelect:e_,disabled:L||K,className:i("mt-4 px-3",eL),itemClassName:eR}),"bottom"===ei&&ed]})})})});function ts(e){var t,n,l;let{messages:r,onSend:o,status:c,onStop:d,error:u,classNames:p,slots:m,toolRenderers:x,attachments:h,showCopyToolbar:f,initialScrollBehavior:g,enableImagePreview:b,suggestions:v,emptyStatePosition:j="default",emptySuggestionsPlacement:y="input",emptySuggestionsPosition:k="top",questionTool:N,className:w,style:A}=e,C=(0,s.useRef)(null),[S,P]=(0,s.useState)(""),_=null!=(t=null==m?void 0:m.InputBar)?t:ta,M=!u&&0===r.length&&"center"===j,L=function(e,t){for(let u=e.length-1;u>=0;u-=1){var n,a,s,l,r,i,o,c,d;let p=e[u];if((null==p?void 0:p.role)!=="assistant")continue;let m=null!=(n=p.parts)?n:[];for(let e=m.length-1;e>=0;e-=1){let n=m[e];if((null==n?void 0:n.type)!=="tool-Question")continue;let p=n.input,x=null!=(s=null==p?void 0:p.questions)?s:[],h=null!=(l=x[0])?l:null==p?void 0:p.question;if(h){if(null==(a=n.output)?void 0:a.answer)return null;return{id:null!=(r=n.toolCallId)?r:"question-".concat(u,"-").concat(e),toolCallId:n.toolCallId,questions:x,question:h,questionIndex:null==p?void 0:p.questionIndex,totalQuestions:null!=(i=null==p?void 0:p.totalQuestions)?i:x.length>0?x.length:void 0,onPreviousQuestion:null==p?void 0:p.onPreviousQuestion,onNextQuestion:null==p?void 0:p.onNextQuestion,submitLabel:null!=(o=null==t?void 0:t.submitLabel)?o:null==p?void 0:p.submitLabel,skipLabel:null!=(c=null==t?void 0:t.skipLabel)?c:null==p?void 0:p.skipLabel,allowSkip:null!=(d=null==t?void 0:t.allowSkip)?d:null==p?void 0:p.allowSkip}}}}return null}(r,N),R=Array.isArray(n=v)?{items:n,className:void 0,itemClassName:void 0}:{items:null!=(l=null==n?void 0:n.items)?l:[],className:null==n?void 0:n.className,itemClassName:null==n?void 0:n.itemClassName},W=M&&("empty"===y||"both"===y)&&R.items.length>0?(0,a.jsx)(tt,{items:R.items,onSelect:e=>{var t;P(null!=(t=e.value)?t:e.label)},disabled:"streaming"===c||"submitted"===c,className:i("w-full justify-center","top"===k?"mb-3":"mt-3",R.className),itemClassName:i("h-8 rounded-md px-3",R.itemClassName)}):null,T=(0,a.jsx)(_,{onSend:o,status:c,onStop:d,value:S,onChange:P,placeholder:"Send a message...",className:i(null==p?void 0:p.inputBar,M&&"px-0 pb-0"),onAttach:null==h?void 0:h.onAttach,attachedImages:null==h?void 0:h.images,attachedFiles:null==h?void 0:h.files,onRemoveImage:null==h?void 0:h.onRemoveImage,onRemoveFile:null==h?void 0:h.onRemoveFile,onPaste:null==h?void 0:h.onPaste,isDragOver:null==h?void 0:h.isDragOver,suggestions:"input"===y||"both"===y?v:[],questionBar:L?{id:L.id,questions:L.questions,questionIndex:L.questionIndex,totalQuestions:L.totalQuestions,onPreviousQuestion:L.onPreviousQuestion,onNextQuestion:L.onNextQuestion,submitLabel:L.submitLabel,skipLabel:L.skipLabel,allowSkip:L.allowSkip,onSubmit:e=>{var t;null==N||null==(t=N.onAnswer)||t.call(N,{toolCallId:L.toolCallId,question:L.questions[L.questionIndex?L.questionIndex-1:0],answer:e})}}:void 0});return(0,a.jsxs)("div",{ref:C,className:i("flex flex-col h-full min-h-0",null==p?void 0:p.root,w),style:A,children:[M?(0,a.jsx)("div",{className:"flex-1 min-h-0 flex items-center justify-center px-4 py-4",children:(0,a.jsxs)("div",{className:"w-full max-w-an",children:["top"===k?W:null,T,"bottom"===k?W:null]})}):(0,a.jsx)(e5,{messages:u?[...r,{id:"agent-chat-error",role:"assistant",parts:[{type:"error",title:"Request failed",message:u.message}]}]:r,status:c,classNames:p,slots:m,toolRenderers:x,showCopyToolbar:f,initialScrollBehavior:g,enableImagePreview:b,suppressQuestionTool:!!L}),M?null:T]})}let tl=()=>{},tr=e=>({type:"text",text:e}),ti=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ok";return{type:"tool-".concat(e),toolCallId:"".concat(e,"-").concat(Math.abs(function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n);return t}(JSON.stringify(t)))),state:"output-available",input:t,output:n}},to=(e,t)=>({id:e,role:"user",parts:[tr(t)]}),tc=(e,t)=>({id:e,role:"assistant",parts:t}),td=[to("gtm-1","Score the inbound list. Write the ones that clear 60 and read each record back."),tc("gtm-2",[ti("WebSearch",{query:"freight TMS mid-market hiring signals 2026"},{results:[{source:"web",title:"Freightwave Systems opens a second depot",date:"2026-07-14"},{source:"web",title:"Northwind Logistics posts 9 ops roles",date:"2026-07-09"},{source:"github",title:"cedar-freight/tms-connector",date:"2026-06-28"}]}),ti("Task",{subagent_type:"scorer",description:"Score 200 accounts against the written criteria"},{scored:200}),ti("TodoWrite",{action:"update",todos:[{content:"Research all 200 accounts",status:"completed"},{content:"Score against the written bar",status:"completed"},{content:"Write the ones at 60 or higher",status:"completed"},{content:"Read every record back",status:"completed"}]}),tr("Scored all 200 against your written criteria and wrote only the ones at 60 or higher.\n\n- **Freightwave Systems**, 78/100 \xb7 written\n- **Northwind Logistics**, 71/100 \xb7 written\n- Cedar Freight Co, 44/100 \xb7 below the bar\n\n12 cleared the bar and went to HubSpot. I read every record back: 12 of 12 fields matched.")])],tu=[to("fin-1","Match every July invoice to its PO and receipt. Hold anything outside tolerance."),tc("fin-2",[ti("Read",{file_path:"/erp/vendor-master.csv"},{rows:1204}),ti("Bash",{command:"match --invoices july --against po,receipt --tolerance 0.02"},"412 matched \xb7 6 held"),ti("Edit",{file_path:"/reports/invoice-exceptions-july.md",old_string:"## Exceptions\n(none recorded)",new_string:"## Exceptions\nINV-8841 \xb7 $12,480.00 vs $12,000.00 PO \xb7 +4.0% on a 2.0% tolerance \xb7 held"},{ok:!0}),tr("Matched all 412 July invoices in 12m 04s. Quantity matched, 240 of 240. Price did not.\n\n**INV-8841**, $12,480.00 against a $12,000.00 PO, a 4.0% variance on a 2.0% tolerance. Held, routed with the match attached.")])],tp=[to("sw-1","Triage the issue, make the change, run the tests, and watch the rollout."),tc("sw-2",[ti("Thinking",{thought:"The retry path is not idempotent, so a replayed webhook double-writes. Guard on the delivery id before the write rather than after, and keep it behind the existing flag."},{ok:!0}
1),ti("Edit",{file_path:"src/webhooks/handler.ts",old_string:"await write(payload);",new_string:"if (await seen(payload.deliveryId)) return;\n await write(payload);"},{ok:!0}),ti("Bash",{command:"pnpm test --filter webhooks && pnpm soak --requests 1000"},"passed"),tr("8 files changed, +23 -16. Soak passed at 1,000 requests.\n\n```text\nerror rate 2.1% â threshold 1.0%\np99 310 ms â threshold 250 ms\n```\n\nError rate reached **2.1%** at **310 ms p99**. I marked release 2.4.1 degraded and rolled it back before anyone was paged.")])],tm=[to("res-1","Check every claim in the draft. Flag anything a source cannot carry."),tc("res-2",[ti("WebFetch",{url:"https://www.bls.gov/news.release/empsit.nr0.htm"},{results:[{source:"web",title:"Employment Situation Summary",date:"2026-07-03"},{source:"scholar",title:"Participation and the measured gap",date:"2026-05-19"},{source:"arxiv",title:"Revisions to the household survey",date:"2026-04-02"}]}),ti("Grep",{pattern:"labour force participation",path:"sources/"},{numFiles:34,results:[{source:"web",title:"34 files matched in sources/",date:"2026-07-28"}]}),ti("PlanWrite",{action:"create",plan:{title:"Recheck the two unsupported claims",status:"awaiting_approval",steps:[{content:"Pull the primary for CLAIM-19",status:"pending"},{content:"Find a replacement source for CLAIM-27",status:"pending"}]}}),tr("Traced all 34 claims to their originals and verified 32 of 34 quotations.\n\n- CLAIM-04, quotation matches the original\n- **CLAIM-19**, the source does not say this\n- **CLAIM-27**, no primary found\n\nTwo claims are held back. Nothing ships without a source.")])],tx={"GTM Engineering":{messages:td,extra:{suggestions:{items:[{id:"widen",label:"Widen",value:"Lower the bar to 55 and rescore."},{id:"explain",label:"Explain",value:"Why did Cedar Freight score 44?"}]}}},"Finance Operations":{messages:tu,extra:{showCopyToolbar:!0,questionTool:{submitLabel:"Approve",skipLabel:"Dispute",allowSkip:!0,onAnswer:tl}}},"Software Factory":{messages:tp,extra:{showCopyToolbar:!0}},"Research Quality Operations":{messages:tm,extra:{attachments:{onAttach:tl,files:[{id:"draft",filename:"draft-v3.md",size:18400},{id:"sources",filename:"sources.bib",size:9100}],onRemoveFile:tl}}},"Tax Strategy Management":{messages:[to("tax-1","Trace the position end to end. Mark every assumption and model the alternatives."),tc("tax-2",[ti("ListMcpResources",{server:"client-vault"},{resources:41}),ti("ReadMcpResource",{server:"client-vault",uri:"vault://2026/q3/transfer-pricing-memo.pdf"},{ok:!0}),ti("Write",{file_path:"/memos/position-memo-q3.md",content:"# Position memo, Q3\n"},{ok:!0}),tr("Assembled 41 documents and marked 9 assumptions where each one enters.\n\n- Treatment A, modeled\n- Treatment B, modeled\n- Treatment C, ruled out\n\nQ-04 and Q-07 are open and routed to the reviewing expert. Every figure carries the document it came from. The judgment stays with a person.")])],extra:{attachments:{onAttach:tl,files:[{id:"memo",filename:"transfer-pricing-memo.pdf",size:402e3},{id:"sched",filename:"schedule-c-2026.xlsx",size:88e3}],onRemoveFile:tl},enableImagePreview:!0}},"Autonomous Talent Engineering":{messages:[to("tal-1","Map the whole market for this role and return dossiers ready for a first call."),tc("tal-2",[ti("Agent",{subagent_type:"sourcer",description:"Map the staff engineer market from public record"},{found:312}),ti("Agent",{subagent_type:"screener",description:"Screen 312 candidates against the written bar"},{passed:48}),ti("Skill",{skill:"dossier-builder"},{built:9}),ti("BashOutput",{bash_id:"sourcing-run"},"312 sourced \xb7 48 screened \xb7 9 slated"),tr("Sourced 312 from public record, screened 48 against your written bar, and built 9 dossiers.\n\nEvery claim carries its source. The candidate on page four got read.")])],extra:{suggestions:{items:[{id:"widen",label:"Widen",value:"Include adjacent titles and rerun."},{id:"brief",label:"Brief",value:"Draft the first-call brief for the top three."}]}}}};function th(e){let{line:t}=e,n=tx[t];return n?(0,a.jsx)("div",{className:"absolute inset-0 overflow-hidden rounded-[inherit] bg-surface-2",children:(0,a.jsx)("div",{className:"absolute inset-[4%] overflow-hidden rounded-xl border border-border bg-surface shadow-[0_18px_44px_-26px_rgba(10,18,34,0.5)]",children:(0,a.jsx)(ts,{messages:n.messages,status:"ready",onSend:tl,onStop:tl,initialScrollBehavior:"top",...n.extra})})}):null}},34807:(e,t,n)=>{"use strict";n.d(t,{FeaturesGridSection:()=>J});var a=n(95155),s=n(52619),l=n.n(s),r=n(24033),i=n(61306),o=n(34220),c=n(5917),d=n(87759),u=n(26983),p=n(89715),m=n(86651),x=n(37586),h=n(85843),f=n(26617),g=n(47937),b=n(91169);let v=[.16,1,.3,1],j={once:!0,amount:.2},y={hidden:{opacity:0,y:12},show:{opacity:1,y:0,transition:{duration:.42,ease:v,delayChildren:.1,staggerChildren:.06}}},k={hidden:{opacity:0,y:6},show:{opacity:1,y:0,transition:{duration:.3,ease:v}}},N={hidden:{opacity:0,scale:.7},show:{opacity:1,scale:1,transition:{type:"spring",stiffness:460,damping:22,delay:.12}}},w="#1A1A1A",A="#6B6B6B",C="#9A9A9A",S="#1F8A4C",P="#B7791F",_="#C0392B";function M(e){let{tint:t,children:n}=e;return(0,a.jsxs)("div",{className:"absolute inset-0 overflow-hidden rounded-[inherit]",children:[(0,a.jsx)("div",{className:"absolute inset-0",style:{background:t}}
1),(0,a.jsx)(i.PY1.div,{initial:"hidden",whileInView:"show",viewport:j,variants:y,className:"absolute inset-x-[6%] bottom-[6%] top-[9%] overflow-hidden rounded-xl border border-black/[0.07] bg-white shadow-[0_16px_36px_-22px_rgba(10,18,34,0.45)]",children:n})]})}function L(e){let{icon:t,label:n,tag:s}=e;return(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5 border-b border-black/[0.06] px-2.5 py-[5px]",children:[t,(0,a.jsx)("span",{className:"text-[10px] font-medium",style:{color:w},children:n}),s?(0,a.jsx)("span",{className:"ml-auto rounded bg-black/[0.05] px-1 py-px text-[9px] tabular-nums",style:{color:A},children:s}):null]})}function R(e){let{children:t,last:n,tight:s}=e;return(0,a.jsx)(i.PY1.div,{variants:k,className:"flex shrink-0 items-center gap-1.5 px-2.5 ".concat(s?"py-[2px]":"py-[5px]"," ").concat(n?"":"border-b border-black/[0.04]"),children:t})}function W(e){let{children:t}=e;return(0,a.jsx)(i.PY1.div,{variants:k,className:"mt-auto flex shrink-0 items-center gap-1.5 border-t border-black/[0.06] px-2.5 py-[5px]",children:t})}function T(){return(0,a.jsx)(i.PY1.span,{variants:N,className:"flex shrink-0",children:(0,a.jsx)(c.A,{className:"size-3",strokeWidth:3,style:{color:S}})})}function I(e){let{pct:t,color:n}=e;return(0,a.jsx)("span",{className:"block h-1 w-full overflow-hidden rounded-full bg-black/[0.07]",children:(0,a.jsx)(i.PY1.span,{variants:{hidden:{scaleX:0},show:{scaleX:1,transition:{duration:.5,ease:v,delay:.08}}},className:"block h-full origin-left rounded-full",style:{background:n,width:"".concat(t,"%")}})})}let z=[{id:"#4182",title:"retry idempotency on webhook replay",add:43,del:11},{id:"#4179",title:"backfill missing next-step fields",add:412,del:138},{id:"#4177",title:"flag stale close dates on stage change",add:88,del:6}],E=[{k:"Next step",v:"Security review booked"},{k:"Close date",v:"Mar 14 â Apr 30"},{k:"Stage",v:"Proposal"}],O=[{k:"Support tickets",v:"9 open, 2 escalated",pct:74},{k:"Usage",v:"Down 22% since Feb",pct:61},{k:"Roadmap asks",v:"3 unanswered",pct:48}],F=[{k:"Invoice",v:"$12,480.00",ok:!0},{k:"Purchase order",v:"$12,000.00",ok:!0},{k:"Goods receipt",v:"Qty matched",ok:!0}],q=[{k:"Launch brief",v:"Approved"},{k:"Assets",v:"6 variants"},{k:"Landing page",v:"Staged"},{k:"Campaign",v:"Scheduled"}],B=[{k:"Northwind MSA",v:"2 deviations",tone:P},{k:"Acme DPA",v:"Clean",tone:S},{k:"Vertex reseller",v:"1 deviation",tone:P}],D=[{k:"Carrier delay",v:"Lane 44, 2 days",tone:P},{k:"Stock cover",v:"SKU-2210 under 7d",tone:_},{k:"Vendor SLA",v:"Within terms",tone:S}],Q=[{k:"Sourced",v:"312",pct:100},{k:"Screened to bar",v:"48",pct:62},{k:"Packets built",v:"9",pct:30}],G=[{k:"Signals read",v:"Support, calls, reviews"},{k:"Dependencies",v:"4 tracked"},{k:"Open questions",v:"2 logged"}],H={engineering:function(){return(0,a.jsx)(M,{tint:"linear-gradient(150deg,#eaf0ff,#cfe0fb 46%,#eef4ff)",children:(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)(L,{icon:(0,a.jsx)(d.A,{className:"size-3",strokeWidth:2,style:{color:w}}),label:"Approved",tag:"6"}),z.map(e=>(0,a.jsxs)(R,{children:[(0,a.jsx)("span",{className:"shrink-0 text-[9.5px] tabular-nums",style:{color:C},children:e.id}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:w},children:e.title}),(0,a.jsxs)("span",{className:"shrink-0 text-[9.5px] tabular-nums",style:{color:S},children:["+",e.add]}),(0,a.jsxs)("span",{className:"shrink-0 text-[9.5px] tabular-nums",style:{color:_},children:["-",e.del]}),(0,a.jsx)(T,{})]},e.id)),(0,a.jsxs)(W,{children:[(0,a.jsx)(u.A,{className:"size-3",strokeWidth:2,style:{color:P}}),(0,a.jsx)("span",{className:"text-[10px]",style:{color:A},children:"Needs review"}),(0,a.jsx)("span",{className:"ml-auto text-[9.5px] tabular-nums",style:{color:C},children:"3"})]})]})})},revops:function(){return(0,a.jsx)(M,{tint:"linear-gradient(150deg,#f0edff,#dcd6fb 46%,#f3f0ff)",children:(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)(L,{icon:(0,a.jsx)(p.A,{className:"size-3",strokeWidth:2,style:{color:w}}),label:"Written to HubSpot",tag:"20 records"}),E.map(e=>(0,a.jsxs)(R,{children:[(0,a.jsx)("span",{className:"w-[56px] shrink-0 whitespace-nowrap text-[9.5px]",style:{color:C},children:e.k}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:w},children:e.v}),(0,a.jsx)(T,{})]},e.k)),(0,a.jsxs)(W,{children:[(0,a.jsx)(m.A,{className:"size-3",strokeWidth:2,style:{color:S}}),(0,a.jsx)("span",{className:"text-[10px]",style:{color:A},children:"Read back and confirmed"}),(0,a.jsx)(i.PY1.span,{variants:N,className:"ml-auto text-[9.5px] font-medium tabular-nums",style:{color:S},children:"20 / 20"})]})]})})},"customer-success":function(){return(0,a.jsx)(M,{tint:"linear-gradient(150deg,#e9f5ff,#c9e4fb 46%,#eef7ff)",children:(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)(L,{icon:(0,a.jsx)(x.A,{className:"size-3",strokeWidth:2,style:{color:w}}),label:"Renewal risk",tag:"Northwind \xb7 62d out"}),O.map(e=>(0,a.jsx)(R,{tight:!0,children:(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-[2px]",children:[(0,a.jsxs)("span",{className:"flex items-baseline gap-1.5",children:[(0,a.jsx)("span",{className:"shrink-0 text-[9.5px]",style:{color:C},children:e.k}),(0,a.jsx)("span",{className:"min-w-0 truncate text-[10px]",style:{color:w},children:e.v})]}),(0,a.jsx)(I,{pct:e.pct,color:P})]})},e.k)),(0,a.jsxs)(W,{children:[(0,a.jsx)("span",{className:"text-[10px]",style:{color:A},children:"Next action"}),(0,a.jsx)("span",{className:"ml-auto truncate text-[9.5px]",style:{color:w},children:"Exec check-in, owner notified"})]})]})})},finance:function(){return(0,a.jsx)(M,{tint:"linear-gradient(150deg,#e9f6f0,#c8e8da 46%,#eefaf4)",children:(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)(L,{icon:(0,a.jsx)(h.A,{className:"size-3",strokeWidth:2,style:{color:w}}),label:"Three-way match",tag:"INV-8841"}),F.map(e=>(0,a.jsxs)(R,{children:[(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:A},children:e.k}),(0,a.jsx)("span",{className:"shrink-0 text-[10px] tabular-nums",style:{color:w},children:e.v}),(0,a.jsx)(T,{})]},e.k)),(0,a.jsxs)(W,{children:[(0,a.jsx)("span",{className:"rounded px-1 py-px text-[9px] font-medium",style:{background:"rgba(192,57,43,0.09)",color:_},children:"+4.0%"}),(0,a.jsx)("span",{className:"truncate text-[10px]",style:{color:A},children:"Outside 2% tolerance"}),(0,a.jsx)(i.PY1.span,{variants:N,className:"ml-auto shrink-0 text-[9.5px] font-medium",style:{color:P},children:"Held"})]})]})})},marketing:function(){return(0,a.jsx)(M,{tint:"linear-gradient(150deg,#fdf0e8,#f8d7c2 46%,#fff4ec)",children:(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)(L,{icon:(0,a.jsx)(f.A,{className:"size-3",strokeWidth:2,style:{color:w}}),label:"Spring launch",tag:"4 of 4"}),q.map((e,t)=>(0,a.jsxs)(R,{last:t===q.length-1,children:[(0,a.jsx)(T,{}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:w},children:e.k}),(0,a.jsx)("span",{className:"shrink-0 text-[9.5px]",style:{color:C},children:e.v})]},e.k))]})})},legal:function(){return(0,a.jsx)(M,{tint:"linear-gradient(150deg,#eeeefb,#d4d5f4 46%,#f2f2ff)",children:(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)(L,{icon:(0,a.jsx)(g.A,{className:"size-3",strokeWidth:2,style:{color:w}}),label:"Checked against playbook",tag:"41 of 41"}),B.map(e=>(0,a.jsxs)(R,{children:[(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:w},children:e.k}),(0,a.jsx)(i.PY1.span,{variants:N,className:"shrink-0 rounded px-1 py-px text-[9px] font-medium",style:{background:e.tone===S?"rgba(31,138,76,0.1)":"rgba(183,121,31,0.12)",color:e.tone},children:e.v})]},e.k)),(0,a.jsxs)(W,{children:[(0,a.jsx)("span",{className:"text-[10px]",style:{color:A},children:"Redlines drafted"}),(0,a.jsx)("span",{className:"ml-auto text-[9.5px]",style:{color:w},children:"3 routed to counsel"})]})]})})},operations:function(){return(0,a.jsx)(M,{tint:"linear-gradient(150deg,#fdeef1,#f6ccd6 46%,#fff2f5)",children:(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)(L,{icon:(0,a.jsx)(u.A,{className:"size-3",strokeWidth:2,style:{color:w}}),label:"Signals watched",tag:"live"}),D.map(e=>(0,a.jsxs)(R,{children:[(0,a.jsx)(i.PY1.span,{variants:N,className:"size-1.5 shrink-0 rounded-full",style:{background:e.tone}}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:w},children:e.k}),(0,a.jsx)("span",{className:"shrink-0 text-[9.5px]",style:{color:C},children:e.v})]},e.k)),(0,a.jsxs)(W,{children:[(0,a.jsx)("span",{className:"text-[10px]",style:{color:A},children:"Response packet"}),(0,a.jsx)("span",{className:"ml-auto text-[9.5px]",style:{color:w},children:"Runbook updated"})]})]})})},people:function(){return(0,a.jsx)(M,{tint:"linear-gradient(150deg,#e9f3f6,#c8e2ea 46%,#eef8fb)",children:(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)(L,{icon:(0,a.jsx)(b.A,{className:"size-3",strokeWidth:2,style:{color:w}}),label:"Staff engineer search",tag:"slate of 9"}),Q.map(e=>(0,a.jsx)(R,{tight:!0,children:(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-[2px]",children:[(0,a.jsxs)("span",{className:"flex items-baseline justify-between gap-2",children:[(0,a.jsx)("span",{className:"min-w-0 truncate text-[10px]",style:{color:w},children:e.k}),(0,a.jsx)("span",{className:"shrink-0 text-[9.5px] tabular-nums",style:{color:C},children:e.v})]}),(0,a.jsx)(I,{pct:e.pct,color:"#3B7EA1"})]})},e.k)),(0,a.jsxs)(W,{children:[(0,a.jsx)("span",{className:"text-[10px]",style:{color:A},children:"Scorecards attached"}),(0,a.jsx)(T,{})]})]})})},product:function(){return(0,a.jsx)(M,{tint:"linear-gradient(150deg,#edf1f6,#cfd9e6 46%,#f3f6fa)",children:(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)(L,{icon:(0,a.jsx)(p.A,{className:"size-3",strokeWidth:2,style:{color:w}}),label:"Draft PRD",tag:"v3"}),G.map(e=>(0,a.jsxs)(R,{children:[(0,a.jsx)("span",{className:"w-[76px] shrink-0 whitespace-nowrap text-[9.5px]",style:{color:C},children:e.k}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:w},children:e.v})]},e.k)),(0,a.jsxs)(W,{children:[(0,a.jsx)("span",{className:"text-[10px]",style:{color:A},children:"Published after review"}),(0,a.jsx)(T,{})]})]})})}};function V(e){let{id:t}=e,n=H[t];return n?(0,a.jsx)(o.x,{reducedMotion:"user",children:(0,a.jsx)(n,{})}):null}let Y=[{id:"engineering",businessLine:"Engineering",title:"Ship the backlog you shelved",description:"The tickets that never made the sprint. Opulent scopes each one, runs parallel agents, tests the change, and opens the PR.",imageUrl:"/assets/opulent-frames/workbench-code.webp",imageAlt:"Opulent Workbench with a reviewed code change",href:"/use-cases/migrate-50-files-from-rest-to-graphql/"},{id:"revops",businessLine:"RevOps",title:"Repair the whole pipeline, not the top of it",description:"Missing next steps, stale close dates, fields nobody updated. Opulent repairs them in HubSpot and reads the record back.",imageUrl:"/assets/opulent-frames/agent-builder.webp",imageAlt:"Opulent Agent Builder configuring a pipeline repair workflow",href:"/use-cases/self-evolving-pipeline-operations/"},{id:"customer-success",businessLine:"Customer Success",title:"See the renewal risk before the renewal",description:"Account signals, open tickets, and roadmap asks become a renewal risk call and the next action.",imageUrl:"/assets/opulent-frames/new-task.webp",imageAlt:"Assigning an account review to Opulent",href:"/use-cases/customer-health-summaries-in-slack/"},{id:"finance",businessLine:"Finance",title:"Close with every exception already chased",description:"Three-way match, variance checks, exceptions held and routed, close packet with the audit trail.",imageUrl:"/assets/opulent-frames/automated.webp",imageAlt:"Opulent automations running recurring finance work",href:"/use-cases/procurement-as-a-governed-agent-run/"},{id:"marketing",businessLine:"Marketing",title:"Every launch fully shipped",de
1scription:"A launch brief becomes assets, a landing page, and a campaign. The playbook updates after review.",imageUrl:"/assets/opulent-frames/new-task.webp",imageAlt:"Assigning a launch workflow to Opulent",href:"/use-cases/"},{id:"legal",businessLine:"Legal",title:"Read every contract, not a sample",description:"Contracts checked against your playbook, redlines drafted, deviations listed, exceptions routed to counsel.",imageUrl:"/assets/opulent-frames/workbench-files.webp",imageAlt:"Opulent Workbench organizing contract review files",href:"/use-cases/"},{id:"operations",businessLine:"Operations",title:"Catch the signal before it becomes a fire",description:"Vendor, inventory, and delivery signals become a response packet and an updated runbook.",imageUrl:"/assets/opulent-frames/automated.webp",imageAlt:"Opulent automations watching operational signals",href:"/use-cases/antifragile-deployments/"},{id:"people",businessLine:"People",title:"Hire from the whole market",description:"Sourced candidates, interview packets, scorecards, and hiring rules that sharpen the next search.",imageUrl:"/assets/opulent-frames/workbench-files.webp",imageAlt:"Opulent Workbench holding candidate dossiers",href:"/use-cases/"},{id:"product",businessLine:"Product",title:"Every customer signal lands in the spec",description:"Customer signals become PRDs, dependencies tracked, open questions logged, reviewed spec published.",imageUrl:"/assets/opulent-frames/integrations.webp",imageAlt:"Opulent integrations feeding customer signals into specs",href:"/use-cases/"}];function U(e){let{useCase:t}=e;return(0,a.jsxs)(i.PY1.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.2},transition:{duration:.32,ease:[.16,1,.3,1]},className:"group flex h-full flex-col rounded-xl border border-transparent bg-[#F7F7F7] p-2 transition-colors duration-300 hover:border-black/5",children:[(0,a.jsx)("div",{role:"img","aria-label":t.imageAlt,className:"relative mb-4 aspect-[16/9] min-h-[15rem] w-full overflow-hidden rounded-sm bg-white shadow-[inset_0_0_0_1px_rgba(0,0,0,0.1)] transition-transform duration-200 ease-out group-hover:scale-[1.015]",children:(0,a.jsx)(V,{id:t.id})}),(0,a.jsxs)("div",{className:"flex flex-grow flex-col px-3 pb-4",children:[(0,a.jsx)("p",{className:"mb-2 font-mono text-[10px] uppercase tracking-[0.14em] text-[#777]",children:t.businessLine}),(0,a.jsx)("h3",{className:"mb-2 text-xl font-medium tracking-tight text-[#1A1A1A]",children:t.title}),(0,a.jsx)("p",{className:"mb-6 flex-grow text-sm leading-relaxed text-[#666666]",children:t.description}),(0,a.jsx)("div",{className:"mt-auto",children:(0,a.jsxs)(l(),{href:t.href,className:"inline-flex items-center justify-center gap-2 rounded-full bg-[#E5E5E5] px-6 py-2.5 text-sm font-medium text-[#1A1A1A] transition-[background-color,transform] duration-200 hover:bg-[#D4D4D4] active:scale-[0.96]",children:["View workflow",(0,a.jsx)(r.A,{className:"h-4 w-4 text-[#1A1A1A]"})]})})]})]})}function J(){return(0,a.jsx)("section",{className:"w-full bg-white px-4 py-16 md:px-8",children:(0,a.jsxs)("div",{className:"mx-auto max-w-7xl",children:[(0,a.jsxs)("div",{className:"mb-12 flex flex-col gap-5 max-md:mb-9",children:[(0,a.jsx)("span",{className:"block font-mono text-xs uppercase leading-[1.0625rem] tracking-[0.36px] text-primary",children:"A worker for every team"}),(0,a.jsx)("h2",{className:"block max-w-[38rem] text-[2.5rem] leading-[1.05] tracking-[-1px] text-color-001 max-md:text-[2rem]",children:"Capacity you can't hire for."}),(0,a.jsx)("p",{className:"block max-w-xl text-sm leading-6 text-color-002",children:"Same loop, nine more places it applies. Each one carries a whole process chain, from intake through execution to the report at the end."})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 md:gap-6 lg:grid-cols-3",children:Y.map(e=>(0,a.jsx)(U,{useCase:e},e.id))})]})})}},64269:(e,t,n)=>{"use strict";n.d(t,{cn:()=>l});var a=n(2821),s=n(75889);function l(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.QP)((0,a.$)(t))}},78008:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,52619,23)),Promise.resolve().then(n.t.bind(n,81356,23)),Promise.resolve().then(n.bind(n,24019)),Promise.resolve().then(n.bind(n,80747)),Promise.resolve().then(n.bind(n,34807)),Promise.resolve().then(n.bind(n,78836)),Promise.resolve().then(n.bind(n,78938))},78836:(e,t,n)=>{"use strict";n.d(t,{default:()=>T});var a=n(95155),s=n(9289),l=n(12115),r=n(64269);let i=l.memo(s.Bl),o=l.memo(e=>{let{children:t,className:n,...s}=e;return(0,a.jsxs)("div",{className:(0,r.cn)("relative flex min-h-0 flex-1 flex-col overflow-hidden",n),style:{backgroundColor:"#f2f2ef"},...s,children:[(0,a.jsx)(i,{className:"pointer-events-none absolute inset-0 z-0",colors:["#f7f7f4","#d9dbe0","#fcfcfa","#c7ccd3"],distortion:.16,height:720,proportion:.3,shape:"checks",shapeScale:.13,softness:.92,speed:.28,style:{width:"100%",height:"100%"},swirl:.42,swirlIterations:8,width:1280}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 z-[1] bg-[rgba(255,255,255,0.3)]"}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 z-[2] bg-[radial-gradient(circle_at_top,rgba(255,255,255,0.18),transparent_48%),radial-gradient(circle_at_bottom_right,rgba(214,217,222,0.26),transparent_42%)]"}),(0,a.jsx)("div",{className:"relative z-10 flex min-h-0 flex-1 flex-col",children:t})]})});o.displayName="WarpBackdrop";var c=n(61306),d=n(46537),u=n(37586),p=n(47937),m=n(87759),x=n(27937),h=n(24033),f=n(55412),g=n(86651),b=n(6191),v=n(89715),j=n(39142),y=n(28150),k=n(75426),N=n(39867);let w=["Reconcile July invoices against the ledger and flag every mismatch","Chase the six vendors who still owe signed renew
1al forms","Clear the overnight queue and route what needs a person"],A=[{icon:d.A,label:"Runs",active:!0},{icon:u.A,label:"Ask"},{icon:p.A,label:"Playbooks"},{icon:m.A,label:"Review"}],C=[{title:"Match July invoices to PO and receipt",meta:"1 hour ago",tag:"6 held",active:!0},{title:"Score and enrich inbound accounts",meta:"2 hours ago",tag:"12 verified"},{title:"Map the market for two open roles",meta:"4 hours ago",tag:"1 slate"}],S=[{label:"Thought",detail:"6s",body:"Three-way match before tolerance. Pull the invoice, its purchase order, and the goods receipt, then compare quantity and price separately so a quantity break does not read as a price break."},{label:"Read",detail:"vendor-master \xb7 1,204 rows"},{label:"Explored",detail:"412 invoices, 3 systems"},{label:"Ran checks",detail:"4 of 4 passed"}],P=[{id:"INV-8841",invoice:"$12,480.00",po:"$12,000.00",variance:"+4.0%"},{id:"INV-8907",invoice:"$3,120.00",po:"$3,000.00",variance:"+4.0%"}];function _(e){let{step:t,index:n}=e,[s,r]=(0,l.useState)(0===n),i=!!t.body;return(0,a.jsxs)(c.PY1.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:.05*n,duration:.4,ease:"easeOut"},className:"flex min-w-0 flex-col",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>i&&r(e=>!e),"aria-expanded":i?s:void 0,className:"flex min-h-7 items-center gap-2 text-left text-[13px] text-color-002 transition-opacity hover:opacity-65",children:[(0,a.jsx)(x.A,{"aria-hidden":"true",strokeWidth:2,className:"size-3.5 shrink-0 transition-transform duration-200 ".concat(i&&s?"rotate-90":""," ").concat(i?"":"opacity-0")}),(0,a.jsx)("span",{className:"shrink-0 font-medium",children:t.label}),(0,a.jsx)("span",{className:"truncate tabular-nums text-color-002/70",children:t.detail})]}),i&&s?(0,a.jsx)("p",{className:"ml-[1.4rem] border-l border-border pl-3 text-[13px] leading-[1.45rem] text-color-002",children:t.body}):null]})}function M(){let e=function(e,t,n){let[a,s]=(0,l.useState)(t),r=(0,l.useRef)({job:0,char:0,deleting:!1});return(0,l.useEffect)(()=>{let a;if(n||0===e.length)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return void s(t);let l=()=>{let t=r.current,n=e[t.job];t.deleting?(t.char-=1,s(n.slice(0,t.char)),t.char<=0?(t.deleting=!1,t.job=(t.job+1)%e.length,a=setTimeout(l,500)):a=setTimeout(l,22)):(t.char+=1,s(n.slice(0,t.char)),t.char>=n.length?(t.deleting=!0,a=setTimeout(l,2400)):a=setTimeout(l,45))};return a=setTimeout(l,500),()=>clearTimeout(a)},[e,t,n]),a}(w,"Assign a job with a clear finish",!1);return(0,a.jsx)("div",{className:"flex h-full w-full flex-col overflow-hidden bg-surface text-left",children:(0,a.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,a.jsxs)("aside",{className:"hidden w-[232px] shrink-0 flex-col border-r border-border bg-surface-4 lg:flex",children:[(0,a.jsxs)("div",{className:"flex h-14 shrink-0 items-center gap-2 px-4",children:[(0,a.jsx)("span",{"aria-hidden":"true",className:"block size-4 shrink-0 rounded-[4px] bg-color-001"}),(0,a.jsx)("span",{className:"text-[14px] font-medium text-color-001",children:"Opulent"}),(0,a.jsx)(h.A,{"aria-hidden":"true",className:"size-3.5 text-color-002",strokeWidth:2}),(0,a.jsx)(f.A,{"aria-hidden":"true",className:"ml-auto size-4 text-color-002",strokeWidth:1.8})]}),(0,a.jsx)("div",{className:"flex flex-col gap-0.5 px-2.5",children:A.map(e=>{let{icon:t,label:n,active:s}=e;return(0,a.jsxs)("span",{className:"flex items-center gap-2.5 rounded-md px-2.5 py-1.5 text-[13px] ".concat(s?"bg-surface-2/70 text-color-001":"text-color-002"),children:[(0,a.jsx)(t,{"aria-hidden":"true",className:"size-4 shrink-0",strokeWidth:1.8}),n]},n)})}),(0,a.jsxs)("div",{className:"mt-6 flex items-center gap-2 px-4",children:[(0,a.jsx)("span",{className:"text-[13px] text-color-002",children:"Recent"}),(0,a.jsxs)("span",{className:"ml-auto flex items-center gap-2 text-color-002",children:[(0,a.jsx)(g.A,{"aria-hidden":"true",className:"size-3.5",strokeWidth:1.8}),(0,a.jsx)(b.A,{"aria-hidden":"true",className:"size-3.5",strokeWidth:1.8})]})]}),(0,a.jsx)("div",{className:"mt-1.5 flex flex-col gap-0.5 overflow-hidden px-2.5",children:C.map(e=>(0,a.jsxs)("span",{className:"flex flex-col gap-1 rounded-md px-2.5 py-2 ".concat(e.active?"bg-surface-2/70":""),children:[(0,a.jsx)("span",{className:"line-clamp-1 text-[13px] leading-5 text-color-001",children:e.title}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] leading-4 text-color-002",children:[e.meta,(0,a.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,a.jsx)("span",{className:"rounded-[4px] bg-surface-2 px-1.5 py-px font-mono text-[10px] tracking-[0.24px]",children:e.tag})]})]},e.title))})]}),(0,a.jsxs)("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"flex h-14 shrink-0 items-center gap-2.5 border-b border-border px-5",children:[(0,a.jsx)("span",{className:"text-[13px] text-color-002",children:"Finance Operations"}),(0,a.jsx)(h.A,{"aria-hidden":"true",className:"size-3.5 text-color-002",strokeWidth:2}),(0,a.jsx)("span",{"aria-hidden":"true",className:"h-4 w-px bg-border"}),(0,a.jsx)("span",{className:"truncate text-[13px] font-medium text-color-001",children:"July invoice match"})]}),(0,a.jsxs)("div",{className:"min-h-0 flex-1 overflow-hidden px-5 pt-5",children:[(0,a.jsxs)(c.PY1.div,{initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},className:"flex items-start gap-3",children:[(0,a.jsx)("p",{className:"flex-1 rounded-xl bg-surface-2/60 px-4 py-2.5 text-[13.5px] leading-[1.45rem] text-color-001",children:"Match every July invoice to its PO and receipt. Hold anything outside tolerance."}),(0,a.jsx)("span",{"aria-hidden":"true",className:"mt-0.5 block size-8 shrink-0 rounded-full border border-border bg-surface-2"})]}),(0,a.jsxs)("div",{className:"mt-4 flex items-center gap-2 text-[13px] text-color-002",children:[(0,a.jsx)(x.A,{"aria-hidden":"true",className:"size-3.5",strokeWidth:2}),(0,a.jsx)(p.A,{"aria-hidden":"true",className:"size-3.5",strokeWidth:1.8}),(0,a.jsx)("span",{children:"Used playbook: Invoice tolerance"})]}),(0,a.jsx)("p",{className:"mt-4 text-[13.5px] leading-[1.45rem] text-color-001",children:"I'll match all 412 July invoices against their purchase orders and goods receipts, then hold anything outside your two percent tolerance. Starting now."}),(0,a.jsxs)("div",{className:"mt-4 flex items-center gap-2 text-[13px] text-color-002",children:[(0,a.jsx)(h.A,{"aria-hidden":"true",className:"size-3.5",strokeWidth:2}),(0,a.jsx)("span",{className:"font-medium",children:"Worked for 12m 04s"}),(0,a.jsx)("span",{className:"font-mono text-[12px] text-color-002/80",children:"412 matched \xb7 6 held"})]}),(0,a.jsx)("div",{className:"mt-2 flex flex-col gap-0.5 pl-1.5",children:S.map((e,t)=>(0,a.jsx)(_,{step:e,index:t},e.label+t))}),(0,a.jsx)("div",{className:"mt-4 flex flex-col gap-2",children:P.map(e=>(0,a.jsxs)(c.PY1.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.3,duration:.4,ease:"easeOut"},className:"rounded-lg border border-border bg-surface p-3",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"rounded-[4px] bg-color-001 px-1.5 py-0.5 font-mono text-[10px] uppercase leading-4 tracking-[0.24px] text-surface",children:"held"}),(0,a.jsx)("span",{className:"text-[13px] font-medium text-color-001",children:e.id}),(0,a.jsx)("span",{className:"ml-auto font-mono text-[12px] tabular-nums text-color-001",children:e.variance})]}),(0,a.jsxs)("span",{className:"mt-2 flex items-center gap-2 font-mono text-[11.5px] text-color-002",children:[(0,a.jsx)("span",{className:"rounded bg-surface-2/70 px-1.5 py-0.5 tabular-nums",children:e.invoice}),(0,a.jsx)("span",{"aria-hidden":"true",children:"against"}),(0,a.jsx)("span",{className:"rounded bg-surface-2/70 px-1.5 py-0.5 tabular-nums",children:e.po})]})]},e.id))}),(0,a.jsx)("p",{className:"mt-4 text-[13.5px] leading-[1.45rem] text-color-001",children:"Done. 412 matched, six held on price, none on quantity. Full report attached."}),(0,a.jsxs)("span",{className:"mt-3 inline-flex items-center gap-2 rounded-md border border-border bg-surface px-2.5 py-1.5 text-[12.5px] text-color-001",children:[(0,a.jsx)(v.A,{"aria-hidden":"true",className:"size-3.5 text-color-002",strokeWidth:1.8}),"invoice-exceptions-july.md"]}),(0,a.jsxs)("span",{className:"mt-4 flex items-center gap-2 text-[13px] text-color-002",children:[(0,a.jsx)("span",{"aria-hidden":"true",className:"block size-3.5 rounded-[4px] bg-color-001"}
1),"Opulent is waiting on your decision"]})]}),(0,a.jsx)("div",{className:"shrink-0 px-5 pb-5 pt-3",children:(0,a.jsxs)("div",{className:"rounded-xl border border-border bg-surface px-4 py-3",children:[(0,a.jsx)("span",{className:"block min-h-6 text-[13.5px] leading-6 text-color-002",children:e}),(0,a.jsxs)("span",{className:"mt-4 flex items-center",children:[(0,a.jsx)(b.A,{"aria-hidden":"true",className:"size-4 text-color-002",strokeWidth:1.8}),(0,a.jsx)(j.A,{"aria-hidden":"true",className:"ml-auto size-4 text-color-002",strokeWidth:1.8})]})]})})]}),(0,a.jsxs)("aside",{className:"hidden w-[368px] shrink-0 flex-col border-l border-border bg-surface-4 md:flex",children:[(0,a.jsxs)("div",{className:"flex h-14 shrink-0 items-center gap-2 border-b border-border px-4",children:[(0,a.jsx)("span",{className:"truncate font-mono text-[12.5px] text-color-001",children:"invoice-exceptions-july.md"}),(0,a.jsxs)("span",{className:"ml-auto flex items-center gap-2.5 text-color-002",children:[(0,a.jsx)(y.A,{"aria-hidden":"true",className:"size-3.5",strokeWidth:1.8}),(0,a.jsx)(k.A,{"aria-hidden":"true",className:"size-3.5",strokeWidth:1.8}),(0,a.jsx)(N.A,{"aria-hidden":"true",className:"size-3.5",strokeWidth:1.8})]})]}),(0,a.jsxs)("div",{className:"min-h-0 flex-1 overflow-hidden px-5 py-4",children:[(0,a.jsx)("p",{className:"text-[17px] font-medium leading-6 tracking-[-0.02em] text-color-001",children:"Exception Report: July Invoice Match"}),(0,a.jsxs)("p",{className:"mt-3 text-[12.5px] leading-5 text-color-002",children:[(0,a.jsx)("span",{className:"font-medium text-color-001",children:"Held:"})," ",(0,a.jsx)("span",{className:"text-primary",children:"INV-8841"})," | ",(0,a.jsx)("span",{className:"text-primary",children:"INV-8907"})," +4 more"]}),(0,a.jsxs)("p",{className:"mt-3 text-[12.5px] leading-5 text-color-002",children:["All 412 July invoices matched to"," ",(0,a.jsx)("span",{className:"rounded bg-surface-2/70 px-1 font-mono text-[11.5px] text-color-001",children:"purchase_order"})," ","and"," ",(0,a.jsx)("span",{className:"rounded bg-surface-2/70 px-1 font-mono text-[11.5px] text-color-001",children:"goods_receipt"}),". Six held on price tolerance, routed with the match attached."]}),(0,a.jsx)("p",{className:"mt-5 text-[13px] font-medium text-color-001",children:"INV-8841"}),(0,a.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-3 rounded-lg border border-border bg-surface p-3",children:[(0,a.jsxs)("span",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] leading-4 text-color-002",children:"Invoice received"}),(0,a.jsx)("span",{className:"rounded-md border border-border bg-surface-4 px-2 py-3 text-center font-mono text-[13.5px] font-medium tabular-nums text-color-001",children:"$12,480.00"}),(0,a.jsx)("span",{className:"text-[11px] leading-4 text-color-002",children:"Source \xb7 AP inbox"})]}),(0,a.jsxs)("span",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] leading-4 text-color-002",children:"Purchase order"}),(0,a.jsx)("span",{className:"rounded-md border border-border bg-surface-4 px-2 py-3 text-center font-mono text-[13.5px] font-medium tabular-nums text-color-001",children:"$12,000.00"}),(0,a.jsx)("span",{className:"text-[11px] leading-4 text-color-002",children:"Source \xb7 ERP"})]})]}),(0,a.jsxs)("div",{className:"mt-3 rounded-lg border border-border bg-surface p-3",children:[(0,a.jsxs)("span",{className:"flex items-baseline justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-[12.5px] text-color-002",children:"Quantity"}),(0,a.jsx)("span",{className:"font-mono text-[11.5px] tabular-nums text-color-001",children:"240 of 240 matched"})]}),(0,a.jsxs)("span",{className:"mt-1.5 flex items-baseline justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-[12.5px] text-color-002",children:"Price variance"}),(0,a.jsx)("span",{className:"font-mono text-[11.5px] font-medium tabular-nums text-color-001",children:"+$480.00 \xb7 4.0%"})]}),(0,a.jsxs)("span",{className:"mt-1.5 flex items-baseline justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-[12.5px] text-color-002",children:"Tolerance"}),(0,a.jsx)("span",{className:"font-mono text-[11.5px] tabular-nums text-color-002",children:"2.0%"})]}),(0,a.jsx)("span",{className:"mt-2.5 block border-t border-border pt-2.5 text-[12.5px] leading-5 text-color-001",children:"Quantity matched. Price did not. Awaiting your decision."})]}),(0,a.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,a.jsx)("span",{className:"rounded-xs bg-color-001 px-3 py-1.5 text-[12.5px] text-surface",children:"Approve"}),(0,a.jsx)("span",{className:"rounded-xs border border-border px-3 py-1.5 text-[12.5px] text-color-002",children:"Dispute"})]})]})]})]})})}function L(){return(0,a.jsx)(c.PY1.figure,{initial:{opacity:0,y:26,scale:.985}
1,animate:{opacity:1,y:0,scale:1},transition:{duration:.85,delay:.34,ease:R},className:"mx-auto h-full w-full overflow-hidden rounded-[16px] shadow-[0_24px_60px_-32px_rgba(25,25,25,0.18)]",children:(0,a.jsx)(o,{className:"h-full min-h-0 w-full rounded-[16px] border border-[rgba(226,232,240,0.78)] p-2",children:(0,a.jsx)("div",{className:"h-full w-full overflow-hidden rounded-xl border border-border shadow-[0_1px_2px_rgba(25,25,25,0.04)]",children:(0,a.jsx)(M,{})})})})}let R=[.16,1,.3,1],W={hidden:{opacity:0,y:14},show:e=>({opacity:1,y:0,transition:{duration:.55,delay:.08*e,ease:R}})};function T(){return(0,a.jsxs)("section",{className:"mx-auto flex w-full max-w-360 flex-col gap-12 px-20 pt-4 max-md:px-5 md:max-lg:px-10 2xl:px-15","data-cid":"n43",children:[(0,a.jsxs)("div",{className:"flex w-full flex-col gap-8","data-cid":"n44",children:[(0,a.jsx)(c.PY1.h1,{variants:W,initial:"hidden",animate:"show",custom:0,className:"block max-w-[44rem] text-balance text-[4rem] leading-[1.02] tracking-[-0.05em] max-md:text-[2.5rem] max-md:leading-10.5 md:max-lg:text-[3.25rem] md:max-lg:leading-[1.05]","data-cid":"n45","data-component":"heading",children:"Opulent, the Autonomous Knowledge Worker"}),(0,a.jsxs)("div",{className:"flex w-full items-end justify-between gap-12 max-lg:flex-col max-lg:items-start max-lg:gap-6",children:[(0,a.jsx)("div",{className:"flex max-w-[37.4375rem] flex-col gap-3",children:(0,a.jsx)(c.PY1.p,{variants:W,initial:"hidden",animate:"show",custom:1,className:"block w-full leading-[1.375rem] text-color-002","data-cid":"n46",children:"Give it a whole job in the systems you already run. It comes back finished, evidence attached."})}),(0,a.jsxs)(c.PY1.div,{variants:W,initial:"hidden",animate:"show",custom:2,className:"flex shrink-0 items-center gap-5","data-cid":"n47",children:[(0,a.jsx)("a",{className:"flex h-[2.1875rem] items-center justify-center rounded-xs bg-color-001 px-3 text-surface transition-transform hover:opacity-80 active:scale-[0.96]","data-cid":"n48","data-component":"link",href:"https://platform.opulentia.ai",rel:"noopener noreferrer",target:"_blank",children:(0,a.jsx)("span",{className:"block relative","data-cid":"n49",children:"Try Opulent"})}),(0,a.jsx)("a",{className:"text-color-002 underline-offset-4 transition-colors hover:text-color-001 hover:underline","data-component":"link",href:"/contact/",children:"Contact sales"})]})]})]}),(0,a.jsx)("div",{className:"relative -mb-14 flex w-full justify-center pt-2 max-md:-mb-8","data-cid":"n50",children:(0,a.jsxs)("div",{className:"relative h-[54rem] w-[min(100%,84rem)] cursor-default overflow-hidden rounded-[16px] rounded-b-none border border-b-0 border-border bg-surface-4 shadow-[var(--border)_0px_10px_15px_-3px,var(--color-005)_0px_-1px_6px_-2px] max-md:h-[34rem] max-md:w-full","data-cid":"n51",children:[(0,a.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-10 block h-72 bg-[linear-gradient(to_bottom,transparent_0%,var(--background)_92%)] max-md:h-40"}),(0,a.jsx)("div",{className:"block h-full overflow-hidden rounded-[inherit] bg-surface-4","data-cid":"n52",children:(0,a.jsx)("div",{className:"flex h-full items-center justify-center overflow-hidden rounded-[inherit] bg-surface","data-cid":"n53",children:(0,a.jsx)(L,{})})})]})})]})}},78938:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var a=n(95155),s=n(12115),l=n(26497),r=n(1206);function i(e){let{cid:t}=e;return(0,a.jsx)("svg",{className:"w-auto h-4 block overflow-hidden align-middle focus:outline-clr-5 focus:[outline-style:auto] focus:outline-[5px]","data-component":"icon","aria-hidden":"true",fill:"none",height:"16px",viewBox:"0 0 24 24",width:"16px",xmlns:"http://www.w3.org/2000/svg","data-cid":t,children:(0,a.jsx)("path",{d:"M7.451 7.065 C 7.067 7.255,6.906 7.655,7.061 8.031 C 7.104 8.134,7.718 8.775,9.031 10.090 L 10.940 12.000 9.031 13.910 C 7.718 15.225,7.104 15.866,7.061 15.969 C 6.943 16.256,6.994 16.524,7.212 16.755 C 7.441 16.996,7.734 17.062,8.031 16.939 C 8.134 16.896,8.775 16.282,10.090 14.969 L 12.000 13.060 13.910 14.969 C 15.225 16.282,15.866 16.896,15.969 16.939 C 16.266 17.062,16.559 16.996,16.788 16.755 C 17.006 16.524,17.057 16.256,16.939 15.969 C 16.896 15.866,16.282 15.225,14.969 13.910 L 13.060 12.000 14.969 10.090 C 16.282 8.775,16.896 8.134,16.939 8.031 C 17.015 7.847,17.017 7.638,16.945 7.466 C 16.862 7.267,16.583 7.048,16.371 7.017 C 15.980 6.958,16.031 6.916,13.930 9.013 L 12.000 10.939 10.090 9.031 C 8.775 7.718,8.134 7.104,8.031 7.061 C 7.841 6.983,7.615 6.984,7.451 7.065 ",stroke:"none",fillRule:"evenodd",fill:"currentColor"})})}function o(e){let{cid:t}=e;return(0,a.jsx)("img",{className:"w-7 h-7 block shrink-0 overflow-hidden rounded-full align-middle focus:outline-clr-5 focus:[outline-style:auto] focus:outline-[5px]","data-component":"icon",alt:"Opulent",height:28,width:28,src:"/logo/mark.svg","data-cid":t})}let c=[{href:"https://platform.opulentia.ai",label:"Product",external:!0},{href:"/use-cases/",label:"Use cases",external:!1},{href:"/docs/",label:"Docs",external:!1},{href:"/blog/",label:"Blog",external:!1}],d=[{href:"/contact/",label:"Contact sales",external:!1,variant:"text"},{href:"https://platform.opulentia.ai",label:"Platform",external:!0,variant:"outline"},{href:"https://platform.opulentia.ai",label:"Log in",external:!0,variant:"solid"}];
1function u(){let[e,t]=(0,s.useState)(!0),[n,u]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"===e.key&&u(!1)};return document.addEventListener("keydown",e),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=""}},[n]),(0,a.jsxs)("nav",{className:"block fixed top-0 inset-x-0 z-1000 bg-background ".concat(e?"h-[95.1px] max-lg:h-[100.5px]":"h-[4.1625rem] max-lg:h-18"),"data-cid":"n2","data-component":"nav",children:[(0,a.jsx)(l.N,{initial:!1,children:e?(0,a.jsx)(r.P.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"overflow-hidden","data-cid":"n3",children:(0,a.jsxs)("div",{className:"h-[28.5px] flex relative py-2.5 pr-10 pl-4 justify-center items-center text-center bg-clr-0 w-full","data-cid":"n4",children:[(0,a.jsxs)("a",{className:"h-[8.5px] flex justify-center items-center cursor-pointer hover:opacity-[0.901659] focus:opacity-[0.999613]","data-cid":"n5","data-component":"link",href:"/blog/autonomous-earning-through-information-asymmetry/",children:[(0,a.jsx)("span",{className:"h-[8.5px] block text-surface font-mono text-xs font-medium leading-3 tracking-[0.24px] uppercase max-md:hidden","data-cid":"n6",children:"Your projects got better while you slept. See how â"}),(0,a.jsx)("span",{className:"hidden min-w-0 text-surface font-mono text-xs font-medium leading-3 tracking-[0.24px] uppercase max-md:h-[8.5px] max-md:block","data-cid":"n7",children:"Work while you sleep â"})]}),(0,a.jsx)("button",{className:"w-6 h-6 flex absolute top-[14.3px] right-2.5 opacity-70 min-w-0 p-1 justify-center items-center text-surface [translate:0px_-50%] cursor-pointer hover:opacity-[0.994994] focus:opacity-[0.704757] active:scale-[0.96] transition-transform before:absolute before:-inset-2 before:content-['']","data-cid":"n8","data-component":"button","aria-label":"Dismiss banner",type:"button",onClick:()=>t(!1),children:(0,a.jsx)(i,{cid:"n9"})})]})},"banner"):null}),(0,a.jsxs)("div",{className:"h-[4.1625rem] flex max-w-360 py-4.5 px-12 justify-between items-center mx-auto max-lg:h-18 max-md:px-5 md:max-lg:px-10 2xl:px-15","data-cid":"n10",children:[(0,a.jsxs)("div",{className:"w-[31.5625rem] flex min-w-0 items-center gap-5 max-lg:w-auto 2xl:w-[32.8125rem] 2xl:gap-10","data-cid":"n11",children:[(0,a.jsx)("a",{className:"h-7 flex items-center shrink-0 cursor-pointer","data-cid":"n12","data-component":"link","aria-label":"Opulent home",href:"/",children:(0,a.jsx)(o,{cid:"n13"})}),(0,a.jsx)("nav",{className:"block max-lg:hidden","data-cid":"n14","data-component":"nav",children:(0,a.jsx)("ul",{className:"flex items-center [list-style-type:none] list-outside","data-cid":"n15",children:c.map(e=>(0,a.jsx)("li",{className:"list-item",children:(0,a.jsx)("a",{className:"flex pt-1.5 pb-[0.3125rem] px-3 rounded-full items-center text-color-001 text-sm leading-[1.25rem] whitespace-nowrap text-nowrap cursor-pointer h-[1.6875rem] hover:bg-color-005","data-component":"link",href:e.href,...e.external?{rel:"noopener noreferrer",target:"_blank"}:{},children:e.label})},e.label))})})]}),(0,a.jsx)("div",{className:"h-[1.9125rem] flex items-center shrink-0 gap-1.5 max-lg:hidden","data-cid":"n35",children:d.map(e=>"text"===e.variant?(0,a.jsx)("a",{className:"block px-2 text-sm leading-[1.25rem] whitespace-nowrap text-nowrap text-color-001 cursor-pointer hover:opacity-70","data-component":"link",href:e.href,...e.external?{rel:"noopener noreferrer",target:"_blank"}:{},children:e.label},e.label):"outline"===e.variant?(0,a.jsx)("a",{className:"h-[1.9125rem] border border-solid border-color-001 flex pt-[0.3125rem] pb-1 px-[0.6875rem] rounded-xs justify-center items-center text-sm leading-[1.25rem] whitespace-nowrap text-nowrap text-color-001 cursor-pointer hover:opacity-80 active:scale-[0.96] transition-transform","data-component":"button",href:e.href,...e.external?{rel:"noopener noreferrer",target:"_blank"}:{},children:e.label},e.label):(0,a.jsx)("a",{className:"h-[1.9125rem] flex pt-1.5 pb-[0.3125rem] px-3 rounded-xs justify-center items-center text-sm leading-[1.25rem] whitespace-nowrap text-nowrap text-surface bg-color-001 cursor-pointer hover:opacity-80 active:scale-[0.96] transition-transform","data-component":"button",href:e.href,...e.external?{rel:"noopener noreferrer",target:"_blank"}:{},children:e.label},e.label))}),(0,a.jsxs)("button",{className:"hidden min-w-0 ml-auto flex-col justify-center items-center gap-1.5 text-center cursor-pointer size-10 max-lg:flex active:scale-[0.96] transition-transform","data-cid":"n39",type:"button","aria-label":"Toggle menu","aria-expanded":n,"aria-controls":"mobile-nav-panel",onClick:()=>u(e=>!e),children:[(0,a.jsx)("span",{className:"block bg-color-001 w-[1.125rem] h-[1.5px] transition-transform ".concat(n?"translate-y-[3px] rotate-45":""),"data-cid":"n40"}),(0,a.jsx)("span",{className:"block bg-color-001 w-[1.125rem] h-[1.5px] transition-transform ".concat(n?"-translate-y-[3px] -rotate-45":""),"data-cid":"n41"})]})]}),(0,a.jsx)(l.N,{initial:!1,children:n?(0,a.jsx)(r.P.div,{id:"mobile-nav-panel",initial:{opacity:0,y:-8}
1,animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.18,ease:"easeOut"},className:"absolute inset-x-0 top-full bg-background shadow-[0_12px_28px_rgba(0,0,0,0.08)] lg:hidden",children:(0,a.jsxs)("div",{className:"flex flex-col gap-1 px-5 py-4 max-w-360 mx-auto md:px-10",children:[c.map(e=>(0,a.jsx)("a",{href:e.href,className:"rounded-xl px-3 py-3 text-color-001 text-base font-medium hover:bg-color-005",onClick:()=>u(!1),...e.external?{rel:"noopener noreferrer",target:"_blank"}:{},children:e.label},e.label)),(0,a.jsx)("div",{className:"my-2 h-px bg-border"}),d.map(e=>(0,a.jsx)("a",{href:e.href,className:"solid"===e.variant?"mt-1 rounded-xs bg-color-001 px-3 py-3 text-center text-sm font-medium text-surface active:scale-[0.96] transition-transform":"outline"===e.variant?"rounded-xs border border-solid border-color-001 px-3 py-3 text-center text-sm font-medium text-color-001 active:scale-[0.96] transition-transform":"rounded-xl px-3 py-3 text-color-001 text-base font-medium hover:bg-color-005",onClick:()=>u(!1),...e.external?{rel:"noopener noreferrer",target:"_blank"}:{},children:e.label},e.label))]})},"mobile-menu"):null})]})}},80747:(e,t,n)=>{"use strict";n.d(t,{SurfaceView:()=>E});var a=n(95155),s=n(61306),l=n(34220),r=n(37586),i=n(82063),o=n(29502),c=n(59240),d=n(85998),u=n(431),p=n(79451),m=n(5917),x=n(47937),h=n(99051),f=n(23664),g=n(39068);let b=[.16,1,.3,1],v={once:!0,amount:.2},j={hidden:{opacity:0,y:12},show:{opacity:1,y:0,transition:{duration:.42,ease:b,delayChildren:.1,staggerChildren:.06}}},y={hidden:{opacity:0,y:6},show:{opacity:1,y:0,transition:{duration:.3,ease:b}}},k={hidden:{opacity:0,scale:.72},show:{opacity:1,scale:1,transition:{type:"spring",stiffness:460,damping:22,delay:.12}}},N="#1A1A1A",w="#6B6B6B",A="#9A9A9A",C="#1F8A4C";function S(e){let{tint:t,children:n}=e;return(0,a.jsxs)("div",{className:"absolute inset-0 overflow-hidden rounded-[inherit]",children:[(0,a.jsx)("div",{className:"absolute inset-0",style:{background:t}}),(0,a.jsx)(s.PY1.div,{initial:"hidden",whileInView:"show",viewport:v,variants:j,className:"absolute inset-x-[5%] bottom-[3%] top-[5%] flex flex-col overflow-hidden rounded-xl border border-black/[0.07] bg-white shadow-[0_16px_36px_-22px_rgba(10,18,34,0.45)]",children:n})]})}function P(e){let{icon:t,label:n,tag:s}=e;return(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5 border-b border-black/[0.06] px-2.5 py-[5px]",children:[t,(0,a.jsx)("span",{className:"text-[10px] font-medium",style:{color:N},children:n}),s?(0,a.jsx)("span",{className:"ml-auto rounded bg-black/[0.05] px-1 py-px text-[9px] tabular-nums",style:{color:w},children:s}):null]})}function _(e){let{children:t,last:n}=e;return(0,a.jsx)(s.PY1.div,{variants:y,className:"flex shrink-0 items-center gap-1.5 px-2.5 py-[5px] ".concat(n?"":"border-b border-black/[0.04]"),children:t})}function M(e){let{children:t}=e;return(0,a.jsx)(s.PY1.div,{variants:y,className:"mt-auto flex shrink-0 items-center gap-1.5 border-t border-black/[0.06] px-2.5 py-[5px]",children:t})}let L={className:"size-3 shrink-0",strokeWidth:2,"aria-hidden":!0},R=[{icon:(0,a.jsx)(r.A,{...L,style:{color:N}}),k:"Slack message",v:"#ops-alerts"},{icon:(0,a.jsx)(i.A,{...L,style:{color:N}}),k:"Linear issue",v:"label added"},{icon:(0,a.jsx)(o.A,{...L,style:{color:N}}),k:"Schedule",v:"month end, 06:00"},{icon:(0,a.jsx)(c.A,{...L,style:{color:N}}),k:"Webhook",v:"pager, monitoring"}],W=[{step:"Read the ledger",model:"small",pct:22},{step:"Match and reconcile",model:"small",pct:30},{step:"Judge the exception",model:"frontier",pct:88}],T=[{k:"Ran twice",v:"prompt kept",state:"done"},{k:"Promoted to Knowledge",v:"retrieved on trigger",state:"done"},{k:"Written as a Skill",v:"SKILL.md, committed",state:"done"},{k:"Shared as a Playbook",v:"awaiting your approval",state:"gate"}],I=[{icon:(0,a.jsx)(r.A,{...L,style:{color:N}}),k:"Slack",v:"tag it in a thread"},{icon:(0,a.jsx)(i.A,{...L,style:{color:N}}),k:"Linear, Jira",v:"assign an issue"},{icon:(0,a.jsx)(f.A,{...L,style:{color:N}}),k:"Email",v:"forward the thread"},{icon:(0,a.jsx)(c.A,{...L,style:{color:N}}),k:"Webhook, API",v:"anything else"}],z={automations:function(){return(0,a.jsxs)(S,{tint:"linear-gradient(150deg,#eaf0ff,#cfe0fb 46%,#eef4ff)",children:[(0,a.jsx)(P,{icon:(0,a.jsx)(d.A,{...L,style:{color:N}}),label:"Triggers in use",tag:"or"}),R.map(e=>(0,a.jsxs)(_,{children:[e.icon,(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:N},children:e.k}),(0,a.jsx)("span",{className:"shrink-0 font-mono text-[9px]",style:{color:A},children:e.v})]},e.k)),(0,a.jsxs)(M,{children:[(0,a.jsx)("span",{className:"text-[10px]",style:{color:w},children:"Invocation cap"}),(0,a.jsx)("span",{className:"ml-auto font-mono text-[9.5px] tabular-nums",style:{color:N},children:"40 / hour"})]})]})},frontier:function(){return(0,a.jsxs)(S,{tint:"linear-gradient(150deg,#f0edff,#dcd6fb 46%,#f3f0ff)",children:[(0,a.jsx)(P,{icon:(0,a.jsx)(u.A,{...L,style:{color:N}}),label:"Routed by task",tag:"per step"}),W.map(e=>(0,a.jsx)(_,{children:(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsxs)("span",{className:"flex items-baseline gap-2",children:[(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:N},children:e.step}),(0,a.jsx)("span",{className:"shrink-0 rounded-[4px] px-1 font-mono text-[8.5px] uppercase leading-3",style:"frontier"===e.model?{background:N,color:"#fff"}:{border:"1px solid rgba(0,0,0,0.12)",color:w},children:e.model})]}),(0,a.jsx)("span",{className:"block h-[3px] w-full overflow-hidden rounded-full bg-black/[0.07]",children:(0,a.jsx)(s.PY1.span,{variants:{hidden:{scaleX:0},show:{scaleX:1,transition:{duration:.5,ease:b,delay:.08}}},className:"block h-full origin-left rounded-full",style:{width:"".concat(e.pct,"%"),background:"frontier"===e.model?N:"#B9B9B9"}})})]})},e.step)),(0,a.jsxs)(M,{children:[(0,a.jsx)("span",{className:"text-[10px]",style:{color:w},children:"Cost per run, as playbooks grow"}),(0,a.jsx)(s.PY1.span,{variants:k,className:"ml-auto font-mono text-[9.5px] tabular-nums",style:{color:C},children:"falling"})]})]})},"computer-use":function(){return(0,a.jsxs)(S,{tint:"linear-gradient(150deg,#e9f6f0,#c8e8da 46%,#eefaf4)",children:[(0,a.jsx)(P,{icon:(0,a.jsx)(p.A,{...L,style:{color:N}}),label:"vendor-portal.example.gov",tag:"linux"}),(0,a.jsx)(_,{children:(0,a.jsx)("span",{className:"text-[10px]",style:{color:w},children:"No API. Driven through the screen."})}),(0,a.jsx)(s.PY1.div,{variants:y,className:"flex-1 px-2.5 py-2",children:(0,a.jsx)("span",{className:"flex h-full w-full flex-col justify-center gap-1.5 rounded-md border border-black/[0.07] bg-black/[0.02] p-2",children:[{k:"Signed in",done:!0},{k:"Filed the return",done:!0},{k:"Captured the receipt",done:!0}].map((e,t)=>(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(s.PY1.span,{variants:{hidden:{opacity:0,scale:.7},show:{opacity:1,scale:1,transition:{type:"spring",stiffness:460,damping:22,delay:.1+.08*t}}},className:"flex shrink-0",children:(0,a.jsx)(m.A,{className:"size-3",strokeWidth:3,style:{color:C}})}),(0,a.jsx)("span",{className:"text-[10px]",style:{color:N},children:e.k})]},e.k))})}),(0,a.jsxs)(M,{children:[(0,a.jsx)(s.PY1.span,{variants:k,className:"size-1.5 shrink-0 rounded-full",style:{background:"#C0392B"}}),(0,a.jsx)("span",{className:"text-[10px]",style:{color:w},children:"Recording returned as the proof"})]})]})},"self-improving":function(){return(0,a.jsxs)(S,{tint:"linear-gradient(150deg,#fdf0e8,#f8d7c2 46%,#fff4ec)",children:[(0,a.jsx)(P,{icon:(0,a.jsx)(x.A,{...L,style:{color:N}}),label:"Run, review, promote",tag:"ladder"}),T.map((e,t)=>(0,a.jsxs)(_,{last:t===T.length-1,children:["done"===e.state?(0,a.jsx)(s.PY1.span,{variants:{hidden:{opacity:0,scale:.7},show:{opacity:1,scale:1,transition:{type:"spring",stiffness:460,damping:22,delay:.1+.06*t}}},className:"flex shrink-0",children:(0,a.jsx)(m.A,{className:"size-3",strokeWidth:3,style:{color:C}})}):(0,a.jsx)(h.A,{className:"size-3 shrink-0",strokeWidth:2,style:{color:"#B7791F"}}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:N},children:e.k}),(0,a.jsx)("span",{className:"shrink-0 text-[9px]",style:{color:A},children:e.v})]},e.k))]})},"universal-surface":function(){return(0,a.jsxs)(S,{tint:"linear-gradient(150deg,#eeeefb,#d4d5f4 46%,#f2f2ff)",children:[(0,a.jsx)(P,{icon:(0,a.jsx)(g.A,{...L,style:{color:N}}),label:"Reached from",tag:"one run"}),I.map(e=>(0,a.jsxs)(_,{children:[e.icon,(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[10px]",style:{color:N},children:e.k}),(0,a.jsx)("span",{className:"shrink-0 text-[9px]",style:{color:A},children:e.v})]},e.k)),(0,a.jsxs)(M,{children:[(0,a.jsx)("span",{className:"text-[10px]",style:{color:w},children:"Same Session, same history"}),(0,a.jsx)(s.PY1.span,{variants:k,className:"ml-auto flex shrink-0",children:(0,a.jsx)(m.A,{className:"size-3",strokeWidth:3,style:{color:C}})})]})]})}};function E(e){let{id:t}=e,n=z[t];return n?(0,a.jsx)(l.x,{reducedMotion:"user",children:(0,a.jsx)(n,{})}):null}}},e=>{e.O(0,[52619,1206,81356,61821,32785,28441,31255,77358],()=>e(e.s=78008)),_N_E=e.O()}]);
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.