chatlab-cli 0.37.0 → 0.37.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chat-command-WBAJBKIE.mjs → chat-command-G2EX7VHR.mjs} +24 -12
- package/dist/chat-command-G2EX7VHR.mjs.map +1 -0
- package/dist/{chunk-N2WGG3MS.mjs → chunk-E6LCCPIB.mjs} +6 -3
- package/dist/chunk-E6LCCPIB.mjs.map +1 -0
- package/dist/{chunk-EJBBVLUN.mjs → chunk-EFX66A2O.mjs} +2 -2
- package/dist/{chunk-DKIYHA3O.mjs → chunk-EK5QIJLZ.mjs} +20 -23
- package/dist/chunk-EK5QIJLZ.mjs.map +1 -0
- package/dist/{chunk-5YOHLJFB.mjs → chunk-F4HVCFZL.mjs} +48 -7
- package/dist/chunk-F4HVCFZL.mjs.map +1 -0
- package/dist/{chunk-SQWN4GTQ.mjs → chunk-FCUUAGGC.mjs} +2 -2
- package/dist/{chunk-DQR2YS3I.mjs → chunk-H46CLFWK.mjs} +8 -6
- package/dist/{chunk-DQR2YS3I.mjs.map → chunk-H46CLFWK.mjs.map} +1 -1
- package/dist/{chunk-4J4MA3RC.mjs → chunk-HBAQPF6X.mjs} +2180 -1941
- package/dist/chunk-HBAQPF6X.mjs.map +1 -0
- package/dist/{chunk-RXMSZIYD.mjs → chunk-HMVM7VCA.mjs} +3 -3
- package/dist/{chunk-FM3GXNEO.mjs → chunk-L6RJIVLS.mjs} +2 -2
- package/dist/{chunk-MSMDLDPB.mjs → chunk-T5H56AZV.mjs} +16 -8
- package/dist/chunk-T5H56AZV.mjs.map +1 -0
- package/dist/{chunk-2TV7M4CC.mjs → chunk-XQ6Z2KNN.mjs} +2 -2
- package/dist/{chunk-CR2MU7LN.mjs → chunk-YI3EQYEG.mjs} +12 -12
- package/dist/cli.mjs +9 -9
- package/dist/contacts-worker.mjs +2 -2
- package/dist/global-insight-worker.mjs +1 -1
- package/dist/{http-X6OEOOSH.mjs → http-5BRVWAJR.mjs} +12 -12
- package/dist/{import-WBJ6YIQ7.mjs → import-IAECQDKC.mjs} +7 -7
- package/dist/index.mjs +12 -12
- package/dist/{mcp-FR6OKWKL.mjs → mcp-XXSQJBGU.mjs} +8 -8
- package/dist/people-relationships-worker.mjs +2 -2
- package/dist/semantic-index-worker.mjs +1 -1
- package/dist/{src-WE5HNN2O.mjs → src-4HLKMQ7S.mjs} +6 -6
- package/dist/{stream-import-YYQVZDGQ.mjs → stream-import-PUG42I36.mjs} +7 -7
- package/dist/{worker-runtime-YGB5ZDE4.mjs → worker-runtime-X5563TVT.mjs} +5 -5
- package/dist-cli-web/assets/{AISettingsTab-Co2sM1iY.js → AISettingsTab-m_r2fFEj.js} +1 -1
- package/dist-cli-web/assets/{AboutTab-DQ8r6mYE.js → AboutTab-J65UqIuk.js} +1 -1
- package/dist-cli-web/assets/{Alert-DU1tLAAg.js → Alert-qBIGn_CW.js} +1 -1
- package/dist-cli-web/assets/{ApiSettingsTab-D5g5b79L.js → ApiSettingsTab-CxWRJI9j.js} +1 -1
- package/dist-cli-web/assets/{BatchManageTab-BFUyVaGU.js → BatchManageTab-BINNVwm1.js} +1 -1
- package/dist-cli-web/assets/{BufferResource-C-RfYwQW.js → BufferResource-C-jLPrHv.js} +1 -1
- package/dist-cli-web/assets/{CanvasRenderer-Dz7JAMrR.js → CanvasRenderer-kDLW8GSt.js} +1 -1
- package/dist-cli-web/assets/{CardDecoration-D28DI1G9.js → CardDecoration-CnYxleQM.js} +1 -1
- package/dist-cli-web/assets/{ChatRecordDrawer-Cph819yY.js → ChatRecordDrawer-CMg3FEWH.js} +1 -1
- package/dist-cli-web/assets/{ChatRecordWorkspace-BAfERdPc.js → ChatRecordWorkspace-AfFIMUbZ.js} +1 -1
- package/dist-cli-web/assets/{Checkbox-B8uqt13j.js → Checkbox-D-hAv15R.js} +1 -1
- package/dist-cli-web/assets/{DataDirCleanupNotice-3sGBE5vU.js → DataDirCleanupNotice-P80h2p4l.js} +1 -1
- package/dist-cli-web/assets/{DatePicker.vue_vue_type_script_setup_true_lang-CQuub8-f.js → DatePicker.vue_vue_type_script_setup_true_lang-CSp691Uv.js} +1 -1
- package/dist-cli-web/assets/{DebugToolsPanel-Cwkr0BOY.js → DebugToolsPanel-BK2VbKB0.js} +1 -1
- package/dist-cli-web/assets/{EChart.vue_vue_type_script_setup_true_lang-BuLujQCF.js → EChart.vue_vue_type_script_setup_true_lang-BcE0mE_N.js} +1 -1
- package/dist-cli-web/assets/{EChartBar.vue_vue_type_script_setup_true_lang-DuA5xbcC.js → EChartBar.vue_vue_type_script_setup_true_lang-BypaV5wc.js} +1 -1
- package/dist-cli-web/assets/{EChartLine.vue_vue_type_script_setup_true_lang-CvmMEfYq.js → EChartLine.vue_vue_type_script_setup_true_lang-D8SyOfWC.js} +1 -1
- package/dist-cli-web/assets/{EChartWordcloud-CHVtyPR7.js → EChartWordcloud-0rihhg03.js} +1 -1
- package/dist-cli-web/assets/{FileDropZone.vue_vue_type_script_setup_true_lang-BKPy9Qv-.js → FileDropZone.vue_vue_type_script_setup_true_lang-Dyuzh7Ex.js} +1 -1
- package/dist-cli-web/assets/{Filter-CMfRHIoK.js → Filter-rD_jWpbO.js} +1 -1
- package/dist-cli-web/assets/{GlobalTaskBar-Jz6MASCu.js → GlobalTaskBar-sXQuGvF-.js} +1 -1
- package/dist-cli-web/assets/{GroupRelationshipGalaxyView-Ch4obfEq.js → GroupRelationshipGalaxyView-BN1L9DFf.js} +1 -1
- package/dist-cli-web/assets/{Label-CuryuymO.js → Label-Ce4wl_Ph.js} +1 -1
- package/dist-cli-web/assets/{LoadingState.vue_vue_type_script_setup_true_lang-CoeQsaiL.js → LoadingState.vue_vue_type_script_setup_true_lang-DmVfwvnD.js} +1 -1
- package/dist-cli-web/assets/{MessageExportModal-JqGZ-iLr.js → MessageExportModal-C2IUNPhg.js} +1 -1
- package/dist-cli-web/assets/{PageHeader-D4up77TB.js → PageHeader-D5BcYKBs.js} +1 -1
- package/dist-cli-web/assets/{PageTabs.vue_vue_type_script_setup_true_lang-DYQRFk9s.js → PageTabs.vue_vue_type_script_setup_true_lang-DHly2-fe.js} +1 -1
- package/dist-cli-web/assets/{RelationshipGalaxyCanvas-Cn7Eta5U.js → RelationshipGalaxyCanvas-CHPqtqQz.js} +3 -3
- package/dist-cli-web/assets/{RelationshipGalaxyThreeCanvas-LlaX57z6.js → RelationshipGalaxyThreeCanvas-qR4S-9n7.js} +1 -1
- package/dist-cli-web/assets/{RenderTargetSystem-JhA2PUFi.js → RenderTargetSystem-BaIFulUj.js} +1 -1
- package/dist-cli-web/assets/{RovingFocusItem-DHaiTb4j.js → RovingFocusItem-Bqgmzo42.js} +1 -1
- package/dist-cli-web/assets/{ScreenCaptureModal-Bxhyt5g1.js → ScreenCaptureModal-sJqB_hrK.js} +1 -1
- package/dist-cli-web/assets/SectionTabs.vue_vue_type_script_setup_true_lang-BPt98e6z.js +1 -0
- package/dist-cli-web/assets/{Select-Beeqv0wU.js → Select-BAnN4HMs.js} +1 -1
- package/dist-cli-web/assets/SettingsModal-C4ANMlJJ.js +2 -0
- package/dist-cli-web/assets/{StorageTab-B7GHadia.js → StorageTab-BgNQliz4.js} +1 -1
- package/dist-cli-web/assets/{Switch-u4zlvUMa.js → Switch-DddEvDJa.js} +1 -1
- package/dist-cli-web/assets/{Tabs-B7-Koq3x.js → Tabs-DwjL-ueH.js} +1 -1
- package/dist-cli-web/assets/{Tabs-RWKHwtfM.js → Tabs-xVtuBuO0.js} +1 -1
- package/dist-cli-web/assets/{ThemeCard.vue_vue_type_script_setup_true_lang-ndsa3-aT.js → ThemeCard.vue_vue_type_script_setup_true_lang-CNCVa86b.js} +1 -1
- package/dist-cli-web/assets/{TimeSelect.vue_vue_type_script_setup_true_lang-DKa1flT-.js → TimeSelect.vue_vue_type_script_setup_true_lang-BehUIWki.js} +1 -1
- package/dist-cli-web/assets/{VisuallyHiddenInput-DGDqcvUy.js → VisuallyHiddenInput-ST6JNfSG.js} +1 -1
- package/dist-cli-web/assets/{WebGLRenderer-ifvgA1fe.js → WebGLRenderer-DRraqD4Y.js} +1 -1
- package/dist-cli-web/assets/{WebGPURenderer-DwzmuWF0.js → WebGPURenderer-CnzaYARg.js} +1 -1
- package/dist-cli-web/assets/aiChat-CeJy-gG-.js +8 -0
- package/dist-cli-web/assets/{base-BWDX-164.js → base-BHbtUviQ.js} +1 -1
- package/dist-cli-web/assets/{browserAll-CSIIETeE.js → browserAll-DYxkitnx.js} +1 -1
- package/dist-cli-web/assets/{chatMessages--r0obAVw.css → chatMessages-BGRbSlvD.css} +1 -1
- package/dist-cli-web/assets/{chatMessages-Zywjea1n.js → chatMessages-Dj1u-tFB.js} +20 -20
- package/dist-cli-web/assets/{cli-web-BRY49NWe.js → cli-web-BtH8nfjA.js} +1 -1
- package/dist-cli-web/assets/{fetch-DNSDHSqQ.js → fetch-BJ82mWvv.js} +1 -1
- package/dist-cli-web/assets/{fetch-D3nLtFBi.js → fetch-C1Tm66i9.js} +1 -1
- package/dist-cli-web/assets/{fetch-jx1VdM9j.js → fetch-CAEyoWQA.js} +1 -1
- package/dist-cli-web/assets/{fetch-qBaUXqFt.js → fetch-CGnWNSsG.js} +1 -1
- package/dist-cli-web/assets/{fetch-mYSeL4Ki.js → fetch-D7hfFyoG.js} +1 -1
- package/dist-cli-web/assets/{fetch-BiXab0IF.js → fetch-DNmRaRxX.js} +1 -1
- package/dist-cli-web/assets/{fetch-wzv71PYy.js → fetch-DogRrvT6.js} +1 -1
- package/dist-cli-web/assets/fetch-JEEBqR_7.js +1 -0
- package/dist-cli-web/assets/{fetch-r6mhEGrP.js → fetch-T5Gi1TUZ.js} +1 -1
- package/dist-cli-web/assets/{fetch-DeHqF6yL.js → fetch-U9QyidNZ.js} +1 -1
- package/dist-cli-web/assets/{fetch-Co2vLmiE.js → fetch-ejEMWPM2.js} +1 -1
- package/dist-cli-web/assets/{fetch-Bf4cqeM3.js → fetch-emZXHmoE.js} +1 -1
- package/dist-cli-web/assets/{host-1emQf9_4.js → host-BUvwCvZR.js} +1 -1
- package/dist-cli-web/assets/{host-jXJHyyOX.js → host-VTWF81F5.js} +1 -1
- package/dist-cli-web/assets/{index-CYc_VLgK.js → index-B3MCGDwx.js} +1 -1
- package/dist-cli-web/assets/index-BI2Rb_L3.js +2 -0
- package/dist-cli-web/assets/{index-BOcFyPCa.js → index-BLYSew5C.js} +1 -1
- package/dist-cli-web/assets/index-Bs7gk1gf.css +1 -0
- package/dist-cli-web/assets/{index-BgelKQTW.css → index-C75W1B5J.css} +1 -1
- package/dist-cli-web/assets/{index-DOqbUvhA.js → index-CVRBBnQw.js} +1 -1
- package/dist-cli-web/assets/index-Cza8BzZE.js +137 -0
- package/dist-cli-web/assets/{index-DnpnIyle.js → index-D9C3dyV8.js} +33 -33
- package/dist-cli-web/assets/{index-LV9LfFNu.js → index-DDt7Tfda.js} +1 -1
- package/dist-cli-web/assets/{index-B4mJkX_d.js → index-DQFcmWSa.js} +1 -1
- package/dist-cli-web/assets/{index-slDUxib2.js → index-DUBl6aBF.js} +1 -1
- package/dist-cli-web/assets/{index-B7biznha.js → index-DZK9Njvy.js} +1 -1
- package/dist-cli-web/assets/{index-Cw0IhKZ6.js → index-HjrJ3DXO.js} +1 -1
- package/dist-cli-web/assets/index-KpnLSzzX.js +64 -0
- package/dist-cli-web/assets/{index-BQ463TS7.js → index-e6fOnhNS.js} +1 -1
- package/dist-cli-web/assets/{index-ClHMs0-a.js → index-iEQnKg2R.js} +2 -2
- package/dist-cli-web/assets/{people-page-header-Cx5r9Bk2.js → people-page-header-DWXwFJ8M.js} +1 -1
- package/dist-cli-web/assets/{prompt-BggEDxxi.js → prompt-Cepfb-5-.js} +1 -1
- package/dist-cli-web/assets/{semantic-index-config-builder-1sO0aEc1.js → semantic-index-config-builder-hTY6QyCe.js} +1 -1
- package/dist-cli-web/assets/service-BjE0YJaM.js +1 -0
- package/dist-cli-web/assets/service-DQxttlJp.js +1 -0
- package/dist-cli-web/assets/{service-Bvq1fRkC.js → service-DwCmXFtI.js} +1 -1
- package/dist-cli-web/assets/useFormControl-CJyJY8AK.js +1 -0
- package/dist-cli-web/assets/useInsightTabAnalytics-CplGbsbe.js +75 -0
- package/dist-cli-web/assets/{ActionToolsPanel-CmYpw8Mt.css → useInsightTabAnalytics-DDNXXH8v.css} +1 -1
- package/dist-cli-web/assets/{useTable-DC7oxmBl.js → useTable-Dmpbk7fZ.js} +1 -1
- package/dist-cli-web/assets/{useToast-CCPBE-Sy.js → useToast-Bmgpd3sl.js} +1 -1
- package/dist-cli-web/assets/{webworkerAll-FCJk6reG.js → webworkerAll-DkPWEyVL.js} +1 -1
- package/dist-cli-web/index.html +1 -1
- package/package.json +3 -3
- package/dist/chat-command-WBAJBKIE.mjs.map +0 -1
- package/dist/chunk-4J4MA3RC.mjs.map +0 -1
- package/dist/chunk-5YOHLJFB.mjs.map +0 -1
- package/dist/chunk-DKIYHA3O.mjs.map +0 -1
- package/dist/chunk-MSMDLDPB.mjs.map +0 -1
- package/dist/chunk-N2WGG3MS.mjs.map +0 -1
- package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang--RPlmfIu.js +0 -75
- package/dist-cli-web/assets/SectionTabs.vue_vue_type_script_setup_true_lang-BlAje3Tf.js +0 -1
- package/dist-cli-web/assets/SettingsModal-DV8yDBJs.js +0 -2
- package/dist-cli-web/assets/aiChat-BY4C3UQe.js +0 -8
- package/dist-cli-web/assets/fetch-C8CcoTWY.js +0 -1
- package/dist-cli-web/assets/index-2dJCozDq.js +0 -64
- package/dist-cli-web/assets/index-6ejRbH3h.js +0 -2
- package/dist-cli-web/assets/index-CIIyg_o9.css +0 -1
- package/dist-cli-web/assets/index-kePiJ3ca.js +0 -137
- package/dist-cli-web/assets/service-DkPheDt8.js +0 -1
- package/dist-cli-web/assets/service-DvI8O_7K.js +0 -1
- package/dist-cli-web/assets/useFormControl-B0aShtLp.js +0 -1
- /package/dist/{chunk-EJBBVLUN.mjs.map → chunk-EFX66A2O.mjs.map} +0 -0
- /package/dist/{chunk-SQWN4GTQ.mjs.map → chunk-FCUUAGGC.mjs.map} +0 -0
- /package/dist/{chunk-RXMSZIYD.mjs.map → chunk-HMVM7VCA.mjs.map} +0 -0
- /package/dist/{chunk-FM3GXNEO.mjs.map → chunk-L6RJIVLS.mjs.map} +0 -0
- /package/dist/{chunk-2TV7M4CC.mjs.map → chunk-XQ6Z2KNN.mjs.map} +0 -0
- /package/dist/{chunk-CR2MU7LN.mjs.map → chunk-YI3EQYEG.mjs.map} +0 -0
- /package/dist/{http-X6OEOOSH.mjs.map → http-5BRVWAJR.mjs.map} +0 -0
- /package/dist/{import-WBJ6YIQ7.mjs.map → import-IAECQDKC.mjs.map} +0 -0
- /package/dist/{mcp-FR6OKWKL.mjs.map → mcp-XXSQJBGU.mjs.map} +0 -0
- /package/dist/{src-WE5HNN2O.mjs.map → src-4HLKMQ7S.mjs.map} +0 -0
- /package/dist/{stream-import-YYQVZDGQ.mjs.map → stream-import-PUG42I36.mjs.map} +0 -0
- /package/dist/{worker-runtime-YGB5ZDE4.mjs.map → worker-runtime-X5563TVT.mjs.map} +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GroupRelationshipGalaxyView-BN1L9DFf.js","assets/index-D9C3dyV8.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-BZpR015e.css","assets/LoadingState.vue_vue_type_script_setup_true_lang-DmVfwvnD.js","assets/RelationshipGalaxyThreeCanvas-qR4S-9n7.js","assets/relationship-galaxy-connections-Cg4G5yYE.js","assets/relationship-galaxy-viewport-Cwfa51ER.js","assets/RelationshipGalaxyThreeCanvas-CCasBcBQ.css","assets/MessageExportModal-C2IUNPhg.js","assets/useToast-Bmgpd3sl.js","assets/Tabs-DwjL-ueH.js","assets/Tabs-xVtuBuO0.js","assets/RovingFocusItem-Bqgmzo42.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{b as I,x as Oe,y as at,d as q,o as l,c as $,n as K,a as s,F as E,j as X,p as f,r as ne,a0 as kt,f as k,O as ke,e as y,c0 as wt,E as st,g as t,w as T,z as x,a6 as ee,aN as Se,l as D,aa as Me,a8 as Te,a9 as Z,a7 as Ce,J as je,K as P,L as J,bs as ot,bt as nt,cE as _t,aq as lt,aQ as Ye,aR as Xe,cF as $t,a1 as Tt,H as Ke,I as Ct,C as Be,bO as It,aE as it,G as St,cG as Rt,ah as rt,aD as Mt,ay as Lt,ap as At,ab as Vt,aA as Nt,be as Qe}from"./index-D9C3dyV8.js";import{b as O,a as le,c as Dt,d as Ft,u as qt,e as ut,I as Bt,f as Ut,g as Ht,h as Et,i as Pt,j as zt,k as Ot,C as jt,l as Kt,M as Wt,m as Gt,n as Yt,o as Xt,p as Qt}from"./useInsightTabAnalytics-CplGbsbe.js";import{_ as ct}from"./SectionTabs.vue_vue_type_script_setup_true_lang-BPt98e6z.js";import"./vendor-echarts-wordcloud-DNiU8Psq.js";import{g as Zt}from"./base-BHbtUviQ.js";import{i as Ze}from"./chatMessages-Dj1u-tFB.js";import{_ as pe,L as dt,u as Jt}from"./LoadingState.vue_vue_type_script_setup_true_lang-DmVfwvnD.js";import{_ as ea}from"./index-HjrJ3DXO.js";import{f as ze,a as ta,b as aa}from"./TimeSelect.vue_vue_type_script_setup_true_lang-BehUIWki.js";import{_ as sa}from"./Switch-DddEvDJa.js";import{a as mt}from"./Tabs-xVtuBuO0.js";import{u as oa}from"./prompt-Cepfb-5-.js";import{_ as na}from"./Select-BAnN4HMs.js";import{_ as ae}from"./EChart.vue_vue_type_script_setup_true_lang-BcE0mE_N.js";import{T as ie}from"./Tabs-DwjL-ueH.js";import{_ as la}from"./EChartBar.vue_vue_type_script_setup_true_lang-BypaV5wc.js";import{_ as ia}from"./ThemeCard.vue_vue_type_script_setup_true_lang-CNCVa86b.js";import{u as ra,o as ua,q as ca,t as da,v as ma,j as va,i as pa}from"./vendor-echarts-C9ugTmum.js";import{_ as ga}from"./useTable-Dmpbk7fZ.js";import"./vendor-snapdom--nZvo8Sg.js";import"./Checkbox-D-hAv15R.js";import"./useFormControl-CJyJY8AK.js";import"./VisuallyHiddenInput-ST6JNfSG.js";import"./RovingFocusItem-Bqgmzo42.js";import"./Label-Ce4wl_Ph.js";import"./useToast-Bmgpd3sl.js";import"./service-DwCmXFtI.js";import"./aiChat-CeJy-gG-.js";import"./chatlabSiteLocale-CrCNb8QP.js";import"./ChatRecordWorkspace-AfFIMUbZ.js";import"./DatePicker.vue_vue_type_script_setup_true_lang-CSp691Uv.js";import"./clamp-jFYhBC76.js";import"./semantic-index-config-builder-hTY6QyCe.js";import"./CardDecoration-CnYxleQM.js";import"./EChartLine.vue_vue_type_script_setup_true_lang-D8SyOfWC.js";import"./PageHeader-D5BcYKBs.js";import"./PageTabs.vue_vue_type_script_setup_true_lang-DHly2-fe.js";import"./Alert-qBIGn_CW.js";import"./FileDropZone.vue_vue_type_script_setup_true_lang-Dyuzh7Ex.js";import"./vendor-zrender-D8psf1AA.js";function ha(o,e={}){const{threshold:a=300,containerSelector:n=".overflow-y-auto",scrollLockDuration:i=800}=e,u=I(o[0]?.id||"");let c=!1;const g=I(null);let v=null;function h(){if(c)return;const m=[];o.forEach(d=>{const w=document.getElementById(d.id);if(w){const S=w.getBoundingClientRect();m.push({id:d.id,top:Math.round(S.top)})}});let r=0;for(let d=0;d<m.length;d++){if(m[d].top>a){r=Math.max(0,d-1);break}r=d}u.value=o[r]?.id||""}function b(m){const r=document.getElementById(m);r&&(u.value=m,c=!0,r.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{c=!1,h()},i))}return Oe(()=>{v=g.value?.closest(n)||null,v&&(v.addEventListener("scroll",h,{passive:!0}),h())}),at(()=>{v&&v.removeEventListener("scroll",h)}),{contentRef:g,activeAnchor:u,scrollToAnchor:b,updateActiveAnchor:h}}function we(o){return o===0?"text-amber-500 dark:text-amber-400":o===1?"text-gray-500 dark:text-gray-300":o===2?"text-orange-600 dark:text-orange-400":"text-gray-400 dark:text-gray-500"}function _e(o){return String(o+1).padStart(2,"0")}function fa(o){return o===0?"from-amber-400 to-orange-500":o===1?"from-gray-300 to-gray-400":o===2?"from-orange-400 to-amber-600":"from-primary-300 to-primary-500"}const ya={class:"sticky top-24 space-y-6"},ba={class:"border-l border-gray-200 dark:border-gray-800"},xa=["onClick"],ka=q({__name:"PageAnchorsNav",props:{anchors:{},activeAnchor:{},width:{default:"w-44"},hideOnMobile:{type:Boolean,default:!0}},emits:["click"],setup(o,{emit:e}){const a=e;function n(i){a("click",i)}return(i,u)=>(l(),$("div",{class:K([o.width,"shrink-0",o.hideOnMobile?"hidden lg:block":""])},[s("div",ya,[s("nav",null,[s("div",ba,[(l(!0),$(E,null,X(o.anchors,c=>(l(),$("button",{key:c.id,class:K(["-ml-px block border-l-2 py-1.5 pl-4 text-left text-sm transition-colors",[o.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:g=>n(c.id)},f(c.label),11,xa))),128))])]),ne(i.$slots,"default")])],2))}}),re=q({__name:"TopNSelect",props:{modelValue:{default:10},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=kt(o,"modelValue"),a=[{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,i)=>{const u=na;return l(),k(u,{modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=c=>e.value=c),items:a,"value-key":"value",class:"w-25"},null,8,["modelValue"])}}}),ge=q({__name:"ScrollableChart",props:{contentHeight:{},maxHeightVh:{default:60},paddingClass:{default:"px-3 py-2"}},setup(o){const e=o,a=y(()=>typeof window>"u"?500:Math.round(window.innerHeight*e.maxHeightVh/100)),n=y(()=>e.contentHeight>a.value),i=y(()=>({maxHeight:`${e.maxHeightVh}vh`,overflowY:n.value?"auto":"hidden"}));return(u,c)=>(l(),$("div",{class:K(o.paddingClass),style:ke(i.value)},[ne(u.$slots,"default")],6))}}),vt=Symbol("ranking-avatar-map"),wa=new Map,_a={byId:wa,byName:new Map},$a=36,Ue=new Map,He=new Set,Je=new Set,et=I(0);function Ta(o){const e=new Map;for(const a of o){const n=a.avatar?.trim();e.set(a.id,n||null)}return e}function Ca(o){const e=o?.trim();return e||null}function xe(o,e,a){const n=e?.trim();!n||o.get(n)||(a?o.set(n,a):o.has(n)||o.set(n,null))}function Ia(o){const e=new Map;for(const a of o){const n=Ca(a.avatar);xe(e,a.groupNickname,n),xe(e,a.accountName,n),xe(e,a.platformId,n),xe(e,a.groupNickname||a.accountName||a.platformId,n);for(const i of a.aliases??[])xe(e,i,n)}return e}function Sa(o){return{byId:Ta(o),byName:Ia(o)}}function de(o,e,a,n){const i=e?.trim();if(i)return i;if(o!=null&&o!==""){const g=typeof o=="number"?o:Number(o);if(Number.isFinite(g)){const v=a.get(g);if(v)return v}}const u=n?.name?.trim();if(u&&n?.byName)return n.byName.get(u)??null;if(o==null||o==="")return null;const c=typeof o=="number"?o:Number(o);return Number.isFinite(c)?a.get(c)??null:null}function $e(o){const e=o.trim();return e?e.slice(0,1):"?"}function pt(){const o=st(vt,null);return y(()=>o?.value??_a)}function We(){const o=pt();return y(()=>o.value.byId)}function Ra(o,e){return o?e.get(o)??null:null}function Ma(o,e=$a){return typeof Image>"u"||typeof document>"u"?Promise.resolve(null):new Promise(a=>{const n=new Image;/^https?:/i.test(o)&&(n.crossOrigin="anonymous"),n.onload=()=>{try{const i=document.createElement("canvas");i.width=e,i.height=e;const u=i.getContext("2d");if(!u){a(null);return}u.beginPath(),u.arc(e/2,e/2,e/2,0,Math.PI*2),u.closePath(),u.clip();const c=n.naturalWidth||n.width,g=n.naturalHeight||n.height;if(c<=0||g<=0){a(null);return}const v=Math.max(e/c,e/g),h=c*v,b=g*v;u.drawImage(n,(e-h)/2,(e-b)/2,h,b),a(i.toDataURL("image/png"))}catch{a(null)}},n.onerror=()=>a(null),n.src=o})}function he(o){const e=We();return wt(()=>{const a=e.value;for(const n of o()){const i=de(n.memberId??n.id,n.avatar,a);!i||Ue.has(i)||Je.has(i)||He.has(i)||(He.add(i),Ma(i).then(u=>{He.delete(i),u?Ue.set(i,u):Je.add(i),et.value+=1}))}}),y(()=>{et.value;const a=e.value,n=new Map;for(const i of o()){const u=i.memberId??i.id,c=typeof u=="number"?u:Number(u);if(!Number.isFinite(c))continue;const g=de(u,i.avatar,a);n.set(c,Ra(g,Ue))}return n})}const Ee=28,ce=18,Pe="#4b5563",gt=Symbol("ranking-width-mode"),ht={standard:{contentClass:"max-w-3xl",gridLeft:110+Ee,labelMaxLength:8},wide:{contentClass:"max-w-5xl",gridLeft:180+Ee,labelMaxLength:16},full:{contentClass:"max-w-none",gridLeft:260+Ee,labelMaxLength:28}};function La(o){return o===1?"🥇":o===2?"🥈":o===3?"🥉":`${o}.`}function fe(){const o=st(gt,null);return y(()=>ht[o?.value??"standard"])}function Aa(o,e){return o.length<=e?o:`${o.slice(0,e)}…`}function Va(o){return o?{width:ce,height:ce,borderRadius:ce/2,backgroundColor:{image:o},align:"center",verticalAlign:"middle"}:{width:ce,height:ce,borderRadius:ce/2,backgroundColor:"#fce7f3",color:"#db2777",fontSize:10,fontWeight:600,align:"center",verticalAlign:"middle",lineHeight:ce}}function ye(o,e){const a=o.map(i=>Aa(i.name,e.labelMaxLength)),n={rank:{fontSize:12,color:Pe,padding:[0,4,0,4]},name:{fontSize:12,color:Pe}};return o.forEach((i,u)=>{const c=de(i.memberId??i.id,void 0,e.avatars);n[`av${u}`]=Va(c)}),{data:a,axisLabel:{fontSize:12,color:Pe,margin:8,formatter:(i,u)=>{const c=o[u];if(!c)return"";const g=e.totalCount-u,h=de(c.memberId??c.id,void 0,e.avatars)?"":$e(c.name);return`{av${u}|${h}}{rank|${La(g)}}{name|${a[u]??""}}`},rich:n}}}const Na={class:"px-3 py-2"},Le=q({__name:"EChartRank",props:{members:{},title:{},description:{},topN:{default:10},unit:{default:"条"},height:{default:"auto"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(o){const e=o,a=fe(),n=y(()=>e.members.slice(0,e.topN)),i=he(()=>n.value),u=y(()=>{if(e.height!=="auto")return e.height;const v=n.value.length*36;return Math.max(v+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},g=y(()=>{const v=[...n.value].reverse(),h=ye(v,{totalCount:n.value.length,labelMaxLength:a.value.labelMaxLength,avatars:i.value}),b=v.map(d=>d.value),m=Math.max(...b,1),r=v.map(d=>({value:d.value,itemStyle:{color:c,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:d=>{const w=d[0];if(!w)return"";const S=n.value.length-1-w.dataIndex,p=n.value[S];return`
|
|
3
|
+
<div style="padding: 4px 8px;">
|
|
4
|
+
<div style="font-weight: bold; margin-bottom: 4px;">${p.name}</div>
|
|
5
|
+
<div>${p.value} ${e.unit} (${p.percentage}%)</div>
|
|
6
|
+
</div>
|
|
7
|
+
`}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:m*1.1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:h.data,axisLine:{show:!1},axisTick:{show:!1},axisLabel:h.axisLabel},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:d=>{const w=n.value.length-1-d.dataIndex;return`${n.value[w].value} ${e.unit}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(v,h)=>o.bare?(l(),k(t(ge),{key:0,"content-height":u.value,"max-height-vh":o.maxHeightVh},{default:T(()=>[x(ae,{option:g.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(l(),k(t(O),{key:1,title:o.title,description:o.description,scrollable:"","max-height-vh":o.maxHeightVh},{default:T(()=>[s("div",Na,[x(ae,{option:g.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Da={class:"min-w-0 flex-1"},Fa={class:"flex items-baseline justify-between gap-3"},qa=["title"],Ba={class:"flex shrink-0 items-baseline gap-1.5 whitespace-nowrap"},Ua={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},Ha={class:"text-xs text-gray-500 dark:text-gray-400"},Ea={class:"mt-2 flex items-center gap-2.5"},Pa={class:"h-1.5 flex-1 overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},za={class:"w-10 shrink-0 text-right font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},tt=q({__name:"RankList",props:{members:{},showAvatar:{type:Boolean,default:!1},rankLimit:{default:0},unit:{}},setup(o){const{t:e}=ee(),a=o,n=y(()=>a.unit||e("views.charts.rankList.unit")),i=We(),u=y(()=>a.rankLimit>0?a.members.slice(0,a.rankLimit):a.members);function c(v){return de(v.id,v.avatar,i.value)}function g(v){if(u.value.length===0)return 0;const h=u.value[0].value;return h===0?0:Math.round(u.value[v].value/h*100)}return(v,h)=>(l(),$("div",null,[(l(!0),$(E,null,X(u.value,(b,m)=>(l(),$("div",{key:b.id,class:"flex items-start gap-3 px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[s("span",{class:K(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",t(we)(m)])},f(t(_e)(m)),3),o.showAvatar?(l(),k(Se,{key:0,src:c(b),alt:b.name,text:t($e)(b.name),"root-class":"h-10 w-10 shrink-0","image-class":"h-10 w-10 rounded-full object-cover","fallback-class":"flex h-10 w-10 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"},null,8,["src","alt","text"])):D("",!0),s("div",Da,[s("div",Fa,[s("p",{class:"truncate text-sm font-medium text-gray-900 dark:text-white",title:b.name},f(b.name),9,qa),s("div",Ba,[s("span",Ua,f(b.value),1),s("span",Ha,f(n.value),1)])]),s("div",Ea,[s("div",Pa,[s("div",{class:K(["h-full rounded-full bg-linear-to-r transition-all",t(fa)(m)]),style:ke({width:`${g(m)}%`})},null,6)]),s("span",za,f(b.percentage)+"% ",1)])])]))),128))]))}}),Oa={class:"flex items-center gap-2"},ja={class:"shrink-0 whitespace-nowrap rounded-full bg-gray-100 px-2.5 py-1 text-[11px] font-medium text-gray-500 dark:bg-white/5 dark:text-gray-400"},Ka={class:"no-capture"},Wa={key:0,class:"no-capture px-3 pb-3 pt-1"},Ga={class:"flex items-center gap-1.5"},Ya={class:"flex w-full items-center justify-between border-b border-gray-100 px-6 py-5 dark:border-white/5"},Xa={class:"min-w-0"},Qa={class:"truncate text-base font-semibold text-gray-900 dark:text-white"},Za={class:"mt-1 text-xs text-gray-500 dark:text-gray-400"},Ja={class:"max-h-[70vh] overflow-y-auto"},ft=q({__name:"ExpandableListCard",props:{title:{},description:{},showViewAll:{type:Boolean},viewAllLabel:{},countLabel:{}},setup(o){const e=I(!1),a=I(null);return(n,i)=>{const u=Ce,c=Te,g=Me;return l(),k(t(O),{title:o.title,description:o.description,"show-divider":!1},{headerRight:T(()=>[s("div",Oa,[s("span",ja,f(o.countLabel),1),s("div",Ka,[ne(n.$slots,"headerRight")])])]),default:T(()=>[s("div",null,[ne(n.$slots,"default")]),o.showViewAll?(l(),$("div",Wa,[x(g,{open:e.value,"onUpdate:open":i[0]||(i[0]=v=>e.value=v),ui:{content:"md:w-full max-w-4xl"}},{content:T(()=>[s("div",{ref_key:"modalBodyRef",ref:a,class:"section-content flex flex-col overflow-hidden"},[s("div",Ya,[s("div",Xa,[s("h3",Qa,f(o.title),1),s("p",Za,f(o.countLabel),1)]),x(ea,{size:"xs",type:"element","target-element":a.value},null,8,["target-element"])]),s("div",Ja,[ne(n.$slots,"full")])],512)]),default:T(()=>[x(c,{color:"neutral",variant:"ghost",class:"w-full justify-center rounded-lg py-2.5 text-xs font-medium text-gray-500 dark:text-gray-400"},{default:T(()=>[s("span",Ga,[Z(f(o.viewAllLabel)+" ",1),x(u,{name:"i-heroicons-arrow-right",class:"h-3.5 w-3.5"})])]),_:1})]),_:3},8,["open"])])):D("",!0)]),_:3},8,["title","description"])}}}),es=q({__name:"RankListPro",props:{members:{},title:{},description:{},topN:{default:10},unit:{}},setup(o){const{t:e}=ee(),a=o,n=y(()=>a.members.slice(0,a.topN)),i=y(()=>a.members.length>a.topN);return(u,c)=>(l(),k(ft,{title:o.title,description:o.description,"show-view-all":i.value,"view-all-label":t(e)("views.charts.rankListPro.fullRanking"),"count-label":t(e)("views.charts.rankListPro.memberCount",{count:o.members.length})},{headerRight:T(()=>[ne(u.$slots,"headerRight")]),full:T(()=>[x(tt,{members:o.members,unit:o.unit,"show-avatar":""},null,8,["members","unit"])]),default:T(()=>[x(tt,{members:n.value,unit:o.unit,"show-avatar":""},null,8,["members","unit"])]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}}),ts={key:0},as={class:"px-5 py-8 text-center text-sm text-gray-400"},Re=q({__name:"ListPro",props:{items:{},title:{},description:{},topN:{default:10},countLabel:{}},setup(o){const{t:e}=ee(),a=o,n=y(()=>a.items.slice(0,a.topN)),i=y(()=>a.items.length>a.topN),u=y(()=>a.countLabel?a.countLabel:e("views.charts.listPro.countTemplate",{count:a.items.length}));return(c,g)=>(l(),k(ft,{title:o.title,description:o.description,"show-view-all":i.value,"view-all-label":t(e)("views.charts.listPro.fullRanking"),"count-label":u.value},{headerRight:T(()=>[ne(c.$slots,"headerRight")]),full:T(()=>[s("div",null,[(l(!0),$(E,null,X(o.items,(v,h)=>(l(),$("div",{key:h,class:"group/list-row px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[ne(c.$slots,"item",{item:v,index:h})]))),128))])]),default:T(()=>[ne(c.$slots,"config"),s("div",null,[(l(!0),$(E,null,X(n.value,(v,h)=>(l(),$("div",{key:h,class:"group/list-row px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[ne(c.$slots,"item",{item:v,index:h})]))),128))]),o.items.length===0?(l(),$("div",ts,[ne(c.$slots,"empty",{},()=>[s("div",as,f(t(e)("views.charts.listPro.empty")),1)])])):D("",!0)]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}});function ss(o,e){return{keywords:[o],...e?.memberId!=null?{memberId:e.memberId}:{}}}const os={class:"main-content mx-auto max-w-3xl p-6"},ns=["aria-label","onClick"],ls=["title"],is={class:"flex shrink-0 items-center gap-3 pl-2"},rs={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},us={class:"grid w-full grid-cols-[2rem_2rem_minmax(0,1fr)] items-start gap-x-3 sm:grid-cols-[2rem_2rem_minmax(7.5rem,0.65fr)_minmax(0,1.35fr)]"},cs=["title"],ds={class:"col-start-3 row-start-2 mt-1.5 flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1.5 sm:col-start-4 sm:row-start-1 sm:mt-0"},ms=["title","aria-label","onClick"],vs={class:"max-w-40 truncate text-sm text-gray-700 transition-colors group-hover/phrase:text-primary-600 dark:text-gray-200 dark:group-hover/phrase:text-primary-400"},ps={class:"shrink-0 font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},gs=q({__name:"CatchphraseTab",props:{sessionId:{},timeFilter:{}},setup(o){const{t:e}=ee(),a=je(),n=We();function i(p){return de(p.memberId,void 0,n.value)}const u=o,c=I(null),g=I(!1),v=y(()=>c.value?.members??[]),h=y(()=>u.timeFilter?.memberId!=null),b=y(()=>h.value?v.value[0]??null:null),m=y(()=>b.value?e("quotes.catchphrase.memberTitle",{name:b.value.name}):e("quotes.catchphrase.title")),r=y(()=>h.value?e("quotes.catchphrase.memberDescription"):e("quotes.catchphrase.description"));async function d(){if(u.sessionId){g.value=!0;try{c.value=await J().getCatchphraseAnalysis(u.sessionId,u.timeFilter)}catch(p){console.error("Failed to load catchphrase analysis:",p)}finally{g.value=!1}}}function w(p){a.openChatRecordDrawer(ss(p,u.timeFilter))}function S(p){return p.catchphrases.slice(0,5)}return P(()=>[u.sessionId,u.timeFilter],()=>{d()},{immediate:!0,deep:!0}),(p,R)=>{const C=Ce;return l(),$("div",os,[g.value?(l(),k(t(pe),{key:0,text:t(e)("quotes.catchphrase.loading")},null,8,["text"])):b.value?(l(),k(t(Re),{key:1,items:b.value.catchphrases,title:m.value,description:r.value,"top-n":10,"count-label":t(e)("quotes.catchphrase.phraseCount",{count:b.value.catchphrases.length})},{headerRight:T(()=>[b.value?(l(),k(Se,{key:0,src:i(b.value),alt:b.value.name,text:t($e)(b.value.name),"root-class":"h-8 w-8 shrink-0","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-[10px] font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},null,8,["src","alt","text"])):D("",!0)]),item:T(({item:M,index:L})=>[s("button",{type:"button",class:"group/item grid w-full grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40","aria-label":`${t(e)("quotes.catchphrase.viewChat")}: ${M.content}`,onClick:j=>w(M.content)},[s("span",{class:K(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",t(we)(L)])},f(t(_e)(L)),3),s("p",{class:"line-clamp-2 min-w-0 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:M.content},f(M.content),9,ls),s("div",is,[s("span",rs,f(t(e)("quotes.catchphrase.times",{count:M.count})),1),x(C,{name:"i-heroicons-chevron-right",class:"h-4 w-4 text-gray-300 transition-colors group-hover/item:text-gray-500 dark:text-gray-600 dark:group-hover/item:text-gray-400"})])],8,ns)]),_:1},8,["items","title","description","count-label"])):v.value.length>0?(l(),k(t(Re),{key:2,items:v.value,title:m.value,description:r.value,"top-n":10,"count-label":t(e)("quotes.catchphrase.memberCount",{count:v.value.length})},{item:T(({item:M,index:L})=>[s("div",us,[s("span",{class:K(["row-span-2 w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums sm:row-span-1",t(we)(L)])},f(t(_e)(L)),3),x(Se,{src:i(M),alt:M.name,text:t($e)(M.name),"root-class":"col-start-2 row-span-2 h-8 w-8 shrink-0 sm:row-span-1","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-[10px] font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},null,8,["src","alt","text"]),s("p",{class:"col-start-3 row-start-1 min-w-0 truncate pt-0.5 text-sm font-semibold text-gray-900 dark:text-white",title:M.name},f(M.name),9,cs),s("div",ds,[(l(!0),$(E,null,X(S(M),j=>(l(),$("button",{key:j.content,type:"button",class:"group/phrase inline-flex max-w-full items-baseline gap-1 rounded text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40",title:j.content,"aria-label":`${t(e)("quotes.catchphrase.viewChat")}: ${j.content}`,onClick:U=>w(j.content)},[s("span",vs," “"+f(j.content)+"” ",1),s("span",ps,f(t(e)("quotes.catchphrase.times",{count:j.count})),1)],8,ms))),128))])])]),_:1},8,["items","title","description","count-label"])):(l(),k(t(O),{key:3,title:m.value,description:r.value,"show-divider":!1},{default:T(()=>[x(t(le),{text:t(e)("quotes.catchphrase.empty.title")},null,8,["text"])]),_:1},8,["title","description"]))])}}}),hs={class:"main-content mx-auto max-w-3xl p-6"},fs=["aria-label","onClick"],ys={class:"min-w-0"},bs=["title"],xs={class:"mt-1 flex min-w-0 items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},ks={class:"truncate"},ws={class:"shrink-0"},_s={class:"flex shrink-0 items-center gap-3 pl-2"},$s={class:"text-right"},Ts={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},Cs={class:"mt-0.5 text-[11px] text-gray-400 dark:text-gray-500"},Is=q({__name:"HotRepeatTab",props:{sessionId:{},timeFilter:{}},setup(o){const{t:e}=ee(),a=o,n=je(),i=pt();function u(b){return de(b.originatorId,void 0,i.value.byId,{name:b.originatorName,byName:i.value.byName})}const c=I(null),g=I(!1);async function v(){if(a.sessionId){g.value=!0;try{c.value=await J().getRepeatAnalysis(a.sessionId,a.timeFilter)}catch(b){console.error("Failed to load repeat analysis:",b)}finally{g.value=!1}}}function h(b){n.openChatRecordDrawer({scrollToMessageId:b.firstMessageId,highlightKeywords:[b.content]})}return P(()=>[a.sessionId,a.timeFilter],()=>{v()},{immediate:!0,deep:!0}),(b,m)=>{const r=Ce;return l(),$("div",hs,[g.value?(l(),k(t(pe),{key:0,text:t(e)("quotes.hotRepeat.loading")},null,8,["text"])):c.value&&c.value.hotContents.length>0?(l(),k(t(Re),{key:1,items:c.value.hotContents,title:t(e)("quotes.hotRepeat.title"),description:t(e)("quotes.hotRepeat.description"),"top-n":10,"count-label":t(e)("quotes.hotRepeat.countTemplate",{count:c.value.hotContents.length})},{item:T(({item:d,index:w})=>[s("button",{type:"button",class:"group/item grid w-full grid-cols-[2rem_2rem_minmax(0,1fr)_auto] items-start gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40","aria-label":`${t(e)("quotes.hotRepeat.viewChat")}: ${d.content}`,onClick:S=>h(d)},[s("span",{class:K(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",t(we)(w)])},f(t(_e)(w)),3),x(Se,{src:u(d),alt:d.originatorName,text:t($e)(d.originatorName),"root-class":"h-8 w-8 shrink-0","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-[10px] font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},null,8,["src","alt","text"]),s("div",ys,[s("p",{class:"line-clamp-2 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:d.content},f(d.content),9,bs),s("div",xs,[s("span",ks,f(d.originatorName),1),m[0]||(m[0]=s("span",{"aria-hidden":"true"},"·",-1)),s("span",ws,f(t(ze)(d.lastTs)),1)])]),s("div",_s,[s("div",$s,[s("p",Ts,f(t(e)("quotes.hotRepeat.people",{count:d.maxChainLength})),1),s("p",Cs,f(t(e)("quotes.hotRepeat.times",{count:d.count})),1)]),x(r,{name:"i-heroicons-chevron-right",class:"h-4 w-4 text-gray-300 transition-colors group-hover/item:text-gray-500 dark:text-gray-600 dark:group-hover/item:text-gray-400"})])],8,fs)]),_:1},8,["items","title","description","count-label"])):(l(),k(t(O),{key:2,title:t(e)("quotes.hotRepeat.title")},{default:T(()=>[x(t(le),{text:t(e)("quotes.hotRepeat.empty")},null,8,["text"])]),_:1},8,["title"]))])}}}),Ss={class:"main-content mx-auto max-w-[920px] space-y-4 p-4 sm:space-y-6 sm:p-6"},Rs={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},Ms={class:"p-3 sm:p-5"},Ls={class:"p-3 sm:p-5"},As=q({__name:"GroupChatOverview",props:{session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(o){const{t:e}=ee(),a=o,{dailyChartData:n}=qt(()=>a.dailyActivity),i=y(()=>({labels:a.messageTypes.map(c=>Zt(c.type,e)),values:a.messageTypes.map(c=>c.count)})),u=y(()=>{const c=[...a.memberActivity].sort((m,r)=>r.messageCount-m.messageCount),g=c.slice(0,10),v=c.slice(10).reduce((m,r)=>m+r.messageCount,0),h=g.map(m=>m.name),b=g.map(m=>m.messageCount);return v>0&&(h.push(e("analysis.overview.others")),b.push(v)),{labels:h,values:b}});return(c,g)=>(l(),$("div",Ss,[x(Dt,{session:o.session,"daily-activity":o.dailyActivity,"message-types":o.messageTypes,"hourly-activity":o.hourlyActivity,"time-range":o.timeRange,"filtered-message-count":o.filteredMessageCount,"filtered-member-count":o.filteredMemberCount,"time-filter":o.timeFilter},null,8,["session","daily-activity","message-types","hourly-activity","time-range","filtered-message-count","filtered-member-count","time-filter"]),s("div",Rs,[x(t(O),{title:t(e)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:T(()=>[s("div",Ms,[x(t(Ze),{data:i.value,height:280},null,8,["data"])])]),_:1},8,["title"]),x(t(O),{title:t(e)("analysis.overview.memberDistribution"),"show-divider":!1},{default:T(()=>[s("div",Ls,[x(t(Ze),{data:u.value,height:280},null,8,["data"])])]),_:1},8,["title"])]),x(Ft,{"daily-activity":o.dailyActivity,"daily-chart-data":t(n)},null,8,["daily-activity","daily-chart-data"])]))}}),Vs={class:"flex h-full flex-col"},Ns={class:"min-h-0 flex-1 overflow-y-auto"},Ds=q({__name:"GroupChatInsights",props:{sessionId:{},session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},emits:["selectTab"],setup(o,{emit:e}){const a=ot(()=>nt(()=>import("./GroupRelationshipGalaxyView-BN1L9DFf.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),{t:n}=ee(),i=o,u=y(()=>[{id:"overview",label:n("analysis.tabs.overview"),icon:"i-heroicons-squares-2x2"},{id:"type-analysis",label:n("analysis.subTabs.insights.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:n("analysis.subTabs.insights.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:n("analysis.subTabs.insights.topic"),icon:"i-heroicons-cloud"},{id:"relationship",label:n("analysis.subTabs.insights.relationship"),icon:"i-heroicons-heart"}]),c=I("overview"),g=e,v=I(null),h=y(()=>({...i.timeFilter,memberId:v.value}));return(b,m)=>(l(),$("div",Vs,[x(t(ct),{modelValue:c.value,"onUpdate:modelValue":m[1]||(m[1]=r=>c.value=r),items:u.value,"persist-key":"groupInsightsTab",onSelect:m[2]||(m[2]=r=>g("selectTab",r))},{right:T(()=>[c.value==="type-analysis"||c.value==="time-analysis"?(l(),k(ut,{key:0,modelValue:v.value,"onUpdate:modelValue":m[0]||(m[0]=r=>v.value=r),"session-id":i.sessionId},null,8,["modelValue","session-id"])):D("",!0)]),_:1},8,["modelValue","items"]),s("div",Ns,[x(t(Bt),{"active-key":c.value},{default:T(({viewKey:r})=>[r==="overview"?(l(),k(As,{key:0,session:i.session,"member-activity":i.memberActivity,"message-types":i.messageTypes,"hourly-activity":i.hourlyActivity,"daily-activity":i.dailyActivity,"time-range":i.timeRange,"filtered-message-count":i.filteredMessageCount,"filtered-member-count":i.filteredMemberCount,"time-filter":i.timeFilter},null,8,["session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):r==="type-analysis"?(l(),k(Ut,{key:1,"session-id":i.sessionId,"session-name":i.session.name,"time-filter":h.value},null,8,["session-id","session-name","time-filter"])):r==="time-analysis"?(l(),k(Ht,{key:2,"session-id":i.sessionId,"session-name":i.session.name,"time-filter":h.value},null,8,["session-id","session-name","time-filter"])):r==="topic"?(l(),k(t(Et),{key:3,"session-id":i.sessionId,"time-filter":i.timeFilter},null,8,["session-id","time-filter"])):r==="relationship"?(l(),k(t(a),{key:4,"session-id":i.sessionId,"time-filter":i.timeFilter},null,8,["session-id","time-filter"])):D("",!0)]),_:1},8,["active-key"])])]))}}),Fs={class:"border-b border-gray-100 p-4 dark:border-gray-800"},qs={class:"mb-3 flex flex-wrap items-center gap-2"},Bs={class:"text-xs text-gray-500 dark:text-gray-400"},Us=["onClick"],Hs={class:"p-4"},Es={class:"mb-3 font-semibold text-gray-900 dark:text-white"},Ps={class:"space-y-3"},zs={class:"mb-1 block text-xs text-gray-500"},Os={class:"mb-1 block text-xs text-gray-500"},js={class:"flex flex-wrap items-center gap-2"},Ks={class:"mt-4 flex justify-end gap-2"},Ws={class:"flex flex-wrap items-center gap-2"},Gs={class:"mt-1.5 text-xs text-gray-400"},Ys={key:0,class:"border-b border-gray-100 px-5 py-4 dark:border-gray-800"},Xs={class:"mb-3 flex items-center justify-between"},Qs={class:"text-base font-medium text-gray-700 dark:text-gray-300"},Zs={class:"flex cursor-pointer items-center gap-1.5 text-xs text-gray-500"},Js={class:"flex flex-wrap gap-2"},eo={class:"text-xs text-gray-500"},to={class:"flex items-center gap-3"},ao={class:"w-32 shrink-0"},so={class:"truncate font-medium text-gray-900 dark:text-white"},oo={class:"flex flex-1 items-center"},no={class:"flex h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},lo=["title"],io={class:"flex shrink-0 items-baseline gap-2"},ro={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},uo={class:"text-xs text-gray-500"},co={key:0,class:"flex h-64 flex-col items-center justify-center text-gray-400"},mo={class:"text-sm"},vo={key:1,class:"h-64"},po=q({__name:"KeywordRankingTab",props:{sessionId:{},timeFilter:{}},setup(o){const{t:e}=ee(),a=o,n=oa(),i=I(!1),u={bg:"bg-pink-400",text:"text-pink-700",badge:"pink",wrapBg:"bg-pink-50 dark:bg-pink-900/20"},c=[{bg:"bg-amber-400",text:"text-amber-700",badge:"amber",wrapBg:"bg-amber-50 dark:bg-amber-900/20"},{bg:"bg-pink-400",text:"text-pink-700",badge:"pink",wrapBg:"bg-pink-50 dark:bg-pink-900/20"},{bg:"bg-blue-400",text:"text-blue-700",badge:"blue",wrapBg:"bg-blue-50 dark:bg-blue-900/20"},{bg:"bg-green-400",text:"text-green-700",badge:"green",wrapBg:"bg-green-50 dark:bg-green-900/20"},{bg:"bg-purple-400",text:"text-purple-700",badge:"purple",wrapBg:"bg-purple-50 dark:bg-purple-900/20"},{bg:"bg-red-400",text:"text-red-700",badge:"red",wrapBg:"bg-red-50 dark:bg-red-900/20"},{bg:"bg-cyan-400",text:"text-cyan-700",badge:"cyan",wrapBg:"bg-cyan-50 dark:bg-cyan-900/20"},{bg:"bg-orange-400",text:"text-orange-700",badge:"orange",wrapBg:"bg-orange-50 dark:bg-orange-900/20"}];function g(_){if(!i.value)return u;const F=r.value.indexOf(_);if(F>=0)return c[F%c.length];let se=0;for(let oe=0;oe<_.length;oe++)se=se*31+_.charCodeAt(oe)>>>0;return c[se%c.length]}const v=["laugh","sad","praise","slacker","gossip","polite","curious"],h=y(()=>[{id:"laugh",name:e("quotes.keywords.templates.laugh.name"),keywords:e("quotes.keywords.templates.laugh.keywords").split(","),description:e("quotes.keywords.templates.laugh.description")},{id:"sad",name:e("quotes.keywords.templates.sad.name"),keywords:e("quotes.keywords.templates.sad.keywords").split(","),description:e("quotes.keywords.templates.sad.description")},{id:"praise",name:e("quotes.keywords.templates.praise.name"),keywords:e("quotes.keywords.templates.praise.keywords").split(","),description:e("quotes.keywords.templates.praise.description")},{id:"slacker",name:e("quotes.keywords.templates.slacker.name"),keywords:e("quotes.keywords.templates.slacker.keywords").split(","),description:e("quotes.keywords.templates.slacker.description")},{id:"gossip",name:e("quotes.keywords.templates.gossip.name"),keywords:e("quotes.keywords.templates.gossip.keywords").split(","),description:e("quotes.keywords.templates.gossip.description")},{id:"polite",name:e("quotes.keywords.templates.polite.name"),keywords:e("quotes.keywords.templates.polite.keywords").split(","),description:e("quotes.keywords.templates.polite.description")},{id:"curious",name:e("quotes.keywords.templates.curious.name"),keywords:e("quotes.keywords.templates.curious.keywords").split(","),description:e("quotes.keywords.templates.curious.description")}]),b=y(()=>{const _=n.customKeywordTemplates.map(se=>({...se,isCustom:!0}));return[...h.value.filter(se=>!n.deletedPresetTemplateIds.includes(se.id)),..._]}),m=I("laugh"),r=I([]);P(h,_=>{_.length>0&&r.value.length===0&&(r.value=[..._[0].keywords])},{immediate:!0});const d=y(()=>{const _=b.value.find(F=>F.id===m.value);return _?_.name:""}),w=I(null),S=I(!1);let p=0;const R=I(!1),C=I(null),M=I(""),L=I([]),j=I(""),U=y(()=>C.value!==null),B=y(()=>U.value?e("quotes.keywords.modal.editTitle"):e("quotes.keywords.modal.createTitle"));function z(){C.value=null,M.value="",L.value=[],j.value="",R.value=!0}function Q(_){C.value=_.id,M.value=_.name,L.value=[..._.keywords],R.value=!0}function G(){const _=j.value.trim();_&&!L.value.includes(_)&&(L.value=[...L.value,_]),j.value=""}function W(_){L.value=L.value.filter(F=>F!==_)}function N(_){m.value=_.id,r.value=[..._.keywords],w.value=null,te()}function H(){p++,r.value=[],w.value=null,S.value=!1,m.value=""}const Y=I("");function me(){const _=Y.value.trim();_&&!r.value.includes(_)&&(r.value=[...r.value,_],te()),Y.value=""}function Ae(_){r.value=r.value.filter(F=>F!==_),te()}function Ie(_){return v.includes(_)}function Ve(){if(M.value.trim()){if(U.value&&C.value)if(Ie(C.value)){const _={id:`custom_${Date.now()}`,name:M.value.trim(),keywords:[...L.value]};n.addCustomKeywordTemplate(_),m.value=_.id,r.value=[..._.keywords],te()}else n.updateCustomKeywordTemplate(C.value,{name:M.value.trim(),keywords:[...L.value]}),m.value===C.value&&(r.value=[...L.value],te());else{const _={id:`custom_${Date.now()}`,name:M.value.trim(),keywords:[...L.value]};n.addCustomKeywordTemplate(_),m.value=_.id,r.value=[..._.keywords],te()}R.value=!1}}function Ne(_){Ie(_)?n.addDeletedPresetTemplateId(_):n.removeCustomKeywordTemplate(_),m.value===_&&(b.value.length>0?N(b.value[0]):H())}async function te(){const _=++p;if(!a.sessionId||r.value.length===0){w.value=null,S.value=!1;return}S.value=!0;try{const F=await J().getLaughAnalysis(a.sessionId,a.timeFilter,[...r.value]);if(_!==p)return;w.value=F}catch(F){if(_!==p)return;console.error("Failed to load keyword ranking:",F),w.value=null}finally{_===p&&(S.value=!1)}}const A=y(()=>w.value?w.value.rankByCount.map(_=>({id:_.memberId.toString(),name:_.name,value:_.laughCount,percentage:_.percentage,keywordDistribution:_.keywordDistribution||[]})):[]);function De(_){if(A.value.length===0)return 0;const F=A.value[0].value;return F===0?0:Math.round(A.value[_].value/F*100)}function Fe(_,F){const se=De(F);return!_.keywordDistribution||_.keywordDistribution.length===0?[{keyword:"default",width:se,bg:"bg-amber-400"}]:_.keywordDistribution.map(oe=>({keyword:oe.keyword,width:oe.percentage/100*se,bg:g(oe.keyword).bg}))}return P(()=>[a.sessionId,a.timeFilter],()=>{te()},{immediate:!0,deep:!0}),(_,F)=>{const se=_t,oe=lt,qe=mt,Ge=Te,yt=Me,bt=sa,xt=Ce;return l(),k(t(Re),{items:A.value,title:t(e)("quotes.keywords.title"),description:t(e)("quotes.keywords.description"),"top-n":10,"count-label":t(e)("quotes.keywords.countTemplate",{count:A.value.length})},{config:T(()=>[s("div",Fs,[s("div",qs,[s("span",Bs,f(t(e)("quotes.keywords.templateLabel")),1),(l(!0),$(E,null,X(b.value,V=>(l(),k(se,{key:V.id,items:[[{label:t(e)("quotes.keywords.contextMenu.edit"),icon:"i-lucide-pencil",disabled:!V.isCustom,onSelect:()=>Q(V)},{label:t(e)("quotes.keywords.contextMenu.delete"),icon:"i-lucide-trash",color:"error",onSelect:()=>Ne(V.id)}]]},{default:T(()=>[s("button",{class:K(["rounded-md border px-2.5 py-1 text-sm transition-all",m.value===V.id?"border-pink-500 bg-pink-50 text-pink-600 dark:border-pink-400 dark:bg-pink-900/20 dark:text-pink-400":"border-gray-200 text-gray-600 hover:border-gray-300 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-600"]),onClick:ve=>N(V)},f(V.name),11,Us)]),_:2},1032,["items"]))),128)),x(yt,{open:R.value,"onUpdate:open":F[3]||(F[3]=V=>R.value=V)},{content:T(()=>[s("div",Hs,[s("h3",Es,f(B.value),1),s("div",Ps,[s("div",null,[s("label",zs,f(t(e)("quotes.keywords.modal.templateName")),1),x(oe,{modelValue:M.value,"onUpdate:modelValue":F[0]||(F[0]=V=>M.value=V),placeholder:t(e)("quotes.keywords.modal.templateNamePlaceholder")},null,8,["modelValue","placeholder"])]),s("div",null,[s("label",Os,f(t(e)("quotes.keywords.modal.keywords")),1),s("div",js,[(l(!0),$(E,null,X(L.value,V=>(l(),k(qe,{key:V,variant:"soft",class:"cursor-pointer",onClick:ve=>W(V)},{default:T(()=>[Z(f(V)+" ",1),F[6]||(F[6]=s("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(oe,{modelValue:j.value,"onUpdate:modelValue":F[1]||(F[1]=V=>j.value=V),placeholder:t(e)("quotes.keywords.modal.keywordPlaceholder"),class:"w-full",onKeydown:Ye(Xe(G,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])])])]),s("div",Ks,[x(Ge,{variant:"soft",onClick:F[2]||(F[2]=V=>R.value=!1)},{default:T(()=>[Z(f(t(e)("common.cancel")),1)]),_:1}),x(Ge,{color:"primary",disabled:!M.value.trim()||L.value.length===0,onClick:Ve},{default:T(()=>[Z(f(U.value?t(e)("quotes.keywords.modal.update"):t(e)("common.save")),1)]),_:1},8,["disabled"])])])]),default:T(()=>[s("button",{class:"rounded-md border border-dashed border-gray-300 px-2.5 py-1 text-sm text-gray-500 transition-all hover:border-pink-400 hover:text-pink-500 dark:border-gray-600",onClick:z},f(t(e)("quotes.keywords.newTemplate")),1)]),_:1},8,["open"])]),s("div",Ws,[(l(!0),$(E,null,X(r.value,V=>(l(),k(qe,{key:V,class:"cursor-pointer",onClick:ve=>Ae(V)},{default:T(()=>[Z(f(V)+" ",1),F[7]||(F[7]=s("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(oe,{modelValue:Y.value,"onUpdate:modelValue":F[4]||(F[4]=V=>Y.value=V),placeholder:t(e)("quotes.keywords.searchPlaceholder"),class:"w-32",onKeydown:Ye(Xe(me,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"]),r.value.length>0?(l(),$("button",{key:0,class:"text-sm text-pink-500 hover:text-red-500",onClick:H},f(t(e)("quotes.keywords.clear")),1)):D("",!0)]),s("div",Gs,f(t(e)("quotes.keywords.templateHint")),1)]),w.value&&w.value.typeDistribution.length>0?(l(),$("div",Ys,[s("div",Xs,[s("span",Qs,f(d.value?d.value:r.value.length===1?r.value[0]:t(e)("quotes.keywords.keyword"))+f(t(e)("quotes.keywords.ranking")),1),s("label",Zs,[s("span",null,f(t(e)("quotes.keywords.multiColorMode")),1),x(bt,{modelValue:i.value,"onUpdate:modelValue":F[5]||(F[5]=V=>i.value=V),size:"md"},null,8,["modelValue"])])]),s("div",Js,[(l(!0),$(E,null,X(w.value.typeDistribution,V=>(l(),$("div",{key:V.type,class:K(["flex items-center gap-2 rounded-lg px-2 py-2 text-xs",g(V.type).wrapBg])},[s("span",{class:K(["h-2.5 w-2.5 shrink-0 rounded-full",g(V.type).bg])},null,2),s("span",{class:K(["font-medium",g(V.type).text])},f(V.type),3),s("span",eo,f(t(e)("quotes.keywords.times",{count:V.count})),1),x(qe,{color:g(V.type).badge,variant:"soft",size:"xs"},{default:T(()=>[Z(f(V.percentage)+"%",1)]),_:2},1032,["color"])],2))),128))])])):D("",!0),S.value&&A.value.length===0?(l(),k(t(pe),{key:1,text:t(e)("quotes.keywords.loading")},null,8,["text"])):D("",!0)]),item:T(({item:V,index:ve})=>[s("div",to,[s("span",{class:K(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",t(we)(ve)])},f(t(_e)(ve)),3),s("div",ao,[s("p",so,f(V.name),1)]),s("div",oo,[s("div",no,[(l(!0),$(E,null,X(Fe(V,ve),be=>(l(),$("div",{key:be.keyword,class:K(["h-full transition-all first:rounded-l-full last:rounded-r-full",be.bg]),style:ke({width:`${be.width}%`}),title:`${be.keyword}: ${be.width.toFixed(1)}%`},null,14,lo))),128))])]),s("div",io,[s("span",ro,f(V.value),1),s("span",uo,f(t(e)("quotes.keywords.timesWithPercent",{count:V.value,percent:V.percentage})),1)])])]),empty:T(()=>[S.value?(l(),$("div",vo)):(l(),$("div",co,[x(xt,{name:"i-heroicons-magnifying-glass",class:"mb-2 h-8 w-8 opacity-50"}),s("p",mo,f(t(e)("quotes.keywords.empty")),1)]))]),_:1},8,["items","title","description","count-label"])}}}),go={class:"flex h-56 items-center justify-center",role:"status","aria-live":"polite"},ho={class:"sr-only"},ue=q({__name:"RankingLoadingBody",setup(o){const{t:e}=ee();return(a,n)=>(l(),$("div",go,[s("span",ho,f(t(e)("common.loading")),1),x(t(dt))]))}}),fo={class:"flex items-center gap-3"},yo={key:1,class:"py-8 text-center text-sm text-gray-400"},bo=q({__name:"ActivityRank",props:{sessionId:{},memberActivity:{},baseLoading:{type:Boolean},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(o){const e=o,a=I(null),n=I(null),i=I(!1),u=I("activity"),c=I(e.globalTopN??10);P(()=>e.globalTopN,p=>{p!==void 0&&(c.value=p)});async function g(){if(e.sessionId){i.value=!0;try{const p=J(),[R,C]=await Promise.all([p.getDragonKingAnalysis(e.sessionId,e.timeFilter),p.getCheckInAnalysis(e.sessionId,e.timeFilter)]);a.value=R,n.value=C}catch(p){console.error("加载活跃数据失败:",p)}finally{i.value=!1}}}const v=y(()=>e.memberActivity.map(p=>({id:p.memberId.toString(),name:p.name,value:p.messageCount,percentage:p.percentage}))),h=y(()=>a.value?a.value.rank.map(p=>({id:p.memberId.toString(),name:p.name,value:p.count,percentage:p.percentage})):[]),b=y(()=>n.value?n.value.loyaltyRank.map(p=>({id:p.memberId.toString(),name:p.name,value:p.totalDays,percentage:p.percentage})):[]),m=y(()=>u.value==="activity"?!!e.baseLoading&&e.memberActivity.length===0:i.value),r=y(()=>{switch(u.value){case"activity":return v.value;case"dragon":return h.value;case"loyalty":return b.value;default:return v.value}}),d=y(()=>{switch(u.value){case"activity":return"条";case"dragon":case"loyalty":return"天";default:return"条"}}),w=y(()=>{switch(u.value){case"activity":return"🏆 活跃榜 - 发言数量";case"dragon":return"🏆 活跃榜 - 龙王";case"loyalty":return"🏆 活跃榜 - 累计发言";default:return"🏆 活跃榜"}}),S=y(()=>{switch(u.value){case"activity":return"按消息发送数量排名";case"dragon":{const p=a.value?.totalDays;return p==null?"每天发言最多的人+1":`每天发言最多的人+1(共 ${p} 天)`}case"loyalty":{const p=n.value?.totalDays;return p==null?"累计发言天数排名":`累计发言天数排名(共 ${p} 天)`}default:return""}});return P(()=>[e.sessionId,e.timeFilter],()=>g(),{immediate:!0,deep:!0}),(p,R)=>(l(),k(t(O),{title:w.value,description:S.value},{headerRight:T(()=>[s("div",fo,[o.showTopNSelect?(l(),k(t(re),{key:0,modelValue:c.value,"onUpdate:modelValue":R[0]||(R[0]=C=>c.value=C)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:u.value,"onUpdate:modelValue":R[1]||(R[1]=C=>u.value=C),items:[{label:"发言数量",value:"activity"},{label:"龙王",value:"dragon"},{label:"累计发言",value:"loyalty"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[m.value?(l(),k(ue,{key:0})):(l(),$(E,{key:1},[r.value.length>0?(l(),k(t(Le),{key:0,members:r.value,title:w.value,unit:d.value,"top-n":c.value,bare:""},null,8,["members","title","unit","top-n"])):(l(),$("div",yo,"暂无数据"))],64))]),_:1},8,["title","description"]))}}),xo={key:0},ko={key:0,class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},wo={class:"px-3 py-2"},_o=q({__name:"EChartStreakRank",props:{items:{},title:{},description:{},topN:{default:10},mode:{default:"max"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(o){const e=o,a=fe(),n=y(()=>e.mode==="current"?e.items.filter(m=>m.currentStreak>0).sort((m,r)=>r.currentStreak-m.currentStreak).slice(0,e.topN):e.items.slice(0,e.topN)),i=he(()=>n.value),u=y(()=>{const m=n.value.length*36;return Math.max(m+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},g={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]};function v(m,r){return`${m} ~ ${r}`}function h(m){return e.mode==="current"?m.currentStreak:m.maxStreak}const b=y(()=>{const m=[...n.value].reverse(),r=ye(m,{totalCount:n.value.length,labelMaxLength:a.value.labelMaxLength,avatars:i.value}),d=m.map(p=>h(p)),w=Math.max(...d,1),S=m.map(p=>({value:h(p),itemStyle:{color:e.mode==="current"||p.currentStreak>0?g:c,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 R=p[0];if(!R)return"";const C=n.value.length-1-R.dataIndex,M=n.value[C];if(e.mode==="current")return`
|
|
8
|
+
<div style="padding: 4px 8px;">
|
|
9
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${M.name}</div>
|
|
10
|
+
<div style="color: #fb923c;">🔥 当前连续 <b>${M.currentStreak}</b> 天</div>
|
|
11
|
+
<div style="margin-top: 4px; font-size: 12px; color: #9ca3af;">最长记录: ${M.maxStreak} 天</div>
|
|
12
|
+
</div>
|
|
13
|
+
`;let L=`
|
|
14
|
+
<div style="padding: 4px 8px;">
|
|
15
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${M.name}</div>
|
|
16
|
+
<div style="margin-bottom: 4px;">🔥 最长连续: <b>${M.maxStreak}</b> 天</div>
|
|
17
|
+
<div style="font-size: 12px; color: #9ca3af;">${v(M.maxStreakStart,M.maxStreakEnd)}</div>
|
|
18
|
+
`;return M.currentStreak>0&&(L+=`<div style="margin-top: 6px; color: #fb923c;">🔥 当前连续 ${M.currentStreak} 天</div>`),L+="</div>",L}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:w*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:r.data,axisLine:{show:!1},axisTick:{show:!1},axisLabel:r.axisLabel},series:[{type:"bar",data:S,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:p=>{const R=n.value.length-1-p.dataIndex,C=n.value[R],M=h(C),L=e.mode==="current"||C.currentStreak>0?" 🔥":"";return`${M} 天${L}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(249, 115, 22, 0.3)"}}}]}});return(m,r)=>o.bare?(l(),$("div",xo,[x(t(ge),{"content-height":u.value,"max-height-vh":o.maxHeightVh},{default:T(()=>[x(t(ae),{option:b.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"]),o.mode==="max"?(l(),$("div",ko,[...r[0]||(r[0]=[$t('<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)])])):D("",!0)])):(l(),k(t(O),{key:1,title:o.title,description:o.description,scrollable:"","max-height-vh":o.maxHeightVh},Tt({default:T(()=>[s("div",wo,[x(t(ae),{option:b.value,height:u.value},null,8,["option","height"])])]),_:2},[o.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"]))}}),$o={class:"px-3 py-2"},To=q({__name:"EChartBattleRank",props:{battles:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(o){const e=o,a=y(()=>e.battles.slice(0,e.topN)),n=y(()=>{const g=a.value.length*36;return Math.max(g+30,180)}),i={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]};function u(g){return`${g.participantCount} 人参战`}const c=y(()=>{const g=[...a.value].reverse(),v=g.map(r=>u(r)),h=g.map(r=>r.totalImages),b=Math.max(...h,1),m=g.map(r=>({value:r.totalImages,itemStyle:{color:i,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:r=>{const d=r[0];if(!d)return"";const w=a.value.length-1-d.dataIndex,S=a.value[w],p=S.participants.slice(0,5).map(C=>`<span style="color: #d1d5db;">${C.name}</span> <b>${C.imageCount}</b>张`).join("、"),R=S.participants.length>5?`、+${S.participants.length-5}`:"";return`
|
|
19
|
+
<div style="padding: 6px 8px;">
|
|
20
|
+
<div style="font-weight: bold; margin-bottom: 8px; font-size: 13px;">
|
|
21
|
+
⚔️ ${ze(S.startTime)}
|
|
22
|
+
</div>
|
|
23
|
+
<div style="margin-bottom: 6px;">
|
|
24
|
+
<span style="color: #9ca3af;">参战人数:</span> <b>${S.participantCount}</b> 人
|
|
25
|
+
</div>
|
|
26
|
+
<div style="margin-bottom: 8px;">
|
|
27
|
+
<span style="color: #9ca3af;">总图片数:</span> <b style="color: #f472b6;">${S.totalImages}</b> 张
|
|
28
|
+
</div>
|
|
29
|
+
<div style="border-top: 1px solid #374151; padding-top: 6px; font-size: 11px;">
|
|
30
|
+
${p}${R}
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
`}},grid:{left:95,right:125,top:15,bottom:15,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:v,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:11,color:"#4b5563",margin:12,formatter:(r,d)=>{const S=a.value.length-1-d+1;return`${S===1?"🥇":S===2?"🥈":S===3?"🥉":`${S}.`} ${r}`}}},series:[{type:"bar",data:m,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:r=>{const d=a.value.length-1-r.dataIndex,w=a.value[d],S=ze(w.startTime);return`${w.totalImages} 张 (${S})`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(g,v)=>o.bare?(l(),k(t(ge),{key:0,"content-height":n.value,"max-height-vh":o.maxHeightVh},{default:T(()=>[x(t(ae),{option:c.value,height:n.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(l(),k(t(O),{key:1,title:o.title,description:o.description,scrollable:"","max-height-vh":o.maxHeightVh},{default:T(()=>[s("div",$o,[x(t(ae),{option:c.value,height:n.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Co={class:"px-3 py-2"},Io=q({__name:"EChartTimeRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(o){const e=o,a=fe(),n=y(()=>e.items.slice(0,e.topN)),i=he(()=>n.value),u=y(()=>{const h=n.value.length*36;return Math.max(h+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f59e0b"},{offset:1,color:"#fbbf24"}]};function g(h){return(h/1e3).toFixed(2)+"s"}const v=y(()=>{if(n.value.length===0)return{};const h=[...n.value].reverse(),b=ye(h,{totalCount:n.value.length,labelMaxLength:a.value.labelMaxLength,avatars:i.value}),m=n.value[0].avgTimeDiff,r=h.map(d=>({value:Math.round(m/d.avgTimeDiff*100),itemStyle:{color:c,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:d=>{const w=d[0];if(!w)return"";const S=n.value.length-1-w.dataIndex,p=n.value[S];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>${g(p.avgTimeDiff)}</b></div>
|
|
37
|
+
<div style="font-size: 12px; color: #9ca3af;">参与复读 ${p.count} 次</div>
|
|
38
|
+
</div>
|
|
39
|
+
`}},grid:{left:a.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.data,axisLine:{show:!1},axisTick:{show:!1},axisLabel:b.axisLabel},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:d=>{const w=n.value.length-1-d.dataIndex,S=n.value[w];return`${g(S.avgTimeDiff)} · ${S.count}次`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(245, 158, 11, 0.3)"}}}]}});return(h,b)=>o.bare?(l(),k(t(ge),{key:0,"content-height":u.value,"max-height-vh":o.maxHeightVh},{default:T(()=>[x(t(ae),{option:v.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(l(),k(t(O),{key:1,title:o.title,description:o.description,scrollable:"","max-height-vh":o.maxHeightVh},{default:T(()=>[s("div",Co,[x(t(ae),{option:v.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),So={class:"flex items-center gap-3"},Ro={class:"px-3 py-2"},Mo=q({__name:"EChartDivingRank",props:{items:{},showTopNSelect:{type:Boolean,default:!0},maxHeightVh:{default:60},globalTopN:{}},setup(o){const e=o,a=fe(),n=I("desc"),i=I(e.globalTopN??10);P(()=>e.globalTopN,d=>{d!==void 0&&(i.value=d)});const u=y(()=>[...e.items].sort((w,S)=>n.value==="desc"?S.daysSinceLastMessage-w.daysSinceLastMessage:w.daysSinceLastMessage-S.daysSinceLastMessage).slice(0,i.value)),c=he(()=>u.value),g=y(()=>n.value==="desc"?"🤿 潜水榜 - 潜水最久":"🤿 潜水榜 - 最近冒泡"),v=y(()=>n.value==="desc"?"距离上次发言时间最久的成员":"最近发言过的成员"),h=y(()=>{const d=u.value.length*36;return Math.max(d+30,180)}),b={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#06b6d4"},{offset:1,color:"#22d3ee"}]};function m(d){return d===0?"今天":d===1?"昨天":`${d} 天前`}const r=y(()=>{if(u.value.length===0)return{};const d=[...u.value].reverse(),w=ye(d,{totalCount:u.value.length,labelMaxLength:a.value.labelMaxLength,avatars:c.value}),S=Math.max(...u.value.map(R=>R.daysSinceLastMessage),1),p=d.map(R=>({value:R.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:R=>{const C=R[0];if(!C)return"";const M=u.value.length-1-C.dataIndex,L=u.value[M];return`
|
|
40
|
+
<div style="padding: 4px 8px;">
|
|
41
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${L.name}</div>
|
|
42
|
+
<div style="margin-bottom: 4px;">🤿 ${m(L.daysSinceLastMessage)}</div>
|
|
43
|
+
<div style="font-size: 12px; color: #9ca3af;">最后发言: ${ta(L.lastMessageTs)}</div>
|
|
44
|
+
</div>
|
|
45
|
+
`}},grid:{left:a.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:S*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:w.data,axisLine:{show:!1},axisTick:{show:!1},axisLabel:w.axisLabel},series:[{type:"bar",data:p,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:R=>{const C=u.value.length-1-R.dataIndex,M=u.value[C];return m(M.daysSinceLastMessage)},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(0, 0, 0, 0.2)"}}}]}});return(d,w)=>(l(),k(t(O),{title:g.value,description:v.value,scrollable:"","max-height-vh":o.maxHeightVh},{headerRight:T(()=>[s("div",So,[o.showTopNSelect?(l(),k(t(re),{key:0,modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=S=>i.value=S)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:n.value,"onUpdate:modelValue":w[1]||(w[1]=S=>n.value=S),items:[{label:"潜水最久",value:"desc"},{label:"最近冒泡",value:"asc"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[s("div",Ro,[x(t(ae),{option:r.value,height:h.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Lo={class:"px-3 py-2"},Ao=q({__name:"EChartConsecutiveRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(o){const e=o,a=fe(),n=y(()=>[...e.items].sort((h,b)=>b.maxConsecutiveDays-h.maxConsecutiveDays).slice(0,e.topN)),i=he(()=>n.value),u=y(()=>{const h=n.value.length*36;return Math.max(h+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]},g={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ec4899"},{offset:1,color:"#f472b6"}]},v=y(()=>{if(n.value.length===0)return{};const h=[...n.value].reverse(),b=ye(h,{totalCount:n.value.length,labelMaxLength:a.value.labelMaxLength,avatars:i.value}),m=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 d=r[0].dataIndex,w=n.value.length-1-d,S=n.value[w];let p=`
|
|
46
|
+
<div style="padding: 6px 8px;">
|
|
47
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${S.name}</div>
|
|
48
|
+
<div>最长连续: <b style="color: #f472b6;">${S.maxConsecutiveDays}</b> 天</div>
|
|
49
|
+
`;return S.currentStreak>0&&(p+=`<div style="color: #f97316;">🔥 当前连续 ${S.currentStreak} 天</div>`),p+="</div>",p}},legend:{show:!1},grid:{left:a.value.gridLeft,right:75,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:m*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:b.data,axisLine:{show:!1},axisTick:{show:!1},axisLabel:b.axisLabel},series:[{name:"当前连续",type:"bar",data:h.map(r=>({value:r.currentStreak>0?r.maxConsecutiveDays:0,itemStyle:{color:c,borderRadius:[0,4,4,0]}})),barWidth:18,barGap:"-100%",label:{show:!0,position:"right",distance:8,formatter:r=>{const d=n.value.length-1-r.dataIndex,w=n.value[d];return w.currentStreak>0?`${w.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}},{name:"已中断",type:"bar",data:h.map(r=>({value:r.currentStreak===0?r.maxConsecutiveDays:0,itemStyle:{color:g,borderRadius:[0,4,4,0]}})),barWidth:18,label:{show:!0,position:"right",distance:8,formatter:r=>{const d=n.value.length-1-r.dataIndex,w=n.value[d];return w.currentStreak===0?`${w.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(h,b)=>o.bare?(l(),k(t(ge),{key:0,"content-height":u.value,"max-height-vh":o.maxHeightVh},{default:T(()=>[x(t(ae),{option:v.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(l(),k(t(O),{key:1,title:o.title,description:o.description,scrollable:"","max-height-vh":o.maxHeightVh},{default:T(()=>[s("div",Lo,[x(t(ae),{option:v.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Vo={class:"px-3 py-2"},No=q({__name:"EChartNightOwlRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(o){const e=o,a=fe(),n=y(()=>e.items.slice(0,e.topN)),i=he(()=>n.value),u=y(()=>{const v=n.value.length*36;return Math.max(v+50,200)}),c={h23:"#8b5cf6",h0:"#3b82f6",h1:"#06b6d4",h2:"#f59e0b",h3to4:"#ef4444"},g=y(()=>{if(n.value.length===0)return{};const v=[...n.value].reverse(),h=ye(v,{totalCount:n.value.length,labelMaxLength:a.value.labelMaxLength,avatars:i.value}),b=Math.max(...n.value.map(m=>m.totalNightMessages),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:m=>{if(!m||m.length===0)return"";const r=m[0].dataIndex,d=n.value.length-1-r,w=n.value[d],S=w.hourlyBreakdown;return`
|
|
50
|
+
<div style="padding: 6px 8px;">
|
|
51
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${w.name}</div>
|
|
52
|
+
<div style="margin-bottom: 4px;">
|
|
53
|
+
称号: <b style="color: #f472b6;">${w.title}</b>
|
|
54
|
+
</div>
|
|
55
|
+
<div style="margin-bottom: 6px;">总发言: <b>${w.totalNightMessages}</b> 条</div>
|
|
56
|
+
<div style="border-top: 1px solid #374151; padding-top: 6px;">
|
|
57
|
+
<div><span style="color: ${c.h23};">●</span> 23点: ${S.h23} 条</div>
|
|
58
|
+
<div><span style="color: ${c.h0};">●</span> 0点: ${S.h0} 条</div>
|
|
59
|
+
<div><span style="color: ${c.h1};">●</span> 1点: ${S.h1} 条</div>
|
|
60
|
+
<div><span style="color: ${c.h2};">●</span> 2点: ${S.h2} 条</div>
|
|
61
|
+
<div><span style="color: ${c.h3to4};">●</span> 3-4点: ${S.h3to4} 条</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`}},legend:{show:!0,bottom:0,itemWidth:12,itemHeight:12,textStyle:{color:"#6b7280",fontSize:10}},grid:{left:a.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:h.data,axisLine:{show:!1},axisTick:{show:!1},axisLabel:h.axisLabel},series:[{name:"23点",type:"bar",stack:"total",data:v.map(m=>m.hourlyBreakdown.h23),itemStyle:{color:c.h23},barWidth:18},{name:"0点",type:"bar",stack:"total",data:v.map(m=>m.hourlyBreakdown.h0),itemStyle:{color:c.h0},barWidth:18},{name:"1点",type:"bar",stack:"total",data:v.map(m=>m.hourlyBreakdown.h1),itemStyle:{color:c.h1},barWidth:18},{name:"2点",type:"bar",stack:"total",data:v.map(m=>m.hourlyBreakdown.h2),itemStyle:{color:c.h2},barWidth:18},{name:"3-4点",type:"bar",stack:"total",data:v.map(m=>m.hourlyBreakdown.h3to4),itemStyle:{color:c.h3to4,borderRadius:[0,4,4,0]},barWidth:18,label:{show:!0,position:"right",distance:8,formatter:m=>{const r=n.value.length-1-m.dataIndex;return`${n.value[r].totalNightMessages} 条`},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(v,h)=>o.bare?(l(),k(t(ge),{key:0,"content-height":u.value,"max-height-vh":o.maxHeightVh},{default:T(()=>[x(t(ae),{option:g.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(l(),k(t(O),{key:1,title:o.title,description:o.description,scrollable:"","max-height-vh":o.maxHeightVh},{default:T(()=>[s("div",Vo,[x(t(ae),{option:g.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Do={id:"streak-rank",class:"scroll-mt-24"},Fo={class:"flex items-center gap-3"},qo=q({__name:"CheckInRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(o){const e=o,a=I(null),n=I(!1),i=I("max"),u=I(e.globalTopN??10);P(()=>e.globalTopN,b=>{b!==void 0&&(u.value=b)});const c=y(()=>i.value==="max"?"🔥 火花榜 - 最长连续":"🔥 火花榜 - 当前连续"),g=y(()=>i.value==="max"?"历史最长连续发言天数":"正在持续连续发言的成员"),v=y(()=>a.value?a.value.streakRank.some(b=>b.currentStreak>0):!1);async function h(){if(e.sessionId){n.value=!0;try{a.value=await J().getCheckInAnalysis(e.sessionId,e.timeFilter)}catch(b){console.error("加载打卡分析失败:",b)}finally{n.value=!1}}}return P(()=>[e.sessionId,e.timeFilter],()=>{h()},{immediate:!0,deep:!0}),(b,m)=>(l(),$("div",Do,[x(t(O),{title:c.value,description:g.value},{headerRight:T(()=>[s("div",Fo,[o.showTopNSelect?(l(),k(t(re),{key:0,modelValue:u.value,"onUpdate:modelValue":m[0]||(m[0]=r=>u.value=r)},null,8,["modelValue"])):D("",!0),v.value?(l(),k(t(ie),{key:1,modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=r=>i.value=r),items:[{label:"最长连续",value:"max"},{label:"当前连续",value:"current"}],size:"sm"},null,8,["modelValue"])):D("",!0)])]),default:T(()=>[n.value?(l(),k(ue,{key:0})):a.value&&a.value.streakRank.length>0?(l(),k(t(_o),{key:1,items:a.value.streakRank,title:c.value,mode:i.value,"top-n":u.value,bare:""},null,8,["items","title","mode","top-n"])):(l(),k(t(le),{key:2,text:"暂无连续发言数据"}))]),_:1},8,["title","description"])]))}}),Bo={class:"flex items-center gap-3"},Uo={key:1,class:"py-8 text-center text-sm text-gray-400"},Ho={key:1,class:"py-8 text-center text-sm text-gray-400"},Eo=q({__name:"MemeBattleRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(o){const e=o,a=I(null),n=I(!1),i=I("count"),u=I(e.globalTopN??10);P(()=>e.globalTopN,d=>{d!==void 0&&(u.value=d)});async function c(){if(e.sessionId){n.value=!0;try{a.value=await J().getMemeBattleAnalysis(e.sessionId,e.timeFilter)}catch(d){console.error("加载斗图分析失败:",d)}finally{n.value=!1}}}const g=y(()=>a.value?a.value.rankByCount.map(d=>({id:d.memberId.toString(),name:d.name,value:d.count,percentage:d.percentage})):[]),v=y(()=>a.value?a.value.rankByImageCount.map(d=>({id:d.memberId.toString(),name:d.name,value:d.count,percentage:d.percentage})):[]),h=y(()=>i.value==="count"?g.value:v.value),b=y(()=>i.value==="count"?"场":"张"),m=y(()=>{switch(i.value){case"battle":return"⚔️ 斗图榜 - 史诗级战役";case"count":return"⚔️ 斗图榜 - 按场次";case"image":return"⚔️ 斗图榜 - 按图量";default:return"⚔️ 斗图榜"}}),r=y(()=>{switch(i.value){case"battle":return"记录最激烈的斗图大战";case"count":return"参与斗图次数最多的人";case"image":return"在斗图中发送图片最多的人";default:return""}});return P(()=>[e.sessionId,e.timeFilter],()=>c(),{immediate:!0,deep:!0}),(d,w)=>n.value||a.value?(l(),k(t(O),{key:0,title:m.value,description:r.value},{headerRight:T(()=>[s("div",Bo,[o.showTopNSelect?(l(),k(t(re),{key:0,modelValue:u.value,"onUpdate:modelValue":w[0]||(w[0]=S=>u.value=S)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:i.value,"onUpdate:modelValue":w[1]||(w[1]=S=>i.value=S),items:[{label:"按场次",value:"count"},{label:"按图量",value:"image"},{label:"史诗级战役",value:"battle"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[n.value?(l(),k(ue,{key:0})):a.value&&i.value==="battle"?(l(),$(E,{key:1},[a.value.topBattles.length>0?(l(),k(t(To),{key:0,battles:a.value.topBattles,title:"","top-n":u.value,bare:""},null,8,["battles","top-n"])):(l(),$("div",Uo,"暂无史诗级战役数据"))],64)):a.value?(l(),$(E,{key:2},[h.value.length>0?(l(),k(t(Le),{key:0,members:h.value,title:m.value,unit:b.value,"top-n":u.value,bare:""},null,8,["members","title","unit","top-n"])):(l(),$("div",Ho,"暂无斗图数据"))],64)):D("",!0)]),_:1},8,["title","description"])):D("",!0)}}),Po={class:"space-y-6"},zo={class:"flex items-center gap-3"},Oo={class:"flex items-center gap-3"},jo={key:2,class:"px-3 py-2"},Ko=q({__name:"RepeatSection",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(o){const e=o,a=I(null),n=I(!1),i=I("originator"),u=I("fastest"),c=I(e.globalTopN??10),g=I(e.globalTopN??10);P(()=>e.globalTopN,C=>{C!==void 0&&(c.value=C,g.value=C)});async function v(){if(e.sessionId){n.value=!0;try{a.value=await J().getRepeatAnalysis(e.sessionId,e.timeFilter)}catch(C){console.error("加载复读分析失败:",C)}finally{n.value=!1}}}const h=y(()=>a.value?a.value.originators.map(C=>({id:C.memberId.toString(),name:C.name,value:C.count,percentage:C.percentage})):[]),b=y(()=>a.value?a.value.initiators.map(C=>({id:C.memberId.toString(),name:C.name,value:C.count,percentage:C.percentage})):[]),m=y(()=>a.value?a.value.breakers.map(C=>({id:C.memberId.toString(),name:C.name,value:C.count,percentage:C.percentage})):[]),r=y(()=>{switch(i.value){case"originator":return h.value;case"initiator":return b.value;case"breaker":return m.value;default:return h.value}}),d=y(()=>{switch(i.value){case"originator":return"🔁 复读榜 - 被复读";case"initiator":return"🔁 复读榜 - 挑起";case"breaker":return"🔁 复读榜 - 打断";default:return"🔁 复读榜"}}),w=y(()=>{switch(i.value){case"originator":return"发出的消息被别人复读的次数";case"initiator":return"第二个发送相同消息、带起节奏的人";case"breaker":return"终结复读链的人";default:return""}}),S=y(()=>{if(!a.value)return{labels:[],values:[]};const C=a.value.chainLengthDistribution;return{labels:C.map(M=>`${M.length}人`),values:C.map(M=>M.count)}}),p=y(()=>u.value==="fastest"?"📊 复读统计 - 最快反应":"📊 复读统计 - 链长分布"),R=y(()=>{if(u.value==="fastest")return"平均复读反应时间(至少参与5次复读)";const C=a.value?.totalRepeatChains??0,M=a.value?.avgChainLength??0;return`共 ${C} 次复读,平均 ${M} 人参与`});return P(()=>[e.sessionId,e.timeFilter],()=>v(),{immediate:!0,deep:!0}),(C,M)=>(l(),$("div",Po,[n.value||a.value&&a.value.totalRepeatChains>0?(l(),$(E,{key:0},[x(t(O),{title:d.value,description:w.value},{headerRight:T(()=>[s("div",zo,[o.showTopNSelect?(l(),k(t(re),{key:0,modelValue:c.value,"onUpdate:modelValue":M[0]||(M[0]=L=>c.value=L)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:i.value,"onUpdate:modelValue":M[1]||(M[1]=L=>i.value=L),items:[{label:"被复读",value:"originator"},{label:"挑起",value:"initiator"},{label:"打断",value:"breaker"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[n.value?(l(),k(ue,{key:0})):r.value.length>0?(l(),k(t(Le),{key:1,members:r.value,title:d.value,unit:"次","top-n":c.value,bare:""},null,8,["members","title","top-n"])):(l(),k(t(le),{key:2,text:"暂无数据"}))]),_:1},8,["title","description"]),x(t(O),{title:p.value,description:R.value},{headerRight:T(()=>[s("div",Oo,[o.showTopNSelect&&u.value==="fastest"?(l(),k(t(re),{key:0,modelValue:g.value,"onUpdate:modelValue":M[2]||(M[2]=L=>g.value=L)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:u.value,"onUpdate:modelValue":M[3]||(M[3]=L=>u.value=L),items:[{label:"最快反应",value:"fastest"},{label:"链长分布",value:"distribution"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[n.value?(l(),k(ue,{key:0})):u.value==="fastest"?(l(),$(E,{key:1},[a.value?.fastestRepeaters&&a.value.fastestRepeaters.length>0?(l(),k(t(Io),{key:0,items:a.value.fastestRepeaters,"top-n":g.value,title:"",bare:""},null,8,["items","top-n"])):(l(),k(t(le),{key:1,text:"暂无最快复读数据"}))],64)):(l(),$("div",jo,[S.value.labels.length>0?(l(),k(t(la),{key:0,data:S.value,height:200},null,8,["data"])):(l(),k(t(le),{key:1,text:"暂无分布数据"}))]))]),_:1},8,["title","description"])],64)):(l(),k(t(O),{key:1,title:"🔁 复读榜"},{default:T(()=>[x(t(le),{text:"该群组暂无复读记录"})]),_:1}))]))}}),Wo=q({__name:"DivingRank",props:{sessionId:{},timeFilter:{},globalTopN:{}},setup(o){const e=o,a=I(null),n=I(!1);async function i(){if(e.sessionId){n.value=!0;try{a.value=await J().getDivingAnalysis(e.sessionId,e.timeFilter)}catch(u){console.error("加载潜水分析失败:",u)}finally{n.value=!1}}}return P(()=>[e.sessionId,e.timeFilter],()=>i(),{immediate:!0,deep:!0}),(u,c)=>n.value?(l(),k(t(O),{key:0,title:"🤿 潜水榜 - 潜水最久",description:"距离上次发言时间最久的成员"},{default:T(()=>[x(ue)]),_:1})):a.value&&a.value.rank.length>0?(l(),k(t(Mo),{key:1,items:a.value.rank,"global-top-n":o.globalTopN},null,8,["items","global-top-n"])):(l(),k(t(O),{key:2,title:"🤿 潜水榜"},{default:T(()=>[x(t(le),{text:"暂无潜水数据"})]),_:1}))}}),Go={class:"space-y-6"},Yo={class:"flex items-center gap-3"},Xo={key:1,class:"py-8 text-center text-sm text-gray-400"},Qo={key:1,class:"py-8 text-center text-sm text-gray-400"},Zo={class:"flex items-center gap-3"},Jo={key:2,class:"py-8 text-center text-sm text-gray-400"},en=q({__name:"NightOwlRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(o){const e=o,a=I(null),n=I(!1),i=I("first"),u=I("distribution"),c=I(e.globalTopN??10),g=I(e.globalTopN??10);P(()=>e.globalTopN,p=>{p!==void 0&&(c.value=p,g.value=p)});async function v(){if(e.sessionId){n.value=!0;try{a.value=await J().getNightOwlAnalysis(e.sessionId,e.timeFilter)}catch(p){console.error("加载出勤分析失败:",p)}finally{n.value=!1}}}const h=y(()=>a.value?a.value.lastSpeakerRank.map(p=>({id:String(p.memberId),name:p.name,value:p.count,percentage:p.percentage})):[]),b=y(()=>a.value?a.value.firstSpeakerRank.map(p=>({id:String(p.memberId),name:p.name,value:p.count,percentage:p.percentage})):[]),m=y(()=>i.value==="last"?h.value:b.value),r=y(()=>i.value==="last"?"⏰ 出勤排行 - 最晚下班":"⏰ 出勤排行 - 最早上班"),d=y(()=>{const p=i.value==="last"?"每天最后一个发言的人":"每天第一个发言的人",R=a.value?.totalDays;return R==null?p:`${p}(共 ${R} 天)`}),w=y(()=>u.value==="distribution"?"🦉 修仙统计 - 发言分布":"🦉 修仙统计 - 连续记录"),S=y(()=>u.value==="distribution"?"深夜时段(23:00-05:00)各时段发言分布":"连续在深夜时段发言的天数");return P(()=>[e.sessionId,e.timeFilter],()=>v(),{immediate:!0,deep:!0}),(p,R)=>(l(),$("div",Go,[n.value||a.value?(l(),$(E,{key:0},[x(t(O),{title:w.value,description:S.value},{headerRight:T(()=>[s("div",Yo,[o.showTopNSelect?(l(),k(t(re),{key:0,modelValue:c.value,"onUpdate:modelValue":R[0]||(R[0]=C=>c.value=C)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:u.value,"onUpdate:modelValue":R[1]||(R[1]=C=>u.value=C),items:[{label:"发言分布",value:"distribution"},{label:"连续记录",value:"consecutive"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[n.value?(l(),k(ue,{key:0})):u.value==="distribution"?(l(),$(E,{key:1},[a.value&&a.value.nightOwlRank.length>0?(l(),k(t(No),{key:0,items:a.value.nightOwlRank,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(l(),$("div",Xo,"暂无深夜发言数据"))],64)):(l(),$(E,{key:2},[a.value&&a.value.consecutiveRecords.length>0?(l(),k(t(Ao),{key:0,items:a.value.consecutiveRecords,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(l(),$("div",Qo,"暂无连续记录"))],64))]),_:1},8,["title","description"]),x(t(O),{title:r.value,description:d.value},{headerRight:T(()=>[s("div",Zo,[o.showTopNSelect?(l(),k(t(re),{key:0,modelValue:g.value,"onUpdate:modelValue":R[2]||(R[2]=C=>g.value=C)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:i.value,"onUpdate:modelValue":R[3]||(R[3]=C=>i.value=C),items:[{label:"最早上班",value:"first"},{label:"最晚下班",value:"last"}],size:"sm"},null,8,["modelValue"])])]),default:T(()=>[n.value?(l(),k(ue,{key:0})):m.value.length>0?(l(),k(t(Le),{key:1,members:m.value,title:r.value,"top-n":g.value,unit:"次",bare:""},null,8,["members","title","top-n"])):(l(),$("div",Jo,"暂无数据"))]),_:1},8,["title","description"])],64)):D("",!0)]))}}),tn={class:"mb-8 mt-4"},an={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"}},sn={id:"activity-rank",class:"scroll-mt-24"},on={id:"meme-battle",class:"scroll-mt-24"},nn={id:"repeat",class:"scroll-mt-24"},ln={id:"night-owl",class:"scroll-mt-24"},rn={id:"diving",class:"scroll-mt-24"},un={class:"border-l border-gray-200 pl-4 dark:border-gray-800"},cn={class:"mt-4 border-l border-gray-200 pl-4 dark:border-gray-800"},dn={class:"flex rounded-lg border border-gray-200 bg-white p-0.5 text-xs dark:border-gray-700 dark:bg-page-dark"},mn=["onClick"],vn=q({__name:"OverallRankingTab",props:{sessionId:{},timeFilter:{}},setup(o){const e=o,a=I([]),n=I([]),i=I(!1);async function u(){if(e.sessionId){i.value=!0;try{const p=J(),[R,C]=await Promise.all([p.getMemberActivity(e.sessionId,e.timeFilter),p.getAvailableYears(e.sessionId)]);a.value=R,n.value=C}finally{i.value=!1}}}P(()=>[e.sessionId,e.timeFilter],()=>u(),{immediate:!0,deep:!0});const c=y(()=>{if(e.timeFilter?.startTs&&e.timeFilter?.endTs){const p=new Date(e.timeFilter.startTs*1e3).getFullYear(),R=new Date(e.timeFilter.endTs*1e3).getFullYear();return p===R?`${p} 赛季`:`${p}-${R} 赛季`}if(n.value.length>0){const p=[...n.value].sort((M,L)=>M-L),R=p[0],C=p[p.length-1];return R===C?`${R} 赛季`:`${R}-${C} 赛季`}return i.value?"赛季":"全部赛季"}),g=y(()=>({startTs:e.timeFilter?.startTs,endTs:e.timeFilter?.endTs})),v=[{id:"activity-rank",label:"🏆 活跃榜"},{id:"streak-rank",label:"🔥 火花榜"},{id:"meme-battle",label:"⚔️ 斗图榜"},{id:"repeat",label:"🔁 复读榜"},{id:"night-owl",label:"⏰ 出勤榜"},{id:"diving",label:"🤿 潜水榜"}],{contentRef:h,activeAnchor:b,scrollToAnchor:m}=ha(v,{threshold:350}),r=I(10),d=I("standard");Ke(gt,d);const w=[{value:"standard",label:"标准"},{value:"wide",label:"宽屏"},{value:"full",label:"全宽"}],S=y(()=>ht[d.value].contentClass);return(p,R)=>(l(),$("div",{ref_key:"contentRef",ref:h,class:"flex gap-6 p-6"},[s("div",{class:K(["main-content mx-auto min-w-0 flex-1 space-y-6 px-8",S.value])},[s("div",tn,[s("h1",an," 🏆 "+f(c.value),1),R[1]||(R[1]=s("p",{class:"mt-4 text-sm text-gray-500 dark:text-gray-400"},"各榜单前三名请找群主领取奖励 🎁",-1))]),s("div",sn,[x(t(bo),{"session-id":e.sessionId,"member-activity":a.value,"base-loading":i.value,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","member-activity","base-loading","time-filter","global-top-n"])]),x(t(qo),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"]),s("div",on,[x(t(Eo),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",nn,[x(t(Ko),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",ln,[x(t(en),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",rn,[x(t(Wo),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),R[2]||(R[2]=s("div",{class:"h-48 no-capture"},null,-1))],2),x(t(ka),{anchors:v,"active-anchor":t(b),onClick:t(m)},{default:T(()=>[s("div",un,[R[3]||(R[3]=s("div",{class:"mb-2 text-xs text-gray-400"},"显示数量",-1)),x(t(re),{modelValue:r.value,"onUpdate:modelValue":R[0]||(R[0]=C=>r.value=C)},null,8,["modelValue"])]),s("div",cn,[R[4]||(R[4]=s("div",{class:"mb-2 text-xs text-gray-400"},"榜单宽度",-1)),s("div",dn,[(l(),$(E,null,X(w,C=>s("button",{key:C.value,type:"button",class:K(["rounded-md px-2 py-1 transition",d.value===C.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:M=>d.value=C.value},f(C.label),11,mn)),64))])])]),_:1},8,["active-anchor","onClick"])],512))}}),pn={class:"main-content mx-auto max-w-3xl p-4 sm:p-6"},gn=q({__name:"InteractionRankingTab",props:{sessionId:{},timeFilter:{}},setup(o){const{t:e}=ee(),a=o,n=I(null),i=I(!1);async function u(){if(a.sessionId){i.value=!0;try{n.value=await J().getMentionAnalysis(a.sessionId,a.timeFilter)}catch(r){console.error("加载 @ 互动分析失败:",r)}finally{i.value=!1}}}const c=y(()=>n.value?n.value.topMentioners.map(r=>({id:r.memberId.toString(),name:r.name,value:r.count,percentage:r.percentage})):[]),g=y(()=>n.value?n.value.topMentioned.map(r=>({id:r.memberId.toString(),name:r.name,value:r.count,percentage:r.percentage})):[]),v=I("mentioners"),h=y(()=>[{label:e("members.relationships.rankModes.mentioners"),value:"mentioners"},{label:e("members.relationships.rankModes.mentioned"),value:"mentioned"}]),b=y(()=>v.value==="mentioners"?c.value:g.value),m=y(()=>v.value==="mentioners"?e("members.relationships.topMentionersDescription"):e("members.relationships.topMentionedDescription"));return P(()=>[a.sessionId,a.timeFilter],()=>{u()},{immediate:!0,deep:!0}),(r,d)=>(l(),$("div",pn,[i.value?(l(),k(t(pe),{key:0,text:t(e)("members.relationships.loading")},null,8,["text"])):n.value&&n.value.totalMentions>0&&b.value.length>0?(l(),k(t(es),{key:1,members:b.value,title:t(e)("members.relationships.rankingTitle"),description:m.value,unit:t(e)("members.relationships.times")},{headerRight:T(()=>[x(t(ie),{modelValue:v.value,"onUpdate:modelValue":d[0]||(d[0]=w=>v.value=w),items:h.value,size:"sm"},null,8,["modelValue","items"])]),_:1},8,["members","title","description","unit"])):(l(),k(t(O),{key:2,title:t(e)("members.relationships.emptyTitle")},{default:T(()=>[x(t(le),{text:t(e)("members.relationships.empty")},null,8,["text"])]),_:1},8,["title"]))]))}}),hn={class:"mx-auto h-full max-w-[920px] p-2 sm:p-4"},fn={class:"flex flex-wrap items-center justify-between gap-2 border-b border-gray-200 bg-gray-50 px-3 py-3 dark:border-gray-700 dark:bg-page-dark/50 sm:px-4"},yn={class:"flex items-center gap-3"},bn={class:"inline-flex items-center",role:"group"},xn={class:"flex items-center gap-3"},kn={class:"p-3 w-64"},wn={class:"text-sm font-medium mb-3"},_n={class:"space-y-3"},$n={class:"text-xs text-gray-500 mb-1 block"},Tn={class:"text-xs text-gray-400 mt-1"},Cn={class:"text-xs text-gray-500 mb-1 block"},In={class:"text-xs text-gray-400 mt-1"},Sn={class:"flex-1 min-h-0 overflow-hidden"},Rn={key:0,class:"h-full flex items-center justify-center"},Mn={key:1,class:"h-full flex items-center justify-center"},Ln={class:"text-center text-gray-400"},An={key:2,class:"h-full"},Vn={key:3,class:"h-full flex overflow-hidden"},Nn={class:"w-64 border-r border-gray-200 dark:border-gray-700 flex flex-col overflow-hidden"},Dn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Fn={class:"text-sm font-medium flex items-center gap-2"},qn={class:"flex-1 overflow-y-auto"},Bn=["onClick"],Un={class:"flex items-center justify-between"},Hn={class:"text-sm truncate"},En={class:"text-xs text-gray-400"},Pn={class:"flex-1 overflow-hidden flex flex-col"},zn={key:0,class:"flex-1 flex items-center justify-center"},On={class:"text-center text-gray-400"},jn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center gap-3"},Kn={class:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold bg-primary-500"},Wn={class:"font-medium"},Gn={class:"text-xs text-gray-400"},Yn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Xn={class:"text-sm font-medium flex items-center gap-2"},Qn={class:"flex-1 overflow-y-auto"},Zn={key:0,class:"p-4 text-center text-gray-400"},Jn={class:"flex items-center gap-3"},el={class:"flex-1 min-w-0"},tl={class:"text-sm font-medium truncate"},al={class:"flex items-center gap-3 mt-0.5 text-xs text-gray-400"},sl={class:"w-20 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},ol={key:4,class:"h-full flex flex-col overflow-hidden"},nl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},ll={class:"text-sm font-medium flex items-center gap-2"},il={class:"flex-1 overflow-y-auto"},rl={class:"flex items-center gap-3"},ul={class:"flex-1 min-w-0"},cl={class:"flex items-center gap-2 text-sm"},dl={class:"font-medium truncate"},ml={class:"font-medium truncate"},vl={class:"flex items-center gap-3 mt-1 text-xs text-gray-400"},pl={class:"w-24 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},gl={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"},hl=q({__name:"ProximityRankingTab",props:{sessionId:{},timeFilter:{}},setup(o){ra([ua,ca,da,ma,va]);const e=o,{t:a}=ee(),n=Ct(),i=y(()=>n.value==="dark"),u=I(!0);Jt(u);const c=I(null),g=I("matrix"),v=I(null),h=I({lookAhead:3,decaySeconds:120,topEdges:150}),b=I(null);let m=null;async function r(){if(e.sessionId){u.value=!0;try{c.value=await J().getClusterGraph(e.sessionId,e.timeFilter,{lookAhead:h.value.lookAhead,decaySeconds:h.value.decaySeconds,topEdges:h.value.topEdges})}catch(U){console.error("[chart-cluster] 加载小团体关系数据失败:",U),c.value=null}finally{u.value=!1}}}const d=y(()=>{if(!c.value||c.value.nodes.length===0)return null;const{nodes:U,links:B,maxLinkValue:z}=c.value,G=[...U].sort((H,Y)=>Y.messageCount-H.messageCount).slice(0,20).map(H=>H.name),W=new Map;for(const H of B)W.set(`${H.source}-${H.target}`,H.value),W.set(`${H.target}-${H.source}`,H.value);const N=[];for(let H=0;H<G.length;H++)for(let Y=0;Y<G.length;Y++)if(H===Y)N.push([H,Y,-1]);else{const me=W.get(`${G[H]}-${G[Y]}`)||0;N.push([H,Y,me])}return{names:G,data:N,maxValue:z}});function w(){if(!d.value)return{graphic:{type:"text",style:{text:a("views.cluster.noData"),fill:"#999"}}};const{names:U,data:B,maxValue:z}=d.value;return{tooltip:{position:"top",formatter:Q=>{const[G,W,N]=Q.data;return N<0?`${U[G]}`:N===0?`${U[G]} ↔ ${U[W]}<br/>暂无关系数据`:`${U[G]} ↔ ${U[W]}<br/>临近度: ${N.toFixed(2)}`}},grid:{left:120,right:40,top:40,bottom:120},xAxis:{type:"category",data:U,splitArea:{show:!0},axisLabel:{rotate:45,fontSize:10,color:i.value?"#ccc":"#333"}},yAxis:{type:"category",data:U,splitArea:{show:!0},axisLabel:{fontSize:10,color:i.value?"#ccc":"#333"}},visualMap:{min:0,max:z||1,calculable:!0,orient:"horizontal",left:"center",bottom:10,inRange:{color:i.value?["#1a1a2e","#16213e","#0f3460","#e94560"]:["#f7f7f7","#fce4ec","#f8bbd9","#ee4567"]},textStyle:{color:i.value?"#ccc":"#333"}},series:[{type:"heatmap",data:B.filter(Q=>Q[2]>=0),label:{show:!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],backgroundColor:"transparent"}}const S=y(()=>c.value?[...c.value.nodes].sort((U,B)=>B.messageCount-U.messageCount):[]),p=y(()=>!c.value||v.value===null?null:c.value.nodes.find(U=>U.id===v.value)||null),R=y(()=>{if(!c.value||!p.value)return[];const U=p.value.name,B=[];for(const z of c.value.links)z.source===U?B.push({otherName:z.target,value:z.value,coOccurrenceCount:z.coOccurrenceCount}):z.target===U&&B.push({otherName:z.source,value:z.value,coOccurrenceCount:z.coOccurrenceCount});return B.sort((z,Q)=>Q.value-z.value),B}),C=y(()=>c.value?c.value.links.slice(0,50):[]);function M(){m&&g.value==="matrix"&&m.setOption(w(),{notMerge:!0})}function L(){b.value&&(m=pa(b.value,i.value?"dark":void 0),M())}function j(){m?.resize()}return P(g,async(U,B)=>{B==="matrix"&&m&&(m.dispose(),m=null),U==="matrix"&&(await Be(),L())}),P([c,()=>i.value],()=>{g.value==="matrix"&&M()},{deep:!0}),P(u,async(U,B)=>{B&&!U&&g.value==="matrix"&&(m&&(m.dispose(),m=null),await Be(),L())}),P(()=>[e.sessionId,e.timeFilter],()=>r(),{immediate:!0,deep:!0}),Oe(()=>{window.addEventListener("resize",j),g.value==="matrix"&&Be(()=>L())}),at(()=>{window.removeEventListener("resize",j),m?.dispose(),m=null}),(U,B)=>{const z=Te,Q=lt,G=It,W=Ce;return l(),$("div",hn,[x(t(ia),{class:"flex h-full flex-col"},{default:T(()=>[s("div",fn,[s("div",yn,[s("div",bn,[x(z,{size:"xs",color:g.value==="matrix"?"primary":"neutral",variant:g.value==="matrix"?"solid":"ghost",onClick:B[0]||(B[0]=N=>g.value="matrix")},{default:T(()=>[Z(f(t(a)("views.cluster.matrixView")),1)]),_:1},8,["color","variant"]),x(z,{size:"xs",color:g.value==="member"?"primary":"neutral",variant:g.value==="member"?"solid":"ghost",onClick:B[1]||(B[1]=N=>g.value="member")},{default:T(()=>[Z(f(t(a)("views.cluster.memberView")),1)]),_:1},8,["color","variant"]),x(z,{size:"xs",color:g.value==="circle"?"primary":"neutral",variant:g.value==="circle"?"solid":"ghost",onClick:B[2]||(B[2]=N=>g.value="circle")},{default:T(()=>[Z(f(t(a)("views.cluster.rankingView")),1)]),_:1},8,["color","variant"])])]),s("div",xn,[x(G,null,{content:T(()=>[s("div",kn,[s("h4",wn,f(t(a)("views.cluster.modelSettings")),1),s("div",_n,[s("div",null,[s("label",$n,f(t(a)("views.cluster.lookAhead")),1),x(Q,{modelValue:h.value.lookAhead,"onUpdate:modelValue":B[3]||(B[3]=N=>h.value.lookAhead=N),modelModifiers:{number:!0},type:"number",min:1,max:10,size:"xs",placeholder:"1-10"},null,8,["modelValue"]),s("p",Tn,f(t(a)("views.cluster.lookAheadDesc")),1)]),s("div",null,[s("label",Cn,f(t(a)("views.cluster.decaySeconds")),1),x(Q,{modelValue:h.value.decaySeconds,"onUpdate:modelValue":B[4]||(B[4]=N=>h.value.decaySeconds=N),modelModifiers:{number:!0},type:"number",min:30,max:3600,size:"xs",placeholder:"30-3600"},null,8,["modelValue"]),s("p",In,f(t(a)("views.cluster.decaySecondsDesc")),1)]),x(z,{size:"xs",color:"primary",class:"w-full mt-2",onClick:r},{default:T(()=>[Z(f(t(a)("views.cluster.applySettings")),1)]),_:1})])])]),default:T(()=>[x(z,{variant:"ghost",size:"xs",icon:"i-heroicons-adjustments-horizontal"})]),_:1}),x(z,{variant:"ghost",size:"xs",icon:"i-heroicons-arrow-path",onClick:r})])]),s("div",Sn,[u.value?(l(),$("div",Rn,[x(W,{name:"i-heroicons-arrow-path",class:"w-6 h-6 animate-spin text-gray-400"})])):!c.value||c.value.nodes.length===0?(l(),$("div",Mn,[s("div",Ln,[x(W,{name:"i-heroicons-user-group",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),s("p",null,f(t(a)("views.cluster.noData")),1)])])):g.value==="matrix"?(l(),$("div",An,[s("div",{ref_key:"chartRef",ref:b,class:"w-full h-full"},null,512)])):g.value==="member"?(l(),$("div",Vn,[s("div",Nn,[s("div",Dn,[s("h3",Fn,[x(W,{name:"i-heroicons-users",class:"w-4 h-4"}),Z(" "+f(t(a)("views.cluster.selectMember")),1)])]),s("div",qn,[(l(!0),$(E,null,X(S.value,N=>(l(),$("div",{key:N.id,class:K(["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":v.value===N.id}]),onClick:H=>v.value=N.id},[s("div",Un,[s("span",Hn,f(N.name),1),s("span",En,f(N.messageCount),1)])],10,Bn))),128))])]),s("div",Pn,[p.value?(l(),$(E,{key:1},[s("div",jn,[s("div",Kn,f(p.value.name.charAt(0)),1),s("div",null,[s("div",Wn,f(p.value.name),1),s("div",Gn,f(t(a)("views.cluster.msgCount"))+": "+f(p.value.messageCount)+" | "+f(t(a)("views.cluster.relationCount"))+": "+f(R.value.length),1)])]),s("div",Yn,[s("h3",Xn,[x(W,{name:"i-heroicons-heart",class:"w-4 h-4 text-pink-500"}),Z(" "+f(t(a)("views.cluster.relationsByIntimacy")),1)])]),s("div",Qn,[R.value.length===0?(l(),$("div",Zn,f(t(a)("views.cluster.noRelations")),1)):D("",!0),(l(!0),$(E,null,X(R.value,(N,H)=>(l(),$("div",{key:N.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",Jn,[s("span",{class:K(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold",H<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"])},f(H+1),3),s("div",el,[s("div",tl,f(N.otherName),1),s("div",al,[s("span",null,f(t(a)("views.cluster.intimacy"))+": "+f((N.value*100).toFixed(0))+"%",1),s("span",null,f(t(a)("views.cluster.coOccurrence"))+": "+f(N.coOccurrenceCount)+f(t(a)("views.cluster.times")),1)])]),s("div",sl,[s("div",{class:"h-full bg-linear-to-r from-pink-400 to-pink-600",style:ke({width:`${R.value[0]?.value?N.value/R.value[0].value*100:0}%`})},null,4)])])]))),128))])],64)):(l(),$("div",zn,[s("div",On,[x(W,{name:"i-heroicons-cursor-arrow-rays",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),s("p",null,f(t(a)("views.cluster.selectMemberHint")),1)])]))])])):(l(),$("div",ol,[s("div",nl,[s("h3",ll,[x(W,{name:"i-heroicons-trophy",class:"w-4 h-4 text-yellow-500"}),Z(" "+f(t(a)("views.cluster.interactionRanking")),1)])]),s("div",il,[(l(!0),$(E,null,X(C.value,(N,H)=>(l(),$("div",{key:H,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",rl,[s("span",{class:K(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold",H<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"])},f(H+1),3),s("div",ul,[s("div",cl,[s("span",dl,f(N.source),1),B[5]||(B[5]=s("span",{class:"text-gray-400"},"↔",-1)),s("span",ml,f(N.target),1)]),s("div",vl,[s("span",null,f(t(a)("views.cluster.score"))+": "+f(N.value.toFixed(2)),1),s("span",null,f(t(a)("views.cluster.coOccurrence"))+": "+f(N.coOccurrenceCount)+f(t(a)("views.cluster.times")),1)])]),s("div",pl,[s("div",{class:"h-full bg-linear-to-r from-yellow-400 to-orange-500",style:ke({width:`${C.value[0]?.value?N.value/C.value[0].value*100:0}%`})},null,4)])])]))),128))])]))]),c.value?(l(),$("div",gl,[s("span",null,f(t(a)("views.cluster.totalMembers"))+": "+f(c.value.stats.totalMembers),1),s("span",null,f(t(a)("views.cluster.totalMessages"))+": "+f(c.value.stats.totalMessages.toLocaleString()),1),s("span",null,f(t(a)("views.cluster.involvedMembers"))+": "+f(c.value.stats.involvedMembers),1),s("span",null,f(t(a)("views.cluster.edgeCount"))+": "+f(c.value.stats.edgeCount),1)])):D("",!0)]),_:1})])}}}),fl={class:"flex h-full flex-col"},yl={class:"min-h-0 flex-1 overflow-y-auto"},bl={key:3,class:"main-content mx-auto w-full max-w-3xl p-6"},xl=q({__name:"RankingView",props:{sessionId:{},timeFilter:{},visibleTabIds:{}},setup(o){const e=o,{t:a,locale:n}=ee(),i=I("overall"),u=I(null),c=St({byId:new Map,byName:new Map});Ke(vt,c),P(()=>e.sessionId,async r=>{if(c.value={byId:new Map,byName:new Map},!!r)try{const d=await J().getMembers(r);if(e.sessionId!==r)return;c.value=Sa(d)}catch(d){console.error("Failed to load ranking avatars:",d)}},{immediate:!0});const g=y(()=>Rt("groupRanking",n.value)),v=r=>!e.visibleTabIds||e.visibleTabIds.includes(r),h=y(()=>[...g.value&&v("overall")?[{id:"overall",label:a("analysis.subTabs.ranking.overall"),icon:"i-heroicons-trophy"}]:[],{id:"interaction",label:a("analysis.subTabs.ranking.interaction"),icon:"i-heroicons-heart"},{id:"proximity",label:a("analysis.subTabs.ranking.proximity"),icon:"i-heroicons-user-group"},{id:"hot-repeat",label:a("analysis.subTabs.quotes.hotRepeat"),icon:"i-heroicons-sparkles"},{id:"catchphrase",label:a("analysis.subTabs.quotes.catchphrase"),icon:"i-heroicons-chat-bubble-bottom-center-text"},{id:"keyword",label:a("analysis.subTabs.ranking.keyword"),icon:"i-heroicons-magnifying-glass"}].filter(d=>v(d.id))),b=y(()=>({startTs:e.timeFilter?.startTs,endTs:e.timeFilter?.endTs})),m=y(()=>({...b.value,memberId:u.value}));return P(h,r=>{r.some(d=>d.id===i.value)||(i.value=r[0]?.id??"hot-repeat")},{immediate:!0}),(r,d)=>(l(),$("div",fl,[x(t(ct),{modelValue:i.value,"onUpdate:modelValue":d[1]||(d[1]=w=>i.value=w),items:h.value,"persist-key":"groupRankingTab"},{right:T(()=>[i.value==="catchphrase"?(l(),k(ut,{key:0,modelValue:u.value,"onUpdate:modelValue":d[0]||(d[0]=w=>u.value=w),"session-id":e.sessionId},null,8,["modelValue","session-id"])):D("",!0)]),_:1},8,["modelValue","items"]),s("div",yl,[x(it,{name:"fade",mode:"out-in"},{default:T(()=>[i.value==="overall"?(l(),k(vn,{key:0,"session-id":e.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):i.value==="interaction"?(l(),k(gn,{key:1,"session-id":e.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):i.value==="proximity"?(l(),k(hl,{key:2,"session-id":e.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):i.value==="keyword"?(l(),$("div",bl,[x(po,{"session-id":e.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])])):i.value==="hot-repeat"?(l(),k(t(Is),{key:4,"session-id":e.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):i.value==="catchphrase"?(l(),k(t(gs),{key:5,"session-id":e.sessionId,"time-filter":m.value},null,8,["session-id","time-filter"])):D("",!0)]),_:1})])]))}}),kl=rt(xl,[["__scopeId","data-v-8da082e6"]]),wl={class:"main-content max-w-5xl p-6"},_l={class:"mb-4 text-sm text-gray-500 dark:text-gray-400 no-capture"},$l={key:0,class:"divide-y divide-gray-100 dark:divide-gray-800"},Tl={class:"w-32 shrink-0 pt-0.5 font-medium text-gray-900 dark:text-white"},Cl={class:"flex flex-1 flex-wrap items-center gap-2"},Il={class:"flex items-center gap-1.5 rounded-lg bg-gray-50 px-3 py-1.5 dark:bg-gray-800"},Sl={class:"text-xs text-gray-400"},Rl={key:0,class:"text-gray-300 dark:text-gray-600"},Ml=q({__name:"NicknameHistory",props:{sessionId:{}},setup(o){const{t:e}=ee(),a=o,n=I([]),i=I([]),u=I(!1);function c(h){return h.groupNickname||h.accountName||h.platformId}async function g(){if(a.sessionId)try{n.value=await J().getMembers(a.sessionId)}catch(h){console.error("加载成员列表失败:",h)}}async function v(){if(!a.sessionId||n.value.length===0)return;u.value=!0;const h=[];try{const b=n.value.map(r=>J().getMemberNameHistory(a.sessionId,r.id)),m=await Promise.all(b);n.value.forEach((r,d)=>{const w=m[d];w.length>2&&h.push({memberId:r.id,name:c(r),history:w})}),i.value=h}catch(b){console.error("加载昵称变更记录失败:",b)}finally{u.value=!1}}return P(()=>a.sessionId,async()=>{await g()},{immediate:!0}),P(()=>n.value.length,()=>{n.value.length>0&&v()}),Oe(async()=>{n.value.length===0&&await g()}),(h,b)=>{const m=mt;return l(),$("div",wl,[s("p",_l,f(t(e)("members.nicknameHistory.note")),1),x(t(O),{title:t(e)("members.nicknameHistory.title"),description:u.value?t(e)("members.nicknameHistory.loading"):i.value.length>0?t(e)("members.nicknameHistory.hasChanges",{count:i.value.length}):t(e)("members.nicknameHistory.noChanges")},{default:T(()=>[!u.value&&i.value.length>0?(l(),$("div",$l,[(l(!0),$(E,null,X(i.value,r=>(l(),$("div",{key:r.memberId,class:"flex items-start gap-3 px-5 py-3"},[s("div",Tl,f(r.name),1),s("div",Cl,[(l(!0),$(E,null,X(r.history,(d,w)=>(l(),$(E,{key:w},[s("div",Il,[s("span",{class:K(["text-sm",d.endTs===null?"font-semibold text-pink-600":"text-gray-700 dark:text-gray-300"])},f(d.name),3),d.endTs===null?(l(),k(m,{key:0,color:"primary",variant:"soft",size:"xs"},{default:T(()=>[Z(f(t(e)("members.nicknameHistory.current")),1)]),_:1})):D("",!0),s("span",Sl,"("+f(t(aa)(d.startTs,d.endTs))+")",1)]),w<r.history.length-1?(l(),$("span",Rl,"→")):D("",!0)],64))),128))])]))),128))])):u.value?(l(),k(t(pe),{key:2,text:t(e)("members.nicknameHistory.loadingText")},null,8,["text"])):(l(),k(t(le),{key:1,text:t(e)("members.nicknameHistory.empty")},null,8,["text"]))]),_:1},8,["title","description"])])}}}),Ll={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},Al={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},Vl={class:"text-lg font-semibold text-gray-900 dark:text-white"},Nl={class:"flex-1 overflow-auto"},Dl=q({__name:"NicknameHistoryEntry",props:{sessionId:{}},setup(o){const{t:e}=ee(),a=o,n=I(!1);return(i,u)=>{const c=Te,g=Me;return l(),$(E,null,[x(c,{variant:"ghost",icon:"i-heroicons-clock",size:"sm",onClick:u[0]||(u[0]=v=>n.value=!0)},{default:T(()=>[Z(f(t(e)("analysis.subTabs.member.nicknameHistory")),1)]),_:1}),a.sessionId?(l(),k(g,{key:0,open:n.value,"onUpdate:open":u[2]||(u[2]=v=>n.value=v),ui:{content:"max-w-6xl h-[85vh]"}},{content:T(()=>[s("div",Ll,[s("div",Al,[s("h2",Vl,f(t(e)("analysis.subTabs.member.nicknameHistory")),1),x(c,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:u[1]||(u[1]=v=>n.value=!1)})]),s("div",Nl,[x(Ml,{"session-id":a.sessionId},null,8,["session-id"])])])]),_:1},8,["open"])):D("",!0)],64)}}}),Fl={class:"relative flex h-full flex-col dark:bg-page-dark",style:{"padding-top":"var(--titlebar-area-height)"}},ql=["aria-label"],Bl={class:"relative flex-1 overflow-y-auto"},Ul={class:"h-full"},Hl={key:2,class:"flex h-full items-center justify-center"},El={class:"text-gray-500"},Pl={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},zl={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},Ol={class:"text-lg font-semibold text-gray-900 dark:text-white"},jl={class:"text-sm text-gray-500 dark:text-gray-400"},Kl={class:"flex items-center gap-2"},Wl={class:"flex-1 overflow-hidden"},Gl=q({__name:"index",setup(o){const e=ot(()=>nt(()=>import("./MessageExportModal-C2IUNPhg.js"),__vite__mapDeps([9,1,2,3,10,11,12,13]))),{t:a}=ee(),n=Mt(),i=Lt(),u=At(),c=je(),g=Vt(),{currentSessionId:v}=Nt(u),h=I(!1),b=I(!1),m=I(!1),r=I(!1),d=I(!1);function w(){c.openChatRecordDrawer({})}const S=[{id:"insights",labelKey:"analysis.tabs.insights",icon:"i-heroicons-presentation-chart-bar"},{id:"ranking",labelKey:"analysis.tabs.ranking",icon:"i-heroicons-trophy"},{id:"ai-chat",labelKey:"analysis.tabs.aiChat",icon:"i-heroicons-chat-bubble-left-ellipsis"},{id:"memory",labelKey:"analysis.tabs.memory",icon:"i-heroicons-light-bulb"},{id:"more",labelKey:"analysis.tabs.more",icon:"i-heroicons-squares-2x2"}],{activeTab:p,isLoading:R,isInitialLoad:C,isSessionSwitching:M,session:L,memberActivity:j,hourlyActivity:U,dailyActivity:B,messageTypes:z,timeRangeValue:Q,fullTimeRange:G,availableYears:W,timeFilter:N,initialTimeState:H,loadData:Y,invalidateAnalysisData:me,handleTimeRangeInitialized:Ae}=Pt({route:n,router:i,currentSessionId:v,selectSession:u.selectSession,defaultTab:g.defaultSessionTab,validTabIds:S.map(te=>te.id)});Ke("session-switch-loading",M);const Ie=zt({chatType:"group",isActive:()=>p.value==="insights"&&!M.value,sessionId:v,routePath:()=>n.path}),Ve=y(()=>j.value.reduce((te,A)=>te+A.messageCount,0)),Ne=y(()=>j.value.filter(te=>te.messageCount>0).length);return(te,A)=>{const De=Te,Fe=Me;return l(),$("div",Fl,[t(M)?(l(),$("div",{key:0,"data-testid":"group-chat-switch-loading",class:"absolute inset-0 z-20 flex cursor-wait items-center justify-center bg-page-bg dark:bg-page-dark",style:{paddingTop:"var(--titlebar-area-height)"},role:"status","aria-live":"polite","aria-label":t(a)("common.loading")},[x(t(dt))],8,ql)):D("",!0),t(L)?(l(),$(E,{key:1},[x(Ot,{"active-tab":t(p),"onUpdate:activeTab":A[0]||(A[0]=_=>Qe(p)?p.value=_:null),"time-range-value":t(Q),"onUpdate:timeRangeValue":A[1]||(A[1]=_=>Qe(Q)?Q.value=_:null),title:t(L).name,avatar:t(L).groupAvatar,icon:"i-heroicons-chat-bubble-left-right","icon-class":"bg-primary-600 text-white dark:bg-primary-500 dark:text-white",tabs:S,"current-session-id":t(v),"initial-time-state":t(H),onOpenIncrementalImport:A[2]||(A[2]=_=>m.value=!0),onOpenMemberManagement:A[3]||(A[3]=_=>d.value=!0),onOpenChatRecord:w,"onUpdate:fullRange":A[4]||(A[4]=_=>G.value=_),"onUpdate:availableYears":A[5]||(A[5]=_=>W.value=_),onTimeRangeInitialized:t(Ae)},null,8,["active-tab","time-range-value","title","avatar","current-session-id","initial-time-state","onTimeRangeInitialized"]),s("div",Bl,[t(R)&&!t(M)?(l(),k(t(pe),{key:0,variant:"overlay",text:t(a)("common.loading")},null,8,["text"])):D("",!0),s("div",Ul,[x(it,{name:"tab-slide",mode:"out-in"},{default:T(()=>[t(p)==="insights"?(l(),k(Ds,{key:"insights-"+t(v),"session-id":t(v),session:t(L),"member-activity":t(j),"message-types":t(z),"hourly-activity":t(U),"daily-activity":t(B),"time-range":t(G),"filtered-message-count":Ve.value,"filtered-member-count":Ne.value,"time-filter":t(N),onSelectTab:t(Ie)},null,8,["session-id","session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter","onSelectTab"])):t(p)==="ranking"?(l(),k(kl,{key:"ranking-"+t(v),"session-id":t(v),"time-filter":t(N)},null,8,["session-id","time-filter"])):t(p)==="ai-chat"?(l(),k(t(jt),{key:"ai-chat-"+t(v),"session-id":t(v),"session-name":t(L).name,"chat-type":"group"},null,8,["session-id","session-name"])):t(p)==="memory"?(l(),k(Kt,{key:"memory-"+t(v),"session-id":t(v),"session-name":t(L).name},null,8,["session-id","session-name"])):t(p)==="more"?(l(),k(Wt,{key:"more-"+t(v),"session-id":t(v),"chat-type":"group"},null,8,["session-id"])):D("",!0)]),_:1})])]),x(Gt,{onOpenIncrementalImport:A[6]||(A[6]=_=>m.value=!0),onOpenSemanticIndex:A[7]||(A[7]=_=>h.value=!0),onOpenMemberManagement:A[8]||(A[8]=_=>d.value=!0),onOpenChatRecord:w,onOpenMessageExport:A[9]||(A[9]=_=>r.value=!0)})],64)):t(C)?D("",!0):(l(),$("div",Hl,[s("p",El,f(t(a)("analysis.groupChat.loadError")),1)])),t(v)&&t(L)?(l(),k(Yt,{key:3,modelValue:h.value,"onUpdate:modelValue":A[10]||(A[10]=_=>h.value=_),"session-id":t(v),"message-count":t(L).messageCount},null,8,["modelValue","session-id","message-count"])):D("",!0),t(v)&&t(L)?(l(),k(ga,{key:4,modelValue:b.value,"onUpdate:modelValue":A[11]||(A[11]=_=>b.value=_),"session-id":t(v),"chat-type":"group","auto-check":""},null,8,["modelValue","session-id"])):D("",!0),t(v)&&t(L)?(l(),k(Xt,{key:5,modelValue:m.value,"onUpdate:modelValue":A[12]||(A[12]=_=>m.value=_),"session-id":t(v),"session-name":t(L).name,onImported:A[13]||(A[13]=()=>{t(Y)(),t(me)(),t(u).loadSessions()})},null,8,["modelValue","session-id","session-name"])):D("",!0),t(v)?(l(),k(t(e),{key:6,modelValue:r.value,"onUpdate:modelValue":A[14]||(A[14]=_=>r.value=_)},null,8,["modelValue"])):D("",!0),t(v)?(l(),k(Fe,{key:7,open:d.value,"onUpdate:open":A[17]||(A[17]=_=>d.value=_),ui:{content:"max-w-6xl h-[85vh]"}},{content:T(()=>[s("div",Pl,[s("div",zl,[s("div",null,[s("h2",Ol,f(t(a)("analysis.tooltip.memberManagement")),1),s("p",jl,f(t(a)("members.list.description",{count:t(L)?.memberCount??0})),1)]),s("div",Kl,[x(Dl,{"session-id":t(v)},null,8,["session-id"]),x(De,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:A[15]||(A[15]=_=>d.value=!1)})])]),s("div",Wl,[x(Qt,{"session-id":t(v),"show-header":!1,"chat-type":"group",onDataChanged:A[16]||(A[16]=()=>{t(Y)(),t(me)()})},null,8,["session-id"])])])]),_:1},8,["open"])):D("",!0)])}}}),Di=rt(Gl,[["__scopeId","data-v-021279bd"]]);export{Di as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as o,b as S,d as L,a6 as q,ak as B,aD as A,ba as K,bb as U,bc as z,bd as H,K as G,al as J,o as p,c as j,z as R,w as _,f as k,g as t,a1 as O,be as E,l as Q,aE as W,k as X,aJ as Z,ah as ee}from"./index-
|
|
1
|
+
import{e as o,b as S,d as L,a6 as q,ak as B,aD as A,ba as K,bb as U,bc as z,bd as H,K as G,al as J,o as p,c as j,z as R,w as _,f as k,g as t,a1 as O,be as E,l as Q,aE as W,k as X,aJ as Z,ah as ee}from"./index-D9C3dyV8.js";import{P as ae}from"./PageHeader-D5BcYKBs.js";import{_ as F}from"./TimeSelect.vue_vue_type_script_setup_true_lang-BehUIWki.js";import{_ as te}from"./PageTabs.vue_vue_type_script_setup_true_lang-DHly2-fe.js";import"./vendor-snapdom--nZvo8Sg.js";import"./Select-BAnN4HMs.js";import"./useFormControl-CJyJY8AK.js";import"./clamp-jFYhBC76.js";import"./Tabs-DwjL-ueH.js";import"./Tabs-xVtuBuO0.js";import"./RovingFocusItem-Bqgmzo42.js";import"./DatePicker.vue_vue_type_script_setup_true_lang-CSp691Uv.js";function oe(u,m,l,f){const s=u?.state;return s&&(!l||l.includes(s.mode))?{...s}:{mode:m,year:f}}function ne(u){return[u.defaultMode,u.allowedModes.join(","),u.allowedRecentDays?.join(",")].join(":")}function se(u,m){const l=new Date().getFullYear(),f=Math.floor(Date.now()/1e3),s=S(null),h=S(l),y=S(0),d=S([l]),v=o(()=>oe(s.value,u?.value??"year",m?.value,h.value)),T=o(()=>{const i=d.value.at(-1)??l;return{availableYears:d.value,fullRange:{start:Math.floor(new Date(i,0,1).getTime()/1e3),end:f}}});function n(i){const g=[...new Set([l,...i])].sort((r,w)=>w-r);g.join(",")!==d.value.join(",")&&(d.value=g)}function x(i){h.value=i,s.value=null,y.value++}return{modelValue:s,componentKey:y,initialState:v,rangeSource:T,setAvailableYears:n,switchToYear:x}}const le={class:"flex h-full flex-col text-gray-900 dark:bg-page-dark dark:text-gray-100",style:{"padding-top":"var(--titlebar-area-height)"}},ie={key:1,class:"mt-3 flex justify-end pb-1.5"},re=L({__name:"index",setup(u){const{t:m}=q(),{translate:l}=B(),f=A(),s=K(),{controller:h,snapshot:y}=U(),d=z(s),v=o(()=>String(f.meta.insightPageId??d[0]?.id??"")),T=o(()=>d.find(e=>e.id===v.value)),n=o(()=>T.value?.filters?.time),x=o(()=>n.value?.defaultMode??"year"),i=o(()=>n.value?[...n.value.allowedModes]:void 0),g=se(x,i),{modelValue:r,componentKey:w,initialState:Y,rangeSource:I}=g,b=s.ui.insightScope;if(!(b instanceof H))throw new Error("Insight scope host controller is unavailable");const N=b.attachTimeCommands({setAvailableYears:g.setAvailableYears,switchToYear:g.switchToYear}),P=G([r,n],([e,c])=>{const a=e?.state;b.updateSnapshot({time:e&&a&&c?.allowedModes.includes(a.mode)?{mode:a.mode,startTs:e.startTs,endTs:e.endTs,isFullRange:e.isFullRange,recentDays:a.recentDays,year:a.year,quarterYear:a.quarterYear,quarter:a.quarter,customStart:a.customStart,customEnd:a.customEnd}:void 0})},{immediate:!0}),$=o(()=>(y.value.revision,h.getResolvedLayout())),D=o(()=>$.value.primary.find(e=>e.kind==="group"&&e.entries.some(({page:c})=>c.id===v.value))),V=o(()=>(D.value?.kind==="group"?D.value.entries:[]).map(({page:e})=>({id:e.id,label:l(e.title),icon:e.icon,to:{name:e.routeName}}))),C=o(()=>n.value?.allowedRecentDays?[...n.value.allowedRecentDays]:void 0),M=o(()=>{const e=n.value;return e?ne(e):"none"});return J(()=>{P(),N(),b.updateSnapshot({})}),(e,c)=>(p(),j("div",le,[R(ae,{title:t(m)("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:_(()=>[V.value.length>0?(p(),k(t(te),{key:0,class:"mt-3 min-h-[38px] pb-1.5","model-value":v.value,items:V.value,"aria-label":t(m)("insight.tabs.nav")},O({_:2},[n.value?{name:"right",fn:_(()=>[(p(),k(F,{key:`${t(w)}:${M.value}`,modelValue:t(r),"onUpdate:modelValue":c[0]||(c[0]=a=>E(r)?r.value=a:null),"range-source":t(I),"allowed-modes":i.value,"allowed-recent-days":C.value,"initial-state":t(Y)},null,8,["modelValue","range-source","allowed-modes","allowed-recent-days","initial-state"]))]),key:"0"}:void 0]),1032,["model-value","items","aria-label"])):n.value?(p(),j("div",ie,[(p(),k(F,{key:`${t(w)}:${M.value}`,modelValue:t(r),"onUpdate:modelValue":c[1]||(c[1]=a=>E(r)?r.value=a:null),"range-source":t(I),"allowed-modes":i.value,"allowed-recent-days":C.value,"initial-state":t(Y)},null,8,["modelValue","range-source","allowed-modes","allowed-recent-days","initial-state"]))])):Q("",!0)]),_:1},8,["title"]),R(t(Z),null,{default:_(({Component:a})=>[R(W,{name:"insight-tab-slide",mode:"out-in"},{default:_(()=>[(p(),k(X(a),{key:v.value}))]),_:2},1024)]),_:1})]))}}),Se=ee(re,[["__scopeId","data-v-7e7305c7"]]);export{Se as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RelationshipGalaxyThreeCanvas-
|
|
2
|
-
import{d as Rt,a6 as Tt,L as Nt,K as de,x as Mt,al as It,o as y,c as k,a as n,f as te,g,z as M,a1 as Pt,w as he,a8 as Lt,aQ as Et,aq as Gt,p as i,F as Ne,j as Me,n as Ie,aN as Pe,l as L,a9 as Le,O as Kt,bs as Ue,b as m,e as h,C as ae,bt as qe,bv as Vt}from"./index-DnpnIyle.js";import{_ as At}from"./Tabs-RWKHwtfM.js";import{u as Ft}from"./useToast-CCPBE-Sy.js";import{_ as $t}from"./LoadingState.vue_vue_type_script_setup_true_lang-CoeQsaiL.js";import{u as zt}from"./people-page-header-Cx5r9Bk2.js";import{b as Ot,a as Dt}from"./relationship-galaxy-connections-Cg4G5yYE.js";const jt=10,Ye=80,Bt=2880*60*60,Qe=.1;function Ht(e,l,r={}){if(!l)return{items:[],total:0,hasMore:!1};const b=new Map(e.nodes.map(v=>[v.key,v])),a=e.edges.flatMap(v=>{if(v.sourceKey!==l&&v.targetKey!==l)return[];const _=v.sourceKey===l?v.targetKey:v.sourceKey,K=b.get(_);return K?[{node:K,edge:v,connectionScore:0}]:[]}),u=a.reduce((v,_)=>Math.max(v,_.edge.lastInteractionTs??0),0),E=new Map(a.map(v=>[v,Ee(v.edge,u)]));for(const v of a)v.connectionScore=Ut(E.get(v)??0);a.sort((v,_)=>qt(v,_,u));const G=r.collapsedLimit??jt;return{items:r.expanded?a:a.slice(0,G),total:a.length,hasMore:!r.expanded&&a.length>G}}function Eo(e,l,r={}){return Dt(e,l,{limit:r.limit??Ye})}function Go(e,l,r={}){return Ot(e,l,r)}function Ut(e){return e<=0?0:Math.max(1,Math.round(e))}function qt(e,l,r){const b=Ee(l.edge,r),a=Ee(e.edge,r);if(b!==a)return b-a;if(l.edge.weight!==e.edge.weight)return l.edge.weight-e.edge.weight;const u=l.edge.lastInteractionTs??0,E=e.edge.lastInteractionTs??0;return u!==E?u-E:e.node.rank!==l.node.rank?e.node.rank-l.node.rank:e.node.key.localeCompare(l.node.key)}function Ee(e,l){if(!e.lastInteractionTs||l<=0)return e.weight;const r=Math.max(0,l-e.lastInteractionTs),b=Qe+(1-Qe)*Math.pow(.5,r/Bt);return e.weight*b}function We(e){return e.selectedKey&&e.selectedKey===e.loadingNeighborhoodKey?e.currentCanvasSelectedKey:e.selectedKey}function Qt(e){return e.selectedKey?e.isNeighborhoodMode?e.selectedKey!==e.neighborhoodContactKey:!0:!1}function Wt(e){return e.neighborhoodTask?.status==="running"?e.neighborhoodTask:e.graphTask?.status==="running"?e.graphTask:e.isNeighborhoodMode&&e.neighborhoodTask?e.neighborhoodTask:e.graphTask??e.neighborhoodTask??null}function Yt(e){return e.nextTaskStatus==="running"?{type:"continue-polling"}:e.previousTaskStatus==="running"&&e.nextTaskStatus==="succeeded"&&e.neighborhoodContactKey?{type:"refresh-neighborhood",key:e.neighborhoodContactKey}:{type:"stop-polling"}}function Xt(e){return e.loadError?e.loadError:e.isTaskFailed&&e.statusText?e.statusText:e.emptyText}const Jt=new RegExp("\\p{Script=Han}","u");function Xe(e){const l=e?.trim()??"";if(!l)return"*";const r=Array.from(l),b=[...r].reverse().find(a=>Jt.test(a));return b?`**${b}`:r.length===1?"*":r.length===2?`${r[0]}***`:`${r[0]}***${r.at(-1)}`}function Je(e,l){if(e.kind==="owner")return l.ownerLabel;const r=e.displayName||e.platformId||e.key;return l.privacyMode?Xe(r):r}function Zt(e,l){return e.kind==="owner"?l.ownerLabel:l.privacyMode?"*":(e.displayName||e.platformId||"?").slice(0,1)}function ea(e,l){return e.kind==="owner"?e.avatar:l?null:e.avatar}function ta(e,l){const r=e.platformId||e.key;return l?Xe(r):r}const aa="3d";function oa(e){return e==="3d"?"2d":e}function na(e,l,r){return l||r?r:e?.captureView()??null}function sa(e,l){return l&&e?.restoreView(l)===!0?!0:(e?.fitView(),!1)}function la(e,l){return{nodes:e.nodes.map(r=>({...r,displayName:Je(r,l),visualRole:r.kind==="owner"?"anchor":r.pool==="friend"?"close":"standard",importance:ca(r)})),edges:e.edges.map(r=>({...r})),communities:e.communities.map(r=>({...r}))}}function ra(e,l){const r=new Map(e.nodes.map(u=>[u.key,u])),b=new Map(e.edges.map(u=>[u.id,u])),a=new Map(e.communities.map(u=>[u.id,u]));for(const u of l.nodes)r.has(u.key)||r.set(u.key,u);for(const u of l.edges)b.set(u.id,u);for(const u of l.communities)a.has(u.id)||a.set(u.id,u);return{nodes:[...r.values()],edges:[...b.values()],communities:[...a.values()]}}function ia(e){const l=e.selectedKey;return!l||!e.neighborhood||!e.neighborhood.nodes.some(r=>r.key===l)?e.panorama:ra(e.panorama,e.neighborhood)}function ca(e){if(e.kind==="owner")return 1;const l=oe(e.score,0,1),r=oe(1-(e.rank-1)/120,0,1),b=oe(Math.log10(e.privateMessageCount+1)/4,0,1),a=oe(Math.log10(e.groupMessageCount+1)/4.5,0,1),u=e.pool==="friend"?.12:0;return oe(l*.36+r*.36+b*.18+a*.08+u,0,1)}function oe(e,l,r){return Math.min(r,Math.max(l,e))}const ua={class:"flex min-h-0 flex-1 overflow-hidden text-gray-900 dark:bg-page-dark dark:text-gray-100"},da={class:"dark relative min-h-0 min-w-0 flex-1 overflow-hidden bg-[#03050c] text-gray-100"},ha={class:"absolute left-4 top-4 z-20 flex max-w-[calc(100%-2rem)] flex-wrap items-center gap-1.5 rounded-2xl border border-white/8 bg-[#070a12]/78 p-1.5 shadow-overlay backdrop-blur-xl sm:left-6 sm:max-w-[calc(100%-3rem)]"},pa={class:"relative w-28 max-w-full sm:w-32 lg:w-36"},va={key:0,class:"absolute left-0 top-full z-30 mt-2 max-h-80 w-72 overflow-y-auto rounded-2xl border border-gray-200/80 bg-white/95 p-2 shadow-overlay backdrop-blur-xl scrollbar-thin dark:border-white/10 dark:bg-page-dark/95"},fa={class:"px-2 pb-1.5 pt-0.5 text-[11px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400"},ga={class:"space-y-1"},ma=["disabled","onClick"],ya={class:"min-w-0 flex-1"},xa={class:"block truncate text-sm font-semibold text-gray-900 transition-colors group-hover:text-sky-600 dark:text-white dark:group-hover:text-sky-400"},ba={class:"block truncate text-[11px] text-gray-500 dark:text-gray-400"},ka={key:0,class:"shrink-0 rounded-md bg-sky-100/60 px-1.5 py-0.5 text-[10px] font-semibold text-sky-600 dark:bg-sky-500/15 dark:text-sky-400"},wa={key:2,class:"absolute bottom-6 left-1/2 z-20 flex max-w-[min(560px,calc(100%-2rem))] -translate-x-1/2 items-center gap-2.5 rounded-2xl border border-sky-500/20 bg-[#090d16]/85 px-4 py-2.5 text-center text-xs font-semibold text-sky-200 shadow-overlay backdrop-blur-md animate-fade-in"},_a={key:4,class:"absolute inset-0 flex items-center justify-center text-sm font-medium text-gray-400"},Sa={key:5,class:"dark absolute inset-x-3 bottom-3 z-20 flex max-h-[70vh] flex-col overflow-hidden rounded-2xl border border-white/8 bg-[#070a12]/84 text-white shadow-overlay backdrop-blur-2xl md:inset-x-auto md:bottom-4 md:right-4 md:top-4 md:max-h-none md:w-[360px]"},Ca={key:0,class:"flex min-h-0 flex-1 flex-col gap-3 px-4 pb-4 pt-5"},Ra={class:"shrink-0 space-y-2.5"},Ta={class:"flex items-center gap-3 pr-8"},Na={class:"min-w-0 flex-1"},Ma={class:"flex min-w-0 items-center gap-1.5"},Ia={class:"truncate text-base font-bold text-gray-900 dark:text-white"},Pa={class:"truncate text-xs text-gray-500 dark:text-gray-400"},La={class:"grid grid-cols-3 gap-y-1 rounded-xl border border-white/8 bg-white/3 p-1 text-xs"},Ea={class:"min-w-0 px-2 py-1.5"},Ga={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},Ka={class:"flex min-w-0 items-baseline gap-0.5"},Va={class:"font-mono text-sm font-bold leading-4 text-sky-600 dark:text-sky-400"},Aa={class:"min-w-0 border-l border-white/6 px-2 py-1.5"},Fa={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},$a={class:"min-w-0 border-l border-white/6 px-2 py-1.5"},za={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},Oa={class:"block truncate font-mono text-sm font-bold leading-4 text-gray-900 dark:text-white"},Da={class:"min-w-0 border-t border-white/6 px-2 py-1.5"},ja={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},Ba={class:"block truncate font-mono text-sm font-bold leading-4 text-gray-900 dark:text-white"},Ha={class:"min-w-0 border-l border-t border-white/6 px-2 py-1.5"},Ua={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},qa={class:"block truncate font-mono text-sm font-bold leading-4 text-gray-900 dark:text-white"},Qa={class:"min-w-0 border-l border-t border-white/6 px-2 py-1.5"},Wa={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},Ya={class:"block truncate text-[11px] font-semibold leading-4 text-gray-900 dark:text-white"},Xa={class:"flex min-h-0 flex-1 flex-col gap-2"},Ja={class:"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-white/7 pt-3"},Za={class:"mb-2 flex shrink-0 items-center justify-between gap-3 pl-1 pr-3"},eo={class:"flex min-w-0 items-center gap-2"},to={class:"truncate text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400"},ao={class:"shrink-0 font-mono text-[10px] font-bold text-gray-400 dark:text-gray-500"},oo={class:"w-14 shrink-0 text-right text-[10px] font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500"},no={key:0,class:"min-h-0 flex-1 space-y-0.5 overflow-y-auto pr-1 scrollbar-thin"},so=["onClick"],lo={class:"min-w-0 flex-1"},ro={class:"block truncate text-[13px] font-semibold leading-4 text-gray-900 transition-colors group-hover:text-sky-600 dark:text-white dark:group-hover:text-sky-400"},io={class:"flex w-14 shrink-0 justify-end"},co={class:"font-mono text-[10px] font-bold text-gray-500 dark:text-gray-400"},uo={key:1,class:"py-4 text-center text-xs text-gray-400 dark:text-gray-500"},ho={key:0,class:"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-white/7 pt-3"},po={class:"mb-2 flex shrink-0 items-center justify-between gap-3 pl-1 pr-3"},vo={class:"flex min-w-0 items-center gap-2"},fo={class:"truncate text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400"},go={class:"shrink-0 font-mono text-[10px] font-bold text-gray-400 dark:text-gray-500"},mo={class:"w-14 shrink-0 text-right text-[10px] font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500"},yo={class:"min-h-0 flex-1 space-y-0.5 overflow-y-auto pr-1 scrollbar-thin"},xo={class:"flex min-w-0 items-center gap-2"},bo={class:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-white/45 shadow-sm dark:bg-white/5"},ko={class:"truncate font-semibold leading-4 text-gray-700 dark:text-gray-200"},wo={class:"flex w-14 shrink-0 justify-end"},_o={class:"font-mono text-[10px] font-bold text-gray-500 dark:text-gray-400"},So=1400,Co=392,Ro=Rt({__name:"index",setup(e){const l={nodes:[],edges:[],communities:[]},r=Ue(()=>qe(()=>import("./RelationshipGalaxyThreeCanvas-LlaX57z6.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),b=Ue(()=>qe(()=>import("./RelationshipGalaxyCanvas-Cn7Eta5U.js").then(t=>t.as),__vite__mapDeps([7,1,2,3,5]))),{t:a,locale:u}=Tt(),E=Nt(),G=Ft(),A=m("1y"),v=m("panorama"),_=m(""),K=m(""),z=m(!1),ne=m(""),d=m(null),V=m(!1),O=m(null),C=m(null),pe=m(!1),ve=m(!1),q=m(!1),Ge=m(!1),F=m(null),R=m(null),I=m(!1),D=m(aa),Q=m(""),W=m(0),j=m(0),T=m(null),se=m(null);let le=null,fe=null,Y=null,X=null,re=null;const Ze=h(()=>new Intl.NumberFormat(u.value)),et=h(()=>Vt.map(t=>({label:a(`relationships.timeRange.${t}`),value:t}))),tt=h(()=>[{label:a("relationships.graphScope.panorama"),value:"panorama"},{label:a("relationships.graphScope.close"),value:"close"},{label:a("relationships.graphScope.friends"),value:"friends"}]),P=h(()=>O.value?.graph??l),$=h(()=>C.value?.graph??P.value),Ke=h(()=>ia({panorama:P.value,neighborhood:C.value?.graph??null,selectedKey:d.value})),at=h(()=>la(Ke.value,{privacyMode:I.value,ownerLabel:a("relationships.owner.me")})),ot=h(()=>{const t=d.value;return t&&Ke.value.nodes.some(s=>s.key===t)?t:null}),ge=h(()=>!!C.value),me=h(()=>P.value.nodes.length>0||$.value.nodes.length>0),J=h(()=>Wt({graphTask:O.value?.task??null,neighborhoodTask:C.value?.task??null,isNeighborhoodMode:ge.value})),Z=h(()=>J.value?.status==="running"),Ve=h(()=>J.value?.status==="failed"),nt=h(()=>O.value?.cache.status??C.value?.cache.status),Ae=h(()=>O.value?.searchResults??[]),Fe=h(()=>_.value.trim().length>0),st=h(()=>Fe.value&&_.value.trim()===ne.value&&z.value&&Ae.value.length>0),lt=h(()=>(pe.value||Z.value)&&!me.value),rt=h(()=>Z.value&&me.value),x=h(()=>d.value?$.value.nodes.find(t=>t.key===d.value)??P.value.nodes.find(t=>t.key===d.value)??C.value?.contact??null:null),$e=h(()=>V.value&&!!x.value),ze=h(()=>$e.value&&Ge.value?Co:0),it=h(()=>Qt({selectedKey:d.value,isNeighborhoodMode:ge.value,neighborhoodContactKey:C.value?.contact?.key??null})),ie=h(()=>Ht($.value,d.value,{collapsedLimit:Ye})),ye=h(()=>({nodes:P.value.nodes.length,edges:P.value.edges.length,communities:P.value.communities.length})),xe=h(()=>[...$.value.communities].sort((t,s)=>s.size-t.size).slice(0,8)),be=h(()=>nt.value==="stale"&&Z.value?a("relationships.task.updating"):Z.value?vt(J.value):Ve.value?J.value?.lastError||a("relationships.task.failed"):""),ct=h(()=>Xt({loadError:Q.value,isTaskFailed:Ve.value,statusText:be.value,emptyText:a("relationships.empty")}));function w(t){return Ze.value.format(t)}function ut(t){return Math.round(t*100).toString()}function dt(){const t=ie.value.items.length,s=ie.value.total;return s<=t?w(s):`${w(t)} / ${w(s)}`}function ht(t){return t?new Date(t*1e3).toLocaleDateString():a("relationships.detail.emptyValue")}function ke(t){return Zt(t,{privacyMode:I.value,ownerLabel:a("relationships.owner.avatarText")})}function we(t){return ea(t,I.value)}function B(t){return Je(t,{privacyMode:I.value,ownerLabel:a("relationships.owner.me")})}function pt(t){return ta(t,I.value)}function Oe(t){return t.kind==="owner"?a("relationships.owner.type"):t.friendSource==="manual"?a("relationships.pool.manualFriend"):t.pool==="friend"?a("relationships.pool.friend"):a("relationships.pool.nonFriend")}function vt(t){return a("relationships.task.running",{current:w(t?.processedSessions??0),total:w(t?.totalSessions??0)})}function De(t){const s=je(t,v.value);le&&le!==s&&ce();const f=O.value;O.value=f&&le===s?{...t,graph:f.graph}:t,le=s}function ft(t){const s=je(t,`neighborhood:${t.contact?.key??""}`),f=C.value;C.value=f&&fe===s?{...t,graph:f.graph}:t,fe=s}function H(){C.value=null,fe=null}function je(t,s){const f=t.graph;let o=2166136261;o=S(o,s),o=S(o,t.algorithmVersion),o=S(o,t.cache.signature??""),o=N(o,t.timeRange.startTs??0),o=S(o,t.timeRange.preset);for(const p of f.nodes)o=S(o,p.key),o=S(o,p.pool),o=S(o,p.friendSource??""),o=N(o,p.rank),o=N(o,Math.round(p.score*1e6)),o=N(o,p.labelVisibility),o=N(o,Math.round(p.x*100)),o=N(o,Math.round(p.y*100)),o=N(o,Math.round(p.size*100));for(const p of f.edges)o=S(o,p.id),o=S(o,p.sourceKey),o=S(o,p.targetKey),o=N(o,Math.round(p.weight*1e6)),o=N(o,p.visibility);for(const p of f.communities)o=S(o,p.id),o=N(o,p.size),o=S(o,p.color);return`${s}:${f.nodes.length}:${f.edges.length}:${f.communities.length}:${o>>>0}`}function S(t,s){for(let f=0;f<s.length;f+=1)t^=s.charCodeAt(f),t=Math.imul(t,16777619);return t}function N(t,s){return S(t,String(s))}function _e(){Y&&(clearInterval(Y),Y=null)}function U(){j.value+=1,q.value=!1,F.value=null}function Be(){se.value=na(T.value,d.value,se.value)}function ce(){se.value=null}function gt(){const t=se.value;ce(),ae(()=>{sa(T.value,t)})}function Se(t){if(t?.status==="running"){Y||(Y=setInterval(()=>{ee({silent:!0,preserveNeighborhood:!0})},So));return}_e()}async function ee(t={}){const s=W.value+1;W.value=s;const f=J.value?.status??null,o=t.preserveNeighborhood?C.value?.contact?.key??null:null;t.silent||(pe.value=!0),t.preserveNeighborhood||(U(),H()),Q.value="";try{const p=await E.getPeopleRelationships({acceptStale:!0,timeRangePreset:A.value,graphScope:v.value,query:K.value.trim()||void 0});if(s!==W.value)return;De(p),ne.value=K.value.trim(),d.value&&!$.value.nodes.some(Te=>Te.key===d.value)&&(d.value=null,R.value=null,V.value=!1);const c=Yt({previousTaskStatus:f,nextTaskStatus:p.task?.status??null,neighborhoodContactKey:o});Se(p.task),c.type==="refresh-neighborhood"&&ue(c.key)}catch(p){if(s!==W.value)return;Q.value=String(p),G.fail(a("relationships.toast.loadFailed"),{description:String(p)}),_e()}finally{s===W.value&&(pe.value=!1)}}async function mt(){ve.value=!0,Q.value="";try{const t=await E.recomputePeopleRelationships({timeRangePreset:A.value,graphScope:v.value,query:K.value.trim()||void 0});De(t),ne.value=K.value.trim(),U(),H(),d.value=null,R.value=null,V.value=!1,Se(t.task),G.success(a("relationships.toast.recomputeStarted"))}catch(t){G.fail(a("relationships.toast.recomputeFailed"),{description:String(t)})}finally{ve.value=!1}}const yt=h(()=>({title:a("layout.relationships"),description:a("relationships.subtitle"),icon:"i-lucide-git-fork",iconClass:"bg-primary-600 text-white dark:bg-primary-500 dark:text-white shadow-sm",action:{label:a("relationships.actions.recompute"),icon:"i-lucide-refresh-cw",loading:ve.value,disabled:Z.value,class:"border border-sky-100 hover:border-sky-200 dark:border-sky-950/30 dark:hover:border-sky-900/50",onClick:mt},stats:[{id:"nodes",label:a("relationships.stats.nodes"),value:w(ye.value.nodes)},{id:"edges",label:a("relationships.stats.edges"),value:w(ye.value.edges)},{id:"communities",label:a("relationships.stats.communities"),value:w(ye.value.communities),dividerBefore:!0}]}));zt(yt);async function ue(t){const s=j.value+1;j.value=s,q.value=!0,F.value=t,Q.value="";const f=!P.value.nodes.some(o=>o.key===t);try{const o=await E.getPeopleRelationshipNeighborhood(t,{acceptStale:!0,timeRangePreset:A.value,graphScope:v.value});if(s!==j.value)return;ft(o),d.value=o.contact?.key??t,R.value=d.value,Se(o.task),await ae(),D.value==="2d"?T.value?.fitView():f&&d.value&&T.value?.focusNode(d.value)}catch(o){if(s!==j.value)return;G.fail(a("relationships.toast.neighborhoodFailed"),{description:String(o)})}finally{s===j.value&&(q.value=!1,F.value=null)}}async function xt(){d.value&&await ue(d.value)}async function bt(t){if(Be(),z.value=!1,t.inCoreGraph||(F.value=t.key),d.value=t.key,V.value=!0,R.value=We({selectedKey:d.value,loadingNeighborhoodKey:F.value,currentCanvasSelectedKey:R.value}),!t.inCoreGraph){await ue(t.key);return}U(),H(),await ae(),T.value?.focusNode(t.key)}async function Ce(t){Be();const s=C.value?.contact?.key!==t.key;if(s&&(F.value=t.key),d.value=t.key,V.value=!0,R.value=We({selectedKey:d.value,loadingNeighborhoodKey:F.value,currentCanvasSelectedKey:R.value}),await ae(),T.value?.focusNode(t.key),s){await ue(t.key);return}R.value=d.value}async function kt(t){const s=P.value.nodes.find(f=>f.key===t.key)??$.value.nodes.find(f=>f.key===t.key);s&&await Ce(s)}function wt(){const t=oa(D.value);t!==D.value&&(D.value=t,G.warn(a("relationships.toast.threeUnavailable")))}function He(){U(),H(),d.value=null,R.value=null,V.value=!1,gt()}function _t(){He()}function St(){_.value="",ne.value="",z.value=!1}function Ct(){T.value?.fitView()}function Re(){Ge.value=re?.matches??!1}return de(A,()=>{ce(),d.value=null,R.value=null,V.value=!1,U(),H(),ee()}),de(v,()=>{ce(),d.value=null,R.value=null,V.value=!1,U(),H(),ee()}),de(_,t=>{X&&clearTimeout(X),z.value=t.trim().length>0,X=setTimeout(()=>{K.value=t,ee({silent:!0,preserveNeighborhood:!0})},260)}),de(D,async()=>{if(await ae(),d.value){T.value?.focusNode(d.value);return}T.value?.fitView()}),Mt(()=>{typeof window<"u"&&(re=window.matchMedia("(min-width: 768px)"),Re(),re.addEventListener("change",Re)),ee()}),It(()=>{re?.removeEventListener("change",Re),_e(),X&&clearTimeout(X)}),(t,s)=>{const f=At,o=Lt,p=Gt;return y(),k("div",ua,[n("main",da,[D.value==="3d"?(y(),te(g(r),{key:0,ref_key:"canvasRef",ref:T,graph:at.value,"selected-key":ot.value,"safe-inset-right":ze.value,label:g(a)("relationships.canvas.label3d"),onFallback:wt,onSelectNode:kt},null,8,["graph","selected-key","safe-inset-right","label"])):(y(),te(g(b),{key:1,ref_key:"canvasRef",ref:T,graph:$.value,"selected-key":R.value,"privacy-mode":I.value,"safe-inset-right":ze.value,label:g(a)("relationships.canvas.label"),"owner-label":g(a)("relationships.owner.me"),onSelectNode:Ce},null,8,["graph","selected-key","privacy-mode","safe-inset-right","label","owner-label"])),n("div",ha,[M(f,{modelValue:A.value,"onUpdate:modelValue":s[0]||(s[0]=c=>A.value=c),items:et.value,content:!1,size:"xs",class:"min-w-max gap-0"},null,8,["modelValue","items"]),M(f,{modelValue:v.value,"onUpdate:modelValue":s[1]||(s[1]=c=>v.value=c),items:tt.value,content:!1,size:"xs",class:"min-w-max gap-0"},null,8,["modelValue","items"]),n("div",pa,[M(p,{modelValue:_.value,"onUpdate:modelValue":s[2]||(s[2]=c=>_.value=c),icon:"i-lucide-search",placeholder:g(a)("relationships.search"),size:"sm",class:"w-full",onFocus:s[3]||(s[3]=c=>z.value=Fe.value),onKeydown:s[4]||(s[4]=Et(c=>z.value=!1,["esc"]))},Pt({_:2},[_.value?{name:"trailing",fn:he(()=>[M(o,{icon:"i-heroicons-x-mark",variant:"link",color:"neutral",size:"xs","aria-label":g(a)("relationships.actions.clearSearch"),onClick:St},null,8,["aria-label"])]),key:"0"}:void 0]),1032,["modelValue","placeholder"]),st.value?(y(),k("div",va,[n("div",fa,i(g(a)("relationships.searchResults.title")),1),n("div",ga,[(y(!0),k(Ne,null,Me(Ae.value,c=>(y(),k("button",{key:c.key,type:"button",class:Ie(["group flex w-full items-center gap-2.5 rounded-xl px-2.5 py-2 text-left transition hover:bg-gray-100/70 dark:hover:bg-white/5",d.value===c.key?"bg-sky-50 dark:bg-sky-500/10":""]),disabled:q.value,onClick:Te=>bt(c)},[M(Pe,{src:we(c),alt:B(c),text:ke(c),"root-class":"h-8 w-8 shrink-0 shadow-sm border border-gray-250/20 dark:border-white/10","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-sky-100 text-[10px] font-bold text-sky-700 dark:bg-sky-500/15 dark:text-sky-200"},null,8,["src","alt","text"]),n("span",ya,[n("span",xa,i(B(c)),1),n("span",ba,i(Oe(c))+" · #"+i(c.rank),1)]),c.inCoreGraph?L("",!0):(y(),k("span",ka,i(g(a)("relationships.searchResults.offCore")),1))],10,ma))),128))])])):L("",!0)]),M(o,{icon:"i-lucide-scan-line",color:"neutral",variant:"soft",size:"xs","aria-label":g(a)("relationships.actions.fitView"),onClick:Ct},null,8,["aria-label"]),M(o,{icon:I.value?"i-lucide-eye-off":"i-lucide-eye",color:"neutral",variant:"soft",size:"xs",onClick:s[5]||(s[5]=c=>I.value=!I.value)},{default:he(()=>[Le(i(g(a)("relationships.privacy")),1)]),_:1},8,["icon"]),ge.value?(y(),te(o,{key:0,icon:"i-lucide-undo-2",color:"neutral",variant:"soft",size:"xs",onClick:He},{default:he(()=>[Le(i(g(a)("relationships.actions.backToPanorama")),1)]),_:1})):L("",!0)]),rt.value?(y(),k("div",wa,[s[6]||(s[6]=n("span",{class:"i-lucide-refresh-cw h-3.5 w-3.5 animate-spin text-sky-400"},null,-1)),n("span",null,i(be.value),1)])):L("",!0),lt.value?(y(),te(g($t),{key:3,variant:"overlay",class:"!bg-[#03050c] [&_p]:!text-gray-300",text:be.value||g(a)("relationships.task.updating")},null,8,["text"])):me.value?L("",!0):(y(),k("div",_a,i(ct.value),1)),$e.value?(y(),k("aside",Sa,[M(o,{icon:"i-lucide-x",color:"neutral",variant:"ghost",size:"xs",class:"absolute right-2.5 top-2.5 z-10 text-white/60 hover:bg-white/8 hover:text-white","aria-label":g(a)("relationships.actions.closeDetail"),onClick:_t},null,8,["aria-label"]),x.value?(y(),k("div",Ca,[n("div",Ra,[n("div",Ta,[M(Pe,{src:we(x.value),alt:B(x.value),text:ke(x.value),"root-class":"h-11 w-11 shrink-0 overflow-hidden rounded-lg shadow-sm border border-gray-250/20 dark:border-white/10","image-class":"h-11 w-11 rounded-lg object-cover","fallback-class":"flex h-11 w-11 items-center justify-center rounded-lg bg-sky-100 text-sm font-bold text-sky-700 dark:bg-sky-500/15 dark:text-sky-200"},null,8,["src","alt","text"]),n("div",Na,[n("div",Ma,[n("p",Ia,i(B(x.value)),1),n("span",{class:Ie(["shrink-0 rounded-full bg-white/45 px-1.5 py-0.5 font-mono text-[10px] font-bold text-gray-600 dark:bg-white/8 dark:text-gray-300",x.value.rank<=3?"text-amber-600 dark:text-amber-300":""])}," #"+i(x.value.rank),3)]),n("p",Pa,i(x.value.platform)+" · "+i(pt(x.value)),1)])]),it.value?(y(),te(o,{key:0,icon:"i-lucide-network",color:"primary",variant:"soft",size:"sm",block:"",class:"rounded-xl font-semibold shadow-sm border border-sky-100 hover:border-sky-200 dark:border-sky-950/30 dark:hover:border-sky-900/50",loading:q.value,onClick:xt},{default:he(()=>[Le(i(g(a)("relationships.actions.focusConnections")),1)]),_:1},8,["loading"])):L("",!0),n("div",La,[n("div",Ea,[n("p",Ga,i(g(a)("relationships.detail.score")),1),n("div",Ka,[n("p",Va,i(ut(x.value.score)),1),s[7]||(s[7]=n("span",{class:"text-[9px] leading-3 text-gray-400"},"/100",-1))])]),n("div",Aa,[n("p",Fa,i(g(a)("relationships.detail.type")),1),n("span",{class:Ie(["inline-flex max-w-full items-center truncate text-[10px] font-semibold leading-4",x.value.pool==="friend"?"text-sky-700 dark:text-sky-300":"text-amber-700 dark:text-amber-300"])},i(Oe(x.value)),3)]),n("div",$a,[n("p",za,i(g(a)("relationships.detail.privateMessages")),1),n("span",Oa,i(w(x.value.privateMessageCount)),1)]),n("div",Da,[n("p",ja,i(g(a)("relationships.detail.groupMessages")),1),n("span",Ba,i(w(x.value.groupMessageCount)),1)]),n("div",Ha,[n("p",Ua,i(g(a)("relationships.detail.commonGroups")),1),n("span",qa,i(w(x.value.commonGroupCount)),1)]),n("div",Qa,[n("p",Wa,i(g(a)("relationships.detail.lastInteraction")),1),n("span",Ya,i(ht(x.value.lastInteractionTs)),1)])])]),n("div",Xa,[n("section",Ja,[n("div",Za,[n("div",eo,[n("h3",to,i(g(a)("relationships.connections.title")),1),n("span",ao,i(dt()),1)]),n("span",oo,i(g(a)("relationships.connections.connectionScore")),1)]),ie.value.items.length>0?(y(),k("div",no,[(y(!0),k(Ne,null,Me(ie.value.items,c=>(y(),k("button",{key:c.node.key,type:"button",class:"group flex h-9 w-full items-center gap-2 rounded-lg px-2 py-0 text-left transition-all duration-250 hover:bg-white dark:hover:bg-white/5",onClick:Te=>Ce(c.node)},[M(Pe,{src:we(c.node),alt:B(c.node),text:ke(c.node),"root-class":"h-6 w-6 shrink-0 overflow-hidden rounded-md shadow-sm border border-gray-250/20 dark:border-white/10","image-class":"h-6 w-6 rounded-md object-cover","fallback-class":"flex h-6 w-6 items-center justify-center rounded-md bg-sky-100 text-[9px] font-bold text-sky-700 dark:bg-sky-500/15 dark:text-sky-200"},null,8,["src","alt","text"]),n("div",lo,[n("span",ro,i(B(c.node)),1)]),n("span",io,[n("span",co,i(w(c.connectionScore)),1)])],8,so))),128))])):(y(),k("p",uo,i(g(a)("relationships.connections.empty")),1))]),xe.value.length>0?(y(),k("section",ho,[n("div",po,[n("div",vo,[n("h2",fo,i(g(a)("relationships.stats.communities")),1),n("span",go,i(w(xe.value.length)),1)]),n("span",mo,i(g(a)("relationships.stats.members")),1)]),n("div",yo,[(y(!0),k(Ne,null,Me(xe.value,c=>(y(),k("div",{key:c.id,class:"flex h-9 items-center justify-between gap-2 rounded-lg px-2 py-0 text-[13px] leading-4"},[n("div",xo,[n("span",bo,[n("span",{class:"h-2 w-2 rounded-full shadow-sm",style:Kt({backgroundColor:c.color})},null,4)]),n("span",ko,i(c.label),1)]),n("span",wo,[n("span",_o,i(w(c.size)),1)])]))),128))])])):L("",!0)])])):L("",!0)])):L("",!0)])])}}}),Ko=Object.freeze(Object.defineProperty({__proto__:null,default:Ro},Symbol.toStringTag,{value:"Module"}));export{Eo as a,Go as b,Je as g,Ko as i};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RelationshipGalaxyThreeCanvas-qR4S-9n7.js","assets/index-D9C3dyV8.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-BZpR015e.css","assets/relationship-galaxy-connections-Cg4G5yYE.js","assets/relationship-galaxy-viewport-Cwfa51ER.js","assets/RelationshipGalaxyThreeCanvas-CCasBcBQ.css","assets/RelationshipGalaxyCanvas-CHPqtqQz.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as Rt,a6 as Tt,L as Nt,K as de,x as Mt,al as It,o as y,c as k,a as n,f as te,g,z as M,a1 as Pt,w as he,a8 as Lt,aQ as Et,aq as Gt,p as i,F as Ne,j as Me,n as Ie,aN as Pe,l as L,a9 as Le,O as Kt,bs as Ue,b as m,e as h,C as ae,bt as qe,bv as Vt}from"./index-D9C3dyV8.js";import{_ as At}from"./Tabs-xVtuBuO0.js";import{u as Ft}from"./useToast-Bmgpd3sl.js";import{_ as $t}from"./LoadingState.vue_vue_type_script_setup_true_lang-DmVfwvnD.js";import{u as zt}from"./people-page-header-DWXwFJ8M.js";import{b as Ot,a as Dt}from"./relationship-galaxy-connections-Cg4G5yYE.js";const jt=10,Ye=80,Bt=2880*60*60,Qe=.1;function Ht(e,l,r={}){if(!l)return{items:[],total:0,hasMore:!1};const b=new Map(e.nodes.map(v=>[v.key,v])),a=e.edges.flatMap(v=>{if(v.sourceKey!==l&&v.targetKey!==l)return[];const _=v.sourceKey===l?v.targetKey:v.sourceKey,K=b.get(_);return K?[{node:K,edge:v,connectionScore:0}]:[]}),u=a.reduce((v,_)=>Math.max(v,_.edge.lastInteractionTs??0),0),E=new Map(a.map(v=>[v,Ee(v.edge,u)]));for(const v of a)v.connectionScore=Ut(E.get(v)??0);a.sort((v,_)=>qt(v,_,u));const G=r.collapsedLimit??jt;return{items:r.expanded?a:a.slice(0,G),total:a.length,hasMore:!r.expanded&&a.length>G}}function Eo(e,l,r={}){return Dt(e,l,{limit:r.limit??Ye})}function Go(e,l,r={}){return Ot(e,l,r)}function Ut(e){return e<=0?0:Math.max(1,Math.round(e))}function qt(e,l,r){const b=Ee(l.edge,r),a=Ee(e.edge,r);if(b!==a)return b-a;if(l.edge.weight!==e.edge.weight)return l.edge.weight-e.edge.weight;const u=l.edge.lastInteractionTs??0,E=e.edge.lastInteractionTs??0;return u!==E?u-E:e.node.rank!==l.node.rank?e.node.rank-l.node.rank:e.node.key.localeCompare(l.node.key)}function Ee(e,l){if(!e.lastInteractionTs||l<=0)return e.weight;const r=Math.max(0,l-e.lastInteractionTs),b=Qe+(1-Qe)*Math.pow(.5,r/Bt);return e.weight*b}function We(e){return e.selectedKey&&e.selectedKey===e.loadingNeighborhoodKey?e.currentCanvasSelectedKey:e.selectedKey}function Qt(e){return e.selectedKey?e.isNeighborhoodMode?e.selectedKey!==e.neighborhoodContactKey:!0:!1}function Wt(e){return e.neighborhoodTask?.status==="running"?e.neighborhoodTask:e.graphTask?.status==="running"?e.graphTask:e.isNeighborhoodMode&&e.neighborhoodTask?e.neighborhoodTask:e.graphTask??e.neighborhoodTask??null}function Yt(e){return e.nextTaskStatus==="running"?{type:"continue-polling"}:e.previousTaskStatus==="running"&&e.nextTaskStatus==="succeeded"&&e.neighborhoodContactKey?{type:"refresh-neighborhood",key:e.neighborhoodContactKey}:{type:"stop-polling"}}function Xt(e){return e.loadError?e.loadError:e.isTaskFailed&&e.statusText?e.statusText:e.emptyText}const Jt=new RegExp("\\p{Script=Han}","u");function Xe(e){const l=e?.trim()??"";if(!l)return"*";const r=Array.from(l),b=[...r].reverse().find(a=>Jt.test(a));return b?`**${b}`:r.length===1?"*":r.length===2?`${r[0]}***`:`${r[0]}***${r.at(-1)}`}function Je(e,l){if(e.kind==="owner")return l.ownerLabel;const r=e.displayName||e.platformId||e.key;return l.privacyMode?Xe(r):r}function Zt(e,l){return e.kind==="owner"?l.ownerLabel:l.privacyMode?"*":(e.displayName||e.platformId||"?").slice(0,1)}function ea(e,l){return e.kind==="owner"?e.avatar:l?null:e.avatar}function ta(e,l){const r=e.platformId||e.key;return l?Xe(r):r}const aa="3d";function oa(e){return e==="3d"?"2d":e}function na(e,l,r){return l||r?r:e?.captureView()??null}function sa(e,l){return l&&e?.restoreView(l)===!0?!0:(e?.fitView(),!1)}function la(e,l){return{nodes:e.nodes.map(r=>({...r,displayName:Je(r,l),visualRole:r.kind==="owner"?"anchor":r.pool==="friend"?"close":"standard",importance:ca(r)})),edges:e.edges.map(r=>({...r})),communities:e.communities.map(r=>({...r}))}}function ra(e,l){const r=new Map(e.nodes.map(u=>[u.key,u])),b=new Map(e.edges.map(u=>[u.id,u])),a=new Map(e.communities.map(u=>[u.id,u]));for(const u of l.nodes)r.has(u.key)||r.set(u.key,u);for(const u of l.edges)b.set(u.id,u);for(const u of l.communities)a.has(u.id)||a.set(u.id,u);return{nodes:[...r.values()],edges:[...b.values()],communities:[...a.values()]}}function ia(e){const l=e.selectedKey;return!l||!e.neighborhood||!e.neighborhood.nodes.some(r=>r.key===l)?e.panorama:ra(e.panorama,e.neighborhood)}function ca(e){if(e.kind==="owner")return 1;const l=oe(e.score,0,1),r=oe(1-(e.rank-1)/120,0,1),b=oe(Math.log10(e.privateMessageCount+1)/4,0,1),a=oe(Math.log10(e.groupMessageCount+1)/4.5,0,1),u=e.pool==="friend"?.12:0;return oe(l*.36+r*.36+b*.18+a*.08+u,0,1)}function oe(e,l,r){return Math.min(r,Math.max(l,e))}const ua={class:"flex min-h-0 flex-1 overflow-hidden text-gray-900 dark:bg-page-dark dark:text-gray-100"},da={class:"dark relative min-h-0 min-w-0 flex-1 overflow-hidden bg-[#03050c] text-gray-100"},ha={class:"absolute left-4 top-4 z-20 flex max-w-[calc(100%-2rem)] flex-wrap items-center gap-1.5 rounded-2xl border border-white/8 bg-[#070a12]/78 p-1.5 shadow-overlay backdrop-blur-xl sm:left-6 sm:max-w-[calc(100%-3rem)]"},pa={class:"relative w-28 max-w-full sm:w-32 lg:w-36"},va={key:0,class:"absolute left-0 top-full z-30 mt-2 max-h-80 w-72 overflow-y-auto rounded-2xl border border-gray-200/80 bg-white/95 p-2 shadow-overlay backdrop-blur-xl scrollbar-thin dark:border-white/10 dark:bg-page-dark/95"},fa={class:"px-2 pb-1.5 pt-0.5 text-[11px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400"},ga={class:"space-y-1"},ma=["disabled","onClick"],ya={class:"min-w-0 flex-1"},xa={class:"block truncate text-sm font-semibold text-gray-900 transition-colors group-hover:text-sky-600 dark:text-white dark:group-hover:text-sky-400"},ba={class:"block truncate text-[11px] text-gray-500 dark:text-gray-400"},ka={key:0,class:"shrink-0 rounded-md bg-sky-100/60 px-1.5 py-0.5 text-[10px] font-semibold text-sky-600 dark:bg-sky-500/15 dark:text-sky-400"},wa={key:2,class:"absolute bottom-6 left-1/2 z-20 flex max-w-[min(560px,calc(100%-2rem))] -translate-x-1/2 items-center gap-2.5 rounded-2xl border border-sky-500/20 bg-[#090d16]/85 px-4 py-2.5 text-center text-xs font-semibold text-sky-200 shadow-overlay backdrop-blur-md animate-fade-in"},_a={key:4,class:"absolute inset-0 flex items-center justify-center text-sm font-medium text-gray-400"},Sa={key:5,class:"dark absolute inset-x-3 bottom-3 z-20 flex max-h-[70vh] flex-col overflow-hidden rounded-2xl border border-white/8 bg-[#070a12]/84 text-white shadow-overlay backdrop-blur-2xl md:inset-x-auto md:bottom-4 md:right-4 md:top-4 md:max-h-none md:w-[360px]"},Ca={key:0,class:"flex min-h-0 flex-1 flex-col gap-3 px-4 pb-4 pt-5"},Ra={class:"shrink-0 space-y-2.5"},Ta={class:"flex items-center gap-3 pr-8"},Na={class:"min-w-0 flex-1"},Ma={class:"flex min-w-0 items-center gap-1.5"},Ia={class:"truncate text-base font-bold text-gray-900 dark:text-white"},Pa={class:"truncate text-xs text-gray-500 dark:text-gray-400"},La={class:"grid grid-cols-3 gap-y-1 rounded-xl border border-white/8 bg-white/3 p-1 text-xs"},Ea={class:"min-w-0 px-2 py-1.5"},Ga={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},Ka={class:"flex min-w-0 items-baseline gap-0.5"},Va={class:"font-mono text-sm font-bold leading-4 text-sky-600 dark:text-sky-400"},Aa={class:"min-w-0 border-l border-white/6 px-2 py-1.5"},Fa={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},$a={class:"min-w-0 border-l border-white/6 px-2 py-1.5"},za={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},Oa={class:"block truncate font-mono text-sm font-bold leading-4 text-gray-900 dark:text-white"},Da={class:"min-w-0 border-t border-white/6 px-2 py-1.5"},ja={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},Ba={class:"block truncate font-mono text-sm font-bold leading-4 text-gray-900 dark:text-white"},Ha={class:"min-w-0 border-l border-t border-white/6 px-2 py-1.5"},Ua={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},qa={class:"block truncate font-mono text-sm font-bold leading-4 text-gray-900 dark:text-white"},Qa={class:"min-w-0 border-l border-t border-white/6 px-2 py-1.5"},Wa={class:"mb-0.5 truncate text-[9px] font-semibold uppercase leading-3 tracking-wide text-gray-400 dark:text-gray-500"},Ya={class:"block truncate text-[11px] font-semibold leading-4 text-gray-900 dark:text-white"},Xa={class:"flex min-h-0 flex-1 flex-col gap-2"},Ja={class:"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-white/7 pt-3"},Za={class:"mb-2 flex shrink-0 items-center justify-between gap-3 pl-1 pr-3"},eo={class:"flex min-w-0 items-center gap-2"},to={class:"truncate text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400"},ao={class:"shrink-0 font-mono text-[10px] font-bold text-gray-400 dark:text-gray-500"},oo={class:"w-14 shrink-0 text-right text-[10px] font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500"},no={key:0,class:"min-h-0 flex-1 space-y-0.5 overflow-y-auto pr-1 scrollbar-thin"},so=["onClick"],lo={class:"min-w-0 flex-1"},ro={class:"block truncate text-[13px] font-semibold leading-4 text-gray-900 transition-colors group-hover:text-sky-600 dark:text-white dark:group-hover:text-sky-400"},io={class:"flex w-14 shrink-0 justify-end"},co={class:"font-mono text-[10px] font-bold text-gray-500 dark:text-gray-400"},uo={key:1,class:"py-4 text-center text-xs text-gray-400 dark:text-gray-500"},ho={key:0,class:"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-white/7 pt-3"},po={class:"mb-2 flex shrink-0 items-center justify-between gap-3 pl-1 pr-3"},vo={class:"flex min-w-0 items-center gap-2"},fo={class:"truncate text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400"},go={class:"shrink-0 font-mono text-[10px] font-bold text-gray-400 dark:text-gray-500"},mo={class:"w-14 shrink-0 text-right text-[10px] font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500"},yo={class:"min-h-0 flex-1 space-y-0.5 overflow-y-auto pr-1 scrollbar-thin"},xo={class:"flex min-w-0 items-center gap-2"},bo={class:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-white/45 shadow-sm dark:bg-white/5"},ko={class:"truncate font-semibold leading-4 text-gray-700 dark:text-gray-200"},wo={class:"flex w-14 shrink-0 justify-end"},_o={class:"font-mono text-[10px] font-bold text-gray-500 dark:text-gray-400"},So=1400,Co=392,Ro=Rt({__name:"index",setup(e){const l={nodes:[],edges:[],communities:[]},r=Ue(()=>qe(()=>import("./RelationshipGalaxyThreeCanvas-qR4S-9n7.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),b=Ue(()=>qe(()=>import("./RelationshipGalaxyCanvas-CHPqtqQz.js").then(t=>t.as),__vite__mapDeps([7,1,2,3,5]))),{t:a,locale:u}=Tt(),E=Nt(),G=Ft(),A=m("1y"),v=m("panorama"),_=m(""),K=m(""),z=m(!1),ne=m(""),d=m(null),V=m(!1),O=m(null),C=m(null),pe=m(!1),ve=m(!1),q=m(!1),Ge=m(!1),F=m(null),R=m(null),I=m(!1),D=m(aa),Q=m(""),W=m(0),j=m(0),T=m(null),se=m(null);let le=null,fe=null,Y=null,X=null,re=null;const Ze=h(()=>new Intl.NumberFormat(u.value)),et=h(()=>Vt.map(t=>({label:a(`relationships.timeRange.${t}`),value:t}))),tt=h(()=>[{label:a("relationships.graphScope.panorama"),value:"panorama"},{label:a("relationships.graphScope.close"),value:"close"},{label:a("relationships.graphScope.friends"),value:"friends"}]),P=h(()=>O.value?.graph??l),$=h(()=>C.value?.graph??P.value),Ke=h(()=>ia({panorama:P.value,neighborhood:C.value?.graph??null,selectedKey:d.value})),at=h(()=>la(Ke.value,{privacyMode:I.value,ownerLabel:a("relationships.owner.me")})),ot=h(()=>{const t=d.value;return t&&Ke.value.nodes.some(s=>s.key===t)?t:null}),ge=h(()=>!!C.value),me=h(()=>P.value.nodes.length>0||$.value.nodes.length>0),J=h(()=>Wt({graphTask:O.value?.task??null,neighborhoodTask:C.value?.task??null,isNeighborhoodMode:ge.value})),Z=h(()=>J.value?.status==="running"),Ve=h(()=>J.value?.status==="failed"),nt=h(()=>O.value?.cache.status??C.value?.cache.status),Ae=h(()=>O.value?.searchResults??[]),Fe=h(()=>_.value.trim().length>0),st=h(()=>Fe.value&&_.value.trim()===ne.value&&z.value&&Ae.value.length>0),lt=h(()=>(pe.value||Z.value)&&!me.value),rt=h(()=>Z.value&&me.value),x=h(()=>d.value?$.value.nodes.find(t=>t.key===d.value)??P.value.nodes.find(t=>t.key===d.value)??C.value?.contact??null:null),$e=h(()=>V.value&&!!x.value),ze=h(()=>$e.value&&Ge.value?Co:0),it=h(()=>Qt({selectedKey:d.value,isNeighborhoodMode:ge.value,neighborhoodContactKey:C.value?.contact?.key??null})),ie=h(()=>Ht($.value,d.value,{collapsedLimit:Ye})),ye=h(()=>({nodes:P.value.nodes.length,edges:P.value.edges.length,communities:P.value.communities.length})),xe=h(()=>[...$.value.communities].sort((t,s)=>s.size-t.size).slice(0,8)),be=h(()=>nt.value==="stale"&&Z.value?a("relationships.task.updating"):Z.value?vt(J.value):Ve.value?J.value?.lastError||a("relationships.task.failed"):""),ct=h(()=>Xt({loadError:Q.value,isTaskFailed:Ve.value,statusText:be.value,emptyText:a("relationships.empty")}));function w(t){return Ze.value.format(t)}function ut(t){return Math.round(t*100).toString()}function dt(){const t=ie.value.items.length,s=ie.value.total;return s<=t?w(s):`${w(t)} / ${w(s)}`}function ht(t){return t?new Date(t*1e3).toLocaleDateString():a("relationships.detail.emptyValue")}function ke(t){return Zt(t,{privacyMode:I.value,ownerLabel:a("relationships.owner.avatarText")})}function we(t){return ea(t,I.value)}function B(t){return Je(t,{privacyMode:I.value,ownerLabel:a("relationships.owner.me")})}function pt(t){return ta(t,I.value)}function Oe(t){return t.kind==="owner"?a("relationships.owner.type"):t.friendSource==="manual"?a("relationships.pool.manualFriend"):t.pool==="friend"?a("relationships.pool.friend"):a("relationships.pool.nonFriend")}function vt(t){return a("relationships.task.running",{current:w(t?.processedSessions??0),total:w(t?.totalSessions??0)})}function De(t){const s=je(t,v.value);le&&le!==s&&ce();const f=O.value;O.value=f&&le===s?{...t,graph:f.graph}:t,le=s}function ft(t){const s=je(t,`neighborhood:${t.contact?.key??""}`),f=C.value;C.value=f&&fe===s?{...t,graph:f.graph}:t,fe=s}function H(){C.value=null,fe=null}function je(t,s){const f=t.graph;let o=2166136261;o=S(o,s),o=S(o,t.algorithmVersion),o=S(o,t.cache.signature??""),o=N(o,t.timeRange.startTs??0),o=S(o,t.timeRange.preset);for(const p of f.nodes)o=S(o,p.key),o=S(o,p.pool),o=S(o,p.friendSource??""),o=N(o,p.rank),o=N(o,Math.round(p.score*1e6)),o=N(o,p.labelVisibility),o=N(o,Math.round(p.x*100)),o=N(o,Math.round(p.y*100)),o=N(o,Math.round(p.size*100));for(const p of f.edges)o=S(o,p.id),o=S(o,p.sourceKey),o=S(o,p.targetKey),o=N(o,Math.round(p.weight*1e6)),o=N(o,p.visibility);for(const p of f.communities)o=S(o,p.id),o=N(o,p.size),o=S(o,p.color);return`${s}:${f.nodes.length}:${f.edges.length}:${f.communities.length}:${o>>>0}`}function S(t,s){for(let f=0;f<s.length;f+=1)t^=s.charCodeAt(f),t=Math.imul(t,16777619);return t}function N(t,s){return S(t,String(s))}function _e(){Y&&(clearInterval(Y),Y=null)}function U(){j.value+=1,q.value=!1,F.value=null}function Be(){se.value=na(T.value,d.value,se.value)}function ce(){se.value=null}function gt(){const t=se.value;ce(),ae(()=>{sa(T.value,t)})}function Se(t){if(t?.status==="running"){Y||(Y=setInterval(()=>{ee({silent:!0,preserveNeighborhood:!0})},So));return}_e()}async function ee(t={}){const s=W.value+1;W.value=s;const f=J.value?.status??null,o=t.preserveNeighborhood?C.value?.contact?.key??null:null;t.silent||(pe.value=!0),t.preserveNeighborhood||(U(),H()),Q.value="";try{const p=await E.getPeopleRelationships({acceptStale:!0,timeRangePreset:A.value,graphScope:v.value,query:K.value.trim()||void 0});if(s!==W.value)return;De(p),ne.value=K.value.trim(),d.value&&!$.value.nodes.some(Te=>Te.key===d.value)&&(d.value=null,R.value=null,V.value=!1);const c=Yt({previousTaskStatus:f,nextTaskStatus:p.task?.status??null,neighborhoodContactKey:o});Se(p.task),c.type==="refresh-neighborhood"&&ue(c.key)}catch(p){if(s!==W.value)return;Q.value=String(p),G.fail(a("relationships.toast.loadFailed"),{description:String(p)}),_e()}finally{s===W.value&&(pe.value=!1)}}async function mt(){ve.value=!0,Q.value="";try{const t=await E.recomputePeopleRelationships({timeRangePreset:A.value,graphScope:v.value,query:K.value.trim()||void 0});De(t),ne.value=K.value.trim(),U(),H(),d.value=null,R.value=null,V.value=!1,Se(t.task),G.success(a("relationships.toast.recomputeStarted"))}catch(t){G.fail(a("relationships.toast.recomputeFailed"),{description:String(t)})}finally{ve.value=!1}}const yt=h(()=>({title:a("layout.relationships"),description:a("relationships.subtitle"),icon:"i-lucide-git-fork",iconClass:"bg-primary-600 text-white dark:bg-primary-500 dark:text-white shadow-sm",action:{label:a("relationships.actions.recompute"),icon:"i-lucide-refresh-cw",loading:ve.value,disabled:Z.value,class:"border border-sky-100 hover:border-sky-200 dark:border-sky-950/30 dark:hover:border-sky-900/50",onClick:mt},stats:[{id:"nodes",label:a("relationships.stats.nodes"),value:w(ye.value.nodes)},{id:"edges",label:a("relationships.stats.edges"),value:w(ye.value.edges)},{id:"communities",label:a("relationships.stats.communities"),value:w(ye.value.communities),dividerBefore:!0}]}));zt(yt);async function ue(t){const s=j.value+1;j.value=s,q.value=!0,F.value=t,Q.value="";const f=!P.value.nodes.some(o=>o.key===t);try{const o=await E.getPeopleRelationshipNeighborhood(t,{acceptStale:!0,timeRangePreset:A.value,graphScope:v.value});if(s!==j.value)return;ft(o),d.value=o.contact?.key??t,R.value=d.value,Se(o.task),await ae(),D.value==="2d"?T.value?.fitView():f&&d.value&&T.value?.focusNode(d.value)}catch(o){if(s!==j.value)return;G.fail(a("relationships.toast.neighborhoodFailed"),{description:String(o)})}finally{s===j.value&&(q.value=!1,F.value=null)}}async function xt(){d.value&&await ue(d.value)}async function bt(t){if(Be(),z.value=!1,t.inCoreGraph||(F.value=t.key),d.value=t.key,V.value=!0,R.value=We({selectedKey:d.value,loadingNeighborhoodKey:F.value,currentCanvasSelectedKey:R.value}),!t.inCoreGraph){await ue(t.key);return}U(),H(),await ae(),T.value?.focusNode(t.key)}async function Ce(t){Be();const s=C.value?.contact?.key!==t.key;if(s&&(F.value=t.key),d.value=t.key,V.value=!0,R.value=We({selectedKey:d.value,loadingNeighborhoodKey:F.value,currentCanvasSelectedKey:R.value}),await ae(),T.value?.focusNode(t.key),s){await ue(t.key);return}R.value=d.value}async function kt(t){const s=P.value.nodes.find(f=>f.key===t.key)??$.value.nodes.find(f=>f.key===t.key);s&&await Ce(s)}function wt(){const t=oa(D.value);t!==D.value&&(D.value=t,G.warn(a("relationships.toast.threeUnavailable")))}function He(){U(),H(),d.value=null,R.value=null,V.value=!1,gt()}function _t(){He()}function St(){_.value="",ne.value="",z.value=!1}function Ct(){T.value?.fitView()}function Re(){Ge.value=re?.matches??!1}return de(A,()=>{ce(),d.value=null,R.value=null,V.value=!1,U(),H(),ee()}),de(v,()=>{ce(),d.value=null,R.value=null,V.value=!1,U(),H(),ee()}),de(_,t=>{X&&clearTimeout(X),z.value=t.trim().length>0,X=setTimeout(()=>{K.value=t,ee({silent:!0,preserveNeighborhood:!0})},260)}),de(D,async()=>{if(await ae(),d.value){T.value?.focusNode(d.value);return}T.value?.fitView()}),Mt(()=>{typeof window<"u"&&(re=window.matchMedia("(min-width: 768px)"),Re(),re.addEventListener("change",Re)),ee()}),It(()=>{re?.removeEventListener("change",Re),_e(),X&&clearTimeout(X)}),(t,s)=>{const f=At,o=Lt,p=Gt;return y(),k("div",ua,[n("main",da,[D.value==="3d"?(y(),te(g(r),{key:0,ref_key:"canvasRef",ref:T,graph:at.value,"selected-key":ot.value,"safe-inset-right":ze.value,label:g(a)("relationships.canvas.label3d"),onFallback:wt,onSelectNode:kt},null,8,["graph","selected-key","safe-inset-right","label"])):(y(),te(g(b),{key:1,ref_key:"canvasRef",ref:T,graph:$.value,"selected-key":R.value,"privacy-mode":I.value,"safe-inset-right":ze.value,label:g(a)("relationships.canvas.label"),"owner-label":g(a)("relationships.owner.me"),onSelectNode:Ce},null,8,["graph","selected-key","privacy-mode","safe-inset-right","label","owner-label"])),n("div",ha,[M(f,{modelValue:A.value,"onUpdate:modelValue":s[0]||(s[0]=c=>A.value=c),items:et.value,content:!1,size:"xs",class:"min-w-max gap-0"},null,8,["modelValue","items"]),M(f,{modelValue:v.value,"onUpdate:modelValue":s[1]||(s[1]=c=>v.value=c),items:tt.value,content:!1,size:"xs",class:"min-w-max gap-0"},null,8,["modelValue","items"]),n("div",pa,[M(p,{modelValue:_.value,"onUpdate:modelValue":s[2]||(s[2]=c=>_.value=c),icon:"i-lucide-search",placeholder:g(a)("relationships.search"),size:"sm",class:"w-full",onFocus:s[3]||(s[3]=c=>z.value=Fe.value),onKeydown:s[4]||(s[4]=Et(c=>z.value=!1,["esc"]))},Pt({_:2},[_.value?{name:"trailing",fn:he(()=>[M(o,{icon:"i-heroicons-x-mark",variant:"link",color:"neutral",size:"xs","aria-label":g(a)("relationships.actions.clearSearch"),onClick:St},null,8,["aria-label"])]),key:"0"}:void 0]),1032,["modelValue","placeholder"]),st.value?(y(),k("div",va,[n("div",fa,i(g(a)("relationships.searchResults.title")),1),n("div",ga,[(y(!0),k(Ne,null,Me(Ae.value,c=>(y(),k("button",{key:c.key,type:"button",class:Ie(["group flex w-full items-center gap-2.5 rounded-xl px-2.5 py-2 text-left transition hover:bg-gray-100/70 dark:hover:bg-white/5",d.value===c.key?"bg-sky-50 dark:bg-sky-500/10":""]),disabled:q.value,onClick:Te=>bt(c)},[M(Pe,{src:we(c),alt:B(c),text:ke(c),"root-class":"h-8 w-8 shrink-0 shadow-sm border border-gray-250/20 dark:border-white/10","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-sky-100 text-[10px] font-bold text-sky-700 dark:bg-sky-500/15 dark:text-sky-200"},null,8,["src","alt","text"]),n("span",ya,[n("span",xa,i(B(c)),1),n("span",ba,i(Oe(c))+" · #"+i(c.rank),1)]),c.inCoreGraph?L("",!0):(y(),k("span",ka,i(g(a)("relationships.searchResults.offCore")),1))],10,ma))),128))])])):L("",!0)]),M(o,{icon:"i-lucide-scan-line",color:"neutral",variant:"soft",size:"xs","aria-label":g(a)("relationships.actions.fitView"),onClick:Ct},null,8,["aria-label"]),M(o,{icon:I.value?"i-lucide-eye-off":"i-lucide-eye",color:"neutral",variant:"soft",size:"xs",onClick:s[5]||(s[5]=c=>I.value=!I.value)},{default:he(()=>[Le(i(g(a)("relationships.privacy")),1)]),_:1},8,["icon"]),ge.value?(y(),te(o,{key:0,icon:"i-lucide-undo-2",color:"neutral",variant:"soft",size:"xs",onClick:He},{default:he(()=>[Le(i(g(a)("relationships.actions.backToPanorama")),1)]),_:1})):L("",!0)]),rt.value?(y(),k("div",wa,[s[6]||(s[6]=n("span",{class:"i-lucide-refresh-cw h-3.5 w-3.5 animate-spin text-sky-400"},null,-1)),n("span",null,i(be.value),1)])):L("",!0),lt.value?(y(),te(g($t),{key:3,variant:"overlay",class:"!bg-[#03050c] [&_p]:!text-gray-300",text:be.value||g(a)("relationships.task.updating")},null,8,["text"])):me.value?L("",!0):(y(),k("div",_a,i(ct.value),1)),$e.value?(y(),k("aside",Sa,[M(o,{icon:"i-lucide-x",color:"neutral",variant:"ghost",size:"xs",class:"absolute right-2.5 top-2.5 z-10 text-white/60 hover:bg-white/8 hover:text-white","aria-label":g(a)("relationships.actions.closeDetail"),onClick:_t},null,8,["aria-label"]),x.value?(y(),k("div",Ca,[n("div",Ra,[n("div",Ta,[M(Pe,{src:we(x.value),alt:B(x.value),text:ke(x.value),"root-class":"h-11 w-11 shrink-0 overflow-hidden rounded-lg shadow-sm border border-gray-250/20 dark:border-white/10","image-class":"h-11 w-11 rounded-lg object-cover","fallback-class":"flex h-11 w-11 items-center justify-center rounded-lg bg-sky-100 text-sm font-bold text-sky-700 dark:bg-sky-500/15 dark:text-sky-200"},null,8,["src","alt","text"]),n("div",Na,[n("div",Ma,[n("p",Ia,i(B(x.value)),1),n("span",{class:Ie(["shrink-0 rounded-full bg-white/45 px-1.5 py-0.5 font-mono text-[10px] font-bold text-gray-600 dark:bg-white/8 dark:text-gray-300",x.value.rank<=3?"text-amber-600 dark:text-amber-300":""])}," #"+i(x.value.rank),3)]),n("p",Pa,i(x.value.platform)+" · "+i(pt(x.value)),1)])]),it.value?(y(),te(o,{key:0,icon:"i-lucide-network",color:"primary",variant:"soft",size:"sm",block:"",class:"rounded-xl font-semibold shadow-sm border border-sky-100 hover:border-sky-200 dark:border-sky-950/30 dark:hover:border-sky-900/50",loading:q.value,onClick:xt},{default:he(()=>[Le(i(g(a)("relationships.actions.focusConnections")),1)]),_:1},8,["loading"])):L("",!0),n("div",La,[n("div",Ea,[n("p",Ga,i(g(a)("relationships.detail.score")),1),n("div",Ka,[n("p",Va,i(ut(x.value.score)),1),s[7]||(s[7]=n("span",{class:"text-[9px] leading-3 text-gray-400"},"/100",-1))])]),n("div",Aa,[n("p",Fa,i(g(a)("relationships.detail.type")),1),n("span",{class:Ie(["inline-flex max-w-full items-center truncate text-[10px] font-semibold leading-4",x.value.pool==="friend"?"text-sky-700 dark:text-sky-300":"text-amber-700 dark:text-amber-300"])},i(Oe(x.value)),3)]),n("div",$a,[n("p",za,i(g(a)("relationships.detail.privateMessages")),1),n("span",Oa,i(w(x.value.privateMessageCount)),1)]),n("div",Da,[n("p",ja,i(g(a)("relationships.detail.groupMessages")),1),n("span",Ba,i(w(x.value.groupMessageCount)),1)]),n("div",Ha,[n("p",Ua,i(g(a)("relationships.detail.commonGroups")),1),n("span",qa,i(w(x.value.commonGroupCount)),1)]),n("div",Qa,[n("p",Wa,i(g(a)("relationships.detail.lastInteraction")),1),n("span",Ya,i(ht(x.value.lastInteractionTs)),1)])])]),n("div",Xa,[n("section",Ja,[n("div",Za,[n("div",eo,[n("h3",to,i(g(a)("relationships.connections.title")),1),n("span",ao,i(dt()),1)]),n("span",oo,i(g(a)("relationships.connections.connectionScore")),1)]),ie.value.items.length>0?(y(),k("div",no,[(y(!0),k(Ne,null,Me(ie.value.items,c=>(y(),k("button",{key:c.node.key,type:"button",class:"group flex h-9 w-full items-center gap-2 rounded-lg px-2 py-0 text-left transition-all duration-250 hover:bg-white dark:hover:bg-white/5",onClick:Te=>Ce(c.node)},[M(Pe,{src:we(c.node),alt:B(c.node),text:ke(c.node),"root-class":"h-6 w-6 shrink-0 overflow-hidden rounded-md shadow-sm border border-gray-250/20 dark:border-white/10","image-class":"h-6 w-6 rounded-md object-cover","fallback-class":"flex h-6 w-6 items-center justify-center rounded-md bg-sky-100 text-[9px] font-bold text-sky-700 dark:bg-sky-500/15 dark:text-sky-200"},null,8,["src","alt","text"]),n("div",lo,[n("span",ro,i(B(c.node)),1)]),n("span",io,[n("span",co,i(w(c.connectionScore)),1)])],8,so))),128))])):(y(),k("p",uo,i(g(a)("relationships.connections.empty")),1))]),xe.value.length>0?(y(),k("section",ho,[n("div",po,[n("div",vo,[n("h2",fo,i(g(a)("relationships.stats.communities")),1),n("span",go,i(w(xe.value.length)),1)]),n("span",mo,i(g(a)("relationships.stats.members")),1)]),n("div",yo,[(y(!0),k(Ne,null,Me(xe.value,c=>(y(),k("div",{key:c.id,class:"flex h-9 items-center justify-between gap-2 rounded-lg px-2 py-0 text-[13px] leading-4"},[n("div",xo,[n("span",bo,[n("span",{class:"h-2 w-2 rounded-full shadow-sm",style:Kt({backgroundColor:c.color})},null,4)]),n("span",ko,i(c.label),1)]),n("span",wo,[n("span",_o,i(w(c.size)),1)])]))),128))])])):L("",!0)])])):L("",!0)])):L("",!0)])])}}}),Ko=Object.freeze(Object.defineProperty({__proto__:null,default:Ro},Symbol.toStringTag,{value:"Module"}));export{Eo as a,Go as b,Je as g,Ko as i};
|
package/dist-cli-web/assets/{people-page-header-Cx5r9Bk2.js → people-page-header-DWXwFJ8M.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as l,e as n,G as u,H as d}from"./index-
|
|
1
|
+
import{E as l,e as n,G as u,H as d}from"./index-D9C3dyV8.js";const o=Symbol("PeoplePageHeader");function P(e){const a=u(null),r=n(()=>a.value?.value??e.value);function s(t){a.value=t}return d(o,{setHeader:s}),{header:r}}function c(e){l(o)?.setHeader(e)}export{P as p,c as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as x,b as s}from"./index-
|
|
1
|
+
import{h as x,b as s}from"./index-D9C3dyV8.js";const k=x("prompt",()=>{const u=s(0),i=s({maxMessagesPerRequest:1e3,exportFormat:"markdown",sqlExportFormat:"csv",enableAutoSkill:!0,chartAutoMode:"suggest",searchContextBefore:2,searchContextAfter:2}),n=s([]),l=s([]),a=s({});function r(){u.value++}function d(e){i.value={...i.value,...e},r()}function c(e){n.value.push(e)}function f(e,t){const o=n.value.findIndex(h=>h.id===e);o!==-1&&(n.value[o]={...n.value[o],...t})}function m(e){const t=n.value.findIndex(o=>o.id===e);t!==-1&&n.value.splice(t,1)}function p(e){l.value.includes(e)||l.value.push(e)}function v(e,t){return a.value[`${e}:${t}`]}function g(e,t,o){a.value={...a.value,[`${e}:${t}`]:o}}return{aiConfigVersion:u,aiGlobalSettings:i,customKeywordTemplates:n,deletedPresetTemplateIds:l,thinkingLevels:a,notifyAIConfigChanged:r,updateAIGlobalSettings:d,addCustomKeywordTemplate:c,updateCustomKeywordTemplate:f,removeCustomKeywordTemplate:m,addDeletedPresetTemplateId:p,getThinkingLevel:v,setThinkingLevel:g}},{persist:!1,backendPersist:{pick:["aiGlobalSettings","customKeywordTemplates","deletedPresetTemplateIds","thinkingLevels"]}});export{k as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as l,b as d,V as r,S as u,W as p}from"./index-
|
|
1
|
+
import{C as l,b as d,V as r,S as u,W as p}from"./index-D9C3dyV8.js";function h(e){const n=d(!1);function t(){n.value=!0}function a(o){l(()=>{n.value=!1,e?.(o)})}return{isComposing:n,handleCompositionStart:t,handleCompositionEnd:a}}const s="/ai/semantic-index";function i(e){return async n=>(await r(`${s}/${e}`,{sessionId:n})).status}const m={getConfig:()=>u(`${s}/config`),setConfig:(e,n)=>p(`${s}/config`,{config:e,apiKey:n}),listEnabled:async()=>(await u(`${s}/enabled`)).sessions,status:async e=>(await u(`${s}/status?sessionId=${encodeURIComponent(e)}`)).status,statusForSessions:async e=>(await r(`${s}/status`,{sessionIds:e})).sessions,enable:i("enable"),remove:i("remove"),build:i("build"),pause:i("pause"),cancel:i("cancel"),rebuild:i("rebuild"),buildPending:async()=>(await r(`${s}/build-pending`)).sessions,cleanup:()=>r(`${s}/cleanup`)};function S(){return m}function c(e){return(e??"").trim().replace(/\/+$/,"")}function $(e){if(!e)return!0;try{const n=new URL(e),t=n.hostname.toLowerCase(),a=t==="localhost"||t==="127.0.0.1"||t==="::1",o=n.port||(n.protocol==="https:"?"443":"80");return!(a&&o==="11434")}catch{return!0}}function f(e,n,t=!0){return!t||e?.mode!=="api"||!e.api?.authProfile?!1:c(e.api.baseUrl)===c(n)}function w(e,n){const t=n.apiBaseUrl.trim(),a=n.apiModel.trim(),o=f(e,t)?e?.api?.authProfile:void 0;return{version:e?.version??1,enabled:e?.enabled??!0,mode:n.mode,local:{modelId:n.localModelId,downloadSource:n.localDownloadSource},api:n.mode==="api"?{baseUrl:t,model:a,...o?{authProfile:o}:{}}:null,searchMaxResults:10}}export{S as a,w as b,f as c,$ as i,h as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{N as e}from"./index-D9C3dyV8.js";const r=e("insight.annual-summary.ui-service");export{r as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{N as e}from"./index-D9C3dyV8.js";const t=e("insight.time-investment.ui-service");export{t as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e}from"./index-
|
|
1
|
+
import{$ as e}from"./index-D9C3dyV8.js";import"./vendor-snapdom--nZvo8Sg.js";function c(){return e("cache")}export{c as useCacheService};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e,t,i as r}from"./index-D9C3dyV8.js";function n(o){return e(()=>t(o)?!!r(o)?.closest("form"):!0)}export{n as u};
|