@next-bricks/ai-portal 0.13.1 → 0.13.2

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.
@@ -4,13 +4,65 @@
4
4
  "name": "ai-portal",
5
5
  "bricks": [
6
6
  {
7
- "name": "ai-portal.home-container",
8
- "properties": [],
7
+ "name": "ai-portal.stat-with-mini-chart",
8
+ "properties": [
9
+ {
10
+ "name": "label",
11
+ "type": "string"
12
+ },
13
+ {
14
+ "name": "value",
15
+ "type": "string"
16
+ },
17
+ {
18
+ "name": "size",
19
+ "description": "",
20
+ "default": "\"medium\"",
21
+ "type": "\"medium\" | \"small\""
22
+ },
23
+ {
24
+ "name": "lineColor",
25
+ "description": "",
26
+ "default": "\"var(--color-brand)\"",
27
+ "type": "string"
28
+ },
29
+ {
30
+ "name": "showArea",
31
+ "type": "boolean"
32
+ },
33
+ {
34
+ "name": "min",
35
+ "description": "Specify the minimum value of the y-axis.\nIf not specified, the minimum value will be calculated from the data.",
36
+ "type": "number"
37
+ },
38
+ {
39
+ "name": "max",
40
+ "description": "Specify the maximum value of the y-axis.\nIf not specified, the maximum value will be calculated from the data.",
41
+ "type": "number"
42
+ },
43
+ {
44
+ "name": "xField",
45
+ "description": "",
46
+ "default": "\"0\"",
47
+ "type": "string"
48
+ },
49
+ {
50
+ "name": "yField",
51
+ "description": "",
52
+ "default": "\"1\"",
53
+ "type": "string"
54
+ },
55
+ {
56
+ "name": "data",
57
+ "attribute": false,
58
+ "type": "Record<string, number>[]"
59
+ }
60
+ ],
9
61
  "events": [],
10
62
  "slots": [],
11
63
  "methods": [],
12
64
  "parts": [],
13
- "description": "构件 `ai-portal.home-container`"
65
+ "description": "构件 `ai-portal.stat-with-mini-chart`"
14
66
  },
15
67
  {
16
68
  "name": "ai-portal.cruise-canvas",
@@ -71,140 +123,88 @@
71
123
  "description": "构件 `ai-portal.cruise-canvas`"
72
124
  },
73
125
  {
74
- "name": "ai-portal.chat-box",
126
+ "name": "ai-portal.home-container",
127
+ "properties": [],
128
+ "events": [],
129
+ "slots": [],
130
+ "methods": [],
131
+ "parts": [],
132
+ "description": "构件 `ai-portal.home-container`"
133
+ },
134
+ {
135
+ "name": "ai-portal.chat-history",
75
136
  "properties": [
76
137
  {
77
- "name": "disabled",
78
- "type": "boolean"
79
- },
80
- {
81
- "name": "placeholder",
82
- "type": "string"
83
- },
84
- {
85
- "name": "autoFocus",
86
- "type": "boolean"
138
+ "name": "list",
139
+ "attribute": false,
140
+ "type": "HistoryItem[]"
87
141
  },
88
142
  {
89
- "name": "suggestions",
143
+ "name": "actions",
90
144
  "attribute": false,
91
- "type": "Suggestion[]"
145
+ "type": "ActionType[]"
92
146
  },
93
147
  {
94
- "name": "suggestionsLabel",
148
+ "name": "nextToken",
95
149
  "type": "string"
96
150
  }
97
151
  ],
98
152
  "events": [
99
153
  {
100
- "name": "message.submit",
154
+ "name": "action.click",
101
155
  "detail": {
102
- "type": "string"
156
+ "type": "ActionClickDetail"
157
+ }
158
+ },
159
+ {
160
+ "name": "load.more",
161
+ "detail": {
162
+ "type": "{ nextToken: string }"
103
163
  }
104
164
  }
105
165
  ],
106
166
  "slots": [],
107
167
  "methods": [],
108
168
  "parts": [],
109
- "description": "构件 `ai-portal.chat-box`"
169
+ "description": "构件 `ai-portal.chat-history`"
110
170
  },
111
171
  {
112
- "name": "ai-portal.stat-with-mini-chart",
172
+ "name": "ai-portal.chat-box",
113
173
  "properties": [
114
174
  {
115
- "name": "label",
116
- "type": "string"
117
- },
118
- {
119
- "name": "value",
120
- "type": "string"
121
- },
122
- {
123
- "name": "size",
124
- "description": "",
125
- "default": "\"medium\"",
126
- "type": "\"medium\" | \"small\""
127
- },
128
- {
129
- "name": "lineColor",
130
- "description": "",
131
- "default": "\"var(--color-brand)\"",
132
- "type": "string"
133
- },
134
- {
135
- "name": "showArea",
175
+ "name": "disabled",
136
176
  "type": "boolean"
137
177
  },
138
178
  {
139
- "name": "min",
140
- "description": "Specify the minimum value of the y-axis.\nIf not specified, the minimum value will be calculated from the data.",
141
- "type": "number"
142
- },
143
- {
144
- "name": "max",
145
- "description": "Specify the maximum value of the y-axis.\nIf not specified, the maximum value will be calculated from the data.",
146
- "type": "number"
147
- },
148
- {
149
- "name": "xField",
150
- "description": "",
151
- "default": "\"0\"",
152
- "type": "string"
153
- },
154
- {
155
- "name": "yField",
156
- "description": "",
157
- "default": "\"1\"",
179
+ "name": "placeholder",
158
180
  "type": "string"
159
181
  },
160
182
  {
161
- "name": "data",
162
- "attribute": false,
163
- "type": "Record<string, number>[]"
164
- }
165
- ],
166
- "events": [],
167
- "slots": [],
168
- "methods": [],
169
- "parts": [],
170
- "description": "构件 `ai-portal.stat-with-mini-chart`"
171
- },
172
- {
173
- "name": "ai-portal.chat-history",
174
- "properties": [
175
- {
176
- "name": "list",
177
- "attribute": false,
178
- "type": "HistoryItem[]"
183
+ "name": "autoFocus",
184
+ "type": "boolean"
179
185
  },
180
186
  {
181
- "name": "actions",
187
+ "name": "suggestions",
182
188
  "attribute": false,
183
- "type": "ActionType[]"
189
+ "type": "Suggestion[]"
184
190
  },
185
191
  {
186
- "name": "nextToken",
192
+ "name": "suggestionsLabel",
187
193
  "type": "string"
188
194
  }
189
195
  ],
190
196
  "events": [
191
197
  {
192
- "name": "action.click",
193
- "detail": {
194
- "type": "ActionClickDetail"
195
- }
196
- },
197
- {
198
- "name": "load.more",
198
+ "name": "message.submit",
199
199
  "detail": {
200
- "type": "{ nextToken: string }"
200
+ "type": "string"
201
201
  }
202
202
  }
203
203
  ],
204
204
  "slots": [],
205
205
  "methods": [],
206
206
  "parts": [],
207
- "description": "构件 `ai-portal.chat-history`"
207
+ "description": "构件 `ai-portal.chat-box`"
208
208
  }
209
209
  ],
