chatlab-cli 0.31.1 → 0.31.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/{chat-command-MOETAGU5.mjs → chat-command-V6NYTTPD.mjs} +8 -8
  2. package/dist/{chunk-ZVWUR7ET.mjs → chunk-54GVCXHZ.mjs} +2 -2
  3. package/dist/{chunk-KCPGEILH.mjs → chunk-5G2INROS.mjs} +483 -356
  4. package/dist/chunk-5G2INROS.mjs.map +1 -0
  5. package/dist/{chunk-SZEBCNBB.mjs → chunk-67HNEIKY.mjs} +2084 -1924
  6. package/dist/chunk-67HNEIKY.mjs.map +1 -0
  7. package/dist/{chunk-VOVLPSG6.mjs → chunk-7TDYBU5L.mjs} +4 -4
  8. package/dist/{chunk-LJXSUN25.mjs → chunk-HUKZ2PBC.mjs} +2 -2
  9. package/dist/{chunk-3VMKS7PU.mjs → chunk-LWC7JQ2W.mjs} +2 -2
  10. package/dist/{chunk-N5AGDT7I.mjs → chunk-OIZ64ET3.mjs} +3 -3
  11. package/dist/{chunk-E6W2RURS.mjs → chunk-SJQVAKFA.mjs} +5 -4
  12. package/dist/chunk-SJQVAKFA.mjs.map +1 -0
  13. package/dist/{chunk-2IXPWPLR.mjs → chunk-WL2ISRYH.mjs} +11 -11
  14. package/dist/{chunk-DQ45LDKZ.mjs → chunk-XZ5FFDLX.mjs} +125 -136
  15. package/dist/chunk-XZ5FFDLX.mjs.map +1 -0
  16. package/dist/{chunk-7HBVGVOB.mjs → chunk-ZF67S6RY.mjs} +2 -2
  17. package/dist/cli.mjs +8 -8
  18. package/dist/contacts-worker.mjs +2 -2
  19. package/dist/global-insight-worker.mjs +1 -1
  20. package/dist/{http-M6NHWJZD.mjs → http-AMDWRKOH.mjs} +11 -11
  21. package/dist/{import-SEYHFXS5.mjs → import-WIJHB4LH.mjs} +7 -7
  22. package/dist/index.mjs +11 -11
  23. package/dist/{mcp-MIPFYRLV.mjs → mcp-NC5YNTM5.mjs} +8 -8
  24. package/dist/people-relationships-worker.mjs +2 -2
  25. package/dist/semantic-index-worker.mjs +1 -1
  26. package/dist/{src-7OD6RD5V.mjs → src-UY4GCVNF.mjs} +22 -6
  27. package/dist/{stream-import-AWEHGQJY.mjs → stream-import-JKQYRISL.mjs} +7 -7
  28. package/dist/{worker-runtime-TGYMASIE.mjs → worker-runtime-KKUOJJTN.mjs} +5 -5
  29. package/dist-web/assets/{ActionToolsPanel-fAio70bI.css → ActionToolsPanel-BL0GQR6r.css} +1 -1
  30. package/dist-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-DVdpZpfD.js +110 -0
  31. package/dist-web/assets/{BufferResource-CHI62pIA.js → BufferResource-i1amDJTV.js} +1 -1
  32. package/dist-web/assets/{CanvasRenderer-OZRoiF0j.js → CanvasRenderer-DGa7AjdC.js} +1 -1
  33. package/dist-web/assets/EChartWordcloud-BXC_4nUP.js +1 -0
  34. package/dist-web/assets/{Filter-DNb5VErW.js → Filter-BTlq0yU-.js} +1 -1
  35. package/dist-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-B2KAoiMG.js +1 -0
  36. package/dist-web/assets/MessageExportModal-D9C5t_zF.js +1 -0
  37. package/dist-web/assets/PageHeader-BEWr2vsg.js +1 -0
  38. package/dist-web/assets/{RelationshipGalaxyCanvas-ioRNObb5.js → RelationshipGalaxyCanvas-CSgPNRif.js} +4 -4
  39. package/dist-web/assets/{RelationshipGalaxyThreeCanvas-L1Y43p1A.js → RelationshipGalaxyThreeCanvas-CBAnU8vN.js} +1 -1
  40. package/dist-web/assets/{RenderTargetSystem-fJ7D7Chv.js → RenderTargetSystem-Ctlu222X.js} +1 -1
  41. package/dist-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-BWJ6kuSC.js +1 -0
  42. package/dist-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-D5vov0eO.js +1 -0
  43. package/dist-web/assets/{WebGLRenderer-BD3ZUtxH.js → WebGLRenderer-D2Zvhmcw.js} +1 -1
  44. package/dist-web/assets/{WebGPURenderer-DZXYsT6D.js → WebGPURenderer-BOtP6h9o.js} +1 -1
  45. package/dist-web/assets/annual-summary-time-range-CK0IIPsY.js +1 -0
  46. package/dist-web/assets/{base-DTElkJcC.js → base-BMjDSaj6.js} +1 -1
  47. package/dist-web/assets/{browserAll-ChT6N6a9.js → browserAll-BhwLvWQY.js} +1 -1
  48. package/dist-web/assets/dateFormat-dteP1INW.js +1 -0
  49. package/dist-web/assets/{electron-CIzyGxH_.js → electron-DCgfulPE.js} +1 -1
  50. package/dist-web/assets/{fetch-CuiQUcO_.js → fetch-6q7oz7ZO.js} +1 -1
  51. package/dist-web/assets/{fetch-Avtnh8cJ.js → fetch-B_0HIxs5.js} +1 -1
  52. package/dist-web/assets/{fetch-DnGx-1_t.js → fetch-BbU4MPPu.js} +1 -1
  53. package/dist-web/assets/{fetch-Dd6t3p1r.js → fetch-BxHdB6X1.js} +1 -1
  54. package/dist-web/assets/{fetch-qC7om4QG.js → fetch-CpvfCafG.js} +1 -1
  55. package/dist-web/assets/{fetch-wSSfDBdV.js → fetch-CubnKpLG.js} +1 -1
  56. package/dist-web/assets/{fetch-CyKILLnB.js → fetch-D5BrGna5.js} +1 -1
  57. package/dist-web/assets/{fetch-C9rx2isC.js → fetch-DgXWr9nB.js} +1 -1
  58. package/dist-web/assets/{fetch-Ccq_0ecb.js → fetch-DvZuLuTE.js} +1 -1
  59. package/dist-web/assets/{fetch-BFnrBahy.js → fetch-rJA9qLvd.js} +1 -1
  60. package/dist-web/assets/index-BfGKlkx3.js +2 -0
  61. package/dist-web/assets/index-BoalB6nB.js +1 -0
  62. package/dist-web/assets/index-Bp5VKUF9.js +1 -0
  63. package/dist-web/assets/index-Bs15Yc7I.js +1 -0
  64. package/dist-web/assets/index-CAjUCtGD.css +1 -0
  65. package/dist-web/assets/index-CLijvqy3.js +173 -0
  66. package/dist-web/assets/{index-DXHYzIIj.js → index-CUzFFw5b.js} +1 -1
  67. package/dist-web/assets/index-Cj2GU1SR.js +1 -0
  68. package/dist-web/assets/{index-y7cxH1Et.css → index-CsqMIyA9.css} +1 -1
  69. package/dist-web/assets/index-CtmXho1w.css +1 -0
  70. package/dist-web/assets/index-D7aKwT6w.js +64 -0
  71. package/dist-web/assets/index-DXcFBsM1.js +24 -0
  72. package/dist-web/assets/index-DaZnh1zP.js +2 -0
  73. package/dist-web/assets/index-DeV8SAiM.js +25 -0
  74. package/dist-web/assets/index-WJCmqKnh.js +1 -0
  75. package/dist-web/assets/index-t6s0nOlb.js +1 -0
  76. package/dist-web/assets/people-page-header-D93GTPBO.js +1 -0
  77. package/dist-web/assets/vendor-nuxt-ui-DUpPmItD.js +15 -0
  78. package/dist-web/assets/vendor-reka-ui-BLnO2MqY.js +15 -0
  79. package/dist-web/assets/vendor-snapdom--nZvo8Sg.js +8 -0
  80. package/dist-web/assets/web-BoTDL3HM.js +1 -0
  81. package/dist-web/assets/{webworkerAll-C3dAOQj4.js → webworkerAll-c0ZvpENM.js} +1 -1
  82. package/dist-web/index.html +5 -5
  83. package/package.json +1 -1
  84. package/dist/chunk-DQ45LDKZ.mjs.map +0 -1
  85. package/dist/chunk-E6W2RURS.mjs.map +0 -1
  86. package/dist/chunk-KCPGEILH.mjs.map +0 -1
  87. package/dist/chunk-SZEBCNBB.mjs.map +0 -1
  88. package/dist-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-CkDGVRXe.js +0 -110
  89. package/dist-web/assets/EChartWordcloud-DU3ZYdgz.js +0 -1
  90. package/dist-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-DACMroOe.js +0 -1
  91. package/dist-web/assets/MessageExportModal-CqP-w7HP.js +0 -1
  92. package/dist-web/assets/PageHeader-Ck8ULyZH.js +0 -1
  93. package/dist-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-BoZyssJF.js +0 -1
  94. package/dist-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-7SEaCxDL.js +0 -1
  95. package/dist-web/assets/annual-summary-time-range-DVLXK1r4.js +0 -1
  96. package/dist-web/assets/dateFormat-D9WibwOu.js +0 -1
  97. package/dist-web/assets/index-BH9jI5kV.js +0 -173
  98. package/dist-web/assets/index-BWtNqcYK.js +0 -22
  99. package/dist-web/assets/index-Bkq7-GBp.js +0 -1
  100. package/dist-web/assets/index-Bqr-LkS1.css +0 -1
  101. package/dist-web/assets/index-C6qtsaP7.js +0 -1
  102. package/dist-web/assets/index-C_0GHEcb.css +0 -1
  103. package/dist-web/assets/index-ChFGuu70.js +0 -1
  104. package/dist-web/assets/index-CiS20iAR.js +0 -24
  105. package/dist-web/assets/index-CqD6u57u.js +0 -1
  106. package/dist-web/assets/index-CzDG8LVr.js +0 -2
  107. package/dist-web/assets/index-D0Euk-vQ.js +0 -1
  108. package/dist-web/assets/index-D26BWhHz.js +0 -1
  109. package/dist-web/assets/index-Dq8u7gMb.js +0 -2
  110. package/dist-web/assets/index-u_UH6rDY.js +0 -64
  111. package/dist-web/assets/people-page-header-BdKM1qhX.js +0 -1
  112. package/dist-web/assets/vendor-nuxt-ui-CS1uxE9C.js +0 -15
  113. package/dist-web/assets/vendor-reka-ui-Cta6JPvN.js +0 -11
  114. package/dist-web/assets/vendor-snapdom-XnBoh1gd.js +0 -8
  115. package/dist-web/assets/web-BDBdpdK7.js +0 -1
  116. /package/dist/{chat-command-MOETAGU5.mjs.map → chat-command-V6NYTTPD.mjs.map} +0 -0
  117. /package/dist/{chunk-ZVWUR7ET.mjs.map → chunk-54GVCXHZ.mjs.map} +0 -0
  118. /package/dist/{chunk-VOVLPSG6.mjs.map → chunk-7TDYBU5L.mjs.map} +0 -0
  119. /package/dist/{chunk-LJXSUN25.mjs.map → chunk-HUKZ2PBC.mjs.map} +0 -0
  120. /package/dist/{chunk-3VMKS7PU.mjs.map → chunk-LWC7JQ2W.mjs.map} +0 -0
  121. /package/dist/{chunk-N5AGDT7I.mjs.map → chunk-OIZ64ET3.mjs.map} +0 -0
  122. /package/dist/{chunk-2IXPWPLR.mjs.map → chunk-WL2ISRYH.mjs.map} +0 -0
  123. /package/dist/{chunk-7HBVGVOB.mjs.map → chunk-ZF67S6RY.mjs.map} +0 -0
  124. /package/dist/{http-M6NHWJZD.mjs.map → http-AMDWRKOH.mjs.map} +0 -0
  125. /package/dist/{import-SEYHFXS5.mjs.map → import-WIJHB4LH.mjs.map} +0 -0
  126. /package/dist/{mcp-MIPFYRLV.mjs.map → mcp-NC5YNTM5.mjs.map} +0 -0
  127. /package/dist/{src-7OD6RD5V.mjs.map → src-UY4GCVNF.mjs.map} +0 -0
  128. /package/dist/{stream-import-AWEHGQJY.mjs.map → stream-import-JKQYRISL.mjs.map} +0 -0
  129. /package/dist/{worker-runtime-TGYMASIE.mjs.map → worker-runtime-KKUOJJTN.mjs.map} +0 -0
