@bigduu/lotus-next 2026.10.15 → 2026.10.16
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/asset-manifest.json +99 -40
- package/dist/assets/{ErrorBoundary-D7uTZXLd.js → ErrorBoundary-BqQw20EJ.js} +1 -1
- package/dist/assets/ErrorBoundary-CGh8OTDZ.js +1 -0
- package/dist/assets/FileOperationsService-DKJqGHu1.js +2 -0
- package/dist/assets/JianduProjectMemories-Bm-SICM0.js +1 -0
- package/dist/assets/Root-Bx0LS_x-.js +175 -0
- package/dist/assets/Settings-h8raaTMo.js +9 -0
- package/dist/assets/{StreamdownMarkdown-BkoEOkOL.js → StreamdownMarkdown-99oqAZx3.js} +2 -2
- package/dist/assets/{StreamdownMermaid-B2zdR53a.js → StreamdownMermaid-CMHJPSBy.js} +1 -1
- package/dist/assets/dist-D5Xhsuot.js +1 -0
- package/dist/assets/dist-IBz-INPD.js +41 -0
- package/dist/assets/en-US-BN8lZJt3.js +5 -0
- package/dist/assets/{index-DkBATeCG.js → index-neDLlsA8.js} +2 -2
- package/dist/assets/jianduMemoryApi-BCqD_UC3.js +1 -0
- package/dist/assets/{renderPdf-DmSaqQFA.js → renderPdf-EH5PT21c.js} +1 -1
- package/dist/assets/select-Cx6_p5tF.js +12 -0
- package/dist/assets/tabs-B-j3xY-g.js +74 -0
- package/dist/assets/{ui-Bsa0MSjY.js → ui-DT66e1F2.js} +1 -1
- package/dist/assets/zh-CN-CCYNokjo.js +5 -0
- package/dist/bundle-ownership.json +117 -90
- package/dist/index.html +1 -1
- package/dist/lotus-next-manifest.json +69 -49
- package/package.json +1 -1
- package/dist/assets/ErrorBoundary-BSUP9QwO.js +0 -1
- package/dist/assets/FileOperationsService-C7t4AutT.js +0 -2
- package/dist/assets/Root-DEcSsqn3.js +0 -175
- package/dist/assets/Settings-BhmBM_DM.js +0 -8
- package/dist/assets/dist-n-7mDNJj.js +0 -41
- package/dist/assets/en-US-DTsd-R2T.js +0 -5
- package/dist/assets/tabs-CxbLDgiX.js +0 -85
- package/dist/assets/zh-CN-BqFw1RZ7.js +0 -5
package/dist/asset-manifest.json
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_ErrorBoundary-
|
|
3
|
-
"file": "assets/ErrorBoundary-
|
|
2
|
+
"_ErrorBoundary-BqQw20EJ.js": {
|
|
3
|
+
"file": "assets/ErrorBoundary-BqQw20EJ.js",
|
|
4
4
|
"name": "ErrorBoundary",
|
|
5
5
|
"imports": [
|
|
6
6
|
"_rolldown-runtime-QTnfLwEv.js",
|
|
7
7
|
"_vendor-react-CCIEwYL0.js",
|
|
8
|
-
"_ui-
|
|
8
|
+
"_ui-DT66e1F2.js",
|
|
9
9
|
"_button-2PNVsNX1.js"
|
|
10
10
|
]
|
|
11
11
|
},
|
|
12
|
-
"_FileOperationsService-
|
|
13
|
-
"file": "assets/FileOperationsService-
|
|
12
|
+
"_FileOperationsService-DKJqGHu1.js": {
|
|
13
|
+
"file": "assets/FileOperationsService-DKJqGHu1.js",
|
|
14
14
|
"name": "FileOperationsService",
|
|
15
15
|
"imports": [
|
|
16
16
|
"_rolldown-runtime-QTnfLwEv.js",
|
|
17
17
|
"_vendor-react-CCIEwYL0.js",
|
|
18
18
|
"_runtimeConfig-DNyol2mX.js",
|
|
19
19
|
"_preload-helper-DYl5dUZ5.js",
|
|
20
|
-
"_ui-
|
|
20
|
+
"_ui-DT66e1F2.js",
|
|
21
21
|
"_button-2PNVsNX1.js",
|
|
22
|
-
"_dist-
|
|
22
|
+
"_dist-IBz-INPD.js",
|
|
23
|
+
"_dist-D5Xhsuot.js",
|
|
23
24
|
"_utils-DqNhCx4L.js"
|
|
24
25
|
],
|
|
25
26
|
"dynamicImports": [
|
|
@@ -53,8 +54,18 @@
|
|
|
53
54
|
"_typeof-B5XbjTb1.js"
|
|
54
55
|
]
|
|
55
56
|
},
|
|
56
|
-
"_dist-
|
|
57
|
-
"file": "assets/dist-
|
|
57
|
+
"_dist-D5Xhsuot.js": {
|
|
58
|
+
"file": "assets/dist-D5Xhsuot.js",
|
|
59
|
+
"name": "dist",
|
|
60
|
+
"imports": [
|
|
61
|
+
"_rolldown-runtime-QTnfLwEv.js",
|
|
62
|
+
"_vendor-react-CCIEwYL0.js",
|
|
63
|
+
"_button-2PNVsNX1.js",
|
|
64
|
+
"_dist-IBz-INPD.js"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"_dist-IBz-INPD.js": {
|
|
68
|
+
"file": "assets/dist-IBz-INPD.js",
|
|
58
69
|
"name": "dist",
|
|
59
70
|
"imports": [
|
|
60
71
|
"_rolldown-runtime-QTnfLwEv.js",
|
|
@@ -69,6 +80,17 @@
|
|
|
69
80
|
"_rolldown-runtime-QTnfLwEv.js"
|
|
70
81
|
]
|
|
71
82
|
},
|
|
83
|
+
"_jianduMemoryApi-BCqD_UC3.js": {
|
|
84
|
+
"file": "assets/jianduMemoryApi-BCqD_UC3.js",
|
|
85
|
+
"name": "jianduMemoryApi",
|
|
86
|
+
"imports": [
|
|
87
|
+
"_rolldown-runtime-QTnfLwEv.js",
|
|
88
|
+
"_vendor-react-CCIEwYL0.js",
|
|
89
|
+
"_select-Cx6_p5tF.js",
|
|
90
|
+
"_dist-IBz-INPD.js",
|
|
91
|
+
"_utils-DqNhCx4L.js"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
72
94
|
"_lib-CFLxRXs3.js": {
|
|
73
95
|
"file": "assets/lib-CFLxRXs3.js",
|
|
74
96
|
"name": "lib"
|
|
@@ -85,6 +107,19 @@
|
|
|
85
107
|
"file": "assets/runtimeConfig-DNyol2mX.js",
|
|
86
108
|
"name": "runtimeConfig"
|
|
87
109
|
},
|
|
110
|
+
"_select-Cx6_p5tF.js": {
|
|
111
|
+
"file": "assets/select-Cx6_p5tF.js",
|
|
112
|
+
"name": "select",
|
|
113
|
+
"imports": [
|
|
114
|
+
"_rolldown-runtime-QTnfLwEv.js",
|
|
115
|
+
"_vendor-react-CCIEwYL0.js",
|
|
116
|
+
"_runtimeConfig-DNyol2mX.js",
|
|
117
|
+
"_ui-DT66e1F2.js",
|
|
118
|
+
"_button-2PNVsNX1.js",
|
|
119
|
+
"_dist-IBz-INPD.js",
|
|
120
|
+
"_utils-DqNhCx4L.js"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
88
123
|
"_strictConfig-BjTx9qA2.js": {
|
|
89
124
|
"file": "assets/strictConfig-BjTx9qA2.js",
|
|
90
125
|
"name": "strictConfig",
|
|
@@ -92,16 +127,17 @@
|
|
|
92
127
|
"_vendor-mermaid-D-p0xABq.js"
|
|
93
128
|
]
|
|
94
129
|
},
|
|
95
|
-
"_tabs-
|
|
96
|
-
"file": "assets/tabs-
|
|
130
|
+
"_tabs-B-j3xY-g.js": {
|
|
131
|
+
"file": "assets/tabs-B-j3xY-g.js",
|
|
97
132
|
"name": "tabs",
|
|
98
133
|
"imports": [
|
|
99
134
|
"_rolldown-runtime-QTnfLwEv.js",
|
|
100
135
|
"_vendor-react-CCIEwYL0.js",
|
|
101
|
-
"
|
|
102
|
-
"_ui-Bsa0MSjY.js",
|
|
136
|
+
"_ui-DT66e1F2.js",
|
|
103
137
|
"_button-2PNVsNX1.js",
|
|
104
|
-
"
|
|
138
|
+
"_select-Cx6_p5tF.js",
|
|
139
|
+
"_dist-IBz-INPD.js",
|
|
140
|
+
"_dist-D5Xhsuot.js",
|
|
105
141
|
"_utils-DqNhCx4L.js"
|
|
106
142
|
]
|
|
107
143
|
},
|
|
@@ -109,8 +145,8 @@
|
|
|
109
145
|
"file": "assets/typeof-B5XbjTb1.js",
|
|
110
146
|
"name": "typeof"
|
|
111
147
|
},
|
|
112
|
-
"_ui-
|
|
113
|
-
"file": "assets/ui-
|
|
148
|
+
"_ui-DT66e1F2.js": {
|
|
149
|
+
"file": "assets/ui-DT66e1F2.js",
|
|
114
150
|
"name": "ui",
|
|
115
151
|
"imports": [
|
|
116
152
|
"_rolldown-runtime-QTnfLwEv.js",
|
|
@@ -209,7 +245,7 @@
|
|
|
209
245
|
]
|
|
210
246
|
},
|
|
211
247
|
"index.html": {
|
|
212
|
-
"file": "assets/index-
|
|
248
|
+
"file": "assets/index-neDLlsA8.js",
|
|
213
249
|
"name": "index",
|
|
214
250
|
"src": "index.html",
|
|
215
251
|
"isEntry": true,
|
|
@@ -221,7 +257,7 @@
|
|
|
221
257
|
],
|
|
222
258
|
"dynamicImports": [
|
|
223
259
|
"src/Root.tsx",
|
|
224
|
-
"_ErrorBoundary-
|
|
260
|
+
"_ErrorBoundary-BqQw20EJ.js"
|
|
225
261
|
],
|
|
226
262
|
"css": [
|
|
227
263
|
"assets/index-oJ6TQqr4.css"
|
|
@@ -6205,7 +6241,7 @@
|
|
|
6205
6241
|
]
|
|
6206
6242
|
},
|
|
6207
6243
|
"src/Root.tsx": {
|
|
6208
|
-
"file": "assets/Root-
|
|
6244
|
+
"file": "assets/Root-Bx0LS_x-.js",
|
|
6209
6245
|
"name": "Root",
|
|
6210
6246
|
"src": "src/Root.tsx",
|
|
6211
6247
|
"isDynamicEntry": true,
|
|
@@ -6214,12 +6250,14 @@
|
|
|
6214
6250
|
"_vendor-react-CCIEwYL0.js",
|
|
6215
6251
|
"_runtimeConfig-DNyol2mX.js",
|
|
6216
6252
|
"_preload-helper-DYl5dUZ5.js",
|
|
6217
|
-
"_ui-
|
|
6218
|
-
"_tabs-
|
|
6253
|
+
"_ui-DT66e1F2.js",
|
|
6254
|
+
"_tabs-B-j3xY-g.js",
|
|
6219
6255
|
"_button-2PNVsNX1.js",
|
|
6220
|
-
"_FileOperationsService-
|
|
6221
|
-
"_ErrorBoundary-
|
|
6222
|
-
"
|
|
6256
|
+
"_FileOperationsService-DKJqGHu1.js",
|
|
6257
|
+
"_ErrorBoundary-BqQw20EJ.js",
|
|
6258
|
+
"_select-Cx6_p5tF.js",
|
|
6259
|
+
"_dist-IBz-INPD.js",
|
|
6260
|
+
"_dist-D5Xhsuot.js",
|
|
6223
6261
|
"_utils-DqNhCx4L.js"
|
|
6224
6262
|
],
|
|
6225
6263
|
"dynamicImports": [
|
|
@@ -6233,12 +6271,12 @@
|
|
|
6233
6271
|
]
|
|
6234
6272
|
},
|
|
6235
6273
|
"src/components/app/ErrorBoundary.tsx": {
|
|
6236
|
-
"file": "assets/ErrorBoundary-
|
|
6274
|
+
"file": "assets/ErrorBoundary-CGh8OTDZ.js",
|
|
6237
6275
|
"name": "ErrorBoundary",
|
|
6238
6276
|
"src": "src/components/app/ErrorBoundary.tsx",
|
|
6239
6277
|
"isDynamicEntry": true,
|
|
6240
6278
|
"imports": [
|
|
6241
|
-
"_ErrorBoundary-
|
|
6279
|
+
"_ErrorBoundary-BqQw20EJ.js"
|
|
6242
6280
|
]
|
|
6243
6281
|
},
|
|
6244
6282
|
"src/components/chat/CodeBlock.tsx": {
|
|
@@ -6285,7 +6323,7 @@
|
|
|
6285
6323
|
]
|
|
6286
6324
|
},
|
|
6287
6325
|
"src/components/chat/Settings.tsx": {
|
|
6288
|
-
"file": "assets/Settings-
|
|
6326
|
+
"file": "assets/Settings-h8raaTMo.js",
|
|
6289
6327
|
"name": "Settings",
|
|
6290
6328
|
"src": "src/components/chat/Settings.tsx",
|
|
6291
6329
|
"isDynamicEntry": true,
|
|
@@ -6293,18 +6331,25 @@
|
|
|
6293
6331
|
"_rolldown-runtime-QTnfLwEv.js",
|
|
6294
6332
|
"_vendor-react-CCIEwYL0.js",
|
|
6295
6333
|
"_runtimeConfig-DNyol2mX.js",
|
|
6296
|
-
"
|
|
6297
|
-
"
|
|
6334
|
+
"_preload-helper-DYl5dUZ5.js",
|
|
6335
|
+
"_ui-DT66e1F2.js",
|
|
6336
|
+
"_tabs-B-j3xY-g.js",
|
|
6298
6337
|
"_button-2PNVsNX1.js",
|
|
6299
|
-
"
|
|
6300
|
-
"
|
|
6338
|
+
"_select-Cx6_p5tF.js",
|
|
6339
|
+
"_dist-IBz-INPD.js",
|
|
6340
|
+
"_dist-D5Xhsuot.js",
|
|
6341
|
+
"_utils-DqNhCx4L.js",
|
|
6342
|
+
"_jianduMemoryApi-BCqD_UC3.js"
|
|
6343
|
+
],
|
|
6344
|
+
"dynamicImports": [
|
|
6345
|
+
"src/components/chat/settings/JianduProjectMemories.tsx"
|
|
6301
6346
|
],
|
|
6302
6347
|
"css": [
|
|
6303
6348
|
"assets/Settings-C-dpJ0bQ.css"
|
|
6304
6349
|
]
|
|
6305
6350
|
},
|
|
6306
6351
|
"src/components/chat/StreamdownMarkdown.tsx": {
|
|
6307
|
-
"file": "assets/StreamdownMarkdown-
|
|
6352
|
+
"file": "assets/StreamdownMarkdown-99oqAZx3.js",
|
|
6308
6353
|
"name": "StreamdownMarkdown",
|
|
6309
6354
|
"src": "src/components/chat/StreamdownMarkdown.tsx",
|
|
6310
6355
|
"isDynamicEntry": true,
|
|
@@ -6314,8 +6359,8 @@
|
|
|
6314
6359
|
"_preload-helper-DYl5dUZ5.js",
|
|
6315
6360
|
"_vendor-markdown-CfSBref-.js",
|
|
6316
6361
|
"_vendor-streamdown-Ceq3XY-u.js",
|
|
6317
|
-
"_ui-
|
|
6318
|
-
"_FileOperationsService-
|
|
6362
|
+
"_ui-DT66e1F2.js",
|
|
6363
|
+
"_FileOperationsService-DKJqGHu1.js",
|
|
6319
6364
|
"_utils-DqNhCx4L.js"
|
|
6320
6365
|
],
|
|
6321
6366
|
"dynamicImports": [
|
|
@@ -6327,7 +6372,7 @@
|
|
|
6327
6372
|
]
|
|
6328
6373
|
},
|
|
6329
6374
|
"src/components/chat/StreamdownMermaid.tsx": {
|
|
6330
|
-
"file": "assets/StreamdownMermaid-
|
|
6375
|
+
"file": "assets/StreamdownMermaid-CMHJPSBy.js",
|
|
6331
6376
|
"name": "StreamdownMermaid",
|
|
6332
6377
|
"src": "src/components/chat/StreamdownMermaid.tsx",
|
|
6333
6378
|
"isDynamicEntry": true,
|
|
@@ -6335,12 +6380,26 @@
|
|
|
6335
6380
|
"_rolldown-runtime-QTnfLwEv.js",
|
|
6336
6381
|
"_vendor-react-CCIEwYL0.js",
|
|
6337
6382
|
"_vendor-mermaid-D-p0xABq.js",
|
|
6338
|
-
"_ui-
|
|
6383
|
+
"_ui-DT66e1F2.js",
|
|
6339
6384
|
"_strictConfig-BjTx9qA2.js"
|
|
6340
6385
|
]
|
|
6341
6386
|
},
|
|
6387
|
+
"src/components/chat/settings/JianduProjectMemories.tsx": {
|
|
6388
|
+
"file": "assets/JianduProjectMemories-Bm-SICM0.js",
|
|
6389
|
+
"name": "JianduProjectMemories",
|
|
6390
|
+
"src": "src/components/chat/settings/JianduProjectMemories.tsx",
|
|
6391
|
+
"isDynamicEntry": true,
|
|
6392
|
+
"imports": [
|
|
6393
|
+
"_rolldown-runtime-QTnfLwEv.js",
|
|
6394
|
+
"_vendor-react-CCIEwYL0.js",
|
|
6395
|
+
"_ui-DT66e1F2.js",
|
|
6396
|
+
"_button-2PNVsNX1.js",
|
|
6397
|
+
"_select-Cx6_p5tF.js",
|
|
6398
|
+
"_jianduMemoryApi-BCqD_UC3.js"
|
|
6399
|
+
]
|
|
6400
|
+
},
|
|
6342
6401
|
"src/lib/export/renderPdf.tsx": {
|
|
6343
|
-
"file": "assets/renderPdf-
|
|
6402
|
+
"file": "assets/renderPdf-EH5PT21c.js",
|
|
6344
6403
|
"name": "renderPdf",
|
|
6345
6404
|
"src": "src/lib/export/renderPdf.tsx",
|
|
6346
6405
|
"isDynamicEntry": true,
|
|
@@ -6352,7 +6411,7 @@
|
|
|
6352
6411
|
"_vendor-markdown-CfSBref-.js",
|
|
6353
6412
|
"_typeof-B5XbjTb1.js",
|
|
6354
6413
|
"_html2canvas-BzlCjWQf.js",
|
|
6355
|
-
"_ui-
|
|
6414
|
+
"_ui-DT66e1F2.js",
|
|
6356
6415
|
"_unsupportedIterableToArray-7m2_meZB.js",
|
|
6357
6416
|
"_strictConfig-BjTx9qA2.js"
|
|
6358
6417
|
],
|
|
@@ -6363,13 +6422,13 @@
|
|
|
6363
6422
|
]
|
|
6364
6423
|
},
|
|
6365
6424
|
"src/shared/i18n/resources/en-US.ts": {
|
|
6366
|
-
"file": "assets/en-US-
|
|
6425
|
+
"file": "assets/en-US-BN8lZJt3.js",
|
|
6367
6426
|
"name": "en-US",
|
|
6368
6427
|
"src": "src/shared/i18n/resources/en-US.ts",
|
|
6369
6428
|
"isDynamicEntry": true
|
|
6370
6429
|
},
|
|
6371
6430
|
"src/shared/i18n/resources/zh-CN.ts": {
|
|
6372
|
-
"file": "assets/zh-CN-
|
|
6431
|
+
"file": "assets/zh-CN-CCYNokjo.js",
|
|
6373
6432
|
"name": "zh-CN",
|
|
6374
6433
|
"src": "src/shared/i18n/resources/zh-CN.ts",
|
|
6375
6434
|
"isDynamicEntry": true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./vendor-react-CCIEwYL0.js";import{i as r,r as i}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./vendor-react-CCIEwYL0.js";import{i as r,r as i}from"./ui-DT66e1F2.js";import{c as a,t as o}from"./button-2PNVsNX1.js";var s=a(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),c=a(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),l=e(t(),1),u=n(),d=class extends l.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){let n=this.props.name??`ErrorBoundary`;console.error(`[${n}] Uncaught error:`,e,t),this.props.onError?.(e,t)}handleReset=()=>{this.setState({hasError:!1,error:null})};render(){if(!this.state.hasError)return this.props.children;let{fallback:e}=this.props,t=this.state.error;return typeof e==`function`?e(t,this.handleReset):e===void 0?(0,u.jsx)(f,{error:t,onReset:this.handleReset}):e}};function f({error:e,onReset:t}){r();let[n,a]=(0,l.useState)(!1);return(0,u.jsxs)(`div`,{role:`alert`,className:`flex min-h-[200px] flex-col items-center justify-center gap-3 p-6 text-center`,children:[(0,u.jsx)(s,{className:`size-9 text-amber-500`}),(0,u.jsx)(`div`,{className:`text-base font-semibold`,children:i(`something_went_wrong_04c5b397`)}),(0,u.jsx)(`p`,{className:`max-w-md text-sm text-muted-foreground`,children:i(`this_section_could_not_render_try_again_or_reload_the_p_e644d5da`)}),(0,u.jsxs)(`div`,{className:`mt-1 flex gap-2`,children:[(0,u.jsxs)(o,{size:`sm`,onClick:t,children:[(0,u.jsx)(c,{className:`size-4`}),i(`retry_b8784c8d`)]}),(0,u.jsx)(o,{size:`sm`,variant:`ghost`,onClick:()=>a(e=>!e),"aria-expanded":n,children:i(n?`hide_details_2e1b7da4`:`show_details_448d5d38`)})]}),n&&(0,u.jsxs)(`pre`,{className:`mt-2 max-h-[200px] w-full max-w-xl overflow-auto rounded-md bg-muted p-3 text-left text-xs`,children:[e.message,e.stack?`\n\n${e.stack}`:``]})]})}export{c as n,s as r,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ErrorBoundary-BqQw20EJ.js";export{e as ErrorBoundary,e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-js-BRD7Ycov.js","./core-w4ZWUd33.js","./core-DGw2K2SP.js","./dist-js-CGF_d654.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./vendor-react-CCIEwYL0.js";import{i as r}from"./runtimeConfig-DNyol2mX.js";import{t as i}from"./preload-helper-DYl5dUZ5.js";import{i as a,r as o}from"./ui-DT66e1F2.js";import{c as s,i as c,o as l,s as u,t as d}from"./button-2PNVsNX1.js";import{A as f,C as ee,D as te,E as ne,F as p,I as re,L as ie,M as m,O as h,P as g,R as _,S as ae,T as oe,_ as se,a as v,b as ce,d as y,f as b,g as le,h as x,i as S,j as C,k as w,m as T,n as E,p as ue,r as de,t as fe,v as pe,w as D,x as me,y as he}from"./dist-IBz-INPD.js";import{a as ge,i as _e,n as ve,o as ye,r as be,t as xe}from"./dist-D5Xhsuot.js";import{t as O}from"./utils-DqNhCx4L.js";var Se=s(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),k=e(t(),1),A=n();function Ce(e){return(0,A.jsx)(ue,{"data-slot":`dialog`,...e})}function we(e){return(0,A.jsx)(ce,{"data-slot":`dialog-trigger`,...e})}function Te(e){return(0,A.jsx)(pe,{"data-slot":`dialog-portal`,...e})}function Ee({className:e,...t}){return(0,A.jsx)(se,{"data-slot":`dialog-overlay`,className:O(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...t})}function De({className:e,children:t,showCloseButton:n=!0,...r}){return(0,A.jsxs)(Te,{"data-slot":`dialog-portal`,children:[(0,A.jsx)(Ee,{}),(0,A.jsxs)(x,{"data-slot":`dialog-content`,className:O(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`,e),...r,children:[t,n&&(0,A.jsxs)(T,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,A.jsx)(ie,{}),(0,A.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Oe({className:e,...t}){return(0,A.jsx)(`div`,{"data-slot":`dialog-header`,className:O(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function ke({className:e,...t}){return(0,A.jsx)(`div`,{"data-slot":`dialog-footer`,className:O(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function Ae({className:e,...t}){return(0,A.jsx)(he,{"data-slot":`dialog-title`,className:O(`text-lg leading-none font-semibold`,e),...t})}function je({className:e,...t}){return(0,A.jsx)(le,{"data-slot":`dialog-description`,className:O(`text-muted-foreground text-sm`,e),...t})}var j=[`Enter`,` `],Me=[`ArrowDown`,`PageUp`,`Home`],Ne=[`ArrowUp`,`PageDown`,`End`],Pe=[...Me,...Ne],Fe={ltr:[...j,`ArrowRight`],rtl:[...j,`ArrowLeft`]},Ie={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},M=`Menu`,[N,Le,Re]=b(M),[P,ze]=g(M,[Re,v,be]),F=v(),Be=be(),[Ve,I]=P(M),[He,L]=P(M),Ue=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=F(t),[c,l]=k.useState(null),u=k.useRef(!1),d=h(a),f=y(i);return k.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),k.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,A.jsx)(S,{...s,children:(0,A.jsx)(Ve,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,A.jsx)(He,{scope:t,onClose:k.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Ue.displayName=M;var We=`MenuAnchor`,R=k.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=F(n);return(0,A.jsx)(fe,{...i,...r,ref:t})});R.displayName=We;var z=`MenuPortal`,[Ge,Ke]=P(z,{forceMount:void 0}),qe=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=I(z,t);return(0,A.jsx)(Ge,{scope:t,forceMount:n,children:(0,A.jsx)(D,{present:n||a.open,children:(0,A.jsx)(oe,{asChild:!0,container:i,children:r})})})};qe.displayName=z;var B=`MenuContent`,[Je,V]=P(B),Ye=k.forwardRef((e,t)=>{let n=Ke(B,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=I(B,e.__scopeMenu),o=L(B,e.__scopeMenu);return(0,A.jsx)(N.Provider,{scope:e.__scopeMenu,children:(0,A.jsx)(D,{present:r||a.open,children:(0,A.jsx)(N.Slot,{scope:e.__scopeMenu,children:o.modal?(0,A.jsx)(Xe,{...i,ref:t}):(0,A.jsx)(Ze,{...i,ref:t})})})})}),Xe=k.forwardRef((e,t)=>{let n=I(B,e.__scopeMenu),r=k.useRef(null),i=u(t,r);return k.useEffect(()=>{let e=r.current;if(e)return me(e)},[]),(0,A.jsx)(H,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:p(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ze=k.forwardRef((e,t)=>{let n=I(B,e.__scopeMenu);return(0,A.jsx)(H,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Qe=c(`MenuContent.ScrollLock`),H=k.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:re,onDismiss:ie,disableOutsideScroll:m,...h}=e,g=I(B,n),_=L(B,n),oe=F(n),se=Be(n),v=Le(n),[ce,y]=k.useState(null),b=k.useRef(null),le=u(t,b,g.onContentChange),x=k.useRef(0),S=k.useRef(``),C=k.useRef(0),w=k.useRef(null),T=k.useRef(`right`),E=k.useRef(0),ue=m?ae:k.Fragment,fe=m?{as:Qe,allowPinchZoom:!0}:void 0,pe=e=>{let t=S.current+e,n=v().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=At(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){S.current=t,window.clearTimeout(x.current),t!==``&&(x.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};k.useEffect(()=>()=>window.clearTimeout(x.current),[]),ee();let D=k.useCallback(e=>T.current===w.current?.side&&Mt(e,w.current?.area),[]);return(0,A.jsx)(Je,{scope:n,searchRef:S,onItemEnter:k.useCallback(e=>{D(e)&&e.preventDefault()},[D]),onItemLeave:k.useCallback(e=>{D(e)||(b.current?.focus(),y(null))},[D]),onTriggerLeave:k.useCallback(e=>{D(e)&&e.preventDefault()},[D]),pointerGraceTimerRef:C,onPointerGraceIntentChange:k.useCallback(e=>{w.current=e},[]),children:(0,A.jsx)(ue,{...fe,children:(0,A.jsx)(ne,{asChild:!0,trapped:i,onMountAutoFocus:p(a,e=>{e.preventDefault(),b.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,A.jsx)(te,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:re,onDismiss:ie,children:(0,A.jsx)(ve,{asChild:!0,...se,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:ce,onCurrentTabStopIdChange:y,onEntryFocus:p(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,A.jsx)(de,{role:`menu`,"aria-orientation":`vertical`,"data-state":Et(g.open),"data-radix-menu-content":``,dir:_.dir,...oe,...h,ref:le,style:{outline:`none`,...h.style},onKeyDown:p(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&pe(e.key));let i=b.current;if(e.target!==i||!Pe.includes(e.key))return;e.preventDefault();let a=v().filter(e=>!e.disabled).map(e=>e.ref.current);Ne.includes(e.key)&&a.reverse(),Ot(a)}),onBlur:p(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(x.current),S.current=``)}),onPointerMove:p(e.onPointerMove,Y(e=>{let t=e.target,n=E.current!==e.clientX;e.currentTarget.contains(t)&&n&&(T.current=e.clientX>E.current?`right`:`left`,E.current=e.clientX)}))})})})})})})});Ye.displayName=B;var $e=`MenuGroup`,U=k.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,A.jsx)(w.div,{role:`group`,...r,ref:t})});U.displayName=$e;var et=`MenuLabel`,tt=k.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,A.jsx)(w.div,{...r,ref:t})});tt.displayName=et;var W=`MenuItem`,nt=`menu.itemSelect`,G=k.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=k.useRef(null),o=L(W,e.__scopeMenu),s=V(W,e.__scopeMenu),c=u(t,a),l=k.useRef(!1),d=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(nt,{bubbles:!0,cancelable:!0});e.addEventListener(nt,e=>r?.(e),{once:!0}),f(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,A.jsx)(rt,{...i,ref:c,disabled:n,onClick:p(e.onClick,d),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:p(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:p(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||j.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});G.displayName=W;var rt=k.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=V(W,n),s=Be(n),c=k.useRef(null),l=u(t,c),[d,f]=k.useState(!1),[ee,te]=k.useState(``);return k.useEffect(()=>{let e=c.current;e&&te((e.textContent??``).trim())},[a.children]),(0,A.jsx)(N.ItemSlot,{scope:n,disabled:r,textValue:i??ee,children:(0,A.jsx)(xe,{asChild:!0,...s,focusable:!r,children:(0,A.jsx)(w.div,{role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:p(e.onPointerMove,Y(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:p(e.onPointerLeave,Y(e=>o.onItemLeave(e))),onFocus:p(e.onFocus,()=>f(!0)),onBlur:p(e.onBlur,()=>f(!1))})})})}),it=`MenuCheckboxItem`,at=k.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,A.jsx)(ft,{scope:e.__scopeMenu,checked:n,children:(0,A.jsx)(G,{role:`menuitemcheckbox`,"aria-checked":J(n)?`mixed`:n,...i,ref:t,"data-state":Dt(n),onSelect:p(i.onSelect,()=>r?.(J(n)?!0:!n),{checkForDefaultPrevented:!1})})})});at.displayName=it;var ot=`MenuRadioGroup`,[st,ct]=P(ot,{value:void 0,onValueChange:()=>{}}),lt=k.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=h(r);return(0,A.jsx)(st,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,A.jsx)(U,{...i,ref:t})})});lt.displayName=ot;var ut=`MenuRadioItem`,dt=k.forwardRef((e,t)=>{let{value:n,...r}=e,i=ct(ut,e.__scopeMenu),a=n===i.value;return(0,A.jsx)(ft,{scope:e.__scopeMenu,checked:a,children:(0,A.jsx)(G,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Dt(a),onSelect:p(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});dt.displayName=ut;var K=`MenuItemIndicator`,[ft,pt]=P(K,{checked:!1}),mt=k.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=pt(K,n);return(0,A.jsx)(D,{present:r||J(a.checked)||a.checked===!0,children:(0,A.jsx)(w.span,{...i,ref:t,"data-state":Dt(a.checked)})})});mt.displayName=K;var ht=`MenuSeparator`,gt=k.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,A.jsx)(w.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});gt.displayName=ht;var _t=`MenuArrow`,vt=k.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=F(n);return(0,A.jsx)(E,{...i,...r,ref:t})});vt.displayName=_t;var yt=`MenuSub`,[bt,xt]=P(yt),St=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=I(yt,t),o=F(t),[s,c]=k.useState(null),[l,u]=k.useState(null),d=h(i);return k.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,A.jsx)(S,{...o,children:(0,A.jsx)(Ve,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,A.jsx)(bt,{scope:t,contentId:m(),triggerId:m(),trigger:s,onTriggerChange:c,children:n})})})};St.displayName=yt;var q=`MenuSubTrigger`,Ct=k.forwardRef((e,t)=>{let n=I(q,e.__scopeMenu),r=L(q,e.__scopeMenu),i=xt(q,e.__scopeMenu),a=V(q,e.__scopeMenu),o=k.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=k.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return k.useEffect(()=>d,[d]),k.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,A.jsx)(R,{asChild:!0,...u,children:(0,A.jsx)(rt,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Et(n.open),...e,ref:l(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:p(e.onPointerMove,Y(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:p(e.onPointerLeave,Y(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:p(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Fe[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Ct.displayName=q;var wt=`MenuSubContent`,Tt=k.forwardRef((e,t)=>{let n=Ke(B,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=I(B,e.__scopeMenu),s=L(B,e.__scopeMenu),c=xt(wt,e.__scopeMenu),l=k.useRef(null),d=u(t,l);return(0,A.jsx)(N.Provider,{scope:e.__scopeMenu,children:(0,A.jsx)(D,{present:r||o.open,children:(0,A.jsx)(N.Slot,{scope:e.__scopeMenu,children:(0,A.jsx)(H,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:d,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:p(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:p(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:p(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Ie[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});Tt.displayName=wt;function Et(e){return e?`open`:`closed`}function J(e){return e===`indeterminate`}function Dt(e){return J(e)?`indeterminate`:e?`checked`:`unchecked`}function Ot(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function kt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function At(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=kt(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function jt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Mt(e,t){return t?jt({x:e.clientX,y:e.clientY},t):!1}function Y(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Nt=Ue,Pt=R,Ft=qe,It=Ye,Lt=U,Rt=tt,zt=G,Bt=at,Vt=lt,Ht=dt,Ut=mt,Wt=gt,Gt=vt,Kt=St,qt=Ct,Jt=Tt,X=`DropdownMenu`,[Yt,Xt]=g(X,[ze]),Z=ze(),[Zt,Qt]=Yt(X),$t=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Z(t),l=k.useRef(null),[u,d]=C({prop:i,defaultProp:a??!1,onChange:o,caller:X});return(0,A.jsx)(Zt,{scope:t,triggerId:m(),triggerRef:l,contentId:m(),open:u,onOpenChange:d,onOpenToggle:k.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,A.jsx)(Nt,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};$t.displayName=X;var en=`DropdownMenuTrigger`,tn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Qt(en,n),o=Z(n);return(0,A.jsx)(Pt,{asChild:!0,...o,children:(0,A.jsx)(w.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:l(t,a.triggerRef),onPointerDown:p(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:p(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});tn.displayName=en;var nn=`DropdownMenuPortal`,rn=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Z(t);return(0,A.jsx)(Ft,{...r,...n})};rn.displayName=nn;var an=`DropdownMenuContent`,on=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qt(an,n),a=Z(n),o=k.useRef(!1);return(0,A.jsx)(It,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:p(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:p(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});on.displayName=an;var sn=`DropdownMenuGroup`,cn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(Lt,{...i,...r,ref:t})});cn.displayName=sn;var ln=`DropdownMenuLabel`,un=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(Rt,{...i,...r,ref:t})});un.displayName=ln;var dn=`DropdownMenuItem`,fn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(zt,{...i,...r,ref:t})});fn.displayName=dn;var pn=`DropdownMenuCheckboxItem`,mn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(Bt,{...i,...r,ref:t})});mn.displayName=pn;var hn=`DropdownMenuRadioGroup`,gn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(Vt,{...i,...r,ref:t})});gn.displayName=hn;var _n=`DropdownMenuRadioItem`,vn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(Ht,{...i,...r,ref:t})});vn.displayName=_n;var yn=`DropdownMenuItemIndicator`,bn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(Ut,{...i,...r,ref:t})});bn.displayName=yn;var xn=`DropdownMenuSeparator`,Sn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(Wt,{...i,...r,ref:t})});Sn.displayName=xn;var Cn=`DropdownMenuArrow`,wn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(Gt,{...i,...r,ref:t})});wn.displayName=Cn;var Tn=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=Z(t),[s,c]=C({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,A.jsx)(Kt,{...o,open:s,onOpenChange:c,children:n})},En=`DropdownMenuSubTrigger`,Dn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(qt,{...i,...r,ref:t})});Dn.displayName=En;var On=`DropdownMenuSubContent`,kn=k.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,A.jsx)(Jt,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});kn.displayName=On;var An=$t,jn=tn,Mn=rn,Nn=on,Pn=fn,Fn=Sn,In=Tn,Ln=Dn,Rn=kn;function zn(e){return(0,A.jsx)(An,{"data-slot":`dropdown-menu`,...e})}function Bn(e){return(0,A.jsx)(jn,{"data-slot":`dropdown-menu-trigger`,...e})}function Vn({className:e,sideOffset:t=4,...n}){return(0,A.jsx)(Mn,{children:(0,A.jsx)(Nn,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:O(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md`,e),...n})})}function Q({className:e,inset:t,variant:n=`default`,...r}){return(0,A.jsx)(Pn,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:O(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r})}function Hn({className:e,...t}){return(0,A.jsx)(Fn,{"data-slot":`dropdown-menu-separator`,className:O(`bg-border -mx-1 my-1 h-px`,e),...t})}function Un(e){return(0,A.jsx)(In,{"data-slot":`dropdown-menu-sub`,...e})}function Wn({className:e,inset:t,children:n,...r}){return(0,A.jsxs)(Ln,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":t,className:O(`focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8`,e),...r,children:[n,(0,A.jsx)(ye,{className:`ml-auto size-4`})]})}function Gn({className:e,...t}){return(0,A.jsx)(Rn,{"data-slot":`dropdown-menu-sub-content`,className:O(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg`,e),...t})}var $=()=>r().host.kind===`bodhi-desktop`,Kn=()=>window.__TAURI_INTERNALS__?.invoke,qn=e=>{if(typeof window>`u`)return;let t=window.open(e,`_blank`,`noopener,noreferrer`);if(t){t.opener=null;return}window.location.assign(e)},Jn=async e=>{let t=e.trim();if(t){if($()){let e=Kn();if(typeof e!=`function`)throw Error(`Desktop shell is unavailable`);await e(`plugin:shell|open`,{path:t});return}qn(t)}},Yn=async e=>{let t=e.trim();if(!t)throw Error(o(`this_project_has_no_primary_directory_configured_1b81c32a`));if(!$())throw Error(o(`open_the_local_directory_in_the_bodhi_desktop_app_74255b08`));let n=Kn();if(typeof n!=`function`)throw Error(o(`desktop_file_manager_is_temporarily_unavailable_331d04fe`));await n(`plugin:shell|open`,{path:t})},Xn=(0,k.createContext)(null),Zn=e=>{try{let t=new URL(e);return(t.protocol===`http:`||t.protocol===`https:`)&&!!t.hostname}catch{return!1}};function Qn({children:e,onOpenInApp:t}){return a(),(0,A.jsx)(Xn.Provider,{value:t??null,children:e})}function $n({url:e,isOpen:t,onClose:n}){a();let r=(0,k.useContext)(Xn),[i,s]=(0,k.useState)(!1),[c,l]=(0,k.useState)(null),u=async(e,t)=>{if(!i){s(!0),l(null);try{await e(),n()}catch{l(t)}finally{s(!1)}}};return(0,A.jsx)(Ce,{open:t,onOpenChange:e=>{!e&&!i&&n()},children:(0,A.jsxs)(De,{className:`max-w-md`,"data-streamdown":`link-safety-modal`,children:[(0,A.jsxs)(Oe,{children:[(0,A.jsxs)(Ae,{className:`flex items-center gap-2`,children:[(0,A.jsx)(_e,{className:`size-5`}),o(`open_external_link_fd407c70`)]}),(0,A.jsx)(je,{children:o(`you_are_about_to_visit_an_external_website_d5fdb530`)})]}),(0,A.jsx)(`div`,{className:`max-h-32 overflow-y-auto break-all rounded-md bg-muted p-3 font-mono text-sm`,children:e}),c?(0,A.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:c}):null,(0,A.jsxs)(`div`,{className:`flex gap-2`,children:[(0,A.jsxs)(d,{className:`min-w-0 flex-1`,disabled:i,variant:`outline`,onClick:()=>void u(()=>re(e),o(`could_not_copy_link_please_try_again_c54af852`)),children:[(0,A.jsx)(ge,{}),o(`copy_link_8e86f9b1`)]}),(0,A.jsxs)(zn,{modal:!1,children:[(0,A.jsx)(Bn,{asChild:!0,children:(0,A.jsxs)(d,{className:`min-w-0 flex-1`,disabled:i,children:[o(`open_link_a2639495`),` `,(0,A.jsx)(_,{})]})}),(0,A.jsxs)(Vn,{align:`end`,className:`min-w-48`,style:{zIndex:60},children:[r&&Zn(e)?(0,A.jsxs)(Q,{onSelect:()=>void u(()=>r(e),o(`could_not_open_the_link_in_the_app_please_try_again_769b498f`)),children:[(0,A.jsx)(Se,{}),o(`open_in_app_af4b79db`)]}):null,(0,A.jsxs)(Q,{onSelect:()=>void u(()=>Jn(e),o(`could_not_open_the_link_in_your_default_browser_please__14278433`)),children:[(0,A.jsx)(_e,{}),o(`open_in_default_browser_a489338a`)]})]})]})]})]})})}var er=()=>i(()=>import(`./dist-js-BRD7Ycov.js`),__vite__mapDeps([0,1]),import.meta.url);async function tr(e){if(!$())throw Error(`Local image preview requires Bodhi`);let{invoke:t}=await i(async()=>{let{invoke:e}=await import(`./core-DGw2K2SP.js`);return{invoke:e}},__vite__mapDeps([2,1]),import.meta.url);return t(`read_local_image`,{path:e})}var nr=class{async saveFile(e){let{content:t,filters:n,defaultPath:r}=e,{save:a}=await er(),{writeFile:o,writeTextFile:s}=await i(async()=>{let{writeFile:e,writeTextFile:t}=await import(`./dist-js-CGF_d654.js`);return{writeFile:e,writeTextFile:t}},__vite__mapDeps([3,1]),import.meta.url),c=await a({filters:n.map(e=>({name:e.name,extensions:[...e.extensions]})),defaultPath:r});if(!c)throw Error(`User cancelled save operation`);return typeof t==`string`?await s(c,t):await o(c,t),{filename:or(c,r),success:!0}}async pickDirectory(){let{open:e}=await er(),t=await e({directory:!0,multiple:!1});return typeof t==`string`?t:null}},rr=class{async saveFile(e){let{content:t,filters:n,defaultPath:r}=e,i=or(r,r);if(typeof window>`u`||typeof document>`u`)throw Error(`File save is unavailable in this environment`);let a=sr(n,t),o=typeof t==`string`?new Blob([t],{type:`${a};charset=utf-8`}):new Blob([t],{type:a}),s=URL.createObjectURL(o);try{let e=document.createElement(`a`);e.href=s,e.download=i,e.style.display=`none`,document.body.appendChild(e),e.click(),document.body.removeChild(e)}finally{URL.revokeObjectURL(s)}return{filename:i,success:!0}}async pickDirectory(){return null}},ir=new nr,ar=new rr,or=(e,t)=>e.split(/[/\\]/).pop()||t,sr=(e,t)=>{switch(e[0]?.extensions?.[0]?.toLowerCase()||``){case`md`:return`text/markdown`;case`txt`:return`text/plain`;case`json`:return`application/json`;case`pdf`:return`application/pdf`;case`svg`:return`image/svg+xml`;case`png`:return`image/png`;case`jpg`:case`jpeg`:return`image/jpeg`;default:return typeof t==`string`?`text/plain`:`application/octet-stream`}},cr=()=>$()?ir:ar,lr=class{static async pickDirectory(){return cr().pickDirectory()}static async saveFile(e){try{return await cr().saveFile(e)}catch(e){return{filename:``,success:!1,error:e instanceof Error?e.message:`Unknown error occurred`}}}static async saveTextFile(e,t,n){return this.saveFile({content:e,filters:t,defaultPath:n})}static async saveBinaryFile(e,t,n){return this.saveFile({content:e,filters:t,defaultPath:n})}static FILTERS={MARKDOWN:[{name:`Markdown`,extensions:[`md`]}],PDF:[{name:`PDF`,extensions:[`pdf`]}],SVG:[{name:`SVG`,extensions:[`svg`]}],PNG:[{name:`PNG`,extensions:[`png`]}],TEXT:[{name:`Text`,extensions:[`txt`]}],JSON:[{name:`JSON`,extensions:[`json`]}],ALL:[{name:`All Files`,extensions:[`*`]}]};static generateTimestampedFilename(e,t){return`${e}-${new Date().toISOString().slice(0,19).replace(/:/g,`-`)}.${t}`}};export{Se as S,je as _,Yn as a,Ae as b,Vn as c,Un as d,Gn as f,De as g,Ce as h,Qn as i,Q as l,Bn as m,tr as n,$ as o,Wn as p,$n as r,zn as s,lr as t,Hn as u,ke as v,we as x,Oe as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./vendor-react-CCIEwYL0.js";import{u as r}from"./ui-DT66e1F2.js";import{t as i}from"./button-2PNVsNX1.js";import{a,c as o,d as s,f as c,i as ee,l as te,m as ne,n as re,p as ie,r as l,t as ae,u as oe,v as se}from"./select-Cx6_p5tF.js";import{a as u,c as ce,i as le,l as ue,n as de,o as fe,s as pe,t as me,u as d}from"./jianduMemoryApi-BCqD_UC3.js";var f=e(t(),1),p=n(),m={title:``,type:`project`,content:``,tags:``,keywords:``,entities:``,granularity:``},h=e=>{if(!(e instanceof u))return`unavailable`;switch(e.code){case`invalid_input`:return`invalid`;case`context_unavailable`:return`context`;case`access_denied`:return`denied`;case`action_rejected`:return`rejected`;case`malformed_response`:return`malformed`;case`request_failed`:return`unavailable`}},g=e=>e.split(`,`).map(e=>e.trim()).filter(Boolean),he=e=>({title:e.title,type:e.type,content:e.content,tags:g(e.tags),keywords:g(e.keywords),entities:g(e.entities),...e.granularity?{granularity:e.granularity}:{}}),ge=(e,t)=>{let n=new Map(e.map(e=>[e.id,e]));return t.forEach(e=>n.set(e.id,e)),[...n.values()]};function _({api:e=pe}){let{t}=r(),n=se(e=>e.currentSessionId),u=(0,f.useRef)(n);u.current=n;let g=(0,f.useRef)(0),_=(0,f.useRef)(0),v=(0,f.useRef)(0),y=(0,f.useRef)(0),b=(0,f.useRef)(0),[_e,ve]=(0,f.useState)(0),[x,ye]=(0,f.useState)(null),[be,S]=(0,f.useState)(!1),[xe,C]=(0,f.useState)(null),[Se,w]=(0,f.useState)(``),[T,Ce]=(0,f.useState)(``),[we,Te]=(0,f.useState)(`active`),[E,Ee]=(0,f.useState)(`active`),[De,D]=(0,f.useState)([]),[O,k]=(0,f.useState)(null),[A,j]=(0,f.useState)(!1),[Oe,M]=(0,f.useState)(null),[N,P]=(0,f.useState)(null),[ke,F]=(0,f.useState)(null),[Ae,I]=(0,f.useState)(null),[je,L]=(0,f.useState)(!1),[R,z]=(0,f.useState)(m),[B,V]=(0,f.useState)(null),[Me,H]=(0,f.useState)(!1),[Ne,U]=(0,f.useState)(null),[W,G]=(0,f.useState)(null),[Pe,K]=(0,f.useState)(null),[Fe,q]=(0,f.useState)(null),[Ie,J]=(0,f.useState)(null),Y=(0,f.useCallback)(async(t,n,r,i,a,o)=>{let s=++_.current;j(!0),M(null);try{let c=await e.queryProjectMemories(t,{query:n,filters:{status:[r]},...i?{cursor:i}:{}});return g.current!==o||_.current!==s?`stale`:(D(e=>a?ge(e,c.items):c.items),k(c),`ok`)}catch(e){return g.current!==o||_.current!==s?`stale`:(M(h(e)),a||(D([]),k(null)),`failed`)}finally{g.current===o&&_.current===s&&j(!1)}},[e]),Le=(0,f.useCallback)(e=>{let t=g.current;t===e&&(g.current=t+1)},[]);(0,f.useEffect)(()=>{let t=++g.current;if(++_.current,++v.current,++y.current,++b.current,ye(null),C(null),S(!!n),w(``),Ce(``),Te(`active`),Ee(`active`),D([]),k(null),M(null),j(!1),P(null),F(null),I(null),L(!1),z(m),V(null),H(!1),U(null),G(null),K(null),q(null),J(null),!n){C(`context`);return}return e.resolveProjectContext(n).then(e=>{g.current!==t||u.current!==n||(ye(e),S(!1),Y(e,``,`active`,void 0,!1,t))}).catch(e=>{g.current!==t||u.current!==n||(S(!1),C(h(e)))}),()=>Le(t)},[e,n,Le,Y,_e]);let Re=(0,f.useCallback)(e=>{++g.current,++_.current,++v.current,++y.current,++b.current,ye(null),w(``),Ce(``),Te(`active`),Ee(`active`),D([]),k(null),j(!1),M(null),P(null),F(null),I(null),L(!1),z(m),V(null),H(!1),U(null),G(null),K(null),q(null),J(null),C(e),S(!1)},[]),ze=(0,f.useCallback)(async(t,n)=>{let r=u.current;if(!r||g.current!==n)return null;try{let i=await e.resolveProjectContext(r);return g.current!==n||u.current!==r?null:ue(t,i)?i:(Re(`context`),null)}catch(e){return g.current===n&&Re(h(e)),null}},[e,Re]),Be=()=>{if(!x)return;let e=Se.trim(),t=we;Ce(e),Ee(t),J(null),Y(x,e,t,void 0,!1,g.current)},Ve=async t=>{if(!x)return;let n=++v.current,r=g.current;P(null),I(null),F(t.id);try{let i=await e.getProjectMemory(x,t.id);if(g.current!==r||v.current!==n)return;P(i)}catch(e){g.current===r&&v.current===n&&I(h(e))}finally{g.current===r&&v.current===n&&F(null)}},He=()=>{++v.current,P(null),I(null),F(null),K(null),q(null)},Ue=(0,f.useMemo)(()=>JSON.stringify(R),[R]),X=(e,t)=>{++y.current,z(n=>({...n,[e]:t})),V(null),H(!1),U(null)},We=()=>{z(m),V(null),U(null),L(!0)},Ge=()=>{W!==`create`&&(++y.current,L(!1),z(m),V(null),U(null))},Ke=async()=>{if(!x||Me||W)return;let t=he(R);try{ce(t)}catch(e){U(h(e));return}let n=Ue,r=++y.current,i=g.current;H(!0),V(null),U(null);try{let a=await e.queryProjectMemories(x,{query:``,limit:1});if(g.current!==i||y.current!==r)return;let o=a.matchedCount===0?a:await e.queryProjectMemories(x,{query:fe(t),limit:5});if(g.current!==i||y.current!==r)return;V({fingerprint:n,items:o.items,truncated:o.truncated})}catch(e){g.current===i&&y.current===r&&U(h(e))}finally{g.current===i&&y.current===r&&H(!1)}},qe=async()=>{if(!x||W||!B||B.fingerprint!==Ue)return;let t=he(R);try{ce(t)}catch(e){U(h(e));return}let n=g.current,r=++b.current;G(`create`),U(null);let i=await ze(x,n);if(!i||g.current!==n||b.current!==r){b.current===r&&G(null);return}try{let a=await e.createProjectMemory(i,t);if(g.current!==n||b.current!==r)return;L(!1),V(null),J({kind:`created`,title:a.title}),await Y(i,T,E,void 0,!1,n)===`failed`&&b.current===r&&J({kind:`createdRefreshFailed`,title:a.title})}catch(e){g.current===n&&b.current===r&&U(h(e))}finally{g.current===n&&b.current===r&&G(null)}},Je=async()=>{let t=Pe;if(!x||!t||W)return;let n=g.current,r=++b.current;G(`archive`),q(null);let i=await ze(x,n);if(!i||g.current!==n||b.current!==r){b.current===r&&G(null);return}try{if(await e.archiveProjectMemory(i,t.id),g.current!==n||b.current!==r)return;K(null),He(),J({kind:`archived`,title:t.title}),await Y(i,T,E,void 0,!1,n)===`failed`&&b.current===r&&J({kind:`archivedRefreshFailed`,title:t.title})}catch(e){g.current===n&&b.current===r&&q(h(e))}finally{g.current===n&&b.current===r&&G(null)}},Z=e=>t(`settings.jiandu.errors.${e}`),Q=e=>t(`settings.jiandu.types.${e}`),$=e=>t(`settings.jiandu.statuses.${e}`);return(0,p.jsxs)(`div`,{className:`mx-auto max-w-3xl space-y-4`,children:[(0,p.jsx)(`header`,{className:`space-y-1`,children:(0,p.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`h2`,{className:`text-lg font-semibold`,children:t(`settings.jiandu.title`)}),(0,p.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t(`settings.jiandu.description`)})]}),(0,p.jsx)(i,{onClick:We,disabled:!x||be,children:t(`settings.jiandu.create.open`)})]})}),(0,p.jsxs)(`section`,{className:`rounded-lg border p-3`,"aria-label":t(`settings.jiandu.context.label`),children:[(0,p.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:t(`settings.jiandu.context.label`)}),be?(0,p.jsx)(`p`,{className:`mt-1 text-sm`,children:t(`settings.jiandu.context.loading`)}):x?(0,p.jsxs)(`dl`,{className:`mt-2 grid gap-2 text-sm sm:grid-cols-2`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:t(`settings.jiandu.context.session`)}),(0,p.jsx)(`dd`,{className:`break-words font-medium`,children:x.activeSessionTitle})]}),(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:t(`settings.jiandu.context.project`)}),(0,p.jsx)(`dd`,{className:`break-all font-mono text-xs`,children:x.projectId})]}),x.activeSessionId===x.authoritySessionId?null:(0,p.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,p.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:t(`settings.jiandu.context.rootSession`)}),(0,p.jsx)(`dd`,{children:x.authoritySessionTitle})]})]}):(0,p.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,p.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:Z(xe??`context`)}),n?(0,p.jsx)(i,{variant:`outline`,size:`sm`,onClick:()=>ve(e=>e+1),children:t(`settings.jiandu.context.retry`)}):null]})]}),Ie?(0,p.jsx)(`p`,{role:`status`,className:`rounded-lg border border-primary/30 bg-primary/5 p-3 text-sm`,children:t(`settings.jiandu.notices.${Ie.kind}`,{title:Ie.title})}):null,x?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`form`,{className:`flex flex-col gap-2 sm:flex-row`,onSubmit:e=>{e.preventDefault(),Be()},children:[(0,p.jsx)(oe,{"aria-label":t(`settings.jiandu.search.label`),value:Se,maxLength:de.queryChars,onChange:e=>w(e.target.value),placeholder:t(`settings.jiandu.search.placeholder`)}),(0,p.jsxs)(ae,{value:we,disabled:A,onValueChange:e=>Te(e),children:[(0,p.jsx)(ee,{className:`w-full sm:w-36`,"aria-label":t(`settings.jiandu.search.statusLabel`),children:(0,p.jsx)(a,{})}),(0,p.jsxs)(re,{className:`z-[150]`,children:[(0,p.jsx)(l,{value:`active`,children:$(`active`)}),(0,p.jsx)(l,{value:`archived`,children:$(`archived`)})]})]}),(0,p.jsx)(i,{type:`submit`,disabled:A,children:t(`settings.jiandu.search.action`)}),(0,p.jsx)(i,{type:`button`,variant:`outline`,disabled:A,onClick:()=>void Y(x,T,E,void 0,!1,g.current),children:t(`settings.jiandu.search.refresh`)})]}),Oe?(0,p.jsx)(`p`,{role:`alert`,className:`rounded-lg border border-destructive/40 p-3 text-sm text-destructive`,children:Z(Oe)}):null,O?(0,p.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:[(0,p.jsx)(`span`,{children:t(`settings.jiandu.list.count`,{visible:De.length,matched:O.matchedCount})}),O.truncated?(0,p.jsx)(`span`,{children:t(`settings.jiandu.list.truncated`)}):null,O.remainingCount>0?(0,p.jsx)(`span`,{children:t(`settings.jiandu.list.remaining`,{count:O.remainingCount})}):null]}):null,De.length>0?(0,p.jsx)(`ul`,{className:`space-y-2`,"aria-label":t(`settings.jiandu.list.label`),children:De.map(e=>(0,p.jsxs)(`li`,{className:`rounded-lg border p-3`,children:[(0,p.jsx)(`button`,{type:`button`,className:`max-w-full break-words text-left text-sm font-semibold hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,disabled:ke===e.id,onClick:()=>void Ve(e),children:e.title}),(0,p.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[(0,p.jsx)(o,{variant:`outline`,children:Q(e.type)}),(0,p.jsx)(o,{variant:e.status===`archived`?`secondary`:`outline`,children:$(e.status)}),e.granularity?(0,p.jsx)(o,{variant:`outline`,children:e.granularity}):null]}),(0,p.jsx)(`p`,{className:`mt-2 whitespace-pre-wrap break-words text-sm text-muted-foreground`,children:e.summary})]},e.id))}):O&&!A?(0,p.jsx)(`p`,{className:`rounded-lg border p-4 text-sm text-muted-foreground`,children:t(`settings.jiandu.list.empty`)}):null,A?(0,p.jsx)(`p`,{role:`status`,children:t(`settings.jiandu.list.loading`)}):null,O?.nextCursor?(0,p.jsx)(i,{variant:`outline`,className:`w-full`,disabled:A,onClick:()=>void Y(x,T,E,O.nextCursor,!0,g.current),children:t(`settings.jiandu.list.more`)}):null]}):null,(0,p.jsx)(s,{open:!!(N||ke||Ae),onOpenChange:e=>e?null:He(),children:(0,p.jsxs)(c,{showCloseButton:!1,className:`gap-4 p-5 sm:max-w-2xl`,children:[(0,p.jsx)(ne,{children:N?.title??t(`settings.jiandu.detail.title`)}),ke?(0,p.jsx)(`p`,{role:`status`,children:t(`settings.jiandu.detail.loading`)}):null,Ae?(0,p.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:Z(Ae)}):null,N?(0,p.jsxs)(`div`,{className:`min-h-0 space-y-3 overflow-y-auto`,children:[(0,p.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[(0,p.jsx)(o,{variant:`outline`,children:Q(N.type)}),(0,p.jsx)(o,{variant:N.status===`archived`?`secondary`:`outline`,children:$(N.status)})]}),N.bodyTruncated||N.retrievalMetadataTruncated?(0,p.jsx)(`p`,{role:`status`,className:`text-xs text-amber-600 dark:text-amber-400`,children:N.bodyTruncated?t(`settings.jiandu.detail.bodyTruncated`):t(`settings.jiandu.detail.metadataTruncated`)}):null,(0,p.jsx)(`pre`,{className:`max-h-[50dvh] overflow-auto whitespace-pre-wrap break-words rounded-lg bg-muted p-3 font-sans text-sm`,children:N.body})]}):null,(0,p.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[N&&N.status!==`archived`?(0,p.jsx)(i,{variant:`destructive`,onClick:()=>{q(null),K(N)},children:t(`settings.jiandu.archive.open`)}):null,(0,p.jsx)(i,{variant:`outline`,onClick:He,children:t(`settings.jiandu.detail.close`)})]})]})}),(0,p.jsx)(s,{open:je,onOpenChange:e=>e?null:Ge(),children:(0,p.jsxs)(c,{showCloseButton:!1,dismissable:W!==`create`,className:`gap-4 p-5 sm:max-w-2xl`,children:[(0,p.jsx)(ne,{children:t(`settings.jiandu.create.title`)}),(0,p.jsx)(ie,{children:t(`settings.jiandu.create.description`)}),(0,p.jsxs)(`div`,{className:`min-h-0 space-y-3 overflow-y-auto pr-1`,children:[(0,p.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,p.jsx)(d,{htmlFor:`jiandu-title`,children:t(`settings.jiandu.create.titleLabel`)}),(0,p.jsx)(oe,{id:`jiandu-title`,value:R.title,maxLength:de.titleChars,disabled:!!W,onChange:e=>X(`title`,e.target.value)})]}),(0,p.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,p.jsx)(d,{children:t(`settings.jiandu.create.typeLabel`)}),(0,p.jsxs)(ae,{value:R.type,disabled:!!W,onValueChange:e=>X(`type`,e),children:[(0,p.jsx)(ee,{className:`w-full`,"aria-label":t(`settings.jiandu.create.typeLabel`),children:(0,p.jsx)(a,{})}),(0,p.jsx)(re,{className:`z-[150]`,children:le.map(e=>(0,p.jsx)(l,{value:e,children:Q(e)},e))})]})]}),(0,p.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,p.jsx)(d,{htmlFor:`jiandu-body`,children:t(`settings.jiandu.create.bodyLabel`)}),(0,p.jsx)(te,{id:`jiandu-body`,rows:7,value:R.content,maxLength:de.bodyChars,disabled:!!W,onChange:e=>X(`content`,e.target.value)})]}),(0,p.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[[`tags`,`keywords`,`entities`].map(e=>(0,p.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,p.jsx)(d,{htmlFor:`jiandu-${e}`,children:t(`settings.jiandu.create.${e}Label`)}),(0,p.jsx)(oe,{id:`jiandu-${e}`,value:R[e],disabled:!!W,onChange:t=>X(e,t.target.value),placeholder:t(`settings.jiandu.create.csvHint`)})]},e)),(0,p.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,p.jsx)(d,{children:t(`settings.jiandu.create.granularityLabel`)}),(0,p.jsxs)(ae,{value:R.granularity||`none`,disabled:!!W,onValueChange:e=>X(`granularity`,e===`none`?``:e),children:[(0,p.jsx)(ee,{className:`w-full`,"aria-label":t(`settings.jiandu.create.granularityLabel`),children:(0,p.jsx)(a,{})}),(0,p.jsxs)(re,{className:`z-[150]`,children:[(0,p.jsx)(l,{value:`none`,children:t(`settings.jiandu.create.noGranularity`)}),me.map(e=>(0,p.jsx)(l,{value:e,children:e},e))]})]})]})]}),Ne?(0,p.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:Z(Ne)}):null,B?(0,p.jsxs)(`section`,{className:`rounded-lg border p-3`,"aria-label":t(`settings.jiandu.create.matchesLabel`),children:[(0,p.jsx)(`h3`,{className:`text-sm font-medium`,children:B.items.length>0?t(`settings.jiandu.create.matches`):t(`settings.jiandu.create.noMatches`)}),B.items.length>0?(0,p.jsx)(`ul`,{className:`mt-2 space-y-1 text-sm`,children:B.items.map(e=>(0,p.jsxs)(`li`,{children:[e.title,` · `,$(e.status)]},e.id))}):null,B.truncated?(0,p.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:t(`settings.jiandu.create.matchesTruncated`)}):null]}):null]}),(0,p.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,p.jsx)(i,{variant:`outline`,disabled:W===`create`,onClick:Ge,children:t(`settings.jiandu.create.close`)}),(0,p.jsx)(i,{variant:`secondary`,disabled:Me||!!W,onClick:()=>void Ke(),children:t(Me?`settings.jiandu.create.lookingUp`:`settings.jiandu.create.lookup`)}),(0,p.jsx)(i,{disabled:W===`create`||!B||B.fingerprint!==Ue,onClick:()=>void qe(),children:t(W===`create`?`settings.jiandu.create.creating`:`settings.jiandu.create.confirm`)})]})]})}),(0,p.jsx)(s,{open:!!Pe,onOpenChange:e=>{!e&&W!==`archive`&&(K(null),q(null))},children:(0,p.jsxs)(c,{showCloseButton:!1,dismissable:W!==`archive`,className:`gap-4 p-5`,children:[(0,p.jsx)(ne,{children:t(`settings.jiandu.archive.title`,{title:Pe?.title??``})}),(0,p.jsx)(ie,{children:t(`settings.jiandu.archive.description`)}),Fe?(0,p.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:Z(Fe)}):null,(0,p.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,p.jsx)(i,{variant:`outline`,disabled:W===`archive`,onClick:()=>{K(null),q(null)},children:t(`settings.jiandu.archive.cancel`)}),(0,p.jsx)(i,{variant:`destructive`,disabled:W===`archive`,onClick:()=>void Je(),children:t(W===`archive`?`settings.jiandu.archive.archiving`:`settings.jiandu.archive.confirm`)})]})]})})]})}export{_ as JianduProjectMemories};
|