@next-bricks/ai-portal 0.13.0 → 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.
- package/dist/bricks.json +8 -8
- package/dist/chunks/1607.a450fbae.js +2 -0
- package/dist/chunks/1607.a450fbae.js.map +1 -0
- package/dist/chunks/903.a9b530b3.js +2 -0
- package/dist/chunks/903.a9b530b3.js.map +1 -0
- package/dist/chunks/cruise-canvas.7a0db65c.js +2 -0
- package/dist/chunks/cruise-canvas.7a0db65c.js.map +1 -0
- package/dist/chunks/{main.87dcd443.js → main.7b1c203a.js} +2 -2
- package/dist/chunks/{main.87dcd443.js.map → main.7b1c203a.js.map} +1 -1
- package/dist/examples.json +7 -7
- package/dist/{index.211ae9e7.js → index.9a81eba9.js} +2 -2
- package/dist/{index.211ae9e7.js.map → index.9a81eba9.js.map} +1 -1
- package/dist/manifest.json +66 -66
- package/dist/types.json +120 -93
- package/dist-types/cruise-canvas/interfaces.d.ts +3 -0
- package/package.json +2 -2
- package/dist/chunks/1607.dcc8d00e.js +0 -2
- package/dist/chunks/1607.dcc8d00e.js.map +0 -1
- package/dist/chunks/903.866a50ef.js +0 -2
- package/dist/chunks/903.866a50ef.js.map +0 -1
- package/dist/chunks/cruise-canvas.25c11f40.js +0 -2
- package/dist/chunks/cruise-canvas.25c11f40.js.map +0 -1
package/dist/manifest.json
CHANGED
|
@@ -4,51 +4,65 @@
|
|
|
4
4
|
"name": "ai-portal",
|
|
5
5
|
"bricks": [
|
|
6
6
|
{
|
|
7
|
-
"name": "ai-portal.
|
|
8
|
-
"properties": [],
|
|
9
|
-
"events": [],
|
|
10
|
-
"slots": [],
|
|
11
|
-
"methods": [],
|
|
12
|
-
"parts": [],
|
|
13
|
-
"description": "构件 `ai-portal.home-container`"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "ai-portal.chat-box",
|
|
7
|
+
"name": "ai-portal.stat-with-mini-chart",
|
|
17
8
|
"properties": [
|
|
18
9
|
{
|
|
19
|
-
"name": "
|
|
20
|
-
"type": "
|
|
10
|
+
"name": "label",
|
|
11
|
+
"type": "string"
|
|
21
12
|
},
|
|
22
13
|
{
|
|
23
|
-
"name": "
|
|
14
|
+
"name": "value",
|
|
24
15
|
"type": "string"
|
|
25
16
|
},
|
|
26
17
|
{
|
|
27
|
-
"name": "
|
|
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",
|
|
28
31
|
"type": "boolean"
|
|
29
32
|
},
|
|
30
33
|
{
|
|
31
|
-
"name": "
|
|
32
|
-
"
|
|
33
|
-
"type": "
|
|
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"
|
|
34
37
|
},
|
|
35
38
|
{
|
|
36
|
-
"name": "
|
|
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\"",
|
|
37
47
|
"type": "string"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"events": [
|
|
48
|
+
},
|
|
41
49
|
{
|
|
42
|
-
"name": "
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
"name": "yField",
|
|
51
|
+
"description": "",
|
|
52
|
+
"default": "\"1\"",
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "data",
|
|
57
|
+
"attribute": false,
|
|
58
|
+
"type": "Record<string, number>[]"
|
|
46
59
|
}
|
|
47
60
|
],
|
|
61
|
+
"events": [],
|
|
48
62
|
"slots": [],
|
|
49
63
|
"methods": [],
|
|
50
64
|
"parts": [],
|
|
51
|
-
"description": "构件 `ai-portal.
|
|
65
|
+
"description": "构件 `ai-portal.stat-with-mini-chart`"
|
|
52
66
|
},
|
|
53
67
|
{
|
|
54
68
|
"name": "ai-portal.cruise-canvas",
|
|
@@ -108,6 +122,15 @@
|
|
|
108
122
|
"parts": [],
|
|
109
123
|
"description": "构件 `ai-portal.cruise-canvas`"
|
|
110
124
|
},
|
|
125
|
+
{
|
|
126
|
+
"name": "ai-portal.home-container",
|
|
127
|
+
"properties": [],
|
|
128
|
+
"events": [],
|
|
129
|
+
"slots": [],
|
|
130
|
+
"methods": [],
|
|
131
|
+
"parts": [],
|
|
132
|
+
"description": "构件 `ai-portal.home-container`"
|
|
133
|
+
},
|
|
111
134
|
{
|
|
112
135
|
"name": "ai-portal.chat-history",
|
|
113
136
|
"properties": [
|
|
@@ -146,65 +169,42 @@
|
|
|
146
169
|
"description": "构件 `ai-portal.chat-history`"
|
|
147
170
|
},
|
|
148
171
|
{
|
|
149
|
-
"name": "ai-portal.
|
|
172
|
+
"name": "ai-portal.chat-box",
|
|
150
173
|
"properties": [
|
|
151
174
|
{
|
|
152
|
-
"name": "
|
|
153
|
-
"type": "
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"name": "value",
|
|
157
|
-
"type": "string"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"name": "size",
|
|
161
|
-
"description": "",
|
|
162
|
-
"default": "\"medium\"",
|
|
163
|
-
"type": "\"medium\" | \"small\""
|
|
175
|
+
"name": "disabled",
|
|
176
|
+
"type": "boolean"
|
|
164
177
|
},
|
|
165
178
|
{
|
|
166
|
-
"name": "
|
|
167
|
-
"description": "",
|
|
168
|
-
"default": "\"var(--color-brand)\"",
|
|
179
|
+
"name": "placeholder",
|
|
169
180
|
"type": "string"
|
|
170
181
|
},
|
|
171
182
|
{
|
|
172
|
-
"name": "
|
|
183
|
+
"name": "autoFocus",
|
|
173
184
|
"type": "boolean"
|
|
174
185
|
},
|
|
175
186
|
{
|
|
176
|
-
"name": "
|
|
177
|
-
"
|
|
178
|
-
"type": "
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"name": "max",
|
|
182
|
-
"description": "Specify the maximum value of the y-axis.\nIf not specified, the maximum value will be calculated from the data.",
|
|
183
|
-
"type": "number"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
"name": "xField",
|
|
187
|
-
"description": "",
|
|
188
|
-
"default": "\"0\"",
|
|
189
|
-
"type": "string"
|
|
187
|
+
"name": "suggestions",
|
|
188
|
+
"attribute": false,
|
|
189
|
+
"type": "Suggestion[]"
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
|
-
"name": "
|
|
193
|
-
"description": "",
|
|
194
|
-
"default": "\"1\"",
|
|
192
|
+
"name": "suggestionsLabel",
|
|
195
193
|
"type": "string"
|
|
196
|
-
}
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"events": [
|
|
197
197
|
{
|
|
198
|
-
"name": "
|
|
199
|
-
"
|
|
200
|
-
|
|
198
|
+
"name": "message.submit",
|
|
199
|
+
"detail": {
|
|
200
|
+
"type": "string"
|
|
201
|
+
}
|
|
201
202
|
}
|
|
202
203
|
],
|
|
203
|
-
"events": [],
|
|
204
204
|
"slots": [],
|
|
205
205
|
"methods": [],
|
|
206
206
|
"parts": [],
|
|
207
|
-
"description": "构件 `ai-portal.
|
|
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.
|
|
112
|
-
"properties": [
|
|
113
|
-
|
|
114
|
-
|
|
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
|
{
|
|
@@ -964,6 +964,33 @@
|
|
|
964
964
|
},
|
|
965
965
|
"optional": true,
|
|
966
966
|
"computed": false
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"type": "propertySignature",
|
|
970
|
+
"key": {
|
|
971
|
+
"type": "identifier",
|
|
972
|
+
"name": "annotations"
|
|
973
|
+
},
|
|
974
|
+
"annotation": {
|
|
975
|
+
"type": "typeLiteral",
|
|
976
|
+
"members": [
|
|
977
|
+
{
|
|
978
|
+
"type": "propertySignature",
|
|
979
|
+
"key": {
|
|
980
|
+
"type": "identifier",
|
|
981
|
+
"name": "title"
|
|
982
|
+
},
|
|
983
|
+
"annotation": {
|
|
984
|
+
"type": "keyword",
|
|
985
|
+
"value": "string"
|
|
986
|
+
},
|
|
987
|
+
"optional": true,
|
|
988
|
+
"computed": false
|
|
989
|
+
}
|
|
990
|
+
]
|
|
991
|
+
},
|
|
992
|
+
"optional": true,
|
|
993
|
+
"computed": false
|
|
967
994
|
}
|
|
968
995
|
]
|
|
969
996
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/ai-portal",
|
|
3
|
-
"version": "0.13.
|
|
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": "
|
|
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 a=n(6758),s=n.n(a),i=n(935),r=n.n(i)()(s());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 a=n(6758),s=n.n(a),i=n(935),r=n.n(i)()(s());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 a=n(6758),s=n.n(a),i=n(935),r=n.n(i),o=n(62),l=n.n(o),c=new URL(n(2360),n.b),u=r()(s()),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 a=n(6758),s=n.n(a),i=n(935),r=n.n(i),o=n(62),l=n.n(o),c=new URL(n(1107),n.b),u=r()(s()),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 a,s=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),A=n.n(f),v=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,ae,se,ie,re,oe,le,ce,ue,de,he,me,pe,ge;(0,b.initializeI18n)(E.NS,E.I);const{defineElement:be,property:fe,event:Ae,method:ve}=(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,s.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,(ae(this),()=>{(0,o.A)(Re,this,te).emit()})),(0,i.A)(this,Ce,se(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:a,task:s,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:v,humanInputRef:E,resumedRef:W}=(0,S.S)(a),_=a?p:s,z=a?b:i,I=a?f:null==s?void 0:s.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)((()=>{v&&(0,g.handleHttpError)(v)}),[v]);const te=(0,d.useCallback)(((e,t)=>{var n;null===(n=E.current)||void 0===n||n.call(E,e,t)}),[E]),[ne,ae]=(0,d.useState)(null),se=(0,d.useCallback)(((e,t)=>{ae((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,Ae=(0,d.useMemo)((()=>new Set(oe.map((e=>e.source)))),[oe]),ve=(0,d.useMemo)((()=>{if(!ie)return null;const e=[];for(const t of re)Ae.has(t.id)||e.push(t);return e.length>0?Math.max(...e.map((e=>e.view.y+e.view.height))):null}),[re,Ae,ie]),xe=(0,d.useRef)(null);(0,d.useEffect)((()=>{xe.current=ve}),[ve]);const Ee=(0,d.useRef)(!1);(0,d.useEffect)((()=>{const e=m.current;if(!e||null===ve||Ee.current)return;const{offsetHeight:t}=e,n=he.current,a=ve*n.k+n.y,s=t-O.xX-a;s<0&&me.translateBy(ee((0,k.A)(e),s>-100?100:s<-500?300:200),0,s/n.k)}),[ve,he,me,ee]),(0,d.useEffect)((()=>{const e=xe.current,t=m.current;if(!t||null===e||Z.current)return;const{offsetHeight:n}=t,a=e*de.k+de.y,s=n-O.xX-a;Ee.current=s<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.useCallback)((e=>{let{nodeId:t,jobId:n,behavior:a,block:s}=e;const i=m.current,r=re.filter((e=>{var a;return!(t&&e.id!==t||n&&(null===(a=e.job)||void 0===a?void 0:a.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,s);(l||c)&&me.translateBy(ee((0,k.A)(i),"instant"===a?0:void 0),l,c)}),[re,ee,he,me]),Me=(0,d.useCallback)(((e,t)=>{const n=m.current;if(!n||!ie)return;let a,s=0,i=0,r=300;const o="left"===e||"right"===e;if("line"===t)a=40*("up"===e||"left"===e?1:-1),r=150;else if("page"===t)a=(n.offsetHeight-O.xX)*("up"===e?-1:1);else{const{y:t,height:s}=(0,x.o)(re.map((e=>e.view)));if("down"===e){const e=t+s-t+O.xX;a=n.offsetHeight-e-he.current.y}else a=t+O.RV-he.current.y}o?s=a:i=a,(s||i)&&me.translateBy(ee((0,k.A)(n),r),s,i)}),[re,ee,ie,he,me]),[Se,Re]=(0,d.useState)(null),[Te,Ce]=(0,d.useState)(null),We=(0,d.useMemo)((()=>({humanInput:te,onShare:o,onPause:l,onResume:c,onCancel:u,onNodeResize:se,activeToolCallJobId:Se,setActiveToolCallJobId:Re,setActiveNodeId:G,hoverOnScrollableContent:le,setHoverOnScrollableContent:ce,activeExpandedViewJobId:Te,setActiveExpandedViewJobId:Ce})),[Se,le,Te,se,te,o,l,c,u]),_e=(0,d.useMemo)((()=>Se?null==z?void 0:z.find((e=>e.id===Se)):null),[Se,z]),ze=(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||_e||Te)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:a,node:s}=n;if("scroll"===a)Me(n.direction,n.range);else if("enter"===a){var i,r;if("job"!==s.type&&"view"!==s.type)return;const e="ask_human"===(null===(i=s.job.toolCall)||void 0===i?void 0:i.name),t="ask_human_confirming_plan"===(null===(r=s.job.toolCall)||void 0===r?void 0:r.name);if(e||t)return}t.preventDefault(),t.stopPropagation(),"enter"===a?"view"===s.type?Ce(s.job.id):Re(s.job.id):"switch-active-node"===a&&(G(s.id),"job"===s.type||"view"===s.type?Ne({jobId:s.job.id,behavior:"smooth"}):Ne({nodeId:s.id,behavior:"smooth"}))};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[X,_e,Te,re,Ne,Me]),h().createElement(L.Q.Provider,{value:We},h().createElement("div",{className:A()(w.A.root,{[w.A.loading]:!_}),ref:m,style:{cursor:ue?"grabbing":"grab"},tabIndex:-1,onClick:ze},!_&&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:A()(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:a}=e;return`${0===t?"M":"L"}${n},${a}`})).join(" ")})))),re.map((e=>{var t,n,a;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&&!Ae.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===(a=e.view)||void 0===a?void 0:a.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:A()(w.A["nav-item"],{[w.A.active]:Q===e.id})},h().createElement("a",{className:w.A["nav-link"],onClick:()=>{G(`job:${e.id}`),Ne({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})),_e&&h().createElement(F.M,{job:_e}),Te&&h().createElement(U.f,{views:$}))}function Le(e){let{id:t,type:n,state:a,job:s,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 v.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:A()(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:s.instruction,loading:l}):"view"===n?h().createElement(j.Y,{job:s,active:m}):h().createElement(I.W,{state:a,job:s,active:m}))}a=Oe,({e:[$,K,q,X,G,Q,J,Z,ee,te,ne,ae,se,ie,re,oe,le,ce,ue,de,he,me,pe,ge,H],c:[Ee,V]}=(0,u.A)(a,[be("ai-portal.cruise-canvas",{shadowOptions:!1})],[[fe(),1,"taskId"],[fe({attribute:!1}),1,"task"],[fe({attribute:!1}),1,"jobs"],[fe(),1,"goBackUrl"],[Ae({type:"share"}),1,"shareEvent",e=>(0,c.A)(Se,e),(e,t)=>(0,l.A)(Se,e,t)],[Ae({type:"pause"}),1,"pauseEvent",e=>(0,c.A)(Ce,e),(e,t)=>(0,l.A)(Ce,e,t)],[Ae({type:"resume"}),1,"resumeEvent",e=>(0,c.A)(_e,e),(e,t)=>(0,l.A)(_e,e,t)],[Ae({type:"cancel"}),1,"cancelEvent",e=>(0,c.A)(Ie,e),(e,t)=>(0,l.A)(Ie,e,t)],[ve(),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,at,st,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,At=new WeakMap,vt=new WeakMap,kt=new WeakMap,xt=new WeakSet,Et=new WeakMap;class wt extends p.ReactNextElement{constructor(){super(...arguments),(0,s.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,At,(tt(this),nt(this))),(0,i.A)(this,vt,(at(this),st(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)(At,this)}set suggestions(e){(0,l.A)(At,this,e)}get suggestionsLabel(){return(0,c.A)(vt,this)}set suggestionsLabel(e){(0,l.A)(vt,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:a,suggestions:s,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)((()=>{a&&Promise.resolve().then((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);const f=(0,d.useMemo)((()=>null!=s&&s.length?(0,Be.chunk)(s,Math.max(2,Math.ceil(s.length/2))):[]),[s]),A=(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:A})))))}function Nt(e){let{suggestions:t,pixelPerSecond:n,onSelect:a}=e;const s=(0,d.useRef)(null),i=(0,d.useRef)(null),[r,o]=(0,d.useState)(0);return(0,d.useEffect)((()=>{const e=s.current,t=i.current;if(!e||!t)return;let a,r,l,c,u=0;const d=(t.offsetWidth-7)/2+7;function h(e){r=e,void 0===l&&(l=e),void 0!==a&&(u+=e-a,a=void 0),o((e-l-u)/1e3*n%d),c=requestAnimationFrame(h)}c=requestAnimationFrame(h);const m=()=>{cancelAnimationFrame(c),a=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:s},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:()=>a(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,at,st,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"),an=(0,p.wrapBrick)("eo-link"),sn=(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 An extends p.ReactNextElement{constructor(){super(...arguments),(0,s.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(vn,{root:this,list:this.list,actions:this.actions,nextToken:this.nextToken,onActionClick:(0,c.A)(gn,this),onLoadMore:(0,c.A)(fn,this)})}}function vn(e){let{root:t,list:n,actions:a,nextToken:s,onActionClick:i,onLoadMore:r}=e;const o=(0,d.useMemo)((()=>{const e=new Map,t=It()(),a=t.startOf("day"),s=a.clone().subtract(1,"day"),i=a.clone().subtract(7,"days"),r=a.clone().subtract(30,"days"),o=+a/1e3,l=+s/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 a=e.get(n);a||e.set(n,a={title:n,items:[]}),a.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||!s)return;const n=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&r(s)}),{root:t});return n.observe(e),()=>{n.disconnect()}}),[s,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(an,{className:A()("item",{active:l===e.id}),url:e.url},h().createElement("div",{className:"item-title"},e.title),h().createElement(sn,{className:"actions",actions:a,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"})))))))))),s&&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=An,({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,ea=new WeakMap,ta=new WeakMap,na=new WeakMap,aa=new WeakMap;class sa 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,ea,(Yn(this),jn(this))),(0,i.A)(this,ta,(On(this),Dn(this))),(0,i.A)(this,na,(Ln(this),Fn(this))),(0,i.A)(this,aa,(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)(ea,this)}set max(e){(0,l.A)(ea,this,e)}get xField(){return(0,c.A)(ta,this)}set xField(e){(0,l.A)(ta,this,e)}get yField(){return(0,c.A)(na,this)}set yField(e){(0,l.A)(na,this,e)}get data(){return(0,c.A)(aa,this)}set data(e){(0,l.A)(aa,this,e)}render(){return h().createElement(ia,{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 ia(e){let{label:t,value:n,size:a,...s}=e;return"small"===a?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)({},s,{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)({},s,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},n)))}kn=sa,({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.dcc8d00e.js.map
|