@zenera/chat-widget 0.1.4 → 0.1.6
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.
- package/README.md +53 -8
- package/dist/catalog-BYJPdVB0.js +358 -0
- package/dist/index-Dw5Lv6cs.js +3151 -0
- package/dist/index.js +22 -14
- package/dist/shadow-CEK6vAGQ.js +4 -0
- package/dist/styles.css +1 -1
- package/dist/types/packages/chat-widget/src/index.d.ts +4 -2
- package/dist/types/packages/chat-widget/src/interceptors.d.ts +50 -0
- package/dist/types/packages/chat-widget/src/reducer.d.ts +14 -0
- package/dist/types/packages/chat-widget/src/transport.d.ts +37 -4
- package/dist/types/packages/chat-widget/src/ui/ChatThreadView.d.ts +22 -2
- package/dist/types/packages/chat-widget/src/ui/ZeneraChat.d.ts +8 -2
- package/dist/types/packages/chat-widget/src/ui/internal/composerDraft.d.ts +1 -1
- package/dist/types/packages/chat-widget/src/useAttachments.d.ts +32 -0
- package/dist/types/packages/chat-widget/src/useChatThread.d.ts +3 -2
- package/dist/types/packages/chat-widget/src/widget.d.ts +8 -2
- package/dist/types/shared/components/A2uiSurface.d.ts +3 -0
- package/dist/types/shared/components/a2ui/Chart.d.ts +2 -0
- package/dist/types/shared/components/a2ui/ChartView.d.ts +3 -0
- package/dist/types/shared/components/a2ui/DataTable.d.ts +2 -0
- package/dist/types/shared/components/a2ui/Notice.d.ts +6 -0
- package/dist/types/shared/components/a2ui/catalog.d.ts +2 -0
- package/dist/types/shared/components/a2ui/catalogApi.d.ts +16 -0
- package/dist/types/shared/components/a2ui/chartData.d.ts +8 -0
- package/dist/types/shared/components/a2ui/tableData.d.ts +21 -0
- package/dist/types/shared/components/a2ui/useChartPayload.d.ts +9 -0
- package/dist/types/shared/lib/a2ui.d.ts +22 -0
- package/dist/types/shared/lib/a2uiData.d.ts +2 -0
- package/dist/types/shared/lib/a2uiFeed.d.ts +40 -0
- package/dist/types/shared/lib/promptHistory.d.ts +1 -1
- package/dist/ui.js +15 -2822
- package/dist/useThreadList-BbWSgDw_.js +899 -0
- package/dist/widget/chat-widget.iife.js +6179 -88
- package/package.json +7 -9
- package/dist/shadow-BRAwePHz.js +0 -4
- package/dist/useThreadList-Pg29akQ4.js +0 -576
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenera/chat-widget",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "React chat for Zenera projects: AG-UI messages, tool calls and markdown, as components and hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"zenera",
|
|
@@ -49,34 +49,32 @@
|
|
|
49
49
|
"prepack": "npm run build"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"mermaid": "^12.2.0",
|
|
53
52
|
"react": "^19.0.0",
|
|
54
53
|
"react-dom": "^19.0.0"
|
|
55
54
|
},
|
|
56
|
-
"peerDependenciesMeta": {
|
|
57
|
-
"mermaid": {
|
|
58
|
-
"optional": true
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
55
|
"dependencies": {
|
|
56
|
+
"@a2ui/react": "^0.15.0",
|
|
57
|
+
"@a2ui/web_core": "^0.15.0",
|
|
62
58
|
"@ag-ui/core": "^1.0.3",
|
|
63
59
|
"@radix-ui/react-slot": "^1.5.0",
|
|
64
60
|
"@radix-ui/react-tooltip": "^1.4.1",
|
|
65
61
|
"class-variance-authority": "^0.7.1",
|
|
66
62
|
"clsx": "^2.1.1",
|
|
63
|
+
"echarts": "^6.1.0",
|
|
67
64
|
"highlight.js": "^11.12.0",
|
|
68
65
|
"lucide-react": "^1.61.0",
|
|
66
|
+
"mermaid": "^12.2.0",
|
|
69
67
|
"react-markdown": "^10.1.0",
|
|
70
68
|
"rehype-sanitize": "^6.0.0",
|
|
71
69
|
"remark-gfm": "^4.0.1",
|
|
72
|
-
"tailwind-merge": "^3.7.0"
|
|
70
|
+
"tailwind-merge": "^3.7.0",
|
|
71
|
+
"zod": "^4.6.7"
|
|
73
72
|
},
|
|
74
73
|
"devDependencies": {
|
|
75
74
|
"@tailwindcss/cli": "^4.3.3",
|
|
76
75
|
"@tailwindcss/vite": "^4.3.3",
|
|
77
76
|
"@types/react": "^19.0.8",
|
|
78
77
|
"@types/react-dom": "^19.0.3",
|
|
79
|
-
"mermaid": "^12.2.0",
|
|
80
78
|
"react": "^19.0.0",
|
|
81
79
|
"react-dom": "^19.0.0",
|
|
82
80
|
"tailwindcss": "^4.3.3",
|
package/dist/shadow-BRAwePHz.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const e = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-semibold:600;--leading-relaxed:1.625;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\\[container-type\\:size\\]{container-type:size}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-y-0{inset-block:0}.-top-1{top:calc(var(--spacing) * -1)}.top-1\\.5{top:calc(var(--spacing) * 1.5)}.-right-1{right:calc(var(--spacing) * -1)}.right-0{right:0}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-full{right:100%}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.-left-1{left:calc(var(--spacing) * -1)}.left-0{left:0}.isolate{isolation:isolate}.z-10{z-index:10}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1\\.5{margin-inline:calc(var(--spacing) * -1.5)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-1{margin-right:var(--spacing)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.ml-1\\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-\\[7px\\]{margin-left:7px}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.table{display:table}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.h-4{height:calc(var(--spacing) * 4)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-full{height:100%}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-0{min-height:0}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-\\[var\\(--chat-turn-min\\,calc\\(100cqh-var\\(--chat-turn-gap\\,2rem\\)\\)\\)\\]{min-height:var(--chat-turn-min,calc(100cqh - var(--chat-turn-gap,2rem)))}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\\[40\\%\\]{max-width:40%}.max-w-\\[80\\%\\]{max-width:80%}.max-w-full{max-width:100%}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.rotate-180{rotate:180deg}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.list-none{list-style-type:none}.grid-cols-\\[minmax\\(0\\,6rem\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,6rem) minmax(0,1fr)}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-1{row-gap:var(--spacing)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-bl-lg{border-bottom-left-radius:var(--radius)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-border{border-color:var(--border)}.border-danger\\/40{border-color:var(--danger)}@supports (color:color-mix(in lab,red,red)){.border-danger\\/40{border-color:color-mix(in oklab,var(--danger) 40%,transparent)}}.border-input{border-color:var(--input)}.border-primary\\/40{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\\/40{border-color:color-mix(in oklab,var(--primary) 40%,transparent)}}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-danger\\/15{background-color:var(--danger)}@supports (color:color-mix(in lab,red,red)){.bg-danger\\/15{background-color:color-mix(in oklab,var(--danger) 15%,transparent)}}.bg-destructive{background-color:var(--destructive)}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\\/5{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--primary) 5%,transparent)}}.bg-secondary,.bg-secondary\\/40{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.bg-secondary\\/40{background-color:color-mix(in oklab,var(--secondary) 40%,transparent)}}.bg-surface-code\\/80{background-color:var(--surface-code)}@supports (color:color-mix(in lab,red,red)){.bg-surface-code\\/80{background-color:color-mix(in oklab,var(--surface-code) 80%,transparent)}}.bg-surface-input{background-color:var(--surface-input)}.bg-transparent{background-color:#0000}.\\[mask-image\\:linear-gradient\\(to_bottom\\,black_70\\%\\,transparent\\)\\]{-webkit-mask-image:linear-gradient(#000 70%,#0000);mask-image:linear-gradient(#000 70%,#0000)}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\\[overflow-wrap\\:anywhere\\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-danger{color:var(--danger)}.text-foreground{color:var(--foreground)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-warning{color:var(--warning)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.accent-foreground{accent-color:var(--foreground)}.opacity-0{opacity:0}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-open\\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}.group-open\\:opacity-100:is(:where(.group):is([open],:popover-open,:open) *){opacity:1}.group-focus-within\\:flex:is(:where(.group):focus-within *){display:flex}@media(hover:hover){.group-hover\\:flex:is(:where(.group):hover *){display:flex}.group-hover\\:w-0\\.5:is(:where(.group):hover *){width:calc(var(--spacing) * .5)}.group-hover\\:bg-primary\\/60:is(:where(.group):hover *){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-primary\\/60:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--primary) 60%,transparent)}}.group-hover\\/code\\:opacity-100:is(:where(.group\\/code):hover *),.group-hover\\/msg\\:opacity-100:is(:where(.group\\/msg):hover *),.group-hover\\/row\\:opacity-100:is(:where(.group\\/row):hover *){opacity:1}}.group-focus-visible\\/row\\:opacity-100:is(:where(.group\\/row):focus-visible *){opacity:1}.placeholder\\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media(hover:hover){.hover\\:bg-accent:hover{background-color:var(--accent)}.hover\\:bg-destructive\\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\\:bg-primary\\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\\:bg-secondary\\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-secondary\\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\\:text-danger:hover{color:var(--danger)}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:underline:hover{text-decoration-line:underline}}.focus-visible\\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\\:bg-accent:focus-visible{background-color:var(--accent)}.focus-visible\\:text-foreground:focus-visible{color:var(--foreground)}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}}.\\[\\&_svg\\]\\:size-3\\.5 svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\\[\\&_svg\\]\\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&\\:\\:-webkit-details-marker\\]\\:hidden::-webkit-details-marker{display:none}@media(hover:none){.\\[\\@media\\(hover\\:none\\)\\]\\:flex{display:flex}.\\[\\@media\\(hover\\:none\\)\\]\\:opacity-100{opacity:1}}}:where(:root,:host,.zenera-chat){color-scheme:light;--radius:.625rem;--background:#f8fafc;--foreground:#0f172a;--card:#fff;--card-foreground:#0f172a;--popover:#fff;--popover-foreground:#0f172a;--primary:#2563eb;--primary-foreground:#fff;--secondary:#f1f5f9;--secondary-foreground:#0f172a;--muted:#f1f5f9;--muted-foreground:#64748b;--accent:#e2e8f0;--accent-foreground:#0f172a;--destructive:#dc2626;--border:#e2e8f0;--input:#cbd5e1;--ring:#2563eb;--surface-input:#fff;--surface-code:#f1f5f9;--success:#047857;--warning:#b45309;--danger:#dc2626;--info:#0369a1;--teal:#0f766e;--edge-violet:#7c3aed;--thinking-animation-1:#38bdf8;--thinking-animation-2:#4f46e5;--hljs-keyword:#cf222e;--hljs-title:#8250df;--hljs-attr:#0550ae;--hljs-string:#0a3069;--hljs-built-in:#953800;--hljs-comment:#6e7781;--hljs-name:#116329;--hljs-addition:#116329;--hljs-addition-bg:#dafbe1;--hljs-deletion:#82071e;--hljs-deletion-bg:#ffebe9}:where(.dark,.dark .zenera-chat){color-scheme:dark;--background:#0b0f19;--foreground:#e2e8f0;--card:#111827;--card-foreground:#e2e8f0;--popover:#0f172a;--popover-foreground:#e2e8f0;--primary:#3b82f6;--primary-foreground:#fff;--secondary:#1e293b;--secondary-foreground:#e2e8f0;--muted:#1e293b;--muted-foreground:#94a3b8;--accent:#1e293b;--accent-foreground:#f8fafc;--destructive:#dc2626;--border:#1f2937;--input:#334155;--ring:#3b82f6;--surface-input:#0f172a;--surface-code:#090d16;--success:#34d399;--warning:#fbbf24;--danger:#f87171;--info:#7dd3fc;--teal:#2dd4bf;--edge-violet:#a78bfa;--thinking-animation-1:#3b82f6;--thinking-animation-2:#a78bfa;--hljs-keyword:#ff7b72;--hljs-title:#d2a8ff;--hljs-attr:#79c0ff;--hljs-string:#a5d6ff;--hljs-built-in:#ffa657;--hljs-comment:#8b949e;--hljs-name:#7ee787;--hljs-addition:#aff5b4;--hljs-addition-bg:#033a16;--hljs-deletion:#ffdcd7;--hljs-deletion-bg:#67060c}@keyframes empty-chat-nudge{0%{opacity:.4;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.empty-chat-nudge{animation:.35s ease-out empty-chat-nudge}.thinking-border{position:relative}.thinking-border[data-thinking=true]:after{content:"";border-radius:inherit;pointer-events:none;background:radial-gradient(circle,var(--thinking-animation-1) 0%,var(--thinking-animation-2) 100%);background-size:200% 200%;padding:2px;animation:3s ease-in-out infinite thinking-border-travel;position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;-webkit-mask-image:linear-gradient(#fff 0 0),linear-gradient(#fff 0 0);mask-image:linear-gradient(#fff 0,#fff 0),linear-gradient(#fff 0,#fff 0);-webkit-mask-position:0 0,0 0;mask-position:0 0,0 0;-webkit-mask-size:auto,auto;mask-size:auto,auto;-webkit-mask-repeat:repeat,repeat;mask-repeat:repeat,repeat;-webkit-mask-clip:content-box,border-box;mask-clip:content-box,border-box;-webkit-mask-origin:content-box,border-box;mask-origin:content-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-source-type:auto,auto;mask-mode:match-source,match-source}@keyframes thinking-border-travel{0%,to{background-position:0 0}25%{background-position:100% 0}50%{background-position:100% 100%}75%{background-position:0 100%}}@media(prefers-reduced-motion:reduce){.empty-chat-nudge,.thinking-border[data-thinking=true]:after{animation:none}}.markdown{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed);overflow-wrap:break-word}.markdown>*+*{margin-top:calc(var(--spacing) * 3)}.markdown h1{margin-top:calc(var(--spacing) * 6);font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.markdown h2{margin-top:calc(var(--spacing) * 5);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--border);padding-bottom:var(--spacing);font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.markdown h3{margin-top:calc(var(--spacing) * 4);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.markdown h4{margin-top:calc(var(--spacing) * 3);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.markdown ul{list-style-type:disc}:where(.markdown ul>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.markdown ul{padding-left:calc(var(--spacing) * 6)}.markdown ol{list-style-type:decimal}:where(.markdown ol>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.markdown ol{padding-left:calc(var(--spacing) * 6)}.markdown li>ul,.markdown li>ol{margin-top:var(--spacing)}.markdown a{color:var(--primary);text-underline-offset:2px;text-decoration-line:underline}.markdown code{font-family:var(--font-mono);color:var(--info);font-size:.85em}.markdown pre{border-radius:calc(var(--radius) - 2px);background-color:var(--surface-code);padding:calc(var(--spacing) * 3);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));overflow-x:auto}.markdown pre code{color:var(--foreground);background-color:#0000;padding:0;font-size:.8em}.markdown blockquote{border-left-style:var(--tw-border-style);border-left-width:2px;border-color:var(--border);padding-left:calc(var(--spacing) * 3);color:var(--muted-foreground)}.markdown table{border-collapse:collapse;width:100%;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.markdown th,.markdown td{border-style:var(--tw-border-style);border-width:1px;border-color:var(--border);padding-inline:calc(var(--spacing) * 2);padding-block:var(--spacing);text-align:left;vertical-align:top}.markdown th{background-color:var(--muted);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.markdown hr{border-color:var(--border)}.markdown input[type=checkbox]{margin-right:var(--spacing);vertical-align:middle}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:var(--hljs-keyword)}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:var(--hljs-title)}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:var(--hljs-attr)}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:var(--hljs-string)}.hljs-built_in,.hljs-symbol{color:var(--hljs-built-in)}.hljs-comment,.hljs-code,.hljs-formula{color:var(--hljs-comment)}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:var(--hljs-name)}.hljs-subst{color:var(--foreground)}.hljs-section{color:var(--hljs-attr);font-weight:700}.hljs-bullet{color:var(--hljs-built-in)}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-addition{color:var(--hljs-addition);background-color:var(--hljs-addition-bg)}.hljs-deletion{color:var(--hljs-deletion);background-color:var(--hljs-deletion-bg)}:host{all:initial;--text-xs:12px;--text-sm:14px;--text-base:16px;--text-lg:18px;--text-xl:20px;--text-2xl:24px;--text-3xl:30px;--text-4xl:36px;--text-5xl:48px;--text-6xl:60px;--text-7xl:72px;--text-8xl:96px;--text-9xl:128px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.5;display:block}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';
|
|
2
|
-
export {
|
|
3
|
-
e as default
|
|
4
|
-
};
|
|
@@ -1,576 +0,0 @@
|
|
|
1
|
-
var ne = Object.defineProperty;
|
|
2
|
-
var re = (e, t, s) => t in e ? ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
-
var H = (e, t, s) => re(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
-
import { EventType as v } from "@ag-ui/core";
|
|
5
|
-
import { useState as R, useRef as k, useCallback as x, useEffect as G, useMemo as W } from "react";
|
|
6
|
-
const F = { items: [], status: "loading" };
|
|
7
|
-
function P(e) {
|
|
8
|
-
return typeof e == "string" ? e : Array.isArray(e) ? e.map((t) => t && typeof t == "object" && "text" in t ? String(t.text) : "").join(`
|
|
9
|
-
`) : "";
|
|
10
|
-
}
|
|
11
|
-
function se(e) {
|
|
12
|
-
const t = [];
|
|
13
|
-
for (const s of e)
|
|
14
|
-
if (s.role === "user")
|
|
15
|
-
t.push({ kind: "user", id: s.id, text: P(s.content) });
|
|
16
|
-
else if (s.role === "assistant") {
|
|
17
|
-
s.content && t.push({ kind: "assistant", id: s.id, text: s.content, agent: s.name });
|
|
18
|
-
for (const n of s.toolCalls ?? [])
|
|
19
|
-
t.push({
|
|
20
|
-
kind: "tool",
|
|
21
|
-
id: n.id,
|
|
22
|
-
name: n.function.name,
|
|
23
|
-
args: n.function.arguments
|
|
24
|
-
});
|
|
25
|
-
} else if (s.role === "tool") {
|
|
26
|
-
const n = P(s.content), i = t.findIndex((o) => o.kind === "tool" && o.id === s.toolCallId);
|
|
27
|
-
i >= 0 && (t[i] = {
|
|
28
|
-
...t[i],
|
|
29
|
-
result: n,
|
|
30
|
-
isError: !!s.error
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return t;
|
|
34
|
-
}
|
|
35
|
-
function B(e, t) {
|
|
36
|
-
let s = { items: se(e), status: "idle" };
|
|
37
|
-
for (const n of t) s = X(s, n);
|
|
38
|
-
return { items: s.items, status: "idle", interrupts: s.interrupts };
|
|
39
|
-
}
|
|
40
|
-
function me(e, t) {
|
|
41
|
-
return B(e, t).items;
|
|
42
|
-
}
|
|
43
|
-
function ie(e) {
|
|
44
|
-
const t = e;
|
|
45
|
-
return (t == null ? void 0 : t.type) !== "interrupt" || !Array.isArray(t.interrupts) ? [] : t.interrupts.flatMap((s) => {
|
|
46
|
-
const n = s;
|
|
47
|
-
return !n || typeof n.id != "string" || typeof n.reason != "string" ? [] : [
|
|
48
|
-
{
|
|
49
|
-
id: n.id,
|
|
50
|
-
reason: n.reason,
|
|
51
|
-
...typeof n.message == "string" ? { message: n.message } : {},
|
|
52
|
-
...typeof n.toolCallId == "string" ? { toolCallId: n.toolCallId } : {},
|
|
53
|
-
...n.metadata && typeof n.metadata == "object" ? { metadata: n.metadata } : {}
|
|
54
|
-
}
|
|
55
|
-
];
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function oe(e, t) {
|
|
59
|
-
var n;
|
|
60
|
-
if (!((n = e.interrupts) != null && n.length)) return e.items;
|
|
61
|
-
const s = /* @__PURE__ */ new Map();
|
|
62
|
-
if (Array.isArray(t))
|
|
63
|
-
for (const i of t)
|
|
64
|
-
typeof (i == null ? void 0 : i.interruptId) == "string" && (i.status === "resolved" || i.status === "cancelled") && s.set(i.interruptId, i.status);
|
|
65
|
-
return e.items.map(
|
|
66
|
-
(i) => i.kind === "tool" && i.interrupt && !i.interrupt.ended ? {
|
|
67
|
-
...i,
|
|
68
|
-
interrupt: {
|
|
69
|
-
...i.interrupt,
|
|
70
|
-
ended: s.get(i.interrupt.id) ?? "superseded"
|
|
71
|
-
}
|
|
72
|
-
} : i
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
function D(e, t, s, n) {
|
|
76
|
-
const i = e.items.findIndex((l) => l.id === t && l.kind === s);
|
|
77
|
-
if (i < 0) return e;
|
|
78
|
-
const o = e.items.slice();
|
|
79
|
-
return o[i] = n(o[i]), { ...e, items: o };
|
|
80
|
-
}
|
|
81
|
-
function X(e, t) {
|
|
82
|
-
var n, i, o, l;
|
|
83
|
-
const s = "subagentRunId" in t && typeof t.subagentRunId == "string" ? t.subagentRunId : void 0;
|
|
84
|
-
switch (t.type) {
|
|
85
|
-
case v.RUN_STARTED: {
|
|
86
|
-
const r = (n = t.input) == null ? void 0 : n.messages.at(-1), u = oe(e, (i = t.input) == null ? void 0 : i.resume), a = (r == null ? void 0 : r.role) === "user" && !u.some((p) => p.id === r.id) ? [
|
|
87
|
-
...u,
|
|
88
|
-
{ kind: "user", id: r.id, text: P(r.content) }
|
|
89
|
-
] : u;
|
|
90
|
-
return {
|
|
91
|
-
...e,
|
|
92
|
-
items: a,
|
|
93
|
-
status: "running",
|
|
94
|
-
runId: t.runId,
|
|
95
|
-
error: void 0,
|
|
96
|
-
waking: void 0,
|
|
97
|
-
interrupts: void 0
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
case v.CUSTOM: {
|
|
101
|
-
if (t.name !== "zenera.project") return e;
|
|
102
|
-
const r = (o = t.value) == null ? void 0 : o.podStatus;
|
|
103
|
-
return { ...e, waking: r === "running" ? void 0 : r };
|
|
104
|
-
}
|
|
105
|
-
case v.SUBAGENT_STARTED:
|
|
106
|
-
return t.name ? { ...e, branches: { ...e.branches, [t.subagentRunId]: t.name } } : e;
|
|
107
|
-
case v.TEXT_MESSAGE_START: {
|
|
108
|
-
const r = s ? (l = e.branches) == null ? void 0 : l[s] : void 0;
|
|
109
|
-
return {
|
|
110
|
-
...e,
|
|
111
|
-
items: [
|
|
112
|
-
...e.items,
|
|
113
|
-
{
|
|
114
|
-
kind: "assistant",
|
|
115
|
-
id: t.messageId,
|
|
116
|
-
text: "",
|
|
117
|
-
agent: t.name,
|
|
118
|
-
subagent: s,
|
|
119
|
-
...r ? { branch: r } : {}
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
case v.TEXT_MESSAGE_CONTENT:
|
|
125
|
-
return D(e, t.messageId, "assistant", (r) => ({
|
|
126
|
-
...r,
|
|
127
|
-
text: r.text + t.delta
|
|
128
|
-
}));
|
|
129
|
-
case v.REASONING_MESSAGE_START:
|
|
130
|
-
return {
|
|
131
|
-
...e,
|
|
132
|
-
items: [...e.items, { kind: "reasoning", id: t.messageId, text: "", subagent: s }]
|
|
133
|
-
};
|
|
134
|
-
case v.REASONING_MESSAGE_CONTENT:
|
|
135
|
-
return D(e, t.messageId, "reasoning", (r) => ({
|
|
136
|
-
...r,
|
|
137
|
-
text: r.text + t.delta
|
|
138
|
-
}));
|
|
139
|
-
case v.TOOL_CALL_START:
|
|
140
|
-
return {
|
|
141
|
-
...e,
|
|
142
|
-
items: [
|
|
143
|
-
...e.items,
|
|
144
|
-
{ kind: "tool", id: t.toolCallId, name: t.toolCallName, args: "", subagent: s }
|
|
145
|
-
]
|
|
146
|
-
};
|
|
147
|
-
case v.TOOL_CALL_ARGS:
|
|
148
|
-
return D(e, t.toolCallId, "tool", (r) => ({ ...r, args: r.args + t.delta }));
|
|
149
|
-
case v.TOOL_CALL_RESULT:
|
|
150
|
-
return D(e, t.toolCallId, "tool", (r) => {
|
|
151
|
-
var u;
|
|
152
|
-
return {
|
|
153
|
-
...r,
|
|
154
|
-
result: P(t.content),
|
|
155
|
-
isError: ((u = t.metadata) == null ? void 0 : u.isError) === !0
|
|
156
|
-
};
|
|
157
|
-
});
|
|
158
|
-
case v.RUN_FINISHED: {
|
|
159
|
-
const r = ie(t.outcome), u = new Map(r.map((a) => [a.toolCallId, a]));
|
|
160
|
-
return {
|
|
161
|
-
...e,
|
|
162
|
-
items: r.length ? e.items.map(
|
|
163
|
-
(a) => a.kind === "tool" && u.has(a.id) ? { ...a, interrupt: u.get(a.id) } : a
|
|
164
|
-
) : e.items,
|
|
165
|
-
status: "idle",
|
|
166
|
-
runId: void 0,
|
|
167
|
-
waking: void 0,
|
|
168
|
-
interrupts: r.length ? r : void 0
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
case v.RUN_ERROR:
|
|
172
|
-
return {
|
|
173
|
-
...e,
|
|
174
|
-
items: t.code === "cancelled" ? e.items : [
|
|
175
|
-
...e.items,
|
|
176
|
-
{
|
|
177
|
-
kind: "error",
|
|
178
|
-
id: `error-${e.runId ?? e.items.length}`,
|
|
179
|
-
text: t.message
|
|
180
|
-
}
|
|
181
|
-
],
|
|
182
|
-
status: "idle",
|
|
183
|
-
runId: void 0,
|
|
184
|
-
waking: void 0
|
|
185
|
-
};
|
|
186
|
-
default:
|
|
187
|
-
return e;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
class L extends Error {
|
|
191
|
-
constructor(s, n) {
|
|
192
|
-
super(typeof n.error == "string" ? n.error : `HTTP ${s}`);
|
|
193
|
-
H(this, "status");
|
|
194
|
-
H(this, "body");
|
|
195
|
-
this.status = s, this.body = n;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
async function q(e, t) {
|
|
199
|
-
if (!e.body) return;
|
|
200
|
-
const s = e.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
201
|
-
let n = "";
|
|
202
|
-
for (; ; ) {
|
|
203
|
-
const { done: i, value: o } = await s.read();
|
|
204
|
-
if (i) break;
|
|
205
|
-
n += o.replace(/\r\n/g, `
|
|
206
|
-
`);
|
|
207
|
-
for (let l = n.indexOf(`
|
|
208
|
-
|
|
209
|
-
`); l >= 0; l = n.indexOf(`
|
|
210
|
-
|
|
211
|
-
`)) {
|
|
212
|
-
const r = n.slice(0, l);
|
|
213
|
-
n = n.slice(l + 2);
|
|
214
|
-
const u = r.split(`
|
|
215
|
-
`).filter((a) => a.startsWith("data:")).map((a) => a.slice(5).trimStart()).join(`
|
|
216
|
-
`);
|
|
217
|
-
u && t(JSON.parse(u));
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
function K(e, t, s, n = {}) {
|
|
222
|
-
const i = (r) => `${e}/${encodeURIComponent(r)}`, o = async (r, u = {}) => {
|
|
223
|
-
const a = typeof s == "function" ? await s() : s, p = new Headers(a);
|
|
224
|
-
return new Headers(u.headers).forEach((h, f) => p.set(f, h)), (t ?? fetch)(r, { ...u, headers: p });
|
|
225
|
-
}, l = async (r, u) => {
|
|
226
|
-
const a = await o(r, u), p = await a.json().catch(() => ({}));
|
|
227
|
-
if (!a.ok) throw new L(a.status, p);
|
|
228
|
-
return p;
|
|
229
|
-
};
|
|
230
|
-
return {
|
|
231
|
-
listThreads: async () => {
|
|
232
|
-
const r = await l(e);
|
|
233
|
-
return n.threads ? { threads: n.threads(r) } : r;
|
|
234
|
-
},
|
|
235
|
-
createThread: n.create ?? ((r) => l(e, {
|
|
236
|
-
method: "POST",
|
|
237
|
-
headers: { "Content-Type": "application/json" },
|
|
238
|
-
body: JSON.stringify(r ? { title: r } : {})
|
|
239
|
-
})),
|
|
240
|
-
loadThread: (r) => l(i(r)),
|
|
241
|
-
deleteThread: (r) => l(i(r), { method: "DELETE" }),
|
|
242
|
-
cancel: (r, u) => l(`${i(r)}/runs/${encodeURIComponent(u)}/cancel`, {
|
|
243
|
-
method: "POST"
|
|
244
|
-
}),
|
|
245
|
-
...n.interrupts !== void 0 && {
|
|
246
|
-
interrupt: (r) => l(`${n.interrupts}/${encodeURIComponent(r)}`),
|
|
247
|
-
cancelInterrupt: (r) => l(`${n.interrupts}/${encodeURIComponent(r)}/cancel`, {
|
|
248
|
-
method: "POST"
|
|
249
|
-
})
|
|
250
|
-
},
|
|
251
|
-
async follow(r, u, a, p) {
|
|
252
|
-
const h = await o(
|
|
253
|
-
`${i(r)}/runs/${encodeURIComponent(u)}/events`,
|
|
254
|
-
{
|
|
255
|
-
headers: { Accept: "text/event-stream" },
|
|
256
|
-
signal: p
|
|
257
|
-
}
|
|
258
|
-
);
|
|
259
|
-
if (!h.ok)
|
|
260
|
-
throw new L(h.status, await h.json().catch(() => ({})));
|
|
261
|
-
await q(h, a);
|
|
262
|
-
},
|
|
263
|
-
async run(r, u, a, p) {
|
|
264
|
-
const h = {
|
|
265
|
-
threadId: r,
|
|
266
|
-
runId: u.runId,
|
|
267
|
-
messages: [{ id: u.messageId, role: "user", content: u.text }],
|
|
268
|
-
tools: [],
|
|
269
|
-
context: [],
|
|
270
|
-
forwardedProps: {}
|
|
271
|
-
}, f = await o(`${i(r)}/runs`, {
|
|
272
|
-
method: "POST",
|
|
273
|
-
headers: { "Content-Type": "application/json", Accept: "text/event-stream" },
|
|
274
|
-
body: JSON.stringify(h),
|
|
275
|
-
signal: p
|
|
276
|
-
});
|
|
277
|
-
if (!f.ok)
|
|
278
|
-
throw new L(f.status, await f.json().catch(() => ({})));
|
|
279
|
-
await q(f, a);
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
function ae(e, { baseUrl: t = "", collection: s = "chats", fetch: n, headers: i } = {}) {
|
|
284
|
-
const o = `${t}/api/projects/${encodeURIComponent(e)}`;
|
|
285
|
-
return K(`${o}/${s}`, n, i, {
|
|
286
|
-
interrupts: `${o}/interrupts`
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
function ue({
|
|
290
|
-
baseUrl: e,
|
|
291
|
-
token: t,
|
|
292
|
-
fetch: s
|
|
293
|
-
}) {
|
|
294
|
-
const n = async (i, o) => {
|
|
295
|
-
const l = typeof i == "string" ? i : i instanceof URL ? i.href : i.url, r = new URL(l, "http://runtime.invalid"), u = typeof t == "string" ? t : await t({
|
|
296
|
-
method: ((o == null ? void 0 : o.method) ?? "GET").toUpperCase(),
|
|
297
|
-
path: r.pathname + r.search
|
|
298
|
-
}), a = new Headers(o == null ? void 0 : o.headers);
|
|
299
|
-
return a.set("Authorization", `Bearer ${u.trim()}`), (s ?? fetch)(i, { ...o, headers: a });
|
|
300
|
-
};
|
|
301
|
-
return K(`${e.replace(/\/+$/, "")}/api/sessions`, n, void 0, {
|
|
302
|
-
threads: (i) => (i.sessions ?? []).map((o) => ({
|
|
303
|
-
id: o.id,
|
|
304
|
-
projectId: "",
|
|
305
|
-
title: !o.title.trim() || o.title.trim() === o.id ? "New chat" : o.title,
|
|
306
|
-
createdAt: o.createdAt,
|
|
307
|
-
updatedAt: o.updatedAt
|
|
308
|
-
})),
|
|
309
|
-
create: async (i) => {
|
|
310
|
-
const o = (/* @__PURE__ */ new Date()).toISOString();
|
|
311
|
-
return {
|
|
312
|
-
thread: {
|
|
313
|
-
id: crypto.randomUUID(),
|
|
314
|
-
projectId: "",
|
|
315
|
-
title: i ?? "New chat",
|
|
316
|
-
createdAt: o,
|
|
317
|
-
updatedAt: o
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
const J = 5e3, z = [1e3, 2e3, 5e3, 1e4, 3e4], ce = 3e3;
|
|
324
|
-
function V(e, t) {
|
|
325
|
-
return new Promise((s) => {
|
|
326
|
-
const n = () => {
|
|
327
|
-
document.visibilityState === "visible" && i();
|
|
328
|
-
}, i = () => {
|
|
329
|
-
clearTimeout(o), window.removeEventListener("online", i), document.removeEventListener("visibilitychange", n), t.removeEventListener("abort", i), s();
|
|
330
|
-
}, o = setTimeout(i, e);
|
|
331
|
-
window.addEventListener("online", i), document.addEventListener("visibilitychange", n), t.addEventListener("abort", i);
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
function ge(e, { baseUrl: t, collection: s, fetch: n, headers: i } = {}) {
|
|
335
|
-
return W(
|
|
336
|
-
() => e ? ae(e, { baseUrl: t, collection: s, fetch: n, headers: i }) : null,
|
|
337
|
-
[e, t, s, n, i]
|
|
338
|
-
);
|
|
339
|
-
}
|
|
340
|
-
function pe({
|
|
341
|
-
baseUrl: e,
|
|
342
|
-
token: t,
|
|
343
|
-
fetch: s
|
|
344
|
-
}) {
|
|
345
|
-
return W(
|
|
346
|
-
() => ue({ baseUrl: e, token: t, fetch: s }),
|
|
347
|
-
[e, t, s]
|
|
348
|
-
);
|
|
349
|
-
}
|
|
350
|
-
function he(e, t) {
|
|
351
|
-
const [s, n] = R(F), [i, o] = R(null), [l, r] = R(!1), [u, a] = R({}), p = k(() => {
|
|
352
|
-
}), h = k(/* @__PURE__ */ new Set()), f = k(null), O = k(0), U = k([]);
|
|
353
|
-
U.current = s.items;
|
|
354
|
-
const S = k(void 0);
|
|
355
|
-
S.current = s.runId;
|
|
356
|
-
const I = x(
|
|
357
|
-
async (g, m, d, y, w) => {
|
|
358
|
-
var j;
|
|
359
|
-
(j = f.current) == null || j.abort();
|
|
360
|
-
const c = new AbortController();
|
|
361
|
-
f.current = c;
|
|
362
|
-
let C = !1;
|
|
363
|
-
for (let T = 0; !c.signal.aborted && !C; T++) {
|
|
364
|
-
let A = T > 0 || !w;
|
|
365
|
-
const E = (b) => {
|
|
366
|
-
(b.type === v.RUN_FINISHED || b.type === v.RUN_ERROR) && (C = !0);
|
|
367
|
-
const N = A;
|
|
368
|
-
A = !1, n(($) => X(N ? { ...$, items: y } : $, b)), r(!1), o(null);
|
|
369
|
-
};
|
|
370
|
-
try {
|
|
371
|
-
await (A ? g.follow(m, d, E, c.signal) : w(E, c.signal));
|
|
372
|
-
} catch (b) {
|
|
373
|
-
if (c.signal.aborted) break;
|
|
374
|
-
if (b instanceof L && b.status === 503) {
|
|
375
|
-
o(String(b.body.podStatus ?? "starting")), await V(J, c.signal);
|
|
376
|
-
continue;
|
|
377
|
-
}
|
|
378
|
-
if (b instanceof L) {
|
|
379
|
-
const N = b.status === 404 ? await g.loadThread(m).catch(() => null) : null, $ = N ? B(N.messages, N.events) : null;
|
|
380
|
-
n((te) => ({
|
|
381
|
-
...te,
|
|
382
|
-
...$ ? { items: $.items, interrupts: $.interrupts } : {},
|
|
383
|
-
status: "idle",
|
|
384
|
-
runId: void 0,
|
|
385
|
-
waking: void 0,
|
|
386
|
-
error: N ? void 0 : b.message
|
|
387
|
-
}));
|
|
388
|
-
break;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
if (C || c.signal.aborted) break;
|
|
392
|
-
r(!0), await V(z[Math.min(T, z.length - 1)], c.signal);
|
|
393
|
-
}
|
|
394
|
-
f.current === c && (f.current = null, r(!1));
|
|
395
|
-
},
|
|
396
|
-
[]
|
|
397
|
-
), M = x(
|
|
398
|
-
(g, m, d) => {
|
|
399
|
-
const y = B(d.messages, d.events);
|
|
400
|
-
d.running ? (n({
|
|
401
|
-
items: y.items,
|
|
402
|
-
status: "running",
|
|
403
|
-
runId: d.running.runId
|
|
404
|
-
}), I(g, m, d.running.runId, y.items)) : n(y);
|
|
405
|
-
},
|
|
406
|
-
[I]
|
|
407
|
-
);
|
|
408
|
-
G(() => {
|
|
409
|
-
var w;
|
|
410
|
-
if ((w = f.current) == null || w.abort(), f.current = null, o(null), r(!1), !e || !t) {
|
|
411
|
-
n({ items: [], status: "idle" });
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
n(F), a({}), h.current = /* @__PURE__ */ new Set();
|
|
415
|
-
let g = !1, m;
|
|
416
|
-
const d = O.current, y = async () => {
|
|
417
|
-
try {
|
|
418
|
-
const c = await e.loadThread(t);
|
|
419
|
-
if (g || f.current || O.current !== d) return;
|
|
420
|
-
o(null), M(e, t, c);
|
|
421
|
-
} catch (c) {
|
|
422
|
-
if (g) return;
|
|
423
|
-
if (c instanceof L && c.status === 503) {
|
|
424
|
-
o(String(c.body.podStatus ?? "starting")), m = setTimeout(y, J);
|
|
425
|
-
return;
|
|
426
|
-
}
|
|
427
|
-
n({ items: [], status: "idle", error: c.message });
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
return y(), () => {
|
|
431
|
-
var c;
|
|
432
|
-
g = !0, clearTimeout(m), (c = f.current) == null || c.abort();
|
|
433
|
-
};
|
|
434
|
-
}, [e, t, I, M]);
|
|
435
|
-
const _ = s.status === "idle" ? s.interrupts : void 0;
|
|
436
|
-
G(() => {
|
|
437
|
-
const g = e == null ? void 0 : e.interrupt;
|
|
438
|
-
if (!e || !t || !(_ != null && _.length) || !g) return;
|
|
439
|
-
let m = !1, d = !1, y;
|
|
440
|
-
const w = /* @__PURE__ */ new Set(), c = async () => {
|
|
441
|
-
if (m || d) return;
|
|
442
|
-
d = !0, clearTimeout(y);
|
|
443
|
-
try {
|
|
444
|
-
for (const T of _) {
|
|
445
|
-
if (w.has(T.id) || h.current.has(T.id)) continue;
|
|
446
|
-
let A;
|
|
447
|
-
try {
|
|
448
|
-
A = await g(T.id);
|
|
449
|
-
} catch (E) {
|
|
450
|
-
E instanceof L && E.status === 404 && w.add(T.id);
|
|
451
|
-
continue;
|
|
452
|
-
}
|
|
453
|
-
if (m) return;
|
|
454
|
-
if (a((E) => ({ ...E, [T.id]: A })), A.status !== "pending" && A.resumeState !== "queued") {
|
|
455
|
-
h.current.add(T.id);
|
|
456
|
-
const E = await e.loadThread(t).catch(() => null);
|
|
457
|
-
if (m || f.current) return;
|
|
458
|
-
if (E) {
|
|
459
|
-
M(e, t, E);
|
|
460
|
-
return;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
} finally {
|
|
465
|
-
d = !1;
|
|
466
|
-
}
|
|
467
|
-
const j = _.filter((T) => !w.has(T.id) && !h.current.has(T.id));
|
|
468
|
-
!m && j.length && (y = setTimeout(c, ce));
|
|
469
|
-
}, C = () => {
|
|
470
|
-
document.visibilityState === "visible" && c();
|
|
471
|
-
};
|
|
472
|
-
return p.current = () => void c(), c(), window.addEventListener("focus", C), document.addEventListener("visibilitychange", C), () => {
|
|
473
|
-
m = !0, clearTimeout(y), p.current = () => {
|
|
474
|
-
}, window.removeEventListener("focus", C), document.removeEventListener("visibilitychange", C);
|
|
475
|
-
};
|
|
476
|
-
}, [e, t, _, M]);
|
|
477
|
-
const Y = x(
|
|
478
|
-
async (g) => {
|
|
479
|
-
if (!(e != null && e.cancelInterrupt)) return;
|
|
480
|
-
const m = await e.cancelInterrupt(g);
|
|
481
|
-
a((d) => ({ ...d, [g]: m })), p.current();
|
|
482
|
-
},
|
|
483
|
-
[e]
|
|
484
|
-
), Q = x(() => p.current(), []), Z = x(
|
|
485
|
-
async (g) => {
|
|
486
|
-
const m = g.trim();
|
|
487
|
-
if (!e || !t || !m || f.current) return;
|
|
488
|
-
O.current++;
|
|
489
|
-
const d = crypto.randomUUID(), y = U.current;
|
|
490
|
-
n((w) => ({
|
|
491
|
-
...w,
|
|
492
|
-
items: [...w.items, { kind: "user", id: d, text: m }],
|
|
493
|
-
status: "running",
|
|
494
|
-
runId: d,
|
|
495
|
-
error: void 0
|
|
496
|
-
})), await I(
|
|
497
|
-
e,
|
|
498
|
-
t,
|
|
499
|
-
d,
|
|
500
|
-
y,
|
|
501
|
-
(w, c) => e.run(
|
|
502
|
-
t,
|
|
503
|
-
{ runId: d, messageId: d, text: m },
|
|
504
|
-
w,
|
|
505
|
-
c
|
|
506
|
-
)
|
|
507
|
-
);
|
|
508
|
-
},
|
|
509
|
-
[e, t, I]
|
|
510
|
-
), ee = x(() => {
|
|
511
|
-
!e || !t || !S.current || e.cancel(t, S.current).catch((g) => {
|
|
512
|
-
var m;
|
|
513
|
-
g instanceof L && g.status === 404 ? ((m = f.current) == null || m.abort(), n((d) => ({ ...d, status: "idle", runId: void 0, waking: void 0 }))) : n((d) => ({ ...d, error: `Could not stop: ${g.message}` }));
|
|
514
|
-
});
|
|
515
|
-
}, [e, t]);
|
|
516
|
-
return {
|
|
517
|
-
...s,
|
|
518
|
-
starting: i ?? s.waking ?? null,
|
|
519
|
-
reconnecting: l,
|
|
520
|
-
send: Z,
|
|
521
|
-
cancel: ee,
|
|
522
|
-
interruptInfo: u,
|
|
523
|
-
cancelInterrupt: Y,
|
|
524
|
-
refreshInterrupts: Q
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
function ye(e, t) {
|
|
528
|
-
const [s, n] = R([]), [i, o] = R(!1), [l, r] = R(null), [u, a] = R(!1), [p, h] = R(0), f = k(0);
|
|
529
|
-
G(() => {
|
|
530
|
-
n([]), r(null);
|
|
531
|
-
}, [e]), G(() => {
|
|
532
|
-
const S = ++f.current;
|
|
533
|
-
if (!e) {
|
|
534
|
-
o(!1);
|
|
535
|
-
return;
|
|
536
|
-
}
|
|
537
|
-
return o(!0), e.listThreads().then(({ threads: I }) => {
|
|
538
|
-
S === f.current && (n(I), r(null));
|
|
539
|
-
}).catch((I) => {
|
|
540
|
-
S === f.current && r(I instanceof Error ? I.message : "Could not load the chats");
|
|
541
|
-
}).finally(() => {
|
|
542
|
-
S === f.current && o(!1);
|
|
543
|
-
}), () => {
|
|
544
|
-
f.current++;
|
|
545
|
-
};
|
|
546
|
-
}, [e, t, p]);
|
|
547
|
-
const O = x(() => h((S) => S + 1), []), U = x(
|
|
548
|
-
async (S) => {
|
|
549
|
-
if (e) {
|
|
550
|
-
a(!0);
|
|
551
|
-
try {
|
|
552
|
-
await e.deleteThread(S);
|
|
553
|
-
} finally {
|
|
554
|
-
a(!1), O();
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
},
|
|
558
|
-
[e, O]
|
|
559
|
-
);
|
|
560
|
-
return { threads: s, loading: i, error: l, removing: u, refresh: O, remove: U };
|
|
561
|
-
}
|
|
562
|
-
export {
|
|
563
|
-
L as C,
|
|
564
|
-
ue as a,
|
|
565
|
-
se as b,
|
|
566
|
-
ae as c,
|
|
567
|
-
X as d,
|
|
568
|
-
F as e,
|
|
569
|
-
me as f,
|
|
570
|
-
ge as g,
|
|
571
|
-
B as h,
|
|
572
|
-
pe as i,
|
|
573
|
-
ye as j,
|
|
574
|
-
q as r,
|
|
575
|
-
he as u
|
|
576
|
-
};
|