@robot-admin/naive-ui-components 0.15.0 → 0.16.0

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 (101) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/C_NotificationCenter.css +114 -78
  3. package/dist/C_NotificationCenter.d.cts +2 -2
  4. package/dist/C_NotificationCenter.d.ts +2 -2
  5. package/dist/C_NotificationCenter2.cjs +1 -1
  6. package/dist/C_NotificationCenter2.js +1 -1
  7. package/dist/constants.d.cts +1 -1
  8. package/dist/constants.d.ts +1 -1
  9. package/dist/constants3.d.cts +73 -119
  10. package/dist/constants3.d.ts +73 -119
  11. package/dist/constants4.d.cts +2 -2
  12. package/dist/constants4.d.ts +2 -2
  13. package/dist/constants5.d.cts +4 -4
  14. package/dist/constants5.d.ts +4 -4
  15. package/dist/data.d.cts +9 -9
  16. package/dist/data.d.ts +9 -9
  17. package/dist/index.d.cts +2 -2
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.vue.d.cts +3 -3
  20. package/dist/index.vue.d.ts +3 -3
  21. package/dist/index10.vue.d.cts +3 -3
  22. package/dist/index10.vue.d.ts +1 -1
  23. package/dist/index11.vue.d.cts +1 -1
  24. package/dist/index11.vue.d.ts +2 -2
  25. package/dist/index12.vue.d.cts +2 -2
  26. package/dist/index13.vue.d.ts +2 -2
  27. package/dist/index14.vue.d.cts +2 -2
  28. package/dist/index14.vue.d.ts +7 -7
  29. package/dist/index15.vue.d.cts +7 -7
  30. package/dist/index15.vue.d.ts +1 -1
  31. package/dist/index16.vue.d.cts +1 -1
  32. package/dist/index16.vue.d.ts +1 -1
  33. package/dist/index17.vue.d.cts +1 -1
  34. package/dist/index17.vue.d.ts +2 -2
  35. package/dist/index18.vue.d.cts +2 -2
  36. package/dist/index18.vue.d.ts +4 -4
  37. package/dist/index19.vue.d.cts +4 -4
  38. package/dist/index19.vue.d.ts +1 -1
  39. package/dist/index2.vue.d.cts +2 -2
  40. package/dist/index2.vue.d.ts +2 -2
  41. package/dist/index20.vue.d.cts +2 -2
  42. package/dist/index20.vue.d.ts +2 -2
  43. package/dist/index21.vue.d.cts +1 -1
  44. package/dist/index21.vue.d.ts +1 -1
  45. package/dist/index22.vue.d.cts +2 -2
  46. package/dist/index22.vue.d.ts +2 -2
  47. package/dist/index23.vue.d.cts +1 -1
  48. package/dist/index23.vue.d.ts +1 -1
  49. package/dist/index25.vue.d.cts +3 -3
  50. package/dist/index25.vue.d.ts +3 -3
  51. package/dist/index27.vue.d.cts +3 -3
  52. package/dist/index27.vue.d.ts +3 -3
  53. package/dist/index28.vue.d.cts +3 -3
  54. package/dist/index28.vue.d.ts +3 -3
  55. package/dist/index3.vue.d.cts +3 -3
  56. package/dist/index3.vue.d.ts +3 -3
  57. package/dist/index4.vue.d.cts +1 -1
  58. package/dist/index6.vue.d.ts +2 -2
  59. package/dist/index7.vue.d.cts +2 -2
  60. package/dist/index9.vue.d.ts +3 -3
  61. package/dist/mapUtils.d.cts +3 -3
  62. package/dist/mapUtils.d.ts +3 -3
  63. package/dist/style.css +115 -79
  64. package/dist/useCalendarEvents.d.cts +1 -1
  65. package/dist/useCalendarEvents.d.ts +1 -1
  66. package/dist/useCollapsePanel.d.cts +1 -1
  67. package/dist/useCollapsePanel.d.ts +1 -1
  68. package/dist/useCropperCore.d.cts +6 -6
  69. package/dist/useCropperCore.d.ts +6 -6
  70. package/dist/useDraggableLayout.d.cts +3 -3
  71. package/dist/useDraggableLayout.d.ts +3 -3
  72. package/dist/useDynamicFormState.d.cts +2 -2
  73. package/dist/useDynamicFormState.d.ts +2 -2
  74. package/dist/useEdgeInteraction.d.cts +1 -1
  75. package/dist/useEdgeInteraction.d.ts +1 -1
  76. package/dist/useFullscreen.d.cts +2 -2
  77. package/dist/useFullscreen.d.ts +2 -2
  78. package/dist/useInfiniteScroll.d.cts +1 -1
  79. package/dist/useInfiniteScroll.d.ts +1 -1
  80. package/dist/useQRCode.d.cts +1 -1
  81. package/dist/useQRCode.d.ts +1 -1
  82. package/dist/useSearchState.d.cts +3 -3
  83. package/dist/useSearchState.d.ts +3 -3
  84. package/dist/useSignatureHistory.d.cts +4 -4
  85. package/dist/useSignatureHistory.d.ts +4 -4
  86. package/dist/useSplitResize.d.cts +6 -6
  87. package/dist/useSplitResize.d.ts +6 -6
  88. package/dist/useTableQuery.d.cts +1 -1
  89. package/dist/useTableQuery.d.ts +1 -1
  90. package/dist/useTimeSelection.d.cts +1 -1
  91. package/dist/useTimeSelection.d.ts +1 -1
  92. package/dist/useTreeOperations.d.cts +6 -6
  93. package/dist/useTreeOperations.d.ts +6 -6
  94. package/dist/useWorkflowValidation.d.cts +2 -2
  95. package/dist/useWorkflowValidation.d.ts +2 -2
  96. package/dist/verification.d.cts +1 -1
  97. package/dist/verification.d.ts +1 -1
  98. package/docs/components.en.md +5 -5
  99. package/docs/components.md +5 -5
  100. package/docs/guides/notification-center.md +95 -0
  101. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @robot-admin/naive-ui-components
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 完善通知中心的共享控制器与可靠异步状态,支持独立演示和明确的远端接入边界。
8
+
9
+ - 新增可选 `controller`,让顶部预览与完整收件箱共用应用状态;外部控制器由应用管理请求、轮询和连接生命周期。
10
+ - 使用服务端全局与分类未读统计,修复分页计数、并发已读与删除失败回滚覆盖新状态的问题。
11
+ - 演示删除、清空和已读状态完整持久化;远端缺少接口时显示错误,提供等待状态及失败重试,不回退到演示数据。
12
+ - 新增 `viewAll` 入口、可选心跳超时与重连后刷新,并增加状态、挂载和传输回归验证。
13
+
3
14
  ## 0.15.0
4
15
 
5
16
  ### Minor Changes
@@ -176,7 +176,7 @@
176
176
  .flex-wrap[data-v-8e02b6cd]{flex-wrap:wrap;}
177
177
  .px[data-v-8e02b6cd]{padding-left:1rem;padding-right:1rem;}
178
178
 
