PageSourceSearch

https://mindtrip.ai/_next/static/chunks/pages/internal/agentic-playground/[id]-79cdf509a4d7131a.js

js mindtrip.ai collected 2026-09-24 17:12:14 UTC 143,204 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2208,7273],{2822:(e,t,s)=>{"use strict";s.d(t,{Y:()=>m});var a=s(37876),n=s(27964),l=s(14232),r=s(82532),i=s(40535),c=s(20658),o=s(2692);function d(){let e,t=(0,n.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(c.$,{variant:"primary",href:"mailto:[email protected]?subject=Agentic%20Playground%20Feedback",size:"xs",iconBefore:{name:"send"},className:"bg-indigo-11 text-indigo-2 transition-colors hover:bg-indigo-12",children:"Send feedback"}),t[0]=e):e=t[0],e}function m(e){let t,s,c,m,x,h,u,g,f,p,j,b=(0,n.c)(22),{collapsed:y}=e,v=y??!1,[N,_]=(0,l.useState)(v);return b[0]!==v?(t=()=>{_(v)},s=[v],b[0]=v,b[1]=t,b[2]=s):(t=b[1],s=b[2]),(0,l.useEffect)(t,s),b[3]!==y?(c=void 0!==y&&(0,a.jsx)(o.K,{variant:"outline",href:"/playground",icon:{name:"chevronLeft"},label:"Back to sessions",size:"xs",tooltip:!0}),b[3]=y,b[4]=c):c=b[4],b[5]!==N?(m=()=>_(!N),b[5]=N,b[6]=m):m=b[6],b[7]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsx)("span",{children:"Welcome to the Mindtrip Agentic Playground"}),b[7]=x):x=b[7],b[8]!==N?(h=N?(0,a.jsx)(r.A,{className:"size-3 shrink-0 stroke-[2.5]"}):(0,a.jsx)(i.A,{className:"size-3 shrink-0 stroke-[2.5]"}),b[8]=N,b[9]=h):h=b[9],b[10]!==m||b[11]!==h?(u=(0,a.jsxs)("button",{onClick:m,className:"flex cursor-pointer items-center gap-1.5 font-semibold",children:[x,h]}),b[10]=m,b[11]=h,b[12]=u):u=b[12],b[13]!==N?(g=!N&&(0,a.jsx)("p",{className:"mt-0.5 text-xs text-balance",children:"Here you can test complex flight or hotel requests with Mindtrip agents. Results may take up to 20 minutes. This is an early access preview — notifications and booking are not available yet, and occasional mistakes may occur. Sessions may be reviewed by Mindtrip to help improve the experience."}),b[13]=N,b[14]=g):g=b[14],b[15]!==u||b[16]!==g?(f=(0,a.jsxs)("div",{className:"min-w-0 flex-1 self-center",children:[u,g]}),b[15]=u,b[16]=g,b[17]=f):f=b[17],b[18]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)("div",{className:"shrink-0 pt-0.5",children:(0,a.jsx)(d,{})}),b[18]=p):p=b[18],b[19]!==c||b[20]!==f?(j=(0,a.jsx)("div",{className:"shrink-0 border-b border-indigo-6 bg-indigo-2 px-7 py-2 text-sm text-indigo-11",children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[c,f,p]})}),b[19]=c,b[20]=f,b[21]=j):j=b[21],j}},15742:(e,t,s)=>{"use strict";s.d(t,{r:()=>N});var a=s(37876),n=s(14232),l=s(59714),r=s(74302),i=s(26579),c=s(21867),o=s(77934),d=s(84525),m=s(19547),x=s(34265),h=s(42512),u=s(32516),g=s(20015),f=s(39926),p=s(20658),j=s(54160),b=s(2692),y=s(79085);let v=(e,t)=>{let s=0,a=e.length,n=[];for(s=0;s<a;s+=t){let a=e.slice(s,s+t);n.push(a)}return n},N=(0,n.memo)(e=>{let{organizationExamples:t,customExamples:s,onSelect:N,buttonText:_}=e,[w,k]=(0,n.useState)(!1),S=(0,n.useRef)(null),A=(0,u.jL)(),z=(0,u.GV)(h.DF),C=(0,u.GV)(h.YN),T=(0,n.useRef)([]),V=x.h.useLocale(),I=(0,n.useMemo)(()=>{let e;return s?v(s,4):t?v(t.map(e=>({question:e})),4):v((e=(0,d.fM)(V,(0,o.fi)((0,o.O4)(),45)),[{emoji:"\uD83D\uDC8E",title:"Discover places to visit",question:"What’s the best island in Hawaii for a family vacation? Include a comparison of all the islands."},{emoji:"\uD83C\uDFE8",title:"Hotel suggestions",question:"Show me five star hotels in Taormina for a trip in March."},{emoji:"\uD83D\uDCF9",title:"YouTube",question:"This YouTube video has 5 recommendations for Monterey. Plan me a weekend getaway to experience them.",attachment:{url:"https://www.youtube.com/shorts/J-wd6tzevNA",type:"link",metadata:{title:"5 Places to Visit in Monterey",description:"Here are five must-sees in this coastal playground",thumbnail_url:"https://i.ytimg.com/vi/J-wd6tzevNA/maxresdefault.jpg"}}},{emoji:"\uD83D\uDCC5",title:"Itineraries and trip plans",question:"Create an itinerary for a 5 day trip to Paris staying at the Sofitel La Faubourg. I want to see all the sights plus some offbeat items."},{emoji:"\uD83D\uDC68‍\uD83D\uDC69‍\uD83D\uDC67‍\uD83D\uDC66",title:"Who’s traveling and when",question:"We’re going to Barcelona in February. It will be myself, my husband, and our two kids. We’d like to go around the 8th for 7 nights. Recommend a hotel, some restaurants, and must see things to do."},{emoji:"\uD83D\uDCF8",title:"TikTok",question:"Tell me about the places in this TikTok post",attachment:{url:"https://www.tiktok.com/@mindtrip.ai/video/7393412276163808543",type:"link",metadata:{title:"Uncover the vibrant heart of Mexico City \uD83C\uDDF2\uD83C\uDDFD✨",thumbnail_url:"https://p19-sign.tiktokcdn-us.com/large/tos-useast8-p-0068-tx2/oYyXI7fDqEf6jONISrwPCNnVaCVAxEpbFCFfIA.webp?lk3s=d05b14bd&nonce=36253&refresh_token=962df9dcb893f648823d4831edb3d2d5&x-expires=1722549600&x-signature=etgy5VNy1Y1zMFcOtPbtjUAW5mU%3D&s=FEED&se=false&sh=&sc=cover&l=20240731220726435A75B55A692F7D7999&shp=d05b14bd&shcp=-"}}},{emoji:"\uD83D\uDDBC️",title:"Must see attractions",question:"I want to explore all the top museums and art galleries in London. Show me a list with some details about each one."},{emoji:"✈️",title:"Flights",question:`Find me flights from SFO to Patagonia via Buenos Aires. I am leaving on ${e} for 10 days.`},{emoji:"\uD83D\uDE97",title:"Plan a 10 day roadtrip",question:"Plan me a 10 day roadtrip from Bilbao to Granada. I need a detailed daily plan with things to do, hotel suggestions and great restaurants. I plan to leave on April 7th."},{emoji:"\uD83C\uDF7D️",title:"Travel like a foodie",question:"I’m in NYC next week. I need a sushi restaurant for dinner. Also, a good place for breakfast in Soho. Give me two or three options for each."},{emoji:"\uD83C\uDFD6️",title:"Best beaches",question:"What are the best beaches on Maui near Wailea that are popular with the locals. I want to see turtles and snorkel if possible. Show me at least 5."},{emoji:"\uD83D\uDCF0",title:"The New York Times",question:"I read this article about Munich. Plan me this exact trip!",attachment:{url:"https://www.nytimes.c
1om/interactive/2024/04/18/travel/things-to-do-munich.html",type:"link",metadata:{title:"36 Hours in Munich",description:"Shedding its conservative reputation, the Bavarian capital is finding unusual ways to balance tradition and innovation.",thumbnail_url:"https://static01.nyt.com/images/2024/04/18/multimedia/18hours-munich-zwkq/18hours-munich-zwkq-facebookJumbo.jpg"}}},{emoji:"\uD83D\uDCC4",title:"Spreadsheet",question:"Here is my vacation planning spreadsheet. Can I have photos and reviews for everything?",attachment:{url:`${c.CF_S3_URL}/web/SASpreadsheet.png`,type:"file",metadata:{title:"Trip to France & Italy",thumbnail_url:`${c.CF_S3_URL}/web/SASpreadsheet.png`}}},{emoji:"\uD83C\uDF0F",title:"Explore a new country",question:"I have 12 days. Plan me a detailed daily itinerary for New Zealand. I’m a huge Lord of the Rings fan. I also love hiking and want to try bungee jumping. Ideally boutique hotels."},{emoji:"\uD83C\uDF1F",title:"Restaurant recommendations",question:"What are some LA restaurants that are popular with celebrities? Show me at least 5 where I might get a celebrity sighting."},{emoji:"☀️",title:"When to visit",question:"I’ve always wanted to visit Portugal. What is the best time of the year to go. Show me things to do for each season and suggested hotels."},{emoji:"⛰️",title:"Top national parks",question:"Plan me a trip for 2 weeks from Las Vegas and does the grand circuit of the Utah. Also recommend hotels that I can stay along the way."},{emoji:"\uD83D\uDD0D",title:"Reviews summarized",question:"What are the 5 most positive and 5 most negative things people say about visiting The Statue of Liberty?"},{emoji:"\uD83C\uDF0A",title:"Bucket list items",question:"What are the 10 most epic countries for kitesurfing worldwide and why?"},{emoji:"\uD83C\uDF72",title:"Local cuisine",question:"What are some local dishes in Lisbon? Plan me a 3 day food extravaganza. Give me some restaurant recommendations where I can try the food."},{emoji:"\uD83C\uDFEF",title:"Things to do",question:"What are the top things to do in and around Kyoto. I want to spend some time visiting all the temples and visit Nara. What is best season to visit?"},{emoji:"\uD83D\uDEC2",title:"Necessary travel papers",question:"What are the visa requirements for US citizens traveling to Brazil?"},{emoji:"\uD83C\uDF00",title:"Offbeat and unusual",question:"I’m into mazes. Create me an itinerary for a trip to the UK and France so I can explore the most popular and famous mazes in each country like Hampton Court and Versailles."},{emoji:"\uD83C\uDF04",title:"Short roadtrip",question:"I’d like to visit a bunch of Missouri caves. If I drive from St. Louis to Springfield, which ones can I hit if I have three or four days?"}]),4)},[t,s,V]),{scrollRef:R,pages:G,activePageIndex:F,prev:$,next:E,goTo:M}=(0,l.O)(),L=async(e,t)=>{N?N(e,t):((0,i.$)({name:"ClickChatPill",properties:{title:e}}),await A((0,g._z)({messageString:e,attachments:t.attachment?[t.attachment]:void 0,subType:"suggested-question"})))},P=_??((0,m.nq)()?z?.properties.what_can_i_ask_button_text||"What can I ask?":"What can I ask Mindtrip?"),O=(0,a.jsx)(p.$,{variant:"subtle",size:"sm",onClick:()=>(0,i.$)("ClickAskMindtrip"),children:P}),q=s||!t?"Examples of things Mindtrip can help you with":"Examples of things to ask",D=I.some(e=>e.some(e=>e.title)),U=(0,a.jsx)("div",{className:"@container",children:(0,a.jsxs)("div",{className:"px-4 @lg:px-9 @lg:py-2",children:[(0,a.jsx)("div",{className:"hidden sm:block",children:(0,a.jsx)("h2",{className:"mb-[1em] px-10 pt-1 text-center text-lg leading-tight font-semibold text-balance @lg:pt-0 @lg:text-2xl",children:q})}),(0,a.jsx)("div",{ref:R,className:"-mx-4 scrollbar-hidden flex snap-x snap-mandatory overflow-auto scroll-smooth @lg:-mx-9",children:I.map((e,t)=>(0,a.jsx)("div",{className:(0,r.cn)("grid w-full shrink-0 snap-start gap-2 px-4 @lg:grid-cols-2 @lg:gap-4 @lg:px-9",1===e.length&&"items-start"),children:e.map((e,s)=>(0,a.jsxs)("button",{type:"button",className:(0,r.cn)("group flex flex-col rounded-xl border px-3 py-2 transition-colors hover:border-primary",D?"justify-start":"justify-center"),onClick:()=>{k(!1),L(T.current[s+4*t]?.textContent||e.question,e)},children:[e.title&&(0,a.jsxs)("span",{className:"mb-1 font-semibold",children:[e.emoji&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"font-emoji",children:e.emoji})," "]}),e.title]}),(0,a.jsx)("span",{ref:e=>{T.current[s+4*t]=e},className:(0,r.cn)("text-pretty",e.title&&"text-xs text-muted transition-colors group-hover:text-foreground @lg:text-sm"),children:e.question})]},e.question))},t))}),I.length>1&&(0,a.jsxs)("div",{className:"mt-2 flex items-center @lg:mt-6",children:[(0,a.jsx)(b.K,{variant:"ghost",size:"sm",icon:{name:"chevronLeft"},label:"Previous examples",onClick:$,disabled:0===F}),(0,a.jsx)(f.Z,{numberOfDots:G.length,activeDotIndex:F,onDotClick:M}),(0,a.jsx)(b.K,{variant:"ghost",size:"sm",icon:{name:"chevronRight"},label:"Next examples",onClick:E,disabled:F===I.length-1})]})]})});return C?(0,a.jsxs)(j.lG,{open:w,onOpenChange:k,children:[(0,a.jsx)(j.zM,{render:O}),(0,a.jsxs)(j.Cf,{children:[(0,a.jsx)(j.c7,{children:(0,a.jsx)(j.L3,{children:q})}),(0,a.jsx)(j.R4,{children:U})]})]}):(0,a.jsxs)(y.AM,{open:w,onOpenChange:k,children:[(0,a.jsx)("div",{ref:S,className:"absolute inset-x-0 bottom-0"}),(0,a.jsx)(y.Wv,{render:O}),(0,a.jsxs)(y.hl,{anchor:S,side:"top",size:"anchor",className:"px-0",sideOffset:0,initialFocus:!1,children:[U,(0,a.jsx)(y.iN,{className:"absolute top-2 left-2.5 z-1"})]})]})});N.displayName="ExamplesPopover"},16067:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>tK,default:()=>tB});var a=s(37876),n=s(27964),l=s(14232),r=s(20962),i=s(74269),c=s(81321),o=s(74302),d=s(72323),m=s.n(d),x=s(81315),h=s(69165),u=s(66811),g=s(92960),f=s(42512),p=s(32516),j=s(99177),b=s(73753),y=s(25834),v=s(56765),N=s(67071),_=s(8588),w=s(74636),k=s(85277),S=s(44546),A=s(16962),z=s(58952),C=s(50892),T=s(5970),V=s(73115),I=s(88254),R=s(4294),G=s(34265),F=s(70536),$=s(29070),E=s(64346),M=s(59947),L=s(18766),P=s(16637),O=s(37585),q=s(92197),D=s(20658),U=s(81684),H=s(14579);function W(e){let{sessionId:t,events:s}=e,[n,r]=(0,l.useState)(null),[i,c]=(0,l.useState)(!0),[o,d]=(0,l.useState)(null),[m,x]=(0,l.useState)(null),h=(0,l.useMemo)(()=>
1{if(0===s.length)return null;let e=s.filter(e=>"AgentMessageEvent"===e.type||"AgentToolCallResultEvent"===e.type);return 0===e.length?null:Math.max(...e.map(e=>e.id))},[s]);(0,l.useEffect)(()=>{null!==h&&h===m||(async()=>{c(!0),d(null);try{let e=new I.c((0,R.Q)()),s=await e.getMemoryReport(t);r(s),x(h)}catch(e){console.error("Failed to fetch memory report:",e),d("Failed to load report")}finally{c(!1)}})()},[t,h,m]);let u=async()=>{c(!0),d(null);try{let e=new I.c((0,R.Q)()),s=await e.getMemoryReport(t);r(s),x(h)}catch(e){console.error("Failed to fetch memory report:",e),d("Failed to load report")}finally{c(!1)}};if(i&&!n)return(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(P.A,{className:"mb-3 size-8 animate-spin text-gray-10"}),(0,a.jsx)("p",{className:"text-gray-10",children:"Loading report…"})]})});if(o&&!n)return(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center text-red-10",children:[(0,a.jsx)(F.A,{className:"mb-3 size-8"}),(0,a.jsx)("p",{children:o}),(0,a.jsx)(D.$,{variant:"outline",size:"sm",className:"mt-4",onClick:u,children:"Try Again"})]})});if(!n?.has_config)return(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center text-gray-10",children:[(0,a.jsx)(C.A,{className:"mb-3 size-12"}),(0,a.jsx)("p",{className:"mb-1 font-medium",children:"No Report Configured"}),(0,a.jsx)("p",{className:"text-sm",children:"This agent session has not configured a custom memory report yet."})]})});let{data:g,columns:f,query:p,description:j}=n;return(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsxs)("div",{className:"shrink-0 border-b bg-background p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Memory Report"}),(0,a.jsxs)(q.E,{color:"gray",children:[g.length," rows"]}),i&&(0,a.jsx)(P.A,{className:"size-4 animate-spin text-gray-10"})]}),(0,a.jsxs)(D.$,{variant:"outline",size:"sm",onClick:u,children:[(0,a.jsx)(M.A,{className:"mr-2 size-4"}),"Refresh"]})]}),j&&(0,a.jsx)("p",{className:"mt-2 text-sm text-gray-11",children:j}),p&&(0,a.jsxs)(H.m_,{children:[(0,a.jsxs)(H.k$,{className:"mt-2 flex items-center gap-1 text-xs text-gray-10 hover:text-gray-11",children:[(0,a.jsx)($.A,{className:"size-3"}),(0,a.jsx)("span",{children:"View Query"})]}),(0,a.jsx)(H.ZI,{className:"max-w-md",children:(0,a.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap",children:p})})]})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:0===g.length?(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center text-gray-10",children:[(0,a.jsx)(L.A,{className:"mb-3 size-8"}),(0,a.jsx)("p",{children:"No data yet"})]})}):(0,a.jsxs)(U.XI,{children:[(0,a.jsx)(U.A0,{children:(0,a.jsx)(U.MS,{children:f.map(e=>(0,a.jsx)(U.nd,{children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{children:e.name}),e.is_entity_id&&(0,a.jsx)(E.A,{className:"size-3 text-gray-10"})]})},e.name))})}),(0,a.jsx)(U.BF,{children:g.map((e,t)=>(0,a.jsx)(U.Hj,{children:f.map(t=>{let s=e[t.name],n=e[`${t.name}_ref`];return(0,a.jsx)(U.nA,{children:t.is_entity_id&&"string"==typeof s?(0,a.jsx)(O.T,{entityId:s,entityRef:n,rowData:e}):(0,a.jsx)(K,{value:s,type:t.type})},t.name)})},t))})]})})]})}function K(e){let t,s=(0,n.c)(20),{value:l,type:r}=e,i=G.h.useFormatNumber();if(null==l){let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("span",{className:"text-gray-10 italic",children:"NULL"}),s[0]=e):e=s[0],e}if("boolean"===r){let e;return s[1]!==l?(e=l?(0,a.jsx)(q.E,{color:"green",size:1,children:"TRUE"}):(0,a.jsx)(q.E,{color:"gray",size:1,children:"FALSE"}),s[1]=l,s[2]=e):e=s[2],e}if("float"===r||"integer"===r){let e=Number(l);if(!isNaN(e)){let t,n;return s[3]!==i||s[4]!==e||s[5]!==r?(t="float"===r?e.toFixed(2):i(e),s[3]=i,s[4]=e,s[5]=r,s[6]=t):t=s[6],s[7]!==t?(n=(0,a.jsx)("span",{className:"font-mono text-sm",children:t}),s[7]=t,s[8]=n):n=s[8],n}}let c=String(l);if(c.length>100){let e,t,n,l;return s[9]!==c?(e=c.slice(0,100),s[9]=c,s[10]=e):e=s[10],s[11]!==e?(t=(0,a.jsxs)(H.k$,{className:"cursor-help",children:[e,"…"]}),s[11]=e,s[12]=t):t=s[12],s[13]!==c?(n=(0,a.jsx)(H.ZI,{className:"max-w-md",children:(0,a.jsx)("p",{className:"whitespace-pre-wrap",children:c})}),s[13]=c,s[14]=n):n=s[14],s[15]!==t||s[16]!==n?(l=(0,a.jsxs)(H.m_,{children:[t,n]}),s[15]=t,s[16]=n,s[17]=l):l=s[17],l}return s[18]!==c?(t=(0,a.jsx)("span",{children:c}),s[18]=c,s[19]=t):t=s[19],t}function B(e){let t,s=(0,n.c)(3),{sessionId:l,events:r}=e;return s[0]!==r||s[1]!==l?(t=(0,a.jsx)(W,{sessionId:l,events:r}),s[0]=r,s[1]=l,s[2]=t):t=s[2],t}
1var Q=s(18847),J=s.n(Q),Y=s(39180),Z=s(87979),X=s(77934),ee=s(84525),et=s(53784),es=s(26360),ea=s(97088),en=s(11557),el=s(30408),er=s(69378),ei=s(76966),ec=s(34268),eo=s(85680),ed=s(11839);let em={cancellation:{label:"Flight",icon:"plane"},connection:{label:"Flight",icon:"plane"},hotel_night:{label:"Hotel",icon:"hotel"},overnight_at_origin:{label:"Hotel",icon:"hotel"},overnight_at_connection:{label:"Hotel",icon:"hotel"},dining:{label:"Restaurant",icon:"dining"},activity:{label:"Activity",icon:"activity"},transit:{label:"Transit",icon:"transit"},airline_obligation:{label:"Airline",icon:"info"},reservation:{label:"Reservation",icon:"info"}};function ex(e){let t,s=(0,n.c)(6),{name:l}=e;if("plane"===l){let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(ec.A,{className:"size-3.5"}),s[0]=e):e=s[0],e}if("hotel"===l){let e;return s[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(er.A,{className:"size-3.5"}),s[1]=e):e=s[1],e}if("dining"===l){let e;return s[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(ed.A,{className:"size-3.5"}),s[2]=e):e=s[2],e}if("activity"===l){let e;return s[3]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(k.A,{className:"size-3.5"}),s[3]=e):e=s[3],e}if("transit"===l){let e;return s[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(eo.A,{className:"size-3.5"}),s[4]=e):e=s[4],e}return s[5]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.jsx)($.A,{className:"size-3.5"}),s[5]=t):t=s[5],t}let eh=["keep","inform_only"];function eu(e){return eh.includes(e??"")}function eg(e){return e>=1e6?`${(e/1e6).toFixed(2)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function ef(e){var t,s;let l,r,i,c,d,m,x,h,u,g=(0,n.c)(23),{cacheData:f,className:p}=e;g[0]!==f.cache_hit_rate?(l=f.cache_hit_rate.toFixed(1),g[0]=f.cache_hit_rate,g[1]=l):l=g[1];let j=l;g[2]!==f.cache_hit_rate?(r=(t=f.cache_hit_rate)>=50?"text-green-10":t>=25?"text-amber-11":"text-gray-11",g[2]=f.cache_hit_rate,g[3]=r):r=g[3];let b=r;g[4]!==f.cache_hit_rate?(i=(s=f.cache_hit_rate)>=50?"bg-green-2":s>=25?"bg-amber-2":"bg-subtle",g[4]=f.cache_hit_rate,g[5]=i):i=g[5];let y=i;g[6]!==f?(c=f.total_cache_read_toks>0,g[6]=f,g[7]=c):c=g[7];let v=c;return g[8]!==p?(d=(0,o.cn)("rounded-lg bg-background p-4 shadow-ring-xs",p),g[8]=p,g[9]=d):d=g[9],g[10]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xl",children:"\uD83D\uDCBE"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-gray-11",children:"Cache Efficiency"})]}),g[10]=m):m=g[10],g[11]!==f||g[12]!==v||g[13]!==y||g[14]!==b||g[15]!==j?(x=v&&(0,a.jsx)(ep,{hitRatePercent:j,hitRateColor:b,hitRateBgColor:y,cacheData:f}),g[11]=f,g[12]=v,g[13]=y,g[14]=b,g[15]=j,g[16]=x):x=g[16],g[17]!==v?(h=!v&&(0,a.jsx)(ey,{}),g[17]=v,g[18]=h):h=g[18],g[19]!==d||g[20]!==x||g[21]!==h?(u=(0,a.jsxs)("div",{className:d,children:[m,x,h]}),g[19]=d,g[20]=x,g[21]=h,g[22]=u):u=g[22],u}function ep(e){let t,s,l,r,i,c,d,m,x,h,u,g,f,p,j,b=(0,n.c)(34),{hitRatePercent:y,hitRateColor:v,hitRateBgColor:N,cacheData:_}=e;b[0]!==N?(t=(0,o.cn)("rounded-lg p-4",N),b[0]=N,b[1]=t):t=b[1],b[2]!==v?(s=(0,o.cn)("text-4xl font-bold",v),b[2]=v,b[3]=s):s=b[3],b[4]!==y||b[5]!==s?(l=(0,a.jsxs)("div",{className:s,children:[y,"%"]}),b[4]=y,b[5]=s,b[6]=l):l=b[6],b[7]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)("div",{className:"text-xs text-gray-11",children:"Cache Hit Rate"}),b[7]=r):r=b[7],b[8]!==l?(i=(0,a.jsxs)("div",{className:"text-center",children:[l,r]}),b[8]=l,b[9]=i):i=b[9],b[10]!==t||b[11]!==i?(c=(0,a.jsx)("div",{className:t,children:i}),b[10]=t,b[11]=i,b[12]=c):c=b[12];let w=void 0===_.estimated_cost_saved&&"col-span-2";return b[13]!==w?(d=(0,o.cn)("rounded-lg bg-subtle p-2",w),b[13]=w,b[14]=d):d=b[14],b[15]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)("div",{className:"text-xs text-gray-11",children:"Tokens Saved"}),b[15]=m):m=b[15],b[16]!==_.tokens_saved?(x=eg(_.tokens_saved),b[16]=_.tokens_saved,b[17]=x):x=b[17],b[18]!==x?(h=(0,a.jsx)("div",{className:"font-semibold text-gray-12",children:x}
1),b[18]=x,b[19]=h):h=b[19],b[20]!==h||b[21]!==d?(u=(0,a.jsxs)("div",{className:d,children:[m,h]}),b[20]=h,b[21]=d,b[22]=u):u=b[22],b[23]!==_.estimated_cost_saved?(g=void 0!==_.estimated_cost_saved&&(0,a.jsxs)("div",{className:"rounded-lg bg-subtle p-2",children:[(0,a.jsx)("div",{className:"text-xs text-gray-11",children:"Cost Saved"}),(0,a.jsxs)("div",{className:"font-semibold text-green-10",children:["$",_.estimated_cost_saved.toFixed(4)]})]}),b[23]=_.estimated_cost_saved,b[24]=g):g=b[24],b[25]!==u||b[26]!==g?(f=(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[u,g]}),b[25]=u,b[26]=g,b[27]=f):f=b[27],b[28]!==_?(p=(0,a.jsx)(ej,{cacheData:_}),b[28]=_,b[29]=p):p=b[29],b[30]!==f||b[31]!==p||b[32]!==c?(j=(0,a.jsxs)("div",{className:"space-y-3",children:[c,f,p]}),b[30]=f,b[31]=p,b[32]=c,b[33]=j):j=b[33],j}function ej(e){let t,s,l,r,i,c,o,d=(0,n.c)(16),{cacheData:m}=e;return d[0]!==m.total_input_toks?(t=eg(m.total_input_toks),d[0]=m.total_input_toks,d[1]=t):t=d[1],d[2]!==t?(s=(0,a.jsx)(eb,{label:"Total Input:",value:t}),d[2]=t,d[3]=s):s=d[3],d[4]!==m.total_cache_read_toks?(l=eg(m.total_cache_read_toks),d[4]=m.total_cache_read_toks,d[5]=l):l=d[5],d[6]!==l?(r=(0,a.jsx)(eb,{label:"Cache Reads:",value:l}),d[6]=l,d[7]=r):r=d[7],d[8]!==m.total_cache_write_toks?(i=eg(m.total_cache_write_toks),d[8]=m.total_cache_write_toks,d[9]=i):i=d[9],d[10]!==i?(c=(0,a.jsx)(eb,{label:"Cache Writes:",value:i}),d[10]=i,d[11]=c):c=d[11],d[12]!==s||d[13]!==r||d[14]!==c?(o=(0,a.jsxs)("div",{className:"space-y-1 border-t pt-2 text-xs",children:[s,r,c]}),d[12]=s,d[13]=r,d[14]=c,d[15]=o):o=d[15],o}function eb(e){let t,s,l,r=(0,n.c)(7),{label:i,value:c}=e;return r[0]!==i?(t=(0,a.jsx)("span",{className:"text-gray-11",children:i}),r[0]=i,r[1]=t):t=r[1],r[2]!==c?(s=(0,a.jsx)("span",{className:"font-medium text-gray-12",children:c}),r[2]=c,r[3]=s):s=r[3],r[4]!==t||r[5]!==s?(l=(0,a.jsxs)("div",{className:"flex justify-between",children:[t,s]}),r[4]=t,r[5]=s,r[6]=l):l=r[6],l}function ey(){let e,t=(0,n.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("div",{className:"py-8 text-center text-sm text-gray-10",children:[(0,a.jsx)("span",{className:"text-4xl",children:"\uD83D\uDCBE"}),(0,a.jsx)("p",{className:"mt-2",children:"No cache usage in this session"})]}),t[0]=e):e=t[0],e}var ev=s(11857);function eN(e){let t,s,r,i,c,d,m,h,u=(0,n.c)(19),{modelData:g,className:f}=e;u[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Set,u[0]=t):t=u[0];let[p,j]=(0,l.useState)(t),b=ek;u[1]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},u[1]=s):s=u[1];let y=s;if(u[2]!==f||u[3]!==p||u[4]!==g){let e=Object.entries(g).map(ew);e.sort(e_),u[9]!==f?(c=(0,o.cn)("space-y-2",f),u[9]=f,u[10]=c):c=u[10],u[11]===Symbol.for("react.memo_cache_sentinel")?(d=(0,a.jsx)("h3",{className:"text-sm font-semibold text-gray-11",children:"Model Breakdown"}),u[11]=d):d=u[11],r="space-y-2",i=e.map(e=>{let t=p.has(e.model);return(0,a.jsxs)("div",{className:"rounded-lg bg-background p-3 shadow-ring-xs",children:[(0,a.jsxs)("button",{onClick:()=>y(e.model),className:"flex w-full items-center justify-between text-left",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-12",children:e.model}),(0,a.jsxs)("span",{className:"text-xs text-gray-10",children:["(",e.costs.call_count," calls)"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("span",{className:"text-sm font-semibold text-gray-12",children:["$",e.costs.total_cost.toFixed(4)]}),t?(0,a.jsx)("span",{children:"▲"}):(0,a.jsx)("span",{children:"▼"})]})]}),t&&(0,a.jsxs)("div",{children:[(0,a.jsx)(ev.w,{className:"my-2"}),(0,a.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-1 text-xs font-medium text-gray-11",children:"Tokens"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Input:"}),(0,a.jsx)("span",{className:"font-medium text-gray-12",children:b(e.tokens.input)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Output:"}),(0,a.jsx)("span",{className:"font-medium text-gray-12",children:b(e.tokens.output)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Cache Read:"}),(0,a.jsx)("span",{className:"font-medium text-gray-12",children:b(e.tokens.cache_read)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Cache Write:"}),(0,a.jsx)("span",{className:"font-medium text-gray-12",children:b(e.tokens.cache_write)})]})]})]}),(0,a.jsx)(ev.w,{}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-1 text-xs font-medium text-gray-11",children:"API Performance"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1",children:(0,a.jsx)("span",{className:"text-gray-11",children:"Total API Time:"})}),(0,a.jsxs)("span",{className:"font-medium text-gray-12",children:[(0,x.a3)(e.tokens.call_count>0?e.tokens.avg_duration_ms*e.tokens.call_count/1e3:0),(0,a.jsx)("span",{className:"ml-1 text-4xs text-gray-10",children:"(cumulative LLM response time)"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1",children:(0,a.jsx)("span",{className:"text-gray-11",children:"Avg Response:"})}),(0,a.jsxs)("span",{className:"font-medium text-gray-12",children:[(0,x.a3)(e.tokens.avg_duration_ms/1e3),(0,a.jsx)("span",{className:"ml-1 text-4xs text-gray-10",children:"(per LLM call)"})]})]})]})]})]})]})]},e.model)}),u[2]=f,u[3]=p,u[4]=g,u[5]=r,u[6]=i,u[7]=c,u[8]=d}else r=u[5],i=u[6],c=u[7],d=u[8];return u[12]!==r||u[13]!==i?(m=(0,a.jsx)("div",{className:r,children:i}),u[12]=r,u[13]=i,u[14]=m):m=u[14],u[15]!==c||u[16]!==d||u[17]!==m?(h=(0,a.jsxs)("div",{className:c,children:[d,m]}),u[15]=c,u[16]=d,u[17]=m,u[18]=h):h=u[18],h}function e_(e,t){return t.costs.total_cost-e.costs.total_cost}function ew(e){let[t,s]=e;return{model:t,costs:s.costs,tokens:s.tokens}}function ek(e){return e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}var eS=s(41231),eA=s(40535),ez=s(43613),eC=s(29074),eT=s(78282),eV=s(84636),eI=s(16133),eR=s(54160),eG=s(49320),eF=s(83310);function e$(e){let{sessionId:t}=e,[s,n]=(0,l.useState)([]),[r,i]=(0,l.useState)(null),[c,d]=(0,l.useState)(null),[m,x]=(0,l.useState)(!1),[h,u]=(0,l.useState)(!0),[g,f]=(0,l.useState)(null),[p,j]=(0,l.useState)(1),[b,y]=(0,l.useState)(50),[v,N]=(0,l.useState)(null),[_,w]=(0,l.useState)("asc"),[k,A]=(0,l.useState)({}),[z,C]=(0,l.useState)(!1),[T,V]=(0,l.useState)(null);(0,l.useEffect)(()=>{(async()=>{u(!0),f(null);try{let e=new I.c((0,R.Q)()),s=await e.getSandboxTables(t);n(s.tables),s.tables.length>0&&i(s.tables[0].name)}catch(e){console.error("Failed to load sandbox tables:",e),f("Failed to load sandbox tables")}finally{u(!1)}})()},[t]),(0,l.useEffect)(()=>{r&&(async()=>{x(!0),f(null);try{let e=new I.c((0,R.Q)()),s=await e.getSandboxTableData(t,r,{page:p,per_page:b,sort_column:v||void 0,sort_direction:_,filters:Object.keys(k).length>0?k:void 0});d(s)}catch(e){console.error("Failed to load table data:",e),f("Failed to load table data")}finally{x(!1)}})()},[t,r,p,b,v,_,k]);let G=e=>{if(c){if("json"===e){let e=new Blob([JSON.stringify(c.data,null,2)],{type:"application/json"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download=`${r}_export.json`,s.click(),URL.revokeObjectURL(t)}else if("csv"===e){let e=new Blob([[c.columns.map(e=>e.name).join(","),...c.data.map(e=>c.columns.map(t=>{let s=e[t.name];if(null==s)return"";let a=String(s);return a.includes(",")||a.includes('"')||a.includes("\n")?`"${a.replace(/"/g,'""')}"`:a}).join(","))].join("\n")],{type:"text/csv"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download=`${r}_export.csv`,s.click(),URL.revokeObjectURL(t)}}};return h?(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(P.A,{className:"mb-3 size-8 animate-spin text-gray-10"}),(0,a.jsx)("p",{className:"text-gray-10",children:"Loading sandbox database…"})]})}):g?(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center text-red-10",children:[(0,a.jsx)(F.A,{className:"mb-3 size-8"}),(0,a.jsx)("p",{children:g})]})}):0===s.length?(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center text-gray-10",children:[(0,a.jsx)(eI.A,{className:"mb-3 size-12"}),(0,a.jsx)("p",{className:"mb-1 font-medium",children:"No Sandbox Database"}),(0,a.jsx)("p",{className:"text-sm",children:"This session has no sandbox database yet"})]})}):(0,a.jsxs)("div",{className:"flex h-full",children:[(0,a.jsxs)("div",{className:"w-64 shrink-0 border-r bg-subtle p-4",children:[(0,a.jsx)("h3",{className:"mb-3 text-sm font-semibold text-gray-12",children:"Tables"}),(0,a.jsx)("div",{className:"space-y-1",children:s.map(e=>(0,a.jsxs)("button",{onClick:()=>{i(e.name),j(1),N(null),w("asc"),A({})},className:(0,o.cn)("flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-sm transition-colors",r===e.name?"bg-background shadow-ring-xs":"hover:bg-subtle"),children:[(0,a.jsx)("span",{className:"font-medium",children:e.name}
1),(0,a.jsx)(q.E,{color:"gray",size:1,children:e.row_count})]},e.name))})]}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 flex-col",children:r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"border-b bg-background p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:r}),c&&(0,a.jsxs)(q.E,{color:"gray",children:[c.total_count," rows"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(D.$,{variant:"outline",size:"sm",onClick:()=>C(!z),children:[(0,a.jsx)(eV.A,{className:"mr-2 size-4"}),"Filter"]}),(0,a.jsxs)(D.$,{variant:"outline",size:"sm",onClick:()=>G("json"),disabled:!c||0===c.data.length,children:[(0,a.jsx)(eC.A,{className:"mr-2 size-4"}),"JSON"]}),(0,a.jsxs)(D.$,{variant:"outline",size:"sm",onClick:()=>G("csv"),disabled:!c||0===c.data.length,children:[(0,a.jsx)(eC.A,{className:"mr-2 size-4"}),"CSV"]})]})]}),z&&c&&(0,a.jsxs)("div",{className:"mt-4 space-y-2 border-t pt-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-11",children:"Column Filters"}),(0,a.jsx)(D.$,{variant:"ghost",size:"sm",onClick:()=>{A({}),j(1)},disabled:0===Object.keys(k).length,children:"Clear All"})]}),(0,a.jsx)("div",{className:"grid grid-cols-3 gap-2",children:c.columns.map(e=>(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs text-gray-11",children:e.name}),(0,a.jsx)(eF.ks,{size:"sm",placeholder:`Filter ${e.name}…`,value:k[e.name]||"",onChange:t=>{var s,a;return s=e.name,a=t.target.value,void(A(e=>({...e,[s]:a})),j(1))}})]},e.name))})]})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:m?(0,a.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,a.jsx)(P.A,{className:"size-6 animate-spin text-gray-10"})}):c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(U.XI,{children:[(0,a.jsx)(U.A0,{children:(0,a.jsx)(U.MS,{children:c.columns.map(e=>(0,a.jsx)(U.nd,{className:"cursor-pointer select-none",onClick:()=>{var t;v===(t=e.name)?w("asc"===_?"desc":"asc"):(N(t),w("asc")),j(1)},children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{children:e.name}),(0,a.jsxs)("span",{className:"text-xs text-gray-10",children:["(",e.type,")"]}),v===e.name&&(0,a.jsx)(eA.A,{className:(0,o.cn)("size-3","desc"===_&&"rotate-180")})]})},e.name))})}),(0,a.jsx)(U.BF,{children:0===c.data.length?(0,a.jsx)(U.Hj,{children:(0,a.jsx)(U.nA,{colSpan:c.columns.length,className:"text-center text-gray-10",children:"No data found"})}):c.data.map((e,t)=>(0,a.jsx)(U.Hj,{children:c.columns.map(t=>(0,a.jsx)(U.nA,{children:((e,t,s)=>{if(null==e)return(0,a.jsx)("span",{className:"text-gray-10 italic",children:"NULL"});if("boolean"===t)return e?(0,a.jsx)(q.E,{color:"green",size:1,children:"TRUE"}):(0,a.jsx)(q.E,{color:"gray",size:1,children:"FALSE"});if("datetime"===t||"timestamp"===t)return(0,a.jsx)("span",{className:"font-mono text-xs",children:String(e)});let n=String(e);if(("text"===t||n.length>100)&&n.length>50){let e=n.trim().startsWith("{")||n.trim().startsWith("["),t=n.slice(0,100)+(n.length>100?"…":"");return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"max-w-md cursor-pointer truncate hover:text-indigo-10",onClick:()=>V({value:n,column:s}),title:"Click to expand",children:e?(0,a.jsx)("code",{className:"rounded-sm bg-subtle px-1 py-0.5 text-xs",children:t}):t}),n.length>100&&(0,a.jsx)(D.$,{variant:"ghost",size:"sm",className:"h-6 px-2",onClick:()=>V({value:n,column:s}),children:(0,a.jsx)(eT.A,{className:"size-3"})})]})}return n})(e[t.name],t.type,t.name)},t.name))},t))})]}),c.total_pages>1&&(0,a.jsxs)("div",{className:"flex items-center justify-between border-t bg-background p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm text-gray-11",children:"Rows per page:"}),(0,a.jsxs)(eG.l6,{value:String(b),onValueChange:e=>{y(Number(e)),j(1)},children:[(0,a.jsx)(eG.bq,{size:"sm",className:"w-20",children:(0,a.jsx)(eG.yv,{})}),(0,a.jsxs)(eG.gC,{children:[(0,a.jsx)(eG.eb,{value:"25",children:"25"}),(0,a.jsx)(eG.eb,{value:"50",children:"50"}),(0,a.jsx)(eG.eb,{value:"100",children:"100"})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(D.$,{variant:"outline",size:"sm",onClick:()=>j(p-1),disabled:1===p,children:(0,a.jsx)(eS.A,{className:"size-4"})}),(0,a.jsxs)("span",{className:"text-sm text-gray-11",children:["Page ",p," of ",c.total_pages]}),(0,a.jsx)(D.$,{variant:"outline",size:"sm",onClick:()=>j(p+1),disabled:p===c.total_pages,children:(0,a.jsx)(S.A,{className:"size-4"})})]})]})]}):null})]})}),(0,a.jsx)(eR.lG,{open:!!T,onOpenChange:e=>!e&&V(null),children:(0,a.jsxs)(eR.Cf,{className:"max-h-[80vh] max-w-4xl",children:[(0,a.jsx)(eR.c7,{children:(0,a.jsxs)(eR.L3,{children:[T?.column,(0,a.jsxs)(D.$,{variant:"outline",size:"sm",className:"ml-4",onClick:()=>{T&&navigator.clipboard.writeText(T.value)},children:[(0,a.jsx)(ez.A,{className:"mr-2 size-4"}),"Copy"]})]})}),(0,a.jsx)("div",{className:"overflow-auto",children:T&&(0,a.jsx)("pre",{className:"rounded-lg bg-subtle p-4 font-mono text-sm wrap-break-word whitespace-pre-wrap",children:(()=>{try{if(T.value.trim().startsWith("{")||T.value.trim().startsWith("["))return JSON.stringify(JSON.parse(T.value),null,2)}catch{}return T.value})()})})]})})]})}function eE(e){let t,s,l,r,i,c,d=(0,n.c)(16),{toolData:m,className:h}=e;if(d[0]!==h||d[1]!==m){let e=Object.entries(m).map(eL);e.sort(eM),d[6]!==h?(l=(0,o.cn)("space-y-2",h),d[6]=h,d[7]=l):l=d[7],d[8]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)("h3",{className:"text-sm font-semibold text-gray-11",children:"Tool Analytics"}),d[8]=r):r=d[8],t="space-y-2",s=e.map(e=>{let{tool:t,metrics:s}=e,n=s.call_count>0?s.success_count/s.call_count*100:0,l=s.total_nested_llm_cost,r=void 0!==l&&l>0;return(0,a.jsxs)("div",{className:"rounded-lg bg-background p-3 shadow-ring-xs",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-12",children:function(e){return e.split("_").map(eP).join(" ")}(t)}),r&&(0,a.jsx)("span",{className:"text-xs font-medium text-amber-11",title:"Uses LLM internally",children:"LLM"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("span",{className:"text-xs text-gray-10",children:[s.call_count," calls"]}
1),(0,a.jsx)("div",{className:(0,o.cn)("size-2 rounded-full",100===n?"bg-green-10":n>=75?"bg-amber-9":"bg-red-9"),title:`${n.toFixed(0)}% success rate`})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Avg Time:"}),(0,a.jsx)("span",{className:"font-medium text-gray-12",children:(0,x.a3)(s.avg_execution_time_ms/1e3)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Total Time:"}),(0,a.jsx)("span",{className:"font-medium text-gray-12",children:(0,x.a3)(s.total_execution_time_ms/1e3)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Success:"}),(0,a.jsx)("span",{className:"font-medium text-green-10",children:s.success_count})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Failed:"}),(0,a.jsx)("span",{className:"font-medium text-red-10",children:s.failure_count})]}),r&&(0,a.jsxs)("div",{className:"col-span-2 flex justify-between border-t pt-1",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"LLM Cost:"}),(0,a.jsxs)("span",{className:"font-medium text-gray-12",children:["$",l.toFixed(4)]})]})]})]},t)}),d[0]=h,d[1]=m,d[2]=t,d[3]=s,d[4]=l,d[5]=r}else t=d[2],s=d[3],l=d[4],r=d[5];return d[9]!==t||d[10]!==s?(i=(0,a.jsx)("div",{className:t,children:s}),d[9]=t,d[10]=s,d[11]=i):i=d[11],d[12]!==l||d[13]!==r||d[14]!==i?(c=(0,a.jsxs)("div",{className:l,children:[r,i]}),d[12]=l,d[13]=r,d[14]=i,d[15]=c):c=d[15],c}function eM(e,t){return t.metrics.total_execution_time_ms-e.metrics.total_execution_time_ms}function eL(e){let[t,s]=e;return{tool:t,metrics:s}}function eP(e){return e.charAt(0).toUpperCase()+e.slice(1)}function eO(e){let t,s,l,r,i,c,d,m=(0,n.c)(13),{timing:h,className:u}=e;return m[0]!==u?(t=(0,o.cn)("rounded-lg bg-background p-4 shadow-ring-xs",u),m[0]=u,m[1]=t):t=m[1],m[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-2xl",children:"⏱️"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-gray-11",children:"Processing Time"})]}),m[2]=s):s=m[2],m[3]!==h.total_working_time_seconds?(l=(0,x.a3)(h.total_working_time_seconds),m[3]=h.total_working_time_seconds,m[4]=l):l=m[4],m[5]!==l?(r=(0,a.jsx)("div",{className:"text-5xl font-bold text-indigo-10",children:l}),m[5]=l,m[6]=r):r=m[6],m[7]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)("div",{className:"text-xs text-gray-11",children:"Total active working time"}),m[7]=i):i=m[7],m[8]!==r?(c=(0,a.jsxs)("div",{className:"text-center",children:[r,i]}),m[8]=r,m[9]=c):c=m[9],m[10]!==t||m[11]!==c?(d=(0,a.jsxs)("div",{className:t,children:[s,c]}),m[10]=t,m[11]=c,m[12]=d):d=m[12],d}var eq=s(57388),eD=s(50436);let eU=J()(()=>Promise.all([s.e(7543),s.e(2453)]).then(s.bind(s,42453)).then(e=>e.JsonViewer),{loadableGenerated:{webpack:()=>[42453]},loading:()=>(0,a.jsx)("div",{className:"p-4 text-center text-gray-10",children:"Loading…"})});function eH(e){let t=e.filter(c.AQ);return 0===t.length?null:t.sort((e,t)=>t.id-e.id)[0]}function eW(e){return e>=1e6?`${(e/1e6).toFixed(2)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function eK(e){let t,s,l,r,i,c,o,d,m,h,u,g,f,b,y,v,N,_=(0,n.c)(35),{session:w,onViewStats:k}=e,S=(0,p.GV)(j.CNd);if(_[0]!==S||_[1]!==k){let e=S?{tokens_used:(S.tokens?.total.input||0)+(S.tokens?.total.output||0),context_tokens:S.tokens?.context||0,cost_estimate:S.costs?.total_cost||0,total_messages:S.message_count,total_tool_calls:S.tool_call_count}:null;t="space-y-3",s=e&&k&&(0,a.jsx)("button",{onClick:k,className:"w-full rounded-lg border bg-subtle px-3 py-2 text-sm transition-colors hover:bg-subtle",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,a.jsxs)("span",{children:["\uD83D\uDCAC ",e.total_messages]}),(0,a.jsxs)("span",{children:["\uD83D\uDD27 ",e.total_tool_calls]}),(0,a.jsxs)("span",{title:"Context window: input tokens of this agent's latest LLM call",children:["\uD83E\uDDE0 ",eW(e.context_tokens)," ctx"]}),(0,a.jsxs)("span",{title:"Tokens processed: summed over every LLM call incl. sub-agents (each call re-sends its full prompt)",children:["\uD83E\uDE99 ",eW(e.tokens_used)," total"]})]})}),_[0]=S,_[1]=k,_[2]=t,_[3]=s}else t=_[2],s=_[3];return _[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)("span",{className:"text-gray-11",children:"Model:"}),_[4]=l):l=_[4],_[5]!==w.default_model_name?(r=(0,a.jsxs)("div",{className:"flex justify-between",children:[l,(0,a.jsx)("span",{className:"font-mono text-xs",children:w.default_model_name})]}),_[5]=w.default_model_name,_[6]=r):r=_[6],_[7]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)("span",{className:"text-gray-11",children:"Session ID:"}),_[7]=i):i=_[7],_[8]!==w.id?(c=(0,a.jsxs)("div",{className:"flex justify-between",children:[i,(0,a.jsx)("span",{className:"font-mono text-xs",children:w.id})]}),_[8]=w.id,_[9]=c):c=_[9],_[10]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsx)("span",{className:"text-gray-11",children:"Agent Type:"}),_[10]=o):o=_[10],_[11]!==w.agent_type?(d=(0,x.F9)(w.agent_type),_[11]=w.agent_type,_[12]=d):d=_[12],_[13]!==d?(m=(0,a.jsxs)("div",{className:"flex justify-between",children:[o,(0,a.jsx)("span",{className:"font-mono text-xs",children:d})]}),_[13]=d,_[14]=m):m=_[14],_[15]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsx)("span",{className:"text-gray-11",children:"Created:"}),_[15]=h):h=_[15],_[16]!==w.created_at?(u=(0,ee.o_)(w.created_at,(0,X.ol)()),_[16]=w.created_at,_[17]=u):u=_[17],_[18]!==u?(g=(0,a.jsxs)("div",{className:"flex justify-between",children:[h,(0,a.jsx)("span",{className:"text-xs",children:u})]}),_[18]=u,_[19]=g):g=_[19],_[20]===Symbol.for("react.memo_cache_sentinel")?(f=(0,a.jsx)("span",{className:"text-gray-11",children:"Updated:"}),_[20]=f):f=_[20],_[21]!==w.updated_at?(b=(0,ee.o_)(w.updated_at,(0,X.ol)()),_[21]=w.updated_at,_[22]=b):b=_[22],_[23]!==b?(y=(0,a.jsxs)("div",{className:"flex justify-between",children:[f,(0,a.jsx)("span",{className:"text-xs",children:b})]}),_[23]=b,_[24]=y):y=_[24],_[25]!==g||_[26]!==y||_[27]!==r||_[28]!==c||_[29]!==m?(v=(0,a.jsxs)("div",{className:"space-y-1 text-sm",children:[r,c,m,g,y]}),_[25]=g,_[26]=y,_[27]=r,_[28]=c,_[29]=m,_[30]=v):v=_[30],_[31]!==t||_[32]!==v||_[33]!==s?(N=(0,a.jsxs)("div",{className:t,children:[s,v]}),_[31]=t,_[32]=v,_[33]=s,_[34]=N):N=_[34],N}function eB(){let e,t,s,l,r,i,c,o,d,m,h,u,g,f,b=(0,n.c)(41),y=(0,p.GV)(j.CNd),v=(0,p.GV)(j.qy4),N=(0,p.GV)(j.Grd);if(v){let e;return b[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(P.A,{className:"mx-auto mb-3 size-8 animate-spin text-gray-10"}),(0,a.jsx)("p",{className:"text-sm text-gray-11",children:"Loading metrics…"})]})}),b[0]=e):e=b[0],e}if(N){let e,t,s;return b[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(F.A,{className:"mt-0.5 size-5 shrink-0 text-red-10"}),b[1]=e):e=b[1],b[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.jsx)("h4",{className:"mb-1 text-sm font-semibold text-red-11",children:"Failed to load metrics"}),b[2]=t):t=b[2],b[3]!==N?(s=(0,a.jsx)("div",{className:"rounded-lg border border-red-5 bg-red-2 p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[e,(0,a.jsxs)("div",{className:"flex-1",children:[t,(0,a.jsx)("p",{className:"text-xs text-red-11",children:N})]})]})}),b[3]=N,b[4]=s):s=b[4],s}
1return y?(b[5]!==y.created_at||b[6]!==y.updated_at||b[7]!==y.working_time_ms?(e=void 0!==y.working_time_ms&&(0,a.jsx)(eO,{timing:{total_working_time_ms:y.working_time_ms,total_working_time_seconds:y.working_time_ms/1e3,created_at:y.created_at,updated_at:y.updated_at}}),b[5]=y.created_at,b[6]=y.updated_at,b[7]=y.working_time_ms,b[8]=e):e=b[8],b[9]!==y.costs||b[10]!==y.tokens?.by_model?(t=y.costs&&Object.keys(y.costs.by_model).length>0&&(0,a.jsxs)(eq.Nt,{defaultOpen:!1,children:[(0,a.jsx)(eq.R6,{withArrow:!0,className:"text-sm font-medium text-gray-11",children:(0,a.jsx)("span",{children:"Cost Breakdown"})}),(0,a.jsx)(eq.Ke,{children:(0,a.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,a.jsxs)("div",{className:"rounded-lg bg-background p-4 shadow-ring-xs",children:[(0,a.jsxs)("div",{className:"text-2xl font-bold text-gray-12",children:["$",y.costs.total_cost.toFixed(4)]}),(0,a.jsx)("div",{className:"text-sm font-medium text-gray-11",children:"Total Cost"})]}),(0,a.jsx)(eN,{modelData:(0,x.LC)(y.costs.by_model,y.tokens?.by_model)})]})})]}),b[9]=y.costs,b[10]=y.tokens?.by_model,b[11]=t):t=b[11],b[12]!==y.cache_efficiency?(s=y.cache_efficiency&&y.cache_efficiency.total_cache_read_toks>0&&(0,a.jsx)(ef,{cacheData:y.cache_efficiency}),b[12]=y.cache_efficiency,b[13]=s):s=b[13],b[14]!==y.tools?(l=y.tools&&Object.keys(y.tools).length>0&&(0,a.jsx)(eE,{toolData:y.tools}),b[14]=y.tools,b[15]=l):l=b[15],b[16]!==y.message_count?(r=(0,a.jsx)("div",{className:"text-2xl font-bold text-gray-12",children:y.message_count}),b[16]=y.message_count,b[17]=r):r=b[17],b[18]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)("div",{className:"text-sm font-medium text-gray-11",children:"Messages"}),b[18]=i):i=b[18],b[19]!==r?(c=(0,a.jsxs)("div",{className:"rounded-lg bg-background p-4 shadow-ring-xs",children:[r,i]}),b[19]=r,b[20]=c):c=b[20],b[21]!==y.tool_call_count?(o=(0,a.jsx)("div",{className:"text-2xl font-bold text-gray-12",children:y.tool_call_count}),b[21]=y.tool_call_count,b[22]=o):o=b[22],b[23]===Symbol.for("react.memo_cache_sentinel")?(d=(0,a.jsx)("div",{className:"text-sm font-medium text-gray-11",children:"Tool Calls"}),b[23]=d):d=b[23],b[24]!==o?(m=(0,a.jsxs)("div",{className:"rounded-lg bg-background p-4 shadow-ring-xs",children:[o,d]}),b[24]=o,b[25]=m):m=b[25],b[26]!==y.tokens?(h=y.tokens&&(0,a.jsxs)("div",{className:"rounded-lg bg-background p-4 shadow-ring-xs",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-gray-12",children:eW(y.tokens.context)}),(0,a.jsx)("div",{className:"text-sm font-medium text-gray-11",children:"Context (last call)"})]}),b[26]=y.tokens,b[27]=h):h=b[27],b[28]!==y.tokens?(u=y.tokens&&(0,a.jsxs)("div",{className:"rounded-lg bg-background p-4 shadow-ring-xs",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-gray-12",children:eW(y.tokens.total.input)}),(0,a.jsx)("div",{className:"text-sm font-medium text-gray-11",children:"Input Tokens (all calls)"})]}),b[28]=y.tokens,b[29]=u):u=b[29],b[30]!==h||b[31]!==u||b[32]!==c||b[33]!==m?(g=(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-4",children:[c,m,h,u]}),b[30]=h,b[31]=u,b[32]=c,b[33]=m,b[34]=g):g=b[34],b[35]!==e||b[36]!==t||b[37]!==g||b[38]!==s||b[39]!==l?(f=(0,a.jsxs)("div",{className:"space-y-6",children:[e,t,s,l,g]}),b[35]=e,b[36]=t,b[37]=g,b[38]=s,b[39]=l,b[40]=f):f=b[40],f):null}function eQ(e){let t,s,l,r,i=(0,n.c)(8),{metadata:c,onViewFull:o}=e,{notes:d,reasoning:m}=c;if(!(d||m))return null;let x=eJ(d||m);return i[0]!==x?(t=(0,a.jsx)("div",{className:"rounded-lg border bg-subtle p-3",children:(0,a.jsx)("p",{className:"line-clamp-3 text-sm text-gray-11",children:x})}),i[0]=x,i[1]=t):t=i[1],i[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(ea.A,{className:"size-4"}),i[2]=s):s=i[2],i[3]!==o?(l=(0,a.jsxs)("button",{onClick:o,className:"flex w-full items-center justify-center gap-2 rounded-lg border border-gray-6 bg-background px-3 py-2 text-sm font-medium text-gray-11 transition-colors hover:bg-subtle",children:["View Full Notes",s]}),i[3]=o,i[4]=l):l=i[4],i[5]!==t||i[6]!==l?(r=(0,a.jsxs)("div",{className:"space-y-3",children:[t,l]}),i[5]=t,i[6]=l,i[7]=r):r=i[7],r}function eJ(e){if("string"==typeof e)return e.slice(0,200)+(e.length>200?"…":"");
1if(Array.isArray(e)&&e.length>0){let t=e[e.length-1];if("string"==typeof t)return t.slice(0,200)+(t.length>200?"…":"")}return"View notes"}function eY(e){let t,s,l,r,i,c,o,d,m,x=(0,n.c)(31),{metadata:h,onViewFull:u}=e,{entity_notes:g}=h;if(!g)return null;if(x[0]!==g||x[1]!==u){c=Symbol.for("react.early_return_sentinel");e:{let e,n,o,d,m,h="object"!=typeof g||Array.isArray(g)?[]:Object.entries(g);if(0===h.length){c=null;break e}r="overflow-hidden rounded-lg border bg-background",x[8]!==u?(e=()=>u(),x[8]=u,x[9]=e):e=x[9],x[10]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)("h3",{className:"text-sm font-semibold tracking-wide text-gray-10 uppercase",children:"Entity Notes"}),x[10]=n):n=x[10],x[11]!==h?(o=(0,a.jsx)("span",{className:"font-semibold text-gray-12",children:h.length}),x[11]=h,x[12]=o):o=x[12];let f=1===h.length?"entity":"entities";x[13]!==f?(d=(0,a.jsx)("span",{className:"text-gray-11",children:f}),x[13]=f,x[14]=d):d=x[14],x[15]!==d||x[16]!==o?(m=(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[o,d]}),x[15]=d,x[16]=o,x[17]=m):m=x[17],x[18]!==m||x[19]!==e?(i=(0,a.jsxs)("button",{onClick:e,className:"flex w-full items-center justify-between border-b bg-subtle p-3 text-left transition-colors hover:bg-subtle",children:[n,m]}),x[18]=m,x[19]=e,x[20]=i):i=x[20],l="max-h-[150px] overflow-y-auto",t="divide-y",s=h.map(e=>{let[t,s]=e,n=String(t.split(":")[0]||"Unknown"),l=String(t.split(":")[1]||"Unknown"),r=s.name?String(s.name):`${n} #${l}`;return(0,a.jsxs)(H.m_,{children:[(0,a.jsxs)(H.k$,{onClick:()=>u(t),className:"flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-violet-2",children:[(0,a.jsx)("div",{className:"rounded-sm bg-violet-4 px-1.5 py-0.5 text-xs font-medium text-violet-11",children:n}),(0,a.jsxs)("div",{className:"font-mono text-xs text-violet-10",children:["#",l]}),s.name&&(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs font-semibold text-violet-11",children:String(s.name)})]}),(0,a.jsx)(H.ZI,{className:"max-w-md",children:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"font-medium",children:r}),(0,a.jsxs)("div",{className:"text-xs text-gray-10",children:[n," #",l]})]})})]},t)})}x[0]=g,x[1]=u,x[2]=t,x[3]=s,x[4]=l,x[5]=r,x[6]=i,x[7]=c}else t=x[2],s=x[3],l=x[4],r=x[5],i=x[6],c=x[7];return c!==Symbol.for("react.early_return_sentinel")?c:(x[21]!==t||x[22]!==s?(o=(0,a.jsx)("div",{className:t,children:s}),x[21]=t,x[22]=s,x[23]=o):o=x[23],x[24]!==l||x[25]!==o?(d=(0,a.jsx)("div",{className:l,children:o}),x[24]=l,x[25]=o,x[26]=d):d=x[26],x[27]!==r||x[28]!==i||x[29]!==d?(m=(0,a.jsxs)("div",{className:r,children:[i,d]}),x[27]=r,x[28]=i,x[29]=d,x[30]=m):m=x[30],m)}function eZ(e){let t,s,l,r=(0,n.c)(8),{metadata:i}=e,{notes:c,reasoning:o}=i,d=eX;if(!(c||o)){let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-gray-10",children:[(0,a.jsx)(L.A,{className:"mb-3 size-12"}),(0,a.jsx)("p",{children:"No notes available for this session"})]}),r[0]=e):e=r[0],e}return r[1]!==c?(t=d(c,"Agent Notes","bg-subtle"),r[1]=c,r[2]=t):t=r[2],r[3]!==o?(s=d(o,"Current Reasoning","bg-indigo-2"),r[3]=o,r[4]=s):s=r[4],r[5]!==t||r[6]!==s?(l=(0,a.jsxs)("div",{className:"space-y-6",children:[t,s]}),r[5]=t,r[6]=s,r[7]=l):l=r[7],l}function eX(e,t,s){let n=void 0===s?"bg-subtle":s;return e?"string"==typeof e?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:t}),(0,a.jsx)("div",{className:(0,o.cn)("rounded-lg border p-4",n),children:(0,a.jsx)("div",{className:"prose prose-sm max-w-none",children:(0,a.jsx)(Y.oz,{remarkPlugins:[Z.A],children:e})})})]}):Array.isArray(e)?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:t}),(0,a.jsx)("div",{className:"space-y-2",children:e.map((e,t)=>(0,a.jsx)("div",{className:(0,o.cn)("rounded-lg border p-4",n),children:"string"==typeof e?(0,a.jsx)("div",{className:"prose prose-sm max-w-none",children:(0,a.jsx)(Y.oz,{remarkPlugins:[Z.A],children:e})}):(0,a.jsx)("div",{className:"font-mono text-sm",children:(0,a.jsx)(eU,{data:e,defaultInspectDepth:2})})},t))})]}):"object"==typeof e&&null!==e?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:t}),(0,a.jsx)("div",{className:(0,o.cn)("rounded-lg border p-4",n),children:(0,a.jsx)("div",{className:"font-mono text-sm",children:(0,a.jsx)(eU,{data:e,defaultInspectDepth:2})})})]}):null:null}function e0(e){let t,s,r,i,c,d,m,x=(0,n.c)(12),{metadata:h,scrollToEntityKey:u}=e,{entity_notes:g}=h;x[0]===Symbol.for("react.memo_cache_sentinel")?(t={},x[0]=t):t=x[0];let f=(0,l.useRef)(t);if(x[1]!==u?(s=()=>
1{if(u&&f.current[u]){let e=f.current[u];e&&(e.scrollIntoView({behavior:"instant",block:"start"}),e.classList.add("ring-2","ring-violet-6"))}},r=[u],x[1]=u,x[2]=s,x[3]=r):(s=x[2],r=x[3]),(0,l.useEffect)(s,r),x[4]!==g){d=Symbol.for("react.early_return_sentinel");e:{if(!g){let e;x[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-gray-10",children:[(0,a.jsx)(L.A,{className:"mb-3 size-12"}),(0,a.jsx)("p",{children:"No entity notes available for this session"})]}),x[8]=e):e=x[8],d=e;break e}i="space-y-6",c=((e,t,s)=>{let n=void 0===s?"bg-subtle":s;if(!e)return null;if("string"==typeof e)return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:t}),(0,a.jsx)("div",{className:(0,o.cn)("rounded-lg border p-4",n),children:(0,a.jsx)("div",{className:"prose prose-sm max-w-none",children:(0,a.jsx)(Y.oz,{remarkPlugins:[Z.A],children:e})})})]});if(Array.isArray(e))return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:t}),(0,a.jsx)("div",{className:"space-y-2",children:e.map((e,t)=>(0,a.jsx)("div",{className:(0,o.cn)("rounded-lg border p-4",n),children:"string"==typeof e?(0,a.jsx)("div",{className:"prose prose-sm max-w-none",children:(0,a.jsx)(Y.oz,{remarkPlugins:[Z.A],children:e})}):(0,a.jsx)("div",{className:"font-mono text-sm",children:(0,a.jsx)(eU,{data:e,defaultInspectDepth:2})})},t))})]});if("object"==typeof e&&null!==e){let s;return Object.keys(e).some(e3)?0===(s=Object.entries(e)).length?null:(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:"Entity Notes"}),(0,a.jsxs)("div",{className:"text-sm text-gray-10",children:[(0,a.jsx)("span",{children:s.length})," ",(0,a.jsx)("span",{children:1===s.length?"entity":"entities"})]})]}),(0,a.jsx)("div",{className:"space-y-4",children:s.map(e=>{let[t,s]=e,n=String(t.split(":")[0]||"Unknown"),l=String(t.split(":")[1]||"Unknown");return(0,a.jsx)("div",{ref:e=>{f.current[t]=e},className:"rounded-lg border border-violet-5 bg-violet-2 p-6 transition-all",children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"rounded-full bg-violet-4 px-3 py-1 text-sm font-medium text-violet-11",children:n}),(0,a.jsxs)("div",{className:"font-mono text-sm text-violet-10",children:["#",l]})]}),s.name&&(0,a.jsx)("div",{className:"space-y-2",children:(0,a.jsx)("h4",{className:"text-lg font-semibold text-violet-11",children:String(s.name)})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[s.source&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-violet-11",children:"Source"}),(0,a.jsx)("div",{className:"rounded-lg bg-background p-3 text-sm text-violet-11",children:String(s.source)})]}),s.operation_status&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-violet-11",children:"Status"}),(0,a.jsx)("div",{className:"rounded-lg bg-background p-3",children:(0,a.jsx)(q.E,{color:"Operational"===s.operation_status?"green":"red",size:1,children:String(s.operation_status)})})]})]}),s.price_info&&Array.isArray(s.price_info)&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-violet-11",children:"Price Information"}),(0,a.jsx)("div",{className:"space-y-2",children:s.price_info.map(e2)})]}),s.description&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-violet-11",children:"Description"}),(0,a.jsx)("div",{className:"rounded-lg bg-background p-4",children:(0,a.jsx)("div",{className:"prose prose-sm max-w-none text-gray-11",children:(0,a.jsx)(Y.oz,{remarkPlugins:[Z.A],children:String(s.description)})})})]}),Object.entries(s).map(e1)]})},t)})})]}):(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:t}),(0,a.jsx)("div",{className:(0,o.cn)("rounded-lg border p-4",n),children:(0,a.jsx)("div",{className:"font-mono text-sm",children:(0,a.jsx)(eU,{data:e,defaultInspectDepth:2})})})]})}return null}
1)(g,"Entity Notes","bg-violet-2")}x[4]=g,x[5]=i,x[6]=c,x[7]=d}else i=x[5],c=x[6],d=x[7];return d!==Symbol.for("react.early_return_sentinel")?d:(x[9]!==i||x[10]!==c?(m=(0,a.jsx)("div",{className:i,children:c}),x[9]=i,x[10]=c,x[11]=m):m=x[11],m)}function e1(e){let[t,s]=e;return["name","source","operation_status","price_info","description"].includes(t)?null:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-violet-11 capitalize",children:t.replace(/_/g," ")}),(0,a.jsx)("div",{className:"rounded-lg bg-background p-4",children:"string"==typeof s?(0,a.jsx)("div",{className:"text-sm text-gray-11",children:s}):(0,a.jsx)("div",{className:"font-mono text-sm",children:(0,a.jsx)(eU,{data:s,defaultInspectDepth:2})})})]},t)}function e2(e,t){return(0,a.jsx)("div",{className:"rounded-lg bg-background p-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 text-sm md:grid-cols-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-gray-11",children:"Check-in:"})," ",(0,a.jsx)("span",{className:"text-gray-12",children:String(e.checkin_date)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-gray-11",children:"Check-out:"})," ",(0,a.jsx)("span",{className:"text-gray-12",children:String(e.checkout_date)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-gray-11",children:"Price:"})," ",(0,a.jsx)("span",{className:"text-gray-12",children:String(e.lowest_price_per_night)})]})]})},t)}function e3(e){return e.includes("Hotel:")||e.includes("Entity:")||e.includes(":")}function e4(e){let t,s,r,i,c,d,m,x,h,u,g,f,p,j,b,y,v,N,_,w,k=(0,n.c)(41),{events:S,onViewFull:A}=e;k[0]!==S?(t=eH(S),k[0]=S,k[1]=t):t=k[1];let z=t,[C,T]=(0,l.useState)(!1),V=(0,l.useRef)(null);k[2]===Symbol.for("react.memo_cache_sentinel")?(s=[],k[2]=s):s=k[2];let I=(0,l.useRef)(s);k[3]!==z?.content?(r=z?.content??[],k[3]=z?.content,k[4]=r):r=k[4];let R=r;k[5]!==R?(i=R.filter(e7),k[5]=R,k[6]=i):i=k[6];let G=i;k[7]!==R?(c=R.filter(e6),k[7]=R,k[8]=c):c=k[8];let F=c;if(k[9]!==z||k[10]!==R?(d=()=>{if(z&&null!==V.current&&V.current!==z.id){T(!0),setTimeout(()=>T(!1),1e3);let e=R.findIndex(e5);-1!==e&&I.current[e]&&I.current[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})}z&&(V.current=z.id)},m=[z,R],k[9]=z,k[10]=R,k[11]=d,k[12]=m):(d=k[11],m=k[12]),(0,l.useEffect)(d,m),!z||0===z.content.length)return null;let $=C?"border-indigo-8 shadow-lg ring-2 shadow-blue-4 ring-blue-5":"border-gray-4 bg-background";return k[13]!==$?(x=(0,o.cn)("overflow-hidden rounded-lg border transition-all duration-500",$),k[13]=$,k[14]=x):x=k[14],k[15]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsx)("h3",{className:"text-sm font-semibold tracking-wide text-gray-10 uppercase",children:"Todos"}),k[15]=h):h=k[15],k[16]!==G.length?(u=(0,a.jsx)("span",{className:"font-semibold text-green-10",children:G.length}),k[16]=G.length,k[17]=u):u=k[17],k[18]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)("span",{className:"text-gray-11",children:" completed"}),k[18]=g):g=k[18],k[19]!==u?(f=(0,a.jsxs)("div",{children:[u,g]}),k[19]=u,k[20]=f):f=k[20],k[21]!==F.length?(p=(0,a.jsx)("span",{className:"font-semibold text-amber-11",children:F.length}),k[21]=F.length,k[22]=p):p=k[22],k[23]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)("span",{className:"text-gray-11",children:" pending"}),k[23]=j):j=k[23],k[24]!==p?(b=(0,a.jsxs)("div",{children:[p,j]}),k[24]=p,k[25]=b):b=k[25],k[26]!==f||k[27]!==b?(y=(0,a.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[f,b]}),k[26]=f,k[27]=b,k[28]=y):y=k[28],k[29]!==A||k[30]!==y?(v=(0,a.jsxs)("button",{onClick:A,className:"flex w-full items-center justify-between border-b bg-subtle p-3 text-left transition-colors hover:bg-subtle",children:[h,y]}),k[29]=A,k[30]=y,k[31]=v):v=k[31],k[32]!==A||k[33]!==R?(N=R.map((e,t)=>{let s="structured"===e.type?e.name:e.content,n="structured"===e.type?e.completed:e.complete;return(0,a.jsxs)(H.m_,{children:[(0,a.jsxs)(H.k$,{ref:e=>{I.current[t]=e},onClick:A,className:"flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-subtle",children:[n?(0,a.jsx)(en.A,{className:"size-3.5 shrink-0 text-gray-10"}):(0,a.jsx)("div",{className:"size-3.5 shrink-0 rounded-full border-2 border-gray-6"}),(0,a.jsx)("span",{className:(0,o.cn)("min-w-0 flex-1 truncate text-xs",n?"text-gray-10 line-through":"text-gray-12"),children:s})]}),(0,a.jsx)(H.ZI,{className:"max-w-md",children:s})]},t)}),k[32]=A,k[33]=R,k[34]=N):N=k[34],k[35]!==N?(_=(0,a.jsx)("div",{className:"max-h-[150px] overflow-y-auto",children:(0,a.jsx)("div",{className:"divide-y",children:N})}),k[35]=N,k[36]=_):_=k[36],k[37]!==v||k[38]!==_||k[39]!==x?(w=(0,a.jsxs)("div",{className:x,children:[v,_]}),k[37]=v,k[38]=_,k[39]=x,k[40]=w):w=k[40],w}function e5(e){return"structured"===e.type?!e.completed:!e.complete}function e6(e){return"structured"===e.type?!e.completed:!e.complete}function e7(e){return"structured"===e.type?e.completed:e.complete}function e8(e){let t,s,l,r,i,c=(0,n.c)(11),{metadata:o,onViewFull:d}=e,{current_step:m,progress:x}=o;return m||x?(c[0]!==m?(t=m&&(0,a.jsxs)("div",{className:"rounded-lg border bg-yellow-2 p-3",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-yellow-12",children:"Current Step"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-yellow-11",children:m})]}),c[0]=m,c[1]=t):t=c[1],c[2]!==x?(s=x&&(0,a.jsx)("div",{className:"rounded-lg border bg-background p-3",children:(0,a.jsxs)("div",{className:"space-y-2 text-sm",children:[void 0!==x.steps_completed&&void 0!==x.total_steps&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Steps:"}),(0,a.jsxs)("span",{className:"font-medium",children:[x.steps_completed," / ",x.total_steps]})]}),x.current_phase&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Phase:"}),(0,a.jsx)("span",{className:"font-medium",children:x.current_phase})]})]})}),c[2]=x,c[3]=s):s=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(ea.A,{className:"size-4"}),c[4]=l):l=c[4],c[5]!==d?(r=(0,a.jsxs)("button",{onClick:d,className:"flex w-full items-center justify-center gap-2 rounded-lg border border-gray-6 bg-background px-3 py-2 text-sm font-medium text-gray-11 transition-colors hover:bg-subtle",children:["View Full Progress",l]}),c[5]=d,c[6]=r):r=c[6],c[7]!==t||c[8]!==s||c[9]!==r?(i=(0,a.jsxs)("div",{className:"space-y-3",children:[t,s,r]}),c[7]=t,c[8]=s,c[9]=r,c[10]=i):i=c[10],i):null}function e9(e){let t,s,l,r,i=(0,n.c)(11),{metadata:c}=e,{current_step:o,progress:d,decisions:m}=c;if(!(o||d||m&&m.length>0)){let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-gray-10",children:[(0,a.jsx)(k.A,{className:"mb-3 size-12"}),(0,a.jsx)("p",{children:"No progress information available"})]}),i[0]=e):e=i[0],e}return i[1]!==o?(t=o&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:"Current Step"}),(0,a.jsx)("div",{className:"rounded-lg border bg-yellow-2 p-4",children:(0,a.jsx)("p",{className:"text-sm",children:o})})]}),i[1]=o,i[2]=t):t=i[2],i[3]!==d?(s=d&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:"Progress Summary"}),(0,a.jsx)("div",{className:"rounded-lg border bg-background p-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 text-sm",children:[void 0!==d.steps_completed&&void 0!==d.total_steps&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Steps:"}),(0,a.jsxs)("span",{children:[d.steps_completed," / ",d.total_steps]})]}),d.current_phase&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Phase:"}),(0,a.jsx)("span",{children:d.current_phase})]})]})})]}),i[3]=d,i[4]=s):s=i[4],i[5]!==m?(l=m&&m.length>0&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:"Decision History"}),(0,a.jsx)("div",{className:"space-y-3",children:m.map(te)})]}
1),i[5]=m,i[6]=l):l=i[6],i[7]!==t||i[8]!==s||i[9]!==l?(r=(0,a.jsxs)("div",{className:"space-y-6",children:[t,s,l]}),i[7]=t,i[8]=s,i[9]=l,i[10]=r):r=i[10],r}function te(e,t){return(0,a.jsx)("div",{className:"rounded-lg border bg-background p-4",children:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h4",{className:"text-sm font-medium",children:e.step}),e.timestamp&&(0,a.jsx)("span",{className:"text-xs text-gray-10",children:(0,ee.o_)((0,X.qi)(e.timestamp),(0,X.ol)())})]}),(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsxs)("p",{className:"mb-2",children:[(0,a.jsx)("strong",{children:"Decision:"})," ",e.decision]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Reasoning:"})," ",e.reasoning]})]})]})},t)}function tt(e){let t,s,l=(0,n.c)(19),{events:r}=e;if(l[0]!==r){s=Symbol.for("react.early_return_sentinel");e:{let e,n,i,c,o,d,m,x,h=eH(r);if(!h||0===h.content.length){let e;l[3]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-gray-10",children:[(0,a.jsx)(L.A,{className:"mb-3 size-12"}),(0,a.jsx)("p",{children:"No todos available for this session"})]}),l[3]=e):e=l[3],s=e;break e}let u=h.content,g=u.filter(tl),f=u.filter(tn);l[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("div",{className:"text-sm font-medium text-gray-11",children:"Total"}),l[4]=e):e=l[4];let p=(0,a.jsxs)("div",{className:"rounded-lg bg-background p-4 text-center shadow-ring-xs",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-gray-12",children:u.length}),e]});l[5]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)("div",{className:"text-sm font-medium text-green-11",children:"Completed"}),l[5]=n):n=l[5];let j=(0,a.jsxs)("div",{className:"rounded-lg bg-green-2 p-4 text-center shadow-ring-xs",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-green-10",children:g.length}),n]});l[6]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)("div",{className:"text-sm font-medium text-amber-11",children:"Pending"}),l[6]=i):i=l[6];let b=(0,a.jsxs)("div",{className:"rounded-lg bg-amber-2 p-4 text-center shadow-ring-xs",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-amber-11",children:f.length}),i]});l[7]!==p||l[8]!==j||l[9]!==b?(c=(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[p,j,b]}),l[7]=p,l[8]=j,l[9]=b,l[10]=c):c=l[10],l[11]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsx)("span",{className:"font-medium text-gray-12",children:"Overall Progress"}),l[11]=o):o=l[11];let y=Math.round(g.length/u.length*100);l[12]!==y?(d=(0,a.jsxs)("div",{className:"flex justify-between text-sm",children:[o,(0,a.jsxs)("span",{className:"text-gray-11",children:[y,"%"]})]}),l[12]=y,l[13]=d):d=l[13];let v=`${g.length/u.length*100}%`;l[14]!==v?(m=(0,a.jsx)("div",{className:"h-2 w-full rounded-full bg-gray-4",children:(0,a.jsx)("div",{className:"h-2 rounded-full bg-green-10",style:{width:v}})}),l[14]=v,l[15]=m):m=l[15],l[16]!==d||l[17]!==m?(x=(0,a.jsxs)("div",{className:"space-y-2",children:[d,m]}),l[16]=d,l[17]=m,l[18]=x):x=l[18],t=(0,a.jsxs)("div",{className:"space-y-6",children:[c,x,f.length>0&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("h3",{className:"flex items-center gap-2 font-medium text-gray-12",children:[(0,a.jsx)(el.A,{className:"size-4 text-amber-11"}),"Pending Tasks (",f.length,")"]}),(0,a.jsx)("div",{className:"space-y-2",children:f.map(ta)})]}),g.length>0&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("h3",{className:"flex items-center gap-2 font-medium text-gray-12",children:[(0,a.jsx)(en.A,{className:"size-4 text-green-9"}),"Completed Tasks (",g.length,")"]}),(0,a.jsx)("div",{className:"space-y-2",children:g.map(ts)})]})]})}l[0]=r,l[1]=t,l[2]=s}else t=l[1],s=l[2];return s!==Symbol.for("react.early_return_sentinel")?s:t}function ts(e,t){let s="structured"===e.type?e.name:e.content;return(0,a.jsx)("div",{className:"rounded-lg border border-gray-4 bg-background p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(en.A,{className:"mt-1 size-4 text-gray-10"}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)("p",{className:"font-medium text-gray-10",children:s})})]})},t)}function ta(e,t){let s="structured"===e.type?e.name:e.content;return(0,a.jsx)("div",{className:"rounded-lg border border-gray-4 bg-background p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"mt-1 size-2 roun
1ded-full bg-gray-8"}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)("p",{className:"font-medium text-gray-12",children:s})})]})},t)}function tn(e){return"structured"===e.type?!e.completed:!e.complete}function tl(e){return"structured"===e.type?e.completed:e.complete}function tr(e){let t,s=(0,n.c)(2),{sessionId:l}=e;return s[0]!==l?(t=(0,a.jsx)(e$,{sessionId:l}),s[0]=l,s[1]=t):t=s[1],t}function ti(e){let t,s,l,r,i,c,o,d,m,x,h,u,g,f,b,y,v,N,_=(0,n.c)(53),{sessionId:w}=e,k=(0,p.GV)(es.zF);_[0]!==w?(t=e=>(0,j.BbZ)(e,w),_[0]=w,_[1]=t):t=_[1];let S=(0,p.GV)(t);if(!k){let e,t,s,n,l;_[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(ec.A,{className:"size-4 shrink-0 text-indigo-10"}),_[2]=e):e=_[2],_[3]!==w?(t=(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e,(0,a.jsxs)("span",{className:"font-mono text-sm text-gray-12",children:["#",w]})]}),_[3]=w,_[4]=t):t=_[4];let r=`/playground/${w}`;return _[5]===Symbol.for("react.memo_cache_sentinel")?(s={name:"goto"},_[5]=s):s=_[5],_[6]!==r?(n=(0,a.jsx)(D.$,{href:r,target:"_blank",variant:"ghost",size:"xs",iconAfter:s}),_[6]=r,_[7]=n):n=_[7],_[8]!==t||_[9]!==n?(l=(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 transition-colors hover:bg-subtle",children:[t,n]}),_[8]=t,_[9]=n,_[10]=l):l=_[10],l}if(S?.loading&&!S?.metrics){let e;return _[11]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("div",{className:"flex items-center justify-center p-3 text-sm text-gray-10",children:[(0,a.jsx)(eD.R,{size:4,className:"mr-2"}),"Loading…"]}),_[11]=e):e=_[11],e}if(S?.error){let e;return _[12]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("div",{className:"p-3 text-sm text-red-10",children:"Error loading sub-agent metrics"}),_[12]=e):e=_[12],e}if(!S?.metrics)return null;let A=S.metrics,z=A.todos.total>0?A.todos.completed/A.todos.total*100:0,C=A.title||`Sub-Agent #${w}`;if(_[13]!==A.agent_type){var T;s=(T=A.agent_type).includes("HotelCompareAgent")?er.A:T.includes("FlightSubAgent")?ec.A:T.includes("ResearchQuestionAgent")?L.A:ec.A,_[13]=A.agent_type,_[14]=s}else s=_[14];let V=s;_[15]!==V?(l=(0,a.jsx)(V,{className:"size-4 shrink-0 text-indigo-10"}),_[15]=V,_[16]=l):l=_[16],_[17]!==C?(r=(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-12",children:C}),_[17]=C,_[18]=r):r=_[18],_[19]!==l||_[20]!==r?(i=(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[l,r]}),_[19]=l,_[20]=r,_[21]=i):i=_[21];let I=`/playground/${w}`;_[22]===Symbol.for("react.memo_cache_sentinel")?(c={name:"goto"},_[22]=c):c=_[22],_[23]!==I?(o=(0,a.jsx)(D.$,{href:I,target:"_blank",variant:"ghost",size:"xs",iconAfter:c}),_[23]=I,_[24]=o):o=_[24],_[25]!==i||_[26]!==o?(d=(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[i,o]}),_[25]=i,_[26]=o,_[27]=d):d=_[27],_[28]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)("span",{className:"text-4xs text-gray-10",children:"Mode:"}),_[28]=m):m=_[28],_[29]!==A.current_mode?(x=function(e){switch(e){case"plan":return"plum";case"working":case"research":return"blue";case"complete":return"green";case"escalated":return"amber";default:return"gray"}}(A.current_mode),_[29]=A.current_mode,_[30]=x):x=_[30],_[31]!==A.current_mode||_[32]!==x?(h=(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[m,(0,a.jsx)(q.E,{color:x,size:1,children:A.current_mode})]}),_[31]=A.current_mode,_[32]=x,_[33]=h):h=_[33],_[34]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsx)("span",{className:"text-4xs text-gray-10",children:"Job Status:"}),_[34]=u):u=_[34],_[35]!==A.status?(g=function(e){switch(e){case"ready":return"green";case"pending":default:return"gray";case"working":return"blue";case"error":return"red"}}(A.status),_[35]=A.status,_[36]=g):g=_[36],_[37]!==A.status||_[38]!==g?(f=(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[u,(0,a.jsx)(q.E,{color:g,size:1,children:A.status})]}),_[37]=A.status,_[38]=g,_[39]=f):f=_[39],_[40]!==A.todos.completed||_[41]!==A.todos.total?(b=(0,a.jsxs)("span",{className:"text-xs text-gray-11",children:[A.todos.completed,"/",A.todos.total," todos"]}),_[40]=A.todos.completed,_[41]=A.todos.total,_[42]=b):b=_[42],_[43]!==h||_[44]!==f||_[45]!==b?(y=(0,a.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[h,f,b]}),_[43]=h,_[44]=f,_[45]=b,_[46]=y):y=_[46];let R=`${z}%`;return _[47]!==R?(v=(0,a.jsx)("div",{className:"h-1.5 w-full rounded-full bg-gray-4",children:(0,a.jsx)("div",{className:"h-1.5 rounded-full bg-indigo-9 transition-all duration-300",style:{width:R}})}),_[47]=R,_[48]=v):v=_[48],_[49]!==y||_[50]!==v||_[51]!==d?(N=(0,a.jsxs)("div",{className:"p-3 transition-colors hover:bg-subtle",children:[d,y,v]}),_[49]=y,_[50]=v,_[51]=d,_[52]=N):N=_[52],N}function tc(e){let t,s,l,r,i,c=(0,n.c)(10),{subAgentIds:o}=e;return 0===o.length?null:(c[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.jsx)("h3",{className:"text-sm font-semibold tracking-wide text-gray-10 uppercase",children:"Sub-Agents"}),c[0]=t):t=c[0],c[1]!==o.length?(s=(0,a.jsxs)("div",{className:"flex items-center justify-between border-b bg-subtle p-3",children:[t,(0,a.jsxs)("div",{className:"text-xs text-gray-11",children:[o.length," active"]})]}),c[1]=o.length,c[2]=s):s=c[2],c[3]!==o?(l=o.map(to),c[3]=o,c[4]=l):l=c[4],c[5]!==l?(r=(0,a.jsx)("div",{className:"max-h-[300px] overflow-y-auto",children:(0,a.jsx)("div",{className:"divide-y",children:l})}),c[5]=l,c[6]=r):r=c[6],c[7]!==s||c[8]!==r?(i=(0,a.jsxs)("div",{className:"overflow-hidden rounded-lg border border-gray-4 bg-background",children:[s,r]}),c[7]=s,c[8]=r,c[9]=i):i=c[9],i)}function to(e){return(0,a.jsx)(ti,{sessionId:e},e)}function td(e){let t,s,l=(0,n.c)(3),{data:r}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.jsx)("h3",{className:"font-medium text-gray-12",children:"Raw Data"}),l[0]=t):t=l[0],l[1]!==r?(s=(0,a.jsxs)("div",{className:"space-y-3",children:[t,(0,a.jsx)("div",{className:"rounded-lg border bg-subtle p-4",children:(0,a.jsx)(eU,{data:r,defaultInspectDepth:2})})]}),l[1]=r,l[2]=s):s=l[2],s}function tm(e){let t=[];return eu(e.strategy)&&e.proposed_resolution&&t.push(`${e.strategy} with a resolution — the card has nowhere to send them`),eu(e.strategy)||0!==e.actions.length||t.push("Needs someone contacted, but we resolved no phone or site"),eu(e.strategy)||e.actions.some(e=>
1"call_place"===e.type)||t.push("No dialable number — degraded to a link"),e.facts?.length||t.push("No facts — nothing to quote under the headline"),t}function tx(e){let{action:t,tripRef:s,primary:n}=e,r=(0,p.jL)(),i=(0,u.r)(),[c,o]=(0,l.useState)(!1),d=n?"primary":"outline";switch(t.type){case"call_place":return(0,a.jsxs)(D.$,{variant:d,size:"sm",href:`tel:${t.context.phone_number??""}`,children:[(0,a.jsx)(ei.A,{className:"size-3.5"}),t.label]});case"open_url":return(0,a.jsxs)(D.$,{variant:d,size:"sm",href:t.context.url??"#",target:"_blank",rel:"noopener noreferrer",children:[(0,a.jsx)(E.A,{className:"size-3.5"}),t.label]});case"create_chat":return(0,a.jsx)(D.$,{variant:d,size:"sm",disabled:c,onClick:async()=>{let e=t.context.prompt;if(e&&s){o(!0);try{await r((0,et.Bt)({tripRef:s,messageString:e,router:i})).unwrap()}finally{o(!1)}}},children:c?"Opening…":t.label});default:return null}}let th={high:"bg-red-3 text-red-11",medium:"bg-amber-3 text-amber-11",low:"bg-green-3 text-green-11"};function tu(e){return[e.itinerary_event_id??"disruption",e.related_event_ids?.join(",")??"",e.conflict_kind,e.strategy,e.headline].join(":")}function tg(e){let t,s,l,r,i,c,o,d,m,x,h,u,g,f,p,j,b,y,v,N,_,w,k,A,z,C=(0,n.c)(83),{finding:T,tripRef:V}=e;C[0]!==T.conflict_kind?(t=em[T.conflict_kind??""]??{label:"Plan",icon:"info"},C[0]=T.conflict_kind,C[1]=t):t=C[1];let I=t;C[2]!==T.strategy?(s=eu(T.strategy),C[2]=T.strategy,C[3]=s):s=C[3];let R=s;if(C[4]!==I.icon||C[5]!==I.label||C[6]!==T||C[7]!==R||C[8]!==V){let e,t,s,n,h,u,g=tm(T);C[17]!==T.related_event_ids?(e=T.related_event_ids?.length?` (+ ${T.related_event_ids.join(", ")})`:"",C[17]=T.related_event_ids,C[18]=e):e=C[18];let f=e;l=`${T.itinerary_event_id??"— disruption-created need"}${f}`,r="rounded-xl border border-gray-5 bg-background p-4",C[19]!==I.icon?(t=(0,a.jsx)(ex,{name:I.icon}),C[19]=I.icon,C[20]=t):t=C[20];let p=`${R?"Good to know":"Needs you"} \xb7 ${I.label}`;C[21]!==p?(s=(0,a.jsx)("span",{children:p}),C[21]=p,C[22]=s):s=C[22];let j=`ml-auto rounded-full px-1.5 py-0.5 tracking-wide ${th[T.severity]}`;if(C[23]!==T.severity||C[24]!==j?(n=(0,a.jsx)("span",{className:j,children:T.severity}),C[23]=T.severity,C[24]=j,C[25]=n):n=C[25],C[26]!==t||C[27]!==s||C[28]!==n?(i=(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-2xs font-medium tracking-widest text-gray-10 uppercase",children:[t,s,n]}),C[26]=t,C[27]=s,C[28]=n,C[29]=i):i=C[29],C[30]!==T.headline?(c=(0,a.jsx)("h4",{className:"mt-2 text-base leading-snug font-semibold text-gray-12",children:T.headline}),C[30]=T.headline,C[31]=c):c=C[31],C[32]!==T.deciding_facts?(o=(0,a.jsx)("p",{className:"mt-1 text-sm text-gray-11",children:T.deciding_facts}),C[32]=T.deciding_facts,C[33]=o):o=C[33],C[34]!==T.facts?(d=T.facts&&T.facts.length>0&&(0,a.jsx)("div",{className:"mt-3 rounded-lg bg-subtle px-3 py-2 font-mono text-2xs text-gray-11",children:T.facts.map(tp).join("  \xb7  ")}),C[34]=T.facts,C[35]=d):d=C[35],C[36]!==T.actions||C[37]!==V){let e;C[39]!==V?(e=(e,t)=>{let s;return(0,a.jsx)(tx,{action:e,tripRef:V,primary:0===t},(s="context"in e?JSON.stringify(e.context??null):"",[e.type,e.label,s].join(":")))},C[39]=V,C[40]=e):e=C[40],h=T.actions.map(e),C[36]=T.actions,C[37]=V,C[38]=h}else h=C[38];C[41]!==T.actions.length?(u=0===T.actions.length&&(0,a.jsx)("span",{className:"text-2xs text-gray-10",children:"No resolvable action"}),C[41]=T.actions.length,C[42]=u):u=C[42],C[43]!==h||C[44]!==u?(m=(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[h,u]}),C[43]=h,C[44]=u,C[45]=m):m=C[45],x=g.length>0&&(0,a.jsx)("ul",{className:"mt-3 space-y-1 border-t border-gray-4 pt-3",children:g.map(tf)}),C[4]=I.icon,C[5]=I.label,C[6]=T,C[7]=R,C[8]=V,C[9]=l,C[10]=r,C[11]=i,C[12]=c,C[13]=o,C[14]=d,C[15]=m,C[16]=x}else l=C[9],r=C[10],i=C[11],c=C[12],o=C[13],d=C[14],m=C[15],x=C[16];return C[46]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsxs)(eq.R6,{className:"mt-3 flex w-full items-center gap-1.5 text-2xs font-medium tracking-wide text-gray-10 uppercase",children:[(0,a.jsx)(S.A,{className:"size-3 transition-transform in-data-panel-open:rotate-90"}),"Evidence"]}),C[46]=h):h=C[46],C[47]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsx)("dt",{className:"text-gray-10",children:"Severity"}),C[47]=u):u=C[47],C[48]!==T.severity?(g=(0,a.jsx)("dd",{className:"text-gray-12",children:T.severity}),C[48]=T.severity,C[49]=g):g=C[49],C[50]===Symbol.for("react.memo_cache_sentinel")?(f=(0,a.jsx)("dt",{className:"text-gray-10",children:"Strategy"}),C[50]=f):f=C[50],C[51]!==T.strategy?(p=(0,a.jsx)("dd",{className:"text-gray-12",children:T.strategy}),C[51]=T.strategy,C[52]=p):p=C[52],C[53]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)("dt",{className:"text-gray-10",children:"Actor"}),C[53]=j):j=C[53],C[54]!==T.actor?(b=(0,a.jsx)("dd",{className:"text-gray-12",children:T.actor}),C[54]=T.actor,C[55]=b):b=C[55],C[56]===Symbol.for("react.memo_cache_sentinel")?(y=(0,a.jsx)("dt",{className:"text-gray-10",children:"Event"}),C[56]=y):y=C[56],C[57]!==l?(v=(0,a.jsx)("dd",{className:"text-gray-12",children:l}),C[57]=l,C[58]=v):v=C[58],C[59]===Symbol.for("react.memo_cache_sentinel")?(N=(0,a.jsx)("dt",{className:"text-gray-10",children:"Why"}),C[59]=N):N=C[59],C[60]!==T.why?(_=(0,a.jsx)("dd",{className:"text-gray-12",children:T.why}
1),C[60]=T.why,C[61]=_):_=C[61],C[62]!==T.proposed_resolution?(w=T.proposed_resolution&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("dt",{className:"text-gray-10",children:"Resolution"}),(0,a.jsx)("dd",{className:"text-gray-12",children:T.proposed_resolution})]}),C[62]=T.proposed_resolution,C[63]=w):w=C[63],C[64]!==T.prompt?(k=T.prompt&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("dt",{className:"text-gray-10",children:"Sends"}),(0,a.jsx)("dd",{className:"text-gray-12 italic",children:`“${T.prompt}”`})]}),C[64]=T.prompt,C[65]=k):k=C[65],C[66]!==g||C[67]!==p||C[68]!==b||C[69]!==v||C[70]!==_||C[71]!==w||C[72]!==k?(A=(0,a.jsxs)(eq.Nt,{children:[h,(0,a.jsx)(eq.Ke,{children:(0,a.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 pt-3 text-xs",children:[u,g,f,p,j,b,y,v,N,_,w,k]})})]}),C[66]=g,C[67]=p,C[68]=b,C[69]=v,C[70]=_,C[71]=w,C[72]=k,C[73]=A):A=C[73],C[74]!==A||C[75]!==r||C[76]!==i||C[77]!==c||C[78]!==o||C[79]!==d||C[80]!==m||C[81]!==x?(z=(0,a.jsxs)("div",{className:r,children:[i,c,o,d,m,x,A]}),C[74]=A,C[75]=r,C[76]=i,C[77]=c,C[78]=o,C[79]=d,C[80]=m,C[81]=x,C[82]=z):z=C[82],z}function tf(e){return(0,a.jsxs)("li",{className:"flex items-start gap-1.5 text-2xs text-amber-11",children:[(0,a.jsx)(F.A,{className:"mt-px size-3 shrink-0"}),e]},e)}function tp(e){return`${e.label}: ${e.value}`}function tj(e){return{decisions:e.filter(e=>!eu(e.strategy)),awareness:e.filter(e=>eu(e.strategy))}}function tb(e){let t,s,l,r,i,c,o,d,m,x,h=(0,n.c)(23),{triage:u,onViewFull:g}=e;h[0]!==u.findings?(t=tj(u.findings),h[0]=u.findings,h[1]=t):t=h[1];let{decisions:f,awareness:p}=t;h[2]!==u.findings?(s=u.findings.filter(ty),h[2]=u.findings,h[3]=s):s=h[3];let j=s.length;h[4]!==u.summary?(l=u.summary&&(0,a.jsx)("p",{className:"text-sm text-gray-11",children:u.summary}),h[4]=u.summary,h[5]=l):l=h[5];let b=`${f.length} decisions`;return h[6]!==b?(r=(0,a.jsx)(q.E,{color:"primary",size:2,children:b}),h[6]=b,h[7]=r):r=h[7],h[8]!==p.length?(i=p.length>0&&(0,a.jsx)(q.E,{color:"gray",size:2,children:`${p.length} awareness`}),h[8]=p.length,h[9]=i):i=h[9],h[10]!==j?(c=j>0&&(0,a.jsx)(q.E,{color:"amber",size:2,children:`${j} to fix`}),h[10]=j,h[11]=c):c=h[11],h[12]!==r||h[13]!==i||h[14]!==c?(o=(0,a.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[r,i,c]}),h[12]=r,h[13]=i,h[14]=c,h[15]=o):o=h[15],h[16]===Symbol.for("react.memo_cache_sentinel")?(d=(0,a.jsx)(ea.A,{className:"size-4"}),h[16]=d):d=h[16],h[17]!==g?(m=(0,a.jsxs)("button",{onClick:g,className:"flex w-full items-center justify-center gap-2 rounded-lg border border-gray-6 bg-background px-3 py-2 text-sm font-medium text-gray-11 transition-colors hover:bg-subtle",children:["View Queue",d]}),h[17]=g,h[18]=m):m=h[18],h[19]!==m||h[20]!==l||h[21]!==o?(x=(0,a.jsxs)("div",{className:"space-y-3",children:[l,o,m]}),h[19]=m,h[20]=l,h[21]=o,h[22]=x):x=h[22],x}function ty(e){return tm(e).length>0}function tv(e){let t,s,l,r,i,c,o=(0,n.c)(16),{triage:d}=e;if(o[0]!==d.findings||o[1]!==d.summary||o[2]!==d.trip_ref){i=Symbol.for("react.early_return_sentinel");e:{let{decisions:e,awareness:n}=tj(d.findings);if(0===d.findings.length){let e;o[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("div",{className:"p-8 text-center text-gray-10",children:"This triage reported no findings — the disruption broke nothing."}),o[8]=e):e=o[8],i=e;break e}t="mx-auto max-w-2xl space-y-6 p-4",o[9]!==d.summary?(s=d.summary&&(0,a.jsx)("div",{className:"rounded-xl border border-gray-5 bg-subtle p-4 text-sm text-gray-11",children:d.summary}),o[9]=d.summary,o[10]=s):s=o[10],l=e.length>0&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"text-2xs font-semibold tracking-widest text-gray-10 uppercase",children:"Decisions"}),e.map(e=>(0,a.jsx)(tg,{finding:e,tripRef:d.trip_ref},tu(e)))]}),r=n.length>0&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"text-2xs font-semibold tracking-widest text-gray-10 uppercase",children:"Awareness"}),n.map(e=>(0,a.jsx)(tg,{finding:e,tripRef:d.trip_ref},tu(e)))]})}o[0]=d.findings,o[1]=d.summary,o[2]=d.trip_ref,o[3]=t,o[4]=s,o[5]=l,o[6]=r,o[7]=i}else t=o[3],s=o[4],l=o[5],r=o[6],i=o[7];return i!==Symbol.for("react.early_return_sentinel")?i:(o[11]!==t||o[12]!==s||o[13]!==l||o[14]!==r?(c=(0,a.jsxs)("div",{className:t,children:[s,l,r]}),o[11]=t,o[12]=s,o[13]=l,o[14]=r,o[15]=c):c=o[15],c)}var tN=s(93965),t_=s(69244),tw=s(26918),tk=s(36683);function tS(){let e,t,s,l,r,i,c,o,d,m,x,h,g,f,y,v,N,_,w,k,S,A,z,C,T,V,I,R,G,F,$,E,M,L,P,O,q,U,H,W,K,B,Q,J,Y,Z,X,ee,et,es,ea=(0,n.c)(132),en=(0,p.jL)(),el=(0,u.r)(),er=(0,p.GV)(j.yvA),ei=(0,p.GV)(j.c0A);e:{let t,s;if(!er.agentType||ei.some(e=>
1e.name===er.agentType)){e=ei;break e}ea[0]!==er.agentType?(t={name:er.agentType,label:er.agentType,type:"full_agent"},ea[0]=er.agentType,ea[1]=t):t=ea[1],ea[2]!==ei||ea[3]!==t?(s=[...ei,t],ea[2]=ei,ea[3]=t,ea[4]=s):s=ea[4],e=s}let ec=e;ea[5]!==en||ea[6]!==er.loading?(t=()=>{er.loading||en((0,j.rmi)())},ea[5]=en,ea[6]=er.loading,ea[7]=t):t=ea[7];let eo=t;ea[8]!==en||ea[9]!==el?(s=()=>{en((0,b.mE)({router:el}))},ea[8]=en,ea[9]=el,ea[10]=s):s=ea[10];let ed=s;ea[11]!==er.feedback||ea[12]!==er.initialMessage||ea[13]!==er.isResultGood?(l=er.initialMessage.trim().length>0&&("yes"===er.isResultGood||er.feedback.trim().length>0),ea[11]=er.feedback,ea[12]=er.initialMessage,ea[13]=er.isResultGood,ea[14]=l):l=ea[14];let em=l,ex=er.open;ea[15]!==eo?(r=e=>e||eo(),ea[15]=eo,ea[16]=r):r=ea[16],ea[17]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(eR.c7,{children:(0,a.jsx)(eR.L3,{children:"Generate Eval from Session"})}),ea[17]=i):i=ea[17],ea[18]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsx)("h3",{className:"text-sm font-semibold text-gray-12",children:"Context"}),o=(0,a.jsx)(tw.J,{htmlFor:"gen-agent-type",children:"Agent Type"}),ea[18]=c,ea[19]=o):(c=ea[18],o=ea[19]);let eh=er.agentType;ea[20]!==en?(d=e=>e?en((0,j.QOK)({field:"agentType",value:e})):void 0,ea[20]=en,ea[21]=d):d=ea[21];let eu=er.loading;ea[22]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(eG.bq,{size:"md",className:"mt-2 rounded-md",children:(0,a.jsx)(eG.yv,{placeholder:"Select agent type"})}),ea[22]=m):m=ea[22],ea[23]!==ec?(x=ec.map(tA),ea[23]=ec,ea[24]=x):x=ea[24],ea[25]!==x?(h=(0,a.jsx)(eG.gC,{children:x}),ea[25]=x,ea[26]=h):h=ea[26],ea[27]!==er.agentType||ea[28]!==er.loading||ea[29]!==d||ea[30]!==h?(g=(0,a.jsxs)("div",{children:[o,(0,a.jsxs)(eG.l6,{value:eh,onValueChange:d,disabled:eu,children:[m,h]})]}),ea[27]=er.agentType,ea[28]=er.loading,ea[29]=d,ea[30]=h,ea[31]=g):g=ea[31],ea[32]===Symbol.for("react.memo_cache_sentinel")?(f=(0,a.jsx)(tw.J,{htmlFor:"gen-initial-message",children:"Initial Message"}),y=(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-10",children:"Edit this if you want the generated eval prompt to differ from the original session opener."}),ea[32]=f,ea[33]=y):(f=ea[32],y=ea[33]),ea[34]!==en?(v=e=>en((0,j.QOK)({field:"initialMessage",value:e.target.value})),ea[34]=en,ea[35]=v):v=ea[35],ea[36]!==er.initialMessage||ea[37]!==er.loading||ea[38]!==v?(N=(0,a.jsxs)("div",{children:[f,y,(0,a.jsx)(tN.V,{id:"gen-initial-message",value:er.initialMessage,onChange:v,placeholder:"The initial user message…",rows:3,disabled:er.loading,className:"mt-2 block w-full rounded-md border border-gray-4 bg-background px-3 py-2 text-sm text-gray-12 placeholder:text-gray-10 focus:border-gray-9 focus:outline-hidden"})]}),ea[36]=er.initialMessage,ea[37]=er.loading,ea[38]=v,ea[39]=N):N=ea[39],ea[40]!==g||ea[41]!==N?(_=(0,a.jsxs)("div",{className:"space-y-4 rounded-lg border border-gray-4 p-4",children:[c,g,N]}),ea[40]=g,ea[41]=N,ea[42]=_):_=ea[42],ea[43]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsx)("h3",{className:"text-sm font-semibold text-gray-12",children:"Generation Options"}),k=(0,a.jsx)(tw.J,{children:"Was the result good?"}),ea[43]=w,ea[44]=k):(w=ea[43],k=ea[44]),ea[45]!==en?(S=e=>en((0,j.QOK)({field:"isResultGood",value:e})),ea[45]=en,ea[46]=S):S=ea[46],ea[47]===Symbol.for("react.memo_cache_sentinel")?(A=(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-gray-11",children:[(0,a.jsx)(tk.C,{value:"yes"}),"Yes"]}),ea[47]=A):A=ea[47],ea[48]===Symbol.for("react.memo_cache_sentinel")?(z=(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-gray-11",children:[(0,a.jsx)(tk.C,{value:"no"}),"No"]}),ea[48]=z):z=ea[48],ea[49]!==er.isResultGood||ea[50]!==er.loading||ea[51]!==S?(C=(0,a.jsxs)("div",{children:[k,(0,a.jsxs)(tk.z,{className:"mt-2 flex gap-6",value:er.isResultGood,onValueChange:S,disabled:er.loading,children:[A,z]})]}),ea[49]=er.isResultGood,ea[50]=er.loading,ea[51]=S,ea[52]=C):C=ea[52],ea[53]!==en||ea[54]!==er.feedback||ea[55]!==er.isResultGood||ea[56]!==er.loading?(T="no"===er.isResultGood&&(0,a.jsxs)("div",{children:[(0,a.jsx)(tw.J,{htmlFor:"gen-feedback",children:"What didn’t you like?"}),(0,a.jsx)(tN.V,{id:"gen-feedback",value:er.feedback,onChange:e=>en((0,j.QOK)({field:"feedback",value:e.target.value})),placeholder:"Describe what went wrong, what the agent should have done instead, or what specific behavior you want to test for.",rows:3,disabled:er.loading,className:"mt-2 block w-full rounded-md border border-gray-4 bg-background px-3 py-2 text-sm text-gray-12 placeholder:text-gray-10 focus:border-gray-9 focus:outline-hidden"})]}),ea[53]=en,ea[54]=er.feedback,ea[55]=er.isResultGood,ea[56]=er.loading,ea[57]=T):T=ea[57],ea[58]===Symbol.for("react.memo_cache_sentinel")?(V=(0,a.jsx)(tw.J,{htmlFor:"gen-notes",children:"Additional Notes (optional)"}),I=(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-10",children:"Include any extra grading context you want reflected in assertions and instructions."}),ea[58]=V,ea[59]=I):(V=ea[58],I=ea[59]),ea[60]!==en?(R=e=>en((0,j.QOK)({field:"additionalNotes",value:e.target.value})),ea[60]=en,ea[61]=R):R=ea[61],ea[62]!==er.additionalNotes||ea[63]!==er.loading||ea[64]!==R?(G=(0,a.jsxs)("div",{children:[V,I,(0,a.jsx)(tN.V,{id:"gen-notes",value:er.additionalNotes,onChange:R,placeholder:"Example: focus on route realism and response conciseness",rows:2,disabled:er.loading,className:"mt-2 block w-full rounded-md border border-gray-4 bg-background px-3 py-2 text-sm text-gray-12 placeholder:text-gray-10 focus:border-gray-9 focus:outline-hidden"})]}),ea[62]=er.additionalNotes,ea[63]=er.loading,ea[64]=R,ea[65]=G):G=ea[65],ea[66]!==C||ea[67]!==T||ea[68]!==G?(F=(0,a.jsxs)("div",{className:"space-y-4 rounded-lg border border-gray-4 p-4",children:[w,C,T,G]}),ea[66]=C,ea[67]=T,ea[68]=G,ea[69]=F):F=ea[69],ea[70]===Symbol.for("react.memo_cache_sentinel")?($=(0,a.jsx)("h3",{className:"text-sm font-semibold text-gray-12",children:"Auto-generate"}),E=(0,a.jsx)("p",{className:"text-xs text-gray-10",children:"Choose which fields the model should generate."}
1),ea[70]=$,ea[71]=E):($=ea[70],E=ea[71]),ea[72]!==en?(M=e=>en((0,j.QOK)({field:"autoGenerateAssertions",value:!0===e})),ea[72]=en,ea[73]=M):M=ea[73],ea[74]!==er.autoGenerateAssertions||ea[75]!==er.loading||ea[76]!==M?(L=(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-gray-11",children:[(0,a.jsx)(t_.S,{checked:er.autoGenerateAssertions,onCheckedChange:M,disabled:er.loading}),"Assertions"]}),ea[74]=er.autoGenerateAssertions,ea[75]=er.loading,ea[76]=M,ea[77]=L):L=ea[77],ea[78]!==en?(P=e=>en((0,j.QOK)({field:"autoGenerateDriverObjective",value:!0===e})),ea[78]=en,ea[79]=P):P=ea[79],ea[80]!==er.autoGenerateDriverObjective||ea[81]!==er.loading||ea[82]!==P?(O=(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-gray-11",children:[(0,a.jsx)(t_.S,{checked:er.autoGenerateDriverObjective,onCheckedChange:P,disabled:er.loading}),"Driver objective / goal"]}),ea[80]=er.autoGenerateDriverObjective,ea[81]=er.loading,ea[82]=P,ea[83]=O):O=ea[83],ea[84]!==en?(q=e=>en((0,j.QOK)({field:"autoGeneratePreprocessInstruction",value:!0===e})),ea[84]=en,ea[85]=q):q=ea[85],ea[86]!==er.autoGeneratePreprocessInstruction||ea[87]!==er.loading||ea[88]!==q?(U=(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-gray-11",children:[(0,a.jsx)(t_.S,{checked:er.autoGeneratePreprocessInstruction,onCheckedChange:q,disabled:er.loading}),"Preprocessing instructions"]}),ea[86]=er.autoGeneratePreprocessInstruction,ea[87]=er.loading,ea[88]=q,ea[89]=U):U=ea[89],ea[90]!==en?(H=e=>en((0,j.QOK)({field:"autoGenerateTags",value:!0===e})),ea[90]=en,ea[91]=H):H=ea[91],ea[92]!==er.autoGenerateTags||ea[93]!==er.loading||ea[94]!==H?(W=(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-gray-11",children:[(0,a.jsx)(t_.S,{checked:er.autoGenerateTags,onCheckedChange:H,disabled:er.loading}),"Tags"]}),ea[92]=er.autoGenerateTags,ea[93]=er.loading,ea[94]=H,ea[95]=W):W=ea[95],ea[96]!==en?(K=e=>en((0,j.QOK)({field:"autoGenerateFollowUpInstruction",value:!0===e})),ea[96]=en,ea[97]=K):K=ea[97],ea[98]!==er.autoGenerateFollowUpInstruction||ea[99]!==er.loading||ea[100]!==K?(B=(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-gray-11",children:[(0,a.jsx)(t_.S,{checked:er.autoGenerateFollowUpInstruction,onCheckedChange:K,disabled:er.loading}),"Follow-up instruction (only if explicitly requested)"]}),ea[98]=er.autoGenerateFollowUpInstruction,ea[99]=er.loading,ea[100]=K,ea[101]=B):B=ea[101],ea[102]!==L||ea[103]!==O||ea[104]!==U||ea[105]!==W||ea[106]!==B?(Q=(0,a.jsxs)("div",{className:"space-y-3 rounded-lg border border-gray-4 p-4",children:[$,E,(0,a.jsxs)("div",{className:"space-y-2",children:[L,O,U,W,B]})]}),ea[102]=L,ea[103]=O,ea[104]=U,ea[105]=W,ea[106]=B,ea[107]=Q):Q=ea[107],ea[108]!==er.error?(J=er.error&&(0,a.jsx)("div",{className:"rounded-md bg-red-2 p-3 text-sm text-red-10",children:er.error}),ea[108]=er.error,ea[109]=J):J=ea[109],ea[110]!==_||ea[111]!==F||ea[112]!==Q||ea[113]!==J?(Y=(0,a.jsx)(eR.R4,{children:(0,a.jsxs)("div",{className:"w-[600px] space-y-6",children:[_,F,Q,J]})}),ea[110]=_,ea[111]=F,ea[112]=Q,ea[113]=J,ea[114]=Y):Y=ea[114],ea[115]!==er.loading||ea[116]!==eo?(Z=(0,a.jsx)(D.$,{variant:"outline",onClick:eo,disabled:er.loading,children:"Cancel"}),ea[115]=er.loading,ea[116]=eo,ea[117]=Z):Z=ea[117];let eg=!em||er.loading,ef=er.loading?"Generating…":"Generate";return ea[118]!==ed||ea[119]!==eg||ea[120]!==ef?(X=(0,a.jsx)(D.$,{onClick:ed,disabled:eg,children:ef}),ea[118]=ed,ea[119]=eg,ea[120]=ef,ea[121]=X):X=ea[121],ea[122]!==Z||ea[123]!==X?(ee=(0,a.jsxs)(eR.Es,{children:[Z,X]}),ea[122]=Z,ea[123]=X,ea[124]=ee):ee=ea[124],ea[125]!==Y||ea[126]!==ee?(et=(0,a.jsxs)(eR.Cf,{size:"auto",children:[i,Y,ee]}),ea[125]=Y,ea[126]=ee,ea[127]=et):et=ea[127],ea[128]!==er.open||ea[129]!==r||ea[130]!==et?(es=(0,a.jsx)(eR.lG,{open:ex,onOpenChange:r,children:et}),ea[128]=er.open,ea[129]=r,ea[130]=et,ea[131]=es):es=ea[131],es}function tA(e){return(0,a.jsx)(eG.eb,{value:e.name,children:e.label},e.name)}var tz=s(45283);function tC(){let e,t,s,l,r,i,d,m,x,h,u,g,f,y,v,N,_,w,I,R=(0,n.c)(151),G=(0,p.jL)(),F=(0,p.GV)(j.KwC),$=(0,p.GV)(j.PhY),E=(0,p.GV)(j.XCD),M=(0,p.GV)(j.t8I),L=(0,p.GV)(j.tEd),P=(0,p.GV)(j.C5i),O=(0,p.GV)(j.dbT),U=(0,p.GV)(j.jX6),H=(0,p.GV)(j.wAo),W=(0,p.GV)(j.R_6),K=(0,p.GV)(j.qHg),Q=(0,p.GV)(j.EwY);if(R[0]!==P){e:{let t=P.find(tG);if(!t||!(0,c.N5)(t)){e="";break e}let s=t.content;if("string"==typeof s){e=s;break e}e=s.filter(tR).map(tI).join("\n")}R[0]=P,R[1]=e}else e=R[1];let J=e;if(!$)return null;if(!L){let e,t,s,n,l,r,i,c;return R[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.cn)("fixed top-0 right-0 z-50 flex h-screen w-[400px] flex-col border-l border-gray-4 bg-background shadow-lg"),R[2]=e):e=R[2],R[3]!==O?(t=(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-12",children:O}),R[3]=O,R[4]=t):t=R[4],R[5]!==G?(s=()=>G((0,j.HAH)(!1)),R[5]=G,R[6]=s):s=R[6],R[7]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)(A.A,{className:"size-4"}),R[7]=n):n=R[7],R[8]!==s?(l=(0,a.jsx)(D.$,{variant:"ghost",size:"sm",onClick:s,className:"flex items-center gap-1 lg:hidden",title:"Close sidebar",children:n}),R[8]=s,R[9]=l):l=R[9],R[10]!==t||R[11]!==l?(r=(0,a.jsx)("div",{className:"shrink-0 border-b border-gray-4 bg-background px-4 py-3",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[t,l]})}
1),R[10]=t,R[11]=l,R[12]=r):r=R[12],R[13]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,a.jsx)("div",{className:"mb-4 flex size-16 items-center justify-center rounded-full bg-subtle",children:(0,a.jsx)(C.A,{className:"size-8 text-gray-10"})}),(0,a.jsx)("h3",{className:"mb-2 text-lg font-semibold text-gray-12",children:"No Session Yet"}),(0,a.jsx)("p",{className:"text-sm text-gray-10",children:"Select an agent type and send a message to start a new session"})]}),R[13]=i):i=R[13],R[14]!==r?(c=(0,a.jsxs)("div",{className:e,children:[r,i]}),R[14]=r,R[15]=c):c=R[15],c}R[16]!==L.metadata?(t=L.metadata||{},R[16]=L.metadata,R[17]=t):t=R[17];let Y=t;R[18]!==L.registered_tools?(s=L.registered_tools??[],R[18]=L.registered_tools,R[19]=s):s=R[19];let Z=s;if(R[20]!==L){var X;l=L.agent_detail?.kind==="trip_disruption_triage"&&"object"==typeof(X=L.agent_detail.data)&&null!==X&&"findings"in X&&Array.isArray(X.findings)?L.agent_detail.data:null,R[20]=L,R[21]=l}else l=R[21];let ee=l,et=(ee?.findings.length??0)>0,es="Agent::FlexibleOrchestrator"===L.agent_type||"Agent::HotelCompareAgent"===L.agent_type;R[22]!==P?(r=P.some(tV),R[22]=P,R[23]=r):r=R[23];let ea=r,en=Y.current_step||Y.progress||Y.decisions&&Y.decisions.length>0,el=es&&en;R[24]!==G||R[25]!==L.id?(i=(e,t)=>{G((0,b.Be)({mode:e,entityKey:t,sessionId:L?.id}))},R[24]=G,R[25]=L.id,R[26]=i):i=R[26];let er=i;R[27]!==G||R[28]!==L.id?(d=()=>{G((0,b.Be)({mode:"inline",sessionId:L?.id}))},R[27]=G,R[28]=L.id,R[29]=d):d=R[29];let ei=d;R[30]!==U?(m=()=>"ready"===U?"green":"error"===U?"red":"pending"===U?"amber":"waiting"===U?"sky":"blue",R[30]=U,R[31]=m):m=R[31];let ec=m;if("inline"===E){let e,t,s,n,l,r,i,c,d,m,x,h,u,g,f,p,b,y,v,N,_,w,z,I,$,E,M;R[32]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.cn)("fixed top-0 right-0 z-50 flex h-screen w-[400px] flex-col border-l border-gray-4 bg-background shadow-lg"),R[32]=e):e=R[32],R[33]!==O?(t=(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-12",children:O}),R[33]=O,R[34]=t):t=R[34];let W=ec();R[35]!==U?(s=U.charAt(0).toUpperCase(),R[35]=U,R[36]=s):s=R[36];let B=s+U.slice(1);return R[37]!==W||R[38]!==B?(n=(0,a.jsx)(q.E,{color:W,size:1,children:B}),R[37]=W,R[38]=B,R[39]=n):n=R[39],R[40]!==G?(l=()=>G((0,j.HAH)(!1)),R[40]=G,R[41]=l):l=R[41],R[42]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(A.A,{className:"size-4"}),R[42]=r):r=R[42],R[43]!==l?(i=(0,a.jsx)(D.$,{variant:"ghost",size:"sm",onClick:l,className:"flex items-center gap-1 lg:hidden",title:"Close sidebar",children:r}),R[43]=l,R[44]=i):i=R[44],R[45]!==n||R[46]!==i?(c=(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[n,i]}),R[45]=n,R[46]=i,R[47]=c):c=R[47],R[48]!==c||R[49]!==t?(d=(0,a.jsx)("div",{className:"shrink-0 border-b border-gray-4 bg-background px-4 py-3",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[t,c]})}),R[48]=c,R[49]=t,R[50]=d):d=R[50],R[51]!==K||R[52]!==Q?(m=!K&&Q&&(0,a.jsxs)("div",{className:"shrink-0 border-b border-indigo-5 bg-indigo-2 px-4 py-2 text-sm",children:[(0,a.jsx)("span",{className:"text-gray-11",children:"Shared by: "}),(0,a.jsx)("span",{className:"font-medium",children:Q.name||Q.email})]}),R[51]=K,R[52]=Q,R[53]=m):m=R[53],R[54]!==er?(x=()=>er("stats"),R[54]=er,R[55]=x):x=R[55],R[56]!==L||R[57]!==x?(h=(0,a.jsx)("div",{children:(0,a.jsx)(eK,{session:L,onViewStats:x})}),R[56]=L,R[57]=x,R[58]=h):h=R[58],R[59]!==Z?(u=Z.length>0&&(0,a.jsxs)(eq.Nt,{children:[(0,a.jsxs)(eq.R6,{className:"flex w-full items-center gap-1.5",children:[(0,a.jsx)(S.A,{className:"size-3.5 text-gray-10 transition-transform in-data-panel-open:rotate-90"}),(0,a.jsx)("h3",{className:"text-sm font-semibold tracking-wide text-gray-10 uppercase",children:`Tools (${Z.length})`})]}),(0,a.jsx)(eq.Ke,{children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-3",children:Z.map(tT)})})]}),R[59]=Z,R[60]=u):u=R[60],R[61]!==er||R[62]!==et||R[63]!==ee?(g=et&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-3 text-sm font-semibold tracking-wide text-gray-10 uppercase",children:`Needs You (${ee?.findings.length??0})`}),ee&&(0,a.jsx)(tb,{triage:ee,onViewFull:()=>er("triage")})]}),R[61]=er,R[62]=et,R[63]=ee,R[64]=g):g=R[64],R[65]!==er||R[66]!==Y||R[67]!==es?(f=es&&(Y.notes||Y.reasoning)&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-3 text-sm font-semibold tracking-wide text-gray-10 uppercase",children:"Notes"}),(0,a.jsx)(eQ,{metadata:Y,onViewFull:()=>er("notes")})]}),R[65]=er,R[66]=Y,R[67]=es,R[68]=f):f=R[68],R[69]!==P||R[70]!==er||R[71]!==ea?(p=ea&&(0,a.jsx)(e4,{events:P,onViewFull:()=>er("todos")}),R[69]=P,R[70]=er,R[71]=ea,R[72]=p):p=R[72],R[73]!==H?(b=H.length>0&&(0,a.jsx)(tc,{subAgentIds:H}),R[73]=H,R[74]=b):b=R[74],R[75]!==er||R[76]!==Y||R[77]!==es?(y=es&&Y.entity_notes&&(0,a.jsx)(eY,{metadata:Y,onViewFull:e=>er("entity_notes",e)}),R[75]=er,R[76]=Y,R[77]=es,R[78]=y):y=R[78],R[79]!==er||R[80]!==Y||R[81]!==el?(v=el&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-3 text-sm font-semibold tracking-wide text-gray-10 uppercase",children:"Progress"}),(0,a.jsx)(e8,{metadata:Y,onViewFull:()=>er("progress")})]}),R[79]=er,R[80]=Y,R[81]=el,R[82]=v):v=R[82],R[83]!==h||R[84]!==u||R[85
1]!==g||R[86]!==f||R[87]!==p||R[88]!==b||R[89]!==y||R[90]!==v?(N=(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:(0,a.jsxs)("div",{className:"space-y-6 p-4",children:[h,u,g,f,p,b,y,v]})}),R[83]=h,R[84]=u,R[85]=g,R[86]=f,R[87]=p,R[88]=b,R[89]=y,R[90]=v,R[91]=N):N=R[91],R[92]!==er||R[93]!==F.canViewDebugPanels?(_=F.canViewDebugPanels&&(0,a.jsxs)(D.$,{variant:"outline",size:"sm",onClick:()=>er("sandbox"),className:"flex items-center justify-center gap-2",children:[(0,a.jsx)(C.A,{className:"size-4"}),"Sandbox DB"]}),R[92]=er,R[93]=F.canViewDebugPanels,R[94]=_):_=R[94],R[95]!==er||R[96]!==F.canViewDebugPanels?(w=F.canViewDebugPanels&&(0,a.jsxs)(D.$,{variant:"outline",size:"sm",onClick:()=>er("report"),className:"flex items-center justify-center gap-2",children:[(0,a.jsx)(k.A,{className:"size-4"}),"Report"]}),R[95]=er,R[96]=F.canViewDebugPanels,R[97]=w):w=R[97],R[98]!==er||R[99]!==F.canViewDebugPanels?(z=F.canViewDebugPanels&&(0,a.jsxs)(D.$,{variant:"outline",size:"sm",onClick:()=>er("raw"),className:"flex items-center justify-center gap-2",children:[(0,a.jsx)(T.A,{className:"size-4"}),"Raw Data"]}),R[98]=er,R[99]=F.canViewDebugPanels,R[100]=z):z=R[100],R[101]!==G||R[102]!==J||R[103]!==F.canUseEvals||R[104]!==L.agent_type||R[105]!==L.id||R[106]!==U?(I=F.canUseEvals&&"ready"===U&&(0,a.jsxs)(D.$,{variant:"outline",size:"sm",onClick:()=>G((0,j.JGI)({sessionId:L.id,initialMessage:J,agentType:L.agent_type})),className:"flex items-center justify-center gap-2",children:[(0,a.jsx)(V.A,{className:"size-4"}),"Generate Eval"]}),R[101]=G,R[102]=J,R[103]=F.canUseEvals,R[104]=L.agent_type,R[105]=L.id,R[106]=U,R[107]=I):I=R[107],R[108]!==_||R[109]!==w||R[110]!==z||R[111]!==I?($=(0,a.jsx)("div",{className:"shrink-0 border-t border-gray-4 bg-background p-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[_,w,z,I]})}),R[108]=_,R[109]=w,R[110]=z,R[111]=I,R[112]=$):$=R[112],R[113]===Symbol.for("react.memo_cache_sentinel")?(E=(0,a.jsx)(tS,{}),R[113]=E):E=R[113],R[114]!==d||R[115]!==m||R[116]!==N||R[117]!==$?(M=(0,a.jsxs)("div",{className:e,children:[d,m,N,$,E]}),R[114]=d,R[115]=m,R[116]=N,R[117]=$,R[118]=M):M=R[118],M}R[119]!==P||R[120]!==W||R[121]!==E?(x=()=>{switch(E){case"stats":return"Statistics";case"triage":return"Needs You";case"notes":return"Notes";case"entity_notes":return"Entity Notes";case"todos":return"Todos";case"progress":return"Progress";case"sandbox":return"Sandbox DB";case"report":return"Report";case"interactive_report":{let e=P.find(e=>(0,c.aU)(e)&&e.id===W);return e&&(0,c.aU)(e)?e.report_name:"Interactive Report"}case"raw":return"Raw Data";default:return""}},R[119]=P,R[120]=W,R[121]=E,R[122]=x):x=R[122];let eo=x;R[123]!==P||R[124]!==Y||R[125]!==M||R[126]!==W||R[127]!==L||R[128]!==ee||R[129]!==E?(h=()=>{switch(E){case"stats":return(0,a.jsx)(eB,{});case"triage":return ee?(0,a.jsx)(tv,{triage:ee}):null;case"notes":return(0,a.jsx)(eZ,{metadata:Y});case"entity_notes":return(0,a.jsx)(e0,{metadata:Y,scrollToEntityKey:M});case"todos":return(0,a.jsx)(tt,{events:P});case"progress":return(0,a.jsx)(e9,{metadata:Y});case"sandbox":return(0,a.jsx)(tr,{sessionId:L.id});case"report":return(0,a.jsx)(B,{sessionId:L.id,events:P});case"interactive_report":{let e=P.find(e=>(0,c.aU)(e)&&e.id===W);return e&&(0,c.aU)(e)?(0,a.jsx)(tz.R,{sessionId:L.id,reportEvent:e}):null}case"raw":return(0,a.jsx)(td,{data:{session:L,metadata:Y,events:P}});default:return null}},R[123]=P,R[124]=Y,R[125]=M,R[126]=W,R[127]=L,R[128]=ee,R[129]=E,R[130]=h):h=R[130];let ed=h,em="sandbox"===E||"report"===E||"interactive_report"===E?"w-[calc(100vw-var(--nav-width))]":"w-full md:w-3/4 lg:w-2/3";return R[131]!==em?(u=(0,o.cn)("fixed top-0 right-0 z-50 flex h-screen flex-col border-l border-gray-4 bg-background shadow-lg transition-all duration-300",em),R[131]=em,R[132]=u):u=R[132],R[133]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(z.A,{className:"size-4 rotate-180"}),R[133]=g):g=R[133],R[134]!==ei?(f=(0,a.jsx)(D.$,{variant:"ghost",size:"sm",onClick:ei,children:g}),R[134]=ei,R[135]=f):f=R[135],R[136]!==eo?(y=eo(),R[136]=eo,R[137]=y):y=R[137],R[138]!==y?(v=(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-12",children:y}),R[138]=y,R[139]=v):v=R[139],R[140]!==f||R[141]!==v?(N=(0,a.jsx)("div",{className:"flex items-center justify-between border-b border-gray-4 bg-background px-4 py-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[f,v]})}),R[140]=f,R[141]=v,R[142]=N):N=R[142],R[143]!==ed?(_=ed(),R[143]=ed,R[144]=_):_
1=R[144],R[145]!==_?(w=(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-auto bg-subtle p-6",children:_}),R[145]=_,R[146]=w):w=R[146],R[147]!==u||R[148]!==N||R[149]!==w?(I=(0,a.jsxs)("div",{className:u,children:[N,w]}),R[147]=u,R[148]=N,R[149]=w,R[150]=I):I=R[150],I}function tT(e){return(0,a.jsx)(q.E,{color:"gray",size:2,children:e},e)}function tV(e){return"AgentTodoEvent"===e.type}function tI(e){return e.text}function tR(e){return"text"===e.type}function tG(e){return(0,c.N5)(e)&&"user"===e.role}var tF=s(79085);let t$=["off","low","medium","high"];function tE(e){return e.charAt(0).toUpperCase()+e.slice(1)}function tM(e){let t,s,l,r,i,c,d,m,x,h,u,g,f,b,y,v=(0,n.c)(41),{disabled:N}=e,_=void 0!==N&&N,w=(0,p.jL)(),k=(0,p.GV)(j.tFZ),S=(0,p.GV)(j.oPQ),A=(0,p.GV)(j.om$),z=(0,p.GV)(j.xhV),C=(0,p.GV)(j.x3Z);if(v[0]!==z||v[1]!==A){let e;v[3]!==A?(e=e=>e.id===A,v[3]=A,v[4]=e):e=v[4],t=z.find(e),v[0]=z,v[1]=A,v[2]=t}else t=v[2];let T=t;if(v[5]!==S||v[6]!==k){let e;v[8]!==k?(e=e=>e.name===k,v[8]=k,v[9]=e):e=v[9],s=S.find(e),v[5]=S,v[6]=k,v[7]=s}else s=v[7];let V=s;e:{let e=V?.default_thinking_level_by_model_id;if(A&&e?.[A]){l=e[A];break e}if(V?.default_thinking_level){l=V.default_thinking_level;break e}l="medium"}let I=l;t:{if("default"===C){r=I;break t}if("off"===C&&T?.supports_thinking_off===!1){r=T.off_maps_to_level??"low";break t}r=C}let R=r;v[10]!==R||v[11]!==C?(i="default"===C?`Thinking: ${tE(R)} (default)`:`Thinking: ${tE(R)}`,v[10]=R,v[11]=C,v[12]=i):i=v[12];let G=i,F="off"===C&&T?.supports_thinking_off===!1,$="default"===C?I:C;v[13]===Symbol.for("react.memo_cache_sentinel")?(c={name:"lightBulb",className:"-mt-1"},v[13]=c):c=v[13];let E="off"===C?"text-gray-11 hover:text-foreground":"text-foreground",M=_&&"pointer-events-none";return v[14]!==E||v[15]!==M?(d=(0,o.cn)("px-2 py-0.5 text-xs disabled:opacity-100",E,M),v[14]=E,v[15]=M,v[16]=d):d=v[16],v[17]!==G||v[18]!==_||v[19]!==d?(m=(0,a.jsx)(tF.Wv,{render:(0,a.jsx)(D.$,{size:"xs",variant:"ghost",iconAfter:c,className:d,disabled:_,children:G})}),v[17]=G,v[18]=_,v[19]=d,v[20]=m):m=v[20],v[21]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Thinking"}),(0,a.jsx)("div",{className:"text-xs text-gray-11",children:"Controls provider reasoning depth before responding"})]}),v[21]=x):x=v[21],v[22]!==w?(h=e=>w((0,j.FYw)(e)),v[22]=w,v[23]=h):h=v[23],v[24]!==_||v[25]!==I?(u=t$.map(e=>(0,a.jsx)("div",{className:"flex flex-col",children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(tk.C,{value:e,id:`thinking-${e}`,disabled:_}),(0,a.jsxs)(tw.J,{htmlFor:`thinking-${e}`,className:"cursor-pointer text-sm",children:[(0,a.jsx)("span",{children:tE(e)}),e===I?(0,a.jsx)("span",{children:" (default)"}):null]})]})},e)),v[24]=_,v[25]=I,v[26]=u):u=v[26],v[27]!==_||v[28]!==$||v[29]!==h||v[30]!==u?(g=(0,a.jsx)(tk.z,{value:$,onValueChange:h,className:"space-y-2",disabled:_,children:u}),v[27]=_,v[28]=$,v[29]=h,v[30]=u,v[31]=g):g=v[31],v[32]!==T||v[33]!==F?(f=F&&(0,a.jsxs)("div",{className:"rounded-md border bg-amber-2 px-2 py-1 text-3xs text-amber-11",children:["This model does not fully disable thinking. Off maps to"," ",tE(T.off_maps_to_level??"low"),"."]}),v[32]=T,v[33]=F,v[34]=f):f=v[34],v[35]!==g||v[36]!==f?(b=(0,a.jsx)(tF.hl,{align:"start",className:"w-64",children:(0,a.jsxs)("div",{className:"space-y-3",children:[x,g,f]})}),v[35]=g,v[36]=f,v[37]=b):b=v[37],v[38]!==m||v[39]!==b?(y=(0,a.jsxs)(tF.AM,{children:[m,b]}),v[38]=m,v[39]=b,v[40]=y):y=v[40],y}var tL=s(15742),tP=s(19780),tO=s(2822),tq=s(2692),tD=s(28104),tU=s(14776);let tH=[{emoji:"✈️",title:"Flexible dates",agentType:"Agent::LeadAgent",question:"Find the lowest price premium economy flights for 4 passengers to Paris from the New York area for a 5-7 night stay during the NY Public School summer break, avoiding Tuesday departures."},{emoji:"\uD83C\uDFE8",title:"Multi-traveler preferences",agentType:"Agent::LeadAgent",question:"Find the best all-inclusive on the Yucatan that has water slides for kids and great bars for adults within a 3 hour drive of Cancun airport for April 10-17. Show prices 2 rooms, with 2 queens in each room."},{emoji:"\uD83D\uDCB0",title:"Price vs. convenience",agentType:"Agent::MiniAgent",question:"What are good flight options from Chicago to Tokyo for two adults and two teenager
1s departing June 12 and returning June 22 that balance reasonable prices with the shortest total travel time and fewer layovers?"},{emoji:"\uD83D\uDDFA️",title:"Multiple destinations",agentType:"Agent::MiniAgent",question:"Find highly rated hotels for two adults staying three nights in Florence starting September 18 and then two nights in Venice starting September 21, ideally located near major attractions."}];function tW(e){let{liveViewUrl:t,liveViewOpen:s,onToggleLiveView:n}=e,r=(0,u.r)(),i=(0,p.jL)(),d=(0,p.GV)(j.KwC),g=(0,p.GV)(j.FBU),f=(0,p.GV)(j.tFZ),v=(0,p.GV)(j.C5i),w=(0,p.GV)(j.VtZ),k=(0,p.GV)(j.G5I),S=(0,p.GV)(j.oPQ),A=(0,l.useMemo)(()=>(d.canViewAllAgents?S:S.filter(e=>e.external_visible)).filter(e=>e.name!==c.TD&&e.name!==c.r3),[d.canViewAllAgents,S]),z=S.find(e=>e.name===f)?.description,C=(0,p.GV)(j.ZN8),T=(0,p.GV)(j.rh),V=(0,p.GV)(j.tEd),I=(0,p.GV)(j.qHg),R=(0,p.GV)(j.Etj),G=(0,p.GV)(j.Ydc),F=(0,p.GV)(j.aIK),{scrollToEvent:$}=(0,_.I)(),[E,M]=(0,l.useState)(!1),L=async e=>{if((i((0,j.wZH)(e)),V)&&!E){M(!0);try{await i((0,b._q)({sessionId:V.id,shared:e}))}finally{M(!1)}}},P="new"===g,O=A.find(e=>e.name===f),q=O?.type==="sub_agent",U=!P&&q&&"complete"===C,H=k||"existing"===g,W=P&&!k&&0===v.length,K=async(e,t)=>{if(k)return;let s=new Set(A.map(e=>e.name));if(t.agentType&&t.agentType!==f&&s.has(t.agentType)&&i((0,j.vf8)(t.agentType)),f||t.agentType){m().start();try{await i((0,b.jK)({message:e,router:r})).unwrap()}catch{}finally{m().done()}}};return(0,a.jsxs)("div",{className:"relative bg-background pb-2",children:[W&&(0,a.jsx)("div",{className:"absolute inset-x-0 bottom-full flex justify-end px-(--container-pad) pb-2",children:(0,a.jsx)("div",{className:"container mx-auto flex justify-end",children:(0,a.jsx)(tL.r,{customExamples:tH,onSelect:(e,t)=>void K(e,t)})})}),(0,a.jsxs)("div",{className:"container mx-auto px-(--container-pad) py-2.5",children:[(P||"existing"===g)&&(0,a.jsx)("div",{className:"mb-1.5 space-y-1.5",children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-muted",children:"Agent:"}),(0,a.jsxs)(eG.l6,{disabled:H,value:f??void 0,onValueChange:e=>i((0,j.vf8)(e)),children:[(0,a.jsx)(eG.bq,{size:"sm",className:"w-44",id:"agent-type",children:(0,a.jsx)(eG.yv,{placeholder:"Select an agent type…",children:e=>"string"==typeof e?(0,x.F9)(e):""})}),(0,a.jsx)(eG.gC,{children:A.map(e=>(0,a.jsx)(eG.eb,{value:e.name,description:e.description,children:(0,x.F9)(e.name)},e.name))})]})]}),z&&(0,a.jsx)("span",{className:"text-xs text-muted",children:z}),U&&T&&(0,a.jsx)(D.$,{onClick:()=>{T&&$(T.id,{align:"start"})},variant:"ghost",size:"sm",children:"View Result"})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[t&&(0,a.jsxs)("button",{type:"button",onClick:n,className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-muted",children:s?(0,a.jsx)("span",{children:"Disable Live View"}):(0,a.jsx)("span",{children:"Enable Live View"})}),(0,a.jsx)(tq.K,{icon:{name:"tv"},label:s?"Hide live browser view":"Show live browser view",tooltip:!0,size:"sm",variant:s?"primary":"ghost"})]}),(d.canUseAdvancedOptions||d.canToggleShare&&I)&&(0,a.jsxs)(tF.AM,{children:[(0,a.jsx)(tF.Wv,{render:(0,a.jsx)(tq.K,{icon:{name:"ellipsis"},label:"Options",size:"sm",tooltip:!0,variant:"ghost"})}),(0,a.jsx)(tF.hl,{align:"end",className:"w-auto",children:(0,a.jsxs)("div",{className:"space-y-3",children:[d.canToggleShare&&I&&(0,a.jsxs)("div",{className:"flex h-(--button-xs-size) items-center gap-2",children:[(0,a.jsxs)("label",{className:(0,o.cn)("flex items-center gap-1.5",E?"cursor-wait opacity-50":"cursor-pointer"),children:[(0,a.jsx)(tU.d,{size:"xs",checked:R,disabled:E,onCheckedChange:e=>void L(!!e)}),(0,a.jsx)("span",{className:"text-xs",children:"Share"})]}),R&&V&&(0,a.jsx)(tq.K,{icon:{name:"copy"},label:"Copy link",tooltip:!0,size:"xs",variant:"ghost",onPerform:async()=>{await navigator.clipboard.writeText(`${h.T.origin}/playground/${V.id}`),y.J.add({type:"success",description:"Link copied!"})}})]}),d.canUseAdvancedOptions&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-muted",children:"Rounds:"}),(0,a.jsx)(eF.ks,{id:"max-rounds",type:"number",size:"sm",className:"w-14",placeholder:"100",disabled:H,value:String(w),onChange:e=>i((0,j.RXb)(e.target.value))})]}),(0,a.jsx)(tM,{disabled:!P}),G.map(e=>"select"===e.valueType?(0,a.jsxs)("div",{className:"flex items-center gap-1.5",title:e.description,children:[(0,a.jsx)("span",{className:"text-xs",children:e.label}),(0,a.jsxs)(eG.l6,{value:(0,j.Db$)(F[e.key],e.defaultValue),disabled:!P,onValueChange:t=>{null!==t&&i((0,j.rC5)({key:e.key,value:t}))},children:[(0,a.jsx)(eG.bq,{size:"xs",children:(0,a.jsx)(eG.yv,{})}),(0,a.jsx)(eG.gC,{children:e.options.map(e=>(0,a.jsx)(eG.eb,{value:e,children:e},e))})]})]},e.key):(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5",title:e.description,children:[(0,a.jsx)(tU.d,{size:"xs",disabled:!P,checked:!0===F[e.key],onCheckedChange:t=>i((0,j.rC5)({key:e.key,value:!0===t}))}),(0,a.jsx)("span",{className:"text-xs",children:e.label})]},e.key))]})]})})]})]})]})}),(0,a.jsx)(N.W,{})]})]})}var tK=!0;function tB(e){let t,s,c,d,m,x,h,N,k,S,A,z,C,T,V,I,R,G,$,E,L,P,O,q=(0,n.c)(63),{sessionId:D}=e,U=(0,u.r)(),H=(0,p.jL)();e:{let e;q[0]!==U.query.id?(e=(0,v.KT)(U.query.id),q[0]=U.query.id,q[1]=e):e=q[1];let s=e;if("new"===s){t="new";break e}if(s){let e=parseInt(s,10);if(!isNaN(e)){t=e;break e}}t=D}let W=t,K=(0,p.GV)(j.FBU),B="new"===K,Q=(0,p.GV)(j.dbT),J=(0,p.GV)(j.l_g),Y=(0,p.GV)(j.LQb),Z=(0,p.GV)(j.oPQ),X=(0,p.GV)(j.tFZ),ee=(0,p.GV)(j.C5i),et=(0,p.GV)(j.PhY),es=(0,p.GV)(j.vLb),ea=(0,p.GV)(j._c1),en=(0,p.GV)(f.YN),el=(0,p.GV)(j.tEd),[er,ei]=(0,l.useState)(!1),ec=el?.agent_type==="Agent::RestaurantBookingAgent"?el?.metadata?.browser_info:null,eo=ec?.live_view_url??null,ed=(0,l.useRef)(null);if(q[2]!==Z||q[3]!==X){let e;q[5]!==X?(e=e=>
1e.name===X,q[5]=X,q[6]=e):e=q[6],s=Z.find(e),q[2]=Z,q[3]=X,q[4]=s}else s=q[4];let em=s,ex=em?.type==="sub_agent";q[7]!==Y||q[8]!==B||q[9]!==ex||q[10]!==J||q[11]!==K?(c=function(){return"error"===K?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16",children:[(0,a.jsx)(F.A,{className:"mb-4 size-12 text-red-9"}),(0,a.jsx)("p",{className:"mb-4 text-center text-lg font-semibold text-gray-12",children:"Session Load Error"}),(0,a.jsx)("p",{className:"mb-6 text-center text-gray-11",children:Y}),(0,a.jsx)(tD.N,{href:"/playground/new",className:"rounded-md bg-primary px-4 py-2 text-white hover:bg-primary/90",children:"Start New Session"})]}):"loading"===K||J?(0,a.jsx)("div",{className:"flex justify-center py-16",children:(0,a.jsx)(eD.R,{})}):(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[B&&ex&&(0,a.jsx)("div",{className:"shrink-0 border-b border-amber-5 bg-amber-2 px-8 py-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(F.A,{className:"mt-0.5 size-5 shrink-0 text-amber-11"}),(0,a.jsxs)("div",{className:"text-sm text-amber-12",children:[(0,a.jsx)("p",{className:"font-semibold",children:"Sub-Agent"}),(0,a.jsx)("p",{children:"This is a SUB AGENT meaning it expects well-formatted and specific input. It will not ask clarifying questions, does not ask for plan approval and is not interactive."})]})]})}),(0,a.jsx)(w.l,{className:"min-h-0 flex-1"})]})},q[7]=Y,q[8]=B,q[9]=ex,q[10]=J,q[11]=K,q[12]=c):c=q[12];let eh=c;q[13]!==U.query.agent_type?(d=(0,v.KT)(U.query.agent_type)??void 0,q[13]=U.query.agent_type,q[14]=d):d=q[14];let eu=d;(0,r.l)(W,eu),q[15]!==U.query.view?(m=(0,v.KT)(U.query.view),q[15]=U.query.view,q[16]=m):m=q[16];let eg=m;if(q[17]!==H||q[18]!==eg?(x=()=>{"triage"===eg&&H((0,j.znE)("triage"))},h=[H,eg],q[17]=H,q[18]=eg,q[19]=x,q[20]=h):(x=q[19],h=q[20]),(0,l.useEffect)(x,h),q[21]!==H||q[22]!==W||q[23]!==ea?(N=()=>{g.d.start();let e=g.d.instance.socket,t=()=>{H((0,j.oIP)(!0)),H((0,j.j_p)(!0)),ed.current&&(y.J.close(ed.current),ed.current=null,y.J.add({type:"success",description:"Connection restored"})),"number"==typeof W&&H((0,b.IH)({sessionId:W}))},s=()=>{H((0,j.j_p)(!1)),ea&&(ed.current=String(y.J.add({type:"error",description:"Connection lost. Reconnecting…"})))};return e.on("connect",t),e.on("disconnect",s),e.connected&&(H((0,j.oIP)(!0)),H((0,j.j_p)(!0))),()=>{e.off("connect",t),e.off("disconnect",s)}},k=[H,ea,W],q[21]=H,q[22]=W,q[23]=ea,q[24]=N,q[25]=k):(N=q[24],k=q[25]),(0,l.useEffect)(N,k),q[26]!==H||q[27]!==et?(S=()=>{let e=()=>{window.innerWidth>=1024&&!et&&H((0,j.HAH)(!0))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},A=[H,et],q[26]=H,q[27]=et,q[28]=S,q[29]=A):(S=q[28],A=q[29]),(0,l.useEffect)(S,A),en){let e;return q[30]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(tP.Z,{}),q[30]=e):e=q[30],e}let ef="number"==typeof W?W:void 0;q[31]!==ea||q[32]!==es?(z=!es&&ea&&(0,a.jsx)("div",{className:"fixed inset-x-0 top-0 z-50 border-b border-amber-5 bg-amber-2 px-4 py-2 text-center text-sm text-amber-12 sm:left-(--nav-width)",children:(0,a.jsxs)("div",{className:"container mx-auto flex items-center justify-center gap-2",children:[(0,a.jsx)(M.A,{className:"size-4 animate-spin"}),(0,a.jsx)("span",{children:"Reconnecting…"})]})}),q[31]=ea,q[32]=es,q[33]=z):z=q[33];let ep=!es&&ea&&"top-10";q[34]!==ep?(C=(0,o.cn)("fixed inset-0 flex flex-col bg-background sm:left-(--nav-width)","lg:right-[400px]",ep),q[34]=ep,q[35]=C):C=q[35];let ej=ee.length>0;return q[36]!==ej?(T=(0,a.jsx)(tO.Y,{collapsed:ej}),q[36]=ej,q[37]=T):T=q[37],q[38]!==eh?(V=eh(),q[38]=eh,q[39]=V):V=q[39],q[40]!==er||q[41]!==eo?(I=er&&eo&&(0,a.jsx)("div",{className:"absolute inset-0 bg-black",children:(0,a.jsx)("iframe",{src:eo,allow:"autoplay; clipboard-read; clipboard-write",className:"size-full border-0"})}),q[40]=er,q[41]=eo,q[42]=I):I=q[42],q[43]!==V||q[44]!==I?(R=(0,a.jsxs)("div",{className:"relative min-h-0 flex-1 overflow-hidden",children:[V,I]}),q[43]=V,q[44]=I,q[45]=R):R=q[45],q[46]===Symbol.for("react.memo_cache_sentinel")?(G=()=>ei(tQ),q[46]=G):G=q[46],q[47]!==er||q[48]!==eo?($=(0,a.jsx)(tW,{liveViewUrl:eo,liveViewOpen:er,onToggleLiveView:G}),q[47]=er,q[48]=eo,q[49]=$):$=q[49],q[50]!==C||q[51]!==T||q[52]!==R||q[53]!==$?(E=(0,a.jsxs)("div",{className:C,children:[T,R,$]}),q[50]=C,q[51]=T,q[52]=R,q[53]=$,q[54]=E):E=q[54],q[55]===Symbol.for("react.memo_cache_sentinel")?(L=(0,a.jsx)(tC,{}),q[55]=L):L=q[55],q[56]!==ef||q[57]!==z||q[58]!==E?(P=(0,a.jsxs)(_.q,{sessionId:ef,children:[z,E,L]}),q[56]=ef,q[57]=z,q[58]=E,q[59]=P):P=q[59],q[60]!==P||q[61]!==Q?(O=(0,a.jsx)(i.A,{title:Q,children:P}),q[60]=P,q[61]=Q,q[62]=O):O=q[62],O}function tQ(e){return!e}},19780:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var a=s(37876),n=s(27964),l=s(74269),r=s(16256),i=s(20658);function c(){let e,t=(0,n.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(l.A,{children:(0,a.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-7 px-6",children:[(0,a.jsx)(r.A,{size:48,className:"text-indigo-11"}),(0,a.jsx)("p",{className:"text-center font-medium text-pretty",children:"The Mindtrip agentic playground is unavailable on mobile. Please use a larger screen to access."}),(0,a.jsx)("p",{children:(0,a.jsx)(i.$,{variant:"primary",href:"/chat",size:"lg",children:"Back to chat"})})]})}),t[0]=e):e=t[0],e}},36683:(e,t,s)=>{"use strict";s.d(t,{C:()=>o,z:()=>i.z});var a=s(37876),n=s(27964),l=s(16592),r=s(18238),i=s(21374),c=s(74302);function o(e){let t,s,i,o,d,m=(0,n.c)(9);return m[0]!==e?({className:t,...s}=e,m[0]=e,m[1]=t,m[2]=s):(t=m[1],s=m[2]),m[3]!==t?(i=(0,c.cn)("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border-2 border-primary outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:aria-checked:border-primary",t),m[3]=t,m[4]=i):i=m[4],m[5]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsx)(l.T,{"data-slot":"radio-group-indicator",className:"flex size-full items-center justify-center",children:(0,a.jsx)("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 roun
1ded-full bg-primary"})}),m[5]=o):o=m[5],m[6]!==s||m[7]!==i?(d=(0,a.jsx)(r.U,{"data-slot":"radio-group-item",className:i,...s,children:o}),m[6]=s,m[7]=i,m[8]=d):d=m[8],d}},43999:(e,t,s)=>{"use strict";s.d(t,{z:()=>c});var a=s(37876),n=s(27964),l=s(14232),r=s(74302),i=s(2692);let c=e=>{let t,s,c,o,d,m,x,h,u,g,f,p,j,b,y,v,N,_,w=(0,n.c)(36);w[0]!==e?({className:s,min:x,max:o,value:h,displayValue:c,onValueChange:d,children:t,...m}=e,w[0]=e,w[1]=t,w[2]=s,w[3]=c,w[4]=o,w[5]=d,w[6]=m,w[7]=x,w[8]=h):(t=w[1],s=w[2],c=w[3],o=w[4],d=w[5],m=w[6],x=w[7],h=w[8]);let k=void 0===x?0:x,S=void 0===h?0:h,[A,z]=(0,l.useState)(S);w[9]!==S?(u=()=>{z(S)},g=[S],w[9]=S,w[10]=u,w[11]=g):(u=w[10],g=w[11]),(0,l.useEffect)(u,g),w[12]!==A||w[13]!==o||w[14]!==d?(f=()=>{if(void 0===o||A<o){let e=A+1;z(e),d&&d(e)}},w[12]=A,w[13]=o,w[14]=d,w[15]=f):f=w[15];let C=f;w[16]!==A||w[17]!==k||w[18]!==d?(p=()=>{if(A>k){let e=A-1;z(e),d&&d(e)}},w[16]=A,w[17]=k,w[18]=d,w[19]=p):p=w[19];let T=p;w[20]!==s?(j=(0,r.cn)("flex w-26 items-center justify-between",s),w[20]=s,w[21]=j):j=w[21],w[22]===Symbol.for("react.memo_cache_sentinel")?(b={name:"minus"},w[22]=b):b=w[22];let V=A<=k;w[23]!==T||w[24]!==V?(y=(0,a.jsx)(i.K,{variant:"outline",icon:b,size:"sm",onClick:T,disabled:V,label:"decrease value"}),w[23]=T,w[24]=V,w[25]=y):y=w[25];let I=t||(void 0===c?A:c);w[26]===Symbol.for("react.memo_cache_sentinel")?(v={name:"plus"},w[26]=v):v=w[26];let R=void 0!==o&&A>=o;return w[27]!==C||w[28]!==R?(N=(0,a.jsx)(i.K,{variant:"outline",icon:v,size:"sm",onClick:C,disabled:R,label:"increase value"}),w[27]=C,w[28]=R,w[29]=N):N=w[29],w[30]!==m||w[31]!==y||w[32]!==I||w[33]!==N||w[34]!==j?(_=(0,a.jsxs)("div",{className:j,...m,children:[y,I,N]}),w[30]=m,w[31]=y,w[32]=I,w[33]=N,w[34]=j,w[35]=_):_=w[35],_}},57388:(e,t,s)=>{"use strict";s.d(t,{Ke:()=>x,Nt:()=>d,R6:()=>m});var a=s(37876),n=s(27964),l=s(49429),r=s(8418),i=s(75188),c=s(74302),o=s(44546);let d=l.N;function m(e){let t,s,l,i,d,m,x,h,u,g=(0,n.c)(23);if(g[0]!==e?({ref:i,render:d,className:s,withArrow:m,children:t,...l}=e,g[0]=e,g[1]=t,g[2]=s,g[3]=l,g[4]=i,g[5]=d,g[6]=m):(t=g[1],s=g[2],l=g[3],i=g[4],d=g[5],m=g[6]),d){let e;return g[7]!==t||g[8]!==l||g[9]!==i||g[10]!==d?(e=(0,a.jsx)(r.R,{ref:i,render:d,...l,children:t}),g[7]=t,g[8]=l,g[9]=i,g[10]=d,g[11]=e):e=g[11],e}let f=m&&"flex w-full gap-2.5";return g[12]!==s||g[13]!==f?(x=(0,c.cn)(f,s),g[12]=s,g[13]=f,g[14]=x):x=g[14],g[15]!==m?(h=m&&(0,a.jsx)(o.A,{className:"self-center text-[1.5em] transition-transform in-data-panel-open:rotate-90"}),g[15]=m,g[16]=h):h=g[16],g[17]!==t||g[18]!==l||g[19]!==i||g[20]!==x||g[21]!==h?(u=(0,a.jsxs)(r.R,{ref:i,className:x,...l,children:[h,t]}),g[17]=t,g[18]=l,g[19]=i,g[20]=x,g[21]=h,g[22]=u):u=g[22],u}function x(e){let t,s,l,r,o,d=(0,n.c)(10);return d[0]!==e?({ref:l,className:t,...s}=e,d[0]=e,d[1]=t,d[2]=s,d[3]=l):(t=d[1],s=d[2],l=d[3]),d[4]!==t?(r=(0,c.cn)("h-(--collapsible-panel-height) overflow-hidden transition-[height,opacity] duration-200 ease-out data-ending-style:h-0 data-ending-style:opacity-0 data-starting-style:h-0 data-starting-style:opacity-0",t),d[4]=t,d[5]=r):r=d[5],d[6]!==s||d[7]!==l||d[8]!==r?(o=(0,a.jsx)(i.j,{ref:l,className:r,...s}),d[6]=s,d[7]=l,d[8]=r,d[9]=o):o=d[9],o}m.displayName="CollapsibleTrigger",x.displayName="CollapsibleContent"},59078:(e,t,s)=>{"use strict";function a(e){return{year:e.getFullYear(),month:1+e.getMonth(),day:e.getDate()}}function n(e){return e&&new Date(e.year,e.month-1,e.day)}function l(e){return{from:e.from&&n(e.from),to:e.to&&n(e.to)}}function r(e){return t=>e(t&&a(t))}s.d(t,{DB:()=>a,QH:()=>n,WR:()=>r,X3:()=>l})},76067:(e,t,s)=>{"use strict";s.d(t,{A:()=>m});var a=s(37876),n=s(27964),l=s(52572),r=s(58148),i=s(94800),c=s(50845),o=s(56364),d=s(74302);function m(e){let t,s,m,x,h,u,g,f,p,j,b,y,v,N,_,w,k,S,A,z,C=(0,n.c)(50);C[0]!==e?({className:t,defaultValue:s,value:j,min:h,max:u,trackClassName:p,thumbClassName:f,indicatorClassName:m,orientation:g,...x}=e,C[0]=e,C[1]=t,C[2]=s,C[3]=m,C[4]=x,C[5]=h,C[6]=u,C[7]=g,C[8]=f,C[9]=p,C[10]=j):(t=C[1],s=C[2],m=C[3],x=C[4],h=C[5],u=C[6],g=C[7],f=C[8],p=C[9],j=C[10]);let T=void 0===h?0:h,V=void 0===u?100:u,I=void 0===g?"horizontal":g;C[11]!==s||C[12]!==V||C[13]!==T||C[14]!==j?(b=Array.isArray(j)?j:Array.isArray(s)?s:[T,V],C[11]=s,C[12]=V,C[13]=T,C[14]=j,C[15]=b):b=C[15];let R=b,G="horizontal"===I?"w-full":"h-full";C[16]!==t||C[17]!==G?(y=(0,d.cn)(G,t),C[16]=t,C[17]=G,C[18]=y):y=C[18];let F="horizontal"===I?"h-full min-w-40 flex-row":"h-full min-h-40 w-auto flex-col";C[19]!==F?(v=(0,d.cn)("relative flex w-full touch-none items-center select-none data-disabled:opacity-50",F),C[19]=F,C[20]=v):v=C[20];let $="horizontal"===I?"h-1 w-full":"h-full w-1";C[21]!==$||C[22]!==p?(N=(0,d.cn)("relative grow overflow-hidden rounded-full bg-gray-4 select-none",$,p),C[21]=$,C[22]=p,C[23]=N):N=C[23];let E="horizontal"===I?"w-full":"h-full";if(C[24]!==m||C[25]!==E?(_=(0,d.cn)("bg-foreground select-none",E,m),C[24]=m,C[25]=E,C[26]=_):_=C[26],C[27]!==_?(w=(0,a.jsx)(l.X,{"data-slot":"slider-range",className:_}),C[27]=_,C[28]=w):w=C[28],C[29]!==N||C[30]!==w?(k=(0,a.jsx)(r.h,{"data-slot":"slider-track",className:N,children:w}),C[29]=N,C[30]=w,C[31]=k):k=C[31],C[32]!==R.length||C[33]!==f){let e;C[35]!==f?(e=(e,t)=>(0,a.jsx)(i.O,{"data-slot":"slider-thumb",className:(0,d.cn)("relative block size-3 shrink-0 cursor-grab rounded-full border-2 border-foreground bg-background shadow-lg select-none after:absolute after:-inset-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",f)},t),C[35]=f,C[36]=e):e=C[36],S=Array.from({length:R.length},e),C[32]=R.length,C[33]=f,C[34]=S}else S=C[34];return C[37]!==k||C[38]!==S||C[39]!==v?(A=(0,a.jsxs)(c.X,{className:v,children:[k,S]}),C[37]=k,C[38]=S,C[39]=v,C[40]=A):A=C[40],C[41]!==s||C[42]!==V||C[43]!==T||C[44]!==I||C[45]!==x||C[46]!==A||C[47]!==y||C[48]!==j?(z=(0,a.jsx)(o.g,{className:y,"data-slot":"slider",defaultValue:s,value:j,min:T,max:V,orientation:I,thumbAlignment:"edge",...x,children:A}),C[41]=s,C[42]=V,C[43]=T,C[44]=I,C[45]=x,C[46]=A,C[47]=y,C[48]=j,C[49]=z):z=C[49],z}},77866:(e,t,s)=>{"use strict";s.d(t,{Q:()=>v,l:()=>_});var a=s(37876),n=s(27964),l=s(14232),r=s(81901),i=s(65798),c=s(38894),o=s(4791),d=s(74302),m=s(59078),x=s(77934),h=s(34265),u=s(78977),g=s(58561),f=s(41231),p=s(20658);let j="size-12 flex items-center justify-center rounded-full border border-transparent enabled:hover:bg-foreground
1/5 disabled:text-gray-8 aria-disabled:text-gray-8 aria-disabled:hover:bg-transparent aria-disabled:cursor-default";function b(e,t){return(t.year-e.year)*12+(t.month-e.month)+1}function y(e,t){return e.year===t.year&&e.month===t.month}function v(e){let t,s,l,r,i=(0,n.c)(10),{className:c}=e,o=h.h.useFormatWeekdayAbbrev(),g=h.h.useWeekStartsOn();if(i[0]!==o||i[1]!==g){let e={year:2024,month:1,day:7};t=Array.from({length:7},(t,s)=>{let a=(0,m.QH)((0,x.fi)(e,(g+s)%7));return(0,u.vA)(a,"expected valid weekday date"),o(a)}),i[0]=o,i[1]=g,i[2]=t}else t=i[2];let f=t;return i[3]!==c?(s=(0,d.cn)("no-translate mx-auto grid w-84 shrink-0 grid-cols-7 text-center text-xs font-semibold text-muted",c),i[3]=c,i[4]=s):s=i[4],i[5]!==f?(l=f.map(N),i[5]=f,i[6]=l):l=i[6],i[7]!==s||i[8]!==l?(r=(0,a.jsx)("div",{className:s,children:l}),i[7]=s,i[8]=l,i[9]=r):r=i[9],r}function N(e,t){return(0,a.jsx)("div",{children:e},t)}function _(e){let{dayRange:t,defaultStartDay:s,retDayRangeCallback:n,min:v,max:N,numberOfMonths:_,mode:w="range",duration:k,firstClickHint:S,useRootWidth:A,hasMinHeight:z=!0,onScrollableMonthsChange:C,monthWindowOpen:T,disabledWeekdays:V}=e,I=h.h.useFormatWeekdayAbbrev(),R=h.h.useWeekStartsOn();(0,u.vA)(!k||k>=0,"duration can't be negative"),(0,u.vA)("range"===w||null==k,"duration is only valid for range mode"),(0,u.vA)("range"===w||null==S,"firstClickHint is only valid for range mode");let[G,F]=(0,l.useState)(S||"from"),$=v&&(0,m.QH)(v),E=N&&(0,m.QH)(N),M=(0,l.useRef)(null),L=(0,r.x)(M,718),P=(0,i.U)("(min-width:752px)"),O=A?L:P,q=!O&&void 0===_,D=(0,x.wH)(v||(0,x.O4)()),U=N?(0,x.wH)(N):(0,x.wH)((0,x.PS)(D,119)),H=(0,l.useRef)(0),W=(0,l.useRef)(!1);T&&!W.current&&(H.current+=1),W.current=!!T;let K=[void 0!==T?H.current:0,v?`${v.year}-${v.month}`:"none",N?`${N.year}-${N.month}`:"none",q].join("|"),B=(0,x.wH)(s||D),Q=(0,l.useRef)({sessionKey:K,month:B});Q.current.sessionKey!==K&&(Q.current={sessionKey:K,month:B});let J=Q.current.month,Y=(0,x.Tw)(J,D)?J:D,Z=Math.max(1,b(Y,U)),X=Math.max(1,Math.min(Z,24*Math.ceil(Math.max(1,b(Y,(0,x.wH)(J)))/24))),ee=(0,m.QH)(Y)??$,[et,es]=(0,l.useState)({sessionKey:K,count:X}),ea=et.sessionKey===K?Math.min(et.count,Z):X,en=_??(O?2:q?Math.max(1,ea):1);(0,l.useEffect)(()=>{C?.(q)},[C,q]),(0,l.useLayoutEffect)(()=>{if(!q)return;let e=M.current;if(!e)return;let t=function(e){let t=e?.parentElement??null;for(;t;){let{overflowY:e}=getComputedStyle(t);if("auto"===e||"scroll"===e)return t;t=t.parentElement}return null}(e);if(!t)return;let s=0,a=()=>{!function(e,t,s,a){let n;if(y(s,a))return t.scrollTop=0,!0;let l=e.querySelector('[data-scroll-anchor="true"]');return!!l&&(n=l.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop,t.scrollTop=Math.max(0,n-32),!0)}(e,t,J,Y)&&(s=requestAnimationFrame(a))};return a(),()=>cancelAnimationFrame(s)},[K,q]);let el=(0,m.QH)(J)||(0,m.QH)(v||(0,x.O4)())||$;return(0,a.jsxs)("div",{ref:M,className:(0,d.cn)("text-center",z&&!q&&"min-h-96"),children:[(0,a.jsx)(c.h,{..."single"===w?{mode:"single",selected:(0,m.QH)(t.from),required:!0}:{mode:"range",selected:(0,m.X3)(t)},onSelect:()=>{},onDayClick:(0,m.WR)(e=>{let s,a;e?"single"===w?s=a=e:k?a=(s=e)?(0,x.fi)(s,k):void 0:t.from?t.to?"to"===G?(0,x.Tw)(e,t.from)?(s=e,a=void 0,F("to")):(s=t.from,a=e,F("from")):((0,x.Tw)(e,t.from)||(0,x.Tw)(t.to,e)?(s=e,a=void 0):(s=e,a=t.to),F("to")):(0,x.Tw)(e,t.from)?(s=e,a=void 0,F("to")):(s=t.from,a=e,F("from")):(s=e,a=void 0,F("to")):s=a=void 0,a&&(0,u.vA)(s,"expected from day to exist"),a&&s&&(0,u.vA)(!(0,x.Tw)(a,s),"to can't be before from"),n({from:s,to:a})}),...q?{month:(0,m.QH)(Y)}:{defaultMonth:el},startMonth:ee,endMonth:E,weekStartsOn:R,disabled:(0,g.oE)([$&&{before:$},E&&{after:E},V?.length?{dayOfWeek:V}:void 0]),numberOfMonths:en,hideNavigation:q,hideWeekdays:q,classNames:{[o.UI.Months]:(0,d.cn)(q?"relative mx-auto flex w-84 flex-col gap-6":"relative mx-auto flex w-fit gap-12"),[o.UI.MonthCaption]:(0,d.cn)(q?"pb-1.5 text-left":"h-12"),[o.UI.CaptionLabel]:(0,d.cn)(q?"text-base font-semibold":"inline-flex h-12 items-center font-semibold"),[o.UI.Nav]:"pointer-events-none absolute inset-x-0 flex justify-between",[o.U
1I.PreviousMonthButton]:`${j} pointer-events-auto`,[o.UI.NextMonthButton]:`${j} pointer-events-auto -scale-x-100`,[o.UI.MonthGrid]:(0,d.cn)(q?"mx-auto w-fit":"w-full"),[o.UI.Weekday]:"text-muted size-12 text-center text-xs font-semibold",[o.UI.Day]:"group relative size-12 rounded-full p-0",[o.UI.DayButton]:`${j} hover:enabled:group-[.range-middle]:border-foreground`,[o.pL.outside]:"bg-transparent!",..."single"===w||!t.to||t.from&&t.to&&(0,x.lp)(t.from,t.to)?{[o.wc.selected]:"*:bg-foreground! *:text-background!"}:{[o.wc.range_start]:"rounded-l-full bg-gray-3 rounded-r-none *:bg-foreground! *:text-background!",[o.wc.range_middle]:"range-middle rounded-none bg-gray-3",[o.wc.range_end]:"rounded-r-full rounded-l-none bg-gray-3 *:bg-foreground! *:text-background!"}},formatters:{formatWeekdayName:I},components:{Chevron:()=>(0,a.jsx)(f.A,{strokeWidth:2.5,className:"-translate-x-px text-lg"}),Weekday:e=>(0,a.jsx)("th",{...e,className:(0,d.cn)(e.className,"no-translate")}),...q?{MonthCaption(e){let{calendarMonth:t,children:s,...n}=e,l=y((0,x.wH)((0,m.DB)(t.date)),J);return(0,a.jsx)("div",{...n,"data-scroll-anchor":l?"true":void 0,children:s})}}:{}}},K),q&&ea<Z&&(0,a.jsx)(p.$,{variant:"subtle",size:"md",block:!0,className:"mt-5",onClick:()=>es(e=>({sessionKey:K,count:(e.sessionKey===K?e.count:X)+24})),children:"Show more dates"})]})}},81684:(e,t,s)=>{"use strict";s.d(t,{A0:()=>c,BF:()=>d,Hj:()=>m,MS:()=>o,XI:()=>i,nA:()=>h,nd:()=>x});var a=s(37876),n=s(14232),l=s(74302),r=s(28104);let i=(0,n.forwardRef)((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("table",{ref:t,className:(0,l.cn)("w-full caption-bottom",s),...n})});i.displayName="Table";let c=(0,n.forwardRef)((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("thead",{ref:t,className:(0,l.cn)("[&_tr]:border-b",s),...n})});c.displayName="TableHeader";let o=(0,n.forwardRef)((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("tr",{ref:t,className:(0,l.cn)("bg-background/80 shadow-[inset_0_-1px_0_0_var(--color-separator)] backdrop-blur-md",s),...n})});o.displayName="TableHeaderRow";let d=(0,n.forwardRef)((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("tbody",{ref:t,className:(0,l.cn)("[&_tr:last-child]:border-0",s),...n})});d.displayName="TableBody",(0,n.forwardRef)((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("tfoot",{ref:t,className:(0,l.cn)("border-t bg-subtle font-medium last:[&>tr]:border-b-0",s),...n})}).displayName="TableFooter";let m=(0,n.forwardRef)((e,t)=>{let{className:s,hover:i=!0,href:c,children:o,...d}=e,m=o;return c&&(m=n.Children.toArray(o).map(e=>{if(!(0,n.isValidElement)(e))return e;let t=e.props.className,s=(0,a.jsx)(r.N,{href:c,className:"absolute inset-0 z-0",tabIndex:-1,"aria-hidden":"true"});return(0,n.cloneElement)(e,{className:(0,l.cn)(t,"relative")},s,e.props.children)})),(0,a.jsx)("tr",{ref:t,className:(0,l.cn)("border-b",i&&"hover:bg-subtle",c&&"relative cursor-pointer [&_td_a:not([aria-hidden])]:relative [&_td_a:not([aria-hidden])]:z-1 [&_td_button]:relative [&_td_button]:z-1",s),...d,children:m})});m.displayName="TableRow";let x=(0,n.forwardRef)((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("th",{ref:t,className:(0,l.cn)("h-[3.5em] px-[1em] text-left align-middle font-semibold [&:has([role=checkbox])]:pr-0",s),...n})});x.displayName="TableHead";let h=(0,n.forwardRef)((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("td",{ref:t,className:(0,l.cn)("p-[1em] align-middle [&:has([role=checkbox])]:pr-0",s),...n})});h.displayName="TableCell",(0,n.forwardRef)((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("caption",{ref:t,className:(0,l.cn)("mt-[1em] text-sm text-muted",s),...n})}).displayName="TableCaption"},81901:(e,t,s)=>{"use strict";s.d(t,{x:()=>i});var a=s(14232),n=s(4917),l=s.n(n),r=s(8153);function i(e,t){let[s,n]=(0,a.useState)(void 0);return(0,r.E)(()=>{let s=e.current;if(!s)return;let a=s.getBoundingClientRect().width;a>0&&n(a>=t);let r=new ResizeObserver(l()(e=>{for(let s of e)n(s.contentRect.width>=t)}));return r.observe(s),()=>{r.disconnect()}},[e.current,t]),s}},83834:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/internal/agentic-playground/[id]",function(){return s(16067)}])},85409:(e,t,s)=>{"use strict";s.d(t,{F:()=>o});
1var a=s(37876),n=s(27964),l=s(47137),r=s(74302),i=s(26073);let c=(0,l.F)("rounded-full border py-[.25em] leading-[1.125] font-medium transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"min-h-(--button-sm-size) px-(--button-sm-px) text-xs",md:"min-h-(--button-md-size) px-(--button-md-px) text-sm",lg:"min-h-(--button-lg-size) px-(--button-lg-px) text-sm"}},defaultVariants:{size:"md"}});function o(e){let t,s,l,o,d,m,x,h,u=(0,n.c)(18);if(u[0]!==e){let{options:n,disabled:x,className:h,size:g,selectedStyle:f,otherOption:p,...j}=e;t=x,o=g,s=p,l="border"===(void 0===f?"filled":f)?"bg-background text-foreground ring ring-primary border-primary":"border-primary bg-primary text-primary-foreground",u[7]!==h?(d=(0,r.cn)("flex flex-wrap gap-x-2 gap-y-2.5",h),u[7]=h,u[8]=d):d=u[8],m=n.map(e=>{let s="string"==typeof e?e:e.value,n="string"==typeof e?e:e.label,d="string"==typeof e?void 0:e.icon,m="multiple"===j.selectionMode,x=m?j.value.includes(s):j.value===s;return(0,a.jsxs)("button",{type:"button","aria-pressed":x,disabled:t,onClick:()=>{if(m){let e=j.value.includes(s)?j.value.filter(e=>e!==s):[...j.value,s];j.onChange(e);return}j.onChange(s)},className:(0,r.cn)(c({size:o}),"inline-flex items-center gap-1.5",x?l:"border-input bg-background hover:bg-subtle"),children:[d&&(0,a.jsx)(i.I,{name:d,className:"ml-[-.125em] shrink-0 text-[1.5em]","aria-hidden":!0}),n]},s)}),u[0]=e,u[1]=t,u[2]=s,u[3]=l,u[4]=o,u[5]=d,u[6]=m}else t=u[1],s=u[2],l=u[3],o=u[4],d=u[5],m=u[6];return u[9]!==t||u[10]!==s||u[11]!==l||u[12]!==o?(x=s&&(0,a.jsx)("button",{type:"button","aria-pressed":s.selected,disabled:t,onClick:s.onClick,className:(0,r.cn)(c({size:o}),"inline-flex items-center gap-1.5",s.selected?l:"border-input bg-background hover:bg-subtle"),children:s.label}),u[9]=t,u[10]=s,u[11]=l,u[12]=o,u[13]=x):x=u[13],u[14]!==d||u[15]!==m||u[16]!==x?(h=(0,a.jsxs)("div",{className:d,children:[m,x]}),u[14]=d,u[15]=m,u[16]=x,u[17]=h):h=u[17],h}}},e=>{e.O(0,[770,8901,9117,929,7117,7142,8404,8894,9180,8913,7979,7209,8827,8873,5946,5254,9811,9e3,6477,3022,4269,6244,4975,9980,6660,3753,6058,3672,6593,636,8792],()=>e(e.s=83834)),_N_E=e.O()}]);
2//# sourceMappingURL=[id]-79cdf509a4d7131a.js.map

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.