@heroui/agent 0.2.0-beta.7 → 0.2.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/README.md +15 -10
  3. package/dist/chart-content-BBHQVMP4.js +1 -0
  4. package/dist/chunk-2XBFFSW2.js +1 -0
  5. package/dist/chunk-64RI74L5.js +1 -0
  6. package/dist/chunk-6ZJJN322.js +1 -0
  7. package/dist/chunk-7KCGPNEN.js +1 -0
  8. package/dist/chunk-BBB5EHDN.js +5 -0
  9. package/dist/chunk-CR3H7AVI.js +1 -0
  10. package/dist/chunk-HCLXS4HQ.js +1 -0
  11. package/dist/chunk-MXLGM4WV.js +1 -0
  12. package/dist/chunk-OA3TG5CS.js +1 -0
  13. package/dist/chunk-PZJ4NC3J.js +1 -0
  14. package/dist/chunk-RNNGE7KM.js +1 -0
  15. package/dist/chunk-S6OIAJSC.js +1 -0
  16. package/dist/chunk-SUDHJNTJ.js +2 -0
  17. package/dist/chunk-WUAFMD7Z.js +2 -0
  18. package/dist/component-renderer-GG6JVRUG.js +1 -0
  19. package/dist/composer-draft-NSKK65F3.js +1 -0
  20. package/dist/composer-image-draft-KAGTNQR7.js +1 -0
  21. package/dist/contracts.d.ts +50 -19
  22. package/dist/contracts.js +2 -2545
  23. package/dist/css/index.css +1 -1
  24. package/dist/embed-runtime-GYXK7V6N.js +5 -0
  25. package/dist/identity-3P8-17km.d.ts +95 -0
  26. package/dist/index.d.ts +46 -10
  27. package/dist/index.js +1 -28
  28. package/dist/interactive-map-surface-WC2LPCR7.js +1 -0
  29. package/dist/internal/client-tools.js +1 -0
  30. package/dist/internal/models.js +1 -0
  31. package/dist/internal/runtime.js +1 -0
  32. package/dist/internal/theme.js +1 -0
  33. package/dist/next.d.ts +2 -1
  34. package/dist/next.js +1 -22
  35. package/dist/server.d.ts +1 -1
  36. package/dist/server.js +1 -260
  37. package/package.json +6 -6
  38. package/dist/chart-content-E4NPTUPR.js +0 -2696
  39. package/dist/chunk-3FG5NRTX.js +0 -9
  40. package/dist/chunk-6O3SFXJK.js +0 -325
  41. package/dist/chunk-FNGGMHVR.js +0 -625
  42. package/dist/chunk-OQGXZY5L.js +0 -1091
  43. package/dist/chunk-TOOT6SZ2.js +0 -74
  44. package/dist/chunk-V5S5FRGV.js +0 -984
  45. package/dist/chunk-VJA52U5P.js +0 -137
  46. package/dist/component-renderer-46EJDPTB.js +0 -10627
  47. package/dist/embed-runtime-UF7XJIFA.js +0 -7650
  48. package/dist/identity-Z6i6pL0F.d.ts +0 -166
  49. package/dist/interactive-map-surface-67KHT3VB.js +0 -362
