sa2kit 1.4.2 → 1.5.1

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.
Files changed (63) hide show
  1. package/dist/ConfigService-7MEZXKJ5.js +21 -0
  2. package/dist/ConfigService-7MEZXKJ5.js.map +1 -0
  3. package/dist/ConfigService-BV57YYFW.mjs +4 -0
  4. package/dist/ConfigService-BV57YYFW.mjs.map +1 -0
  5. package/dist/ConfigService-BxK06xP6.d.mts +262 -0
  6. package/dist/ConfigService-BxK06xP6.d.ts +262 -0
  7. package/dist/audioDetection/index.d.mts +449 -0
  8. package/dist/audioDetection/index.d.ts +449 -0
  9. package/dist/audioDetection/index.js +1244 -0
  10. package/dist/audioDetection/index.js.map +1 -0
  11. package/dist/audioDetection/index.mjs +1227 -0
  12. package/dist/audioDetection/index.mjs.map +1 -0
  13. package/dist/chunk-5XUE72Y3.mjs +1001 -0
  14. package/dist/chunk-5XUE72Y3.mjs.map +1 -0
  15. package/dist/chunk-DQVPZTVC.js +1009 -0
  16. package/dist/chunk-DQVPZTVC.js.map +1 -0
  17. package/dist/chunk-NEPD75MX.mjs +467 -0
  18. package/dist/chunk-NEPD75MX.mjs.map +1 -0
  19. package/dist/chunk-OEDY7GI4.js +473 -0
  20. package/dist/chunk-OEDY7GI4.js.map +1 -0
  21. package/dist/chunk-TFQF2HDO.mjs +354 -0
  22. package/dist/chunk-TFQF2HDO.mjs.map +1 -0
  23. package/dist/chunk-TOC5FSHP.js +358 -0
  24. package/dist/chunk-TOC5FSHP.js.map +1 -0
  25. package/dist/imageCrop/index.d.mts +165 -0
  26. package/dist/imageCrop/index.d.ts +165 -0
  27. package/dist/imageCrop/index.js +559 -0
  28. package/dist/imageCrop/index.js.map +1 -0
  29. package/dist/imageCrop/index.mjs +540 -0
  30. package/dist/imageCrop/index.mjs.map +1 -0
  31. package/dist/index.d.mts +139 -0
  32. package/dist/index.d.ts +139 -0
  33. package/dist/index.js +670 -0
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +662 -0
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/mmd/index.d.mts +113 -2
  38. package/dist/mmd/index.d.ts +113 -2
  39. package/dist/mmd/index.js +484 -2
  40. package/dist/mmd/index.js.map +1 -1
  41. package/dist/mmd/index.mjs +482 -4
  42. package/dist/mmd/index.mjs.map +1 -1
  43. package/dist/testYourself/admin/index.d.mts +58 -0
  44. package/dist/testYourself/admin/index.d.ts +58 -0
  45. package/dist/testYourself/admin/index.js +17 -0
  46. package/dist/testYourself/admin/index.js.map +1 -0
  47. package/dist/testYourself/admin/index.mjs +4 -0
  48. package/dist/testYourself/admin/index.mjs.map +1 -0
  49. package/dist/testYourself/index.d.mts +6 -98
  50. package/dist/testYourself/index.d.ts +6 -98
  51. package/dist/testYourself/index.js +90 -334
  52. package/dist/testYourself/index.js.map +1 -1
  53. package/dist/testYourself/index.mjs +47 -333
  54. package/dist/testYourself/index.mjs.map +1 -1
  55. package/dist/testYourself/server/index.d.mts +1029 -0
  56. package/dist/testYourself/server/index.d.ts +1029 -0
  57. package/dist/testYourself/server/index.js +42 -0
  58. package/dist/testYourself/server/index.js.map +1 -0
  59. package/dist/testYourself/server/index.mjs +5 -0
  60. package/dist/testYourself/server/index.mjs.map +1 -0
  61. package/dist/universalFile/server/index.js +5 -5
  62. package/dist/universalFile/server/index.mjs +1 -1
  63. package/package.json +62 -20