179
- .notification-item[data-v-2f1c8e96] {
179
+ .notification-item[data-v-8a4522f3] {
180
180
  display: flex;
181
181
  align-items: flex-start;
182
182
  gap: 10px;
@@ -185,58 +185,58 @@
185
185
  transition: background-color var(--c-transition, 0.2s ease);
186
186
  border-bottom: 1px solid var(--c-border);
187
187
  }
188
- .notification-item[data-v-2f1c8e96]:last-child {
188
+ .notification-item[data-v-8a4522f3]:last-child {
189
189
  border-bottom: none;
190
190
  }
191
- .notification-item[data-v-2f1c8e96]:hover {
191
+ .notification-item[data-v-8a4522f3]:hover {
192
192
  background-color: var(--c-bg-card);
193
193
  }
194
- .notification-item:hover .notification-item__actions[data-v-2f1c8e96] {
194
+ .notification-item:hover .notification-item__actions[data-v-8a4522f3] {
195
195
  opacity: 1;
196
196
  }
197
- .notification-item--unread[data-v-2f1c8e96] {
197
+ .notification-item--unread[data-v-8a4522f3] {
198
198
  background-color: color-mix(in srgb, var(--c-primary) 4%, transparent);
199
199
  }
200
- .notification-item--unread[data-v-2f1c8e96]:hover {
200
+ .notification-item--unread[data-v-8a4522f3]:hover {
201
201
  background-color: color-mix(in srgb, var(--c-primary) 8%, transparent);
202
202
  }
203
- .notification-item--urgent[data-v-2f1c8e96] {
203
+ .notification-item--urgent[data-v-8a4522f3] {
204
204
  border-left: 3px solid #f5222d;
205
205
  padding-left: 13px;
206
206
  }
207
- .notification-item[data-v-2f1c8e96] {
207
+ .notification-item[data-v-8a4522f3] {
208
208
  /* ─── 子元素 ──────────────────────────── */
209
209
  }
210
- .notification-item__indicator[data-v-2f1c8e96] {
210
+ .notification-item__indicator[data-v-8a4522f3] {
211
211
  flex-shrink: 0;
212
212
  width: 8px;
213
213
  display: flex;
214
214
  align-items: center;
215
215
  padding-top: 14px;
216
216
  }
217
- .notification-item__dot[data-v-2f1c8e96] {
217
+ .notification-item__dot[data-v-8a4522f3] {
218
218
  width: 6px;
219
219
  height: 6px;
220
220
  border-radius: 50%;
221
221
  background: var(--c-primary);
222
222
  }
223
- .notification-item__dot--urgent[data-v-2f1c8e96] {
223
+ .notification-item__dot--urgent[data-v-8a4522f3] {
224
224
  background: #f5222d;
225
225
  box-shadow: 0 0 4px rgba(245, 34, 45, 0.5);
226
226
  }
227
- .notification-item__dot--high[data-v-2f1c8e96] {
227
+ .notification-item__dot--high[data-v-8a4522f3] {
228
228
  background: #fa8c16;
229
229
  }
230
- .notification-item__dot--normal[data-v-2f1c8e96] {
230
+ .notification-item__dot--normal[data-v-8a4522f3] {
231
231
  background: var(--c-primary);
232
232
  }
233
- .notification-item__dot--low[data-v-2f1c8e96] {
233
+ .notification-item__dot--low[data-v-8a4522f3] {
234
234
  background: var(--c-text-4);
235
235
  }
236
- .notification-item__avatar[data-v-2f1c8e96] {
236
+ .notification-item__avatar[data-v-8a4522f3] {
237
237
  flex-shrink: 0;
238
238
  }
239
- .notification-item__avatar-placeholder[data-v-2f1c8e96] {
239
+ .notification-item__avatar-placeholder[data-v-8a4522f3] {
240
240
  width: 36px;
241
241
  height: 36px;
242
242
  border-radius: 50%;
@@ -246,27 +246,27 @@
246
246
  font-size: 16px;
247
247
  color: #fff;
248
248
  }
249
- .notification-item__avatar-placeholder--system[data-v-2f1c8e96] {
249
+ .notification-item__avatar-placeholder--system[data-v-8a4522f3] {
250
250
  background: linear-gradient(135deg, #667eea, #764ba2);
251
251
  }
252
- .notification-item__avatar-placeholder--business[data-v-2f1c8e96] {
252
+ .notification-item__avatar-placeholder--business[data-v-8a4522f3] {
253
253
  background: linear-gradient(135deg, #43e97b, #38f9d7);
254
254
  color: #0d1425;
255
255
  }
256
- .notification-item__avatar-placeholder--alarm[data-v-2f1c8e96] {
256
+ .notification-item__avatar-placeholder--alarm[data-v-8a4522f3] {
257
257
  background: linear-gradient(135deg, #f093fb, #f5576c);
258
258
  }
259
- .notification-item__body[data-v-2f1c8e96] {
259
+ .notification-item__body[data-v-8a4522f3] {
260
260
  flex: 1;
261
261
  min-width: 0;
262
262
  }
263
- .notification-item__header[data-v-2f1c8e96] {
263
+ .notification-item__header[data-v-8a4522f3] {
264
264
  display: flex;
265
265
  align-items: center;
266
266
  gap: 6px;
267
267
  margin-bottom: 4px;
268
268
  }
269
- .notification-item__title[data-v-2f1c8e96] {
269
+ .notification-item__title[data-v-8a4522f3] {
270
270
  font-size: 13px;
271
271
  font-weight: 500;
272
272
  color: var(--c-text-1);
@@ -275,7 +275,7 @@
275
275
  text-overflow: ellipsis;
276
276
  white-space: nowrap;
277
277
  }
278
- .notification-item__summary[data-v-2f1c8e96] {
278
+ .notification-item__summary[data-v-8a4522f3] {
279
279
  font-size: 12px;
280
280
  color: var(--c-text-2);
281
281
  line-height: 1.5;
@@ -285,21 +285,21 @@
285
285
  -webkit-box-orient: vertical;
286
286
  overflow: hidden;
287
287
  }
288
- .notification-item__meta[data-v-2f1c8e96] {
288
+ .notification-item__meta[data-v-8a4522f3] {
289
289
  display: flex;
290
290
  align-items: center;
291
291
  gap: 8px;
292
292
  margin-top: 6px;
293
293
  }
294
- .notification-item__time[data-v-2f1c8e96], .notification-item__sender[data-v-2f1c8e96] {
294
+ .notification-item__time[data-v-8a4522f3], .notification-item__sender[data-v-8a4522f3] {
295
295
  font-size: 11px;
296
296
  color: var(--c-text-4);
297
297
  }
298
- .notification-item__sender[data-v-2f1c8e96]::before {
298
+ .notification-item__sender[data-v-8a4522f3]::before {
299
299
  content: "·";
300
300
  margin-right: 8px;
301
301
  }
302
- .notification-item__actions[data-v-2f1c8e96] {
302
+ .notification-item__actions[data-v-8a4522f3] {
303
303
  flex-shrink: 0;
304
304
  display: flex;
305
305
  align-items: center;
@@ -307,7 +307,10 @@
307
307
  opacity: 0;
308
308
  transition: opacity var(--c-transition, 0.2s ease);
309
309
  }
310
- .notification-item__action[data-v-2f1c8e96] {
310
+ .notification-item__action[data-v-8a4522f3] {
311
+ appearance: none;
312
+ border: 0;
313
+ background: transparent;
311
314
  display: inline-flex;
312
315
  align-items: center;
313
316
  justify-content: center;
@@ -319,24 +322,33 @@
319
322
  color: var(--c-text-4);
320
323
  transition: all var(--c-transition, 0.2s ease);
321
324
  }
322
- .notification-item__action[data-v-2f1c8e96]:hover {
325
+ .notification-item__action[data-v-8a4522f3]:hover {
323
326
  color: var(--c-primary);
324
327
  background-color: var(--c-border);
325
328
  }
329
+ .notification-item__action[data-v-8a4522f3]:disabled {
330
+ cursor: wait;
331
+ opacity: 0.45;
332
+ }
326
333
 
327
334
  /* layer: default */
328
- .hidden[data-v-2f1c8e96]{display:none;}
329
- .flex[data-v-2f1c8e96]{display:flex;}
330
- .inline-flex[data-v-2f1c8e96]{display:inline-flex;}
331
- .flex-shrink[data-v-2f1c8e96]{flex-shrink:1;}
332
- .transition[data-v-2f1c8e96]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
335
+ .hidden[data-v-8a4522f3]{display:none;}
336
+ .flex[data-v-8a4522f3]{display:flex;}
337
+ .inline-flex[data-v-8a4522f3]{display:inline-flex;}
338
+ .flex-shrink[data-v-8a4522f3]{flex-shrink:1;}
339
+ .border[data-v-8a4522f3]{border-width:1px;}
340
+ .transition[data-v-8a4522f3]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
333
341
 
334
- .notification-list__tabs[data-v-d366768f] {
342
+ .notification-list__tabs[data-v-63a2d867] {
335
343
  display: flex;
336
344
  border-bottom: 1px solid var(--c-border);
337
345
  padding: 0 4px;
338
346
  }
339
- .notification-list__tab[data-v-d366768f] {
347
+ .notification-list__tab[data-v-63a2d867] {
348
+ appearance: none;
349
+ border: 0;
350
+ background: transparent;
351
+ font-family: inherit;
340
352
  position: relative;
341
353
  display: flex;
342
354
  align-items: center;
@@ -348,7 +360,7 @@
348
360
  transition: all var(--c-transition, 0.2s ease);
349
361
  user-select: none;
350
362
  }
351
- .notification-list__tab[data-v-d366768f]::after {
363
+ .notification-list__tab[data-v-63a2d867]::after {
352
364
  content: "";
353
365
  position: absolute;
354
366
  bottom: 0;
@@ -359,17 +371,17 @@
359
371
  border-radius: 1px;
360
372
  transition: background var(--c-transition, 0.2s ease);
361
373
  }
362
- .notification-list__tab[data-v-d366768f]:hover {
374
+ .notification-list__tab[data-v-63a2d867]:hover {
363
375
  color: var(--c-text-1);
364
376
  }
365
- .notification-list__tab--active[data-v-d366768f] {
377
+ .notification-list__tab--active[data-v-63a2d867] {
366
378
  color: var(--c-primary);
367
379
  font-weight: 500;
368
380
  }
369
- .notification-list__tab--active[data-v-d366768f]::after {
381
+ .notification-list__tab--active[data-v-63a2d867]::after {
370
382
  background: var(--c-primary);
371
383
  }
372
- .notification-list__tab-count[data-v-d366768f] {
384
+ .notification-list__tab-count[data-v-63a2d867] {
373
385
  min-width: 16px;
374
386
  height: 16px;
375
387
  padding: 0 4px;
@@ -381,7 +393,7 @@
381
393
  line-height: 16px;
382
394
  text-align: center;
383
395
  }
384
- .notification-list__toolbar[data-v-d366768f] {
396
+ .notification-list__toolbar[data-v-63a2d867] {
385
397
  display: flex;
386
398
  align-items: center;
387
399
  justify-content: flex-end;
@@ -389,22 +401,27 @@
389
401
  padding: 6px 16px;
390
402
  border-bottom: 1px solid var(--c-border);
391
403
  }
392
- .notification-list__scroll[data-v-d366768f] {
404
+ .notification-list__scroll[data-v-63a2d867] {
393
405
  flex: 1;
394
406
  }
395
- .notification-list__skeleton[data-v-d366768f] {
407
+ .notification-list__skeleton[data-v-63a2d867] {
396
408
  display: flex;
397
409
  align-items: flex-start;
398
410
  gap: 12px;
399
411
  padding: 14px 16px;
400
412
  }
401
- .notification-list__skeleton-text[data-v-d366768f] {
413
+ .notification-list__skeleton-text[data-v-63a2d867] {
402
414
  flex: 1;
403
415
  display: flex;
404
416
  flex-direction: column;
405
417
  gap: 8px;
406
418
  }
407
- .notification-list__load-more[data-v-d366768f] {
419
+ .notification-list__load-more[data-v-63a2d867] {
420
+ appearance: none;
421
+ border: 0;
422
+ background: transparent;
423
+ font-family: inherit;
424
+ width: 100%;
408
425
  display: flex;
409
426
  align-items: center;
410
427
  justify-content: center;
@@ -415,10 +432,10 @@
415
432
  cursor: pointer;
416
433
  transition: color var(--c-transition, 0.2s ease);
417
434
  }
418
- .notification-list__load-more[data-v-d366768f]:hover {
435
+ .notification-list__load-more[data-v-63a2d867]:hover {
419
436
  color: var(--c-primary);
420
437
  }
421
- .notification-list__empty[data-v-d366768f] {
438
+ .notification-list__empty[data-v-63a2d867] {
422
439
  display: flex;
423
440
  flex-direction: column;
424
441
  align-items: center;
@@ -426,67 +443,86 @@
426
443
  padding: 60px 0;
427
444
  gap: 12px;
428
445
  }
429
- .notification-list__empty-icon[data-v-d366768f] {
446
+ .notification-list__empty-icon[data-v-63a2d867] {
430
447
  color: var(--c-text-4);
431
448
  opacity: 0.5;
432
449
  }
433
- .notification-list__empty-text[data-v-d366768f] {
450
+ .notification-list__empty-text[data-v-63a2d867] {
434
451
  font-size: 13px;
435
452
  color: var(--c-text-4);
436
453
  }
437
454
 
438
455
  /* layer: default */
439
- .absolute[data-v-d366768f]{position:absolute;}
440
- .relative[data-v-d366768f]{position:relative;}
441
- .flex[data-v-d366768f]{display:flex;}
442
- .px[data-v-d366768f]{padding-left:1rem;padding-right:1rem;}
443
- .tab[data-v-d366768f]{-moz-tab-size:4;-o-tab-size:4;tab-size:4;}
444
- .transition[data-v-d366768f]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
456
+ .absolute[data-v-63a2d867]{position:absolute;}
457
+ .relative[data-v-63a2d867]{position:relative;}
458
+ .flex[data-v-63a2d867]{display:flex;}
459
+ .border[data-v-63a2d867]{border-width:1px;}
460
+ .px[data-v-63a2d867]{padding-left:1rem;padding-right:1rem;}
461
+ .tab[data-v-63a2d867]{-moz-tab-size:4;-o-tab-size:4;tab-size:4;}
462
+ .transition[data-v-63a2d867]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
445
463
 
446
- .c-notification-center[data-v-a06c4b3a] {
464
+ .c-notification-center[data-v-21f127ad] {
447
465
  display: inline-flex;
448
466
  align-items: center;
449
467
  }
450
- .c-notification-center__panel[data-v-a06c4b3a] {
468
+ .c-notification-center__panel[data-v-21f127ad] {
451
469
  display: flex;
452
470
  flex-direction: column;
453
471
  max-height: 560px;
454
472
  }
455
- .c-notification-center__header[data-v-a06c4b3a] {
473
+ .c-notification-center__header[data-v-21f127ad] {
456
474
  display: flex;
457
475
  align-items: center;
458
476
  justify-content: space-between;
459
477
  padding: 14px 16px 10px;
460
478
  border-bottom: 1px solid var(--c-border);
461
479
  }
462
- .c-notification-center__title[data-v-a06c4b3a] {
480
+ .c-notification-center__title[data-v-21f127ad] {
463
481
  font-size: 15px;
464
482
  font-weight: 600;
465
483
  color: var(--c-text-1);
466
484
  }
467
- .c-notification-center__header-extra[data-v-a06c4b3a] {
485
+ .c-notification-center__header-extra[data-v-21f127ad] {
468
486
  display: flex;
469
487
  align-items: center;
470
488
  gap: 8px;
471
489
  }
472
- .c-notification-center__ws-dot[data-v-a06c4b3a] {
490
+ .c-notification-center__error[data-v-21f127ad] {
491
+ display: flex;
492
+ align-items: center;
493
+ justify-content: space-between;
494
+ gap: 12px;
495
+ margin: 10px 16px;
496
+ padding: 10px;
497
+ color: var(--c-text-1);
498
+ background: color-mix(in srgb, #d03050 8%, transparent);
499
+ border-radius: 6px;
500
+ font-size: 12px;
501
+ }
502
+ .c-notification-center__footer[data-v-21f127ad] {
503
+ display: flex;
504
+ justify-content: center;
505
+ padding: 10px 16px;
506
+ border-top: 1px solid var(--c-border);
507
+ }
508
+ .c-notification-center__ws-dot[data-v-21f127ad] {
473
509
  width: 8px;
474
510
  height: 8px;
475
511
  border-radius: 50%;
476
512
  transition: background-color var(--c-transition, 0.2s ease);
477
513
  }
478
- .c-notification-center__ws-dot--connected[data-v-a06c4b3a] {
514
+ .c-notification-center__ws-dot--connected[data-v-21f127ad] {
479
515
  background: #52c41a;
480
516
  box-shadow: 0 0 4px rgba(82, 196, 26, 0.5);
481
517
  }
482
- .c-notification-center__ws-dot--connecting[data-v-a06c4b3a], .c-notification-center__ws-dot--reconnecting[data-v-a06c4b3a] {
518
+ .c-notification-center__ws-dot--connecting[data-v-21f127ad], .c-notification-center__ws-dot--reconnecting[data-v-21f127ad] {
483
519
  background: #faad14;
484
- animation: status-blink-a06c4b3a 1s ease-in-out infinite;
520
+ animation: status-blink-21f127ad 1s ease-in-out infinite;
485
521
  }
486
- .c-notification-center__ws-dot--disconnected[data-v-a06c4b3a] {
522
+ .c-notification-center__ws-dot--disconnected[data-v-21f127ad] {
487
523
  background: var(--c-text-4);
488
524
  }
489
- @keyframes status-blink-a06c4b3a {
525
+ @keyframes status-blink-21f127ad {
490
526
  0%, 100% {
491
527
  opacity: 1;
492
528
  }
@@ -495,17 +531,17 @@
495
531
  }
496
532
  }
497
533
  /* ─── 切换过渡 ───────────────────────────────── */
498
- .slide-fade-enter-active[data-v-a06c4b3a] {
534
+ .slide-fade-enter-active[data-v-21f127ad] {
499
535
  transition: all 0.25s ease-out;
500
536
  }
501
- .slide-fade-leave-active[data-v-a06c4b3a] {
537
+ .slide-fade-leave-active[data-v-21f127ad] {
502
538
  transition: all 0.2s ease-in;
503
539
  }
504
- .slide-fade-enter-from[data-v-a06c4b3a] {
540
+ .slide-fade-enter-from[data-v-21f127ad] {
505
541
  opacity: 0;
506
542
  transform: translateY(8px);
507
543
  }
508
- .slide-fade-leave-to[data-v-a06c4b3a] {
544
+ .slide-fade-leave-to[data-v-21f127ad] {
509
545
  opacity: 0;
510
546
  transform: translateY(-8px);
511
547
  }
@@ -550,10 +586,10 @@
550
586
  }
551
587
 
552
588
  /* layer: default */
553
- .flex[data-v-a06c4b3a]{display:flex;}
554
- .inline-flex[data-v-a06c4b3a]{display:inline-flex;}
555
- .transform[data-v-a06c4b3a]{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}
556
- .transition[data-v-a06c4b3a]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
557
- .ease-in[data-v-a06c4b3a]{transition-timing-function:cubic-bezier(0.4, 0, 1, 1);}
558
- .ease-in-out[data-v-a06c4b3a]{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);}
559
- .ease-out[data-v-a06c4b3a]{transition-timing-function:cubic-bezier(0, 0, 0.2, 1);}
589
+ .flex[data-v-21f127ad]{display:flex;}
590
+ .inline-flex[data-v-21f127ad]{display:inline-flex;}
591
+ .transform[data-v-21f127ad]{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}
592
+ .transition[data-v-21f127ad]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
593
+ .ease-in[data-v-21f127ad]{transition-timing-function:cubic-bezier(0.4, 0, 1, 1);}
594
+ .ease-in-out[data-v-21f127ad]{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);}
595
+ .ease-out[data-v-21f127ad]{transition-timing-function:cubic-bezier(0, 0, 0.2, 1);}
@@ -1,2 +1,2 @@
1
- import { A as NotificationWSConfig, C as NotificationCenterEmits, D as NotificationPriority, E as NotificationMessage, M as WSNotificationPayload, O as NotificationSender, S as NotificationCategory, T as NotificationCenterProps, _ as ClearNotificationsFn, a as DEFAULT_POLLING_INTERVAL, b as MarkAllReadFn, c as DEFAULT_WS_HEARTBEAT_MESSAGE, d as MOCK_MESSAGES, f as PRIORITY_MAP, g as _default, h as useNotificationCore, i as DEFAULT_PAGE_SIZE, j as WSConnectionStatus, k as NotificationStatus, l as DEFAULT_WS_MAX_RECONNECT, m as useNotificationFormat, n as CATEGORY_TABS, o as DEFAULT_STORAGE_KEY, p as useNotificationWS, r as DEFAULT_MAX_BADGE_COUNT, s as DEFAULT_WS_HEARTBEAT_INTERVAL, t as CATEGORY_MAP, u as DEFAULT_WS_RECONNECT_INTERVAL, v as DeleteNotificationFn, w as NotificationCenterExpose, x as MarkAsReadFn, y as FetchNotificationsFn } from "./constants3.cjs";
2
- export { CATEGORY_MAP, CATEGORY_TABS, _default as C_NotificationCenter, type ClearNotificationsFn, DEFAULT_MAX_BADGE_COUNT, DEFAULT_PAGE_SIZE, DEFAULT_POLLING_INTERVAL, DEFAULT_STORAGE_KEY, DEFAULT_WS_HEARTBEAT_INTERVAL, DEFAULT_WS_HEARTBEAT_MESSAGE, DEFAULT_WS_MAX_RECONNECT, DEFAULT_WS_RECONNECT_INTERVAL, type DeleteNotificationFn, type FetchNotificationsFn, MOCK_MESSAGES, type MarkAllReadFn, type MarkAsReadFn, type NotificationCategory, type NotificationCenterEmits, type NotificationCenterExpose, type NotificationCenterProps, type NotificationMessage, type NotificationPriority, type NotificationSender, type NotificationStatus, type NotificationWSConfig, PRIORITY_MAP, type WSConnectionStatus, type WSNotificationPayload, useNotificationCore, useNotificationFormat, useNotificationWS };
1
+ import { A as NotificationPriority, C as NotificationCategory, D as NotificationCenterProps, E as NotificationCenterExpose, F as WSConnectionStatus, I as WSNotificationPayload, M as NotificationStatus, N as NotificationUnreadByCategory, O as NotificationDataMode, P as NotificationWSConfig, S as MarkAsReadFn, T as NotificationCenterEmits, _ as ClearNotificationsFn, a as DEFAULT_POLLING_INTERVAL, b as FetchNotificationsResult, c as DEFAULT_WS_HEARTBEAT_MESSAGE, d as MOCK_MESSAGES, f as PRIORITY_MAP, g as _default, h as useNotificationCore, i as DEFAULT_PAGE_SIZE, j as NotificationSender, k as NotificationMessage, l as DEFAULT_WS_MAX_RECONNECT, m as useNotificationFormat, n as CATEGORY_TABS, o as DEFAULT_STORAGE_KEY, p as useNotificationWS, r as DEFAULT_MAX_BADGE_COUNT, s as DEFAULT_WS_HEARTBEAT_INTERVAL, t as CATEGORY_MAP, u as DEFAULT_WS_RECONNECT_INTERVAL, v as DeleteNotificationFn, w as NotificationCenterController, x as MarkAllReadFn, y as FetchNotificationsFn } from "./constants3.cjs";
2
+ export { CATEGORY_MAP, CATEGORY_TABS, _default as C_NotificationCenter, type ClearNotificationsFn, DEFAULT_MAX_BADGE_COUNT, DEFAULT_PAGE_SIZE, DEFAULT_POLLING_INTERVAL, DEFAULT_STORAGE_KEY, DEFAULT_WS_HEARTBEAT_INTERVAL, DEFAULT_WS_HEARTBEAT_MESSAGE, DEFAULT_WS_MAX_RECONNECT, DEFAULT_WS_RECONNECT_INTERVAL, type DeleteNotificationFn, type FetchNotificationsFn, type FetchNotificationsResult, MOCK_MESSAGES, type MarkAllReadFn, type MarkAsReadFn, type NotificationCategory, type NotificationCenterController, type NotificationCenterEmits, type NotificationCenterExpose, type NotificationCenterProps, type NotificationDataMode, type NotificationMessage, type NotificationPriority, type NotificationSender, type NotificationStatus, type NotificationUnreadByCategory, type NotificationWSConfig, PRIORITY_MAP, type WSConnectionStatus, type WSNotificationPayload, useNotificationCore, useNotificationFormat, useNotificationWS };
@@ -1,2 +1,2 @@
1
- import { A as NotificationWSConfig, C as NotificationCenterEmits, D as NotificationPriority, E as NotificationMessage, M as WSNotificationPayload, O as NotificationSender, S as NotificationCategory, T as NotificationCenterProps, _ as ClearNotificationsFn, a as DEFAULT_POLLING_INTERVAL, b as MarkAllReadFn, c as DEFAULT_WS_HEARTBEAT_MESSAGE, d as MOCK_MESSAGES, f as PRIORITY_MAP, g as _default, h as useNotificationCore, i as DEFAULT_PAGE_SIZE, j as WSConnectionStatus, k as NotificationStatus, l as DEFAULT_WS_MAX_RECONNECT, m as useNotificationFormat, n as CATEGORY_TABS, o as DEFAULT_STORAGE_KEY, p as useNotificationWS, r as DEFAULT_MAX_BADGE_COUNT, s as DEFAULT_WS_HEARTBEAT_INTERVAL, t as CATEGORY_MAP, u as DEFAULT_WS_RECONNECT_INTERVAL, v as DeleteNotificationFn, w as NotificationCenterExpose, x as MarkAsReadFn, y as FetchNotificationsFn } from "./constants3.js";
2
- export { CATEGORY_MAP, CATEGORY_TABS, _default as C_NotificationCenter, type ClearNotificationsFn, DEFAULT_MAX_BADGE_COUNT, DEFAULT_PAGE_SIZE, DEFAULT_POLLING_INTERVAL, DEFAULT_STORAGE_KEY, DEFAULT_WS_HEARTBEAT_INTERVAL, DEFAULT_WS_HEARTBEAT_MESSAGE, DEFAULT_WS_MAX_RECONNECT, DEFAULT_WS_RECONNECT_INTERVAL, type DeleteNotificationFn, type FetchNotificationsFn, MOCK_MESSAGES, type MarkAllReadFn, type MarkAsReadFn, type NotificationCategory, type NotificationCenterEmits, type NotificationCenterExpose, type NotificationCenterProps, type NotificationMessage, type NotificationPriority, type NotificationSender, type NotificationStatus, type NotificationWSConfig, PRIORITY_MAP, type WSConnectionStatus, type WSNotificationPayload, useNotificationCore, useNotificationFormat, useNotificationWS };
1
+ import { A as NotificationPriority, C as NotificationCategory, D as NotificationCenterProps, E as NotificationCenterExpose, F as WSConnectionStatus, I as WSNotificationPayload, M as NotificationStatus, N as NotificationUnreadByCategory, O as NotificationDataMode, P as NotificationWSConfig, S as MarkAsReadFn, T as NotificationCenterEmits, _ as ClearNotificationsFn, a as DEFAULT_POLLING_INTERVAL, b as FetchNotificationsResult, c as DEFAULT_WS_HEARTBEAT_MESSAGE, d as MOCK_MESSAGES, f as PRIORITY_MAP, g as _default, h as useNotificationCore, i as DEFAULT_PAGE_SIZE, j as NotificationSender, k as NotificationMessage, l as DEFAULT_WS_MAX_RECONNECT, m as useNotificationFormat, n as CATEGORY_TABS, o as DEFAULT_STORAGE_KEY, p as useNotificationWS, r as DEFAULT_MAX_BADGE_COUNT, s as DEFAULT_WS_HEARTBEAT_INTERVAL, t as CATEGORY_MAP, u as DEFAULT_WS_RECONNECT_INTERVAL, v as DeleteNotificationFn, w as NotificationCenterController, x as MarkAllReadFn, y as FetchNotificationsFn } from "./constants3.js";
2
+ export { CATEGORY_MAP, CATEGORY_TABS, _default as C_NotificationCenter, type ClearNotificationsFn, DEFAULT_MAX_BADGE_COUNT, DEFAULT_PAGE_SIZE, DEFAULT_POLLING_INTERVAL, DEFAULT_STORAGE_KEY, DEFAULT_WS_HEARTBEAT_INTERVAL, DEFAULT_WS_HEARTBEAT_MESSAGE, DEFAULT_WS_MAX_RECONNECT, DEFAULT_WS_RECONNECT_INTERVAL, type DeleteNotificationFn, type FetchNotificationsFn, type FetchNotificationsResult, MOCK_MESSAGES, type MarkAllReadFn, type MarkAsReadFn, type NotificationCategory, type NotificationCenterController, type NotificationCenterEmits, type NotificationCenterExpose, type NotificationCenterProps, type NotificationDataMode, type NotificationMessage, type NotificationPriority, type NotificationSender, type NotificationStatus, type NotificationUnreadByCategory, type NotificationWSConfig, PRIORITY_MAP, type WSConnectionStatus, type WSNotificationPayload, useNotificationCore, useNotificationFormat, useNotificationWS };
@@ -1 +1 @@
1
- require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`),n=require(`./html.cjs`),r=require(`./storage.cjs`);let i=require(`vue`),a=require(`naive-ui`);const o=6e4,s=`notification_center`,c=3e3,l=3e4,u=`ping`,d={system:{label:`系统通知`,icon:`mdi:cog-outline`,color:`info`},business:{label:`业务消息`,icon:`mdi:briefcase-outline`,color:`success`},alarm:{label:`告警预警`,icon:`mdi:alert-outline`,color:`warning`}},f=[{key:`all`,label:`全部`},{key:`system`,label:`系统通知`},{key:`business`,label:`业务消息`},{key:`alarm`,label:`告警预警`}],p={low:{label:`低`,type:`default`},normal:{label:`普通`,type:`info`},high:{label:`重要`,type:`warning`},urgent:{label:`紧急`,type:`error`}},m=[{id:`msg-001`,title:`系统维护通知`,summary:`系统将于今晚 22:00-23:00 进行例行维护升级,届时部分功能可能暂时不可用。`,content:`<p>尊敬的用户:</p><p>为了提升系统性能和稳定性,我们计划于 <strong>2026年2月27日 22:00-23:00</strong> 对系统进行例行维护升级。</p><p>维护期间,以下功能可能暂时不可用:</p><ul><li>报表导出</li><li>数据同步</li><li>定时任务</li></ul><p>请提前保存好未完成的工作,感谢您的理解与支持!</p>`,category:`system`,priority:`high`,status:`unread`,timestamp:new Date(Date.now()-15*6e4).toISOString(),sender:{name:`系统管理员`,avatar:``}},{id:`msg-002`,title:`审批流程待处理`,summary:`张三提交的《Q1 季度预算申请》需要您审批,请尽快处理。`,category:`business`,priority:`urgent`,status:`unread`,timestamp:new Date(Date.now()-30*6e4).toISOString(),sender:{name:`张三`,avatar:``},actionUrl:`/workflow/approval`,actionText:`去审批`},{id:`msg-003`,title:`服务器 CPU 使用率告警`,summary:`生产环境节点 prod-node-03 CPU 使用率持续超过 90%,已触发告警阈值。`,category:`alarm`,priority:`urgent`,status:`unread`,timestamp:new Date(Date.now()-2*6e4).toISOString(),sender:{name:`监控中心`},actionUrl:`/monitor/server`,actionText:`查看详情`},{id:`msg-004`,title:`新版本发布 v1.14.0`,summary:`系统已升级至 v1.14.0,新增通知中心、工作流增强等多项功能。`,category:`system`,priority:`normal`,status:`unread`,timestamp:new Date(Date.now()-3*36e5).toISOString(),sender:{name:`系统管理员`}},{id:`msg-005`,title:`项目交付提醒`,summary:`「Robot Admin 二期」项目交付截止日期为 3月15日,当前进度 78%。`,category:`business`,priority:`high`,status:`read`,timestamp:new Date(Date.now()-8*36e5).toISOString(),sender:{name:`项目管理系统`}},{id:`msg-006`,title:`数据库连接池告警`,summary:`数据库连接池使用率达到 85%,建议关注并适时扩容。`,category:`alarm`,priority:`high`,status:`read`,timestamp:new Date(Date.now()-12*36e5).toISOString(),sender:{name:`监控中心`}},{id:`msg-007`,title:`周报提交提醒`,summary:`本周周报提交截止时间为周五 18:00,请及时提交。`,category:`business`,priority:`normal`,status:`read`,timestamp:new Date(Date.now()-24*36e5).toISOString(),sender:{name:`OA 系统`}},{id:`msg-008`,title:`账号安全提醒`,summary:`检测到您的账号在新设备上登录,如非本人操作请及时修改密码。`,category:`system`,priority:`high`,status:`unread`,timestamp:new Date(Date.now()-45*6e4).toISOString(),sender:{name:`安全中心`}}];function h(e,t){let n=(0,i.ref)(`disconnected`),r=null,a=0,o=null,s=null,d=null,f=0;function p(e){n.value=e,t?.(e)}function m(e){d=e,a=0,h(e)}function h(e){let t=++f;x();let n=g(e);p(`connecting`);try{r=new WebSocket(n)}catch{p(`disconnected`),v(e);return}let i=r;i.addEventListener(`open`,()=>{t!==f||i!==r||(p(`connected`),a=0,y(e))}),i.addEventListener(`message`,e=>{t!==f||i!==r||_(e.data)}),i.addEventListener(`close`,()=>{t!==f||i!==r||(r=null,b(),p(`disconnected`),e.autoReconnect!==!1&&v(e))}),i.addEventListener(`error`,()=>{})}function g(e){let t=e.getToken?.();if(t){let n=e.url.includes(`?`)?`&`:`?`;return`${e.url}${n}token=${encodeURIComponent(t)}`}return e.url}function _(t){if(typeof t==`string`&&t!==`pong`)try{let n=JSON.parse(t);n&&typeof n==`object`&&[`new_message`,`read_sync`,`count_update`].includes(String(n.type))&&`data`in n&&e(n)}catch{}}function v(e){if(d!==e||o)return;let t=Math.max(0,Math.trunc(e.maxReconnectAttempts??5));if(a>=t)return;a++,p(`reconnecting`);let n=Math.max(0,e.reconnectInterval??c),r=Math.min(6e4,n*2**(a-1)),i=f;o=setTimeout(()=>{o=null,!(i!==f||d!==e)&&h(e)},r)}function y(e){b();let t=e.heartbeatInterval??l;if(t<=0)return;let n=e.heartbeatMessage??u;s=setInterval(()=>{if(r?.readyState===WebSocket.OPEN)try{r.send(n)}catch{r.close()}},t)}function b(){s&&=(clearInterval(s),null)}function x(){b(),o&&=(clearTimeout(o),null),r&&=(r.close(),null)}function S(){d=null,f++,a=0,x(),p(`disconnected`)}function C(){d&&(a=0,h(d))}return(0,i.onBeforeUnmount)(()=>{d=null,f++,x()}),{status:(0,i.readonly)(n),connect:m,disconnect:S,reconnect:C}}function g(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.id==`string`&&typeof t.title==`string`&&typeof t.summary==`string`&&typeof t.timestamp==`string`&&[`system`,`business`,`alarm`].includes(String(t.category))&&[`low`,`normal`,`high`,`urgent`].includes(String(t.priority))&&[`read`,`unread`,`archived`].includes(String(t.status))}function _(e,t={}){let n=(0,i.ref)([]),a=(0,i.ref)(`all`),c=(0,i.ref)(!1),l=(0,i.ref)(0),u=(0,i.ref)(1),d=(0,i.ref)(null),f=(0,i.ref)(!1),p=(0,i.ref)(`disconnected`),_=0,v=(0,i.computed)(()=>n.value.filter(e=>e.status===`unread`).length),y=(0,i.computed)(()=>{let e={system:0,business:0,alarm:0};for(let t of n.value)t.status===`unread`&&t.category in e&&e[t.category]++;return e}),b=(0,i.computed)(()=>a.value===`all`?n.value:n.value.filter(e=>e.category===a.value)),x=(0,i.computed)(()=>n.value.length<l.value),S=(0,i.computed)(()=>e.storageKey??s);function C(){if(e.fetchNotifications)return;let t=r.t(S.value);if(Array.isArray(t?.readIds)){let e=new Set(t.readIds.filter(e=>typeof e==`string`));for(let t of n.value)e.has(t.id)&&t.status!==`archived`&&(t.status=`read`)}}let w=null;function T(){e.fetchNotifications||(w&&clearTimeout(w),w=setTimeout(()=>{let e=n.value.filter(e=>e.status===`read`).map(e=>e.id);r.i(S.value,{readIds:e,lastFetchTime:Date.now()}),w=null},300))}async function E(t=!1){let r=++_;t&&(u.value=1),c.value=!0;try{if(e.fetchNotifications){let i=a.value===`all`?void 0:a.value,o=e.pageSize??20,s=await e.fetchNotifications({category:i,page:u.value,pageSize:o});if(r!==_)return;let c=Array.isArray(s.list)?s.list.map(e=>({...e})):[];if(t)n.value=c;else{let e=new Set(n.value.map(e=>e.id));n.value.push(...c.filter(t=>!e.has(t.id)))}l.value=Math.max(n.value.length,Number(s.total)||0)}else D();r===_&&C()}catch(t){throw r===_&&e.onError?.(t,`fetch`),t}finally{r===_&&(c.value=!1)}}function D(){n.value=m.map(e=>({...e})),l.value=m.length}async function O(){if(!x.value||c.value)return;let e=u.value;u.value++;try{await E()}catch(t){throw u.value=e,t}}async function k(t){let r=new Set(t),i=new Map(n.value.filter(e=>r.has(e.id)).map(e=>[e.id,e.status]));for(let e of n.value)r.has(e.id)&&(e.status=`read`);if(T(),e.markAsRead)try{await e.markAsRead(t)}catch(t){for(let e of n.value){let t=i.get(e.id);t&&(e.status=t)}throw T(),e.onError?.(t,`mark-as-read`),t}}async function A(t){let r=t?n.value.filter(e=>e.category===t&&e.status===`unread`):n.value.filter(e=>e.status===`unread`);for(let e of r)e.status=`read`;if(T(),e.markAllRead)try{await e.markAllRead(t)}catch(t){for(let e of r)e.status=`unread`;throw T(),e.onError?.(t,`mark-all-as-read`),t}}async function j(t){let r=new Set(t),i=[...n.value],a=l.value;if(n.value=n.value.filter(e=>!r.has(e.id)),l.value=Math.max(0,l.value-(i.length-n.value.length)),T(),e.deleteNotification)try{await e.deleteNotification(t)}catch(t){throw n.value=i,l.value=a,T(),e.onError?.(t,`delete`),t}}async function M(t){let r=[...n.value],i=l.value;if(t?n.value=n.value.filter(e=>e.category!==t):n.value=[],l.value=n.value.length,T(),e.clearNotifications)try{await e.clearNotifications(t)}catch(t){throw n.value=r,l.value=i,T(),e.onError?.(t,`clear`),t}}function N(e){switch(e.type){case`new_message`:{let r=e.data;if(!g(r))return;n.value.some(e=>e.id===r.id)||(n.value.unshift(r),l.value++,T(),t.onNewMessage?.(r),L(r));break}case`read_sync`:{if(!Array.isArray(e.data))return;let t=e.data.filter(g),r=new Set(t.map(e=>e.id));for(let e of n.value)r.has(e.id)&&(e.status=`read`);T();break}case`count_update`:break}}function P(e){p.value=e,t.onWSStatusChange?.(e)}let{connect:F,disconnect:I}=h(N,P);function L(t){e.desktopNotification&&(typeof window>`u`||!(`Notification`in window)||Notification.permission===`granted`&&z(t))}async function R(){return typeof window>`u`||!(`Notification`in window)?`unsupported`:Notification.requestPermission()}function z(e){let t=new Notification(e.title,{body:e.summary,icon:e.sender?.avatar||`/robot-avatar.png`,tag:e.id});t.addEventListener(`click`,()=>{window.focus(),U(e),t.close()}),setTimeout(()=>t.close(),5e3)}let B=null;function V(){H();let t=e.pollingInterval??o;t<=0||(B=setInterval(()=>{c.value||E(!0).catch(()=>void 0)},t))}function H(){B&&=(clearInterval(B),null)}function U(e){d.value=e,e.status===`unread`&&k([e.id]).catch(()=>void 0)}function W(){d.value=null}function G(t){a.value=t,d.value=null,e.fetchNotifications&&E(!0).catch(()=>void 0)}function K(){E(!0).catch(()=>void 0),V(),e.wsConfig&&F(e.wsConfig)}function q(){_++,H(),I(),w&&=(clearTimeout(w),null)}return(0,i.onMounted)(K),(0,i.onBeforeUnmount)(q),{messages:n,activeCategory:a,loading:c,total:l,page:u,selectedMessage:d,popoverVisible:f,wsStatus:p,unreadCount:v,unreadByCategory:y,filteredMessages:b,hasMore:x,fetchMessages:E,loadMore:O,markAsRead:k,markAllAsRead:A,deleteMessages:j,clearMessages:M,selectMessage:U,clearSelection:W,switchCategory:G,requestDesktopPermission:R,connectWS:F,disconnectWS:I}}const v={class:`notification-badge`},y=[`aria-label`],b={key:0,class:`notification-badge__count`},x={key:0,class:`notification-badge__pulse`},S=(0,i.defineComponent)({__name:`NotificationBadge`,props:{count:{default:0},maxCount:{default:99},hasUrgent:{type:Boolean,default:!1}},emits:[`click`],setup(t){let n=t,r=(0,i.computed)(()=>n.count>n.maxCount?`${n.maxCount}+`:String(n.count));return(n,o)=>{let s=a.NTooltip;return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,v,[(0,i.createVNode)(s,{trigger:`hover`,placement:`bottom`},{trigger:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`button`,{type:`button`,class:`notification-badge__trigger`,"aria-label":`消息通知${t.count>0?`(${t.count} 条未读)`:``}`,onClick:o[0]||=e=>n.$emit(`click`)},[(0,i.createVNode)(e.t,{name:`mdi:bell-outline`,size:18,class:`notification-badge__icon`}),(0,i.createCommentVNode)(` 未读角标 `),(0,i.createVNode)(i.Transition,{name:`badge-bounce`},{default:(0,i.withCtx)(()=>[t.count>0?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,b,(0,i.toDisplayString)(r.value),1)):(0,i.createCommentVNode)(`v-if`,!0)]),_:1}),(0,i.createCommentVNode)(` 脉冲动画(有紧急消息时) `),t.hasUrgent?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,x)):(0,i.createCommentVNode)(`v-if`,!0)],8,y)]),default:(0,i.withCtx)(()=>[(0,i.createTextVNode)(` 消息通知`+(0,i.toDisplayString)(t.count>0?`(${t.count} 条未读)`:``),1)]),_:1})])}}});var C=t.t(S,[[`__scopeId`,`data-v-51516250`]]);const w=6e4,T=36e5,E=864e5,D=7*E,O=30*E;365*E;let k=null;function A(){return k||=j(),k}function j(){function e(e){let r=new Date(e),i=Date.now()-r.getTime();if(i<0||i<w)return`刚刚`;if(i<T)return`${Math.floor(i/w)}分钟前`;if(i<E)return`${Math.floor(i/T)}小时前`;let a=new Date;return a.setHours(0,0,0,0),r>=new Date(a.getTime()-E)&&r<a?`昨天 ${n(r.getHours())}:${n(r.getMinutes())}`:i<D?`${Math.floor(i/E)}天前`:i<O?`${Math.floor(i/D)}周前`:i<31536e6?`${Math.floor(i/O)}个月前`:t(r)}function t(e){return`${e.getFullYear()}-${n(e.getMonth()+1)}-${n(e.getDate())} ${n(e.getHours())}:${n(e.getMinutes())}`}function n(e){return e<10?`0${e}`:String(e)}return{formatRelativeTime:e,formatFullDate:t}}const M={class:`notification-item__indicator`},N={class:`notification-item__avatar`},P={class:`notification-item__body`},F={class:`notification-item__header`},I={class:`notification-item__title`},L={class:`notification-item__summary`},R={class:`notification-item__meta`},z={class:`notification-item__time`},B={key:0,class:`notification-item__sender`},V=(0,i.defineComponent)({__name:`NotificationItem`,props:{message:{}},emits:[`click`,`read`,`delete`],setup(t){let n=t,{formatRelativeTime:r}=A(),o=(0,i.computed)(()=>d[n.message.category]?.icon??`mdi:bell-outline`),s=(0,i.computed)(()=>p[n.message.priority]??p.normal),c=(0,i.computed)(()=>r(n.message.timestamp));return(n,r)=>{let l=a.NAvatar,u=a.NTag,d=a.NTooltip;return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,{class:(0,i.normalizeClass)([`notification-item`,{"notification-item--unread":t.message.status===`unread`,"notification-item--urgent":t.message.priority===`urgent`}]),onClick:r[3]||=e=>n.$emit(`click`,t.message)},[(0,i.createCommentVNode)(` 未读指示点 `),(0,i.createElementVNode)(`div`,M,[t.message.status===`unread`?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,{key:0,class:(0,i.normalizeClass)([`notification-item__dot`,`notification-item__dot--${t.message.priority}`])},null,2)):(0,i.createCommentVNode)(`v-if`,!0)]),(0,i.createCommentVNode)(` 头像 `),(0,i.createElementVNode)(`div`,N,[t.message.sender?.avatar?((0,i.openBlock)(),(0,i.createBlock)(l,{key:0,src:t.message.sender.avatar,size:36,round:``},null,8,[`src`])):((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:1,class:(0,i.normalizeClass)([`notification-item__avatar-placeholder`,`notification-item__avatar-placeholder--${t.message.category}`])},[(0,i.createVNode)(e.t,{name:o.value,size:16},null,8,[`name`])],2))]),(0,i.createCommentVNode)(` 内容 `),(0,i.createElementVNode)(`div`,P,[(0,i.createElementVNode)(`div`,F,[(0,i.createElementVNode)(`span`,I,(0,i.toDisplayString)(t.message.title),1),t.message.priority===`urgent`||t.message.priority===`high`?((0,i.openBlock)(),(0,i.createBlock)(u,{key:0,type:s.value.type,size:`tiny`,bordered:!1,round:``},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(s.value.label),1)]),_:1},8,[`type`])):(0,i.createCommentVNode)(`v-if`,!0)]),(0,i.createElementVNode)(`div`,L,(0,i.toDisplayString)(t.message.summary),1),(0,i.createElementVNode)(`div`,R,[(0,i.createElementVNode)(`span`,z,(0,i.toDisplayString)(c.value),1),t.message.sender?.name?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,B,(0,i.toDisplayString)(t.message.sender.name),1)):(0,i.createCommentVNode)(`v-if`,!0)])]),(0,i.createCommentVNode)(` 操作区 `),(0,i.createElementVNode)(`div`,{class:`notification-item__actions`,onClick:r[2]||=(0,i.withModifiers)(()=>{},[`stop`])},[t.message.status===`unread`?((0,i.openBlock)(),(0,i.createBlock)(d,{key:0,trigger:`hover`,placement:`top`},{trigger:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`span`,{class:`notification-item__action`,onClick:r[0]||=e=>n.$emit(`read`,t.message.id)},[(0,i.createVNode)(e.t,{name:`mdi:check`,size:16})])]),default:(0,i.withCtx)(()=>[r[4]||=(0,i.createTextVNode)(` 标记已读 `,-1)]),_:1})):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createVNode)(d,{trigger:`hover`,placement:`top`},{trigger:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`span`,{class:`notification-item__action`,onClick:r[1]||=e=>n.$emit(`delete`,t.message.id)},[(0,i.createVNode)(e.t,{name:`mdi:delete-outline`,size:16})])]),default:(0,i.withCtx)(()=>[r[5]||=(0,i.createTextVNode)(` 删除 `,-1)]),_:1})])],2)}}});var H=t.t(V,[[`__scopeId`,`data-v-2f1c8e96`]]);const U={class:`notification-list`},W={class:`notification-list__tabs`},G=[`onClick`],K={key:0,class:`notification-list__tab-count`},q={key:0,class:`notification-list__toolbar`},ee={class:`notification-list__skeleton-text`},J={class:`notification-list__items`},Y={class:`notification-list__empty`},X=(0,i.defineComponent)({__name:`NotificationList`,props:{messages:{},activeCategory:{},unreadByCategory:{},unreadCount:{},loading:{type:Boolean},hasMore:{type:Boolean},scrollHeight:{default:420}},emits:[`switchCategory`,`itemClick`,`read`,`delete`,`markAllRead`,`clear`,`loadMore`],setup(t){let n=t,r=(0,i.computed)(()=>n.activeCategory===`all`?n.unreadCount:n.unreadByCategory[n.activeCategory]??0);function o(e){return e===`all`?n.unreadCount:n.unreadByCategory[e]??0}return(n,s)=>{let c=a.NButton,l=a.NSkeleton,u=a.NSpin,d=a.NScrollbar;return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,U,[(0,i.createCommentVNode)(` 分类 Tab `),(0,i.createElementVNode)(`div`,W,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)((0,i.unref)(f),e=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:e.key,class:(0,i.normalizeClass)([`notification-list__tab`,{"notification-list__tab--active":t.activeCategory===e.key}]),onClick:t=>n.$emit(`switchCategory`,e.key)},[(0,i.createElementVNode)(`span`,null,(0,i.toDisplayString)(e.label),1),o(e.key)>0?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,K,(0,i.toDisplayString)(o(e.key)),1)):(0,i.createCommentVNode)(`v-if`,!0)],10,G))),128))]),(0,i.createCommentVNode)(` 操作栏 `),t.messages.length>0?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,q,[(0,i.createVNode)(c,{text:``,size:`tiny`,disabled:r.value===0,onClick:s[0]||=e=>n.$emit(`markAllRead`)},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(e.t,{name:`mdi:check-all`,size:14})]),default:(0,i.withCtx)(()=>[s[6]||=(0,i.createTextVNode)(` 全部已读 `,-1)]),_:1},8,[`disabled`]),(0,i.createVNode)(c,{text:``,size:`tiny`,onClick:s[1]||=e=>n.$emit(`clear`)},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(e.t,{name:`mdi:delete-sweep-outline`,size:14})]),default:(0,i.withCtx)(()=>[s[7]||=(0,i.createTextVNode)(` 清空 `,-1)]),_:1})])):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createCommentVNode)(` 消息列表 `),(0,i.createVNode)(d,{class:`notification-list__scroll`,style:(0,i.normalizeStyle)({maxHeight:`${t.scrollHeight}px`})},{default:(0,i.withCtx)(()=>[t.loading&&t.messages.length===0?((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:0},[(0,i.createCommentVNode)(` 骨架屏 `),((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(4,e=>(0,i.createElementVNode)(`div`,{key:e,class:`notification-list__skeleton`},[(0,i.createVNode)(l,{circle:``,width:36,height:36}),(0,i.createElementVNode)(`div`,ee,[(0,i.createVNode)(l,{text:``,width:`60%`,height:14}),(0,i.createVNode)(l,{text:``,width:`90%`,height:12}),(0,i.createVNode)(l,{text:``,width:`40%`,height:10})])])),64))],64)):t.messages.length>0?((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:1},[(0,i.createElementVNode)(`div`,J,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(t.messages,e=>((0,i.openBlock)(),(0,i.createBlock)(H,{key:e.id,message:e,onClick:s[2]||=e=>n.$emit(`itemClick`,e),onRead:s[3]||=e=>n.$emit(`read`,e),onDelete:s[4]||=e=>n.$emit(`delete`,e)},null,8,[`message`]))),128))]),(0,i.createCommentVNode)(` 加载更多 `),t.hasMore?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:0,class:`notification-list__load-more`,onClick:s[5]||=e=>n.$emit(`loadMore`)},[t.loading?((0,i.openBlock)(),(0,i.createBlock)(u,{key:0,size:14})):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createElementVNode)(`span`,null,(0,i.toDisplayString)(t.loading?`加载中...`:`加载更多`),1)])):(0,i.createCommentVNode)(`v-if`,!0)],64)):((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:2},[(0,i.createCommentVNode)(` 空状态 `),(0,i.createElementVNode)(`div`,Y,[(0,i.createVNode)(e.t,{name:`mdi:bell-off-outline`,size:48,class:`notification-list__empty-icon`}),s[8]||=(0,i.createElementVNode)(`span`,{class:`notification-list__empty-text`},`暂无消息`,-1)])],2112))]),_:1},8,[`style`])])}}});var Z=t.t(X,[[`__scopeId`,`data-v-d366768f`]]);function Q(e){return e.includes(`\\`)||e.startsWith(`//`)||Array.from(e).some(e=>e.charCodeAt(0)<32)}function te(e){let t=e?.trim();if(!t||Q(t))return null;if(/^https?:\/\//i.test(t))try{let e=new URL(t);return e.protocol!==`http:`&&e.protocol!==`https:`?null:{kind:`external`,url:e.href}}catch{return null}return/^[a-z][a-z\d+.-]*:/i.test(t)?null:{kind:`internal`,url:t}}const ne={class:`notification-detail`},re={class:`notification-detail__back`},ie={class:`notification-detail__header`},ae={class:`notification-detail__title`},oe={class:`notification-detail__meta`},se={class:`notification-detail__time`},ce={key:0,class:`notification-detail__sender`},le=[`innerHTML`],ue={key:1,class:`notification-detail__body`},$={key:0,class:`notification-detail__footer`},de=(0,i.defineComponent)({__name:`NotificationDetail`,props:{message:{},scrollHeight:{default:320}},emits:[`back`,`action`,`navigate`],setup(t,{emit:r}){let o=t,s=r,{formatRelativeTime:c}=A(),l=(0,i.computed)(()=>d[o.message.category]??d.system),u=(0,i.computed)(()=>p[o.message.priority]??p.normal),f=(0,i.computed)(()=>c(o.message.timestamp)),m=(0,i.computed)(()=>n.t(o.message.content||``));function h(){let e=te(o.message.actionUrl);e&&(s(`action`,e.url),e.kind===`external`?window.open(e.url,`_blank`,`noopener,noreferrer`):s(`navigate`,e.url))}return(n,r)=>{let o=a.NButton,s=a.NTag,c=a.NAvatar,d=a.NScrollbar;return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,ne,[(0,i.createCommentVNode)(` 返回栏 `),(0,i.createElementVNode)(`div`,re,[(0,i.createVNode)(o,{text:``,size:`small`,onClick:r[0]||=e=>n.$emit(`back`)},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(e.t,{name:`mdi:arrow-left`,size:16})]),default:(0,i.withCtx)(()=>[r[1]||=(0,i.createTextVNode)(` 返回列表 `,-1)]),_:1})]),(0,i.createCommentVNode)(` 消息头部 `),(0,i.createElementVNode)(`div`,ie,[(0,i.createElementVNode)(`h3`,ae,(0,i.toDisplayString)(t.message.title),1),(0,i.createElementVNode)(`div`,oe,[(0,i.createVNode)(s,{type:l.value.color,size:`tiny`,bordered:!1,round:``},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(e.t,{name:l.value.icon,size:12},null,8,[`name`])]),default:(0,i.withCtx)(()=>[(0,i.createTextVNode)(` `+(0,i.toDisplayString)(l.value.label),1)]),_:1},8,[`type`]),t.message.priority===`urgent`||t.message.priority===`high`?((0,i.openBlock)(),(0,i.createBlock)(s,{key:0,type:u.value.type,size:`tiny`,bordered:!1,round:``},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(u.value.label),1)]),_:1},8,[`type`])):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createElementVNode)(`span`,se,(0,i.toDisplayString)(f.value),1)]),t.message.sender?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,ce,[t.message.sender.avatar?((0,i.openBlock)(),(0,i.createBlock)(c,{key:0,src:t.message.sender.avatar,size:20,round:``},null,8,[`src`])):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createElementVNode)(`span`,null,(0,i.toDisplayString)(t.message.sender.name),1)])):(0,i.createCommentVNode)(`v-if`,!0)]),(0,i.createCommentVNode)(` 消息内容 `),(0,i.createVNode)(d,{class:`notification-detail__content`,style:(0,i.normalizeStyle)({maxHeight:`${t.scrollHeight}px`})},{default:(0,i.withCtx)(()=>[t.message.content?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:0,class:`notification-detail__body`,innerHTML:m.value},null,8,le)):((0,i.openBlock)(),(0,i.createElementBlock)(`div`,ue,(0,i.toDisplayString)(t.message.summary),1))]),_:1},8,[`style`]),(0,i.createCommentVNode)(` 操作区 `),t.message.actionUrl?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,$,[(0,i.createVNode)(o,{type:`primary`,size:`small`,onClick:h},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(e.t,{name:`mdi:arrow-right`,size:16})]),default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(t.message.actionText||`查看详情`)+` `,1)]),_:1})])):(0,i.createCommentVNode)(`v-if`,!0)])}}});var fe=t.t(de,[[`__scopeId`,`data-v-8e02b6cd`]]);const pe={class:`c-notification-center`},me={class:`c-notification-center__panel`},he={class:`c-notification-center__header`},ge={class:`c-notification-center__header-extra`},_e=(0,i.defineComponent)({name:`C_NotificationCenter`,__name:`index`,props:{fetchNotifications:{},markAsRead:{},markAllRead:{},deleteNotification:{},clearNotifications:{},wsConfig:{},desktopNotification:{type:Boolean,default:!1},maxBadgeCount:{default:99},pollingInterval:{default:6e4},pageSize:{default:20},storageKey:{default:`notification_center`},onError:{}},emits:[`itemClick`,`read`,`allRead`,`delete`,`unreadChange`,`wsStatusChange`,`newMessage`,`navigate`],setup(e,{expose:t,emit:n}){let r=e,o=n,s=_(r,{onNewMessage:e=>o(`newMessage`,e),onWSStatusChange:e=>o(`wsStatusChange`,e)}),c=(0,i.computed)(()=>s.messages.value.some(e=>e.status===`unread`&&e.priority===`urgent`)),l=(0,i.computed)(()=>({connected:`已连接`,connecting:`连接中...`,disconnected:`未连接`,reconnecting:`重连中...`})[s.wsStatus.value]??`未知`);(0,i.watch)(()=>s.unreadCount.value,e=>{o(`unreadChange`,e)});function u(){s.popoverVisible.value=!s.popoverVisible.value}function d(e){s.selectMessage(e),o(`itemClick`,e)}async function f(e){try{await s.markAsRead([e]),o(`read`,[e])}catch{}}async function p(e){try{await s.deleteMessages([e]),o(`delete`,[e])}catch{}}async function m(){let e=s.activeCategory.value===`all`?void 0:s.activeCategory.value;try{await s.markAllAsRead(e),o(`allRead`,e)}catch{}}async function h(){let e=s.activeCategory.value===`all`?void 0:s.activeCategory.value;try{await s.clearMessages(e)}catch{}}function g(){s.popoverVisible.value=!1}function v(){s.clearSelection()}return t({refresh:()=>s.fetchMessages(!0),connectWS:()=>{r.wsConfig&&s.connectWS(r.wsConfig)},disconnectWS:s.disconnectWS,getUnreadCount:()=>s.unreadCount.value,getMessages:()=>s.messages.value.map(e=>({...e})),markRead:e=>s.markAsRead(e),markAllAsRead:e=>s.markAllAsRead(e),requestDesktopPermission:s.requestDesktopPermission}),(e,t)=>{let n=a.NTooltip,_=a.NPopover;return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,pe,[(0,i.createVNode)(_,{show:(0,i.unref)(s).popoverVisible.value,"onUpdate:show":t[1]||=e=>(0,i.unref)(s).popoverVisible.value=e,width:420,trigger:`manual`,placement:`bottom-end`,"show-arrow":!1,"content-class":`c-notification-center__popover`,onAfterLeave:v},{trigger:(0,i.withCtx)(()=>[(0,i.createVNode)(C,{count:(0,i.unref)(s).unreadCount.value,"max-count":r.maxBadgeCount,"has-urgent":c.value,onClick:u},null,8,[`count`,`max-count`,`has-urgent`])]),default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,me,[(0,i.createCommentVNode)(` 头部标题 `),(0,i.createElementVNode)(`div`,he,[t[2]||=(0,i.createElementVNode)(`span`,{class:`c-notification-center__title`},`消息中心`,-1),(0,i.createElementVNode)(`div`,ge,[(0,i.createCommentVNode)(` WebSocket 连接状态 `),r.wsConfig?((0,i.openBlock)(),(0,i.createBlock)(n,{key:0,trigger:`hover`,placement:`top`},{trigger:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`span`,{class:(0,i.normalizeClass)([`c-notification-center__ws-dot`,`c-notification-center__ws-dot--${(0,i.unref)(s).wsStatus.value}`])},null,2)]),default:(0,i.withCtx)(()=>[(0,i.createTextVNode)(` `+(0,i.toDisplayString)(l.value),1)]),_:1})):(0,i.createCommentVNode)(`v-if`,!0)])]),(0,i.createCommentVNode)(` 列表 / 详情切换 `),(0,i.createVNode)(i.Transition,{name:`slide-fade`,mode:`out-in`},{default:(0,i.withCtx)(()=>[(0,i.unref)(s).selectedMessage.value?((0,i.openBlock)(),(0,i.createBlock)(fe,{key:(0,i.unref)(s).selectedMessage.value.id,message:(0,i.unref)(s).selectedMessage.value,onBack:(0,i.unref)(s).clearSelection,onAction:g,onNavigate:t[0]||=e=>o(`navigate`,e)},null,8,[`message`,`onBack`])):((0,i.openBlock)(),(0,i.createBlock)(Z,{key:1,messages:(0,i.unref)(s).filteredMessages.value,"active-category":(0,i.unref)(s).activeCategory.value,"unread-by-category":(0,i.unref)(s).unreadByCategory.value,"unread-count":(0,i.unref)(s).unreadCount.value,loading:(0,i.unref)(s).loading.value,"has-more":(0,i.unref)(s).hasMore.value,onSwitchCategory:(0,i.unref)(s).switchCategory,onItemClick:d,onRead:f,onDelete:p,onMarkAllRead:m,onClear:h,onLoadMore:(0,i.unref)(s).loadMore},null,8,[`messages`,`active-category`,`unread-by-category`,`unread-count`,`loading`,`has-more`,`onSwitchCategory`,`onLoadMore`]))]),_:1})])]),_:1},8,[`show`])])}}});var ve=t.t(_e,[[`__scopeId`,`data-v-a06c4b3a`]]);Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return 20}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return 5}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return 99}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return s}});
1
+ require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`),n=require(`./html.cjs`),r=require(`./storage.cjs`);let i=require(`vue`),a=require(`naive-ui`);const o=6e4,s=`notification_center`,c=3e3,l=3e4,u=`ping`,d={system:{label:`系统通知`,icon:`mdi:cog-outline`,color:`info`},business:{label:`业务消息`,icon:`mdi:briefcase-outline`,color:`success`},alarm:{label:`告警预警`,icon:`mdi:alert-outline`,color:`warning`}},f=[{key:`all`,label:`全部`},{key:`system`,label:`系统通知`},{key:`business`,label:`业务消息`},{key:`alarm`,label:`告警预警`}],p={low:{label:`低`,type:`default`},normal:{label:`普通`,type:`info`},high:{label:`重要`,type:`warning`},urgent:{label:`紧急`,type:`error`}},m=[{id:`msg-001`,title:`系统维护通知`,summary:`系统将于今晚 22:00-23:00 进行例行维护升级,届时部分功能可能暂时不可用。`,content:`<p>尊敬的用户:</p><p>为了提升系统性能和稳定性,我们计划于 <strong>2026年2月27日 22:00-23:00</strong> 对系统进行例行维护升级。</p><p>维护期间,以下功能可能暂时不可用:</p><ul><li>报表导出</li><li>数据同步</li><li>定时任务</li></ul><p>请提前保存好未完成的工作,感谢您的理解与支持!</p>`,category:`system`,priority:`high`,status:`unread`,timestamp:new Date(Date.now()-15*6e4).toISOString(),sender:{name:`系统管理员`,avatar:``}},{id:`msg-002`,title:`审批流程待处理`,summary:`张三提交的《Q1 季度预算申请》需要您审批,请尽快处理。`,category:`business`,priority:`urgent`,status:`unread`,timestamp:new Date(Date.now()-30*6e4).toISOString(),sender:{name:`张三`,avatar:``},actionUrl:`/workflow/approval`,actionText:`去审批`},{id:`msg-003`,title:`服务器 CPU 使用率告警`,summary:`生产环境节点 prod-node-03 CPU 使用率持续超过 90%,已触发告警阈值。`,category:`alarm`,priority:`urgent`,status:`unread`,timestamp:new Date(Date.now()-2*6e4).toISOString(),sender:{name:`监控中心`},actionUrl:`/monitor/server`,actionText:`查看详情`},{id:`msg-004`,title:`新版本发布 v1.14.0`,summary:`系统已升级至 v1.14.0,新增通知中心、工作流增强等多项功能。`,category:`system`,priority:`normal`,status:`unread`,timestamp:new Date(Date.now()-3*36e5).toISOString(),sender:{name:`系统管理员`}},{id:`msg-005`,title:`项目交付提醒`,summary:`「Robot Admin 二期」项目交付截止日期为 3月15日,当前进度 78%。`,category:`business`,priority:`high`,status:`read`,timestamp:new Date(Date.now()-8*36e5).toISOString(),sender:{name:`项目管理系统`}},{id:`msg-006`,title:`数据库连接池告警`,summary:`数据库连接池使用率达到 85%,建议关注并适时扩容。`,category:`alarm`,priority:`high`,status:`read`,timestamp:new Date(Date.now()-12*36e5).toISOString(),sender:{name:`监控中心`}},{id:`msg-007`,title:`周报提交提醒`,summary:`本周周报提交截止时间为周五 18:00,请及时提交。`,category:`business`,priority:`normal`,status:`read`,timestamp:new Date(Date.now()-24*36e5).toISOString(),sender:{name:`OA 系统`}},{id:`msg-008`,title:`账号安全提醒`,summary:`检测到您的账号在新设备上登录,如非本人操作请及时修改密码。`,category:`system`,priority:`high`,status:`unread`,timestamp:new Date(Date.now()-45*6e4).toISOString(),sender:{name:`安全中心`}}];function h(e,t){let n=(0,i.ref)(`disconnected`),r=null,a=0,o=null,s=null,d=null,f=null,p=0;function m(e){n.value=e,t?.(e)}function h(e){f=e,a=0,g(e)}function g(e){let t=++p;S(),m(`connecting`);try{r=new WebSocket(_(e))}catch{m(`disconnected`),e.autoReconnect!==!1&&y(e);return}let n=r;n.addEventListener(`open`,()=>{t!==p||n!==r||(m(`connected`),a=0,b(e))}),n.addEventListener(`message`,e=>{t!==p||n!==r||v(e.data)}),n.addEventListener(`close`,()=>{t!==p||n!==r||(r=null,x(),m(`disconnected`),e.autoReconnect!==!1&&y(e))}),n.addEventListener(`error`,()=>{})}function _(e){let t=e.getToken?.();if(t){let n=e.url.includes(`?`)?`&`:`?`;return`${e.url}${n}token=${encodeURIComponent(t)}`}return e.url}function v(t){if(typeof t==`string`){if(t===`pong`){d&&clearTimeout(d),d=null;return}try{let n=JSON.parse(t);n&&typeof n==`object`&&[`new_message`,`read_sync`,`count_update`].includes(String(n.type))&&`data`in n&&e(n)}catch{}}}function y(e){if(f!==e||o)return;let t=Math.max(0,Math.trunc(e.maxReconnectAttempts??5));if(a>=t)return;a++,m(`reconnecting`);let n=Math.max(0,e.reconnectInterval??c),r=Math.min(6e4,n*2**(a-1)),i=p;o=setTimeout(()=>{o=null,!(i!==p||f!==e)&&g(e)},r)}function b(e){x();let t=e.heartbeatInterval??l;if(t<=0)return;let n=e.heartbeatMessage??u;s=setInterval(()=>{if(r?.readyState===WebSocket.OPEN&&!d)try{r.send(n);let t=e.heartbeatTimeout??0;if(t>0){let e=r;d=setTimeout(()=>{d=null,e===r&&e.close()},t)}}catch{r.close()}},t)}function x(){d&&clearTimeout(d),d=null,s&&=(clearInterval(s),null)}function S(){x(),o&&=(clearTimeout(o),null),r&&=(r.close(),null)}function C(){f=null,p++,a=0,S(),m(`disconnected`)}function w(){f&&(a=0,g(f))}return(0,i.getCurrentScope)()&&(0,i.onScopeDispose)(C),{status:(0,i.readonly)(n),connect:h,disconnect:C,reconnect:w}}const g=[`system`,`business`,`alarm`],_=()=>({list:[],known:new Map,total:0,unread:0,categories:{},statisticsVersion:0,queryCategory:`all`});function v(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.id==`string`&&t.id.length>0&&typeof t.title==`string`&&typeof t.summary==`string`&&typeof t.timestamp==`string`&&Number.isFinite(Date.parse(t.timestamp))&&g.includes(t.category)&&[`low`,`normal`,`high`,`urgent`].includes(String(t.priority))&&[`read`,`unread`,`archived`].includes(String(t.status))}function y(e){return{...e,...e.sender?{sender:{...e.sender}}:{},...e.extra?{extra:{...e.extra}}:{}}}function b(e){let t={system:0,business:0,alarm:0};for(let n of e)n.status===`unread`&&t[n.category]++;return t}function x(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function S(e){let t={};if(e&&typeof e==`object`)for(let n of g){let r=e[n];x(r)&&(t[n]=r)}return t}function C(e,t,n){let r=new Map(e);for(let e of t)n?r.delete(e.id):e.status===`unread`&&r.set(e.id,{...e,status:`read`});return r}function w(e,t,n){if(t.kind!==`delete`&&t.kind!==`clear`)return e.total;let r=e.queryCategory===t.queryCategory?t.unknownTotal:0;return Math.max(0,e.total-n-r)}function T(e,t){let n=new Set(t.ids),r=[...e.known.values()].filter(e=>n.has(e.id)),i=e.list.filter(e=>n.has(e.id)),a=r.filter(e=>e.status===`unread`),o=t.kind===`delete`||t.kind===`clear`,s=o?e.list.filter(e=>!n.has(e.id)):e.list.map(e=>n.has(e.id)&&e.status===`unread`?{...e,status:`read`}:e),c={...e.categories},l=C(e.known,r,o),u=e.statisticsVersion===t.statisticsVersion;for(let e of g){let n=c[e];if(n===void 0||!u)continue;let r=a.filter(t=>t.category===e).length;c[e]=Math.max(0,n-r-(t.unknownCategories[e]??0))}return{list:s,known:l,total:w(e,t,i.length),unread:u?Math.max(0,e.unread-a.length-t.unknownUnread):e.unread,categories:c,statisticsVersion:e.statisticsVersion,queryCategory:e.queryCategory}}function ee(e,t,n,r){if(!Array.isArray(e?.list)||!e.list.every(v)||!x(e.total)||!x(e.unreadCount))throw Error(`消息接口返回的数据或统计无效`);let i=new Map,a=new Map(t.known);if(!n)for(let e of t.list)i.set(e.id,e);for(let t of e.list){let e=y(t);i.set(t.id,e),a.set(t.id,e)}return{list:[...i.values()],known:a,total:e.total,unread:e.unreadCount,categories:S(e.unreadByCategory),statisticsVersion:t.statisticsVersion,queryCategory:r}}function te(e,t,n){let r=b(t),i={},a=n?[n]:g;for(let t of a){let n=e.categories[t];n!==void 0&&(i[t]=Math.max(0,n-r[t]))}let o=n?e.categories[n]:e.unread;return{unknownCategories:i,unknownUnread:o===void 0?0:Math.max(0,o-t.filter(e=>e.status===`unread`).length)}}function E(e,t={}){let n=(0,i.computed)(()=>e.dataMode??(e.fetchNotifications?`remote`:`demo`)),a=(0,i.shallowRef)(_()),c=(0,i.shallowRef)([]),l=(0,i.computed)(()=>c.value.reduce(T,a.value)),u=(0,i.computed)(()=>l.value.list),d=(0,i.ref)(`all`),f=(0,i.ref)(!1),p=(0,i.ref)(1),g=(0,i.ref)(null),C=(0,i.ref)(!1),w=(0,i.ref)(`disconnected`),E=(0,i.ref)(null),ne=(0,i.computed)(()=>l.value.unread),re=(0,i.computed)(()=>l.value.categories),D=(0,i.computed)(()=>d.value===`all`?u.value:u.value.filter(e=>e.category===d.value)),O=(0,i.computed)(()=>n.value===`demo`?D.value.length:l.value.total),ie=(0,i.computed)(()=>n.value===`remote`&&D.value.length<O.value),ae=(0,i.computed)(()=>c.value.length>0),oe=(0,i.computed)(()=>[...new Set(c.value.flatMap(e=>e.ids))]),k=0,A=0,se=0,j=0,M=!1,N=!1,P=[],F=null,I=!1,L,R=new Set;function z(t,n){E.value=t instanceof Error?t.message:`消息操作失败,请重试`,e.onError?.(t,n)}function B(){E.value=null}function V(e){let t=new Set([...e.list.map(e=>e.id),...c.value.flatMap(e=>e.ids)]),n=new Map,r=0;for(let[i,a]of[...e.known].reverse()){let e=t.has(i);(e||r<256)&&(n.set(i,a),e||r++)}return{...e,known:new Map([...n].reverse())}}function H(e){let t=b(e);return{list:e,known:new Map(e.map(e=>[e.id,e])),total:e.length,unread:Object.values(t).reduce((e,t)=>e+t,0),categories:t,statisticsVersion:0,queryCategory:`all`}}function ce(){let t=r.t(e.storageKey??s);if(t?.version===2&&Array.isArray(t.messages)){a.value=H(t.messages.filter(v).map(y));return}let n=new Set(Array.isArray(t?.readIds)?t.readIds:[]);a.value=H(m.map(e=>({...y(e),status:n.has(e.id)?`read`:e.status})))}function U(){n.value===`demo`&&r.i(e.storageKey??s,{version:2,messages:a.value.list.map(y)})}function W(e){let t=++A;f.value&&P.push({...e,version:t})}function le(e){return n.value===`demo`||d.value===`all`||d.value===e.category}function ue(e,t,n=!1){if(e.list.some(e=>e.id===t.id)||!n&&e.known.has(t.id))return e;let r=le(t),i={...e.categories};return t.status===`unread`&&i[t.category]!==void 0&&i[t.category]++,{list:r?[y(t),...e.list]:e.list,known:new Map([...e.known,[t.id,y(t)]]),total:e.total+(r?1:0),unread:e.unread+(t.status===`unread`?1:0),categories:i,statisticsVersion:e.statisticsVersion,queryCategory:e.queryCategory}}function de(e,t){return`operation`in t?T(e,{...t.operation,statisticsVersion:e.statisticsVersion}):`message`in t?ue(e,t.message,!0):{...e,unread:t.counts.unreadCount,categories:{...e.categories,...S(t.counts.unreadByCategory)},statisticsVersion:e.statisticsVersion+1}}function G(e,t){return!N&&t===j&&e===k}async function fe(t,n){if(!e.fetchNotifications)throw Error(`远程消息模式未配置 fetchNotifications`);return e.fetchNotifications({category:n===`all`?void 0:n,page:t,pageSize:e.pageSize??20})}function pe(e,t){let n=e;for(let e of P)e.version>t&&(n=de(n,e));return n}async function K(e,t){let r=++k,i=A,o=d.value,s=j;f.value=!0,B();try{if(n.value===`demo`){ce(),p.value=1;return}let c=await fe(e,o);if(!G(r,s))return;a.value=V(pe(ee(c,a.value,t,o),i)),p.value=e}catch(n){throw G(r,s)&&(L=()=>K(e,t),z(n,`fetch`)),n}finally{G(r,s)&&(f.value=!1,P=[])}}async function q(e=!1){await K(e?1:p.value,e)}async function me(){f.value||!ie.value||await K(p.value+1,!1)}function J(e,t,n){let r={id:++se,kind:e,ids:[...new Set(t)],category:n,unknownUnread:0,unknownCategories:{},unknownTotal:0,statisticsVersion:a.value.statisticsVersion,queryCategory:d.value};if(e!==`read-all`&&e!==`clear`)return r;let i=[...a.value.known.values()].filter(e=>!n||e.category===n);Object.assign(r,te(a.value,i,n));let o=!n||d.value===n;return e===`clear`&&o&&(r.unknownTotal=Math.max(0,a.value.total-a.value.list.filter(e=>!n||e.category===n).length)),r}async function Y(e,t,r){if(B(),n.value===`remote`&&!t){let n=Error(`远程消息模式未配置 `+r+` 接口`);throw L=()=>Y(e,t,r),z(n,r),n}let i=j;c.value=[...c.value,e];try{if(n.value===`remote`&&await t(),N||i!==j){let e=Error(`消息作用域已失效`);throw e.name=`AbortError`,e}a.value=T(a.value,e),W({operation:e}),U()}catch(n){throw!N&&i===j&&(L=()=>Y(e,t,r),z(n,r)),n}finally{i===j&&(c.value=c.value.filter(t=>t.id!==e.id),a.value=V(a.value))}}async function he(t){await Y(J(`read`,t),e.markAsRead?()=>e.markAsRead(t):void 0,`mark-as-read`)}async function ge(t){await Y(J(`read-all`,[...a.value.known.values()].filter(e=>!t||e.category===t).map(e=>e.id),t),e.markAllRead?()=>e.markAllRead(t):void 0,`mark-all-as-read`)}async function _e(t){await Y(J(`delete`,t),e.deleteNotification?()=>e.deleteNotification(t):void 0,`delete`),g.value&&t.includes(g.value.id)&&Z()}async function ve(t){await Y(J(`clear`,[...a.value.known.values()].filter(e=>!t||e.category===t).map(e=>e.id),t),e.clearNotifications?()=>e.clearNotifications(t):void 0,`clear`),g.value&&(!t||g.value.category===t)&&Z()}let X=new Set;function ye(e){if(!v(e))return;let n=e;X.has(n.id)||a.value.known.has(n.id)||(X.add(n.id),X.size>2e3&&X.delete(X.values().next().value),a.value=ue(a.value,n),W({message:y(n)}),U(),t.onNewMessage?.(n),De(n))}function be(e){if(!Array.isArray(e))return;let t=J(`read`,e.filter(v).map(e=>e.id));a.value=T(a.value,t),W({operation:t}),U()}function xe(e){if(e&&typeof e==`object`&&`unreadCount`in e&&x(e.unreadCount)){let t=e;a.value=de(a.value,{version:0,counts:t}),W({counts:t})}}function Se(e){if(!N)switch(e.type){case`new_message`:ye(e.data);break;case`read_sync`:be(e.data);break;case`count_update`:xe(e.data);break}}function Ce(e){w.value=e,t.onWSStatusChange?.(e),e===`connected`&&(I&&n.value===`remote`&&q(!0).catch(()=>void 0),I=!0)}let we=h(Se,Ce);function Te(t=e.wsConfig){t&&we.connect(t)}function Ee(){we.disconnect()}function De(t){if(!e.desktopNotification||typeof window>`u`||!(`Notification`in window)||Notification.permission!==`granted`)return;let n=new Notification(t.title,{body:t.summary,icon:t.sender?.avatar,tag:t.id});n.addEventListener(`click`,()=>{window.focus(),ke(t),n.close()});let r=setTimeout(()=>{n.close(),R.delete(r)},5e3);R.add(r)}async function Oe(){return typeof window>`u`||!(`Notification`in window)?`unsupported`:Notification.requestPermission()}function ke(e){g.value=e,e.status===`unread`&&he([e.id]).catch(()=>void 0)}function Z(){g.value=null}function Ae(e){d.value!==e&&(d.value=e,Z(),n.value===`remote`&&(a.value={...a.value,list:[],total:0,queryCategory:e},p.value=1,q(!0).catch(()=>void 0)))}function Q(){if(M)return;M=!0,N=!1,q(!0).catch(()=>void 0);let t=e.pollingInterval??o;n.value===`remote`&&t>0&&(F=setInterval(()=>{f.value||q(!0).catch(()=>void 0)},t)),Te()}function $(){M=!1,N=!0,j++,k++,f.value=!1,c.value=[],P=[],L=void 0,X.clear(),I=!1,F&&clearInterval(F),F=null;for(let e of R)clearTimeout(e);R.clear(),Ee()}async function je(){L?await L():await q(!0)}return(0,i.getCurrentScope)()&&(0,i.onScopeDispose)($),e.autoStart!==!1&&((0,i.getCurrentInstance)()?(0,i.onMounted)(Q):Q()),(0,i.watch)(u,e=>{let t=g.value?.id;t&&(g.value=e.find(e=>e.id===t)??null)}),(0,i.watch)(()=>[n.value,e.storageKey],()=>{let e=M;$(),a.value=_(),d.value=`all`,g.value=null,C.value=!1,E.value=null,e&&Q()}),{messages:u,activeCategory:d,loading:f,total:O,page:p,selectedMessage:g,popoverVisible:C,wsStatus:w,unreadCount:ne,unreadByCategory:re,filteredMessages:D,hasMore:ie,error:E,busy:ae,pendingIds:oe,fetchMessages:q,loadMore:me,markAsRead:he,markAllAsRead:ge,deleteMessages:_e,clearMessages:ve,selectMessage:ke,clearSelection:Z,switchCategory:Ae,clearError:B,retry:je,requestDesktopPermission:Oe,connectWS:Te,disconnectWS:Ee,initialize:Q,dispose:$}}const ne={class:`notification-badge`},re=[`aria-label`],D={key:0,class:`notification-badge__count`},O={key:0,class:`notification-badge__pulse`},ie=(0,i.defineComponent)({__name:`NotificationBadge`,props:{count:{default:0},maxCount:{default:99},hasUrgent:{type:Boolean,default:!1}},emits:[`click`],setup(t){let n=t,r=(0,i.computed)(()=>n.count>n.maxCount?`${n.maxCount}+`:String(n.count));return(n,o)=>{let s=a.NTooltip;return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,ne,[(0,i.createVNode)(s,{trigger:`hover`,placement:`bottom`},{trigger:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`button`,{type:`button`,class:`notification-badge__trigger`,"aria-label":`消息通知${t.count>0?`(${t.count} 条未读)`:``}`,onClick:o[0]||=e=>n.$emit(`click`)},[(0,i.createVNode)(e.t,{name:`mdi:bell-outline`,size:18,class:`notification-badge__icon`}),(0,i.createCommentVNode)(` 未读角标 `),(0,i.createVNode)(i.Transition,{name:`badge-bounce`},{default:(0,i.withCtx)(()=>[t.count>0?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,D,(0,i.toDisplayString)(r.value),1)):(0,i.createCommentVNode)(`v-if`,!0)]),_:1}),(0,i.createCommentVNode)(` 脉冲动画(有紧急消息时) `),t.hasUrgent?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,O)):(0,i.createCommentVNode)(`v-if`,!0)],8,re)]),default:(0,i.withCtx)(()=>[(0,i.createTextVNode)(` 消息通知`+(0,i.toDisplayString)(t.count>0?`(${t.count} 条未读)`:``),1)]),_:1})])}}});var ae=t.t(ie,[[`__scopeId`,`data-v-51516250`]]);const oe=6e4,k=36e5,A=864e5,se=7*A,j=30*A;365*A;let M=null;function N(){return M||=P(),M}function P(){function e(e){let r=new Date(e),i=Date.now()-r.getTime();if(i<0||i<oe)return`刚刚`;if(i<k)return`${Math.floor(i/oe)}分钟前`;if(i<A)return`${Math.floor(i/k)}小时前`;let a=new Date;return a.setHours(0,0,0,0),r>=new Date(a.getTime()-A)&&r<a?`昨天 ${n(r.getHours())}:${n(r.getMinutes())}`:i<se?`${Math.floor(i/A)}天前`:i<j?`${Math.floor(i/se)}周前`:i<31536e6?`${Math.floor(i/j)}个月前`:t(r)}function t(e){return`${e.getFullYear()}-${n(e.getMonth()+1)}-${n(e.getDate())} ${n(e.getHours())}:${n(e.getMinutes())}`}function n(e){return e<10?`0${e}`:String(e)}return{formatRelativeTime:e,formatFullDate:t}}const F={class:`notification-item__indicator`},I={class:`notification-item__avatar`},L={class:`notification-item__body`},R={class:`notification-item__header`},z={class:`notification-item__title`},B={class:`notification-item__summary`},V={class:`notification-item__meta`},H={class:`notification-item__time`},ce={key:0,class:`notification-item__sender`},U=[`disabled`],W=[`disabled`],le=(0,i.defineComponent)({__name:`NotificationItem`,props:{message:{},busy:{type:Boolean}},emits:[`click`,`read`,`delete`],setup(t){let n=t,{formatRelativeTime:r}=N(),o=(0,i.computed)(()=>d[n.message.category]?.icon??`mdi:bell-outline`),s=(0,i.computed)(()=>p[n.message.priority]??p.normal),c=(0,i.computed)(()=>r(n.message.timestamp));return(n,r)=>{let l=a.NAvatar,u=a.NTag,d=a.NTooltip;return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,{class:(0,i.normalizeClass)([`notification-item`,{"notification-item--unread":t.message.status===`unread`,"notification-item--urgent":t.message.priority===`urgent`}]),onClick:r[3]||=e=>n.$emit(`click`,t.message)},[(0,i.createCommentVNode)(` 未读指示点 `),(0,i.createElementVNode)(`div`,F,[t.message.status===`unread`?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,{key:0,class:(0,i.normalizeClass)([`notification-item__dot`,`notification-item__dot--${t.message.priority}`])},null,2)):(0,i.createCommentVNode)(`v-if`,!0)]),(0,i.createCommentVNode)(` 头像 `),(0,i.createElementVNode)(`div`,I,[t.message.sender?.avatar?((0,i.openBlock)(),(0,i.createBlock)(l,{key:0,src:t.message.sender.avatar,size:36,round:``},null,8,[`src`])):((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:1,class:(0,i.normalizeClass)([`notification-item__avatar-placeholder`,`notification-item__avatar-placeholder--${t.message.category}`])},[(0,i.createVNode)(e.t,{name:o.value,size:16},null,8,[`name`])],2))]),(0,i.createCommentVNode)(` 内容 `),(0,i.createElementVNode)(`div`,L,[(0,i.createElementVNode)(`div`,R,[(0,i.createElementVNode)(`span`,z,(0,i.toDisplayString)(t.message.title),1),t.message.priority===`urgent`||t.message.priority===`high`?((0,i.openBlock)(),(0,i.createBlock)(u,{key:0,type:s.value.type,size:`tiny`,bordered:!1,round:``},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(s.value.label),1)]),_:1},8,[`type`])):(0,i.createCommentVNode)(`v-if`,!0)]),(0,i.createElementVNode)(`div`,B,(0,i.toDisplayString)(t.message.summary),1),(0,i.createElementVNode)(`div`,V,[(0,i.createElementVNode)(`span`,H,(0,i.toDisplayString)(c.value),1),t.message.sender?.name?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,ce,(0,i.toDisplayString)(t.message.sender.name),1)):(0,i.createCommentVNode)(`v-if`,!0)])]),(0,i.createCommentVNode)(` 操作区 `),(0,i.createElementVNode)(`div`,{class:`notification-item__actions`,onClick:r[2]||=(0,i.withModifiers)(()=>{},[`stop`])},[t.message.status===`unread`?((0,i.openBlock)(),(0,i.createBlock)(d,{key:0,trigger:`hover`,placement:`top`},{trigger:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`button`,{class:`notification-item__action`,type:`button`,disabled:t.busy,"aria-label":`标记已读`,onClick:r[0]||=e=>n.$emit(`read`,t.message.id)},[(0,i.createVNode)(e.t,{name:`mdi:check`,size:16})],8,U)]),default:(0,i.withCtx)(()=>[r[4]||=(0,i.createTextVNode)(` 标记已读 `,-1)]),_:1})):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createVNode)(d,{trigger:`hover`,placement:`top`},{trigger:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`button`,{class:`notification-item__action`,type:`button`,disabled:t.busy,"aria-label":`删除消息`,onClick:r[1]||=e=>n.$emit(`delete`,t.message.id)},[(0,i.createVNode)(e.t,{name:`mdi:delete-outline`,size:16})],8,W)]),default:(0,i.withCtx)(()=>[r[5]||=(0,i.createTextVNode)(` 删除 `,-1)]),_:1})])],2)}}});var ue=t.t(le,[[`__scopeId`,`data-v-8a4522f3`]]);const de={class:`notification-list`},G={class:`notification-list__tabs`},fe=[`aria-pressed`,`onClick`],pe={key:0,class:`notification-list__tab-count`},K={key:0,class:`notification-list__toolbar`},q={class:`notification-list__skeleton-text`},me={class:`notification-list__items`},J=[`disabled`],Y={class:`notification-list__empty`},he=(0,i.defineComponent)({__name:`NotificationList`,props:{messages:{},activeCategory:{},unreadByCategory:{},busy:{type:Boolean,default:!1},pendingIds:{default:()=>[]},unreadCount:{},loading:{type:Boolean},hasMore:{type:Boolean},scrollHeight:{default:420}},emits:[`switchCategory`,`itemClick`,`read`,`delete`,`markAllRead`,`clear`,`loadMore`],setup(t){let n=t,r=(0,i.computed)(()=>n.activeCategory===`all`?n.unreadCount:n.unreadByCategory[n.activeCategory]);function o(e){return e===`all`?n.unreadCount:n.unreadByCategory[e]??0}return(n,s)=>{let c=a.NButton,l=a.NSkeleton,u=a.NSpin,d=a.NScrollbar;return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,de,[(0,i.createCommentVNode)(` 分类 Tab `),(0,i.createElementVNode)(`div`,G,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)((0,i.unref)(f),e=>((0,i.openBlock)(),(0,i.createElementBlock)(`button`,{key:e.key,class:(0,i.normalizeClass)([`notification-list__tab`,{"notification-list__tab--active":t.activeCategory===e.key}]),type:`button`,"aria-pressed":t.activeCategory===e.key,onClick:t=>n.$emit(`switchCategory`,e.key)},[(0,i.createElementVNode)(`span`,null,(0,i.toDisplayString)(e.label),1),o(e.key)>0?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,pe,(0,i.toDisplayString)(o(e.key)),1)):(0,i.createCommentVNode)(`v-if`,!0)],10,fe))),128))]),(0,i.createCommentVNode)(` 操作栏 `),t.messages.length>0?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,K,[(0,i.createVNode)(c,{text:``,size:`tiny`,disabled:t.busy||r.value!==void 0&&r.value===0,loading:t.busy,onClick:s[0]||=e=>n.$emit(`markAllRead`)},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(e.t,{name:`mdi:check-all`,size:14})]),default:(0,i.withCtx)(()=>[s[6]||=(0,i.createTextVNode)(` 全部已读 `,-1)]),_:1},8,[`disabled`,`loading`]),(0,i.createVNode)(c,{text:``,size:`tiny`,disabled:t.busy,onClick:s[1]||=e=>n.$emit(`clear`)},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(e.t,{name:`mdi:delete-sweep-outline`,size:14})]),default:(0,i.withCtx)(()=>[s[7]||=(0,i.createTextVNode)(` 清空 `,-1)]),_:1},8,[`disabled`])])):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createCommentVNode)(` 消息列表 `),(0,i.createVNode)(d,{class:`notification-list__scroll`,style:(0,i.normalizeStyle)({maxHeight:`${t.scrollHeight}px`})},{default:(0,i.withCtx)(()=>[t.loading&&t.messages.length===0?((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:0},[(0,i.createCommentVNode)(` 骨架屏 `),((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(4,e=>(0,i.createElementVNode)(`div`,{key:e,class:`notification-list__skeleton`},[(0,i.createVNode)(l,{circle:``,width:36,height:36}),(0,i.createElementVNode)(`div`,q,[(0,i.createVNode)(l,{text:``,width:`60%`,height:14}),(0,i.createVNode)(l,{text:``,width:`90%`,height:12}),(0,i.createVNode)(l,{text:``,width:`40%`,height:10})])])),64))],64)):t.messages.length>0?((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:1},[(0,i.createElementVNode)(`div`,me,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(t.messages,e=>((0,i.openBlock)(),(0,i.createBlock)(ue,{key:e.id,message:e,busy:t.busy||t.pendingIds.includes(e.id),onClick:s[2]||=e=>n.$emit(`itemClick`,e),onRead:s[3]||=e=>n.$emit(`read`,e),onDelete:s[4]||=e=>n.$emit(`delete`,e)},null,8,[`message`,`busy`]))),128))]),(0,i.createCommentVNode)(` 加载更多 `),t.hasMore?((0,i.openBlock)(),(0,i.createElementBlock)(`button`,{key:0,class:`notification-list__load-more`,type:`button`,disabled:t.loading,onClick:s[5]||=e=>n.$emit(`loadMore`)},[t.loading?((0,i.openBlock)(),(0,i.createBlock)(u,{key:0,size:14})):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createElementVNode)(`span`,null,(0,i.toDisplayString)(t.loading?`加载中...`:`加载更多`),1)],8,J)):(0,i.createCommentVNode)(`v-if`,!0)],64)):((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:2},[(0,i.createCommentVNode)(` 空状态 `),(0,i.createElementVNode)(`div`,Y,[(0,i.createVNode)(e.t,{name:`mdi:bell-off-outline`,size:48,class:`notification-list__empty-icon`}),s[8]||=(0,i.createElementVNode)(`span`,{class:`notification-list__empty-text`},`暂无消息`,-1)])],2112))]),_:1},8,[`style`])])}}});var ge=t.t(he,[[`__scopeId`,`data-v-63a2d867`]]);function _e(e){return e.includes(`\\`)||e.startsWith(`//`)||Array.from(e).some(e=>e.charCodeAt(0)<32)}function ve(e){let t=e?.trim();if(!t||_e(t))return null;if(/^https?:\/\//i.test(t))try{let e=new URL(t);return e.protocol!==`http:`&&e.protocol!==`https:`?null:{kind:`external`,url:e.href}}catch{return null}return/^[a-z][a-z\d+.-]*:/i.test(t)?null:{kind:`internal`,url:t}}const X={class:`notification-detail`},ye={class:`notification-detail__back`},be={class:`notification-detail__header`},xe={class:`notification-detail__title`},Se={class:`notification-detail__meta`},Ce={class:`notification-detail__time`},we={key:0,class:`notification-detail__sender`},Te=[`innerHTML`],Ee={key:1,class:`notification-detail__body`},De={key:0,class:`notification-detail__footer`},Oe=(0,i.defineComponent)({__name:`NotificationDetail`,props:{message:{},scrollHeight:{default:320}},emits:[`back`,`action`,`navigate`],setup(t,{emit:r}){let o=t,s=r,{formatRelativeTime:c}=N(),l=(0,i.computed)(()=>d[o.message.category]??d.system),u=(0,i.computed)(()=>p[o.message.priority]??p.normal),f=(0,i.computed)(()=>c(o.message.timestamp)),m=(0,i.computed)(()=>n.t(o.message.content||``));function h(){let e=ve(o.message.actionUrl);e&&(s(`action`,e.url),e.kind===`external`?window.open(e.url,`_blank`,`noopener,noreferrer`):s(`navigate`,e.url))}return(n,r)=>{let o=a.NButton,s=a.NTag,c=a.NAvatar,d=a.NScrollbar;return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,X,[(0,i.createCommentVNode)(` 返回栏 `),(0,i.createElementVNode)(`div`,ye,[(0,i.createVNode)(o,{text:``,size:`small`,onClick:r[0]||=e=>n.$emit(`back`)},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(e.t,{name:`mdi:arrow-left`,size:16})]),default:(0,i.withCtx)(()=>[r[1]||=(0,i.createTextVNode)(` 返回列表 `,-1)]),_:1})]),(0,i.createCommentVNode)(` 消息头部 `),(0,i.createElementVNode)(`div`,be,[(0,i.createElementVNode)(`h3`,xe,(0,i.toDisplayString)(t.message.title),1),(0,i.createElementVNode)(`div`,Se,[(0,i.createVNode)(s,{type:l.value.color,size:`tiny`,bordered:!1,round:``},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(e.t,{name:l.value.icon,size:12},null,8,[`name`])]),default:(0,i.withCtx)(()=>[(0,i.createTextVNode)(` `+(0,i.toDisplayString)(l.value.label),1)]),_:1},8,[`type`]),t.message.priority===`urgent`||t.message.priority===`high`?((0,i.openBlock)(),(0,i.createBlock)(s,{key:0,type:u.value.type,size:`tiny`,bordered:!1,round:``},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(u.value.label),1)]),_:1},8,[`type`])):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createElementVNode)(`span`,Ce,(0,i.toDisplayString)(f.value),1)]),t.message.sender?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,we,[t.message.sender.avatar?((0,i.openBlock)(),(0,i.createBlock)(c,{key:0,src:t.message.sender.avatar,size:20,round:``},null,8,[`src`])):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createElementVNode)(`span`,null,(0,i.toDisplayString)(t.message.sender.name),1)])):(0,i.createCommentVNode)(`v-if`,!0)]),(0,i.createCommentVNode)(` 消息内容 `),(0,i.createVNode)(d,{class:`notification-detail__content`,style:(0,i.normalizeStyle)({maxHeight:`${t.scrollHeight}px`})},{default:(0,i.withCtx)(()=>[t.message.content?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:0,class:`notification-detail__body`,innerHTML:m.value},null,8,Te)):((0,i.openBlock)(),(0,i.createElementBlock)(`div`,Ee,(0,i.toDisplayString)(t.message.summary),1))]),_:1},8,[`style`]),(0,i.createCommentVNode)(` 操作区 `),t.message.actionUrl?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,De,[(0,i.createVNode)(o,{type:`primary`,size:`small`,onClick:h},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(e.t,{name:`mdi:arrow-right`,size:16})]),default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(t.message.actionText||`查看详情`)+` `,1)]),_:1})])):(0,i.createCommentVNode)(`v-if`,!0)])}}});var ke=t.t(Oe,[[`__scopeId`,`data-v-8e02b6cd`]]);const Z={class:`c-notification-center`},Ae={class:`c-notification-center__panel`},Q={class:`c-notification-center__header`},$={class:`c-notification-center__header-extra`},je={key:0,class:`c-notification-center__error`,role:`alert`},Me={class:`c-notification-center__footer`},Ne=(0,i.defineComponent)({name:`C_NotificationCenter`,__name:`index`,props:{dataMode:{},controller:{},autoStart:{type:Boolean,default:!0},fetchNotifications:{},markAsRead:{},markAllRead:{},deleteNotification:{},clearNotifications:{},wsConfig:{},desktopNotification:{type:Boolean,default:!1},maxBadgeCount:{default:99},pollingInterval:{default:6e4},pageSize:{default:20},storageKey:{default:`notification_center`},onError:{}},emits:[`itemClick`,`read`,`allRead`,`delete`,`unreadChange`,`wsStatusChange`,`newMessage`,`navigate`,`viewAll`],setup(e,{expose:t,emit:n}){let r=e,o=n,s=r.controller??E(r,{onNewMessage:e=>o(`newMessage`,e),onWSStatusChange:e=>o(`wsStatusChange`,e)}),c=(0,i.computed)(()=>s.messages.value.some(e=>e.status===`unread`&&e.priority===`urgent`)),l=(0,i.computed)(()=>({connected:`已连接`,connecting:`连接中...`,disconnected:`未连接`,reconnecting:`重连中...`})[s.wsStatus.value]??`未知`);(0,i.watch)(()=>s.unreadCount.value,e=>{o(`unreadChange`,e)});function u(){s.popoverVisible.value=!s.popoverVisible.value}async function d(){try{s.retry?await s.retry():await s.fetchMessages(!0)}catch{}}async function f(){try{await s.loadMore()}catch{}}function p(){s.popoverVisible.value=!1,o(`viewAll`)}function m(e){s.selectMessage(e),o(`itemClick`,e)}async function h(e){try{await s.markAsRead([e]),o(`read`,[e])}catch{}}async function g(e){try{await s.deleteMessages([e]),o(`delete`,[e])}catch{}}async function _(){let e=s.activeCategory.value===`all`?void 0:s.activeCategory.value;try{await s.markAllAsRead(e),o(`allRead`,e)}catch{}}async function v(){let e=s.activeCategory.value===`all`?void 0:s.activeCategory.value;try{await s.clearMessages(e)}catch{}}function y(){s.popoverVisible.value=!1}function b(){s.clearSelection()}return t({refresh:()=>s.fetchMessages(!0),connectWS:()=>{r.wsConfig&&s.connectWS(r.wsConfig)},disconnectWS:s.disconnectWS,getUnreadCount:()=>s.unreadCount.value,getMessages:()=>s.messages.value.map(e=>({...e})),markRead:e=>s.markAsRead(e),markAllAsRead:e=>s.markAllAsRead(e),requestDesktopPermission:s.requestDesktopPermission}),(e,t)=>{let n=a.NTooltip,x=a.NButton,S=a.NPopover;return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,Z,[(0,i.createVNode)(S,{show:(0,i.unref)(s).popoverVisible.value,"onUpdate:show":t[1]||=e=>(0,i.unref)(s).popoverVisible.value=e,width:420,trigger:`manual`,placement:`bottom-end`,"show-arrow":!1,"content-class":`c-notification-center__popover`,onAfterLeave:b},{trigger:(0,i.withCtx)(()=>[(0,i.createVNode)(ae,{count:(0,i.unref)(s).unreadCount.value,"max-count":r.maxBadgeCount,"has-urgent":c.value,onClick:u},null,8,[`count`,`max-count`,`has-urgent`])]),default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,Ae,[(0,i.createCommentVNode)(` 头部标题 `),(0,i.createElementVNode)(`div`,Q,[t[2]||=(0,i.createElementVNode)(`span`,{class:`c-notification-center__title`},`消息中心`,-1),(0,i.createElementVNode)(`div`,$,[(0,i.createCommentVNode)(` WebSocket 连接状态 `),r.wsConfig||(0,i.unref)(s).wsStatus.value!==`disconnected`?((0,i.openBlock)(),(0,i.createBlock)(n,{key:0,trigger:`hover`,placement:`top`},{trigger:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`span`,{class:(0,i.normalizeClass)([`c-notification-center__ws-dot`,`c-notification-center__ws-dot--${(0,i.unref)(s).wsStatus.value}`])},null,2)]),default:(0,i.withCtx)(()=>[(0,i.createTextVNode)(` `+(0,i.toDisplayString)(l.value),1)]),_:1})):(0,i.createCommentVNode)(`v-if`,!0)])]),(0,i.unref)(s).error.value?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,je,[(0,i.createElementVNode)(`span`,null,(0,i.toDisplayString)((0,i.unref)(s).error.value),1),(0,i.createVNode)(x,{size:`tiny`,loading:(0,i.unref)(s).loading.value,onClick:d},{default:(0,i.withCtx)(()=>[...t[3]||=[(0,i.createTextVNode)(`重试`,-1)]]),_:1},8,[`loading`])])):(0,i.createCommentVNode)(`v-if`,!0),(0,i.createCommentVNode)(` 列表 / 详情切换 `),(0,i.createVNode)(i.Transition,{name:`slide-fade`,mode:`out-in`},{default:(0,i.withCtx)(()=>[(0,i.unref)(s).selectedMessage.value?((0,i.openBlock)(),(0,i.createBlock)(ke,{key:(0,i.unref)(s).selectedMessage.value.id,message:(0,i.unref)(s).selectedMessage.value,onBack:(0,i.unref)(s).clearSelection,onAction:y,onNavigate:t[0]||=e=>o(`navigate`,e)},null,8,[`message`,`onBack`])):((0,i.openBlock)(),(0,i.createBlock)(ge,{key:1,messages:(0,i.unref)(s).filteredMessages.value,"active-category":(0,i.unref)(s).activeCategory.value,"unread-by-category":(0,i.unref)(s).unreadByCategory.value,"unread-count":(0,i.unref)(s).unreadCount.value,loading:(0,i.unref)(s).loading.value,"has-more":(0,i.unref)(s).hasMore.value,busy:(0,i.unref)(s).busy.value,"pending-ids":(0,i.unref)(s).pendingIds.value,onSwitchCategory:(0,i.unref)(s).switchCategory,onItemClick:m,onRead:h,onDelete:g,onMarkAllRead:_,onClear:v,onLoadMore:f},null,8,[`messages`,`active-category`,`unread-by-category`,`unread-count`,`loading`,`has-more`,`busy`,`pending-ids`,`onSwitchCategory`]))]),_:1}),(0,i.createElementVNode)(`div`,Me,[(0,i.createVNode)(x,{text:``,type:`primary`,size:`small`,onClick:p},{default:(0,i.withCtx)(()=>[...t[4]||=[(0,i.createTextVNode)(`查看全部消息`,-1)]]),_:1})])])]),_:1},8,[`show`])])}}});var Pe=t.t(Ne,[[`__scopeId`,`data-v-21f127ad`]]);Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return 20}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return 5}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return 99}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return s}});