@@ -0,0 +1 @@
1
+ import{a as to,b as se,c as A,d as Ae,f as ao,g as oo,h as no,i as ro,j as Qe,k as io}from"./chunk-BBB5EHDN.js";import{b as so,c as pa}from"./chunk-HCLXS4HQ.js";import{a as fe,b as Tt,c as At}from"./chunk-MXLGM4WV.js";import{a as be,b as k,c as ie}from"./chunk-S6OIAJSC.js";import{a as b}from"./chunk-CR3H7AVI.js";import{a as Je}from"./chunk-6ZJJN322.js";import{z as a}from"zod";var ai=["activity","alert","briefcase","calendar","chart","check","clock","code","credit-card","database","device-desktop","device-mobile","document","dollar","flag","globe","heart","home","info","lightning","location","mail","percent","person","question","receipt","rocket","route","search","shopping-bag","speedometer","star","tag","target","users"],oi=["clear","partly-cloudy","cloudy","fog","drizzle","rain","snow","thunderstorm","windy","unknown"],ni=a.string().trim().min(1).max(120),f=a.string().trim().min(1).max(320),Be=a.string().trim().min(1).max(1e4),D=a.string().trim().min(1).max(80),_=a.string().trim().min(1).max(100),ze=a.string().regex(/^\d{4}-\d{2}-\d{2}$/),ca=a.string().regex(/^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/),ri=a.union([a.string().max(500),a.number(),a.boolean(),a.null()]),Re=a.record(a.string().max(80),ri),w=a.object({description:f.optional(),id:_,title:ni}),Ca=a.enum(["outline","plain","surface","surface-secondary","surface-tertiary","widget"]).describe("Card hierarchy: surface for the primary standalone group; surface-secondary for supporting information; surface-tertiary for one featured or emphasized group; outline for equal peers and comparisons; plain for a structural section already separated by surrounding layout; widget for a compact interactive group with actions or controls."),ii=a.enum(["compact","details","media"]).describe("Record information layout: details for a full labeled fact set; compact for a brief summary or repeated peer cards; media for an image-led product, place, person, or event and only when an image is available."),oe=a.discriminatedUnion("style",[a.object({compact:a.boolean().optional(),style:a.literal("number")}),a.object({maximumFractionDigits:a.number().int().min(0).max(4).optional(),style:a.literal("percent")}),a.object({compact:a.boolean().optional(),currency:a.string().regex(/^[A-Z]{3}$/),style:a.literal("currency")})]),ye=a.enum(["accent","chart-1","chart-2","chart-3","chart-4","chart-5","danger","default","success","warning"]),co=a.record(a.string().trim().min(1).max(80),ye).refine(t=>Object.keys(t).length<=50,"At most 50 category colors are allowed"),fa=a.object({color:ye.optional(),dataKey:D,format:oe.optional(),label:f}),si=fa.extend({axis:a.enum(["left","right"]).optional(),stacked:a.boolean().optional(),type:a.enum(["area","bar","line"])}),li=a.object({id:_,label:f,maxItems:a.number().int().min(1).max(200).optional()}),Ft=w.extend({data:a.array(Re).min(1).max(200),defaultRangeId:_.optional(),ranges:a.array(li).min(2).max(8).optional(),series:a.array(fa).min(1).max(5),showSummary:a.boolean().optional(),xKey:D}),Mt=w.extend({colors:co.optional(),data:a.array(Re).min(1).max(50),format:oe.optional(),labelKey:D,valueKey:D}),di=w.extend({colors:co.optional(),data:a.array(Re).min(1).max(200),format:oe.optional(),groupKey:D.optional(),kind:a.literal("scatter-chart"),labelKey:D.optional(),sizeKey:D.optional(),xKey:D,yKey:D}),pi=w.extend({color:ye.optional(),data:a.array(Re).min(1).max(400),format:oe.optional(),kind:a.literal("heatmap"),valueKey:D,xKey:D,yKey:D}),ci=Ft.extend({baseline:a.number().finite().optional(),kind:a.literal("line-chart"),mode:a.enum(["live","profit-loss","standard"]).optional(),negativeColor:ye.optional(),positiveColor:ye.optional(),windowSize:a.number().int().min(2).max(200).optional()}).superRefine((t,e)=>{(t.mode==="live"||t.mode==="profit-loss")&&t.series.length!==1&&e.addIssue({code:"custom",message:`${t.mode} line charts require exactly one series`,path:["series"]})}),mi=w.extend({closeKey:D,data:a.array(Re).min(1).max(200),downColor:ye.optional(),format:oe.optional(),highKey:D,kind:a.literal("candlestick-chart"),lowKey:D,openKey:D,upColor:ye.optional(),xKey:D}).superRefine((t,e)=>{for(let[o,r]of t.data.entries()){let n=r[t.openKey],s=r[t.highKey],d=r[t.lowKey],m=r[t.closeKey];if([n,s,d,m].some(v=>typeof v!="number"||!Number.isFinite(v))){e.addIssue({code:"custom",message:"Every candlestick row needs finite open, high, low, and close values",path:["data",o]});continue}let y=n,h=s,u=d,g=m;(u>Math.min(y,g)||h<Math.max(y,g)||u>h)&&e.addIssue({code:"custom",message:"Candlestick low/high values must contain the open and close values",path:["data",o]})}}),ui=Mt.extend({data:a.array(Re).min(2).max(20),kind:a.literal("funnel-chart"),orientation:a.enum(["horizontal","vertical"]).optional(),showPercentages:a.boolean().optional()}).superRefine((t,e)=>{let o=t.data.map((r,n)=>{let s=r[t.valueKey];return typeof s!="number"||!Number.isFinite(s)||s<0?(e.addIssue({code:"custom",message:"Every funnel stage needs a finite, non-negative value",path:["data",n,t.valueKey]}),0):s});o.some(r=>r>0)||e.addIssue({code:"custom",message:"A funnel needs at least one stage above zero",path:["data"]}),(o[0]??0)<=0&&e.addIssue({code:"custom",message:"A funnel's first stage must be above zero",path:["data",0,t.valueKey]});for(let r=1;r<o.length;r+=1)(o[r]??0)>(o[r-1]??0)&&e.addIssue({code:"custom",message:"Funnel stages must not increase",path:["data",r,t.valueKey]})}),gi=w.extend({color:ye.optional(),format:oe.optional(),kind:a.literal("gauge-chart"),label:f,max:a.number().finite().optional(),min:a.number().finite().optional(),notches:a.number().int().min(6).max(60).optional(),orientation:a.enum(["arc","linear"]).optional(),value:a.number().finite()}).superRefine((t,e)=>{let{maximum:o,minimum:r}=to(t);o<=r?e.addIssue({code:"custom",message:"Gauge max must be greater than min",path:["max"]}):(t.value<r||t.value>o)&&e.addIssue({code:"custom",message:"Gauge value must be within its min/max range",path:["value"]})}),mo=a.lazy(()=>a.object({children:a.array(mo).min(1).max(12).optional(),color:ye.optional(),id:_,label:f,value:a.number().finite().positive().optional()}).superRefine((t,e)=>{t.children?.length&&t.value!==void 0&&e.addIssue({code:"custom",message:"Sunburst branch values are derived from their children",path:["value"]}),!t.children?.length&&t.value===void 0&&e.addIssue({code:"custom",message:"Every sunburst leaf needs a positive value",path:["value"]})})),Ci=w.extend({data:mo,format:oe.optional(),kind:a.literal("sunburst-chart")}).superRefine((t,e)=>{let o=new Set,r=0,n=0,s=(d,m)=>{r+=1,n=Math.max(n,m),o.has(d.id)&&e.addIssue({code:"custom",message:`Duplicate sunburst node id "${d.id}"`}),o.add(d.id),d.children?.forEach(l=>s(l,m+1))};t.data.children?.length||e.addIssue({code:"custom",message:"A sunburst root needs at least one child",path:["data","children"]}),s(t.data,0),r>60&&e.addIssue({code:"custom",message:"Sunburst charts allow at most 60 nodes"}),n>4&&e.addIssue({code:"custom",message:"Sunburst charts allow at most four nested levels"})}),Rt=a.object({label:f,value:D}),hi=a.object({end:ze,start:ze}).refine(t=>t.start<=t.end,"The start date must not be after the end date"),le={description:f.optional(),label:f,name:D,required:a.boolean().optional()},fi=a.discriminatedUnion("kind",[a.object({...le,defaultValue:a.string().max(500).optional(),inputType:a.enum(["email","number","password","search","tel","text","url"]).optional(),kind:a.literal("input"),placeholder:a.string().max(160).optional()}),a.object({...le,defaultValue:a.string().max(2e3).optional(),kind:a.literal("textarea"),placeholder:a.string().max(160).optional(),rows:a.number().int().min(2).max(12).optional()}),a.object({...le,defaultValue:D.optional(),kind:a.literal("select"),options:a.array(Rt).min(1).max(30),placeholder:a.string().max(160).optional()}),a.object({...le,defaultValue:D.optional(),kind:a.literal("radio-group"),options:a.array(Rt).min(1).max(12),placeholder:a.string().max(160).optional()}),a.object({...le,defaultValue:a.array(D).max(20).optional(),kind:a.literal("checkbox-group"),options:a.array(Rt).min(1).max(20)}),a.object({...le,defaultValue:a.array(D).max(50).optional(),kind:a.literal("combobox"),options:a.array(Rt.extend({description:a.string().trim().min(1).max(120).optional()})).min(1).max(200).describe("Prefer this over select once there are more options than someone would scan \u2014 it filters as they type. Values must be unique."),placeholder:a.string().max(160).optional(),selectionMode:a.enum(["multiple","single"]).optional()}).superRefine((t,e)=>{let o=new Set(t.options.map(r=>r.value));o.size!==t.options.length&&e.addIssue({code:"custom",message:"Combobox option values must be unique",path:["options"]}),(t.selectionMode??"single")==="single"&&(t.defaultValue?.length??0)>1&&e.addIssue({code:"custom",message:"A single-selection combobox takes at most one default value",path:["defaultValue"]}),t.defaultValue?.some(r=>!o.has(r))&&e.addIssue({code:"custom",message:"Every combobox default value must be one of the options",path:["defaultValue"]})}),a.object({...le,defaultValue:a.number().optional(),kind:a.literal("slider"),max:a.number(),min:a.number(),step:a.number().positive().optional()}),a.object({...le,defaultValue:a.number().optional(),format:oe.optional(),kind:a.literal("number"),max:a.number().optional(),min:a.number().optional(),placeholder:a.string().max(160).optional(),step:a.number().positive().optional()}),a.object({...le,defaultValue:a.boolean().optional(),kind:a.literal("switch")}),a.object({...le,defaultValue:ze.optional(),kind:a.literal("date-picker"),max:ze.optional(),min:ze.optional()}),a.object({...le,defaultValue:hi.optional(),kind:a.literal("date-range-picker"),max:ze.optional(),min:ze.optional()}),a.object({...le,defaultValue:ca.optional(),hourCycle:a.union([a.literal(12),a.literal(24)]).optional(),kind:a.literal("time-field"),max:ca.optional(),min:ca.optional()})]),ba=a.enum(["danger","outline","primary","secondary","tertiary"]),Se=a.enum(ai),uo=a.object({arguments:a.record(a.string().max(80),a.unknown()).refine(t=>JSON.stringify(t).length<=4096,"Tool call arguments must serialize to at most 4KB of JSON"),name:a.string().regex(/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/)}),ae=a.object({id:_,label:f,prompt:a.string().trim().min(1).max(2e3).optional(),toolCall:uo.optional(),variant:ba.optional()}),go=a.object({latitude:a.number().finite().min(-85.051129).max(85.051129),longitude:a.number().finite().min(-180).max(180)}),ha=a.string().trim().min(1).max(2e3).refine(t=>{try{let e=new URL(t);return["http:","https:"].includes(e.protocol)&&!e.username&&!e.password}catch{return!1}},{message:"URL must use HTTP or HTTPS and cannot include credentials"}),bi=a.string().trim().min(1).max(2e3).refine(t=>{try{let e=new URL(t);return["http:","https:","mailto:","tel:"].includes(e.protocol)&&!e.username&&!e.password}catch{return!1}},{message:"Link must use HTTP, HTTPS, mailto, or tel and cannot include credentials"}),Lt={id:_,label:f,variant:ba.optional()},yi=a.string().trim().min(5).max(2e3).refine(t=>/^tel:\+?[0-9().\-\s]+$/.test(t)&&/\d/.test(t.slice(4)),"Phone links must use the tel: scheme and contain a phone number"),xi=a.discriminatedUnion("kind",[a.object({...Lt,href:yi,kind:a.literal("call")}),a.object({...Lt,href:ha,kind:a.literal("directions")}),a.object({...Lt,href:bi,kind:a.literal("other")}),a.object({...Lt,href:ha,kind:a.literal("website")})]),wi=go.extend({actions:a.array(xi).max(4).optional(),address:f.optional(),category:a.string().trim().min(1).max(100).optional(),id:_,images:a.array(a.object({alt:f,src:ha})).max(4).optional().describe("Prefer one representative image per location when a trusted tool or web image search returns one. The first image becomes the result-card thumbnail; initials are the fallback."),notes:a.string().trim().min(1).max(2e3).optional(),rating:a.number().finite().min(0).max(5).optional(),relevance:a.number().finite().min(0).max(1).optional(),reviewCount:a.number().int().nonnegative().max(1e9).optional(),title:f}),mt=a.string().trim().min(1).max(2e3).refine(t=>{if(t.startsWith("/"))return!t.startsWith("//");try{let e=new URL(t);return["http:","https:"].includes(e.protocol)&&!e.username&&!e.password}catch{return!1}},{message:"Image sources must be HTTP(S) URLs or root-relative paths"}),pe=a.object({alt:f,src:mt.refine(t=>!t.split(/[?#]/,1)[0]?.toLowerCase().endsWith(".svg"),"Response-composition images must be raster images")}),ya=a.string().regex(/^[A-Z]{3}$/),vi=a.object({amount:a.number().finite().nonnegative().max(1e9),currency:ya}),ma=a.enum(oi),lo=a.enum(["celsius","fahrenheit"]),po=a.object({label:f,status:f.optional(),time:a.string().trim().min(1).max(80)}),We=a.enum(["accent","danger","default","muted","success","warning"]),ki=a.object({actions:a.array(ae).max(3).optional(),badge:a.object({label:f,tone:We.optional()}).optional(),description:f.optional(),id:_,image:a.object({alt:f,src:mt}),meta:a.string().trim().min(1).max(160).optional(),name:f,price:a.object({amount:a.number().finite().nonnegative().max(1e9),currency:ya.optional()}),rating:a.object({count:a.number().int().nonnegative().max(1e9).optional(),value:a.number().finite().min(0).max(5)}).optional()}),Si=a.enum(["accent","danger","default","success","warning"]),Ni=a.object({description:f.optional(),format:oe.optional(),id:_,label:f,max:a.number().optional(),min:a.number().optional(),tone:Si.optional(),value:a.number()}).superRefine((t,e)=>{let o=t.min??0,r=t.max??(t.format?.style==="percent"?1:100);r<=o&&e.addIssue({code:"custom",message:"Meter max must be greater than min"}),(t.value<o||t.value>r)&&e.addIssue({code:"custom",message:"Meter value must be within its min/max range"})}),p={accordion:w.extend({kind:a.literal("accordion"),sections:a.array(a.object({content:Be,defaultOpen:a.boolean().optional(),id:_,title:f})).min(1).max(12)}),actions:w.extend({actions:a.array(ae).min(1).max(8),kind:a.literal("action-group"),orientation:a.enum(["horizontal","vertical"]).optional()}),area:Ft.extend({kind:a.literal("area-chart"),stacked:a.boolean().optional()}),bar:Ft.extend({kind:a.literal("bar-chart"),layout:a.enum(["horizontal","vertical"]).optional(),stacked:a.boolean().optional()}),callout:w.extend({content:Be,icon:Se.optional(),kind:a.literal("callout"),tone:a.enum(["accent","danger","neutral","success","warning"]).optional()}),candlestick:mi,channelMessage:w.extend({attachments:a.array(a.object({id:_,image:pe.optional(),name:f})).max(8).optional(),author:a.object({image:pe.optional(),name:f}),channel:f,content:Be,kind:a.literal("channel-message"),timestamp:a.string().trim().min(1).max(80)}),code:w.extend({code:a.string().min(1).max(2e4),kind:a.literal("code-block"),language:a.string().trim().max(40).optional()}),comparison:w.extend({items:a.array(a.object({change:a.number().optional(),format:oe.optional(),label:f,note:a.string().trim().max(180).optional(),value:a.number()})).min(1).max(12),kind:a.literal("comparison-list")}),composed:Ft.extend({kind:a.literal("composed-chart"),series:a.array(si).min(2).max(5)}),createEvent:w.extend({actions:a.array(ae).max(2).optional(),date:a.object({day:a.number().int().min(1).max(31),weekday:a.string().trim().min(1).max(20)}),events:a.array(a.object({id:_,status:a.enum(["existing","proposed"]).optional(),time:a.string().trim().min(1).max(80),title:f,tone:We.optional()})).min(1).max(12),kind:a.literal("create-event")}),diagram:w.extend({chart:a.string().trim().min(1).max(4e3).describe('Mermaid source. Pick the diagram type from the relationship: "flowchart LR" for a process or decision path, "sequenceDiagram" for an exchange between parties over time, "erDiagram" for how records relate, "stateDiagram-v2" for the states something moves between. Example: "flowchart LR\\n A[Order placed] --> B{In stock?}\\n B -- yes --> C[Ship]\\n B -- no --> D[Backorder]". Never include HTML, script tags, or click directives.'),kind:a.literal("diagram")}).superRefine((t,e)=>{/<\s*script|javascript:|^\s*click\s+\S/im.test(t.chart)&&e.addIssue({code:"custom",message:"Diagram source cannot contain HTML, script URLs, or click directives",path:["chart"]})}),donut:Mt.extend({kind:a.literal("donut-chart")}),enableNotification:w.extend({actions:a.tuple([ae,ae]),kind:a.literal("enable-notification")}),eventSession:w.extend({action:ae.optional(),eyebrow:a.string().trim().min(1).max(100).optional(),kind:a.literal("event-session"),location:f,speakers:a.array(a.object({image:pe.optional(),name:f,role:f})).max(8),time:a.string().trim().min(1).max(80)}),flightTracker:w.extend({airline:a.object({logo:pe.optional(),name:f}),date:a.string().trim().min(1).max(80),destination:po,flightNumber:a.string().trim().min(1).max(40),kind:a.literal("flight-tracker"),origin:po,progress:a.number().finite().min(0).max(100).optional()}),followup:w.extend({kind:a.literal("followup"),prompts:a.array(a.object({id:_,label:f,prompt:Be})).min(1).max(8)}),form:w.extend({actions:a.array(ae).min(1).max(4),fields:a.array(fi).min(1).max(20),kind:a.literal("form")}),funnel:ui,gauge:gi,heatmap:pi,image:w.extend({images:a.array(a.object({alt:f,aspectRatio:a.enum(["landscape","portrait","square","wide"]).optional(),caption:f.optional(),src:mt})).min(1).max(6),kind:a.literal("image"),variant:a.enum(["grid","horizontal"]).optional().describe("Use horizontal for a swipeable gallery in narrow chat interfaces.")}),kpiGrid:w.extend({kind:a.literal("kpi-grid"),metrics:a.array(a.object({change:a.number().optional(),color:ye.optional(),format:oe.optional(),icon:Se.optional(),label:f,trend:a.array(a.number().finite()).min(2).max(60).describe("The values behind this KPI, oldest to newest, drawn as a sparkline. The last point should agree with value."),value:a.number()})).min(1).max(4)}),line:ci,list:w.extend({items:a.array(a.object({checked:a.boolean().optional(),children:a.array(f).max(8).optional(),id:_,text:f})).min(1).max(30),kind:a.literal("list"),style:a.enum(["bulleted","checklist","numbered"]).optional()}),listBlock:w.extend({items:a.array(a.object({description:f.optional(),icon:Se.optional(),id:_,imageAlt:f.optional(),imageUrl:mt.optional(),meta:a.string().trim().max(100).optional(),rating:a.number().min(0).max(5).optional(),title:f})).min(1).max(20),kind:a.literal("list-block")}),map:w.extend({initialLocationId:_.optional(),kind:a.literal("map"),locations:a.array(wi).min(1).max(12),viewport:a.object({center:go,zoom:a.number().int().min(1).max(18)}).optional()}).superRefine((t,e)=>{let o=new Set;for(let[r,n]of t.locations.entries()){o.has(n.id)&&e.addIssue({code:"custom",message:`Duplicate map location id "${n.id}"`,path:["locations",r,"id"]}),o.add(n.id);let s=new Set;for(let[d,m]of(n.actions??[]).entries())s.has(m.id)&&e.addIssue({code:"custom",message:`Duplicate action id "${m.id}" for map location "${n.id}"`,path:["locations",r,"actions",d,"id"]}),s.add(m.id)}t.initialLocationId&&!o.has(t.initialLocationId)&&e.addIssue({code:"custom",message:"The initial map location must reference one of the locations",path:["initialLocationId"]})}).describe("A ranked, map-synchronized set of places or professionals. Coordinates and listing facts must come from tools or user data; never invent them."),meterList:w.extend({items:a.array(Ni).min(1).max(8),kind:a.literal("meter-list")}),metricGrid:w.extend({kind:a.literal("metric-grid"),metrics:a.array(a.object({change:a.number().optional(),format:oe.optional(),icon:Se.optional(),label:f,value:a.number()})).min(1).max(4)}),pie:Mt.extend({kind:a.literal("pie-chart")}),playerCard:w.extend({backgroundImage:pe.optional(),jerseyNumber:a.string().trim().min(1).max(20).optional(),kind:a.literal("player-card"),playerName:f,stats:a.array(a.object({label:a.string().trim().min(1).max(40),value:a.union([a.string().trim().min(1).max(80),a.number().finite()])})).min(1).max(8)}),playlist:w.extend({actions:a.array(ae).max(2).optional(),cover:pe.optional(),kind:a.literal("playlist"),tracks:a.array(a.object({action:ae.optional(),artist:f,id:_,image:pe.optional(),title:f})).min(1).max(20)}),productCard:w.extend({actions:a.array(ae).max(3).optional(),kind:a.literal("product-card"),products:a.array(ki).min(1).max(8),variant:Ca.optional()}).superRefine((t,e)=>{let o=new Set;for(let[r,n]of t.products.entries())o.has(n.id)&&e.addIssue({code:"custom",message:`Duplicate product id "${n.id}"`,path:["products",r,"id"]}),o.add(n.id)}).describe("A commerce product presentation: one product renders an image-led spotlight, several render a store-style grid. Product facts (id, name, image, price, rating, availability) must come from tools or user data; never invent them."),purchaseComplete:w.extend({action:ae.optional(),details:a.array(a.object({label:f,value:f})).max(8),kind:a.literal("purchase-complete"),paid:vi.optional(),product:a.object({description:f.optional(),image:pe.optional(),name:f})}),purchaseItems:w.extend({actions:a.array(ae).max(3).optional(),currency:ya,items:a.array(a.object({description:f.optional(),id:_,image:pe.optional(),name:f,price:a.number().finite().nonnegative().max(1e9).optional(),quantity:a.number().int().positive().max(1e4).optional()})).min(1).max(20),kind:a.literal("purchase-items"),totals:a.array(a.object({amount:a.number().finite().nonnegative().max(1e9),emphasis:a.boolean().optional(),label:f})).min(1).max(8)}),radar:w.extend({angleKey:D,data:a.array(Re).min(3).max(50),kind:a.literal("radar-chart"),series:a.array(fa).min(1).max(5)}),radial:Mt.extend({endAngle:a.number().min(-360).max(360).optional(),kind:a.literal("radial-chart"),maxValue:a.number().positive().optional(),startAngle:a.number().min(-360).max(360).optional()}),recordCard:w.extend({actions:a.array(ae).max(4).optional(),eyebrow:a.string().trim().max(100).optional(),fields:a.array(a.object({icon:Se.optional(),label:f,tone:We.optional(),value:a.string().trim().min(1).max(500)})).max(12),image:a.object({alt:f,src:mt}).optional(),kind:a.literal("record-card"),layout:ii.optional(),status:a.object({label:f,tone:We.optional()}).optional(),variant:Ca.optional()}).superRefine((t,e)=>{t.layout==="media"&&!t.image&&e.addIssue({code:"custom",message:"The media record layout requires an image",path:["image"]}),t.layout==="compact"&&t.fields.length>4&&e.addIssue({code:"custom",message:"The compact record layout supports at most four fields",path:["fields"]})}),rideStatus:w.extend({driver:a.object({image:pe.optional(),name:f}),eta:a.string().trim().min(1).max(80),kind:a.literal("ride-status"),pickup:f}),sankey:w.extend({format:oe.optional(),kind:a.literal("sankey-chart"),links:a.array(a.object({source:_,target:_,value:a.number().positive()})).min(1).max(100),nodes:a.array(a.object({id:_,label:f})).min(2).max(40)}),scatter:di,steps:w.extend({kind:a.literal("steps"),steps:a.array(a.object({content:f.optional(),icon:Se.optional(),id:_,image:pe.optional().describe("A representative raster image for this step. Prefer this over icon for place itineraries when a trusted image URL is available."),meta:a.string().trim().max(100).optional(),progress:a.number().min(0).max(100).optional(),status:a.enum(["blocked","cancelled","completed","failed","in-progress","pending","complete","current","upcoming"]).optional(),timestamp:a.string().trim().max(100).optional(),title:f})).min(1).max(12),variant:a.enum(["steps","timeline"]).optional()}),sunburst:Ci,switches:w.extend({items:a.array(a.object({defaultSelected:a.boolean().optional(),description:f.optional(),id:_,label:f})).min(1).max(20),kind:a.literal("switch-group")}),table:w.extend({columns:a.array(a.object({format:oe.optional(),key:D,label:f})).min(1).max(12),filterable:a.boolean().optional(),kind:a.literal("data-table"),rows:a.array(Re).max(200),variant:a.enum(["primary","secondary"]).optional()}),tabs:w.extend({defaultValue:_.optional(),kind:a.literal("tabs"),tabs:a.array(a.union([a.object({children:a.never().optional(),content:Be,id:_,label:f}),a.object({children:a.array(a.lazy(()=>ka)).min(1).max(12),content:a.never().optional(),id:_,label:f})])).min(1).max(10),variant:a.enum(["primary","secondary"]).optional()}),tags:w.extend({kind:a.literal("tag-list"),tags:a.array(f).min(1).max(30)}),text:w.extend({content:Be,kind:a.literal("text"),variant:a.enum(["card","clear"]).optional()}),toggles:w.extend({defaultValue:a.array(_).max(12).optional(),items:a.array(a.object({id:_,label:f})).min(1).max(12),kind:a.literal("toggle-group"),selectionMode:a.enum(["multiple","single"]).optional()}),viewEvent:w.extend({date:a.string().trim().min(1).max(80),kind:a.literal("view-event"),time:a.string().trim().min(1).max(80),tone:We.optional()}),weatherCurrent:w.extend({condition:ma,details:a.array(a.object({label:f,value:f})).max(6).optional(),kind:a.literal("weather-current"),location:f,temperature:a.number().finite().min(-150).max(150),unit:lo}),weatherForecast:w.extend({condition:ma,forecast:a.array(a.object({condition:ma,label:a.string().trim().min(1).max(40),temperature:a.number().finite().min(-150).max(150)})).min(2).max(10),high:a.number().finite().min(-150).max(150),kind:a.literal("weather-forecast"),location:f,low:a.number().finite().min(-150).max(150),unit:lo})},Pi=p.metricGrid,Vi=p.kpiGrid,_i=p.line,Ii=p.area,Ti=p.bar,Ai=p.composed,Ri=p.pie,Li=p.donut,Fi=p.radar,Mi=p.radial,Di=p.sankey,Bi=p.scatter,zi=p.heatmap,Wi=p.candlestick,Ei=p.funnel,Gi=p.gauge,Ui=p.sunburst,Hi=p.table,Zi=p.comparison,$i=p.meterList,Ki=p.form,Oi=p.text,ji=p.callout,qi=p.image,Yi=p.map,Xi=p.tags,Ji=p.list,Qi=p.listBlock,es=p.accordion,ts=p.steps,as=p.code,os=p.diagram,_p=p.tabs.superRefine(Ho),ns=p.actions,rs=p.followup,is=p.switches,ss=p.toggles,ls=p.recordCard,ds=p.productCard,ps=p.flightTracker,cs=p.createEvent,ms=p.playlist,us=p.rideStatus,gs=p.purchaseItems,Cs=p.channelMessage,hs=p.purchaseComplete,fs=p.playerCard,bs=p.viewEvent,ys=p.eventSession,xs=p.enableNotification,ws=p.weatherForecast,vs=p.weatherCurrent,ks=a.discriminatedUnion("kind",[p.metricGrid,p.kpiGrid,p.line,p.area,p.bar,p.composed,p.pie,p.donut,p.radar,p.radial,p.sankey,p.scatter,p.heatmap,p.candlestick,p.funnel,p.gauge,p.sunburst,p.table,p.comparison,p.meterList]),Co=w.extend({defaultValue:_.optional(),kind:a.literal("product-signals"),tabs:a.array(a.object({component:ks,id:_,label:f})).min(2).max(4)}),Ss=Co.superRefine((t,e)=>{let o=new Set;for(let[r,n]of t.tabs.entries())o.has(n.id)&&e.addIssue({code:"custom",message:`Duplicate product signal tab id "${n.id}"`,path:["tabs",r,"id"]}),o.add(n.id);t.defaultValue&&!o.has(t.defaultValue)&&e.addIssue({code:"custom",message:"The default product signal must reference one of the tabs",path:["defaultValue"]})}),Ns=a.discriminatedUnion("kind",[p.metricGrid,p.kpiGrid,p.line,p.area,p.bar,p.composed,p.pie,p.donut,p.radar,p.radial,p.sankey,p.scatter,p.heatmap,p.candlestick,p.funnel,p.gauge,p.sunburst,p.table,p.comparison,p.meterList,p.form,p.text,p.callout,p.image,p.map,p.tags,p.list,p.listBlock,p.accordion,p.steps,p.code,p.diagram,p.tabs,p.actions,p.followup,p.switches,p.toggles,p.recordCard,p.productCard,p.flightTracker,p.createEvent,p.playlist,p.rideStatus,p.purchaseItems,p.channelMessage,p.purchaseComplete,p.playerCard,p.viewEvent,p.eventSession,p.enableNotification,p.weatherForecast,p.weatherCurrent]);function Ps(t){if(!t)return;let e=new Set;for(let o of t){if(e.has(o.id))return o.id;e.add(o.id)}}var xa=a.union([Ns,Ss]).superRefine((t,e)=>{let o=[];switch(t.kind){case"channel-message":o.push({items:t.attachments,path:"attachments"});break;case"create-event":o.push({items:t.events,path:"events"}),o.push({items:t.actions,path:"actions"});break;case"enable-notification":o.push({items:t.actions,path:"actions"});break;case"playlist":o.push({items:t.tracks,path:"tracks"}),o.push({items:t.actions,path:"actions"});break;case"purchase-items":o.push({items:t.items,path:"items"}),o.push({items:t.actions,path:"actions"});break;case"tabs":{Ho(t,e);break}default:break}for(let r of o){let n=Ps(r.items);n&&e.addIssue({code:"custom",message:`Duplicate ${r.path} id "${n}"`,path:[r.path]})}}),ho=w.extend({children:a.array(xa).min(1).max(4),kind:a.literal("dashboard"),layout:a.enum(["chart-table","grid","metrics-chart","stack"])}),Vs=ho,fo=a.union([xa,Vs]),Ip=a.object({component:fo}),ua=6,Ee=48,_s=new Set(["card","col","grid","item-card","item-card-group","row"]);function bo(t){return _s.has(t.kind)}function yo(t){return t.kind==="item-card"?[...t.left??[],...t.middle,...t.right??[]]:t.children}var ce=a.object({id:_}),wa=a.enum(["lg","md","none","sm"]),xo=a.enum(["center","end","start","stretch"]),wo=a.enum(["between","center","end","start"]),Dt=a.array(a.lazy(()=>ka)).min(1).max(Ee),vo=ce.extend({kind:a.literal("spacer"),size:a.enum(["auto","lg","md","sm"]).optional()}),ko=ce.extend({kind:a.literal("divider")}),So=ce.extend({icon:Se.optional(),kind:a.literal("heading"),level:a.union([a.literal(1),a.literal(2),a.literal(3),a.literal(4)]).optional(),text:f}),No=ce.extend({icon:Se.optional(),kind:a.literal("button"),label:f,prompt:a.string().trim().min(1).max(2e3).optional(),toolCall:uo.optional(),variant:ba.optional()}).refine(t=>!!(t.prompt??t.toolCall),{message:"Buttons need a prompt or a toolCall to do something when pressed"}),Po=ce.extend({kind:a.literal("badge"),label:f,tone:We.optional(),variant:a.enum(["soft","solid"]).optional()}),Vo=ce.extend({kind:a.literal("icon"),name:Se,size:a.enum(["lg","md","sm"]).optional(),tone:We.optional()}),_o=ce.extend({count:a.number().int().nonnegative().max(1e9).optional(),kind:a.literal("rating"),value:a.number().finite().min(0).max(5)}),Io=ce.extend({kind:a.literal("progress"),label:f.optional(),value:a.number().finite().min(0).max(100)}),To=a.enum(["default","outline","secondary","tertiary","transparent"]),ga=a.lazy(()=>ka),Ao=w.extend({action:ae.optional().describe("Makes the whole row pressable. Omit when a slot contains its own button or other interactive control."),isDisabled:a.boolean().optional(),isSelected:a.boolean().optional(),kind:a.literal("item-card"),left:a.array(ga).min(1).max(4).optional().describe("Leading slot. Prefer one icon node or a compact visual."),middle:a.array(ga).min(1).max(8).describe("Primary flexible slot. Prefer a level-4 heading followed by a clear text node for a title and description."),right:a.array(ga).min(1).max(4).optional().describe("Trailing slot. Prefer a badge, short value, icon, or button."),variant:To.optional()}),Is=new Set(["accordion","action-group","button","followup","form","map","switch-group","tabs","toggle-group"]);function Ro(t){for(let e of t)if(Is.has(e.kind)||bo(e)&&Ro(yo(e)))return!0;return!1}var va=Ao.superRefine((t,e)=>{t.action&&Ro([...t.left??[],...t.middle,...t.right??[]])&&e.addIssue({code:"custom",message:"A pressable item-card cannot contain buttons or other interactive descendants. Remove action from the card or move the nested control outside it."})}),Lo=w.extend({children:a.array(va).min(1).max(12),columns:a.union([a.literal(2),a.literal(3)]).optional(),kind:a.literal("item-card-group"),layout:a.enum(["grid","list"]).optional(),showHeader:a.boolean().optional(),variant:To.optional()}),Fo=Lo.superRefine((t,e)=>{t.columns&&t.layout!=="grid"&&e.addIssue({code:"custom",message:"Item-card group columns only apply when layout is grid.",path:["columns"]})}),Mo=ce.extend({align:xo.optional(),children:Dt,gap:wa.optional(),justify:wo.optional(),kind:a.literal("row")}),Do=ce.extend({align:xo.optional(),children:Dt,gap:wa.optional(),justify:wo.optional(),kind:a.literal("col")}),Bo=ce.extend({children:Dt,columns:a.union([a.literal(1),a.literal(2),a.literal(3),a.literal(4)]),gap:wa.optional(),kind:a.literal("grid")}),zo=w.extend({children:Dt,kind:a.literal("card"),variant:Ca.optional()}),Wo=Mo,Eo=Do,Go=Bo,Uo=zo,ka=a.union([xa,vo,ko,So,No,Po,Vo,_o,Io,Wo,Eo,Go,Uo,va,Fo]);function Ts(t,e){Ls(t,e)}function As(t,e){let o=t.tabs.flatMap(r=>r.children??[]);o.length!==0&&Zo(o,e,t.id,2,1)}function Ho(t,e){let o=new Set;for(let[r,n]of t.tabs.entries())o.has(n.id)&&e.addIssue({code:"custom",message:`Duplicate tab id "${n.id}"`,path:["tabs",r,"id"]}),o.add(n.id);t.defaultValue&&!o.has(t.defaultValue)&&e.addIssue({code:"custom",message:"The default tab must reference one of the tabs",path:["defaultValue"]}),As(t,e)}function Rs(t){return bo(t)?yo(t):t.kind==="tabs"?t.tabs.flatMap(e=>e.children??[]):[]}function Zo(t,e,o,r=1,n=0){let s=new Set,d=n,m=n>0?r-1:0;o&&s.add(o);let l=(y,h)=>{if(d+=1,m=Math.max(m,h),s.has(y.id)&&e.addIssue({code:"custom",message:`Duplicate component id "${y.id}" in the composed UI tree. Every node needs a unique id.`}),s.add(y.id),!(h>ua))for(let u of Rs(y))l(u,h+1)};for(let y of t)l(y,r);m>ua&&e.addIssue({code:"custom",message:`Composed UI trees can nest at most ${ua} levels deep.`}),d>Ee&&e.addIssue({code:"custom",message:`Composed UI trees can contain at most ${Ee} components.`})}function Ls(t,e){Zo([t],e)}var $o=a.union([Wo,Eo,Go,Uo,va,Fo]).superRefine(Ts),Ko=a.union([fo,$o]),Tp=a.object({component:$o}),ke=t=>a.array(a.unknown()).min(1).max(t).describe("Child nodes. Each is any catalog component; look its kind up separately."),Ap={accordion:es,"action-group":ns,"area-chart":Ii,badge:Po,"bar-chart":Ti,button:No,callout:ji,"candlestick-chart":Wi,card:zo.extend({children:ke(Ee)}),"channel-message":Cs,"code-block":as,col:Do.extend({children:ke(Ee)}),"comparison-list":Zi,"composed-chart":Ai,"create-event":cs,dashboard:ho.extend({children:ke(4)}),"data-table":Hi,diagram:os,divider:ko,"donut-chart":Li,"enable-notification":xs,"event-session":ys,"flight-tracker":ps,followup:rs,form:Ki,"funnel-chart":Ei,"gauge-chart":Gi,grid:Bo.extend({children:ke(Ee)}),heading:So,heatmap:zi,icon:Vo,image:qi,"item-card":Ao.extend({left:ke(4).optional().describe("Leading slot nodes."),middle:ke(8).describe("Primary flexible slot nodes."),right:ke(4).optional().describe("Trailing slot nodes.")}),"item-card-group":Lo.extend({children:a.array(a.unknown()).min(1).max(12).describe("One to twelve item-card children. Look up item-card for each child's schema.")}),"kpi-grid":Vi,"line-chart":_i,list:Ji,"list-block":Qi,map:Yi,"meter-list":$i,"metric-grid":Pi,"pie-chart":Ri,"player-card":fs,playlist:ms,"product-card":ds,"product-signals":Co.extend({tabs:a.array(a.object({component:a.unknown().describe("One analytical component: metric-grid, kpi-grid, any chart, data-table, comparison-list, or meter-list. Look its kind up separately."),id:_,label:f})).min(2).max(4)}),progress:Io,"purchase-complete":hs,"purchase-items":gs,"radar-chart":Fi,"radial-chart":Mi,rating:_o,"record-card":ls,"ride-status":us,row:Mo.extend({children:ke(Ee)}),"sankey-chart":Di,"scatter-chart":Bi,spacer:vo,steps:ts,"sunburst-chart":Ui,"switch-group":is,tabs:w.extend({defaultValue:_.optional(),kind:a.literal("tabs"),tabs:a.array(a.union([a.object({content:Be,id:_,label:f}),a.object({children:ke(12).describe("Rich panel nodes rendered as one vertical stack. Look up every child kind separately."),id:_,label:f})])).min(1).max(10),variant:a.enum(["primary","secondary"]).optional()}),"tag-list":Xi,text:Oi,"toggle-group":ss,"view-event":bs,"weather-current":vs,"weather-forecast":ws};import{jsx as Ge,jsxs as Fs}from"react/jsx-runtime";function Oo({className:t,component:e,onAction:o,onSelect:r}){return Ge(k,{className:t,description:e.description,title:e.title,children:Ge("div",{className:"aui-actions","data-orientation":e.orientation??"horizontal","data-slot":"agent-ui-actions",children:e.actions.map(n=>Ge(fe,{variant:n.variant,onClick:()=>{let s=se(e.id,n);s&&o?o(s):r?.(A(e,n))},children:n.label},n.id))})})}function jo({className:t,component:e,onAction:o,onSelect:r}){return Ge(k,{className:t,description:e.description,title:e.title,children:Ge(Tt,{className:"aui-followup","data-slot":"agent-ui-followup",children:e.prompts.map(n=>Fs("button",{"data-slot":"agent-ui-followup-item",type:"button",onClick:()=>{o?o({componentId:e.id,label:n.label,prompt:n.prompt,type:"followup"}):r?.(A(e,n))},children:[Ge("span",{"data-slot":"agent-ui-followup-label",children:n.label}),Ge("span",{"aria-hidden":"true","data-slot":"agent-ui-followup-indicator",children:"\u2197"})]},n.id))})})}import{Suspense as Ws,lazy as X,useState as Es}from"react";import{jsx as et,jsxs as Ds}from"react/jsx-runtime";function Ms(t){return t==="dashboard"||t==="product-signals"||t==="card"||t==="col"||t==="grid"||t==="item-card"||t==="item-card-group"||t==="row"?"dashboard":t==="metric-grid"||t==="kpi-grid"?"metrics":t==="map"?"map":t==="data-table"?"table":t==="record-card"||t==="channel-message"||t==="create-event"||t==="enable-notification"||t==="event-session"||t==="flight-tracker"||t==="player-card"||t==="playlist"||t==="purchase-complete"||t==="purchase-items"||t==="ride-status"||t==="view-event"||t==="weather-current"||t==="weather-forecast"?"record":"chart"}function Sa({className:t,kind:e,title:o}){let r=Ms(e);return Ds("section",{"aria-busy":"true","aria-label":o?`Loading ${o}`:"Loading data view",className:b("aui-skeleton",t),"data-component-kind":e,"data-skeleton-category":r,"data-slot":"agent-ui-skeleton",role:"status",children:[et("div",{className:"aui-skeleton__header","data-slot":"agent-ui-skeleton-header"}),et("div",{className:"aui-skeleton__content","data-slot":"agent-ui-skeleton-content",children:r==="metrics"||r==="dashboard"?Array.from({length:r==="dashboard"?2:4},(n,s)=>et("span",{className:"aui-skeleton__panel"},s)):r==="table"||r==="record"?Array.from({length:r==="table"?5:4},(n,s)=>et("span",{className:"aui-skeleton__row"},s)):et("span",{className:"aui-skeleton__chart"})}),et("span",{className:"aui-sr-only","data-slot":"agent-ui-skeleton-label",children:"Loading data view\u2026"})]})}import{ChevronUp as Bs}from"@gravity-ui/icons";import{SearchField as ut}from"@heroui/react";import{useMemo as Na,useState as qo}from"react";import{jsx as j,jsxs as Bt}from"react/jsx-runtime";function zs({children:t,inherit:e}){return e?t:j(be,{variant:"plain",children:t})}function zt({className:t,component:e,exportFormats:o,inheritCardVariant:r,onAction:n,onSelect:s,viewAction:d}){let[m,l]=qo(""),[y,h]=qo(null),u=Na(()=>new Set(e.columns.map(V=>V.key)),[e]),g=y&&u.has(y.key)?y:null,v=Na(()=>{let V=new Map;return e.rows.map(K=>{let $=JSON.stringify(K),ve=V.get($)??0;return V.set($,ve+1),{key:`${$}:${ve}`,row:K}})},[e.rows]),P=Na(()=>{let V=e.filterable?m.trim().toLowerCase():"",K=V?v.filter(({row:$})=>Object.values($).some(ve=>String(ve??"").toLowerCase().includes(V))):v;return g?K.toSorted(({row:$},{row:ve})=>{let Vt=String($[g.key]??"").localeCompare(String(ve[g.key]??""),"en",{numeric:!0});return g.direction==="asc"?Vt:-Vt}):K},[g,e.filterable,m,v]),G=V=>s?.(A(e,V)),R=o?.filter(V=>V==="csv")??[];return j(zs,{inherit:r,children:Bt(k,{className:t,description:e.description,title:e.title,actions:j(ro,{component:e,formats:R,viewAction:d,copyAction:()=>{no({...e,rows:P.map(({row:V})=>V)},"text").catch(()=>{})},onAction:n}),children:[e.filterable?j("div",{className:"aui-table__tools","data-slot":"agent-ui-table-tools",children:j(ut,{fullWidth:!0,"aria-label":`Filter ${e.title}`,name:`filter-${e.id}`,value:m,variant:"secondary",onChange:l,children:Bt(ut.Group,{children:[j(ut.SearchIcon,{}),j(ut.Input,{"data-slot":"agent-ui-table-filter",placeholder:"Filter rows\u2026"}),j(ut.ClearButton,{})]})})}):null,j("div",{className:"aui-table__scroll","data-slot":"agent-ui-table-scroll","data-variant":e.variant??"primary",children:Bt("table",{className:"aui-table","data-slot":"agent-ui-data-table",children:[j("thead",{"data-slot":"agent-ui-table-head",children:j("tr",{children:e.columns.map(V=>j("th",{scope:"col","aria-sort":g?.key===V.key?g.direction==="asc"?"ascending":"descending":"none",children:Bt("button",{className:"aui-table__sort","data-slot":"agent-ui-table-sort",type:"button",onClick:()=>h(K=>({direction:K?.key===V.key&&K.direction==="asc"?"desc":"asc",key:V.key})),children:[V.label,g?.key===V.key?j(Bs,{"aria-hidden":"true",className:"aui-table__sort-indicator","data-slot":"agent-ui-table-sort-indicator","data-direction":g.direction==="asc"?"ascending":"descending"}):null]})},V.key))})}),j("tbody",{"data-slot":"agent-ui-table-body",children:P.length>0?P.map(({key:V,row:K})=>j("tr",{className:"aui-table__row","data-interactive":s?"true":void 0,"data-slot":"agent-ui-table-row",tabIndex:s?0:void 0,onClick:s?()=>G(K):void 0,onKeyDown:$=>{s&&($.key==="Enter"||$.key===" ")&&($.preventDefault(),G(K))},children:e.columns.map($=>j("td",{"data-slot":"agent-ui-table-cell",children:ao(K[$.key],$.format)},$.key))},V)):j("tr",{children:j("td",{className:"aui-table__empty",colSpan:e.columns.length,"data-slot":"agent-ui-table-empty",children:"No matching rows"})})})]})})]})})}import{Fragment as al,jsx as I,jsxs as Yo}from"react/jsx-runtime";var Gs=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.LineChartComponentContent}))),Us=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.BarChartComponentContent}))),Hs=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.AreaChartComponentContent}))),Zs=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.ComposedChartComponentContent}))),$s=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.PieChartComponentContent}))),Ks=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.DonutChartComponentContent}))),Os=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.RadarChartComponentContent}))),js=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.RadialChartComponentContent}))),qs=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.SankeyChartComponentContent}))),Ys=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.ScatterChartComponentContent}))),Xs=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.HeatmapComponentContent}))),Js=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.CandlestickChartComponentContent}))),Qs=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.FunnelChartComponentContent}))),el=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.GaugeChartComponentContent}))),tl=X(()=>import("./chart-content-BBHQVMP4.js").then(t=>({default:t.SunburstChartComponentContent})));function Xo(t){return I(J,{props:t,renderChart:e=>I(Gs,{...e})})}function Jo(t){return I(J,{props:t,renderChart:e=>I(Us,{...e})})}function Qo(t){return I(J,{props:t,renderChart:e=>I(Hs,{...e})})}function en(t){return I(J,{props:t,renderChart:e=>I(Zs,{...e})})}function tn(t){return I(J,{props:t,renderChart:e=>I($s,{...e})})}function an(t){return I(J,{props:t,renderChart:e=>I(Ks,{...e})})}function on(t){return I(J,{props:t,renderChart:e=>I(Os,{...e})})}function nn(t){return I(J,{props:t,renderChart:e=>I(js,{...e})})}function rn(t){return I(J,{props:t,renderChart:e=>I(qs,{...e})})}function sn(t){return I(J,{props:t,renderChart:e=>I(Ys,{...e})})}function ln(t){return I(J,{props:t,renderChart:e=>I(Xs,{...e})})}function dn(t){return I(J,{props:t,renderChart:e=>I(Js,{...e})})}function pn(t){return I(J,{props:t,renderChart:e=>I(Qs,{...e})})}function cn(t){return I(J,{props:t,renderChart:e=>I(el,{...e})})}function mn(t){return I(J,{props:t,renderChart:e=>I(tl,{...e})})}function J({props:t,renderChart:e}){let[o,r]=Es("chart"),n={label:o==="chart"?"View as table":"View as chart",onAction:()=>r(d=>d==="chart"?"table":"chart"),target:o==="chart"?"table":"chart"},s=o==="table"?I(zt,{...t,inheritCardVariant:!0,component:oo(t.component),exportFormats:t.exportFormats?.filter(d=>d==="csv"),viewAction:n}):I(Ws,{fallback:I(Sa,{className:t.className,kind:t.component.kind,title:t.component.title}),children:e({...t,viewAction:n})});return Yo(al,{children:[s,Yo("span",{"aria-live":"polite",className:"aui-sr-only",children:["Showing ",t.component.title," as ",o]})]})}import{jsx as Le,jsxs as ol}from"react/jsx-runtime";function un({className:t,component:e,onSelect:o}){return Le(be,{variant:"plain",children:Le(k,{className:t,description:e.description,title:e.title,children:Le("div",{className:"aui-comparison","data-slot":"agent-ui-comparison-list",children:e.items.map(r=>ol("button",{className:"aui-comparison__item","data-slot":"agent-ui-comparison-item",type:"button",onClick:()=>o?.(A(e,r)),children:[Le("span",{className:"aui-comparison__label","data-slot":"agent-ui-comparison-label",children:r.label}),Le("span",{className:"aui-comparison__value","data-slot":"agent-ui-comparison-value",children:Ae(r.value,r.format)}),r.note?Le("span",{className:"aui-comparison__note","data-slot":"agent-ui-comparison-note",children:r.note}):Le("span",{}),r.change!==void 0?Le(Qe,{slot:"agent-ui-comparison-change",value:r.change}):null]},r.label))})})})}import{jsx as gn}from"react/jsx-runtime";function Cn({children:t,className:e,component:o}){return gn(k,{className:e,description:o.description,title:o.title,children:gn("div",{className:"aui-dashboard","data-layout":o.layout,"data-slot":"agent-ui-dashboard",children:t})})}import{Briefcase as nl,Calendar as rl,ChartBar as il,CircleCheck as sl,CircleDollar as ll,CircleExclamation as dl,CircleInfo as pl,CircleQuestion as cl,Clock as ml,Code as ul,CreditCard as gl,Database as Cl,Display as hl,Envelope as fl,FileText as bl,Flag as yl,Globe as xl,Heart as wl,House as vl,Magnifier as kl,MapPin as Sl,Percent as Nl,Person as Pl,Persons as Vl,Pulse as _l,Receipt as Il,Rocket as Tl,Route as Al,ShoppingBag as Rl,Smartphone as Ll,Speedometer as Fl,Star as Ml,Tag as Dl,Target as Bl,Thunderbolt as zl}from"@gravity-ui/icons";import{jsx as El}from"react/jsx-runtime";var Wl={activity:_l,alert:dl,briefcase:nl,calendar:rl,chart:il,check:sl,clock:ml,code:ul,"credit-card":gl,database:Cl,"device-desktop":hl,"device-mobile":Ll,document:bl,dollar:ll,flag:yl,globe:xl,heart:wl,home:vl,info:pl,lightning:zl,location:Sl,mail:fl,percent:Nl,person:Pl,question:cl,receipt:Il,rocket:Tl,route:Al,search:kl,"shopping-bag":Rl,speedometer:Fl,star:Ml,tag:Dl,target:Bl,users:Vl};function q({name:t,...e}){let o=Wl[t];return El(o,{...e,"aria-hidden":"true","data-icon":t,focusable:"false"})}import{useId as Ul}from"react";var Wt={height:40,width:100},hn=3;function Gl(t,e){let o=[];for(let n=0;n<t.length-1;n+=1)o.push((t[n+1]-t[n])/e);let r=[o[0]??0];for(let n=1;n<t.length-1;n+=1){let s=o[n-1],d=o[n];r.push(s*d<=0?0:(s+d)/2)}r.push(o[o.length-1]??0);for(let n=0;n<o.length;n+=1){let s=o[n];if(s===0){r[n]=0,r[n+1]=0;continue}let d=r[n]/s,m=r[n+1]/s,l=d*d+m*m;if(l>9){let y=3/Math.sqrt(l);r[n]=y*d*s,r[n+1]=y*m*s}}return r}function fn(t){let e=t.filter(R=>Number.isFinite(R));if(e.length<2)return null;let{height:o,width:r}=Wt,n=hn,s=o-hn,d=Math.min(...e),l=Math.max(...e)-d,y=r/(e.length-1),h=R=>R*y,u=R=>l===0?o/2:s-(R-d)/l*(s-n),g=e.map(u),v=Gl(g,y),P=[`M ${Fe(h(0))} ${Fe(g[0])}`];for(let R=0;R<e.length-1;R+=1){let V=y/3;P.push(`C ${Fe(h(R)+V)} ${Fe(g[R]+v[R]*V)} ${Fe(h(R+1)-V)} ${Fe(g[R+1]-v[R+1]*V)} ${Fe(h(R+1))} ${Fe(g[R+1])}`)}let G=P.join(" ");return{area:`${G} V ${o} H 0 Z`,line:G}}function Fe(t){return Math.round(t*100)/100}import{jsx as gt,jsxs as bn}from"react/jsx-runtime";function yn({color:t,values:e}){let o=Ul(),r=fn(e);return r?bn("svg",{"aria-hidden":"true",className:"aui-sparkline","data-slot":"agent-ui-sparkline",preserveAspectRatio:"none",viewBox:`0 0 ${Wt.width} ${Wt.height}`,children:[gt("defs",{children:bn("linearGradient",{id:o,x1:"0",x2:"0",y1:"0",y2:"1",children:[gt("stop",{offset:"0%",stopColor:t,stopOpacity:.22}),gt("stop",{offset:"100%",stopColor:t,stopOpacity:.02})]})}),gt("path",{className:"aui-sparkline__area",d:r.area,fill:`url(#${o})`}),gt("path",{className:"aui-sparkline__line",d:r.line,fill:"none",stroke:t,strokeLinecap:"round",strokeWidth:1.75,vectorEffect:"non-scaling-stroke"})]}):null}import{jsx as Ne,jsxs as Et}from"react/jsx-runtime";function xn({className:t,component:e}){return Ne(k,{className:t,description:e.description,title:e.title,variant:"outline",children:Ne("div",{className:"aui-kpi-grid","data-slot":"agent-ui-kpi-grid",children:e.metrics.map(o=>Et("article",{className:"aui-kpi aui-kpi--chart","data-slot":"agent-ui-kpi",children:[Et("header",{className:"aui-kpi__header","data-slot":"agent-ui-kpi-header",children:[Ne("span",{className:"aui-kpi__title","data-slot":"agent-ui-kpi-title",children:o.label}),o.icon?Ne("span",{className:"aui-kpi__icon","data-slot":"agent-ui-kpi-icon",children:Ne(q,{name:o.icon})}):null]}),Et("div",{className:"aui-kpi__body","data-slot":"agent-ui-kpi-body",children:[Et("div",{className:"aui-kpi__metric","data-slot":"agent-ui-kpi-metric",children:[Ne("p",{className:"aui-kpi__value","data-slot":"agent-ui-kpi-value",children:Ae(o.value,o.format)}),o.change!==void 0?Ne(Qe,{slot:"agent-ui-kpi-change",value:o.change}):null]}),Ne("div",{className:"aui-kpi__chart","data-slot":"agent-ui-kpi-chart",children:Ne(yn,{color:io[o.color??"accent"],values:o.trend})})]})]},o.label))})})}import{Description as Hl,Label as Zl,Meter as Gt}from"@heroui/react";import{jsx as Ue,jsxs as $l}from"react/jsx-runtime";function wn({className:t,component:e}){return Ue(k,{className:t,description:e.description,title:e.title,variant:"outline",children:Ue("div",{className:"aui-meter-list","data-slot":"agent-ui-meter-list",children:e.items.map(o=>{let r=o.min??0,n=o.max??(o.format?.style==="percent"?1:100);return $l(Gt,{"aria-label":o.label,className:"aui-meter-list__item",color:o.tone??"accent","data-slot":"agent-ui-meter",maxValue:n,minValue:r,size:"sm",value:o.value,valueLabel:Ae(o.value,o.format),children:[Ue(Zl,{"data-slot":"agent-ui-meter-label",children:o.label}),Ue(Gt.Output,{"data-slot":"agent-ui-meter-output"}),Ue(Gt.Track,{"data-slot":"agent-ui-meter-track",children:Ue(Gt.Fill,{})}),o.description?Ue(Hl,{"data-slot":"agent-ui-meter-description",children:o.description}):null]},o.id)})})})}import{jsx as He,jsxs as Pa}from"react/jsx-runtime";function vn({className:t,component:e}){return He(k,{className:t,description:e.description,title:e.title,variant:"outline",children:He("div",{className:"aui-metric-grid","data-slot":"agent-ui-metric-grid",children:e.metrics.map(o=>Pa("article",{className:"aui-kpi","data-slot":"agent-ui-kpi",children:[Pa("header",{className:"aui-kpi__header","data-slot":"agent-ui-kpi-header",children:[He("span",{className:"aui-kpi__title","data-slot":"agent-ui-kpi-title",children:o.label}),o.icon?He("span",{className:"aui-kpi__icon","data-slot":"agent-ui-kpi-icon",children:He(q,{name:o.icon})}):null]}),Pa("div",{className:"aui-kpi__content","data-slot":"agent-ui-kpi-content",children:[He("p",{className:"aui-kpi__value","data-slot":"agent-ui-kpi-value",children:Ae(o.value,o.format)}),o.change!==void 0?He(Qe,{slot:"agent-ui-kpi-change",value:o.change}):null]})]},o.label))})})}import{Accordion as Ze,Checkbox as Ht,Description as Fn,Label as Mn,Modal as de,ProgressBar as Zt,Tabs as tt,Tag as nd,TagGroup as Ln}from"@heroui/react";import{useCallback as $t,useMemo as rd,useState as ft}from"react";import{ArrowRotateLeft as ql,Minus as Yl,Plus as Xl}from"@gravity-ui/icons";import{Button as Ut,Modal as Ct,Separator as Nn,Tooltip as Me}from"@heroui/react";import{useCallback as Jl,useEffect as Ql,useId as ed,useRef as An,useState as ht}from"react";var kn="Inter, ui-sans-serif, system-ui, sans-serif";function Kl(t){let e=t??(typeof document>"u"?null:document.body);return e&&getComputedStyle(e).fontFamily.trim()||kn}async function Ol(){let t=(await import("mermaid")).default;return t.initialize({securityLevel:"strict",startOnLoad:!1,theme:"base"}),t}var Va=null;function jl(){return Va??=Ol().catch(t=>{throw Va=null,t}),Va}async function Sn(t){let e=await jl();return e.initialize({themeVariables:{fontFamily:Kl(t),fontSize:"13px"}}),e}import{jsx as L,jsxs as Pe}from"react/jsx-runtime";var Pn=.5,Vn=4,_n=.25;function td(){return L("svg",{"aria-hidden":"true",fill:"none",viewBox:"0 0 16 16",children:L("path",{d:"M9.5 2.5H13v3.5M6.5 13.5H3V10M13 2.5l-4 4M3 13.5l4-4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}function In(t,e,o,r){let[n,s]=ht(null),[d,m]=ht(!1),l=An(null);return Ql(()=>{if(!o)return;let y=!1;async function h(){try{let u=await Sn(r?.current??l.current);await u.parse(t);let{svg:g}=await u.render(e,t,l.current??void 0);if(y)return;m(!1),s({key:t,markup:g})}catch{if(y)return;s(null),m(!0)}}return h(),()=>{y=!0}},[t,o,r,e]),{container:l,failed:d,markup:n?.key===t?n.markup:null}}function Tn({markup:t,pendingRef:e,scale:o}){return t?L("div",{className:"aui-diagram__surface",dangerouslySetInnerHTML:{__html:t},"data-slot":"agent-ui-diagram-surface",role:"img",style:o===void 0?void 0:{"--aui-diagram-scale":o}}):L("div",{ref:e,className:"aui-diagram__surface","data-pending":"true"})}function Rn({chart:t,title:e}){let o=ed().replace(/[^a-zA-Z0-9]/g,""),r=An(null),n=In(t,`aui-diagram-${o}`,!0,r),[s,d]=ht(!1),m=In(t,`aui-diagram-modal-${o}`,s,r),[l,y]=ht(1),[h,u]=ht(),g=Jl(P=>{r.current=P,u(ie(P))},[]),v=P=>y(G=>Math.min(Vn,Math.max(Pn,G+P)));return n.failed?L(At,{code:t,language:"mermaid"}):Pe("div",{ref:g,className:"aui-diagram","data-slot":"agent-ui-diagram",children:[L(Tn,{markup:n.markup,pendingRef:n.container}),n.markup?Pe(Ct,{isOpen:s,onOpenChange:P=>{d(P),P||y(1)},children:[L(Ut,{isIconOnly:!0,"aria-label":"Expand diagram",className:"aui-diagram__expand","data-slot":"agent-ui-diagram-expand",size:"sm",variant:"ghost",onPress:()=>d(!0),children:L(td,{})}),L(Ct.Backdrop,{className:"aui-diagram-modal__backdrop",UNSTABLE_portalContainer:h,variant:"blur",children:L(Ct.Container,{className:"aui-diagram-modal__container",placement:"center",children:Pe(Ct.Dialog,{"aria-label":e?`${e} diagram`:"Diagram",className:"aui-diagram-modal__dialog","data-slot":"agent-ui-diagram-modal",children:[L("div",{className:"aui-diagram-modal__controls",children:Pe("div",{"aria-label":"Diagram zoom controls",className:"aui-diagram-modal__control-group",role:"toolbar",children:[Pe(Me,{delay:0,children:[L(Ut,{isIconOnly:!0,"aria-label":"Zoom out",isDisabled:l<=Pn,size:"sm",variant:"ghost",onPress:()=>v(-_n),children:L(Yl,{})}),L(Me.Content,{placement:"top",children:"Zoom out"})]}),Pe(Me,{delay:0,children:[L(Ut,{isIconOnly:!0,"aria-label":"Zoom in",isDisabled:l>=Vn,size:"sm",variant:"ghost",onPress:()=>v(_n),children:L(Xl,{})}),L(Me.Content,{placement:"top",children:"Zoom in"})]}),Pe("output",{"aria-label":`Zoom level: ${Math.round(l*100)}%`,className:"aui-diagram-modal__zoom-level",children:[Math.round(l*100),"%"]}),L(Nn,{className:"aui-diagram-modal__separator",orientation:"vertical"}),Pe(Me,{delay:0,children:[L(Ut,{isIconOnly:!0,"aria-label":"Reset zoom",isDisabled:l===1,size:"sm",variant:"ghost",onPress:()=>y(1),children:L(ql,{})}),L(Me.Content,{placement:"top",children:"Reset zoom"})]}),L(Nn,{className:"aui-diagram-modal__separator",orientation:"vertical"}),Pe(Me,{delay:0,children:[L(Ct.CloseTrigger,{className:"aui-diagram-modal__close"}),L(Me.Content,{placement:"top",children:"Close"})]})]})}),L("div",{className:"aui-diagram-modal__viewport",children:L(Tn,{markup:m.markup,pendingRef:m.container,scale:l})})]})})})]}):null]})}import{Picture as ad}from"@gravity-ui/icons";import{useState as od}from"react";import{jsx as _a}from"react/jsx-runtime";function me({alt:t="",className:e,decoding:o,loading:r,onError:n,onLoadFailure:s,referrerPolicy:d,sizes:m,src:l,srcSet:y,...h}){let[u,g]=od();return!l||u===l?_a("span",{...h,"aria-hidden":t?void 0:!0,"aria-label":t||void 0,className:b("aui-image-fallback",e),"data-slot":"agent-ui-image-fallback",role:t?"img":void 0,children:_a(ad,{"aria-hidden":"true"})}):_a("img",{...h,alt:t,className:e,decoding:o,loading:r,referrerPolicy:d,sizes:m,src:l,srcSet:y,onError:v=>{g(l),typeof l=="string"&&s?.(l),n?.(v)}})}import{Fragment as sd,jsx as C,jsxs as Z}from"react/jsx-runtime";function Dn({className:t,component:e}){return e.variant==="clear"?C("div",{"aria-label":e.title,className:b("aui-prose",t),"data-slot":"agent-ui-text","data-variant":"clear",children:Je(e.content)}):C(k,{className:t,description:e.description,title:e.title,children:C("div",{className:"aui-prose","data-slot":"agent-ui-text","data-variant":"card",children:Je(e.content)})})}function Bn({className:t,component:e}){return C(k,{className:t,description:e.description,title:e.title,children:Z("div",{className:"aui-callout","data-has-icon":e.icon?"true":void 0,"data-slot":"agent-ui-callout","data-tone":e.tone??"neutral",children:[e.icon?C(q,{className:"aui-callout__icon","data-slot":"agent-ui-callout-icon",name:e.icon}):C("span",{"aria-hidden":"true",className:"aui-callout__indicator","data-slot":"agent-ui-callout-indicator"}),C("p",{"data-slot":"agent-ui-callout-content",children:Je(e.content)})]})})}function zn({className:t,component:e,onSelect:o}){let r=e.variant??"grid",[n,s]=ft(),[d,m]=ft(()=>new Set),l=$t(u=>{s(ie(u))},[]),y=$t(u=>{m(g=>{if(g.has(u))return g;let v=new Set(g);return v.add(u),v})},[]),h=e.images.map(u=>{let g=d.has(u.src),v=Z(sd,{children:[C("span",{className:"aui-image__frame","data-slot":"agent-ui-image-frame",children:C(me,{alt:u.alt,"data-aspect-ratio":u.aspectRatio??"landscape","data-slot":"agent-ui-image",loading:"lazy",src:g?void 0:u.src,onLoadFailure:y})}),u.caption?C("span",{className:"aui-image__caption","data-slot":"agent-ui-image-caption",children:u.caption}):null]});return g?C("span",{className:"aui-image","data-failed":"true","data-slot":"agent-ui-image-item",children:v},u.src):Z(de,{children:[C(de.Trigger,{"aria-label":`Open ${u.alt}`,className:"aui-image","data-slot":"agent-ui-image-item",onClick:()=>o?.(A(e,u)),children:v}),C(de.Backdrop,{className:"aui-image-modal__backdrop",UNSTABLE_portalContainer:n,variant:"blur",children:C(de.Container,{className:"aui-image-modal__container",placement:"center",children:Z(de.Dialog,{"aria-label":u.alt,className:"aui-image-modal__dialog","data-slot":"agent-ui-image-modal",children:[C(de.CloseTrigger,{className:"aui-image-modal__close"}),C("img",{alt:u.alt,className:"aui-image-modal__image",src:u.src})]})})})]},u.src)});return C(k,{className:t,description:e.description,title:e.title,children:C("div",{ref:l,className:"aui-images-container","data-layout":r,children:r==="horizontal"?C(Tt,{"aria-label":`${e.title} gallery`,className:"aui-images","data-count":e.images.length,"data-layout":r,role:"region",size:24,tabIndex:0,children:h}):C("div",{className:"aui-images","data-count":e.images.length,"data-layout":r,"data-slot":"agent-ui-images",children:h})})})}function Wn({className:t,component:e,onSelect:o}){return C(k,{className:t,description:e.description,title:e.title,children:C(Ln,{"aria-label":e.title,className:"aui-tags","data-slot":"agent-ui-tags",selectionMode:"single",size:"sm",onSelectionChange:r=>{let n=[...r][0];typeof n=="string"&&o?.(A(e,{tag:n}))},children:C(Ln.List,{children:e.tags.map(r=>C(nd,{className:"aui-tag","data-slot":"agent-ui-tag",id:r,children:r},r))})})})}function En({className:t,component:e}){let o=e.style??"bulleted";return C(k,{className:t,description:e.description,title:e.title,children:C("ul",{"aria-label":e.title,className:"aui-list","data-slot":"agent-ui-list","data-style":o,children:e.items.map((r,n)=>Z("li",{className:"aui-list__item","data-slot":"agent-ui-list-item",children:[o==="checklist"?C(Ht,{isReadOnly:!0,"aria-label":r.text,className:"aui-list__checkbox","data-slot":"agent-ui-list-check",isSelected:r.checked??!1,variant:"secondary",children:C(Ht.Content,{children:C(Ht.Control,{children:C(Ht.Indicator,{})})})}):C("span",{"aria-hidden":"true",className:"aui-list__marker","data-slot":"agent-ui-list-marker",children:o==="numbered"?`${n+1}.`:"\u2022"}),Z("span",{className:"aui-list__body","data-slot":"agent-ui-list-content",children:[C(Mn,{"data-slot":"agent-ui-list-label",children:r.text}),r.children?.length?C("span",{className:"aui-list__children","data-slot":"agent-ui-list-children",children:r.children.map(s=>C(Fn,{"data-slot":"agent-ui-list-child",children:s},s))}):null]})]},r.id))})})}function id(t){return/^\+/.test(t)?"success":/^[-−]\S/.test(t)?"danger":"neutral"}function Gn({className:t,component:e}){return C(k,{className:t,description:e.description,title:e.title,variant:"outline",children:C("ul",{"aria-label":e.title,className:"aui-list-block","data-slot":"agent-ui-list-block",children:e.items.map(o=>Z("li",{className:"aui-list-block__item","data-slot":"agent-ui-list-block-item",children:[o.imageUrl?C(me,{alt:o.imageAlt??"",className:"aui-list-block__image","data-slot":"agent-ui-list-block-image",loading:"lazy",src:o.imageUrl}):C("span",{"aria-hidden":"true",className:"aui-list-block__glyph","data-slot":"agent-ui-list-block-glyph",children:o.icon?C(q,{"data-slot":"agent-ui-list-block-icon",name:o.icon}):o.title.trim().charAt(0).toUpperCase()}),Z("span",{className:"aui-list-block__body","data-slot":"agent-ui-list-block-content",children:[C(Mn,{className:"aui-list-block__title","data-slot":"agent-ui-list-block-title",children:o.title}),o.description?C(Fn,{className:"aui-list-block__description","data-slot":"agent-ui-list-block-description",children:o.description}):null]}),o.meta||o.rating!==void 0?Z("span",{className:"aui-list-block__footer","data-slot":"agent-ui-list-block-footer",children:[o.meta?C("span",{className:"aui-list-block__meta","data-slot":"agent-ui-list-block-meta","data-tone":id(o.meta),children:o.meta}):null,o.meta&&o.rating!==void 0?C("span",{"aria-hidden":"true",className:"aui-list-block__meta-separator",children:"\xB7"}):null,o.rating!==void 0?Z("span",{"aria-label":`${o.rating} out of 5 stars`,className:"aui-list-block__rating","data-slot":"agent-ui-list-block-rating",children:[Z("span",{"aria-hidden":"true",children:[o.rating,"/5"]}),C(q,{"aria-hidden":"true",className:"aui-list-block__rating-icon","data-slot":"agent-ui-list-block-rating-icon",name:"star"})]}):null]}):null]},o.id))})})}function Un({className:t,component:e}){return C(k,{className:t,description:e.description,title:e.title,children:C(Ze,{allowsMultipleExpanded:!0,className:"aui-accordion","data-slot":"agent-ui-accordion",defaultExpandedKeys:e.sections.filter(o=>o.defaultOpen).map(o=>o.id),children:e.sections.map(o=>Z(Ze.Item,{"data-slot":"agent-ui-accordion-item",id:o.id,children:[C(Ze.Heading,{children:Z(Ze.Trigger,{"data-slot":"agent-ui-accordion-trigger",children:[o.title,C(Ze.Indicator,{"data-slot":"agent-ui-accordion-indicator"})]})}),C(Ze.Panel,{"data-slot":"agent-ui-accordion-panel",children:C(Ze.Body,{children:o.content})})]},o.id))})})}function Hn({className:t,component:e,onSelect:o}){let[r,n]=ft(),[s,d]=ft(()=>new Set),m=e.steps.some(u=>u.icon),l=e.steps.some(u=>u.image),y=$t(u=>{n(ie(u))},[]),h=$t(u=>{d(g=>{if(g.has(u))return g;let v=new Set(g);return v.add(u),v})},[]);return C(k,{className:t,description:e.description,title:e.title,children:C("ol",{ref:y,className:"aui-steps","data-has-icons":m||void 0,"data-has-images":l||void 0,"data-slot":"agent-ui-steps","data-variant":e.variant??"steps",children:e.steps.map((u,g)=>{let v=u.status==="complete"?"completed":u.status==="current"?"in-progress":u.status==="upcoming"?"pending":u.status??"pending",P=u.image?s.has(u.image.src):!1,G=C("span",{className:"aui-steps__marker","data-slot":"agent-ui-step-indicator",children:e.variant==="timeline"?u.icon?C(q,{"aria-hidden":"true","data-slot":"agent-ui-step-icon",name:u.icon}):null:v==="completed"?C("svg",{"aria-hidden":"true","data-slot":"agent-ui-step-checkmark",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",viewBox:"0 0 24 24",children:C("polyline",{points:"20 6 9 17 4 12"})}):v==="failed"?C("span",{"aria-hidden":"true",children:"\xD7"}):v==="blocked"?C("span",{"aria-hidden":"true",children:"!"}):v==="cancelled"?C("span",{"aria-hidden":"true",children:"\u2013"}):u.icon?C(q,{"aria-hidden":"true","data-slot":"agent-ui-step-icon",name:u.icon}):g+1});return C("li",{"data-has-image":u.image?"true":void 0,"data-slot":"agent-ui-step","data-status":v,children:Z("div",{className:"aui-steps__row",children:[u.image?P?C("span",{className:"aui-steps__image-marker","data-failed":"true","data-slot":"agent-ui-step-image-marker",children:C(me,{alt:u.image.alt,className:"aui-steps__image","data-slot":"agent-ui-step-image"})}):Z(de,{children:[C(de.Trigger,{"aria-label":`Open ${u.image.alt}`,className:"aui-steps__image-marker","data-slot":"agent-ui-step-image-trigger",onClick:()=>o?.(A(e,u)),children:C(me,{alt:u.image.alt,className:"aui-steps__image","data-slot":"agent-ui-step-image",loading:"lazy",src:u.image.src,onLoadFailure:h})}),C(de.Backdrop,{className:"aui-image-modal__backdrop",UNSTABLE_portalContainer:r,variant:"blur",children:C(de.Container,{className:"aui-image-modal__container",placement:"center",children:Z(de.Dialog,{"aria-label":u.image.alt,className:"aui-image-modal__dialog","data-slot":"agent-ui-image-modal",children:[C(de.CloseTrigger,{className:"aui-image-modal__close"}),C(me,{alt:u.image.alt,className:"aui-image-modal__image",src:u.image.src})]})})})]}):G,C("button",{className:"aui-steps__content-action","data-slot":"agent-ui-step-action",type:"button",onClick:()=>o?.(A(e,u)),children:Z("span",{"data-slot":"agent-ui-step-content",children:[u.timestamp||u.meta?C("span",{className:"aui-steps__meta","data-slot":"agent-ui-step-meta",children:[u.timestamp,u.meta].filter(Boolean).join(" \xB7 ")}):null,C("strong",{"data-slot":"agent-ui-step-title",children:u.title}),u.content?C("small",{"data-slot":"agent-ui-step-description",children:u.content}):null,u.progress!==void 0?Z(Zt,{"aria-label":`${u.title} progress`,className:"aui-steps__progress",size:"sm",value:u.progress,color:v==="failed"?"danger":v==="blocked"?"warning":"accent",children:[C(Zt.Output,{}),C(Zt.Track,{children:C(Zt.Fill,{})})]}):null]})})]})},u.id)})})})}function Zn({className:t,component:e}){return C(k,{className:t,description:e.description,title:e.title,children:C(At,{code:e.code,language:e.language})})}function $n({className:t,component:e}){return C(k,{className:t,description:e.description,title:e.title,children:C(Rn,{chart:e.chart,title:e.title})})}function Kn({className:t,component:e,onSelect:o,renderPanel:r}){let n=rd(()=>new Set(e.tabs.map(l=>l.id)),[e.tabs]),[s,d]=ft(e.defaultValue??e.tabs[0]?.id??""),m=n.has(s)?s:e.defaultValue??e.tabs[0]?.id??"";return C(k,{className:t,description:e.description,title:e.title,children:C("div",{className:"aui-tabs","data-slot":"agent-ui-tabs",children:Z(tt,{selectedKey:m,variant:e.variant,onSelectionChange:l=>{let y=String(l),h=e.tabs.find(u=>u.id===y);d(y),h&&o?.(A(e,h))},children:[C(tt.ListContainer,{children:C(tt.List,{"aria-label":e.title,children:e.tabs.map(l=>Z(tt.Tab,{id:l.id,children:[l.label,C(tt.Indicator,{})]},l.id))})}),e.tabs.map(l=>C(tt.Panel,{className:"aui-tabs__panel","data-content":l.children?"rich":"text",id:l.id,children:l.children?C("div",{className:"aui-tabs__panel-content",children:r?.(l.children)??null}):l.content},l.id))]})})})}import{Fragment as dd,jsx as $e,jsxs as Ia}from"react/jsx-runtime";function ld({left:t,middle:e,right:o}){return Ia(dd,{children:[t?$e("div",{className:"item-card__icon","data-slot":"item-card-icon",children:t}):null,$e("div",{className:"item-card__content","data-slot":"item-card-content",children:e}),o?$e("div",{className:"item-card__action","data-slot":"item-card-action",children:o}):null]})}function On({className:t,component:e,left:o,middle:r,onAction:n,onSelect:s,right:d}){let m=ld({left:o,middle:r,right:d}),l=b("item-card",`item-card--${e.variant??"default"}`,"aui-item-card",t),y={"aria-label":e.title,className:l,"data-component-kind":e.kind,"data-disabled":e.isDisabled||void 0,"data-selected":e.isSelected||void 0};if(!e.action)return $e("div",{"data-slot":"item-card",...y,children:m});let h=e.action;return $e("button",{...y,"aria-pressed":e.isSelected||void 0,"data-slot":"item-card",disabled:e.isDisabled,type:"button",onClick:()=>{if(e.isDisabled)return;let u=se(e.id,h);u&&n?n(u):s?.(A(e,{actionId:h.id,itemId:e.id}))},children:m})}function jn({children:t,className:e,component:o}){let r=o.layout==="grid"&&o.columns?{"--item-card-group-columns":o.columns}:void 0;return Ia("div",{"aria-label":o.title,"data-component-kind":o.kind,"data-slot":"item-card-group",role:"group",style:r,className:b("item-card-group",`item-card-group--${o.layout??"list"}`,`item-card-group--${o.variant??"default"}`,"aui-item-card-group",e),children:[o.showHeader?Ia("div",{className:"item-card-group__header","data-slot":"item-card-group-header",children:[$e("h3",{className:"item-card-group__title","data-slot":"item-card-group-title",children:o.title}),o.description?$e("p",{className:"item-card-group__description","data-slot":"item-card-group-description",children:o.description}):null]}):null,t]})}import{Children as gd}from"react";import{Picture as pd}from"@gravity-ui/icons";import{useState as cd}from"react";import{jsx as Q}from"react/jsx-runtime";var md={center:"center",end:"flex-end",start:"flex-start",stretch:"stretch"},ud={between:"space-between",center:"center",end:"flex-end",start:"flex-start"};function ot(t){return typeof t=="number"?`${t}px`:t}function at(t){return t===void 0?void 0:`calc(var(--spacing) * ${t})`}function qn(t){return typeof t=="number"?{padding:at(t)}:t?{paddingBottom:at(t.bottom??t.y),paddingLeft:at(t.left??t.x),paddingRight:at(t.right??t.x),paddingTop:at(t.top??t.y)}:{}}function Ta({align:t,background:e,flex:o,gap:r,height:n,justify:s,minHeight:d,minWidth:m,padding:l,radius:y,style:h,width:u,...g}){return{elementProps:g,style:{alignItems:t?md[t]:void 0,background:e,flex:o,gap:at(r),height:ot(n),justifyContent:s?ud[s]:void 0,minHeight:ot(d),minWidth:ot(m),width:ot(u),...qn(l),...h}}}function Yn({background:t,className:e,padding:o,size:r="md",style:n,theme:s="light",...d}){return Q("section",{"data-size":r,"data-theme":s,style:{background:t,...qn(o),...n},className:b("aui-widget-card",s==="dark"?"dark":void 0,e),...d})}function Kt({className:t,radius:e,...o}){let{elementProps:r,style:n}=Ta(o);return Q("div",{className:b("aui-widget-row",t),"data-radius":e,style:n,...r})}function Ot({className:t,radius:e,...o}){let{elementProps:r,style:n}=Ta(o);return Q("div",{className:b("aui-widget-col",t),"data-radius":e,style:n,...r})}function Xn({className:t,radius:e,...o}){let{elementProps:r,style:n}=Ta(o);return Q("div",{className:b("aui-widget-box",t),"data-radius":e,style:n,...r})}function jt({className:t}){return Q("span",{"aria-hidden":"true",className:b("aui-widget-spacer",t)})}function bt({className:t,flush:e=!1}){return Q("hr",{className:b("aui-widget-divider",t),"data-flush":e||void 0})}function Aa({align:t,color:e="default",maxLines:o,size:r,style:n,truncate:s,value:d,weight:m,...l}){return{elementProps:l,visualProps:{"data-align":t,"data-color":e,"data-max-lines":o,"data-size":r,"data-truncate":s||void 0,"data-weight":m,style:{...n,WebkitLineClamp:o}}}}function Jn({children:t,className:e,value:o,...r}){let{elementProps:n,visualProps:s}=Aa(r);return Q("span",{className:b("aui-widget-text",e),...s,...n,children:o??t})}function Qn({children:t,className:e,value:o,...r}){let{elementProps:n,visualProps:s}=Aa(r);return Q("h3",{className:b("aui-widget-title",e),...s,...n,children:o??t})}function qt({children:t,className:e,value:o,...r}){let{elementProps:n,visualProps:s}=Aa(r);return Q("span",{className:b("aui-widget-caption",e),...s,...n,children:o??t})}function Ve({alt:t="",className:e,fit:o="cover",flush:r,frame:n,height:s,onError:d,radius:m,size:l,src:y,style:h,width:u,...g}){let[v,P]=cd(),G={"data-flush":r||void 0,"data-frame":n||void 0,"data-radius":m,style:{height:ot(l??s),objectFit:o,width:ot(l??u),...h}};return!y||v===y?Q("span",{"aria-hidden":t?void 0:!0,"aria-label":t||void 0,className:b("aui-widget-image","aui-image-fallback",e),"data-slot":"agent-ui-image-fallback",role:t?"img":void 0,...G,children:Q(pd,{"aria-hidden":"true"})}):Q("img",{alt:t,className:b("aui-widget-image",e),src:y,onError:R=>{P(y),d?.(R)},...G,...g})}function er({children:t,className:e,size:o}){return Q("span",{className:b("aui-widget-icon",e),style:o!==void 0?{height:o,width:o}:void 0,children:t})}function tr({className:t,...e}){return Q("div",{className:b("aui-widget-actions",t),...e})}function ar(t){return Q(fe,{...t})}import{jsx as De}from"react/jsx-runtime";function Ra({children:t,className:e,component:o}){return De("div",{className:b("aui-row",e),"data-align":o.align,"data-gap":o.gap,"data-justify":o.justify,"data-slot":"agent-ui-row",children:t})}function La({children:t,className:e,component:o}){return De("div",{className:b("aui-col",e),"data-align":o.align,"data-gap":o.gap,"data-justify":o.justify,"data-slot":"agent-ui-col",children:t})}function Fa({children:t,className:e,component:o}){let r=o.columns===1&&o.children.length>1&&o.children.every(s=>s.kind==="record-card"),n=r?gd.toArray(t).flatMap((s,d)=>d===0?[s]:[De(bt,{className:"aui-record-list__divider"},`${o.id}-record-divider-${o.children[d]?.id}`),s]):t;return De("div",{className:b("aui-grid",e),"data-columns":o.columns,"data-gap":o.gap,"data-presentation":r?"record-list":void 0,"data-slot":"agent-ui-grid",children:n})}function Ma({children:t,className:e,component:o}){return De(k,{className:e,description:o.description,title:o.title,variant:o.variant,children:De("div",{className:"aui-card-stack","data-slot":"agent-ui-card-stack",children:t})})}function Da({className:t,component:e}){return De("span",{"aria-hidden":"true",className:b("aui-spacer",t),"data-size":e.size??"auto","data-slot":"agent-ui-spacer"})}function Ba({className:t}){return De(bt,{className:t})}import{ChevronLeft as bd,ChevronRight as yd,MapPin as xd,StarFill as sr}from"@gravity-ui/icons";import{Modal as Xt}from"@heroui/react";import{AnimatePresence as or,LazyMotion as wd,domAnimation as vd,m as kd,useIsPresent as Sd,useReducedMotion as Nd}from"motion/react";import{Suspense as Pd,forwardRef as Vd,lazy as _d,useCallback as _e,useEffect as nr,useId as Id,useMemo as lr,useRef as za,useState as nt}from"react";import{createContext as Cd,useContext as hd}from"react";var fd=Cd(void 0);function Yt(){return hd(fd)}import{Fragment as Hd,jsx as x,jsxs as E}from"react/jsx-runtime";var Td=new Intl.NumberFormat(void 0,{maximumFractionDigits:1,minimumFractionDigits:1}),rr=new Intl.NumberFormat(void 0,{maximumFractionDigits:0}),Ad={duration:.32,ease:[.22,1,.36,1]},Rd={duration:0},Ld={center:{opacity:1,transform:"translateX(0px)"},enter:t=>({opacity:0,transform:`translateX(${t*24}px)`}),exit:t=>({opacity:0,transform:`translateX(${t*-24}px)`})},Fd={center:{opacity:1,transform:"translateX(0px)"},enter:t=>({opacity:0,transform:`translateX(${t*32}px)`}),exit:t=>({opacity:0,transform:`translateX(${t*-32}px)`})},Md=_d(async()=>({default:(await import("./interactive-map-surface-WC2LPCR7.js")).InteractiveMapSurface}));function Jt(t){return Td.format(t)}function dr(t){return t.trim().split(/\s+/).slice(0,2).map(e=>e[0]?.toLocaleUpperCase()??"").join("")}function Dd(){return typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}function Bd({className:t,location:e}){let o=e.images?.[0],[r,n]=nt();return!o||r===o.src?x("span",{"aria-hidden":"true",className:b(t,"aui-map__image-fallback"),children:dr(e.title)}):x(Ve,{alt:o.alt,className:t,decoding:"async",loading:"lazy",referrerPolicy:"no-referrer",src:o.src,onError:()=>n(o.src)})}function zd(t){return t?.split(",").at(-1)?.trim()}var ir=Vd(function({children:e,className:o,direction:r,transition:n,variants:s},d){let m=Sd();return x(kd.div,{ref:d,animate:"center","aria-hidden":m?void 0:!0,className:o,custom:r,"data-direction":r,exit:"exit",inert:m?void 0:!0,initial:"enter",transition:n,variants:s,children:e})});function pr({location:t,showCategory:e=!0}){let o=t.rating===void 0?void 0:`${Jt(t.rating)} out of 5${t.reviewCount===void 0?"":`, ${rr.format(t.reviewCount)} reviews`}`;return E("span",{className:"aui-map__metadata","data-slot":"agent-ui-map-location-metadata",children:[t.rating!==void 0?E("span",{"aria-label":o,className:"aui-map__rating",children:[x("span",{"aria-hidden":"true",children:Jt(t.rating)}),x(sr,{"aria-hidden":"true"})]}):null,t.reviewCount!==void 0?E("span",{"aria-hidden":"true",children:[rr.format(t.reviewCount)," reviews"]}):null,e&&t.category?E(Hd,{children:[x("span",{"aria-hidden":"true",className:"aui-map__metadata-separator",children:"\xB7"}),x("span",{children:t.category})]}):null]})}function Wd({component:t,onSelect:e,selectedLocationId:o}){let r=Yt(),n=so(t,r?.maxZoom),s=lr(()=>new Map(t.locations.map(d=>[d.id,d])),[t.locations]);return E("div",{"aria-label":`${t.title} map with ${t.locations.length} locations`,className:"aui-map__surface","data-renderer":"host-tiles","data-slot":"agent-ui-map-surface",role:"region",children:[E("svg",{"aria-hidden":"true",className:"aui-map__fallback",preserveAspectRatio:"none",viewBox:"0 0 800 520",children:[x("path",{d:"M-40 430C130 270 210 310 360 190S590 35 850 110"}),x("path",{d:"M-20 120C180 210 255 150 405 265S650 470 830 390"}),x("path",{d:"M80 -30C125 120 250 205 220 560"}),x("path",{d:"M590 -30C520 120 530 290 690 560"})]}),r?x("div",{"aria-hidden":"true",className:"aui-map__tiles",children:n.tiles.map(d=>{let m;try{m=r.getTileUrl({x:d.xIndex,y:d.yIndex,zoom:d.zoom})}catch{m=void 0}return m?x("img",{alt:"",className:"aui-map__tile",decoding:"async",draggable:!1,loading:"eager",referrerPolicy:"no-referrer",src:m,style:{left:`calc(50% + ${d.x}px)`,top:`calc(var(--map-center-y) + ${d.y}px)`},onError:l=>{l.currentTarget.hidden=!0}},d.key):null})}):null,x("div",{className:"aui-map__markers","data-slot":"agent-ui-map-markers",children:n.points.map((d,m)=>{let l=s.get(d.id);if(!l)return null;let y=l.id===o,h=l.rating!==void 0?Jt(l.rating):l.relevance!==void 0?`${Math.round(l.relevance*100)}%`:String(m+1),u=`Select ${l.title} on map${l.rating===void 0?"":`, rated ${Jt(l.rating)} out of 5`}`;return E("button",{"aria-label":u,"aria-pressed":y,className:"aui-map__marker","data-renderer":"host-tiles","data-selected":y,"data-slot":"agent-ui-map-marker",type:"button",style:{"--map-marker-x":`${d.x}px`,"--map-marker-y":`${d.y}px`},onClick:()=>e(l),children:[x(sr,{"aria-hidden":"true"}),x("span",{children:h})]},l.id)})}),x("span",{className:"aui-map__attribution","data-slot":"agent-ui-map-attribution",children:r?.attribution??"Location preview"})]})}function Ed(t){return Yt()?x(Wd,{...t}):x(Pd,{fallback:x("div",{"aria-label":"Loading interactive map",className:"aui-map__surface aui-map__surface--loading","data-slot":"agent-ui-map-surface",role:"status",children:x("span",{})}),children:x(Md,{...t})})}function Gd({location:t,onKeyDown:e,onOpen:o,selected:r,setRef:n}){let s=zd(t.address),d=[t.category,s].filter(Boolean).join(" \xB7 ");return E("button",{ref:n,"aria-current":r?"true":void 0,"aria-label":`Open details for ${t.title}`,className:"aui-map__result","data-selected":r,"data-slot":"agent-ui-map-result",type:"button",onClick:o,onKeyDown:e,children:[x(Bd,{className:"aui-map__result-image",location:t}),E("span",{className:"aui-map__result-content",children:[x("span",{className:"aui-map__result-title",children:t.title}),d?x("span",{className:"aui-map__result-subtitle",children:d}):null,x(pr,{location:t,showCategory:!1})]}),t.relevance!==void 0?x("span",{className:"aui-map__result-aside",children:E("span",{className:"aui-map__relevance","data-slot":"agent-ui-map-relevance",children:[Math.round(t.relevance*100),"% match"]})}):null]})}function Ud({component:t,currentIndex:e,direction:o,headingId:r,location:n,onNavigate:s}){let d=Yt(),m=Nd(),l=n.images?.[0],[y,h]=nt(),u=l&&l.src!==y,g=m?0:o,v=m?Rd:Ad;return x(wd,{features:vd,children:E("div",{className:"aui-map-detail__content",children:[x("div",{className:"aui-map-detail__hero","data-has-image":!!u,children:x(or,{custom:g,initial:!1,mode:"popLayout",children:E(ir,{className:"aui-map-detail__hero-slide",direction:g,transition:v,variants:Ld,children:[u?x(Ve,{alt:l.alt,decoding:"async",referrerPolicy:"no-referrer",src:l.src,onError:()=>h(l.src)}):x("span",{"aria-hidden":"true",className:"aui-map-detail__hero-fallback",children:dr(n.title)}),n.images&&n.images.length>1?E("span",{className:"aui-map-detail__image-count",children:[x("span",{"aria-hidden":"true",children:"\u25A7"})," ",n.images.length]}):null]},n.id)})}),x(Xt.CloseTrigger,{"aria-label":"Close location details",className:"aui-map-detail__close"}),x(or,{custom:g,initial:!1,mode:"popLayout",children:E(ir,{className:"aui-map-detail__body",direction:g,transition:v,variants:Fd,children:[E("div",{className:"aui-map-detail__heading",children:[x("h2",{id:r,children:n.title}),x(pr,{location:n}),n.address?x("p",{className:"aui-map-detail__address",children:n.address}):null]}),n.actions?.length?x("div",{className:"aui-map-detail__actions","data-slot":"agent-ui-map-detail-actions",children:n.actions.map((P,G)=>{let R=P.href.startsWith("http://")||P.href.startsWith("https://");return x("a",{className:"aui-button","data-size":"md","data-variant":P.variant??(G===0?"primary":"outline"),href:P.href,referrerPolicy:R?"no-referrer":void 0,rel:R?"noopener noreferrer":void 0,target:R?"_blank":void 0,children:P.label},P.id)})}):null,n.notes?E("section",{className:"aui-map-detail__notes","data-slot":"agent-ui-map-detail-notes",children:[x("span",{children:"Notes"}),x("p",{children:Je(n.notes)})]}):null]},n.id)}),E("footer",{className:"aui-map-detail__footer",children:[x("span",{className:"aui-map-detail__provider",children:d?.attribution??"OpenStreetMap \xB7 CARTO"}),E("div",{className:"aui-map-detail__navigation",children:[x("button",{"aria-label":"Previous location",disabled:e===0,type:"button",onClick:()=>s(e-1),children:x(bd,{"aria-hidden":"true"})}),E("span",{"aria-live":"polite",children:[e+1," of ",t.locations.length]}),x("button",{"aria-label":"Next location",disabled:e===t.locations.length-1,type:"button",onClick:()=>s(e+1),children:x(yd,{"aria-hidden":"true"})})]})]})]})})}function cr({className:t,component:e,onSelect:o}){let[r,n]=nt(()=>pa(e)),[s,d]=nt(!1),[m,l]=nt(1),[y,h]=nt(),u=Id(),g=za(new Map),v=za(void 0),P=za(r),G=lr(()=>new Map(e.locations.map(S=>[S.id,S])),[e.locations]),R=pa(e),V=G.has(r)?r:R,K=Math.max(0,e.locations.findIndex(S=>S.id===V)),$=e.locations[K],ve=`${u}-${$.id}`;nr(()=>{P.current=V},[V]),nr(()=>()=>{v.current!==void 0&&window.clearTimeout(v.current)},[]);let Vt=_e(S=>{h(ie(S))},[]),_t=_e(S=>{o?.(A(e,{...S}))},[e,o]),It=_e((S,O=!1)=>{typeof window>"u"||window.requestAnimationFrame(()=>{let U=g.current.get(S);U?.scrollIntoView?.({behavior:Dd()?"auto":"smooth",block:"nearest",inline:"center"}),O&&U?.focus()})},[]),Ye=_e((S,O={})=>{P.current=S.id,n(S.id),_t(S),O.scroll!==!1&&It(S.id,O.focus),O.openDetails&&d(!0)},[_t,It]),qa=_e((S,O=!1)=>{let U=e.locations[S];U&&Ye(U,{focus:O,scroll:!0})},[e.locations,Ye]),Yr=_e((S,O)=>{let U;S.key==="ArrowLeft"&&(U=Math.max(0,O-1)),S.key==="ArrowRight"&&(U=Math.min(e.locations.length-1,O+1)),S.key==="Home"&&(U=0),S.key==="End"&&(U=e.locations.length-1),!(U===void 0||U===O)&&(S.preventDefault(),qa(U,!0))},[e.locations.length,qa]),Xr=_e(S=>{let O=S.currentTarget;v.current!==void 0&&window.clearTimeout(v.current),v.current=window.setTimeout(()=>{let U=O.getBoundingClientRect(),ti=U.left+U.width/2,Xe,Ya=Number.POSITIVE_INFINITY;for(let Xa of e.locations){let Ja=g.current.get(Xa.id);if(!Ja)continue;let Qa=Ja.getBoundingClientRect(),eo=Math.abs(Qa.left+Qa.width/2-ti);eo<Ya&&(Ya=eo,Xe=Xa)}Xe&&Xe.id!==P.current&&(P.current=Xe.id,n(Xe.id),_t(Xe))},120)},[e.locations,_t]),Jr=_e(S=>{d(S),S||It(P.current,!0)},[It]),Qr=_e(S=>{let O=e.locations[S];O&&(l(S<K?-1:1),Ye(O,{scroll:!0}))},[K,e.locations,Ye]),ei=E("span",{className:"aui-map__card-title",children:[x(xd,{"aria-hidden":"true"}),x("span",{children:e.title})]});return x(k,{className:b("aui-map-card",t),description:e.description,title:ei,children:E("div",{ref:Vt,className:"aui-map","data-slot":"agent-ui-map",children:[x(Ed,{component:e,selectedLocationId:V,onSelect:S=>Ye(S,{scroll:!0})}),x("div",{className:"aui-map__rail","data-slot":"agent-ui-map-results",onScroll:Xr,children:x("ul",{"aria-label":`${e.title} results`,children:e.locations.map((S,O)=>x("li",{children:x(Gd,{location:S,selected:S.id===V,setRef:U=>{U?g.current.set(S.id,U):g.current.delete(S.id)},onKeyDown:U=>Yr(U,O),onOpen:()=>Ye(S,{openDetails:!0,scroll:!1})})},S.id))})}),E("span",{"aria-live":"polite",className:"aui-map__live-region",children:["Result ",K+1," of ",e.locations.length,", ",$.title]}),x(Xt.Backdrop,{className:"aui-map-detail__backdrop",isOpen:s,UNSTABLE_portalContainer:y,variant:"blur",onOpenChange:Jr,children:x(Xt.Container,{className:"aui-map-detail__container",placement:"center",size:"cover",children:x(Xt.Dialog,{"aria-labelledby":ve,className:"aui-map-detail__dialog","data-slot":"agent-ui-map-detail",children:x(Ud,{component:e,currentIndex:K,direction:m,headingId:ve,location:$,onNavigate:Qr})})})})]})})}import{Modal as rt}from"@heroui/react";import{useCallback as $d,useState as gr}from"react";import{StarFill as Zd}from"@gravity-ui/icons";import{jsx as yt,jsxs as Wa}from"react/jsx-runtime";var mr=new Intl.NumberFormat(void 0,{maximumFractionDigits:1}),ur=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function Qt({className:t,count:e,value:o}){let r=Math.min(Math.max(o,0),5),n=`Rated ${mr.format(r)} out of 5${e===void 0?"":`, ${ur.format(e)} reviews`}`,s=Array.from({length:5},(d,m)=>yt(Zd,{"aria-hidden":"true"},m));return Wa("span",{"aria-label":n,className:b("aui-rating",t),"data-slot":"agent-ui-rating",role:"img",children:[Wa("span",{"aria-hidden":"true",className:"aui-rating__stars",children:[yt("span",{className:"aui-rating__track",children:s}),yt("span",{className:"aui-rating__fill",style:{width:`${r/5*100}%`},children:yt("span",{className:"aui-rating__track",children:s})})]}),yt("span",{"aria-hidden":"true",className:"aui-rating__value",children:mr.format(r)}),e===void 0?null:Wa("span",{"aria-hidden":"true",className:"aui-rating__count",children:["(",ur.format(e),")"]})]})}import{jsx as H,jsxs as it}from"react/jsx-runtime";var Cr=new Map;function Kd(t){let e=t.currency??"USD",o=Cr.get(e);return o||(o=new Intl.NumberFormat(void 0,{currency:e,style:"currency"}),Cr.set(e,o)),o.format(t.amount)}function fr({actions:t,component:e,onAction:o,onSelect:r}){return H("span",{className:"aui-product__actions","data-slot":"agent-ui-product-actions",children:t.map(n=>H(fe,{variant:n.variant,onClick:()=>{let s=se(e.id,n);s&&o?o(s):r?.(A(e,n))},children:n.label},n.id))})}function hr({component:t,layout:e,onAction:o,onSelect:r,product:n}){let[s,d]=gr(),[m,l]=gr(!1),y=$d(u=>{d(ie(u))},[]),h=n.badge?H("span",{className:"aui-product__badge","data-slot":"agent-ui-product-badge","data-tone":n.badge.tone??"default",children:n.badge.label}):null;return it("article",{className:"aui-product","data-layout":e,"data-slot":"agent-ui-product",children:[m?it("span",{className:"aui-product__media","data-slot":"agent-ui-product-media",children:[H(me,{alt:n.image.alt,className:"aui-product__image",src:void 0}),h]}):it(rt,{children:[it(rt.Trigger,{ref:y,"aria-label":`Open ${n.image.alt}`,className:"aui-product__media","data-slot":"agent-ui-product-media",children:[H(me,{alt:n.image.alt,className:"aui-product__image",loading:"lazy",src:n.image.src,onLoadFailure:()=>l(!0)}),h]}),H(rt.Backdrop,{className:"aui-image-modal__backdrop",UNSTABLE_portalContainer:s,variant:"blur",children:H(rt.Container,{className:"aui-image-modal__container",placement:"center",children:it(rt.Dialog,{"aria-label":n.image.alt,className:"aui-image-modal__dialog","data-slot":"agent-ui-image-modal",children:[H(rt.CloseTrigger,{className:"aui-image-modal__close"}),H("img",{alt:n.image.alt,className:"aui-image-modal__image",src:n.image.src})]})})})]}),it("span",{className:"aui-product__header",children:[n.meta?H("span",{className:"aui-product__meta",children:n.meta}):null,H("span",{className:"aui-product__price","data-slot":"agent-ui-product-price",children:Kd(n.price)})]}),H("span",{className:"aui-product__name","data-slot":"agent-ui-product-name",children:n.name}),n.rating?H(Qt,{className:"aui-product__rating",count:n.rating.count,value:n.rating.value}):null,n.description?H("span",{className:"aui-product__description",children:n.description}):null,n.actions?.length?H(fr,{actions:n.actions,component:t,onAction:o,onSelect:r}):null]})}function br({className:t,component:e,onAction:o,onSelect:r}){let n=e.products.length===1?"spotlight":"grid",s=e.actions?.length?H("div",{className:"aui-product-card__footer","data-slot":"agent-ui-product-card-footer",children:H(fr,{actions:e.actions,component:e,onAction:o,onSelect:r})}):null;return H(k,{className:b("aui-product-card",`aui-product-card--${n}`,t),description:e.description,footer:s,title:e.title,variant:e.variant,children:n==="spotlight"?H(hr,{component:e,layout:"spotlight",product:e.products[0],onAction:o,onSelect:r}):H("div",{className:"aui-product-card__grid","data-slot":"agent-ui-product-card-grid",children:e.products.map(d=>H(hr,{component:e,layout:"grid",product:d,onAction:o,onSelect:r},d.id))})})}import{Modal as st}from"@heroui/react";import{useCallback as Od,useState as yr}from"react";import{Fragment as jd,jsx as Y,jsxs as Ke}from"react/jsx-runtime";function xr({className:t,component:e,onAction:o,onSelect:r}){let n=e.layout??"details",[s,d]=yr(),[m,l]=yr(!1),y=Od(g=>{d(ie(g))},[]),h=e.status?Y("span",{className:"aui-record__status","data-slot":"agent-ui-record-status","data-tone":e.status.tone??"default",children:e.status.label}):null,u=e.actions?.length?Y("div",{className:"aui-record__actions","data-slot":"agent-ui-record-actions",children:e.actions.map(g=>Y(fe,{variant:g.variant,onClick:()=>{let v=se(e.id,g);v&&o?o(v):r?.(A(e,g))},children:g.label},g.id))}):null;return Y(k,{actions:n==="compact"?h:void 0,className:b("aui-record-card",`aui-record-card--${n}`,t),description:e.description,footer:u,title:e.title,variant:e.variant,children:Ke(Ot,{className:"aui-record",gap:n==="compact"?3:4,children:[n==="media"&&e.image&&m?Y(Ve,{alt:e.image.alt,className:"aui-record__media",radius:"xl",src:void 0,width:"100%"}):null,n==="media"&&e.image&&!m?Ke(st,{children:[Y(st.Trigger,{ref:y,"aria-label":`Open ${e.image.alt}`,className:"aui-record__media-trigger","data-slot":"agent-ui-record-media-trigger",children:Y(Ve,{alt:e.image.alt,className:"aui-record__media",loading:"lazy",radius:"xl",src:e.image.src,width:"100%",onError:()=>l(!0)})}),Y(st.Backdrop,{className:"aui-image-modal__backdrop",UNSTABLE_portalContainer:s,variant:"blur",children:Y(st.Container,{className:"aui-image-modal__container",placement:"center",children:Ke(st.Dialog,{"aria-label":e.image.alt,className:"aui-image-modal__dialog","data-slot":"agent-ui-image-modal",children:[Y(st.CloseTrigger,{className:"aui-image-modal__close"}),Y("img",{alt:e.image.alt,className:"aui-image-modal__image",src:e.image.src})]})})})]}):null,e.image&&n!=="media"||e.eyebrow||h&&n!=="compact"?Ke(Kt,{align:"center",gap:3,children:[e.image&&n!=="media"?Y(Ve,{frame:!0,alt:e.image.alt,radius:"xl",size:48,src:e.image.src}):null,e.eyebrow?Y(qt,{className:"aui-record__eyebrow",value:e.eyebrow}):null,h&&n!=="compact"?Ke(jd,{children:[Y(jt,{}),h]}):null]}):null,e.fields.length>0?Y("dl",{className:"aui-record__fields","data-slot":"agent-ui-record-fields",children:e.fields.map(g=>Ke("div",{"data-slot":"agent-ui-record-field",children:[Ke("dt",{children:[g.icon?Y(q,{"data-slot":"agent-ui-record-field-icon",name:g.icon}):null,g.label]}),Y("dd",{"data-tone":g.tone??"default",children:g.value})]},g.label))}):null]})})}var wr={Actions:tr,Box:Xn,Button:ar,Caption:qt,Card:Yn,Col:Ot,Divider:bt,Icon:er,Image:Ve,Row:Kt,Spacer:jt,Text:Jn,Title:Qn},i=wr;var vr=new Map;function ea(t,e){let o=vr.get(e);return o||(o=new Intl.NumberFormat(void 0,{currency:e,style:"currency"}),vr.set(e,o)),o.format(t)}import{jsx as ta}from"react/jsx-runtime";function ue({action:t,component:e,onAction:o,onSelect:r}){return ta(i.Button,{variant:t.variant,onClick:()=>{let n=se(e.id,t);n&&o?o(n):r?.(A(e,{actionId:t.id}))},children:t.label})}function lt({name:t,src:e}){return e?ta(i.Image,{frame:!0,alt:t,radius:"full",size:44,src:e}):ta(i.Box,{align:"center",className:"aui-composition-avatar",height:44,justify:"center",radius:"full",width:44,children:ta(i.Text,{value:t.slice(0,1).toUpperCase(),weight:"semibold"})})}import{jsx as z,jsxs as Ie}from"react/jsx-runtime";function Ea({emphasis:t,label:e,value:o}){return Ie(i.Row,{children:[z(i.Text,{value:e,weight:t?"semibold":"normal"}),z(i.Spacer,{}),z(i.Text,{value:o,weight:t?"semibold":"normal"})]})}function kr({className:t,component:e,onAction:o,onSelect:r}){return Ie(i.Card,{className:b("aui-composition-card aui-purchase-items",t),"data-component-kind":e.kind,size:"sm",children:[z(i.Col,{gap:3,children:e.items.map(n=>Ie(i.Row,{align:"center",gap:3,children:[n.image?z(i.Image,{alt:n.image.alt,radius:"xl",size:48,src:n.image.src}):null,Ie(i.Col,{flex:1,gap:0,children:[z(i.Text,{value:n.name,weight:"semibold"}),n.description?z(i.Caption,{value:n.description}):null]}),n.quantity&&n.quantity>1?z(i.Caption,{value:`\xD7${n.quantity}`}):null,n.price!==void 0?z(i.Text,{value:ea(n.price,e.currency)}):null]},n.id))}),z(i.Divider,{flush:!0}),z(i.Col,{gap:1,children:e.totals.map(n=>z(Ea,{emphasis:n.emphasis,label:n.label,value:ea(n.amount,e.currency)},n.label))}),e.actions?.length?z(i.Actions,{children:e.actions.map(n=>z(ue,{action:n,component:e,onAction:o,onSelect:r},n.id))}):null]})}function Sr({className:t,component:e,onAction:o,onSelect:r}){return Ie(i.Card,{className:b("aui-composition-card aui-purchase-complete",t),"data-component-kind":e.kind,size:"sm",children:[Ie(i.Row,{align:"center",gap:2,children:[z("span",{"aria-hidden":"true",className:"aui-purchase-complete__check",children:"\u2713"}),z(i.Text,{color:"success",value:e.title,weight:"medium"})]}),z(i.Divider,{flush:!0}),Ie(i.Row,{gap:3,children:[e.product.image?z(i.Image,{alt:e.product.image.alt,fit:"contain",radius:"xl",size:80,src:e.product.image.src}):null,Ie(i.Col,{gap:1,children:[z(i.Title,{value:e.product.name}),e.product.description?z(i.Caption,{value:e.product.description}):null]})]}),Ie(i.Col,{gap:2,children:[e.details.map(n=>z(Ea,{label:n.label,value:n.value},n.label)),e.paid?z(Ea,{emphasis:!0,label:"Paid",value:ea(e.paid.amount,e.paid.currency)}):null]}),e.action?z(ue,{action:e.action,component:e,onAction:o,onSelect:r}):null]})}import{jsx as F,jsxs as ne}from"react/jsx-runtime";function Nr({className:t,component:e,onAction:o,onSelect:r}){return ne(i.Card,{className:b("aui-composition-card aui-create-event",t),"data-component-kind":e.kind,size:"md",children:[ne(i.Row,{align:"start",gap:4,children:[ne(i.Col,{align:"center",gap:0,width:64,children:[F(i.Caption,{value:e.date.weekday}),F(i.Title,{size:"3xl",value:e.date.day,weight:"normal"})]}),F(i.Col,{flex:1,gap:2,children:e.events.map(n=>ne(i.Row,{align:"center",className:"aui-create-event__item","data-status":n.status??"existing","data-tone":n.tone??"default",gap:3,padding:{x:3,y:2.5},radius:"xl",children:[F("span",{className:"aui-create-event__marker"}),ne(i.Col,{gap:0,children:[F(i.Text,{value:n.title,weight:"semibold"}),F(i.Caption,{value:n.time})]})]},n.id))})]}),e.actions?.length?F(i.Actions,{children:e.actions.map(n=>F(ue,{action:n,component:e,onAction:o,onSelect:r},n.id))}):null]})}function Pr({className:t,component:e}){return F(i.Card,{className:b("aui-composition-card aui-view-event",t),"data-component-kind":e.kind,size:"sm",children:ne(i.Row,{align:"stretch",gap:3,children:[F("span",{className:"aui-view-event__marker","data-tone":e.tone??"accent"}),ne(i.Col,{flex:1,gap:1,children:[ne(i.Row,{children:[F(i.Caption,{value:e.date}),F(i.Spacer,{}),F(i.Text,{color:"accent",size:"sm",value:e.time})]}),F(i.Title,{value:e.title})]})]})})}function Vr({className:t,component:e,onAction:o,onSelect:r}){return ne(i.Card,{className:b("aui-composition-card aui-event-session",t),"data-component-kind":e.kind,size:"md",children:[ne(i.Col,{gap:1,children:[e.eyebrow?F(i.Caption,{color:"warning",value:e.eyebrow}):null,F(i.Title,{value:e.title}),e.description?F(i.Caption,{value:e.description}):null]}),F(i.Divider,{flush:!0}),ne(i.Row,{align:"center",gap:3,children:[F("span",{"aria-hidden":"true",className:"aui-event-session__pin",children:"\u25CF"}),ne(i.Col,{gap:0,children:[F(i.Text,{value:e.location,weight:"semibold"}),F(i.Caption,{value:e.time})]}),F(i.Spacer,{}),e.action?F(ue,{action:e.action,component:e,onAction:o,onSelect:r}):null]}),e.speakers.map(n=>ne(i.Row,{align:"center",gap:3,children:[F(lt,{name:n.name,src:n.image?.src}),ne(i.Col,{gap:0,children:[F(i.Text,{value:n.name,weight:"semibold"}),F(i.Caption,{value:n.role})]})]},`${n.name}-${n.role}`))]})}import{jsx as B,jsxs as ge}from"react/jsx-runtime";function _r({className:t,component:e,onAction:o,onSelect:r}){return ge(i.Card,{className:b("aui-composition-card aui-playlist",t),"data-component-kind":e.kind,size:"sm",children:[e.cover?B(i.Image,{alt:e.cover.alt,height:132,radius:"xl",src:e.cover.src,width:"100%"}):null,B(i.Col,{gap:3,children:e.tracks.map((n,s)=>ge(i.Row,{align:"center",gap:3,children:[B(i.Caption,{value:s+1}),n.image?B(i.Image,{alt:n.image.alt,radius:"xl",size:44,src:n.image.src}):null,ge(i.Col,{flex:1,gap:0,children:[B(i.Text,{value:n.title,weight:"semibold"}),B(i.Caption,{value:n.artist})]}),n.action?B(ue,{action:n.action,component:e,onAction:o,onSelect:r}):null]},n.id))}),e.actions?.length?B(i.Actions,{children:e.actions.map(n=>B(ue,{action:n,component:e,onAction:o,onSelect:r},n.id))}):null]})}function Ir({className:t,component:e}){return ge(i.Card,{className:b("aui-composition-card aui-channel-message",t),"data-component-kind":e.kind,size:"md",children:[ge(i.Row,{children:[B(i.Text,{value:e.channel,weight:"medium"}),B(i.Spacer,{}),B(i.Caption,{value:e.timestamp})]}),B(i.Divider,{flush:!0}),ge(i.Row,{align:"start",gap:4,children:[B(lt,{name:e.author.name,src:e.author.image?.src}),ge(i.Col,{flex:1,gap:2,children:[B(i.Text,{value:e.author.name,weight:"semibold"}),B("p",{className:"aui-channel-message__content",children:e.content}),e.attachments?.length?B(i.Row,{className:"aui-channel-message__attachments",gap:2,children:e.attachments.map(o=>o.image?B(i.Image,{alt:o.image.alt,radius:"lg",size:64,src:o.image.src,title:o.name},o.id):B(i.Image,{alt:o.name,className:"aui-channel-message__file",radius:"lg",size:64,title:o.name},o.id))}):null]})]})]})}function Tr({className:t,component:e}){return ge(i.Card,{className:b("aui-composition-card aui-player-card",t),"data-component-kind":e.kind,padding:8,size:"md",theme:"dark",children:[e.backgroundImage?B(i.Image,{alt:e.backgroundImage.alt,className:"aui-player-card__background",src:e.backgroundImage.src}):null,ge(i.Row,{align:"center",className:"aui-player-card__content",children:[B(i.Box,{minHeight:160,width:"40%"}),ge(i.Col,{flex:"auto",gap:3,children:[B(i.Title,{color:"white",size:"xl",value:`${e.playerName}${e.jerseyNumber?` (#${e.jerseyNumber})`:""}`,weight:"normal"}),B(i.Row,{className:"aui-player-card__stats",children:e.stats.map(o=>ge(i.Col,{flex:1,gap:0,children:[B(i.Text,{value:o.value,weight:"semibold"}),B(i.Caption,{color:"white",value:o.label})]},o.label))})]})]})]})}import{jsx as xt,jsxs as Ar}from"react/jsx-runtime";function Rr({className:t,component:e,onAction:o,onSelect:r}){return Ar(i.Card,{className:b("aui-composition-card aui-enable-notification",t),"data-component-kind":e.kind,size:"sm",children:[Ar(i.Col,{align:"center",gap:3,padding:3,children:[xt("span",{"aria-hidden":"true",className:"aui-enable-notification__icon",children:"\u2713"}),xt(i.Title,{align:"center",value:e.title}),e.description?xt(i.Caption,{value:e.description}):null]}),xt(i.Row,{className:"aui-enable-notification__actions",children:e.actions.map(n=>xt(ue,{action:n,component:e,onAction:o,onSelect:r},n.id))})]})}import{Tabs as dt}from"@heroui/react";import{jsx as wt,jsxs as Lr}from"react/jsx-runtime";function Fr({className:t,component:e,renderPanel:o}){return wt(k,{className:b("aui-product-signals",t),"data-component-kind":e.kind,description:e.description,title:e.title,children:Lr(dt,{defaultSelectedKey:e.defaultValue??e.tabs[0]?.id,variant:"secondary",children:[wt(dt.ListContainer,{children:wt(dt.List,{"aria-label":`${e.title} views`,children:e.tabs.map(r=>Lr(dt.Tab,{id:r.id,children:[r.label,wt(dt.Indicator,{})]},r.id))})}),e.tabs.map(r=>wt(dt.Panel,{className:"aui-product-signals__panel",id:r.id,children:o(r.component)},r.id))]})})}import{jsx as W,jsxs as Ce}from"react/jsx-runtime";function Mr({className:t,component:e}){return Ce(i.Card,{className:b("aui-composition-card aui-flight-tracker",t),"data-component-kind":e.kind,size:"md",theme:"dark",children:[Ce(i.Row,{align:"center",gap:2,children:[e.airline.logo?W(i.Box,{align:"center",className:"aui-flight-tracker__logo",height:28,justify:"center",radius:"full",width:28,children:W(i.Image,{alt:e.airline.logo.alt,fit:"contain",size:18,src:e.airline.logo.src})}):null,W(i.Text,{value:e.flightNumber,weight:"semibold"}),W(i.Spacer,{}),W(i.Caption,{color:"white",value:e.date})]}),W(i.Divider,{flush:!0}),Ce(i.Col,{gap:3,children:[Ce(i.Row,{align:"center",children:[W(i.Text,{size:"lg",value:e.origin.label}),W(i.Spacer,{}),W(i.Text,{size:"lg",value:e.destination.label})]}),W("div",{"aria-label":`${e.progress??0}% complete`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":e.progress??0,className:"aui-flight-tracker__progress",role:"progressbar",children:W("span",{style:{width:`${e.progress??0}%`}})}),Ce(i.Row,{align:"center",children:[Ce(i.Col,{gap:0,children:[W(i.Text,{value:e.origin.time}),e.origin.status?W(i.Caption,{color:"white",value:e.origin.status}):null]}),W(i.Spacer,{}),Ce(i.Col,{align:"end",gap:0,children:[W(i.Text,{value:e.destination.time}),e.destination.status?W(i.Caption,{color:"white",value:e.destination.status}):null]})]})]})]})}function Dr({className:t,component:e}){return Ce(i.Card,{className:b("aui-composition-card aui-ride-status",t),"data-component-kind":e.kind,size:"sm",children:[W(i.Title,{size:"xl",value:e.eta}),Ce(i.Row,{align:"center",gap:3,children:[Ce(i.Col,{gap:0,children:[W(i.Caption,{value:"Pick up"}),W(i.Text,{truncate:!0,value:e.pickup})]}),W(i.Spacer,{}),Ce(i.Col,{align:"end",gap:0,children:[W(i.Caption,{value:"Driver"}),W(i.Text,{value:e.driver.name})]}),W(lt,{name:e.driver.name,src:e.driver.image?.src})]})]})}import{useState as qd}from"react";import{Fragment as je,jsx as N,jsxs as re}from"react/jsx-runtime";function Oe(){return N("path",{d:"M13.2 25.5h20.6a6.7 6.7 0 0 0 .2-13.4 10.2 10.2 0 0 0-19.2-2.4 8 8 0 0 0-1.6 15.8Z",fill:"currentColor",opacity:".94"})}function Br({small:t=!1}){return re("g",{transform:t?"translate(-5 -5) scale(.72)":void 0,children:[N("circle",{cx:"24",cy:"20",fill:"currentColor",r:"7"}),N("path",{d:"M24 5v5m0 20v5M9 20h5m20 0h5M13.4 9.4l3.5 3.5m14.2 14.2 3.5 3.5m0-21.2-3.5 3.5M16.9 27.1l-3.5 3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2.4"})]})}var Yd={clear:N(Br,{}),cloudy:N(Oe,{}),drizzle:re(je,{children:[N(Oe,{}),N("path",{d:"m17 30-2 4m9-4-2 4m9-4-2 4",stroke:"currentColor",strokeLinecap:"round"})]}),fog:re(je,{children:[N(Oe,{}),N("path",{d:"M10 31h27M13 36h21",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]}),"partly-cloudy":re(je,{children:[N(Br,{small:!0}),N(Oe,{})]}),rain:re(je,{children:[N(Oe,{}),N("path",{d:"m16 30-3 6m11-6-3 6m11-6-3 6",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]}),snow:re(je,{children:[N(Oe,{}),N("path",{d:"M16 32h.1m8-.1h.1m8 .1h.1",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"4"})]}),thunderstorm:re(je,{children:[N(Oe,{}),N("path",{d:"m25 28-5 8h5l-2 6 8-10h-5l3-4Z",fill:"currentColor"})]}),unknown:re(je,{children:[N("circle",{cx:"24",cy:"24",fill:"none",r:"15",stroke:"currentColor",strokeWidth:"2"}),N("path",{d:"M20 19a4 4 0 1 1 5 3.9c-1.6.5-2 1.4-2 3.1m0 5h.1",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2.4"})]}),windy:N("path",{d:"M7 17h24a4 4 0 1 0-4-4m-20 9h31a4 4 0 1 1-4 4M7 28h17",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2.5"})},Xd={clear:"https://cdn.openai.com/API/storybook/mostly-sunny.png",cloudy:"https://cdn.openai.com/API/storybook/mixed-sun.png",drizzle:"https://cdn.openai.com/API/storybook/rain.png",fog:"https://cdn.openai.com/API/storybook/windy.png","partly-cloudy":"https://cdn.openai.com/API/storybook/mixed-sun.png",rain:"https://cdn.openai.com/API/storybook/rain.png",thunderstorm:"https://cdn.openai.com/API/storybook/rain.png",windy:"https://cdn.openai.com/API/storybook/windy.png"};function Ga({condition:t,size:e=48}){let o=Xd[t],[r,n]=qd(),s=t.replaceAll("-"," ");return o&&o!==r?N(me,{alt:s,className:"aui-weather-icon",decoding:"async",height:e,loading:"lazy",src:o,width:e,onLoadFailure:n}):N("svg",{"aria-label":s,className:"aui-weather-icon",height:e,role:"img",viewBox:"0 0 48 48",width:e,children:Yd[t]})}function aa(t,e){return`${Math.round(t)}\xB0${e==="fahrenheit"?"F":"C"}`}function zr({className:t,component:e}){return N(i.Card,{"data-component-kind":e.kind,padding:{x:4,y:8},size:"sm",theme:"dark",className:b("aui-composition-card aui-weather-card aui-weather-current",t),children:re(i.Col,{align:"center",gap:4,children:[re(i.Row,{align:"center",gap:3,children:[N(Ga,{condition:e.condition,size:58}),N(i.Title,{color:"white",size:"3xl",value:aa(e.temperature,e.unit),weight:"normal"})]}),N(i.Caption,{color:"white",size:"lg",value:e.location}),e.description?N(i.Text,{align:"center",color:"white",value:e.description}):null,e.details?.length?N(i.Row,{className:"aui-weather-current__details",gap:3,children:e.details.map(o=>re(i.Col,{align:"center",gap:0,children:[N(i.Caption,{color:"white",value:o.label}),N(i.Text,{color:"white",value:o.value,weight:"semibold"})]},o.label))}):null]})})}function Wr({className:t,component:e}){return N(i.Card,{"data-component-kind":e.kind,padding:8,size:"sm",theme:"dark",className:b("aui-composition-card aui-weather-card aui-weather-forecast",t),children:re(i.Col,{align:"center",gap:3,children:[N(Ga,{condition:e.condition,size:60}),re(i.Row,{align:"center",gap:2,children:[N(i.Title,{color:"white",size:"2xl",value:aa(e.low,e.unit),weight:"normal"}),N(i.Title,{color:"white",size:"2xl",value:aa(e.high,e.unit),weight:"normal"})]}),N(i.Caption,{color:"white",value:e.location}),e.description?N(i.Text,{align:"center",color:"white",value:e.description}):null,N(i.Row,{className:"aui-weather-forecast__days",gap:4,children:e.forecast.map(o=>re(i.Col,{align:"center",gap:1,children:[N(i.Caption,{truncate:!0,className:"aui-weather-forecast__day-label",color:"white",title:o.label,value:o.label}),N(Ga,{condition:o.condition,size:40}),N(i.Text,{color:"white",value:aa(o.temperature,e.unit)})]},o.label))})]})})}import{Button as Jd,Calendar as ee,Checkbox as oa,CheckboxGroup as Qd,ComboBox as na,DateField as xe,DatePicker as ra,DateRangePicker as vt,Description as ep,Form as tp,Input as Ur,Label as we,ListBox as pt,NumberField as kt,Radio as ia,RadioGroup as ap,RangeCalendar as te,Select as St,Slider as Nt,Switch as sa,Tag as Er,TagGroup as Gr,TextArea as op,TextField as np,TimeField as la}from"@heroui/react";import{parseDate as rp,parseTime as ip}from"@internationalized/date";import{useCallback as sp,useRef as Ha,useState as ct}from"react";import{jsx as c,jsxs as T}from"react/jsx-runtime";function lp(t){return t.kind==="checkbox-group"||t.kind==="combobox"?t.defaultValue??[]:t.kind==="slider"?t.defaultValue??t.min:t.kind==="number"?t.defaultValue??t.min??0:t.kind==="switch"?t.defaultValue??!1:t.kind==="date-range-picker"?t.defaultValue??{end:"",start:""}:t.defaultValue??""}function qe(t){if(!t)return null;try{return rp(t)}catch{return null}}function Ua(t){if(!t)return null;try{return ip(t)}catch{return null}}function dp(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=qe(t.start),o=qe(t.end);return e&&o?{end:o,start:e}:null}function pp(t){if(t)return t.style==="currency"?{currency:t.currency,notation:t.compact?"compact":"standard",style:"currency"}:t.style==="percent"?{maximumFractionDigits:t.maximumFractionDigits,style:"percent"}:{notation:t.compact?"compact":"standard",style:"decimal"}}function cp(){return T(ee,{"aria-label":"Choose date",children:[T(ee.Header,{children:[T(ee.YearPickerTrigger,{children:[c(ee.YearPickerTriggerHeading,{}),c(ee.YearPickerTriggerIndicator,{})]}),c(ee.NavButton,{slot:"previous"}),c(ee.NavButton,{slot:"next"})]}),T(ee.Grid,{children:[c(ee.GridHeader,{children:t=>c(ee.HeaderCell,{children:t})}),c(ee.GridBody,{children:t=>c(ee.Cell,{date:t})})]}),c(ee.YearPickerGrid,{children:c(ee.YearPickerGridBody,{children:({year:t})=>c(ee.YearPickerCell,{year:t})})})]})}function mp({label:t}){return T(te,{"aria-label":t,children:[T(te.Header,{children:[T(te.YearPickerTrigger,{children:[c(te.YearPickerTriggerHeading,{}),c(te.YearPickerTriggerIndicator,{})]}),c(te.NavButton,{slot:"previous"}),c(te.NavButton,{slot:"next"})]}),T(te.Grid,{children:[c(te.GridHeader,{children:e=>c(te.HeaderCell,{children:e})}),c(te.GridBody,{children:e=>c(te.Cell,{date:e})})]}),c(te.YearPickerGrid,{children:c(te.YearPickerGridBody,{children:({year:e})=>c(te.YearPickerCell,{year:e})})})]})}function Za({className:t,component:e,onAction:o,onSelect:r}){let[n,s]=ct({}),[d,m]=ct(),l=sp(g=>{m(ie(g))},[]),y=g=>n[g.name]??lp(g),h=(g,v)=>{s(P=>({...P,[g.name]:v}))},u=()=>Object.fromEntries(e.fields.map(g=>[g.name,y(g)]));return c(k,{className:t,description:e.description,title:e.title,children:T(tp,{ref:l,"aria-label":e.title,className:"aui-form","data-slot":"agent-ui-form",onSubmit:g=>{g.preventDefault();let P=g.nativeEvent.submitter?.value??e.actions[0]?.id,G=e.actions.find(V=>V.id===P),R=u();G&&o?o({actionId:G.id,componentId:e.id,componentTitle:e.title,label:G.label,prompt:G.prompt,type:"submit",values:R}):r?.(A(e,{actionId:P,values:R}))},children:[e.fields.map(g=>c(up,{field:g,portalContainer:d,value:y(g),onChange:v=>h(g,v)},g.name)),c("div",{className:"aui-actions","data-slot":"agent-ui-form-actions",children:e.actions.map(g=>c(Jd,{className:"aui-form-action","data-slot":"agent-ui-action-button",size:"sm",type:"submit",value:g.id,variant:g.variant??"secondary",children:g.label},g.id))})]})})}function he({children:t}){return t?c(ep,{"data-slot":"agent-ui-field-description",children:t}):null}function up({field:t,onChange:e,portalContainer:o,value:r}){if(t.kind==="select")return c(Cp,{field:t,portalContainer:o,value:String(r),onChange:e});if(t.kind==="radio-group")return T(ap,{isRequired:t.required,name:t.name,value:String(r),variant:"secondary",onChange:e,children:[c(we,{children:t.label}),c(he,{children:t.description}),t.options.map(n=>c(ia,{value:n.value,children:T(ia.Content,{children:[c(ia.Control,{children:c(ia.Indicator,{})}),n.label]})},n.value))]});if(t.kind==="combobox")return c(gp,{field:t,portalContainer:o,value:Array.isArray(r)?r:[],onChange:e});if(t.kind==="checkbox-group"){let n=Array.isArray(r)?r:[];return T(Qd,{isRequired:t.required,name:t.name,value:n,variant:"secondary",onChange:e,children:[c(we,{children:t.label}),c(he,{children:t.description}),t.options.map(s=>c(oa,{value:s.value,children:T(oa.Content,{children:[c(oa.Control,{children:c(oa.Indicator,{})}),s.label]})},s.value))]})}return t.kind==="slider"?T(Nt,{maxValue:t.max,minValue:t.min,step:t.step,value:Number(r),onChange:n=>e(Array.isArray(n)?n[0]??t.min:n),children:[c(we,{children:t.label}),c(Nt.Output,{}),T(Nt.Track,{children:[c(Nt.Fill,{}),c(Nt.Thumb,{})]}),c(he,{children:t.description})]}):t.kind==="number"?T(kt,{fullWidth:!0,formatOptions:pp(t.format),isRequired:t.required,maxValue:t.max,minValue:t.min,name:t.name,step:t.step,value:Number(r),variant:"secondary",onChange:n=>e(n??t.min??0),children:[c(we,{children:t.label}),T(kt.Group,{children:[c(kt.DecrementButton,{}),c(kt.Input,{placeholder:t.placeholder}),c(kt.IncrementButton,{})]}),c(he,{children:t.description})]}):t.kind==="switch"?T(sa,{isRequired:t.required,isSelected:!!r,name:t.name,onChange:e,children:[T(sa.Content,{children:[c(sa.Control,{children:c(sa.Thumb,{})}),t.label]}),c(he,{children:t.description})]}):t.kind==="date-picker"?c(hp,{field:t,portalContainer:o,value:String(r),onChange:e}):t.kind==="date-range-picker"?c(fp,{field:t,portalContainer:o,value:r,onChange:e}):t.kind==="time-field"?T(la,{hourCycle:t.hourCycle,isRequired:t.required,maxValue:Ua(t.max),minValue:Ua(t.min),name:t.name,value:Ua(String(r)),onChange:n=>e(n?.toString()??""),children:[c(we,{children:t.label}),c(la.Group,{fullWidth:!0,variant:"secondary",children:c(la.Input,{children:n=>c(la.Segment,{segment:n})})}),c(he,{children:t.description})]}):T(np,{fullWidth:!0,isRequired:t.required,name:t.name,type:t.kind==="input"?t.inputType??"text":"text",value:String(r),variant:"secondary",onChange:e,children:[c(we,{children:t.label}),t.kind==="textarea"?c(op,{placeholder:t.placeholder,rows:t.rows??4}):c(Ur,{placeholder:t.placeholder}),c(he,{children:t.description})]})}function gp({field:t,onChange:e,portalContainer:o,value:r}){let n=(t.selectionMode??"single")==="multiple",s=new Map(t.options.map(h=>[h.value,h.label])),d=n?t.options.filter(h=>!r.includes(h.value)):t.options,[m,l]=ct(n?"":s.get(r[0]??"")??""),y=h=>{if(h===null){n||e([]);return}if(n){l(""),e(r.includes(h)?r:[...r,h]);return}l(s.get(h)??""),e([h])};return T("div",{className:"aui-combobox",children:[T(na,{allowsEmptyCollection:!0,fullWidth:!0,inputValue:m,isRequired:!!t.required&&r.length===0,selectedKey:n?null:r[0]??null,variant:"secondary",onInputChange:l,onSelectionChange:h=>y(h===null?null:String(h)),children:[c(we,{children:t.label}),T(na.InputGroup,{children:[c(Ur,{placeholder:t.placeholder??"Search options\u2026"}),c(na.Trigger,{})]}),c(na.Popover,{UNSTABLE_portalContainer:o,children:c(pt,{renderEmptyState:()=>c("span",{className:"aui-combobox__empty",children:"No matches"}),children:d.map(h=>T(pt.Item,{id:h.value,textValue:h.label,children:[h.label,c(pt.ItemIndicator,{})]},h.value))})}),c(he,{children:t.description})]}),n&&r.length>0?c(Gr,{"aria-label":`${t.label} selection`,className:"aui-combobox__selection",onRemove:h=>e(r.filter(u=>!h.has(u))),children:c(Gr.List,{children:r.map(h=>T(Er,{id:h,textValue:s.get(h)??h,children:[s.get(h)??h,c(Er.RemoveButton,{})]},h))})}):null,r.map(h=>c("input",{name:t.name,type:"hidden",value:h},h))]})}function Cp({field:t,onChange:e,portalContainer:o,value:r}){let[n,s]=ct(!1),d=Ha(0),m=l=>{!l&&Date.now()-d.current<350||s(l)};return T(St,{fullWidth:!0,isOpen:n,isRequired:t.required,name:t.name,placeholder:t.placeholder??"Select an option",value:r||null,variant:"secondary",onOpenChange:m,onChange:l=>{e(l==null?"":String(l)),s(!1)},children:[c(we,{children:t.label}),T(St.Trigger,{onPointerDown:()=>{d.current=Date.now()},children:[c(St.Value,{}),c(St.Indicator,{})]}),c(St.Popover,{UNSTABLE_portalContainer:o,children:c(pt,{children:t.options.map(l=>T(pt.Item,{id:l.value,textValue:l.label,children:[l.label,c(pt.ItemIndicator,{})]},l.value))})}),c(he,{children:t.description})]})}function hp({field:t,onChange:e,portalContainer:o,value:r}){let[n,s]=ct(!1),d=Ha(0),m=l=>{!l&&Date.now()-d.current<350||s(l)};return T(ra,{isOpen:n,isRequired:t.required,maxValue:qe(t.max),minValue:qe(t.min),name:t.name,value:qe(r),onOpenChange:m,onChange:l=>{e(l?.toString()??""),s(!1)},children:[c(we,{children:t.label}),T(xe.Group,{fullWidth:!0,variant:"secondary",children:[c(xe.Input,{children:l=>c(xe.Segment,{segment:l})}),c(xe.Suffix,{children:c(ra.Trigger,{onPointerDown:()=>{d.current=Date.now()},children:c(ra.TriggerIndicator,{})})})]}),c(he,{children:t.description}),c(ra.Popover,{UNSTABLE_portalContainer:o,children:c(cp,{})})]})}function fp({field:t,onChange:e,portalContainer:o,value:r}){let[n,s]=ct(!1),d=Ha(0),m=l=>{!l&&Date.now()-d.current<350||s(l)};return T(vt,{endName:`${t.name}.end`,isOpen:n,isRequired:t.required,maxValue:qe(t.max),minValue:qe(t.min),startName:`${t.name}.start`,value:dp(r),onOpenChange:m,onChange:l=>{e({end:l?.end.toString()??"",start:l?.start.toString()??""}),s(!1)},children:[c(we,{children:t.label}),T(xe.Group,{fullWidth:!0,variant:"secondary",children:[c(xe.Input,{slot:"start",children:l=>c(xe.Segment,{segment:l})}),c(vt.RangeSeparator,{}),c(xe.Input,{slot:"end",children:l=>c(xe.Segment,{segment:l})}),c(xe.Suffix,{children:c(vt.Trigger,{onPointerDown:()=>{d.current=Date.now()},children:c(vt.TriggerIndicator,{})})})]}),c(he,{children:t.description}),c(vt.Popover,{UNSTABLE_portalContainer:o,children:c(mp,{label:`Choose ${t.label.toLowerCase()}`})})]})}import{useMemo as bp,useState as yp}from"react";import{jsx as Pt,jsxs as Hr}from"react/jsx-runtime";function $a({className:t,component:e,onSelect:o}){let r=bp(()=>Object.fromEntries(e.items.map(d=>[d.id,d.defaultSelected??!1])),[e.items]),[n,s]=yp({});return Pt(k,{className:t,description:e.description,title:e.title,children:Pt("div",{className:"aui-switch-group","data-slot":"agent-ui-switch-group",children:e.items.map(d=>{let m=n[d.id]??r[d.id]??!1;return Hr("label",{"data-slot":"agent-ui-switch-item",children:[Pt("input",{checked:m,"data-slot":"agent-ui-switch-control",role:"switch",type:"checkbox",onChange:l=>{let y=l.currentTarget.checked;s(h=>({...h,[d.id]:y})),o?.(A(e,{id:d.id,selected:y}))}}),Hr("span",{"data-slot":"agent-ui-switch-content",children:[Pt("strong",{"data-slot":"agent-ui-switch-label",children:d.label}),d.description?Pt("small",{"data-slot":"agent-ui-switch-description",children:d.description}):null]})]},d.id)})})})}import{useMemo as xp,useState as wp}from"react";import{jsx as Ka}from"react/jsx-runtime";function Oa({className:t,component:e,onSelect:o}){let r=xp(()=>new Set(e.items.map(m=>m.id)),[e.items]),[n,s]=wp(()=>new Set(e.defaultValue??[])),d=new Set([...n].filter(m=>r.has(m)));return Ka(k,{className:t,description:e.description,title:e.title,children:Ka("div",{className:"aui-toggle-group","data-slot":"agent-ui-toggle-group",children:e.items.map(m=>Ka("button",{"aria-pressed":d.has(m.id),"data-slot":"agent-ui-toggle-item",type:"button",onClick:()=>{let l=new Set(d);e.selectionMode==="multiple"?l.has(m.id)?l.delete(m.id):l.add(m.id):(l.clear(),l.add(m.id)),s(l),o?.(A(e,{selected:[...l]}))},children:m.label},m.id))})})}import{createElement as vp}from"react";import{jsx as Te,jsxs as da}from"react/jsx-runtime";var kp=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function Zr({className:t,component:e}){let o=e.level??2;return vp(`h${o}`,{className:b("aui-heading",t),"data-level":o,"data-slot":"agent-ui-heading"},e.icon?Te(q,{"aria-hidden":"true",className:"aui-heading__icon","data-slot":"agent-ui-heading-icon",name:e.icon}):null,e.text)}function $r({className:t,component:e,onAction:o,onSelect:r}){return da(fe,{className:b("aui-button-primitive",t),"data-slot":"agent-ui-button",variant:e.variant,onClick:()=>{let n=se(e.id,{id:e.id,label:e.label,prompt:e.prompt,toolCall:e.toolCall,variant:e.variant});n&&o?o(n):r?.(A({id:e.id,title:e.label},e))},children:[e.icon?Te(q,{"aria-hidden":"true",name:e.icon}):null,e.label]})}function Kr({className:t,component:e}){return Te("span",{className:b("aui-badge",t),"data-slot":"agent-ui-badge","data-tone":e.tone??"default","data-variant":e.variant??"soft",children:e.label})}function Or({className:t,component:e}){return Te("span",{className:b("aui-icon",t),"data-size":e.size??"md","data-slot":"agent-ui-icon","data-tone":e.tone??"default",children:Te(q,{"aria-hidden":"true",name:e.name})})}function jr({className:t,component:e}){return Te(Qt,{className:t,count:e.count,value:e.value})}function qr({className:t,component:e}){let o=Math.min(Math.max(e.value,0),100);return da("span",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":o,className:b("aui-progress",t),"data-slot":"agent-ui-progress",role:"progressbar",...e.label?{"aria-label":e.label}:{},children:[e.label?da("span",{className:"aui-progress__header",children:[Te("span",{className:"aui-progress__label",children:e.label}),da("span",{className:"aui-progress__value",children:[kp.format(o),"%"]})]}):null,Te("span",{className:"aui-progress__track",children:Te("span",{className:"aui-progress__fill",style:{width:`${o}%`}})})]})}import{jsx as M}from"react/jsx-runtime";function Sp({cardVariant:t,className:e,component:o,exportFormats:r,onAction:n,onSelect:s}){let d=Ko.safeParse(o);if(!d.success)return null;let m=M(ja,{className:b("aui-component",e),exportFormats:r,node:d.data,onAction:n,onSelect:s});return t?M(be,{variant:t,children:m}):m}var Np={accordion:Un,"action-group":Oo,"area-chart":Qo,"bar-chart":Jo,callout:Bn,"candlestick-chart":dn,"channel-message":Ir,"code-block":Zn,"comparison-list":un,"composed-chart":en,"create-event":Nr,"data-table":zt,diagram:$n,"donut-chart":an,"enable-notification":Rr,"event-session":Vr,"flight-tracker":Mr,followup:jo,form:Za,"funnel-chart":pn,"gauge-chart":cn,heatmap:ln,image:zn,"kpi-grid":xn,"line-chart":Xo,list:En,"list-block":Gn,map:cr,"meter-list":wn,"metric-grid":vn,"pie-chart":tn,"player-card":Tr,playlist:_r,"product-card":br,"purchase-complete":Sr,"purchase-items":kr,"radar-chart":on,"radial-chart":nn,"record-card":xr,"ride-status":Dr,"sankey-chart":rn,"scatter-chart":sn,steps:Hn,"sunburst-chart":mn,"switch-group":$a,"tag-list":Wn,text:Dn,"toggle-group":Oa,"view-event":Pr,"weather-current":zr,"weather-forecast":Wr};function ja({className:t,exportFormats:e,node:o,onAction:r,onSelect:n}){let s={exportFormats:e,onAction:r,onSelect:n},d=m=>m.map(l=>M(ja,{...s,node:l},l.id));switch(o.kind){case"item-card":return M(On,{className:t,component:o,left:o.left?d(o.left):void 0,middle:d(o.middle),right:o.right?d(o.right):void 0,onAction:r,onSelect:n});case"item-card-group":return M(jn,{className:t,component:o,children:d(o.children)});case"product-signals":return M(Fr,{className:t,component:o,renderPanel:m=>M(be,{variant:"plain",children:M(ja,{...s,node:m})})});case"tabs":return M(Kn,{className:t,component:o,renderPanel:m=>M(be,{variant:"plain",children:d(m)}),onSelect:n});case"dashboard":return M(Cn,{className:t,component:o,children:M(be,{variant:"plain",children:d(o.children)})});case"card":return M(Ma,{className:t,component:o,children:M(be,{variant:"plain",children:d(o.children)})});case"row":return M(Ra,{className:t,component:o,children:d(o.children)});case"col":return M(La,{className:t,component:o,children:d(o.children)});case"grid":return M(Fa,{className:t,component:o,children:d(o.children)});case"spacer":return M(Da,{className:t,component:o});case"divider":return M(Ba,{className:t,component:o});case"heading":return M(Zr,{className:t,component:o});case"button":return M($r,{className:t,component:o,onAction:r,onSelect:n});case"badge":return M(Kr,{className:t,component:o});case"icon":return M(Or,{className:t,component:o});case"rating":return M(jr,{className:t,component:o});case"progress":return M(qr,{className:t,component:o});default:{let m=Np[o.kind];return M(m,{...s,className:t,component:o})}}}export{Sp as ComponentRenderer,Sa as ComponentSkeleton};
@@ -0,0 +1 @@
1
+ import{a as c,b as d,c as e,d as f,e as g}from"./chunk-RNNGE7KM.js";import{a,b}from"./chunk-PZJ4NC3J.js";export{c as agentComposerDraftStorageKey,f as clearAgentComposerDraft,g as clearAgentComposerDraftsForProject,d as readAgentComposerImageDraft,a as readAgentComposerPromptDraft,e as saveAgentComposerImageDraft,b as saveAgentComposerPromptDraft};
@@ -0,0 +1 @@
1
+ import"./chunk-PZJ4NC3J.js";var m="heroui-agent-embed",g=1,s="composer-image-drafts",a=new Map;async function S(e,t=Date.now()){await a.get(e);let r=await P(e);if(!r)return[];let n=t-r.savedAt<=6048e5,i=r.files;return!n||i.length===0?(await f(e,()=>u(e)),[]):i}function B(e,t,r=Date.now()){let n=t.filter(c);return f(e,async()=>{if(n.length===0){await u(e);return}let i=await Promise.all(n.map(p));await I({files:i,key:e,savedAt:r})})}function v(e){return f(e,()=>u(e))}async function M(e){let t=[...a.entries()].filter(([r])=>r.startsWith(e)).map(([,r])=>r);await Promise.all(t),await A(e)}function c(e){return typeof File<"u"&&e instanceof File&&typeof e.type=="string"&&e.type.startsWith("image/")}async function p(e){return{bytes:await e.arrayBuffer(),lastModified:e.lastModified,name:e.name,type:e.type}}function y(e){if(c(e))return e;if(typeof File>"u"||!e||typeof e!="object")return null;let t=e;return!D(t.bytes)||typeof t.lastModified!="number"||typeof t.name!="string"||typeof t.type!="string"||!t.type.startsWith("image/")?null:new File([t.bytes],t.name,{lastModified:t.lastModified,type:t.type})}function D(e){return Object.prototype.toString.call(e)==="[object ArrayBuffer]"}function f(e,t){let n=(a.get(e)??Promise.resolve()).catch(()=>{}).then(t).catch(()=>{});return a.set(e,n),n.finally(()=>{a.get(e)===n&&a.delete(e)}),n}function w(){return typeof indexedDB>"u"?Promise.resolve(null):new Promise(e=>{let t=indexedDB.open(m,g);t.onerror=()=>e(null),t.onupgradeneeded=()=>{let r=t.result;r.objectStoreNames.contains(s)||r.createObjectStore(s,{keyPath:"key"})},t.onsuccess=()=>e(t.result)})}async function l(e,t){let r;try{r=await w()}catch{return null}if(!r)return null;try{let n=r.transaction(s,e),i=F(n),[o]=await Promise.all([t(n.objectStore(s)),i]);return o}catch{return null}finally{r.close()}}async function P(e){let t=await l("readonly",n=>d(n.get(e)));if(typeof t!="object"||t===null)return null;let r=t;return r.key!==e||typeof r.savedAt!="number"||!Array.isArray(r.files)?null:{files:r.files.map(y).filter(n=>n!==null),key:e,savedAt:r.savedAt}}async function I(e){await l("readwrite",async t=>{await d(t.put(e))})}async function u(e){await l("readwrite",async t=>{await d(t.delete(e))})}async function A(e){await l("readwrite",t=>new Promise((r,n)=>{let i=t.openCursor();i.onerror=()=>n(i.error??new Error("Unable to clear image drafts")),i.onsuccess=()=>{let o=i.result;if(!o){r();return}typeof o.key=="string"&&o.key.startsWith(e)&&o.delete(),o.continue()}}))}function d(e){return new Promise((t,r)=>{e.onerror=()=>r(e.error??new Error("IndexedDB request failed")),e.onsuccess=()=>t(e.result)})}function F(e){return new Promise((t,r)=>{e.onabort=()=>r(e.error??new Error("IndexedDB aborted")),e.onerror=()=>r(e.error??new Error("IndexedDB failed")),e.oncomplete=()=>t()})}export{v as clearAgentComposerImageDraft,M as clearAgentComposerImageDraftsForProject,S as readAgentComposerImageDraft,B as saveAgentComposerImageDraft};
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { T as TrustedAgentClientData, S as SignedTrustedAgentClientData } from './identity-Z6i6pL0F.js';
3
- export { A as AGENT_CONVERSATION_SOURCE, a as AgentAuthIdentity, b as AgentAuthProfile, c as AgentAuthToken, d as AgentConversationSource, e as AgentProjectConfig, f as AgentSurfaceVariant, g as AgentTheme, h as AgentTokenClaims, C as CreateAgentAuthTokenRequest, i as agentAuthIdentitySchema, j as agentAuthProfileSchema, k as agentAuthTokenSchema, l as agentIdentityIdSchema, m as agentProjectConfigSchema, n as agentSurfaceVariantSchema, o as agentThemeSchema, p as agentTokenClaimsSchema, q as createAgentAuthTokenRequestSchema, r as pageContextSchema, s as signedTrustedAgentClientDataSchema, t as trustedAgentClientDataSchema } from './identity-Z6i6pL0F.js';
2
+ export { A as AGENT_CONVERSATION_SOURCE, a as AgentAuthIdentity, b as AgentAuthProfile, c as AgentAuthToken, d as AgentConversationSource, e as AgentProjectConfig, f as AgentSurfaceVariant, g as AgentTheme, h as AgentTokenClaims, C as CreateAgentAuthTokenRequest, i as agentAuthIdentitySchema, j as agentAuthProfileSchema, k as agentAuthTokenSchema, l as agentIdentityIdSchema, m as agentProjectConfigSchema, n as agentSurfaceVariantSchema, o as agentThemeSchema, p as agentTokenClaimsSchema, q as createAgentAuthTokenRequestSchema } from './identity-3P8-17km.js';
4
3
  import { UIMessage } from 'ai';
5
4
 
6
5
  /** Maximum number of files accepted on one HeroUI Agent message. */
@@ -1153,12 +1152,8 @@ declare const AGENT_UI_KIND_NAMES: readonly AgentUIRenderableKind[];
1153
1152
  */
1154
1153
  declare function renderAgentUICatalogPrompt(): string;
1155
1154
 
1156
- /**
1157
- * Names owned by the hosted runtime; client tools may not shadow them.
1158
- * `loadUIRenderers` is a retired runtime tool, still reserved so a client tool
1159
- * cannot take over a name that appears in stored conversations.
1160
- */
1161
- declare const RESERVED_AGENT_TOOL_NAMES: readonly ["composeUI", "executeSandbox", "getComponentSchema", "loadUIRenderers", "renderComponent", "searchKnowledge", "searchWeb"];
1155
+ /** Names owned by the hosted runtime; client tools may not shadow them. */
1156
+ declare const RESERVED_AGENT_TOOL_NAMES: readonly ["callMcpTool", "composeUI", "executeSandbox", "getComponentSchema", "renderComponent", "searchKnowledge", "searchMcpTools", "searchWeb"];
1162
1157
  /**
1163
1158
  * Namespace the runtime uses for tools borrowed from a project's MCP servers
1164
1159
  * (`mcp_<serverSlug>_<toolName>`). Reserved wholesale so a client tool can
@@ -1185,6 +1180,45 @@ declare const clientToolsSchema: z.ZodArray<z.ZodObject<{
1185
1180
  }, z.core.$strip>>;
1186
1181
  type ClientToolManifestEntry = z.infer<typeof clientToolManifestEntrySchema>;
1187
1182
 
1183
+ declare const HEROUI_AGENT_PROTOCOL_VERSION: 6;
1184
+ declare const HEROUI_AGENT_SDK_VERSION: "0.2.0-beta.9";
1185
+
1186
+ /** Browser event emitted when protocol-v6 runtime latency checkpoints arrive. */
1187
+ declare const HEROUI_AGENT_RUNTIME_TIMING_EVENT: "heroui-agent:runtime-timing";
1188
+ declare const HEROUI_AGENT_TURN_ADMITTED_FRAME_TYPE: "heroui_agent_turn_admitted";
1189
+ declare const HEROUI_AGENT_TURN_ADMISSION_STATUS_METHOD: "getTurnAdmissionStatuses";
1190
+ declare const HEROUI_AGENT_TURN_ADMISSION_STATUS_MAX_IDS = 50;
1191
+ type AgentTurnAdmittedFrame = {
1192
+ protocolVersion: typeof HEROUI_AGENT_PROTOCOL_VERSION;
1193
+ turnId: string;
1194
+ type: typeof HEROUI_AGENT_TURN_ADMITTED_FRAME_TYPE;
1195
+ };
1196
+ type AgentTurnAdmissionStatusRequest = {
1197
+ protocolVersion: typeof HEROUI_AGENT_PROTOCOL_VERSION;
1198
+ turnIds: string[];
1199
+ };
1200
+ type AgentTurnAdmissionStatus = {
1201
+ status: "admitted" | "unknown";
1202
+ turnId: string;
1203
+ };
1204
+ type AgentTurnAdmissionStatusResponse = {
1205
+ protocolVersion: typeof HEROUI_AGENT_PROTOCOL_VERSION;
1206
+ turns: AgentTurnAdmissionStatus[];
1207
+ };
1208
+ type AgentActivityPhase = "accepted" | "preparing" | "generating" | "waiting-client-tool" | "running-server-tool" | "recovering";
1209
+ type AgentRuntimeTiming = {
1210
+ completedAt?: number;
1211
+ firstSemanticTextAt?: number;
1212
+ providerFirstEventAt?: number;
1213
+ providerRequestedAt?: number;
1214
+ runtimeAdmittedAt?: number;
1215
+ turnId?: string;
1216
+ };
1217
+ type AgentRuntimeTimingEventDetail = AgentRuntimeTiming & {
1218
+ agentId: string;
1219
+ conversationId: string;
1220
+ };
1221
+
1188
1222
  declare const agentSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
1189
1223
  excerpt: z.ZodOptional<z.ZodString>;
1190
1224
  locator: z.ZodOptional<z.ZodString>;
@@ -1224,7 +1258,10 @@ type AgentDataTypes = {
1224
1258
  sources?: Array<{
1225
1259
  label: string;
1226
1260
  }>;
1227
- stage: "preparing" | "querying" | "composing";
1261
+ /** Protocol-v6 lifecycle phase. */
1262
+ stage: AgentActivityPhase;
1263
+ /** Model-generated workstream title; unlike `label`, this does not describe one step. */
1264
+ title?: string;
1228
1265
  };
1229
1266
  component: AgentUIRenderable;
1230
1267
  /** Server-generated conversation title, streamed on the first turn so the session picker updates live. */
@@ -1233,8 +1270,10 @@ type AgentDataTypes = {
1233
1270
  };
1234
1271
  progress: {
1235
1272
  label: string;
1236
- stage: "preparing" | "querying" | "composing";
1273
+ stage: AgentActivityPhase;
1237
1274
  };
1275
+ /** Transient latency checkpoints; observed through HEROUI_AGENT_RUNTIME_TIMING_EVENT. */
1276
+ "runtime-timing": AgentRuntimeTiming;
1238
1277
  sources: z.infer<typeof agentSourcesSchema>;
1239
1278
  };
1240
1279
  type AgentMessage = UIMessage<unknown, AgentDataTypes>;
@@ -1342,12 +1381,4 @@ declare const agentModelIdSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.
1342
1381
  "anthropic/claude-opus-4.8": "anthropic/claude-opus-4.8";
1343
1382
  }>>;
1344
1383
 
1345
- declare function signTrustedAgentClientData(secret: string, data: TrustedAgentClientData): Promise<SignedTrustedAgentClientData>;
1346
- declare function verifyTrustedAgentClientData(secret: string, value: unknown): Promise<TrustedAgentClientData | null>;
1347
-
1348
- declare const HEROUI_AGENT_PROTOCOL_VERSION: 5;
1349
- declare const HEROUI_AGENT_SDK_VERSION: "0.2.0-beta.7";
1350
- declare const HEROUI_AGENT_TASK_ID: "heroui-agents-runtime";
1351
- declare const TRUSTED_AGENT_CLIENT_DATA_KEY: "__heroUiAgentApi";
1352
-
1353
- export { AGENT_MODEL_IDS, AGENT_MODEL_OPTIONS, AGENT_UI_CATALOG, AGENT_UI_CONTAINER_KINDS, AGENT_UI_KIND_NAMES, AGENT_UI_KIND_SCHEMAS, AGENT_UI_LAYOUT_LEAF_KINDS, AGENT_UI_PRIMITIVE_KINDS, type AccordionComponent, type ActionGroupComponent, type ActionToolCall, type ActionVariant, type AgentDataTypes, type AgentIconName, type AgentMessage, type AgentModelId, type AgentModelOption, type AgentModelTier, type AgentRemoteConfig, type AgentRemoteThemeColor, type AgentSource, type AgentUIAmount, type AgentUICatalogEntry, type AgentUICatalogGroup, type AgentUIComponent, type AgentUIContainerComponent, type AgentUIImage, type AgentUILayoutLeafComponent, type AgentUILeafComponent, type AgentUINode, type AgentUIPrimitiveComponent, type AgentUIRenderable, type AgentUIRenderableKind, type AnalyticalLeafComponent, type AreaChartComponent, type BadgeComponent, type BarChartComponent, type ButtonComponent, COMPOSED_UI_MAX_DEPTH, COMPOSED_UI_MAX_NODES, type CalloutComponent, type CandlestickChartComponent, type CardComponent, type CardComponentVariant, type CartesianComponent, type CartesianRange, type CartesianSeries, type ChannelMessageComponent, type ChartColor, type ClientToolManifestEntry, type CodeBlockComponent, type ColComponent, type ComparisonListComponent, type ComponentActionSpec, type ComponentBase, type ComposedChartComponent, type ComposedChartSeries, type CreateEventComponent, DEFAULT_AGENT_PICKER_MODEL_ID, type DashboardComponent, type DataTableComponent, type Datum, type DiagramComponent, type DividerComponent, type DonutChartComponent, type EnableNotificationComponent, type EventSessionComponent, type FlightTrackerComponent, type FollowupComponent, type FormComponent, type FormDateRange, type FormField, type FunnelChartComponent, type GaugeChartComponent, type GridComponent, HEROUI_AGENT_ATTACHMENT_ACCEPT, HEROUI_AGENT_ATTACHMENT_CONTENT_TYPES, HEROUI_AGENT_ATTACHMENT_EXTENSION_BY_CONTENT_TYPE, HEROUI_AGENT_ATTACHMENT_MAX_BYTES, HEROUI_AGENT_MAX_ATTACHMENTS, HEROUI_AGENT_PROTOCOL_VERSION, HEROUI_AGENT_REMOTE_CONFIG_VERSION, HEROUI_AGENT_SDK_VERSION, HEROUI_AGENT_TASK_ID, HEROUI_AGENT_TEXT_ATTACHMENT_CONTENT_TYPES, type HeadingComponent, type HeatmapComponent, type HeroUIAgentAttachmentContentType, type IconComponent, type ImageComponent, type ItemCardComponent, type ItemCardGroupComponent, type ItemCardVariant, type KpiGridComponent, LEGACY_AGENT_MODEL_IDS, type LayoutAlign, type LayoutGap, type LayoutJustify, type LineChartComponent, type ListBlockComponent, type ListComponent, MAX_CLIENT_TOOLS, MAX_CLIENT_TOOLS_BYTES, type MapComponent, type MapCoordinate, type MapLocation, type MapLocationAction, type MeterListComponent, type MeterTone, type MetricGridComponent, type NumberFormat, type PieChartComponent, type PlayerCardComponent, type PlaylistComponent, type ProductCardComponent, type ProductCardItem, type ProductCardPrice, type ProductCardRating, type ProductSignalsComponent, type ProgressComponent, type PurchaseCompleteComponent, type PurchaseItemsComponent, RESERVED_AGENT_TOOL_NAMES, RESERVED_AGENT_TOOL_PREFIX, type RadarChartComponent, type RadialChartComponent, type RatingComponent, type RecordCardComponent, type RecordCardLayout, type RecordCardTone, type RideStatusComponent, type RowComponent, type SankeyChartComponent, type ScatterChartComponent, SignedTrustedAgentClientData, type SpacerComponent, type StepStatus, type StepsComponent, type SunburstChartComponent, type SunburstNode, type SwitchGroupComponent, TRUSTED_AGENT_CLIENT_DATA_KEY, type TabsComponent, type TagListComponent, type TextComponent, type ToggleGroupComponent, TrustedAgentClientData, type ViewEventComponent, type WeatherCondition, type WeatherCurrentComponent, type WeatherForecastComponent, type WeatherUnit, accordionComponentSchema, actionGroupComponentSchema, agentIconNames, agentIconSchema, agentModelIdSchema, agentSourceSchema, agentSourcesSchema, agentUIComponentSchema, agentUILeafComponentSchema, agentUINodeSchema, agentUIRenderableSchema, analyticalLeafComponentSchema, areaChartComponentSchema, badgeComponentSchema, barChartComponentSchema, buttonComponentSchema, calloutComponentSchema, candlestickChartComponentSchema, cardComponentSchema, cardComponentVariantSchema, channelMessageComponentSchema, chartColorSchema, clientToolManifestEntrySchema, clientToolsSchema, codeBlockComponentSchema, colComponentSchema, comparisonListComponentSchema, composeUIInputSchema, composedChartComponentSchema, composedUIComponentSchema, createEventComponentSchema, dashboardComponentSchema, dataTableComponentSchema, diagramComponentSchema, dividerComponentSchema, donutChartComponentSchema, enableNotificationComponentSchema, eventSessionComponentSchema, flightTrackerComponentSchema, followupComponentSchema, formComponentSchema, funnelChartComponentSchema, gaugeChartComponentSchema, getAgentModelTier, getAgentUIContainerChildren, gridComponentSchema, headingComponentSchema, heatmapComponentSchema, iconComponentSchema, imageComponentSchema, isAgentModelId, isAgentUIContainerComponent, isAgentUILayoutLeafComponent, isAgentUIPrimitiveComponent, isHeroUIAgentAttachmentContentType, itemCardComponentSchema, itemCardGroupComponentSchema, kpiGridComponentSchema, lineChartComponentSchema, listBlockComponentSchema, listComponentSchema, mapComponentSchema, meterListComponentSchema, metricGridComponentSchema, numberFormatSchema, parseAgentRemoteConfig, pieChartComponentSchema, playerCardComponentSchema, playlistComponentSchema, productCardComponentSchema, productSignalsComponentSchema, progressComponentSchema, purchaseCompleteComponentSchema, purchaseItemsComponentSchema, radarChartComponentSchema, radialChartComponentSchema, ratingComponentSchema, recordCardComponentSchema, recordCardLayoutSchema, renderAgentUICatalogPrompt, renderComponentInputSchema, resolveAgentModelId, rideStatusComponentSchema, rowComponentSchema, sankeyChartComponentSchema, scatterChartComponentSchema, signTrustedAgentClientData, spacerComponentSchema, stepsComponentSchema, sunburstChartComponentSchema, switchGroupComponentSchema, tabsComponentSchema, tagListComponentSchema, textComponentSchema, toggleGroupComponentSchema, verifyTrustedAgentClientData, viewEventComponentSchema, weatherConditionSchema, weatherConditions, weatherCurrentComponentSchema, weatherForecastComponentSchema };
1384
+ export { AGENT_MODEL_IDS, AGENT_MODEL_OPTIONS, AGENT_UI_CATALOG, AGENT_UI_CONTAINER_KINDS, AGENT_UI_KIND_NAMES, AGENT_UI_KIND_SCHEMAS, AGENT_UI_LAYOUT_LEAF_KINDS, AGENT_UI_PRIMITIVE_KINDS, type AccordionComponent, type ActionGroupComponent, type ActionToolCall, type ActionVariant, type AgentActivityPhase, type AgentDataTypes, type AgentIconName, type AgentMessage, type AgentModelId, type AgentModelOption, type AgentModelTier, type AgentRemoteConfig, type AgentRemoteThemeColor, type AgentRuntimeTiming, type AgentRuntimeTimingEventDetail, type AgentSource, type AgentTurnAdmissionStatus, type AgentTurnAdmissionStatusRequest, type AgentTurnAdmissionStatusResponse, type AgentTurnAdmittedFrame, type AgentUIAmount, type AgentUICatalogEntry, type AgentUICatalogGroup, type AgentUIComponent, type AgentUIContainerComponent, type AgentUIImage, type AgentUILayoutLeafComponent, type AgentUILeafComponent, type AgentUINode, type AgentUIPrimitiveComponent, type AgentUIRenderable, type AgentUIRenderableKind, type AnalyticalLeafComponent, type AreaChartComponent, type BadgeComponent, type BarChartComponent, type ButtonComponent, COMPOSED_UI_MAX_DEPTH, COMPOSED_UI_MAX_NODES, type CalloutComponent, type CandlestickChartComponent, type CardComponent, type CardComponentVariant, type CartesianComponent, type CartesianRange, type CartesianSeries, type ChannelMessageComponent, type ChartColor, type ClientToolManifestEntry, type CodeBlockComponent, type ColComponent, type ComparisonListComponent, type ComponentActionSpec, type ComponentBase, type ComposedChartComponent, type ComposedChartSeries, type CreateEventComponent, DEFAULT_AGENT_PICKER_MODEL_ID, type DashboardComponent, type DataTableComponent, type Datum, type DiagramComponent, type DividerComponent, type DonutChartComponent, type EnableNotificationComponent, type EventSessionComponent, type FlightTrackerComponent, type FollowupComponent, type FormComponent, type FormDateRange, type FormField, type FunnelChartComponent, type GaugeChartComponent, type GridComponent, HEROUI_AGENT_ATTACHMENT_ACCEPT, HEROUI_AGENT_ATTACHMENT_CONTENT_TYPES, HEROUI_AGENT_ATTACHMENT_EXTENSION_BY_CONTENT_TYPE, HEROUI_AGENT_ATTACHMENT_MAX_BYTES, HEROUI_AGENT_MAX_ATTACHMENTS, HEROUI_AGENT_PROTOCOL_VERSION, HEROUI_AGENT_REMOTE_CONFIG_VERSION, HEROUI_AGENT_RUNTIME_TIMING_EVENT, HEROUI_AGENT_SDK_VERSION, HEROUI_AGENT_TEXT_ATTACHMENT_CONTENT_TYPES, HEROUI_AGENT_TURN_ADMISSION_STATUS_MAX_IDS, HEROUI_AGENT_TURN_ADMISSION_STATUS_METHOD, HEROUI_AGENT_TURN_ADMITTED_FRAME_TYPE, type HeadingComponent, type HeatmapComponent, type HeroUIAgentAttachmentContentType, type IconComponent, type ImageComponent, type ItemCardComponent, type ItemCardGroupComponent, type ItemCardVariant, type KpiGridComponent, LEGACY_AGENT_MODEL_IDS, type LayoutAlign, type LayoutGap, type LayoutJustify, type LineChartComponent, type ListBlockComponent, type ListComponent, MAX_CLIENT_TOOLS, MAX_CLIENT_TOOLS_BYTES, type MapComponent, type MapCoordinate, type MapLocation, type MapLocationAction, type MeterListComponent, type MeterTone, type MetricGridComponent, type NumberFormat, type PieChartComponent, type PlayerCardComponent, type PlaylistComponent, type ProductCardComponent, type ProductCardItem, type ProductCardPrice, type ProductCardRating, type ProductSignalsComponent, type ProgressComponent, type PurchaseCompleteComponent, type PurchaseItemsComponent, RESERVED_AGENT_TOOL_NAMES, RESERVED_AGENT_TOOL_PREFIX, type RadarChartComponent, type RadialChartComponent, type RatingComponent, type RecordCardComponent, type RecordCardLayout, type RecordCardTone, type RideStatusComponent, type RowComponent, type SankeyChartComponent, type ScatterChartComponent, type SpacerComponent, type StepStatus, type StepsComponent, type SunburstChartComponent, type SunburstNode, type SwitchGroupComponent, type TabsComponent, type TagListComponent, type TextComponent, type ToggleGroupComponent, type ViewEventComponent, type WeatherCondition, type WeatherCurrentComponent, type WeatherForecastComponent, type WeatherUnit, accordionComponentSchema, actionGroupComponentSchema, agentIconNames, agentIconSchema, agentModelIdSchema, agentSourceSchema, agentSourcesSchema, agentUIComponentSchema, agentUILeafComponentSchema, agentUINodeSchema, agentUIRenderableSchema, analyticalLeafComponentSchema, areaChartComponentSchema, badgeComponentSchema, barChartComponentSchema, buttonComponentSchema, calloutComponentSchema, candlestickChartComponentSchema, cardComponentSchema, cardComponentVariantSchema, channelMessageComponentSchema, chartColorSchema, clientToolManifestEntrySchema, clientToolsSchema, codeBlockComponentSchema, colComponentSchema, comparisonListComponentSchema, composeUIInputSchema, composedChartComponentSchema, composedUIComponentSchema, createEventComponentSchema, dashboardComponentSchema, dataTableComponentSchema, diagramComponentSchema, dividerComponentSchema, donutChartComponentSchema, enableNotificationComponentSchema, eventSessionComponentSchema, flightTrackerComponentSchema, followupComponentSchema, formComponentSchema, funnelChartComponentSchema, gaugeChartComponentSchema, getAgentModelTier, getAgentUIContainerChildren, gridComponentSchema, headingComponentSchema, heatmapComponentSchema, iconComponentSchema, imageComponentSchema, isAgentModelId, isAgentUIContainerComponent, isAgentUILayoutLeafComponent, isAgentUIPrimitiveComponent, isHeroUIAgentAttachmentContentType, itemCardComponentSchema, itemCardGroupComponentSchema, kpiGridComponentSchema, lineChartComponentSchema, listBlockComponentSchema, listComponentSchema, mapComponentSchema, meterListComponentSchema, metricGridComponentSchema, numberFormatSchema, parseAgentRemoteConfig, pieChartComponentSchema, playerCardComponentSchema, playlistComponentSchema, productCardComponentSchema, productSignalsComponentSchema, progressComponentSchema, purchaseCompleteComponentSchema, purchaseItemsComponentSchema, radarChartComponentSchema, radialChartComponentSchema, ratingComponentSchema, recordCardComponentSchema, recordCardLayoutSchema, renderAgentUICatalogPrompt, renderComponentInputSchema, resolveAgentModelId, rideStatusComponentSchema, rowComponentSchema, sankeyChartComponentSchema, scatterChartComponentSchema, spacerComponentSchema, stepsComponentSchema, sunburstChartComponentSchema, switchGroupComponentSchema, tabsComponentSchema, tagListComponentSchema, textComponentSchema, toggleGroupComponentSchema, viewEventComponentSchema, weatherConditionSchema, weatherConditions, weatherCurrentComponentSchema, weatherForecastComponentSchema };