@petercjl/omni-desktop-app 0.1.7 → 0.1.10
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/INSTALL.md +9 -0
- package/README.md +4 -4
- package/UPDATE.md +7 -0
- package/app/assets/{CartesianChart-acGhtLrw.js → CartesianChart-CP7p2vlm.js} +4 -4
- package/app/assets/{CollaborationWorkspace-DAWo2Vol.js → CollaborationWorkspace-Cnp5PNn_.js} +6 -6
- package/app/assets/CollaborationWorkspace-D7ttfUjn.css +1 -0
- package/app/assets/CompetitorAnalysis-Cujy_a2L.js +1 -0
- package/app/assets/CompetitorAnalysis-h1zdt0F2.css +1 -0
- package/app/assets/EmptyState-CUHuNsaV.js +1 -0
- package/app/assets/ErrorBarContext-BJE5-ljg.js +1 -0
- package/app/assets/{EvidenceSourceGuide-qBsaH1fx.js → EvidenceSourceGuide-B1AJCZm2.js} +1 -1
- package/app/assets/FavoritePicker-XD1a_uOa.js +1 -0
- package/app/assets/Favorites-B5_fdEvZ.js +1 -0
- package/app/assets/{HelpTip-X4GpEnvk.js → HelpTip-BqRBO41J.js} +1 -1
- package/app/assets/LineChart-Ckvg5wfQ.js +4 -0
- package/app/assets/Opportunities-BvH64-dz.js +1 -0
- package/app/assets/{ProgressiveRows-DPZqhsXV.js → ProgressiveRows-NojOUgmr.js} +1 -1
- package/app/assets/ShopLayoutPage-CCrRwaAx.js +1 -0
- package/app/assets/TrendChart-BF4JgwxH.js +1 -0
- package/app/assets/arrow-down-B1nil3T4.js +1 -0
- package/app/assets/arrow-left-BhFSpYzK.js +1 -0
- package/app/assets/arrow-up-right-IBQoN72x.js +1 -0
- package/app/assets/book-open-Cqdn6s-H.js +1 -0
- package/app/assets/chart-column-DCwNhXki.js +1 -0
- package/app/assets/{chart-no-axes-combined-dFluBLOV.js → chart-no-axes-combined-DVgKs36j.js} +1 -1
- package/app/assets/check-DBnlZFEo.js +1 -0
- package/app/assets/chevron-down-DO6RUQm8.js +1 -0
- package/app/assets/chevron-right-e65CaeL6.js +1 -0
- package/app/assets/{clock-3-DpvJxor3.js → clock-3-CDHtQwAe.js} +1 -1
- package/app/assets/competitor-analysis-D6eM9ugQ.js +1 -0
- package/app/assets/components-B5Xyjfpi.js +2 -0
- package/app/assets/{download-BQwcTDwB.js → download-DfM49VvV.js} +1 -1
- package/app/assets/entry-Bq7tA83b.js +1 -0
- package/app/assets/entry-BryQeuNT.css +1 -0
- package/app/assets/entry-CMur_AE7.css +1 -0
- package/app/assets/entry-DC4oDjzU.js +2 -0
- package/app/assets/entry-DM64sJfS.js +1 -0
- package/app/assets/entry-DbqMDIJi.js +1 -0
- package/app/assets/entry-N8bfKXTF.js +2 -0
- package/app/assets/entry-kAWoaIsV.js +2 -0
- package/app/assets/favorites.module-CHYv-Z8y.js +1 -0
- package/app/assets/{file-text-DF8-c_Tb.js → file-text-DKAT5fzJ.js} +1 -1
- package/app/assets/getRadiusAndStrokeWidthFromDot-bv_ksZ7y.js +1 -0
- package/app/assets/{grid-2x2-BNdV1X54.js → grid-2x2-DB6zRPIV.js} +1 -1
- package/app/assets/index-BgJNmU0Z.css +1 -0
- package/app/assets/index-DLSVWUSu.js +10 -0
- package/app/assets/{layers-BY0DtVnH.js → layers-CjsT_HGi.js} +1 -1
- package/app/assets/layout-dashboard-sgUrlApv.js +1 -0
- package/app/assets/{link-2-B7GAWapc.js → link-2-VLti-YG9.js} +1 -1
- package/app/assets/{list-DrSHrHvT.js → list-Dfzc0sXQ.js} +1 -1
- package/app/assets/market-SuD7x_Hf.css +1 -0
- package/app/assets/market.module-VpU4XmGg.js +1 -0
- package/app/assets/module-host-DNtiV4gZ.js +1 -0
- package/app/assets/orbit-CrQs6cpl.js +1 -0
- package/app/assets/play-BxTFlaQX.js +1 -0
- package/app/assets/plus-D78h7lrw.js +1 -0
- package/app/assets/products-B5vjXM_b.js +1 -0
- package/app/assets/project-public-CgW1u7BI.js +4 -0
- package/app/assets/project-public-DWTt808B.js +1 -0
- package/app/assets/public-C-PBMVOQ.js +1 -0
- package/app/assets/{refresh-cw-BZ6-gKfF.js → refresh-cw-CxbRf97c.js} +1 -1
- package/app/assets/search-DFdSppzm.js +1 -0
- package/app/assets/triangle-alert-C7qiylOf.js +1 -0
- package/app/assets/{ui-public-BPe2GJZ-.css → ui-public-DHoRDp5_.css} +1 -1
- package/app/assets/ui-public-Dt5dHt-8.js +1 -0
- package/app/assets/workbench-DIKJZNJQ.js +2 -0
- package/app/assets/workbench-Db45mF6t.css +1 -0
- package/app/assets/workspace-view-state-D0ujRczW.js +1 -0
- package/app/desktop/main.mjs +7719 -0
- package/app/desktop/preload.cjs +30 -0
- package/app/index.html +2 -2
- package/app/package.json +1 -0
- package/app/public/omni-icon.png +0 -0
- package/app/tools/bootstrap.bin +0 -0
- package/app/tools/omni-desktop.mjs +526 -0
- package/package.json +7 -2
- package/release.json +1 -1
- package/release.sig +1 -1
- package/app/assets/CollaborationWorkspace-DHP4cb-p.css +0 -1
- package/app/assets/EmptyState-BgcduNtk.js +0 -1
- package/app/assets/Favorites-C3gPJxbl.js +0 -1
- package/app/assets/LineChart-CyiCaQMM.js +0 -4
- package/app/assets/Opportunities-DDR6jMz5.js +0 -1
- package/app/assets/ShopLayoutPage-7lNMFD1W.js +0 -1
- package/app/assets/TrendChart-ClEBAnKO.js +0 -1
- package/app/assets/activity-idEO2qnr.js +0 -1
- package/app/assets/arrow-left-rfprDrQc.js +0 -1
- package/app/assets/arrow-up-right-Bp3gzP7v.js +0 -1
- package/app/assets/check-DokC3Ug0.js +0 -1
- package/app/assets/chevron-down-CHQKhw_4.js +0 -1
- package/app/assets/chevron-right-2HEa4oQb.js +0 -1
- package/app/assets/components-zDEQpnyp.js +0 -2
- package/app/assets/entry-BNiO6CiP.js +0 -2
- package/app/assets/entry-BleRLT_W.js +0 -1
- package/app/assets/entry-CO870j9p.css +0 -1
- package/app/assets/entry-CYsrxe4a.js +0 -2
- package/app/assets/entry-D2FD-KFx.js +0 -1
- package/app/assets/entry-DAnTlYgL.js +0 -1
- package/app/assets/entry-DSEbJ79v.js +0 -2
- package/app/assets/entry-OPB3MGoc.css +0 -1
- package/app/assets/git-branch-CMQGDByc.js +0 -1
- package/app/assets/index-7NKGenq7.css +0 -1
- package/app/assets/index-BBySSIJT.js +0 -10
- package/app/assets/market-B2oImfqS.css +0 -1
- package/app/assets/market.module-BXeOH_ee.js +0 -1
- package/app/assets/module-host-BHOsDk69.js +0 -1
- package/app/assets/package-C_xD77DO.js +0 -1
- package/app/assets/pin-BEsLCHJL.js +0 -1
- package/app/assets/plus-C301wuGJ.js +0 -1
- package/app/assets/products-CfPFkCnk.js +0 -1
- package/app/assets/project-public-CYza4XVS.js +0 -4
- package/app/assets/project-public-DqjxO6ad.js +0 -1
- package/app/assets/public-DoBzMSlG.js +0 -1
- package/app/assets/ui-public-CX7L8QF_.js +0 -1
- package/app/assets/use-favorites-ChTJGQkB.js +0 -1
- package/app/assets/workbench-13XxpUuA.css +0 -1
- package/app/assets/workbench-BCuh9Nyq.js +0 -2
- package/app/assets/workspace-view-state-CYNxOsyc.js +0 -1
- /package/app/assets/{api-DP_rt0Zx.js → api-KZa8CR8X.js} +0 -0
- /package/app/assets/{use-favorites-_eKBQGeF.css → favorites-_eKBQGeF.css} +0 -0
- /package/app/assets/{format-jsGSJ1GL.js → format-DL7i7_eV.js} +0 -0
- /package/app/assets/{graphicalItemSelectors-GhHIivGe.js → graphicalItemSelectors-CJfZ6cht.js} +0 -0
- /package/app/assets/{group--adLvfC6.js → group-Ed305HyG.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./arrow-left-rfprDrQc.js";import{n as t,t as n}from"./clock-3-DpvJxor3.js";import{t as r}from"./chart-no-axes-combined-dFluBLOV.js";import{t as i}from"./check-DokC3Ug0.js";import{n as a}from"./link-2-B7GAWapc.js";import{t as o}from"./chevron-right-2HEa4oQb.js";import{t as s}from"./grid-2x2-BNdV1X54.js";import{t as c}from"./list-DrSHrHvT.js";import{t as l}from"./plus-C301wuGJ.js";import{t as u}from"./refresh-cw-BZ6-gKfF.js";import{n as d,r as f}from"./workspace-view-state-CYNxOsyc.js";import{_ as p,d as m,m as h,o as g,p as _,s as v}from"./index-BBySSIJT.js";import"./public-DoBzMSlG.js";import{t as y}from"./ProgressiveRows-DPZqhsXV.js";import{t as b}from"./api-DP_rt0Zx.js";import{t as x}from"./format-jsGSJ1GL.js";import{n as S,r as C,t as w}from"./use-favorites-ChTJGQkB.js";import{A as T,At as E,B as D,C as O,D as k,Dt as A,E as ee,Et as j,F as M,G as te,Ht as ne,I as re,K as ie,L as ae,M as oe,Mt as se,N as ce,O as N,Ot as le,P as ue,Q as P,Rt as de,St as fe,T as pe,Tt as me,Ut as he,V as ge,Vt as _e,Y as ve,_ as ye,_t as be,a as xe,at as Se,b as Ce,bt as F,ct as we,d as Te,f as Ee,ft as De,gt as Oe,h as ke,it as Ae,j as I,jt as je,k as Me,kt as L,lt as Ne,m as Pe,mt as Fe,n as Ie,o as Le,ot as Re,p as ze,pt as Be,r as Ve,s as He,st as Ue,t as We,tt as Ge,ut as Ke,v as qe,w as Je,wt as Ye,x as Xe,xt as Ze,y as Qe,z as $e}from"./CartesianChart-acGhtLrw.js";import{a as et,i as tt,n as nt,r as rt,t as it}from"./LineChart-CyiCaQMM.js";import{n as R,t as z}from"./graphicalItemSelectors-GhHIivGe.js";var at=m(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),ot=m(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),st=m(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),B=p(h(),1);function ct(e=``){return{month:e,shops:[],metric:`sales`,category:``,shopFilter:``,recentYear:!1,productView:`list`,columns:[`shop`,`category`,`sales`,`salesYoy`,`salesMom`,`views`,`trends`],q:``,sort:`sales`,direction:`desc`}}var V=g();function lt({kind:e,selectedIds:t=[],onSelect:n}){let r=S(e);return(0,V.jsxs)(`div`,{className:C.picker,children:[r.loading&&(0,V.jsxs)(`p`,{role:`status`,children:[`正在读取收藏`,w[e],`…`]}),r.error&&(0,V.jsxs)(`p`,{role:`alert`,children:[r.error,(0,V.jsx)(`button`,{onClick:r.refresh,children:`重试`})]}),!r.loading&&!r.error&&!r.items.length&&(0,V.jsxs)(`p`,{children:[`暂无收藏`,w[e],`,可先在排行榜或“我的收藏”中添加。`]}),(0,V.jsx)(y,{items:r.items,resetKey:e,onVisibleCount:r.onVisibleCount,children:i=>{let a=r.resolve(i.key),o=a.category?.id||a.record?.id,s=!!o&&t.includes(o);return(0,V.jsxs)(`button`,{className:C.pickRow,disabled:!o||s,onClick:()=>n(a),children:[(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`b`,{children:a.category?.name||a.record?.name||`收藏资料待更新`}),(0,V.jsx)(`small`,{children:a.category?a.categoryPath||a.category.name:o?`${w[e]} ID:${o}`:`资料尚未就绪`})]}),(0,V.jsx)(`span`,{children:s?`已选择`:`选择`})]},i.key)}})]})}var H=(e,t)=>JSON.stringify({name:e.trim()||`未命名分析`,config:t});function ut(e){let[t,n]=d(`market.analysisDraft.`+e.id,e),r=(0,B.useRef)(t);(0,B.useEffect)(()=>{r.current=t},[t]);let i=(0,B.useRef)(t.revision),a=(0,B.useRef)(H(e.name,e.config)),o=(0,B.useRef)(Promise.resolve()),[s,c]=(0,B.useState)(!1),[l,u]=(0,B.useState)(``),[f,p]=(0,B.useState)(()=>H(e.name,e.config)),m=(0,B.useCallback)(()=>{let e=r.current,t=H(e.name,e.config),s=o.current.catch(()=>{}).then(async()=>{if(a.current!==t){c(!0),u(``);try{let r=await b.saveAnalysis({id:e.id,name:e.name.trim()||`未命名分析`,config:e.config,revision:i.current});i.current=r.revision,a.current=t,p(t),n(e=>({...e,revision:r.revision,updatedAt:r.updatedAt}))}catch(e){throw u(e instanceof Error?e.message:`自动保存失败`),e}finally{c(!1)}}});return o.current=s,s},[n]),h=H(t.name,t.config);return(0,B.useEffect)(()=>{if(h===a.current)return;let e=setTimeout(()=>void m().catch(()=>{}),700);return()=>clearTimeout(e)},[h,f,m]),{draft:t,config:t.config,name:t.name,saving:s,error:l,dirty:h!==f,flush:m,setName:e=>n(t=>({...t,name:e})),change:e=>n(t=>({...t,config:{...t.config,...e}}))}}function U(e,t=0){let n=e?new URLSearchParams(e).toString():``,r=n+`:`+t,[i,a]=(0,B.useState)({key:``,data:null,error:``});return(0,B.useEffect)(()=>{if(!n)return;let e=new AbortController;return b.shopLayout(Object.fromEntries(new URLSearchParams(n)),e.signal).then(t=>{e.signal.aborted||a({key:r,data:t,error:``})}).catch(t=>{e.signal.aborted||a({key:r,data:null,error:t instanceof Error?t.message:`数据读取失败`})}),()=>e.abort()},[n,r]),i.key===r?{...i,loading:!1}:{data:null,error:``,loading:!!n}}var dt=e=>null;dt.displayName=`Cell`;var ft=(e,t,n)=>{var r=Ze();return(i,a)=>o=>{e?.(i,a,o),r(k({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},pt=e=>{var t=Ze();return(n,r)=>i=>{e?.(n,r,i),t(pe())}},mt=(e,t,n)=>{var r=Ze();return(i,a)=>o=>{e?.(i,a,o),r(ee({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},ht=(e,t,n)=>{var r=n??e;if(!L(r))return j(r,t,0)},gt=(e,t,n)=>{var r={},i=e.filter(ce),a=e.filter(e=>e.stackId==null),o=i.reduce((e,t)=>{var n=e[t.stackId];return n??=[],n.push(t),e[t.stackId]=n,e},r),s=Object.entries(o).map(e=>{var[r,i]=e;return{stackId:r,dataKeys:i.map(e=>e.dataKey),barSize:ht(t,n,i[0]?.barSize)}}),c=a.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>e!=null),barSize:ht(t,n,e.barSize)}));return[...s,...c]};function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?_t(Object(n),!0).forEach(function(t){vt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vt(e,t,n){return(t=yt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yt(e){var t=bt(e,`string`);return typeof t==`symbol`?t:t+``}function bt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function xt(e,t,n,r,i){var a=r.length;if(!(a<1)){var o=j(e,n,0,!0),s,c=[];if(be(r[0]?.barSize)){var l=!1,u=n/a,d=r.reduce((e,t)=>e+(t.barSize||0),0);d+=(a-1)*o,d>=n&&(d-=(a-1)*o,o=0),d>=n&&u>0&&(l=!0,u*=.9,d=a*u);var f={offset:((n-d)/2>>0)-o,size:0};s=r.reduce((e,t)=>{var n={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:f.offset+f.size+o,size:l?u:t.barSize??0}},r=[...e,n];return f=n.position,r},c)}else{var p=j(t,n,0,!0);n-2*p-(a-1)*o<=0&&(o=0);var m=(n-2*p-(a-1)*o)/a;m>1&&(m>>=0);var h=be(i)?Math.min(m,i):m;s=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:p+(m+o)*n+(m-h)/2,size:h}}],c)}return s}}var St=(e,t,n,r,i,a,o)=>{var s=L(o)?t:o,c=xt(n,r,i===a?a:i,e,s);return i!==a&&c!=null&&(c=c.map(e=>W(W({},e),{},{position:W(W({},e.position),{},{offset:e.position.offset-i/2})}))),c},Ct=(e,t)=>{var n=ue(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:a}=i;if(a)return a.find(e=>e.key===n)}}}},wt=(e,t)=>{if(!(e==null||t==null)){var n=e.find(e=>e.stackId===t.stackId&&t.dataKey!=null&&e.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function Tt(e,t){return e&&typeof e==`object`&&`zIndex`in e&&typeof e.zIndex==`number`&&be(e.zIndex)?e.zIndex:t}var Et=!0,Dt=`Invariant failed`;function Ot(e,t){if(!e){if(Et)throw Error(Dt);var n=typeof t==`function`?t():t,r=n?`${Dt}: ${n}`:Dt;throw Error(r)}}function kt(){return kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kt.apply(null,arguments)}function At(e){return B.createElement(tt,kt({shapeType:`rectangle`,activeClassName:`recharts-active-bar`,inActiveClassName:`recharts-inactive-bar`},e))}var jt=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,r)=>{if(E(e))return e;var i=E(n)||L(n);return i?e(n,r):(!i&&Ot(!1,`minPointSize callback function received a value with type of ${typeof n}. Currently only numbers or null/undefined are supported.`),t)}},Mt=(e,t,n)=>n,G=F([oe,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`bar`).find(e=>e.id===t)),Nt=F([G],e=>e?.maxBarSize),Pt=(e,t,n,r)=>r,Ft=F([P,oe,z,R,Mt],(e,t,n,r,i)=>t.filter(t=>e===`horizontal`?t.xAxisId===n:t.yAxisId===r).filter(e=>e.isPanorama===i).filter(e=>e.hide===!1).filter(e=>e.type===`bar`)),It=(e,t,n)=>{var r=P(e),i=z(e,t),a=R(e,t);if(!(i==null||a==null))return r===`horizontal`?T(e,`yAxis`,a,n):T(e,`xAxis`,i,n)},Lt=F([Ft,$e,(e,t)=>{var n=P(e),r=z(e,t),i=R(e,t);if(!(r==null||i==null))return n===`horizontal`?Me(e,`xAxis`,r):Me(e,`yAxis`,i)}],gt),Rt=(e,t,n)=>{var r=G(e,t);if(r==null)return 0;var i=z(e,t),a=R(e,t);if(i==null||a==null)return 0;var o=P(e),s=D(e),{maxBarSize:c}=r,l=L(c)?s:c,u,d;return o===`horizontal`?(u=N(e,`xAxis`,i,n),d=I(e,`xAxis`,i,n)):(u=N(e,`yAxis`,a,n),d=I(e,`yAxis`,a,n)),we(u,d,!0)??l??0},zt=(e,t,n)=>{var r=P(e),i=z(e,t),a=R(e,t);if(!(i==null||a==null)){var o,s;return r===`horizontal`?(o=N(e,`xAxis`,i,n),s=I(e,`xAxis`,i,n)):(o=N(e,`yAxis`,a,n),s=I(e,`yAxis`,a,n)),we(o,s)}},Bt=F([Ue,Re,(e,t,n)=>{var r=z(e,t);if(r!=null)return N(e,`xAxis`,r,n)},(e,t,n)=>{var r=R(e,t);if(r!=null)return N(e,`yAxis`,r,n)},(e,t,n)=>{var r=z(e,t);if(r!=null)return I(e,`xAxis`,r,n)},(e,t,n)=>{var r=R(e,t);if(r!=null)return I(e,`yAxis`,r,n)},F([F([Lt,D,ae,re,Rt,zt,Nt],St),G],wt),P,ge,zt,F([It,G],Ct),G,Pt],(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{var{chartData:p,dataStartIndex:m,dataEndIndex:h}=c;if(!(d==null||o==null||t==null||s!==`horizontal`&&s!==`vertical`||n==null||r==null||i==null||a==null||l==null)){var{data:g}=d,_=g!=null&&g.length>0?g:p?.slice(m,h+1);if(_!=null)return bn({layout:s,barSettings:d,pos:o,parentViewBox:t,bandSize:l,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,stackedData:u,displayedData:_,offset:e,cells:f,dataStartIndex:m})}}),Vt=[`index`];function Ht(){return Ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ht.apply(null,arguments)}function Ut(e,t){if(e==null)return{};var n,r,i=Wt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Wt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Gt=(0,B.createContext)(void 0),Kt=e=>{var t=(0,B.useContext)(Gt);if(t!=null)return t.stackId;if(e!=null)return De(e)},qt=(e,t)=>`recharts-bar-stack-clip-path-${e}-${t}`,Jt=e=>{var t=(0,B.useContext)(Gt);if(t!=null){var{stackId:n}=t;return`url(#${qt(n,e)})`}},Yt=e=>{var{index:t}=e,n=Ut(e,Vt),r=Jt(t);return B.createElement(de,Ht({className:`recharts-bar-stack-layer`,clipPath:r},n))},Xt=[`onMouseEnter`,`onMouseLeave`,`onClick`],Zt=[`value`,`background`,`tooltipPosition`],Qt=[`id`],$t=[`onMouseEnter`,`onClick`,`onMouseLeave`];function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K.apply(null,arguments)}function en(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?en(Object(n),!0).forEach(function(t){tn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):en(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tn(e,t,n){return(t=nn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nn(e){var t=rn(e,`string`);return typeof t==`symbol`?t:t+``}function rn(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function J(e,t){if(e==null)return{};var n,r,i=an(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function an(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var on=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:Be(n,t),payload:e}]},sn=B.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:a,hide:o,unit:s,tooltipType:c,id:l}=e,u={dataDefinedOnItem:void 0,getPosition:se,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:Be(a,t),hide:o,type:c,color:i,unit:s,graphicalItemId:l}};return B.createElement(Pe,{tooltipEntrySettings:u})});function cn(e){var t=fe(Je),{data:n,dataKey:r,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:s,onClick:c}=a,l=J(a,Xt),u=ft(o,r,a.id),d=pt(s),f=mt(c,r,a.id);if(!i||n==null)return null;var p=ne(i);return B.createElement(Xe,{zIndex:Tt(i,M.barBackground)},n.map((e,n)=>{var{value:a,background:o,tooltipPosition:s}=e,c=J(e,Zt);if(!o)return null;var m=u(e,n),h=d(e,n),g=f(e,n),_=q(q(q(q(q({option:i,isActive:String(n)===t},c),{},{fill:`#eee`},o),p),me(l,e,n)),{},{onMouseEnter:m,onMouseLeave:h,onClick:g,dataKey:r,index:n,className:`recharts-bar-background-rectangle`});return B.createElement(At,K({key:`background-bar-${n}`},_))}))}function ln(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return q(q({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return B.createElement(ye,{value:t?i:void 0},n)}function un(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:a,dataKey:o}=e,s=fe(Je),c=fe(O),l=n&&String(i.originalDataIndex)===s&&(c==null||o===c),[u,d]=(0,B.useState)(!1),[f,p]=(0,B.useState)(!1);(0,B.useEffect)(()=>{var e;return l?(d(!0),e=requestAnimationFrame(()=>{p(!0)})):p(!1),()=>{cancelAnimationFrame(e)}},[l]);var m=(0,B.useCallback)(()=>{l||d(!1)},[l]),h=l&&f,g=l||u,_=l?n===!0?t:n:t,v=B.createElement(At,K({},r,{name:String(r.name)},i,{isActive:h,option:_,index:a,dataKey:o,onTransitionEnd:m}));return g?B.createElement(Xe,{zIndex:M.activeBar},B.createElement(Yt,{index:i.originalDataIndex},v)):v}function dn(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:a}=e;return B.createElement(At,K({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:i,dataKey:a}))}function fn(e){var{data:t,props:n}=e,r=_e(n)??{},{id:i}=r,a=J(r,Qt),{shape:o,dataKey:s,activeBar:c}=n,{onMouseEnter:l,onClick:u,onMouseLeave:d}=n,f=J(n,$t),p=ft(l,s,i),m=pt(d),h=mt(u,s,i);return t?B.createElement(B.Fragment,null,t.map((e,t)=>B.createElement(Yt,K({index:e.originalDataIndex,key:`rectangle-${e?.x}-${e?.y}-${e?.value}-${t}`,className:`recharts-bar-rectangle`},me(f,e,t),{onMouseEnter:p(e,t),onMouseLeave:m(e,t),onClick:h(e,t)}),c?B.createElement(un,{shape:o,activeBar:c,baseProps:a,entry:e,index:t,dataKey:s}):B.createElement(dn,{shape:o,baseProps:a,entry:e,index:t,dataKey:s})))):null}function pn(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:a,animationBegin:o,animationDuration:s,animationEasing:c,onAnimationEnd:l,onAnimationStart:u}=t,d=n.current,f=te(t,`recharts-bar-`),[p,m]=(0,B.useState)(!1),h=!p,g=(0,B.useCallback)(()=>{typeof l==`function`&&l(),m(!1)},[l]),_=(0,B.useCallback)(()=>{typeof u==`function`&&u(),m(!0)},[u]);return B.createElement(ln,{showLabels:h,rects:r},B.createElement(ie,{animationId:f,begin:o,duration:s,isActive:a,easing:c,onAnimationEnd:g,onAnimationStart:_,key:f},e=>{var a=e===1?r:r?.map((t,n)=>{var r=d&&d[n];if(r)return q(q({},t),{},{x:A(r.x,t.x,e),y:A(r.y,t.y,e),width:A(r.width,t.width,e),height:A(r.height,t.height,e)});if(i===`horizontal`){var a=A(0,t.height,e),o=A(t.stackedBarStart,t.y,e);return q(q({},t),{},{y:o,height:a})}var s=A(0,t.width,e),c=A(t.stackedBarStart,t.x,e);return q(q({},t),{},{width:s,x:c})});return e>0&&(n.current=a??null),a==null?null:B.createElement(de,null,B.createElement(fn,{props:t,data:a}))}),B.createElement(qe,{label:t.label}),t.children)}function mn(e){var t=(0,B.useRef)(null);return B.createElement(pn,{previousRectanglesRef:t,props:e})}var hn=0,gn=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:Fe(e,t)}},_n=class extends B.PureComponent{render(){var{hide:e,data:t,dataKey:n,className:r,xAxisId:i,yAxisId:a,needClip:o,background:s,id:c}=this.props;if(e||t==null)return null;var l=he(`recharts-bar`,r),u=c;return B.createElement(de,{className:l,id:c},o&&B.createElement(`defs`,null,B.createElement(xe,{clipPathId:u,xAxisId:i,yAxisId:a})),B.createElement(de,{className:`recharts-bar-rectangles`,clipPath:o?`url(#clipPath-${u})`:void 0},B.createElement(cn,{data:t,dataKey:n,background:s,allOtherBarProps:this.props}),B.createElement(mn,this.props)))}},vn={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:`ease`,background:!1,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`rect`,minPointSize:hn,xAxisId:0,yAxisId:0,zIndex:M.bar};function yn(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:c,animationEasing:l,isAnimationActive:u}=e,{needClip:d}=Le(t,n),f=Ge(),p=Se(),m=ke(e.children,dt),h=fe(t=>Bt(t,e.id,p,m));if(f!==`vertical`&&f!==`horizontal`)return null;var g,_=h?.[0];return g=_==null||_.height==null||_.width==null?0:f===`vertical`?_.height/2:_.width/2,B.createElement(rt,{xAxisId:t,yAxisId:n,data:h,dataPointFormatter:gn,errorBarOffset:g},B.createElement(_n,K({},e,{layout:f,needClip:d,data:h,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:c,animationEasing:l,isAnimationActive:u})))}function bn(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:i},pos:a,bandSize:o,xAxis:s,yAxis:c,xAxisTicks:l,yAxisTicks:u,stackedData:d,displayedData:f,offset:p,cells:m,parentViewBox:h,dataStartIndex:g}=e,_=t===`horizontal`?c:s,v=d?_.scale.domain():null,y=Ne({numericAxis:_}),b=_.scale.map(y);return f.map((e,f)=>{var _,x,S,C,w,T;if(d){var E=d[f+g];if(E==null)return null;_=Oe(E,v)}else _=Fe(e,n),Array.isArray(_)||(_=[y,_]);var D=jt(r,hn)(_[1],f);if(t===`horizontal`){var O=c.scale.map(_[0]),k=c.scale.map(_[1]);if(O==null||k==null)return null;x=Ke({axis:s,ticks:l,bandSize:o,offset:a.offset,entry:e,index:f}),S=k??O??void 0,C=a.size;var A=O-k;if(w=le(A)?0:A,T={x,y:p.top,width:C,height:p.height},Math.abs(D)>0&&Math.abs(w)<Math.abs(D)){var ee=je(w||D)*(Math.abs(D)-Math.abs(w));S-=ee,w+=ee}}else{var j=s.scale.map(_[0]),M=s.scale.map(_[1]);if(j==null||M==null)return null;if(x=j,S=Ke({axis:c,ticks:u,bandSize:o,offset:a.offset,entry:e,index:f}),C=M-j,w=a.size,T={x:p.left,y:S,width:p.width,height:w},Math.abs(D)>0&&Math.abs(C)<Math.abs(D)){var te=je(C||D)*(Math.abs(D)-Math.abs(C));C+=te}}return x==null||S==null||C==null||w==null||!i&&(C===0||w===0)?null:q(q({},e),{},{stackedBarStart:b,x,y:S,width:C,height:w,value:d?_:_[1],payload:e,background:T,tooltipPosition:{x:x+C/2,y:S+w/2},parentViewBox:h,originalDataIndex:f},m&&m[f]&&m[f].props)}).filter(Boolean)}function xn(e){var t=Ye(e,vn),n=Kt(t.stackId),r=Se();return B.createElement(Ee,{id:t.id,type:`bar`},e=>B.createElement(B.Fragment,null,B.createElement(ze,{legendPayload:on(t)}),B.createElement(sn,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),B.createElement(Te,{type:`bar`,id:e,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r,hasCustomShape:t.shape!=null}),B.createElement(Xe,{zIndex:t.zIndex},B.createElement(yn,K({},t,{id:e})))))}var Sn=B.memo(xn,ve);Sn.displayName=`Bar`;var Cn=[`axis`,`item`],wn=(0,B.forwardRef)((e,t)=>B.createElement(We,{chartName:`BarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Cn,tooltipPayloadSearcher:Ce,categoricalChartProps:e,ref:t})),Tn=_(),Y={root:`_root_mxmkq_1`,dialog:`_dialog_mxmkq_2`,primary:`_primary_mxmkq_4`,historyHeader:`_historyHeader_mxmkq_5`,eyebrow:`_eyebrow_mxmkq_5`,history:`_history_mxmkq_5`,panelHeading:`_panelHeading_mxmkq_5`,historyList:`_historyList_mxmkq_6`,historyIcon:`_historyIcon_mxmkq_6`,historyTitle:`_historyTitle_mxmkq_6`,emptyHistory:`_emptyHistory_mxmkq_6`,editorHeader:`_editorHeader_mxmkq_7`,inline:`_inline_mxmkq_7`,editorIdentity:`_editorIdentity_mxmkq_7`,editorTools:`_editorTools_mxmkq_7`,nameInput:`_nameInput_mxmkq_7`,saveStatus:`_saveStatus_mxmkq_7`,panel:`_panel_mxmkq_5`,horizontal:`_horizontal_mxmkq_8`,shopName:`_shopName_mxmkq_8`,summaryTable:`_summaryTable_mxmkq_8`,link:`_link_mxmkq_8`,sort:`_sort_mxmkq_8`,note:`_note_mxmkq_9`,error:`_error_mxmkq_9`,empty:`_empty_mxmkq_6`,metricBar:`_metricBar_mxmkq_10`,chartRange:`_chartRange_mxmkq_10`,chart:`_chart_mxmkq_10`,trendChart:`_trendChart_mxmkq_10`,filters:`_filters_mxmkq_11`,columnOptions:`_columnOptions_mxmkq_11`,product:`_product_mxmkq_12`,noImage:`_noImage_mxmkq_12`,categoryCell:`_categoryCell_mxmkq_12`,pagination:`_pagination_mxmkq_12`,productCards:`_productCards_mxmkq_12`,cardImage:`_cardImage_mxmkq_15`,cardDetails:`_cardDetails_mxmkq_18`,searchForm:`_searchForm_mxmkq_23`,searchResults:`_searchResults_mxmkq_23`,rangeTrack:`_rangeTrack_mxmkq_27`,rangeWindow:`_rangeWindow_mxmkq_27`,rangeHandle:`_rangeHandle_mxmkq_27`,rangeGrip:`_rangeGrip_mxmkq_27`},X=(e,t,n)=>Math.max(t,Math.min(n,e));function Z(e,t){if(t<=0)return{start:0,size:0};let n=X(e.size,Math.min(3,t),t);return{start:X(e.start,0,t-n),size:n}}var En=e=>Z({start:0,size:24},e);function Dn(e,t){if(t<=0)return{start:0,end:0,count:0};let n=Z(e,t),r=Math.round(n.size),i=X(Math.round(n.start),0,t-r);return{start:i,end:i+r,count:r}}var On=(e,t,n)=>Z({...e,start:e.start+t},n);function kn(e,t,n,r){let i=Z(e,r),a=X(n,0,1),o=Z({start:0,size:i.size*t},r).size;return Z({start:i.start+a*(i.size-o),size:o},r)}function An(e,t,n,r){let i=Z(e,r),a=Math.min(3,r);if(t===`start`){let e=i.start+i.size,t=X(n,0,e-a);return{start:t,size:e-t}}return{...i,size:X(n,i.start+a,r)-i.start}}function jn(e,t,n,r){let i=Math.max(1,n.width),a=t.deltaMode===1?16:t.deltaMode===2?i:1,o=(Math.abs(t.deltaX)>Math.abs(t.deltaY)?t.deltaX:t.deltaY)*a;if(t.ctrlKey||t.metaKey){let a=(t.clientX-n.left)/i;return kn(e,Math.exp(X(o*.003,-1,1)),a,r)}return On(e,o/i*e.size,r)}function Mn({view:e,total:t,onChange:n}){let r=(0,B.useRef)(null),i=(0,B.useRef)(null);function a(t){if(t.button!==0||!r.current)return;let n=t.target.closest(`[data-range-part]`)?.dataset.rangePart;n!==`pan`&&n!==`start`&&n!==`end`||(i.current={kind:n,x:t.clientX,width:r.current.getBoundingClientRect().width,view:e,pointer:t.pointerId},t.currentTarget.setPointerCapture(t.pointerId),t.preventDefault())}function o(e){let r=i.current;if(!r||r.pointer!==e.pointerId)return;let a=(e.clientX-r.x)/Math.max(1,r.width)*t;n(()=>r.kind===`pan`?On(r.view,a,t):An(r.view,r.kind,(r.kind===`start`?r.view.start:r.view.start+r.view.size)+a,t))}function s(e,r){let i=e.key===`ArrowLeft`?-1:+(e.key===`ArrowRight`);i&&(e.preventDefault(),n(e=>An(e,r,(r===`start`?e.start:e.start+e.size)+i,t)))}return(0,V.jsx)(`div`,{ref:r,className:Y.rangeTrack,"aria-label":`图表显示范围`,onPointerDown:a,onPointerMove:o,onPointerUp:()=>{i.current=null},onPointerCancel:()=>{i.current=null},onLostPointerCapture:()=>{i.current=null},children:(0,V.jsxs)(`div`,{className:Y.rangeWindow,"data-range-part":`pan`,style:{left:`${e.start/t*100}%`,width:`${e.size/t*100}%`},children:[(0,V.jsx)(`span`,{role:`slider`,tabIndex:0,"aria-label":`起始类目`,"aria-valuemin":1,"aria-valuemax":t,"aria-valuenow":Math.round(e.start)+1,"data-range-part":`start`,onKeyDown:e=>s(e,`start`),className:Y.rangeHandle,children:`Ⅱ`}),(0,V.jsx)(`span`,{className:Y.rangeGrip,"data-range-part":`pan`,"aria-hidden":`true`,children:`···`}),(0,V.jsx)(`span`,{role:`slider`,tabIndex:0,"aria-label":`结束类目`,"aria-valuemin":1,"aria-valuemax":t,"aria-valuenow":Math.round(e.start+e.size),"data-range-part":`end`,onKeyDown:e=>s(e,`end`),className:Y.rangeHandle,children:`Ⅱ`})]})})}function Nn(e,t,n){let r=(0,B.useRef)(null),[i,a]=(0,B.useState)(()=>({scope:e,view:En(t)})),o=i.scope===e?Z(i.view,t):En(t),s=(0,B.useCallback)(n=>{a(r=>({scope:e,view:Z(n(r.scope===e?r.view:En(t)),t)}))},[e,t]);return(0,B.useEffect)(()=>{let e=r.current;if(!e||!n||t<2)return;function i(n){if(!e||!n.deltaX&&!n.deltaY)return;n.preventDefault(),n.stopPropagation();let r=(e.querySelector(`.recharts-cartesian-grid`)||e).getBoundingClientRect();s(e=>jn(e,n,r,t))}return e.addEventListener(`wheel`,i,{passive:!1}),()=>e.removeEventListener(`wheel`,i)},[n,t,s]),{plot:r,view:o,indices:Dn(o,t),update:s}}var Pn=[`#469eff`,`#34b9ac`,`#d4a25c`],Fn=[{key:`sales`,label:`销售额`,unit:`元`},{key:`marketShare`,label:`市场占有率`,unit:`%`},{key:`itemCount`,label:`链接数`,unit:`个`},{key:`efficiency`,label:`链接效率`,unit:`元/链接`},{key:`views`,label:`浏览量`,unit:`次`}],Q=(e,t=2)=>e==null?`—`:e.toLocaleString(`zh-CN`,{maximumFractionDigits:t}),$=e=>e==null?`—`:e>=1e8?Q(e/1e8)+`亿`:e>=1e4?Q(e/1e4)+`万`:Q(e);function In({x:e=0,y:t=0,payload:n}){let r=Array.from(String(n?.value||``)),i=[];for(let e=0;e<r.length;e+=16)i.push(r.slice(e,e+16).join(``));return(0,V.jsx)(`g`,{transform:`translate(${e},${t+10}) rotate(-45)`,children:(0,V.jsx)(`text`,{textAnchor:`end`,fill:`var(--omni-muted,#91abc5)`,fontSize:10,children:i.map((e,t)=>(0,V.jsx)(`tspan`,{x:0,dy:t?12:0,children:e},t))})})}function Ln({categories:e,shops:t,metric:n,onCategory:r,selectedCategory:i,selectedShop:a}){let[o,s]=(0,B.useState)(!1),{plot:c,view:l,indices:u,update:d}=Nn(e.map(e=>e.id).join(`,`),e.length,!o),{start:f,end:p,count:m}=u;function h(t){d(n=>On(n,t*m,e.length))}let g=Fn.find(e=>e.key===n),_=e.map(e=>({id:e.id,name:e.name,...Object.fromEntries(t.map(t=>[t.id,e.shops.find(e=>e.shopId===t.id)?.[n]??null]))})),v=_.slice(f,p);return(0,V.jsxs)(`section`,{className:Y.panel,"aria-label":g.label+`品类对比`,children:[(0,V.jsxs)(`div`,{className:Y.panelHeading,children:[(0,V.jsxs)(`h2`,{children:[g.label,(0,V.jsxs)(`small`,{children:[g.unit,` · 点击类目筛选商品`]})]}),(0,V.jsx)(`button`,{"aria-pressed":o,onClick:()=>s(!o),children:o?`查看图表`:`数据对比`})]}),o?(0,V.jsx)(`div`,{className:Y.horizontal,children:(0,V.jsxs)(`table`,{children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`叶子类目`}),t.map((e,t)=>(0,V.jsxs)(`th`,{children:[(0,V.jsx)(`i`,{style:{background:Pn[t]}}),e.name]},e.id))]})}),(0,V.jsx)(`tbody`,{children:(0,V.jsx)(y,{items:e||[],columns:t.length+1,children:e=>(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`td`,{children:(0,V.jsx)(`button`,{className:Y.link,onClick:()=>r(e.id),children:e.name})}),t.map(t=>(0,V.jsx)(`td`,{children:Q(e.shops.find(e=>e.shopId===t.id)?.[n])},t.id))]},e.id)})})]})}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:Y.chartRange,children:[(0,V.jsxs)(`span`,{children:[`第 `,_.length?f+1:0,`–`,p,` 项 / 共 `,_.length,` 项`]}),_.length>12&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{onClick:()=>h(-1),disabled:f===0,children:`上一组`}),(0,V.jsx)(`button`,{onClick:()=>h(1),disabled:p===_.length,children:`下一组`}),(0,V.jsx)(`button`,{"aria-pressed":m===_.length,onClick:()=>d(()=>({start:0,size:_.length})),children:`显示全部`}),(0,V.jsx)(`button`,{"aria-pressed":m===Math.min(24,_.length),onClick:()=>d(()=>En(_.length)),children:`紧凑视图`}),(0,V.jsx)(`span`,{children:`滚轮 / 双指滑动平移 · Ctrl+滚轮 / 双指捏合缩放`})]})]}),(0,V.jsx)(`div`,{ref:c,className:Y.chart,"aria-label":`品类图表,可滚轮平移及缩放`,children:(0,V.jsx)(Ae,{width:`100%`,height:`100%`,children:(0,V.jsxs)(wn,{data:v,margin:{top:12,right:18,bottom:12,left:30},barCategoryGap:`12%`,barGap:2,accessibilityLayer:!0,children:[(0,V.jsx)(He,{stroke:`var(--omni-line,#29445f)`,vertical:!1}),(0,V.jsx)(Ve,{dataKey:`name`,interval:0,height:145,tick:(0,V.jsx)(In,{})}),(0,V.jsx)(Ie,{tick:{fontSize:10,fill:`var(--omni-muted,#91abc5)`},tickFormatter:e=>n===`sales`||n===`efficiency`?$(e):Q(e,0),width:70}),(0,V.jsx)(Qe,{cursor:{fill:`var(--omni-panel,#132d49)`,opacity:.4},contentStyle:{background:`var(--omni-bg,#0a1524)`,border:`1px solid var(--omni-line,#29445f)`,borderRadius:8},formatter:e=>[Q(typeof e==`number`?e:null)+` `+g.unit]}),(0,V.jsx)(et,{verticalAlign:`top`,height:34,wrapperStyle:{fontSize:12}}),t.map((e,t)=>(0,V.jsx)(Sn,{isAnimationActive:!1,dataKey:e.id,name:e.name,fill:Pn[t],maxBarSize:28,radius:[3,3,0,0],onClick:t=>{let n=v[t.originalDataIndex];n&&r(n.id,e.id)},children:v.map(t=>(0,V.jsx)(dt,{fillOpacity:i&&i===t.id&&(!a||a===e.id)?1:i?.7:1,stroke:i===t.id&&(!a||a===e.id)?`var(--omni-text,#dceaf7)`:void 0,strokeWidth:2},t.id))},e.id))]})})}),_.length>3&&(0,V.jsx)(Mn,{view:l,total:_.length,onChange:d})]}),(0,V.jsx)(`p`,{className:Y.note,children:`链接效率=上榜商品销售额 ÷ 去重上榜链接数。浏览量为来源浏览次数;缺失值显示 —。`})]})}function Rn({query:e,onClose:t}){let n=(0,B.useRef)(null),r=U({...e,view:`analysis-trend`});return(0,B.useEffect)(()=>{let e=document.activeElement;return n.current?.showModal(),()=>e?.focus()},[]),(0,Tn.createPortal)((0,V.jsxs)(`dialog`,{ref:n,className:Y.dialog,onCancel:e=>{e.preventDefault(),t()},onClick:e=>{e.target===e.currentTarget&&t()},"aria-label":`销售走势`,children:[(0,V.jsxs)(`div`,{className:Y.panelHeading,children:[(0,V.jsx)(`h2`,{children:r.data?.title||`销售走势`}),(0,V.jsx)(`button`,{autoFocus:!0,onClick:t,"aria-label":`关闭走势`,children:(0,V.jsx)(v,{size:18})})]}),r.loading?(0,V.jsx)(`p`,{role:`status`,children:`正在读取走势…`}):r.error?(0,V.jsx)(`p`,{role:`alert`,children:r.error}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:Y.trendChart,children:(0,V.jsx)(Ae,{width:`100%`,height:`100%`,children:(0,V.jsxs)(it,{data:r.data?.points,margin:{top:20,right:15,bottom:12,left:12},children:[(0,V.jsx)(He,{stroke:`var(--omni-line,#29445f)`,vertical:!1}),(0,V.jsx)(Ve,{dataKey:`month`,tick:{fontSize:10}}),(0,V.jsx)(Ie,{tickFormatter:$,tick:{fontSize:10},width:70}),(0,V.jsx)(Qe,{contentStyle:{background:`var(--omni-bg,#0a1524)`,border:`1px solid var(--omni-line,#29445f)`},formatter:e=>[$(typeof e==`number`?e:null),`销售额(元)`]}),(0,V.jsx)(nt,{dataKey:`sales`,name:`销售额`,stroke:Pn[0],strokeWidth:2,dot:{r:3},connectNulls:!1})]})})}),(0,V.jsx)(`p`,{className:Y.note,children:r.data?.notice})]})]}),document.body)}var zn=[[`shop`,`店铺`],[`category`,`叶子类目`],[`sales`,`销售额`],[`salesYoy`,`销售额同比`],[`salesMom`,`销售额环比`],[`views`,`浏览量`],[`units`,`成交件数`],[`unitPrice`,`件单价`],[`marketShare`,`市占率`],[`trends`,`走势`]],Bn=new Set([`sales`,`salesYoy`,`salesMom`,`views`,`units`,`unitPrice`,`marketShare`]);function Vn(e,t=!1){try{let n=new URL(e||``);return n.protocol===`https:`&&(t?n.hostname.endsWith(`.alicdn.com`):/\.(taobao|tmall)\.com$/.test(n.hostname))?n.href:void 0}catch{return}}function Hn({row:e}){let t=Vn(e.imageUrl,!0);return t?(0,V.jsx)(`img`,{src:t,alt:``,loading:`lazy`,referrerPolicy:`no-referrer`}):(0,V.jsx)(`span`,{className:Y.noImage,children:`商品`})}function Un({config:e,layout:t,taxonomy:n,onChange:r,onTrend:i}){let[l,u]=(0,B.useState)(1),[d,p]=(0,B.useState)(e.q),[m,h]=(0,B.useState)(!1),g=[e.month,e.recentYear,e.category,e.shopFilter,e.q,e.sort,e.direction,e.shops.join(`,`)].join(`:`),[_,v]=(0,B.useState)(g),b=g===_?l:1,S=U({view:`analysis-items`,month:e.month,recentYear:String(e.recentYear),shops:e.shops.join(`,`),category:e.category,shopFilter:e.shopFilter,q:e.q,sort:e.sort,direction:e.direction,page:String(b),pageSize:`25`}),C=zn.filter(([t])=>e.columns.includes(t)),w=new Set(t.categories.flatMap(e=>x(n,e.id).map(e=>e.id))),T=n.filter(e=>w.has(e.id)).map(e=>({id:e.id,name:x(n,e.id).map(e=>e.name).join(` / `)})).sort((e,t)=>e.name.localeCompare(t.name,`zh-CN`));function E(t,n){i({kind:n,product:t.id,category:t.categoryId,shops:e.shops.join(`,`),shopFilter:t.shopId,month:e.month})}function D(e,t){if(t===`shop`)return e.shopName;if(t===`category`)return x(n,e.categoryId).map(e=>e.name).join(` / `)||e.categoryName;if(t===`trends`)return(0,V.jsxs)(`span`,{className:Y.inline,children:[(0,V.jsx)(`button`,{className:Y.link,onClick:()=>E(e,`product`),children:`商品`}),(0,V.jsx)(`button`,{className:Y.link,onClick:()=>E(e,`category`),children:`类目`})]});let r=e[t];return typeof r==`number`?t===`sales`||t===`unitPrice`?$(r):[`salesYoy`,`salesMom`,`marketShare`].includes(t)?Q(r)+`%`:Q(r,0):`—`}let O=(e,t=!0)=>(0,V.jsxs)(`div`,{className:Y.product,children:[t&&(0,V.jsx)(Hn,{row:e}),(0,V.jsxs)(`div`,{children:[Vn(e.url)?(0,V.jsx)(`a`,{href:Vn(e.url),target:`_blank`,rel:`noreferrer`,children:e.name}):(0,V.jsx)(`b`,{children:e.name}),(0,V.jsxs)(`small`,{children:[`ID `,e.id,` · 原榜 `,e.sourceRank==null?`—`:`#`+e.sourceRank,e.conflicting?` · 指标冲突,保留为空`:``]})]})]});return(0,V.jsxs)(`section`,{className:Y.panel,"aria-label":`上榜商品链接列表`,children:[(0,V.jsxs)(`div`,{className:Y.panelHeading,children:[(0,V.jsxs)(`h2`,{children:[`上榜商品链接`,(0,V.jsxs)(`small`,{children:[Q(S.data?.total,0),` 条`]})]}),(0,V.jsxs)(`div`,{className:Y.inline,children:[(0,V.jsx)(`button`,{"aria-label":`商品大图`,"aria-pressed":e.productView===`grid`,onClick:()=>r({productView:`grid`}),children:(0,V.jsx)(s,{size:14})}),(0,V.jsx)(`button`,{"aria-label":`商品列表`,"aria-pressed":e.productView===`list`,onClick:()=>r({productView:`list`}),children:(0,V.jsx)(c,{size:14})}),(0,V.jsxs)(`button`,{"aria-expanded":m,onClick:()=>h(!m),children:[(0,V.jsx)(st,{size:14}),`表格配置`]})]})]}),(0,V.jsxs)(`div`,{className:Y.filters,children:[(0,V.jsxs)(`label`,{children:[`类目`,(0,V.jsxs)(`select`,{"aria-label":`上榜商品类目筛选`,value:w.has(e.category)?e.category:``,onChange:e=>r({category:e.target.value}),children:[(0,V.jsx)(`option`,{value:``,children:`全部上榜类目`}),T.map(e=>(0,V.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,V.jsxs)(`label`,{children:[`店铺`,(0,V.jsxs)(`select`,{"aria-label":`上榜商品店铺筛选`,value:e.shopFilter,onChange:e=>r({shopFilter:e.target.value}),children:[(0,V.jsx)(`option`,{value:``,children:`全部对比店铺`}),t.shops.map(e=>(0,V.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,V.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),r({q:d.trim()})},children:[(0,V.jsx)(f,{size:14}),(0,V.jsx)(`input`,{"aria-label":`搜索上榜商品`,value:d,onChange:e=>p(e.target.value),placeholder:`商品名称 / ID`,maxLength:100}),(0,V.jsx)(`button`,{type:`submit`,children:`搜索`})]}),e.category&&(0,V.jsx)(`button`,{className:Y.link,onClick:()=>r({category:``}),children:`清除类目筛选`})]}),m&&(0,V.jsxs)(`fieldset`,{className:Y.columnOptions,children:[(0,V.jsx)(`legend`,{children:`显示字段`}),zn.map(([t,n])=>(0,V.jsxs)(`label`,{children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:e.columns.includes(t),onChange:n=>r({columns:n.target.checked?[...e.columns,t]:e.columns.filter(e=>e!==t)})}),n]},t))]}),S.loading?(0,V.jsx)(`div`,{className:Y.empty,role:`status`,children:`正在读取上榜商品…`}):S.error?(0,V.jsx)(`div`,{className:Y.error,role:`alert`,children:S.error}):S.data?.rows.length?e.productView===`grid`?(0,V.jsx)(`div`,{className:Y.productCards,children:(0,V.jsx)(y,{items:S.data.rows||[],children:e=>(0,V.jsxs)(`article`,{tabIndex:0,"aria-label":e.name,children:[(0,V.jsx)(`div`,{className:Y.cardImage,children:(0,V.jsx)(Hn,{row:e})}),(0,V.jsxs)(`div`,{className:Y.cardDetails,children:[O(e,!1),(0,V.jsx)(`dl`,{children:C.map(([t,n])=>(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`dt`,{children:n}),(0,V.jsx)(`dd`,{children:D(e,t)})]},t))})]})]},`${e.shopId}:${e.categoryId}:${e.id}`)})}):(0,V.jsx)(`div`,{className:Y.horizontal,children:(0,V.jsxs)(`table`,{children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`序号`}),(0,V.jsx)(`th`,{children:`商品`}),C.map(([t,n])=>(0,V.jsx)(`th`,{children:Bn.has(t)?(0,V.jsxs)(`button`,{className:Y.sort,onClick:()=>r({sort:t,direction:e.sort===t&&e.direction===`desc`?`asc`:`desc`}),children:[n,e.sort===t&&(e.direction===`desc`?(0,V.jsx)(at,{size:12}):(0,V.jsx)(ot,{size:12}))]}):n},t))]})}),(0,V.jsx)(`tbody`,{children:(0,V.jsx)(y,{items:S.data.rows||[],columns:C.length+2,children:(e,t)=>(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`td`,{children:(S.data.page-1)*25+t+1}),(0,V.jsx)(`td`,{children:O(e)}),C.map(([t])=>(0,V.jsx)(`td`,{className:t===`category`?Y.categoryCell:void 0,children:D(e,t)},t))]},`${e.shopId}:${e.categoryId}:${e.id}`)})})]})}):(0,V.jsx)(`div`,{className:Y.empty,children:`当前筛选下暂无已完成入库的上榜商品。`}),S.data&&(0,V.jsxs)(`div`,{className:Y.pagination,children:[(0,V.jsx)(`span`,{children:S.data.notice}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`button`,{"aria-label":`上榜商品上一页`,disabled:S.data.page<=1,onClick:()=>{v(g),u(S.data.page-1)},children:(0,V.jsx)(a,{size:15})}),(0,V.jsxs)(`span`,{children:[S.data.page,` / `,Math.max(1,Math.ceil(S.data.total/25))]}),(0,V.jsx)(`button`,{"aria-label":`上榜商品下一页`,disabled:S.data.page*25>=S.data.total,onClick:()=>{v(g),u(S.data.page+1)},children:(0,V.jsx)(o,{size:15})})]})]})]})}function Wn({month:e,selected:t,onAdd:n,onClose:r}){let[i,a]=(0,B.useState)(``),[o,s]=(0,B.useState)(``),[c,u]=(0,B.useState)(`search`),d=(0,B.useRef)(null),p=(0,B.useRef)(null),m=U(o?{view:`shop-search`,month:e,q:o}:null);return(0,B.useEffect)(()=>{let e=document.activeElement;return d.current?.showModal(),p.current?.focus(),()=>e?.focus()},[]),(0,V.jsxs)(`dialog`,{ref:d,className:Y.dialog,onCancel:e=>{e.preventDefault(),r()},onClick:e=>{e.target===e.currentTarget&&r()},"aria-label":`添加对比店铺`,children:[(0,V.jsxs)(`div`,{className:Y.panelHeading,children:[(0,V.jsx)(`h2`,{children:`添加对比店铺`}),(0,V.jsx)(`button`,{"aria-label":`关闭店铺搜索`,onClick:r,children:(0,V.jsx)(v,{size:18})})]}),(0,V.jsx)(`p`,{className:Y.note,children:`最多对比 3 家店铺,搜索范围为企业获准类目。`}),(0,V.jsxs)(`div`,{className:Y.inline,"aria-label":`店铺选择来源`,children:[(0,V.jsx)(`button`,{"aria-pressed":c===`search`,onClick:()=>u(`search`),children:`搜索店铺`}),(0,V.jsx)(`button`,{"aria-pressed":c===`favorites`,onClick:()=>u(`favorites`),children:`我的收藏`})]}),c===`favorites`?(0,V.jsx)(lt,{kind:`shop`,selectedIds:t,onSelect:e=>{let t=e.record;t?.id&&n({id:t.id,name:t.name||t.id})}}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`form`,{className:Y.searchForm,onSubmit:e=>{e.preventDefault(),s(i.trim())},children:[(0,V.jsx)(f,{size:16}),(0,V.jsx)(`input`,{ref:p,"aria-label":`搜索对比店铺`,value:i,onChange:e=>a(e.target.value),maxLength:100,placeholder:`输入店铺名称或店铺 ID`}),(0,V.jsx)(`button`,{type:`submit`,disabled:!i.trim()||m.loading,children:`搜索`})]}),m.loading?(0,V.jsx)(`p`,{role:`status`,children:`正在搜索店铺…`}):m.error?(0,V.jsx)(`p`,{role:`alert`,className:Y.error,children:m.error}):o&&(0,V.jsx)(`div`,{className:Y.searchResults,children:m.data?.shops.length?m.data.shops.map(e=>(0,V.jsxs)(`button`,{disabled:t.includes(e.id),onClick:()=>n(e),children:[(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`b`,{children:e.name}),(0,V.jsxs)(`small`,{children:[`ID `,e.id]})]}),t.includes(e.id)?`已添加`:(0,V.jsx)(l,{size:16})]},e.id)):(0,V.jsx)(`p`,{children:`当前月份未找到匹配店铺,可尝试店铺编号或其他月份。`})})]})]})}function Gn({analysis:t,bootstrap:n,onBack:r}){let s=ut(t),c=s.config,[d,p]=(0,B.useState)(!1),[m,h]=(0,B.useState)(0),[g,_]=(0,B.useState)(null),[b,S]=(0,B.useState)(!1),C=U(c.shops.length?{view:`shop-layout`,month:c.month,recentYear:String(c.recentYear),shops:c.shops.join(`,`)}:null,m),w=C.data,T=w?.categories.map(e=>({...e,name:x(n.categories,e.id).map(e=>e.name).join(` / `)||e.name}))||[],E=n.months.indexOf(c.month);async function D(){S(!0);try{await s.flush(),r()}catch{S(!1)}}function O(e){_({kind:`shop`,month:c.month,shops:c.shops.join(`,`),shopFilter:e.id})}return(0,V.jsxs)(`div`,{className:Y.root,children:[(0,V.jsxs)(`header`,{className:Y.editorHeader,children:[(0,V.jsxs)(`div`,{className:Y.editorIdentity,children:[(0,V.jsx)(`button`,{"aria-label":`返回我的分析`,onClick:()=>void D(),disabled:b,children:(0,V.jsx)(e,{size:16})}),(0,V.jsx)(`input`,{"aria-label":`分析名称`,className:Y.nameInput,value:s.name,maxLength:80,onChange:e=>s.setName(e.target.value),onBlur:()=>void s.flush().catch(()=>{})}),(0,V.jsx)(`span`,{className:Y.saveStatus,role:`status`,children:s.error?`保存失败`:s.saving?`保存中…`:s.dirty?`待保存`:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(i,{size:12}),`已自动保存`]})})]}),(0,V.jsxs)(`div`,{className:Y.editorTools,children:[(0,V.jsx)(`button`,{"aria-pressed":c.recentYear,onClick:()=>s.change({recentYear:!c.recentYear}),children:`最近一年`}),(0,V.jsx)(`button`,{"aria-label":`上一数据月份`,disabled:E<=0,onClick:()=>s.change({month:n.months[E-1]}),children:(0,V.jsx)(a,{size:15})}),(0,V.jsx)(`select`,{"aria-label":`分析统计月份`,value:c.month,onChange:e=>s.change({month:e.target.value}),children:n.months.map(e=>(0,V.jsx)(`option`,{children:e},e))}),(0,V.jsx)(`button`,{"aria-label":`下一数据月份`,disabled:E<0||E>=n.months.length-1,onClick:()=>s.change({month:n.months[E+1]}),children:(0,V.jsx)(o,{size:15})}),(0,V.jsx)(`button`,{onClick:()=>void D(),disabled:b,children:`我的分析`}),(0,V.jsx)(`button`,{"aria-label":`刷新分析数据`,onClick:()=>h(e=>e+1),children:(0,V.jsx)(u,{size:15})})]})]}),s.error&&(0,V.jsxs)(`p`,{role:`alert`,className:Y.error,children:[s.error,(0,V.jsx)(`button`,{onClick:()=>void s.flush().catch(()=>{}),children:`重试保存`})]}),(0,V.jsxs)(`section`,{className:Y.panel,"aria-label":`分析店铺汇总`,children:[(0,V.jsxs)(`div`,{className:Y.panelHeading,children:[(0,V.jsxs)(`h2`,{children:[`品类分析`,(0,V.jsxs)(`small`,{children:[c.shops.length,` / 3 家店铺 · `,c.recentYear?`近 12 个月`:`所选月份`]})]}),c.shops.length<3&&(0,V.jsxs)(`button`,{className:Y.primary,onClick:()=>p(!0),children:[(0,V.jsx)(l,{size:15}),`添加对比店铺`]})]}),c.shops.length?C.loading?(0,V.jsx)(`p`,{role:`status`,className:Y.empty,children:`正在查询店铺品类数据…`}):C.error?(0,V.jsx)(`p`,{role:`alert`,className:Y.error,children:C.error}):w&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:Y.horizontal,children:(0,V.jsxs)(`table`,{className:Y.summaryTable,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`店铺`}),(0,V.jsx)(`th`,{children:`销售走势`}),(0,V.jsx)(`th`,{children:`所在地`}),(0,V.jsx)(`th`,{children:`类型`}),(0,V.jsx)(`th`,{children:`店铺上榜销售额`}),(0,V.jsx)(`th`,{children:`上榜链接销售额`}),(0,V.jsx)(`th`,{children:`上榜叶子类目`}),(0,V.jsx)(`th`,{children:`上榜商品链接`}),(0,V.jsx)(`th`,{})]})}),(0,V.jsx)(`tbody`,{children:(0,V.jsx)(y,{items:w.shops||[],columns:9,children:(e,t)=>(0,V.jsxs)(`tr`,{children:[(0,V.jsxs)(`td`,{children:[(0,V.jsxs)(`div`,{className:Y.shopName,children:[(0,V.jsx)(`i`,{style:{background:Pn[t]}}),(0,V.jsx)(`b`,{children:e.name})]}),(0,V.jsxs)(`small`,{children:[`ID `,e.id,c.recentYear?` · 店铺榜覆盖 ${e.availableMonths} 个月`:``]})]}),(0,V.jsx)(`td`,{children:(0,V.jsx)(`button`,{className:Y.link,onClick:()=>O(e),children:`查看`})}),(0,V.jsx)(`td`,{children:e.location||`—`}),(0,V.jsx)(`td`,{children:e.shopType||`—`}),(0,V.jsx)(`td`,{children:$(e.summary.sales)}),(0,V.jsx)(`td`,{children:$(e.summary.productSales)}),(0,V.jsx)(`td`,{children:e.categoryCount}),(0,V.jsx)(`td`,{children:Q(e.summary.itemCount,0)}),(0,V.jsx)(`td`,{children:(0,V.jsx)(`button`,{"aria-label":`移除${e.name}`,onClick:()=>s.change({shops:c.shops.filter(t=>t!==e.id),category:``,shopFilter:``}),children:(0,V.jsx)(v,{size:14})})})]},e.id)})})]})}),(0,V.jsx)(`p`,{className:Y.note,children:w.notice})]}):(0,V.jsxs)(`div`,{className:Y.empty,children:[(0,V.jsx)(f,{size:28}),(0,V.jsx)(`h3`,{children:`从一家店铺开始分析`}),(0,V.jsx)(`p`,{children:`添加店铺后查看上榜销售表现、品类布局和商品链接。`}),(0,V.jsx)(`button`,{className:Y.primary,onClick:()=>p(!0),children:`添加首家店铺`})]})]}),w&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:Y.metricBar,role:`group`,"aria-label":`品类对比指标`,children:[Fn.map(e=>(0,V.jsx)(`button`,{"aria-pressed":c.metric===e.key,onClick:()=>s.change({metric:e.key}),children:e.label},e.key)),(0,V.jsxs)(`span`,{children:[T.length,` 个上榜叶子类目`]})]}),T.length?(0,V.jsx)(Ln,{categories:T,shops:w.shops,metric:c.metric,selectedCategory:c.category,selectedShop:c.shopFilter,onCategory:(e,t)=>s.change({category:e,shopFilter:t||``})},c.shops.join(`,`)+c.month+c.recentYear):(0,V.jsx)(`div`,{className:Y.empty,children:`所选月份及权限范围内暂无可展示的上榜叶子类目。`}),(0,V.jsx)(Un,{config:c,layout:w,taxonomy:n.categories,onChange:s.change,onTrend:_})]}),d&&(0,V.jsx)(Wn,{month:c.month,selected:c.shops,onClose:()=>p(!1),onAdd:e=>{s.change({shops:[...c.shops,e.id],category:``,shopFilter:``}),s.name===`未命名分析`&&s.setName(e.name+`品类分析`),p(!1)}}),g&&(0,V.jsx)(Rn,{query:g,onClose:()=>_(null)})]})}function Kn({launch:e,onConsumeLaunch:i}){let[a,o]=(0,B.useState)(null),[s,c]=(0,B.useState)([]),[u,d]=(0,B.useState)(null),[f,p]=(0,B.useState)(!0),[m,h]=(0,B.useState)(``),[g,_]=(0,B.useState)(!1),[v,y]=(0,B.useState)(0),x=(0,B.useRef)(``);(0,B.useEffect)(()=>{let e=new AbortController;return Promise.all([b.bootstrap(e.signal),b.analyses(e.signal)]).then(([t,n])=>{e.signal.aborted||(o(t),c(n.analyses),h(``),p(!1))}).catch(t=>{e.signal.aborted||(h(t instanceof Error?t.message:`分析记录读取失败`),p(!1))}),()=>e.abort()},[v]),(0,B.useEffect)(()=>{if(!e||!a||x.current===e.id)return;x.current=e.id;let t={...ct(e.month),shops:[e.shop.id]};b.saveAnalysis({id:e.id,name:e.shop.name+`品类分析`,config:t,revision:0}).then(e=>{d(e),i?.()}).catch(e=>h(e instanceof Error?e.message:`创建分析失败`))},[e,a,i]);async function S(){if(!(!a?.latestMonth||g)){_(!0),h(``);try{d(await b.saveAnalysis({id:crypto.randomUUID(),name:`未命名分析`,config:ct(a.latestMonth),revision:0}))}catch(e){h(e instanceof Error?e.message:`创建分析失败`)}finally{_(!1)}}}return u&&a?(0,V.jsx)(Gn,{analysis:u,bootstrap:a,onBack:()=>{d(null),y(e=>e+1)}},u.id):(0,V.jsxs)(`main`,{className:Y.root,children:[(0,V.jsxs)(`header`,{className:Y.historyHeader,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`span`,{className:Y.eyebrow,children:`市场大盘 / 我的分析`}),(0,V.jsx)(`h1`,{children:`店铺品类布局`}),(0,V.jsx)(`p`,{children:`从历史分析继续,或新建一份店铺对比。`})]}),(0,V.jsxs)(`button`,{className:Y.primary,onClick:()=>void S(),disabled:f||g||!a?.latestMonth,children:[(0,V.jsx)(l,{size:16}),g?`正在创建…`:`新建分析`]})]}),m&&(0,V.jsxs)(`div`,{className:Y.error,role:`alert`,children:[m,(0,V.jsx)(`button`,{onClick:()=>y(e=>e+1),children:`重新读取`})]}),(0,V.jsxs)(`section`,{className:Y.history,"aria-label":`历史分析记录`,children:[(0,V.jsxs)(`div`,{className:Y.panelHeading,children:[(0,V.jsxs)(`h2`,{children:[(0,V.jsx)(n,{size:16}),`历史分析`,(0,V.jsxs)(`small`,{children:[s.length,` 份`]})]}),(0,V.jsx)(`span`,{className:Y.note,children:`方案按当前账号自动保存`})]}),f?(0,V.jsx)(`p`,{role:`status`,className:Y.empty,children:`正在读取历史分析…`}):s.length?(0,V.jsx)(`div`,{className:Y.historyList,children:s.map(e=>(0,V.jsxs)(`button`,{onClick:()=>d(e),children:[(0,V.jsx)(`span`,{className:Y.historyIcon,children:(0,V.jsx)(r,{size:21})}),(0,V.jsxs)(`span`,{className:Y.historyTitle,children:[(0,V.jsx)(`b`,{children:e.name}),(0,V.jsxs)(`small`,{children:[e.config.month,` · `,e.config.recentYear?`近一年 · `:``,e.config.shops.length?`${e.config.shops.length} 家店铺`:`尚未添加店铺`,` · `,Fn.find(t=>t.key===e.config.metric)?.label]})]}),(0,V.jsx)(`time`,{children:new Date(e.updatedAt).toLocaleString(`zh-CN`,{timeZone:`Asia/Shanghai`,hour12:!1})}),(0,V.jsx)(t,{size:16})]},e.id))}):!m&&(0,V.jsxs)(`div`,{className:Y.emptyHistory,children:[(0,V.jsx)(r,{size:35}),(0,V.jsx)(`h3`,{children:`还没有历史分析`}),(0,V.jsx)(`p`,{children:`新建分析后添加店铺,逐步查看品类和上榜商品。`})]})]})]})}export{Kn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,m as t,o as n}from"./index-BBySSIJT.js";import{n as r}from"./format-jsGSJ1GL.js";import{t as i}from"./market.module-BXeOH_ee.js";import{$ as a,A as o,At as s,Bt as c,Dt as l,F as u,G as d,J as f,K as p,M as m,Mt as h,O as g,Ot as _,P as v,Q as y,R as b,Rt as x,S,St as C,Ut as w,V as T,Vt as E,Y as D,_ as O,_t as k,a as ee,at as A,b as te,bt as j,c as M,ct as N,d as ne,dt as P,f as re,ft as ie,g as ae,ht as F,i as oe,j as I,kt as se,l as ce,m as le,mt as L,n as ue,o as de,p as fe,pt as R,r as pe,s as me,t as he,tt as ge,u as _e,v as ve,wt as ye,x as be,y as xe}from"./CartesianChart-acGhtLrw.js";import{n as z,t as B}from"./graphicalItemSelectors-GhHIivGe.js";var V=(e,t,n)=>g(e,`xAxis`,B(e,t),n),H=(e,t,n)=>I(e,`xAxis`,B(e,t),n),U=(e,t,n)=>g(e,`yAxis`,z(e,t),n),W=(e,t,n)=>I(e,`yAxis`,z(e,t),n),Se=j([y,V,U,H,W],(e,t,n,r,i)=>F(e,`xAxis`)?N(t,r,!1):N(n,i,!1)),G=j([m,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),K=e=>F(y(e),`xAxis`)?`yAxis`:`xAxis`,Ce=(e,t)=>K(e)===`yAxis`?z(e,t):B(e,t),we=j([y,V,U,H,W,j([G,(e,t,n)=>o(e,K(e),Ce(e,t),n)],(e,t)=>{if(!(e==null||t==null)){var{stackId:n}=e,r=v(e);if(!(n==null||r==null)){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),T,Se,G,b],(e,t,n,r,i,a,o,s,c,l)=>{var{chartData:u,dataStartIndex:d,dataEndIndex:f}=o;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{data:p}=c,m=p&&p.length>0?p:u?.slice(d,f+1);if(m!=null)return Ge({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:d,areaSettings:c,stackedData:a,displayedData:m,chartBaseValue:l,bandSize:s})}}),q=e(t()),Te=[`id`],Ee=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J.apply(null,arguments)}function Y(e,t){if(e==null)return{};var n,r,i=De(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function De(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?X(Object(n),!0).forEach(function(t){Oe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Oe(e,t,n){return(t=ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(e){var t=Ae(e,`string`);return typeof t==`symbol`?t:t+``}function Ae(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Q(e,t){return e&&e!==`none`?e:t}var je=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:a,hide:o}=e;return[{inactive:o,dataKey:t,type:a,color:Q(r,i),value:R(n,t),payload:e}]},Me=q.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:a,name:o,hide:s,unit:c,tooltipType:l,id:u}=e,d={dataDefinedOnItem:n,getPosition:h,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:R(o,t),hide:s,type:l,color:Q(r,a),unit:c,graphicalItemId:u}};return q.createElement(le,{tooltipEntrySettings:d})});function Ne(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:a,dataKey:o}=r,s=E(r);return q.createElement(_e,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function Pe(e){var{showLabels:t,children:n,points:r}=e,i=r.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Z(Z({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return q.createElement(O,{value:t?i:void 0},n)}function Fe(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:a}=e,{layout:o,type:s,stroke:l,connectNulls:u,isRange:d}=a,{id:p}=a,m=Y(a,Te),h=E(m),g=c(m);return q.createElement(q.Fragment,null,t?.length>1&&q.createElement(x,{clipPath:r?`url(#clipPath-${i})`:void 0},q.createElement(f,J({},g,{id:p,points:t,connectNulls:u,type:s,baseLine:n,layout:o,stroke:`none`,className:`recharts-area-area`})),l!==`none`&&q.createElement(f,J({},h,{className:`recharts-area-curve`,layout:o,type:s,connectNulls:u,fill:`none`,points:t})),l!==`none`&&d&&Array.isArray(n)&&q.createElement(f,J({},h,{className:`recharts-area-curve`,layout:o,type:s,connectNulls:u,fill:`none`,points:n}))),q.createElement(Ne,{points:t,props:m,clipPathId:i}))}function Ie(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,a=r[0]?.y,o=r[r.length-1]?.y;if(!k(a)||!k(o))return null;var c=t*Math.abs(a-o),l=Math.max(...r.map(e=>e.x||0));return s(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.x||0),l)),s(l)?q.createElement(`rect`,{x:0,y:a<o?a:a-c,width:l+(i?parseInt(`${i}`,10):1),height:Math.floor(c)}):null}function Le(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,a=r[0]?.x,o=r[r.length-1]?.x;if(!k(a)||!k(o))return null;var c=t*Math.abs(a-o),l=Math.max(...r.map(e=>e.y||0));return s(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.y||0),l)),s(l)?q.createElement(`rect`,{x:a<o?a:a-c,y:0,width:c,height:Math.floor(l+(i?parseInt(`${i}`,10):1))}):null}function Re(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:a}=e;return n===`vertical`?q.createElement(Ie,{alpha:t,points:r,baseLine:i,strokeWidth:a}):q.createElement(Le,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function ze(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=e,{points:c,baseLine:u,isAnimationActive:f,animationBegin:m,animationDuration:h,animationEasing:g,onAnimationStart:v,onAnimationEnd:y}=r,b=d((0,q.useMemo)(()=>({points:c,baseLine:u}),[c,u]),`recharts-area-`),S=a(),[C,w]=(0,q.useState)(!1),T=!C,E=(0,q.useCallback)(()=>{typeof y==`function`&&y(),w(!1)},[y]),D=(0,q.useCallback)(()=>{typeof v==`function`&&v(),w(!0)},[v]);if(S==null)return null;var O=i.current,k=o.current;return q.createElement(Pe,{showLabels:T,points:c},r.children,q.createElement(p,{animationId:b,begin:m,duration:h,isActive:f,easing:g,onAnimationEnd:E,onAnimationStart:D,key:b},e=>{if(O){var a=O.length/c.length,d=e===1?c:c.map((t,n)=>{var r=Math.floor(n*a);if(O[r]){var i=O[r];return Z(Z({},t),{},{x:l(i.x,t.x,e),y:l(i.y,t.y,e)})}return t}),p=s(u)?l(k,u,e):se(u)||_(u)?l(k,0,e):u.map((t,n)=>{var r=Math.floor(n*a);if(Array.isArray(k)&&k[r]){var i=k[r];return Z(Z({},t),{},{x:l(i.x,t.x,e),y:l(i.y,t.y,e)})}return t});return e>0&&(i.current=d,o.current=p),q.createElement(Fe,{points:d,baseLine:p,needClip:t,clipPathId:n,props:r})}return e>0&&(i.current=c,o.current=u),q.createElement(x,null,f&&q.createElement(`defs`,null,q.createElement(`clipPath`,{id:`animationClipPath-${n}`},q.createElement(Re,{alpha:e,points:c,baseLine:u,layout:S,strokeWidth:r.strokeWidth}))),q.createElement(x,{clipPath:`url(#animationClipPath-${n})`},q.createElement(Fe,{points:c,baseLine:u,needClip:t,clipPathId:n,props:r})))}),q.createElement(ve,{label:r.label}))}function Be(e){var{needClip:t,clipPathId:n,props:r}=e,i=(0,q.useRef)(null),a=(0,q.useRef)();return q.createElement(ze,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var Ve=class extends q.PureComponent{render(){var{hide:e,dot:t,points:n,className:r,top:i,left:a,needClip:o,xAxisId:s,yAxisId:c,width:l,height:u,id:d,baseLine:f,zIndex:p}=this.props;if(e)return null;var m=w(`recharts-area`,r),h=d,{r:g,strokeWidth:_}=oe(t),v=ae(t),y=g*2+_,b=o?`url(#clipPath-${v?``:`dots-`}${h})`:void 0;return q.createElement(be,{zIndex:p},q.createElement(x,{className:m},o&&q.createElement(`defs`,null,q.createElement(ee,{clipPathId:h,xAxisId:s,yAxisId:c}),!v&&q.createElement(`clipPath`,{id:`clipPath-dots-${h}`},q.createElement(`rect`,{x:a-y/2,y:i-y/2,width:l+y,height:u+y}))),q.createElement(Be,{needClip:o,clipPathId:h,props:this.props})),q.createElement(M,{points:n,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:b}),this.props.isRange&&Array.isArray(f)&&q.createElement(M,{points:f,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:b}))}},He={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,xAxisId:0,yAxisId:0,zIndex:u.area};function Ue(e){var{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,connectNulls:a,dot:o,fill:s,fillOpacity:c,hide:l,isAnimationActive:u,legendType:d,stroke:f,xAxisId:p,yAxisId:m}=e,h=Y(e,Ee),g=ge(),_=S(),{needClip:v}=de(p,m),y=A(),{points:b,isRange:x,baseLine:w}=C(t=>we(t,e.id,y))??{},T=ce();if(g!==`horizontal`&&g!==`vertical`||T==null||_!==`AreaChart`&&_!==`ComposedChart`)return null;var{height:E,width:D,x:O,y:k}=T;return!b||!b.length?null:q.createElement(Ve,J({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:w,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:E,hide:l,layout:g,isAnimationActive:u,isRange:x,legendType:d,needClip:v,points:b,stroke:f,width:D,left:O,top:k,xAxisId:p,yAxisId:m}))}var We=(e,t,n,r,i)=>{var a=n??t;if(s(a))return a;var o=e===`horizontal`?i:r,c=o.scale.domain();if(o.type===`number`){var l=Math.max(c[0],c[1]),u=Math.min(c[0],c[1]);return a===`dataMin`?u:a===`dataMax`||l<0?l:Math.max(Math.min(c[0],c[1]),0)}return a===`dataMin`?c[0]:a===`dataMax`?c[1]:c[0]};function Ge(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:a,chartBaseValue:o,xAxis:s,yAxis:c,displayedData:l,dataStartIndex:u,xAxisTicks:d,yAxisTicks:f,bandSize:p}=e,m=i&&i.length,h=We(a,o,n,s,c),g=a===`horizontal`,_=!1,v=l.map((e,n)=>{var a;if(m)a=i[u+n];else{var o=L(e,r);Array.isArray(o)?(a=o,_=!0):a=[h,o]}var l=a?.[1]??null,v=l==null||m&&!t&&L(e,r)==null;return g?{x:P({axis:s,ticks:d,bandSize:p,entry:e,index:n}),y:v?null:c.scale.map(l)??null,value:a,payload:e}:{x:v?null:s.scale.map(l)??null,y:P({axis:c,ticks:f,bandSize:p,entry:e,index:n}),value:a,payload:e}});return{points:v,baseLine:(m||_?v.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return g?{x:e.x,y:t!=null&&e.y!=null?c.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:s.scale.map(t)??null,y:e.y,payload:e.payload}}):g?c.scale.map(h):s.scale.map(h))??0,isRange:_}}function Ke(e){var t=ye(e,He),n=A();return q.createElement(re,{id:t.id,type:`area`},e=>q.createElement(q.Fragment,null,q.createElement(fe,{legendPayload:je(t)}),q.createElement(Me,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),q.createElement(ne,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:ie(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),q.createElement(Ue,J({},t,{id:e}))))}var qe=q.memo(Ke,D);qe.displayName=`Area`;var Je=[`axis`],Ye=(0,q.forwardRef)((e,t)=>q.createElement(he,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Je,tooltipPayloadSearcher:te,categoricalChartProps:e,ref:t})),$=n();function Xe({points:e,metric:t=`sales`}){let n=(0,q.useRef)(null),[a,o]=(0,q.useState)(300);return(0,q.useEffect)(()=>{if(!n.current)return;let e=new ResizeObserver(([e])=>o(Math.max(200,Math.round(e.contentRect.width))));return e.observe(n.current),()=>e.disconnect()},[]),(0,$.jsx)(`div`,{ref:n,className:i.chart,role:`img`,"aria-label":`月度数据趋势`,children:e.some(e=>e[t]!=null)?(0,$.jsxs)(Ye,{width:a,height:260,data:e,margin:{top:15,right:20,left:10,bottom:0},children:[(0,$.jsx)(me,{stroke:`#263e57`,vertical:!1}),(0,$.jsx)(pe,{dataKey:`month`,tick:{fill:`#93adc5`,fontSize:11}}),(0,$.jsx)(ue,{width:76,tickFormatter:e=>r(e),tick:{fill:`#93adc5`,fontSize:11}}),(0,$.jsx)(xe,{contentStyle:{background:`#10243b`,border:`1px solid #355978`,color:`#e4f0fc`},formatter:e=>r(Number(e),t===`sales`?`money`:`number`)}),(0,$.jsx)(qe,{dataKey:t,type:`monotone`,fill:`#2aaad4`,fillOpacity:.15,stroke:`#4dc9f0`,strokeWidth:2,connectNulls:!1})]}):(0,$.jsx)(`p`,{className:i.empty,children:`当前记录暂无可追踪的月度数据`})})}export{Xe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){return e.flatMap(e=>e.route.filter(e=>[`attention`,`review`].includes(e.state)).map(t=>({project:e,step:t})))}function t(e){return e.flatMap(e=>e.activity.map(t=>({project:e,event:t}))).sort((e,t)=>t.event.at.localeCompare(e.event.at))}export{t as n,e as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e}from"./index-BBySSIJT.js";var t=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e}from"./index-BBySSIJT.js";var t=e(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e}from"./index-BBySSIJT.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e}from"./index-BBySSIJT.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e}from"./index-BBySSIJT.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./TrendChart-ClEBAnKO.js","./index-BBySSIJT.js","./index-7NKGenq7.css","./format-jsGSJ1GL.js","./market.module-BXeOH_ee.js","./market-B2oImfqS.css","./CartesianChart-acGhtLrw.js","./graphicalItemSelectors-GhHIivGe.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./chevron-down-CHQKhw_4.js";import{t}from"./chevron-right-2HEa4oQb.js";import{n,r}from"./workspace-view-state-CYNxOsyc.js";import{_ as i,m as a,o,p as s,s as c,t as l,u}from"./index-BBySSIJT.js";import"./public-DoBzMSlG.js";import{t as d}from"./format-jsGSJ1GL.js";import{t as f}from"./market.module-BXeOH_ee.js";var p=[[`sales`,`销售额`,`money`],[`marketShare`,`市占率`,`percent`],[`views`,`浏览量`,`number`],[`conversionRate`,`支付转化率`,`percent`],[`unitPrice`,`件单价`,`money`],[`units`,`成交件数`,`number`],[`searches`,`搜索量`,`number`],[`searchShare`,`搜索量占比`,`percent`],[`paidClicks`,`付费点击量`,`number`],[`paidClickShare`,`付费点击量占比`,`percent`],[`listingDays`,`上架天数`,`number`],[`listedProducts`,`在榜商品数`,`number`],[`promotionRoi`,`推广 ROI`,`number`],[`uvValue`,`UV 价值`,`money`],[`viewValue`,`浏览价值`,`money`],[`orderPrice`,`客单价`,`money`],[`orders`,`成交订单数`,`number`],[`cartRate`,`加购率`,`percent`],[`salesYoy`,`销售额同比`,`percent`],[`salesMom`,`销售额环比`,`percent`],[`activeProducts`,`动销商品数`,`number`]],m={categoryId:``,month:``,view:`categories`,metric:`sales`,recentYear:!1,q:``,sort:`sales`,direction:`desc`,page:1,pageSize:100,minPrice:``,maxPrice:``};function h(e,t){return n(`market.`+e,t)}var g=i(a(),1),_=s(),v=o();function y({text:e,label:t,title:n,children:r}){let[i,a]=(0,g.useState)(!1),[o,s]=(0,g.useState)(``),c=(0,g.useRef)(null),l=(0,g.useRef)(0);(0,g.useEffect)(()=>()=>{l.current++,c.current&&clearTimeout(c.current)},[]);async function d(){let t=++l.current,n=`已复制`;try{if(window.omni){let t=await window.omni.copyText(e);if(!t.ok)throw Error(t.error)}else await navigator.clipboard.writeText(e);if(t!==l.current)return;a(!0)}catch{if(t!==l.current)return;n=`复制失败,请重试`,a(!1)}c.current&&clearTimeout(c.current),s(n),c.current=setTimeout(()=>s(``),1e3)}return(0,v.jsxs)(`span`,{className:f.copyControl,children:[(0,v.jsx)(`button`,{className:f.copyButton,"data-copied":i,"aria-label":t,title:n,onClick:()=>void d(),children:r||(0,v.jsx)(u,{size:12})}),o&&(0,v.jsx)(`span`,{className:f.copyFeedback,role:`status`,children:o})]})}function b({src:e,name:t,onClose:n}){let r=(0,g.useRef)(null),[i,a]=(0,g.useState)(!1);return(0,g.useEffect)(()=>{let e=document.activeElement;return r.current?.showModal(),()=>e?.focus()},[]),(0,_.createPortal)((0,v.jsxs)(`dialog`,{ref:r,className:f.imageViewer,"aria-label":`${t}大图`,onCancel:e=>{e.preventDefault(),n()},onClick:e=>{e.target===e.currentTarget&&n()},children:[(0,v.jsx)(`button`,{autoFocus:!0,className:f.imageViewerClose,"aria-label":`关闭商品大图`,onClick:n,children:(0,v.jsx)(c,{size:24})}),i?(0,v.jsx)(`p`,{role:`status`,children:`图片暂时无法加载`}):(0,v.jsx)(`img`,{src:e,alt:t,referrerPolicy:`no-referrer`,onError:()=>a(!0),onClick:e=>{let t=e.currentTarget,r=t.getBoundingClientRect();if(!t.naturalWidth||!t.naturalHeight)return;let i=Math.min(r.width/t.naturalWidth,r.height/t.naturalHeight),a=t.naturalWidth*i/2,o=t.naturalHeight*i/2;(Math.abs(e.clientX-r.left-r.width/2)>a||Math.abs(e.clientY-r.top-r.height/2)>o)&&n()}})]}),document.body)}function x({src:e,name:t,hoverPreview:n=!0}){let[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(!1);(0,g.useEffect)(()=>{if(!r)return;let e=()=>i(null);return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[r]);function s(e){if(!n)return;let t=e.getBoundingClientRect(),r=Math.min(320,window.innerWidth-24,window.innerHeight-24);i({left:t.right+r+12<=window.innerWidth?t.right+8:Math.max(12,t.left-r-8),top:Math.max(12,Math.min(t.top,window.innerHeight-r-12)),size:r})}return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`button`,{className:f.imageButton,"aria-label":`放大查看${t}`,"aria-haspopup":`dialog`,onMouseEnter:e=>s(e.currentTarget),onMouseLeave:()=>i(null),onFocus:e=>s(e.currentTarget),onBlur:()=>i(null),onClick:()=>{i(null),o(!0)},children:(0,v.jsx)(`img`,{src:e,alt:t,loading:`lazy`,referrerPolicy:`no-referrer`})}),r&&!a&&(0,_.createPortal)((0,v.jsx)(`div`,{className:f.imageHoverPreview,"aria-hidden":`true`,style:{left:r.left,top:r.top,width:r.size,height:r.size},children:(0,v.jsx)(`img`,{src:e,alt:``,referrerPolicy:`no-referrer`})}),document.body),a&&(0,v.jsx)(b,{src:e,name:t,onClose:()=>{i(null),o(!1)}})]})}function S({title:e,children:t,onClose:n}){let r=(0,g.useRef)(null);return(0,g.useEffect)(()=>{let e=document.activeElement;return r.current?.showModal(),()=>e?.focus()},[]),(0,v.jsxs)(`dialog`,{ref:r,className:f.dialog,onCancel:n,onClick:e=>{e.target===e.currentTarget&&n()},children:[(0,v.jsxs)(`header`,{children:[(0,v.jsx)(`h2`,{children:e}),(0,v.jsx)(`button`,{autoFocus:!0,onClick:n,"aria-label":`关闭弹窗`,children:(0,v.jsx)(c,{size:18})})]}),t]})}function C({categories:n,value:i,onChoose:a,disabled:o,favoriteIds:s}){let[c,l]=(0,g.useState)(``),[u,p]=(0,g.useState)(``),[m,h]=(0,g.useState)(!1),[_,y]=(0,g.useState)(!1),b=(0,g.useRef)(null);(0,g.useEffect)(()=>{function e(e){let t=b.current;t?.open&&e.target instanceof Node&&!t.contains(e.target)&&(t.open=!1)}return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[]);let x=d(n,u||i),S=n.filter(e=>s.includes(e.id)),C=(m?S:n).filter(e=>e.name.includes(c.trim()));function w(e){a(e),l(``),p(e),b.current&&(b.current.open=!1)}let T=[n.filter(e=>!e.parentId),...x.filter(e=>!e.leaf).map(e=>n.filter(t=>t.parentId===e.id))];return(0,v.jsxs)(`details`,{className:f.picker,ref:b,onToggle:e=>y(e.currentTarget.open),onKeyDown:e=>{e.key===`Escape`&&b.current&&(b.current.open=!1,b.current.querySelector(`summary`)?.focus())},children:[(0,v.jsxs)(`summary`,{"aria-label":`选择市场类目`,"aria-disabled":o,onClick:e=>{o&&e.preventDefault()},children:[d(n,i).map(e=>e.name).join(` / `)||`全部类目`,(0,v.jsx)(e,{size:14})]}),_&&(0,v.jsxs)(`div`,{className:f.pickerPanel,children:[(0,v.jsxs)(`label`,{children:[(0,v.jsx)(r,{size:14}),(0,v.jsx)(`input`,{"aria-label":`查找授权类目`,placeholder:`搜索类目名称`,value:c,onChange:e=>l(e.target.value)})]}),(0,v.jsxs)(`nav`,{className:f.pickerModes,"aria-label":`类目选择方式`,children:[(0,v.jsx)(`button`,{"aria-pressed":!m,onClick:()=>h(!1),children:`全部类目`}),(0,v.jsxs)(`button`,{"aria-pressed":m,onClick:()=>h(!0),children:[`我的收藏(`,S.length,`)`]})]}),!m&&(0,v.jsx)(`button`,{onClick:()=>w(``),children:`全部获准类目`}),c.trim()||m?(0,v.jsxs)(`div`,{className:f.pickerResults,children:[!C.length&&(0,v.jsx)(`p`,{role:`status`,className:f.pickerEmpty,children:m&&!S.length?`暂无收藏类目,点击类目旁的星标即可收藏。`:`没有匹配的类目。`}),(m?C:C.slice(0,100)).map(e=>(0,v.jsx)(`button`,{onClick:()=>w(e.id),children:d(n,e.id).map(e=>e.name).join(` / `)},e.id))]}):(0,v.jsx)(`div`,{className:f.cascade,children:T.map((e,n)=>(0,v.jsx)(`div`,{children:e.map(e=>(0,v.jsxs)(`div`,{onPointerEnter:t=>{t.pointerType===`mouse`&&p(e.id)},className:x.some(t=>t.id===e.id)?f.selectedCategory:``,children:[(0,v.jsx)(`button`,{onClick:()=>w(e.id),children:e.name}),!e.leaf&&(0,v.jsx)(`button`,{"aria-label":`展开${e.name}`,"aria-expanded":x.some(t=>t.id===e.id),onClick:()=>p(e.id),children:(0,v.jsx)(t,{size:13})})]},e.id))},n))})]})]})}function w({columns:e,allowed:t,onSave:n,onClose:r}){let[i,a]=(0,g.useState)(e),[o,s]=(0,g.useState)(null),c=e=>p.find(t=>t[0]===e)?.[1];function l(e,t){a(n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r})}return(0,v.jsxs)(S,{title:`自定义数据字段(${i.length}/${t.length})`,onClose:r,children:[(0,v.jsxs)(`div`,{className:f.fieldLayout,children:[(0,v.jsxs)(`section`,{children:[(0,v.jsx)(`h3`,{children:`排行榜指标`}),t.map(e=>(0,v.jsxs)(`label`,{children:[(0,v.jsx)(`input`,{type:`checkbox`,checked:i.includes(e),onChange:t=>a(n=>t.target.checked?[...n,e]:n.filter(t=>t!==e))}),c(e)]},e))]}),(0,v.jsxs)(`section`,{children:[(0,v.jsxs)(`div`,{className:f.fieldTools,children:[(0,v.jsxs)(`span`,{children:[`已选 `,i.length,`/`,t.length]}),(0,v.jsx)(`button`,{onClick:()=>a(t),children:`恢复默认`}),(0,v.jsx)(`button`,{onClick:()=>a([]),children:`清空`})]}),(0,v.jsx)(`h3`,{children:`当前字段顺序`}),(0,v.jsx)(`ol`,{children:i.map((e,t)=>(0,v.jsxs)(`li`,{draggable:!0,onDragStart:()=>s(e),onDragOver:e=>e.preventDefault(),onDrop:()=>{o&&l(i.indexOf(o),t),s(null)},children:[(0,v.jsxs)(`span`,{children:[`⠿ `,t+1,`. `,c(e)]}),(0,v.jsx)(`button`,{disabled:t===0,"aria-label":`上移${c(e)}`,onClick:()=>l(t,t-1),children:`↑`}),(0,v.jsx)(`button`,{disabled:t===i.length-1,"aria-label":`下移${c(e)}`,onClick:()=>l(t,t+1),children:`↓`})]},e))})]})]}),(0,v.jsxs)(`footer`,{className:f.dialogActions,children:[(0,v.jsx)(`button`,{onClick:r,children:`取消`}),(0,v.jsx)(`button`,{className:f.primary,onClick:()=>n(i),children:`确定`})]})]})}var T=(0,g.lazy)(()=>l(()=>import(`./TrendChart-ClEBAnKO.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url));function E(e){return(0,v.jsx)(g.Suspense,{fallback:(0,v.jsx)(`p`,{role:`status`,children:`正在加载趋势图…`}),children:(0,v.jsx)(T,{...e})})}export{x as a,h as c,S as i,p as l,w as n,E as o,y as r,m as s,C as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./project-public-CYza4XVS.js","./index-BBySSIJT.js","./index-7NKGenq7.css","./arrow-up-right-Bp3gzP7v.js","./link-2-B7GAWapc.js","./chevron-right-2HEa4oQb.js","./download-BQwcTDwB.js","./file-text-DF8-c_Tb.js","./plus-C301wuGJ.js","./workspace-view-state-CYNxOsyc.js","./EmptyState-BgcduNtk.js","./layers-BY0DtVnH.js","./HelpTip-X4GpEnvk.js","./HelpTip-BsHPhMNf.css","./project-public-IxjCdnaB.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./refresh-cw-BZ6-gKfF.js";import{n as t,r as n}from"./workspace-view-state-CYNxOsyc.js";import{_ as r,m as i,o as a,t as o}from"./index-BBySSIJT.js";import{n as s}from"./module-host-BHOsDk69.js";import"./public-DoBzMSlG.js";var c=r(i(),1);function l(e){let[t,n]=(0,c.useState)(null),[r,i]=(0,c.useState)(``),[a,o]=(0,c.useState)(!0),s=(0,c.useRef)(0),l=(0,c.useCallback)(()=>{let t=++s.current;return e().then(e=>{s.current===t&&(n(e),i(``))}).catch(e=>{s.current===t&&i(e instanceof Error?e.message:`资料读取失败`)}).finally(()=>{s.current===t&&o(!1)})},[e]),u=(0,c.useCallback)(()=>{s.current++},[]);return(0,c.useEffect)(()=>(l(),u),[l,u]),{data:t,error:r,busy:a,refresh:(0,c.useCallback)(()=>{o(!0),i(``),l()},[l])}}async function u(e){let t=await e(`/growth-center?view=catalog`);if(!t||typeof t!=`object`||!(`catalog`in t)||!Array.isArray(t.catalog)||!(`updatedAt`in t)||typeof t.updatedAt!=`string`)throw Error(`资料目录格式异常,请刷新重试`);if(!t.catalog.every(e=>e&&typeof e.id==`string`&&typeof e.project==`string`&&typeof e.title==`string`&&typeof e.created==`string`&&typeof e.mode==`string`))throw Error(`资料目录记录不完整`);return t}var d=a();function f(){let{api:r,onOpen:i}=s(),{data:a,error:o,busy:f,refresh:p}=l((0,c.useCallback)(()=>u(r),[r])),[m,h]=t(`resources.scope`,`real`),[g,_]=t(`resources.query`,``),v=(a?.catalog||[]).filter(e=>m===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`),y=[...v].reverse().filter(e=>`${e.title} ${e.projectName} ${e.source}`.toLowerCase().includes(g.toLowerCase())),b={simulated:`模拟数据`,"declared-real":`来源标注真实`,unverified:`来源待核实`};return(0,d.jsx)(`div`,{className:`resources-module gw`,children:(0,d.jsxs)(`div`,{className:`gw-body`,children:[(0,d.jsxs)(`header`,{className:`gw-header`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`small`,{children:`工作台 / 数据中心`}),(0,d.jsx)(`h1`,{children:`经营数据中心`})]}),(0,d.jsxs)(`div`,{className:`gw-header-actions`,children:[(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`i`,{className:`gw-dot`}),m===`stored-demo`?`模拟归档 · 非真实经营`:`归档数据 · 非实时`]}),(0,d.jsxs)(`button`,{onClick:()=>p(),disabled:f,children:[(0,d.jsx)(e,{size:14}),f?`读取中`:`刷新数据`]})]})]}),(0,d.jsxs)(`div`,{className:`gw-scope`,children:[(0,d.jsx)(`div`,{children:[[`real`,`非模拟资料`],[`stored-demo`,`模拟资料`]].map(([e,t])=>(0,d.jsx)(`button`,{"aria-pressed":m===e,onClick:()=>h(e),children:t},e))}),(0,d.jsx)(`span`,{children:a?`${new Date(a.updatedAt).toLocaleString(`zh-CN`)} 读取归档`:`正在读取归档…`})]}),o&&(0,d.jsxs)(`p`,{role:`alert`,className:`gw-message`,children:[o,` `,(0,d.jsx)(`button`,{onClick:()=>p(),children:`重试`})]}),(0,d.jsxs)(`section`,{className:`gw-panel`,children:[(0,d.jsxs)(`div`,{className:`gw-section-title`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`h2`,{children:`数据资产目录`}),(0,d.jsx)(`p`,{children:`按项目保存原件,每份资料都有来源和日期。`})]}),(0,d.jsxs)(`span`,{children:[v.length,` 个数据集`]})]}),(0,d.jsx)(`div`,{className:`gw-filters`,children:(0,d.jsxs)(`label`,{children:[(0,d.jsx)(n,{size:14}),(0,d.jsx)(`input`,{"aria-label":`搜索经营数据集`,value:g,onChange:e=>_(e.target.value),placeholder:`搜索数据集、项目或来源`})]})}),(0,d.jsx)(`div`,{className:`gw-table-scroll`,children:(0,d.jsxs)(`table`,{children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`th`,{children:`数据集`}),(0,d.jsx)(`th`,{children:`所属项目`}),(0,d.jsx)(`th`,{children:`统计时间`}),(0,d.jsx)(`th`,{children:`数据状态`}),(0,d.jsx)(`th`,{children:`记录数`}),(0,d.jsx)(`th`,{children:`查看`})]})}),(0,d.jsx)(`tbody`,{children:y.map(e=>(0,d.jsxs)(`tr`,{children:[(0,d.jsxs)(`td`,{children:[(0,d.jsx)(`b`,{children:e.title}),(0,d.jsx)(`small`,{children:e.source||`未提供来源`})]}),(0,d.jsx)(`td`,{children:e.projectName}),(0,d.jsxs)(`td`,{children:[e.period||`未标注统计窗口`,(0,d.jsxs)(`small`,{children:[`归档 `,e.created.slice(0,10)]})]}),(0,d.jsx)(`td`,{children:b[e.mode]}),(0,d.jsx)(`td`,{children:e.rowCount}),(0,d.jsxs)(`td`,{children:[(0,d.jsx)(`a`,{href:`/api/workbench/`+e.project+`/file/`+e.id,children:`原件`}),(0,d.jsx)(`button`,{onClick:()=>i(e.project,{tab:`data`,datasetId:e.id}),children:`项目数据`})]})]},e.id))})]})}),!y.length&&!o&&(0,d.jsx)(`p`,{role:`status`,children:f?`正在读取资料…`:g?`没有匹配的数据集,请调整搜索。`:`当前资料范围没有数据集。`})]})]})})}var p=(0,c.lazy)(()=>o(()=>import(`./project-public-CYza4XVS.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url));function m({section:e,project:t}){return t?(0,d.jsx)(c.Suspense,{fallback:(0,d.jsx)(`p`,{role:`status`,children:`正在打开项目资料…`}),children:(0,d.jsx)(p,{section:e,project:t})}):(0,d.jsx)(f,{})}export{m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./clock-3-DpvJxor3.js";import{n,t as r}from"./git-branch-CMQGDByc.js";import{n as i,t as a}from"./pin-BEsLCHJL.js";import{t as o}from"./layers-BY0DtVnH.js";import{n as s,r as c}from"./workspace-view-state-CYNxOsyc.js";import{_ as l,m as u,o as d}from"./index-BBySSIJT.js";import{n as f}from"./module-host-BHOsDk69.js";import"./public-DoBzMSlG.js";import{t as p}from"./activity-idEO2qnr.js";var m=l(u(),1);async function h(e){let t=await Promise.allSettled([e(`/command-center`),e(`/growth-center`)]),n=[],r=[],i=[],a=t[0],o=t[1];if(a.status===`fulfilled`){let e=a.value?.projects;Array.isArray(e)?r=e.filter(e=>!e.simulated):n.push(`项目状态返回格式异常`)}else n.push(`项目状态读取失败,请重试`);if(o.status===`fulfilled`){let e=o.value?.catalog;Array.isArray(e)?i=e.filter(e=>e.mode!==`simulated`):n.push(`资料目录返回格式异常`)}else n.push(`资料目录读取失败,请重试`);return{projects:r,datasets:i,errors:n}}var g={home:`_home_fjsdx_1`,top:`_top_fjsdx_2`,eyebrow:`_eyebrow_fjsdx_5`,search:`_search_fjsdx_9`,resume:`_resume_fjsdx_11`,grid:`_grid_fjsdx_15`,panel:`_panel_fjsdx_16`,heading:`_heading_fjsdx_17`,row:`_row_fjsdx_21`,visit:`_visit_fjsdx_22`,empty:`_empty_fjsdx_24`,shortcuts:`_shortcuts_fjsdx_25`,error:`_error_fjsdx_29`},_=d(),v=e=>Number.isFinite(Date.parse(e))?new Date(e).toLocaleString(`zh-CN`,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`}):`时间未标注`;function y({mode:l,api:u,visits:d,pins:f,onPin:y,onGo:b,onOpen:x,onModule:S,onCreate:C}){let[w,T]=(0,m.useState)([]),[E,D]=(0,m.useState)([]),[O,k]=(0,m.useState)([]),[A,j]=(0,m.useState)(!0),[M,N]=(0,m.useState)(0),[P,F]=s(`home.search`,``);(0,m.useEffect)(()=>{let e=!0;return h(u).then(t=>{e&&(T(t.projects),D(t.datasets),k(t.errors),j(!1))}),()=>{e=!1}},[u,M]);let I=e=>e.toLowerCase().includes(P.trim().toLowerCase()),L=[...w].sort((e,t)=>t.updated.localeCompare(e.updated)).filter(e=>I(e.name)),R=[...E].sort((e,t)=>t.created.localeCompare(e.created)).filter(e=>I(e.title+e.projectName)),z=p(w),B={recent:`最近访问`,favorites:`我的收藏`}[l]||`从这里开始今天的工作`;function V(n){return n.length?(0,_.jsx)(`div`,{className:g.rows,children:n.filter(e=>I(e.title)).map(n=>{let r=f.some(e=>e.key===n.key);return(0,_.jsxs)(`div`,{className:g.visit,children:[(0,_.jsxs)(`button`,{onClick:()=>b(n.route),children:[(0,_.jsx)(t,{size:17}),(0,_.jsxs)(`span`,{children:[(0,_.jsx)(`b`,{children:n.title}),(0,_.jsx)(`small`,{children:v(n.at)})]}),(0,_.jsx)(e,{size:16})]}),(0,_.jsx)(`button`,{"aria-label":`${r?`取消固定`:`固定`}${n.title}`,"aria-pressed":r,onClick:()=>y(n),children:(0,_.jsx)(a,{size:16})})]},n.key)})}):(0,_.jsx)(`p`,{className:g.empty,children:l===`favorites`?`在最近访问中固定常用页面,即可在这里快速进入。`:`打开市场、商品、项目或资料后,这里会保留本次登录的访问位置。`})}let H=(0,_.jsxs)(`section`,{className:g.panel,children:[(0,_.jsxs)(`div`,{className:g.heading,children:[(0,_.jsx)(`h2`,{children:`需要你处理`}),(0,_.jsx)(`span`,{children:A?`读取中`:`${z.length} 项`})]}),z.slice(0,5).map(({project:t,step:n})=>(0,_.jsxs)(`button`,{className:g.row,onClick:()=>x(t.id,n.target),children:[(0,_.jsxs)(`span`,{children:[(0,_.jsxs)(`b`,{children:[n.name,` · `,n.state===`attention`?`待复核`:`待确认`]}),(0,_.jsxs)(`small`,{children:[t.name,` · `,n.description]})]}),(0,_.jsx)(e,{size:16})]},t.id+n.id)),!A&&!z.length&&(0,_.jsx)(`p`,{className:g.empty,children:O.length?`连接恢复后显示待处理事项。`:`当前没有待复核或待确认的阶段。`})]});return(0,_.jsxs)(`div`,{className:g.home,children:[(0,_.jsxs)(`div`,{className:g.top,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`span`,{className:g.eyebrow,children:`山海 · OMNI`}),(0,_.jsx)(`h1`,{children:B}),(0,_.jsx)(`p`,{children:`连接市场机会、经营行动与项目资料`})]}),(0,_.jsxs)(`label`,{className:g.search,children:[(0,_.jsx)(c,{size:17}),(0,_.jsx)(`input`,{"aria-label":`搜索首页项目、资料和访问记录`,value:P,onChange:e=>F(e.target.value),placeholder:`查找项目、资料或访问记录`})]})]}),O.length>0&&(0,_.jsxs)(`div`,{role:`alert`,className:g.error,children:[O.join(`;`),(0,_.jsx)(`button`,{onClick:()=>{j(!0),N(e=>e+1)},children:`重试`})]}),A&&(0,_.jsx)(`p`,{role:`status`,className:g.empty,children:`正在读取当前账号的项目与资料…`}),l===`recent`||l===`favorites`?(0,_.jsx)(`section`,{className:g.panel,children:V(l===`recent`?d:f)}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`section`,{className:g.resume,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`span`,{className:g.eyebrow,children:`继续上次工作`}),(0,_.jsx)(`h2`,{children:d[0]?.title||`选择一个入口,开始你的工作`}),(0,_.jsx)(`p`,{children:d[0]?`${d[0].moduleLabel} · ${v(d[0].at)}`:`查看市场,或建立一个商品项目,逐步积累证据与判断。`})]}),(0,_.jsxs)(`button`,{onClick:()=>d[0]?b(d[0].route):S(`market`),children:[d[0]?`继续处理`:`查看市场`,(0,_.jsx)(e,{size:17})]})]}),(0,_.jsxs)(`div`,{className:g.grid,children:[H,(0,_.jsxs)(`section`,{className:g.panel,children:[(0,_.jsx)(`h2`,{children:`常用入口`}),(0,_.jsx)(`div`,{className:g.shortcuts,children:[[`market`,`查市场`,n],[`products`,`查看商品`,o],[`projects`,`打开项目`,r],[`data`,`查找资料`,i]].map(([t,n,r])=>(0,_.jsxs)(`button`,{onClick:()=>S(String(t)),children:[(0,_.jsx)(r,{size:20}),(0,_.jsx)(`span`,{children:String(n)}),(0,_.jsx)(e,{size:14})]},String(t)))}),f.length>0&&V(f.slice(0,3))]}),(0,_.jsxs)(`section`,{className:g.panel,children:[(0,_.jsxs)(`div`,{className:g.heading,children:[(0,_.jsx)(`h2`,{children:`最近项目`}),(0,_.jsx)(`button`,{onClick:C,children:`+ 新建项目`})]}),L.slice(0,4).map(t=>(0,_.jsxs)(`button`,{className:g.row,onClick:()=>x(t.id,{tab:`overview`}),children:[(0,_.jsxs)(`span`,{children:[(0,_.jsx)(`b`,{children:t.name}),(0,_.jsxs)(`small`,{children:[t.statusLabel,` · 下一步:`,t.next.name]}),(0,_.jsx)(`small`,{children:v(t.updated)})]}),(0,_.jsx)(e,{size:16})]},t.id)),!A&&!L.length&&(0,_.jsx)(`p`,{className:g.empty,children:P?`没有匹配的项目。`:`建立第一个项目,将市场机会转化为具体方案。`})]}),(0,_.jsxs)(`section`,{className:g.panel,children:[(0,_.jsxs)(`div`,{className:g.heading,children:[(0,_.jsx)(`h2`,{children:`最近资料`}),(0,_.jsx)(`button`,{onClick:()=>S(`data`),children:`全部资料 →`})]}),R.slice(0,5).map(t=>(0,_.jsxs)(`button`,{className:g.row,onClick:()=>x(t.project,{tab:`data`,datasetId:t.id}),children:[(0,_.jsxs)(`span`,{children:[(0,_.jsx)(`b`,{children:t.title}),(0,_.jsxs)(`small`,{children:[t.projectName,` · `,v(t.created)]})]}),(0,_.jsx)(e,{size:16})]},t.id)),!A&&!R.length&&(0,_.jsx)(`p`,{className:g.empty,children:P?`没有匹配的资料。`:`项目中归档的数据集会出现在这里。`})]})]})]})]})}function b(e,t){return e.some(e=>e.key===t.key)?e.filter(e=>e.key!==t.key):[t,...e].slice(0,20)}function x({section:e}){let t=f(),[n,r]=s(`home.pins`,[]);return(0,_.jsx)(y,{mode:e,...t,pins:n,onPin:e=>r(t=>b(t,e))})}export{x as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._activity_k9yph_1{color:var(--omni-text);max-width:1600px;margin:auto}._activity_k9yph_1 header{justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px;display:flex}._activity_k9yph_1 h1{font-size:27px}._activity_k9yph_1 h2{font-size:15px}._activity_k9yph_1 label{align-items:center;gap:10px;display:flex}._activity_k9yph_1 input{background:var(--omni-field);border:1px solid var(--omni-line);color:inherit;border-radius:6px;padding:10px}._panel_k9yph_1{border:1px solid var(--omni-line);background:var(--omni-panel);border-radius:10px;padding:20px 22px}._activity_k9yph_1 button{border:0;border-bottom:1px solid var(--omni-line);width:100%;color:inherit;text-align:left;cursor:pointer;background:0 0;justify-content:space-between;align-items:center;gap:14px;padding:13px 0;display:flex}._activity_k9yph_1 small{color:var(--omni-muted);margin-top:5px;font-size:11px;display:block}._activity_k9yph_1 p{color:var(--omni-muted);font-size:12px;line-height:1.8}._activity_k9yph_1 button:focus-visible{outline:2px solid var(--omni-accent);outline-offset:3px}@media (width<=800px){._activity_k9yph_1 header{flex-direction:column;align-items:flex-start}}.dl-toolbar{min-height:32px;color:var(--omni-muted);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;margin:0 0 14px;display:flex}.dl-toolbar-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.dl-toolbar-actions>span{margin-right:5px;font-size:12px}.gw .dl-toolbar button,.gw .dl-card-controls button{font:inherit;border:1px solid var(--omni-line);background:var(--omni-panel);color:var(--omni-text);cursor:pointer;border-radius:6px;justify-content:center;align-items:center;gap:6px;padding:7px 10px;font-size:11px;line-height:1.4;display:flex}.gw .dl-toolbar .dl-save{background:var(--omni-accent);color:var(--omni-accent-text);border-color:var(--omni-accent)}.dl-toolbar small{font-size:11px}.dl-card{min-width:0}.dl-card>.gc-kpi,.dl-card>.pb-stat{width:100%;height:100%}.dashboard-editing .dl-toolbar{z-index:20;background:var(--omni-panel);border:1px solid var(--omni-line);border-radius:8px;padding:10px;position:sticky;top:0}.dl-card-controls{color:var(--omni-accent);z-index:1;align-items:center;gap:4px;min-width:0;margin-bottom:10px;display:flex;position:relative}.gw .dl-card-controls button{flex-shrink:0;padding:5px;font-size:10px}.gw .dl-card-controls .dl-grip{cursor:grab;min-width:0;color:var(--omni-accent);background:color-mix(in srgb,var(--omni-accent) 9%,var(--omni-panel));border-style:dashed;flex:1;justify-content:flex-start;overflow:hidden}.dl-grip{touch-action:none;-webkit-user-select:none;user-select:none}.dl-grip span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dl-grip svg{flex-shrink:0}.gw .dl-card-controls button:disabled{opacity:.3;cursor:default}.dl-editable{outline:1px dashed color-mix(in srgb,var(--omni-accent) 55%,transparent);outline-offset:4px;border-radius:8px}.dl-dragging{opacity:.45}.dashboard-editing .gc-kpis,.dashboard-editing .pb-summary,.dashboard-editing .pb-project-grid{gap:18px}.dashboard-editing .dl-card>.gc-kpi,.dashboard-editing .dl-card>.pb-stat,.dashboard-editing .pb-project-card{height:auto}.gw .gc-main-grid>[data-layout-card=sales]{grid-column:span 2}.gw .gc-main-grid>[data-layout-card=ranking]{grid-column:1/-1}.gw .gc-tab-panel .gc-main-grid>.dl-card{order:initial}.gw .gc-kpi .gc-kpi-icon{background:color-mix(in srgb,var(--omni-accent) 15%,var(--omni-panel));color:var(--omni-accent)}.gw .gc-kpi-profit .gc-kpi-icon{background:color-mix(in srgb,var(--omni-chart-secondary) 15%,var(--omni-panel));color:var(--omni-chart-secondary)}.gw .gc-kpi-tasks .gc-kpi-icon{background:color-mix(in srgb,var(--omni-chart-teal) 15%,var(--omni-panel));color:var(--omni-chart-teal)}.pb-module-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:24px;display:grid}.pb-module-grid>[data-layout-card=stats],.pb-module-grid>[data-layout-card=projects]{grid-column:1/-1}.pb-module-grid .pb-summary{margin-bottom:0}.pb-module-grid .pb-panel{height:100%}.pb-module-grid .pb-toolbar{margin-top:3px}.pb-project-grid>.dl-card{flex-direction:column;display:flex}.pb-project-grid .pb-project-card{flex:1}@media (width<=1000px){.gw .gc-main-grid>[data-layout-card=sales]{grid-column:1}}@media (width<=850px){.pb-module-grid{grid-template-columns:1fr}.pb-module-grid>.dl-card{grid-column:1}.dl-toolbar small{line-height:1.6}.gc-kpis>.dl-card:last-child{grid-column:1/-1}}.gc-tabs-heading{border-bottom:1px solid var(--omni-line);justify-content:space-between;align-items:center;gap:20px;margin:22px 0 0;display:flex}.gc-tabs{scrollbar-width:thin;gap:26px;min-width:0;display:flex;overflow-x:auto}.gw .gc-tabs [role=tab]{color:var(--omni-muted);white-space:nowrap;background:0 0;border:0;border-bottom:3px solid #0000;border-radius:0;flex-shrink:0;padding:12px 2px 15px;font-size:16px;font-weight:600;display:block}.gw .gc-tabs [aria-selected=true]{color:var(--omni-text);border-bottom-color:var(--omni-accent)}.gw .gc-tabs [role=tab]:focus-visible{outline:2px solid var(--omni-accent);outline-offset:-3px}.gc-tabs-heading .pb-heading-actions{flex-shrink:0;padding-bottom:9px}.gw .gc-tabs-heading .pb-heading-actions button{border:1px solid var(--omni-line);background:var(--omni-panel);color:var(--omni-text);border-radius:7px;align-items:center;gap:7px;padding:9px 12px;font-size:12px;display:flex}.gw .gc-tabs-heading .pb-heading-actions .pb-create{background:var(--omni-accent);color:var(--omni-accent-text);border-color:var(--omni-accent)}.gc-tab-description{color:var(--omni-muted);margin:12px 0 20px;font-size:12px;line-height:1.6}.gc-tab-panel{min-width:0}.gc-tab-panel:focus-visible{outline:2px solid var(--omni-accent);outline-offset:5px}.gw .gc-tab-panel .gc-main-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.gc-tab-panel .gc-sales{grid-column:span 2}.gc-tab-panel .gc-structure{grid-column:span 1}.gc-tab-panel .gc-ranking{grid-column:1/-1}.gw .gc-tab-tasks .gc-main-grid,.gw .gc-tab-history .gc-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gc-tab-tasks .gc-panel,.gc-tab-history .gc-panel{order:initial;grid-column:span 1}.gc-tab-tasks .gc-todo{order:-1}.gw .gc-tab-panel .gc-todo-list,.gw .gc-tab-panel .gc-matrix-scroll,.gw .gc-tab-panel .gc-time-scroll{max-height:430px}.gc-tab-panel .pb-board{margin-top:0}.gc-tab-panel .gc-quick-tiers{margin-bottom:16px}@media (width<=1000px){.gc-tabs-heading{flex-wrap:wrap;gap:6px}.gc-tabs{gap:20px;max-width:100%}.gc-tabs-heading .pb-heading-actions{margin-left:auto}.gw .gc-tab-panel .gc-main-grid{grid-template-columns:1fr}.gc-tab-panel .gc-panel{grid-column:1}.gw .gc-tabs [role=tab]{font-size:14px}}@media (width<=550px){.gc-tabs{gap:18px}.gw .gc-tabs [role=tab]{font-size:13px}.gc-tabs-heading .pb-heading-actions{justify-content:flex-end;width:100%}.gc-tab-description{margin-bottom:14px}}.workbench-module .gw .gc-kpis{gap:10px;margin-bottom:12px}.workbench-module .gw .gc-kpi{border-radius:8px;padding:14px 16px}.workbench-module .gw .gc-kpi>div{gap:9px;font-size:12px}.workbench-module .gw .gc-kpi strong{margin:12px 0 8px;font-size:29px;line-height:1.2}.workbench-module .gw .gc-kpi p{min-height:30px;margin:0;font-size:10px;line-height:1.55}.workbench-module .gw .gc-kpi:after{width:32px}.workbench-module .gw .gc-kpi strong small{font-size:12px}.workbench-module .gw .gc-kpi .gc-long-value{font-size:24px}.workbench-module .gc-quick-tiers{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:12px;display:grid}.workbench-module .gc-quick-tiers>section{background:linear-gradient(115deg,var(--omni-paint-surface-112749,#112749),var(--omni-paint-surface-0d1b32,#0d1b32));border:1px solid var(--omni-paint-line-29466d,#29466d);border-top:2px solid var(--tier);border-radius:7px;min-width:0;padding:11px 13px}.workbench-module .gc-quick-tiers header{background:0 0;border:0;align-items:center;gap:8px;margin:0 0 7px;padding:0;display:flex}.workbench-module .gc-quick-tiers header b{color:var(--tier);font-size:13px}.workbench-module .gc-quick-tiers header span{color:var(--omni-paint-ink-83a6cf,#83a6cf);margin-left:auto;font-size:10px}.workbench-module .gc-quick-tiers header button{color:var(--omni-paint-ink-87b4de,#87b4de);background:0 0;border:0;padding:0}.workbench-module .gc-quick-tiers .gc-quick-line{text-align:left;width:100%;color:var(--omni-paint-ink-bfd4ed,#bfd4ed);background:0 0;border:0;align-items:center;gap:9px;padding:5px 0;font-size:11px;display:flex}.workbench-module .gc-quick-line em{color:var(--omni-paint-ink-7297c1,#7297c1);flex-shrink:0;font-style:normal}.workbench-module .gc-quick-line span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.workbench-module .gc-quick-line svg{flex-shrink:0;margin-left:auto}.workbench-module .gc-quick-tiers .gc-quick-alert{background:var(--omni-paint-surface-11243c,#11243c);border:0;border-top:1px solid var(--omni-paint-line-254364,#254364);width:100%;color:var(--omni-paint-ink-77b7bc,#77b7bc);text-align:left;justify-content:space-between;align-items:center;margin-top:7px;padding:8px 0 0;font-size:10px;display:flex}.workbench-module .gc-quick-alert.has-issues{color:var(--omni-paint-ink-f1be80,#f1be80)}.workbench-module .gw .gc-main-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.workbench-module .gw .gc-panel{border-radius:8px;min-width:0;padding:15px 16px}.workbench-module .gc-sales{order:1;grid-column:span 4}.workbench-module .gc-structure{order:2;grid-column:span 2}.workbench-module .gc-ranking{order:3;grid-column:span 2}.workbench-module .gc-todo{order:4;grid-column:span 2}.workbench-module .gc-matrix{order:5;grid-column:span 2}.workbench-module .gc-history{order:6;grid-column:span 4}.workbench-module .gc-inspect{order:7;grid-column:span 2}.workbench-module .gw .gc-panel-head h2{font-size:14px}.workbench-module .gw .gc-panel-head small{margin-top:4px;font-size:10px}.workbench-module .gw .gc-panel-head button{padding:5px 7px;font-size:10px}.workbench-module .gw .gc-selects{gap:8px;margin:9px 0}.workbench-module .gw .gc-selects select{min-height:32px;padding:6px 8px;font-size:11px}.workbench-module .gw .gc-selects button{min-height:32px;padding:6px 9px;font-size:11px}.workbench-module .gw .gc-chart-reading strong{font-size:25px}.workbench-module .gw .gc-chart-reading{margin:8px 0 2px}.workbench-module .gw .gc-ring{gap:8px;min-height:215px}.workbench-module .gw .gc-ring svg{width:46%;max-width:180px}.workbench-module .gw .gc-ring-legend button{gap:7px;padding:10px 0;font-size:11px}.workbench-module .gw .gc-ring-legend b{font-size:18px}.workbench-module .gw .gc-footnote{color:var(--omni-paint-ink-799cc4,#799cc4);margin:8px 0 0;font-size:9px;line-height:1.6}.workbench-module .gw .gc-matrix-scroll{max-height:265px}.workbench-module .gw .gc-matrix-row{gap:9px;margin-bottom:10px}.workbench-module .gw .gc-project-name{width:87px;font-size:10px!important}.workbench-module .gw .gc-matrix-row>div{gap:3px}.workbench-module .gw .gc-cell{min-width:12px;height:24px}.workbench-module .gw .gc-state-legend{gap:6px;margin-bottom:15px;font-size:9px}.workbench-module .gw .gc-todo-list{max-height:260px}.workbench-module .gw .gc-todo-list>button{gap:9px;padding:12px 0}.workbench-module .gw .gc-todo-list b{font-size:12px}.workbench-module .gw .gc-todo-list small{font-size:10px}.workbench-module .gw .gc-no-data{min-height:80px;font-size:12px}.workbench-module .gc-rank-list{max-height:266px;overflow:auto}.workbench-module .gc-rank-list>button{border:0;border-bottom:1px solid var(--omni-paint-line-213856,#213856);text-align:left;width:100%;color:var(--omni-paint-ink-b7d1ef,#b7d1ef);background:0 0;align-items:center;gap:8px;padding:8px 0;font-size:11px;display:flex}.workbench-module .gc-rank-list i{background:var(--omni-paint-surface-233e67,#233e67);width:18px;height:19px;color:var(--omni-paint-ink-9cbce2,#9cbce2);border-radius:3px;flex-shrink:0;place-items:center;font:10px monospace;display:grid}.workbench-module .gc-rank-list>button:first-child i{background:var(--omni-paint-surface-cfb660,#cfb660);color:var(--omni-paint-ink-18284a,#18284a)}.workbench-module .gc-rank-list span{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.workbench-module .gc-rank-list small{color:var(--omni-paint-ink-698dbb,#698dbb);font-size:9px;display:block}.workbench-module .gc-rank-list>button>div{background:var(--omni-paint-surface-182d4e,#182d4e);border-radius:6px;flex-shrink:0;width:48px;height:5px}.workbench-module .gc-rank-list b{background:linear-gradient(90deg,var(--omni-paint-surface-6760f2,#6760f2),var(--omni-paint-surface-39d5ec,#39d5ec));border-radius:6px;height:100%;display:block}.workbench-module .gc-rank-list strong{text-align:right;min-width:50px;color:var(--omni-paint-ink-badbff,#badbff);font:11px monospace}.workbench-module .gc-status-strip{color:var(--omni-paint-ink-7da1cc,#7da1cc);border-top:1px solid var(--omni-paint-line-274267,#274267);flex-wrap:wrap;align-items:center;gap:20px;margin-top:12px;padding:10px 0;font-size:10px;display:flex}.workbench-module .gc-status-strip i{background:var(--omni-paint-surface-58dccc,#58dccc);border-radius:50%;width:5px;height:5px;margin-right:4px;display:inline-block}.workbench-module .gc-status-strip button{background:var(--omni-paint-surface-183c68,#183c68);border:1px solid var(--omni-paint-line-315885,#315885);color:var(--omni-paint-ink-afd7fa,#afd7fa);align-items:center;gap:7px;margin-left:auto;padding:6px 10px;font-size:10px;display:flex}@media (width>=1600px){.workbench-module .gw .gc-chart svg{max-height:215px}.workbench-module .gw .gc-ring{min-height:240px}.workbench-module .gw .gc-kpi strong{font-size:33px}}@media (width<=1150px){.workbench-module .gw .gc-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}.workbench-module .gw .gc-kpi{padding:12px 10px}.workbench-module .gw .gc-kpi-icon{display:none}.workbench-module .gw .gc-kpi strong{font-size:24px}.workbench-module .gw .gc-kpi>div{font-size:11px}.workbench-module .gw .gc-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-module .gc-sales,.workbench-module .gc-history{grid-column:span 2}.workbench-module .gc-structure,.workbench-module .gc-ranking,.workbench-module .gc-todo,.workbench-module .gc-matrix,.workbench-module .gc-inspect{grid-column:span 1}.workbench-module .gc-structure{order:3}.workbench-module .gc-ranking{order:2}.workbench-module .gc-quick-tiers header{flex-wrap:wrap}.workbench-module .gc-quick-tiers header span{font-size:9px}.workbench-module .gw .gc-ring{flex-direction:row}.workbench-module .gw .gc-ring svg{width:43%}.workbench-module .gw .gc-matrix-row>div{min-width:0}}@media (width<=850px){.workbench-module .gc-quick-tiers{grid-template-columns:1fr;gap:8px}.workbench-module .gc-quick-tiers>section{padding:10px 12px}.workbench-module .gc-quick-tiers .gc-quick-alert{padding-top:6px}.workbench-module .gw .gc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-module .gw .gc-kpi:last-child{grid-column:1/-1}.workbench-module .gw .gc-kpi:last-child p{display:block}.workbench-module .gw .gc-kpi strong{margin:8px 0}.workbench-module .gw .gc-kpi p{min-height:0}.workbench-module .gw .gc-ring{min-height:230px}.workbench-module .gw .gc-main-grid{grid-template-columns:1fr}.workbench-module .gc-main-grid>.gc-panel{grid-column:1}.workbench-module .gc-status-strip{gap:10px}.workbench-module .gc-status-strip button{margin-left:0}}@media (width<=650px){.workbench-module .gc-quick-line span{white-space:normal}.workbench-module .gw .gc-panel{padding:14px}.workbench-module .gc-status-strip{font-size:10px}}.workbench-module .gc-quick-tiers .gc-quick-line{justify-content:flex-start}.workbench-module .gc-next-label{color:var(--omni-paint-ink-76b5e2,#76b5e2);margin:12px 0 2px;font-size:11px}.workbench-module .gc-next-dot{background:var(--omni-paint-surface-5966d4,#5966d4);border-radius:2px;flex-shrink:0;width:7px;height:7px;margin:0 6px}.workbench-module .gw .gc-todo-list:has(.gc-next-label){max-height:270px}.workbench-module .gc-next-label~button b{color:var(--omni-paint-ink-9fc3ef,#9fc3ef)}.workbench-module .gw .gc-kpi{padding:11px 13px}.workbench-module .gw .gc-kpi-icon{width:27px;height:27px}.workbench-module .gw .gc-kpi strong{margin:8px 0 6px;font-size:28px}.workbench-module .gw .gc-kpi p{min-height:19px;font-size:10px}.workbench-module .gw .gc-chart svg{max-height:165px}.workbench-module .gw .gc-ring{min-height:200px}.workbench-module .gw .gc-panel-head{margin-bottom:8px}.workbench-module .gw .gc-panel-head small{margin-top:3px}.workbench-module .gw .gc-time-scroll{max-height:185px}.workbench-module .gw .gc-checks button{padding:8px 0}.workbench-module .gw .gc-checks{gap:10px}.workbench-module .gc-quick-tiers>section{padding:9px 12px}.workbench-module .gc-quick-tiers .gc-quick-line{padding:3px 0}.workbench-module .gc-quick-tiers .gc-quick-alert{margin-top:5px;padding-top:6px}@media (width>=1151px){.workbench-module .gw .gc-chart-empty{min-height:190px}}.workbench-module .gc-quick-line span small{color:var(--omni-paint-ink-718fb7,#718fb7);margin-top:1px;font-size:9px;line-height:1.5;display:block}.workbench-module .gc{--line:var(--omni-paint-line-233a61,#233a61);--muted:var(--omni-paint-ink-839bbd,#839bbd);--cyan:var(--omni-paint-ink-52d5fa,#52d5fa)}.workbench-module .gc button{font:inherit;cursor:pointer}.workbench-module .gc button:focus-visible,.workbench-module .gc select:focus-visible{outline:2px solid var(--omni-paint-line-61dbff,#61dbff);outline-offset:3px}.workbench-module .gc button:disabled{opacity:.45;cursor:default}.workbench-module .gc-kpis{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px;display:grid}.workbench-module .gc-kpi{text-align:left;border:1px solid var(--omni-paint-line-29467a,#29467a);color:var(--omni-paint-ink-b6c9e8,#b6c9e8);background:radial-gradient(ellipse at 85% 0,var(--omni-paint-surface-1c53ad66,#1c53ad66),transparent 75%),linear-gradient(135deg,var(--omni-paint-surface-122b51,#122b51),var(--omni-paint-surface-0c1b36,#0c1b36));box-shadow:inset 0 1px var(--omni-paint-shadow-7abaff15,#7abaff15),0 6px 20px var(--omni-paint-shadow-0002,#0002);border-radius:8px;padding:16px 17px;position:relative;overflow:hidden}.workbench-module .gc-kpi:after{content:"";background:var(--omni-paint-surface-3d97ff,#3d97ff);width:44px;height:2px;box-shadow:0 0 14px var(--omni-paint-shadow-3dbaff,#3dbaff);position:absolute;bottom:0;left:17px}.workbench-module .gc-kpi>div{align-items:center;gap:9px;font-size:12px;display:flex}.workbench-module .gc-kpi>div>svg{color:var(--omni-paint-ink-6e91c3,#6e91c3);margin-left:auto}.workbench-module .gc-kpi-icon{background:var(--omni-paint-surface-173c73,#173c73);color:var(--omni-paint-ink-4dccff,#4dccff);width:34px;height:34px;box-shadow:0 0 17px var(--omni-paint-shadow-1d87ff22,#1d87ff22);border-radius:7px;flex-shrink:0;place-items:center;display:grid}.workbench-module .gc-kpi:nth-child(2) .gc-kpi-icon{color:var(--omni-paint-ink-b99bff,#b99bff);background:var(--omni-paint-surface-34295b,#34295b)}.workbench-module .gc-kpi:nth-child(5) .gc-kpi-icon{color:var(--omni-paint-ink-56e7db,#56e7db);background:var(--omni-paint-surface-113f51,#113f51)}.workbench-module .gc-kpi strong{color:var(--omni-paint-ink-e1efff,#e1efff);letter-spacing:-1px;margin:10px 0 8px;font:34px/1.3 ui-monospace,SFMono-Regular,monospace;display:block}.workbench-module .gc-kpi strong small{color:var(--omni-paint-ink-839fca,#839fca);margin-left:8px;font:11px sans-serif}.workbench-module .gc-kpi p{color:var(--omni-paint-ink-7f9ec5,#7f9ec5);margin:0;font-size:10px;line-height:1.6}.workbench-module .gc-kpi:hover{border-color:var(--omni-paint-line-548ad1,#548ad1);background-color:var(--omni-paint-surface-173363,#173363)}.workbench-module .gc-main-grid{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:16px;display:grid}.workbench-module .gc-panel{background:linear-gradient(125deg,var(--omni-paint-surface-0e1d39,#0e1d39),var(--omni-paint-surface-0a162d,#0a162d));border:1px solid var(--line);min-width:0;box-shadow:inset 0 1px var(--omni-paint-shadow-80aaff08,#80aaff08);border-radius:8px;padding:18px 20px;position:relative;overflow:hidden}.workbench-module .gc-panel:before{content:"";background:var(--omni-paint-surface-4193f5,#4193f5);width:28px;height:2px;box-shadow:0 0 15px var(--omni-paint-shadow-2e91ee77,#2e91ee77);position:absolute;top:0;left:20px}.workbench-module .gc-panel-head{justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;display:flex}.workbench-module .gc-panel-head h2{color:var(--omni-paint-ink-d4e7ff,#d4e7ff);white-space:nowrap;align-items:center;gap:8px;font-size:15px;font-weight:550;display:flex}.workbench-module .gc-panel-head h2 span{background:var(--omni-paint-surface-50c9ff,#50c9ff);width:6px;height:6px;box-shadow:0 0 9px var(--omni-paint-shadow-4cb8ff,#4cb8ff);transform:rotate(45deg)}.workbench-module .gc-panel-head small{color:var(--muted);margin-top:7px;font-size:10px;line-height:1.5;display:block}.workbench-module .gc-panel-head>svg{color:var(--omni-paint-ink-47bff4,#47bff4)}.workbench-module .gc-panel-head button,.workbench-module .gc-selects button,.workbench-module .gc-archive button,.workbench-module .gc-lanes-title button,.workbench-module .gc-chart-empty button{border:1px solid var(--omni-paint-line-2c4775,#2c4775);background:var(--omni-paint-surface-122b50,#122b50);color:var(--omni-paint-ink-a4ceff,#a4ceff);white-space:nowrap;border-radius:4px;align-items:center;gap:5px;padding:7px 9px;font-size:10px;display:flex}.workbench-module .gc-toggle{background:var(--omni-paint-surface-08152d,#08152d);border:1px solid var(--omni-paint-line-243b63,#243b63);border-radius:5px;flex-shrink:0;padding:2px;display:flex}.workbench-module .gc-toggle button{color:var(--omni-paint-ink-7799c4,#7799c4);background:0 0;border:0;border-radius:3px;padding:5px 10px;font-size:10px}.workbench-module .gc-toggle button[aria-pressed=true]{background:var(--omni-paint-surface-244d8c,#244d8c);color:var(--omni-paint-ink-d5edff,#d5edff)}.workbench-module .gc-selects{gap:7px;display:flex}.workbench-module .gc-selects select{background:var(--omni-paint-surface-0d2040,#0d2040);border:1px solid var(--omni-paint-line-2b4671,#2b4671);min-width:0;color:var(--omni-paint-ink-9db9dc,#9db9dc);border-radius:4px;width:42%;margin:0;padding:7px 8px;font-size:10px}.workbench-module .gc-selects select:nth-child(2){width:38%}.workbench-module .gc-chart-reading{align-items:baseline;gap:12px;margin-top:14px;display:flex}.workbench-module .gc-chart-reading strong{color:var(--omni-paint-ink-def5ff,#def5ff);font:25px ui-monospace,monospace}.workbench-module .gc-chart-reading strong small{color:var(--omni-paint-ink-8eb2d4,#8eb2d4);margin-left:6px;font:10px sans-serif}.workbench-module .gc-chart-reading span{color:var(--omni-paint-ink-9ab1d2,#9ab1d2);font-size:10px}.workbench-module .gc-chart-reading i{color:var(--omni-paint-ink-6185ae,#6185ae);margin-left:auto;font-size:9px;font-style:normal}.workbench-module .gc-chart svg{width:100%;margin:3px 0 0;display:block}.workbench-module .gc-chart svg text{fill:var(--omni-paint-ink-7692bc,#7692bc);font:10px sans-serif}.workbench-module .gc-gridline{stroke:var(--omni-paint-chart-203755,#203755);stroke-dasharray:3 5}.workbench-module .gc-line{stroke:var(--omni-paint-chart-57edee,#57edee);stroke-width:2px;filter:drop-shadow(0 0 3px #39bada88);pointer-events:none}.workbench-module .gc-footnote{color:var(--omni-paint-ink-738daf,#738daf);margin:10px 0 0;font-size:9px;line-height:1.7}.workbench-module .gc-ring{align-items:center;gap:12px;min-height:265px;display:flex}.workbench-module .gc-ring svg{filter:drop-shadow(0 0 15px #3072ff15);flex-shrink:0;width:53%;max-width:270px}.workbench-module .gc-ring text{fill:var(--omni-paint-ink-8da9cc,#8da9cc);font:7px sans-serif}.workbench-module .gc-ring .gc-ring-number{fill:var(--omni-paint-chart-e3f0ff,#e3f0ff);font:27px ui-monospace,monospace}.workbench-module .gc-ring-legend{flex:1;min-width:0}.workbench-module .gc-ring-legend button{border:0;border-bottom:1px solid var(--omni-paint-line-203352,#203352);width:100%;color:var(--omni-paint-ink-9db4d7,#9db4d7);text-align:left;white-space:nowrap;background:0 0;align-items:center;gap:7px;padding:12px 0;font-size:11px;display:flex}.workbench-module .gc-ring-legend i,.workbench-module .gc-state-legend i{border-radius:2px;flex-shrink:0;width:6px;height:6px;display:inline-block}.workbench-module .gc-ring-legend b{color:var(--omni-paint-ink-dfebff,#dfebff);margin-left:auto;font:15px monospace}.workbench-module .gc-ring-legend small{color:var(--omni-paint-ink-6f8fb8,#6f8fb8);text-align:right;width:27px;font-size:9px}.workbench-module .gc-checks{gap:14px;padding:8px 0;display:grid}.workbench-module .gc-checks button{color:var(--omni-paint-ink-9eb5d8,#9eb5d8);text-align:left;background:0 0;border:0;align-items:center;gap:14px;padding:0;font-size:11px;display:flex}.workbench-module .gc-checks button>span{width:75px}.workbench-module .gc-checks button>div{background:var(--omni-paint-surface-162947,#162947);border-radius:2px;flex:1;height:9px;overflow:hidden}.workbench-module .gc-checks i{height:100%;box-shadow:0 0 12px var(--omni-paint-shadow-4b9eff33,#4b9eff33);border-radius:2px;display:block}.workbench-module .gc-checks b{color:var(--omni-paint-ink-c4dafa,#c4dafa);min-width:15px;font:15px monospace}.workbench-module .gc-archive{border-top:1px solid var(--omni-paint-line-213856,#213856);color:var(--omni-paint-ink-87a6cd,#87a6cd);justify-content:space-between;align-items:center;margin-top:18px;padding-top:13px;font-size:11px;display:flex}.workbench-module .gc-archive b{color:var(--omni-paint-ink-9fccff,#9fccff);margin-right:5px;font:18px monospace}.workbench-module .gc-state-legend{color:var(--omni-paint-ink-88a5ca,#88a5ca);flex-wrap:wrap;gap:12px;margin:0 0 13px;font-size:9px;display:flex}.workbench-module .gc-state-legend span{align-items:center;gap:5px;display:flex}.workbench-module .gc .done{background:var(--omni-paint-surface-1d8c94,#1d8c94);border-color:var(--omni-paint-line-31b3bc,#31b3bc)}.workbench-module .gc .review{background:var(--omni-paint-surface-6352b1,#6352b1);border-color:var(--omni-paint-line-8971df,#8971df)}.workbench-module .gc .attention{background:var(--omni-paint-surface-9a6433,#9a6433);border-color:var(--omni-paint-line-d7a15d,#d7a15d)}.workbench-module .gc .todo{background:var(--omni-paint-surface-1c3156,#1c3156);border-color:var(--omni-paint-line-2b4771,#2b4771)}.workbench-module .gc .stopped{background:var(--omni-paint-surface-853d5b,#853d5b);border-color:var(--omni-paint-line-b9698a,#b9698a)}.workbench-module .gc-matrix-scroll{max-height:190px;overflow:auto}.workbench-module .gc-matrix-row{align-items:center;gap:14px;margin-bottom:9px;display:flex}.workbench-module .gc-project-name{text-overflow:ellipsis;white-space:nowrap;text-align:left;width:135px;color:var(--omni-paint-ink-b1c9e9,#b1c9e9);background:0 0;border:0;flex-shrink:0;padding:0;overflow:hidden;font-size:10px!important}.workbench-module .gc-project-name small{color:var(--omni-paint-ink-6386b0,#6386b0);margin-top:4px;font-size:8px;display:block}.workbench-module .gc-matrix-row>div{flex:1;gap:4px;min-width:0;display:flex}.workbench-module .gc-cell{min-width:15px;height:25px;color:var(--omni-paint-ink-adc8ed,#adc8ed);border:1px solid;border-radius:3px;flex:1;padding:0;font-size:8px!important}.workbench-module .gc-cell:hover{filter:brightness(1.5);transform:translateY(-2px)}.workbench-module .gc-time-header,.workbench-module .gc-time-row{grid-template-columns:145px minmax(0,1fr);gap:14px;display:grid}.workbench-module .gc-time-header{color:var(--omni-paint-ink-809dc3,#809dc3);margin:6px 6px 8px 0;font-size:9px}.workbench-module .gc-time-header>div{justify-content:space-between;display:flex}.workbench-module .gc-time-scroll{max-height:229px;padding-right:6px;overflow:auto}.workbench-module .gc-time-row{border-top:1px solid var(--omni-paint-line-1c3052,#1c3052);align-items:center;min-height:31px}.workbench-module .gc-time-row>button{text-overflow:ellipsis;white-space:nowrap;color:var(--omni-paint-ink-9bb8dc,#9bb8dc);text-align:left;background:0 0;border:0;padding:0;font-size:10px;overflow:hidden}.workbench-module .gc-time-row>div{background:repeating-linear-gradient(90deg,var(--omni-paint-surface-203658,#203658) 0,var(--omni-paint-surface-203658,#203658) 1px,transparent 1px,transparent 25%);height:30px;margin:0 4px;position:relative}.workbench-module .gc-event{border:1px solid var(--omni-paint-line-69c5f7,#69c5f7);background:var(--omni-paint-surface-3885c3,#3885c3);border-radius:2px;width:7px;min-width:0;height:16px;padding:0;position:absolute;top:7px;transform:translate(-50%)}.workbench-module .gc-event.saved{background:var(--omni-paint-surface-4b6fce,#4b6fce);border-color:var(--omni-paint-line-8eafff,#8eafff)}.workbench-module .gc-event.bad{background:var(--omni-paint-surface-b75a83,#b75a83);border-color:var(--omni-paint-line-eb92b4,#eb92b4)}.workbench-module .gc-event:hover{z-index:2;outline:2px solid var(--omni-paint-line-bcecff,#bcecff)}.workbench-module .gc-todo-list{max-height:245px;overflow:auto}.workbench-module .gc-todo-list>button{text-align:left;border:0;border-top:1px solid var(--omni-paint-line-243655,#243655);width:100%;color:var(--omni-paint-ink-b1cae8,#b1cae8);background:0 0;align-items:center;gap:12px;padding:12px 0;display:flex}.workbench-module .gc-todo-list>button:first-child{border-top:0}.workbench-module .gc-todo-list>button>div{flex:1;min-width:0}.workbench-module .gc-todo-list b{color:var(--omni-paint-ink-edc897,#edc897);font-size:12px;font-weight:500}.workbench-module .gc-todo-list span:not(.gc-todo-num){color:var(--omni-paint-ink-829bbf,#829bbf);text-overflow:ellipsis;white-space:nowrap;margin-top:5px;font-size:9px;display:block;overflow:hidden}.workbench-module .gc-todo-list small{color:var(--omni-paint-ink-627fa8,#627fa8);margin-top:4px;font-size:9px;display:block}.workbench-module .gc-todo-num{color:var(--omni-paint-ink-deb77c,#deb77c);background:var(--omni-paint-surface-3c302d,#3c302d);border:1px solid var(--omni-paint-line-72563f,#72563f);border-radius:4px;padding:5px;font:11px monospace}.workbench-module .gc-badge{background:var(--omni-paint-surface-3e302c,#3e302c);border:1px solid var(--omni-paint-line-815e3a,#815e3a);color:var(--omni-paint-ink-e8b776,#e8b776);white-space:nowrap;border-radius:4px;padding:5px 9px;font-size:10px}.workbench-module .gc-lanes-title{justify-content:space-between;align-items:center;margin:27px 0 18px;display:flex}.workbench-module .gc-lanes-title span{letter-spacing:1.5px;color:var(--omni-paint-ink-5a85b9,#5a85b9);font:9px monospace}.workbench-module .gc-lanes-title h2{color:var(--omni-paint-ink-bdd9ff,#bdd9ff);margin-top:8px;font-size:19px}.workbench-module .gc-no-data,.workbench-module .gc-chart-empty{color:var(--omni-paint-ink-7c9ac4,#7c9ac4);padding:25px 0;font-size:12px}.workbench-module .gc-chart-empty{flex-direction:column;justify-content:center;align-items:center;gap:14px;min-height:235px;display:flex}.workbench-module .gc-chart-empty span{font-size:11px}@media (width>=1600px){.workbench-module .gc-chart svg{max-height:245px}.workbench-module .gc-ring{min-height:310px}.workbench-module .gc-kpi strong{font-size:38px}}@media (width<=1150px){.workbench-module .gc-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.workbench-module .gc-kpi{padding:13px}.workbench-module .gc-main-grid{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}.workbench-module .gc-panel{padding:15px}.workbench-module .gc-ring{flex-direction:column;gap:0;min-height:0}.workbench-module .gc-ring svg{width:150px}.workbench-module .gc-ring-legend{width:100%}.workbench-module .gc-ring-legend button{padding:6px 0}.workbench-module .gc-chart-reading i{display:none}.workbench-module .gc-project-name{width:90px}.workbench-module .gc-time-header,.workbench-module .gc-time-row{grid-template-columns:110px minmax(0,1fr)}}@media (width<=850px){.workbench-module .gc-main-grid{grid-template-columns:1fr}.workbench-module .gc-ring{flex-direction:row}.workbench-module .gc-ring svg{width:45%}.workbench-module .gc-ring-legend button{padding:14px 0}.workbench-module .gc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-module .gc-kpi:last-child{grid-column:1/-1}.workbench-module .gc-kpi:last-child strong{margin-right:15px;display:inline-block}.workbench-module .gc-kpi:last-child p{display:inline}.workbench-module .gc-matrix-row>div{min-width:220px}.workbench-module .gc-matrix-scroll{overflow:auto}.workbench-module .gc-history{min-width:0}.workbench-module .gc-chart-reading{flex-wrap:wrap}}@media (width<=650px){.workbench-module .gc-kpi strong{font-size:29px}.workbench-module .gc-kpi>div{font-size:11px}.workbench-module .gc-kpi-icon{width:28px;height:28px}.workbench-module .gc-kpi p{font-size:9px}.workbench-module .gc-kpis{gap:9px}.workbench-module .gc-lanes-title{align-items:flex-start;gap:12px}.workbench-module .gc-lanes-title h2{font-size:16px}.workbench-module .gc-lanes-title button{padding:8px;font-size:9px}.workbench-module .gc-time-header,.workbench-module .gc-time-row{grid-template-columns:100px minmax(0,1fr);gap:8px}.workbench-module .gc-panel-head h2{font-size:14px}.workbench-module .gc-panel-head small,.workbench-module .gc-chart-reading span{font-size:9px}.workbench-module .gc-panel{padding:15px 12px}.workbench-module .gc-ring-legend button{font-size:10px}}@media (prefers-reduced-motion:reduce){.workbench-module .gc *{scroll-behavior:auto!important;transition:none!important}}.workbench-module .gw .gc-kpi{min-height:0;display:block}.workbench-module .gw .gc-kpi>div>span:not(.gc-kpi-icon){white-space:nowrap}.workbench-module .gc button{letter-spacing:normal;min-height:0}.workbench-module .gc .gc-project-name,.workbench-module .gc .gc-time-row>button{display:block}.workbench-module .gc .gc-cell{place-items:center;min-height:25px;display:grid}.workbench-module .gc .gc-event{color:var(--omni-paint-ink-d8eeff,#d8eeff);place-items:center;width:18px;height:18px;font:8px monospace;display:grid;top:6px}.workbench-module .gc-records{border-left:1px solid var(--omni-paint-line-3566a0,#3566a0);max-height:55dvh;margin:15px 0 0 5px;padding-left:14px;overflow:auto}.workbench-module .gc-records details{border:1px solid var(--omni-paint-line-294c77,#294c77);background:var(--omni-paint-surface-0c1b33,#0c1b33);border-radius:5px;margin-bottom:10px;padding:12px}.workbench-module .gc-records summary{cursor:pointer;gap:7px;display:grid}.workbench-module .gc-records summary span{color:var(--omni-paint-ink-809bc3,#809bc3);font:10px monospace}.workbench-module .gc-records b{color:var(--omni-paint-ink-b9d8ff,#b9d8ff);font-size:13px}.workbench-module .gc-records em{color:var(--omni-paint-ink-69d1e4,#69d1e4);font-size:10px;font-style:normal}.workbench-module .gc-records p{white-space:pre-wrap;color:var(--omni-paint-ink-aac3e3,#aac3e3);font-size:12px;line-height:1.8}.workbench-module .gc-records button{background:var(--omni-paint-surface-163c6b,#163c6b);border:1px solid var(--omni-paint-line-3b679a,#3b679a);color:var(--omni-paint-ink-c1dfff,#c1dfff);padding:8px 12px;font-size:11px}.workbench-module .gc-history-dialog{background:linear-gradient(140deg,var(--omni-paint-surface-14294b,#14294b),var(--omni-paint-surface-0c1931,#0c1931));border-color:var(--omni-paint-line-3866a0,#3866a0);width:min(640px,100vw - 30px)}.workbench-module .gw .gc+.ta-board>.ta-heading,.workbench-module .gw .gc+.ta-board>.ta-inbox{display:none}.workbench-module .gw .gc-kpi strong small{letter-spacing:0}.workbench-module .gc-kpi.is-open{border-color:var(--omni-paint-line-5acfff,#5acfff);box-shadow:0 0 18px var(--omni-paint-shadow-397dd633,#397dd633)}.workbench-module .gc-kpi .gc-long-value{font-size:24px}.workbench-module .gb-detail{border:1px solid var(--omni-paint-line-3566a4,#3566a4);background:linear-gradient(130deg,var(--omni-paint-surface-13274a,#13274a),var(--omni-paint-surface-0d1b33,#0d1b33));color:var(--omni-paint-ink-a8bfdf,#a8bfdf);border-radius:8px;margin-bottom:18px;padding:22px}.workbench-module .gb-detail>header{background:0 0;border:0;justify-content:space-between;align-items:center;gap:16px;margin:0 0 18px;padding:0;display:flex}.workbench-module .gb-detail header small{color:var(--omni-paint-ink-6db9e8,#6db9e8);font-size:10px}.workbench-module .gb-detail h2{color:var(--omni-paint-ink-d8eaff,#d8eaff);margin-top:8px;font-size:18px}.workbench-module .gb-detail p{font-size:12px;line-height:1.9}.workbench-module .gb-detail button,.workbench-module .gb-detail a{background:var(--omni-paint-surface-173d6d,#173d6d);border:1px solid var(--omni-paint-line-386599,#386599);color:var(--omni-paint-ink-c0e3ff,#c0e3ff);border-radius:4px;justify-content:center;align-items:center;margin:5px 7px 5px 0;padding:8px 12px;font-size:11px;text-decoration:none;display:inline-flex}.workbench-module .gb-detail label{font-size:12px}.workbench-module .gb-detail select{background:var(--omni-paint-surface-0d2040,#0d2040);color:var(--omni-paint-ink-b8ceeb,#b8ceeb);border:1px solid var(--omni-paint-line-33567f,#33567f);padding:8px}.workbench-module .gb-table{max-height:340px;overflow:auto}.workbench-module .gb-table table{border-collapse:collapse;width:100%}.workbench-module .gb-table small{color:var(--omni-paint-ink-839fc3,#839fc3);font-size:10px;display:block}.workbench-module .gb-table .gb-wrap{white-space:normal;min-width:220px;max-width:370px;line-height:1.8}.workbench-module .gb-win{color:var(--omni-paint-ink-5de0c3,#5de0c3)}.workbench-module .gb-loss{color:var(--omni-paint-danger-f299ad,#f299ad)}.workbench-module .gb-next{border-left:2px solid var(--omni-paint-line-46b9ef,#46b9ef);background:var(--omni-paint-surface-14345255,#14345255);padding:13px 16px;color:var(--omni-paint-ink-bad9ee,#bad9ee)!important}.workbench-module .gb-gap{border:1px solid var(--omni-paint-line-756044,#756044);background:var(--omni-paint-surface-342c2844,#342c2844);color:var(--omni-paint-ink-e8c086,#e8c086);padding:15px;font-size:13px}.workbench-module .gb-costs{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0;display:grid}.workbench-module .gb-costs>div{background:var(--omni-paint-surface-0b1b34,#0b1b34);border:1px solid var(--omni-paint-line-29466e,#29466e);border-radius:5px;padding:12px}.workbench-module .gb-costs span{color:var(--omni-paint-ink-86a6cf,#86a6cf);margin-bottom:8px;font-size:10px;display:block}.workbench-module .gb-costs b{color:var(--omni-paint-ink-cae5ff,#cae5ff);overflow-wrap:anywhere;font:16px monospace}.workbench-module .gb-costs .gb-profit{border-color:var(--omni-paint-line-388980,#388980)}.workbench-module .gb-inc-summary{background:var(--omni-paint-surface-10264a,#10264a);border:1px solid var(--omni-paint-line-2a4878,#2a4878);border-radius:5px;align-items:center;gap:25px;margin:15px 0;padding:20px;display:flex}.workbench-module .gb-inc-summary b{color:var(--omni-paint-ink-7bd8ff,#7bd8ff);font:30px monospace}.workbench-module .gb-inc-summary small{color:var(--omni-paint-ink-7fa2c8,#7fa2c8);margin-top:9px;font:11px sans-serif;display:block}.workbench-module .ta-dialog .gb-costs{grid-template-columns:1fr 1fr}@media (width<=650px){.workbench-module .gb-detail{padding:16px}.workbench-module .gb-costs{grid-template-columns:1fr 1fr}.workbench-module .gb-inc-summary{gap:16px}.workbench-module .gb-inc-summary b,.workbench-module .gc-kpi strong{font-size:24px}}.workbench-module .gb-detail table button{white-space:nowrap}:root[data-omni-theme=light]{--omni-paint-surface-112749:#fff;--omni-paint-surface-0d1b32:#fff;--omni-paint-line-29466d:#dde1eb;--omni-paint-ink-83a6cf:#626e80;--omni-paint-ink-87b4de:#626e80;--omni-paint-ink-bfd4ed:#252831;--omni-paint-ink-7297c1:#626e80;--omni-paint-surface-11243c:#fff;--omni-paint-line-254364:#dde1eb;--omni-paint-ink-77b7bc:#626e80;--omni-paint-ink-f1be80:#626e80;--omni-paint-ink-799cc4:#626e80;--omni-paint-line-213856:#dde1eb;--omni-paint-ink-b7d1ef:#252831;--omni-paint-surface-233e67:#fff;--omni-paint-ink-9cbce2:#626e80;--omni-paint-surface-cfb660:#eef0ff;--omni-paint-ink-18284a:#252831;--omni-paint-ink-698dbb:#626e80;--omni-paint-surface-182d4e:#fff;--omni-paint-surface-6760f2:#eef0ff;--omni-paint-surface-39d5ec:#eef0ff;--omni-paint-ink-badbff:#252831;--omni-paint-ink-7da1cc:#626e80;--omni-paint-line-274267:#dde1eb;--omni-paint-surface-58dccc:#eef0ff;--omni-paint-surface-183c68:#fff;--omni-paint-line-315885:#dde1eb;--omni-paint-ink-afd7fa:#252831;--omni-paint-ink-76b5e2:#626e80;--omni-paint-surface-5966d4:#eef0ff;--omni-paint-ink-9fc3ef:#626e80;--omni-paint-ink-718fb7:#626e80;--omni-paint-line-233a61:#dde1eb;--omni-paint-ink-839bbd:#626e80;--omni-paint-ink-52d5fa:#626e80;--omni-paint-line-61dbff:#dde1eb;--omni-paint-line-29467a:#dde1eb;--omni-paint-ink-b6c9e8:#626e80;--omni-paint-surface-1c53ad66:#eef0ff66;--omni-paint-surface-122b51:#fff;--omni-paint-surface-0c1b36:#fff;--omni-paint-shadow-7abaff15:#00000005;--omni-paint-shadow-0002:#00000009;--omni-paint-surface-3d97ff:#eef0ff;--omni-paint-shadow-3dbaff:#0000001f;--omni-paint-ink-6e91c3:#626e80;--omni-paint-surface-173c73:#fff;--omni-paint-ink-4dccff:#626e80;--omni-paint-shadow-1d87ff22:#00000009;--omni-paint-ink-b99bff:#626e80;--omni-paint-surface-34295b:#fff;--omni-paint-ink-56e7db:#626e80;--omni-paint-surface-113f51:#fff;--omni-paint-ink-e1efff:#252831;--omni-paint-ink-839fca:#626e80;--omni-paint-ink-7f9ec5:#626e80;--omni-paint-line-548ad1:#dde1eb;--omni-paint-surface-173363:#fff;--omni-paint-surface-0e1d39:#fff;--omni-paint-surface-0a162d:#f5f6fa;--omni-paint-shadow-80aaff08:#00000002;--omni-paint-surface-4193f5:#eef0ff;--omni-paint-shadow-2e91ee77:#0000001e;--omni-paint-ink-d4e7ff:#252831;--omni-paint-surface-50c9ff:#eef0ff;--omni-paint-shadow-4cb8ff:#0000001f;--omni-paint-ink-47bff4:#626e80;--omni-paint-line-2c4775:#dde1eb;--omni-paint-surface-122b50:#fff;--omni-paint-ink-a4ceff:#252831;--omni-paint-surface-08152d:#f5f6fa;--omni-paint-line-243b63:#dde1eb;--omni-paint-ink-7799c4:#626e80;--omni-paint-surface-244d8c:#eef0ff;--omni-paint-ink-d5edff:#252831;--omni-paint-surface-0d2040:#fff;--omni-paint-line-2b4671:#dde1eb;--omni-paint-ink-9db9dc:#626e80;--omni-paint-ink-def5ff:#252831;--omni-paint-ink-8eb2d4:#626e80;--omni-paint-ink-9ab1d2:#626e80;--omni-paint-ink-6185ae:#626e80;--omni-paint-ink-7692bc:#626e80;--omni-paint-chart-203755:#e7eaf2;--omni-paint-chart-57edee:#4b5fff;--omni-paint-ink-738daf:#626e80;--omni-paint-ink-8da9cc:#626e80;--omni-paint-chart-e3f0ff:#4b5fff;--omni-paint-line-203352:#dde1eb;--omni-paint-ink-9db4d7:#626e80;--omni-paint-ink-dfebff:#252831;--omni-paint-ink-6f8fb8:#626e80;--omni-paint-ink-9eb5d8:#626e80;--omni-paint-surface-162947:#fff;--omni-paint-shadow-4b9eff33:#0000000d;--omni-paint-ink-c4dafa:#252831;--omni-paint-ink-87a6cd:#626e80;--omni-paint-ink-9fccff:#626e80;--omni-paint-ink-88a5ca:#626e80;--omni-paint-surface-1d8c94:#eef0ff;--omni-paint-line-31b3bc:#dde1eb;--omni-paint-surface-6352b1:#eef0ff;--omni-paint-line-8971df:#dde1eb;--omni-paint-surface-9a6433:#eef0ff;--omni-paint-line-d7a15d:#dde1eb;--omni-paint-surface-1c3156:#fff;--omni-paint-line-2b4771:#dde1eb;--omni-paint-surface-853d5b:#eef0ff;--omni-paint-line-b9698a:#dde1eb;--omni-paint-ink-b1c9e9:#626e80;--omni-paint-ink-6386b0:#626e80;--omni-paint-ink-adc8ed:#626e80;--omni-paint-ink-809dc3:#626e80;--omni-paint-line-1c3052:#dde1eb;--omni-paint-ink-9bb8dc:#626e80;--omni-paint-surface-203658:#fff;--omni-paint-line-69c5f7:#dde1eb;--omni-paint-surface-3885c3:#eef0ff;--omni-paint-surface-4b6fce:#eef0ff;--omni-paint-line-8eafff:#dde1eb;--omni-paint-surface-b75a83:#eef0ff;--omni-paint-line-eb92b4:#dde1eb;--omni-paint-line-bcecff:#dde1eb;--omni-paint-line-243655:#dde1eb;--omni-paint-ink-b1cae8:#626e80;--omni-paint-ink-edc897:#626e80;--omni-paint-ink-829bbf:#626e80;--omni-paint-ink-627fa8:#626e80;--omni-paint-ink-deb77c:#626e80;--omni-paint-surface-3c302d:#fff;--omni-paint-line-72563f:#dde1eb;--omni-paint-surface-3e302c:#fff;--omni-paint-line-815e3a:#dde1eb;--omni-paint-ink-e8b776:#626e80;--omni-paint-ink-5a85b9:#626e80;--omni-paint-ink-bdd9ff:#252831;--omni-paint-ink-7c9ac4:#626e80;--omni-paint-ink-d8eeff:#252831;--omni-paint-line-3566a0:#dde1eb;--omni-paint-line-294c77:#dde1eb;--omni-paint-surface-0c1b33:#fff;--omni-paint-ink-809bc3:#626e80;--omni-paint-ink-b9d8ff:#252831;--omni-paint-ink-69d1e4:#626e80;--omni-paint-ink-aac3e3:#626e80;--omni-paint-surface-163c6b:#fff;--omni-paint-line-3b679a:#dde1eb;--omni-paint-ink-c1dfff:#252831;--omni-paint-surface-14294b:#fff;--omni-paint-surface-0c1931:#f5f6fa;--omni-paint-line-3866a0:#dde1eb;--omni-paint-line-5acfff:#dde1eb;--omni-paint-shadow-397dd633:#0000000d;--omni-paint-line-3566a4:#dde1eb;--omni-paint-surface-13274a:#fff;--omni-paint-surface-0d1b33:#fff;--omni-paint-ink-a8bfdf:#626e80;--omni-paint-ink-6db9e8:#626e80;--omni-paint-ink-d8eaff:#252831;--omni-paint-surface-173d6d:#fff;--omni-paint-line-386599:#dde1eb;--omni-paint-ink-c0e3ff:#252831;--omni-paint-ink-b8ceeb:#252831;--omni-paint-line-33567f:#dde1eb;--omni-paint-ink-839fc3:#626e80;--omni-paint-ink-5de0c3:#626e80;--omni-paint-danger-f299ad:#b83a4a;--omni-paint-line-46b9ef:#dde1eb;--omni-paint-surface-14345255:#fff5;--omni-paint-ink-bad9ee:#252831;--omni-paint-line-756044:#dde1eb;--omni-paint-surface-342c2844:#fff4;--omni-paint-ink-e8c086:#626e80;--omni-paint-surface-0b1b34:#fff;--omni-paint-line-29466e:#dde1eb;--omni-paint-ink-86a6cf:#626e80;--omni-paint-ink-cae5ff:#252831;--omni-paint-line-388980:#dde1eb;--omni-paint-surface-10264a:#fff;--omni-paint-line-2a4878:#dde1eb;--omni-paint-ink-7bd8ff:#626e80;--omni-paint-ink-7fa2c8:#626e80}:root[data-omni-theme=dark]{--omni-paint-surface-112749:#102235;--omni-paint-surface-0d1b32:#102235;--omni-paint-line-29466d:#2c435b;--omni-paint-ink-83a6cf:#91a9bd;--omni-paint-ink-87b4de:#91a9bd;--omni-paint-ink-bfd4ed:#dceaf7;--omni-paint-ink-7297c1:#91a9bd;--omni-paint-surface-11243c:#102235;--omni-paint-line-254364:#2c435b;--omni-paint-ink-77b7bc:#91a9bd;--omni-paint-ink-f1be80:#91a9bd;--omni-paint-ink-799cc4:#91a9bd;--omni-paint-line-213856:#2c435b;--omni-paint-ink-b7d1ef:#dceaf7;--omni-paint-surface-233e67:#102235;--omni-paint-ink-9cbce2:#91a9bd;--omni-paint-surface-cfb660:#193954;--omni-paint-ink-18284a:#dceaf7;--omni-paint-ink-698dbb:#91a9bd;--omni-paint-surface-182d4e:#102235;--omni-paint-surface-6760f2:#193954;--omni-paint-surface-39d5ec:#193954;--omni-paint-ink-badbff:#dceaf7;--omni-paint-ink-7da1cc:#91a9bd;--omni-paint-line-274267:#2c435b;--omni-paint-surface-58dccc:#193954;--omni-paint-surface-183c68:#102235;--omni-paint-line-315885:#2c435b;--omni-paint-ink-afd7fa:#dceaf7;--omni-paint-ink-76b5e2:#91a9bd;--omni-paint-surface-5966d4:#193954;--omni-paint-ink-9fc3ef:#91a9bd;--omni-paint-ink-718fb7:#91a9bd;--omni-paint-line-233a61:#2c435b;--omni-paint-ink-839bbd:#91a9bd;--omni-paint-ink-52d5fa:#91a9bd;--omni-paint-line-61dbff:#2c435b;--omni-paint-line-29467a:#2c435b;--omni-paint-ink-b6c9e8:#91a9bd;--omni-paint-surface-1c53ad66:#19395466;--omni-paint-surface-122b51:#102235;--omni-paint-surface-0c1b36:#102235;--omni-paint-shadow-7abaff15:#00000005;--omni-paint-shadow-0002:#00000009;--omni-paint-surface-3d97ff:#193954;--omni-paint-shadow-3dbaff:#0000001f;--omni-paint-ink-6e91c3:#91a9bd;--omni-paint-surface-173c73:#102235;--omni-paint-ink-4dccff:#91a9bd;--omni-paint-shadow-1d87ff22:#00000009;--omni-paint-ink-b99bff:#91a9bd;--omni-paint-surface-34295b:#102235;--omni-paint-ink-56e7db:#91a9bd;--omni-paint-surface-113f51:#102235;--omni-paint-ink-e1efff:#dceaf7;--omni-paint-ink-839fca:#91a9bd;--omni-paint-ink-7f9ec5:#91a9bd;--omni-paint-line-548ad1:#2c435b;--omni-paint-surface-173363:#102235;--omni-paint-surface-0e1d39:#102235;--omni-paint-surface-0a162d:#0b1727;--omni-paint-shadow-80aaff08:#00000002;--omni-paint-surface-4193f5:#193954;--omni-paint-shadow-2e91ee77:#0000001e;--omni-paint-ink-d4e7ff:#dceaf7;--omni-paint-surface-50c9ff:#193954;--omni-paint-shadow-4cb8ff:#0000001f;--omni-paint-ink-47bff4:#91a9bd;--omni-paint-line-2c4775:#2c435b;--omni-paint-surface-122b50:#102235;--omni-paint-ink-a4ceff:#dceaf7;--omni-paint-surface-08152d:#0b1727;--omni-paint-line-243b63:#2c435b;--omni-paint-ink-7799c4:#91a9bd;--omni-paint-surface-244d8c:#193954;--omni-paint-ink-d5edff:#dceaf7;--omni-paint-surface-0d2040:#102235;--omni-paint-line-2b4671:#2c435b;--omni-paint-ink-9db9dc:#91a9bd;--omni-paint-ink-def5ff:#dceaf7;--omni-paint-ink-8eb2d4:#91a9bd;--omni-paint-ink-9ab1d2:#91a9bd;--omni-paint-ink-6185ae:#91a9bd;--omni-paint-ink-7692bc:#91a9bd;--omni-paint-chart-203755:#2c435b;--omni-paint-chart-57edee:#6fa7ff;--omni-paint-ink-738daf:#91a9bd;--omni-paint-ink-8da9cc:#91a9bd;--omni-paint-chart-e3f0ff:#6fa7ff;--omni-paint-line-203352:#2c435b;--omni-paint-ink-9db4d7:#91a9bd;--omni-paint-ink-dfebff:#dceaf7;--omni-paint-ink-6f8fb8:#91a9bd;--omni-paint-ink-9eb5d8:#91a9bd;--omni-paint-surface-162947:#102235;--omni-paint-shadow-4b9eff33:#0000000d;--omni-paint-ink-c4dafa:#dceaf7;--omni-paint-ink-87a6cd:#91a9bd;--omni-paint-ink-9fccff:#91a9bd;--omni-paint-ink-88a5ca:#91a9bd;--omni-paint-surface-1d8c94:#193954;--omni-paint-line-31b3bc:#2c435b;--omni-paint-surface-6352b1:#193954;--omni-paint-line-8971df:#2c435b;--omni-paint-surface-9a6433:#193954;--omni-paint-line-d7a15d:#2c435b;--omni-paint-surface-1c3156:#102235;--omni-paint-line-2b4771:#2c435b;--omni-paint-surface-853d5b:#193954;--omni-paint-line-b9698a:#2c435b;--omni-paint-ink-b1c9e9:#91a9bd;--omni-paint-ink-6386b0:#91a9bd;--omni-paint-ink-adc8ed:#91a9bd;--omni-paint-ink-809dc3:#91a9bd;--omni-paint-line-1c3052:#2c435b;--omni-paint-ink-9bb8dc:#91a9bd;--omni-paint-surface-203658:#102235;--omni-paint-line-69c5f7:#2c435b;--omni-paint-surface-3885c3:#193954;--omni-paint-surface-4b6fce:#193954;--omni-paint-line-8eafff:#2c435b;--omni-paint-surface-b75a83:#193954;--omni-paint-line-eb92b4:#2c435b;--omni-paint-line-bcecff:#2c435b;--omni-paint-line-243655:#2c435b;--omni-paint-ink-b1cae8:#91a9bd;--omni-paint-ink-edc897:#91a9bd;--omni-paint-ink-829bbf:#91a9bd;--omni-paint-ink-627fa8:#91a9bd;--omni-paint-ink-deb77c:#91a9bd;--omni-paint-surface-3c302d:#102235;--omni-paint-line-72563f:#2c435b;--omni-paint-surface-3e302c:#102235;--omni-paint-line-815e3a:#2c435b;--omni-paint-ink-e8b776:#91a9bd;--omni-paint-ink-5a85b9:#91a9bd;--omni-paint-ink-bdd9ff:#dceaf7;--omni-paint-ink-7c9ac4:#91a9bd;--omni-paint-ink-d8eeff:#dceaf7;--omni-paint-line-3566a0:#2c435b;--omni-paint-line-294c77:#2c435b;--omni-paint-surface-0c1b33:#102235;--omni-paint-ink-809bc3:#91a9bd;--omni-paint-ink-b9d8ff:#dceaf7;--omni-paint-ink-69d1e4:#91a9bd;--omni-paint-ink-aac3e3:#91a9bd;--omni-paint-surface-163c6b:#102235;--omni-paint-line-3b679a:#2c435b;--omni-paint-ink-c1dfff:#dceaf7;--omni-paint-surface-14294b:#102235;--omni-paint-surface-0c1931:#0b1727;--omni-paint-line-3866a0:#2c435b;--omni-paint-line-5acfff:#2c435b;--omni-paint-shadow-397dd633:#0000000d;--omni-paint-line-3566a4:#2c435b;--omni-paint-surface-13274a:#102235;--omni-paint-surface-0d1b33:#102235;--omni-paint-ink-a8bfdf:#91a9bd;--omni-paint-ink-6db9e8:#91a9bd;--omni-paint-ink-d8eaff:#dceaf7;--omni-paint-surface-173d6d:#102235;--omni-paint-line-386599:#2c435b;--omni-paint-ink-c0e3ff:#dceaf7;--omni-paint-ink-b8ceeb:#dceaf7;--omni-paint-line-33567f:#2c435b;--omni-paint-ink-839fc3:#91a9bd;--omni-paint-ink-5de0c3:#91a9bd;--omni-paint-danger-f299ad:#ff8996;--omni-paint-line-46b9ef:#2c435b;--omni-paint-surface-14345255:#10223555;--omni-paint-ink-bad9ee:#dceaf7;--omni-paint-line-756044:#2c435b;--omni-paint-surface-342c2844:#10223544;--omni-paint-ink-e8c086:#91a9bd;--omni-paint-surface-0b1b34:#102235;--omni-paint-line-29466e:#2c435b;--omni-paint-ink-86a6cf:#91a9bd;--omni-paint-ink-cae5ff:#dceaf7;--omni-paint-line-388980:#2c435b;--omni-paint-surface-10264a:#102235;--omni-paint-line-2a4878:#2c435b;--omni-paint-ink-7bd8ff:#91a9bd;--omni-paint-ink-7fa2c8:#91a9bd}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ShopLayoutPage-7lNMFD1W.js","./index-BBySSIJT.js","./index-7NKGenq7.css","./api-DP_rt0Zx.js","./use-favorites-ChTJGQkB.js","./workspace-view-state-CYNxOsyc.js","./public-DoBzMSlG.js","./use-favorites-_eKBQGeF.css","./format-jsGSJ1GL.js","./ProgressiveRows-DPZqhsXV.js","./CartesianChart-acGhtLrw.js","./LineChart-CyiCaQMM.js","./arrow-left-rfprDrQc.js","./clock-3-DpvJxor3.js","./chart-no-axes-combined-dFluBLOV.js","./check-DokC3Ug0.js","./link-2-B7GAWapc.js","./chevron-right-2HEa4oQb.js","./grid-2x2-BNdV1X54.js","./list-DrSHrHvT.js","./plus-C301wuGJ.js","./refresh-cw-BZ6-gKfF.js","./graphicalItemSelectors-GhHIivGe.js","./ShopLayoutPage-BlPpfB06.css","./Favorites-C3gPJxbl.js","./components-zDEQpnyp.js","./market.module-BXeOH_ee.js","./market-B2oImfqS.css","./chevron-down-CHQKhw_4.js","./package-C_xD77DO.js","./Opportunities-DDR6jMz5.js","./arrow-up-right-Bp3gzP7v.js","./Opportunities-CogyuZvI.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,t}from"./link-2-B7GAWapc.js";import{t as n}from"./chevron-right-2HEa4oQb.js";import{t as r}from"./grid-2x2-BNdV1X54.js";import{t as i}from"./list-DrSHrHvT.js";import{t as a}from"./package-C_xD77DO.js";import{n as o,r as s}from"./workspace-view-state-CYNxOsyc.js";import{_ as c,d as l,l as u,m as d,o as f,t as p}from"./index-BBySSIJT.js";import"./public-DoBzMSlG.js";import{t as m}from"./ProgressiveRows-DPZqhsXV.js";import{a as ee,c as h,i as te,l as g,n as ne,o as re,r as _,s as ie,t as ae}from"./components-zDEQpnyp.js";import{t as v}from"./api-DP_rt0Zx.js";import{a as oe,i as y,n as b,o as se,r as ce,t as le}from"./format-jsGSJ1GL.js";import{t as x}from"./market.module-BXeOH_ee.js";var ue=l(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),de=l(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),S=c(d(),1),C=f();function fe({query:e,month:t,available:n,children:r}){let i=(0,S.useRef)(null),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(null),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(0);return(0,S.useEffect)(()=>{if(!i.current||!n)return;let e=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(o(!0),e.disconnect())},{rootMargin:`180px`});return e.observe(i.current),()=>e.disconnect()},[n]),(0,S.useEffect)(()=>{if(!a||!n)return;let r=new AbortController;return v.query({...e,recentYear:!1,month:t,page:1,pageSize:100},r.signal).then(n=>{r.signal.aborted||(u(``),c({month:t,status:n.availability?.[e.view===`shops`?`shops`:`products`]||`ready`,rows:n.rows,total:n.total}))}).catch(e=>{r.signal.aborted||(c(null),u(e instanceof Error?e.message:`本月榜单读取失败`))}),()=>r.abort()},[n,a,e,t,d]),(0,C.jsxs)(`article`,{ref:i,children:[(0,C.jsxs)(`h2`,{children:[t.replace(`-`,`年`),`月`]}),n?l?(0,C.jsxs)(`div`,{role:`alert`,children:[l,(0,C.jsx)(`button`,{onClick:()=>f(e=>e+1),children:`重试本月`})]}):s?r(s):(0,C.jsx)(`div`,{style:{minHeight:260},children:a?(0,C.jsx)(`p`,{role:`status`,children:`正在读取本月榜单…`}):(0,C.jsx)(`button`,{onClick:()=>o(!0),children:`加载本月榜单`})}):(0,C.jsx)(`p`,{children:`暂无该月来源数据`})]})}var w=e=>g.find(t=>t[0]===e)?.[1],pe=(e,t)=>b(e[t],g.find(e=>e[0]===t)?.[2]);function T({view:o,selection:c,onConsumeSelection:l,onShopLayout:d}={}){let[f,p]=(0,S.useState)(null),[T,E]=(0,S.useState)(null),[D,O]=h(`query`,ie),[k,A]=(0,S.useState)(D.minPrice),[j,M]=(0,S.useState)(D.maxPrice),me=(0,S.useRef)(void 0),he=(0,S.useRef)(null),ge=(0,S.useRef)(null);(0,S.useEffect)(()=>{let e=ge.current;if(!e)return;let t=()=>he.current?.style.setProperty(`--market-controls-height`,`${e.getBoundingClientRect().height}px`),n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[]),(0,S.useEffect)(()=>{if(!f)return;let e=c===me.current?void 0:c;me.current=c,e?.month&&(A(``),M(``)),O(t=>{let n=e?.categoryId??t.categoryId,r=f.categories.some(e=>e.id===n&&e.leaf);return{...t,categoryId:n,...e?.month?{month:e.month,recentYear:!1,q:``,minPrice:``,maxPrice:``}:{},view:o===`categories`?r?`products`:`categories`:o||t.view,page:1}}),e&&l?.(e)},[o,c,f,O,l]);let[N,P]=(0,S.useState)(!0),[F,I]=(0,S.useState)(``),[_e,ve]=(0,S.useState)(0),[ye,L]=(0,S.useState)(``),[R,be]=h(`productFields`,ce),[xe,Se]=h(`shopFields`,oe),[Ce,z]=(0,S.useState)(!1),[we,Te]=h(`grid`,!1),[B,Ee]=(0,S.useState)([]),[De,Oe]=(0,S.useState)(null),[V,H]=(0,S.useState)(null),[U,ke]=(0,S.useState)(null),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)(``),[Pe,Fe]=(0,S.useState)([]),[Ie,Le]=(0,S.useState)([]),Re=(0,S.useRef)(null);function W(e){E(null),I(``),P(!0),O(t=>({...t,...e,page:e.page??1}))}function ze(e){let t=f?.categories.find(t=>t.id===e);A(``),M(``),W({categoryId:e,view:o&&o!==`categories`?D.view===`categories`?o:D.view:t?.leaf?`products`:`categories`,q:``,minPrice:``,maxPrice:``,sort:`sales`,direction:`desc`})}(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{if(await Promise.resolve(),!e.signal.aborted){P(!0),I(``),E(null),p(null);try{let t=await v.bootstrap(e.signal);if(e.signal.aborted)return;if(t.contractVersion!==1)throw Error(`市场查询契约版本不兼容`);p(t),Ee((t.favorites||[]).map(e=>`${e.kind}:${e.key}`)),O(e=>{let n=t.categories.some(t=>t.id===e.categoryId);return{...e,categoryId:n?e.categoryId:``,view:n||!e.categoryId?e.view:`categories`,month:t.months.includes(e.month)?e.month:t.latestCategoryMonth||t.latestMonth||``}})}catch(t){e.signal.aborted||I(t.message)}finally{e.signal.aborted||P(!1)}}})(),()=>e.abort()},[_e,O]),(0,S.useEffect)(()=>{if(!f||f.status!==`ready`||!D.month)return;let e=Re.current;Re.current=D;let t=e&&e.q!==D.q&&e.categoryId===D.categoryId&&e.view===D.view&&e.month===D.month?180:0,n=new AbortController,r=setTimeout(()=>{if(D.view!==`categories`&&!D.categoryId){P(!1),E(null);return}if(D.view!==`categories`&&D.recentYear){P(!1),E(null);return}P(!0),v.query(D,n.signal).then(e=>{n.signal.aborted||E(e)}).catch(e=>{n.signal.aborted||(E(null),I(e.message),e.status===403?(p(null),ve(e=>e+1)):e.status===401&&p(null))}).finally(()=>{n.signal.aborted||P(!1)})},t);return()=>{clearTimeout(r),n.abort()}},[D,f]),(0,S.useEffect)(()=>{if(!V)return;let e=new AbortController;return(async()=>{if(await Promise.resolve(),!e.signal.aborted){je(!0),Ne(``),Fe([]),Le([]),ke(V.kind===`record`||V.kind===`shopCategories`?V.record:null);try{if(V.kind===`record`){let t=await v.record(V.record.key,e.signal);e.signal.aborted||ke(t)}if(V.kind===`shopCategories`){let t=await v.shopCategories(V.record.key,e.signal);e.signal.aborted||Fe(t.rows)}if(V.kind===`distribution`){let t=await v.distribution(D,e.signal);e.signal.aborted||Fe(t.rows.map(e=>({name:e.label,sales:e.sales,products:e.products})))}if(V.kind===`categoryTrend`){let t=await v.query({...D,view:`categories`,categoryId:V.category.id},e.signal);e.signal.aborted||Le(t.trend)}}catch(t){e.signal.aborted||Ne(t.message)}finally{e.signal.aborted||je(!1)}}})(),()=>e.abort()},[V,D]);let Be=le(f?.categories||[],D.categoryId),Ve=Be.at(-1),G=D.view===`categories`,K=D.view===`products`,q=f?.months.indexOf(D.month)??-1,J=K?R:xe,Y=T?.rows||[],He=T?.categories||[],Ue=D.metric===`units`?`units`:`sales`,X=T?.availability?.[K?`products`:`shops`],Z=Math.max(1,Math.ceil((T?.total||0)/D.pageSize)),We=D.month?new Date(Date.UTC(Number(D.month.slice(0,4)),Number(D.month.slice(5,7)),0)).toISOString().slice(0,10):``;async function Ge(e,t){if(De)return;let n=`${e}:${t}`,r=!B.includes(n);Oe(n);try{await v.favorite(e,t,r),Ee(e=>r?[...e,n]:e.filter(e=>e!==n))}catch(e){L(e.message)}finally{Oe(null)}}function Q(e,t,n){return(0,C.jsx)(`button`,{className:x.iconButton,disabled:De!==null,"aria-label":`收藏${n}`,"aria-pressed":B.includes(`${e}:${t}`),onClick:()=>void Ge(e,t),children:(0,C.jsx)(de,{size:14,fill:B.includes(`${e}:${t}`)?`currentColor`:`none`})})}function Ke(e){return(0,C.jsxs)(`span`,{className:x.productId,children:[e.id||`编号缺失`,e.id&&(0,C.jsx)(_,{text:e.id,label:`复制商品编号${e.id}`,title:`复制商品 ID`})]})}function qe(e,n=!1){return(0,C.jsxs)(`div`,{className:x.identity,children:[y(e.imageUrl)?(0,C.jsx)(ee,{src:y(e.imageUrl),name:e.name||`商品图片`}):(0,C.jsx)(`span`,{className:x.noImage,children:(0,C.jsx)(a,{size:20})}),(0,C.jsxs)(`div`,{children:[(0,C.jsxs)(`div`,{className:x.productTitleRow,children:[y(e.url)?(0,C.jsx)(`a`,{className:x.productTitle,href:y(e.url),target:`_blank`,rel:`noreferrer`,children:e.name||`资料缺失`}):(0,C.jsx)(`button`,{className:x.productTitle,onClick:()=>H({kind:`record`,record:e}),children:e.name||`资料缺失`}),y(e.url)&&(0,C.jsx)(_,{text:y(e.url),label:`复制商品链接${e.name||e.id||``}`,title:`复制商品链接`,children:(0,C.jsx)(t,{size:13})})]}),!n&&(0,C.jsxs)(`small`,{children:[`商品ID:`,Ke(e)]})]})]})}function $(e,t=!1){let n=t?e.shopUrl:e.url,r=t?e.shopName:e.name;return y(n)?(0,C.jsx)(`a`,{href:y(n),target:`_blank`,rel:`noreferrer`,children:r||`资料缺失`}):(0,C.jsx)(`span`,{children:r||`资料缺失`})}function Je(e){return(0,C.jsx)(`th`,{children:(0,C.jsxs)(`button`,{onClick:()=>W({sort:e,direction:D.sort===e&&D.direction===`desc`?`asc`:`desc`}),children:[w(e),(0,C.jsx)(`span`,{className:D.sort===e?x.activeSort:x.sort,children:D.sort===e?D.direction===`desc`?`↓`:`↑`:`↕`})]})},e)}function Ye(e,t){return(0,C.jsxs)(`td`,{className:t===`sales`?x.sales:void 0,children:[pe(e,t),t===`conversionRate`&&e[t]!=null&&(e[t]<0||e[t]>100)&&(0,C.jsxs)(`span`,{className:x.anomaly,title:`来源转化率异常,保留原值`,children:[` `,`!`]})]},t)}function Xe(){if(k&&!/^\d{1,9}(\.\d{1,2})?$/.test(k)||j&&!/^\d{1,9}(\.\d{1,2})?$/.test(j)||k&&j&&Number(k)>Number(j)){L(`请填写有效的非负件单价区间`);return}L(``),W({minPrice:k,maxPrice:j})}return(0,C.jsxs)(`section`,{ref:he,className:x.page,"aria-label":`市场大盘`,children:[(0,C.jsxs)(`div`,{ref:ge,className:x.stickyHeader,children:[(0,C.jsxs)(`header`,{className:x.breadcrumb,"aria-label":`页面路径`,children:[(0,C.jsx)(`button`,{onClick:()=>W({view:`categories`,categoryId:``,q:``,recentYear:!1}),children:`全部类目`}),Be.map(e=>(0,C.jsxs)(`span`,{children:[(0,C.jsx)(n,{size:13}),(0,C.jsx)(`button`,{onClick:()=>ze(e.id),children:e.name})]},e.id)),!G&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(n,{size:13}),(0,C.jsx)(`span`,{"aria-current":`page`,children:K?`商品排行榜`:`店铺排行榜`})]})]}),(0,C.jsxs)(`section`,{className:x.filterBar,"aria-label":`市场查询条件`,children:[(0,C.jsxs)(`div`,{className:x.categoryControl,children:[(0,C.jsx)(ae,{categories:f?.categories||[],favoriteIds:B.filter(e=>e.startsWith(`category:`)).map(e=>e.slice(9)),value:D.categoryId,onChoose:ze,disabled:!f?.categories.length}),G&&(0,C.jsxs)(`span`,{className:x.count,children:[Ve?`子类目`:`类目`,` `,T?He.length:`—`,` `,`个`]}),G&&(0,C.jsxs)(`div`,{className:x.categoryLegend,"aria-label":`类目类型颜色说明`,children:[(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`i`,{"data-leaf":`false`}),`有下级`]}),(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`i`,{"data-leaf":`true`}),`叶子类目`]})]}),!G&&(0,C.jsx)(`nav`,{className:x.tabs,role:`tablist`,"aria-label":`排行榜`,children:[[`products`,`商品排行榜`],[`shops`,`店铺排行榜`]].map(([e,t])=>(0,C.jsx)(`button`,{role:`tab`,"aria-selected":D.view===e,onClick:()=>W({view:e,q:``,sort:`sales`,direction:`desc`,minPrice:``,maxPrice:``}),children:t},e))})]}),(0,C.jsxs)(`div`,{className:x.dateControl,children:[(0,C.jsxs)(`span`,{className:x.period,children:[`统计时间:`,T?.period?.start||(D.month?D.month+`-01`:`—`),` `,`至 `,T?.period?.end||We||`—`]}),(0,C.jsx)(`button`,{className:x.yearButton,"aria-pressed":D.recentYear,disabled:!f?.months.length,onClick:()=>W({recentYear:!D.recentYear,q:``,sort:`sales`,direction:`desc`}),children:`最近1年`}),(0,C.jsxs)(`select`,{"aria-label":`统计月份`,value:D.month,disabled:!f?.months.length,onChange:e=>W({month:e.target.value,recentYear:!1}),children:[!f?.months.length&&(0,C.jsx)(`option`,{children:`等待可用月份`}),f?.months.map(e=>(0,C.jsxs)(`option`,{value:e,children:[e.replace(`-`,`年`),`月`]},e))]}),(0,C.jsx)(`button`,{"aria-label":`上一个可用月份`,disabled:q<=0||N,onClick:()=>W({month:f.months[q-1]}),children:(0,C.jsx)(e,{size:15})}),(0,C.jsx)(`button`,{"aria-label":`下一个可用月份`,disabled:!f||q>=f.months.length-1||N,onClick:()=>W({month:f.months[q+1]}),children:(0,C.jsx)(n,{size:15})}),G&&(0,C.jsx)(`div`,{className:x.segment,children:[[`sales`,`销售额`],[`units`,`销量`],...Ve?[[`season`,`行业淡旺季`]]:[]].map(([e,t])=>(0,C.jsx)(`button`,{"aria-pressed":D.metric===e,onClick:()=>W({metric:e}),children:t},e))})]})]}),!G&&!F&&f?.status!==`no-access`&&!!D.categoryId&&(0,C.jsxs)(`div`,{className:x.toolbar,children:[(0,C.jsxs)(`label`,{className:x.search,children:[K&&!D.recentYear&&(0,C.jsx)(`span`,{children:`商品名称`}),(0,C.jsx)(s,{size:14}),(0,C.jsx)(`input`,{"aria-label":`搜索当前榜单`,placeholder:K?`请输入要搜索的商品名称或ID`:`请输入店铺名称`,value:D.q,onChange:e=>W({q:e.target.value})})]}),D.recentYear?(0,C.jsx)(`div`,{className:x.segment,children:[`sales`,`views`].map(e=>(0,C.jsx)(`button`,{"aria-pressed":D.sort===e,onClick:()=>W({sort:e}),children:w(e)},e))}):(0,C.jsxs)(C.Fragment,{children:[K?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`button`,{disabled:!f?.capabilities?.priceDistribution||X!==`ready`,onClick:()=>H({kind:`distribution`}),children:`客单价分布`}),(0,C.jsxs)(`div`,{className:x.price,children:[(0,C.jsx)(`span`,{children:`件单价:`}),(0,C.jsxs)(`label`,{children:[(0,C.jsx)(`input`,{type:`number`,min:`0`,"aria-label":`最低件单价`,value:k,onChange:e=>A(e.target.value)}),(0,C.jsx)(`span`,{children:`元`})]}),(0,C.jsx)(`span`,{children:`–`}),(0,C.jsxs)(`label`,{children:[(0,C.jsx)(`input`,{type:`number`,min:`0`,"aria-label":`最高件单价`,value:j,onChange:e=>M(e.target.value)}),(0,C.jsx)(`span`,{children:`元`})]}),(0,C.jsx)(`button`,{className:x.primary,onClick:Xe,children:`确定`}),(D.minPrice||D.maxPrice)&&(0,C.jsx)(`button`,{onClick:()=>{A(``),M(``),W({minPrice:``,maxPrice:``})},children:`重置`})]}),(0,C.jsxs)(`div`,{className:x.segment,children:[(0,C.jsxs)(`button`,{"aria-label":`大图视图`,"aria-pressed":we,onClick:()=>Te(!0),children:[(0,C.jsx)(r,{size:13}),`大图`]}),(0,C.jsxs)(`button`,{"aria-label":`列表视图`,"aria-pressed":!we,onClick:()=>Te(!1),children:[(0,C.jsx)(i,{size:13}),`列表`]})]})]}):(0,C.jsx)(`button`,{disabled:!0,title:`来源数据未提供地域字段`,children:`地域分布`}),(0,C.jsx)(`button`,{className:x.configButton,onClick:()=>z(!0),children:`表格配置`})]})]})]}),ye&&(0,C.jsxs)(`div`,{className:x.message,role:`status`,children:[ye,(0,C.jsx)(`button`,{"aria-label":`关闭提示`,onClick:()=>L(``),children:`×`})]}),F?(0,C.jsxs)(`section`,{className:x.emptyState,role:`alert`,children:[(0,C.jsx)(u,{size:32}),(0,C.jsx)(`h2`,{children:F}),(0,C.jsx)(`button`,{onClick:()=>ve(e=>e+1),children:`重新连接`})]}):f?.status===`no-access`?(0,C.jsxs)(`section`,{className:x.emptyState,children:[(0,C.jsx)(`h2`,{children:`企业尚未获得市场类目授权`}),(0,C.jsx)(`p`,{children:`企业子账号继承企业的市场类目范围。`})]}):!G&&!D.categoryId?(0,C.jsxs)(`section`,{className:x.emptyState,children:[(0,C.jsxs)(`h2`,{children:[`选择类目查看`,K?`商品`:`店铺`,`排行榜`]}),(0,C.jsx)(`p`,{children:`使用上方类目选择器,选择你要研究的具体类目。`})]}):(0,C.jsxs)(C.Fragment,{children:[N?(0,C.jsx)(`div`,{className:x.empty,role:`status`,children:`正在读取市场数据…`}):G?D.metric===`season`?(0,C.jsxs)(`section`,{className:x.seasonBoard,children:[(0,C.jsxs)(`table`,{children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{children:`行业类目`}),(T?.period?.availableMonths||[]).map(e=>(0,C.jsx)(`th`,{children:e},e))]})}),(0,C.jsx)(`tbody`,{children:(0,C.jsx)(m,{items:T?.season||[],columns:1+(T?.period?.availableMonths.length||0),children:e=>(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`td`,{children:e.name}),e.months.map(e=>(0,C.jsx)(`td`,{children:(0,C.jsx)(`span`,{className:e.state===`旺季`?x.hot:e.state===`淡季`?x.cold:x.neutral,children:e.state||`资料缺失`})},e.month))]},e.categoryId)})})]}),!T?.season.length&&(0,C.jsx)(`p`,{className:x.empty,children:`淡旺季判定口径尚未配置,当前月份数据保持原值。`})]}):(0,C.jsxs)(`section`,{className:x.categoryList,"aria-label":`类目列表`,children:[(0,C.jsx)(`div`,{className:x.categoryHeaders,children:[0,1,2].map(e=>(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`span`,{children:`类目名称`}),(0,C.jsx)(`span`,{children:D.metric===`units`?`销量`:`销售额`}),(0,C.jsx)(`span`,{children:D.metric===`units`?`销量同比`:`销售额同比`}),(0,C.jsx)(`span`,{children:`店铺数`}),(0,C.jsx)(`span`,{})]},e))}),(0,C.jsx)(`div`,{className:x.categoryRows,children:(0,C.jsx)(m,{items:He,children:e=>(0,C.jsxs)(`article`,{className:x.categoryRow,"data-leaf":e.leaf,children:[(0,C.jsx)(`button`,{className:x.categoryOpen,"aria-label":e.leaf?`查看${e.name}排行榜`:`进入${e.name}子类目`,onClick:()=>ze(e.id)}),(0,C.jsxs)(`div`,{className:x.categoryName,children:[(0,C.jsxs)(`span`,{title:e.name,children:[e.name,!e.leaf&&(0,C.jsx)(n,{size:12})]}),e.leaf&&(0,C.jsx)(`div`,{className:x.rowActions,children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`button`,{onClick:()=>W({categoryId:e.id,view:`products`,q:``}),children:`排行榜`}),(0,C.jsx)(`button`,{onClick:()=>H({kind:`categoryTrend`,category:e}),children:`趋势`})]})})]}),(0,C.jsx)(`strong`,{children:b(e[Ue],Ue===`sales`?`compact`:`number`)}),(0,C.jsx)(`span`,{children:b(D.metric===`units`?e.unitsYoy:e.salesYoy,`percent`)}),(0,C.jsx)(`span`,{children:b(e.shopCount)}),Q(`category`,e.id,e.name)]},e.id)})}),!He.length&&(0,C.jsx)(`p`,{className:x.empty,children:`当前类目已到最细层级,请选择商品或店铺排行榜。`})]}):D.recentYear?(0,C.jsx)(`section`,{className:x.yearBoards,"aria-label":`最近一年月度榜单`,children:se(D.month).map(e=>(0,C.jsx)(fe,{query:D,month:e,available:f?.months.includes(e)??!1,children:e=>(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`table`,{children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{children:`排名`}),(0,C.jsx)(`th`,{children:K?`商品`:`店铺`}),(0,C.jsx)(`th`,{children:D.sort===`views`?`浏览量`:`销售额`})]})}),(0,C.jsx)(`tbody`,{children:(0,C.jsx)(m,{items:e.rows,columns:3,children:e=>(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`td`,{children:e.sourceRank??`—`}),(0,C.jsxs)(`td`,{children:[K?qe(e):$(e),K&&(0,C.jsx)(`small`,{children:e.shopName||`店铺资料缺失`})]}),(0,C.jsx)(`td`,{children:b(e[D.sort===`views`?`views`:`sales`],D.sort===`views`?`number`:`compact`)})]},e.key)})})]}),!e.rows.length&&(0,C.jsx)(`p`,{className:x.empty,children:e.status===`pending`?`正在导入`:e.status===`missing`?`暂无该月来源数据`:`暂无匹配数据`})]})},JSON.stringify(D)+e))}):K&&we?(0,C.jsxs)(`section`,{className:x.productGrid,children:[(0,C.jsx)(m,{items:Y||[],children:e=>(0,C.jsxs)(`article`,{tabIndex:0,"aria-label":e.name||`商品卡片`,children:[(0,C.jsxs)(`div`,{className:x.largeImage,children:[y(e.imageUrl)?(0,C.jsx)(ee,{src:y(e.imageUrl),name:e.name||`商品图片`,hoverPreview:!1}):(0,C.jsx)(a,{size:44}),(0,C.jsxs)(`span`,{children:[`排名 `,e.sourceRank??`—`]}),Q(`product`,e.key,e.name||`商品`)]}),(0,C.jsxs)(`div`,{className:x.gridDetails,children:[qe(e),(0,C.jsxs)(`p`,{children:[`店铺:`,$(e,!0)]}),(0,C.jsx)(`dl`,{children:R.map(t=>(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`dt`,{children:w(t)}),(0,C.jsx)(`dd`,{children:pe(e,t)})]},t))}),(0,C.jsx)(`button`,{onClick:()=>H({kind:`record`,record:e}),children:`查看销售走势`})]})]},e.key)}),!Y.length&&(0,C.jsx)(`p`,{className:x.empty,children:X===`pending`?`当前类目榜单正在导入`:`暂无匹配商品`})]}):(0,C.jsxs)(`section`,{className:x.tableScroll,"aria-label":K?`商品排行榜`:`店铺排行榜`,children:[(0,C.jsxs)(`table`,{className:K?x.productTable:x.shopTable,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{children:`排名`}),K?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`th`,{children:`商品`}),(0,C.jsx)(`th`,{children:`商品ID`}),R[0]===`listingDays`&&Je(`listingDays`),(0,C.jsx)(`th`,{children:`收藏商品`}),(0,C.jsx)(`th`,{children:`店铺`}),(0,C.jsx)(`th`,{children:`销售走势`}),(0,C.jsx)(`th`,{children:`利润测算`})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`th`,{children:`店铺ID`}),(0,C.jsx)(`th`,{children:`店铺名称`}),(0,C.jsx)(`th`,{children:`店铺收藏`}),(0,C.jsx)(`th`,{children:`销售走势`}),(0,C.jsx)(`th`,{children:`品类分析`})]}),J.filter(e=>!K||R[0]!==`listingDays`||e!==`listingDays`).map(Je)]})}),(0,C.jsx)(`tbody`,{children:(0,C.jsx)(m,{items:Y,columns:K?J.length+7:J.length+6,children:e=>(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`td`,{children:e.sourceRank??`—`}),K?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`td`,{children:qe(e,!0)}),(0,C.jsx)(`td`,{children:Ke(e)}),R[0]===`listingDays`&&Ye(e,`listingDays`),(0,C.jsx)(`td`,{children:Q(`product`,e.key,e.name||`商品`)}),(0,C.jsx)(`td`,{className:x.shopName,children:$(e,!0)}),(0,C.jsx)(`td`,{children:(0,C.jsx)(`button`,{className:x.linkButton,onClick:()=>H({kind:`record`,record:e}),children:`查看`})}),(0,C.jsx)(`td`,{children:(0,C.jsx)(`button`,{className:x.linkButton,disabled:!0,title:`需要成本与费用口径,当前未配置`,children:`测算`})})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`td`,{children:(0,C.jsxs)(`span`,{className:x.shopId,children:[e.id||`编号缺失`,e.id&&(0,C.jsx)(_,{text:e.id,label:`复制店铺编号${e.id}`,title:`复制店铺 ID`})]})}),(0,C.jsx)(`td`,{className:x.shopName,children:$(e)}),(0,C.jsx)(`td`,{children:Q(`shop`,e.key,e.name||`店铺`)}),(0,C.jsx)(`td`,{children:(0,C.jsx)(`button`,{className:x.linkButton,onClick:()=>H({kind:`record`,record:e}),children:`查看`})}),(0,C.jsxs)(`td`,{children:[(0,C.jsx)(`button`,{className:x.linkButton,disabled:!e.id,title:e.id?`仅分析获准类目`:`缺少可追踪店铺编号`,onClick:()=>H({kind:`shopCategories`,record:e}),children:`分析`}),d&&e.id&&(0,C.jsx)(`button`,{className:x.linkButton,onClick:()=>d({id:e.id,name:e.name||e.id},D.month),children:`归档布局`})]})]}),J.filter(e=>!K||R[0]!==`listingDays`||e!==`listingDays`).map(t=>Ye(e,t))]},e.key)})})]}),!Y.length&&(0,C.jsx)(`p`,{className:x.empty,children:X===`pending`?`当前月份此类目榜单正在导入`:X===`missing`?`该类目暂无本月榜单,请选择其他月份或继续下钻`:`暂无匹配记录`})]}),!G&&!D.recentYear&&(0,C.jsxs)(`footer`,{className:x.pagination,children:[(0,C.jsxs)(`span`,{children:[`共 `,b(T?.total),` 条 · 保留来源排名`]}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`button`,{"aria-label":`上一页`,disabled:D.page<=1||N,onClick:()=>W({page:D.page-1}),children:(0,C.jsx)(e,{size:14})}),Array.from(new Set([1,...Array.from({length:5},(e,t)=>D.page-2+t).filter(e=>e>1&&e<Z),Z])).map((e,t,n)=>(0,C.jsxs)(`span`,{children:[t>0&&e-n[t-1]>1&&(0,C.jsx)(`span`,{className:x.ellipsis,children:`…`}),(0,C.jsx)(`button`,{"aria-current":D.page===e?`page`:void 0,onClick:()=>W({page:e}),children:e})]},e)),(0,C.jsx)(`button`,{"aria-label":`下一页`,disabled:D.page>=Z||N,onClick:()=>W({page:D.page+1}),children:(0,C.jsx)(n,{size:14})}),(0,C.jsx)(`select`,{"aria-label":`每页条数`,value:D.pageSize,onChange:e=>W({pageSize:Number(e.target.value)}),children:[25,50,100].map(e=>(0,C.jsxs)(`option`,{value:e,children:[e,` 条/页`]},e))}),(0,C.jsxs)(`label`,{children:[`跳至`,(0,C.jsx)(`input`,{"aria-label":`跳转页码`,type:`number`,min:`1`,max:Z,defaultValue:D.page,onKeyDown:e=>{if(e.key===`Enter`){let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=1&&t<=Z&&W({page:t})}}},D.page)]})]})]}),T?.notice&&(0,C.jsx)(`p`,{className:x.notice,children:T.notice})]}),(0,C.jsxs)(`details`,{className:x.sources,children:[(0,C.jsxs)(`summary`,{children:[(0,C.jsx)(ue,{size:13}),`数据来源与口径`]}),(0,C.jsxs)(`p`,{children:[T?.provenance.source||f?.sourceLabel||`共享市场数据库`,` ·`,` `,T?.provenance.updatedAt||`等待服务连接`]}),(0,C.jsx)(`p`,{children:T?.provenance.definition||`空值与零分别保留,按企业一级类目授权查询。`}),(0,C.jsx)(`p`,{children:`历史店铺缺少编号时仍保留榜单记录;缺少名称显示资料缺失,缺少有效链接时显示普通文本。收藏保存在当前账号下。`})]}),Ce&&(0,C.jsx)(ne,{columns:J,allowed:K?ce:oe,onClose:()=>z(!1),onSave:e=>{K?be(e):Se(e),z(!1)}}),V&&(0,C.jsx)(te,{title:V.kind===`distribution`?`件单价分布`:V.kind===`categoryTrend`?V.category.name:V.kind===`shopCategories`?`${V.record.name||`店铺`} · 品类分析`:V.record.name||`资料缺失`,onClose:()=>H(null),children:Me?(0,C.jsx)(`p`,{className:x.notice,role:`alert`,children:Me}):Ae?(0,C.jsx)(`p`,{className:x.empty,children:`正在读取数据…`}):V.kind===`record`&&U?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`p`,{className:x.detailScope,children:[D.month,` · 原榜排名 `,U.sourceRank??`—`,` ·`,` `,U.id||`编号缺失`]}),(0,C.jsx)(re,{points:U.trend}),(0,C.jsx)(`dl`,{className:x.detailMetrics,children:g.map(([e,t,n])=>(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`dt`,{children:t}),(0,C.jsx)(`dd`,{children:b(U[e],n)})]},e))}),U.warnings?.map(e=>(0,C.jsx)(`p`,{className:x.notice,children:e},e)),(0,C.jsxs)(`p`,{className:x.detailScope,children:[`来源:`,U.source.file,` · 第 `,U.source.row,` 行`]})]}):V.kind===`categoryTrend`?(0,C.jsx)(re,{points:Ie,metric:D.metric===`units`?`units`:`sales`}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`p`,{className:x.detailScope,children:V.kind===`distribution`?`按当前已入库商品榜单统计,非全市场商品分布`:`仅展示获准类目的店铺指标,各层级分别列示。`}),(0,C.jsxs)(`table`,{children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{children:V.kind===`distribution`?`件单价区间`:`类目`}),V.kind===`distribution`&&(0,C.jsx)(`th`,{children:`商品数`}),(0,C.jsx)(`th`,{children:`销售额`})]})}),(0,C.jsx)(`tbody`,{children:(0,C.jsx)(m,{items:Pe,columns:V.kind===`distribution`?3:2,children:e=>(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`td`,{children:e.name}),V.kind===`distribution`&&(0,C.jsx)(`td`,{children:b(e.products)}),(0,C.jsx)(`td`,{children:b(e.sales,`money`)})]},e.name)})})]}),!Pe.length&&(0,C.jsx)(`p`,{className:x.empty,children:`当前范围暂无可用数据`})]})})]})}var E=(0,S.lazy)(()=>p(()=>import(`./ShopLayoutPage-7lNMFD1W.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]),import.meta.url)),D=(0,S.lazy)(()=>p(()=>import(`./Favorites-C3gPJxbl.js`),__vite__mapDeps([24,1,2,3,4,5,6,7,25,8,26,27,28,17,9,29]),import.meta.url)),O=(0,S.lazy)(()=>p(()=>import(`./Opportunities-DDR6jMz5.js`),__vite__mapDeps([30,1,2,3,25,8,26,27,28,17,5,6,12,31,21,32]),import.meta.url));function k({section:e,onSection:t}){let[n,r]=o(`market.analysisLaunch`,null),[i,a]=(0,S.useState)(),s=(0,S.useCallback)(e=>{a(t=>t===e?void 0:t)},[]);return e===`shop-layout`?(0,C.jsx)(S.Suspense,{fallback:(0,C.jsx)(`p`,{role:`status`,children:`正在加载店铺品类布局…`}),children:(0,C.jsx)(E,{launch:n,onConsumeLaunch:()=>r(null)})}):e===`opportunities`?(0,C.jsx)(S.Suspense,{fallback:(0,C.jsx)(`p`,{role:`status`,children:`正在加载机会发现…`}),children:(0,C.jsx)(O,{onOpenCategory:(e,n)=>{a({categoryId:e,month:n,view:`products`}),t(`products`)}})}):e===`favorites`?(0,C.jsx)(S.Suspense,{fallback:(0,C.jsx)(`p`,{role:`status`,children:`正在加载我的收藏…`}),children:(0,C.jsx)(D,{})}):(0,C.jsx)(T,{selection:i,onConsumeSelection:s,onShopLayout:(e,n)=>{r({id:crypto.randomUUID(),shop:e,month:n}),t(`shop-layout`)},view:[`categories`,`products`,`shops`].find(t=>t===e)||`categories`})}export{k as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./arrow-left-rfprDrQc.js";import{n as t}from"./clock-3-DpvJxor3.js";import{t as n}from"./arrow-up-right-Bp3gzP7v.js";import{t as r}from"./chart-no-axes-combined-dFluBLOV.js";import{t as i}from"./check-DokC3Ug0.js";import{t as a}from"./chevron-right-2HEa4oQb.js";import{n as o,t as s}from"./ui-public-CX7L8QF_.js";import{r as c}from"./CollaborationWorkspace-DAWo2Vol.js";import{a as l,n as u,o as d,r as f}from"./products-CfPFkCnk.js";import{t as p}from"./layers-BY0DtVnH.js";import{t as m}from"./refresh-cw-BZ6-gKfF.js";import{n as h,r as g}from"./workspace-view-state-CYNxOsyc.js";import{_,d as v,m as y,o as b,s as x}from"./index-BBySSIJT.js";import{n as S}from"./module-host-BHOsDk69.js";import"./public-DoBzMSlG.js";import{n as C,t as w}from"./activity-idEO2qnr.js";import{t as T}from"./group--adLvfC6.js";var E=v(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),D=v(`coins`,[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]),O=v(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),k=v(`orbit`,[[`path`,{d:`M20.341 6.484A10 10 0 0 1 10.266 21.85`,key:`1enhxb`}],[`path`,{d:`M3.659 17.516A10 10 0 0 1 13.74 2.152`,key:`1crzgf`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`circle`,{cx:`19`,cy:`5`,r:`2`,key:`mhkx31`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}]]),A=v(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),j=v(`scan-line`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}]]),M=_(y(),1),N={activity:`_activity_k9yph_1`,panel:`_panel_k9yph_1`},P=b();function F({mode:e,api:n,onOpen:r}){let[i,a]=(0,M.useState)([]),[o,s]=(0,M.useState)(!0),[c,l]=(0,M.useState)(``),[u,d]=(0,M.useState)(0),[f,p]=h(`workbench.`+e+`.search`,``);(0,M.useEffect)(()=>{let e=!0;return n(`/command-center`).then(t=>{let n=t?.projects;if(!Array.isArray(n))throw Error(`项目状态返回格式异常`);e&&(a(n.filter(e=>!e.simulated)),l(``))}).catch(t=>{e&&(a([]),l(t instanceof Error?t.message:`项目状态读取失败`))}).finally(()=>{e&&s(!1)}),()=>{e=!1}},[n,u]);let m=w(i),_=C(i),v=e=>e.toLowerCase().includes(f.trim().toLowerCase());return(0,P.jsxs)(`section`,{className:N.activity,children:[(0,P.jsxs)(`header`,{children:[(0,P.jsx)(`h1`,{children:e===`tasks`?`待处理事项`:`执行记录`}),(0,P.jsxs)(`label`,{children:[(0,P.jsx)(g,{size:16}),(0,P.jsx)(`input`,{"aria-label":`搜索工作台事项与记录`,value:f,onChange:e=>p(e.target.value),placeholder:`搜索项目或事项`})]})]}),c&&(0,P.jsxs)(`p`,{role:`alert`,children:[c,` `,(0,P.jsx)(`button`,{onClick:()=>{s(!0),d(e=>e+1)},children:`重试`})]}),o?(0,P.jsx)(`p`,{role:`status`,children:`正在读取项目状态…`}):(0,P.jsx)(`div`,{className:N.panel,children:e===`tasks`?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`h2`,{children:[`需要你处理 · `,m.length,` 项`]}),m.filter(({project:e,step:t})=>v(e.name+t.name)).slice(0,30).map(({project:e,step:n})=>(0,P.jsxs)(`button`,{onClick:()=>r(e.id,n.target),children:[(0,P.jsxs)(`span`,{children:[(0,P.jsxs)(`b`,{children:[n.name,` · `,n.state===`attention`?`待复核`:`待确认`]}),(0,P.jsxs)(`small`,{children:[e.name,` · `,n.description]})]}),(0,P.jsx)(t,{size:16})]},e.id+n.id)),!m.length&&(0,P.jsx)(`p`,{children:c?`连接恢复后显示待处理事项。`:`当前没有待复核或待确认的阶段。`})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`h2`,{children:`项目执行与确认记录`}),_.filter(({project:e,event:t})=>v(e.name+t.name)).slice(0,50).map(({project:e,event:n},i)=>(0,P.jsxs)(`button`,{onClick:()=>r(e.id,{tab:`wiki`}),children:[(0,P.jsxs)(`span`,{children:[(0,P.jsxs)(`b`,{children:[n.name,` · `,n.state]}),(0,P.jsxs)(`small`,{children:[e.name,` · `,new Date(n.at).toLocaleString(`zh-CN`)]})]}),(0,P.jsx)(t,{size:16})]},e.id+n.at+i)),!_.length&&(0,P.jsx)(`p`,{children:c?`连接恢复后显示执行记录。`:`当前没有执行记录。`})]})})]})}async function I(e){let[t,n]=await Promise.all([e(`/growth-center`),e(`/command-center`)]),r=t,i=n.projects;if(!Array.isArray(r?.products)||!Array.isArray(r?.catalog)||!Array.isArray(i))throw Error(`经营资料返回格式异常`);return{growth:r,projects:i}}var L={refunds:`同期支付订单的退款`,product:`货品成本`,fulfillment:`运费与履约`,platform:`平台费用`,ads:`广告花费`,tax:`税费`,other:`其他变动费用`,fixed:`固定费用分摊`};function R(e){try{let t=JSON.parse(e||`{}`);return t.version!==1||!t.orders||typeof t.orders!=`object`||Array.isArray(t.orders)?{}:Object.fromEntries(Object.entries(t.orders).slice(0,20).filter(([e,t])=>e.length<100&&Array.isArray(t)).map(([e,t])=>[e,[...new Set(t.filter(e=>typeof e==`string`&&e.length<200))].slice(0,2500)]))}catch{return{}}}function z(e,t){let n=new Set(t);return[...(e||[]).filter(e=>n.delete(e)),...t.filter(e=>n.delete(e))]}function ee(e,t,n,r){let i=[...new Set([...e||[],...t])];if(!t.includes(n)||!t.includes(r)||n===r)return i;let a=i.indexOf(n),o=i.indexOf(r);return i.splice(a,1),i.splice(o,0,n),i}var B=(0,M.createContext)(null);function V({scope:e,onDirty:t,children:n}){let r=e?`omni.dashboard-layout.v1:`+encodeURIComponent(e):null,[i]=(0,M.useState)(()=>{try{return r?R(localStorage.getItem(r)):{}}catch{return{}}}),[a,o]=h(`dashboard.layout.`+(e||`session`),i),[s,c]=(0,M.useState)(a),[l,u]=(0,M.useState)(!1),[d,f]=(0,M.useState)(``),[p,m]=(0,M.useState)(null),g=l&&JSON.stringify(s)!==JSON.stringify(a);(0,M.useEffect)(()=>(t?.(g),()=>t?.(!1)),[g,t]);let _=()=>{u(!1),m(null)};function v(){try{r&&localStorage.setItem(r,JSON.stringify({version:1,orders:s})),o(s),_(),f(r?`布局已保存到当前账号的此台设备。`:`布局已保存,本次会话内有效。`)}catch{f(`布局保存失败,请检查本机存储后重试;当前调整仍保留。`)}}let y={editing:l,orders:s,drag:p,setDrag:m,scope:e,message:d,begin:()=>{c(a),u(!0),f(`拖动卡片左上角,或用前移、后移按钮调整顺序。`)},save:v,cancel:()=>{c(a),_(),f(`已取消本次布局修改。`)},reset:e=>{c(t=>Object.fromEntries(Object.entries(t).filter(([t])=>!e.includes(t)))),f(`当前页已恢复默认排列,点击保存后生效。`)},move:(e,t,n,r)=>{c(i=>({...i,[e]:ee(i[e],t,n,r)})),f(`顺序已调整,保存后记住布局。`)}};return(0,P.jsx)(B.Provider,{value:y,children:(0,P.jsx)(`div`,{className:l?`dashboard-editing`:``,onClickCapture:e=>{l&&!e.target.closest(`[data-layout-control]`)&&(e.preventDefault(),e.stopPropagation())},children:n})})}function te({enabled:e=!0,groups:t=[]}){let n=(0,M.useContext)(B);return!n||!e&&!n.editing?null:(0,P.jsxs)(`div`,{className:`dl-toolbar`,"data-layout-control":!0,children:[(0,P.jsx)(`div`,{className:`dl-toolbar-actions`,children:n.editing?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`span`,{children:`调整卡片顺序`}),(0,P.jsxs)(`button`,{onClick:()=>n.reset(t),children:[(0,P.jsx)(A,{size:13}),`恢复默认`]}),(0,P.jsxs)(`button`,{onClick:n.cancel,children:[(0,P.jsx)(x,{size:13}),`取消`]}),(0,P.jsxs)(`button`,{className:`dl-save`,onClick:n.save,children:[(0,P.jsx)(i,{size:14}),`保存布局`]})]}):(0,P.jsxs)(`button`,{onClick:n.begin,children:[(0,P.jsx)(c,{size:14}),`编辑页面`]})}),n.message&&(0,P.jsx)(`small`,{role:`status`,children:n.message})]})}function ne({group:n,className:r=``,children:i}){let a=(0,M.useContext)(B),o=M.Children.toArray(i).filter(M.isValidElement).map((e,t)=>({id:String(e.key??t).replace(/^\.\$/,``),el:e})),s=o.map(e=>e.id),c=z(a?.orders[n],s);return(0,P.jsx)(`div`,{className:r,children:c.map((r,i)=>{let l=o.find(e=>e.id===r).el,u=l.props[`data-layout-label`]||`卡片`;return(0,M.cloneElement)(l,{key:r,"data-layout-card":r,"data-layout-group":n,className:[l.props.className,`dl-card`,a?.editing?`dl-editable`:``,a?.drag?.group===n&&a.drag.id===r?`dl-dragging`:``].filter(Boolean).join(` `),onDragOver:e=>{a?.editing&&a.drag?.group===n&&(e.preventDefault(),e.dataTransfer.dropEffect=`move`)},onDrop:e=>{a?.editing&&a.drag?.group===n&&(e.preventDefault(),e.stopPropagation(),a.move(n,s,a.drag.id,r),a.setDrag(null))}},a?.editing?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`dl-card-controls`,"data-layout-control":!0,children:[(0,P.jsxs)(`button`,{className:`dl-grip`,"aria-label":`拖动`+u,title:`拖动调整顺序`,onPointerDown:e=>{e.button===0&&(e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),a.setDrag({group:n,id:r}))},onPointerUp:e=>{if(!e.currentTarget.hasPointerCapture(e.pointerId))return;e.currentTarget.releasePointerCapture(e.pointerId);let t=document.elementFromPoint(e.clientX,e.clientY)?.closest(`[data-layout-group]`);for(;t&&t.dataset.layoutGroup!==n;)t=t.parentElement?.closest(`[data-layout-group]`);let i=t?.dataset.layoutCard;i&&i!==r&&a.move(n,s,r,i),a.setDrag(null)},onPointerCancel:()=>a.setDrag(null),children:[(0,P.jsx)(O,{size:14}),(0,P.jsx)(`span`,{children:u})]}),(0,P.jsx)(`button`,{disabled:i===0,"aria-label":`前移`+u,title:`前移`,onClick:()=>a.move(n,s,r,c[i-1]),children:(0,P.jsx)(e,{size:13})}),(0,P.jsx)(`button`,{disabled:i===c.length-1,"aria-label":`后移`+u,title:`后移`,onClick:()=>a.move(n,s,r,c[i+1]),children:(0,P.jsx)(t,{size:13})})]}),l.props.children]}):l.props.children)})})}var H=e=>typeof e==`number`?e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}):`—`;function re({metrics:e,products:t,projects:i,ready:a,onOpen:o,onNav:s,onAssign:c,demo:l}){let[u,d]=(0,M.useState)(``),[f,m]=(0,M.useState)(``),h=e?.sales||[],g=h.find(e=>e.id===f)||h[0],_=(e?.finance||[]).filter(e=>!g||e.start===g.start&&e.end===g.end),v=_.find(e=>e.scope?.type===`shop`&&(l||e.project===g?.project)),y=_.filter(e=>e.scope?.type===`item`&&(l||e.project===g?.project)),b=y.filter(e=>e.complete),S=b.filter(e=>e.profit>0),C=b.filter(e=>e.profit<0),w=b.filter(e=>e.profit===0),T=e?.incubation||[],O=T.filter(e=>e.success),A=i.reduce((e,t)=>e+t.running,0),j=[{id:`sales`,label:`店铺销售额`,value:g?H(g.total):`暂无记录`,unit:g?`元`:``,note:g?`${g.start} — ${g.end}`:`先归档全店销售数据`,Icon:r},{id:`profit`,label:`店铺利润`,value:v?.complete?H(v.profit):`缺成本资料`,unit:v?.complete?`元`:``,note:`已列成本口径经营结余 · 点击核对`,Icon:D},{id:`links`,label:`盈利 / 亏损链接`,value:b.length?`${S.length} / ${C.length}`:`尚未核算`,unit:b.length?`个`:``,note:`${b.length} 个有核算结果 · ${w.length} 个持平`,Icon:p},{id:`incubation`,label:`孵化晋级记录`,value:T.length?`${O.length} / ${T.length}`:`尚无记录`,unit:T.length?`个`:``,note:`已记录晋级 / 累计纳入 · 不代表成功率`,Icon:k},{id:`tasks`,label:`正在执行的任务`,value:a?A:`—`,unit:`个`,note:`${i.filter(e=>e.complete).length} 个项目流程已确认`,Icon:E}];function N(e){if(e===`tasks`){s(`projects`);return}d(u===e?``:e)}let F=e=>l?`data:application/json;charset=utf-8,`+encodeURIComponent(JSON.stringify(e,null,2)):`/api/workbench/`+e.project+`/file/`+(e.artifactId||e.id);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(ne,{group:`cockpit.kpis`,className:`gc-kpis`,children:j.map(e=>(0,P.jsx)(`div`,{"data-layout-label":e.label,children:(0,P.jsxs)(`button`,{className:`gc-kpi gc-kpi-`+e.id+` `+(u===e.id?`is-open`:``),onClick:()=>N(e.id),"aria-expanded":u===e.id,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`gc-kpi-icon`,children:(0,P.jsx)(e.Icon,{size:21})}),(0,P.jsx)(`span`,{children:e.label}),(0,P.jsx)(n,{size:13})]}),(0,P.jsxs)(`strong`,{className:String(e.value).length>9?`gc-long-value`:``,children:[e.value,(0,P.jsx)(`small`,{children:e.unit})]}),(0,P.jsx)(`p`,{children:e.note})]},e.id)},e.id))}),u&&(0,P.jsxs)(`section`,{className:`gb-detail`,"aria-label":`经营指标明细`,children:[(0,P.jsxs)(`header`,{children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`small`,{children:l?`演示数据 · 不代表真实经营结果`:`归档数据 · 以原件日期和来源为准`}),(0,P.jsxs)(`h2`,{children:[j.find(e=>e.id===u)?.label,` · 明细与下一步`]})]}),(0,P.jsx)(`button`,{"aria-label":`关闭指标明细`,onClick:()=>d(``),children:(0,P.jsx)(x,{size:18})})]}),u===`sales`&&(0,P.jsxs)(P.Fragment,{children:[h.length>1&&(0,P.jsxs)(`label`,{children:[`选择统计记录`,(0,P.jsx)(`select`,{"aria-label":`销售统计记录`,value:g?.id||``,onChange:e=>m(e.target.value),children:h.map(e=>(0,P.jsxs)(`option`,{value:e.id,children:[e.projectName,` · `,e.start,` ~ `,e.end]},e.id))})]}),g?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:g.basis}),(0,P.jsxs)(`p`,{children:[`统计范围:`,g.scopeLabel,` · `,g.count,` 个链接 · `,g.identity,`。`,g.mode===`unverified`?`来源未完成独立核验。`:``]}),(0,P.jsx)(`div`,{className:`gb-table`,children:(0,P.jsxs)(`table`,{children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:`商品 / 分类`}),(0,P.jsx)(`th`,{children:`支付销售额`}),(0,P.jsx)(`th`,{children:`链接数`}),(0,P.jsx)(`th`,{children:`下一步`})]})}),(0,P.jsx)(`tbody`,{children:g.breakdown.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`td`,{children:e.name}),(0,P.jsxs)(`td`,{children:[`¥ `,H(e.sales)]}),(0,P.jsx)(`td`,{children:e.count}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`button`,{onClick:()=>e.itemId?o(e.project,{tab:`monitor`,itemId:e.itemId}):o(g.project,{tab:`data`}),children:e.itemId?`看商品表现`:`核对来源数据`})})]},e.name))})]})}),(0,P.jsx)(`p`,{className:`gb-next`,children:`下一步:先看销售贡献高的商品,再核对退款和成本,决定继续推广还是调整商品。`}),(0,P.jsx)(`a`,{href:F(g),download:l?`模拟销售账本.json`:void 0,children:`查看原始记录`})]}):(0,P.jsx)(`p`,{children:`当前没有全店销售记录。先到数据中心归档同一店铺、同一统计窗口的数据。`}),(0,P.jsx)(`button`,{onClick:()=>s(`data`),children:`进入数据中心`})]}),u===`profit`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:`计算:支付销售额 − 同支付订单退款 − 货品、履约、平台、广告、税费、其他费用 − 固定费用分摊。结果是已列成本口径经营结余。`}),v?.complete?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`gb-costs`,children:[Object.entries(v.amounts).map(([e,t])=>(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{children:e===`gross`?`支付销售额`:L[e]}),(0,P.jsxs)(`b`,{children:[`¥ `,H(t)]})]},e)),(0,P.jsxs)(`div`,{className:`gb-profit`,children:[(0,P.jsx)(`span`,{children:`经营结余`}),(0,P.jsxs)(`b`,{children:[`¥ `,H(v.profit)]})]})]}),(0,P.jsx)(`a`,{href:F(v),download:l?`模拟利润账本.json`:void 0,children:`查看核算原件`})]}):(0,P.jsxs)(`div`,{className:`gb-gap`,children:[(0,P.jsx)(`b`,{children:`没有完整的真实店铺成本账本,不能计算利润。`}),(0,P.jsx)(`p`,{children:`需要补齐:货品、运费、平台、广告、税费、其他费用、固定费用分摊,以及同支付订单退款。明确没有发生的费用填0,未知项留空。`})]}),(0,P.jsx)(`p`,{className:`gb-next`,children:`下一步:核对金额和凭证;若亏损,先查看费用占比与亏损商品,再进入商品优化评估原因。`}),(0,P.jsx)(`button`,{onClick:()=>o(v?.project||g?.project||i[0]?.id,{tab:`finance`}),disabled:!i.length,children:`打开经营核算`})]}),u===`links`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:`按同周期、完整成本账本判断:结余大于0为盈利,小于0为亏损,等于0为持平;缺成本的商品不计入盈亏。当前仅统计有账本的范围。`}),(0,P.jsx)(`div`,{className:`gb-table`,children:(0,P.jsxs)(`table`,{children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:`商品`}),(0,P.jsx)(`th`,{children:`销售额`}),(0,P.jsx)(`th`,{children:`经营结余`}),(0,P.jsx)(`th`,{children:`状态`}),(0,P.jsx)(`th`,{children:`下一步`})]})}),(0,P.jsx)(`tbody`,{children:y.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsxs)(`td`,{children:[e.projectName,(0,P.jsx)(`small`,{children:e.scope.id})]}),(0,P.jsxs)(`td`,{children:[`¥ `,H(e.gross)]}),(0,P.jsx)(`td`,{children:e.complete?`¥ `+H(e.profit):`费用不全`}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`span`,{className:e.profit<0?`gb-loss`:`gb-win`,children:e.complete?e.profit>0?`盈利`:e.profit<0?`亏损`:`持平`:`待核算`})}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`button`,{onClick:()=>o(e.project,{tab:e.complete?`optimization`:`finance`,itemId:e.scope.id}),children:e.complete?`查看并优化`:`补齐费用`})})]},e.id))})]})}),!y.length&&(0,P.jsx)(`p`,{children:`还没有商品级真实账本。当前看板商品不能仅凭销售额判定盈亏。`}),(0,P.jsx)(`button`,{disabled:!i.length,onClick:()=>o(g?.project||i[0]?.id,{tab:`finance`}),children:`补充商品成本账本`})]}),u===`incubation`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:`这里只统计已保存的运营晋级记录与累计纳入数量,不计算经营成功率。未晋级可能仍在观察,不代表失败;每条记录需要核对标准、证据和观察时间,不能推断可复制收益。`}),(0,P.jsxs)(`div`,{className:`gb-inc-summary`,children:[(0,P.jsxs)(`b`,{children:[O.length,(0,P.jsx)(`small`,{children:`达标晋级`})]}),(0,P.jsx)(`span`,{children:`/`}),(0,P.jsxs)(`b`,{children:[T.length,(0,P.jsx)(`small`,{children:`纳入孵化`})]})]}),(0,P.jsx)(`div`,{className:`gb-table`,children:(0,P.jsxs)(`table`,{children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:`商品`}),(0,P.jsx)(`th`,{children:`加入时间`}),(0,P.jsx)(`th`,{children:`结果`}),(0,P.jsx)(`th`,{children:`老师标准与依据`}),(0,P.jsx)(`th`,{children:`下一步`})]})}),(0,P.jsx)(`tbody`,{children:T.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`td`,{children:e.itemId}),(0,P.jsx)(`td`,{children:e.started.slice(0,10)}),(0,P.jsx)(`td`,{children:e.success?`达标晋级`:`继续观察`}),(0,P.jsxs)(`td`,{className:`gb-wrap`,children:[e.standard||`待记录老师标准`,(0,P.jsx)(`small`,{children:e.evidence||`尚无达标证据`})]}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`button`,{onClick:()=>{let n=t.find(t=>t.itemId===e.itemId&&t.project===e.project);n?c(n):o(e.project,{tab:`data`})},children:e.success?`查看运营分组`:`核对并晋级`})})]},e.key))})]})}),!T.length&&(0,P.jsx)(`p`,{children:`还没有新品进入孵化的记录,暂不能评价。`}),(0,P.jsx)(`p`,{className:`gb-next`,children:`下一步:先把新品加入“新品测试”;达标后选择下一运营分组,填写老师标准与达标依据。单纯换组不计为已记录达标晋级。`}),(0,P.jsx)(`button`,{disabled:!t.length,onClick:()=>c(t.find(e=>e.tier===`unassigned`)||t[0],`test`),children:`登记新品,开始孵化`})]})]})]})}var ie=e=>Math.abs(e)>=1e4?(e/1e4).toFixed(1)+`万`:U(e),U=e=>typeof e==`number`?e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}):`—`,W={scale:`#35dcca`,incubate:`#9880ff`,test:`#438bff`,unassigned:`var(--omni-muted,#91a9bd)`},G={scale:`重点推广`,incubate:`持续孵化`,test:`新品测试`,unassigned:`待分组`},K=[{id:`business`,label:`经营分析`,note:`查看商品经营趋势、销售构成和运营分组。`},{id:`projects`,label:`项目总览`,note:`全局看进度,卡片看状态,进入节点主流程继续推进。`},{id:`tasks`,label:`待办与任务`,note:`集中查看运营任务、巡店提醒和需要你处理的事项。`},{id:`history`,label:`复盘动态`,note:`回看项目阶段与历史记录,核对过程和依据。`}],q={done:`已确认`,review:`待确认`,attention:`需处理`,todo:`未开始`,stopped:`已停止`};function J({title:e,sub:t,children:n}){return(0,P.jsxs)(`div`,{className:`gc-panel-head`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`h2`,{children:[(0,P.jsx)(`span`,{}),` `,e]}),(0,P.jsx)(`small`,{children:t})]}),n]})}function ae({series:e,days:t,onOpen:i}){let[a,o]=(0,M.useState)(null),s=e?.points||[],c=Date.parse(s.at(-1)?.date)-(t-1)*864e5,l=s.filter(e=>Date.parse(e.date)>=c),u=l.filter(e=>e.value!==null).map(e=>e.value);if(!u.length)return(0,P.jsxs)(`div`,{className:`gc-chart-empty`,children:[(0,P.jsx)(r,{size:38}),(0,P.jsx)(`b`,{children:`这段时间还没有可用数据`}),(0,P.jsx)(`span`,{children:`进入商品监控,查看数据来源与日期`}),(0,P.jsxs)(`button`,{onClick:i,children:[`查看商品监控 `,(0,P.jsx)(n,{size:13})]})]});let d=Math.min(0,...u),f=Math.max(1,...u)-d,p=e=>54+(Date.parse(e.date)-c)/(Math.max(1,t-1)*864e5)*690,m=e=>220-(e-d)/f*180,h=null,g=[];return l.forEach(e=>{if(e.value===null){h=null;return}h&&Date.parse(e.date)-Date.parse(h.date)===864e5&&g.push((0,P.jsx)(`line`,{x1:p(h),y1:m(h.value),x2:p(e),y2:m(e.value)},e.date)),h=e}),(0,P.jsxs)(`div`,{className:`gc-chart`,children:[(0,P.jsxs)(`div`,{className:`gc-chart-reading`,children:[(0,P.jsxs)(`strong`,{children:[U(a?.value??l.at(-1)?.value),(0,P.jsx)(`small`,{children:e.unit})]}),(0,P.jsxs)(`span`,{children:[a?.date||l.at(-1)?.date,` · `,e.name]}),(0,P.jsx)(`i`,{children:`柱与线均为同一指标`})]}),(0,P.jsxs)(`svg`,{viewBox:`0 0 780 255`,role:`img`,"aria-label":`${e.name},最近${t}天归档趋势,缺失不补零`,children:[(0,P.jsx)(`defs`,{children:(0,P.jsxs)(`linearGradient`,{id:`gc-bar`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,P.jsx)(`stop`,{stopColor:`#5ec9ff`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#2857d6`,stopOpacity:`.3`})]})}),[0,.25,.5,.75,1].map(e=>(0,P.jsxs)(`g`,{children:[(0,P.jsx)(`line`,{className:`gc-gridline`,x1:`54`,x2:`750`,y1:m(d+f*e),y2:m(d+f*e)}),(0,P.jsx)(`text`,{x:`42`,y:m(d+f*e)+4,textAnchor:`end`,children:ie(d+f*e)})]},e)),l.map(n=>n.value===null?null:(0,P.jsxs)(`g`,{onMouseEnter:()=>o(n),onMouseLeave:()=>o(null),children:[(0,P.jsx)(`rect`,{x:p(n)-Math.min(8,230/t),y:Math.min(m(0),m(n.value)),width:Math.min(16,460/t),height:Math.max(1,Math.abs(m(0)-m(n.value))),rx:`2`,fill:`url(#gc-bar)`}),(0,P.jsx)(`circle`,{cx:p(n),cy:m(n.value),r:`3`,fill:`#6ceeff`}),(0,P.jsxs)(`title`,{children:[n.date,`:`,U(n.value),` `,e.unit]})]},n.date)),(0,P.jsx)(`g`,{className:`gc-line`,children:g}),[0,.25,.5,.75,1].map(e=>(0,P.jsx)(`text`,{x:54+690*e,y:`247`,textAnchor:`middle`,children:new Date(c+(t-1)*864e5*e).toISOString().slice(5,10)},e))]})]})}function Y(e){return(0,P.jsx)(V,{scope:e.layoutScope,onDirty:e.onDirty,children:(0,P.jsx)(X,{...e})})}function X({products:e,projects:t,catalog:r,ready:i,onAction:s,onAssign:c,onOpen:u,onNav:f,onTier:p,onCreate:m,onExecute:g,metrics:_,demo:v}){let[y,b]=h(`workbench.cockpit.tab`,`business`),x=K.find(e=>e.id===y)||K[0],S=(0,M.useRef)(null);function C(e){let t=K.findIndex(e=>e.id===x.id),n=e.key===`ArrowRight`?(t+1)%K.length:e.key===`ArrowLeft`?(t+K.length-1)%K.length:e.key===`Home`?0:e.key===`End`?K.length-1:-1;n<0||(e.preventDefault(),b(K[n].id),(S.current?.querySelectorAll(`[role=tab]`)[n])?.focus())}let[w,T]=h(`workbench.productKey`,``),[E,D]=h(`workbench.metric`,``),[O,k]=h(`workbench.days`,30),[A,N]=h(`workbench.timelineDays`,14),[F,I]=(0,M.useState)(null),L=e.find(e=>e.key===w)||e.find(e=>e.demoCurrent)||e[0],R=L?.series.find(e=>e.key===E)||L?.series.find(e=>[`paid`,`payAmt`,`sales`,`gmv`].includes(e.metric))||L?.series.find(e=>e.metric===`buyers`)||L?.series[0],z=t.reduce((e,t)=>e+t.running,0),ee=t.reduce((e,t)=>e+t.pending,0),B=e.filter(e=>l(e)),V=Object.keys(G).map(t=>({id:t,name:G[t],count:e.filter(e=>e.tier===t).length})),H=0,U=V.map(t=>{let n={...t,offset:H,length:e.length?t.count/e.length*314.16:0};return H+=n.length,n}),Y=t.filter(e=>e.replay?.some(e=>Number.isFinite(Date.parse(e.at)))).sort((e,t)=>String(t.updated).localeCompare(String(e.updated))),X=Math.max(0,...Y.flatMap(e=>e.replay.map(e=>Date.parse(e.at)).filter(Number.isFinite))),Z=X-(A-1)*864e5,le=[{label:`待选择运营分组`,items:e.filter(e=>e.tier===`unassigned`),color:`#8097b8`},{label:`数据需更新`,items:e.filter(e=>e.work?.needsUpdate),color:`#f3ba66`},{label:`任务需检查`,items:e.filter(e=>e.work?.problems?.length),color:`#f581a7`},{label:`近期运行中`,items:e.filter(e=>e.work?.active?.length),color:`#3ddad7`}],Q=_?.sales?.[0],$=(Q?.breakdown||[]).filter(e=>typeof e.sales==`number`).slice().sort((e,t)=>t.sales-e.sales).slice(0,8),ue=$.length>0&&$.every(e=>e.itemId),de=Math.max(1,...$.map(e=>e.sales));return(0,P.jsxs)(`div`,{className:`gc`,children:[(0,P.jsx)(te,{enabled:[`business`,`projects`].includes(x.id),groups:[`cockpit.kpis`,...x.id===`projects`?[`projects.modules`,`projects.stats`,`projects.cards`]:[`cockpit.business`]]}),(0,P.jsx)(re,{metrics:_,products:e,projects:t,ready:i,onOpen:u,onNav:f,onAssign:c,demo:v}),(0,P.jsxs)(`div`,{className:`gc-tabs-heading`,children:[(0,P.jsx)(`div`,{role:`tablist`,"aria-label":`工作台分类`,className:`gc-tabs`,"data-layout-control":!0,ref:S,onKeyDown:C,children:K.map(e=>(0,P.jsx)(`button`,{role:`tab`,id:`gc-tab-`+e.id,"aria-controls":`gc-panel-`+e.id,"aria-selected":x.id===e.id,tabIndex:x.id===e.id?0:-1,onClick:()=>b(e.id),children:e.label},e.id))}),x.id===`projects`&&(0,P.jsxs)(`div`,{className:`pb-heading-actions`,children:[(0,P.jsxs)(`button`,{className:`pb-all-projects`,onClick:()=>f(`projects`),children:[`查看全部项目 `,(0,P.jsx)(n,{size:14})]}),(0,P.jsx)(`button`,{className:`pb-create`,onClick:m,children:`+ 新建项目`})]})]}),(0,P.jsx)(`p`,{className:`gc-tab-description`,children:x.note}),(0,P.jsxs)(`div`,{role:`tabpanel`,id:`gc-panel-`+x.id,"aria-labelledby":`gc-tab-`+x.id,tabIndex:0,className:`gc-tab-panel gc-tab-`+x.id,children:[x.id===`projects`&&(0,P.jsx)(o,{onExecute:g,projects:t,ready:i,onOpen:u,onCreate:m,showHeading:!1,previewLimit:8,onAllProjects:()=>f(`projects`)}),x.id===`tasks`&&(0,P.jsx)(`div`,{className:`gc-quick-tiers`,"aria-label":`运营策略任务速览`,children:[`test`,`incubate`,`scale`].map(t=>{let r=e.filter(e=>e.tier===t),i=r.filter(e=>e.work?.active?.length),o=r.filter(e=>l(e)),u=r.find(e=>e.demoCurrent)||i[0]||r[0];return(0,P.jsxs)(`section`,{style:{"--tier":W[t]},children:[(0,P.jsxs)(`header`,{children:[(0,P.jsx)(`b`,{children:G[t]}),(0,P.jsxs)(`span`,{children:[r.length,`个商品 · `,i.length,`个运行中`]}),(0,P.jsx)(`button`,{onClick:()=>p(t),"aria-label":`查看`+G[t]+`全部商品`,children:(0,P.jsx)(a,{size:14})})]}),(0,P.jsxs)(`button`,{className:`gc-quick-line`,disabled:!u,onClick:()=>s(u,`work`),children:[(0,P.jsx)(`em`,{children:`正在做`}),(0,P.jsxs)(`span`,{children:[u?u.demoCurrent||d(u):`等待商品加入`,u&&(0,P.jsx)(`small`,{children:u.projectName})]})]}),(0,P.jsxs)(`button`,{className:`gc-quick-line`,onClick:()=>u?s(u,`data`):c(null,t),children:[(0,P.jsx)(`em`,{children:`下一步`}),(0,P.jsx)(`span`,{children:u?.demoNext||(t===`test`?`核对点击和加购,选出潜力款`:t===`incubate`?`核对转化与成本,确认是否赚钱`:`检查推广效果,优化计划`)}),(0,P.jsx)(a,{size:12})]}),(0,P.jsxs)(`button`,{className:`gc-quick-alert `+(o.length?`has-issues`:``),onClick:()=>o.length?s(o[0],`work`):p(t),children:[o.length?`需要你处理 `+o.length+` 项 · `+l(o[0]):`暂无待处理提醒`,(0,P.jsx)(n,{size:12})]})]},t)})}),(0,P.jsxs)(ne,{group:`cockpit.`+x.id,className:`gc-main-grid`,children:[x.id===`business`&&(0,P.jsxs)(`section`,{"data-layout-label":`商品经营趋势`,className:`gc-panel gc-sales`,children:[(0,P.jsx)(J,{title:`商品经营趋势`,sub:`按商品查看归档数据,保留真实波动`,children:(0,P.jsx)(`div`,{className:`gc-toggle`,children:[7,30].map(e=>(0,P.jsxs)(`button`,{"aria-pressed":O===e,onClick:()=>k(e),children:[e,`天`]},e))})}),(0,P.jsxs)(`div`,{className:`gc-selects`,children:[(0,P.jsx)(`select`,{"aria-label":`驾驶舱商品`,value:L?.key||``,onChange:e=>{T(e.target.value),D(``)},children:e.map(e=>(0,P.jsxs)(`option`,{value:e.key,children:[e.title||e.projectName,` · `,e.shopName||e.itemId]},e.key))}),(0,P.jsx)(`select`,{"aria-label":`驾驶舱趋势指标`,value:R?.key||``,onChange:e=>D(e.target.value),children:L?.series.map(e=>(0,P.jsx)(`option`,{value:e.key,children:e.name},e.key))}),(0,P.jsxs)(`button`,{disabled:!L,onClick:()=>s(L,`data`),children:[`明细 `,(0,P.jsx)(a,{size:12})]})]}),(0,P.jsx)(ae,{series:R,days:O,onOpen:()=>L?s(L,`monitor`):f(`projects`)},L?.key+`|`+R?.key+`|`+O),(0,P.jsx)(`p`,{className:`gc-footnote`,children:`单商品数据,不等于全店销售额 · 缺失日期不连线 · 来源见归档详情`})]},`sales`),x.id===`business`&&(0,P.jsxs)(`section`,{"data-layout-label":`商品运营分组`,className:`gc-panel gc-structure`,children:[(0,P.jsx)(J,{title:`商品运营分组`,sub:`点击分类,查看商品和下一步`}),(0,P.jsxs)(`div`,{className:`gc-ring`,children:[(0,P.jsxs)(`svg`,{viewBox:`0 0 160 160`,role:`img`,"aria-label":V.map(e=>e.name+e.count+`个`).join(`,`),children:[(0,P.jsx)(`circle`,{cx:`80`,cy:`80`,r:`62`,fill:`none`,stroke:`#1e355b`,strokeWidth:`1`,strokeDasharray:`2 4`}),(0,P.jsx)(`circle`,{cx:`80`,cy:`80`,r:`50`,fill:`none`,stroke:`#152849`,strokeWidth:`18`}),U.filter(e=>e.count>0).map(e=>(0,P.jsx)(`circle`,{cx:`80`,cy:`80`,r:`50`,fill:`none`,stroke:W[e.id],strokeWidth:`18`,strokeDasharray:`${e.length} ${314.16-e.length}`,strokeDashoffset:-e.offset,transform:`rotate(-90 80 80)`},e.id)),(0,P.jsx)(`text`,{x:`80`,y:`80`,textAnchor:`middle`,className:`gc-ring-number`,children:i?e.length:`—`}),(0,P.jsx)(`text`,{x:`80`,y:`98`,textAnchor:`middle`,children:`商品观察对象`})]}),(0,P.jsx)(`div`,{className:`gc-ring-legend`,children:V.map(t=>(0,P.jsxs)(`button`,{onClick:()=>p(t.id),children:[(0,P.jsx)(`i`,{style:{background:W[t.id]}}),(0,P.jsx)(`span`,{children:t.name}),(0,P.jsx)(`b`,{children:t.count}),(0,P.jsxs)(`small`,{children:[e.length?Math.round(t.count/e.length*100):0,`%`]}),(0,P.jsx)(a,{size:12})]},t.id))})]}),(0,P.jsx)(`p`,{className:`gc-footnote`,children:`同一商品在不同项目中分别记录;人工策略分组以保存记录为准,不代表全店经营梯队。`})]},`structure`),x.id===`business`&&(0,P.jsxs)(`section`,{"data-layout-label":`销售构成`,className:`gc-panel gc-ranking`,children:[(0,P.jsx)(J,{title:ue?`商品销售排行`:`销售构成`,sub:Q?Q.start+` — `+Q.end+` · 同一份销售账本`:`按同一统计期的销售账本排名`}),(0,P.jsx)(`div`,{className:`gc-rank-list`,children:$.map((e,t)=>(0,P.jsxs)(`button`,{onClick:()=>u(e.project||Q.project,{tab:e.itemId?`monitor`:`data`,itemId:e.itemId}),children:[(0,P.jsx)(`i`,{children:t+1}),(0,P.jsxs)(`span`,{title:e.name||e.itemId,children:[e.name||e.itemId,(0,P.jsx)(`small`,{children:e.itemId||e.count+`个商品`})]}),(0,P.jsx)(`div`,{children:(0,P.jsx)(`b`,{style:{width:Math.max(2,e.sales/de*100)+`%`}})}),(0,P.jsxs)(`strong`,{children:[`¥`,ie(e.sales)]})]},e.project+`|`+(e.itemId||e.name)))}),!$.length&&(0,P.jsxs)(`p`,{className:`gc-no-data`,children:[`还没有同期商品销售明细。`,(0,P.jsx)(`button`,{onClick:()=>f(`data`),children:`查看已有资料`})]}),(0,P.jsx)(`p`,{className:`gc-footnote`,children:ue?`点击商品核对明细 · 销售排名不代表盈利排名`:`原件按品类汇总,点击查看归档;不是单品排名`})]},`ranking`),x.id===`tasks`&&(0,P.jsxs)(`section`,{"data-layout-label":`巡店检查`,className:`gc-panel gc-inspect`,children:[(0,P.jsx)(J,{title:`巡店检查`,sub:`基于归档与任务状态 · 点击查看待办`,children:(0,P.jsx)(j,{size:17})}),(0,P.jsx)(`div`,{className:`gc-checks`,children:le.map(t=>(0,P.jsxs)(`button`,{disabled:!t.items.length,onClick:()=>t.label===`待选择运营分组`?c(t.items[0]):s(t.items[0],`work`),children:[(0,P.jsx)(`span`,{children:t.label}),(0,P.jsx)(`div`,{children:(0,P.jsx)(`i`,{style:{width:`${e.length?t.items.length/e.length*100:0}%`,background:t.color}})}),(0,P.jsx)(`b`,{children:i?t.items.length:`—`}),(0,P.jsx)(a,{size:12})]},t.label))}),(0,P.jsx)(`p`,{className:`gc-footnote`,children:`同一商品可有多项提醒,数量不可相加;点击先处理一项。`}),(0,P.jsxs)(`div`,{className:`gc-archive`,children:[(0,P.jsx)(oe,{count:r.length}),(0,P.jsxs)(`button`,{onClick:()=>f(`data`),children:[`查看来源 `,(0,P.jsx)(n,{size:12})]})]})]},`inspect`),x.id===`history`&&(0,P.jsxs)(`section`,{"data-layout-label":`项目阶段记录`,className:`gc-panel gc-matrix`,children:[(0,P.jsx)(J,{title:`项目阶段记录`,sub:`节点流程与历史六步记录分别保留,点击核对对应阶段`,children:(0,P.jsxs)(`button`,{onClick:()=>f(`projects`),children:[`全部项目 `,(0,P.jsx)(n,{size:12})]})}),(0,P.jsx)(`div`,{className:`gc-state-legend`,children:Object.entries(q).map(([e,t])=>(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`i`,{className:e}),t]},e))}),(0,P.jsxs)(`div`,{className:`gc-matrix-scroll`,children:[t.slice(0,8).map(e=>(0,P.jsxs)(`div`,{className:`gc-matrix-row`,children:[(0,P.jsxs)(`button`,{className:`gc-project-name`,title:e.name,onClick:()=>u(e.id,{tab:`overview`}),children:[e.name,(0,P.jsxs)(`small`,{children:[e.done,`/`,e.total,` 阶段已确认`]})]}),(0,P.jsx)(`div`,{children:e.route.map((t,n)=>(0,P.jsx)(`button`,{className:`gc-cell `+t.state,"aria-label":`${e.name}:${t.name},${q[t.state]}`,title:`${t.name} · ${q[t.state]}`,onClick:()=>u(e.id,t.target),children:String(n+1).padStart(2,`0`)},t.id))})]},e.id)),!t.length&&(0,P.jsx)(`p`,{className:`gc-no-data`,children:`当前范围还没有项目。`})]})]},`matrix`),x.id===`history`&&(0,P.jsxs)(`section`,{"data-layout-label":`项目历史时间轴`,className:`gc-panel gc-history`,children:[(0,P.jsx)(J,{title:`项目历史时间轴`,sub:v?`模拟历史记录;每天的记录合并为一个色块`:`按真实归档时间显示;每天的记录合并为一个色块`,children:(0,P.jsx)(`div`,{className:`gc-toggle`,children:[14,30].map(e=>(0,P.jsxs)(`button`,{"aria-pressed":A===e,onClick:()=>N(e),children:[e,`天`]},e))})}),X>0?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`gc-time-header`,children:[(0,P.jsx)(`span`,{children:`项目 / 点击查看记录`}),(0,P.jsx)(`div`,{children:[0,.25,.5,.75,1].map(e=>(0,P.jsx)(`span`,{children:new Date(Z+(X-Z)*e).toISOString().slice(5,10)},e))})]}),(0,P.jsx)(`div`,{className:`gc-time-scroll`,children:Y.filter(e=>e.replay.some(e=>Date.parse(e.at)>=Z)).slice(0,7).map(e=>(0,P.jsxs)(`div`,{className:`gc-time-row`,children:[(0,P.jsx)(`button`,{title:e.name,onClick:()=>I({project:e,events:e.replay}),children:e.name}),(0,P.jsx)(`div`,{children:se(e.replay.filter(e=>Date.parse(e.at)>=Z)).map(t=>(0,P.jsx)(`button`,{className:`gc-event `+(t.events.some(e=>/失败|停止/.test(e.state))?`bad`:t.events.some(e=>/确认|完成/.test(e.state))?`done`:`saved`),style:{left:`${(Date.parse(t.events[0].at)-Z)/(X-Z)*100}%`},title:`${t.date} · ${t.events.length} 条记录`,"aria-label":`${e.name}:${t.date},${t.events.length}条记录`,onClick:()=>I({project:e,events:t.events,date:t.date}),children:t.events.length},t.date))})]},e.id))}),(0,P.jsxs)(`p`,{className:`gc-footnote`,children:[`最近有记录的日期窗口 · 每个项目最多展示最近120条记录 · 点击色块展开当天记录,不代表运行时长;`,v?`演示操作会追加记录。`:`完整回放在项目执行页。`]})]}):(0,P.jsx)(`p`,{className:`gc-no-data`,children:`暂无可回放的历史记录。`})]},`history`),x.id===`tasks`&&(0,P.jsxs)(`section`,{"data-layout-label":`需要你处理`,className:`gc-panel gc-todo`,children:[(0,P.jsx)(J,{title:`需要你处理`,sub:`先做这一件,再继续下一步`,children:(0,P.jsxs)(`span`,{className:`gc-badge`,children:[B.length,` 项`]})}),(0,P.jsxs)(`div`,{className:`gc-todo-list`,children:[B.map((e,t)=>(0,P.jsxs)(`button`,{onClick:()=>e.tier===`unassigned`?c(e):s(e,`work`),children:[(0,P.jsx)(`span`,{className:`gc-todo-num`,children:String(t+1).padStart(2,`0`)}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`b`,{children:l(e)}),(0,P.jsxs)(`span`,{children:[e.title||e.projectName,` · `,e.shopName||e.itemId]}),(0,P.jsx)(`small`,{children:d(e)})]}),(0,P.jsx)(a,{size:15})]},e.key)),!B.length&&(0,P.jsx)(`p`,{className:`gc-no-data`,children:i?`当前没有商品待办。`:`正在读取…`}),(0,P.jsx)(`h3`,{className:`gc-next-label`,children:`接下来可以做`}),t.slice(0,5).map(e=>(0,P.jsxs)(`button`,{onClick:()=>u(e.id,{tab:`overview`}),children:[(0,P.jsx)(`span`,{className:`gc-next-dot`}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`b`,{children:e.name}),(0,P.jsx)(`span`,{children:`查看项目节点与下一步`})]}),(0,P.jsx)(a,{size:13})]},`next-`+e.id))]})]},`todo`)]})]}),F&&(0,P.jsx)(ce,{...F,onClose:()=>I(null),onOpen:u}),(0,P.jsxs)(`div`,{className:`gc-status-strip`,children:[(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`i`,{}),` `,v?`教学模拟`:`归档数据`,` · `,e.length,` 个商品`]}),(0,P.jsxs)(`span`,{children:[t.length,` 个项目 · `,t.filter(e=>e.started).length,` 个已开展 · `,t.filter(e=>e.complete).length,` 个流程已确认`]}),(0,P.jsxs)(`span`,{children:[z,` 项运行中 · `,ee,` 项待执行`]}),(0,P.jsxs)(`button`,{onClick:()=>f(`products`),children:[`展开运营工作清单 `,(0,P.jsx)(n,{size:13})]})]})]})}function oe({count:e}){return(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`b`,{children:e}),` 份归档资料可追溯`]})}function se(e){let t=new Map;for(let n of e){let e=new Date(Date.parse(n.at)+8*36e5).toISOString().slice(0,10);t.set(e,[...t.get(e)||[],n])}return[...t].map(([e,t])=>({date:e,events:t}))}function ce({project:e,events:t,date:n,onClose:r,onOpen:i}){let a=(0,M.useRef)(null);return(0,M.useEffect)(()=>{a.current?.showModal()},[]),(0,P.jsxs)(`dialog`,{className:`ta-dialog gc-history-dialog`,ref:a,onClose:r,"aria-labelledby":`gc-history-title`,children:[(0,P.jsxs)(`div`,{className:`ta-dialog-head`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`small`,{children:e.name}),(0,P.jsxs)(`h2`,{id:`gc-history-title`,children:[n||`项目历史`,` · `,t.length,` 条记录`]})]}),(0,P.jsx)(`button`,{"aria-label":`关闭历史记录`,onClick:r,children:`×`})]}),(0,P.jsx)(`p`,{children:`按发生时间排列。展开记录,查看当时做了什么。`}),(0,P.jsx)(`div`,{className:`gc-records`,children:t.map((t,n)=>(0,P.jsxs)(`details`,{children:[(0,P.jsxs)(`summary`,{children:[(0,P.jsx)(`span`,{children:new Date(t.at).toLocaleString(`zh-CN`,{timeZone:`Asia/Shanghai`})}),(0,P.jsx)(`b`,{children:t.name}),(0,P.jsx)(`em`,{children:t.state})]}),(0,P.jsx)(`p`,{children:t.detail||`此记录没有保存详细说明,可进入对应阶段核对原始资料。`}),(0,P.jsx)(`button`,{onClick:()=>{r(),i(e.id,e.route.find(e=>e.id===t.routeId)?.target||{tab:`data`})},children:`进入对应阶段 / 资料`})]},n))})]})}function Z(){let e=S(),[t,n]=(0,M.useState)(null),[r,i]=(0,M.useState)(!0),[a,o]=(0,M.useState)(``),[c,l]=(0,M.useState)(``),[d,p]=(0,M.useState)(0),[g,_]=h(`workbench.scope`,`real`),[v,y]=(0,M.useState)(null),[b,x]=(0,M.useState)(null);(0,M.useEffect)(()=>{let t=!0;return I(e.api).then(e=>{t&&(n(e),o(``))}).catch(e=>{t&&(n(null),o(e instanceof Error?e.message:`经营资料读取失败`))}).finally(()=>{t&&i(!1)}),()=>{t=!1}},[e.api,d]);let C=e=>g===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`,w=t?.growth.products.filter(C)||[],E=t?.growth.catalog.filter(C)||[],D=t?.projects.filter(e=>g===`stored-demo`?e.simulated:!e.simulated)||[],O={sales:t?.growth.metrics?.sales?.filter(C)||[],finance:t?.growth.metrics?.finance?.filter(C)||[],incubation:t?.growth.metrics?.incubation?.filter(C)||[]},k=(0,M.useCallback)(()=>{i(!0),p(e=>e+1)},[]);s(D.some(e=>e.execution?.state===`running`),k);function A(t,n){n===`work`?x(t):n===`data`?e.onProductGroup(`all`,t,g):e.onOpen(t.project,{tab:n,itemId:t.itemId})}return(0,P.jsx)(`div`,{className:`workbench-module`,children:(0,P.jsx)(`div`,{className:`gw`,children:(0,P.jsxs)(`div`,{className:`gw-body`,children:[(0,P.jsxs)(`header`,{className:`gw-header`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`small`,{children:`工作台 / 经营总览`}),(0,P.jsx)(`h1`,{children:`电商运营作战台`})]}),(0,P.jsxs)(`div`,{className:`gw-header-actions`,children:[(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`i`,{className:`gw-dot`}),g===`stored-demo`?`模拟归档 · 非真实经营`:`归档数据 · 非实时`]}),(0,P.jsxs)(`button`,{disabled:r,onClick:k,children:[(0,P.jsx)(m,{size:14}),r?`读取中`:`刷新数据`]})]})]}),(0,P.jsxs)(`div`,{className:`gw-scope`,children:[(0,P.jsx)(`div`,{children:[[`real`,`非模拟资料`],[`stored-demo`,`模拟资料`]].map(([e,t])=>(0,P.jsx)(`button`,{"aria-pressed":g===e,onClick:()=>{_(e),y(null),x(null),l(``)},children:t},e))}),(0,P.jsx)(`span`,{children:t?`${new Date(t.growth.updatedAt).toLocaleString(`zh-CN`)} 读取归档`:`正在读取归档…`})]}),a&&(0,P.jsxs)(`p`,{role:`alert`,className:`gw-message`,children:[a,` `,(0,P.jsx)(`button`,{onClick:k,children:`重试`})]}),c&&(0,P.jsx)(`p`,{role:`status`,className:`gw-message`,children:c}),(0,P.jsx)(Y,{layoutScope:e.layoutScope,onDirty:e.onDirty,onCreate:e.onCreate,products:w,projects:D,catalog:E,metrics:O,ready:!r&&!!t,demo:!1,onOpen:e.onOpen,onNav:e.onModule,onTier:t=>e.onProductGroup(t,void 0,g),onAction:A,onAssign:(e,t)=>y({product:e,suggestedTier:t})}),v&&(0,P.jsx)(u,{...v,products:w,onDirty:e.onDirty,onBusy:e.onBusy,onClose:()=>y(null),onSave:async(t,n,r,i)=>{await T(e.api,t,n,r,i),l(`分组已保存,正在更新看板。`),k()}}),b&&(0,P.jsx)(f,{product:b,onOpen:e.onOpen,onClose:()=>x(null)})]})})})}function le({section:e}){let t=S();return e===`tasks`||e===`records`?(0,P.jsx)(F,{mode:e,api:t.api,onOpen:t.onOpen},e):(0,P.jsx)(Z,{})}export{le as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./CollaborationWorkspace-DAWo2Vol.js";import{o as t}from"./index-BBySSIJT.js";var n=t();function r({selectedId:t,project:r}){let i=t||r?.projectId;return(0,n.jsx)(e,{initialProjectId:i},i||`directory`)}export{r as default};
|