210
210
  "providers": []
package/dist/types.json CHANGED
@@ -1,9 +1,4 @@
1
1
  {
2
- "ai-portal.home-container": {
3
- "properties": [],
4
- "events": [],
5
- "methods": []
6
- },
7
2
  "ai-portal.stat-with-mini-chart": {
8
3
  "properties": [
9
4
  {
@@ -108,94 +103,10 @@
108
103
  "events": [],
109
104
  "methods": []
110
105
  },
111
- "ai-portal.chat-box": {
112
- "properties": [
113
- {
114
- "name": "disabled",
115
- "annotation": {
116
- "type": "keyword",
117
- "value": "boolean"
118
- }
119
- },
120
- {
121
- "name": "placeholder",
122
- "annotation": {
123
- "type": "keyword",
124
- "value": "string"
125
- }
126
- },
127
- {
128
- "name": "autoFocus",
129
- "annotation": {
130
- "type": "keyword",
131
- "value": "boolean"
132
- }
133
- },
134
- {
135
- "name": "suggestions",
136
- "annotation": {
137
- "type": "array",
138
- "elementType": {
139
- "type": "reference",
140
- "typeName": {
141
- "type": "identifier",
142
- "name": "Suggestion"
143
- }
144
- }
145
- }
146
- },
147
- {
148
- "name": "suggestionsLabel",
149
- "annotation": {
150
- "type": "keyword",
151
- "value": "string"
152
- }
153
- }
154
- ],
155
- "events": [
156
- {
157
- "name": "message.submit",
158
- "detail": {
159
- "annotation": {
160
- "type": "keyword",
161
- "value": "string"
162
- }
163
- }
164
- }
165
- ],
166
- "methods": [],
167
- "types": [
168
- {
169
- "type": "interface",
170
- "name": "Suggestion",
171
- "body": [
172
- {
173
- "type": "propertySignature",
174
- "key": {
175
- "type": "identifier",
176
- "name": "title"
177
- },
178
- "annotation": {
179
- "type": "keyword",
180
- "value": "string"
181
- },
182
- "computed": false
183
- },
184
- {
185
- "type": "propertySignature",
186
- "key": {
187
- "type": "identifier",
188
- "name": "content"
189
- },
190
- "annotation": {
191
- "type": "keyword",
192
- "value": "string"
193
- },
194
- "computed": false
195
- }
196
- ]
197
- }
198
- ]
106
+ "ai-portal.home-container": {
107
+ "properties": [],
108
+ "events": [],
109
+ "methods": []
199
110
  },
200
111
  "ai-portal.chat-history": {
201
112
  "properties": [
@@ -379,6 +290,95 @@
379
290
  }
380
291
  ]
381
292
  },
293
+ "ai-portal.chat-box": {
294
+ "properties": [
295
+ {
296
+ "name": "disabled",
297
+ "annotation": {
298
+ "type": "keyword",
299
+ "value": "boolean"
300
+ }
301
+ },
302
+ {
303
+ "name": "placeholder",
304
+ "annotation": {
305
+ "type": "keyword",
306
+ "value": "string"
307
+ }
308
+ },
309
+ {
310
+ "name": "autoFocus",
311
+ "annotation": {
312
+ "type": "keyword",
313
+ "value": "boolean"
314
+ }
315
+ },
316
+ {
317
+ "name": "suggestions",
318
+ "annotation": {
319
+ "type": "array",
320
+ "elementType": {
321
+ "type": "reference",
322
+ "typeName": {
323
+ "type": "identifier",
324
+ "name": "Suggestion"
325
+ }
326
+ }
327
+ }
328
+ },
329
+ {
330
+ "name": "suggestionsLabel",
331
+ "annotation": {
332
+ "type": "keyword",
333
+ "value": "string"
334
+ }
335
+ }
336
+ ],
337
+ "events": [
338
+ {
339
+ "name": "message.submit",
340
+ "detail": {
341
+ "annotation": {
342
+ "type": "keyword",
343
+ "value": "string"
344
+ }
345
+ }
346
+ }
347
+ ],
348
+ "methods": [],
349
+ "types": [
350
+ {
351
+ "type": "interface",
352
+ "name": "Suggestion",
353
+ "body": [
354
+ {
355
+ "type": "propertySignature",
356
+ "key": {
357
+ "type": "identifier",
358
+ "name": "title"
359
+ },
360
+ "annotation": {
361
+ "type": "keyword",
362
+ "value": "string"
363
+ },
364
+ "computed": false
365
+ },
366
+ {
367
+ "type": "propertySignature",
368
+ "key": {
369
+ "type": "identifier",
370
+ "name": "content"
371
+ },
372
+ "annotation": {
373
+ "type": "keyword",
374
+ "value": "string"
375
+ },
376
+ "computed": false
377
+ }
378
+ ]
379
+ }
380
+ ]
381
+ },
382
382
  "ai-portal.cruise-canvas": {
383
383
  "properties": [
384
384
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,5 +44,5 @@
44
44
  "@next-bricks/diagram": "*",
45
45
  "@next-bricks/mini-chart": "*"
46
46
  },
47
- "gitHead": "3fcb72427b232ca0d95a8b8c533a34dd73a0ef92"
47
+ "gitHead": "d80c873dd49822d5ff5ddd88e0f36d035059a421"
48
48
  }
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[1607],{24:(e,t,n)=>{n.d(t,{A:()=>o});var s=n(6758),a=n.n(s),i=n(935),r=n.n(i)()(a());r.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 o=r.toString()},1107:(e,t,n)=>{e.exports=n.p+"images/eef4f2bd.png"},1411:(e,t,n)=>{n.d(t,{A:()=>o});var s=n(6758),a=n.n(s),i=n(935),r=n.n(i)()(a());r.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.loading{display:flex;justify-content:center;padding:8px}.group + .group{margin-top:15px}.group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.item{display:block}.item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.item::part(link):hover{background:rgba(0,0,0,0.04)}.item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.actions{cursor:auto}.item:not(:hover):not(.active) .actions{display:none}.working{width:8px;height:8px;border-radius:8px;background:#2540ff;margin:0 7px}.item:hover .working,\n.item.active .working{display:none}.load-more{display:flex;justify-content:center;align-items:center;height:36px}",""]);const o=r.toString()},2165:(e,t,n)=>{n.d(t,{A:()=>h});var s=n(6758),a=n.n(s),i=n(935),r=n.n(i),o=n(62),l=n.n(o),c=new URL(n(2360),n.b),u=r()(a()),d=l()(c);u.push([e.id,`:host{display:block;background-color:#fff;background-image:url(${d});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}:host([hidden]){display:none}`,""]);const h=u.toString()},2360:(e,t,n)=>{e.exports=n.p+"images/6336f999.png"},7008:(e,t,n)=>{n.d(t,{A:()=>h});var s=n(6758),a=n.n(s),i=n(935),r=n.n(i),o=n(62),l=n.n(o),c=new URL(n(1107),n.b),u=r()(a()),d=l()(c);u.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.root{color:#262626;background-color:#e1e3ec;background-image:url(${d});background-size:694px 144px;background-position:top left;background-repeat:no-repeat;box-shadow:inset 0px 2px 5px 1px rgba(42,46,59,0.1);border-radius:20px;padding:12px}.container{position:relative}textarea{display:block;width:100%;padding:10px 16px 52px;color:var(--antd-input-color);background:rgba(255,255,255,0.8);border-radius:14px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,0.5);font-size:14px;line-height:22px;height:130px}textarea::placeholder{color:rgba(0,0,0,0.4)}.btn-send:focus,\ntextarea:focus{outline:none}.btn-send{position:absolute;bottom:14px;right:14px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:#2540ff;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}.suggestions{margin-top:19px}.heading{display:flex;align-items:center;padding:0 5px;margin-bottom:8px}.icon{margin-right:5px}.carousel{overflow:hidden}.carousel + .carousel{margin-top:7px}.list{display:flex;width:max-content;list-style:none;margin:0;padding:0;font-size:12px}.item{background:rgba(255,255,255,0.4);border-radius:12px;border:1px solid #dcdee6;padding:12px;max-width:330px;cursor:pointer}.item:hover{background:rgba(255,255,255,0.5);border:1px solid rgba(37,64,255,0.3)}.list > li + li{margin-left:7px}.title{margin-bottom:4px}.content{color:rgba(0,0,0,0.45);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tooltip{display:block}`,""]);const h=u.toString()},8430:(e,t,n)=>{var s,a=n(4635),i=n(918),r=n(6902),o=n(5536),l=n(6121),c=n(829),u=n(2740),d=n(8769),h=n.n(d),m=n(7921),p=n(1280),g=n(3081),b=(n(5168),n(79)),f=n(3373),v=n.n(f),A=n(9126),k=n(7566),x=n(9445),E=n(2460),w=n(2464),y=n(8231),N=n(6494),M=n(7642),S=n(2773),R=n(9533),T=n(3153),C=n(4999),W=n(7954),_=n(4388),z=n(6938),I=n(4609),Y=n(9295),j=n(9194),O=n(6854),D=n(5805),L=n(5620),F=n(3349),B=n(2601),P=n(7097),U=n(3490);let H,V,$,K,q,X,G,Q,J,Z,ee,te,ne,se,ae,ie,re,oe,le,ce,ue,de,he,me,pe,ge;(0,b.initializeI18n)(E.NS,E.I);const{defineElement:be,property:fe,event:ve,method:Ae}=(0,m.createDecorators)(),ke=(0,d.memo)(Le),xe=(0,d.forwardRef)(De);let Ee;var we=new WeakMap,ye=new WeakMap,Ne=new WeakMap,Me=new WeakMap,Se=new WeakMap,Re=new WeakSet,Te=new WeakMap,Ce=new WeakMap,We=new WeakMap,_e=new WeakMap,ze=new WeakMap,Ie=new WeakMap,Ye=new WeakMap,je=new WeakMap;class Oe extends p.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Re),(0,i.A)(this,we,(H(this),$(this))),(0,i.A)(this,ye,(K(this),q(this))),(0,i.A)(this,Ne,(X(this),G(this))),(0,i.A)(this,Me,(Q(this),J(this))),(0,i.A)(this,Se,(Z(this),ee(this))),(0,i.A)(this,Te,(se(this),()=>{(0,o.A)(Re,this,te).emit()})),(0,i.A)(this,Ce,ae(this)),(0,i.A)(this,We,(oe(this),()=>{(0,o.A)(Re,this,ie).emit()})),(0,i.A)(this,_e,le(this)),(0,i.A)(this,ze,(de(this),()=>{(0,o.A)(Re,this,ce).emit()})),(0,i.A)(this,Ie,he(this)),(0,i.A)(this,Ye,(ge(this),()=>{(0,o.A)(Re,this,me).emit()})),(0,i.A)(this,je,(0,d.createRef)())}get taskId(){return(0,c.A)(we,this)}set taskId(e){(0,l.A)(we,this,e)}get task(){return(0,c.A)(ye,this)}set task(e){(0,l.A)(ye,this,e)}get jobs(){return(0,c.A)(Ne,this)}set jobs(e){(0,l.A)(Ne,this,e)}get goBackUrl(){return(0,c.A)(Me,this)}set goBackUrl(e){(0,l.A)(Me,this,e)}resumed(){var e;null===(e=(0,c.A)(je,this).current)||void 0===e||e.resumed()}render(){return h().createElement(xe,{taskId:this.taskId,jobs:this.jobs,task:this.task,goBackUrl:this.goBackUrl,onShare:(0,c.A)(Te,this),onPause:(0,c.A)(We,this),onResume:(0,c.A)(ze,this),onCancel:(0,c.A)(Ye,this),ref:(0,c.A)(je,this)})}}function De(e,t){var n;let{taskId:s,task:a,jobs:i,goBackUrl:r,onShare:o,onPause:l,onResume:c,onCancel:u}=e;const m=(0,d.useRef)(null),{task:p,jobs:b,plan:f,error:A,humanInputRef:E,resumedRef:W}=(0,S.S)(s),_=s?p:a,z=s?b:i,I=s?f:null==a?void 0:a.plan,Y=(0,R.B)(_,z),j=null==Y?void 0:Y.nodes,H=null==Y?void 0:Y.edges,V=null==Y?void 0:Y.nav,$=null==Y?void 0:Y.views,K=null!==(n=null==_?void 0:_.title)&&void 0!==n?n:"",q=null==_?void 0:_.state,[X,G]=(0,d.useState)(null),Q=(0,d.useMemo)((()=>{if(X){const[e,t]=X.split(":");if("job"===e||"view"===e)return t}return null}),[X]);(0,d.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=W.current)||void 0===e?void 0:e.call(W)}})),[W]);const J=(0,d.useRef)(!1);(0,d.useEffect)((()=>{const e=setTimeout((()=>{J.current=!0}),3e3);return()=>{clearTimeout(e)}}),[]);const Z=(0,d.useRef)(!1),ee=(0,d.useCallback)(((e,t)=>J.current&&0!==t?(Z.current=!0,e.transition().duration(null!=t?t:300).ease((e=>e*(2-e))).on("end",(()=>{Z.current=!1}))):e),[]);(0,d.useEffect)((()=>{(0,g.getRuntime)().applyPageTitle(K)}),[K]),(0,d.useEffect)((()=>{A&&(0,g.handleHttpError)(A)}),[A]);const te=(0,d.useCallback)(((e,t)=>{var n;null===(n=E.current)||void 0===n||n.call(E,e,t)}),[E]),[ne,se]=(0,d.useState)(null),ae=(0,d.useCallback)(((e,t)=>{se((n=>{if(!t){if(!n)return null;const t=new Map(n);return t.delete(e)?t:n}return n?new Map(n).set(e,t):new Map([[e,t]])}))}),[]),{sizeReady:ie,nodes:re,edges:oe}=(0,M.g)({rawNodes:j,rawEdges:H,state:q,sizeMap:ne}),[le,ce]=(0,d.useState)(!1),{grabbing:ue,transform:de,transformRef:he,zoomer:me}=(0,y.f)({rootRef:m,zoomable:ie,scrollable:ie&&!le,pannable:ie}),{centered:pe,setCentered:ge,reCenterRef:be}=(0,N.E)({nodes:re,sizeReady:ie,zoomer:me,rootRef:m,selectTransition:ee}),fe=!O.QB.includes(null!=q?q:"working")&&2===re.length,ve=(0,d.useMemo)((()=>new Set(oe.map((e=>e.source)))),[oe]),Ae=(0,d.useMemo)((()=>{if(!ie)return null;const e=[];for(const t of re)ve.has(t.id)||e.push(t);return e.length>0?Math.max(...e.map((e=>e.view.y+e.view.height))):null}),[re,ve,ie]),xe=(0,d.useRef)(null);(0,d.useEffect)((()=>{xe.current=Ae}),[Ae]);const Ee=(0,d.useRef)(!1);(0,d.useEffect)((()=>{const e=m.current;if(!e||null===Ae||Ee.current)return;const{offsetHeight:t}=e,n=he.current,s=Ae*n.k+n.y,a=t-O.xX-s;a<0&&me.translateBy(ee((0,k.A)(e),a>-100?100:a<-500?300:200),0,a/n.k)}),[Ae,he,me,ee]),(0,d.useEffect)((()=>{const e=xe.current,t=m.current;if(!t||null===e||Z.current)return;const{offsetHeight:n}=t,s=e*de.k+de.y,a=n-O.xX-s;Ee.current=a<0}),[de,me]);const we=(0,d.useCallback)((()=>{be.current=!0,ge(!1)}),[be,ge]),ye=(0,d.useCallback)((e=>{me.scaleTo((0,k.A)(m.current),e)}),[me]),Ne=(0,d.useMemo)((()=>ie?(0,x.o)(re.map((e=>e.view))):null),[re,ie]);(0,d.useEffect)((()=>{if(!Ne)return;const e=m.current;if(!e)return;const{offsetWidth:t,offsetHeight:n}=e,s=t/de.k,a=n/de.k,i=-(s-20-Ne.x),r=s-20+(Ne.x+Ne.width),o=-(a-20-Ne.y),l=a-20+(Ne.y+Ne.height);me.translateExtent([[i,o],[r,l]])}),[me,de.k,Ne]);const Me=(0,d.useCallback)((e=>{let{nodeId:t,jobId:n,behavior:s,block:a}=e;const i=m.current,r=re.filter((e=>{var s;return!(t&&e.id!==t||n&&(null===(s=e.job)||void 0===s?void 0:s.id)!==n)}));if(!i||0===r.length)return;const o=(0,x.o)(r.map((e=>e.view))),{x:l,y:c}=(0,B.D)(o,[i.offsetWidth,i.offsetHeight],[O.RV,O.kq,O.xX,O.bL],he.current,a);(l||c)&&me.translateBy(ee((0,k.A)(i),"instant"===s?0:void 0),l,c)}),[re,ee,he,me]),Se=(0,d.useCallback)(((e,t)=>{const n=m.current;if(!n||!ie)return;let s,a=0,i=0,r=300;const o="left"===e||"right"===e;if("line"===t)s=40*("up"===e||"left"===e?1:-1),r=150;else if("page"===t)s=(n.offsetHeight-O.xX)*("up"===e?-1:1);else{const{y:t,height:a}=(0,x.o)(re.map((e=>e.view)));if("down"===e){const e=t+a-t+O.xX;s=n.offsetHeight-e-he.current.y}else s=t+O.RV-he.current.y}o?a=s:i=s,(a||i)&&me.translateBy(ee((0,k.A)(n),r),a,i)}),[re,ee,ie,he,me]),[Re,Te]=(0,d.useState)(null),[Ce,We]=(0,d.useState)(null),_e=(0,d.useMemo)((()=>({humanInput:te,onShare:o,onPause:l,onResume:c,onCancel:u,onNodeResize:ae,activeToolCallJobId:Re,setActiveToolCallJobId:Te,setActiveNodeId:G,hoverOnScrollableContent:le,setHoverOnScrollableContent:ce,activeExpandedViewJobId:Ce,setActiveExpandedViewJobId:We})),[Re,le,Ce,ae,te,o,l,c,u]),ze=(0,d.useMemo)((()=>Re?null==z?void 0:z.find((e=>e.id===Re)):null),[Re,z]),Ie=(0,d.useCallback)((e=>{for(const t of e.nativeEvent.composedPath()){if(t instanceof HTMLElement&&t.classList.contains(w.A.node))return;if(t===m.current)break}G(null)}),[]);return(0,d.useEffect)((()=>{const e=m.current;if(!e||ze||Ce)return;const t=t=>{if(document.activeElement&&document.activeElement!==document.body&&document.activeElement!==e)return;const n=(0,P.l)(t,{activeNodeId:X,nodes:re});if(!n)return;const{action:s,node:a}=n;if("scroll"===s)Se(n.direction,n.range);else if("enter"===s){var i,r;if("job"!==a.type&&"view"!==a.type)return;const e="ask_human"===(null===(i=a.job.toolCall)||void 0===i?void 0:i.name),t="ask_human_confirming_plan"===(null===(r=a.job.toolCall)||void 0===r?void 0:r.name);if(e||t)return}t.preventDefault(),t.stopPropagation(),"enter"===s?"view"===a.type?We(a.job.id):Te(a.job.id):"switch-active-node"===s&&(G(a.id),"job"===a.type||"view"===a.type?Me({jobId:a.job.id,behavior:"smooth"}):Me({nodeId:a.id,behavior:"smooth"}))};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[X,ze,Ce,re,Me,Se]),h().createElement(L.Q.Provider,{value:_e},h().createElement("div",{className:v()(w.A.root,{[w.A.loading]:!_}),ref:m,style:{cursor:ue?"grabbing":"grab"},tabIndex:-1,onClick:Ie},!_&&h().createElement("div",{className:w.A["loading-icon"]},h().createElement(D.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),h().createElement("div",{className:v()(w.A.canvas,{[w.A.ready]:ie&&pe}),style:{transform:`translate3d(${de.x}px, ${de.y}px, 0) scale(${de.k})`}},h().createElement("svg",{className:w.A.edges},oe.map((e=>h().createElement("path",{className:w.A.edge,key:`${e.source}-${e.target}`,d:e.points.map(((e,t)=>{let{x:n,y:s}=e;return`${0===t?"M":"L"}${n},${s}`})).join(" ")})))),re.map((e=>{var t,n,s;return h().createElement(ke,{key:e.id,id:e.id,type:e.type,content:e.content,job:e.job,state:e.state,startTime:null==_?void 0:_.startTime,taskLoading:fe,instructionLoading:"instruction"===e.type&&!ve.has(e.id)&&!O.QB.includes(null!==(t=e.state)&&void 0!==t?t:"working")&&!O.X4.includes(null!=q?q:"working"),edges:oe,x:null===(n=e.view)||void 0===n?void 0:n.x,y:null===(s=e.view)||void 0===s?void 0:s.y,active:X===e.id})})))),h().createElement("div",{className:w.A.widgets},r&&h().createElement(D.EM,{className:w.A["go-back"],url:r},h().createElement(D.Bj,{lib:"fa",prefix:"fas",icon:"arrow-left-long"})),h().createElement("div",{className:w.A["nav-container"]},h().createElement("ul",{className:w.A.nav},null==V?void 0:V.map((e=>h().createElement("li",{key:e.id,className:v()(w.A["nav-item"],{[w.A.active]:Q===e.id})},h().createElement("a",{className:w.A["nav-link"],onClick:()=>{G(`job:${e.id}`),Me({jobId:e.id,block:"start"})}},h().createElement("span",{className:w.A["nav-link-text"]},e.title))))))),h().createElement(T.r,{plan:I,state:q}),h().createElement(C.l,{scale:de.k,onScaleChange:ye,onReCenter:we})),ze&&h().createElement(F.M,{job:ze}),Ce&&h().createElement(U.f,{views:$}))}function Le(e){let{id:t,type:n,state:s,job:a,content:i,startTime:r,taskLoading:o,instructionLoading:l,x:c,y:u,active:m}=e;const p=(0,d.useRef)(null),{onNodeResize:g,setActiveNodeId:b}=(0,d.useContext)(L.Q);(0,d.useEffect)((()=>{const e=p.current;if(!e)return;const n=new A.A((()=>{g(t,[e.offsetWidth,e.offsetHeight])}));return n.observe(e),()=>{n.disconnect(),g(t,null)}}),[t,g]),(0,d.useEffect)((()=>{const e=p.current;if(!e)return;const t=e=>{e.stopPropagation()};return e.addEventListener("mousedown",t),()=>{e.removeEventListener("mousedown",t)}}),[]);const f=(0,d.useCallback)((()=>{"start"!==n&&"instruction"!==n&&b(t)}),[t,b,n]);return h().createElement("div",{className:v()(w.A.node,{[w.A.ready]:null!=c&&null!=u}),ref:p,style:{left:c,top:u},onClick:f},"start"===n?h().createElement(W.H,null):"end"===n?h().createElement(Y.s,{active:m}):"requirement"===n?h().createElement(_.O,{content:i,startTime:r,loading:o,active:m}):"instruction"===n?h().createElement(z.L,{content:a.instruction,loading:l}):"view"===n?h().createElement(j.Y,{job:a,active:m}):h().createElement(I.W,{state:s,job:a,active:m}))}s=Oe,({e:[$,K,q,X,G,Q,J,Z,ee,te,ne,se,ae,ie,re,oe,le,ce,ue,de,he,me,pe,ge,H],c:[Ee,V]}=(0,u.A)(s,[be("ai-portal.cruise-canvas",{shadowOptions:!1})],[[fe(),1,"taskId"],[fe({attribute:!1}),1,"task"],[fe({attribute:!1}),1,"jobs"],[fe(),1,"goBackUrl"],[ve({type:"share"}),1,"shareEvent",e=>(0,c.A)(Se,e),(e,t)=>(0,l.A)(Se,e,t)],[ve({type:"pause"}),1,"pauseEvent",e=>(0,c.A)(Ce,e),(e,t)=>(0,l.A)(Ce,e,t)],[ve({type:"resume"}),1,"resumeEvent",e=>(0,c.A)(_e,e),(e,t)=>(0,l.A)(_e,e,t)],[ve({type:"cancel"}),1,"cancelEvent",e=>(0,c.A)(Ie,e),(e,t)=>(0,l.A)(Ie,e,t)],[Ae(),2,"resumed"]],0,(e=>je.has((0,r.A)(e))),p.ReactNextElement)),V();var Fe=n(1451),Be=n(1030);let Pe=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const Ue="bricks/ai-portal/chat-box",He={en:{[Pe.ASK_ANY_THING]:"Ask anything",[Pe.COMMON_TASKS]:"Common tasks"},zh:{[Pe.ASK_ANY_THING]:"询问任何问题",[Pe.COMMON_TASKS]:"常用任务"}},Ve=b.i18n.getFixedT(null,Ue),$e=n.p+"images/af389fa6.svg";var Ke,qe=n(7008);let Xe,Ge,Qe,Je,Ze,et,tt,nt,st,at,it,rt,ot,lt,ct;(0,b.initializeI18n)(Ue,He);const ut=(0,p.wrapBrick)("eo-icon"),{defineElement:dt,property:ht,event:mt}=(0,m.createDecorators)();let pt;var gt=new WeakMap,bt=new WeakMap,ft=new WeakMap,vt=new WeakMap,At=new WeakMap,kt=new WeakMap,xt=new WeakSet,Et=new WeakMap;class wt extends p.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,xt),(0,i.A)(this,gt,Ge(this)),(0,i.A)(this,bt,(Qe(this),Je(this))),(0,i.A)(this,ft,(Ze(this),et(this))),(0,i.A)(this,vt,(tt(this),nt(this))),(0,i.A)(this,At,(st(this),at(this))),(0,i.A)(this,kt,(it(this),rt(this))),(0,i.A)(this,Et,(ct(this),e=>{(0,o.A)(xt,this,ot).emit(e)}))}get disabled(){return(0,c.A)(gt,this)}set disabled(e){(0,l.A)(gt,this,e)}get placeholder(){return(0,c.A)(bt,this)}set placeholder(e){(0,l.A)(bt,this,e)}get autoFocus(){return(0,c.A)(ft,this)}set autoFocus(e){(0,l.A)(ft,this,e)}get suggestions(){return(0,c.A)(vt,this)}set suggestions(e){(0,l.A)(vt,this,e)}get suggestionsLabel(){return(0,c.A)(At,this)}set suggestionsLabel(e){(0,l.A)(At,this,e)}render(){return h().createElement(yt,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,suggestions:this.suggestions,suggestionsLabel:this.suggestionsLabel,onSubmit:(0,c.A)(Et,this)})}}function yt(e){let{disabled:t,placeholder:n,autoFocus:s,suggestions:a,suggestionsLabel:i,onSubmit:r}=e;const o=(0,d.useRef)(null),l=(0,d.useRef)(null),[c,u]=(0,d.useState)(""),m=(0,d.useRef)(""),p=(0,d.useCallback)((e=>{e.currentTarget.value&&(null==r||r(e.currentTarget.value))}),[r]),g=(0,d.useCallback)((e=>{m.current=e.target.value,u(e.target.value)}),[]),b=(0,d.useCallback)((()=>{null==r||r(m.current)}),[r]);(0,d.useEffect)((()=>{s&&Promise.resolve().then((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);const f=(0,d.useMemo)((()=>null!=a&&a.length?(0,Be.chunk)(a,Math.max(2,Math.ceil(a.length/2))):[]),[a]),v=(0,d.useCallback)((e=>{m.current=e.content,u(e.content),setTimeout((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);return h().createElement("div",{className:"root"},h().createElement("div",{className:"container",ref:o},h().createElement(Fe.e,{containerRef:o,ref:l,value:c,minRows:3,paddingSize:62,autoResize:!0,disabled:t,placeholder:null!=n?n:Ve(Pe.ASK_ANY_THING),submitWhen:"enter-without-shift",onSubmit:p,onChange:g}),h().createElement("button",{className:"btn-send",disabled:!c,onClick:b},h().createElement(ut,{lib:"fa",prefix:"fas",icon:"arrow-up"}))),!(null==f||!f.length)&&h().createElement("div",{className:"suggestions"},h().createElement("div",{className:"heading"},h().createElement("img",{className:"icon",src:$e,width:16,height:16}),h().createElement("span",null,null!=i?i:Ve(Pe.COMMON_TASKS))),f.map(((e,t)=>h().createElement(Nt,{key:t,suggestions:e,pixelPerSecond:10*(t+2),onSelect:v})))))}function Nt(e){let{suggestions:t,pixelPerSecond:n,onSelect:s}=e;const a=(0,d.useRef)(null),i=(0,d.useRef)(null),[r,o]=(0,d.useState)(0);return(0,d.useEffect)((()=>{const e=a.current,t=i.current;if(!e||!t)return;let s,r,l,c,u=0;const d=(t.offsetWidth-7)/2+7;function h(e){r=e,void 0===l&&(l=e),void 0!==s&&(u+=e-s,s=void 0),o((e-l-u)/1e3*n%d),c=requestAnimationFrame(h)}c=requestAnimationFrame(h);const m=()=>{cancelAnimationFrame(c),s=r},p=()=>{c=requestAnimationFrame(h)};return e.addEventListener("mouseenter",m),e.addEventListener("mouseleave",p),()=>{cancelAnimationFrame(c),e.removeEventListener("mouseenter",m),e.removeEventListener("mouseleave",p)}}),[t,n]),h().createElement("div",{className:"carousel",ref:a},h().createElement("ul",{className:"list",ref:i,style:{transform:`translateX(${-r}px)`}},[...t,...t].map(((e,t)=>h().createElement("li",{key:t},h().createElement("div",{className:"item",onClick:()=>s(e),title:e.content},h().createElement("div",{className:"title"},e.title),h().createElement("div",{className:"content"},e.content)))))))}Ke=wt,({e:[Ge,Qe,Je,Ze,et,tt,nt,st,at,it,rt,ot,lt,ct],c:[pt,Xe]}=(0,u.A)(Ke,[dt("ai-portal.chat-box",{styleTexts:[qe.A]})],[[ht({type:Boolean}),1,"disabled"],[ht(),1,"placeholder"],[ht({type:Boolean}),1,"autoFocus"],[ht({attribute:!1}),1,"suggestions"],[ht(),1,"suggestionsLabel"],[mt({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(kt,e),(e,t)=>(0,l.A)(kt,e,t)]],0,(e=>Et.has((0,r.A)(e))),p.ReactNextElement)),Xe();var Mt,St=n(2165);let Rt;const{defineElement:Tt}=(0,m.createDecorators)();let Ct;class Wt extends p.ReactNextElement{render(){return h().createElement(_t,null)}}function _t(){return h().createElement("slot",null)}Mt=Wt,[Ct,Rt]=(0,u.A)(Mt,[Tt("ai-portal.home-container",{styleTexts:[St.A]})],[],0,void 0,p.ReactNextElement).c,Rt();var zt=n(1302),It=n.n(zt);let Yt=function(e){return e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e}({});const jt="bricks/ai-portal/chat-history",Ot={en:{[Yt.TODAY]:"Today",[Yt.YESTERDAY]:"Yesterday",[Yt.PREVIOUS_7_DAYS]:"Previous 7 days",[Yt.PREVIOUS_30_DAYS]:"Previous 30 days"},zh:{[Yt.TODAY]:"今天",[Yt.YESTERDAY]:"昨天",[Yt.PREVIOUS_7_DAYS]:"过去7天",[Yt.PREVIOUS_30_DAYS]:"过去30天"}},Dt=b.i18n.getFixedT(null,jt);var Lt,Ft=n(1411);let Bt,Pt,Ut,Ht,Vt,$t,Kt,qt,Xt,Gt,Qt,Jt,Zt,en,tn;(0,b.initializeI18n)(jt,Ot);const nn=(0,p.wrapBrick)("eo-icon"),sn=(0,p.wrapBrick)("eo-link"),an=(0,p.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:rn,property:on,event:ln}=(0,m.createDecorators)();let cn;var un=new WeakMap,dn=new WeakMap,hn=new WeakMap,mn=new WeakMap,pn=new WeakSet,gn=new WeakMap,bn=new WeakMap,fn=new WeakMap;class vn extends p.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,pn),(0,i.A)(this,un,Pt(this)),(0,i.A)(this,dn,(Ut(this),Ht(this))),(0,i.A)(this,hn,(Vt(this),$t(this))),(0,i.A)(this,mn,(Kt(this),qt(this))),(0,i.A)(this,gn,(Qt(this),e=>{(0,o.A)(pn,this,Xt).emit(e)})),(0,i.A)(this,bn,Jt(this)),(0,i.A)(this,fn,(tn(this),e=>{(0,o.A)(pn,this,Zt).emit({nextToken:e})}))}get list(){return(0,c.A)(un,this)}set list(e){(0,l.A)(un,this,e)}get actions(){return(0,c.A)(dn,this)}set actions(e){(0,l.A)(dn,this,e)}get nextToken(){return(0,c.A)(hn,this)}set nextToken(e){(0,l.A)(hn,this,e)}render(){return h().createElement(An,{root:this,list:this.list,actions:this.actions,nextToken:this.nextToken,onActionClick:(0,c.A)(gn,this),onLoadMore:(0,c.A)(fn,this)})}}function An(e){let{root:t,list:n,actions:s,nextToken:a,onActionClick:i,onLoadMore:r}=e;const o=(0,d.useMemo)((()=>{const e=new Map,t=It()(),s=t.startOf("day"),a=s.clone().subtract(1,"day"),i=s.clone().subtract(7,"days"),r=s.clone().subtract(30,"days"),o=+s/1e3,l=+a/1e3,c=+i/1e3,u=+r/1e3,d=t.year();for(const t of null!=n?n:[]){let n;n=t.startTime>=o?Dt(Yt.TODAY):t.startTime>=l?Dt(Yt.YESTERDAY):t.startTime>=c?Dt(Yt.PREVIOUS_7_DAYS):t.startTime>=u?Dt(Yt.PREVIOUS_30_DAYS):t.startTime>=d?It()(1e3*t.startTime).format("MMMM"):It()(1e3*t.startTime).format("YYYY");let s=e.get(n);s||e.set(n,s={title:n,items:[]}),s.items.push(t)}return[...e.values()]}),[n]),[l,c]=(0,d.useState)(null),u=(0,d.useRef)(null);return(0,d.useEffect)((()=>{const e=u.current;if(!e||!a)return;const n=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&r(a)}),{root:t});return n.observe(e),()=>{n.disconnect()}}),[a,r,t]),n?h().createElement(h().Fragment,null,h().createElement("ul",null,o.map((e=>h().createElement("li",{key:e.title,className:"group"},h().createElement("div",{className:"group-title"},e.title),h().createElement("ul",{className:"items"},e.items.map((e=>h().createElement("li",{key:e.id},h().createElement(sn,{className:v()("item",{active:l===e.id}),url:e.url},h().createElement("div",{className:"item-title"},e.title),h().createElement(an,{className:"actions",actions:s,onActionClick:t=>{i({action:t.detail,item:e})},onVisibleChange:t=>{c(t.detail?e.id:null)}}),!O.QB.includes(e.state)&&h().createElement("div",{className:"working"})))))))))),a&&h().createElement("div",{className:"load-more",ref:u},h().createElement(nn,{lib:"fa",icon:"spinner",spinning:!0}))):h().createElement("div",{className:"loading"},h().createElement(nn,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0}))}Lt=vn,({e:[Pt,Ut,Ht,Vt,$t,Kt,qt,Xt,Gt,Qt,Jt,Zt,en,tn],c:[cn,Bt]}=(0,u.A)(Lt,[rn("ai-portal.chat-history",{styleTexts:[Ft.A]})],[[on({attribute:!1}),1,"list"],[on({attribute:!1}),1,"actions"],[on(),1,"nextToken"],[ln({type:"action.click"}),1,"actionClick",e=>(0,c.A)(mn,e),(e,t)=>(0,l.A)(mn,e,t)],[ln({type:"load.more"}),1,"loadMore",e=>(0,c.A)(bn,e),(e,t)=>(0,l.A)(bn,e,t)]],0,(e=>fn.has((0,r.A)(e))),p.ReactNextElement)),Bt();var kn,xn=n(9575),En=n(24);let wn,yn,Nn,Mn,Sn,Rn,Tn,Cn,Wn,_n,zn,In,Yn,jn,On,Dn,Ln,Fn,Bn,Pn,Un;const Hn=(0,p.wrapBrick)("eo-mini-line-chart"),{defineElement:Vn,property:$n}=(0,m.createDecorators)();let Kn;var qn=new WeakMap,Xn=new WeakMap,Gn=new WeakMap,Qn=new WeakMap,Jn=new WeakMap,Zn=new WeakMap,es=new WeakMap,ts=new WeakMap,ns=new WeakMap,ss=new WeakMap;class as extends p.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,qn,yn(this)),(0,i.A)(this,Xn,(Nn(this),Mn(this))),(0,i.A)(this,Gn,(Sn(this),Rn(this))),(0,i.A)(this,Qn,(Tn(this),Cn(this))),(0,i.A)(this,Jn,(Wn(this),_n(this))),(0,i.A)(this,Zn,(zn(this),In(this))),(0,i.A)(this,es,(Yn(this),jn(this))),(0,i.A)(this,ts,(On(this),Dn(this))),(0,i.A)(this,ns,(Ln(this),Fn(this))),(0,i.A)(this,ss,(Bn(this),Pn(this))),Un(this)}get label(){return(0,c.A)(qn,this)}set label(e){(0,l.A)(qn,this,e)}get value(){return(0,c.A)(Xn,this)}set value(e){(0,l.A)(Xn,this,e)}get size(){return(0,c.A)(Gn,this)}set size(e){(0,l.A)(Gn,this,e)}get lineColor(){return(0,c.A)(Qn,this)}set lineColor(e){(0,l.A)(Qn,this,e)}get showArea(){return(0,c.A)(Jn,this)}set showArea(e){(0,l.A)(Jn,this,e)}get min(){return(0,c.A)(Zn,this)}set min(e){(0,l.A)(Zn,this,e)}get max(){return(0,c.A)(es,this)}set max(e){(0,l.A)(es,this,e)}get xField(){return(0,c.A)(ts,this)}set xField(e){(0,l.A)(ts,this,e)}get yField(){return(0,c.A)(ns,this)}set yField(e){(0,l.A)(ns,this,e)}get data(){return(0,c.A)(ss,this)}set data(e){(0,l.A)(ss,this,e)}render(){return h().createElement(is,{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 is(e){let{label:t,value:n,size:s,...a}=e;return"small"===s?h().createElement("div",{className:"container"},h().createElement("div",{className:"label-and-stat"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat"},n)),h().createElement("div",{className:"chart"},h().createElement(Hn,(0,xn.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(Hn,(0,xn.A)({},a,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},n)))}kn=as,({e:[yn,Nn,Mn,Sn,Rn,Tn,Cn,Wn,_n,zn,In,Yn,jn,On,Dn,Ln,Fn,Bn,Pn,Un],c:[Kn,wn]}=(0,u.A)(kn,[Vn("ai-portal.stat-with-mini-chart",{styleTexts:[En.A]})],[[$n(),1,"label"],[$n(),1,"value"],[$n(),1,"size"],[$n(),1,"lineColor"],[$n({type:Boolean}),1,"showArea"],[$n({type:Number}),1,"min"],[$n({type:Number}),1,"max"],[$n(),1,"xField"],[$n(),1,"yField"],[$n({attribute:!1}),1,"data"]],0,void 0,p.ReactNextElement)),wn()}}]);
2
- //# sourceMappingURL=1607.76609c8c.js.map