@next-bricks/ai-portal 0.48.2 → 0.48.4
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/dist/bricks.json +30 -30
- package/dist/chunks/{7431.5093d0d9.js → 7431.6b6bb81a.js} +3 -3
- package/dist/chunks/7431.6b6bb81a.js.map +1 -0
- package/dist/chunks/{9328.222dec55.js → 9328.794ecf59.js} +2 -2
- package/dist/chunks/9328.794ecf59.js.map +1 -0
- package/dist/chunks/action-buttons.3a72e5a4.js +2 -0
- package/dist/chunks/action-buttons.3a72e5a4.js.map +1 -0
- package/dist/chunks/{main.4486142d.js → main.a271ddd5.js} +2 -2
- package/dist/chunks/{main.4486142d.js.map → main.a271ddd5.js.map} +1 -1
- package/dist/chunks/show-cases.afdbbee3.js +2 -0
- package/dist/chunks/show-cases.afdbbee3.js.map +1 -0
- package/dist/examples.json +16 -16
- package/dist/index.5e116c8d.js +2 -0
- package/dist/{index.416c83ca.js.map → index.5e116c8d.js.map} +1 -1
- package/dist/manifest.json +179 -175
- package/dist/types.json +255 -248
- package/dist-types/show-cases/index.d.ts +2 -0
- package/package.json +2 -2
- package/dist/chunks/7431.5093d0d9.js.map +0 -1
- package/dist/chunks/9328.222dec55.js.map +0 -1
- package/dist/chunks/action-buttons.16da8761.js +0 -2
- package/dist/chunks/action-buttons.16da8761.js.map +0 -1
- package/dist/chunks/show-cases.5dcf60c0.js +0 -2
- package/dist/chunks/show-cases.5dcf60c0.js.map +0 -1
- package/dist/index.416c83ca.js +0 -2
- /package/dist/chunks/{7431.5093d0d9.js.LICENSE.txt → 7431.6b6bb81a.js.LICENSE.txt} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 7431.
|
|
2
|
-
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[7431],{24:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:block;white-space:nowrap}.container{border-radius:var(--elevo-border-radius)}:host([hidden]){display:none}*{box-sizing:border-box}.label{font-weight:500;overflow:hidden;text-overflow:ellipsis}.stat{font-weight:600}.chart{min-width:0}.chart > *{display:block}:host(:not([size="small"])) .container{background:linear-gradient(164deg,rgba(105,153,253,0) 40%,rgba(105,153,253,0.05) 60%,rgba(105,153,253,0.32) 100%),#fff;padding:22px}:host(:not([size="small"])) .label{font-size:14px;height:22px;margin-bottom:16px}:host(:not([size="small"])) .stat-and-chart{display:flex;align-items:center;justify-content:end;position:relative}:host(:not([size="small"])) .stat{font-size:36px;color:#1d212a;position:absolute;left:0}:host(:not([size="small"])) .chart{width:calc(100% - 160px)}:host([size="small"]) .container{padding:11px 15px;display:flex;align-items:center;justify-content:end;position:relative;background:var(--elevo-component-background);-webkit-backdrop-filter:var(--elevo-component-backdrop-filter);backdrop-filter:var(--elevo-component-backdrop-filter)}:host([size="small"]) .label-and-stat{position:absolute;left:15px}:host([size="small"]) .label{font-size:12px;color:#8c8c8c;line-height:17px;height:17px;margin-bottom:7px}:host([size="small"]) .stat{font-size:20px;color:#262626;line-height:24px}:host([size="small"]) .chart{width:calc(100% - 90px)}',""]);const s=o.toString()},10335:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.goal-container{display:flex;flex-direction:column;gap:3px}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const s=o.toString()},11816:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.button-container{display:flex;gap:6px}.action::part(button){height:28px;font-size:13px;padding:5px 10px}.action.active::part(button){color:var(--elevo-color-brand);background-color:rgba(var(--elevo-color-brand-rgb-channel),0.04);border-color:#c9d7ff}.icon{font-size:16px;margin-right:4px}.remove{padding:1px;font-size:14px;margin-left:10px}",""]);const s=o.toString()},14763:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:block;color:#262626}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.activity{position:relative;padding-left:27px}.activity + .activity{margin-top:20px}.main{display:flex;align-items:flex-start}.action{flex:1;min-width:0;display:flex;align-items:center;margin-left:6px;word-break:break-word}.time{color:#8c8c8c;margin-left:12px}.action,\n.time{padding:1px 0}.guide-line{position:absolute;left:8px;top:0;bottom:-20px;width:0;background-color:#d8d8d8}.guide-line::before{content:"";position:absolute;top:0;bottom:0;left:3.5px;width:1px;background-color:#d8d8d8}.guide-line::after{content:"";position:absolute;top:8px;left:0;width:8px;height:8px;border-radius:8px;background-color:#d8d8d8}.activity:first-child .guide-line::before{top:12px}.activity:last-child .guide-line::before{height:12px;bottom:auto}.comment{position:relative;font-size:13px;color:#595959;background-color:#f3f3f3;border-radius:8px;padding:8px 12px;margin-top:10px}.comment::before{content:"";position:absolute;top:-6px;left:36px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #f3f3f3}.conversation{margin:0 7px 0 10px}.conversation::part(link){background:#f9f0ff;border-radius:3px;font-weight:500;font-size:12px;color:#aa64f5;display:flex;align-items:center;height:24px;padding:0 8px}.external-link-icon{color:#8c8c8c}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}',""]);const s=o.toString()},20124:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.tabs{list-style:none;padding:0;margin:0;display:flex;font-size:16px}.tabs .tab + .tab{margin-left:32px}.tabs a{color:rgba(38,38,38,0.65);cursor:pointer}.tabs .active a{color:#262626;font-weight:500}.tabs .active a::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}',""]);const s=o.toString()},23677:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.link{display:block}.link::part(link){display:flex;align-items:center;padding:12px 24px;color:#262626;background:rgba(255,255,255,0.6);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.item:not(:last-child){margin-bottom:4px}.link.actions-active::part(link),\n.link::part(link):hover{background:rgba(0,0,0,0.05);-webkit-backdrop-filter:none;backdrop-filter:none}.icon{font-size:20px;margin-right:8px}.title{font-weight:500;font-size:16px}.title,\n.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment{color:#1a7aff;margin-left:8px}.header{display:flex;align-items:center}.description{color:#595959;padding-left:28px;line-height:20px}.time{color:rgba(0,0,0,0.45);margin:0 16px}.main{flex:1;min-width:0}.operations{display:flex;align-items:center;justify-content:center;width:32px;height:32px}.link.actions-active .avatar,\n.link:hover .avatar,\n.link:hover .time,\n.link:not(:hover):not(.actions-active) .actions{display:none}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const s=o.toString()},25676:(e,t,i)=>{e.exports=i.p+"images/4b299d0b.png"},31653:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}img{vertical-align:middle}",""]);const s=o.toString()},31748:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(25676),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px;margin-bottom:17px}h2{font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.icon{font-size:24px;color:#333;margin-right:8px}.title{font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const h=d.toString()},32360:(e,t,i)=>{e.exports=i.p+"images/72c24398.png"},40138:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:inline-block}:host([hidden]){display:none}*{box-sizing:border-box}.trigger{display:flex;align-items:center;font-size:14px;cursor:pointer;position:relative;padding:4px 12px;border-radius:15px;color:var(--elevo-color-brand)}.trigger:hover{background-color:rgba(37,64,255,0.06)}.trigger::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;padding:1px;background:linear-gradient(145deg,rgba(37,64,255,1),rgba(180,95,248,1));border-radius:15px;-webkit-mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:xor;-webkit-mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor}.trigger .label{margin-right:0}.label{max-width:650px;margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown{max-width:500px;border-radius:4px;background:var(--antd-dropdown-menu-bg);box-shadow:var(--antd-box-shadow-base)}.dropdown-inner{padding:9px 4px}.search-container{padding:3px;border-bottom:1px solid rgba(0,0,0,0.08)}.search::part(affix-wrapper){box-shadow:none;border:none}eo-menu{border:0;padding:0;background:none;border-radius:0}eo-menu-item::part(menu-item){padding:5px 8px;line-height:22px;border-radius:var(--medius-border-radius)}eo-menu-item:not([disabled]):hover::part(menu-item){background-color:var(--left-sidebar-item-hover-bg)}.active::part(menu-item){font-weight:600;background-color:var(--left-sidebar-item-hover-bg)}.empty{display:flex;justify-content:center;align-items:center;color:var(--color-secondary-text)}',""]);const s=o.toString()},42873:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:flex;flex-direction:column;align-items:center;max-width:1020px;width:100%}:host([hidden]){display:none}*{box-sizing:border-box}.tips{color:rgba(0,0,0,0.45);margin-bottom:27px}.cases{list-style:none;padding:0;margin:0;display:grid;width:100%;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px;margin-top:36px}",""]);const s=o.toString()},46121:(e,t,i)=>{e.exports=i.p+"images/69cf3ae2.png"},46122:(e,t,i)=>{i.d(t,{A:()=>b});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(56791),i.b),d=new URL(i(88786),i.b),p=new URL(i(46121),i.b),h=o()(a()),u=l()(c),m=l()(d),g=l()(p);h.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.link{display:block;background:rgba(255,255,255,0.6);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-size:cover;background-position:center;background-repeat:no-repeat;background-clip:padding-box;overflow:hidden}.purple{background-image:url(${u})}.green{background-image:url(${m})}.pink{background-image:url(${g})}.link::part(link){display:flex;flex-direction:column;gap:0;box-sizing:border-box;height:128px;padding:20px;position:relative}.title{width:100%;margin-bottom:8px;color:#262626;font-weight:500;font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{width:100%;height:60px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;color:#18212f;line-height:20px}.link::part(link):hover{box-shadow:0px 4px 12px 0px rgba(96,96,138,0.15),0px 2px 4px 0px rgba(96,96,138,0.06)}.button{display:none;position:absolute;bottom:12px;left:20px;right:20px;height:32px;background:rgba(0,0,0,0.04);border-radius:8px;align-items:center;justify-content:center;gap:4px;color:#262626}.button:hover{background:rgba(0,0,0,0.08)}.link:hover .button{display:flex}.link:hover .description{-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0.11) 51%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0.11) 51%,rgba(0,0,0,0) 100%);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 60%;mask-size:100% 60%}`,""]);const b=h.toString()},46342:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,".goal-item{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;padding:12px 24px;background-color:rgba(255,255,255,0.6);border-radius:8px;-webkit-user-select:none;user-select:none;border:1px solid transparent}.goal-item:hover,.goal-item:has(.title:focus){background-color:rgba(0,0,0,0.05)}.goal-item:has(.title:focus) .end .operation{display:flex}.goal-item:hover:not(.does-not-exist) .end .operation{display:flex}.goal-item:has(.title:focus) .end .info{display:none}.goal-item:hover:not(.does-not-exist) .end .info{display:none}.goal-item.completed .serial-number,.goal-item.completed .title{color:#bfbfbf}.goal-item.active{background:rgba(37,64,255,0.1);border:1px solid #2540ff}.goal-item > *{-webkit-user-select:auto;user-select:auto}.goal-item .start,.goal-item .end{display:flex;align-items:center}.goal-item .start{flex:1;min-width:0;column-gap:16px;min-width:0}.goal-item .end{flex-shrink:0;column-gap:30px}.goal-item .end .operation{display:none;align-items:center;gap:8px}.goal-item .end .operation eo-button::part(button){height:28px}.goal-item .end .operation .new-chat::part(button){padding:5px 10px;font-size:13px}.goal-item .end .operation .append-child::part(button){padding:5px 8px;font-size:14px}.goal-item .end .info{display:inline-flex;align-items:center;column-gap:24px}.goal-item .serial-number{font-weight:400;color:var(--palette-gray-7);font-size:16px;overflow:visible}.goal-item .title{font-weight:500;padding:2px 4px;font-size:16px;color:var(--palette-gray-10);border:1px solid transparent;border-radius:8px;cursor:pointer;min-width:80px}.goal-item .title:hover{background-color:rgba(255,255,255,0.6);border:1px solid var(--palette-gray-5);cursor:text}.goal-item .title:focus{outline:none;background-color:rgba(255,255,255,0.6);border:1px solid var(--elevo-color-brand)}.goal-item .icon{border-radius:8px;padding:6px;position:relative;top:2px}.goal-item .icon:hover{background-color:rgba(0,0,0,0.04)}.goal-item .message{color:var(--palette-gray-7);display:inline-flex;align-items:center;column-gap:6px}.goal-item .message .count{font-weight:500;color:var(--palette-gray-10)}.goal-item:not(.editing) .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",""]);const s=o.toString()},47008:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(47336),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.root{color:#262626;background:url(${p}) no-repeat center bottom;background-size:100% 104px;padding:12px 12px 29px;margin:0 -12px}.container{position:relative;background:#ffffff;box-shadow:0px 2px 4px 0px rgba(38,45,65,0.1);border-radius:16px;border:1px solid #dadfe8}.container:has(textarea:focus){border-color:#b7c3d8}textarea{display:block;width:100%;padding:10px 16px 50px;color:var(--antd-input-color);border-radius:16px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,0.5);font:inherit;font-size:14px;line-height:22px;height:120px}textarea::placeholder{color:rgba(0,0,0,0.4)}.btn-send:focus,\ntextarea:focus{outline:none}.actions-bar{position:absolute;bottom:12px;left:14px;right:14px;display:flex;align-items:flex-end;justify-content:space-between}.btn-send{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff;flex-shrink:0}.btn-send[disabled]{background:rgba(0,0,0,0.15)}.btn-send:not([disabled]){cursor:pointer}.btn-send:not([disabled]):hover{background:#5166ff}.btn-send:not([disabled]):active{background:#1e33cc}.mentions{position:absolute}.mention-overlay{position:absolute;border-radius:4px;pointer-events:none;background:rgba(38,45,65,0.1)}`,""]);const h=d.toString()},47336:(e,t,i)=>{e.exports=i.p+"images/25c20165.png"},47338:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:inline-block}:host([hidden]){display:none}:host,\neo-tooltip{vertical-align:middle}button{width:28px;height:28px;font-size:18px;border-radius:8px;display:flex;align-items:center;justify-content:center;border:none;background:none;color:#333}button:disabled{color:#8c8c8c}button:not(:disabled){cursor:pointer}button:focus{outline:none}button:not(:disabled):hover{background:rgba(0,0,0,0.04)}button:not(:disabled):active{background:rgba(0,0,0,0.08)}:host([variant="light"]) button{color:#595959}:host([variant="mini"]) button{width:24px;height:24px;font-size:16px;border-radius:4px}:host([variant="mini-light"]) button{color:#8c8c8c;width:20px;height:20px;font-size:14px;border-radius:4px}:host([variant="bordered"]) button{background:#ffffff;border-radius:8px;border:1px solid rgba(0,0,0,0.1);color:#595959;width:32px;height:32px;font-size:18px}:host([variant="bordered"]) button:not(:disabled):hover{background:rgba(0,0,0,0.04)}',""]);const s=o.toString()},49041:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(25676),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:17px 54px 48px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}:host([size="small"]) .container{max-width:1000px}.header{margin-bottom:30px;display:flex;justify-content:space-between;align-items:center}nav{font-weight:500;font-size:20px;line-height:28px;display:flex;min-width:0}h1{margin:0;font-size:inherit;line-height:inherit}.breadcrumbs{list-style:none;padding:0;margin:0;color:#bfbfbf}.breadcrumbs eo-link::part(link){color:inherit}.breadcrumbs eo-link::part(link):hover{color:#595959}.breadcrumbs li::after{content:"/";margin:0 8px}@media (max-width: 719px){:host{padding-left:24px;padding-right:24px}.header{margin-left:40px}}`,""]);const h=d.toString()},56791:(e,t,i)=>{e.exports=i.p+"images/3e0f6758.png"},61408:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;z-index:1;width:260px;height:100%;background:rgba(246,247,249,0.5);border:1px solid rgba(255,255,255,0.3);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:23px 11px 0;display:flex;flex-direction:column;transition:transform 0.3s ease-in-out}.logo-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;margin-left:4px}.logo-link::part(link){display:block}.logo{vertical-align:middle}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -12px}.dropdown{display:block}.account{background:none;border:none;border-radius:8px;padding:6px 10px;display:block;width:100%;text-align:left;cursor:pointer}.account:hover{background:rgba(0,0,0,0.04)}.alternative{position:fixed;top:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out;background:rgba(255,255,255,0);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.alternative .new-chat::part(link){padding:4px;margin-left:16px;font-size:12px}.alternative .new-chat::part(link):hover{color:#7891ff}.alternative .new-chat::part(link):active{color:#0911b3}.container{width:270px;padding:10px 0 10px 10px;height:100%;transition:width 0.3s ease-in-out,padding 0.3s ease-in-out}.container.collapsed{width:0;padding:10px 0;overflow:visible}.container.collapsed .sidebar{transform:translateX(-100%)}.container.collapsed .alternative{opacity:1}:host([behavior="drawer"]){z-index:1;width:0}:host(:not([behavior="drawer"])) .alternative .new-chat{display:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0}.links{border-bottom:1px solid rgba(0,0,0,0.06);padding-bottom:16px;margin-bottom:16px}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 10px;border-radius:8px;color:#000}.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -12px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .section + .section{margin-top:14px}.history .section-title{display:flex;align-items:center;justify-content:space-between;height:30px;margin-bottom:6px;padding:0 8px}.history .section-label{display:flex;align-items:center;height:24px;padding:0 8px;margin-left:-8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-size:12px;color:#8c8c8c;border-radius:8px}.history .section-label eo-icon{vertical-align:middle;margin-left:6px;transition:transform 0.2s ease-in-out}.history .section-label:hover{background:rgba(0,0,0,0.04)}.history .collapsed > ul{display:none}.history .collapsed .section-label eo-icon{transform:rotate(-90deg)}.history .error,.history .loading{display:flex;align-items:center;height:36px;padding:0 8px}.history .loading{justify-content:center}.history .error{color:var(--color-error)}.history .group + .group{margin-top:15px}.history .group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.history .item{display:block}.history .item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.history .item.active::part(link){background:rgba(0,0,0,0.06)}.history .item.actions-active::part(link),.history .item::part(link):hover{background:rgba(0,0,0,0.04)}.history .item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history .actions{cursor:auto}.history .item:not(:hover):not(.actions-active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.history .item.actions-active .working,.history .item:hover .working,.history .item.active .working{display:none}.history .load-more{display:flex;justify-content:center;align-items:center;height:36px}',""]);const s=o.toString()},62069:(e,t,i)=>{var n,a=i(74635),r=i(70918),o=i(26902),s=i(5536),l=i(86121),c=i(70829),d=i(62740),p=i(18769),h=i.n(p),u=i(90870),m=i(30981),g=(i(34419),i(68443)),b=i(80079),A=i(87716);let x,k,E,f,v,w,y,T,C,S,_,N,R,M,I,O,W,D,L,P,z,U,H,B,V,j,F,G,Y,K,J,$,q,X,Q,Z,ee,te,ie,ne,ae,re,oe,se,le,ce,de,pe,he,ue,me,ge,be,Ae,xe,ke,Ee,fe,ve,we;(0,g.initializeI18n)(b.NS,b.I);const{defineElement:ye,property:Te,event:Ce,method:Se}=(0,u.createDecorators)(),_e=(0,p.forwardRef)(A.B);let Ne;var Re=new WeakMap,Me=new WeakMap,Ie=new WeakMap,Oe=new WeakMap,We=new WeakMap,De=new WeakMap,Le=new WeakMap,Pe=new WeakMap,ze=new WeakMap,Ue=new WeakMap,He=new WeakMap,Be=new WeakMap,Ve=new WeakMap,je=new WeakMap,Fe=new WeakMap,Ge=new WeakMap,Ye=new WeakMap,Ke=new WeakMap,Je=new WeakSet,$e=new WeakMap,qe=new WeakMap,Xe=new WeakMap,Qe=new WeakMap,Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,it=new WeakMap,nt=new WeakMap,at=new WeakMap,rt=new WeakMap,ot=new WeakMap;class st extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Je),(0,r.A)(this,Re,(x(this),E(this))),(0,r.A)(this,Me,(f(this),v(this))),(0,r.A)(this,Ie,(w(this),y(this))),(0,r.A)(this,Oe,(T(this),C(this))),(0,r.A)(this,We,(S(this),_(this))),(0,r.A)(this,De,(N(this),R(this))),(0,r.A)(this,Le,(M(this),I(this))),(0,r.A)(this,Pe,(O(this),W(this))),(0,r.A)(this,ze,(D(this),L(this))),(0,r.A)(this,Ue,(P(this),z(this))),(0,r.A)(this,He,(U(this),H(this))),(0,r.A)(this,Be,(B(this),V(this))),(0,r.A)(this,Ve,(j(this),F(this))),(0,r.A)(this,je,(G(this),Y(this))),(0,r.A)(this,Fe,(K(this),J(this))),(0,r.A)(this,Ge,($(this),q(this))),(0,r.A)(this,Ye,(X(this),Q(this))),(0,r.A)(this,Ke,(Z(this),ee(this))),(0,r.A)(this,$e,(ne(this),()=>{(0,s.A)(Je,this,te).emit()})),(0,r.A)(this,qe,ae(this)),(0,r.A)(this,Xe,(se(this),()=>{(0,s.A)(Je,this,re).emit()})),(0,r.A)(this,Qe,le(this)),(0,r.A)(this,Ze,(pe(this),e=>{(0,s.A)(Je,this,ce).emit(e)})),(0,r.A)(this,et,he(this)),(0,r.A)(this,tt,(ge(this),e=>{(0,s.A)(Je,this,ue).emit(e)})),(0,r.A)(this,it,be(this)),(0,r.A)(this,nt,(ke(this),()=>{(0,s.A)(Je,this,Ae).emit("chat")})),(0,r.A)(this,at,Ee(this)),(0,r.A)(this,rt,(we(this),e=>{(0,s.A)(Je,this,fe).emit(e)})),(0,r.A)(this,ot,(0,p.createRef)())}get conversationId(){return(0,c.A)(Re,this)}set conversationId(e){(0,l.A)(Re,this,e)}get initialRequest(){return(0,c.A)(Me,this)}set initialRequest(e){(0,l.A)(Me,this,e)}get replay(){return(0,c.A)(Ie,this)}set replay(e){(0,l.A)(Ie,this,e)}get replayDelay(){return(0,c.A)(Oe,this)}set replayDelay(e){(0,l.A)(Oe,this,e)}get supports(){return(0,c.A)(We,this)}set supports(e){(0,l.A)(We,this,e)}get showHiddenJobs(){return(0,c.A)(De,this)}set showHiddenJobs(e){(0,l.A)(De,this,e)}get showHumanActions(){return(0,c.A)(Le,this)}set showHumanActions(e){(0,l.A)(Le,this,e)}get showFeedback(){return(0,c.A)(Pe,this)}set showFeedback(e){(0,l.A)(Pe,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(ze,this)}set showFeedbackAfterFailed(e){(0,l.A)(ze,this,e)}get showFeedbackOnView(){return(0,c.A)(Ue,this)}set showFeedbackOnView(e){(0,l.A)(Ue,this,e)}get showUiSwitch(){return(0,c.A)(He,this)}set showUiSwitch(e){(0,l.A)(He,this,e)}get hideMermaid(){return(0,c.A)(Be,this)}set hideMermaid(e){(0,l.A)(Be,this,e)}get showJsxEditor(){return(0,c.A)(Ve,this)}set showJsxEditor(e){(0,l.A)(Ve,this,e)}get previewUrlTemplate(){return(0,c.A)(je,this)}set previewUrlTemplate(e){(0,l.A)(je,this,e)}get showCases(){return(0,c.A)(Fe,this)}set showCases(e){(0,l.A)(Fe,this,e)}get exampleProjects(){return(0,c.A)(Ge,this)}set exampleProjects(e){(0,l.A)(Ge,this,e)}get tryItOutUrl(){return(0,c.A)(Ye,this)}set tryItOutUrl(e){(0,l.A)(Ye,this,e)}resumed(){var e,t;null===(e=(0,c.A)(ot,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(ot,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(ot,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(ot,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return h().createElement(_e,{conversationId:this.conversationId,initialRequest:this.initialRequest,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHiddenJobs:this.showHiddenJobs,showHumanActions:this.showHumanActions,showFeedback:this.showFeedback,showFeedbackAfterFailed:this.showFeedbackAfterFailed,showUiSwitch:this.showUiSwitch,showFeedbackOnView:this.showFeedbackOnView,showJsxEditor:this.showJsxEditor,previewUrlTemplate:this.previewUrlTemplate,showCases:this.showCases,exampleProjects:this.exampleProjects,tryItOutUrl:this.tryItOutUrl,onShare:(0,c.A)($e,this),onTerminate:(0,c.A)(Xe,this),onSubmitFeedback:(0,c.A)(Ze,this),onSwitchToChat:(0,c.A)(nt,this),onFeedbackOnView:(0,c.A)(tt,this),onDetailChange:(0,c.A)(rt,this),ref:(0,c.A)(ot,this)})}}n=st,({e:[E,f,v,w,y,T,C,S,_,N,R,M,I,O,W,D,L,P,z,U,H,B,V,j,F,G,Y,K,J,$,q,X,Q,Z,ee,te,ie,ne,ae,re,oe,se,le,ce,de,pe,he,ue,me,ge,be,Ae,xe,ke,Ee,fe,ve,we,x],c:[Ne,k]}=(0,d.A)(n,[ye("ai-portal.cruise-canvas",{shadowOptions:!1})],[[Te(),1,"conversationId"],[Te({attribute:!1,render:!1}),1,"initialRequest"],[Te({type:Boolean,render:!1}),1,"replay"],[Te({type:Number,render:!1}),1,"replayDelay"],[Te({attribute:!1}),1,"supports"],[Te({type:Boolean}),1,"showHiddenJobs"],[Te({type:Boolean}),1,"showHumanActions"],[Te({type:Boolean}),1,"showFeedback"],[Te({type:Boolean}),1,"showFeedbackAfterFailed"],[Te({type:Boolean}),1,"showFeedbackOnView"],[Te({type:Boolean}),1,"showUiSwitch"],[Te({type:Boolean,render:!1}),1,"hideMermaid"],[Te({type:Boolean}),1,"showJsxEditor"],[Te(),1,"previewUrlTemplate"],[Te({attribute:!1}),1,"showCases"],[Te({attribute:!1}),1,"exampleProjects"],[Te(),1,"tryItOutUrl"],[Ce({type:"share"}),1,"shareEvent",e=>(0,c.A)(Ke,e),(e,t)=>(0,l.A)(Ke,e,t)],[Ce({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(qe,e),(e,t)=>(0,l.A)(qe,e,t)],[Ce({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Qe,e),(e,t)=>(0,l.A)(Qe,e,t)],[Ce({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(et,e),(e,t)=>(0,l.A)(et,e,t)],[Ce({type:"ui.switch"}),1,"switch",e=>(0,c.A)(it,e),(e,t)=>(0,l.A)(it,e,t)],[Ce({type:"detail.change"}),1,"detailChange",e=>(0,c.A)(at,e),(e,t)=>(0,l.A)(at,e,t)],[Se(),2,"resumed"],[Se(),2,"feedbackSubmitDone"],[Se(),2,"feedbackSubmitFailed"],[Se(),2,"feedbackOnViewDone"]],0,(e=>ot.has((0,o.A)(e))),m.ReactNextElement)),k();var lt=i(24586);const ct=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"];function dt(e){const t=window.getComputedStyle(e);return`${ct.map((e=>`${e}:${t.getPropertyValue(e)}`)).join(";")};\n min-height: 0!important;\n max-height: none!important;\n height: 0!important;\n visibility: hidden!important;\n overflow: hidden!important;\n position: absolute!important;\n z-index: -1000!important;\n top: 0!important;\n left: 0!important;\n pointer-events: none!important;\n`}let pt,ht;var ut=i(89575),mt=i(59435),gt=i(99126);let bt;const At=/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"metaKey":"ctrlKey",xt=p.forwardRef(kt);function kt(e,t){let{autoResize:i,minRows:n,maxRows:a,borderSize:r,paddingSize:o,containerRef:s,value:l,style:c,submitWhen:d,desiredSelectionRef:h,onChange:u,onSubmit:m,onKeyDown:g,onCompositionStart:b,onCompositionEnd:A,...x}=e;const k=null==i||i,[E,f]=(0,p.useState)(null!=l?l:""),v=(0,p.useRef)(null),[w,y]=(0,p.useState)(null);(0,p.useImperativeHandle)(t,(()=>({focus:()=>{const e=v.current;if(e){var t;const i=null===(t=e.value)||void 0===t?void 0:t.length;e.focus(),i&&e.setSelectionRange(i,i)}},element:v.current})),[]);const T=(0,p.useCallback)((()=>{const e=v.current;if(e&&k){const t=function(e,t){const{minRows:i=null,maxRows:n=null,borderSize:a=2,paddingSize:r=8}=null!=t?t:{};let o,s,l;bt||(bt=document.createElement("textarea"),bt.setAttribute("tab-index","-1"),bt.setAttribute("aria-hidden","true"),document.body.appendChild(bt)),bt.setAttribute("style",dt(e)),bt.value=e.value||e.placeholder||"";let c=bt.scrollHeight+a;if(null!==i||null!==n){const e=parseFloat(window.getComputedStyle(bt).getPropertyValue("line-height"));null!==i&&(o=e*i+r+a,c=Math.max(o,c)),null!==n&&(s=e*n+r+a,c<=s&&(l="hidden"),c=Math.min(s,c))}const d={height:c,overflowY:l,resize:"none"};return o&&(d.minHeight=o),s&&(d.maxHeight=s),d}(e,{minRows:n,maxRows:a,borderSize:r,paddingSize:o});(0,mt.flushSync)((()=>{y(t)}))}}),[k,a,n,r,o]);(0,p.useEffect)((()=>{f(null!=l?l:"")}),[l]),(0,p.useEffect)((()=>{T()}),[T,E]);const C=(0,p.useRef)(!1),S=(0,p.useCallback)((e=>{C.current=!0,null==b||b(e)}),[b]),_=(0,p.useCallback)((e=>{C.current=!1,null==A||A(e)}),[A]),N=(0,p.useCallback)((e=>{C.current||!1!==(null==g?void 0:g(e))&&"Enter"===e.key&&("enter-without-shift"===d?!e.shiftKey:"enter-with-mod"===d&&e[At])&&(e.preventDefault(),e.stopPropagation(),null==m||m(e))}),[g,m,d]);return(0,p.useLayoutEffect)((()=>{const e=null==h?void 0:h.current,t=v.current;if(e&&t){const{start:i,end:n}=e;h.current=null,t.setSelectionRange(i,n)}}),[h,E]),(0,p.useEffect)((()=>{const e=null==s?void 0:s.current;if(!e||!k)return;let t;const i=new gt.A((i=>{for(const n of i)if(n.target===e){const e=n.contentBoxSize?n.contentBoxSize[0]?n.contentBoxSize[0].inlineSize:n.contentBoxSize.inlineSize:n.contentRect.width;if(void 0!==e&&e!==t){const i=!t;t=e,i||requestAnimationFrame(T)}}}));return i.observe(e),()=>{i.disconnect()}}),[k,s,T]),p.createElement("textarea",(0,ut.A)({},x,{ref:v,value:E,style:{...c,...w},onChange:e=>{f(e.target.value),null==u||u(e)},onCompositionStart:S,onCompositionEnd:_,onKeyDown:N}))}let Et=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const ft="bricks/ai-portal/chat-box",vt={en:{[Et.ASK_ANY_THING]:"Ask anything",[Et.COMMON_TASKS]:"Common tasks"},zh:{[Et.ASK_ANY_THING]:"询问任何问题",[Et.COMMON_TASKS]:"常用任务"}},wt=g.i18n.getFixedT(null,ft);var yt,Tt=i(47008);let Ct,St,_t,Nt,Rt,Mt,It,Ot,Wt,Dt,Lt,Pt,zt,Ut,Ht,Bt,Vt,jt;(0,g.initializeI18n)(ft,vt);const Ft=(0,m.wrapBrick)("eo-icon"),Gt=(0,m.wrapBrick)("eo-actions",{onActionClick:"action.click",onItemDragEnd:"item.drag.end",onItemDragStart:"item.drag.start"}),{defineElement:Yt,property:Kt,event:Jt,method:$t}=(0,u.createDecorators)(),qt=(0,p.forwardRef)(li);let Xt;var Qt=new WeakMap,Zt=new WeakMap,ei=new WeakMap,ti=new WeakMap,ii=new WeakMap,ni=new WeakSet,ai=new WeakMap,ri=new WeakMap,oi=new WeakMap;class si extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ni),(0,lt.A)(this,"ref",(Ct(this),(0,p.createRef)())),(0,r.A)(this,Qt,_t(this)),(0,r.A)(this,Zt,(Nt(this),Rt(this))),(0,r.A)(this,ei,(Mt(this),It(this))),(0,r.A)(this,ti,(Ot(this),Wt(this))),(0,r.A)(this,ii,(Dt(this),Lt(this))),(0,r.A)(this,ai,(Ut(this),e=>{(0,s.A)(ni,this,Pt).emit(e)})),(0,r.A)(this,ri,Ht(this)),(0,r.A)(this,oi,(jt(this),e=>{(0,s.A)(ni,this,Bt).emit(e)}))}get disabled(){return(0,c.A)(Qt,this)}set disabled(e){(0,l.A)(Qt,this,e)}get placeholder(){return(0,c.A)(Zt,this)}set placeholder(e){(0,l.A)(Zt,this,e)}get autoFocus(){return(0,c.A)(ei,this)}set autoFocus(e){(0,l.A)(ei,this,e)}get aiEmployees(){return(0,c.A)(ti,this)}set aiEmployees(e){(0,l.A)(ti,this,e)}setValue(e){var t;null===(t=this.ref.current)||void 0===t||t.setValue(e)}getValue(){var e;return null===(e=this.ref.current)||void 0===e?void 0:e.getValue()}focusOnInput(){var e;return null===(e=this.ref.current)||void 0===e?void 0:e.focusOnInput()}render(){return h().createElement(qt,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,aiEmployees:this.aiEmployees,onSubmit:(0,c.A)(ai,this),onEmployeeMention:(0,c.A)(oi,this),ref:this.ref})}}function li(e,t){let{disabled:i,placeholder:n,autoFocus:a,aiEmployees:r,onSubmit:o,onEmployeeMention:s}=e;const l=(0,p.useRef)(null),c=(0,p.useRef)(null),[d,u]=(0,p.useState)(""),m=(0,p.useRef)(""),[g,b]=(0,p.useState)(null),[A,x]=(0,p.useState)(""),[k,E]=(0,p.useState)(0),f=(0,p.useRef)(null);(0,p.useEffect)((()=>{const e=window.__elevo_try_it_out;e&&delete window.__elevo_try_it_out,"string"==typeof(null==e?void 0:e.content)&&(m.current=e.content,u(e.content))}),[]),(0,p.useImperativeHandle)(t,(()=>({setValue:e=>{m.current=e,u(e)},getValue:()=>m.current,focusOnInput:()=>{var e;null===(e=c.current)||void 0===e||e.focus()}})));const v=(0,p.useCallback)((e=>{e.currentTarget.value&&o(e.currentTarget.value)}),[o]),w=(0,p.useCallback)((e=>{const{value:t,selectionStart:i,selectionEnd:n}=e.target;if(m.current=t,u(t),!A&&null!==i&&i===n&&null!=r&&r.length){const n=t.slice(0,i),a=n.lastIndexOf("@");if(a>=0){const t=n.slice(a+1).toLowerCase(),o=function(e,t){pt||(pt=document.createElement("div"),pt.setAttribute("tab-index","-1"),pt.setAttribute("aria-hidden","true"),document.body.appendChild(pt)),pt.setAttribute("style",dt(e)),pt.textContent=e.value.slice(0,t);const i=document.createElement("span");i.textContent="",pt.appendChild(i);const n=i.getBoundingClientRect();return i.remove(),{top:n.top,left:n.left}}(e.currentTarget,i),s=r.filter((e=>e.employeeId.toLowerCase().includes(t)||e.name.toLowerCase().includes(t))).slice(0,10);if(s.length>0)return b({position:{left:o.left+10,top:o.top+22},range:{start:a,end:i},actions:s.map((e=>({key:e.employeeId,text:e.name,data:e})))}),void E(0)}}b(null)}),[r,A]);(0,p.useEffect)((()=>{A&&!d.includes(A)&&(x(""),s(null))}),[A,s,d]);const y=(0,p.useCallback)((()=>{o(m.current)}),[o]);(0,p.useEffect)((()=>{a&&Promise.resolve().then((()=>{var e;null===(e=c.current)||void 0===e||e.focus()}))}),[]);const T=(0,p.useMemo)((()=>{var e;const t=null===(e=c.current)||void 0===e?void 0:e.element;if(!A||!t)return"";const i=d.indexOf(A);return i<0?"":d.slice(0,i)}),[A,d]),C=(0,p.useMemo)((()=>{var e;const t=null===(e=c.current)||void 0===e?void 0:e.element;if(!A||!t)return null;const i=function(e,t,i){ht||(ht=document.createElement("div"),ht.setAttribute("tab-index","-1"),ht.setAttribute("aria-hidden","true"),document.body.appendChild(ht)),ht.setAttribute("style",dt(e)),ht.textContent=t;const n=document.createElement("span");n.textContent=i,ht.appendChild(n);const a=n.getBoundingClientRect();return n.remove(),a}(t,T,A.slice(0,-1));return{left:i.left-1,top:i.top-1,width:i.width+4,height:i.height+4}}),[A,T]),S=(0,p.useCallback)((e=>{const t=`@${e.text} `,i=`${m.current.slice(0,g.range.start)}${t}`,n=`${i}${m.current.slice(g.range.end)}`;m.current=n,f.current={start:i.length,end:i.length},u(n),x(t),b(null),s(e.data)}),[g,s]),_=(0,p.useCallback)((e=>{switch(e.key){case"Escape":if(!g)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),b(null),!1;case"ArrowUp":case"ArrowDown":if(!g)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),E((t=>{const i=t+("ArrowUp"===e.key?-1:1),n=g.actions.length;return(n+i)%n})),!1;case"Enter":if(!g)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),S(g.actions[k]),!1;case"Delete":case"Backspace":if(null!=A&&A.length){let{selectionStart:t,selectionEnd:i}=e.currentTarget;t===i&&("Backspace"===e.key?t-=1:i+=1);const n=T.length,a=n+A.length;if(t<a&&i>n){const r=Math.min(t,n),o=Math.max(i,a),s=`${m.current.slice(0,r)}${m.current.slice(o)}`;return m.current=s,f.current={start:r,end:r},u(s),e.preventDefault(),e.stopPropagation(),!1}}}}),[k,S,g,T.length,null==A?void 0:A.length]);return h().createElement("div",{className:"root"},h().createElement("div",{className:"container",ref:l},h().createElement(xt,{containerRef:l,ref:c,value:d,minRows:58/22,paddingSize:60,autoResize:!0,disabled:i,placeholder:null!=n?n:wt(Et.ASK_ANY_THING),submitWhen:"enter-without-shift",desiredSelectionRef:f,onSubmit:v,onChange:w,onKeyDown:_}),h().createElement("div",{className:"actions-bar"},h().createElement("div",null,h().createElement("slot",{name:"actions"})),h().createElement("button",{className:"btn-send",disabled:!d,onClick:y},h().createElement(Ft,{lib:"fa",prefix:"fas",icon:"arrow-up"}))),g&&h().createElement(Gt,{className:"mentions",actions:g.actions,style:g.position,onActionClick:e=>S(e.detail),checkedKeys:[g.actions[k].key]}),C&&h().createElement("div",{className:"mention-overlay",style:C})))}yt=si,({e:[_t,Nt,Rt,Mt,It,Ot,Wt,Dt,Lt,Pt,zt,Ut,Ht,Bt,Vt,jt,Ct],c:[Xt,St]}=(0,d.A)(yt,[Yt("ai-portal.chat-box",{styleTexts:[Tt.A],shadowOptions:{delegatesFocus:!0}})],[[Kt({type:Boolean}),1,"disabled"],[Kt(),1,"placeholder"],[Kt({type:Boolean}),1,"autoFocus"],[Kt({attribute:!1}),1,"aiEmployees"],[Jt({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(ii,e),(e,t)=>(0,l.A)(ii,e,t)],[Jt({type:"ai-employee.mention"}),1,"employeeMention",e=>(0,c.A)(ri,e),(e,t)=>(0,l.A)(ri,e,t)],[$t(),2,"setValue"],[$t(),2,"getValue"],[$t(),2,"focusOnInput"]],0,(e=>oi.has((0,o.A)(e))),m.ReactNextElement)),St();var ci,di=i(82165);let pi;const{defineElement:hi}=(0,u.createDecorators)();let ui;class mi extends m.ReactNextElement{render(){return h().createElement(gi,null)}}function gi(){return h().createElement("slot",null)}ci=mi,[ui,pi]=(0,d.A)(ci,[hi("ai-portal.home-container",{styleTexts:[di.A]})],[],0,void 0,m.ReactNextElement).c,pi();var bi,Ai=i(24);let xi,ki,Ei,fi,vi,wi,yi,Ti,Ci,Si,_i,Ni,Ri,Mi,Ii,Oi,Wi,Di,Li,Pi,zi;const Ui=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:Hi,property:Bi}=(0,u.createDecorators)();let Vi;var ji=new WeakMap,Fi=new WeakMap,Gi=new WeakMap,Yi=new WeakMap,Ki=new WeakMap,Ji=new WeakMap,$i=new WeakMap,qi=new WeakMap,Xi=new WeakMap,Qi=new WeakMap;class Zi extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ji,ki(this)),(0,r.A)(this,Fi,(Ei(this),fi(this))),(0,r.A)(this,Gi,(vi(this),wi(this))),(0,r.A)(this,Yi,(yi(this),Ti(this))),(0,r.A)(this,Ki,(Ci(this),Si(this))),(0,r.A)(this,Ji,(_i(this),Ni(this))),(0,r.A)(this,$i,(Ri(this),Mi(this))),(0,r.A)(this,qi,(Ii(this),Oi(this))),(0,r.A)(this,Xi,(Wi(this),Di(this))),(0,r.A)(this,Qi,(Li(this),Pi(this))),zi(this)}get label(){return(0,c.A)(ji,this)}set label(e){(0,l.A)(ji,this,e)}get value(){return(0,c.A)(Fi,this)}set value(e){(0,l.A)(Fi,this,e)}get size(){return(0,c.A)(Gi,this)}set size(e){(0,l.A)(Gi,this,e)}get lineColor(){return(0,c.A)(Yi,this)}set lineColor(e){(0,l.A)(Yi,this,e)}get showArea(){return(0,c.A)(Ki,this)}set showArea(e){(0,l.A)(Ki,this,e)}get min(){return(0,c.A)(Ji,this)}set min(e){(0,l.A)(Ji,this,e)}get max(){return(0,c.A)($i,this)}set max(e){(0,l.A)($i,this,e)}get xField(){return(0,c.A)(qi,this)}set xField(e){(0,l.A)(qi,this,e)}get yField(){return(0,c.A)(Xi,this)}set yField(e){(0,l.A)(Xi,this,e)}get data(){return(0,c.A)(Qi,this)}set data(e){(0,l.A)(Qi,this,e)}render(){return h().createElement(en,{label:this.label,value:this.value,size:this.size,lineColor:this.lineColor,showArea:this.showArea,min:this.min,max:this.max,xField:this.xField,yField:this.yField,data:this.data})}}function en(e){let{label:t,value:i,size:n,...a}=e;return"small"===n?h().createElement("div",{className:"container"},h().createElement("div",{className:"label-and-stat"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat"},i)),h().createElement("div",{className:"chart"},h().createElement(Ui,(0,ut.A)({},a,{lineWidth:1.5,width:"auto",height:"55"})))):h().createElement("div",{className:"container"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat-and-chart"},h().createElement("div",{className:"chart"},h().createElement(Ui,(0,ut.A)({},a,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},i)))}bi=Zi,({e:[ki,Ei,fi,vi,wi,yi,Ti,Ci,Si,_i,Ni,Ri,Mi,Ii,Oi,Wi,Di,Li,Pi,zi],c:[Vi,xi]}=(0,d.A)(bi,[Hi("ai-portal.stat-with-mini-chart",{styleTexts:[Ai.A]})],[[Bi(),1,"label"],[Bi(),1,"value"],[Bi(),1,"size"],[Bi(),1,"lineColor"],[Bi({type:Boolean}),1,"showArea"],[Bi({type:Number}),1,"min"],[Bi({type:Number}),1,"max"],[Bi(),1,"xField"],[Bi(),1,"yField"],[Bi({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),xi();var tn=i(51921),nn=i(53373),an=i.n(nn);let rn=function(e){return e.NEW_CHAT="NEW_CHAT",e.LOGOUT="LOGOUT",e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e.SWITCH_LANGUAGE="SWITCH_LANGUAGE",e.PROJECTS="PROJECTS",e.HISTORY="HISTORY",e.CREATE_PROJECT="CREATE_PROJECT",e.MOVE_TO_PROJECT="MOVE_TO_PROJECT",e.UNTITLED="UNTITLED",e.UNNAMED="UNNAMED",e}({});const on="bricks/ai-portal/elevo-sidebar",sn={en:{[rn.NEW_CHAT]:"New chat",[rn.LOGOUT]:"Logout",[rn.TODAY]:"Today",[rn.YESTERDAY]:"Yesterday",[rn.PREVIOUS_7_DAYS]:"Previous 7 days",[rn.PREVIOUS_30_DAYS]:"Previous 30 days",[rn.SWITCH_LANGUAGE]:"中文",[rn.PROJECTS]:"Projects",[rn.HISTORY]:"Chats",[rn.CREATE_PROJECT]:"Create project",[rn.MOVE_TO_PROJECT]:"Move to project",[rn.UNTITLED]:"Untitled",[rn.UNNAMED]:"Unnamed"},zh:{[rn.NEW_CHAT]:"新对话",[rn.LOGOUT]:"登出",[rn.TODAY]:"今天",[rn.YESTERDAY]:"昨天",[rn.PREVIOUS_7_DAYS]:"过去7天",[rn.PREVIOUS_30_DAYS]:"过去30天",[rn.SWITCH_LANGUAGE]:"English",[rn.PROJECTS]:"项目",[rn.HISTORY]:"对话",[rn.CREATE_PROJECT]:"创建项目",[rn.MOVE_TO_PROJECT]:"移动到项目",[rn.UNTITLED]:"无标题",[rn.UNNAMED]:"未命名"}},ln=g.i18n.getFixedT(null,on);var cn=i(61408);const dn=(0,m.wrapBrick)("eo-icon"),pn=(0,m.wrapBrick)("eo-link"),hn=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),un=(0,m.wrapBrick)("eo-easyops-avatar"),mn=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),gn=(0,m.wrapBrick)("ai-portal.icon-button");var bn=i(22919);const An=async(e,t)=>(await bn.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{...t,params:e})).data;var xn=i(41030),kn=i(97907),En=i(98343);const fn={lib:"fa",icon:"plus"},vn=(0,p.forwardRef)(wn);function wn(e,t){let{historyActiveId:i,historyActions:n,historyUrlTemplate:a,projectActiveId:r,projectUrlTemplate:o,projectActions:s,canAddProject:l,onActionClick:c,onHistoryClick:d,onProjectActionClick:u,onAddProject:m}=e;const g=(0,p.useRef)(null),[b,A]=(0,p.useState)(null),[x,k]=(0,p.useState)(!1),[E,f]=(0,p.useState)(!1),[v,w]=(0,p.useState)(null),[y,T]=(0,p.useState)(!1),[C,S]=(0,p.useState)(),[_,N]=(0,p.useState)(),[R,M]=(0,p.useState)(!1),I=(0,p.useRef)(!0),[O,W]=(0,p.useState)([]),D=(0,p.useMemo)((()=>[...null!=n?n:[],{isDropdown:!0,text:ln(rn.MOVE_TO_PROJECT),disabled:!(null!=b&&b.length),items:null==b?void 0:b.map((e=>({event:"move",key:e.instanceId,text:e.name,project:e})))}]),[n,b]);(0,p.useEffect)((()=>{(async()=>{try{const e=await(async()=>(await bn.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/projects",{params:{page:1,page_size:3e3}})).data)();A(e.list)}catch(e){console.error("Error loading projects:",e),f(!0),A([])}})()}),[]),(0,p.useEffect)((()=>{Promise.all([An({token:_,limit:30,onlyOwner:!0,onlyUnrelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}}),...I.current?[]:[new Promise((e=>setTimeout(e,500)))]]).then((e=>{let[t]=e;I.current=!1,w((e=>[...null!=e?e:[],...t.conversations])),S(t.nextToken)})).catch((e=>{console.error("Error loading chat history:",e),w([]),M(!0)}))}),[_]);const[L,P]=(0,p.useState)(null),z=(0,p.useRef)(null);(0,p.useEffect)((()=>{const e=z.current,t=g.current;if(!e||!C||!t||y)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&N(C)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[C,y]);const U=(0,p.useRef)(0),H=(0,p.useCallback)((async()=>{try{const e=++U.current,t=await An({limit:30,onlyOwner:!0,onlyUnrelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==U.current)return;w((e=>{const i=null!=e?e:[],n=t.conversations,a=new Set(n.map((e=>e.conversationId))),r=new Map(n.map((e=>[e.conversationId,e])));let o=!1,s=!1,l=!0;for(const e of i){const t=r.get(e.conversationId);if(!t)break;if(o=!0,s=l&&t!==n[0]||!(0,xn.isEqual)(t,e),s)break;l=!1}return o?s?[...n,...i.filter((e=>!a.has(e.conversationId)))]:e:(S(t.nextToken),n)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);(0,p.useImperativeHandle)(t,(()=>({pull:H,removeProject:e=>{A((t=>t?t.filter((t=>t.instanceId!==e)):t))},addProject:e=>{A((t=>t?[...t,e]:[e]))},moveConversation:e=>{W((t=>[...t,e]))}})),[H]);const B=(0,p.useMemo)((()=>v&&v.length?v.filter((e=>!O.includes(e.conversationId))):v),[v,O]);return h().createElement("div",{className:"history",ref:g},h().createElement("div",{className:an()("section",{collapsed:x})},h().createElement("div",{className:"section-title"},h().createElement("div",{className:"section-label",onClick:()=>k((e=>!e))},ln(rn.PROJECTS),h().createElement(dn,{lib:"fa",icon:"angle-down"})),l&&h().createElement(gn,{icon:fn,variant:"mini-light",tooltip:ln(rn.CREATE_PROJECT),onClick:m})),h().createElement("ul",{className:"items"},E?h().createElement("li",{className:"error"},"Failed to load project"):b?b.map((e=>h().createElement("li",{key:e.instanceId},h().createElement(pn,(0,ut.A)({className:an()("item",{"actions-active":e.instanceId===L,active:e.instanceId===r}),onClick:d},o?{url:(0,En.Q)(o,e)}:null),h().createElement("div",{className:"item-title",title:e.name},e.name||ln(rn.UNNAMED)),h().createElement(mn,{className:"actions",actions:s,onActionClick:t=>{u({action:t.detail,project:e})},onVisibleChange:t=>{P(t.detail?e.instanceId:null)}}))))):h().createElement("li",{className:"loading"},h().createElement(dn,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))),h().createElement("div",{className:an()("section",{collapsed:y})},h().createElement("div",{className:"section-title"},h().createElement("div",{className:"section-label",onClick:()=>T((e=>!e))},ln(rn.HISTORY),h().createElement(dn,{lib:"fa",icon:"angle-down"}))),h().createElement("ul",{className:"items"},B?B.map((e=>h().createElement("li",{key:e.conversationId},h().createElement(pn,(0,ut.A)({className:an()("item",{"actions-active":e.conversationId===L,active:e.conversationId===i}),onClick:d},a?{url:(0,En.Q)(a,e)}:null),h().createElement("div",{className:"item-title",title:e.title},e.title||ln(rn.UNTITLED)),h().createElement(mn,{className:"actions",actions:D,onActionClick:t=>{c({action:t.detail,item:e})},onVisibleChange:t=>{P(t.detail?e.conversationId:null)}}),!kn.QB.includes(e.state)&&h().createElement("div",{className:"working"}))))):h().createElement("li",{className:"loading"},h().createElement(dn,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),R?h().createElement("li",{className:"error"},"Failed to load chat history"):null),!y&&C&&h().createElement("div",{className:"load-more",ref:z},h().createElement(dn,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))))}var yn;let Tn,Cn,Sn,_n,Nn,Rn,Mn,In,On,Wn,Dn,Ln,Pn,zn,Un,Hn,Bn,Vn,jn,Fn,Gn,Yn,Kn,Jn,$n,qn,Xn,Qn,Zn,ea,ta,ia,na,aa,ra,oa,sa,la,ca,da,pa,ha,ua,ma,ga,ba;(0,g.initializeI18n)(on,sn);const Aa={lib:"easyops",icon:"sidebar"},xa=(0,m.wrapBrick)("ai-portal.elevo-logo"),{defineElement:ka,property:Ea,event:fa,method:va}=(0,u.createDecorators)(),wa=(0,p.forwardRef)(qa);let ya;var Ta=new WeakMap,Ca=new WeakMap,Sa=new WeakMap,_a=new WeakMap,Na=new WeakMap,Ra=new WeakMap,Ma=new WeakMap,Ia=new WeakMap,Oa=new WeakMap,Wa=new WeakMap,Da=new WeakMap,La=new WeakMap,Pa=new WeakMap,za=new WeakMap,Ua=new WeakMap,Ha=new WeakSet,Ba=new WeakMap,Va=new WeakMap,ja=new WeakMap,Fa=new WeakMap,Ga=new WeakMap,Ya=new WeakMap,Ka=new WeakMap,Ja=new WeakMap;class $a extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ha),(0,r.A)(this,Ta,(Tn(this),Sn(this))),(0,r.A)(this,Ca,(_n(this),Nn(this))),(0,r.A)(this,Sa,(Rn(this),Mn(this))),(0,r.A)(this,_a,(In(this),On(this))),(0,r.A)(this,Na,(Wn(this),Dn(this))),(0,r.A)(this,Ra,(Ln(this),Pn(this))),(0,r.A)(this,Ma,(zn(this),Un(this))),(0,r.A)(this,Ia,(Hn(this),Bn(this))),(0,r.A)(this,Oa,(Vn(this),jn(this))),(0,r.A)(this,Wa,(Fn(this),Gn(this))),(0,r.A)(this,Da,(Yn(this),Kn(this))),(0,r.A)(this,La,(Jn(this),$n(this))),(0,r.A)(this,Pa,(qn(this),Xn(this))),(0,r.A)(this,za,(Qn(this),Zn(this,!0))),(0,r.A)(this,Ua,(ea(this),ta(this))),(0,r.A)(this,Ba,(aa(this),()=>{(0,s.A)(Ha,this,ia).emit()})),(0,r.A)(this,Va,ra(this)),(0,r.A)(this,ja,(la(this),e=>{(0,s.A)(Ha,this,oa).emit(e)})),(0,r.A)(this,Fa,ca(this)),(0,r.A)(this,Ga,(ha(this),e=>{(0,s.A)(Ha,this,da).emit(e)})),(0,r.A)(this,Ya,ua(this)),(0,r.A)(this,Ka,(ba(this),()=>{(0,s.A)(Ha,this,ma).emit()})),(0,r.A)(this,Ja,(0,p.createRef)())}get userInstanceId(){return(0,c.A)(Ta,this)}set userInstanceId(e){(0,l.A)(Ta,this,e)}get behavior(){return(0,c.A)(Ca,this)}set behavior(e){(0,l.A)(Ca,this,e)}get bordered(){return(0,c.A)(Sa,this)}set bordered(e){(0,l.A)(Sa,this,e)}get logoUrl(){return(0,c.A)(_a,this)}set logoUrl(e){(0,l.A)(_a,this,e)}get newChatUrl(){return(0,c.A)(Na,this)}set newChatUrl(e){(0,l.A)(Na,this,e)}get newChatLinkWhenCollapsed(){return(0,c.A)(Ra,this)}set newChatLinkWhenCollapsed(e){(0,l.A)(Ra,this,e)}get historyActiveId(){return(0,c.A)(Ma,this)}set historyActiveId(e){(0,l.A)(Ma,this,e)}get historyUrlTemplate(){return(0,c.A)(Ia,this)}set historyUrlTemplate(e){(0,l.A)(Ia,this,e)}get historyActions(){return(0,c.A)(Oa,this)}set historyActions(e){(0,l.A)(Oa,this,e)}get projectActiveId(){return(0,c.A)(Wa,this)}set projectActiveId(e){(0,l.A)(Wa,this,e)}get projectUrlTemplate(){return(0,c.A)(Da,this)}set projectUrlTemplate(e){(0,l.A)(Da,this,e)}get projectActions(){return(0,c.A)(La,this)}set projectActions(e){(0,l.A)(La,this,e)}get links(){return(0,c.A)(Pa,this)}set links(e){(0,l.A)(Pa,this,e)}get canAddProject(){return(0,c.A)(za,this)}set canAddProject(e){(0,l.A)(za,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(Ja,this).current)||void 0===e||e.pull()}),e)}close(){var e;null===(e=(0,c.A)(Ja,this).current)||void 0===e||e.close()}removeProject(e){var t,i;null===(t=(0,c.A)(Ja,this).current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)}addProject(e){var t,i;null===(t=(0,c.A)(Ja,this).current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)}moveConversation(e){var t,i;null===(t=(0,c.A)(Ja,this).current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)}render(){return h().createElement(wa,{ref:(0,c.A)(Ja,this),userInstanceId:this.userInstanceId,behavior:this.behavior,logoUrl:this.logoUrl,newChatUrl:this.newChatUrl,newChatLinkWhenCollapsed:this.newChatLinkWhenCollapsed,historyActiveId:this.historyActiveId,historyUrlTemplate:this.historyUrlTemplate,historyActions:this.historyActions,projectActiveId:this.projectActiveId,projectUrlTemplate:this.projectUrlTemplate,projectActions:this.projectActions,links:this.links,canAddProject:this.canAddProject,onLogout:(0,c.A)(Ba,this),onActionClick:(0,c.A)(ja,this),onProjectActionClick:(0,c.A)(Ga,this),onAddProject:(0,c.A)(Ka,this)})}}function qa(e,t){let{userInstanceId:i,behavior:n,logoUrl:a,newChatUrl:r,newChatLinkWhenCollapsed:o,historyActiveId:s,historyUrlTemplate:l,historyActions:c,projectActiveId:d,projectUrlTemplate:u,projectActions:m,links:b,canAddProject:A,onLogout:x,onActionClick:k,onProjectActionClick:E,onAddProject:f}=e;const[v,w]=(0,p.useState)("drawer"===n),y=(0,p.useCallback)((()=>{w(!0)}),[]),T=(0,p.useCallback)((()=>{w(!1)}),[]);(0,p.useEffect)((()=>{"drawer"===n&&w(!0)}),[n]);const C=(0,p.useCallback)((()=>{w(!0)}),[]),S=(0,p.useCallback)((()=>{"drawer"===n&&w(!0)}),[n]),_=(0,p.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:ln(rn.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:ln(rn.SWITCH_LANGUAGE)}]),[]),N=(0,p.useRef)(null);return(0,p.useImperativeHandle)(t,(()=>({close:()=>{w(!0)},pull:()=>{var e;null===(e=N.current)||void 0===e||e.pull()},removeProject:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)},addProject:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)},moveConversation:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)}})),[]),h().createElement("div",{className:an()("container",{collapsed:v})},"drawer"===n&&!v&&h().createElement("div",{className:"mask",onClick:C}),h().createElement("div",{className:"alternative"},h().createElement(gn,{icon:Aa,variant:"light",onClick:T}),o&&h().createElement(pn,{className:"new-chat",url:r},h().createElement(dn,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),ln(rn.NEW_CHAT))),h().createElement("div",{className:"sidebar"},h().createElement("div",{className:"logo-bar"},h().createElement(pn,{url:a,className:"logo-link"},h().createElement(xa,null)),h().createElement(gn,{icon:Aa,variant:"light",onClick:y})),h().createElement(pn,{className:"new-chat",url:r},h().createElement(dn,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),ln(rn.NEW_CHAT)),null!=b&&b.length?h().createElement("div",{className:"links"},b.map(((e,t)=>h().createElement(pn,{className:"link",key:t,url:e.url},h().createElement(dn,(0,ut.A)({className:"icon"},e.icon)),h().createElement("span",{className:"title"},e.title))))):null,h().createElement(vn,{ref:N,canAddProject:A,historyActiveId:s,historyUrlTemplate:l,historyActions:c,projectActiveId:d,projectUrlTemplate:u,projectActions:m,onActionClick:k,onHistoryClick:S,onProjectActionClick:E,onAddProject:f}),h().createElement("div",{className:"footer"},h().createElement(hn,{className:"dropdown",actions:_,onActionClick:async e=>{"logout"===e.detail.key?x():(await g.i18n.changeLanguage(g.i18n.language&&"en"===g.i18n.language.split("-")[0]?"zh":"en"),(0,tn.getHistory)().reload())}},h().createElement("button",{className:"account"},h().createElement(un,{nameOrInstanceId:i,showName:!0,size:"xs"}))))))}yn=$a,({e:[Sn,_n,Nn,Rn,Mn,In,On,Wn,Dn,Ln,Pn,zn,Un,Hn,Bn,Vn,jn,Fn,Gn,Yn,Kn,Jn,$n,qn,Xn,Qn,Zn,ea,ta,ia,na,aa,ra,oa,sa,la,ca,da,pa,ha,ua,ma,ga,ba,Tn],c:[ya,Cn]}=(0,d.A)(yn,[ka("ai-portal.elevo-sidebar",{styleTexts:[cn.A]})],[[Ea(),1,"userInstanceId"],[Ea(),1,"behavior"],[Ea({type:Boolean,render:!1}),1,"bordered"],[Ea(),1,"logoUrl"],[Ea(),1,"newChatUrl"],[Ea({type:Boolean}),1,"newChatLinkWhenCollapsed"],[Ea(),1,"historyActiveId"],[Ea(),1,"historyUrlTemplate"],[Ea({attribute:!1}),1,"historyActions"],[Ea(),1,"projectActiveId"],[Ea(),1,"projectUrlTemplate"],[Ea({attribute:!1}),1,"projectActions"],[Ea({attribute:!1}),1,"links"],[Ea({type:Boolean}),1,"canAddProject"],[fa({type:"logout"}),1,"logout",e=>(0,c.A)(Ua,e),(e,t)=>(0,l.A)(Ua,e,t)],[fa({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Va,e),(e,t)=>(0,l.A)(Va,e,t)],[fa({type:"project.action.click"}),1,"projectActionClick",e=>(0,c.A)(Fa,e),(e,t)=>(0,l.A)(Fa,e,t)],[fa({type:"add.project"}),1,"addProject",e=>(0,c.A)(Ya,e),(e,t)=>(0,l.A)(Ya,e,t)],[va(),2,"pullHistory"],[va(),2,"close"],[va(),2,"removeProject"],[va(),2,"addProject"],[va(),2,"moveConversation"]],0,(e=>Ja.has((0,o.A)(e))),m.ReactNextElement)),Cn();var Xa,Qa=i(47338);let Za,er,tr,ir,nr,ar,rr,or,sr;const lr=(0,m.wrapBrick)("eo-icon"),cr=(0,m.wrapBrick)("eo-tooltip"),{defineElement:dr,property:pr}=(0,u.createDecorators)();let hr;var ur=new WeakMap,mr=new WeakMap,gr=new WeakMap,br=new WeakMap;class Ar extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ur,er(this)),(0,r.A)(this,mr,(tr(this),ir(this))),(0,r.A)(this,gr,(nr(this),ar(this))),(0,r.A)(this,br,(rr(this),or(this))),sr(this)}get icon(){return(0,c.A)(ur,this)}set icon(e){(0,l.A)(ur,this,e)}get tooltip(){return(0,c.A)(mr,this)}set tooltip(e){(0,l.A)(mr,this,e)}get disabled(){return(0,c.A)(gr,this)}set disabled(e){(0,l.A)(gr,this,e)}get variant(){return(0,c.A)(br,this)}set variant(e){(0,l.A)(br,this,e)}render(){return h().createElement(xr,{icon:this.icon,tooltip:this.tooltip,disabled:this.disabled})}}function xr(e){let{icon:t,tooltip:i,disabled:n}=e;const a=h().createElement("button",{disabled:n},h().createElement(lr,t));return i?h().createElement(cr,{content:i},a):a}Xa=Ar,({e:[er,tr,ir,nr,ar,rr,or,sr],c:[hr,Za]}=(0,d.A)(Xa,[dr("ai-portal.icon-button",{styleTexts:[Qa.A]})],[[pr({attribute:!1}),1,"icon"],[pr(),1,"tooltip"],[pr({type:Boolean}),1,"disabled"],[pr({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),Za();let kr=function(e){return e.ALL="ALL",e.EXPLORE_EXCELLENT_CASES="EXPLORE_EXCELLENT_CASES",e}({});const Er="bricks/ai-portal/show-cases",fr={en:{[kr.ALL]:"All",[kr.EXPLORE_EXCELLENT_CASES]:"Explore excellent cases"},zh:{[kr.ALL]:"全部",[kr.EXPLORE_EXCELLENT_CASES]:"探索优秀案例"}},vr=g.i18n.getFixedT(null,Er);var wr,yr=i(42873);let Tr,Cr,Sr;(0,g.initializeI18n)(Er,fr);const _r=(0,m.wrapBrick)("ai-portal.show-case"),Nr=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:Rr,property:Mr}=(0,u.createDecorators)();let Ir;var Or=new WeakMap;class Wr extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Or,Cr(this)),Sr(this)}get list(){return(0,c.A)(Or,this)}set list(e){(0,l.A)(Or,this,e)}render(){return h().createElement(Dr,{list:this.list})}}function Dr(e){let{list:t}=e;const i=(0,p.useMemo)((()=>["",...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[n,a]=(0,p.useState)(""),r=(0,p.useMemo)((()=>n?null==t?void 0:t.filter((e=>e.scenario===n)):t),[n,t]),o=(0,p.useMemo)((()=>i.map((e=>({id:e,label:""===e?vr(kr.ALL):e})))),[i]);return null!=t&&t.length?h().createElement(h().Fragment,null,h().createElement("div",{className:"tips"},`${vr(kr.EXPLORE_EXCELLENT_CASES)} ↓`),h().createElement(Nr,{tabs:o,activeTab:n,onTabClick:e=>a(e.detail.id)}),h().createElement("ul",{className:"cases"},null==r?void 0:r.map((e=>h().createElement("li",{key:e.conversationId},h().createElement(_r,{caseTitle:e.title,summary:e.summary,url:e.url})))))):null}wr=Wr,({e:[Cr,Sr],c:[Ir,Tr]}=(0,d.A)(wr,[Rr("ai-portal.show-cases",{styleTexts:[yr.A]})],[[Mr({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),Tr();let Lr=function(e){return e.MCP_HUB="MCP_HUB",e.ALL="ALL",e.SERVER_cmdb="SERVER_cmdb",e.SERVER_cmdb_product_helper="SERVER_cmdb_product_helper",e.SERVER_alert="SERVER_alert",e.SERVER_web_builder="SERVER_web_builder",e.SERVER_web_builder2="SERVER_web_builder2",e.SERVER_host_troubleshooting="SERVER_host_troubleshooting",e.SERVER_system_inspection="SERVER_system_inspection",e.SERVER_grafana="SERVER_grafana",e.SERVER_kubernetes="SERVER_kubernetes",e.SERVER_llm="SERVER_llm",e}({});const Pr="bricks/ai-portal/mcp-tools",zr={en:{[Lr.MCP_HUB]:"MCP Hub",[Lr.ALL]:"All",[Lr.SERVER_cmdb]:"CMDB",[Lr.SERVER_cmdb_product_helper]:"CMDB",[Lr.SERVER_alert]:"Alert",[Lr.SERVER_web_builder]:"View",[Lr.SERVER_web_builder2]:"View",[Lr.SERVER_host_troubleshooting]:"Host Troubleshooting",[Lr.SERVER_system_inspection]:"System Inspection",[Lr.SERVER_grafana]:"Grafana",[Lr.SERVER_kubernetes]:"Kubernetes",[Lr.SERVER_llm]:"LLM"},zh:{[Lr.MCP_HUB]:"MCP 中心",[Lr.ALL]:"全部",[Lr.SERVER_cmdb]:"CMDB",[Lr.SERVER_cmdb_product_helper]:"CMDB",[Lr.SERVER_alert]:"告警",[Lr.SERVER_web_builder]:"视图",[Lr.SERVER_web_builder2]:"视图",[Lr.SERVER_host_troubleshooting]:"主机故障排查",[Lr.SERVER_system_inspection]:"系统巡检",[Lr.SERVER_grafana]:"Grafana",[Lr.SERVER_kubernetes]:"Kubernetes",[Lr.SERVER_llm]:"大模型"}},Ur=g.i18n.getFixedT(null,Pr);var Hr,Br=i(31748);let Vr,jr,Fr,Gr,Yr;(0,g.initializeI18n)(Pr,zr);const Kr={lib:"antd",icon:"tool"},Jr=new Map([["EasyOps平台",{servers:["cmdb","cmdb_product_helper"]}],["Grafana",{servers:["grafana"]}],["Kubernetes",{servers:["kubernetes"]}],["监控事件",{servers:["alert"]}],["浏览器",{servers:["playwright"]}],["低代码",{servers:["web-builder","web-builder2"]}],["大模型",{servers:["llm"]}],["故障排查",{servers:["host-troubleshooting"]}]]),$r=(0,m.wrapBrick)("eo-icon"),qr=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:Xr,property:Qr}=(0,u.createDecorators)();let Zr;var eo=new WeakMap,to=new WeakMap;class io extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,eo,jr(this)),(0,r.A)(this,to,(Fr(this),Gr(this,!0))),Yr(this)}get list(){return(0,c.A)(eo,this)}set list(e){(0,l.A)(eo,this,e)}get withContainer(){return(0,c.A)(to,this)}set withContainer(e){(0,l.A)(to,this,e)}render(){return h().createElement(no,{list:this.list,withContainer:this.withContainer})}}function no(e){let{list:t,withContainer:i}=e;const[n,a]=(0,p.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const n=Ur(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let a=e.get(n);a||e.set(n,a=[]),a.push(t);const r=[...Jr.entries()].find((e=>{let[i,{servers:n}]=e;return n.includes(t.server.id)})),o=r?r[0]:"其他";let s=i.get(o);s||i.set(o,s=[]),s.push(n)}));const n=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[a]=t;const r=n.indexOf(i),o=n.indexOf(a);return(r<0?n.length:r)-(o<0?n.length:o)}))),i]}),[t]),r=(0,p.useMemo)((()=>{const e=[...Jr.keys()],t=[...a.keys()];return t.sort(((t,i)=>{const n=e.indexOf(t),a=e.indexOf(i);return(n<0?e.length:n)-(a<0?e.length:a)})),["",...t]}),[a]),[o,s]=(0,p.useState)(""),l=(0,p.useMemo)((()=>{const e=[...n];if(!o)return e;const t=a.get(o);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[o,n,a]),c=(0,p.useMemo)((()=>r.map((e=>({id:e,label:""===e?Ur(Lr.ALL):e})))),[r]),d=h().createElement(h().Fragment,null,h().createElement(qr,{tabs:c,activeTab:o,onTabClick:e=>s(e.detail.id)}),h().createElement("ul",{className:"groups"},null==l?void 0:l.map((e=>{let[t,i]=e;return h().createElement("li",{key:t,className:"group"},h().createElement("h2",null,t),h().createElement("ul",{className:"list"},i.map(((e,t)=>{var i;return h().createElement("li",{key:t,className:"item"},h().createElement("div",{className:"heading"},h().createElement($r,(0,ut.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:Kr,{fallback:Kr})),h().createElement("div",{className:"title"},e.title)),h().createElement("div",{className:"description"},e.description))}))))}))));return i?h().createElement("div",{className:"container"},h().createElement("h1",null,Ur(Lr.MCP_HUB)),d):d}Hr=io,({e:[jr,Fr,Gr,Yr],c:[Zr,Vr]}=(0,d.A)(Hr,[Xr("ai-portal.mcp-tools",{styleTexts:[Br.A]})],[[Qr({attribute:!1}),1,"list"],[Qr({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),Vr();var ao,ro=i(92914),oo=i(30495);let so,lo,co,po,ho,uo,mo,go,bo,Ao,xo,ko,Eo,fo,vo,wo,yo,To,Co,So,_o,No,Ro,Mo,Io,Oo,Wo,Do,Lo,Po,zo,Uo,Ho,Bo,Vo,jo,Fo,Go,Yo,Ko,Jo,$o,qo,Xo,Qo,Zo,es,ts,is,ns,as,rs,os,ss,ls,cs;(0,g.initializeI18n)(ro.NS,ro.I);const{defineElement:ds,property:ps,event:hs,method:us}=(0,u.createDecorators)(),ms=(0,p.forwardRef)(oo.C);let gs;var bs=new WeakMap,As=new WeakMap,xs=new WeakMap,ks=new WeakMap,Es=new WeakMap,fs=new WeakMap,vs=new WeakMap,ws=new WeakMap,ys=new WeakMap,Ts=new WeakMap,Cs=new WeakMap,Ss=new WeakMap,_s=new WeakMap,Ns=new WeakMap,Rs=new WeakMap,Ms=new WeakMap,Is=new WeakSet,Os=new WeakMap,Ws=new WeakMap,Ds=new WeakMap,Ls=new WeakMap,Ps=new WeakMap,zs=new WeakMap,Us=new WeakMap,Hs=new WeakMap,Bs=new WeakMap,Vs=new WeakMap,js=new WeakMap,Fs=new WeakMap;class Gs extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Is),(0,r.A)(this,bs,(so(this),co(this))),(0,r.A)(this,As,(po(this),ho(this))),(0,r.A)(this,xs,(uo(this),mo(this))),(0,r.A)(this,ks,(go(this),bo(this))),(0,r.A)(this,Es,(Ao(this),xo(this))),(0,r.A)(this,fs,(ko(this),Eo(this))),(0,r.A)(this,vs,(fo(this),vo(this))),(0,r.A)(this,ws,(wo(this),yo(this))),(0,r.A)(this,ys,(To(this),Co(this))),(0,r.A)(this,Ts,(So(this),_o(this))),(0,r.A)(this,Cs,(No(this),Ro(this))),(0,r.A)(this,Ss,(Mo(this),Io(this))),(0,r.A)(this,_s,(Oo(this),Wo(this))),(0,r.A)(this,Ns,(Do(this),Lo(this))),(0,r.A)(this,Rs,(Po(this),zo(this))),(0,r.A)(this,Ms,(Uo(this),Ho(this))),(0,r.A)(this,Os,(jo(this),()=>{(0,s.A)(Is,this,Bo).emit()})),(0,r.A)(this,Ws,Fo(this)),(0,r.A)(this,Ds,(Ko(this),()=>{(0,s.A)(Is,this,Go).emit()})),(0,r.A)(this,Ls,Jo(this)),(0,r.A)(this,Ps,(Xo(this),e=>{(0,s.A)(Is,this,$o).emit(e)})),(0,r.A)(this,zs,Qo(this)),(0,r.A)(this,Us,(ts(this),e=>{(0,s.A)(Is,this,Zo).emit(e)})),(0,r.A)(this,Hs,is(this)),(0,r.A)(this,Bs,(rs(this),()=>{(0,s.A)(Is,this,ns).emit("canvas")})),(0,r.A)(this,Vs,os(this)),(0,r.A)(this,js,(cs(this),e=>{(0,s.A)(Is,this,ss).emit(e)})),(0,r.A)(this,Fs,(0,p.createRef)())}get conversationId(){return(0,c.A)(bs,this)}set conversationId(e){(0,l.A)(bs,this,e)}get initialRequest(){return(0,c.A)(As,this)}set initialRequest(e){(0,l.A)(As,this,e)}get replay(){return(0,c.A)(xs,this)}set replay(e){(0,l.A)(xs,this,e)}get replayDelay(){return(0,c.A)(ks,this)}set replayDelay(e){(0,l.A)(ks,this,e)}get supports(){return(0,c.A)(Es,this)}set supports(e){(0,l.A)(Es,this,e)}get showHumanActions(){return(0,c.A)(fs,this)}set showHumanActions(e){(0,l.A)(fs,this,e)}get showFeedback(){return(0,c.A)(vs,this)}set showFeedback(e){(0,l.A)(vs,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(ws,this)}set showFeedbackAfterFailed(e){(0,l.A)(ws,this,e)}get showFeedbackOnView(){return(0,c.A)(ys,this)}set showFeedbackOnView(e){(0,l.A)(ys,this,e)}get showUiSwitch(){return(0,c.A)(Ts,this)}set showUiSwitch(e){(0,l.A)(Ts,this,e)}get hideMermaid(){return(0,c.A)(Cs,this)}set hideMermaid(e){(0,l.A)(Cs,this,e)}get previewUrlTemplate(){return(0,c.A)(Ss,this)}set previewUrlTemplate(e){(0,l.A)(Ss,this,e)}get showCases(){return(0,c.A)(_s,this)}set showCases(e){(0,l.A)(_s,this,e)}get exampleProjects(){return(0,c.A)(Ns,this)}set exampleProjects(e){(0,l.A)(Ns,this,e)}get tryItOutUrl(){return(0,c.A)(Rs,this)}set tryItOutUrl(e){(0,l.A)(Rs,this,e)}resumed(){var e,t;null===(e=(0,c.A)(Fs,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(Fs,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(Fs,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(Fs,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return h().createElement(ms,{conversationId:this.conversationId,initialRequest:this.initialRequest,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHumanActions:this.showHumanActions,showFeedback:this.showFeedback,showFeedbackAfterFailed:this.showFeedbackAfterFailed,showFeedbackOnView:this.showFeedbackOnView,showUiSwitch:this.showUiSwitch,previewUrlTemplate:this.previewUrlTemplate,showCases:this.showCases,exampleProjects:this.exampleProjects,tryItOutUrl:this.tryItOutUrl,onShare:(0,c.A)(Os,this),onTerminate:(0,c.A)(Ds,this),onSubmitFeedback:(0,c.A)(Ps,this),onSwitchToCanvas:(0,c.A)(Bs,this),onFeedbackOnView:(0,c.A)(Us,this),onDetailChange:(0,c.A)(js,this)})}}ao=Gs,({e:[co,po,ho,uo,mo,go,bo,Ao,xo,ko,Eo,fo,vo,wo,yo,To,Co,So,_o,No,Ro,Mo,Io,Oo,Wo,Do,Lo,Po,zo,Uo,Ho,Bo,Vo,jo,Fo,Go,Yo,Ko,Jo,$o,qo,Xo,Qo,Zo,es,ts,is,ns,as,rs,os,ss,ls,cs,so],c:[gs,lo]}=(0,d.A)(ao,[ds("ai-portal.chat-stream",{shadowOptions:!1})],[[ps(),1,"conversationId"],[ps({attribute:!1,render:!1}),1,"initialRequest"],[ps({type:Boolean}),1,"replay"],[ps({type:Number}),1,"replayDelay"],[ps({attribute:!1}),1,"supports"],[ps({type:Boolean}),1,"showHumanActions"],[ps({type:Boolean}),1,"showFeedback"],[ps({type:Boolean}),1,"showFeedbackAfterFailed"],[ps({type:Boolean}),1,"showFeedbackOnView"],[ps({type:Boolean}),1,"showUiSwitch"],[ps({type:Boolean,render:!1}),1,"hideMermaid"],[ps(),1,"previewUrlTemplate"],[ps({attribute:!1}),1,"showCases"],[ps({attribute:!1}),1,"exampleProjects"],[ps(),1,"tryItOutUrl"],[hs({type:"share"}),1,"shareEvent",e=>(0,c.A)(Ms,e),(e,t)=>(0,l.A)(Ms,e,t)],[hs({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(Ws,e),(e,t)=>(0,l.A)(Ws,e,t)],[hs({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Ls,e),(e,t)=>(0,l.A)(Ls,e,t)],[hs({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(zs,e),(e,t)=>(0,l.A)(zs,e,t)],[hs({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Hs,e),(e,t)=>(0,l.A)(Hs,e,t)],[hs({type:"detail.change"}),1,"detailChange",e=>(0,c.A)(Vs,e),(e,t)=>(0,l.A)(Vs,e,t)],[us(),2,"resumed"],[us(),2,"feedbackSubmitDone"],[us(),2,"feedbackSubmitFailed"],[us(),2,"feedbackOnViewDone"]],0,(e=>Fs.has((0,o.A)(e))),m.ReactNextElement)),lo();let Ys=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e.UNTITLED="UNTITLED",e}({});const Ks="bricks/ai-portal/ai-employees",Js=g.i18n.getFixedT(null,Ks);var $s,qs=i(98036);let Xs,Qs,Zs,el,tl,il,nl,al,rl;(0,g.initializeI18n)(Ks,{en:{AI_EMPLOYEES:"AI Employees",UNTITLED:"Untitled"},zh:{AI_EMPLOYEES:"Ai 数字人",UNTITLED:"未命名"}});const ol=(0,m.wrapBrick)("eo-link"),sl=(0,m.wrapBrick)("eo-icon"),ll=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:cl,property:dl}=(0,u.createDecorators)();let pl;var hl=new WeakMap,ul=new WeakMap,ml=new WeakMap,gl=new WeakMap;class bl extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,hl,Qs(this)),(0,r.A)(this,ul,(Zs(this),el(this))),(0,r.A)(this,ml,(tl(this),il(this))),(0,r.A)(this,gl,(nl(this),al(this,!0))),rl(this)}get list(){return(0,c.A)(hl,this)}set list(e){(0,l.A)(hl,this,e)}get industries(){return(0,c.A)(ul,this)}set industries(e){(0,l.A)(ul,this,e)}get urlTemplate(){return(0,c.A)(ml,this)}set urlTemplate(e){(0,l.A)(ml,this,e)}get withContainer(){return(0,c.A)(gl,this)}set withContainer(e){(0,l.A)(gl,this,e)}render(){return h().createElement(Al,{list:this.list,industries:this.industries,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function Al(e){let{list:t,industries:i,urlTemplate:n,withContainer:a}=e;const r=(0,p.useMemo)((()=>[...new Set([...null!=i?i:[],...(null!=t?t:[]).map((e=>e.industry))])]),[i,t]),[o,s]=(0,p.useState)(r[0]),l=(0,p.useMemo)((()=>{const e=new Map;return null==t||t.forEach((t=>{if(t.industry!==o)return;let i=e.get(t.role);i||e.set(t.role,i=[]),i.push(t)})),[...e.entries()]}),[o,t]),c=(0,p.useMemo)((()=>r.map((e=>({id:e,label:e||Js(Ys.UNTITLED)})))),[r]),d=h().createElement(h().Fragment,null,h().createElement(ll,{tabs:c,activeTab:o,onTabClick:e=>s(e.detail.id)}),h().createElement("ul",{className:"groups"},l.map((e=>{let[t,i]=e;return h().createElement("li",{key:t,className:"group"},h().createElement("h2",null,t),h().createElement("ul",{className:"list"},i.map(((e,t)=>h().createElement("li",{key:t},h().createElement(ol,(0,ut.A)({className:an()("link",{clickable:!!n})},n?{url:(0,En.Q)(n,e)}:null),h().createElement("div",{className:"heading"},h().createElement("div",{className:"avatar"},e.avatar?h().createElement("img",{src:e.avatar}):h().createElement(sl,{lib:"antd",icon:"user"})),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"description"},e.description)))))))}))));return a?h().createElement("div",{className:"container"},h().createElement("h1",null,Js(Ys.AI_EMPLOYEES)),d):d}$s=bl,({e:[Qs,Zs,el,tl,il,nl,al,rl],c:[pl,Xs]}=(0,d.A)($s,[cl("ai-portal.ai-employees",{styleTexts:[qs.A]})],[[dl({attribute:!1}),1,"list"],[dl({attribute:!1}),1,"industries"],[dl(),1,"urlTemplate"],[dl({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),Xs();let xl=function(e){return e.AGENTS="AGENTS",e}({});const kl="bricks/ai-portal/ai-agents",El=g.i18n.getFixedT(null,kl);var fl,vl=i(83059);let wl,yl,Tl,Cl,Sl,_l,Nl;const Rl={lib:"antd",icon:"tool"};(0,g.initializeI18n)(kl,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const Ml=(0,m.wrapBrick)("eo-icon"),Il=(0,m.wrapBrick)("eo-link"),{defineElement:Ol,property:Wl}=(0,u.createDecorators)();let Dl;var Ll=new WeakMap,Pl=new WeakMap,zl=new WeakMap;class Ul extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Ll,yl(this)),(0,r.A)(this,Pl,(Tl(this),Cl(this))),(0,r.A)(this,zl,(Sl(this),_l(this,!0))),Nl(this)}get list(){return(0,c.A)(Ll,this)}set list(e){(0,l.A)(Ll,this,e)}get urlTemplate(){return(0,c.A)(Pl,this)}set urlTemplate(e){(0,l.A)(Pl,this,e)}get withContainer(){return(0,c.A)(zl,this)}set withContainer(e){(0,l.A)(zl,this,e)}render(){return h().createElement(Hl,{list:this.list,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function Hl(e){let{list:t,urlTemplate:i,withContainer:n}=e;const a=h().createElement(h().Fragment,null,h().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var n,a;return h().createElement("li",{key:t},h().createElement(Il,(0,ut.A)({className:an()("link",{clickable:!!i})},i?{url:(0,En.Q)(i,e)}:null),h().createElement("div",{className:"heading"},h().createElement("div",{className:"icon"},h().createElement(Ml,(0,ut.A)({},null!==(n=e.icon)&&void 0!==n?n:Rl,{fallback:Rl}))),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"tags"},null===(a=e.tags)||void 0===a?void 0:a.map(((e,t)=>h().createElement("span",{key:t,className:"tag"},e)))),h().createElement("div",{className:"description"},e.description)))}))));return n?h().createElement("div",{className:"container"},h().createElement("h1",null,El(xl.AGENTS)),a):a}fl=Ul,({e:[yl,Tl,Cl,Sl,_l,Nl],c:[Dl,wl]}=(0,d.A)(fl,[Ol("ai-portal.ai-agents",{styleTexts:[vl.A]})],[[Wl({attribute:!1}),1,"list"],[Wl(),1,"urlTemplate"],[Wl({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),wl();var Bl=i(49936);let Vl=null;customElements.define("ai-portal.save-request-store",(0,Bl.createProviderClass)((function(e){Vl=e}))),customElements.define("ai-portal.load-request-store",(0,Bl.createProviderClass)((function(){const e=Vl;return Vl=null,e}))),customElements.define("ai-portal.clear-request-store",(0,Bl.createProviderClass)((function(){Vl=null})));var jl,Fl=i(49041);let Gl,Yl,Kl,Jl,$l,ql,Xl;const Ql=(0,m.wrapBrick)("eo-link"),{defineElement:Zl,property:ec}=(0,u.createDecorators)();let tc;var ic=new WeakMap,nc=new WeakMap,ac=new WeakMap;class rc extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ic,Yl(this)),(0,r.A)(this,nc,(Kl(this),Jl(this))),(0,r.A)(this,ac,($l(this),ql(this))),Xl(this)}get pageTitle(){return(0,c.A)(ic,this)}set pageTitle(e){(0,l.A)(ic,this,e)}get breadcrumbs(){return(0,c.A)(nc,this)}set breadcrumbs(e){(0,l.A)(nc,this,e)}get size(){return(0,c.A)(ac,this)}set size(e){(0,l.A)(ac,this,e)}render(){return h().createElement(oc,{pageTitle:this.pageTitle,breadcrumbs:this.breadcrumbs})}}function oc(e){let{breadcrumbs:t,pageTitle:i}=e;return(0,p.useEffect)((()=>{"string"==typeof i&&(0,tn.getRuntime)().applyPageTitle(i)}),[i]),h().createElement("div",{className:"container"},i||null!=t&&t.length?h().createElement("div",{className:"header"},h().createElement("nav",null,null!=t&&t.length?h().createElement("ul",{className:"breadcrumbs"},t.map(((e,t)=>h().createElement("li",{key:t},h().createElement(Ql,{url:e.url},e.text))))):null,i?h().createElement("h1",null,i):null),h().createElement("slot",{name:"toolbar"})):null,h().createElement("slot",null))}jl=rc,({e:[Yl,Kl,Jl,$l,ql,Xl],c:[tc,Gl]}=(0,d.A)(jl,[Zl("ai-portal.page-container",{styleTexts:[Fl.A]})],[[ec(),1,"pageTitle"],[ec({attribute:!1}),1,"breadcrumbs"],[ec({render:!1}),1,"size"]],0,void 0,m.ReactNextElement)),Gl();var sc,lc=i(20124);let cc,dc,pc,hc,uc,mc,gc,bc,Ac;const{defineElement:xc,property:kc,event:Ec}=(0,u.createDecorators)();let fc;var vc=new WeakMap,wc=new WeakMap,yc=new WeakMap,Tc=new WeakSet,Cc=new WeakMap;class Sc extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Tc),(0,r.A)(this,vc,dc(this)),(0,r.A)(this,wc,(pc(this),hc(this))),(0,r.A)(this,yc,(uc(this),mc(this))),(0,r.A)(this,Cc,(Ac(this),e=>{this.activeTab=e.id,(0,s.A)(Tc,this,gc).emit(e)}))}get tabs(){return(0,c.A)(vc,this)}set tabs(e){(0,l.A)(vc,this,e)}get activeTab(){return(0,c.A)(wc,this)}set activeTab(e){(0,l.A)(wc,this,e)}render(){return h().createElement(_c,{tabs:this.tabs,activeTab:this.activeTab,onTabClick:(0,c.A)(Cc,this)})}}function _c(e){let{tabs:t,activeTab:i,onTabClick:n}=e;return h().createElement("ul",{className:"tabs",part:"tabs"},null==t?void 0:t.map((e=>h().createElement("li",{key:e.id,part:"tab",className:an()("tab",{active:e.id===i})},h().createElement("a",{onClick:()=>n(e)},e.label)))))}sc=Sc,({e:[dc,pc,hc,uc,mc,gc,bc,Ac],c:[fc,cc]}=(0,d.A)(sc,[xc("ai-portal.tab-list",{styleTexts:[lc.A]})],[[kc({attribute:!1}),1,"tabs"],[kc({attribute:!1}),1,"activeTab"],[Ec({type:"tab.click"}),1,"tabClick",e=>(0,c.A)(yc,e),(e,t)=>(0,l.A)(yc,e,t)]],0,(e=>Cc.has((0,o.A)(e))),m.ReactNextElement)),cc();let Nc=function(e){return e.PLEASE_SELECT="PLEASE_SELECT",e.SEARCH_PLACEHOLDER="SEARCH_PLACEHOLDER",e.SEARCH_NO_DATA="SEARCH_NO_DATA",e}({});const Rc="bricks/ai-portal/dropdown-select",Mc=g.i18n.getFixedT(null,Rc);var Ic,Oc=i(40138);let Wc,Dc,Lc,Pc,zc,Uc,Hc,Bc,Vc,jc,Fc,Gc,Yc,Kc,Jc,$c,qc,Xc,Qc,Zc,ed;(0,g.initializeI18n)(Rc,{en:{PLEASE_SELECT:"Please Select",SEARCH_PLACEHOLDER:"Search",SEARCH_NO_DATA:"No Data"},zh:{PLEASE_SELECT:"请选择",SEARCH_PLACEHOLDER:"搜索",SEARCH_NO_DATA:"暂无结果"}});const{defineElement:td,property:id,event:nd}=(0,u.createDecorators)(),ad=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",onBeforeVisibleChange:"before.visible.change"}),rd=(0,m.wrapBrick)("eo-icon"),od=(0,m.wrapBrick)("eo-loading-container"),sd=(0,m.wrapBrick)("eo-menu"),ld=(0,m.wrapBrick)("eo-menu-item"),cd=(0,m.wrapBrick)("eo-input",{onValueChange:"change"});let dd;var pd=new WeakMap,hd=new WeakMap,ud=new WeakMap,md=new WeakMap,gd=new WeakMap,bd=new WeakMap,Ad=new WeakMap,xd=new WeakMap,kd=new WeakMap,Ed=new WeakSet,fd=new WeakMap;class vd extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ed),(0,r.A)(this,pd,Dc(this)),(0,r.A)(this,hd,(Lc(this),Pc(this))),(0,r.A)(this,ud,(zc(this),Uc(this))),(0,r.A)(this,md,(Hc(this),Bc(this))),(0,r.A)(this,gd,(Vc(this),jc(this))),(0,r.A)(this,bd,(Fc(this),Gc(this))),(0,r.A)(this,Ad,(Yc(this),Kc(this))),(0,r.A)(this,xd,(Jc(this),$c(this))),(0,r.A)(this,kd,(qc(this),Xc(this))),(0,r.A)(this,fd,(ed(this),e=>{(0,s.A)(Ed,this,Qc).emit(e)}))}get value(){return(0,c.A)(pd,this)}set value(e){(0,l.A)(pd,this,e)}get options(){return(0,c.A)(hd,this)}set options(e){(0,l.A)(hd,this,e)}get labelMaxWidth(){return(0,c.A)(ud,this)}set labelMaxWidth(e){(0,l.A)(ud,this,e)}get loading(){return(0,c.A)(md,this)}set loading(e){(0,l.A)(md,this,e)}get searchPlaceholder(){return(0,c.A)(gd,this)}set searchPlaceholder(e){(0,l.A)(gd,this,e)}get dropdownContentStyle(){return(0,c.A)(bd,this)}set dropdownContentStyle(e){(0,l.A)(bd,this,e)}get dropdownMaxWidth(){return(0,c.A)(Ad,this)}set dropdownMaxWidth(e){(0,l.A)(Ad,this,e)}get showSearch(){return(0,c.A)(xd,this)}set showSearch(e){(0,l.A)(xd,this,e)}render(){return h().createElement(wd,{value:this.value,options:this.options,onChange:(0,c.A)(fd,this),loading:this.loading,labelMaxWidth:this.labelMaxWidth,dropdownMaxWidth:this.dropdownMaxWidth,showSearch:this.showSearch,searchPlaceholder:this.searchPlaceholder,dropdownContentStyle:this.dropdownContentStyle})}}function wd(e){let{value:t,options:i,labelMaxWidth:n,dropdownMaxWidth:a,showSearch:r,loading:o,searchPlaceholder:s,dropdownContentStyle:l,onChange:c}=e;const[d,u]=(0,p.useState)(!1),[m,g]=(0,p.useState)(t),[b,A]=(0,p.useState)(""),[x,k]=(0,p.useState)(i);(0,p.useEffect)((()=>{k(i)}),[i]);const E=(0,p.useMemo)((()=>null==x?void 0:x.find((e=>e.value===m))),[x,m]),f=(0,p.useMemo)((()=>b&&x?null==x?void 0:x.filter((e=>e.label.toLowerCase().includes(b.toLowerCase()))):x),[x,b]),v=(0,p.useCallback)((e=>{u(e.detail),e.detail||A("")}),[]),w=(0,p.useMemo)((()=>(0,xn.debounce)((e=>{A(e.detail)}),300)),[]);return h().createElement(ad,{placement:"bottom-start",trigger:"click",active:d,arrow:!1,distance:5,onBeforeVisibleChange:v},h().createElement("span",{slot:"anchor",className:"trigger"},h().createElement("span",{className:"label",style:{maxWidth:n}},E?null==E?void 0:E.label:Mc(Nc.PLEASE_SELECT)),h().createElement(rd,{lib:"lucide",icon:d?"chevron-up":"chevron-down"})),h().createElement("div",{className:"dropdown",style:{maxWidth:a}},r&&h().createElement("div",{className:"search-container"},h().createElement(cd,{className:"search",value:b,placeholder:s||Mc(Nc.SEARCH_PLACEHOLDER),onValueChange:w},h().createElement(rd,{slot:"prefix",lib:"antd",icon:"search"}))),h().createElement(od,{loading:o,delay:500,style:{width:"100%"}},h().createElement("div",{className:"dropdown-inner",style:l},h().createElement("slot",{name:"prefix"}),!(null==f||!f.length)&&h().createElement(sd,null,null==f?void 0:f.map((e=>h().createElement(ld,{key:e.value,disabled:e.disabled,className:m===e.value?"active":void 0,onClick:t=>{t.preventDefault(),t.stopPropagation(),u(!1),m!==e.value&&(g(e.value),c(e))}},e.label)))),!(null!=f&&f.length)&&h().createElement("div",{className:"empty"},Mc(Nc.SEARCH_NO_DATA))))))}Ic=vd,({e:[Dc,Lc,Pc,zc,Uc,Hc,Bc,Vc,jc,Fc,Gc,Yc,Kc,Jc,$c,qc,Xc,Qc,Zc,ed],c:[dd,Wc]}=(0,d.A)(Ic,[td("ai-portal.dropdown-select",{styleTexts:[Oc.A]})],[[id(),1,"value"],[id({attribute:!1}),1,"options"],[id({attribute:!1}),1,"labelMaxWidth"],[id({type:Boolean}),1,"loading"],[id({attribute:!1}),1,"searchPlaceholder"],[id({attribute:!1}),1,"dropdownContentStyle"],[id({attribute:!1}),1,"dropdownMaxWidth"],[id({type:Boolean}),1,"showSearch"],[nd({type:"change"}),1,"changeEvent",e=>(0,c.A)(kd,e),(e,t)=>(0,l.A)(kd,e,t)]],0,(e=>fd.has((0,o.A)(e))),m.ReactNextElement)),Wc();var yd=i(92207),Td=i(9660);let Cd=function(e){return e.UNTITLED="UNTITLED",e}({});const Sd="bricks/ai-portal/preview-container",_d=g.i18n.getFixedT(null,Sd);var Nd=i(72591),Rd=i.n(Nd),Md=i(1740),Id=i.n(Md),Od=i(88128),Wd=i.n(Od),Dd=i(30855),Ld=i.n(Dd),Pd=i(93051),zd=i.n(Pd),Ud=i(73656),Hd=i.n(Ud),Bd=i(62522),Vd={};Vd.styleTagTransform=Hd(),Vd.setAttributes=Ld(),Vd.insert=Wd().bind(null,"head"),Vd.domAPI=Id(),Vd.insertStyleElement=zd(),Rd()(Bd.A,Vd);const jd=Bd.A&&Bd.A.locals?Bd.A.locals:void 0;var Fd,Gd=i(6026),Yd=i(28599);let Kd,Jd,$d,qd,Xd;(0,g.initializeI18n)(Sd,{en:{UNTITLED:"Untitled"},zh:{UNTITLED:"无标题"}});const Qd=(0,m.wrapBrick)("eo-icon"),Zd=(0,m.wrapBrick)("eo-page-title"),ep=(0,m.wrapBrick)("eo-main-view"),tp=(0,m.wrapBrick)("eo-narrow-view"),{defineElement:ip,property:np}=(0,u.createDecorators)();let ap;var rp=new WeakMap,op=new WeakMap,sp=new WeakMap;class lp extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,rp,Jd(this)),(0,r.A)(this,op,($d(this),qd(this))),(0,r.A)(this,sp,(Xd(this),(0,xn.uniqueId)()))}get source(){return(0,c.A)(rp,this)}set source(e){(0,l.A)(rp,this,e)}get url(){return(0,c.A)(op,this)}set url(e){(0,l.A)(op,this,e)}render(){return h().createElement(p.Suspense,{fallback:h().createElement(Qd,{lib:"antd",icon:"loading-3-quarters",spinning:!0,className:jd.loading})},h().createElement(cp,{rootId:(0,c.A)(sp,this),source:this.source,url:this.url}))}}function cp(e){let{rootId:t,source:i,url:n}=e;const a=(0,p.useMemo)((()=>i?async function(e){const t=await(0,Gd.f)();return await t.parse(e)}(i).catch((e=>(console.error("Failed to parse view:",e),null))):Promise.resolve(null)),[i]),r=(0,p.use)(a),o=(0,p.useMemo)((()=>r?(0,yd.d)(r,{rootId:t,expanded:!0}).catch((e=>(console.error("Failed to convert view:",e),null))):Promise.resolve(null)),[r,t]),s=(0,p.use)(o),l=(0,p.useMemo)((()=>(0,Td.W)(r)),[r]);return h().createElement(dp,{rootId:t,pageTitle:l,convertedResult:s,url:n})}function dp(e){let{rootId:t,pageTitle:i,convertedResult:n,url:a}=e;const r=(0,p.useRef)(null),o=(0,p.useRef)(null);return(0,p.useEffect)((()=>{const e=r.current;if(!e)return;const i=(0,Yd.d)(t),n=(0,tn.unstable_createRoot)(e,{portal:i,supportsUseChildren:!0});return o.current=n,()=>{n.unmount(),i.remove(),o.current=null}}),[t]),(0,p.useEffect)((()=>{var e;if(!n)return;const{brick:t,context:i,functions:r,templates:s}=n;null===(e=o.current)||void 0===e||e.render(t,{context:i,functions:r,templates:s,url:a})}),[n,a]),h().createElement(tp,{size:"large",className:jd.container},h().createElement(ep,null,h().createElement(Zd,{slot:"pageTitle",pageTitle:i||_d(Cd.UNTITLED)}),h().createElement("div",{className:jd.main,ref:r,"data-root-id":t})))}Fd=lp,({e:[Jd,$d,qd,Xd],c:[ap,Kd]}=(0,d.A)(Fd,[ip("ai-portal.preview-container",{shadowOptions:!1})],[[np({attribute:!1}),1,"source"],[np(),1,"url"]],0,void 0,m.ReactNextElement)),Kd();const pp="bricks/ai-portal/action-buttons";g.i18n.getFixedT(null,pp);var hp,up=i(11816);let mp,gp,bp,Ap,xp,kp,Ep,fp,vp;(0,g.initializeI18n)(pp,{en:{},zh:{}});const wp=(0,m.wrapBrick)("eo-icon"),yp=(0,m.wrapBrick)("eo-button"),{defineElement:Tp,property:Cp,event:Sp}=(0,u.createDecorators)();let _p;var Np=new WeakMap,Rp=new WeakMap,Mp=new WeakMap,Ip=new WeakSet,Op=new WeakMap;class Wp extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ip),(0,r.A)(this,Np,gp(this)),(0,r.A)(this,Rp,(bp(this),Ap(this))),(0,r.A)(this,Mp,(xp(this),kp(this))),(0,r.A)(this,Op,(vp(this),e=>{(0,s.A)(Ip,this,Ep).emit(e)}))}get items(){return(0,c.A)(Np,this)}set items(e){(0,l.A)(Np,this,e)}get activeKey(){return(0,c.A)(Rp,this)}set activeKey(e){(0,l.A)(Rp,this,e)}render(){return h().createElement(Dp,{items:this.items,activeKey:this.activeKey,onChange:(0,c.A)(Op,this)})}}function Dp(e){let{items:t,activeKey:i,onChange:n}=e;const[a,r]=(0,p.useState)(null!=i?i:null),o=(0,p.useRef)(!1);(0,p.useEffect)((()=>{r(null!=i?i:null)}),[i]),(0,p.useEffect)((()=>{var e;o.current?n(a&&null!==(e=null==t?void 0:t.find((e=>!e.hidden&&e.key===a)))&&void 0!==e?e:null):o.current=!0}),[a,t,n]);const s=(0,p.useMemo)((()=>null==t?void 0:t.filter((e=>!e.hidden&&!a||e.key===a))),[t,a]);return h().createElement("div",{className:"button-container"},null==s?void 0:s.map((e=>{const{text:t,icon:i,key:n}=e;return h().createElement(yp,{key:n,className:"action"+(a?" active":""),themeVariant:"elevo",type:"neutral",onClick:()=>{a||r(n)}},i?h().createElement(wp,(0,ut.A)({className:"icon"},i)):null,t,a?h().createElement(wp,{className:"remove",lib:"lucide",icon:"x",onClick:e=>{e.stopPropagation(),e.preventDefault(),r(null)}}):null)})))}hp=Wp,({e:[gp,bp,Ap,xp,kp,Ep,fp,vp],c:[_p,mp]}=(0,d.A)(hp,[Tp("ai-portal.action-buttons",{styleTexts:[up.A]})],[[Cp({attribute:!1}),1,"items"],[Cp(),1,"activeKey"],[Sp({type:"change"}),1,"change",e=>(0,c.A)(Mp,e),(e,t)=>(0,l.A)(Mp,e,t)]],0,(e=>Op.has((0,o.A)(e))),m.ReactNextElement)),mp();let Lp=function(e){return e.UN_START_STATUS="UN_START_STATUS",e.RUNNING_STATUS="RUNNING_STATUS",e.COMPLETED_STATUS="COMPLETED_STATUS",e.NEW_CHAT="NEW_CHAT",e}({});const Pp="bricks/ai-portal/goal-card-list",zp={en:{UN_START_STATUS:"Not Start",RUNNING_STATUS:"Running",COMPLETED_STATUS:"Completed",NEW_CHAT:"New chat"},zh:{UN_START_STATUS:"未开始",RUNNING_STATUS:"运行中",COMPLETED_STATUS:"已完成",NEW_CHAT:"新对话"}},Up=g.i18n.getFixedT(null,Pp);var Hp=i(46342),Bp=i(10335);let Vp;(0,g.initializeI18n)(Pp,zp);const jp=(0,m.wrapBrick)("eo-icon"),Fp=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),Gp=(0,m.wrapBrick)("eo-easyops-avatar"),Yp=(0,m.wrapBrick)("eo-button"),Kp={ready:"uncheck-status",working:"active-status",completed:"check-status"},Jp=[{key:"ready",icon:{icon:"uncheck-status",lib:"easyops",category:"colored-common"},text:Up(Lp.UN_START_STATUS)},{key:"working",icon:{icon:"active-status",lib:"easyops",category:"colored-common"},text:Up(Lp.RUNNING_STATUS)},{key:"completed",icon:{icon:"check-status",lib:"easyops",category:"colored-common"},text:Up(Lp.COMPLETED_STATUS)}];function $p(e){let{goalItem:t,idWidth:i,cardStyle:n,onStatusChange:a,onTitleChange:r,onClick:o,onNewChat:s,onAppendChild:l,onRevokeAppendChild:c,isActive:d}=e;const{state:u,id:m,title:g,conversations:b,owner:A,pending:x}=t,k=(0,p.useRef)(!1),E=(0,p.useCallback)((()=>{k.current=!0}),[]),f=(0,p.useCallback)((()=>{k.current=!1}),[]),[v,w]=(0,p.useState)(!1),y=(0,p.useCallback)((()=>{w(!0)}),[]),T=(0,p.useCallback)((e=>{w(!1);const t=e.currentTarget.textContent;!x||null!=t&&t.trim()?null!==t&&g!==t&&(null==r||r(t)):null==c||c()}),[x,g,c,r]),C=(0,p.useCallback)((e=>{k.current||"Enter"===e.key&&(e.preventDefault(),e.currentTarget.blur())}),[]),S=(0,p.useRef)(null);return(0,p.useEffect)((()=>{var e;x&&(null===(e=S.current)||void 0===e||e.focus())}),[x]),h().createElement("div",{className:an()("goal-item",t.state,{editing:v},{active:d}),style:{paddingLeft:24*(t.level+1)+"px",...n},onClick:x?void 0:o},h().createElement("div",{className:"start"},h().createElement(Fp,{actions:Jp,disabled:x,onActionClick:e=>{var t;t=e.detail,null==a||a(t.key)}},h().createElement(jp,{className:"icon",lib:"easyops",category:"colored-common",icon:Kp[u],onClick:e=>e.stopPropagation()})),h().createElement("span",{className:"serial-number",style:{width:i}},"#",x?"":m),h().createElement("span",{className:"title",ref:S,onClick:e=>e.stopPropagation(),onFocus:y,onBlur:T,onKeyDown:C,onCompositionStart:E,onCompositionEnd:f,contentEditable:(_=!0,_?function(){if("boolean"!=typeof Vp){const e=document.createElement("div");e.setAttribute("contenteditable","PLAINTEXT-ONLY"),Vp="plaintext-only"===e.contentEditable}return Vp}()?"plaintext-only":"true":"false"),suppressContentEditableWarning:!0},g)),h().createElement("div",{className:"end"},h().createElement("div",{className:"info"},h().createElement("div",{className:"message"},h().createElement(jp,{lib:"easyops",category:"common",icon:"message"}),h().createElement("span",{className:"count"},b||0)),h().createElement(Gp,{nameOrInstanceId:null==A?void 0:A.instanceId,size:"small"})),h().createElement("div",{className:"operation",onClick:e=>e.stopPropagation()},0===t.level&&h().createElement(Yp,{className:"append-child",themeVariant:"elevo",type:"neutral",size:"small",onClick:l},h().createElement(jp,{lib:"lucide",icon:"plus"})),!x&&h().createElement(Yp,{className:"new-chat",themeVariant:"elevo",type:"neutral",size:"small",onClick:s},Up(Lp.NEW_CHAT)))));var _}var qp;let Xp,Qp,Zp,eh,th,ih,nh,ah,rh,oh,sh,lh,ch,dh,ph,hh,uh,mh,gh,bh,Ah,xh,kh,Eh;(0,g.initializeI18n)(Pp,zp);const{defineElement:fh,property:vh,event:wh,method:yh}=(0,u.createDecorators)(),Th=(0,m.wrapBrick)("eo-icon"),Ch=(0,p.forwardRef)(Vh);let Sh;var _h=new WeakMap,Nh=new WeakMap,Rh=new WeakMap,Mh=new WeakMap,Ih=new WeakSet,Oh=new WeakMap,Wh=new WeakMap,Dh=new WeakMap,Lh=new WeakMap,Ph=new WeakMap,zh=new WeakMap,Uh=new WeakMap,Hh=new WeakMap;class Bh extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ih),(0,r.A)(this,_h,(Xp(this),Zp(this))),(0,r.A)(this,Nh,(eh(this),th(this))),(0,r.A)(this,Rh,(ih(this),nh(this))),(0,r.A)(this,Mh,(ah(this),rh(this))),(0,r.A)(this,Oh,(lh(this),e=>{(0,s.A)(Ih,this,oh).emit(e)})),(0,r.A)(this,Wh,ch(this)),(0,r.A)(this,Dh,(hh(this),e=>{(0,s.A)(Ih,this,dh).emit(e)})),(0,r.A)(this,Lh,uh(this)),(0,r.A)(this,Ph,(bh(this),e=>{(0,s.A)(Ih,this,mh).emit(e)})),(0,r.A)(this,zh,Ah(this)),(0,r.A)(this,Uh,(Eh(this),e=>{(0,s.A)(Ih,this,xh).emit(e)})),(0,r.A)(this,Hh,(0,p.createRef)())}get goalList(){return(0,c.A)(_h,this)}set goalList(e){(0,l.A)(_h,this,e)}get cardStyle(){return(0,c.A)(Nh,this)}set cardStyle(e){(0,l.A)(Nh,this,e)}get activeKey(){return(0,c.A)(Rh,this)}set activeKey(e){(0,l.A)(Rh,this,e)}appendChildDone(e,t){var i;null===(i=(0,c.A)(Hh,this).current)||void 0===i||i.appendChildDone(e,t)}render(){return h().createElement(Ch,{ref:(0,c.A)(Hh,this),goalList:this.goalList,cardStyle:this.cardStyle,onTitleChange:(0,c.A)(Ph,this),onStatusChange:(0,c.A)(Dh,this),onItemClick:(0,c.A)(Oh,this),onNewChat:(0,c.A)(Uh,this),activeKey:this.activeKey})}}function Vh(e,t){let{goalList:i,cardStyle:n,onTitleChange:a,onStatusChange:r,onItemClick:o,onNewChat:s,activeKey:l}=e;const[c,d]=(0,p.useState)(i);(0,p.useEffect)((()=>{d(i)}),[i]);const u=(e,t,i,n)=>{const a={...e,[t]:i};d(null==c?void 0:c.map((e=>e.instanceId===a.instanceId?a:e))),null==n||n(a)};(0,p.useImperativeHandle)(t,(()=>({appendChildDone:(e,t)=>{d((i=>null==i?void 0:i.map((i=>i.instanceId===e?{...t,level:i.level}:i))))}})),[]);const m=(0,p.useMemo)((()=>{var e;return 10*((null!==(e=null==c?void 0:c.reduce(((e,t)=>Math.max(e,t.id)),0))&&void 0!==e?e:0).toString().length+1)}),[c]);return c?h().createElement("div",{className:"goal-container"},null==c?void 0:c.map((e=>h().createElement($p,{key:e.instanceId,isActive:l===e.instanceId,goalItem:e,idWidth:m,cardStyle:n,onTitleChange:t=>((e,t)=>{u(t,"title",e,a)})(t,e),onStatusChange:t=>((e,t)=>{u(t,"state",e,r)})(t,e),onNewChat:()=>null==s?void 0:s(e),onClick:()=>null==o?void 0:o(e),onAppendChild:()=>(e=>{const t={instanceId:(0,xn.uniqueId)("pending-"),pending:!0,id:0,title:"",state:"ready",level:1,pendingParentId:e.instanceId};d((i=>{var n;const a=null!==(n=null==i?void 0:i.findIndex((t=>t.instanceId===e.instanceId)))&&void 0!==n?n:-1;if(-1===a)return i;const r=i.slice(a+1).findIndex((e=>0===e.level))+1;return 0===r?[...i,t]:[...i.slice(0,a+r),t,...i.slice(a+r)]}))})(e),onRevokeAppendChild:()=>{d((t=>null==t?void 0:t.filter((t=>t.instanceId!==e.instanceId))))}})))):h().createElement("div",{className:"loading"},h().createElement(Th,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}qp=Bh,({e:[Zp,eh,th,ih,nh,ah,rh,oh,sh,lh,ch,dh,ph,hh,uh,mh,gh,bh,Ah,xh,kh,Eh,Xp],c:[Sh,Qp]}=(0,d.A)(qp,[fh("ai-portal.goal-card-list",{styleTexts:[Bp.A,Hp.A]})],[[vh({attribute:!1}),1,"goalList"],[vh({attribute:!1}),1,"cardStyle"],[vh(),1,"activeKey"],[wh({type:"item.click"}),1,"itemClickEvent",e=>(0,c.A)(Mh,e),(e,t)=>(0,l.A)(Mh,e,t)],[wh({type:"item.status.change"}),1,"itemStatusChangeEvent",e=>(0,c.A)(Wh,e),(e,t)=>(0,l.A)(Wh,e,t)],[wh({type:"item.title.change"}),1,"itemTitleChangeEvent",e=>(0,c.A)(Lh,e),(e,t)=>(0,l.A)(Lh,e,t)],[wh({type:"item.new.chat"}),1,"itemNewChatEvent",e=>(0,c.A)(zh,e),(e,t)=>(0,l.A)(zh,e,t)],[yh(),2,"appendChildDone"]],0,(e=>Hh.has((0,o.A)(e))),m.ReactNextElement)),Qp();var jh=i(465);let Fh=function(e){return e.PROJECT_OVERALL="PROJECT_OVERALL",e}({});const Gh="bricks/ai-portal/project-conversations",Yh=g.i18n.getFixedT(null,Gh);var Kh,Jh=i(79286);let $h,qh,Xh,Qh,Zh,eu,tu,iu,nu,au,ru,ou,su,lu,cu,du,pu;(0,g.initializeI18n)(Gh,{en:{PROJECT_OVERALL:"Project overall"},zh:{PROJECT_OVERALL:"项目整体"}});const hu=(0,m.wrapBrick)("eo-link"),uu=(0,m.wrapBrick)("eo-icon"),mu=(0,m.wrapBrick)("eo-easyops-avatar"),gu=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:bu,property:Au,event:xu}=(0,u.createDecorators)();let ku;var Eu=new WeakMap,fu=new WeakMap,vu=new WeakMap,wu=new WeakMap,yu=new WeakMap,Tu=new WeakSet,Cu=new WeakMap,Su=new WeakMap,_u=new WeakMap;class Nu extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Tu),(0,r.A)(this,Eu,qh(this)),(0,r.A)(this,fu,(Xh(this),Qh(this))),(0,r.A)(this,vu,(Zh(this),eu(this))),(0,r.A)(this,wu,(tu(this),iu(this))),(0,r.A)(this,yu,(nu(this),au(this))),(0,r.A)(this,Cu,(su(this),e=>{(0,s.A)(Tu,this,ru).emit(e)})),(0,r.A)(this,Su,lu(this)),(0,r.A)(this,_u,(pu(this),e=>{(0,s.A)(Tu,this,cu).emit(e)}))}get list(){return(0,c.A)(Eu,this)}set list(e){(0,l.A)(Eu,this,e)}get urlTemplate(){return(0,c.A)(fu,this)}set urlTemplate(e){(0,l.A)(fu,this,e)}get actions(){return(0,c.A)(vu,this)}set actions(e){(0,l.A)(vu,this,e)}get goals(){return(0,c.A)(wu,this)}set goals(e){(0,l.A)(wu,this,e)}render(){return h().createElement(Ru,{list:this.list,urlTemplate:this.urlTemplate,actions:this.actions,goals:this.goals,onGoalClick:(0,c.A)(Cu,this),onActionClick:(0,c.A)(_u,this)})}}function Ru(e){let{list:t,urlTemplate:i,actions:n,goals:a,onGoalClick:r,onActionClick:o}=e;return t?h().createElement("ul",null,t.map((e=>h().createElement("li",{className:"item",key:e.conversationId},h().createElement(Mu,{conversation:e,urlTemplate:i,actions:n,goals:a,onGoalClick:r,onActionClick:o}))))):h().createElement("div",{className:"loading"},h().createElement(uu,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}function Mu(e){var t;let{conversation:i,urlTemplate:n,actions:a,goals:r,onGoalClick:o,onActionClick:s}=e;const l=(0,p.useRef)(null),c=g.i18n.language.split("-")[0];(0,p.useEffect)((()=>{const e=l.current;if(!e)return;const t=e=>{e.stopPropagation(),e.preventDefault(),o(i)};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[i,o]);const[d,u]=(0,p.useState)(!1);return h().createElement(hu,{className:an()("link",{"actions-active":d}),url:(0,En.Q)(n,i)},h().createElement("div",{className:"main"},h().createElement("div",{className:"header"},h().createElement(uu,{className:"icon",lib:"easyops",category:"common",icon:"clock"}),h().createElement("div",{className:"title"},i.title)),i.description&&h().createElement("div",{className:"description"},i.description)),r&&h().createElement("div",{className:an()("goal",{global:!i.goalInstanceId}),ref:l},i.goalInstanceId?null===(t=r.find((e=>e.instanceId===i.goalInstanceId)))||void 0===t?void 0:t.title:Yh(Fh.PROJECT_OVERALL)),h().createElement(mu,{className:"avatar",size:"small",nameOrInstanceId:i.username}),h().createElement("div",{className:`operations lang-${c}`},h().createElement(gu,{className:"actions",actions:a,onActionClick:e=>{s({action:e.detail,item:i})},onVisibleChange:e=>{u(e.detail)}}),h().createElement("div",{className:"time",title:(0,jh.P)(1e3*i.startTime,jh.c.full)},(0,jh.P)(1e3*i.startTime,jh.c.relative))))}Kh=Nu,({e:[qh,Xh,Qh,Zh,eu,tu,iu,nu,au,ru,ou,su,lu,cu,du,pu],c:[ku,$h]}=(0,d.A)(Kh,[bu("ai-portal.project-conversations",{styleTexts:[Jh.A]})],[[Au({attribute:!1}),1,"list"],[Au(),1,"urlTemplate"],[Au({attribute:!1}),1,"actions"],[Au({attribute:!1}),1,"goals"],[xu({type:"goal.click"}),1,"goalClick",e=>(0,c.A)(yu,e),(e,t)=>(0,l.A)(yu,e,t)],[xu({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Su,e),(e,t)=>(0,l.A)(Su,e,t)]],0,(e=>_u.has((0,o.A)(e))),m.ReactNextElement)),$h();var Iu,Ou=i(23677);let Wu,Du,Lu,Pu,zu,Uu,Hu,Bu,Vu,ju,Fu,Gu,Yu,Ku,Ju;const $u=(0,m.wrapBrick)("eo-link"),qu=(0,m.wrapBrick)("eo-icon"),Xu=(0,m.wrapBrick)("eo-easyops-avatar"),Qu=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:Zu,property:em,event:tm}=(0,u.createDecorators)();let im;var nm=new WeakMap,am=new WeakMap,rm=new WeakMap,om=new WeakMap,sm=new WeakSet,lm=new WeakMap,cm=new WeakMap,dm=new WeakMap;class pm extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,sm),(0,r.A)(this,nm,Du(this)),(0,r.A)(this,am,(Lu(this),Pu(this))),(0,r.A)(this,rm,(zu(this),Uu(this))),(0,r.A)(this,om,(Hu(this),Bu(this))),(0,r.A)(this,lm,(Fu(this),Gu(this))),(0,r.A)(this,cm,(Ju(this),e=>{(0,s.A)(sm,this,Vu).emit(e)})),(0,r.A)(this,dm,(e=>{(0,s.A)(sm,this,Yu).emit(e)}))}get list(){return(0,c.A)(nm,this)}set list(e){(0,l.A)(nm,this,e)}get urlTemplate(){return(0,c.A)(am,this)}set urlTemplate(e){(0,l.A)(am,this,e)}get actions(){return(0,c.A)(rm,this)}set actions(e){(0,l.A)(rm,this,e)}render(){return h().createElement(hm,{list:this.list,urlTemplate:this.urlTemplate,actions:this.actions,onActionClick:(0,c.A)(cm,this),onItemClick:(0,c.A)(dm,this)})}}function hm(e){let{list:t,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}=e;return t?h().createElement("ul",null,null==t?void 0:t.map((e=>h().createElement("li",{className:"item",key:e.instanceId},h().createElement(um,{knowledge:e,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}))))):h().createElement("div",{className:"loading"},h().createElement(qu,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}function um(e){let{knowledge:t,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}=e;const[o,s]=(0,p.useState)(!1);return h().createElement($u,{className:an()("link",{"actions-active":o}),url:(0,En.Q)(i,t),onClick:()=>null==r?void 0:r(t)},h().createElement("div",{className:"main"},h().createElement("div",{className:"header"},h().createElement(qu,{className:"icon",lib:"easyops",icon:"lightbulb",category:"common"}),h().createElement("span",{className:"title"},t.name),h().createElement(qu,{className:"attachment",lib:"lucide",icon:"paperclip"})),t.description&&h().createElement("div",{className:"description"},t.description)),h().createElement("div",{className:"time"},(0,jh.P)(1e3*t.time,jh.c.relative)),h().createElement("div",{className:"operations"},h().createElement(Qu,{className:"actions",actions:n,onActionClick:e=>{a({action:e.detail,item:t})},onVisibleChange:e=>{s(e.detail)}}),h().createElement(Xu,{className:"avatar",size:"small",nameOrInstanceId:t.user})))}Iu=pm,({e:[Du,Lu,Pu,zu,Uu,Hu,Bu,Vu,ju,Fu,Gu,Yu,Ku,Ju],c:[im,Wu]}=(0,d.A)(Iu,[Zu("ai-portal.project-knowledges",{styleTexts:[Ou.A]})],[[em({attribute:!1}),1,"list"],[em(),1,"urlTemplate"],[em({attribute:!1}),1,"actions"],[tm({type:"action.click"}),1,"actionClick",e=>(0,c.A)(om,e),(e,t)=>(0,l.A)(om,e,t)],[tm({type:"item.click"}),1,"itemClick",e=>(0,c.A)(lm,e),(e,t)=>(0,l.A)(lm,e,t)]],0,(e=>dm.has((0,o.A)(e))),m.ReactNextElement)),Wu();let mm=function(e){return e.STARTED_A_CHAT="STARTED_A_CHAT",e.CREATED_THIS_GOAL="CREATED_THIS_GOAL",e.CHANGED_THE_GOAL_TITLE="CHANGED_THE_GOAL_TITLE",e.CHANGED_THE_GOAL_DESCRIPTION="CHANGED_THE_GOAL_DESCRIPTION",e.CHANGED_THE_GOAL="CHANGED_THE_GOAL",e.DELETED_THIS_GOAL="DELETED_THIS_GOAL",e.DECOMPOSED_THIS_GOAL="DECOMPOSED_THIS_GOAL",e.SET_OWNER="SET_OWNER",e.REMOVED_GOAL_PARTICIPANTS="REMOVED_GOAL_PARTICIPANTS",e.ADDED_GOAL_PARTICIPANTS="ADDED_GOAL_PARTICIPANTS",e.COMMENTED="COMMENTED",e.COMMA="COMMA",e.SEMICOLON="SEMICOLON",e}({});const gm="bricks/ai-portal/activity-timeline",bm=g.i18n.getFixedT(null,gm);var Am,xm=i(14763);let km,Em,fm,vm,wm;(0,g.initializeI18n)(gm,{en:{STARTED_A_CHAT:"started a chat",CREATED_THIS_GOAL:"created this goal",CHANGED_THE_GOAL_TITLE:'changed the goal title to "{{ title }}"',CHANGED_THE_GOAL_DESCRIPTION:'changed the goal description to "{{ description }}"',CHANGED_THE_GOAL:"changed the goal",DELETED_THIS_GOAL:"deleted this goal",DECOMPOSED_THIS_GOAL:"decomposed this goal to {{ count }} sub-goal: ",DECOMPOSED_THIS_GOAL_plural:"decomposed this goal to {{ count }} sub-goals: ",SET_OWNER:"set {{ user }} as the owner",REMOVED_GOAL_PARTICIPANTS:"removed a goal participant: ",REMOVED_GOAL_PARTICIPANTS_plural:"removed {{ count }} goal participants: ",ADDED_GOAL_PARTICIPANTS:"added a goal participant: ",ADDED_GOAL_PARTICIPANTS_plural:"added {{ count }} goal participants: ",COMMENTED:"commented",COMMA:", ",SEMICOLON:"; "},zh:{STARTED_A_CHAT:"发起了对话",CREATED_THIS_GOAL:"创建了此目标",CHANGED_THE_GOAL_TITLE:"修改目标标题为 “{{ title }}”",CHANGED_THE_GOAL_DESCRIPTION:"修改目标描述为 “{{ description }}”",CHANGED_THE_GOAL:"修改了此目标",DELETED_THIS_GOAL:"删除了此目标",DECOMPOSED_THIS_GOAL:"将此目标分解为 {{ count }} 个子目标:",DECOMPOSED_THIS_GOAL_plural:"将此目标分解为 {{ count }} 个子目标:",SET_OWNER:"设定负责人为 {{ user }}",REMOVED_GOAL_PARTICIPANTS:"移除了目标参与成员:",ADDED_GOAL_PARTICIPANTS:"添加了目标参与成员:",COMMENTED:"评论",COMMA:",",SEMICOLON:";"}});const ym=(0,m.wrapBrick)("eo-link"),Tm=(0,m.wrapBrick)("eo-icon"),Cm=(0,m.wrapBrick)("eo-easyops-avatar"),{defineElement:Sm,property:_m}=(0,u.createDecorators)();let Nm;var Rm=new WeakMap,Mm=new WeakMap;class Im extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Rm,Em(this)),(0,r.A)(this,Mm,(fm(this),vm(this))),wm(this)}get list(){return(0,c.A)(Rm,this)}set list(e){(0,l.A)(Rm,this,e)}get chatUrlTemplate(){return(0,c.A)(Mm,this)}set chatUrlTemplate(e){(0,l.A)(Mm,this,e)}render(){return h().createElement(Om,{list:this.list,chatUrlTemplate:this.chatUrlTemplate})}}function Om(e){let{list:t,chatUrlTemplate:i}=e;return t?h().createElement("ul",null,t.map(((e,t)=>{var n,a;return h().createElement("li",{className:"activity",key:t},h().createElement("div",{className:"guide-line"}),h().createElement("div",{className:"main"},h().createElement(Cm,{className:"avatar",nameOrInstanceId:e.user_id,size:"xs"}),h().createElement("span",{className:"action"},e.user_name," ","start_conversation"===e.action_type?h().createElement(h().Fragment,null,h().createElement("span",null,bm(mm.STARTED_A_CHAT)),h().createElement(ym,{className:"conversation",url:(0,En.Q)(i,e),target:"_blank"},null===(n=e.metadata)||void 0===n?void 0:n.conversation_title),h().createElement(Tm,{className:"external-link-icon",lib:"lucide",icon:"external-link"})):"create_goal"===e.action_type?bm(mm.CREATED_THIS_GOAL):"edit_goal"===e.action_type?e.metadata.after.title?bm(mm.CHANGED_THE_GOAL_TITLE,e.metadata.after):e.metadata.after.description?bm(mm.CHANGED_THE_GOAL_DESCRIPTION,e.metadata.after):bm(mm.CHANGED_THE_GOAL):"delete_goal"===e.action_type?bm(mm.DELETED_THIS_GOAL):"decompose_goals"===e.action_type?`${bm(mm.DECOMPOSED_THIS_GOAL,{count:e.metadata.sub_goals_count})}${e.metadata.sub_goals.map((e=>e.title)).join(bm(mm.COMMA))}`:"alter_owner"===e.action_type?bm(mm.SET_OWNER,{user:e.metadata.after.owner.user_name}):"alter_user"===e.action_type?function(e){const t=[],i=[],n=new Set(e.metadata.before.users.map((e=>e.user_name)));for(const t of e.metadata.after.users)n.has(t.user_name)||i.push(t.user_name);const a=new Set(e.metadata.after.users.map((e=>e.user_name)));for(const i of e.metadata.before.users)a.has(i.user_name)||t.push(i.user_name);const r=[];return t.length>0&&r.push(bm(mm.REMOVED_GOAL_PARTICIPANTS,{count:t.length})+t.join(bm(mm.COMMA))),i.length>0&&r.push(bm(mm.ADDED_GOAL_PARTICIPANTS,{count:i.length})+i.join(bm(mm.COMMA))),r.join(bm(mm.SEMICOLON))}(e):"add_comment"===e.action_type?bm(mm.COMMENTED):e.action_type),h().createElement("span",{className:"time",title:(0,jh.P)(e.time,jh.c.full)},(0,jh.P)(e.time,jh.c.relative))),"add_comment"===e.action_type&&h().createElement("div",{className:"comment"},null===(a=e.metadata)||void 0===a?void 0:a.comment_content))}))):h().createElement("div",{className:"loading"},h().createElement(Tm,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}Am=Im,({e:[Em,fm,vm,wm],c:[Nm,km]}=(0,d.A)(Am,[Sm("ai-portal.activity-timeline",{styleTexts:[xm.A]})],[[_m({attribute:!1}),1,"list"],[_m(),1,"chatUrlTemplate"]],0,void 0,m.ReactNextElement)),km();let Wm=function(e){return e.TERMINATE_THE_TASK="TERMINATE_THE_TASK",e}({});const Dm="bricks/ai-portal/chat-input",Lm=g.i18n.getFixedT(null,Dm);var Pm,zm=i(84479);let Um,Hm,Bm,Vm,jm,Fm,Gm,Ym,Km,Jm,$m,qm,Xm,Qm,Zm,eg,tg,ig,ng;(0,g.initializeI18n)(Dm,{en:{TERMINATE_THE_TASK:"Terminate the task"},zh:{TERMINATE_THE_TASK:"终止任务"}});const ag={lib:"antd",icon:"loading-3-quarters",spinning:!0},rg={lib:"fa",prefix:"far",icon:"circle-stop"},og=(0,m.wrapBrick)("eo-icon"),sg=(0,m.wrapBrick)("ai-portal.icon-button"),{defineElement:lg,property:cg,event:dg}=(0,u.createDecorators)();let pg;var hg=new WeakMap,ug=new WeakMap,mg=new WeakMap,gg=new WeakMap,bg=new WeakMap,Ag=new WeakMap,xg=new WeakSet,kg=new WeakMap,Eg=new WeakMap,fg=new WeakMap;class vg extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,xg),(0,r.A)(this,hg,Hm(this)),(0,r.A)(this,ug,(Bm(this),Vm(this))),(0,r.A)(this,mg,(jm(this),Fm(this))),(0,r.A)(this,gg,(Gm(this),Ym(this))),(0,r.A)(this,bg,(Km(this),Jm(this))),(0,r.A)(this,Ag,($m(this),qm(this))),(0,r.A)(this,kg,(Zm(this),e=>{(0,s.A)(xg,this,Xm).emit(e)})),(0,r.A)(this,Eg,eg(this)),(0,r.A)(this,fg,(ng(this),()=>{(0,s.A)(xg,this,tg).emit()}))}get placeholder(){return(0,c.A)(hg,this)}set placeholder(e){(0,l.A)(hg,this,e)}get autoFocus(){return(0,c.A)(ug,this)}set autoFocus(e){(0,l.A)(ug,this,e)}get submitDisabled(){return(0,c.A)(mg,this)}set submitDisabled(e){(0,l.A)(mg,this,e)}get supportsTerminate(){return(0,c.A)(gg,this)}set supportsTerminate(e){(0,l.A)(gg,this,e)}get terminating(){return(0,c.A)(bg,this)}set terminating(e){(0,l.A)(bg,this,e)}render(){return h().createElement(wg,{placeholder:this.placeholder,autoFocus:this.autoFocus,submitDisabled:this.submitDisabled,supportsTerminate:this.supportsTerminate,terminating:this.terminating,onSubmit:(0,c.A)(kg,this),onTerminate:(0,c.A)(fg,this)})}}function wg(e){let{placeholder:t,autoFocus:i,submitDisabled:n,supportsTerminate:a,terminating:r,onSubmit:o,onTerminate:s}=e;const l=(0,p.useRef)(null),c=(0,p.useRef)(null),[d,u]=(0,p.useState)(""),m=(0,p.useRef)(""),[g,b]=(0,p.useState)(!1);(0,p.useEffect)((()=>{var e;i&&!n&&(null===(e=c.current)||void 0===e||e.focus())}),[i,n]);const A=(0,p.useCallback)((e=>{!n&&e&&(o(e),m.current="",u(""))}),[n,o]),x=(0,p.useCallback)((e=>{A(e.currentTarget.value)}),[A]),k=(0,p.useCallback)((e=>{m.current=e.target.value,u(e.target.value)}),[]),E=(0,p.useCallback)((()=>{A(m.current)}),[A]);(0,p.useEffect)((()=>{const e=null==l?void 0:l.current;if(!e)return;const t=new gt.A((t=>{for(const i of t)i.target===e&&(i.contentBoxSize?i.contentBoxSize[0]?i.contentBoxSize[0].blockSize:i.contentBoxSize.blockSize:i.contentRect.height)>52&&b(!0)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,p.useEffect)((()=>{d||b(!1)}),[d]);const f=(0,p.useCallback)((e=>{var t;for(const t of e.nativeEvent.composedPath())if(t instanceof HTMLTextAreaElement||t instanceof HTMLButtonElement)return;null===(t=c.current)||void 0===t||t.focus()}),[]);return h().createElement("div",{className:"container",onClick:f},h().createElement("div",{className:an()("box",{wrap:g})},h().createElement("div",{className:"input",ref:l},h().createElement(xt,{containerRef:l,ref:c,value:d,minRows:1,maxRows:4,borderSize:0,paddingSize:16,autoResize:!0,placeholder:t,submitWhen:"enter-without-shift",onSubmit:x,onChange:k})),h().createElement("div",{className:"toolbar"},n&&a?h().createElement(h().Fragment,null,r?h().createElement(sg,{icon:ag,disabled:!0}):h().createElement(sg,{icon:rg,tooltip:Lm(Wm.TERMINATE_THE_TASK),onClick:s})):h().createElement("button",{className:"btn-send",disabled:n||!d,onClick:E},h().createElement(og,{lib:"fa",icon:"arrow-up"})))))}Pm=vg,({e:[Hm,Bm,Vm,jm,Fm,Gm,Ym,Km,Jm,$m,qm,Xm,Qm,Zm,eg,tg,ig,ng],c:[pg,Um]}=(0,d.A)(Pm,[lg("ai-portal.chat-input",{styleTexts:[zm.A],shadowOptions:{delegatesFocus:!0}})],[[cg(),1,"placeholder"],[cg({type:Boolean}),1,"autoFocus"],[cg({type:Boolean}),1,"submitDisabled"],[cg({type:Boolean}),1,"supportsTerminate"],[cg({type:Boolean}),1,"terminating"],[dg({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(Ag,e),(e,t)=>(0,l.A)(Ag,e,t)],[dg({type:"terminate"}),1,"terminate",e=>(0,c.A)(Eg,e),(e,t)=>(0,l.A)(Eg,e,t)]],0,(e=>fg.has((0,o.A)(e))),m.ReactNextElement)),Um();const yg=i.p+"images/e47076cc.png";var Tg,Cg=i(31653);let Sg;const{defineElement:_g}=(0,u.createDecorators)();let Ng;class Rg extends m.ReactNextElement{render(){return h().createElement("img",{className:"logo",alt:"Elevo",src:yg,width:95,height:28})}}Tg=Rg,[Ng,Sg]=(0,d.A)(Tg,[_g("ai-portal.elevo-logo",{styleTexts:[Cg.A]})],[],0,void 0,m.ReactNextElement).c,Sg();let Mg=function(e){return e.WATCH_REPLAY="WATCH_REPLAY",e}({});const Ig="bricks/ai-portal/show-case",Og={en:{[Mg.WATCH_REPLAY]:"Watch replay"},zh:{[Mg.WATCH_REPLAY]:"查看回放"}},Wg=g.i18n.getFixedT(null,Ig);var Dg,Lg=i(46122);let Pg,zg,Ug,Hg,Bg,Vg,jg;(0,g.initializeI18n)(Ig,Og);const Fg=["purple","green","pink"],Gg=(0,m.wrapBrick)("eo-icon"),Yg=(0,m.wrapBrick)("eo-link"),{defineElement:Kg,property:Jg}=(0,u.createDecorators)();let $g;var qg=new WeakMap,Xg=new WeakMap,Qg=new WeakMap;class Zg extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,qg,zg(this)),(0,r.A)(this,Xg,(Ug(this),Hg(this))),(0,r.A)(this,Qg,(Bg(this),Vg(this))),jg(this)}get caseTitle(){return(0,c.A)(qg,this)}set caseTitle(e){(0,l.A)(qg,this,e)}get summary(){return(0,c.A)(Xg,this)}set summary(e){(0,l.A)(Xg,this,e)}get url(){return(0,c.A)(Qg,this)}set url(e){(0,l.A)(Qg,this,e)}render(){return h().createElement(eb,{caseTitle:this.caseTitle,summary:this.summary,url:this.url})}}function eb(e){let{caseTitle:t,summary:i,url:n}=e;return h().createElement(Yg,{className:`link ${Fg[Math.floor(Math.random()*Fg.length)]}`,url:n},h().createElement("span",{className:"title"},t),h().createElement("span",{className:"description"},i),h().createElement("span",{className:"mask"}),h().createElement("span",{className:"button"},h().createElement(Gg,{lib:"easyops",icon:"replay"}),Wg(Mg.WATCH_REPLAY)))}Dg=Zg,({e:[zg,Ug,Hg,Bg,Vg,jg],c:[$g,Pg]}=(0,d.A)(Dg,[Kg("ai-portal.show-case",{styleTexts:[Lg.A]})],[[Jg(),1,"caseTitle"],[Jg(),1,"summary"],[Jg(),1,"url"]],0,void 0,m.ReactNextElement)),Pg(),customElements.define("ai-portal.call-tool",(0,Bl.createProviderClass)((async function(e,t){return(await bn.http.post(`api/gateway/logic.llm.aiops_service/api/v1/elevo/conversation/${e.conversationId}/step/${e.stepId}/view`,{params:t})).data})))},62522:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,"ai-portal\\.preview-container{display:block;background:rgba(247,248,250,1)}.loading--uD2jY9vX{position:absolute;top:50%;left:50%;font-size:48px;color:var(--palette-gray-5);margin:0 -24px}",""]),o.locals={loading:"loading--uD2jY9vX"};const s=o},79286:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.link{display:block}.link::part(link){display:flex;align-items:center;gap:16px;padding:12px 24px;color:#262626;background:rgba(255,255,255,0.6);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.link.actions-active::part(link),\n.link::part(link):hover{background:rgba(0,0,0,0.05);-webkit-backdrop-filter:none;backdrop-filter:none}.item:not(:last-child){margin-bottom:4px}.icon{font-size:18px;margin-right:8px}.title{font-weight:500;font-size:16px}.title,\n.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.goal{background:#f0fff8;border-radius:4px;font-weight:500;font-size:12px;color:#1dc897;line-height:20px;padding:2px 8px;white-space:nowrap}.goal.global{background:#e6f4ff;color:#1a7aff}.header{display:flex;align-items:center}.description{color:#595959;margin-top:6px;padding-left:28px;line-height:20px}.time{color:rgba(0,0,0,0.45);white-space:nowrap}.main{flex:1;min-width:0}.operations{display:flex;align-items:center;justify-content:right;width:100px}.operations.lang-zh{width:64px}.link.actions-active .time,\n.link:hover .time,\n.link:not(:hover):not(.actions-active) .actions{display:none}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const s=o.toString()},82165:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(32360),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block;padding:24px 54px 72px}:host([hidden]){display:none}:host::before{content:"";position:fixed;z-index:-1;top:0;right:0;bottom:0;left:0;background-color:#f1f1f1;background-image:url(${p});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}@media (max-width: 719px){:host{padding-left:24px;padding-right:24px}}`,""]);const h=d.toString()},83059:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(25676),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1{font-weight:500;margin:0;font-size:20px;line-height:28px;margin-bottom:17px}.list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.link{display:block;height:100%}.link::part(link){display:block;height:100%;color:#262626;background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px;box-sizing:border-box}.link:not(.clickable)::part(link){cursor:auto}.clickable::part(link):hover{box-shadow:0px 4px 10px 0px rgba(0,0,0,0.1)}.heading{display:flex;align-items:center}.icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#ffffff;border-radius:12px;border:1px solid #e8e9ec;font-size:32px;color:#595959;margin-right:16px}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clickable::part(link):hover .title{color:var(--elevo-color-brand)}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.tags{display:flex;gap:6px;margin:16px 0 -3px}.tag{display:block;background:rgba(0,0,0,0.04);border-radius:4px;font-size:12px;line-height:22px;padding:0 7px}`,""]);const h=d.toString()},84479:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container{background-color:#fff;border:2px solid #7891ff;border-radius:12px;box-shadow:0px 9px 28px 8px rgba(0,0,0,0.05),0px 6px 16px 0px rgba(0,0,0,0.08),0px 3px 6px -4px rgba(0,0,0,0.12);cursor:text}.container:not(:has(textarea:focus)){background-color:rgba(255,255,255,0.5);border-color:#99c4ff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.box{display:flex;flex-wrap:wrap;border-radius:10px;padding:8px}.input{min-width:0;flex:1}.wrap .input{flex-basis:100%}.input textarea{display:block;width:100%;padding:8px;font:inherit;font-size:16px;line-height:24px;color:var(--antd-input-color);border:none;background:none;height:24px;color:#262626}.input textarea::placeholder{color:#bfbfbf}.toolbar{padding:5px 0 5px 8px;margin-left:auto;display:flex;align-items:center;gap:2px}.btn-send:focus,\ntextarea:focus{outline:none}.btn-send{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff}.btn-send:disabled{background:rgba(0,0,0,0.15)}.btn-send:not(:disabled){cursor:pointer}.btn-send:not(:disabled):hover{background:#5166ff}.btn-send:not(:disabled):active{background:#1e33cc}",""]);const s=o.toString()},88786:(e,t,i)=>{e.exports=i.p+"images/e15a6988.png"},98036:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(25676),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto;margin-bottom:17px}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px;margin-bottom:17px}h2{font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.link{display:block;height:100%}.link::part(link){display:block;height:100%;color:#262626;background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px;box-sizing:border-box}.link:not(.clickable)::part(link){cursor:auto}.clickable::part(link):hover{box-shadow:0px 4px 10px 0px rgba(0,0,0,0.1)}.heading{display:flex;align-items:center}.avatar{width:48px;height:48px;border-radius:12px;margin-right:16px;background-color:#d5d6e6;display:flex;align-items:center;justify-content:center;font-size:24px}.avatar img{width:100%;height:100%}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clickable::part(link):hover .title{color:var(--elevo-color-brand)}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const h=d.toString()}}]);
|
|
3
|
-
//# sourceMappingURL=7431.
|
|
1
|
+
/*! For license information please see 7431.6b6bb81a.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[7431],{24:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:block;white-space:nowrap}.container{border-radius:var(--elevo-border-radius)}:host([hidden]){display:none}*{box-sizing:border-box}.label{font-weight:500;overflow:hidden;text-overflow:ellipsis}.stat{font-weight:600}.chart{min-width:0}.chart > *{display:block}:host(:not([size="small"])) .container{background:linear-gradient(164deg,rgba(105,153,253,0) 40%,rgba(105,153,253,0.05) 60%,rgba(105,153,253,0.32) 100%),#fff;padding:22px}:host(:not([size="small"])) .label{font-size:14px;height:22px;margin-bottom:16px}:host(:not([size="small"])) .stat-and-chart{display:flex;align-items:center;justify-content:end;position:relative}:host(:not([size="small"])) .stat{font-size:36px;color:#1d212a;position:absolute;left:0}:host(:not([size="small"])) .chart{width:calc(100% - 160px)}:host([size="small"]) .container{padding:11px 15px;display:flex;align-items:center;justify-content:end;position:relative;background:var(--elevo-component-background);-webkit-backdrop-filter:var(--elevo-component-backdrop-filter);backdrop-filter:var(--elevo-component-backdrop-filter)}:host([size="small"]) .label-and-stat{position:absolute;left:15px}:host([size="small"]) .label{font-size:12px;color:#8c8c8c;line-height:17px;height:17px;margin-bottom:7px}:host([size="small"]) .stat{font-size:20px;color:#262626;line-height:24px}:host([size="small"]) .chart{width:calc(100% - 90px)}',""]);const s=o.toString()},10335:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.goal-container{display:flex;flex-direction:column;gap:3px}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const s=o.toString()},11816:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.button-container{display:flex;gap:6px}.action::part(button){height:28px;font-size:13px;padding:5px 10px}.action.active::part(button){color:var(--elevo-color-brand);background-color:rgba(var(--elevo-color-brand-rgb-channel),0.04);border-color:#c9d7ff}.icon{font-size:16px;margin-right:4px}.remove{padding:1px;font-size:14px;margin-left:10px}",""]);const s=o.toString()},14763:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:block;color:#262626}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.activity{position:relative;padding-left:27px}.activity + .activity{margin-top:20px}.main{display:flex;align-items:flex-start}.action{flex:1;min-width:0;display:flex;align-items:center;margin-left:6px;word-break:break-word}.time{color:#8c8c8c;margin-left:12px}.action,\n.time{padding:1px 0}.guide-line{position:absolute;left:8px;top:0;bottom:-20px;width:0;background-color:#d8d8d8}.guide-line::before{content:"";position:absolute;top:0;bottom:0;left:3.5px;width:1px;background-color:#d8d8d8}.guide-line::after{content:"";position:absolute;top:8px;left:0;width:8px;height:8px;border-radius:8px;background-color:#d8d8d8}.activity:first-child .guide-line::before{top:12px}.activity:last-child .guide-line::before{height:12px;bottom:auto}.comment{position:relative;font-size:13px;color:#595959;background-color:#f3f3f3;border-radius:8px;padding:8px 12px;margin-top:10px}.comment::before{content:"";position:absolute;top:-6px;left:36px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #f3f3f3}.conversation{margin:0 7px 0 10px}.conversation::part(link){background:#f9f0ff;border-radius:3px;font-weight:500;font-size:12px;color:#aa64f5;display:flex;align-items:center;height:24px;padding:0 8px}.external-link-icon{color:#8c8c8c}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}',""]);const s=o.toString()},20124:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.tabs{list-style:none;padding:0;margin:0;display:flex;font-size:16px}.tabs .tab + .tab{margin-left:32px}.tabs a{color:rgba(38,38,38,0.65);cursor:pointer}.tabs .active a{color:#262626;font-weight:500}.tabs .active a::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}',""]);const s=o.toString()},23677:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.link{display:block}.link::part(link){display:flex;align-items:center;padding:12px 24px;color:#262626;background:rgba(255,255,255,0.6);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.item:not(:last-child){margin-bottom:4px}.link.actions-active::part(link),\n.link::part(link):hover{background:rgba(0,0,0,0.05);-webkit-backdrop-filter:none;backdrop-filter:none}.icon{font-size:20px;margin-right:8px}.title{font-weight:500;font-size:16px}.title,\n.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment{color:#1a7aff;margin-left:8px}.header{display:flex;align-items:center}.description{color:#595959;padding-left:28px;line-height:20px}.time{color:rgba(0,0,0,0.45);margin:0 16px}.main{flex:1;min-width:0}.operations{display:flex;align-items:center;justify-content:center;width:32px;height:32px}.link.actions-active .avatar,\n.link:hover .avatar,\n.link:hover .time,\n.link:not(:hover):not(.actions-active) .actions{display:none}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const s=o.toString()},25676:(e,t,i)=>{e.exports=i.p+"images/4b299d0b.png"},31653:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}img{vertical-align:middle}",""]);const s=o.toString()},31748:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(25676),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px;margin-bottom:17px}h2{font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.icon{font-size:24px;color:#333;margin-right:8px}.title{font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const h=d.toString()},32360:(e,t,i)=>{e.exports=i.p+"images/72c24398.png"},40138:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:inline-block}:host([hidden]){display:none}*{box-sizing:border-box}.trigger{display:flex;align-items:center;font-size:14px;cursor:pointer;position:relative;padding:4px 12px;border-radius:15px;color:var(--elevo-color-brand)}.trigger:hover{background-color:rgba(37,64,255,0.06)}.trigger::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;padding:1px;background:linear-gradient(145deg,rgba(37,64,255,1),rgba(180,95,248,1));border-radius:15px;-webkit-mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:xor;-webkit-mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor}.trigger .label{margin-right:0}.label{max-width:650px;margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown{max-width:500px;border-radius:4px;background:var(--antd-dropdown-menu-bg);box-shadow:var(--antd-box-shadow-base)}.dropdown-inner{padding:9px 4px}.search-container{padding:3px;border-bottom:1px solid rgba(0,0,0,0.08)}.search::part(affix-wrapper){box-shadow:none;border:none}eo-menu{border:0;padding:0;background:none;border-radius:0}eo-menu-item::part(menu-item){padding:5px 8px;line-height:22px;border-radius:var(--medius-border-radius)}eo-menu-item:not([disabled]):hover::part(menu-item){background-color:var(--left-sidebar-item-hover-bg)}.active::part(menu-item){font-weight:600;background-color:var(--left-sidebar-item-hover-bg)}.empty{display:flex;justify-content:center;align-items:center;color:var(--color-secondary-text)}',""]);const s=o.toString()},42873:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:flex;flex-direction:column;align-items:center;max-width:1020px;width:100%}:host([hidden]){display:none}*{box-sizing:border-box}.tips{color:rgba(0,0,0,0.45);margin-bottom:27px}.cases{list-style:none;padding:0;margin:0;display:grid;width:100%;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px;margin-top:36px}",""]);const s=o.toString()},46121:(e,t,i)=>{e.exports=i.p+"images/69cf3ae2.png"},46122:(e,t,i)=>{i.d(t,{A:()=>b});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(56791),i.b),d=new URL(i(88786),i.b),p=new URL(i(46121),i.b),h=o()(a()),u=l()(c),m=l()(d),g=l()(p);h.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.link{display:block;background:rgba(255,255,255,0.6);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-size:cover;background-position:center;background-repeat:no-repeat;background-clip:padding-box;overflow:hidden}.purple{background-image:url(${u})}.green{background-image:url(${m})}.pink{background-image:url(${g})}.link::part(link){display:flex;flex-direction:column;gap:0;box-sizing:border-box;height:128px;padding:20px;position:relative}.title{width:100%;margin-bottom:8px;color:#262626;font-weight:500;font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{width:100%;height:60px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;color:#18212f;line-height:20px}.link::part(link):hover{box-shadow:0px 4px 12px 0px rgba(96,96,138,0.15),0px 2px 4px 0px rgba(96,96,138,0.06)}.button{display:none;position:absolute;bottom:12px;left:20px;right:20px;height:32px;background:rgba(0,0,0,0.04);border-radius:8px;align-items:center;justify-content:center;gap:4px;color:#262626}.button:hover{background:rgba(0,0,0,0.08)}.link:hover .button{display:flex}.link:hover .description{-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0.11) 51%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0.11) 51%,rgba(0,0,0,0) 100%);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 60%;mask-size:100% 60%}`,""]);const b=h.toString()},46342:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,".goal-item{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;padding:12px 24px;background-color:rgba(255,255,255,0.6);border-radius:8px;-webkit-user-select:none;user-select:none;border:1px solid transparent}.goal-item:hover,.goal-item:has(.title:focus){background-color:rgba(0,0,0,0.05)}.goal-item:has(.title:focus) .end .operation{display:flex}.goal-item:hover:not(.does-not-exist) .end .operation{display:flex}.goal-item:has(.title:focus) .end .info{display:none}.goal-item:hover:not(.does-not-exist) .end .info{display:none}.goal-item.completed .serial-number,.goal-item.completed .title{color:#bfbfbf}.goal-item.active{background:rgba(37,64,255,0.1);border:1px solid #2540ff}.goal-item > *{-webkit-user-select:auto;user-select:auto}.goal-item .start,.goal-item .end{display:flex;align-items:center}.goal-item .start{flex:1;min-width:0;column-gap:16px;min-width:0}.goal-item .end{flex-shrink:0;column-gap:30px}.goal-item .end .operation{display:none;align-items:center;gap:8px}.goal-item .end .operation eo-button::part(button){height:28px}.goal-item .end .operation .new-chat::part(button){padding:5px 10px;font-size:13px}.goal-item .end .operation .append-child::part(button){padding:5px 8px;font-size:14px}.goal-item .end .info{display:inline-flex;align-items:center;column-gap:24px}.goal-item .serial-number{font-weight:400;color:var(--palette-gray-7);font-size:16px;overflow:visible}.goal-item .title{font-weight:500;padding:2px 4px;font-size:16px;color:var(--palette-gray-10);border:1px solid transparent;border-radius:8px;cursor:pointer;min-width:80px}.goal-item .title:hover{background-color:rgba(255,255,255,0.6);border:1px solid var(--palette-gray-5);cursor:text}.goal-item .title:focus{outline:none;background-color:rgba(255,255,255,0.6);border:1px solid var(--elevo-color-brand)}.goal-item .icon{border-radius:8px;padding:6px;position:relative;top:2px}.goal-item .icon:hover{background-color:rgba(0,0,0,0.04)}.goal-item .message{color:var(--palette-gray-7);display:inline-flex;align-items:center;column-gap:6px}.goal-item .message .count{font-weight:500;color:var(--palette-gray-10)}.goal-item:not(.editing) .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",""]);const s=o.toString()},47008:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(47336),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.root{color:#262626;background:url(${p}) no-repeat center bottom;background-size:100% 104px;padding:12px 12px 29px;margin:0 -12px}.container{position:relative;background:#ffffff;box-shadow:0px 2px 4px 0px rgba(38,45,65,0.1);border-radius:16px;border:1px solid #dadfe8}.container:has(textarea:focus){border-color:#b7c3d8}textarea{display:block;width:100%;padding:10px 16px 50px;color:var(--antd-input-color);border-radius:16px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,0.5);font:inherit;font-size:14px;line-height:22px;height:120px}textarea::placeholder{color:rgba(0,0,0,0.4)}.btn-send:focus,\ntextarea:focus{outline:none}.actions-bar{position:absolute;bottom:12px;left:14px;right:14px;display:flex;align-items:flex-end;justify-content:space-between}.btn-send{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff;flex-shrink:0}.btn-send[disabled]{background:rgba(0,0,0,0.15)}.btn-send:not([disabled]){cursor:pointer}.btn-send:not([disabled]):hover{background:#5166ff}.btn-send:not([disabled]):active{background:#1e33cc}.mentions{position:absolute}.mention-overlay{position:absolute;border-radius:4px;pointer-events:none;background:rgba(38,45,65,0.1)}`,""]);const h=d.toString()},47336:(e,t,i)=>{e.exports=i.p+"images/25c20165.png"},47338:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:inline-block}:host([hidden]){display:none}:host,\neo-tooltip{vertical-align:middle}button{width:28px;height:28px;font-size:18px;border-radius:8px;display:flex;align-items:center;justify-content:center;border:none;background:none;color:#333}button:disabled{color:#8c8c8c}button:not(:disabled){cursor:pointer}button:focus{outline:none}button:not(:disabled):hover{background:rgba(0,0,0,0.04)}button:not(:disabled):active{background:rgba(0,0,0,0.08)}:host([variant="light"]) button{color:#595959}:host([variant="mini"]) button{width:24px;height:24px;font-size:16px;border-radius:4px}:host([variant="mini-light"]) button{color:#8c8c8c;width:20px;height:20px;font-size:14px;border-radius:4px}:host([variant="bordered"]) button{background:#ffffff;border-radius:8px;border:1px solid rgba(0,0,0,0.1);color:#595959;width:32px;height:32px;font-size:18px}:host([variant="bordered"]) button:not(:disabled):hover{background:rgba(0,0,0,0.04)}',""]);const s=o.toString()},49041:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(25676),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:17px 54px 48px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}:host([size="small"]) .container{max-width:1000px}.header{margin-bottom:30px;display:flex;justify-content:space-between;align-items:center}nav{font-weight:500;font-size:20px;line-height:28px;display:flex;min-width:0}h1{margin:0;font-size:inherit;line-height:inherit}.breadcrumbs{list-style:none;padding:0;margin:0;color:#bfbfbf}.breadcrumbs eo-link::part(link){color:inherit}.breadcrumbs eo-link::part(link):hover{color:#595959}.breadcrumbs li::after{content:"/";margin:0 8px}@media (max-width: 719px){:host{padding-left:24px;padding-right:24px}.header{margin-left:40px}}`,""]);const h=d.toString()},56791:(e,t,i)=>{e.exports=i.p+"images/3e0f6758.png"},61408:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;z-index:1;width:260px;height:100%;background:rgba(246,247,249,0.5);border:1px solid rgba(255,255,255,0.3);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:23px 11px 0;display:flex;flex-direction:column;transition:transform 0.3s ease-in-out}.logo-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;margin-left:4px}.logo-link::part(link){display:block}.logo{vertical-align:middle}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -12px}.dropdown{display:block}.account{background:none;border:none;border-radius:8px;padding:6px 10px;display:block;width:100%;text-align:left;cursor:pointer}.account:hover{background:rgba(0,0,0,0.04)}.alternative{position:fixed;top:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out;background:rgba(255,255,255,0);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.alternative .new-chat::part(link){padding:4px;margin-left:16px;font-size:12px}.alternative .new-chat::part(link):hover{color:#7891ff}.alternative .new-chat::part(link):active{color:#0911b3}.container{width:270px;padding:10px 0 10px 10px;height:100%;transition:width 0.3s ease-in-out,padding 0.3s ease-in-out}.container.collapsed{width:0;padding:10px 0;overflow:visible}.container.collapsed .sidebar{transform:translateX(-100%)}.container.collapsed .alternative{opacity:1}:host([behavior="drawer"]){z-index:1;width:0}:host(:not([behavior="drawer"])) .alternative .new-chat{display:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0}.links{border-bottom:1px solid rgba(0,0,0,0.06);padding-bottom:16px;margin-bottom:16px}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 10px;border-radius:8px;color:#000}.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -12px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .section + .section{margin-top:14px}.history .section-title{display:flex;align-items:center;justify-content:space-between;height:30px;margin-bottom:6px;padding:0 8px}.history .section-label{display:flex;align-items:center;height:24px;padding:0 8px;margin-left:-8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-size:12px;color:#8c8c8c;border-radius:8px}.history .section-label eo-icon{vertical-align:middle;margin-left:6px;transition:transform 0.2s ease-in-out}.history .section-label:hover{background:rgba(0,0,0,0.04)}.history .collapsed > ul{display:none}.history .collapsed .section-label eo-icon{transform:rotate(-90deg)}.history .error,.history .loading{display:flex;align-items:center;height:36px;padding:0 8px}.history .loading{justify-content:center}.history .error{color:var(--color-error)}.history .group + .group{margin-top:15px}.history .group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.history .item{display:block}.history .item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.history .item.active::part(link){background:rgba(0,0,0,0.06)}.history .item.actions-active::part(link),.history .item::part(link):hover{background:rgba(0,0,0,0.04)}.history .item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history .actions{cursor:auto}.history .item:not(:hover):not(.actions-active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.history .item.actions-active .working,.history .item:hover .working,.history .item.active .working{display:none}.history .load-more{display:flex;justify-content:center;align-items:center;height:36px}',""]);const s=o.toString()},62069:(e,t,i)=>{var n,a=i(74635),r=i(70918),o=i(26902),s=i(5536),l=i(86121),c=i(70829),d=i(62740),p=i(18769),h=i.n(p),u=i(90870),m=i(30981),g=(i(34419),i(68443)),b=i(80079),A=i(87716);let x,k,E,f,v,w,y,T,C,S,_,N,R,M,I,O,W,D,L,P,z,U,H,B,V,j,F,G,Y,K,J,$,q,X,Q,Z,ee,te,ie,ne,ae,re,oe,se,le,ce,de,pe,he,ue,me,ge,be,Ae,xe,ke,Ee,fe,ve,we;(0,g.initializeI18n)(b.NS,b.I);const{defineElement:ye,property:Te,event:Ce,method:Se}=(0,u.createDecorators)(),_e=(0,p.forwardRef)(A.B);let Ne;var Re=new WeakMap,Me=new WeakMap,Ie=new WeakMap,Oe=new WeakMap,We=new WeakMap,De=new WeakMap,Le=new WeakMap,Pe=new WeakMap,ze=new WeakMap,Ue=new WeakMap,He=new WeakMap,Be=new WeakMap,Ve=new WeakMap,je=new WeakMap,Fe=new WeakMap,Ge=new WeakMap,Ye=new WeakMap,Ke=new WeakMap,Je=new WeakSet,$e=new WeakMap,qe=new WeakMap,Xe=new WeakMap,Qe=new WeakMap,Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,it=new WeakMap,nt=new WeakMap,at=new WeakMap,rt=new WeakMap,ot=new WeakMap;class st extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Je),(0,r.A)(this,Re,(x(this),E(this))),(0,r.A)(this,Me,(f(this),v(this))),(0,r.A)(this,Ie,(w(this),y(this))),(0,r.A)(this,Oe,(T(this),C(this))),(0,r.A)(this,We,(S(this),_(this))),(0,r.A)(this,De,(N(this),R(this))),(0,r.A)(this,Le,(M(this),I(this))),(0,r.A)(this,Pe,(O(this),W(this))),(0,r.A)(this,ze,(D(this),L(this))),(0,r.A)(this,Ue,(P(this),z(this))),(0,r.A)(this,He,(U(this),H(this))),(0,r.A)(this,Be,(B(this),V(this))),(0,r.A)(this,Ve,(j(this),F(this))),(0,r.A)(this,je,(G(this),Y(this))),(0,r.A)(this,Fe,(K(this),J(this))),(0,r.A)(this,Ge,($(this),q(this))),(0,r.A)(this,Ye,(X(this),Q(this))),(0,r.A)(this,Ke,(Z(this),ee(this))),(0,r.A)(this,$e,(ne(this),()=>{(0,s.A)(Je,this,te).emit()})),(0,r.A)(this,qe,ae(this)),(0,r.A)(this,Xe,(se(this),()=>{(0,s.A)(Je,this,re).emit()})),(0,r.A)(this,Qe,le(this)),(0,r.A)(this,Ze,(pe(this),e=>{(0,s.A)(Je,this,ce).emit(e)})),(0,r.A)(this,et,he(this)),(0,r.A)(this,tt,(ge(this),e=>{(0,s.A)(Je,this,ue).emit(e)})),(0,r.A)(this,it,be(this)),(0,r.A)(this,nt,(ke(this),()=>{(0,s.A)(Je,this,Ae).emit("chat")})),(0,r.A)(this,at,Ee(this)),(0,r.A)(this,rt,(we(this),e=>{(0,s.A)(Je,this,fe).emit(e)})),(0,r.A)(this,ot,(0,p.createRef)())}get conversationId(){return(0,c.A)(Re,this)}set conversationId(e){(0,l.A)(Re,this,e)}get initialRequest(){return(0,c.A)(Me,this)}set initialRequest(e){(0,l.A)(Me,this,e)}get replay(){return(0,c.A)(Ie,this)}set replay(e){(0,l.A)(Ie,this,e)}get replayDelay(){return(0,c.A)(Oe,this)}set replayDelay(e){(0,l.A)(Oe,this,e)}get supports(){return(0,c.A)(We,this)}set supports(e){(0,l.A)(We,this,e)}get showHiddenJobs(){return(0,c.A)(De,this)}set showHiddenJobs(e){(0,l.A)(De,this,e)}get showHumanActions(){return(0,c.A)(Le,this)}set showHumanActions(e){(0,l.A)(Le,this,e)}get showFeedback(){return(0,c.A)(Pe,this)}set showFeedback(e){(0,l.A)(Pe,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(ze,this)}set showFeedbackAfterFailed(e){(0,l.A)(ze,this,e)}get showFeedbackOnView(){return(0,c.A)(Ue,this)}set showFeedbackOnView(e){(0,l.A)(Ue,this,e)}get showUiSwitch(){return(0,c.A)(He,this)}set showUiSwitch(e){(0,l.A)(He,this,e)}get hideMermaid(){return(0,c.A)(Be,this)}set hideMermaid(e){(0,l.A)(Be,this,e)}get showJsxEditor(){return(0,c.A)(Ve,this)}set showJsxEditor(e){(0,l.A)(Ve,this,e)}get previewUrlTemplate(){return(0,c.A)(je,this)}set previewUrlTemplate(e){(0,l.A)(je,this,e)}get showCases(){return(0,c.A)(Fe,this)}set showCases(e){(0,l.A)(Fe,this,e)}get exampleProjects(){return(0,c.A)(Ge,this)}set exampleProjects(e){(0,l.A)(Ge,this,e)}get tryItOutUrl(){return(0,c.A)(Ye,this)}set tryItOutUrl(e){(0,l.A)(Ye,this,e)}resumed(){var e,t;null===(e=(0,c.A)(ot,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(ot,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(ot,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(ot,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return h().createElement(_e,{conversationId:this.conversationId,initialRequest:this.initialRequest,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHiddenJobs:this.showHiddenJobs,showHumanActions:this.showHumanActions,showFeedback:this.showFeedback,showFeedbackAfterFailed:this.showFeedbackAfterFailed,showUiSwitch:this.showUiSwitch,showFeedbackOnView:this.showFeedbackOnView,showJsxEditor:this.showJsxEditor,previewUrlTemplate:this.previewUrlTemplate,showCases:this.showCases,exampleProjects:this.exampleProjects,tryItOutUrl:this.tryItOutUrl,onShare:(0,c.A)($e,this),onTerminate:(0,c.A)(Xe,this),onSubmitFeedback:(0,c.A)(Ze,this),onSwitchToChat:(0,c.A)(nt,this),onFeedbackOnView:(0,c.A)(tt,this),onDetailChange:(0,c.A)(rt,this),ref:(0,c.A)(ot,this)})}}n=st,({e:[E,f,v,w,y,T,C,S,_,N,R,M,I,O,W,D,L,P,z,U,H,B,V,j,F,G,Y,K,J,$,q,X,Q,Z,ee,te,ie,ne,ae,re,oe,se,le,ce,de,pe,he,ue,me,ge,be,Ae,xe,ke,Ee,fe,ve,we,x],c:[Ne,k]}=(0,d.A)(n,[ye("ai-portal.cruise-canvas",{shadowOptions:!1})],[[Te(),1,"conversationId"],[Te({attribute:!1,render:!1}),1,"initialRequest"],[Te({type:Boolean,render:!1}),1,"replay"],[Te({type:Number,render:!1}),1,"replayDelay"],[Te({attribute:!1}),1,"supports"],[Te({type:Boolean}),1,"showHiddenJobs"],[Te({type:Boolean}),1,"showHumanActions"],[Te({type:Boolean}),1,"showFeedback"],[Te({type:Boolean}),1,"showFeedbackAfterFailed"],[Te({type:Boolean}),1,"showFeedbackOnView"],[Te({type:Boolean}),1,"showUiSwitch"],[Te({type:Boolean,render:!1}),1,"hideMermaid"],[Te({type:Boolean}),1,"showJsxEditor"],[Te(),1,"previewUrlTemplate"],[Te({attribute:!1}),1,"showCases"],[Te({attribute:!1}),1,"exampleProjects"],[Te(),1,"tryItOutUrl"],[Ce({type:"share"}),1,"shareEvent",e=>(0,c.A)(Ke,e),(e,t)=>(0,l.A)(Ke,e,t)],[Ce({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(qe,e),(e,t)=>(0,l.A)(qe,e,t)],[Ce({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Qe,e),(e,t)=>(0,l.A)(Qe,e,t)],[Ce({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(et,e),(e,t)=>(0,l.A)(et,e,t)],[Ce({type:"ui.switch"}),1,"switch",e=>(0,c.A)(it,e),(e,t)=>(0,l.A)(it,e,t)],[Ce({type:"detail.change"}),1,"detailChange",e=>(0,c.A)(at,e),(e,t)=>(0,l.A)(at,e,t)],[Se(),2,"resumed"],[Se(),2,"feedbackSubmitDone"],[Se(),2,"feedbackSubmitFailed"],[Se(),2,"feedbackOnViewDone"]],0,(e=>ot.has((0,o.A)(e))),m.ReactNextElement)),k();var lt=i(24586);const ct=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"];function dt(e){const t=window.getComputedStyle(e);return`${ct.map((e=>`${e}:${t.getPropertyValue(e)}`)).join(";")};\n min-height: 0!important;\n max-height: none!important;\n height: 0!important;\n visibility: hidden!important;\n overflow: hidden!important;\n position: absolute!important;\n z-index: -1000!important;\n top: 0!important;\n left: 0!important;\n pointer-events: none!important;\n`}let pt,ht;var ut=i(89575),mt=i(59435),gt=i(99126);let bt;const At=/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"metaKey":"ctrlKey",xt=p.forwardRef(kt);function kt(e,t){let{autoResize:i,minRows:n,maxRows:a,borderSize:r,paddingSize:o,containerRef:s,value:l,style:c,submitWhen:d,desiredSelectionRef:h,onChange:u,onSubmit:m,onKeyDown:g,onCompositionStart:b,onCompositionEnd:A,...x}=e;const k=null==i||i,[E,f]=(0,p.useState)(null!=l?l:""),v=(0,p.useRef)(null),[w,y]=(0,p.useState)(null);(0,p.useImperativeHandle)(t,(()=>({focus:()=>{const e=v.current;if(e){var t;const i=null===(t=e.value)||void 0===t?void 0:t.length;e.focus(),i&&e.setSelectionRange(i,i)}},element:v.current})),[]);const T=(0,p.useCallback)((()=>{const e=v.current;if(e&&k){const t=function(e,t){const{minRows:i=null,maxRows:n=null,borderSize:a=2,paddingSize:r=8}=null!=t?t:{};let o,s,l;bt||(bt=document.createElement("textarea"),bt.setAttribute("tab-index","-1"),bt.setAttribute("aria-hidden","true"),document.body.appendChild(bt)),bt.setAttribute("style",dt(e)),bt.value=e.value||e.placeholder||"";let c=bt.scrollHeight+a;if(null!==i||null!==n){const e=parseFloat(window.getComputedStyle(bt).getPropertyValue("line-height"));null!==i&&(o=e*i+r+a,c=Math.max(o,c)),null!==n&&(s=e*n+r+a,c<=s&&(l="hidden"),c=Math.min(s,c))}const d={height:c,overflowY:l,resize:"none"};return o&&(d.minHeight=o),s&&(d.maxHeight=s),d}(e,{minRows:n,maxRows:a,borderSize:r,paddingSize:o});(0,mt.flushSync)((()=>{y(t)}))}}),[k,a,n,r,o]);(0,p.useEffect)((()=>{f(null!=l?l:"")}),[l]),(0,p.useEffect)((()=>{T()}),[T,E]);const C=(0,p.useRef)(!1),S=(0,p.useCallback)((e=>{C.current=!0,null==b||b(e)}),[b]),_=(0,p.useCallback)((e=>{C.current=!1,null==A||A(e)}),[A]),N=(0,p.useCallback)((e=>{C.current||!1!==(null==g?void 0:g(e))&&"Enter"===e.key&&("enter-without-shift"===d?!e.shiftKey:"enter-with-mod"===d&&e[At])&&(e.preventDefault(),e.stopPropagation(),null==m||m(e))}),[g,m,d]);return(0,p.useLayoutEffect)((()=>{const e=null==h?void 0:h.current,t=v.current;if(e&&t){const{start:i,end:n}=e;h.current=null,t.setSelectionRange(i,n)}}),[h,E]),(0,p.useEffect)((()=>{const e=null==s?void 0:s.current;if(!e||!k)return;let t;const i=new gt.A((i=>{for(const n of i)if(n.target===e){const e=n.contentBoxSize?n.contentBoxSize[0]?n.contentBoxSize[0].inlineSize:n.contentBoxSize.inlineSize:n.contentRect.width;if(void 0!==e&&e!==t){const i=!t;t=e,i||requestAnimationFrame(T)}}}));return i.observe(e),()=>{i.disconnect()}}),[k,s,T]),p.createElement("textarea",(0,ut.A)({},x,{ref:v,value:E,style:{...c,...w},onChange:e=>{f(e.target.value),null==u||u(e)},onCompositionStart:S,onCompositionEnd:_,onKeyDown:N}))}let Et=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const ft="bricks/ai-portal/chat-box",vt={en:{[Et.ASK_ANY_THING]:"Ask anything",[Et.COMMON_TASKS]:"Common tasks"},zh:{[Et.ASK_ANY_THING]:"询问任何问题",[Et.COMMON_TASKS]:"常用任务"}},wt=g.i18n.getFixedT(null,ft);var yt,Tt=i(47008);let Ct,St,_t,Nt,Rt,Mt,It,Ot,Wt,Dt,Lt,Pt,zt,Ut,Ht,Bt,Vt,jt;(0,g.initializeI18n)(ft,vt);const Ft=(0,m.wrapBrick)("eo-icon"),Gt=(0,m.wrapBrick)("eo-actions",{onActionClick:"action.click",onItemDragEnd:"item.drag.end",onItemDragStart:"item.drag.start"}),{defineElement:Yt,property:Kt,event:Jt,method:$t}=(0,u.createDecorators)(),qt=(0,p.forwardRef)(li);let Xt;var Qt=new WeakMap,Zt=new WeakMap,ei=new WeakMap,ti=new WeakMap,ii=new WeakMap,ni=new WeakSet,ai=new WeakMap,ri=new WeakMap,oi=new WeakMap;class si extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ni),(0,lt.A)(this,"ref",(Ct(this),(0,p.createRef)())),(0,r.A)(this,Qt,_t(this)),(0,r.A)(this,Zt,(Nt(this),Rt(this))),(0,r.A)(this,ei,(Mt(this),It(this))),(0,r.A)(this,ti,(Ot(this),Wt(this))),(0,r.A)(this,ii,(Dt(this),Lt(this))),(0,r.A)(this,ai,(Ut(this),e=>{(0,s.A)(ni,this,Pt).emit(e)})),(0,r.A)(this,ri,Ht(this)),(0,r.A)(this,oi,(jt(this),e=>{(0,s.A)(ni,this,Bt).emit(e)}))}get disabled(){return(0,c.A)(Qt,this)}set disabled(e){(0,l.A)(Qt,this,e)}get placeholder(){return(0,c.A)(Zt,this)}set placeholder(e){(0,l.A)(Zt,this,e)}get autoFocus(){return(0,c.A)(ei,this)}set autoFocus(e){(0,l.A)(ei,this,e)}get aiEmployees(){return(0,c.A)(ti,this)}set aiEmployees(e){(0,l.A)(ti,this,e)}setValue(e){var t;null===(t=this.ref.current)||void 0===t||t.setValue(e)}getValue(){var e;return null===(e=this.ref.current)||void 0===e?void 0:e.getValue()}focusOnInput(){var e;return null===(e=this.ref.current)||void 0===e?void 0:e.focusOnInput()}render(){return h().createElement(qt,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,aiEmployees:this.aiEmployees,onSubmit:(0,c.A)(ai,this),onEmployeeMention:(0,c.A)(oi,this),ref:this.ref})}}function li(e,t){let{disabled:i,placeholder:n,autoFocus:a,aiEmployees:r,onSubmit:o,onEmployeeMention:s}=e;const l=(0,p.useRef)(null),c=(0,p.useRef)(null),[d,u]=(0,p.useState)(""),m=(0,p.useRef)(""),[g,b]=(0,p.useState)(null),[A,x]=(0,p.useState)(""),[k,E]=(0,p.useState)(0),f=(0,p.useRef)(null);(0,p.useEffect)((()=>{const e=window.__elevo_try_it_out;e&&delete window.__elevo_try_it_out,"string"==typeof(null==e?void 0:e.content)&&(m.current=e.content,u(e.content))}),[]),(0,p.useImperativeHandle)(t,(()=>({setValue:e=>{m.current=e,u(e)},getValue:()=>m.current,focusOnInput:()=>{var e;null===(e=c.current)||void 0===e||e.focus()}})));const v=(0,p.useCallback)((e=>{e.currentTarget.value&&o(e.currentTarget.value)}),[o]),w=(0,p.useCallback)((e=>{const{value:t,selectionStart:i,selectionEnd:n}=e.target;if(m.current=t,u(t),!A&&null!==i&&i===n&&null!=r&&r.length){const n=t.slice(0,i),a=n.lastIndexOf("@");if(a>=0){const t=n.slice(a+1).toLowerCase(),o=function(e,t){pt||(pt=document.createElement("div"),pt.setAttribute("tab-index","-1"),pt.setAttribute("aria-hidden","true"),document.body.appendChild(pt)),pt.setAttribute("style",dt(e)),pt.textContent=e.value.slice(0,t);const i=document.createElement("span");i.textContent="",pt.appendChild(i);const n=i.getBoundingClientRect();return i.remove(),{top:n.top,left:n.left}}(e.currentTarget,i),s=r.filter((e=>e.employeeId.toLowerCase().includes(t)||e.name.toLowerCase().includes(t))).slice(0,10);if(s.length>0)return b({position:{left:o.left+10,top:o.top+22},range:{start:a,end:i},actions:s.map((e=>({key:e.employeeId,text:e.name,data:e})))}),void E(0)}}b(null)}),[r,A]);(0,p.useEffect)((()=>{A&&!d.includes(A)&&(x(""),s(null))}),[A,s,d]);const y=(0,p.useCallback)((()=>{o(m.current)}),[o]);(0,p.useEffect)((()=>{a&&Promise.resolve().then((()=>{var e;null===(e=c.current)||void 0===e||e.focus()}))}),[]);const T=(0,p.useMemo)((()=>{var e;const t=null===(e=c.current)||void 0===e?void 0:e.element;if(!A||!t)return"";const i=d.indexOf(A);return i<0?"":d.slice(0,i)}),[A,d]),C=(0,p.useMemo)((()=>{var e;const t=null===(e=c.current)||void 0===e?void 0:e.element;if(!A||!t)return null;const i=function(e,t,i){ht||(ht=document.createElement("div"),ht.setAttribute("tab-index","-1"),ht.setAttribute("aria-hidden","true"),document.body.appendChild(ht)),ht.setAttribute("style",dt(e)),ht.textContent=t;const n=document.createElement("span");n.textContent=i,ht.appendChild(n);const a=n.getBoundingClientRect();return n.remove(),a}(t,T,A.slice(0,-1));return{left:i.left-1,top:i.top-1,width:i.width+4,height:i.height+4}}),[A,T]),S=(0,p.useCallback)((e=>{const t=`@${e.text} `,i=`${m.current.slice(0,g.range.start)}${t}`,n=`${i}${m.current.slice(g.range.end)}`;m.current=n,f.current={start:i.length,end:i.length},u(n),x(t),b(null),s(e.data)}),[g,s]),_=(0,p.useCallback)((e=>{switch(e.key){case"Escape":if(!g)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),b(null),!1;case"ArrowUp":case"ArrowDown":if(!g)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),E((t=>{const i=t+("ArrowUp"===e.key?-1:1),n=g.actions.length;return(n+i)%n})),!1;case"Enter":if(!g)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),S(g.actions[k]),!1;case"Delete":case"Backspace":if(null!=A&&A.length){let{selectionStart:t,selectionEnd:i}=e.currentTarget;t===i&&("Backspace"===e.key?t-=1:i+=1);const n=T.length,a=n+A.length;if(t<a&&i>n){const r=Math.min(t,n),o=Math.max(i,a),s=`${m.current.slice(0,r)}${m.current.slice(o)}`;return m.current=s,f.current={start:r,end:r},u(s),e.preventDefault(),e.stopPropagation(),!1}}}}),[k,S,g,T.length,null==A?void 0:A.length]);return h().createElement("div",{className:"root"},h().createElement("div",{className:"container",ref:l},h().createElement(xt,{containerRef:l,ref:c,value:d,minRows:58/22,paddingSize:60,autoResize:!0,disabled:i,placeholder:null!=n?n:wt(Et.ASK_ANY_THING),submitWhen:"enter-without-shift",desiredSelectionRef:f,onSubmit:v,onChange:w,onKeyDown:_}),h().createElement("div",{className:"actions-bar"},h().createElement("div",null,h().createElement("slot",{name:"actions"})),h().createElement("button",{className:"btn-send",disabled:!d,onClick:y},h().createElement(Ft,{lib:"fa",prefix:"fas",icon:"arrow-up"}))),g&&h().createElement(Gt,{className:"mentions",actions:g.actions,style:g.position,onActionClick:e=>S(e.detail),checkedKeys:[g.actions[k].key]}),C&&h().createElement("div",{className:"mention-overlay",style:C})))}yt=si,({e:[_t,Nt,Rt,Mt,It,Ot,Wt,Dt,Lt,Pt,zt,Ut,Ht,Bt,Vt,jt,Ct],c:[Xt,St]}=(0,d.A)(yt,[Yt("ai-portal.chat-box",{styleTexts:[Tt.A],shadowOptions:{delegatesFocus:!0}})],[[Kt({type:Boolean}),1,"disabled"],[Kt(),1,"placeholder"],[Kt({type:Boolean}),1,"autoFocus"],[Kt({attribute:!1}),1,"aiEmployees"],[Jt({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(ii,e),(e,t)=>(0,l.A)(ii,e,t)],[Jt({type:"ai-employee.mention"}),1,"employeeMention",e=>(0,c.A)(ri,e),(e,t)=>(0,l.A)(ri,e,t)],[$t(),2,"setValue"],[$t(),2,"getValue"],[$t(),2,"focusOnInput"]],0,(e=>oi.has((0,o.A)(e))),m.ReactNextElement)),St();var ci,di=i(82165);let pi;const{defineElement:hi}=(0,u.createDecorators)();let ui;class mi extends m.ReactNextElement{render(){return h().createElement(gi,null)}}function gi(){return h().createElement("slot",null)}ci=mi,[ui,pi]=(0,d.A)(ci,[hi("ai-portal.home-container",{styleTexts:[di.A]})],[],0,void 0,m.ReactNextElement).c,pi();var bi,Ai=i(24);let xi,ki,Ei,fi,vi,wi,yi,Ti,Ci,Si,_i,Ni,Ri,Mi,Ii,Oi,Wi,Di,Li,Pi,zi;const Ui=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:Hi,property:Bi}=(0,u.createDecorators)();let Vi;var ji=new WeakMap,Fi=new WeakMap,Gi=new WeakMap,Yi=new WeakMap,Ki=new WeakMap,Ji=new WeakMap,$i=new WeakMap,qi=new WeakMap,Xi=new WeakMap,Qi=new WeakMap;class Zi extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ji,ki(this)),(0,r.A)(this,Fi,(Ei(this),fi(this))),(0,r.A)(this,Gi,(vi(this),wi(this))),(0,r.A)(this,Yi,(yi(this),Ti(this))),(0,r.A)(this,Ki,(Ci(this),Si(this))),(0,r.A)(this,Ji,(_i(this),Ni(this))),(0,r.A)(this,$i,(Ri(this),Mi(this))),(0,r.A)(this,qi,(Ii(this),Oi(this))),(0,r.A)(this,Xi,(Wi(this),Di(this))),(0,r.A)(this,Qi,(Li(this),Pi(this))),zi(this)}get label(){return(0,c.A)(ji,this)}set label(e){(0,l.A)(ji,this,e)}get value(){return(0,c.A)(Fi,this)}set value(e){(0,l.A)(Fi,this,e)}get size(){return(0,c.A)(Gi,this)}set size(e){(0,l.A)(Gi,this,e)}get lineColor(){return(0,c.A)(Yi,this)}set lineColor(e){(0,l.A)(Yi,this,e)}get showArea(){return(0,c.A)(Ki,this)}set showArea(e){(0,l.A)(Ki,this,e)}get min(){return(0,c.A)(Ji,this)}set min(e){(0,l.A)(Ji,this,e)}get max(){return(0,c.A)($i,this)}set max(e){(0,l.A)($i,this,e)}get xField(){return(0,c.A)(qi,this)}set xField(e){(0,l.A)(qi,this,e)}get yField(){return(0,c.A)(Xi,this)}set yField(e){(0,l.A)(Xi,this,e)}get data(){return(0,c.A)(Qi,this)}set data(e){(0,l.A)(Qi,this,e)}render(){return h().createElement(en,{label:this.label,value:this.value,size:this.size,lineColor:this.lineColor,showArea:this.showArea,min:this.min,max:this.max,xField:this.xField,yField:this.yField,data:this.data})}}function en(e){let{label:t,value:i,size:n,...a}=e;return"small"===n?h().createElement("div",{className:"container"},h().createElement("div",{className:"label-and-stat"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat"},i)),h().createElement("div",{className:"chart"},h().createElement(Ui,(0,ut.A)({},a,{lineWidth:1.5,width:"auto",height:"55"})))):h().createElement("div",{className:"container"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat-and-chart"},h().createElement("div",{className:"chart"},h().createElement(Ui,(0,ut.A)({},a,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},i)))}bi=Zi,({e:[ki,Ei,fi,vi,wi,yi,Ti,Ci,Si,_i,Ni,Ri,Mi,Ii,Oi,Wi,Di,Li,Pi,zi],c:[Vi,xi]}=(0,d.A)(bi,[Hi("ai-portal.stat-with-mini-chart",{styleTexts:[Ai.A]})],[[Bi(),1,"label"],[Bi(),1,"value"],[Bi(),1,"size"],[Bi(),1,"lineColor"],[Bi({type:Boolean}),1,"showArea"],[Bi({type:Number}),1,"min"],[Bi({type:Number}),1,"max"],[Bi(),1,"xField"],[Bi(),1,"yField"],[Bi({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),xi();var tn=i(51921),nn=i(53373),an=i.n(nn);let rn=function(e){return e.NEW_CHAT="NEW_CHAT",e.LOGOUT="LOGOUT",e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e.SWITCH_LANGUAGE="SWITCH_LANGUAGE",e.PROJECTS="PROJECTS",e.HISTORY="HISTORY",e.CREATE_PROJECT="CREATE_PROJECT",e.MOVE_TO_PROJECT="MOVE_TO_PROJECT",e.UNTITLED="UNTITLED",e.UNNAMED="UNNAMED",e}({});const on="bricks/ai-portal/elevo-sidebar",sn={en:{[rn.NEW_CHAT]:"New chat",[rn.LOGOUT]:"Logout",[rn.TODAY]:"Today",[rn.YESTERDAY]:"Yesterday",[rn.PREVIOUS_7_DAYS]:"Previous 7 days",[rn.PREVIOUS_30_DAYS]:"Previous 30 days",[rn.SWITCH_LANGUAGE]:"中文",[rn.PROJECTS]:"Projects",[rn.HISTORY]:"Chats",[rn.CREATE_PROJECT]:"Create project",[rn.MOVE_TO_PROJECT]:"Move to project",[rn.UNTITLED]:"Untitled",[rn.UNNAMED]:"Unnamed"},zh:{[rn.NEW_CHAT]:"新对话",[rn.LOGOUT]:"登出",[rn.TODAY]:"今天",[rn.YESTERDAY]:"昨天",[rn.PREVIOUS_7_DAYS]:"过去7天",[rn.PREVIOUS_30_DAYS]:"过去30天",[rn.SWITCH_LANGUAGE]:"English",[rn.PROJECTS]:"项目",[rn.HISTORY]:"对话",[rn.CREATE_PROJECT]:"创建项目",[rn.MOVE_TO_PROJECT]:"移动到项目",[rn.UNTITLED]:"无标题",[rn.UNNAMED]:"未命名"}},ln=g.i18n.getFixedT(null,on);var cn=i(61408);const dn=(0,m.wrapBrick)("eo-icon"),pn=(0,m.wrapBrick)("eo-link"),hn=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),un=(0,m.wrapBrick)("eo-easyops-avatar"),mn=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),gn=(0,m.wrapBrick)("ai-portal.icon-button");var bn=i(22919);const An=async(e,t)=>(await bn.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{...t,params:e})).data;var xn=i(41030),kn=i(97907),En=i(98343);const fn={lib:"fa",icon:"plus"},vn=(0,p.forwardRef)(wn);function wn(e,t){let{historyActiveId:i,historyActions:n,historyUrlTemplate:a,projectActiveId:r,projectUrlTemplate:o,projectActions:s,canAddProject:l,onActionClick:c,onHistoryClick:d,onProjectActionClick:u,onAddProject:m}=e;const g=(0,p.useRef)(null),[b,A]=(0,p.useState)(null),[x,k]=(0,p.useState)(!1),[E,f]=(0,p.useState)(!1),[v,w]=(0,p.useState)(null),[y,T]=(0,p.useState)(!1),[C,S]=(0,p.useState)(),[_,N]=(0,p.useState)(),[R,M]=(0,p.useState)(!1),I=(0,p.useRef)(!0),[O,W]=(0,p.useState)([]),D=(0,p.useMemo)((()=>[...null!=n?n:[],{isDropdown:!0,text:ln(rn.MOVE_TO_PROJECT),disabled:!(null!=b&&b.length),items:null==b?void 0:b.map((e=>({event:"move",key:e.instanceId,text:e.name,project:e})))}]),[n,b]);(0,p.useEffect)((()=>{(async()=>{try{const e=await(async()=>(await bn.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/projects",{params:{page:1,page_size:3e3}})).data)();A(e.list)}catch(e){console.error("Error loading projects:",e),f(!0),A([])}})()}),[]),(0,p.useEffect)((()=>{Promise.all([An({token:_,limit:30,onlyOwner:!0,onlyUnrelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}}),...I.current?[]:[new Promise((e=>setTimeout(e,500)))]]).then((e=>{let[t]=e;I.current=!1,w((e=>[...null!=e?e:[],...t.conversations])),S(t.nextToken)})).catch((e=>{console.error("Error loading chat history:",e),w([]),M(!0)}))}),[_]);const[L,P]=(0,p.useState)(null),z=(0,p.useRef)(null);(0,p.useEffect)((()=>{const e=z.current,t=g.current;if(!e||!C||!t||y)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&N(C)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[C,y]);const U=(0,p.useRef)(0),H=(0,p.useCallback)((async()=>{try{const e=++U.current,t=await An({limit:30,onlyOwner:!0,onlyUnrelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==U.current)return;w((e=>{const i=null!=e?e:[],n=t.conversations,a=new Set(n.map((e=>e.conversationId))),r=new Map(n.map((e=>[e.conversationId,e])));let o=!1,s=!1,l=!0;for(const e of i){const t=r.get(e.conversationId);if(!t)break;if(o=!0,s=l&&t!==n[0]||!(0,xn.isEqual)(t,e),s)break;l=!1}return o?s?[...n,...i.filter((e=>!a.has(e.conversationId)))]:e:(S(t.nextToken),n)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);(0,p.useImperativeHandle)(t,(()=>({pull:H,removeProject:e=>{A((t=>t?t.filter((t=>t.instanceId!==e)):t))},addProject:e=>{A((t=>t?[...t,e]:[e]))},moveConversation:e=>{W((t=>[...t,e]))}})),[H]);const B=(0,p.useMemo)((()=>v&&v.length?v.filter((e=>!O.includes(e.conversationId))):v),[v,O]);return h().createElement("div",{className:"history",ref:g},h().createElement("div",{className:an()("section",{collapsed:x})},h().createElement("div",{className:"section-title"},h().createElement("div",{className:"section-label",onClick:()=>k((e=>!e))},ln(rn.PROJECTS),h().createElement(dn,{lib:"fa",icon:"angle-down"})),l&&h().createElement(gn,{icon:fn,variant:"mini-light",tooltip:ln(rn.CREATE_PROJECT),onClick:m})),h().createElement("ul",{className:"items"},E?h().createElement("li",{className:"error"},"Failed to load project"):b?b.map((e=>h().createElement("li",{key:e.instanceId},h().createElement(pn,(0,ut.A)({className:an()("item",{"actions-active":e.instanceId===L,active:e.instanceId===r}),onClick:d},o?{url:(0,En.Q)(o,e)}:null),h().createElement("div",{className:"item-title",title:e.name},e.name||ln(rn.UNNAMED)),h().createElement(mn,{className:"actions",actions:s,onActionClick:t=>{u({action:t.detail,project:e})},onVisibleChange:t=>{P(t.detail?e.instanceId:null)}}))))):h().createElement("li",{className:"loading"},h().createElement(dn,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))),h().createElement("div",{className:an()("section",{collapsed:y})},h().createElement("div",{className:"section-title"},h().createElement("div",{className:"section-label",onClick:()=>T((e=>!e))},ln(rn.HISTORY),h().createElement(dn,{lib:"fa",icon:"angle-down"}))),h().createElement("ul",{className:"items"},B?B.map((e=>h().createElement("li",{key:e.conversationId},h().createElement(pn,(0,ut.A)({className:an()("item",{"actions-active":e.conversationId===L,active:e.conversationId===i}),onClick:d},a?{url:(0,En.Q)(a,e)}:null),h().createElement("div",{className:"item-title",title:e.title},e.title||ln(rn.UNTITLED)),h().createElement(mn,{className:"actions",actions:D,onActionClick:t=>{c({action:t.detail,item:e})},onVisibleChange:t=>{P(t.detail?e.conversationId:null)}}),!kn.QB.includes(e.state)&&h().createElement("div",{className:"working"}))))):h().createElement("li",{className:"loading"},h().createElement(dn,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),R?h().createElement("li",{className:"error"},"Failed to load chat history"):null),!y&&C&&h().createElement("div",{className:"load-more",ref:z},h().createElement(dn,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))))}var yn;let Tn,Cn,Sn,_n,Nn,Rn,Mn,In,On,Wn,Dn,Ln,Pn,zn,Un,Hn,Bn,Vn,jn,Fn,Gn,Yn,Kn,Jn,$n,qn,Xn,Qn,Zn,ea,ta,ia,na,aa,ra,oa,sa,la,ca,da,pa,ha,ua,ma,ga,ba;(0,g.initializeI18n)(on,sn);const Aa={lib:"easyops",icon:"sidebar"},xa=(0,m.wrapBrick)("ai-portal.elevo-logo"),{defineElement:ka,property:Ea,event:fa,method:va}=(0,u.createDecorators)(),wa=(0,p.forwardRef)(qa);let ya;var Ta=new WeakMap,Ca=new WeakMap,Sa=new WeakMap,_a=new WeakMap,Na=new WeakMap,Ra=new WeakMap,Ma=new WeakMap,Ia=new WeakMap,Oa=new WeakMap,Wa=new WeakMap,Da=new WeakMap,La=new WeakMap,Pa=new WeakMap,za=new WeakMap,Ua=new WeakMap,Ha=new WeakSet,Ba=new WeakMap,Va=new WeakMap,ja=new WeakMap,Fa=new WeakMap,Ga=new WeakMap,Ya=new WeakMap,Ka=new WeakMap,Ja=new WeakMap;class $a extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ha),(0,r.A)(this,Ta,(Tn(this),Sn(this))),(0,r.A)(this,Ca,(_n(this),Nn(this))),(0,r.A)(this,Sa,(Rn(this),Mn(this))),(0,r.A)(this,_a,(In(this),On(this))),(0,r.A)(this,Na,(Wn(this),Dn(this))),(0,r.A)(this,Ra,(Ln(this),Pn(this))),(0,r.A)(this,Ma,(zn(this),Un(this))),(0,r.A)(this,Ia,(Hn(this),Bn(this))),(0,r.A)(this,Oa,(Vn(this),jn(this))),(0,r.A)(this,Wa,(Fn(this),Gn(this))),(0,r.A)(this,Da,(Yn(this),Kn(this))),(0,r.A)(this,La,(Jn(this),$n(this))),(0,r.A)(this,Pa,(qn(this),Xn(this))),(0,r.A)(this,za,(Qn(this),Zn(this,!0))),(0,r.A)(this,Ua,(ea(this),ta(this))),(0,r.A)(this,Ba,(aa(this),()=>{(0,s.A)(Ha,this,ia).emit()})),(0,r.A)(this,Va,ra(this)),(0,r.A)(this,ja,(la(this),e=>{(0,s.A)(Ha,this,oa).emit(e)})),(0,r.A)(this,Fa,ca(this)),(0,r.A)(this,Ga,(ha(this),e=>{(0,s.A)(Ha,this,da).emit(e)})),(0,r.A)(this,Ya,ua(this)),(0,r.A)(this,Ka,(ba(this),()=>{(0,s.A)(Ha,this,ma).emit()})),(0,r.A)(this,Ja,(0,p.createRef)())}get userInstanceId(){return(0,c.A)(Ta,this)}set userInstanceId(e){(0,l.A)(Ta,this,e)}get behavior(){return(0,c.A)(Ca,this)}set behavior(e){(0,l.A)(Ca,this,e)}get bordered(){return(0,c.A)(Sa,this)}set bordered(e){(0,l.A)(Sa,this,e)}get logoUrl(){return(0,c.A)(_a,this)}set logoUrl(e){(0,l.A)(_a,this,e)}get newChatUrl(){return(0,c.A)(Na,this)}set newChatUrl(e){(0,l.A)(Na,this,e)}get newChatLinkWhenCollapsed(){return(0,c.A)(Ra,this)}set newChatLinkWhenCollapsed(e){(0,l.A)(Ra,this,e)}get historyActiveId(){return(0,c.A)(Ma,this)}set historyActiveId(e){(0,l.A)(Ma,this,e)}get historyUrlTemplate(){return(0,c.A)(Ia,this)}set historyUrlTemplate(e){(0,l.A)(Ia,this,e)}get historyActions(){return(0,c.A)(Oa,this)}set historyActions(e){(0,l.A)(Oa,this,e)}get projectActiveId(){return(0,c.A)(Wa,this)}set projectActiveId(e){(0,l.A)(Wa,this,e)}get projectUrlTemplate(){return(0,c.A)(Da,this)}set projectUrlTemplate(e){(0,l.A)(Da,this,e)}get projectActions(){return(0,c.A)(La,this)}set projectActions(e){(0,l.A)(La,this,e)}get links(){return(0,c.A)(Pa,this)}set links(e){(0,l.A)(Pa,this,e)}get canAddProject(){return(0,c.A)(za,this)}set canAddProject(e){(0,l.A)(za,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(Ja,this).current)||void 0===e||e.pull()}),e)}close(){var e;null===(e=(0,c.A)(Ja,this).current)||void 0===e||e.close()}removeProject(e){var t,i;null===(t=(0,c.A)(Ja,this).current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)}addProject(e){var t,i;null===(t=(0,c.A)(Ja,this).current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)}moveConversation(e){var t,i;null===(t=(0,c.A)(Ja,this).current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)}render(){return h().createElement(wa,{ref:(0,c.A)(Ja,this),userInstanceId:this.userInstanceId,behavior:this.behavior,logoUrl:this.logoUrl,newChatUrl:this.newChatUrl,newChatLinkWhenCollapsed:this.newChatLinkWhenCollapsed,historyActiveId:this.historyActiveId,historyUrlTemplate:this.historyUrlTemplate,historyActions:this.historyActions,projectActiveId:this.projectActiveId,projectUrlTemplate:this.projectUrlTemplate,projectActions:this.projectActions,links:this.links,canAddProject:this.canAddProject,onLogout:(0,c.A)(Ba,this),onActionClick:(0,c.A)(ja,this),onProjectActionClick:(0,c.A)(Ga,this),onAddProject:(0,c.A)(Ka,this)})}}function qa(e,t){let{userInstanceId:i,behavior:n,logoUrl:a,newChatUrl:r,newChatLinkWhenCollapsed:o,historyActiveId:s,historyUrlTemplate:l,historyActions:c,projectActiveId:d,projectUrlTemplate:u,projectActions:m,links:b,canAddProject:A,onLogout:x,onActionClick:k,onProjectActionClick:E,onAddProject:f}=e;const[v,w]=(0,p.useState)("drawer"===n),y=(0,p.useCallback)((()=>{w(!0)}),[]),T=(0,p.useCallback)((()=>{w(!1)}),[]);(0,p.useEffect)((()=>{"drawer"===n&&w(!0)}),[n]);const C=(0,p.useCallback)((()=>{w(!0)}),[]),S=(0,p.useCallback)((()=>{"drawer"===n&&w(!0)}),[n]),_=(0,p.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:ln(rn.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:ln(rn.SWITCH_LANGUAGE)}]),[]),N=(0,p.useRef)(null);return(0,p.useImperativeHandle)(t,(()=>({close:()=>{w(!0)},pull:()=>{var e;null===(e=N.current)||void 0===e||e.pull()},removeProject:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)},addProject:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)},moveConversation:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)}})),[]),h().createElement("div",{className:an()("container",{collapsed:v})},"drawer"===n&&!v&&h().createElement("div",{className:"mask",onClick:C}),h().createElement("div",{className:"alternative"},h().createElement(gn,{icon:Aa,variant:"light",onClick:T}),o&&h().createElement(pn,{className:"new-chat",url:r},h().createElement(dn,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),ln(rn.NEW_CHAT))),h().createElement("div",{className:"sidebar"},h().createElement("div",{className:"logo-bar"},h().createElement(pn,{url:a,className:"logo-link"},h().createElement(xa,null)),h().createElement(gn,{icon:Aa,variant:"light",onClick:y})),h().createElement(pn,{className:"new-chat",url:r},h().createElement(dn,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),ln(rn.NEW_CHAT)),null!=b&&b.length?h().createElement("div",{className:"links"},b.map(((e,t)=>h().createElement(pn,{className:"link",key:t,url:e.url},h().createElement(dn,(0,ut.A)({className:"icon"},e.icon)),h().createElement("span",{className:"title"},e.title))))):null,h().createElement(vn,{ref:N,canAddProject:A,historyActiveId:s,historyUrlTemplate:l,historyActions:c,projectActiveId:d,projectUrlTemplate:u,projectActions:m,onActionClick:k,onHistoryClick:S,onProjectActionClick:E,onAddProject:f}),h().createElement("div",{className:"footer"},h().createElement(hn,{className:"dropdown",actions:_,onActionClick:async e=>{"logout"===e.detail.key?x():(await g.i18n.changeLanguage(g.i18n.language&&"en"===g.i18n.language.split("-")[0]?"zh":"en"),(0,tn.getHistory)().reload())}},h().createElement("button",{className:"account"},h().createElement(un,{nameOrInstanceId:i,showName:!0,size:"xs"}))))))}yn=$a,({e:[Sn,_n,Nn,Rn,Mn,In,On,Wn,Dn,Ln,Pn,zn,Un,Hn,Bn,Vn,jn,Fn,Gn,Yn,Kn,Jn,$n,qn,Xn,Qn,Zn,ea,ta,ia,na,aa,ra,oa,sa,la,ca,da,pa,ha,ua,ma,ga,ba,Tn],c:[ya,Cn]}=(0,d.A)(yn,[ka("ai-portal.elevo-sidebar",{styleTexts:[cn.A]})],[[Ea(),1,"userInstanceId"],[Ea(),1,"behavior"],[Ea({type:Boolean,render:!1}),1,"bordered"],[Ea(),1,"logoUrl"],[Ea(),1,"newChatUrl"],[Ea({type:Boolean}),1,"newChatLinkWhenCollapsed"],[Ea(),1,"historyActiveId"],[Ea(),1,"historyUrlTemplate"],[Ea({attribute:!1}),1,"historyActions"],[Ea(),1,"projectActiveId"],[Ea(),1,"projectUrlTemplate"],[Ea({attribute:!1}),1,"projectActions"],[Ea({attribute:!1}),1,"links"],[Ea({type:Boolean}),1,"canAddProject"],[fa({type:"logout"}),1,"logout",e=>(0,c.A)(Ua,e),(e,t)=>(0,l.A)(Ua,e,t)],[fa({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Va,e),(e,t)=>(0,l.A)(Va,e,t)],[fa({type:"project.action.click"}),1,"projectActionClick",e=>(0,c.A)(Fa,e),(e,t)=>(0,l.A)(Fa,e,t)],[fa({type:"add.project"}),1,"addProject",e=>(0,c.A)(Ya,e),(e,t)=>(0,l.A)(Ya,e,t)],[va(),2,"pullHistory"],[va(),2,"close"],[va(),2,"removeProject"],[va(),2,"addProject"],[va(),2,"moveConversation"]],0,(e=>Ja.has((0,o.A)(e))),m.ReactNextElement)),Cn();var Xa,Qa=i(47338);let Za,er,tr,ir,nr,ar,rr,or,sr;const lr=(0,m.wrapBrick)("eo-icon"),cr=(0,m.wrapBrick)("eo-tooltip"),{defineElement:dr,property:pr}=(0,u.createDecorators)();let hr;var ur=new WeakMap,mr=new WeakMap,gr=new WeakMap,br=new WeakMap;class Ar extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ur,er(this)),(0,r.A)(this,mr,(tr(this),ir(this))),(0,r.A)(this,gr,(nr(this),ar(this))),(0,r.A)(this,br,(rr(this),or(this))),sr(this)}get icon(){return(0,c.A)(ur,this)}set icon(e){(0,l.A)(ur,this,e)}get tooltip(){return(0,c.A)(mr,this)}set tooltip(e){(0,l.A)(mr,this,e)}get disabled(){return(0,c.A)(gr,this)}set disabled(e){(0,l.A)(gr,this,e)}get variant(){return(0,c.A)(br,this)}set variant(e){(0,l.A)(br,this,e)}render(){return h().createElement(xr,{icon:this.icon,tooltip:this.tooltip,disabled:this.disabled})}}function xr(e){let{icon:t,tooltip:i,disabled:n}=e;const a=h().createElement("button",{disabled:n},h().createElement(lr,t));return i?h().createElement(cr,{content:i},a):a}Xa=Ar,({e:[er,tr,ir,nr,ar,rr,or,sr],c:[hr,Za]}=(0,d.A)(Xa,[dr("ai-portal.icon-button",{styleTexts:[Qa.A]})],[[pr({attribute:!1}),1,"icon"],[pr(),1,"tooltip"],[pr({type:Boolean}),1,"disabled"],[pr({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),Za();let kr=function(e){return e.ALL="ALL",e.EXPLORE_EXCELLENT_CASES="EXPLORE_EXCELLENT_CASES",e}({});const Er="bricks/ai-portal/show-cases",fr={en:{[kr.ALL]:"All",[kr.EXPLORE_EXCELLENT_CASES]:"Explore excellent cases"},zh:{[kr.ALL]:"全部",[kr.EXPLORE_EXCELLENT_CASES]:"探索优秀案例"}},vr=g.i18n.getFixedT(null,Er);var wr,yr=i(42873);let Tr,Cr,Sr,_r,Nr;(0,g.initializeI18n)(Er,fr);const Rr=(0,m.wrapBrick)("ai-portal.show-case"),Mr=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:Ir,property:Or}=(0,u.createDecorators)();let Wr;var Dr=new WeakMap,Lr=new WeakMap;class Pr extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Dr,Cr(this)),(0,r.A)(this,Lr,(Sr(this),_r(this))),Nr(this)}get list(){return(0,c.A)(Dr,this)}set list(e){(0,l.A)(Dr,this,e)}get limit(){return(0,c.A)(Lr,this)}set limit(e){(0,l.A)(Lr,this,e)}render(){return h().createElement(zr,{list:this.list,limit:this.limit})}}function zr(e){let{list:t,limit:i}=e;const n=(0,p.useMemo)((()=>["",...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[a,r]=(0,p.useState)(""),o=(0,p.useMemo)((()=>{if(!t)return;let e=t;return a&&(e=e.filter((e=>e.scenario===a))),i&&(e=e.slice(0,i)),e}),[a,t,i]),s=(0,p.useMemo)((()=>n.map((e=>({id:e,label:""===e?vr(kr.ALL):e})))),[n]);return null!=t&&t.length?h().createElement(h().Fragment,null,h().createElement("div",{className:"tips"},`${vr(kr.EXPLORE_EXCELLENT_CASES)} ↓`),h().createElement(Mr,{tabs:s,activeTab:a,onTabClick:e=>r(e.detail.id)}),h().createElement("ul",{className:"cases"},null==o?void 0:o.map((e=>h().createElement("li",{key:e.conversationId},h().createElement(Rr,{caseTitle:e.title,summary:e.summary,url:e.url})))))):null}wr=Pr,({e:[Cr,Sr,_r,Nr],c:[Wr,Tr]}=(0,d.A)(wr,[Ir("ai-portal.show-cases",{styleTexts:[yr.A]})],[[Or({attribute:!1}),1,"list"],[Or({type:Number}),1,"limit"]],0,void 0,m.ReactNextElement)),Tr();let Ur=function(e){return e.MCP_HUB="MCP_HUB",e.ALL="ALL",e.SERVER_cmdb="SERVER_cmdb",e.SERVER_cmdb_product_helper="SERVER_cmdb_product_helper",e.SERVER_alert="SERVER_alert",e.SERVER_web_builder="SERVER_web_builder",e.SERVER_web_builder2="SERVER_web_builder2",e.SERVER_host_troubleshooting="SERVER_host_troubleshooting",e.SERVER_system_inspection="SERVER_system_inspection",e.SERVER_grafana="SERVER_grafana",e.SERVER_kubernetes="SERVER_kubernetes",e.SERVER_llm="SERVER_llm",e}({});const Hr="bricks/ai-portal/mcp-tools",Br={en:{[Ur.MCP_HUB]:"MCP Hub",[Ur.ALL]:"All",[Ur.SERVER_cmdb]:"CMDB",[Ur.SERVER_cmdb_product_helper]:"CMDB",[Ur.SERVER_alert]:"Alert",[Ur.SERVER_web_builder]:"View",[Ur.SERVER_web_builder2]:"View",[Ur.SERVER_host_troubleshooting]:"Host Troubleshooting",[Ur.SERVER_system_inspection]:"System Inspection",[Ur.SERVER_grafana]:"Grafana",[Ur.SERVER_kubernetes]:"Kubernetes",[Ur.SERVER_llm]:"LLM"},zh:{[Ur.MCP_HUB]:"MCP 中心",[Ur.ALL]:"全部",[Ur.SERVER_cmdb]:"CMDB",[Ur.SERVER_cmdb_product_helper]:"CMDB",[Ur.SERVER_alert]:"告警",[Ur.SERVER_web_builder]:"视图",[Ur.SERVER_web_builder2]:"视图",[Ur.SERVER_host_troubleshooting]:"主机故障排查",[Ur.SERVER_system_inspection]:"系统巡检",[Ur.SERVER_grafana]:"Grafana",[Ur.SERVER_kubernetes]:"Kubernetes",[Ur.SERVER_llm]:"大模型"}},Vr=g.i18n.getFixedT(null,Hr);var jr,Fr=i(31748);let Gr,Yr,Kr,Jr,$r;(0,g.initializeI18n)(Hr,Br);const qr={lib:"antd",icon:"tool"},Xr=new Map([["EasyOps平台",{servers:["cmdb","cmdb_product_helper"]}],["Grafana",{servers:["grafana"]}],["Kubernetes",{servers:["kubernetes"]}],["监控事件",{servers:["alert"]}],["浏览器",{servers:["playwright"]}],["低代码",{servers:["web-builder","web-builder2"]}],["大模型",{servers:["llm"]}],["故障排查",{servers:["host-troubleshooting"]}]]),Qr=(0,m.wrapBrick)("eo-icon"),Zr=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:eo,property:to}=(0,u.createDecorators)();let io;var no=new WeakMap,ao=new WeakMap;class ro extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,no,Yr(this)),(0,r.A)(this,ao,(Kr(this),Jr(this,!0))),$r(this)}get list(){return(0,c.A)(no,this)}set list(e){(0,l.A)(no,this,e)}get withContainer(){return(0,c.A)(ao,this)}set withContainer(e){(0,l.A)(ao,this,e)}render(){return h().createElement(oo,{list:this.list,withContainer:this.withContainer})}}function oo(e){let{list:t,withContainer:i}=e;const[n,a]=(0,p.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const n=Vr(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let a=e.get(n);a||e.set(n,a=[]),a.push(t);const r=[...Xr.entries()].find((e=>{let[i,{servers:n}]=e;return n.includes(t.server.id)})),o=r?r[0]:"其他";let s=i.get(o);s||i.set(o,s=[]),s.push(n)}));const n=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[a]=t;const r=n.indexOf(i),o=n.indexOf(a);return(r<0?n.length:r)-(o<0?n.length:o)}))),i]}),[t]),r=(0,p.useMemo)((()=>{const e=[...Xr.keys()],t=[...a.keys()];return t.sort(((t,i)=>{const n=e.indexOf(t),a=e.indexOf(i);return(n<0?e.length:n)-(a<0?e.length:a)})),["",...t]}),[a]),[o,s]=(0,p.useState)(""),l=(0,p.useMemo)((()=>{const e=[...n];if(!o)return e;const t=a.get(o);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[o,n,a]),c=(0,p.useMemo)((()=>r.map((e=>({id:e,label:""===e?Vr(Ur.ALL):e})))),[r]),d=h().createElement(h().Fragment,null,h().createElement(Zr,{tabs:c,activeTab:o,onTabClick:e=>s(e.detail.id)}),h().createElement("ul",{className:"groups"},null==l?void 0:l.map((e=>{let[t,i]=e;return h().createElement("li",{key:t,className:"group"},h().createElement("h2",null,t),h().createElement("ul",{className:"list"},i.map(((e,t)=>{var i;return h().createElement("li",{key:t,className:"item"},h().createElement("div",{className:"heading"},h().createElement(Qr,(0,ut.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:qr,{fallback:qr})),h().createElement("div",{className:"title"},e.title)),h().createElement("div",{className:"description"},e.description))}))))}))));return i?h().createElement("div",{className:"container"},h().createElement("h1",null,Vr(Ur.MCP_HUB)),d):d}jr=ro,({e:[Yr,Kr,Jr,$r],c:[io,Gr]}=(0,d.A)(jr,[eo("ai-portal.mcp-tools",{styleTexts:[Fr.A]})],[[to({attribute:!1}),1,"list"],[to({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),Gr();var so,lo=i(92914),co=i(30495);let po,ho,uo,mo,go,bo,Ao,xo,ko,Eo,fo,vo,wo,yo,To,Co,So,_o,No,Ro,Mo,Io,Oo,Wo,Do,Lo,Po,zo,Uo,Ho,Bo,Vo,jo,Fo,Go,Yo,Ko,Jo,$o,qo,Xo,Qo,Zo,es,ts,is,ns,as,rs,os,ss,ls,cs,ds,ps,hs;(0,g.initializeI18n)(lo.NS,lo.I);const{defineElement:us,property:ms,event:gs,method:bs}=(0,u.createDecorators)(),As=(0,p.forwardRef)(co.C);let xs;var ks=new WeakMap,Es=new WeakMap,fs=new WeakMap,vs=new WeakMap,ws=new WeakMap,ys=new WeakMap,Ts=new WeakMap,Cs=new WeakMap,Ss=new WeakMap,_s=new WeakMap,Ns=new WeakMap,Rs=new WeakMap,Ms=new WeakMap,Is=new WeakMap,Os=new WeakMap,Ws=new WeakMap,Ds=new WeakSet,Ls=new WeakMap,Ps=new WeakMap,zs=new WeakMap,Us=new WeakMap,Hs=new WeakMap,Bs=new WeakMap,Vs=new WeakMap,js=new WeakMap,Fs=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Ks=new WeakMap;class Js extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ds),(0,r.A)(this,ks,(po(this),uo(this))),(0,r.A)(this,Es,(mo(this),go(this))),(0,r.A)(this,fs,(bo(this),Ao(this))),(0,r.A)(this,vs,(xo(this),ko(this))),(0,r.A)(this,ws,(Eo(this),fo(this))),(0,r.A)(this,ys,(vo(this),wo(this))),(0,r.A)(this,Ts,(yo(this),To(this))),(0,r.A)(this,Cs,(Co(this),So(this))),(0,r.A)(this,Ss,(_o(this),No(this))),(0,r.A)(this,_s,(Ro(this),Mo(this))),(0,r.A)(this,Ns,(Io(this),Oo(this))),(0,r.A)(this,Rs,(Wo(this),Do(this))),(0,r.A)(this,Ms,(Lo(this),Po(this))),(0,r.A)(this,Is,(zo(this),Uo(this))),(0,r.A)(this,Os,(Ho(this),Bo(this))),(0,r.A)(this,Ws,(Vo(this),jo(this))),(0,r.A)(this,Ls,(Yo(this),()=>{(0,s.A)(Ds,this,Fo).emit()})),(0,r.A)(this,Ps,Ko(this)),(0,r.A)(this,zs,(qo(this),()=>{(0,s.A)(Ds,this,Jo).emit()})),(0,r.A)(this,Us,Xo(this)),(0,r.A)(this,Hs,(es(this),e=>{(0,s.A)(Ds,this,Qo).emit(e)})),(0,r.A)(this,Bs,ts(this)),(0,r.A)(this,Vs,(as(this),e=>{(0,s.A)(Ds,this,is).emit(e)})),(0,r.A)(this,js,rs(this)),(0,r.A)(this,Fs,(ls(this),()=>{(0,s.A)(Ds,this,os).emit("canvas")})),(0,r.A)(this,Gs,cs(this)),(0,r.A)(this,Ys,(hs(this),e=>{(0,s.A)(Ds,this,ds).emit(e)})),(0,r.A)(this,Ks,(0,p.createRef)())}get conversationId(){return(0,c.A)(ks,this)}set conversationId(e){(0,l.A)(ks,this,e)}get initialRequest(){return(0,c.A)(Es,this)}set initialRequest(e){(0,l.A)(Es,this,e)}get replay(){return(0,c.A)(fs,this)}set replay(e){(0,l.A)(fs,this,e)}get replayDelay(){return(0,c.A)(vs,this)}set replayDelay(e){(0,l.A)(vs,this,e)}get supports(){return(0,c.A)(ws,this)}set supports(e){(0,l.A)(ws,this,e)}get showHumanActions(){return(0,c.A)(ys,this)}set showHumanActions(e){(0,l.A)(ys,this,e)}get showFeedback(){return(0,c.A)(Ts,this)}set showFeedback(e){(0,l.A)(Ts,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(Cs,this)}set showFeedbackAfterFailed(e){(0,l.A)(Cs,this,e)}get showFeedbackOnView(){return(0,c.A)(Ss,this)}set showFeedbackOnView(e){(0,l.A)(Ss,this,e)}get showUiSwitch(){return(0,c.A)(_s,this)}set showUiSwitch(e){(0,l.A)(_s,this,e)}get hideMermaid(){return(0,c.A)(Ns,this)}set hideMermaid(e){(0,l.A)(Ns,this,e)}get previewUrlTemplate(){return(0,c.A)(Rs,this)}set previewUrlTemplate(e){(0,l.A)(Rs,this,e)}get showCases(){return(0,c.A)(Ms,this)}set showCases(e){(0,l.A)(Ms,this,e)}get exampleProjects(){return(0,c.A)(Is,this)}set exampleProjects(e){(0,l.A)(Is,this,e)}get tryItOutUrl(){return(0,c.A)(Os,this)}set tryItOutUrl(e){(0,l.A)(Os,this,e)}resumed(){var e,t;null===(e=(0,c.A)(Ks,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(Ks,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(Ks,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(Ks,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return h().createElement(As,{conversationId:this.conversationId,initialRequest:this.initialRequest,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHumanActions:this.showHumanActions,showFeedback:this.showFeedback,showFeedbackAfterFailed:this.showFeedbackAfterFailed,showFeedbackOnView:this.showFeedbackOnView,showUiSwitch:this.showUiSwitch,previewUrlTemplate:this.previewUrlTemplate,showCases:this.showCases,exampleProjects:this.exampleProjects,tryItOutUrl:this.tryItOutUrl,onShare:(0,c.A)(Ls,this),onTerminate:(0,c.A)(zs,this),onSubmitFeedback:(0,c.A)(Hs,this),onSwitchToCanvas:(0,c.A)(Fs,this),onFeedbackOnView:(0,c.A)(Vs,this),onDetailChange:(0,c.A)(Ys,this)})}}so=Js,({e:[uo,mo,go,bo,Ao,xo,ko,Eo,fo,vo,wo,yo,To,Co,So,_o,No,Ro,Mo,Io,Oo,Wo,Do,Lo,Po,zo,Uo,Ho,Bo,Vo,jo,Fo,Go,Yo,Ko,Jo,$o,qo,Xo,Qo,Zo,es,ts,is,ns,as,rs,os,ss,ls,cs,ds,ps,hs,po],c:[xs,ho]}=(0,d.A)(so,[us("ai-portal.chat-stream",{shadowOptions:!1})],[[ms(),1,"conversationId"],[ms({attribute:!1,render:!1}),1,"initialRequest"],[ms({type:Boolean}),1,"replay"],[ms({type:Number}),1,"replayDelay"],[ms({attribute:!1}),1,"supports"],[ms({type:Boolean}),1,"showHumanActions"],[ms({type:Boolean}),1,"showFeedback"],[ms({type:Boolean}),1,"showFeedbackAfterFailed"],[ms({type:Boolean}),1,"showFeedbackOnView"],[ms({type:Boolean}),1,"showUiSwitch"],[ms({type:Boolean,render:!1}),1,"hideMermaid"],[ms(),1,"previewUrlTemplate"],[ms({attribute:!1}),1,"showCases"],[ms({attribute:!1}),1,"exampleProjects"],[ms(),1,"tryItOutUrl"],[gs({type:"share"}),1,"shareEvent",e=>(0,c.A)(Ws,e),(e,t)=>(0,l.A)(Ws,e,t)],[gs({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(Ps,e),(e,t)=>(0,l.A)(Ps,e,t)],[gs({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Us,e),(e,t)=>(0,l.A)(Us,e,t)],[gs({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(Bs,e),(e,t)=>(0,l.A)(Bs,e,t)],[gs({type:"ui.switch"}),1,"switch",e=>(0,c.A)(js,e),(e,t)=>(0,l.A)(js,e,t)],[gs({type:"detail.change"}),1,"detailChange",e=>(0,c.A)(Gs,e),(e,t)=>(0,l.A)(Gs,e,t)],[bs(),2,"resumed"],[bs(),2,"feedbackSubmitDone"],[bs(),2,"feedbackSubmitFailed"],[bs(),2,"feedbackOnViewDone"]],0,(e=>Ks.has((0,o.A)(e))),m.ReactNextElement)),ho();let $s=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e.UNTITLED="UNTITLED",e}({});const qs="bricks/ai-portal/ai-employees",Xs=g.i18n.getFixedT(null,qs);var Qs,Zs=i(98036);let el,tl,il,nl,al,rl,ol,sl,ll;(0,g.initializeI18n)(qs,{en:{AI_EMPLOYEES:"AI Employees",UNTITLED:"Untitled"},zh:{AI_EMPLOYEES:"Ai 数字人",UNTITLED:"未命名"}});const cl=(0,m.wrapBrick)("eo-link"),dl=(0,m.wrapBrick)("eo-icon"),pl=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:hl,property:ul}=(0,u.createDecorators)();let ml;var gl=new WeakMap,bl=new WeakMap,Al=new WeakMap,xl=new WeakMap;class kl extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,gl,tl(this)),(0,r.A)(this,bl,(il(this),nl(this))),(0,r.A)(this,Al,(al(this),rl(this))),(0,r.A)(this,xl,(ol(this),sl(this,!0))),ll(this)}get list(){return(0,c.A)(gl,this)}set list(e){(0,l.A)(gl,this,e)}get industries(){return(0,c.A)(bl,this)}set industries(e){(0,l.A)(bl,this,e)}get urlTemplate(){return(0,c.A)(Al,this)}set urlTemplate(e){(0,l.A)(Al,this,e)}get withContainer(){return(0,c.A)(xl,this)}set withContainer(e){(0,l.A)(xl,this,e)}render(){return h().createElement(El,{list:this.list,industries:this.industries,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function El(e){let{list:t,industries:i,urlTemplate:n,withContainer:a}=e;const r=(0,p.useMemo)((()=>[...new Set([...null!=i?i:[],...(null!=t?t:[]).map((e=>e.industry))])]),[i,t]),[o,s]=(0,p.useState)(r[0]),l=(0,p.useMemo)((()=>{const e=new Map;return null==t||t.forEach((t=>{if(t.industry!==o)return;let i=e.get(t.role);i||e.set(t.role,i=[]),i.push(t)})),[...e.entries()]}),[o,t]),c=(0,p.useMemo)((()=>r.map((e=>({id:e,label:e||Xs($s.UNTITLED)})))),[r]),d=h().createElement(h().Fragment,null,h().createElement(pl,{tabs:c,activeTab:o,onTabClick:e=>s(e.detail.id)}),h().createElement("ul",{className:"groups"},l.map((e=>{let[t,i]=e;return h().createElement("li",{key:t,className:"group"},h().createElement("h2",null,t),h().createElement("ul",{className:"list"},i.map(((e,t)=>h().createElement("li",{key:t},h().createElement(cl,(0,ut.A)({className:an()("link",{clickable:!!n})},n?{url:(0,En.Q)(n,e)}:null),h().createElement("div",{className:"heading"},h().createElement("div",{className:"avatar"},e.avatar?h().createElement("img",{src:e.avatar}):h().createElement(dl,{lib:"antd",icon:"user"})),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"description"},e.description)))))))}))));return a?h().createElement("div",{className:"container"},h().createElement("h1",null,Xs($s.AI_EMPLOYEES)),d):d}Qs=kl,({e:[tl,il,nl,al,rl,ol,sl,ll],c:[ml,el]}=(0,d.A)(Qs,[hl("ai-portal.ai-employees",{styleTexts:[Zs.A]})],[[ul({attribute:!1}),1,"list"],[ul({attribute:!1}),1,"industries"],[ul(),1,"urlTemplate"],[ul({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),el();let fl=function(e){return e.AGENTS="AGENTS",e}({});const vl="bricks/ai-portal/ai-agents",wl=g.i18n.getFixedT(null,vl);var yl,Tl=i(83059);let Cl,Sl,_l,Nl,Rl,Ml,Il;const Ol={lib:"antd",icon:"tool"};(0,g.initializeI18n)(vl,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const Wl=(0,m.wrapBrick)("eo-icon"),Dl=(0,m.wrapBrick)("eo-link"),{defineElement:Ll,property:Pl}=(0,u.createDecorators)();let zl;var Ul=new WeakMap,Hl=new WeakMap,Bl=new WeakMap;class Vl extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Ul,Sl(this)),(0,r.A)(this,Hl,(_l(this),Nl(this))),(0,r.A)(this,Bl,(Rl(this),Ml(this,!0))),Il(this)}get list(){return(0,c.A)(Ul,this)}set list(e){(0,l.A)(Ul,this,e)}get urlTemplate(){return(0,c.A)(Hl,this)}set urlTemplate(e){(0,l.A)(Hl,this,e)}get withContainer(){return(0,c.A)(Bl,this)}set withContainer(e){(0,l.A)(Bl,this,e)}render(){return h().createElement(jl,{list:this.list,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function jl(e){let{list:t,urlTemplate:i,withContainer:n}=e;const a=h().createElement(h().Fragment,null,h().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var n,a;return h().createElement("li",{key:t},h().createElement(Dl,(0,ut.A)({className:an()("link",{clickable:!!i})},i?{url:(0,En.Q)(i,e)}:null),h().createElement("div",{className:"heading"},h().createElement("div",{className:"icon"},h().createElement(Wl,(0,ut.A)({},null!==(n=e.icon)&&void 0!==n?n:Ol,{fallback:Ol}))),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"tags"},null===(a=e.tags)||void 0===a?void 0:a.map(((e,t)=>h().createElement("span",{key:t,className:"tag"},e)))),h().createElement("div",{className:"description"},e.description)))}))));return n?h().createElement("div",{className:"container"},h().createElement("h1",null,wl(fl.AGENTS)),a):a}yl=Vl,({e:[Sl,_l,Nl,Rl,Ml,Il],c:[zl,Cl]}=(0,d.A)(yl,[Ll("ai-portal.ai-agents",{styleTexts:[Tl.A]})],[[Pl({attribute:!1}),1,"list"],[Pl(),1,"urlTemplate"],[Pl({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),Cl();var Fl=i(49936);let Gl=null;customElements.define("ai-portal.save-request-store",(0,Fl.createProviderClass)((function(e){Gl=e}))),customElements.define("ai-portal.load-request-store",(0,Fl.createProviderClass)((function(){const e=Gl;return Gl=null,e}))),customElements.define("ai-portal.clear-request-store",(0,Fl.createProviderClass)((function(){Gl=null})));var Yl,Kl=i(49041);let Jl,$l,ql,Xl,Ql,Zl,ec;const tc=(0,m.wrapBrick)("eo-link"),{defineElement:ic,property:nc}=(0,u.createDecorators)();let ac;var rc=new WeakMap,oc=new WeakMap,sc=new WeakMap;class lc extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,rc,$l(this)),(0,r.A)(this,oc,(ql(this),Xl(this))),(0,r.A)(this,sc,(Ql(this),Zl(this))),ec(this)}get pageTitle(){return(0,c.A)(rc,this)}set pageTitle(e){(0,l.A)(rc,this,e)}get breadcrumbs(){return(0,c.A)(oc,this)}set breadcrumbs(e){(0,l.A)(oc,this,e)}get size(){return(0,c.A)(sc,this)}set size(e){(0,l.A)(sc,this,e)}render(){return h().createElement(cc,{pageTitle:this.pageTitle,breadcrumbs:this.breadcrumbs})}}function cc(e){let{breadcrumbs:t,pageTitle:i}=e;return(0,p.useEffect)((()=>{"string"==typeof i&&(0,tn.getRuntime)().applyPageTitle(i)}),[i]),h().createElement("div",{className:"container"},i||null!=t&&t.length?h().createElement("div",{className:"header"},h().createElement("nav",null,null!=t&&t.length?h().createElement("ul",{className:"breadcrumbs"},t.map(((e,t)=>h().createElement("li",{key:t},h().createElement(tc,{url:e.url},e.text))))):null,i?h().createElement("h1",null,i):null),h().createElement("slot",{name:"toolbar"})):null,h().createElement("slot",null))}Yl=lc,({e:[$l,ql,Xl,Ql,Zl,ec],c:[ac,Jl]}=(0,d.A)(Yl,[ic("ai-portal.page-container",{styleTexts:[Kl.A]})],[[nc(),1,"pageTitle"],[nc({attribute:!1}),1,"breadcrumbs"],[nc({render:!1}),1,"size"]],0,void 0,m.ReactNextElement)),Jl();var dc,pc=i(20124);let hc,uc,mc,gc,bc,Ac,xc,kc,Ec;const{defineElement:fc,property:vc,event:wc}=(0,u.createDecorators)();let yc;var Tc=new WeakMap,Cc=new WeakMap,Sc=new WeakMap,_c=new WeakSet,Nc=new WeakMap;class Rc extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,_c),(0,r.A)(this,Tc,uc(this)),(0,r.A)(this,Cc,(mc(this),gc(this))),(0,r.A)(this,Sc,(bc(this),Ac(this))),(0,r.A)(this,Nc,(Ec(this),e=>{this.activeTab=e.id,(0,s.A)(_c,this,xc).emit(e)}))}get tabs(){return(0,c.A)(Tc,this)}set tabs(e){(0,l.A)(Tc,this,e)}get activeTab(){return(0,c.A)(Cc,this)}set activeTab(e){(0,l.A)(Cc,this,e)}render(){return h().createElement(Mc,{tabs:this.tabs,activeTab:this.activeTab,onTabClick:(0,c.A)(Nc,this)})}}function Mc(e){let{tabs:t,activeTab:i,onTabClick:n}=e;return h().createElement("ul",{className:"tabs",part:"tabs"},null==t?void 0:t.map((e=>h().createElement("li",{key:e.id,part:"tab",className:an()("tab",{active:e.id===i})},h().createElement("a",{onClick:()=>n(e)},e.label)))))}dc=Rc,({e:[uc,mc,gc,bc,Ac,xc,kc,Ec],c:[yc,hc]}=(0,d.A)(dc,[fc("ai-portal.tab-list",{styleTexts:[pc.A]})],[[vc({attribute:!1}),1,"tabs"],[vc({attribute:!1}),1,"activeTab"],[wc({type:"tab.click"}),1,"tabClick",e=>(0,c.A)(Sc,e),(e,t)=>(0,l.A)(Sc,e,t)]],0,(e=>Nc.has((0,o.A)(e))),m.ReactNextElement)),hc();let Ic=function(e){return e.PLEASE_SELECT="PLEASE_SELECT",e.SEARCH_PLACEHOLDER="SEARCH_PLACEHOLDER",e.SEARCH_NO_DATA="SEARCH_NO_DATA",e}({});const Oc="bricks/ai-portal/dropdown-select",Wc=g.i18n.getFixedT(null,Oc);var Dc,Lc=i(40138);let Pc,zc,Uc,Hc,Bc,Vc,jc,Fc,Gc,Yc,Kc,Jc,$c,qc,Xc,Qc,Zc,ed,td,id,nd;(0,g.initializeI18n)(Oc,{en:{PLEASE_SELECT:"Please Select",SEARCH_PLACEHOLDER:"Search",SEARCH_NO_DATA:"No Data"},zh:{PLEASE_SELECT:"请选择",SEARCH_PLACEHOLDER:"搜索",SEARCH_NO_DATA:"暂无结果"}});const{defineElement:ad,property:rd,event:od}=(0,u.createDecorators)(),sd=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",onBeforeVisibleChange:"before.visible.change"}),ld=(0,m.wrapBrick)("eo-icon"),cd=(0,m.wrapBrick)("eo-loading-container"),dd=(0,m.wrapBrick)("eo-menu"),pd=(0,m.wrapBrick)("eo-menu-item"),hd=(0,m.wrapBrick)("eo-input",{onValueChange:"change"});let ud;var md=new WeakMap,gd=new WeakMap,bd=new WeakMap,Ad=new WeakMap,xd=new WeakMap,kd=new WeakMap,Ed=new WeakMap,fd=new WeakMap,vd=new WeakMap,wd=new WeakSet,yd=new WeakMap;class Td extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,wd),(0,r.A)(this,md,zc(this)),(0,r.A)(this,gd,(Uc(this),Hc(this))),(0,r.A)(this,bd,(Bc(this),Vc(this))),(0,r.A)(this,Ad,(jc(this),Fc(this))),(0,r.A)(this,xd,(Gc(this),Yc(this))),(0,r.A)(this,kd,(Kc(this),Jc(this))),(0,r.A)(this,Ed,($c(this),qc(this))),(0,r.A)(this,fd,(Xc(this),Qc(this))),(0,r.A)(this,vd,(Zc(this),ed(this))),(0,r.A)(this,yd,(nd(this),e=>{(0,s.A)(wd,this,td).emit(e)}))}get value(){return(0,c.A)(md,this)}set value(e){(0,l.A)(md,this,e)}get options(){return(0,c.A)(gd,this)}set options(e){(0,l.A)(gd,this,e)}get labelMaxWidth(){return(0,c.A)(bd,this)}set labelMaxWidth(e){(0,l.A)(bd,this,e)}get loading(){return(0,c.A)(Ad,this)}set loading(e){(0,l.A)(Ad,this,e)}get searchPlaceholder(){return(0,c.A)(xd,this)}set searchPlaceholder(e){(0,l.A)(xd,this,e)}get dropdownContentStyle(){return(0,c.A)(kd,this)}set dropdownContentStyle(e){(0,l.A)(kd,this,e)}get dropdownMaxWidth(){return(0,c.A)(Ed,this)}set dropdownMaxWidth(e){(0,l.A)(Ed,this,e)}get showSearch(){return(0,c.A)(fd,this)}set showSearch(e){(0,l.A)(fd,this,e)}render(){return h().createElement(Cd,{value:this.value,options:this.options,onChange:(0,c.A)(yd,this),loading:this.loading,labelMaxWidth:this.labelMaxWidth,dropdownMaxWidth:this.dropdownMaxWidth,showSearch:this.showSearch,searchPlaceholder:this.searchPlaceholder,dropdownContentStyle:this.dropdownContentStyle})}}function Cd(e){let{value:t,options:i,labelMaxWidth:n,dropdownMaxWidth:a,showSearch:r,loading:o,searchPlaceholder:s,dropdownContentStyle:l,onChange:c}=e;const[d,u]=(0,p.useState)(!1),[m,g]=(0,p.useState)(t),[b,A]=(0,p.useState)(""),[x,k]=(0,p.useState)(i);(0,p.useEffect)((()=>{k(i)}),[i]);const E=(0,p.useMemo)((()=>null==x?void 0:x.find((e=>e.value===m))),[x,m]),f=(0,p.useMemo)((()=>b&&x?null==x?void 0:x.filter((e=>e.label.toLowerCase().includes(b.toLowerCase()))):x),[x,b]),v=(0,p.useCallback)((e=>{u(e.detail),e.detail||A("")}),[]),w=(0,p.useMemo)((()=>(0,xn.debounce)((e=>{A(e.detail)}),300)),[]);return h().createElement(sd,{placement:"bottom-start",trigger:"click",active:d,arrow:!1,distance:5,onBeforeVisibleChange:v},h().createElement("span",{slot:"anchor",className:"trigger"},h().createElement("span",{className:"label",style:{maxWidth:n}},E?null==E?void 0:E.label:Wc(Ic.PLEASE_SELECT)),h().createElement(ld,{lib:"lucide",icon:d?"chevron-up":"chevron-down"})),h().createElement("div",{className:"dropdown",style:{maxWidth:a}},r&&h().createElement("div",{className:"search-container"},h().createElement(hd,{className:"search",value:b,placeholder:s||Wc(Ic.SEARCH_PLACEHOLDER),onValueChange:w},h().createElement(ld,{slot:"prefix",lib:"antd",icon:"search"}))),h().createElement(cd,{loading:o,delay:500,style:{width:"100%"}},h().createElement("div",{className:"dropdown-inner",style:l},h().createElement("slot",{name:"prefix"}),!(null==f||!f.length)&&h().createElement(dd,null,null==f?void 0:f.map((e=>h().createElement(pd,{key:e.value,disabled:e.disabled,className:m===e.value?"active":void 0,onClick:t=>{t.preventDefault(),t.stopPropagation(),u(!1),m!==e.value&&(g(e.value),c(e))}},e.label)))),!(null!=f&&f.length)&&h().createElement("div",{className:"empty"},Wc(Ic.SEARCH_NO_DATA))))))}Dc=Td,({e:[zc,Uc,Hc,Bc,Vc,jc,Fc,Gc,Yc,Kc,Jc,$c,qc,Xc,Qc,Zc,ed,td,id,nd],c:[ud,Pc]}=(0,d.A)(Dc,[ad("ai-portal.dropdown-select",{styleTexts:[Lc.A]})],[[rd(),1,"value"],[rd({attribute:!1}),1,"options"],[rd({attribute:!1}),1,"labelMaxWidth"],[rd({type:Boolean}),1,"loading"],[rd({attribute:!1}),1,"searchPlaceholder"],[rd({attribute:!1}),1,"dropdownContentStyle"],[rd({attribute:!1}),1,"dropdownMaxWidth"],[rd({type:Boolean}),1,"showSearch"],[od({type:"change"}),1,"changeEvent",e=>(0,c.A)(vd,e),(e,t)=>(0,l.A)(vd,e,t)]],0,(e=>yd.has((0,o.A)(e))),m.ReactNextElement)),Pc();var Sd=i(92207),_d=i(9660);let Nd=function(e){return e.UNTITLED="UNTITLED",e}({});const Rd="bricks/ai-portal/preview-container",Md=g.i18n.getFixedT(null,Rd);var Id=i(72591),Od=i.n(Id),Wd=i(1740),Dd=i.n(Wd),Ld=i(88128),Pd=i.n(Ld),zd=i(30855),Ud=i.n(zd),Hd=i(93051),Bd=i.n(Hd),Vd=i(73656),jd=i.n(Vd),Fd=i(62522),Gd={};Gd.styleTagTransform=jd(),Gd.setAttributes=Ud(),Gd.insert=Pd().bind(null,"head"),Gd.domAPI=Dd(),Gd.insertStyleElement=Bd(),Od()(Fd.A,Gd);const Yd=Fd.A&&Fd.A.locals?Fd.A.locals:void 0;var Kd,Jd=i(6026),$d=i(28599);let qd,Xd,Qd,Zd,ep;(0,g.initializeI18n)(Rd,{en:{UNTITLED:"Untitled"},zh:{UNTITLED:"无标题"}});const tp=(0,m.wrapBrick)("eo-icon"),ip=(0,m.wrapBrick)("eo-page-title"),np=(0,m.wrapBrick)("eo-main-view"),ap=(0,m.wrapBrick)("eo-narrow-view"),{defineElement:rp,property:op}=(0,u.createDecorators)();let sp;var lp=new WeakMap,cp=new WeakMap,dp=new WeakMap;class pp extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,lp,Xd(this)),(0,r.A)(this,cp,(Qd(this),Zd(this))),(0,r.A)(this,dp,(ep(this),(0,xn.uniqueId)()))}get source(){return(0,c.A)(lp,this)}set source(e){(0,l.A)(lp,this,e)}get url(){return(0,c.A)(cp,this)}set url(e){(0,l.A)(cp,this,e)}render(){return h().createElement(p.Suspense,{fallback:h().createElement(tp,{lib:"antd",icon:"loading-3-quarters",spinning:!0,className:Yd.loading})},h().createElement(hp,{rootId:(0,c.A)(dp,this),source:this.source,url:this.url}))}}function hp(e){let{rootId:t,source:i,url:n}=e;const a=(0,p.useMemo)((()=>i?async function(e){const t=await(0,Jd.f)();return await t.parse(e)}(i).catch((e=>(console.error("Failed to parse view:",e),null))):Promise.resolve(null)),[i]),r=(0,p.use)(a),o=(0,p.useMemo)((()=>r?(0,Sd.d)(r,{rootId:t,expanded:!0}).catch((e=>(console.error("Failed to convert view:",e),null))):Promise.resolve(null)),[r,t]),s=(0,p.use)(o),l=(0,p.useMemo)((()=>(0,_d.W)(r)),[r]);return h().createElement(up,{rootId:t,pageTitle:l,convertedResult:s,url:n})}function up(e){let{rootId:t,pageTitle:i,convertedResult:n,url:a}=e;const r=(0,p.useRef)(null),o=(0,p.useRef)(null);return(0,p.useEffect)((()=>{const e=r.current;if(!e)return;const i=(0,$d.d)(t),n=(0,tn.unstable_createRoot)(e,{portal:i,supportsUseChildren:!0});return o.current=n,()=>{n.unmount(),i.remove(),o.current=null}}),[t]),(0,p.useEffect)((()=>{var e;if(!n)return;const{brick:t,context:i,functions:r,templates:s}=n;null===(e=o.current)||void 0===e||e.render(t,{context:i,functions:r,templates:s,url:a})}),[n,a]),h().createElement(ap,{size:"large",className:Yd.container},h().createElement(np,null,h().createElement(ip,{slot:"pageTitle",pageTitle:i||Md(Nd.UNTITLED)}),h().createElement("div",{className:Yd.main,ref:r,"data-root-id":t})))}Kd=pp,({e:[Xd,Qd,Zd,ep],c:[sp,qd]}=(0,d.A)(Kd,[rp("ai-portal.preview-container",{shadowOptions:!1})],[[op({attribute:!1}),1,"source"],[op(),1,"url"]],0,void 0,m.ReactNextElement)),qd();const mp="bricks/ai-portal/action-buttons";g.i18n.getFixedT(null,mp);var gp,bp=i(11816);let Ap,xp,kp,Ep,fp,vp,wp,yp,Tp;(0,g.initializeI18n)(mp,{en:{},zh:{}});const Cp=(0,m.wrapBrick)("eo-icon"),Sp=(0,m.wrapBrick)("eo-button"),{defineElement:_p,property:Np,event:Rp}=(0,u.createDecorators)();let Mp;var Ip=new WeakMap,Op=new WeakMap,Wp=new WeakMap,Dp=new WeakSet,Lp=new WeakMap;class Pp extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Dp),(0,r.A)(this,Ip,xp(this)),(0,r.A)(this,Op,(kp(this),Ep(this))),(0,r.A)(this,Wp,(fp(this),vp(this))),(0,r.A)(this,Lp,(Tp(this),e=>{this.activeKey=e?e.key:null,(0,s.A)(Dp,this,wp).emit(e)}))}get items(){return(0,c.A)(Ip,this)}set items(e){(0,l.A)(Ip,this,e)}get activeKey(){return(0,c.A)(Op,this)}set activeKey(e){(0,l.A)(Op,this,e)}render(){return h().createElement(zp,{items:this.items,activeKey:this.activeKey,onChange:(0,c.A)(Lp,this)})}}function zp(e){let{items:t,activeKey:i,onChange:n}=e;const[a,r]=(0,p.useState)(null!=i?i:null),o=(0,p.useRef)(!1);(0,p.useEffect)((()=>{r(null!=i?i:null)}),[i]),(0,p.useEffect)((()=>{var e;o.current?n(a&&null!==(e=null==t?void 0:t.find((e=>!e.hidden&&e.key===a)))&&void 0!==e?e:null):o.current=!0}),[a,t,n]);const s=(0,p.useMemo)((()=>null==t?void 0:t.filter((e=>!e.hidden&&!a||e.key===a))),[t,a]);return h().createElement("div",{className:"button-container"},null==s?void 0:s.map((e=>{const{text:t,icon:i,key:n}=e;return h().createElement(Sp,{key:n,className:"action"+(a?" active":""),themeVariant:"elevo",type:"neutral",onClick:()=>{a||r(n)}},i?h().createElement(Cp,(0,ut.A)({className:"icon"},i)):null,t,a?h().createElement(Cp,{className:"remove",lib:"lucide",icon:"x",onClick:e=>{e.stopPropagation(),e.preventDefault(),r(null)}}):null)})))}gp=Pp,({e:[xp,kp,Ep,fp,vp,wp,yp,Tp],c:[Mp,Ap]}=(0,d.A)(gp,[_p("ai-portal.action-buttons",{styleTexts:[bp.A]})],[[Np({attribute:!1}),1,"items"],[Np(),1,"activeKey"],[Rp({type:"change"}),1,"change",e=>(0,c.A)(Wp,e),(e,t)=>(0,l.A)(Wp,e,t)]],0,(e=>Lp.has((0,o.A)(e))),m.ReactNextElement)),Ap();let Up=function(e){return e.UN_START_STATUS="UN_START_STATUS",e.RUNNING_STATUS="RUNNING_STATUS",e.COMPLETED_STATUS="COMPLETED_STATUS",e.NEW_CHAT="NEW_CHAT",e}({});const Hp="bricks/ai-portal/goal-card-list",Bp={en:{UN_START_STATUS:"Not Start",RUNNING_STATUS:"Running",COMPLETED_STATUS:"Completed",NEW_CHAT:"New chat"},zh:{UN_START_STATUS:"未开始",RUNNING_STATUS:"运行中",COMPLETED_STATUS:"已完成",NEW_CHAT:"新对话"}},Vp=g.i18n.getFixedT(null,Hp);var jp=i(46342),Fp=i(10335);let Gp;(0,g.initializeI18n)(Hp,Bp);const Yp=(0,m.wrapBrick)("eo-icon"),Kp=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),Jp=(0,m.wrapBrick)("eo-easyops-avatar"),$p=(0,m.wrapBrick)("eo-button"),qp={ready:"uncheck-status",working:"active-status",completed:"check-status"},Xp=[{key:"ready",icon:{icon:"uncheck-status",lib:"easyops",category:"colored-common"},text:Vp(Up.UN_START_STATUS)},{key:"working",icon:{icon:"active-status",lib:"easyops",category:"colored-common"},text:Vp(Up.RUNNING_STATUS)},{key:"completed",icon:{icon:"check-status",lib:"easyops",category:"colored-common"},text:Vp(Up.COMPLETED_STATUS)}];function Qp(e){let{goalItem:t,idWidth:i,cardStyle:n,onStatusChange:a,onTitleChange:r,onClick:o,onNewChat:s,onAppendChild:l,onRevokeAppendChild:c,isActive:d}=e;const{state:u,id:m,title:g,conversations:b,owner:A,pending:x}=t,k=(0,p.useRef)(!1),E=(0,p.useCallback)((()=>{k.current=!0}),[]),f=(0,p.useCallback)((()=>{k.current=!1}),[]),[v,w]=(0,p.useState)(!1),y=(0,p.useCallback)((()=>{w(!0)}),[]),T=(0,p.useCallback)((e=>{w(!1);const t=e.currentTarget.textContent;!x||null!=t&&t.trim()?null!==t&&g!==t&&(null==r||r(t)):null==c||c()}),[x,g,c,r]),C=(0,p.useCallback)((e=>{k.current||"Enter"===e.key&&(e.preventDefault(),e.currentTarget.blur())}),[]),S=(0,p.useRef)(null);return(0,p.useEffect)((()=>{var e;x&&(null===(e=S.current)||void 0===e||e.focus())}),[x]),h().createElement("div",{className:an()("goal-item",t.state,{editing:v},{active:d}),style:{paddingLeft:24*(t.level+1)+"px",...n},onClick:x?void 0:o},h().createElement("div",{className:"start"},h().createElement(Kp,{actions:Xp,disabled:x,onActionClick:e=>{var t;t=e.detail,null==a||a(t.key)}},h().createElement(Yp,{className:"icon",lib:"easyops",category:"colored-common",icon:qp[u],onClick:e=>e.stopPropagation()})),h().createElement("span",{className:"serial-number",style:{width:i}},"#",x?"":m),h().createElement("span",{className:"title",ref:S,onClick:e=>e.stopPropagation(),onFocus:y,onBlur:T,onKeyDown:C,onCompositionStart:E,onCompositionEnd:f,contentEditable:(_=!0,_?function(){if("boolean"!=typeof Gp){const e=document.createElement("div");e.setAttribute("contenteditable","PLAINTEXT-ONLY"),Gp="plaintext-only"===e.contentEditable}return Gp}()?"plaintext-only":"true":"false"),suppressContentEditableWarning:!0},g)),h().createElement("div",{className:"end"},h().createElement("div",{className:"info"},h().createElement("div",{className:"message"},h().createElement(Yp,{lib:"easyops",category:"common",icon:"message"}),h().createElement("span",{className:"count"},b||0)),h().createElement(Jp,{nameOrInstanceId:null==A?void 0:A.instanceId,size:"small"})),h().createElement("div",{className:"operation",onClick:e=>e.stopPropagation()},0===t.level&&h().createElement($p,{className:"append-child",themeVariant:"elevo",type:"neutral",size:"small",onClick:l},h().createElement(Yp,{lib:"lucide",icon:"plus"})),!x&&h().createElement($p,{className:"new-chat",themeVariant:"elevo",type:"neutral",size:"small",onClick:s},Vp(Up.NEW_CHAT)))));var _}var Zp;let eh,th,ih,nh,ah,rh,oh,sh,lh,ch,dh,ph,hh,uh,mh,gh,bh,Ah,xh,kh,Eh,fh,vh,wh;(0,g.initializeI18n)(Hp,Bp);const{defineElement:yh,property:Th,event:Ch,method:Sh}=(0,u.createDecorators)(),_h=(0,m.wrapBrick)("eo-icon"),Nh=(0,p.forwardRef)(Gh);let Rh;var Mh=new WeakMap,Ih=new WeakMap,Oh=new WeakMap,Wh=new WeakMap,Dh=new WeakSet,Lh=new WeakMap,Ph=new WeakMap,zh=new WeakMap,Uh=new WeakMap,Hh=new WeakMap,Bh=new WeakMap,Vh=new WeakMap,jh=new WeakMap;class Fh extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Dh),(0,r.A)(this,Mh,(eh(this),ih(this))),(0,r.A)(this,Ih,(nh(this),ah(this))),(0,r.A)(this,Oh,(rh(this),oh(this))),(0,r.A)(this,Wh,(sh(this),lh(this))),(0,r.A)(this,Lh,(ph(this),e=>{(0,s.A)(Dh,this,ch).emit(e)})),(0,r.A)(this,Ph,hh(this)),(0,r.A)(this,zh,(gh(this),e=>{(0,s.A)(Dh,this,uh).emit(e)})),(0,r.A)(this,Uh,bh(this)),(0,r.A)(this,Hh,(kh(this),e=>{(0,s.A)(Dh,this,Ah).emit(e)})),(0,r.A)(this,Bh,Eh(this)),(0,r.A)(this,Vh,(wh(this),e=>{(0,s.A)(Dh,this,fh).emit(e)})),(0,r.A)(this,jh,(0,p.createRef)())}get goalList(){return(0,c.A)(Mh,this)}set goalList(e){(0,l.A)(Mh,this,e)}get cardStyle(){return(0,c.A)(Ih,this)}set cardStyle(e){(0,l.A)(Ih,this,e)}get activeKey(){return(0,c.A)(Oh,this)}set activeKey(e){(0,l.A)(Oh,this,e)}appendChildDone(e,t){var i;null===(i=(0,c.A)(jh,this).current)||void 0===i||i.appendChildDone(e,t)}render(){return h().createElement(Nh,{ref:(0,c.A)(jh,this),goalList:this.goalList,cardStyle:this.cardStyle,onTitleChange:(0,c.A)(Hh,this),onStatusChange:(0,c.A)(zh,this),onItemClick:(0,c.A)(Lh,this),onNewChat:(0,c.A)(Vh,this),activeKey:this.activeKey})}}function Gh(e,t){let{goalList:i,cardStyle:n,onTitleChange:a,onStatusChange:r,onItemClick:o,onNewChat:s,activeKey:l}=e;const[c,d]=(0,p.useState)(i);(0,p.useEffect)((()=>{d(i)}),[i]);const u=(e,t,i,n)=>{const a={...e,[t]:i};d(null==c?void 0:c.map((e=>e.instanceId===a.instanceId?a:e))),null==n||n(a)};(0,p.useImperativeHandle)(t,(()=>({appendChildDone:(e,t)=>{d((i=>null==i?void 0:i.map((i=>i.instanceId===e?{...t,level:i.level}:i))))}})),[]);const m=(0,p.useMemo)((()=>{var e;return 10*((null!==(e=null==c?void 0:c.reduce(((e,t)=>Math.max(e,t.id)),0))&&void 0!==e?e:0).toString().length+1)}),[c]);return c?h().createElement("div",{className:"goal-container"},null==c?void 0:c.map((e=>h().createElement(Qp,{key:e.instanceId,isActive:l===e.instanceId,goalItem:e,idWidth:m,cardStyle:n,onTitleChange:t=>((e,t)=>{u(t,"title",e,a)})(t,e),onStatusChange:t=>((e,t)=>{u(t,"state",e,r)})(t,e),onNewChat:()=>null==s?void 0:s(e),onClick:()=>null==o?void 0:o(e),onAppendChild:()=>(e=>{const t={instanceId:(0,xn.uniqueId)("pending-"),pending:!0,id:0,title:"",state:"ready",level:1,pendingParentId:e.instanceId};d((i=>{var n;const a=null!==(n=null==i?void 0:i.findIndex((t=>t.instanceId===e.instanceId)))&&void 0!==n?n:-1;if(-1===a)return i;const r=i.slice(a+1).findIndex((e=>0===e.level))+1;return 0===r?[...i,t]:[...i.slice(0,a+r),t,...i.slice(a+r)]}))})(e),onRevokeAppendChild:()=>{d((t=>null==t?void 0:t.filter((t=>t.instanceId!==e.instanceId))))}})))):h().createElement("div",{className:"loading"},h().createElement(_h,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}Zp=Fh,({e:[ih,nh,ah,rh,oh,sh,lh,ch,dh,ph,hh,uh,mh,gh,bh,Ah,xh,kh,Eh,fh,vh,wh,eh],c:[Rh,th]}=(0,d.A)(Zp,[yh("ai-portal.goal-card-list",{styleTexts:[Fp.A,jp.A]})],[[Th({attribute:!1}),1,"goalList"],[Th({attribute:!1}),1,"cardStyle"],[Th(),1,"activeKey"],[Ch({type:"item.click"}),1,"itemClickEvent",e=>(0,c.A)(Wh,e),(e,t)=>(0,l.A)(Wh,e,t)],[Ch({type:"item.status.change"}),1,"itemStatusChangeEvent",e=>(0,c.A)(Ph,e),(e,t)=>(0,l.A)(Ph,e,t)],[Ch({type:"item.title.change"}),1,"itemTitleChangeEvent",e=>(0,c.A)(Uh,e),(e,t)=>(0,l.A)(Uh,e,t)],[Ch({type:"item.new.chat"}),1,"itemNewChatEvent",e=>(0,c.A)(Bh,e),(e,t)=>(0,l.A)(Bh,e,t)],[Sh(),2,"appendChildDone"]],0,(e=>jh.has((0,o.A)(e))),m.ReactNextElement)),th();var Yh=i(465);let Kh=function(e){return e.PROJECT_OVERALL="PROJECT_OVERALL",e}({});const Jh="bricks/ai-portal/project-conversations",$h=g.i18n.getFixedT(null,Jh);var qh,Xh=i(79286);let Qh,Zh,eu,tu,iu,nu,au,ru,ou,su,lu,cu,du,pu,hu,uu,mu;(0,g.initializeI18n)(Jh,{en:{PROJECT_OVERALL:"Project overall"},zh:{PROJECT_OVERALL:"项目整体"}});const gu=(0,m.wrapBrick)("eo-link"),bu=(0,m.wrapBrick)("eo-icon"),Au=(0,m.wrapBrick)("eo-easyops-avatar"),xu=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:ku,property:Eu,event:fu}=(0,u.createDecorators)();let vu;var wu=new WeakMap,yu=new WeakMap,Tu=new WeakMap,Cu=new WeakMap,Su=new WeakMap,_u=new WeakSet,Nu=new WeakMap,Ru=new WeakMap,Mu=new WeakMap;class Iu extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,_u),(0,r.A)(this,wu,Zh(this)),(0,r.A)(this,yu,(eu(this),tu(this))),(0,r.A)(this,Tu,(iu(this),nu(this))),(0,r.A)(this,Cu,(au(this),ru(this))),(0,r.A)(this,Su,(ou(this),su(this))),(0,r.A)(this,Nu,(du(this),e=>{(0,s.A)(_u,this,lu).emit(e)})),(0,r.A)(this,Ru,pu(this)),(0,r.A)(this,Mu,(mu(this),e=>{(0,s.A)(_u,this,hu).emit(e)}))}get list(){return(0,c.A)(wu,this)}set list(e){(0,l.A)(wu,this,e)}get urlTemplate(){return(0,c.A)(yu,this)}set urlTemplate(e){(0,l.A)(yu,this,e)}get actions(){return(0,c.A)(Tu,this)}set actions(e){(0,l.A)(Tu,this,e)}get goals(){return(0,c.A)(Cu,this)}set goals(e){(0,l.A)(Cu,this,e)}render(){return h().createElement(Ou,{list:this.list,urlTemplate:this.urlTemplate,actions:this.actions,goals:this.goals,onGoalClick:(0,c.A)(Nu,this),onActionClick:(0,c.A)(Mu,this)})}}function Ou(e){let{list:t,urlTemplate:i,actions:n,goals:a,onGoalClick:r,onActionClick:o}=e;return t?h().createElement("ul",null,t.map((e=>h().createElement("li",{className:"item",key:e.conversationId},h().createElement(Wu,{conversation:e,urlTemplate:i,actions:n,goals:a,onGoalClick:r,onActionClick:o}))))):h().createElement("div",{className:"loading"},h().createElement(bu,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}function Wu(e){var t;let{conversation:i,urlTemplate:n,actions:a,goals:r,onGoalClick:o,onActionClick:s}=e;const l=(0,p.useRef)(null),c=g.i18n.language.split("-")[0];(0,p.useEffect)((()=>{const e=l.current;if(!e)return;const t=e=>{e.stopPropagation(),e.preventDefault(),o(i)};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[i,o]);const[d,u]=(0,p.useState)(!1);return h().createElement(gu,{className:an()("link",{"actions-active":d}),url:(0,En.Q)(n,i)},h().createElement("div",{className:"main"},h().createElement("div",{className:"header"},h().createElement(bu,{className:"icon",lib:"easyops",category:"common",icon:"clock"}),h().createElement("div",{className:"title"},i.title)),i.description&&h().createElement("div",{className:"description"},i.description)),r&&h().createElement("div",{className:an()("goal",{global:!i.goalInstanceId}),ref:l},i.goalInstanceId?null===(t=r.find((e=>e.instanceId===i.goalInstanceId)))||void 0===t?void 0:t.title:$h(Kh.PROJECT_OVERALL)),h().createElement(Au,{className:"avatar",size:"small",nameOrInstanceId:i.username}),h().createElement("div",{className:`operations lang-${c}`},h().createElement(xu,{className:"actions",actions:a,onActionClick:e=>{s({action:e.detail,item:i})},onVisibleChange:e=>{u(e.detail)}}),h().createElement("div",{className:"time",title:(0,Yh.P)(1e3*i.startTime,Yh.c.full)},(0,Yh.P)(1e3*i.startTime,Yh.c.relative))))}qh=Iu,({e:[Zh,eu,tu,iu,nu,au,ru,ou,su,lu,cu,du,pu,hu,uu,mu],c:[vu,Qh]}=(0,d.A)(qh,[ku("ai-portal.project-conversations",{styleTexts:[Xh.A]})],[[Eu({attribute:!1}),1,"list"],[Eu(),1,"urlTemplate"],[Eu({attribute:!1}),1,"actions"],[Eu({attribute:!1}),1,"goals"],[fu({type:"goal.click"}),1,"goalClick",e=>(0,c.A)(Su,e),(e,t)=>(0,l.A)(Su,e,t)],[fu({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Ru,e),(e,t)=>(0,l.A)(Ru,e,t)]],0,(e=>Mu.has((0,o.A)(e))),m.ReactNextElement)),Qh();var Du,Lu=i(23677);let Pu,zu,Uu,Hu,Bu,Vu,ju,Fu,Gu,Yu,Ku,Ju,$u,qu,Xu;const Qu=(0,m.wrapBrick)("eo-link"),Zu=(0,m.wrapBrick)("eo-icon"),em=(0,m.wrapBrick)("eo-easyops-avatar"),tm=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:im,property:nm,event:am}=(0,u.createDecorators)();let rm;var om=new WeakMap,sm=new WeakMap,lm=new WeakMap,cm=new WeakMap,dm=new WeakSet,pm=new WeakMap,hm=new WeakMap,um=new WeakMap;class mm extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,dm),(0,r.A)(this,om,zu(this)),(0,r.A)(this,sm,(Uu(this),Hu(this))),(0,r.A)(this,lm,(Bu(this),Vu(this))),(0,r.A)(this,cm,(ju(this),Fu(this))),(0,r.A)(this,pm,(Ku(this),Ju(this))),(0,r.A)(this,hm,(Xu(this),e=>{(0,s.A)(dm,this,Gu).emit(e)})),(0,r.A)(this,um,(e=>{(0,s.A)(dm,this,$u).emit(e)}))}get list(){return(0,c.A)(om,this)}set list(e){(0,l.A)(om,this,e)}get urlTemplate(){return(0,c.A)(sm,this)}set urlTemplate(e){(0,l.A)(sm,this,e)}get actions(){return(0,c.A)(lm,this)}set actions(e){(0,l.A)(lm,this,e)}render(){return h().createElement(gm,{list:this.list,urlTemplate:this.urlTemplate,actions:this.actions,onActionClick:(0,c.A)(hm,this),onItemClick:(0,c.A)(um,this)})}}function gm(e){let{list:t,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}=e;return t?h().createElement("ul",null,null==t?void 0:t.map((e=>h().createElement("li",{className:"item",key:e.instanceId},h().createElement(bm,{knowledge:e,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}))))):h().createElement("div",{className:"loading"},h().createElement(Zu,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}function bm(e){let{knowledge:t,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}=e;const[o,s]=(0,p.useState)(!1);return h().createElement(Qu,{className:an()("link",{"actions-active":o}),url:(0,En.Q)(i,t),onClick:()=>null==r?void 0:r(t)},h().createElement("div",{className:"main"},h().createElement("div",{className:"header"},h().createElement(Zu,{className:"icon",lib:"easyops",icon:"lightbulb",category:"common"}),h().createElement("span",{className:"title"},t.name),h().createElement(Zu,{className:"attachment",lib:"lucide",icon:"paperclip"})),t.description&&h().createElement("div",{className:"description"},t.description)),h().createElement("div",{className:"time"},(0,Yh.P)(1e3*t.time,Yh.c.relative)),h().createElement("div",{className:"operations"},h().createElement(tm,{className:"actions",actions:n,onActionClick:e=>{a({action:e.detail,item:t})},onVisibleChange:e=>{s(e.detail)}}),h().createElement(em,{className:"avatar",size:"small",nameOrInstanceId:t.user})))}Du=mm,({e:[zu,Uu,Hu,Bu,Vu,ju,Fu,Gu,Yu,Ku,Ju,$u,qu,Xu],c:[rm,Pu]}=(0,d.A)(Du,[im("ai-portal.project-knowledges",{styleTexts:[Lu.A]})],[[nm({attribute:!1}),1,"list"],[nm(),1,"urlTemplate"],[nm({attribute:!1}),1,"actions"],[am({type:"action.click"}),1,"actionClick",e=>(0,c.A)(cm,e),(e,t)=>(0,l.A)(cm,e,t)],[am({type:"item.click"}),1,"itemClick",e=>(0,c.A)(pm,e),(e,t)=>(0,l.A)(pm,e,t)]],0,(e=>um.has((0,o.A)(e))),m.ReactNextElement)),Pu();let Am=function(e){return e.STARTED_A_CHAT="STARTED_A_CHAT",e.CREATED_THIS_GOAL="CREATED_THIS_GOAL",e.CHANGED_THE_GOAL_TITLE="CHANGED_THE_GOAL_TITLE",e.CHANGED_THE_GOAL_DESCRIPTION="CHANGED_THE_GOAL_DESCRIPTION",e.CHANGED_THE_GOAL="CHANGED_THE_GOAL",e.DELETED_THIS_GOAL="DELETED_THIS_GOAL",e.DECOMPOSED_THIS_GOAL="DECOMPOSED_THIS_GOAL",e.SET_OWNER="SET_OWNER",e.REMOVED_GOAL_PARTICIPANTS="REMOVED_GOAL_PARTICIPANTS",e.ADDED_GOAL_PARTICIPANTS="ADDED_GOAL_PARTICIPANTS",e.COMMENTED="COMMENTED",e.COMMA="COMMA",e.SEMICOLON="SEMICOLON",e}({});const xm="bricks/ai-portal/activity-timeline",km=g.i18n.getFixedT(null,xm);var Em,fm=i(14763);let vm,wm,ym,Tm,Cm;(0,g.initializeI18n)(xm,{en:{STARTED_A_CHAT:"started a chat",CREATED_THIS_GOAL:"created this goal",CHANGED_THE_GOAL_TITLE:'changed the goal title to "{{ title }}"',CHANGED_THE_GOAL_DESCRIPTION:'changed the goal description to "{{ description }}"',CHANGED_THE_GOAL:"changed the goal",DELETED_THIS_GOAL:"deleted this goal",DECOMPOSED_THIS_GOAL:"decomposed this goal to {{ count }} sub-goal: ",DECOMPOSED_THIS_GOAL_plural:"decomposed this goal to {{ count }} sub-goals: ",SET_OWNER:"set {{ user }} as the owner",REMOVED_GOAL_PARTICIPANTS:"removed a goal participant: ",REMOVED_GOAL_PARTICIPANTS_plural:"removed {{ count }} goal participants: ",ADDED_GOAL_PARTICIPANTS:"added a goal participant: ",ADDED_GOAL_PARTICIPANTS_plural:"added {{ count }} goal participants: ",COMMENTED:"commented",COMMA:", ",SEMICOLON:"; "},zh:{STARTED_A_CHAT:"发起了对话",CREATED_THIS_GOAL:"创建了此目标",CHANGED_THE_GOAL_TITLE:"修改目标标题为 “{{ title }}”",CHANGED_THE_GOAL_DESCRIPTION:"修改目标描述为 “{{ description }}”",CHANGED_THE_GOAL:"修改了此目标",DELETED_THIS_GOAL:"删除了此目标",DECOMPOSED_THIS_GOAL:"将此目标分解为 {{ count }} 个子目标:",DECOMPOSED_THIS_GOAL_plural:"将此目标分解为 {{ count }} 个子目标:",SET_OWNER:"设定负责人为 {{ user }}",REMOVED_GOAL_PARTICIPANTS:"移除了目标参与成员:",ADDED_GOAL_PARTICIPANTS:"添加了目标参与成员:",COMMENTED:"评论",COMMA:",",SEMICOLON:";"}});const Sm=(0,m.wrapBrick)("eo-link"),_m=(0,m.wrapBrick)("eo-icon"),Nm=(0,m.wrapBrick)("eo-easyops-avatar"),{defineElement:Rm,property:Mm}=(0,u.createDecorators)();let Im;var Om=new WeakMap,Wm=new WeakMap;class Dm extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Om,wm(this)),(0,r.A)(this,Wm,(ym(this),Tm(this))),Cm(this)}get list(){return(0,c.A)(Om,this)}set list(e){(0,l.A)(Om,this,e)}get chatUrlTemplate(){return(0,c.A)(Wm,this)}set chatUrlTemplate(e){(0,l.A)(Wm,this,e)}render(){return h().createElement(Lm,{list:this.list,chatUrlTemplate:this.chatUrlTemplate})}}function Lm(e){let{list:t,chatUrlTemplate:i}=e;return t?h().createElement("ul",null,t.map(((e,t)=>{var n,a;return h().createElement("li",{className:"activity",key:t},h().createElement("div",{className:"guide-line"}),h().createElement("div",{className:"main"},h().createElement(Nm,{className:"avatar",nameOrInstanceId:e.user_id,size:"xs"}),h().createElement("span",{className:"action"},e.user_name," ","start_conversation"===e.action_type?h().createElement(h().Fragment,null,h().createElement("span",null,km(Am.STARTED_A_CHAT)),h().createElement(Sm,{className:"conversation",url:(0,En.Q)(i,e),target:"_blank"},null===(n=e.metadata)||void 0===n?void 0:n.conversation_title),h().createElement(_m,{className:"external-link-icon",lib:"lucide",icon:"external-link"})):"create_goal"===e.action_type?km(Am.CREATED_THIS_GOAL):"edit_goal"===e.action_type?e.metadata.after.title?km(Am.CHANGED_THE_GOAL_TITLE,e.metadata.after):e.metadata.after.description?km(Am.CHANGED_THE_GOAL_DESCRIPTION,e.metadata.after):km(Am.CHANGED_THE_GOAL):"delete_goal"===e.action_type?km(Am.DELETED_THIS_GOAL):"decompose_goals"===e.action_type?`${km(Am.DECOMPOSED_THIS_GOAL,{count:e.metadata.sub_goals_count})}${e.metadata.sub_goals.map((e=>e.title)).join(km(Am.COMMA))}`:"alter_owner"===e.action_type?km(Am.SET_OWNER,{user:e.metadata.after.owner.user_name}):"alter_user"===e.action_type?function(e){const t=[],i=[],n=new Set(e.metadata.before.users.map((e=>e.user_name)));for(const t of e.metadata.after.users)n.has(t.user_name)||i.push(t.user_name);const a=new Set(e.metadata.after.users.map((e=>e.user_name)));for(const i of e.metadata.before.users)a.has(i.user_name)||t.push(i.user_name);const r=[];return t.length>0&&r.push(km(Am.REMOVED_GOAL_PARTICIPANTS,{count:t.length})+t.join(km(Am.COMMA))),i.length>0&&r.push(km(Am.ADDED_GOAL_PARTICIPANTS,{count:i.length})+i.join(km(Am.COMMA))),r.join(km(Am.SEMICOLON))}(e):"add_comment"===e.action_type?km(Am.COMMENTED):e.action_type),h().createElement("span",{className:"time",title:(0,Yh.P)(e.time,Yh.c.full)},(0,Yh.P)(e.time,Yh.c.relative))),"add_comment"===e.action_type&&h().createElement("div",{className:"comment"},null===(a=e.metadata)||void 0===a?void 0:a.comment_content))}))):h().createElement("div",{className:"loading"},h().createElement(_m,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}Em=Dm,({e:[wm,ym,Tm,Cm],c:[Im,vm]}=(0,d.A)(Em,[Rm("ai-portal.activity-timeline",{styleTexts:[fm.A]})],[[Mm({attribute:!1}),1,"list"],[Mm(),1,"chatUrlTemplate"]],0,void 0,m.ReactNextElement)),vm();let Pm=function(e){return e.TERMINATE_THE_TASK="TERMINATE_THE_TASK",e}({});const zm="bricks/ai-portal/chat-input",Um=g.i18n.getFixedT(null,zm);var Hm,Bm=i(84479);let Vm,jm,Fm,Gm,Ym,Km,Jm,$m,qm,Xm,Qm,Zm,eg,tg,ig,ng,ag,rg,og;(0,g.initializeI18n)(zm,{en:{TERMINATE_THE_TASK:"Terminate the task"},zh:{TERMINATE_THE_TASK:"终止任务"}});const sg={lib:"antd",icon:"loading-3-quarters",spinning:!0},lg={lib:"fa",prefix:"far",icon:"circle-stop"},cg=(0,m.wrapBrick)("eo-icon"),dg=(0,m.wrapBrick)("ai-portal.icon-button"),{defineElement:pg,property:hg,event:ug}=(0,u.createDecorators)();let mg;var gg=new WeakMap,bg=new WeakMap,Ag=new WeakMap,xg=new WeakMap,kg=new WeakMap,Eg=new WeakMap,fg=new WeakSet,vg=new WeakMap,wg=new WeakMap,yg=new WeakMap;class Tg extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,fg),(0,r.A)(this,gg,jm(this)),(0,r.A)(this,bg,(Fm(this),Gm(this))),(0,r.A)(this,Ag,(Ym(this),Km(this))),(0,r.A)(this,xg,(Jm(this),$m(this))),(0,r.A)(this,kg,(qm(this),Xm(this))),(0,r.A)(this,Eg,(Qm(this),Zm(this))),(0,r.A)(this,vg,(ig(this),e=>{(0,s.A)(fg,this,eg).emit(e)})),(0,r.A)(this,wg,ng(this)),(0,r.A)(this,yg,(og(this),()=>{(0,s.A)(fg,this,ag).emit()}))}get placeholder(){return(0,c.A)(gg,this)}set placeholder(e){(0,l.A)(gg,this,e)}get autoFocus(){return(0,c.A)(bg,this)}set autoFocus(e){(0,l.A)(bg,this,e)}get submitDisabled(){return(0,c.A)(Ag,this)}set submitDisabled(e){(0,l.A)(Ag,this,e)}get supportsTerminate(){return(0,c.A)(xg,this)}set supportsTerminate(e){(0,l.A)(xg,this,e)}get terminating(){return(0,c.A)(kg,this)}set terminating(e){(0,l.A)(kg,this,e)}render(){return h().createElement(Cg,{placeholder:this.placeholder,autoFocus:this.autoFocus,submitDisabled:this.submitDisabled,supportsTerminate:this.supportsTerminate,terminating:this.terminating,onSubmit:(0,c.A)(vg,this),onTerminate:(0,c.A)(yg,this)})}}function Cg(e){let{placeholder:t,autoFocus:i,submitDisabled:n,supportsTerminate:a,terminating:r,onSubmit:o,onTerminate:s}=e;const l=(0,p.useRef)(null),c=(0,p.useRef)(null),[d,u]=(0,p.useState)(""),m=(0,p.useRef)(""),[g,b]=(0,p.useState)(!1);(0,p.useEffect)((()=>{var e;i&&!n&&(null===(e=c.current)||void 0===e||e.focus())}),[i,n]);const A=(0,p.useCallback)((e=>{!n&&e&&(o(e),m.current="",u(""))}),[n,o]),x=(0,p.useCallback)((e=>{A(e.currentTarget.value)}),[A]),k=(0,p.useCallback)((e=>{m.current=e.target.value,u(e.target.value)}),[]),E=(0,p.useCallback)((()=>{A(m.current)}),[A]);(0,p.useEffect)((()=>{const e=null==l?void 0:l.current;if(!e)return;const t=new gt.A((t=>{for(const i of t)i.target===e&&(i.contentBoxSize?i.contentBoxSize[0]?i.contentBoxSize[0].blockSize:i.contentBoxSize.blockSize:i.contentRect.height)>52&&b(!0)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,p.useEffect)((()=>{d||b(!1)}),[d]);const f=(0,p.useCallback)((e=>{var t;for(const t of e.nativeEvent.composedPath())if(t instanceof HTMLTextAreaElement||t instanceof HTMLButtonElement)return;null===(t=c.current)||void 0===t||t.focus()}),[]);return h().createElement("div",{className:"container",onClick:f},h().createElement("div",{className:an()("box",{wrap:g})},h().createElement("div",{className:"input",ref:l},h().createElement(xt,{containerRef:l,ref:c,value:d,minRows:1,maxRows:4,borderSize:0,paddingSize:16,autoResize:!0,placeholder:t,submitWhen:"enter-without-shift",onSubmit:x,onChange:k})),h().createElement("div",{className:"toolbar"},n&&a?h().createElement(h().Fragment,null,r?h().createElement(dg,{icon:sg,disabled:!0}):h().createElement(dg,{icon:lg,tooltip:Um(Pm.TERMINATE_THE_TASK),onClick:s})):h().createElement("button",{className:"btn-send",disabled:n||!d,onClick:E},h().createElement(cg,{lib:"fa",icon:"arrow-up"})))))}Hm=Tg,({e:[jm,Fm,Gm,Ym,Km,Jm,$m,qm,Xm,Qm,Zm,eg,tg,ig,ng,ag,rg,og],c:[mg,Vm]}=(0,d.A)(Hm,[pg("ai-portal.chat-input",{styleTexts:[Bm.A],shadowOptions:{delegatesFocus:!0}})],[[hg(),1,"placeholder"],[hg({type:Boolean}),1,"autoFocus"],[hg({type:Boolean}),1,"submitDisabled"],[hg({type:Boolean}),1,"supportsTerminate"],[hg({type:Boolean}),1,"terminating"],[ug({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(Eg,e),(e,t)=>(0,l.A)(Eg,e,t)],[ug({type:"terminate"}),1,"terminate",e=>(0,c.A)(wg,e),(e,t)=>(0,l.A)(wg,e,t)]],0,(e=>yg.has((0,o.A)(e))),m.ReactNextElement)),Vm();const Sg=i.p+"images/e47076cc.png";var _g,Ng=i(31653);let Rg;const{defineElement:Mg}=(0,u.createDecorators)();let Ig;class Og extends m.ReactNextElement{render(){return h().createElement("img",{className:"logo",alt:"Elevo",src:Sg,width:95,height:28})}}_g=Og,[Ig,Rg]=(0,d.A)(_g,[Mg("ai-portal.elevo-logo",{styleTexts:[Ng.A]})],[],0,void 0,m.ReactNextElement).c,Rg();let Wg=function(e){return e.WATCH_REPLAY="WATCH_REPLAY",e}({});const Dg="bricks/ai-portal/show-case",Lg={en:{[Wg.WATCH_REPLAY]:"Watch replay"},zh:{[Wg.WATCH_REPLAY]:"查看回放"}},Pg=g.i18n.getFixedT(null,Dg);var zg,Ug=i(46122);let Hg,Bg,Vg,jg,Fg,Gg,Yg;(0,g.initializeI18n)(Dg,Lg);const Kg=["purple","green","pink"],Jg=(0,m.wrapBrick)("eo-icon"),$g=(0,m.wrapBrick)("eo-link"),{defineElement:qg,property:Xg}=(0,u.createDecorators)();let Qg;var Zg=new WeakMap,eb=new WeakMap,tb=new WeakMap;class ib extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Zg,Bg(this)),(0,r.A)(this,eb,(Vg(this),jg(this))),(0,r.A)(this,tb,(Fg(this),Gg(this))),Yg(this)}get caseTitle(){return(0,c.A)(Zg,this)}set caseTitle(e){(0,l.A)(Zg,this,e)}get summary(){return(0,c.A)(eb,this)}set summary(e){(0,l.A)(eb,this,e)}get url(){return(0,c.A)(tb,this)}set url(e){(0,l.A)(tb,this,e)}render(){return h().createElement(nb,{caseTitle:this.caseTitle,summary:this.summary,url:this.url})}}function nb(e){let{caseTitle:t,summary:i,url:n}=e;return h().createElement($g,{className:`link ${Kg[Math.floor(Math.random()*Kg.length)]}`,url:n},h().createElement("span",{className:"title"},t),h().createElement("span",{className:"description"},i),h().createElement("span",{className:"mask"}),h().createElement("span",{className:"button"},h().createElement(Jg,{lib:"easyops",icon:"replay"}),Pg(Wg.WATCH_REPLAY)))}zg=ib,({e:[Bg,Vg,jg,Fg,Gg,Yg],c:[Qg,Hg]}=(0,d.A)(zg,[qg("ai-portal.show-case",{styleTexts:[Ug.A]})],[[Xg(),1,"caseTitle"],[Xg(),1,"summary"],[Xg(),1,"url"]],0,void 0,m.ReactNextElement)),Hg(),customElements.define("ai-portal.call-tool",(0,Fl.createProviderClass)((async function(e,t){return(await bn.http.post(`api/gateway/logic.llm.aiops_service/api/v1/elevo/conversation/${e.conversationId}/step/${e.stepId}/view`,{params:t})).data})))},62522:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,"ai-portal\\.preview-container{display:block;background:rgba(247,248,250,1)}.loading--uD2jY9vX{position:absolute;top:50%;left:50%;font-size:48px;color:var(--palette-gray-5);margin:0 -24px}",""]),o.locals={loading:"loading--uD2jY9vX"};const s=o},79286:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.link{display:block}.link::part(link){display:flex;align-items:center;gap:16px;padding:12px 24px;color:#262626;background:rgba(255,255,255,0.6);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.link.actions-active::part(link),\n.link::part(link):hover{background:rgba(0,0,0,0.05);-webkit-backdrop-filter:none;backdrop-filter:none}.item:not(:last-child){margin-bottom:4px}.icon{font-size:18px;margin-right:8px}.title{font-weight:500;font-size:16px}.title,\n.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.goal{background:#f0fff8;border-radius:4px;font-weight:500;font-size:12px;color:#1dc897;line-height:20px;padding:2px 8px;white-space:nowrap}.goal.global{background:#e6f4ff;color:#1a7aff}.header{display:flex;align-items:center}.description{color:#595959;margin-top:6px;padding-left:28px;line-height:20px}.time{color:rgba(0,0,0,0.45);white-space:nowrap}.main{flex:1;min-width:0}.operations{display:flex;align-items:center;justify-content:right;width:100px}.operations.lang-zh{width:64px}.link.actions-active .time,\n.link:hover .time,\n.link:not(:hover):not(.actions-active) .actions{display:none}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const s=o.toString()},82165:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(32360),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block;padding:24px 54px 72px}:host([hidden]){display:none}:host::before{content:"";position:fixed;z-index:-1;top:0;right:0;bottom:0;left:0;background-color:#f1f1f1;background-image:url(${p});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}@media (max-width: 719px){:host{padding-left:24px;padding-right:24px}}`,""]);const h=d.toString()},83059:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(25676),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1{font-weight:500;margin:0;font-size:20px;line-height:28px;margin-bottom:17px}.list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.link{display:block;height:100%}.link::part(link){display:block;height:100%;color:#262626;background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px;box-sizing:border-box}.link:not(.clickable)::part(link){cursor:auto}.clickable::part(link):hover{box-shadow:0px 4px 10px 0px rgba(0,0,0,0.1)}.heading{display:flex;align-items:center}.icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#ffffff;border-radius:12px;border:1px solid #e8e9ec;font-size:32px;color:#595959;margin-right:16px}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clickable::part(link):hover .title{color:var(--elevo-color-brand)}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.tags{display:flex;gap:6px;margin:16px 0 -3px}.tag{display:block;background:rgba(0,0,0,0.04);border-radius:4px;font-size:12px;line-height:22px;padding:0 7px}`,""]);const h=d.toString()},84479:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r)()(a());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container{background-color:#fff;border:2px solid #7891ff;border-radius:12px;box-shadow:0px 9px 28px 8px rgba(0,0,0,0.05),0px 6px 16px 0px rgba(0,0,0,0.08),0px 3px 6px -4px rgba(0,0,0,0.12);cursor:text}.container:not(:has(textarea:focus)){background-color:rgba(255,255,255,0.5);border-color:#99c4ff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.box{display:flex;flex-wrap:wrap;border-radius:10px;padding:8px}.input{min-width:0;flex:1}.wrap .input{flex-basis:100%}.input textarea{display:block;width:100%;padding:8px;font:inherit;font-size:16px;line-height:24px;color:var(--antd-input-color);border:none;background:none;height:24px;color:#262626}.input textarea::placeholder{color:#bfbfbf}.toolbar{padding:5px 0 5px 8px;margin-left:auto;display:flex;align-items:center;gap:2px}.btn-send:focus,\ntextarea:focus{outline:none}.btn-send{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff}.btn-send:disabled{background:rgba(0,0,0,0.15)}.btn-send:not(:disabled){cursor:pointer}.btn-send:not(:disabled):hover{background:#5166ff}.btn-send:not(:disabled):active{background:#1e33cc}",""]);const s=o.toString()},88786:(e,t,i)=>{e.exports=i.p+"images/e15a6988.png"},98036:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),o=i.n(r),s=i(20062),l=i.n(s),c=new URL(i(25676),i.b),d=o()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto;margin-bottom:17px}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px;margin-bottom:17px}h2{font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.link{display:block;height:100%}.link::part(link){display:block;height:100%;color:#262626;background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px;box-sizing:border-box}.link:not(.clickable)::part(link){cursor:auto}.clickable::part(link):hover{box-shadow:0px 4px 10px 0px rgba(0,0,0,0.1)}.heading{display:flex;align-items:center}.avatar{width:48px;height:48px;border-radius:12px;margin-right:16px;background-color:#d5d6e6;display:flex;align-items:center;justify-content:center;font-size:24px}.avatar img{width:100%;height:100%}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clickable::part(link):hover .title{color:var(--elevo-color-brand)}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const h=d.toString()}}]);
|
|
3
|
+
//# sourceMappingURL=7431.6b6bb81a.js.map
|