@@ -1 +1 @@
1
- import{p as v,P as _,L as t,K as i,u as e,G as l,au as b,H as u,i as y,bw as k,I as x,h as c}from"./vendor-reka-ui-Cta6JPvN.js";import{R as w,e as R}from"./vendor-nuxt-ui-CS1uxE9C.js";import{u as S,l as V,m as I}from"./index-BWtNqcYK.js";import{P as C}from"./PageHeader-Ck8ULyZH.js";import{_ as B}from"./TimeSelect.vue_vue_type_script_setup_true_lang-7SEaCxDL.js";import{p as P}from"./annual-summary-time-range-DVLXK1r4.js";import"./vendor-snapdom-XnBoh1gd.js";import"./dateFormat-D9WibwOu.js";const H={class:"flex h-full flex-col text-gray-900 dark:bg-page-dark dark:text-gray-100",style:{"padding-top":"var(--titlebar-area-height)"}},K=v({__name:"index",setup(T){const{t:a}=S(),r=R(),d=P(),{modelValue:n,componentKey:p,initialState:g,rangeSource:h}=d,s=c(()=>r.name==="insight-time-investment"?"time-investment":r.name==="insight-relationship-changes"?"relationship-changes":"annual-summary"),f=c(()=>[{id:"annual-summary",label:a("insight.tabs.annualSummary"),icon:"i-lucide-calendar-range",to:{name:"insight-annual-summary"}},{id:"time-investment",label:a("insight.tabs.timeInvestment"),icon:"i-lucide-clock-3",to:{name:"insight-time-investment"}},{id:"relationship-changes",label:a("insight.tabs.relationshipChanges"),icon:"i-lucide-git-compare-arrows",to:{name:"insight-relationship-changes"}}]);return($,m)=>(l(),_("div",H,[t(C,{title:e(a)("insight.title"),icon:"i-heroicons-presentation-chart-bar","icon-class":"bg-pink-600 text-white dark:bg-pink-500 dark:text-white",size:"compact"},{default:i(()=>[t(e(V),{class:"mt-3 pb-1.5","model-value":s.value,items:f.value,"aria-label":e(a)("insight.tabs.nav")},b({_:2},[s.value==="annual-summary"?{name:"right",fn:i(()=>[(l(),u(B,{key:e(p),modelValue:e(n),"onUpdate:modelValue":m[0]||(m[0]=o=>y(n)?n.value=o:null),"range-source":e(h),"allowed-modes":["recent","year"],"allowed-recent-days":[365],"initial-state":e(g)},null,8,["modelValue","range-source","initial-state"]))]),key:"0"}:void 0]),1032,["model-value","items","aria-label"])]),_:1},8,["title"]),t(e(w),null,{default:i(({Component:o})=>[t(k,{name:"insight-tab-slide",mode:"out-in"},{default:i(()=>[(l(),u(x(o),{key:s.value}))]),_:2},1024)]),_:1})]))}}),j=I(K,[["__scopeId","data-v-a94720f4"]]);export{j as default};
1
+ import{d as v,Z as _,U as t,T as i,u as e,P as l,aG as b,Q as c,A as y,bS as k,R as x,c as u}from"./vendor-reka-ui-BLnO2MqY.js";import{R as w,e as R}from"./vendor-nuxt-ui-DUpPmItD.js";import{u as S,l as V,m as C}from"./index-DeV8SAiM.js";import{P as I}from"./PageHeader-BEWr2vsg.js";import{_ as B}from"./TimeSelect.vue_vue_type_script_setup_true_lang-D5vov0eO.js";import{p as P}from"./annual-summary-time-range-CK0IIPsY.js";import"./vendor-snapdom--nZvo8Sg.js";import"./dateFormat-dteP1INW.js";const T={class:"flex h-full flex-col text-gray-900 dark:bg-page-dark dark:text-gray-100",style:{"padding-top":"var(--titlebar-area-height)"}},A=v({__name:"index",setup(U){const{t:a}=S(),r=R(),d=P(),{modelValue:n,componentKey:p,initialState:g,rangeSource:h}=d,s=u(()=>r.name==="insight-time-investment"?"time-investment":r.name==="insight-relationship-changes"?"relationship-changes":"annual-summary"),f=u(()=>[{id:"annual-summary",label:a("insight.tabs.annualSummary"),icon:"i-lucide-calendar-range",to:{name:"insight-annual-summary"}},{id:"time-investment",label:a("insight.tabs.timeInvestment"),icon:"i-lucide-clock-3",to:{name:"insight-time-investment"}},{id:"relationship-changes",label:a("insight.tabs.relationshipChanges"),icon:"i-lucide-git-compare-arrows",to:{name:"insight-relationship-changes"}}]);return($,m)=>(l(),_("div",T,[t(I,{title:e(a)("insight.title"),icon:"i-heroicons-presentation-chart-bar","icon-class":"bg-pink-600 text-white dark:bg-pink-500 dark:text-white",size:"compact"},{default:i(()=>[t(e(V),{class:"mt-3 pb-1.5","model-value":s.value,items:f.value,"aria-label":e(a)("insight.tabs.nav")},b({_:2},[s.value==="annual-summary"?{name:"right",fn:i(()=>[(l(),c(B,{key:e(p),modelValue:e(n),"onUpdate:modelValue":m[0]||(m[0]=o=>y(n)?n.value=o:null),"range-source":e(h),"allowed-modes":["recent","year"],"allowed-recent-days":[365],"initial-state":e(g)},null,8,["modelValue","range-source","initial-state"]))]),key:"0"}:void 0]),1032,["model-value","items","aria-label"])]),_:1},8,["title"]),t(e(w),null,{default:i(({Component:o})=>[t(k,{name:"insight-tab-slide",mode:"out-in"},{default:i(()=>[(l(),c(x(o),{key:s.value}))]),_:2},1024)]),_:1})]))}}),Z=C(A,[["__scopeId","data-v-a94720f4"]]);export{Z as default};
@@ -0,0 +1 @@
1
+ import{_ as a}from"./vendor-nuxt-ui-DUpPmItD.js";import{u as n}from"./index-DeV8SAiM.js";import{d as o,Z as c,ag as e,U as r,a0 as i,u as m,P as _}from"./vendor-reka-ui-BLnO2MqY.js";import"./vendor-snapdom--nZvo8Sg.js";const p={class:"flex min-h-0 flex-1 items-center justify-center px-6 py-12"},l={class:"text-center text-sm text-gray-500 dark:text-gray-400"},y=o({__name:"index",setup(d){const{t}=n();return(u,x)=>{const s=a;return _(),c("main",p,[e("div",l,[r(s,{name:"i-lucide-clock-3",class:"mx-auto mb-3 h-8 w-8 text-pink-500"}),e("p",null,i(m(t)("insight.reserved")),1)])])}}});export{y as default};
@@ -1 +1 @@
1
- .fade-enter-active[data-v-a5aec593],.fade-leave-active[data-v-a5aec593]{transition:opacity .15s ease}.fade-enter-from[data-v-a5aec593],.fade-leave-to[data-v-a5aec593]{opacity:0}.fade-enter-active[data-v-5787d95d],.fade-leave-active[data-v-5787d95d]{transition:opacity .15s ease}.fade-enter-from[data-v-5787d95d],.fade-leave-to[data-v-5787d95d]{opacity:0}.tab-slide-enter-active[data-v-df05ebc3],.tab-slide-leave-active[data-v-df05ebc3]{transition:opacity .2s ease,transform .2s ease}.tab-slide-enter-from[data-v-df05ebc3]{opacity:0;transform:translateY(10px)}.tab-slide-leave-to[data-v-df05ebc3]{opacity:0;transform:translateY(-10px)}
1
+ .fade-enter-active[data-v-a5aec593],.fade-leave-active[data-v-a5aec593]{transition:opacity .15s ease}.fade-enter-from[data-v-a5aec593],.fade-leave-to[data-v-a5aec593]{opacity:0}.fade-enter-active[data-v-5787d95d],.fade-leave-active[data-v-5787d95d]{transition:opacity .15s ease}.fade-enter-from[data-v-5787d95d],.fade-leave-to[data-v-5787d95d]{opacity:0}.tab-slide-enter-active[data-v-4c212831],.tab-slide-leave-active[data-v-4c212831]{transition:opacity .2s ease,transform .2s ease}.tab-slide-enter-from[data-v-4c212831]{opacity:0;transform:translateY(10px)}.tab-slide-leave-to[data-v-4c212831]{opacity:0;transform:translateY(-10px)}
@@ -0,0 +1 @@
1
+ .fade-enter-active[data-v-0605fe3d],.fade-leave-active[data-v-0605fe3d]{transition:opacity .15s ease}.fade-enter-from[data-v-0605fe3d],.fade-leave-to[data-v-0605fe3d]{opacity:0}.tab-slide-enter-active[data-v-74176220],.tab-slide-leave-active[data-v-74176220]{transition:opacity .2s ease,transform .2s ease}.tab-slide-enter-from[data-v-74176220]{opacity:0;transform:translateY(10px)}.tab-slide-leave-to[data-v-74176220]{opacity:0;transform:translateY(-10px)}
@@ -0,0 +1,64 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/EChartWordcloud-BXC_4nUP.js","assets/vendor-echarts-wordcloud-Ca8n6qS6.js","assets/vendor-echarts-B-i_56Av.js","assets/vendor-zrender-5DcYjSZk.js","assets/vendor-reka-ui-BLnO2MqY.js","assets/MessageExportModal-D9C5t_zF.js","assets/vendor-nuxt-ui-DUpPmItD.js","assets/index-DeV8SAiM.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-CAjUCtGD.css"])))=>i.map(i=>d[i]);
2
+ import{z as je,u as Z,s as he,T as ae,w as $e,k as K,R as Pe,y as Ce,m as ge,S as qe,o as Ge,A as Ye,t as Ke,B as Qe}from"./index-DeV8SAiM.js";import{f as Ze,d as ne,m as Je,_ as Ie,n as Se,g as fe,l as Xe,b as et,e as tt,u as at}from"./vendor-nuxt-ui-DUpPmItD.js";import{r as S,x as de,O as ye,d as F,P as o,Z as k,_ as j,ag as s,ad as U,ae as Y,a0 as y,Y as Te,S as st,Q as C,aa as ue,c as _,w as H,E as ot,u as e,T,U as w,a1 as L,bW as Me,ak as nt,bY as lt,aG as it,L as rt,bZ as Ve,$ as G,n as ve,bS as xe,A as be}from"./vendor-reka-ui-BLnO2MqY.js";import{c as O,p as Re,q as ut,r as ct,a as te,s as dt,b as mt,d as ke,e as vt,u as pt,f as ht,g as gt,h as ft,i as yt,j as xt,k as bt,l as kt,m as _t,n as wt,C as $t,o as Ct,A as It,D as St,M as Tt}from"./ActionToolsPanel.vue_vue_type_script_setup_true_lang-DVdpZpfD.js";import{a as Q,g as Mt,_ as Vt}from"./base-BMjDSaj6.js";import"./vendor-echarts-wordcloud-Ca8n6qS6.js";import{_ as J}from"./LoadingState.vue_vue_type_script_setup_true_lang-B2KAoiMG.js";import{a as pe,b as Rt,c as Lt}from"./dateFormat-dteP1INW.js";import{u as Le,y as Dt,j as De,s as Nt,i as Ne,k as Ae,p as At,t as zt,v as Ft}from"./vendor-echarts-B-i_56Av.js";import{_ as Ut}from"./ThemeCard.vue_vue_type_script_setup_true_lang-BWJ6kuSC.js";import"./vendor-snapdom--nZvo8Sg.js";import"./index-DXcFBsM1.js";import"./TimeSelect.vue_vue_type_script_setup_true_lang-D5vov0eO.js";import"./PageHeader-BEWr2vsg.js";import"./vendor-zrender-5DcYjSZk.js";function Ht(u,a={}){const{threshold:t=300,containerSelector:n=".overflow-y-auto",scrollLockDuration:d=800}=a,l=S(u[0]?.id||"");let c=!1;const h=S(null);let g=null;function b(){if(c)return;const r=[];u.forEach(v=>{const I=document.getElementById(v.id);if(I){const p=I.getBoundingClientRect();r.push({id:v.id,top:Math.round(p.top)})}});let i=0;for(let v=0;v<r.length;v++){if(r[v].top>t){i=Math.max(0,v-1);break}i=v}l.value=u[i]?.id||""}function f(r){const i=document.getElementById(r);i&&(l.value=r,c=!0,i.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{c=!1,b()},d))}return de(()=>{g=h.value?.closest(n)||null,g&&(g.addEventListener("scroll",b,{passive:!0}),b())}),ye(()=>{g&&g.removeEventListener("scroll",b)}),{contentRef:h,activeAnchor:l,scrollToAnchor:f,updateActiveAnchor:b}}const Bt={class:"sticky top-24 space-y-6"},Wt={class:"border-l border-gray-200 dark:border-gray-800"},Ot=["onClick"],Et=F({__name:"PageAnchorsNav",props:{anchors:{},activeAnchor:{},width:{default:"w-44"},hideOnMobile:{type:Boolean,default:!0}},emits:["click"],setup(u,{emit:a}){const t=a;function n(d){t("click",d)}return(d,l)=>(o(),k("div",{class:j([u.width,"shrink-0",u.hideOnMobile?"hidden lg:block":""])},[s("div",Bt,[s("nav",null,[s("div",Wt,[(o(!0),k(U,null,Y(u.anchors,c=>(o(),k("button",{key:c.id,class:j(["-ml-px block border-l-2 py-1.5 pl-4 text-left text-sm transition-colors",[u.activeAnchor===c.id?"border-pink-500 font-medium text-pink-600 dark:text-pink-400":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"]]),onClick:h=>n(c.id)},y(c.label),11,Ot))),128))])]),Te(d.$slots,"default")])],2))}}),se=F({__name:"TopNSelect",props:{modelValue:{default:10},modelModifiers:{}},emits:["update:modelValue"],setup(u){const a=st(u,"modelValue"),t=[{label:"Top 5",value:5},{label:"Top 10",value:10},{label:"Top 20",value:20},{label:"Top 30",value:30},{label:"Top 50",value:50},{label:"Top 100",value:100}];return(n,d)=>{const l=Ze;return o(),C(l,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=c=>a.value=c),items:t,"value-key":"value",class:"w-25"},null,8,["modelValue"])}}}),le=F({__name:"ScrollableChart",props:{contentHeight:{},maxHeightVh:{default:60},paddingClass:{default:"px-3 py-2"}},setup(u){const a=u,t=_(()=>typeof window>"u"?500:Math.round(window.innerHeight*a.maxHeightVh/100)),n=_(()=>a.contentHeight>t.value),d=_(()=>({maxHeight:`${a.maxHeightVh}vh`,overflowY:n.value?"auto":"hidden"}));return(l,c)=>(o(),k("div",{class:j(u.paddingClass),style:ue(d.value)},[Te(l.$slots,"default")],6))}}),jt=F({__name:"EChartGraph",props:{data:{},height:{default:400},layout:{default:"circular"},directed:{type:Boolean,default:!1}},setup(u,{expose:a}){Le([Dt,De,Nt,Ne]);const t=u,n=_(()=>typeof t.height=="number"?`${t.height}px`:t.height),d=je(),l=S(null);let c=null;const h=["#ee4567","#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#9a60b4","#fc8452","#3ba272","#ea7ccc","#6e7074","#546570"],g=_(()=>{const m=new Set;return t.data.nodes.filter(x=>m.has(x.name)?!1:(m.add(x.name),!0))}),b=_(()=>{const m=new Map;return g.value.forEach((x,$)=>{m.set(x.name,h[$%h.length])}),m});function f(m,x){return x<=0?1:1+m/x*5}const r=_(()=>{const m=t.data.maxLinkValue||Math.max(...t.data.links.map(x=>x.value||1),1);return{tooltip:{trigger:"item",backgroundColor:d.value?"rgba(30, 30, 30, 0.9)":"rgba(255, 255, 255, 0.95)",borderColor:d.value?"rgba(255, 255, 255, 0.1)":"rgba(0, 0, 0, 0.1)",textStyle:{color:d.value?"#e5e7eb":"#374151"},formatter:x=>x.dataType==="node"?`<b>${x.data.name}</b><br/>消息数: ${x.data.value||0}`:x.dataType==="edge"?`${x.data.source} → ${x.data.target}<br/>艾特次数: ${x.data.value||0}`:""},animationDuration:1e3,animationDurationUpdate:500,animationEasingUpdate:"quinticInOut",series:[{type:"graph",layout:t.layout,circular:t.layout==="circular"?{rotateLabel:!0}:void 0,force:t.layout==="force"?{repulsion:300,gravity:.1,edgeLength:[80,200],friction:.6}:void 0,roam:!0,scaleLimit:{min:.3,max:3},draggable:!0,label:{show:!0,position:"right",formatter:"{b}",color:d.value?"#e5e7eb":"#374151",fontSize:11,fontWeight:500},edgeSymbol:t.directed?["none","arrow"]:["none","none"],edgeSymbolSize:t.directed?[0,10]:[0,0],lineStyle:{curveness:.3,opacity:.5},emphasis:{focus:"adjacency",label:{show:!0,fontSize:13,fontWeight:600},lineStyle:{width:4,opacity:.9},itemStyle:{shadowBlur:15,shadowColor:"rgba(0, 0, 0, 0.3)"}},data:g.value.map(x=>{const $=b.value.get(x.name)||h[0];return{name:x.name,value:x.value,symbolSize:x.symbolSize||30,label:{show:t.layout==="circular"?!0:(x.symbolSize||30)>30},itemStyle:{color:$,borderColor:"#fff",borderWidth:2,shadowBlur:5,shadowColor:`${$}66`}}}),links:t.data.links.filter(x=>b.value.has(x.source)&&b.value.has(x.target)).map(x=>{const $=b.value.get(x.source)||h[0];return{source:x.source,target:x.target,value:x.value,lineStyle:{color:$,width:f(x.value||1,m)}}})}]}});function i(){l.value&&(c=Ae(l.value,d.value?"dark":void 0,{renderer:"canvas"}),c.setOption({backgroundColor:"transparent",...r.value}))}function v(){c&&c.setOption({backgroundColor:"transparent",...r.value},{notMerge:!0})}function I(){c?.resize()}function p(){c&&c.dispatchAction({type:"restore"})}return a({resetView:p}),H([()=>t.data,()=>t.layout,()=>t.directed,d],()=>{c?v():i()},{deep:!0}),de(()=>{i(),window.addEventListener("resize",I)}),ye(()=>{window.removeEventListener("resize",I),c?.dispose()}),(m,x)=>(o(),k("div",{ref_key:"chartRef",ref:l,style:ue({height:n.value,width:"100%"})},null,4))}}),ze=Symbol("ranking-width-mode"),Fe={standard:{contentClass:"max-w-3xl",gridLeft:110,labelMaxLength:8},wide:{contentClass:"max-w-5xl",gridLeft:180,labelMaxLength:16},full:{contentClass:"max-w-none",gridLeft:260,labelMaxLength:28}};function ie(){const u=ot(ze,null);return _(()=>Fe[u?.value??"standard"])}function re(u,a){return u.length<=a?u:`${u.slice(0,a)}…`}const Pt={class:"px-3 py-2"},me=F({__name:"EChartRank",props:{members:{},title:{},description:{},topN:{default:10},unit:{default:"条"},height:{default:"auto"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const a=u,t=ie(),n=_(()=>a.members.slice(0,a.topN)),d=_(()=>{if(a.height!=="auto")return a.height;const h=n.value.length*36;return Math.max(h+30,180)}),l={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},c=_(()=>{const h=[...n.value].reverse(),g=h.map(i=>re(i.name,t.value.labelMaxLength)),b=h.map(i=>i.value),f=Math.max(...b,1),r=h.map(i=>({value:i.value,itemStyle:{color:l,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:i=>{const v=i[0];if(!v)return"";const I=n.value.length-1-v.dataIndex,p=n.value[I];return`
3
+ <div style="padding: 4px 8px;">
4
+ <div style="font-weight: bold; margin-bottom: 4px;">${p.name}</div>
5
+ <div>${p.value} ${a.unit} (${p.percentage}%)</div>
6
+ </div>
7
+ `}},grid:{left:t.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:f*1.1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:g,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(i,v)=>{const p=n.value.length-1-v+1;return`${p===1?"🥇":p===2?"🥈":p===3?"🥉":`${p}.`} ${i}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const v=n.value.length-1-i.dataIndex;return`${n.value[v].value} ${a.unit}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(h,g)=>u.bare?(o(),C(e(le),{key:0,"content-height":d.value,"max-height-vh":u.maxHeightVh},{default:T(()=>[w(Q,{option:c.value,height:d.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(O),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},{default:T(()=>[s("div",Pt,[w(Q,{option:c.value,height:d.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),qt={class:"divide-y divide-gray-100 dark:divide-gray-800"},Gt={key:0,class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-sm font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},Yt={class:"w-32 shrink-0"},Kt={class:"wrap-break-word font-medium text-gray-900 dark:text-white"},Qt={class:"flex flex-1 items-center"},Zt={class:"h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-gray-800"},Jt={class:"flex shrink-0 items-baseline gap-2 whitespace-nowrap"},Xt={class:"text-lg font-bold text-gray-900 dark:text-white"},ea={class:"text-sm text-gray-500"},_e=F({__name:"RankList",props:{members:{},showAvatar:{type:Boolean,default:!1},rankLimit:{default:0},unit:{}},setup(u){const{t:a}=Z(),t=u,n=_(()=>t.unit||a("views.charts.rankList.unit")),d=_(()=>t.rankLimit>0?t.members.slice(0,t.rankLimit):t.members);function l(c){if(d.value.length===0)return 0;const h=d.value[0].value;return h===0?0:Math.round(d.value[c].value/h*100)}return(c,h)=>(o(),k("div",qt,[(o(!0),k(U,null,Y(d.value,(g,b)=>(o(),k("div",{key:g.id,class:"flex items-center gap-3 px-5 py-3 transition-colors hover:bg-gray-50 dark:hover:bg-gray-800/50"},[s("div",{class:j(["flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm font-bold",e(Re)(b)])},y(b+1),3),u.showAvatar?(o(),k("div",Gt,y(g.name.slice(0,1)),1)):L("",!0),s("div",Yt,[s("p",Kt,y(g.name),1)]),s("div",Qt,[s("div",Zt,[s("div",{class:j(["h-full rounded-full bg-linear-to-r transition-all",e(ut)(b)]),style:ue({width:`${l(b)}%`})},null,6)])]),s("div",Jt,[s("span",Xt,y(g.value),1),s("span",ea,y(n.value)+" ("+y(g.percentage)+"%)",1)])]))),128))]))}}),we=F({__name:"RankListPro",props:{members:{},title:{},description:{},topN:{default:10},unit:{}},setup(u){const{t:a}=Z(),t=u,n=_(()=>t.members.slice(0,t.topN)),d=_(()=>t.members.length>t.topN);return(l,c)=>(o(),C(ct,{title:u.title,description:u.description,"show-view-all":d.value,"view-all-label":e(a)("views.charts.rankListPro.fullRanking"),"count-label":e(a)("views.charts.rankListPro.memberCount",{count:u.members.length})},{full:T(()=>[w(_e,{members:u.members,unit:u.unit},null,8,["members","unit"])]),default:T(()=>[w(_e,{members:n.value,unit:u.unit},null,8,["members","unit"])]),_:1},8,["title","description","show-view-all","view-all-label","count-label"]))}}),ta={class:"main-content mx-auto max-w-6xl py-6"},aa={class:"mb-4 flex items-center justify-end gap-4"},sa={class:"text-xs text-gray-500 dark:text-gray-400"},oa={key:0,class:"grid grid-cols-2 gap-6"},na={class:"mb-3 text-center"},la={class:"text-base font-semibold text-gray-900 dark:text-white"},ia={class:"flex flex-wrap gap-2"},ra=["title","onClick"],ua={class:"text-xs opacity-50"},ca={key:1,class:"grid grid-cols-2 gap-6"},da={class:"mb-3 text-center"},ma={class:"text-base font-semibold text-gray-900 dark:text-white"},va={class:"relative w-full",style:{"aspect-ratio":"4 / 3"}},pa={class:"mt-4 text-center text-xs text-gray-500 dark:text-gray-400"},ha=F({__name:"CatchphraseTab",props:{sessionId:{},timeFilter:{}},setup(u){const a=Me(()=>$e(()=>import("./EChartWordcloud-BXC_4nUP.js"),__vite__mapDeps([0,1,2,3,4]))),{t}=Z(),n=he(),d=u,l=S(null),c=S(!1),h=S("list"),g=S(30),b=_(()=>[{label:t("quotes.catchphrase.viewMode.list"),value:"list"},{label:t("quotes.catchphrase.viewMode.wordcloud"),value:"wordcloud"}]),f=[{label:"10",value:10},{label:"30",value:30},{label:"50",value:50},{label:"100",value:100}],r=_(()=>l.value&&l.value.members.length>0),i=_(()=>{if(!l.value)return[];const M=g.value;return console.log("[CatchphraseTab] displayMembers recompute, topN:",M,"type:",typeof M),l.value.members.map(A=>{const z=A.catchphrases.slice(0,M);return console.log("[CatchphraseTab]",A.name,"total:",A.catchphrases.length,"display:",z.length),{...A,catchphrases:z}})}),v=_(()=>i.value.map(M=>({name:M.name,data:{words:M.catchphrases.map(A=>({word:A.content,count:A.count}))}}))),I=[{bg:"bg-amber-50 dark:bg-amber-900/20",text:"text-amber-700 dark:text-amber-400",badge:"bg-amber-100 dark:bg-amber-800/40 text-amber-600 dark:text-amber-300"},{bg:"bg-slate-50 dark:bg-slate-800/40",text:"text-slate-600 dark:text-slate-300",badge:"bg-slate-100 dark:bg-slate-700/60 text-slate-500 dark:text-slate-400"},{bg:"bg-orange-50 dark:bg-orange-900/15",text:"text-orange-600 dark:text-orange-400",badge:"bg-orange-100 dark:bg-orange-800/30 text-orange-500 dark:text-orange-300"}];function p(M){return M<I.length?I[M]:{bg:"bg-gray-50 dark:bg-gray-800/30",text:"text-gray-600 dark:text-gray-400",badge:"bg-gray-100 dark:bg-gray-700/40 text-gray-500 dark:text-gray-400"}}function m(M,A=20){return M.length<=A?M:M.slice(0,A)+"..."}async function x(){if(d.sessionId){c.value=!0;try{l.value=await K().getCatchphraseAnalysis(d.sessionId,d.timeFilter),console.log("[CatchphraseTab] API result: members:",l.value?.members.length,"per-member catchphrases:",l.value?.members.map(M=>({name:M.name,count:M.catchphrases.length})))}catch(M){console.error("Failed to load catchphrase analysis:",M)}finally{c.value=!1}}}function $(M){n.openChatRecordDrawer({keywords:[M]})}return H(g,(M,A)=>{console.log("[CatchphraseTab] topN changed:",A,"->",M,"type:",typeof M)}),H(()=>[d.sessionId,d.timeFilter],()=>{x()},{immediate:!0,deep:!0}),(M,A)=>(o(),k("div",ta,[c.value?(o(),C(e(J),{key:0,text:e(t)("quotes.catchphrase.loading")},null,8,["text"])):r.value?(o(),k(U,{key:2},[s("div",aa,[s("span",sa,y(e(t)("quotes.catchphrase.topN")),1),w(e(ae),{modelValue:g.value,"onUpdate:modelValue":A[0]||(A[0]=z=>g.value=z),size:"xs",items:f},null,8,["modelValue"]),A[2]||(A[2]=s("div",{class:"h-4 w-px bg-gray-200 dark:bg-gray-700"},null,-1)),w(e(ae),{modelValue:h.value,"onUpdate:modelValue":A[1]||(A[1]=z=>h.value=z),size:"xs",items:b.value},null,8,["modelValue","items"])]),h.value==="list"?(o(),k("div",oa,[(o(!0),k(U,null,Y(i.value,z=>(o(),k("div",{key:z.memberId},[s("div",na,[s("span",la,y(z.name),1)]),s("div",ia,[(o(!0),k(U,null,Y(z.catchphrases,(N,D)=>(o(),k("div",{key:D,class:j(["inline-flex cursor-pointer items-center gap-1.5 rounded-full px-3 py-1.5 transition-opacity hover:opacity-75",p(D).bg]),title:N.content,onClick:B=>$(N.content)},[D<3?(o(),k("span",{key:0,class:j(["flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-[10px] font-bold",p(D).badge])},y(D+1),3)):L("",!0),s("span",{class:j(["text-sm font-medium",p(D).text])},y(m(N.content)),3),s("span",ua,y(e(t)("quotes.catchphrase.times",{count:N.count})),1)],10,ra))),128))])]))),128))])):(o(),k("div",ca,[(o(!0),k(U,null,Y(v.value,z=>(o(),k("div",{key:z.name},[s("div",da,[s("span",ma,y(z.name),1)]),s("div",va,[z.data.words.length===0?(o(),C(e(te),{key:0,text:e(t)("quotes.catchphrase.empty.title"),class:"h-full"},null,8,["text"])):(o(),C(e(a),{key:1,data:z.data,height:"100%","max-words":g.value,"color-scheme":"default","size-scale":1,loading:c.value,onWordClick:$},null,8,["data","max-words","loading"]))])]))),128))])),s("p",pa,y(e(t)("quotes.catchphrase.stats.clickHint")),1)],64)):(o(),C(e(te),{key:1,text:e(t)("quotes.catchphrase.empty.title")},null,8,["text"]))]))}}),ga={class:"main-content mx-auto max-w-3xl p-6"},fa={class:"flex items-center gap-3"},ya={class:"shrink-0 text-lg font-bold text-pink-600"},xa={class:"flex flex-1 items-center gap-1 overflow-hidden text-sm"},ba={class:"shrink-0 font-medium text-gray-900 dark:text-white whitespace-nowrap"},ka=["title"],_a={class:"flex shrink-0 items-center gap-2 text-xs text-gray-500"},wa=F({__name:"HotRepeatTab",props:{sessionId:{},timeFilter:{}},setup(u){const{t:a}=Z(),t=u,n=he(),d=S(null),l=S(!1);async function c(){if(t.sessionId){l.value=!0;try{d.value=await K().getRepeatAnalysis(t.sessionId,t.timeFilter)}catch(b){console.error("Failed to load repeat analysis:",b)}finally{l.value=!1}}}function h(b,f=30){return b.length<=f?b:b.slice(0,f)+"..."}function g(b){n.openChatRecordDrawer({scrollToMessageId:b.firstMessageId,highlightKeywords:[b.content]})}return H(()=>[t.sessionId,t.timeFilter],()=>{c()},{immediate:!0,deep:!0}),(b,f)=>{const r=ne;return o(),k("div",ga,[l.value?(o(),C(e(J),{key:0,text:e(a)("quotes.hotRepeat.loading")},null,8,["text"])):d.value&&d.value.hotContents.length>0?(o(),C(e(dt),{key:1,items:d.value.hotContents,title:e(a)("quotes.hotRepeat.title"),description:e(a)("quotes.hotRepeat.description"),"top-n":50,"count-template":e(a)("quotes.hotRepeat.countTemplate")},{item:T(({item:i,index:v})=>[s("div",fa,[s("span",{class:j(["flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",e(Re)(v)])},y(v+1),3),s("span",ya,y(e(a)("quotes.hotRepeat.people",{count:i.maxChainLength})),1),s("div",xa,[s("span",ba,y(i.originatorName)+y(e(a)("quotes.hotRepeat.colon")),1),s("span",{class:"truncate text-gray-600 dark:text-gray-400",title:i.content},y(h(i.content)),9,ka)]),s("div",_a,[s("span",null,y(e(a)("quotes.hotRepeat.times",{count:i.count})),1),f[0]||(f[0]=s("span",{class:"text-gray-300 dark:text-gray-600"},"|",-1)),s("span",null,y(e(pe)(i.lastTs)),1),w(r,{icon:"i-heroicons-chat-bubble-left-right",color:"neutral",variant:"ghost",size:"xs",title:e(a)("quotes.hotRepeat.viewChat"),onClick:nt(I=>g(i),["stop"])},null,8,["title","onClick"])])])]),_:1},8,["items","title","description","count-template"])):(o(),C(e(O),{key:2,title:e(a)("quotes.hotRepeat.title")},{default:T(()=>[w(e(te),{text:e(a)("quotes.hotRepeat.empty")},null,8,["text"])]),_:1},8,["title"]))])}}}),$a={class:"main-content mx-auto max-w-[920px] space-y-6 p-6"},Ca={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},Ia={class:"p-5"},Sa={class:"p-5"},Ta=F({__name:"OverviewTab",props:{session:{},memberActivity:{},topMembers:{},bottomMembers:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(u){const{t:a}=Z(),t=u,{dailyChartData:n}=pt(()=>t.dailyActivity),d=_(()=>({labels:t.messageTypes.map(c=>Mt(c.type,a)),values:t.messageTypes.map(c=>c.count)})),l=_(()=>{const c=[...t.memberActivity].sort((r,i)=>i.messageCount-r.messageCount),h=c.slice(0,10),g=c.slice(10).reduce((r,i)=>r+i.messageCount,0),b=h.map(r=>r.name),f=h.map(r=>r.messageCount);return g>0&&(b.push(a("analysis.overview.others")),f.push(g)),{labels:b,values:f}});return(c,h)=>(o(),k("div",$a,[w(mt,{session:u.session,"daily-activity":u.dailyActivity,"message-types":u.messageTypes,"hourly-activity":u.hourlyActivity,"time-range":u.timeRange,"filtered-message-count":u.filteredMessageCount,"filtered-member-count":u.filteredMemberCount,"time-filter":u.timeFilter},null,8,["session","daily-activity","message-types","hourly-activity","time-range","filtered-message-count","filtered-member-count","time-filter"]),s("div",Ca,[w(e(O),{title:e(a)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:T(()=>[s("div",Ia,[w(e(ke),{data:d.value,height:280},null,8,["data"])])]),_:1},8,["title"]),w(e(O),{title:e(a)("analysis.overview.memberDistribution"),"show-divider":!1},{default:T(()=>[s("div",Sa,[w(e(ke),{data:l.value,height:280},null,8,["data"])])]),_:1},8,["title"])]),w(vt,{"daily-activity":u.dailyActivity,"daily-chart-data":e(n)},null,8,["daily-activity","daily-chart-data"])]))}}),Ma={class:"flex items-center gap-3"},Va={key:1,class:"py-8 text-center text-sm text-gray-400"},Ra=F({__name:"ActivityRank",props:{sessionId:{},memberActivity:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(u){const a=u,t=S(null),n=S(null),d=S(!1),l=S("activity"),c=S(a.globalTopN??10);H(()=>a.globalTopN,p=>{p!==void 0&&(c.value=p)});async function h(){if(a.sessionId){d.value=!0;try{const p=K(),[m,x]=await Promise.all([p.getDragonKingAnalysis(a.sessionId,a.timeFilter),p.getCheckInAnalysis(a.sessionId,a.timeFilter)]);t.value=m,n.value=x}catch(p){console.error("加载活跃数据失败:",p)}finally{d.value=!1}}}const g=_(()=>a.memberActivity.map(p=>({id:p.memberId.toString(),name:p.name,value:p.messageCount,percentage:p.percentage}))),b=_(()=>t.value?t.value.rank.map(p=>({id:p.memberId.toString(),name:p.name,value:p.count,percentage:p.percentage})):[]),f=_(()=>n.value?n.value.loyaltyRank.map(p=>({id:p.memberId.toString(),name:p.name,value:p.totalDays,percentage:p.percentage})):[]),r=_(()=>{switch(l.value){case"activity":return g.value;case"dragon":return b.value;case"loyalty":return f.value;default:return g.value}}),i=_(()=>{switch(l.value){case"activity":return"条";case"dragon":case"loyalty":return"天";default:return"条"}}),v=_(()=>{switch(l.value){case"activity":return"🏆 活跃榜 - 发言数量";case"dragon":return"🏆 活跃榜 - 龙王";case"loyalty":return"🏆 活跃榜 - 累计发言";default:return"🏆 活跃榜"}}),I=_(()=>{switch(l.value){case"activity":return"按消息发送数量排名";case"dragon":return`每天发言最多的人+1(共 ${t.value?.totalDays??0} 天)`;case"loyalty":return`累计发言天数排名(共 ${n.value?.totalDays??0} 天)`;default:return""}});return H(()=>[a.sessionId,a.timeFilter],()=>h(),{immediate:!0,deep:!0}),(p,m)=>(o(),C(e(O),{title:v.value,description:I.value},{headerRight:T(()=>[s("div",Ma,[u.showTopNSelect?(o(),C(e(se),{key:0,modelValue:c.value,"onUpdate:modelValue":m[0]||(m[0]=x=>c.value=x)},null,8,["modelValue"])):L("",!0),w(e(ae),{modelValue:l.value,"onUpdate:modelValue":m[1]||(m[1]=x=>l.value=x),items:[{label:"发言数量",value:"activity"},{label:"龙王",value:"dragon"},{label:"累计发言",value:"loyalty"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[d.value&&(l.value==="dragon"||l.value==="loyalty")?(o(),C(e(J),{key:0,text:"正在加载数据..."})):(o(),k(U,{key:1},[r.value.length>0?(o(),C(e(me),{key:0,members:r.value,title:v.value,unit:i.value,"top-n":c.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),k("div",Va,"暂无数据"))],64))]),_:1},8,["title","description"]))}}),La={key:0},Da={key:0,class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},Na={class:"px-3 py-2"},Aa=F({__name:"EChartStreakRank",props:{items:{},title:{},description:{},topN:{default:10},mode:{default:"max"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const a=u,t=ie(),n=_(()=>a.mode==="current"?a.items.filter(f=>f.currentStreak>0).sort((f,r)=>r.currentStreak-f.currentStreak).slice(0,a.topN):a.items.slice(0,a.topN)),d=_(()=>{const f=n.value.length*36;return Math.max(f+30,180)}),l={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]};function h(f,r){return`${f} ~ ${r}`}function g(f){return a.mode==="current"?f.currentStreak:f.maxStreak}const b=_(()=>{const f=[...n.value].reverse(),r=f.map(p=>re(p.name,t.value.labelMaxLength)),i=f.map(p=>g(p)),v=Math.max(...i,1),I=f.map(p=>({value:g(p),itemStyle:{color:a.mode==="current"||p.currentStreak>0?c:l,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:p=>{const m=p[0];if(!m)return"";const x=n.value.length-1-m.dataIndex,$=n.value[x];if(a.mode==="current")return`
8
+ <div style="padding: 4px 8px;">
9
+ <div style="font-weight: bold; margin-bottom: 6px;">${$.name}</div>
10
+ <div style="color: #fb923c;">🔥 当前连续 <b>${$.currentStreak}</b> 天</div>
11
+ <div style="margin-top: 4px; font-size: 12px; color: #9ca3af;">最长记录: ${$.maxStreak} 天</div>
12
+ </div>
13
+ `;let M=`
14
+ <div style="padding: 4px 8px;">
15
+ <div style="font-weight: bold; margin-bottom: 6px;">${$.name}</div>
16
+ <div style="margin-bottom: 4px;">🔥 最长连续: <b>${$.maxStreak}</b> 天</div>
17
+ <div style="font-size: 12px; color: #9ca3af;">${h($.maxStreakStart,$.maxStreakEnd)}</div>
18
+ `;return $.currentStreak>0&&(M+=`<div style="margin-top: 6px; color: #fb923c;">🔥 当前连续 ${$.currentStreak} 天</div>`),M+="</div>",M}},grid:{left:t.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:v*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:r,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(p,m)=>{const $=n.value.length-1-m+1;return`${$===1?"🥇":$===2?"🥈":$===3?"🥉":`${$}.`} ${p}`}}},series:[{type:"bar",data:I,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:p=>{const m=n.value.length-1-p.dataIndex,x=n.value[m],$=g(x),M=a.mode==="current"||x.currentStreak>0?" 🔥":"";return`${$} 天${M}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(249, 115, 22, 0.3)"}}}]}});return(f,r)=>u.bare?(o(),k("div",La,[w(e(le),{"content-height":d.value,"max-height-vh":u.maxHeightVh},{default:T(()=>[w(e(Q),{option:b.value,height:d.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"]),u.mode==="max"?(o(),k("div",Da,[...r[0]||(r[0]=[lt('<div class="flex items-center gap-1.5"><div class="h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"></div><span class="text-xs text-gray-500">当前连续中 🔥</span></div><div class="flex items-center gap-1.5"><div class="h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"></div><span class="text-xs text-gray-500">已中断</span></div>',2)])])):L("",!0)])):(o(),C(e(O),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},it({default:T(()=>[s("div",Na,[w(e(Q),{option:b.value,height:d.value},null,8,["option","height"])])]),_:2},[u.mode==="max"?{name:"footer",fn:T(()=>[r[1]||(r[1]=s("div",{class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},[s("div",{class:"flex items-center gap-1.5"},[s("div",{class:"h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"}),s("span",{class:"text-xs text-gray-500"},"当前连续中 🔥")]),s("div",{class:"flex items-center gap-1.5"},[s("div",{class:"h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"}),s("span",{class:"text-xs text-gray-500"},"已中断")])],-1))]),key:"0"}:void 0]),1032,["title","description","max-height-vh"]))}}),za={class:"px-3 py-2"},Fa=F({__name:"EChartBattleRank",props:{battles:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const a=u,t=_(()=>a.battles.slice(0,a.topN)),n=_(()=>{const h=t.value.length*36;return Math.max(h+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]};function l(h){return`${h.participantCount} 人参战`}const c=_(()=>{const h=[...t.value].reverse(),g=h.map(i=>l(i)),b=h.map(i=>i.totalImages),f=Math.max(...b,1),r=h.map(i=>({value:i.totalImages,itemStyle:{color:d,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},extraCssText:"max-width: 300px;",formatter:i=>{const v=i[0];if(!v)return"";const I=t.value.length-1-v.dataIndex,p=t.value[I],m=p.participants.slice(0,5).map($=>`<span style="color: #d1d5db;">${$.name}</span> <b>${$.imageCount}</b>张`).join("、"),x=p.participants.length>5?`、+${p.participants.length-5}`:"";return`
19
+ <div style="padding: 6px 8px;">
20
+ <div style="font-weight: bold; margin-bottom: 8px; font-size: 13px;">
21
+ ⚔️ ${pe(p.startTime)}
22
+ </div>
23
+ <div style="margin-bottom: 6px;">
24
+ <span style="color: #9ca3af;">参战人数:</span> <b>${p.participantCount}</b> 人
25
+ </div>
26
+ <div style="margin-bottom: 8px;">
27
+ <span style="color: #9ca3af;">总图片数:</span> <b style="color: #f472b6;">${p.totalImages}</b> 张
28
+ </div>
29
+ <div style="border-top: 1px solid #374151; padding-top: 6px; font-size: 11px;">
30
+ ${m}${x}
31
+ </div>
32
+ </div>
33
+ `}},grid:{left:95,right:125,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:f*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:g,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:11,color:"#4b5563",margin:12,formatter:(i,v)=>{const p=t.value.length-1-v+1;return`${p===1?"🥇":p===2?"🥈":p===3?"🥉":`${p}.`} ${i}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const v=t.value.length-1-i.dataIndex,I=t.value[v],p=pe(I.startTime);return`${I.totalImages} 张 (${p})`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(h,g)=>u.bare?(o(),C(e(le),{key:0,"content-height":n.value,"max-height-vh":u.maxHeightVh},{default:T(()=>[w(e(Q),{option:c.value,height:n.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(O),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},{default:T(()=>[s("div",za,[w(e(Q),{option:c.value,height:n.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Ua={class:"px-3 py-2"},Ha=F({__name:"EChartTimeRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const a=u,t=ie(),n=_(()=>a.items.slice(0,a.topN)),d=_(()=>{const g=n.value.length*36;return Math.max(g+30,180)}),l={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f59e0b"},{offset:1,color:"#fbbf24"}]};function c(g){return(g/1e3).toFixed(2)+"s"}const h=_(()=>{if(n.value.length===0)return{};const g=[...n.value].reverse(),b=g.map(i=>re(i.name,t.value.labelMaxLength)),f=n.value[0].avgTimeDiff,r=g.map(i=>({value:Math.round(f/i.avgTimeDiff*100),itemStyle:{color:l,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:i=>{const v=i[0];if(!v)return"";const I=n.value.length-1-v.dataIndex,p=n.value[I];return`
34
+ <div style="padding: 4px 8px;">
35
+ <div style="font-weight: bold; margin-bottom: 6px;">${p.name}</div>
36
+ <div style="margin-bottom: 4px;">⚡️ 平均反应时间: <b>${c(p.avgTimeDiff)}</b></div>
37
+ <div style="font-size: 12px; color: #9ca3af;">参与复读 ${p.count} 次</div>
38
+ </div>
39
+ `}},grid:{left:t.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:105,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:b,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(i,v)=>{const p=n.value.length-1-v+1;return`${p===1?"🥇":p===2?"🥈":p===3?"🥉":`${p}.`} ${i}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const v=n.value.length-1-i.dataIndex,I=n.value[v];return`${c(I.avgTimeDiff)} · ${I.count}次`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(245, 158, 11, 0.3)"}}}]}});return(g,b)=>u.bare?(o(),C(e(le),{key:0,"content-height":d.value,"max-height-vh":u.maxHeightVh},{default:T(()=>[w(e(Q),{option:h.value,height:d.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(O),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},{default:T(()=>[s("div",Ua,[w(e(Q),{option:h.value,height:d.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Ba={class:"flex items-center gap-3"},Wa={class:"px-3 py-2"},Oa=F({__name:"EChartDivingRank",props:{items:{},showTopNSelect:{type:Boolean,default:!0},maxHeightVh:{default:60},globalTopN:{}},setup(u){const a=u,t=ie(),n=S("desc"),d=S(a.globalTopN??10);H(()=>a.globalTopN,i=>{i!==void 0&&(d.value=i)});const l=_(()=>[...a.items].sort((v,I)=>n.value==="desc"?I.daysSinceLastMessage-v.daysSinceLastMessage:v.daysSinceLastMessage-I.daysSinceLastMessage).slice(0,d.value)),c=_(()=>n.value==="desc"?"🤿 潜水榜 - 潜水最久":"🤿 潜水榜 - 最近冒泡"),h=_(()=>n.value==="desc"?"距离上次发言时间最久的成员":"最近发言过的成员"),g=_(()=>{const i=l.value.length*36;return Math.max(i+30,180)}),b={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#06b6d4"},{offset:1,color:"#22d3ee"}]};function f(i){return i===0?"今天":i===1?"昨天":`${i} 天前`}const r=_(()=>{if(l.value.length===0)return{};const i=[...l.value].reverse(),v=i.map(m=>re(m.name,t.value.labelMaxLength)),I=Math.max(...l.value.map(m=>m.daysSinceLastMessage),1),p=i.map(m=>({value:m.daysSinceLastMessage,itemStyle:{color:b,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:m=>{const x=m[0];if(!x)return"";const $=l.value.length-1-x.dataIndex,M=l.value[$];return`
40
+ <div style="padding: 4px 8px;">
41
+ <div style="font-weight: bold; margin-bottom: 6px;">${M.name}</div>
42
+ <div style="margin-bottom: 4px;">🤿 ${f(M.daysSinceLastMessage)}</div>
43
+ <div style="font-size: 12px; color: #9ca3af;">最后发言: ${Rt(M.lastMessageTs)}</div>
44
+ </div>
45
+ `}},grid:{left:t.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:I*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:v,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(m,x)=>{const M=l.value.length-1-x+1;return`${M===1?"🥇":M===2?"🥈":M===3?"🥉":`${M}.`} ${m}`}}},series:[{type:"bar",data:p,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:m=>{const x=l.value.length-1-m.dataIndex,$=l.value[x];return f($.daysSinceLastMessage)},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(0, 0, 0, 0.2)"}}}]}});return(i,v)=>(o(),C(e(O),{title:c.value,description:h.value,scrollable:"","max-height-vh":u.maxHeightVh},{headerRight:T(()=>[s("div",Ba,[u.showTopNSelect?(o(),C(e(se),{key:0,modelValue:d.value,"onUpdate:modelValue":v[0]||(v[0]=I=>d.value=I)},null,8,["modelValue"])):L("",!0),w(e(ae),{modelValue:n.value,"onUpdate:modelValue":v[1]||(v[1]=I=>n.value=I),items:[{label:"潜水最久",value:"desc"},{label:"最近冒泡",value:"asc"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[s("div",Wa,[w(e(Q),{option:r.value,height:g.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Ea={class:"px-3 py-2"},ja=F({__name:"EChartConsecutiveRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const a=u,t=ie(),n=_(()=>[...a.items].sort((g,b)=>b.maxConsecutiveDays-g.maxConsecutiveDays).slice(0,a.topN)),d=_(()=>{const g=n.value.length*36;return Math.max(g+30,180)}),l={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]},c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ec4899"},{offset:1,color:"#f472b6"}]},h=_(()=>{if(n.value.length===0)return{};const g=[...n.value].reverse(),b=g.map(r=>re(r.name,t.value.labelMaxLength)),f=Math.max(...n.value.map(r=>r.maxConsecutiveDays),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:r=>{if(!r||r.length===0)return"";const i=r[0].dataIndex,v=n.value.length-1-i,I=n.value[v];let p=`
46
+ <div style="padding: 6px 8px;">
47
+ <div style="font-weight: bold; margin-bottom: 6px;">${I.name}</div>
48
+ <div>最长连续: <b style="color: #f472b6;">${I.maxConsecutiveDays}</b> 天</div>
49
+ `;return I.currentStreak>0&&(p+=`<div style="color: #f97316;">🔥 当前连续 ${I.currentStreak} 天</div>`),p+="</div>",p}},legend:{show:!1},grid:{left:t.value.gridLeft,right:75,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:f*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:b,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(r,i)=>{const I=n.value.length-1-i+1;return`${I===1?"🥇":I===2?"🥈":I===3?"🥉":`${I}.`} ${r}`}}},series:[{name:"当前连续",type:"bar",data:g.map(r=>({value:r.currentStreak>0?r.maxConsecutiveDays:0,itemStyle:{color:l,borderRadius:[0,4,4,0]}})),barWidth:18,barGap:"-100%",label:{show:!0,position:"right",distance:8,formatter:r=>{const i=n.value.length-1-r.dataIndex,v=n.value[i];return v.currentStreak>0?`${v.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}},{name:"已中断",type:"bar",data:g.map(r=>({value:r.currentStreak===0?r.maxConsecutiveDays:0,itemStyle:{color:c,borderRadius:[0,4,4,0]}})),barWidth:18,label:{show:!0,position:"right",distance:8,formatter:r=>{const i=n.value.length-1-r.dataIndex,v=n.value[i];return v.currentStreak===0?`${v.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(g,b)=>u.bare?(o(),C(e(le),{key:0,"content-height":d.value,"max-height-vh":u.maxHeightVh},{default:T(()=>[w(e(Q),{option:h.value,height:d.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(O),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},{default:T(()=>[s("div",Ea,[w(e(Q),{option:h.value,height:d.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Pa={class:"px-3 py-2"},qa=F({__name:"EChartNightOwlRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const a=u,t=ie(),n=_(()=>a.items.slice(0,a.topN)),d=_(()=>{const h=n.value.length*36;return Math.max(h+50,200)}),l={h23:"#8b5cf6",h0:"#3b82f6",h1:"#06b6d4",h2:"#f59e0b",h3to4:"#ef4444"},c=_(()=>{if(n.value.length===0)return{};const h=[...n.value].reverse(),g=h.map(f=>re(f.name,t.value.labelMaxLength)),b=Math.max(...n.value.map(f=>f.totalNightMessages),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:f=>{if(!f||f.length===0)return"";const r=f[0].dataIndex,i=n.value.length-1-r,v=n.value[i],I=v.hourlyBreakdown;return`
50
+ <div style="padding: 6px 8px;">
51
+ <div style="font-weight: bold; margin-bottom: 6px;">${v.name}</div>
52
+ <div style="margin-bottom: 4px;">
53
+ 称号: <b style="color: #f472b6;">${v.title}</b>
54
+ </div>
55
+ <div style="margin-bottom: 6px;">总发言: <b>${v.totalNightMessages}</b> 条</div>
56
+ <div style="border-top: 1px solid #374151; padding-top: 6px;">
57
+ <div><span style="color: ${l.h23};">●</span> 23点: ${I.h23} 条</div>
58
+ <div><span style="color: ${l.h0};">●</span> 0点: ${I.h0} 条</div>
59
+ <div><span style="color: ${l.h1};">●</span> 1点: ${I.h1} 条</div>
60
+ <div><span style="color: ${l.h2};">●</span> 2点: ${I.h2} 条</div>
61
+ <div><span style="color: ${l.h3to4};">●</span> 3-4点: ${I.h3to4} 条</div>
62
+ </div>
63
+ </div>
64
+ `}},legend:{show:!0,bottom:0,itemWidth:12,itemHeight:12,textStyle:{color:"#6b7280",fontSize:10}},grid:{left:t.value.gridLeft,right:70,top:15,bottom:35,containLabel:!1},xAxis:{type:"value",max:b*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:g,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(f,r)=>{const v=n.value.length-1-r+1;return`${v===1?"🥇":v===2?"🥈":v===3?"🥉":`${v}.`} ${f}`}}},series:[{name:"23点",type:"bar",stack:"total",data:h.map(f=>f.hourlyBreakdown.h23),itemStyle:{color:l.h23},barWidth:18},{name:"0点",type:"bar",stack:"total",data:h.map(f=>f.hourlyBreakdown.h0),itemStyle:{color:l.h0},barWidth:18},{name:"1点",type:"bar",stack:"total",data:h.map(f=>f.hourlyBreakdown.h1),itemStyle:{color:l.h1},barWidth:18},{name:"2点",type:"bar",stack:"total",data:h.map(f=>f.hourlyBreakdown.h2),itemStyle:{color:l.h2},barWidth:18},{name:"3-4点",type:"bar",stack:"total",data:h.map(f=>f.hourlyBreakdown.h3to4),itemStyle:{color:l.h3to4,borderRadius:[0,4,4,0]},barWidth:18,label:{show:!0,position:"right",distance:8,formatter:f=>{const r=n.value.length-1-f.dataIndex;return`${n.value[r].totalNightMessages} 条`},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(h,g)=>u.bare?(o(),C(e(le),{key:0,"content-height":d.value,"max-height-vh":u.maxHeightVh},{default:T(()=>[w(e(Q),{option:c.value,height:d.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(O),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},{default:T(()=>[s("div",Pa,[w(e(Q),{option:c.value,height:d.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Ga={id:"streak-rank",class:"scroll-mt-24"},Ya={class:"flex items-center gap-3"},Ka=F({__name:"CheckInRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(u){const a=u,t=S(null),n=S(!1),d=S("max"),l=S(a.globalTopN??10);H(()=>a.globalTopN,f=>{f!==void 0&&(l.value=f)});const c=_(()=>d.value==="max"?"🔥 火花榜 - 最长连续":"🔥 火花榜 - 当前连续"),h=_(()=>d.value==="max"?"历史最长连续发言天数":"正在持续连续发言的成员"),g=_(()=>t.value?t.value.streakRank.some(f=>f.currentStreak>0):!1);async function b(){if(a.sessionId){n.value=!0;try{t.value=await K().getCheckInAnalysis(a.sessionId,a.timeFilter)}catch(f){console.error("加载打卡分析失败:",f)}finally{n.value=!1}}}return H(()=>[a.sessionId,a.timeFilter],()=>{b()},{immediate:!0,deep:!0}),(f,r)=>(o(),k("div",Ga,[n.value?(o(),C(e(J),{key:0,text:"正在分析数据..."})):t.value&&t.value.streakRank.length>0?(o(),C(e(O),{key:1,title:c.value,description:h.value},{headerRight:T(()=>[s("div",Ya,[u.showTopNSelect?(o(),C(e(se),{key:0,modelValue:l.value,"onUpdate:modelValue":r[0]||(r[0]=i=>l.value=i)},null,8,["modelValue"])):L("",!0),g.value?(o(),C(e(ae),{key:1,modelValue:d.value,"onUpdate:modelValue":r[1]||(r[1]=i=>d.value=i),items:[{label:"最长连续",value:"max"},{label:"当前连续",value:"current"}],size:"sm"},null,8,["modelValue"])):L("",!0)])]),default:T(()=>[w(e(Aa),{items:t.value.streakRank,title:c.value,mode:d.value,"top-n":l.value,bare:""},null,8,["items","title","mode","top-n"])]),_:1},8,["title","description"])):(o(),C(e(O),{key:2,title:"🔥 火花榜"},{default:T(()=>[w(e(te),{text:"暂无连续发言数据"})]),_:1}))]))}}),Qa={class:"flex items-center gap-3"},Za={key:1,class:"py-8 text-center text-sm text-gray-400"},Ja={key:1,class:"py-8 text-center text-sm text-gray-400"},Xa=F({__name:"MemeBattleRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(u){const a=u,t=S(null),n=S(!1),d=S("count"),l=S(a.globalTopN??10);H(()=>a.globalTopN,v=>{v!==void 0&&(l.value=v)});async function c(){if(a.sessionId){n.value=!0;try{t.value=await K().getMemeBattleAnalysis(a.sessionId,a.timeFilter)}catch(v){console.error("加载斗图分析失败:",v)}finally{n.value=!1}}}const h=_(()=>t.value?t.value.rankByCount.map(v=>({id:v.memberId.toString(),name:v.name,value:v.count,percentage:v.percentage})):[]),g=_(()=>t.value?t.value.rankByImageCount.map(v=>({id:v.memberId.toString(),name:v.name,value:v.count,percentage:v.percentage})):[]),b=_(()=>d.value==="count"?h.value:g.value),f=_(()=>d.value==="count"?"场":"张"),r=_(()=>{switch(d.value){case"battle":return"⚔️ 斗图榜 - 史诗级战役";case"count":return"⚔️ 斗图榜 - 按场次";case"image":return"⚔️ 斗图榜 - 按图量";default:return"⚔️ 斗图榜"}}),i=_(()=>{switch(d.value){case"battle":return"记录最激烈的斗图大战";case"count":return"参与斗图次数最多的人";case"image":return"在斗图中发送图片最多的人";default:return""}});return H(()=>[a.sessionId,a.timeFilter],()=>c(),{immediate:!0,deep:!0}),(v,I)=>n.value?(o(),C(e(J),{key:0,text:"正在统计斗图数据..."})):t.value?(o(),C(e(O),{key:1,title:r.value,description:i.value},{headerRight:T(()=>[s("div",Qa,[u.showTopNSelect?(o(),C(e(se),{key:0,modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=p=>l.value=p)},null,8,["modelValue"])):L("",!0),w(e(ae),{modelValue:d.value,"onUpdate:modelValue":I[1]||(I[1]=p=>d.value=p),items:[{label:"按场次",value:"count"},{label:"按图量",value:"image"},{label:"史诗级战役",value:"battle"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[d.value==="battle"?(o(),k(U,{key:0},[t.value.topBattles.length>0?(o(),C(e(Fa),{key:0,battles:t.value.topBattles,title:"","top-n":l.value,bare:""},null,8,["battles","top-n"])):(o(),k("div",Za,"暂无史诗级战役数据"))],64)):(o(),k(U,{key:1},[b.value.length>0?(o(),C(e(me),{key:0,members:b.value,title:r.value,unit:f.value,"top-n":l.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),k("div",Ja,"暂无斗图数据"))],64))]),_:1},8,["title","description"])):L("",!0)}}),es={class:"space-y-6"},ts={class:"flex items-center gap-3"},as={class:"flex items-center gap-3"},ss={key:1,class:"px-3 py-2"},os=F({__name:"RepeatSection",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(u){const a=u,t=S(null),n=S(!1),d=S("originator"),l=S("fastest"),c=S(a.globalTopN??10),h=S(a.globalTopN??10);H(()=>a.globalTopN,$=>{$!==void 0&&(c.value=$,h.value=$)});async function g(){if(a.sessionId){n.value=!0;try{t.value=await K().getRepeatAnalysis(a.sessionId,a.timeFilter)}catch($){console.error("加载复读分析失败:",$)}finally{n.value=!1}}}const b=_(()=>t.value?t.value.originators.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),f=_(()=>t.value?t.value.initiators.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),r=_(()=>t.value?t.value.breakers.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),i=_(()=>{switch(d.value){case"originator":return b.value;case"initiator":return f.value;case"breaker":return r.value;default:return b.value}}),v=_(()=>{switch(d.value){case"originator":return"🔁 复读榜 - 被复读";case"initiator":return"🔁 复读榜 - 挑起";case"breaker":return"🔁 复读榜 - 打断";default:return"🔁 复读榜"}}),I=_(()=>{switch(d.value){case"originator":return"发出的消息被别人复读的次数";case"initiator":return"第二个发送相同消息、带起节奏的人";case"breaker":return"终结复读链的人";default:return""}}),p=_(()=>{if(!t.value)return{labels:[],values:[]};const $=t.value.chainLengthDistribution;return{labels:$.map(M=>`${M.length}人`),values:$.map(M=>M.count)}}),m=_(()=>l.value==="fastest"?"📊 复读统计 - 最快反应":"📊 复读统计 - 链长分布"),x=_(()=>{if(l.value==="fastest")return"平均复读反应时间(至少参与5次复读)";const $=t.value?.totalRepeatChains??0,M=t.value?.avgChainLength??0;return`共 ${$} 次复读,平均 ${M} 人参与`});return H(()=>[a.sessionId,a.timeFilter],()=>g(),{immediate:!0,deep:!0}),($,M)=>(o(),k("div",es,[n.value?(o(),C(e(J),{key:0,text:"正在分析复读数据..."})):t.value&&t.value.totalRepeatChains>0?(o(),k(U,{key:1},[w(e(O),{title:v.value,description:I.value},{headerRight:T(()=>[s("div",ts,[u.showTopNSelect?(o(),C(e(se),{key:0,modelValue:c.value,"onUpdate:modelValue":M[0]||(M[0]=A=>c.value=A)},null,8,["modelValue"])):L("",!0),w(e(ae),{modelValue:d.value,"onUpdate:modelValue":M[1]||(M[1]=A=>d.value=A),items:[{label:"被复读",value:"originator"},{label:"挑起",value:"initiator"},{label:"打断",value:"breaker"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[i.value.length>0?(o(),C(e(me),{key:0,members:i.value,title:v.value,unit:"次","top-n":c.value,bare:""},null,8,["members","title","top-n"])):(o(),C(e(te),{key:1,text:"暂无数据"}))]),_:1},8,["title","description"]),w(e(O),{title:m.value,description:x.value},{headerRight:T(()=>[s("div",as,[u.showTopNSelect&&l.value==="fastest"?(o(),C(e(se),{key:0,modelValue:h.value,"onUpdate:modelValue":M[2]||(M[2]=A=>h.value=A)},null,8,["modelValue"])):L("",!0),w(e(ae),{modelValue:l.value,"onUpdate:modelValue":M[3]||(M[3]=A=>l.value=A),items:[{label:"最快反应",value:"fastest"},{label:"链长分布",value:"distribution"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[l.value==="fastest"?(o(),k(U,{key:0},[t.value.fastestRepeaters&&t.value.fastestRepeaters.length>0?(o(),C(e(Ha),{key:0,items:t.value.fastestRepeaters,"top-n":h.value,title:"",bare:""},null,8,["items","top-n"])):(o(),C(e(te),{key:1,text:"暂无最快复读数据"}))],64)):(o(),k("div",ss,[p.value.labels.length>0?(o(),C(e(Vt),{key:0,data:p.value,height:200},null,8,["data"])):(o(),C(e(te),{key:1,text:"暂无分布数据"}))]))]),_:1},8,["title","description"])],64)):(o(),C(e(O),{key:2,title:"🔁 复读榜"},{default:T(()=>[w(e(te),{text:"该群组暂无复读记录"})]),_:1}))]))}}),ns=F({__name:"DivingRank",props:{sessionId:{},timeFilter:{},globalTopN:{}},setup(u){const a=u,t=S(null),n=S(!1);async function d(){if(a.sessionId){n.value=!0;try{t.value=await K().getDivingAnalysis(a.sessionId,a.timeFilter)}catch(l){console.error("加载潜水分析失败:",l)}finally{n.value=!1}}}return H(()=>[a.sessionId,a.timeFilter],()=>d(),{immediate:!0,deep:!0}),(l,c)=>n.value?(o(),C(e(J),{key:0,text:"正在统计潜水数据..."})):t.value&&t.value.rank.length>0?(o(),C(e(Oa),{key:1,items:t.value.rank,"global-top-n":u.globalTopN},null,8,["items","global-top-n"])):L("",!0)}}),ls={class:"space-y-6"},is={class:"flex items-center gap-3"},rs={key:1,class:"py-8 text-center text-sm text-gray-400"},us={key:1,class:"py-8 text-center text-sm text-gray-400"},cs={class:"flex items-center gap-3"},ds={key:1,class:"py-8 text-center text-sm text-gray-400"},ms=F({__name:"NightOwlRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(u){const a=u,t=S(null),n=S(!1),d=S("first"),l=S("distribution"),c=S(a.globalTopN??10),h=S(a.globalTopN??10);H(()=>a.globalTopN,m=>{m!==void 0&&(c.value=m,h.value=m)});async function g(){if(a.sessionId){n.value=!0;try{t.value=await K().getNightOwlAnalysis(a.sessionId,a.timeFilter)}catch(m){console.error("加载出勤分析失败:",m)}finally{n.value=!1}}}const b=_(()=>t.value?t.value.lastSpeakerRank.map(m=>({id:String(m.memberId),name:m.name,value:m.count,percentage:m.percentage})):[]),f=_(()=>t.value?t.value.firstSpeakerRank.map(m=>({id:String(m.memberId),name:m.name,value:m.count,percentage:m.percentage})):[]),r=_(()=>d.value==="last"?b.value:f.value),i=_(()=>d.value==="last"?"⏰ 出勤排行 - 最晚下班":"⏰ 出勤排行 - 最早上班"),v=_(()=>{const m=t.value?.totalDays??0;return d.value==="last"?`每天最后一个发言的人(共 ${m} 天)`:`每天第一个发言的人(共 ${m} 天)`}),I=_(()=>l.value==="distribution"?"🦉 修仙统计 - 发言分布":"🦉 修仙统计 - 连续记录"),p=_(()=>l.value==="distribution"?"深夜时段(23:00-05:00)各时段发言分布":"连续在深夜时段发言的天数");return H(()=>[a.sessionId,a.timeFilter],()=>g(),{immediate:!0,deep:!0}),(m,x)=>(o(),k("div",ls,[n.value?(o(),C(e(J),{key:0,text:"正在加载出勤分析..."})):t.value?(o(),k(U,{key:1},[w(e(O),{title:I.value,description:p.value},{headerRight:T(()=>[s("div",is,[u.showTopNSelect?(o(),C(e(se),{key:0,modelValue:c.value,"onUpdate:modelValue":x[0]||(x[0]=$=>c.value=$)},null,8,["modelValue"])):L("",!0),w(e(ae),{modelValue:l.value,"onUpdate:modelValue":x[1]||(x[1]=$=>l.value=$),items:[{label:"发言分布",value:"distribution"},{label:"连续记录",value:"consecutive"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[l.value==="distribution"?(o(),k(U,{key:0},[t.value.nightOwlRank.length>0?(o(),C(e(qa),{key:0,items:t.value.nightOwlRank,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(o(),k("div",rs,"暂无深夜发言数据"))],64)):(o(),k(U,{key:1},[t.value.consecutiveRecords.length>0?(o(),C(e(ja),{key:0,items:t.value.consecutiveRecords,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(o(),k("div",us,"暂无连续记录"))],64))]),_:1},8,["title","description"]),w(e(O),{title:i.value,description:v.value},{headerRight:T(()=>[s("div",cs,[u.showTopNSelect?(o(),C(e(se),{key:0,modelValue:h.value,"onUpdate:modelValue":x[2]||(x[2]=$=>h.value=$)},null,8,["modelValue"])):L("",!0),w(e(ae),{modelValue:d.value,"onUpdate:modelValue":x[3]||(x[3]=$=>d.value=$),items:[{label:"最早上班",value:"first"},{label:"最晚下班",value:"last"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[r.value.length>0?(o(),C(e(me),{key:0,members:r.value,title:i.value,"top-n":h.value,unit:"次",bare:""},null,8,["members","title","top-n"])):(o(),k("div",ds,"暂无数据"))]),_:1},8,["title","description"])],64)):L("",!0)]))}}),vs={class:"mb-8 mt-4"},ps={class:"text-5xl tracking-wider",style:{"font-weight":"800",background:"linear-gradient(to right, #f59e0b, #ec4899, #9333ea)","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}},hs={id:"activity-rank",class:"scroll-mt-24"},gs={id:"meme-battle",class:"scroll-mt-24"},fs={id:"repeat",class:"scroll-mt-24"},ys={id:"night-owl",class:"scroll-mt-24"},xs={id:"diving",class:"scroll-mt-24"},bs={class:"border-l border-gray-200 pl-4 dark:border-gray-800"},ks={class:"mt-4 border-l border-gray-200 pl-4 dark:border-gray-800"},_s={class:"flex rounded-lg border border-gray-200 bg-white p-0.5 text-xs dark:border-gray-700 dark:bg-page-dark"},ws=["onClick"],$s=F({__name:"RankingView",props:{sessionId:{},timeFilter:{}},setup(u){const a=u,t=S([]),n=S([]);async function d(){if(!a.sessionId)return;const p=K(),[m,x]=await Promise.all([p.getMemberActivity(a.sessionId,a.timeFilter),p.getAvailableYears(a.sessionId)]);t.value=m,n.value=x}H(()=>[a.sessionId,a.timeFilter],()=>d(),{immediate:!0,deep:!0});const l=_(()=>{if(a.timeFilter?.startTs&&a.timeFilter?.endTs){const p=new Date(a.timeFilter.startTs*1e3).getFullYear(),m=new Date(a.timeFilter.endTs*1e3).getFullYear();return p===m?`${p} 赛季`:`${p}-${m} 赛季`}if(n.value.length>0){const p=[...n.value].sort(($,M)=>$-M),m=p[0],x=p[p.length-1];return m===x?`${m} 赛季`:`${m}-${x} 赛季`}return"全部赛季"}),c=_(()=>({startTs:a.timeFilter?.startTs,endTs:a.timeFilter?.endTs})),h=[{id:"activity-rank",label:"🏆 活跃榜"},{id:"streak-rank",label:"🔥 火花榜"},{id:"meme-battle",label:"⚔️ 斗图榜"},{id:"repeat",label:"🔁 复读榜"},{id:"night-owl",label:"⏰ 出勤榜"},{id:"diving",label:"🤿 潜水榜"}],{contentRef:g,activeAnchor:b,scrollToAnchor:f}=Ht(h,{threshold:350}),r=S(10),i=S("standard");rt(ze,i);const v=[{value:"standard",label:"标准"},{value:"wide",label:"宽屏"},{value:"full",label:"全宽"}],I=_(()=>Fe[i.value].contentClass);return(p,m)=>(o(),k("div",{ref_key:"contentRef",ref:g,class:"flex gap-6 p-6"},[s("div",{class:j(["main-content min-w-0 flex-1 px-8 mx-auto space-y-6",I.value])},[s("div",vs,[s("h1",ps," 🏆 "+y(l.value),1),m[1]||(m[1]=s("p",{class:"mt-4 text-sm text-gray-500 dark:text-gray-400"},"各榜单前三名请找群主领取奖励 🎁",-1))]),s("div",hs,[w(e(Ra),{"session-id":a.sessionId,"member-activity":t.value,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","member-activity","time-filter","global-top-n"])]),w(e(Ka),{"session-id":a.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"]),s("div",gs,[w(e(Xa),{"session-id":a.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",fs,[w(e(os),{"session-id":a.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",ys,[w(e(ms),{"session-id":a.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",xs,[w(e(ns),{"session-id":a.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),m[2]||(m[2]=s("div",{class:"h-48 no-capture"},null,-1))],2),w(e(Et),{anchors:h,"active-anchor":e(b),onClick:e(f)},{default:T(()=>[s("div",bs,[m[3]||(m[3]=s("div",{class:"text-xs text-gray-400 mb-2"},"显示数量",-1)),w(e(se),{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=x=>r.value=x)},null,8,["modelValue"])]),s("div",ks,[m[4]||(m[4]=s("div",{class:"mb-2 text-xs text-gray-400"},"榜单宽度",-1)),s("div",_s,[(o(),k(U,null,Y(v,x=>s("button",{key:x.value,type:"button",class:j(["rounded-md px-2 py-1 transition",i.value===x.value?"bg-pink-500 text-white shadow-sm":"text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800"]),onClick:$=>i.value=x.value},y(x.label),11,ws)),64))])])]),_:1},8,["active-anchor","onClick"])],512))}}),Cs={class:"flex h-full flex-col"},Is={class:"flex items-center justify-end px-4 py-2"},Ss={class:"flex items-center gap-4"},Ts={class:"flex items-center gap-2"},Ms={class:"text-xs text-gray-400"},Vs={class:"flex items-center gap-2"},Rs={class:"text-xs text-gray-400"},Ls={class:"flex-1 min-h-0 relative"},Ds={key:0,class:"absolute inset-0 flex items-center justify-center"},Ns={key:0,class:"h-full"},As={class:"absolute bottom-2 left-1/2 -translate-x-1/2 rounded-full bg-gray-100/80 px-3 py-1 text-xs text-gray-500 backdrop-blur-sm dark:bg-gray-800/80 dark:text-gray-400"},zs={key:1,class:"flex h-full items-center justify-center text-gray-400"},Fs={class:"text-center"},Us={class:"mt-2 text-sm"},Hs=F({__name:"InteractionView",props:{sessionId:{},timeFilter:{}},setup(u){const a=u,{t}=Z(),n=S(!0),d=S({nodes:[],links:[],maxLinkValue:0}),l=S("circular"),c=S(!1),h=S(null);function g(){h.value?.resetView()}async function b(){if(a.sessionId){n.value=!0;try{const f=await K().getMentionGraph(a.sessionId,a.timeFilter);d.value={nodes:f.nodes,links:f.links,maxLinkValue:f.maxLinkValue}}catch(f){console.error("[chart-interaction] 加载互动关系图数据失败:",f)}finally{n.value=!1}}}return H(()=>[a.sessionId,a.timeFilter],()=>{b()},{immediate:!0,deep:!0}),(f,r)=>{const i=ne,v=Ve("UButtonGroup"),I=Je,p=Ie;return o(),k("div",Cs,[s("div",Is,[s("div",Ss,[s("div",Ts,[s("span",Ms,y(e(t)("views.interaction.layout"))+":",1),w(v,{size:"xs"},{default:T(()=>[w(i,{color:l.value==="circular"?"primary":"neutral",variant:l.value==="circular"?"solid":"ghost",onClick:r[0]||(r[0]=m=>l.value="circular")},{default:T(()=>[G(y(e(t)("views.interaction.circular")),1)]),_:1},8,["color","variant"]),w(i,{color:l.value==="force"?"primary":"neutral",variant:l.value==="force"?"solid":"ghost",onClick:r[1]||(r[1]=m=>l.value="force")},{default:T(()=>[G(y(e(t)("views.interaction.force")),1)]),_:1},8,["color","variant"])]),_:1})]),s("div",Vs,[s("span",Rs,y(e(t)("views.interaction.directed"))+":",1),w(I,{modelValue:c.value,"onUpdate:modelValue":r[2]||(r[2]=m=>c.value=m),size:"xs"},null,8,["modelValue"])]),w(i,{size:"xs",color:"neutral",variant:"ghost",icon:"i-heroicons-arrow-path",onClick:g},{default:T(()=>[G(y(e(t)("views.interaction.reset")),1)]),_:1})])]),s("div",Ls,[n.value?(o(),k("div",Ds,[w(p,{name:"i-heroicons-arrow-path",class:"h-8 w-8 animate-spin text-pink-500"})])):(o(),k(U,{key:1},[d.value.nodes.length>0?(o(),k("div",Ns,[w(e(jt),{ref_key:"graphRef",ref:h,data:d.value,layout:l.value,directed:c.value,height:"100%"},null,8,["data","layout","directed"]),s("div",As,y(e(t)("views.interaction.graphHint",{nodes:d.value.nodes.length,links:d.value.links.length})),1)])):(o(),k("div",zs,[s("div",Fs,[w(p,{name:"i-heroicons-user-group",class:"mx-auto h-10 w-10 text-gray-300 dark:text-gray-600"}),s("p",Us,y(e(t)("views.interaction.noInteraction")),1)])]))],64))])])}}}),Bs={class:"main-content mx-auto max-w-[920px] space-y-6 p-6"},Ws={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},Os={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},Es={class:"divide-y divide-gray-100 dark:divide-gray-800"},js={class:"flex flex-1 items-center gap-2"},Ps=["onClick"],qs={class:"flex items-center gap-1 text-pink-500"},Gs={class:"text-xs"},Ys=["onClick"],Ks={class:"shrink-0 text-right text-sm text-gray-500"},Qs={key:0,class:"text-red-500"},Zs={key:1},Js={class:"divide-y divide-gray-100 dark:divide-gray-800"},Xs={class:"flex flex-1 items-center gap-2"},eo=["onClick"],to={class:"flex items-center gap-1"},ao={class:"text-xs text-gray-400"},so={class:"text-xs text-gray-400"},oo=["onClick"],no={class:"shrink-0 text-right"},lo={class:"text-lg font-bold text-pink-600"},io={class:"ml-1 text-sm text-gray-500"},ro={key:0,class:"p-5"},uo={class:"mb-4 text-lg font-semibold text-gray-900 dark:text-white"},co={key:0,class:"mb-4"},mo={class:"mb-2 text-sm font-medium text-gray-700 dark:text-gray-300"},vo={class:"space-y-2"},po={class:"text-sm font-medium text-gray-900 dark:text-white"},ho={class:"text-xs text-gray-500"},go={key:1},fo={class:"mb-2 text-sm font-medium text-gray-700 dark:text-gray-300"},yo={class:"space-y-2"},xo={class:"text-sm font-medium text-gray-900 dark:text-white"},bo={class:"text-xs text-gray-500"},ko={class:"mt-4 flex justify-end"},_o=F({__name:"Relationships",props:{sessionId:{},timeFilter:{}},setup(u){const{t:a}=Z(),t=u,n=S(null),d=S(!1),l=S(null),c=S(!1);async function h(){if(t.sessionId){d.value=!0;try{n.value=await K().getMentionAnalysis(t.sessionId,t.timeFilter)}catch(r){console.error("加载 @ 互动分析失败:",r)}finally{d.value=!1}}}const g=_(()=>n.value?n.value.topMentioners.map(r=>({id:r.memberId.toString(),name:r.name,value:r.count,percentage:r.percentage})):[]),b=_(()=>n.value?n.value.topMentioned.map(r=>({id:r.memberId.toString(),name:r.name,value:r.count,percentage:r.percentage})):[]);function f(r){if(!n.value)return;const i=n.value.memberDetails.find(v=>v.memberId===r);i&&(l.value=i,c.value=!0)}return H(()=>[t.sessionId,t.timeFilter],()=>{h()},{immediate:!0,deep:!0}),(r,i)=>{const v=Se,I=ne,p=fe;return o(),k("div",Bs,[d.value?(o(),C(e(J),{key:0,text:e(a)("members.relationships.loading")},null,8,["text"])):n.value&&n.value.totalMentions>0?(o(),k(U,{key:1},[s("div",Ws,[g.value.length>0?(o(),C(e(we),{key:0,members:g.value,title:e(a)("members.relationships.topMentioners"),description:e(a)("members.relationships.totalMentions",{count:n.value.totalMentions}),unit:e(a)("members.relationships.times")},null,8,["members","title","description","unit"])):L("",!0),b.value.length>0?(o(),C(e(we),{key:1,members:b.value,title:e(a)("members.relationships.topMentioned"),description:e(a)("members.relationships.popularMember"),unit:e(a)("members.relationships.times")},null,8,["members","title","description","unit"])):L("",!0)]),s("div",Os,[n.value.oneWay.length>0?(o(),C(e(O),{key:0,class:"hidden",title:e(a)("members.relationships.oneWay.title"),description:e(a)("members.relationships.oneWay.description",{count:n.value.oneWay.length})},{default:T(()=>[s("div",Es,[(o(!0),k(U,null,Y(n.value.oneWay.slice(0,10),(m,x)=>(o(),k("div",{key:x,class:"flex items-center gap-4 px-5 py-3 transition-colors hover:bg-gray-50 dark:hover:bg-gray-800/50"},[s("span",{class:j(["flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",x===0?"bg-pink-100 text-pink-600 dark:bg-pink-900/30 dark:text-pink-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-500"])},y(x+1),3),s("div",js,[s("button",{class:"font-medium text-gray-900 hover:text-pink-600 dark:text-white dark:hover:text-pink-600",onClick:$=>f(m.fromMemberId)},y(m.fromName),9,Ps),s("div",qs,[i[2]||(i[2]=s("span",{class:"text-lg"},"→",-1)),s("span",Gs,y(m.fromToCount)+"次",1)]),s("button",{class:"font-medium text-gray-900 hover:text-pink-600 dark:text-white dark:hover:text-pink-600",onClick:$=>f(m.toMemberId)},y(m.toName),9,Ys)]),s("div",Ks,[m.toFromCount===0?(o(),k("span",Qs,y(e(a)("members.relationships.oneWay.neverRespond")),1)):(o(),k("span",Zs,y(e(a)("members.relationships.oneWay.reverse",{count:m.toFromCount})),1))]),w(v,{color:"pink",variant:"soft",size:"xs"},{default:T(()=>[G(y(e(a)("members.relationships.oneWay.ratio",{value:Math.round(m.ratio*100)})),1)]),_:2},1024)]))),128))])]),_:1},8,["title","description"])):L("",!0),n.value.twoWay.length>0?(o(),C(e(O),{key:1,title:e(a)("members.relationships.twoWay.title"),description:e(a)("members.relationships.twoWay.description",{count:n.value.twoWay.length})},{default:T(()=>[s("div",Js,[(o(!0),k(U,null,Y(n.value.twoWay.slice(0,10),(m,x)=>(o(),k("div",{key:x,class:"flex items-center gap-4 px-5 py-3 transition-colors hover:bg-gray-50 dark:hover:bg-gray-800/50"},[s("span",{class:j(["flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",x===0?"bg-linear-to-r from-pink-400 to-red-400 text-white":x===1?"bg-linear-to-r from-pink-300 to-red-300 text-white":x===2?"bg-linear-to-r from-pink-200 to-red-200 text-pink-700":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-500"])},y(x+1),3),s("div",Xs,[s("button",{class:"font-medium text-gray-900 hover:text-pink-600 dark:text-white dark:hover:text-pink-600",onClick:$=>f(m.member1Id)},y(m.member1Name),9,eo),s("div",to,[s("span",ao,y(m.member1To2),1),i[3]||(i[3]=s("span",{class:"text-lg text-pink-500"},"⇄",-1)),s("span",so,y(m.member2To1),1)]),s("button",{class:"font-medium text-gray-900 hover:text-pink-600 dark:text-white dark:hover:text-pink-600",onClick:$=>f(m.member2Id)},y(m.member2Name),9,oo)]),s("div",no,[s("span",lo,y(m.total),1),s("span",io,y(e(a)("members.relationships.twoWay.interactions")),1)]),w(v,{color:m.balance>=.7?"green":m.balance>=.5?"blue":"gray",variant:"soft",size:"xs"},{default:T(()=>[G(y(e(a)("members.relationships.twoWay.balance",{value:Math.round(m.balance*100)})),1)]),_:2},1032,["color"])]))),128))])]),_:1},8,["title","description"])):L("",!0)])],64)):d.value?L("",!0):(o(),C(e(O),{key:2,title:e(a)("members.relationships.emptyTitle")},{default:T(()=>[w(e(te),{text:e(a)("members.relationships.empty")},null,8,["text"])]),_:1},8,["title"])),w(p,{open:c.value,"onUpdate:open":i[1]||(i[1]=m=>c.value=m)},{content:T(()=>[l.value?(o(),k("div",ro,[s("h3",uo,y(e(a)("members.relationships.modal.title",{name:l.value.name})),1),l.value.topMentioned.length>0?(o(),k("div",co,[s("h4",mo,y(e(a)("members.relationships.modal.topMentioned")),1),s("div",vo,[(o(!0),k(U,null,Y(l.value.topMentioned,(m,x)=>(o(),k("div",{key:x,class:"flex items-center gap-3 rounded-lg bg-gray-50 px-3 py-2 dark:bg-gray-800"},[s("span",po,y(m.toName),1),s("span",ho,y(e(a)("members.relationships.modal.timesCount",{count:m.count})),1)]))),128))])])):L("",!0),l.value.topMentioners.length>0?(o(),k("div",go,[s("h4",fo,y(e(a)("members.relationships.modal.topMentioners")),1),s("div",yo,[(o(!0),k(U,null,Y(l.value.topMentioners,(m,x)=>(o(),k("div",{key:x,class:"flex items-center gap-3 rounded-lg bg-gray-50 px-3 py-2 dark:bg-gray-800"},[s("span",xo,y(m.fromName),1),s("span",bo,y(e(a)("members.relationships.modal.timesCount",{count:m.count})),1)]))),128))])])):L("",!0),s("div",ko,[w(I,{variant:"soft",onClick:i[0]||(i[0]=m=>c.value=!1)},{default:T(()=>[G(y(e(a)("members.relationships.modal.close")),1)]),_:1})])])):L("",!0)]),_:1},8,["open"])])}}}),wo={class:"mx-auto max-w-[920px] p-4 h-full"},$o={class:"flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-page-dark/50"},Co={class:"flex items-center gap-3"},Io={class:"flex items-center gap-3"},So={class:"p-3 w-64"},To={class:"text-sm font-medium mb-3"},Mo={class:"space-y-3"},Vo={class:"text-xs text-gray-500 mb-1 block"},Ro={class:"text-xs text-gray-400 mt-1"},Lo={class:"text-xs text-gray-500 mb-1 block"},Do={class:"text-xs text-gray-400 mt-1"},No={class:"flex-1 min-h-0 overflow-hidden"},Ao={key:0,class:"h-full flex items-center justify-center"},zo={key:1,class:"h-full flex items-center justify-center"},Fo={class:"text-center text-gray-400"},Uo={key:2,class:"h-full"},Ho={key:3,class:"h-full flex overflow-hidden"},Bo={class:"w-64 border-r border-gray-200 dark:border-gray-700 flex flex-col overflow-hidden"},Wo={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Oo={class:"text-sm font-medium flex items-center gap-2"},Eo={class:"flex-1 overflow-y-auto"},jo=["onClick"],Po={class:"flex items-center justify-between"},qo={class:"text-sm truncate"},Go={class:"text-xs text-gray-400"},Yo={class:"flex-1 overflow-hidden flex flex-col"},Ko={key:0,class:"flex-1 flex items-center justify-center"},Qo={class:"text-center text-gray-400"},Zo={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center gap-3"},Jo={class:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold bg-primary-500"},Xo={class:"font-medium"},en={class:"text-xs text-gray-400"},tn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},an={class:"text-sm font-medium flex items-center gap-2"},sn={class:"flex-1 overflow-y-auto"},on={key:0,class:"p-4 text-center text-gray-400"},nn={class:"flex items-center gap-3"},ln={class:"flex-1 min-w-0"},rn={class:"text-sm font-medium truncate"},un={class:"flex items-center gap-3 mt-0.5 text-xs text-gray-400"},cn={class:"w-20 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},dn={key:4,class:"h-full flex flex-col overflow-hidden"},mn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},vn={class:"text-sm font-medium flex items-center gap-2"},pn={class:"flex-1 overflow-y-auto"},hn={class:"flex items-center gap-3"},gn={class:"flex-1 min-w-0"},fn={class:"flex items-center gap-2 text-sm"},yn={class:"font-medium truncate"},xn={class:"font-medium truncate"},bn={class:"flex items-center gap-3 mt-1 text-xs text-gray-400"},kn={class:"w-24 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},_n={key:0,class:"px-4 py-2 border-t border-gray-200 dark:border-gray-700 text-xs text-gray-400 flex items-center gap-4 bg-gray-50 dark:bg-page-dark/50"},wn=F({__name:"ClusterView",props:{sessionId:{},timeFilter:{}},setup(u){Le([At,De,zt,Ft,Ne]);const a=u,{t}=Z(),n=Pe(),d=_(()=>n.value==="dark"),l=S(!0),c=S(null),h=S("matrix"),g=S(null),b=S({lookAhead:3,decaySeconds:120,topEdges:150}),f=S(null);let r=null;async function i(){if(a.sessionId){l.value=!0;try{c.value=await K().getClusterGraph(a.sessionId,a.timeFilter,{lookAhead:b.value.lookAhead,decaySeconds:b.value.decaySeconds,topEdges:b.value.topEdges})}catch(N){console.error("[chart-cluster] 加载小团体关系数据失败:",N),c.value=null}finally{l.value=!1}}}const v=_(()=>{if(!c.value||c.value.nodes.length===0)return null;const{nodes:N,links:D,maxLinkValue:B}=c.value,P=[...N].sort((V,E)=>E.messageCount-V.messageCount).slice(0,20).map(V=>V.name),X=new Map;for(const V of D)X.set(`${V.source}-${V.target}`,V.value),X.set(`${V.target}-${V.source}`,V.value);const q=[];for(let V=0;V<P.length;V++)for(let E=0;E<P.length;E++)if(V===E)q.push([V,E,-1]);else{const ce=X.get(`${P[V]}-${P[E]}`)||0;q.push([V,E,ce])}return{names:P,data:q,maxValue:B}});function I(){if(!v.value)return{graphic:{type:"text",style:{text:t("views.cluster.noData"),fill:"#999"}}};const{names:N,data:D,maxValue:B}=v.value;return{tooltip:{position:"top",formatter:ee=>{const[P,X,q]=ee.data;return q<0?`${N[P]}`:q===0?`${N[P]} ↔ ${N[X]}<br/>暂无关系数据`:`${N[P]} ↔ ${N[X]}<br/>临近度: ${q.toFixed(2)}`}},grid:{left:120,right:40,top:40,bottom:120},xAxis:{type:"category",data:N,splitArea:{show:!0},axisLabel:{rotate:45,fontSize:10,color:d.value?"#ccc":"#333"}},yAxis:{type:"category",data:N,splitArea:{show:!0},axisLabel:{fontSize:10,color:d.value?"#ccc":"#333"}},visualMap:{min:0,max:B||1,calculable:!0,orient:"horizontal",left:"center",bottom:10,inRange:{color:d.value?["#1a1a2e","#16213e","#0f3460","#e94560"]:["#f7f7f7","#fce4ec","#f8bbd9","#ee4567"]},textStyle:{color:d.value?"#ccc":"#333"}},series:[{type:"heatmap",data:D.filter(ee=>ee[2]>=0),label:{show:!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],backgroundColor:"transparent"}}const p=_(()=>c.value?[...c.value.nodes].sort((N,D)=>D.messageCount-N.messageCount):[]),m=_(()=>!c.value||g.value===null?null:c.value.nodes.find(N=>N.id===g.value)||null),x=_(()=>{if(!c.value||!m.value)return[];const N=m.value.name,D=[];for(const B of c.value.links)B.source===N?D.push({otherName:B.target,value:B.value,coOccurrenceCount:B.coOccurrenceCount}):B.target===N&&D.push({otherName:B.source,value:B.value,coOccurrenceCount:B.coOccurrenceCount});return D.sort((B,ee)=>ee.value-B.value),D}),$=_(()=>c.value?c.value.links.slice(0,50):[]);function M(){r&&h.value==="matrix"&&r.setOption(I(),{notMerge:!0})}function A(){f.value&&(r=Ae(f.value,d.value?"dark":void 0),M())}function z(){r?.resize()}return H(h,async(N,D)=>{D==="matrix"&&r&&(r.dispose(),r=null),N==="matrix"&&(await ve(),A())}),H([c,()=>d.value],()=>{h.value==="matrix"&&M()},{deep:!0}),H(l,async(N,D)=>{D&&!N&&h.value==="matrix"&&(r&&(r.dispose(),r=null),await ve(),A())}),H(()=>[a.sessionId,a.timeFilter],()=>i(),{immediate:!0,deep:!0}),de(()=>{window.addEventListener("resize",z),h.value==="matrix"&&ve(()=>A())}),ye(()=>{window.removeEventListener("resize",z),r?.dispose(),r=null}),(N,D)=>{const B=ne,ee=Ve("UButtonGroup"),P=et,X=Xe,q=Ie;return o(),k("div",wo,[w(e(Ut),{class:"flex h-full flex-col"},{default:T(()=>[s("div",$o,[s("div",Co,[w(ee,{size:"xs"},{default:T(()=>[w(B,{color:h.value==="matrix"?"primary":"neutral",variant:h.value==="matrix"?"solid":"ghost",onClick:D[0]||(D[0]=V=>h.value="matrix")},{default:T(()=>[G(y(e(t)("views.cluster.matrixView")),1)]),_:1},8,["color","variant"]),w(B,{color:h.value==="member"?"primary":"neutral",variant:h.value==="member"?"solid":"ghost",onClick:D[1]||(D[1]=V=>h.value="member")},{default:T(()=>[G(y(e(t)("views.cluster.memberView")),1)]),_:1},8,["color","variant"]),w(B,{color:h.value==="circle"?"primary":"neutral",variant:h.value==="circle"?"solid":"ghost",onClick:D[2]||(D[2]=V=>h.value="circle")},{default:T(()=>[G(y(e(t)("views.cluster.rankingView")),1)]),_:1},8,["color","variant"])]),_:1})]),s("div",Io,[w(X,null,{content:T(()=>[s("div",So,[s("h4",To,y(e(t)("views.cluster.modelSettings")),1),s("div",Mo,[s("div",null,[s("label",Vo,y(e(t)("views.cluster.lookAhead")),1),w(P,{modelValue:b.value.lookAhead,"onUpdate:modelValue":D[3]||(D[3]=V=>b.value.lookAhead=V),modelModifiers:{number:!0},type:"number",min:1,max:10,size:"xs",placeholder:"1-10"},null,8,["modelValue"]),s("p",Ro,y(e(t)("views.cluster.lookAheadDesc")),1)]),s("div",null,[s("label",Lo,y(e(t)("views.cluster.decaySeconds")),1),w(P,{modelValue:b.value.decaySeconds,"onUpdate:modelValue":D[4]||(D[4]=V=>b.value.decaySeconds=V),modelModifiers:{number:!0},type:"number",min:30,max:3600,size:"xs",placeholder:"30-3600"},null,8,["modelValue"]),s("p",Do,y(e(t)("views.cluster.decaySecondsDesc")),1)]),w(B,{size:"xs",color:"primary",class:"w-full mt-2",onClick:i},{default:T(()=>[G(y(e(t)("views.cluster.applySettings")),1)]),_:1})])])]),default:T(()=>[w(B,{variant:"ghost",size:"xs",icon:"i-heroicons-adjustments-horizontal"})]),_:1}),w(B,{variant:"ghost",size:"xs",icon:"i-heroicons-arrow-path",onClick:i})])]),s("div",No,[l.value?(o(),k("div",Ao,[w(q,{name:"i-heroicons-arrow-path",class:"w-6 h-6 animate-spin text-gray-400"})])):!c.value||c.value.nodes.length===0?(o(),k("div",zo,[s("div",Fo,[w(q,{name:"i-heroicons-user-group",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),s("p",null,y(e(t)("views.cluster.noData")),1)])])):h.value==="matrix"?(o(),k("div",Uo,[s("div",{ref_key:"chartRef",ref:f,class:"w-full h-full"},null,512)])):h.value==="member"?(o(),k("div",Ho,[s("div",Bo,[s("div",Wo,[s("h3",Oo,[w(q,{name:"i-heroicons-users",class:"w-4 h-4"}),G(" "+y(e(t)("views.cluster.selectMember")),1)])]),s("div",Eo,[(o(!0),k(U,null,Y(p.value,V=>(o(),k("div",{key:V.id,class:j(["px-4 py-2 cursor-pointer border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",{"bg-primary-50 dark:bg-primary-900/30":g.value===V.id}]),onClick:E=>g.value=V.id},[s("div",Po,[s("span",qo,y(V.name),1),s("span",Go,y(V.messageCount),1)])],10,jo))),128))])]),s("div",Yo,[m.value?(o(),k(U,{key:1},[s("div",Zo,[s("div",Jo,y(m.value.name.charAt(0)),1),s("div",null,[s("div",Xo,y(m.value.name),1),s("div",en,y(e(t)("views.cluster.msgCount"))+": "+y(m.value.messageCount)+" | "+y(e(t)("views.cluster.relationCount"))+": "+y(x.value.length),1)])]),s("div",tn,[s("h3",an,[w(q,{name:"i-heroicons-heart",class:"w-4 h-4 text-pink-500"}),G(" "+y(e(t)("views.cluster.relationsByIntimacy")),1)])]),s("div",sn,[x.value.length===0?(o(),k("div",on,y(e(t)("views.cluster.noRelations")),1)):L("",!0),(o(!0),k(U,null,Y(x.value,(V,E)=>(o(),k("div",{key:V.otherName,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[s("div",nn,[s("span",{class:j(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold",E<3?"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"])},y(E+1),3),s("div",ln,[s("div",rn,y(V.otherName),1),s("div",un,[s("span",null,y(e(t)("views.cluster.intimacy"))+": "+y((V.value*100).toFixed(0))+"%",1),s("span",null,y(e(t)("views.cluster.coOccurrence"))+": "+y(V.coOccurrenceCount)+y(e(t)("views.cluster.times")),1)])]),s("div",cn,[s("div",{class:"h-full bg-linear-to-r from-pink-400 to-pink-600",style:ue({width:`${x.value[0]?.value?V.value/x.value[0].value*100:0}%`})},null,4)])])]))),128))])],64)):(o(),k("div",Ko,[s("div",Qo,[w(q,{name:"i-heroicons-cursor-arrow-rays",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),s("p",null,y(e(t)("views.cluster.selectMemberHint")),1)])]))])])):(o(),k("div",dn,[s("div",mn,[s("h3",vn,[w(q,{name:"i-heroicons-trophy",class:"w-4 h-4 text-yellow-500"}),G(" "+y(e(t)("views.cluster.interactionRanking")),1)])]),s("div",pn,[(o(!0),k(U,null,Y($.value,(V,E)=>(o(),k("div",{key:E,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[s("div",hn,[s("span",{class:j(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold",E<3?"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"])},y(E+1),3),s("div",gn,[s("div",fn,[s("span",yn,y(V.source),1),D[5]||(D[5]=s("span",{class:"text-gray-400"},"↔",-1)),s("span",xn,y(V.target),1)]),s("div",bn,[s("span",null,y(e(t)("views.cluster.score"))+": "+y(V.value.toFixed(2)),1),s("span",null,y(e(t)("views.cluster.coOccurrence"))+": "+y(V.coOccurrenceCount)+y(e(t)("views.cluster.times")),1)])]),s("div",kn,[s("div",{class:"h-full bg-linear-to-r from-yellow-400 to-orange-500",style:ue({width:`${$.value[0]?.value?V.value/$.value[0].value*100:0}%`})},null,4)])])]))),128))])]))]),c.value?(o(),k("div",_n,[s("span",null,y(e(t)("views.cluster.totalMembers"))+": "+y(c.value.stats.totalMembers),1),s("span",null,y(e(t)("views.cluster.totalMessages"))+": "+y(c.value.stats.totalMessages.toLocaleString()),1),s("span",null,y(e(t)("views.cluster.involvedMembers"))+": "+y(c.value.stats.involvedMembers),1),s("span",null,y(e(t)("views.cluster.edgeCount"))+": "+y(c.value.stats.edgeCount),1)])):L("",!0)]),_:1})])}}}),$n={class:"flex h-full flex-col"},Cn={class:"min-h-0 flex-1 overflow-y-auto"},In=F({__name:"GroupRelationships",props:{sessionId:{},timeFilter:{}},setup(u){const{t:a}=Z(),t=u,n=S("mention-graph"),d=_(()=>[{id:"mention-graph",label:a("analysis.subTabs.groupRelationships.mentionGraph"),icon:"i-heroicons-arrows-right-left"},{id:"mention-ranking",label:a("analysis.subTabs.groupRelationships.mentionRanking"),icon:"i-heroicons-heart"},{id:"proximity",label:a("analysis.subTabs.groupRelationships.proximity"),icon:"i-heroicons-user-group"}]);return(l,c)=>(o(),k("div",$n,[w(e(Ce),{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=h=>n.value=h),items:d.value,"persist-key":"groupRelationshipsTab"},null,8,["modelValue","items"]),s("div",Cn,[w(xe,{name:"fade",mode:"out-in"},{default:T(()=>[n.value==="mention-graph"?(o(),C(Hs,{key:0,"session-id":t.sessionId,"time-filter":t.timeFilter},null,8,["session-id","time-filter"])):n.value==="mention-ranking"?(o(),C(_o,{key:1,"session-id":t.sessionId,"time-filter":t.timeFilter},null,8,["session-id","time-filter"])):n.value==="proximity"?(o(),C(wn,{key:2,"session-id":t.sessionId,"time-filter":t.timeFilter},null,8,["session-id","time-filter"])):L("",!0)]),_:1})])]))}}),Sn=ge(In,[["__scopeId","data-v-a5aec593"]]),Tn={class:"flex h-full flex-col"},Mn={class:"flex-1 min-h-0 overflow-y-auto"},Vn=F({__name:"ViewTab",props:{sessionId:{},sessionName:{},timeFilter:{}},setup(u){const{t:a,locale:t}=Z(),n=u,d=_(()=>{const g=[{id:"type-analysis",label:a("analysis.subTabs.view.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:a("analysis.subTabs.view.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:a("analysis.subTabs.view.topic"),icon:"i-heroicons-cloud"},{id:"group-relationships",label:a("analysis.subTabs.view.groupRelationships"),icon:"i-heroicons-heart"},{id:"hot-repeat",label:a("analysis.subTabs.quotes.hotRepeat"),icon:"i-heroicons-fire"},{id:"catchphrase",label:a("analysis.subTabs.quotes.catchphrase"),icon:"i-heroicons-chat-bubble-bottom-center-text"}];return qe("groupRanking",t.value)&&g.splice(2,0,{id:"ranking",label:a("analysis.subTabs.view.ranking"),icon:"i-heroicons-trophy"}),g}),l=S("type-analysis"),c=S(null),h=_(()=>({...n.timeFilter,memberId:c.value}));return(g,b)=>(o(),k("div",Tn,[w(e(Ce),{modelValue:l.value,"onUpdate:modelValue":b[1]||(b[1]=f=>l.value=f),items:d.value,"persist-key":"groupViewTab"},{right:T(()=>[l.value!=="topic"?(o(),C(ht,{key:0,modelValue:c.value,"onUpdate:modelValue":b[0]||(b[0]=f=>c.value=f),"session-id":n.sessionId},null,8,["modelValue","session-id"])):L("",!0)]),_:1},8,["modelValue","items"]),s("div",Mn,[w(xe,{name:"fade",mode:"out-in"},{default:T(()=>[l.value==="type-analysis"?(o(),C(gt,{key:0,"session-id":n.sessionId,"session-name":n.sessionName,"time-filter":h.value},null,8,["session-id","session-name","time-filter"])):l.value==="time-analysis"?(o(),C(ft,{key:1,"session-id":n.sessionId,"session-name":n.sessionName,"time-filter":h.value},null,8,["session-id","session-name","time-filter"])):l.value==="topic"?(o(),C(e(yt),{key:2,"session-id":n.sessionId,"time-filter":n.timeFilter},null,8,["session-id","time-filter"])):l.value==="group-relationships"?(o(),C(Sn,{key:3,"session-id":n.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):l.value==="ranking"?(o(),C($s,{key:4,"session-id":n.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):l.value==="hot-repeat"?(o(),C(e(wa),{key:5,"session-id":n.sessionId,"time-filter":n.timeFilter},null,8,["session-id","time-filter"])):l.value==="catchphrase"?(o(),C(e(ha),{key:6,"session-id":n.sessionId,"time-filter":n.timeFilter},null,8,["session-id","time-filter"])):L("",!0)]),_:1})])]))}}),Rn=ge(Vn,[["__scopeId","data-v-5787d95d"]]),Ln={class:"main-content max-w-5xl p-6"},Dn={class:"mb-4 text-sm text-gray-500 dark:text-gray-400 no-capture"},Nn={key:0,class:"divide-y divide-gray-100 dark:divide-gray-800"},An={class:"w-32 shrink-0 pt-0.5 font-medium text-gray-900 dark:text-white"},zn={class:"flex flex-1 flex-wrap items-center gap-2"},Fn={class:"flex items-center gap-1.5 rounded-lg bg-gray-50 px-3 py-1.5 dark:bg-gray-800"},Un={class:"text-xs text-gray-400"},Hn={key:0,class:"text-gray-300 dark:text-gray-600"},Bn=F({__name:"NicknameHistory",props:{sessionId:{}},setup(u){const{t:a}=Z(),t=u,n=S([]),d=S([]),l=S(!1);function c(b){return b.groupNickname||b.accountName||b.platformId}async function h(){if(t.sessionId)try{n.value=await K().getMembers(t.sessionId)}catch(b){console.error("加载成员列表失败:",b)}}async function g(){if(!t.sessionId||n.value.length===0)return;l.value=!0;const b=[];try{const f=n.value.map(i=>K().getMemberNameHistory(t.sessionId,i.id)),r=await Promise.all(f);n.value.forEach((i,v)=>{const I=r[v];I.length>2&&b.push({memberId:i.id,name:c(i),history:I})}),d.value=b}catch(f){console.error("加载昵称变更记录失败:",f)}finally{l.value=!1}}return H(()=>t.sessionId,async()=>{await h()},{immediate:!0}),H(()=>n.value.length,()=>{n.value.length>0&&g()}),de(async()=>{n.value.length===0&&await h()}),(b,f)=>{const r=Se;return o(),k("div",Ln,[s("p",Dn,y(e(a)("members.nicknameHistory.note")),1),w(e(O),{title:e(a)("members.nicknameHistory.title"),description:l.value?e(a)("members.nicknameHistory.loading"):d.value.length>0?e(a)("members.nicknameHistory.hasChanges",{count:d.value.length}):e(a)("members.nicknameHistory.noChanges")},{default:T(()=>[!l.value&&d.value.length>0?(o(),k("div",Nn,[(o(!0),k(U,null,Y(d.value,i=>(o(),k("div",{key:i.memberId,class:"flex items-start gap-3 px-5 py-3"},[s("div",An,y(i.name),1),s("div",zn,[(o(!0),k(U,null,Y(i.history,(v,I)=>(o(),k(U,{key:I},[s("div",Fn,[s("span",{class:j(["text-sm",v.endTs===null?"font-semibold text-pink-600":"text-gray-700 dark:text-gray-300"])},y(v.name),3),v.endTs===null?(o(),C(r,{key:0,color:"primary",variant:"soft",size:"xs"},{default:T(()=>[G(y(e(a)("members.nicknameHistory.current")),1)]),_:1})):L("",!0),s("span",Un,"("+y(e(Lt)(v.startTs,v.endTs))+")",1)]),I<i.history.length-1?(o(),k("span",Hn,"→")):L("",!0)],64))),128))])]))),128))])):l.value?(o(),C(e(J),{key:2,text:e(a)("members.nicknameHistory.loadingText")},null,8,["text"])):(o(),C(e(te),{key:1,text:e(a)("members.nicknameHistory.empty")},null,8,["text"]))]),_:1},8,["title","description"])])}}}),Wn={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},On={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},En={class:"text-lg font-semibold text-gray-900 dark:text-white"},jn={class:"flex-1 overflow-auto"},Pn=F({__name:"NicknameHistoryEntry",props:{sessionId:{}},setup(u){const{t:a}=Z(),t=u,n=S(!1);return(d,l)=>{const c=ne,h=fe;return o(),k(U,null,[w(c,{variant:"ghost",icon:"i-heroicons-clock",size:"sm",onClick:l[0]||(l[0]=g=>n.value=!0)},{default:T(()=>[G(y(e(a)("analysis.subTabs.member.nicknameHistory")),1)]),_:1}),t.sessionId?(o(),C(h,{key:0,open:n.value,"onUpdate:open":l[2]||(l[2]=g=>n.value=g),ui:{content:"max-w-6xl h-[85vh]"}},{content:T(()=>[s("div",Wn,[s("div",On,[s("h2",En,y(e(a)("analysis.subTabs.member.nicknameHistory")),1),w(c,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:l[1]||(l[1]=g=>n.value=!1)})]),s("div",jn,[w(Bn,{"session-id":t.sessionId},null,8,["session-id"])])])]),_:1},8,["open"])):L("",!0)],64)}}}),qn={class:"flex h-full flex-col dark:bg-page-dark",style:{"padding-top":"var(--titlebar-area-height)"}},Gn={class:"relative flex-1 overflow-y-auto"},Yn={class:"h-full"},Kn={key:2,class:"flex h-full items-center justify-center"},Qn={class:"text-gray-500"},Zn={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},Jn={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},Xn={class:"text-lg font-semibold text-gray-900 dark:text-white"},el={class:"text-sm text-gray-500 dark:text-gray-400"},tl={class:"flex items-center gap-2"},al={class:"flex-1 overflow-hidden"},sl=F({__name:"index",setup(u){const a=Me(()=>$e(()=>import("./MessageExportModal-D9C5t_zF.js"),__vite__mapDeps([5,6,4,7,8,9]))),{t}=Z(),n=tt(),d=at(),l=Ge(),c=he(),h=Ye(),{currentSessionId:g}=Ke(l),b=S(!1),f=S(!1),r=S(!1),i=S(!1),v=S(!1);function I(){c.openChatRecordDrawer({})}const p=[{id:"overview",labelKey:"analysis.tabs.overview",icon:"i-heroicons-chart-pie"},{id:"view",labelKey:"analysis.tabs.view",icon:"i-heroicons-presentation-chart-bar"},{id:"ai-chat",labelKey:"analysis.tabs.aiChat",icon:"i-heroicons-chat-bubble-left-ellipsis"},{id:"lab",labelKey:"analysis.tabs.lab",icon:"i-heroicons-beaker"}],m=_(()=>h.debugMode?[...p,{id:"debug",labelKey:"analysis.tabs.debug",icon:"i-heroicons-bug-ant"}]:p),x=_(()=>m.value.map(oe=>oe.id)),{activeTab:$,isLoading:M,isInitialLoad:A,session:z,memberActivity:N,hourlyActivity:D,dailyActivity:B,messageTypes:ee,timeRangeValue:P,fullTimeRange:X,availableYears:q,timeFilter:V,initialTimeState:E,loadData:ce}=xt({route:n,router:d,currentSessionId:g,selectSession:l.selectSession,defaultTab:h.defaultSessionTab,validTabIds:x.value}),Ue=_(()=>N.value.slice(0,3)),He=_(()=>N.value.length<=1?[]:[...N.value].sort((oe,R)=>oe.messageCount-R.messageCount).slice(0,1)),Be=_(()=>N.value.reduce((oe,R)=>oe+R.messageCount,0)),We=_(()=>N.value.filter(oe=>oe.messageCount>0).length);return(oe,R)=>{const Oe=ne,Ee=fe;return o(),k("div",qn,[e(A)?(o(),C(J,{key:0,variant:"page",text:e(t)("analysis.groupChat.loading")},null,8,["text"])):e(z)?(o(),k(U,{key:1},[w(bt,{"active-tab":e($),"onUpdate:activeTab":R[0]||(R[0]=W=>be($)?$.value=W:null),"time-range-value":e(P),"onUpdate:timeRangeValue":R[1]||(R[1]=W=>be(P)?P.value=W:null),title:e(z).name,avatar:e(z).groupAvatar,icon:"i-heroicons-chat-bubble-left-right","icon-class":"bg-primary-600 text-white dark:bg-primary-500 dark:text-white",tabs:m.value,"current-session-id":e(g),"initial-time-state":e(E),onOpenIncrementalImport:R[2]||(R[2]=W=>r.value=!0),onOpenMemberManagement:R[3]||(R[3]=W=>v.value=!0),onOpenChatRecord:I,"onUpdate:fullRange":R[4]||(R[4]=W=>X.value=W),"onUpdate:availableYears":R[5]||(R[5]=W=>q.value=W)},null,8,["active-tab","time-range-value","title","avatar","tabs","current-session-id","initial-time-state"]),s("div",Gn,[e(M)?(o(),C(J,{key:0,variant:"overlay"})):L("",!0),s("div",Yn,[w(xe,{name:"tab-slide",mode:"out-in"},{default:T(()=>[e($)==="overview"?(o(),C(Ta,{key:"overview-"+e(g),session:e(z),"member-activity":e(N),"top-members":Ue.value,"bottom-members":He.value,"message-types":e(ee),"hourly-activity":e(D),"daily-activity":e(B),"time-range":e(X),"filtered-message-count":Be.value,"filtered-member-count":We.value,"time-filter":e(V)},null,8,["session","member-activity","top-members","bottom-members","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):e($)==="view"?(o(),C(Rn,{key:"view-"+e(g),"session-id":e(g),"session-name":e(z).name,"time-filter":e(V)},null,8,["session-id","session-name","time-filter"])):e($)==="ai-chat"?(o(),C(e($t),{key:"ai-chat-"+e(g),"session-id":e(g),"session-name":e(z).name,"chat-type":"group"},null,8,["session-id","session-name"])):e($)==="memory"?(o(),C(Ct,{key:"memory-"+e(g),"session-id":e(g),"session-name":e(z).name},null,8,["session-id","session-name"])):e($)==="lab"?(o(),C(It,{key:"lab-"+e(g),"session-id":e(g),"session-name":e(z).name,"time-filter":e(V),"chat-type":"group",mode:"sql-only"},null,8,["session-id","session-name","time-filter"])):e($)==="debug"?(o(),C(e(St),{key:"debug-"+e(g),"session-id":e(g)},null,8,["session-id"])):L("",!0)]),_:1})])]),w(kt,{onOpenIncrementalImport:R[6]||(R[6]=W=>r.value=!0),onOpenSemanticIndex:R[7]||(R[7]=W=>b.value=!0),onOpenMemberManagement:R[8]||(R[8]=W=>v.value=!0),onOpenChatRecord:I,onOpenMessageExport:R[9]||(R[9]=W=>i.value=!0)})],64)):(o(),k("div",Kn,[s("p",Qn,y(e(t)("analysis.groupChat.loadError")),1)])),e(g)&&e(z)?(o(),C(_t,{key:3,modelValue:b.value,"onUpdate:modelValue":R[10]||(R[10]=W=>b.value=W),"session-id":e(g),"message-count":e(z).messageCount},null,8,["modelValue","session-id","message-count"])):L("",!0),e(g)&&e(z)?(o(),C(Qe,{key:4,modelValue:f.value,"onUpdate:modelValue":R[11]||(R[11]=W=>f.value=W),"session-id":e(g),"chat-type":"group","auto-check":""},null,8,["modelValue","session-id"])):L("",!0),e(g)&&e(z)?(o(),C(wt,{key:5,modelValue:r.value,"onUpdate:modelValue":R[12]||(R[12]=W=>r.value=W),"session-id":e(g),"session-name":e(z).name,onImported:R[13]||(R[13]=()=>{e(ce)(),e(l).loadSessions()})},null,8,["modelValue","session-id","session-name"])):L("",!0),e(g)?(o(),C(e(a),{key:6,modelValue:i.value,"onUpdate:modelValue":R[14]||(R[14]=W=>i.value=W)},null,8,["modelValue"])):L("",!0),e(g)?(o(),C(Ee,{key:7,open:v.value,"onUpdate:open":R[16]||(R[16]=W=>v.value=W),ui:{content:"max-w-6xl h-[85vh]"}},{content:T(()=>[s("div",Zn,[s("div",Jn,[s("div",null,[s("h2",Xn,y(e(t)("analysis.tooltip.memberManagement")),1),s("p",el,y(e(t)("members.list.description",{count:e(z)?.memberCount??0})),1)]),s("div",tl,[w(Pn,{"session-id":e(g)},null,8,["session-id"]),w(Oe,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:R[15]||(R[15]=W=>v.value=!1)})])]),s("div",al,[w(Tt,{"session-id":e(g),"show-header":!1,"chat-type":"group",onDataChanged:e(ce)},null,8,["session-id","onDataChanged"])])])]),_:1},8,["open"])):L("",!0)])}}}),xl=ge(sl,[["__scopeId","data-v-4c212831"]]);export{xl as default};