@@ -0,0 +1,1001 @@
1
+ import React, { useState, useCallback, useEffect } from 'react';
2
+ import { AlertCircle, X, CheckCircle2, Upload, Plus, RefreshCw, Star, ExternalLink, Edit, Copy, Download, Trash2, Save, Image } from 'lucide-react';
3
+
4
+ // src/testYourself/admin/ConfigManager.tsx
5
+
6
+ // src/testYourself/data/defaultResults.ts
7
+ var DEFAULT_RESULTS = [
8
+ // 动物系列 (1-15)
9
+ {
10
+ id: "animal-cat",
11
+ title: "\u6175\u61D2\u7684\u732B\u54AA \u{1F431}",
12
+ description: "\u4F60\u5C31\u50CF\u4E00\u53EA\u4F18\u96C5\u7684\u732B\uFF0C\u72EC\u7ACB\u81EA\u4E3B\uFF0C\u559C\u6B22\u6309\u7167\u81EA\u5DF1\u7684\u8282\u594F\u751F\u6D3B\u3002\u6709\u65F6\u9AD8\u51B7\uFF0C\u6709\u65F6\u7C98\u4EBA\uFF0C\u5145\u6EE1\u795E\u79D8\u9B45\u529B\u3002",
13
+ image: "\u{1F431}",
14
+ imageType: "emoji"
15
+ },
16
+ {
17
+ id: "animal-dog",
18
+ title: "\u5FE0\u8BDA\u7684\u72D7\u72D7 \u{1F415}",
19
+ description: "\u4F60\u50CF\u4E00\u53EA\u70ED\u60C5\u7684\u72D7\u72D7\uFF0C\u5BF9\u670B\u53CB\u5FE0\u8BDA\uFF0C\u5145\u6EE1\u6D3B\u529B\u3002\u603B\u662F\u80FD\u7ED9\u5468\u56F4\u7684\u4EBA\u5E26\u6765\u6B22\u4E50\u548C\u6E29\u6696\u3002",
20
+ image: "\u{1F415}",
21
+ imageType: "emoji"
22
+ },
23
+ {
24
+ id: "animal-panda",
25
+ title: "\u53EF\u7231\u7684\u718A\u732B \u{1F43C}",
26
+ description: "\u4F60\u5C31\u50CF\u56FD\u5B9D\u718A\u732B\u4E00\u6837\uFF0C\u5446\u840C\u53EF\u7231\uFF0C\u4EBA\u89C1\u4EBA\u7231\u3002\u6162\u8282\u594F\u7684\u751F\u6D3B\u65B9\u5F0F\u8BA9\u4F60\u5145\u6EE1\u6CBB\u6108\u529B\u3002",
27
+ image: "\u{1F43C}",
28
+ imageType: "emoji"
29
+ },
30
+ {
31
+ id: "animal-fox",
32
+ title: "\u673A\u667A\u7684\u72D0\u72F8 \u{1F98A}",
33
+ description: "\u806A\u660E\u4F36\u4FD0\uFF0C\u53CD\u5E94\u654F\u6377\u3002\u4F60\u603B\u80FD\u7528\u667A\u6167\u89E3\u51B3\u95EE\u9898\uFF0C\u662F\u56E2\u961F\u4E2D\u7684\u667A\u56CA\u62C5\u5F53\u3002",
34
+ image: "\u{1F98A}",
35
+ imageType: "emoji"
36
+ },
37
+ {
38
+ id: "animal-owl",
39
+ title: "\u777F\u667A\u7684\u732B\u5934\u9E70 \u{1F989}",
40
+ description: "\u4F60\u50CF\u732B\u5934\u9E70\u4E00\u6837\u5145\u6EE1\u667A\u6167\uFF0C\u559C\u6B22\u5728\u591C\u6DF1\u4EBA\u9759\u65F6\u601D\u8003\u3002\u7406\u6027\u3001\u6C89\u7A33\u662F\u4F60\u7684\u6807\u7B7E\u3002",
41
+ image: "\u{1F989}",
42
+ imageType: "emoji"
43
+ },
44
+ {
45
+ id: "animal-dolphin",
46
+ title: "\u5FEB\u4E50\u7684\u6D77\u8C5A \u{1F42C}",
47
+ description: "\u6D3B\u6CFC\u5F00\u6717\uFF0C\u793E\u4EA4\u8FBE\u4EBA\u3002\u4F60\u7684\u7B11\u5BB9\u80FD\u591F\u611F\u67D3\u8EAB\u8FB9\u7684\u6BCF\u4E00\u4E2A\u4EBA\u3002",
48
+ image: "\u{1F42C}",
49
+ imageType: "emoji"
50
+ },
51
+ {
52
+ id: "animal-butterfly",
53
+ title: "\u81EA\u7531\u7684\u8774\u8776 \u{1F98B}",
54
+ description: "\u8FFD\u6C42\u81EA\u7531\uFF0C\u70ED\u7231\u7F8E\u597D\u4E8B\u7269\u3002\u4F60\u7684\u4EBA\u751F\u5145\u6EE1\u8272\u5F69\uFF0C\u4ECE\u4E0D\u88AB\u675F\u7F1A\u3002",
55
+ image: "\u{1F98B}",
56
+ imageType: "emoji"
57
+ },
58
+ {
59
+ id: "animal-lion",
60
+ title: "\u52C7\u6562\u7684\u72EE\u5B50 \u{1F981}",
61
+ description: "\u5929\u751F\u7684\u9886\u5BFC\u8005\uFF0C\u52C7\u6562\u679C\u65AD\u3002\u4F60\u7684\u6C14\u573A\u5F3A\u5927\uFF0C\u603B\u80FD\u6FC0\u52B1\u4ED6\u4EBA\u3002",
62
+ image: "\u{1F981}",
63
+ imageType: "emoji"
64
+ },
65
+ {
66
+ id: "animal-rabbit",
67
+ title: "\u6E29\u67D4\u7684\u5154\u5B50 \u{1F430}",
68
+ description: "\u5FC3\u5730\u5584\u826F\uFF0C\u6E29\u67D4\u4F53\u8D34\u3002\u4F60\u7684\u5B58\u5728\u5C31\u50CF\u6625\u5929\u7684\u5FAE\u98CE\uFF0C\u8BA9\u4EBA\u611F\u5230\u6E29\u6696\u3002",
69
+ image: "\u{1F430}",
70
+ imageType: "emoji"
71
+ },
72
+ {
73
+ id: "animal-penguin",
74
+ title: "\u5446\u840C\u7684\u4F01\u9E45 \u{1F427}",
75
+ description: "\u61A8\u6001\u53EF\u63AC\uFF0C\u8BA4\u771F\u6267\u7740\u3002\u867D\u7136\u770B\u8D77\u6765\u7B28\u62D9\uFF0C\u4F46\u505A\u4E8B\u4E00\u4E1D\u4E0D\u82DF\u3002",
76
+ image: "\u{1F427}",
77
+ imageType: "emoji"
78
+ },
79
+ {
80
+ id: "animal-eagle",
81
+ title: "\u7FF1\u7FD4\u7684\u96C4\u9E70 \u{1F985}",
82
+ description: "\u76EE\u5149\u8FDC\u5927\uFF0C\u5FD7\u5411\u9AD8\u8FDC\u3002\u4F60\u603B\u662F\u80FD\u770B\u5230\u522B\u4EBA\u770B\u4E0D\u5230\u7684\u673A\u4F1A\u3002",
83
+ image: "\u{1F985}",
84
+ imageType: "emoji"
85
+ },
86
+ {
87
+ id: "animal-koala",
88
+ title: "\u6175\u61D2\u7684\u8003\u62C9 \u{1F428}",
89
+ description: "\u4F5B\u7CFB\u751F\u6D3B\uFF0C\u77E5\u8DB3\u5E38\u4E50\u3002\u4F60\u61C2\u5F97\u4EAB\u53D7\u5F53\u4E0B\uFF0C\u6D3B\u5728\u81EA\u5DF1\u7684\u8282\u594F\u91CC\u3002",
90
+ image: "\u{1F428}",
91
+ imageType: "emoji"
92
+ },
93
+ {
94
+ id: "animal-sloth",
95
+ title: "\u60A0\u95F2\u7684\u6811\u61D2 \u{1F9A5}",
96
+ description: "\u6162\u6162\u6765\uFF0C\u6BD4\u8F83\u5FEB\u3002\u4F60\u76F8\u4FE1\u6025\u4E0D\u6765\u7684\u4E8B\u5C31\u4E0D\u8981\u6025\uFF0C\u4FDD\u6301\u81EA\u5DF1\u7684pace\u3002",
97
+ image: "\u{1F9A5}",
98
+ imageType: "emoji"
99
+ },
100
+ {
101
+ id: "animal-unicorn",
102
+ title: "\u68A6\u5E7B\u7684\u72EC\u89D2\u517D \u{1F984}",
103
+ description: "\u5145\u6EE1\u5E7B\u60F3\uFF0C\u8FFD\u6C42\u5B8C\u7F8E\u3002\u4F60\u7684\u4E16\u754C\u4E94\u5F69\u6591\u6593\uFF0C\u603B\u6709\u72EC\u7279\u7684\u60F3\u6CD5\u3002",
104
+ image: "\u{1F984}",
105
+ imageType: "emoji"
106
+ },
107
+ {
108
+ id: "animal-dragon",
109
+ title: "\u795E\u79D8\u7684\u9F99 \u{1F409}",
110
+ description: "\u5F3A\u5927\u800C\u795E\u79D8\uFF0C\u5145\u6EE1\u9B45\u529B\u3002\u4F60\u662F\u4F20\u8BF4\u4E2D\u7684\u5B58\u5728\uFF0C\u4EE4\u4EBA\u5411\u5F80\u3002",
111
+ image: "\u{1F409}",
112
+ imageType: "emoji"
113
+ },
114
+ // 星球系列 (16-25)
115
+ {
116
+ id: "planet-sun",
117
+ title: "\u6E29\u6696\u7684\u592A\u9633 \u2600\uFE0F",
118
+ description: "\u4F60\u5C31\u50CF\u592A\u9633\u4E00\u6837\uFF0C\u662F\u56E2\u961F\u7684\u80FD\u91CF\u6765\u6E90\uFF0C\u6E29\u6696\u7740\u5468\u56F4\u7684\u6BCF\u4E2A\u4EBA\u3002",
119
+ image: "\u2600\uFE0F",
120
+ imageType: "emoji"
121
+ },
122
+ {
123
+ id: "planet-moon",
124
+ title: "\u6E29\u67D4\u7684\u6708\u4EAE \u{1F319}",
125
+ description: "\u5B89\u9759\u800C\u6E29\u67D4\uFF0C\u5728\u9ED1\u6697\u4E2D\u7ED9\u4EBA\u5149\u660E\u3002\u4F60\u662F\u591C\u665A\u6700\u7F8E\u7684\u966A\u4F34\u3002",
126
+ image: "\u{1F319}",
127
+ imageType: "emoji"
128
+ },
129
+ {
130
+ id: "planet-star",
131
+ title: "\u95EA\u8000\u7684\u661F\u661F \u2B50",
132
+ description: "\u867D\u7136\u6E3A\u5C0F\uFF0C\u4F46\u59CB\u7EC8\u95EA\u8000\u3002\u4F60\u7528\u81EA\u5DF1\u7684\u65B9\u5F0F\u53D1\u5149\u53D1\u70ED\u3002",
133
+ image: "\u2B50",
134
+ imageType: "emoji"
135
+ },
136
+ {
137
+ id: "planet-earth",
138
+ title: "\u5305\u5BB9\u7684\u5730\u7403 \u{1F30D}",
139
+ description: "\u5305\u5BB9\u4E07\u7269\uFF0C\u751F\u673A\u52C3\u52C3\u3002\u4F60\u6709\u7740\u5BBD\u5E7F\u7684\u80F8\u6000\u548C\u65E0\u9650\u7684\u53EF\u80FD\u3002",
140
+ image: "\u{1F30D}",
141
+ imageType: "emoji"
142
+ },
143
+ {
144
+ id: "planet-saturn",
145
+ title: "\u72EC\u7279\u7684\u571F\u661F \u{1FA90}",
146
+ description: "\u4E0E\u4F17\u4E0D\u540C\uFF0C\u81EA\u6210\u4E00\u683C\u3002\u4F60\u7684\u4E2A\u6027\u5C31\u50CF\u571F\u661F\u73AF\u4E00\u6837\u4EE4\u4EBA\u7740\u8FF7\u3002",
147
+ image: "\u{1FA90}",
148
+ imageType: "emoji"
149
+ },
150
+ {
151
+ id: "weather-rainbow",
152
+ title: "\u7EDA\u4E3D\u7684\u5F69\u8679 \u{1F308}",
153
+ description: "\u98CE\u96E8\u8FC7\u540E\u89C1\u5F69\u8679\uFF0C\u4F60\u603B\u80FD\u5728\u56F0\u96BE\u540E\u770B\u5230\u5E0C\u671B\u548C\u7F8E\u597D\u3002",
154
+ image: "\u{1F308}",
155
+ imageType: "emoji"
156
+ },
157
+ {
158
+ id: "weather-cloud",
159
+ title: "\u98D8\u9038\u7684\u4E91\u6735 \u2601\uFE0F",
160
+ description: "\u81EA\u7531\u81EA\u5728\uFF0C\u968F\u98CE\u98D8\u8361\u3002\u4F60\u4E0D\u88AB\u5B9A\u4E49\uFF0C\u6C38\u8FDC\u5145\u6EE1\u53EF\u80FD\u3002",
161
+ image: "\u2601\uFE0F",
162
+ imageType: "emoji"
163
+ },
164
+ {
165
+ id: "weather-lightning",
166
+ title: "\u95EA\u7535 \u26A1",
167
+ description: "\u7206\u53D1\u529B\u5F3A\uFF0C\u884C\u52A8\u8FC5\u901F\u3002\u4F60\u7684\u80FD\u91CF\u5C31\u50CF\u95EA\u7535\u4E00\u6837\u4EE4\u4EBA\u9707\u64BC\u3002",
168
+ image: "\u26A1",
169
+ imageType: "emoji"
170
+ },
171
+ {
172
+ id: "weather-snowflake",
173
+ title: "\u72EC\u7279\u7684\u96EA\u82B1 \u2744\uFE0F",
174
+ description: "\u4E16\u754C\u4E0A\u6CA1\u6709\u4E24\u7247\u76F8\u540C\u7684\u96EA\u82B1\uFF0C\u4F60\u4E5F\u662F\u72EC\u4E00\u65E0\u4E8C\u7684\u5B58\u5728\u3002",
175
+ image: "\u2744\uFE0F",
176
+ imageType: "emoji"
177
+ },
178
+ {
179
+ id: "weather-fire",
180
+ title: "\u70ED\u60C5\u7684\u706B\u7130 \u{1F525}",
181
+ description: "\u70ED\u60C5\u4F3C\u706B\uFF0C\u5145\u6EE1\u6FC0\u60C5\u3002\u4F60\u7684\u5B58\u5728\u80FD\u70B9\u71C3\u5468\u56F4\u7684\u6C14\u6C1B\u3002",
182
+ image: "\u{1F525}",
183
+ imageType: "emoji"
184
+ },
185
+ // 植物系列 (26-35)
186
+ {
187
+ id: "plant-tree",
188
+ title: "\u575A\u97E7\u7684\u5927\u6811 \u{1F333}",
189
+ description: "\u7A33\u91CD\u53EF\u9760\uFF0C\u6839\u57FA\u6DF1\u539A\u3002\u4F60\u662F\u5927\u5BB6\u53EF\u4EE5\u4F9D\u9760\u7684\u5B58\u5728\u3002",
190
+ image: "\u{1F333}",
191
+ imageType: "emoji"
192
+ },
193
+ {
194
+ id: "plant-flower",
195
+ title: "\u7F8E\u4E3D\u7684\u82B1\u6735 \u{1F338}",
196
+ description: "\u7EFD\u653E\u81EA\u6211\uFF0C\u7F8E\u4E3D\u52A8\u4EBA\u3002\u4F60\u7684\u5B58\u5728\u5C31\u662F\u4E00\u9053\u9753\u4E3D\u7684\u98CE\u666F\u3002",
197
+ image: "\u{1F338}",
198
+ imageType: "emoji"
199
+ },
200
+ {
201
+ id: "plant-sunflower",
202
+ title: "\u5411\u9633\u7684\u5411\u65E5\u8475 \u{1F33B}",
203
+ description: "\u6C38\u8FDC\u5411\u7740\u9633\u5149\uFF0C\u79EF\u6781\u5411\u4E0A\u3002\u4F60\u7684\u4E50\u89C2\u611F\u67D3\u7740\u6BCF\u4E2A\u4EBA\u3002",
204
+ image: "\u{1F33B}",
205
+ imageType: "emoji"
206
+ },
207
+ {
208
+ id: "plant-rose",
209
+ title: "\u4F18\u96C5\u7684\u73AB\u7470 \u{1F339}",
210
+ description: "\u9AD8\u8D35\u4F18\u96C5\uFF0C\u5145\u6EE1\u9B45\u529B\u3002\u867D\u6709\u523A\u4F46\u66F4\u6709\u7F8E\u4E3D\u3002",
211
+ image: "\u{1F339}",
212
+ imageType: "emoji"
213
+ },
214
+ {
215
+ id: "plant-cactus",
216
+ title: "\u575A\u5F3A\u7684\u4ED9\u4EBA\u638C \u{1F335}",
217
+ description: "\u5728\u8270\u96BE\u73AF\u5883\u4E2D\u4F9D\u7136\u575A\u5F3A\u3002\u4F60\u7684\u97E7\u6027\u4EE4\u4EBA\u656C\u4F69\u3002",
218
+ image: "\u{1F335}",
219
+ imageType: "emoji"
220
+ },
221
+ {
222
+ id: "plant-clover",
223
+ title: "\u5E78\u8FD0\u7684\u56DB\u53F6\u8349 \u{1F340}",
224
+ description: "\u5E78\u8FD0\u7684\u8C61\u5F81\uFF0C\u603B\u80FD\u7ED9\u4EBA\u5E26\u6765\u597D\u8FD0\u548C\u5E0C\u671B\u3002",
225
+ image: "\u{1F340}",
226
+ imageType: "emoji"
227
+ },
228
+ {
229
+ id: "plant-maple",
230
+ title: "\u6D6A\u6F2B\u7684\u67AB\u53F6 \u{1F341}",
231
+ description: "\u6D6A\u6F2B\u800C\u8BD7\u610F\uFF0C\u4F60\u7684\u4E16\u754C\u5145\u6EE1\u827A\u672F\u6C14\u606F\u3002",
232
+ image: "\u{1F341}",
233
+ imageType: "emoji"
234
+ },
235
+ {
236
+ id: "plant-mushroom",
237
+ title: "\u795E\u79D8\u7684\u8611\u83C7 \u{1F344}",
238
+ description: "\u4F4E\u8C03\u795E\u79D8\uFF0C\u603B\u6709\u610F\u60F3\u4E0D\u5230\u7684\u60CA\u559C\u3002",
239
+ image: "\u{1F344}",
240
+ imageType: "emoji"
241
+ },
242
+ {
243
+ id: "plant-cherry",
244
+ title: "\u6D6A\u6F2B\u7684\u6A31\u82B1 \u{1F338}",
245
+ description: "\u77ED\u6682\u800C\u7F8E\u597D\uFF0C\u4F60\u73CD\u60DC\u6BCF\u4E00\u4E2A\u77AC\u95F4\u7684\u7F8E\u4E3D\u3002",
246
+ image: "\u{1F338}",
247
+ imageType: "emoji"
248
+ },
249
+ {
250
+ id: "plant-bamboo",
251
+ title: "\u575A\u97E7\u7684\u7AF9\u5B50 \u{1F38B}",
252
+ description: "\u865A\u5FC3\u6709\u8282\uFF0C\u6108\u632B\u6108\u52C7\u3002\u4F60\u7684\u7CBE\u795E\u503C\u5F97\u5B66\u4E60\u3002",
253
+ image: "\u{1F38B}",
254
+ imageType: "emoji"
255
+ },
256
+ // 食物系列 (36-45)
257
+ {
258
+ id: "food-coffee",
259
+ title: "\u63D0\u795E\u7684\u5496\u5561 \u2615",
260
+ description: "\u4F60\u5C31\u50CF\u5496\u5561\uFF0C\u662F\u5927\u5BB6\u7684\u80FD\u91CF\u6765\u6E90\uFF0C\u5E2E\u52A9\u4ED6\u4EBA\u4FDD\u6301\u6D3B\u529B\u3002",
261
+ image: "\u2615",
262
+ imageType: "emoji"
263
+ },
264
+ {
265
+ id: "food-pizza",
266
+ title: "\u5FEB\u4E50\u7684\u62AB\u8428 \u{1F355}",
267
+ description: "\u4EBA\u89C1\u4EBA\u7231\uFF0C\u603B\u80FD\u5E26\u6765\u5FEB\u4E50\u3002\u4F60\u662F\u805A\u4F1A\u7684\u7075\u9B42\u3002",
268
+ image: "\u{1F355}",
269
+ imageType: "emoji"
270
+ },
271
+ {
272
+ id: "food-cookie",
273
+ title: "\u751C\u871C\u7684\u997C\u5E72 \u{1F36A}",
274
+ description: "\u6E29\u6696\u751C\u871C\uFF0C\u7ED9\u4EBAcomfort\u3002\u4F60\u662F\u6700\u597D\u7684\u6CBB\u6108\u7CFB\u5B58\u5728\u3002",
275
+ image: "\u{1F36A}",
276
+ imageType: "emoji"
277
+ },
278
+ {
279
+ id: "food-icecream",
280
+ title: "\u6E05\u51C9\u7684\u51B0\u6DC7\u6DCB \u{1F366}",
281
+ description: "\u751C\u7F8E\u53EF\u7231\uFF0C\u5728\u708E\u70ED\u65F6\u7ED9\u4EBA\u6E05\u51C9\u3002\u4F60\u603B\u80FD\u5728\u5173\u952E\u65F6\u523B\u51FA\u73B0\u3002",
282
+ image: "\u{1F366}",
283
+ imageType: "emoji"
284
+ },
285
+ {
286
+ id: "food-honey",
287
+ title: "\u751C\u871C\u7684\u8702\u871C \u{1F36F}",
288
+ description: "\u5929\u7136\u751C\u7F8E\uFF0C\u7EAF\u7CB9\u53EF\u7231\u3002\u4F60\u7684\u5B58\u5728\u5C31\u662F\u5E78\u798F\u7684\u5473\u9053\u3002",
289
+ image: "\u{1F36F}",
290
+ imageType: "emoji"
291
+ },
292
+ {
293
+ id: "food-sushi",
294
+ title: "\u7CBE\u81F4\u7684\u5BFF\u53F8 \u{1F363}",
295
+ description: "\u7CBE\u81F4\u4F18\u96C5\uFF0C\u6CE8\u91CD\u7EC6\u8282\u3002\u4F60\u5BF9\u751F\u6D3B\u6709\u7740\u72EC\u7279\u7684\u54C1\u5473\u3002",
296
+ image: "\u{1F363}",
297
+ imageType: "emoji"
298
+ },
299
+ {
300
+ id: "food-cake",
301
+ title: "\u751C\u7F8E\u7684\u86CB\u7CD5 \u{1F382}",
302
+ description: "\u751C\u871C\u7F8E\u597D\uFF0C\u662F\u5E86\u795D\u7684\u8C61\u5F81\u3002\u4F60\u603B\u80FD\u7ED9\u4EBA\u5E26\u6765\u60CA\u559C\u3002",
303
+ image: "\u{1F382}",
304
+ imageType: "emoji"
305
+ },
306
+ {
307
+ id: "food-donut",
308
+ title: "\u53EF\u7231\u7684\u751C\u751C\u5708 \u{1F369}",
309
+ description: "\u5706\u5706\u6EE1\u6EE1\uFF0C\u751C\u871C\u53EF\u7231\u3002\u4F60\u7684\u5B58\u5728\u8BA9\u751F\u6D3B\u66F4\u7F8E\u597D\u3002",
310
+ image: "\u{1F369}",
311
+ imageType: "emoji"
312
+ },
313
+ {
314
+ id: "food-lollipop",
315
+ title: "\u7AE5\u771F\u7684\u68D2\u68D2\u7CD6 \u{1F36D}",
316
+ description: "\u4FDD\u6301\u7AE5\u5FC3\uFF0C\u6C38\u8FDC\u5E74\u8F7B\u3002\u4F60\u7684\u7EAF\u771F\u4EE4\u4EBA\u7FA1\u6155\u3002",
317
+ image: "\u{1F36D}",
318
+ imageType: "emoji"
319
+ },
320
+ {
321
+ id: "food-watermelon",
322
+ title: "\u6E05\u723D\u7684\u897F\u74DC \u{1F349}",
323
+ description: "\u6E05\u723D\u89E3\u6E34\uFF0C\u590F\u65E5\u5FC5\u5907\u3002\u4F60\u603B\u80FD\u5E26\u6765\u6E05\u65B0\u7684\u611F\u89C9\u3002",
324
+ image: "\u{1F349}",
325
+ imageType: "emoji"
326
+ }
327
+ ];
328
+ if (DEFAULT_RESULTS.length !== 45) {
329
+ console.warn(`\u7ED3\u679C\u6570\u636E\u96C6\u5E94\u5305\u542B45\u9879\uFF0C\u5F53\u524D: ${DEFAULT_RESULTS.length}`);
330
+ }
331
+
332
+ // src/testYourself/admin/ConfigManager.tsx
333
+ var ConfigManager = ({
334
+ configService,
335
+ onConfigChange,
336
+ className = "",
337
+ onImageUpload
338
+ }) => {
339
+ const [configs, setConfigs] = useState([]);
340
+ const [selectedConfig, setSelectedConfig] = useState(null);
341
+ const [isEditing, setIsEditing] = useState(false);
342
+ const [isCreating, setIsCreating] = useState(false);
343
+ const [loading, setLoading] = useState(true);
344
+ const [error, setError] = useState(null);
345
+ const [success, setSuccess] = useState(null);
346
+ const [editForm, setEditForm] = useState({
347
+ name: "",
348
+ description: "",
349
+ gameTitle: "",
350
+ gameDescription: "",
351
+ buttonText: "\u957F\u6309\u5F00\u59CB\u6D4B\u8BD5",
352
+ longPressDuration: 2e3,
353
+ results: []
354
+ });
355
+ const loadConfigs = useCallback(async () => {
356
+ try {
357
+ setLoading(true);
358
+ const allConfigs = await configService.getAllConfigs();
359
+ setConfigs(allConfigs);
360
+ onConfigChange?.(allConfigs);
361
+ } catch (err) {
362
+ setError(`\u52A0\u8F7D\u914D\u7F6E\u5931\u8D25: ${err.message}`);
363
+ } finally {
364
+ setLoading(false);
365
+ }
366
+ }, [configService, onConfigChange]);
367
+ useEffect(() => {
368
+ loadConfigs();
369
+ }, [loadConfigs]);
370
+ const handleStartCreate = () => {
371
+ setEditForm({
372
+ name: "\u65B0\u914D\u7F6E",
373
+ description: "",
374
+ gameTitle: "\u6D4B\u6D4B\u4F60\u662F\u4EC0\u4E48",
375
+ gameDescription: "\u957F\u6309\u6309\u94AE\uFF0C\u53D1\u73B0\u4F60\u7684\u4E13\u5C5E\u5C5E\u6027",
376
+ buttonText: "\u957F\u6309\u5F00\u59CB\u6D4B\u8BD5",
377
+ longPressDuration: 2e3,
378
+ results: []
379
+ });
380
+ setIsCreating(true);
381
+ setIsEditing(true);
382
+ setSelectedConfig(null);
383
+ };
384
+ const handleStartEdit = (config) => {
385
+ setEditForm({
386
+ name: config.name,
387
+ description: config.description || "",
388
+ gameTitle: config.config.gameTitle,
389
+ gameDescription: config.config.gameDescription || "",
390
+ buttonText: config.config.buttonText || "\u957F\u6309\u5F00\u59CB\u6D4B\u8BD5",
391
+ longPressDuration: config.config.longPressDuration || 2e3,
392
+ results: config.config.results
393
+ });
394
+ setIsCreating(false);
395
+ setIsEditing(true);
396
+ setSelectedConfig(config);
397
+ };
398
+ const handleCancelEdit = () => {
399
+ setIsEditing(false);
400
+ setIsCreating(false);
401
+ setSelectedConfig(null);
402
+ setError(null);
403
+ };
404
+ const handleSave = async () => {
405
+ try {
406
+ setError(null);
407
+ if (!editForm.name.trim()) {
408
+ setError("\u8BF7\u8F93\u5165\u914D\u7F6E\u540D\u79F0");
409
+ return;
410
+ }
411
+ if (!editForm.gameTitle.trim()) {
412
+ setError("\u8BF7\u8F93\u5165\u6E38\u620F\u6807\u9898");
413
+ return;
414
+ }
415
+ if (editForm.results.length === 0) {
416
+ setError("\u8BF7\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u7ED3\u679C\u9879");
417
+ return;
418
+ }
419
+ const testConfig = {
420
+ gameTitle: editForm.gameTitle,
421
+ gameDescription: editForm.gameDescription,
422
+ buttonText: editForm.buttonText,
423
+ longPressDuration: editForm.longPressDuration,
424
+ results: editForm.results
425
+ };
426
+ if (isCreating) {
427
+ await configService.createConfig(
428
+ editForm.name,
429
+ testConfig,
430
+ editForm.description
431
+ );
432
+ setSuccess("\u521B\u5EFA\u914D\u7F6E\u6210\u529F\uFF01");
433
+ } else if (selectedConfig) {
434
+ await configService.updateConfig(selectedConfig.id, {
435
+ name: editForm.name,
436
+ description: editForm.description,
437
+ config: testConfig
438
+ });
439
+ setSuccess("\u66F4\u65B0\u914D\u7F6E\u6210\u529F\uFF01");
440
+ }
441
+ await loadConfigs();
442
+ handleCancelEdit();
443
+ setTimeout(() => setSuccess(null), 3e3);
444
+ } catch (err) {
445
+ setError(`\u4FDD\u5B58\u5931\u8D25: ${err.message}`);
446
+ }
447
+ };
448
+ const handleDelete = async (id) => {
449
+ if (!confirm("\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A\u914D\u7F6E\u5417\uFF1F")) return;
450
+ try {
451
+ await configService.deleteConfig(id);
452
+ await loadConfigs();
453
+ setSuccess("\u5220\u9664\u6210\u529F\uFF01");
454
+ setTimeout(() => setSuccess(null), 3e3);
455
+ } catch (err) {
456
+ setError(`\u5220\u9664\u5931\u8D25: ${err.message}`);
457
+ }
458
+ };
459
+ const handleDuplicate = async (id) => {
460
+ try {
461
+ await configService.duplicateConfig(id);
462
+ await loadConfigs();
463
+ setSuccess("\u590D\u5236\u6210\u529F\uFF01");
464
+ setTimeout(() => setSuccess(null), 3e3);
465
+ } catch (err) {
466
+ setError(`\u590D\u5236\u5931\u8D25: ${err.message}`);
467
+ }
468
+ };
469
+ const handleSetDefault = async (id) => {
470
+ try {
471
+ await configService.setDefaultConfig(id);
472
+ await loadConfigs();
473
+ setSuccess("\u8BBE\u7F6E\u9ED8\u8BA4\u914D\u7F6E\u6210\u529F\uFF01");
474
+ setTimeout(() => setSuccess(null), 3e3);
475
+ } catch (err) {
476
+ setError(`\u8BBE\u7F6E\u5931\u8D25: ${err.message}`);
477
+ }
478
+ };
479
+ const handleExport = async (id) => {
480
+ try {
481
+ const jsonString = await configService.exportConfig(id);
482
+ const blob = new Blob([jsonString], { type: "application/json" });
483
+ const url = URL.createObjectURL(blob);
484
+ const a = document.createElement("a");
485
+ a.href = url;
486
+ a.download = `config_${id}.json`;
487
+ document.body.appendChild(a);
488
+ a.click();
489
+ document.body.removeChild(a);
490
+ URL.revokeObjectURL(url);
491
+ setSuccess("\u5BFC\u51FA\u6210\u529F\uFF01");
492
+ setTimeout(() => setSuccess(null), 3e3);
493
+ } catch (err) {
494
+ setError(`\u5BFC\u51FA\u5931\u8D25: ${err.message}`);
495
+ }
496
+ };
497
+ const handleImport = async () => {
498
+ const input = document.createElement("input");
499
+ input.type = "file";
500
+ input.accept = ".json";
501
+ input.onchange = async (e) => {
502
+ const file = e.target.files?.[0];
503
+ if (!file) return;
504
+ try {
505
+ const text = await file.text();
506
+ await configService.importConfig(text);
507
+ await loadConfigs();
508
+ setSuccess("\u5BFC\u5165\u6210\u529F\uFF01");
509
+ setTimeout(() => setSuccess(null), 3e3);
510
+ } catch (err) {
511
+ setError(`\u5BFC\u5165\u5931\u8D25: ${err.message}`);
512
+ }
513
+ };
514
+ input.click();
515
+ };
516
+ const handleAddResult = () => {
517
+ const newResult = {
518
+ id: `temp_${Date.now()}`,
519
+ _tempId: `temp_${Date.now()}`,
520
+ title: "\u65B0\u7ED3\u679C",
521
+ description: "\u8FD9\u662F\u4E00\u4E2A\u65B0\u7684\u7ED3\u679C\u63CF\u8FF0",
522
+ image: "\u{1F389}",
523
+ imageType: "emoji"
524
+ };
525
+ setEditForm({
526
+ ...editForm,
527
+ results: [...editForm.results, newResult]
528
+ });
529
+ };
530
+ const handleDeleteResult = (index) => {
531
+ const newResults = [...editForm.results];
532
+ newResults.splice(index, 1);
533
+ setEditForm({ ...editForm, results: newResults });
534
+ };
535
+ const handleUpdateResult = (index, updates) => {
536
+ const newResults = [...editForm.results];
537
+ newResults[index] = { ...newResults[index], ...updates };
538
+ setEditForm({ ...editForm, results: newResults });
539
+ };
540
+ const handleResultImageUpload = async (index, file) => {
541
+ try {
542
+ if (!onImageUpload) {
543
+ const reader = new FileReader();
544
+ reader.onload = (e) => {
545
+ const base64 = e.target?.result;
546
+ handleUpdateResult(index, {
547
+ image: base64,
548
+ imageType: "url"
549
+ });
550
+ };
551
+ reader.readAsDataURL(file);
552
+ } else {
553
+ const url = await onImageUpload(file);
554
+ handleUpdateResult(index, {
555
+ image: url,
556
+ imageType: "url"
557
+ });
558
+ }
559
+ } catch (err) {
560
+ setError(`\u4E0A\u4F20\u56FE\u7247\u5931\u8D25: ${err.message}`);
561
+ }
562
+ };
563
+ const handleUseDefaultResults = () => {
564
+ if (confirm("\u786E\u5B9A\u8981\u4F7F\u7528\u9ED8\u8BA4\u768445\u4E2A\u7ED3\u679C\u5417\uFF1F\u8FD9\u5C06\u66FF\u6362\u5F53\u524D\u7684\u6240\u6709\u7ED3\u679C\u3002")) {
565
+ setEditForm({ ...editForm, results: DEFAULT_RESULTS });
566
+ }
567
+ };
568
+ const renderConfigList = () => /* @__PURE__ */ React.createElement("div", { className: "space-y-4" }, configs.map((config) => /* @__PURE__ */ React.createElement(
569
+ "div",
570
+ {
571
+ key: config.id,
572
+ className: "bg-white dark:bg-gray-800 rounded-lg shadow-sm p-4 border border-gray-200 dark:border-gray-700 hover:shadow-md transition-shadow"
573
+ },
574
+ /* @__PURE__ */ React.createElement("div", { className: "flex items-start justify-between" }, /* @__PURE__ */ React.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React.createElement("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white" }, config.name), config.isDefault && /* @__PURE__ */ React.createElement("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" }, /* @__PURE__ */ React.createElement(Star, { className: "w-3 h-3" }), "\u9ED8\u8BA4")), config.description && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-gray-600 dark:text-gray-400 mb-2" }, config.description), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4 text-xs text-gray-500 dark:text-gray-400" }, /* @__PURE__ */ React.createElement("span", null, "\u7ED3\u679C\u6570: ", config.config.results.length), /* @__PURE__ */ React.createElement("span", null, "\u521B\u5EFA: ", new Date(config.createdAt).toLocaleDateString()))), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
575
+ "button",
576
+ {
577
+ onClick: () => handleSetDefault(config.id),
578
+ disabled: config.isDefault,
579
+ className: "p-2 text-gray-600 hover:text-yellow-600 disabled:opacity-50 disabled:cursor-not-allowed",
580
+ title: "\u8BBE\u4E3A\u9ED8\u8BA4"
581
+ },
582
+ /* @__PURE__ */ React.createElement(Star, { className: "w-5 h-5" })
583
+ ), /* @__PURE__ */ React.createElement(
584
+ "button",
585
+ {
586
+ onClick: () => handleStartEdit(config),
587
+ className: "p-2 text-gray-600 hover:text-blue-600",
588
+ title: "\u7F16\u8F91"
589
+ },
590
+ /* @__PURE__ */ React.createElement(Edit, { className: "w-5 h-5" })
591
+ ), /* @__PURE__ */ React.createElement(
592
+ "button",
593
+ {
594
+ onClick: () => handleDuplicate(config.id),
595
+ className: "p-2 text-gray-600 hover:text-green-600",
596
+ title: "\u590D\u5236"
597
+ },
598
+ /* @__PURE__ */ React.createElement(Copy, { className: "w-5 h-5" })
599
+ ), /* @__PURE__ */ React.createElement(
600
+ "button",
601
+ {
602
+ onClick: () => handleExport(config.id),
603
+ className: "p-2 text-gray-600 hover:text-purple-600",
604
+ title: "\u5BFC\u51FA"
605
+ },
606
+ /* @__PURE__ */ React.createElement(Download, { className: "w-5 h-5" })
607
+ ), /* @__PURE__ */ React.createElement(
608
+ "button",
609
+ {
610
+ onClick: () => handleDelete(config.id),
611
+ className: "p-2 text-gray-600 hover:text-red-600",
612
+ title: "\u5220\u9664"
613
+ },
614
+ /* @__PURE__ */ React.createElement(Trash2, { className: "w-5 h-5" })
615
+ )))
616
+ )));
617
+ const renderResultEditor = (result, index) => /* @__PURE__ */ React.createElement(
618
+ "div",
619
+ {
620
+ key: result._tempId || result.id,
621
+ className: "bg-gray-50 dark:bg-gray-700 rounded-lg p-4 space-y-3"
622
+ },
623
+ /* @__PURE__ */ React.createElement("div", { className: "flex items-start justify-between" }, /* @__PURE__ */ React.createElement("h4", { className: "text-sm font-medium text-gray-700 dark:text-gray-300" }, "\u7ED3\u679C #", index + 1), /* @__PURE__ */ React.createElement(
624
+ "button",
625
+ {
626
+ onClick: () => handleDeleteResult(index),
627
+ className: "text-red-600 hover:text-red-700"
628
+ },
629
+ /* @__PURE__ */ React.createElement(Trash2, { className: "w-4 h-4" })
630
+ )),
631
+ /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-3" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1" }, "\u6807\u9898"), /* @__PURE__ */ React.createElement(
632
+ "input",
633
+ {
634
+ type: "text",
635
+ value: result.title,
636
+ onChange: (e) => handleUpdateResult(index, { title: e.target.value }),
637
+ className: "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-800 dark:text-white",
638
+ placeholder: "\u4F8B\u5982: \u53EF\u7231\u7684\u732B\u54AA"
639
+ }
640
+ )), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1" }, "\u56FE\u7247/Emoji"), /* @__PURE__ */ React.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React.createElement(
641
+ "input",
642
+ {
643
+ type: "text",
644
+ value: result.image,
645
+ onChange: (e) => handleUpdateResult(index, { image: e.target.value }),
646
+ className: "flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-800 dark:text-white",
647
+ placeholder: "\u{1F389} \u6216 URL"
648
+ }
649
+ ), /* @__PURE__ */ React.createElement("label", { className: "cursor-pointer inline-flex items-center justify-center px-3 py-2 bg-blue-50 dark:bg-blue-900 text-blue-600 dark:text-blue-200 rounded-lg hover:bg-blue-100 dark:hover:bg-blue-800" }, /* @__PURE__ */ React.createElement(Image, { className: "w-5 h-5" }), /* @__PURE__ */ React.createElement(
650
+ "input",
651
+ {
652
+ type: "file",
653
+ accept: "image/*",
654
+ className: "hidden",
655
+ onChange: (e) => {
656
+ const file = e.target.files?.[0];
657
+ if (file) handleResultImageUpload(index, file);
658
+ }
659
+ }
660
+ ))))),
661
+ /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1" }, "\u63CF\u8FF0"), /* @__PURE__ */ React.createElement(
662
+ "textarea",
663
+ {
664
+ value: result.description,
665
+ onChange: (e) => handleUpdateResult(index, { description: e.target.value }),
666
+ rows: 2,
667
+ className: "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-800 dark:text-white",
668
+ placeholder: "\u8FD9\u4E2A\u7ED3\u679C\u7684\u8BE6\u7EC6\u63CF\u8FF0..."
669
+ }
670
+ )),
671
+ result.image && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 p-2 bg-white dark:bg-gray-600 rounded border border-gray-200 dark:border-gray-500" }, /* @__PURE__ */ React.createElement("span", { className: "text-sm text-gray-500 dark:text-gray-400" }, "\u9884\u89C8:"), result.imageType === "emoji" ? /* @__PURE__ */ React.createElement("span", { className: "text-2xl" }, result.image) : /* @__PURE__ */ React.createElement("img", { src: result.image, alt: result.title, className: "w-8 h-8 object-cover rounded" }), /* @__PURE__ */ React.createElement("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300" }, result.title))
672
+ );
673
+ const renderEditForm = () => /* @__PURE__ */ React.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React.createElement("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white" }, isCreating ? "\u521B\u5EFA\u65B0\u914D\u7F6E" : "\u7F16\u8F91\u914D\u7F6E"), /* @__PURE__ */ React.createElement(
674
+ "button",
675
+ {
676
+ onClick: handleCancelEdit,
677
+ className: "p-2 text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"
678
+ },
679
+ /* @__PURE__ */ React.createElement(X, { className: "w-6 h-6" })
680
+ )), /* @__PURE__ */ React.createElement("div", { className: "space-y-4 bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-gray-700" }, /* @__PURE__ */ React.createElement("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-4" }, "\u57FA\u672C\u4FE1\u606F"), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" }, "\u914D\u7F6E\u540D\u79F0 *"), /* @__PURE__ */ React.createElement(
681
+ "input",
682
+ {
683
+ type: "text",
684
+ value: editForm.name,
685
+ onChange: (e) => setEditForm({ ...editForm, name: e.target.value }),
686
+ className: "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white",
687
+ placeholder: "\u4F8B\u5982: \u52A8\u7269\u4E3B\u9898\u6D4B\u8BD5"
688
+ }
689
+ )), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" }, "\u6E38\u620F\u6807\u9898 *"), /* @__PURE__ */ React.createElement(
690
+ "input",
691
+ {
692
+ type: "text",
693
+ value: editForm.gameTitle,
694
+ onChange: (e) => setEditForm({ ...editForm, gameTitle: e.target.value }),
695
+ className: "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white",
696
+ placeholder: "\u4F8B\u5982: \u6D4B\u6D4B\u4F60\u662F\u4EC0\u4E48\u52A8\u7269"
697
+ }
698
+ ))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" }, "\u914D\u7F6E\u63CF\u8FF0"), /* @__PURE__ */ React.createElement(
699
+ "textarea",
700
+ {
701
+ value: editForm.description,
702
+ onChange: (e) => setEditForm({ ...editForm, description: e.target.value }),
703
+ rows: 2,
704
+ className: "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white",
705
+ placeholder: "\u7B80\u8981\u63CF\u8FF0\u8FD9\u4E2A\u914D\u7F6E\u7684\u7528\u9014..."
706
+ }
707
+ )), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" }, "\u6E38\u620F\u63CF\u8FF0"), /* @__PURE__ */ React.createElement(
708
+ "input",
709
+ {
710
+ type: "text",
711
+ value: editForm.gameDescription,
712
+ onChange: (e) => setEditForm({ ...editForm, gameDescription: e.target.value }),
713
+ className: "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white",
714
+ placeholder: "\u4F8B\u5982: \u957F\u6309\u6309\u94AE\uFF0C\u53D1\u73B0\u4F60\u7684\u4E13\u5C5E\u5C5E\u6027"
715
+ }
716
+ )), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" }, "\u6309\u94AE\u6587\u672C"), /* @__PURE__ */ React.createElement(
717
+ "input",
718
+ {
719
+ type: "text",
720
+ value: editForm.buttonText,
721
+ onChange: (e) => setEditForm({ ...editForm, buttonText: e.target.value }),
722
+ className: "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white"
723
+ }
724
+ )), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" }, "\u957F\u6309\u65F6\u95F4 (\u6BEB\u79D2)"), /* @__PURE__ */ React.createElement(
725
+ "input",
726
+ {
727
+ type: "number",
728
+ value: editForm.longPressDuration,
729
+ onChange: (e) => setEditForm({ ...editForm, longPressDuration: parseInt(e.target.value) || 2e3 }),
730
+ className: "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white",
731
+ min: "500",
732
+ step: "100"
733
+ }
734
+ )))), /* @__PURE__ */ React.createElement("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-gray-700" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React.createElement("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white" }, "\u7ED3\u679C\u5217\u8868 (", editForm.results.length, ")"), /* @__PURE__ */ React.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React.createElement(
735
+ "button",
736
+ {
737
+ onClick: handleUseDefaultResults,
738
+ className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm bg-purple-50 dark:bg-purple-900 text-purple-600 dark:text-purple-200 rounded-lg hover:bg-purple-100 dark:hover:bg-purple-800"
739
+ },
740
+ "\u4F7F\u7528\u9ED8\u8BA4\u7ED3\u679C"
741
+ ), /* @__PURE__ */ React.createElement(
742
+ "button",
743
+ {
744
+ onClick: handleAddResult,
745
+ className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm bg-blue-50 dark:bg-blue-900 text-blue-600 dark:text-blue-200 rounded-lg hover:bg-blue-100 dark:hover:bg-blue-800"
746
+ },
747
+ /* @__PURE__ */ React.createElement(Plus, { className: "w-4 h-4" }),
748
+ "\u6DFB\u52A0\u7ED3\u679C"
749
+ ))), /* @__PURE__ */ React.createElement("div", { className: "space-y-3 max-h-[500px] overflow-y-auto" }, editForm.results.length === 0 ? /* @__PURE__ */ React.createElement("div", { className: "text-center py-8 text-gray-500 dark:text-gray-400" }, /* @__PURE__ */ React.createElement("p", null, "\u8FD8\u6CA1\u6709\u6DFB\u52A0\u4EFB\u4F55\u7ED3\u679C"), /* @__PURE__ */ React.createElement("p", { className: "text-sm mt-2" }, '\u70B9\u51FB"\u6DFB\u52A0\u7ED3\u679C"\u6216"\u4F7F\u7528\u9ED8\u8BA4\u7ED3\u679C"\u5F00\u59CB')) : editForm.results.map((result, index) => renderResultEditor(result, index)))), /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-end gap-3" }, /* @__PURE__ */ React.createElement(
750
+ "button",
751
+ {
752
+ onClick: handleCancelEdit,
753
+ className: "px-6 py-2 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700"
754
+ },
755
+ "\u53D6\u6D88"
756
+ ), /* @__PURE__ */ React.createElement(
757
+ "button",
758
+ {
759
+ onClick: handleSave,
760
+ className: "inline-flex items-center gap-2 px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700"
761
+ },
762
+ /* @__PURE__ */ React.createElement(Save, { className: "w-5 h-5" }),
763
+ "\u4FDD\u5B58\u914D\u7F6E"
764
+ )));
765
+ if (loading) {
766
+ return /* @__PURE__ */ React.createElement("div", { className: `p-8 ${className}` }, /* @__PURE__ */ React.createElement("div", { className: "text-center" }, /* @__PURE__ */ React.createElement("div", { className: "inline-block w-8 h-8 border-4 border-blue-600 border-t-transparent rounded-full animate-spin" }), /* @__PURE__ */ React.createElement("p", { className: "mt-2 text-gray-600 dark:text-gray-400" }, "\u52A0\u8F7D\u4E2D...")));
767
+ }
768
+ return /* @__PURE__ */ React.createElement("div", { className: `p-6 ${className}` }, error && /* @__PURE__ */ React.createElement("div", { className: "mb-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg flex items-center gap-2 text-red-800 dark:text-red-200" }, /* @__PURE__ */ React.createElement(AlertCircle, { className: "w-5 h-5 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, error), /* @__PURE__ */ React.createElement("button", { onClick: () => setError(null), className: "ml-auto" }, /* @__PURE__ */ React.createElement(X, { className: "w-5 h-5" }))), success && /* @__PURE__ */ React.createElement("div", { className: "mb-4 p-4 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg flex items-center gap-2 text-green-800 dark:text-green-200" }, /* @__PURE__ */ React.createElement(CheckCircle2, { className: "w-5 h-5 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, success), /* @__PURE__ */ React.createElement("button", { onClick: () => setSuccess(null), className: "ml-auto" }, /* @__PURE__ */ React.createElement(X, { className: "w-5 h-5" }))), isEditing ? renderEditForm() : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between mb-6" }, /* @__PURE__ */ React.createElement("h1", { className: "text-3xl font-bold text-gray-900 dark:text-white" }, "\u914D\u7F6E\u7BA1\u7406"), /* @__PURE__ */ React.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React.createElement(
769
+ "button",
770
+ {
771
+ onClick: handleImport,
772
+ className: "inline-flex items-center gap-2 px-4 py-2 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700"
773
+ },
774
+ /* @__PURE__ */ React.createElement(Upload, { className: "w-5 h-5" }),
775
+ "\u5BFC\u5165"
776
+ ), /* @__PURE__ */ React.createElement(
777
+ "button",
778
+ {
779
+ onClick: handleStartCreate,
780
+ className: "inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700"
781
+ },
782
+ /* @__PURE__ */ React.createElement(Plus, { className: "w-5 h-5" }),
783
+ "\u521B\u5EFA\u914D\u7F6E"
784
+ ))), configs.length === 0 ? /* @__PURE__ */ React.createElement("div", { className: "text-center py-12 bg-white dark:bg-gray-800 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700" }, /* @__PURE__ */ React.createElement("p", { className: "text-gray-600 dark:text-gray-400 mb-4" }, "\u8FD8\u6CA1\u6709\u4EFB\u4F55\u914D\u7F6E"), /* @__PURE__ */ React.createElement(
785
+ "button",
786
+ {
787
+ onClick: handleStartCreate,
788
+ className: "inline-flex items-center gap-2 px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700"
789
+ },
790
+ /* @__PURE__ */ React.createElement(Plus, { className: "w-5 h-5" }),
791
+ "\u521B\u5EFA\u7B2C\u4E00\u4E2A\u914D\u7F6E"
792
+ )) : renderConfigList()));
793
+ };
794
+ var ConfigList = ({
795
+ configService,
796
+ onSelect,
797
+ onEdit,
798
+ onDelete,
799
+ showActions = true,
800
+ showPreviewLink = false,
801
+ previewBaseUrl = "/test-yourself",
802
+ className = "",
803
+ pageSize = 10
804
+ }) => {
805
+ const [configs, setConfigs] = useState([]);
806
+ const [loading, setLoading] = useState(true);
807
+ const [currentPage, setCurrentPage] = useState(1);
808
+ const [searchTerm, setSearchTerm] = useState("");
809
+ const loadConfigs = useCallback(async () => {
810
+ try {
811
+ setLoading(true);
812
+ const list = await configService.getConfigList();
813
+ setConfigs(list);
814
+ } catch (error) {
815
+ console.error("\u52A0\u8F7D\u914D\u7F6E\u5217\u8868\u5931\u8D25:", error);
816
+ } finally {
817
+ setLoading(false);
818
+ }
819
+ }, [configService]);
820
+ useEffect(() => {
821
+ loadConfigs();
822
+ }, [loadConfigs]);
823
+ const handleRefresh = () => {
824
+ loadConfigs();
825
+ };
826
+ const handleSelect = (id) => {
827
+ onSelect?.(id);
828
+ };
829
+ const handleEdit = (id) => {
830
+ onEdit?.(id);
831
+ };
832
+ const handleDelete = async (id) => {
833
+ if (!confirm("\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A\u914D\u7F6E\u5417\uFF1F")) return;
834
+ try {
835
+ await configService.deleteConfig(id);
836
+ await loadConfigs();
837
+ onDelete?.(id);
838
+ } catch (error) {
839
+ console.error("\u5220\u9664\u914D\u7F6E\u5931\u8D25:", error);
840
+ alert("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
841
+ }
842
+ };
843
+ const handleDuplicate = async (id) => {
844
+ try {
845
+ await configService.duplicateConfig(id);
846
+ await loadConfigs();
847
+ } catch (error) {
848
+ console.error("\u590D\u5236\u914D\u7F6E\u5931\u8D25:", error);
849
+ alert("\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
850
+ }
851
+ };
852
+ const handleSetDefault = async (id) => {
853
+ try {
854
+ await configService.setDefaultConfig(id);
855
+ await loadConfigs();
856
+ } catch (error) {
857
+ console.error("\u8BBE\u7F6E\u9ED8\u8BA4\u914D\u7F6E\u5931\u8D25:", error);
858
+ alert("\u8BBE\u7F6E\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
859
+ }
860
+ };
861
+ const handleExport = async (id) => {
862
+ try {
863
+ const jsonString = await configService.exportConfig(id);
864
+ const blob = new Blob([jsonString], { type: "application/json" });
865
+ const url = URL.createObjectURL(blob);
866
+ const a = document.createElement("a");
867
+ a.href = url;
868
+ a.download = `config_${id}.json`;
869
+ document.body.appendChild(a);
870
+ a.click();
871
+ document.body.removeChild(a);
872
+ URL.revokeObjectURL(url);
873
+ } catch (error) {
874
+ console.error("\u5BFC\u51FA\u914D\u7F6E\u5931\u8D25:", error);
875
+ alert("\u5BFC\u51FA\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
876
+ }
877
+ };
878
+ const getPreviewUrl = (id) => {
879
+ return `${previewBaseUrl}?configId=${id}`;
880
+ };
881
+ const filteredConfigs = configs.filter((config) => {
882
+ if (!searchTerm) return true;
883
+ const term = searchTerm.toLowerCase();
884
+ return config.name.toLowerCase().includes(term) || config.description?.toLowerCase().includes(term);
885
+ });
886
+ const totalPages = Math.ceil(filteredConfigs.length / pageSize);
887
+ const startIndex = (currentPage - 1) * pageSize;
888
+ const endIndex = startIndex + pageSize;
889
+ const currentConfigs = filteredConfigs.slice(startIndex, endIndex);
890
+ if (loading) {
891
+ return /* @__PURE__ */ React.createElement("div", { className: `p-8 ${className}` }, /* @__PURE__ */ React.createElement("div", { className: "text-center" }, /* @__PURE__ */ React.createElement("div", { className: "inline-block w-8 h-8 border-4 border-blue-600 border-t-transparent rounded-full animate-spin" }), /* @__PURE__ */ React.createElement("p", { className: "mt-2 text-gray-600 dark:text-gray-400" }, "\u52A0\u8F7D\u4E2D...")));
892
+ }
893
+ return /* @__PURE__ */ React.createElement("div", { className }, /* @__PURE__ */ React.createElement("div", { className: "mb-4 flex items-center justify-between gap-4" }, /* @__PURE__ */ React.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React.createElement(
894
+ "input",
895
+ {
896
+ type: "text",
897
+ placeholder: "\u641C\u7D22\u914D\u7F6E...",
898
+ value: searchTerm,
899
+ onChange: (e) => {
900
+ setSearchTerm(e.target.value);
901
+ setCurrentPage(1);
902
+ },
903
+ className: "w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-800 dark:text-white"
904
+ }
905
+ )), /* @__PURE__ */ React.createElement(
906
+ "button",
907
+ {
908
+ onClick: handleRefresh,
909
+ className: "p-2 text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200",
910
+ title: "\u5237\u65B0"
911
+ },
912
+ /* @__PURE__ */ React.createElement(RefreshCw, { className: "w-5 h-5" })
913
+ )), currentConfigs.length === 0 ? /* @__PURE__ */ React.createElement("div", { className: "text-center py-12 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700" }, /* @__PURE__ */ React.createElement("p", { className: "text-gray-600 dark:text-gray-400" }, searchTerm ? "\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u914D\u7F6E" : "\u8FD8\u6CA1\u6709\u4EFB\u4F55\u914D\u7F6E")) : /* @__PURE__ */ React.createElement("div", { className: "space-y-3" }, currentConfigs.map((config) => /* @__PURE__ */ React.createElement(
914
+ "div",
915
+ {
916
+ key: config.id,
917
+ className: "bg-white dark:bg-gray-800 rounded-lg shadow-sm p-4 border border-gray-200 dark:border-gray-700 hover:shadow-md transition-shadow"
918
+ },
919
+ /* @__PURE__ */ React.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React.createElement(
920
+ "div",
921
+ {
922
+ className: "flex-1 cursor-pointer",
923
+ onClick: () => handleSelect(config.id)
924
+ },
925
+ /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React.createElement("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white" }, config.name), config.isDefault && /* @__PURE__ */ React.createElement("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" }, /* @__PURE__ */ React.createElement(Star, { className: "w-3 h-3" }), "\u9ED8\u8BA4")),
926
+ config.description && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-gray-600 dark:text-gray-400 mb-2" }, config.description),
927
+ /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4 text-xs text-gray-500 dark:text-gray-400" }, /* @__PURE__ */ React.createElement("span", null, "\u7ED3\u679C\u6570: ", config.resultCount), /* @__PURE__ */ React.createElement("span", null, "\u521B\u5EFA: ", new Date(config.createdAt).toLocaleDateString()), config.updatedAt !== config.createdAt && /* @__PURE__ */ React.createElement("span", null, "\u66F4\u65B0: ", new Date(config.updatedAt).toLocaleDateString()))
928
+ ), showActions && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-1" }, showPreviewLink && /* @__PURE__ */ React.createElement(
929
+ "a",
930
+ {
931
+ href: getPreviewUrl(config.id),
932
+ target: "_blank",
933
+ rel: "noopener noreferrer",
934
+ className: "p-2 text-gray-600 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400",
935
+ title: "\u9884\u89C8"
936
+ },
937
+ /* @__PURE__ */ React.createElement(ExternalLink, { className: "w-4 h-4" })
938
+ ), /* @__PURE__ */ React.createElement(
939
+ "button",
940
+ {
941
+ onClick: () => handleSetDefault(config.id),
942
+ disabled: config.isDefault,
943
+ className: "p-2 text-gray-600 hover:text-yellow-600 disabled:opacity-50 disabled:cursor-not-allowed",
944
+ title: "\u8BBE\u4E3A\u9ED8\u8BA4"
945
+ },
946
+ /* @__PURE__ */ React.createElement(Star, { className: "w-4 h-4" })
947
+ ), /* @__PURE__ */ React.createElement(
948
+ "button",
949
+ {
950
+ onClick: () => handleEdit(config.id),
951
+ className: "p-2 text-gray-600 hover:text-blue-600",
952
+ title: "\u7F16\u8F91"
953
+ },
954
+ /* @__PURE__ */ React.createElement(Edit, { className: "w-4 h-4" })
955
+ ), /* @__PURE__ */ React.createElement(
956
+ "button",
957
+ {
958
+ onClick: () => handleDuplicate(config.id),
959
+ className: "p-2 text-gray-600 hover:text-green-600",
960
+ title: "\u590D\u5236"
961
+ },
962
+ /* @__PURE__ */ React.createElement(Copy, { className: "w-4 h-4" })
963
+ ), /* @__PURE__ */ React.createElement(
964
+ "button",
965
+ {
966
+ onClick: () => handleExport(config.id),
967
+ className: "p-2 text-gray-600 hover:text-purple-600",
968
+ title: "\u5BFC\u51FA"
969
+ },
970
+ /* @__PURE__ */ React.createElement(Download, { className: "w-4 h-4" })
971
+ ), /* @__PURE__ */ React.createElement(
972
+ "button",
973
+ {
974
+ onClick: () => handleDelete(config.id),
975
+ className: "p-2 text-gray-600 hover:text-red-600",
976
+ title: "\u5220\u9664"
977
+ },
978
+ /* @__PURE__ */ React.createElement(Trash2, { className: "w-4 h-4" })
979
+ )))
980
+ ))), totalPages > 1 && /* @__PURE__ */ React.createElement("div", { className: "mt-4 flex items-center justify-between" }, /* @__PURE__ */ React.createElement("p", { className: "text-sm text-gray-600 dark:text-gray-400" }, "\u663E\u793A ", startIndex + 1, " - ", Math.min(endIndex, filteredConfigs.length), " \u5171", " ", filteredConfigs.length, " \u4E2A\u914D\u7F6E"), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
981
+ "button",
982
+ {
983
+ onClick: () => setCurrentPage((p) => Math.max(1, p - 1)),
984
+ disabled: currentPage === 1,
985
+ className: "px-3 py-1 border border-gray-300 dark:border-gray-600 rounded-lg disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50 dark:hover:bg-gray-700"
986
+ },
987
+ "\u4E0A\u4E00\u9875"
988
+ ), /* @__PURE__ */ React.createElement("span", { className: "text-sm text-gray-600 dark:text-gray-400" }, currentPage, " / ", totalPages), /* @__PURE__ */ React.createElement(
989
+ "button",
990
+ {
991
+ onClick: () => setCurrentPage((p) => Math.min(totalPages, p + 1)),
992
+ disabled: currentPage === totalPages,
993
+ className: "px-3 py-1 border border-gray-300 dark:border-gray-600 rounded-lg disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50 dark:hover:bg-gray-700"
994
+ },
995
+ "\u4E0B\u4E00\u9875"
996
+ ))));
997
+ };
998
+
999
+ export { ConfigList, ConfigManager, DEFAULT_RESULTS };
1000
+ //# sourceMappingURL=chunk-5XUE72Y3.mjs.map
1001
+ //# sourceMappingURL=chunk-5XUE72Y3.mjs.map