@lumyne/omni-desktop-app 0.1.15 → 0.1.20
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/app/assets/{CartesianChart-WGAaBglc.js → CartesianChart-aa0EJ6w3.js} +4 -4
- package/app/assets/{CollaborationWorkspace-DCK04vMT.js → CollaborationWorkspace-mIgLrpSm.js} +5 -5
- package/app/assets/CompetitorAnalysis-Ct6wLjw6.js +1 -0
- package/app/assets/EmptyState-CpQOdGYD.js +1 -0
- package/app/assets/{ErrorBarContext-CawAzJAe.js → ErrorBarContext-BeuyujN4.js} +1 -1
- package/app/assets/{EvidenceSourceGuide-BcProW1l.js → EvidenceSourceGuide-BeBcvVcI.js} +1 -1
- package/app/assets/{FavoritePicker-DM2_dWpE.js → FavoritePicker-LfvebaXO.js} +1 -1
- package/app/assets/Favorites-C6Xd2Vyz.js +1 -0
- package/app/assets/{HelpTip-jUYYanuu.js → HelpTip-BfrAVfV_.js} +1 -1
- package/app/assets/{LineChart-COwHWMub.js → LineChart-tppycNHl.js} +1 -1
- package/app/assets/Opportunities-BfmikZ5o.js +1 -0
- package/app/assets/{ProgressiveRows-CQC4qLpP.js → ProgressiveRows-CNmxc71t.js} +1 -1
- package/app/assets/ShopLayoutPage-B943t2t1.js +1 -0
- package/app/assets/{TrendChart-DzAMi5ne.js → TrendChart-Doe6C5Aa.js} +1 -1
- package/app/assets/{api-7mHdrYIL.js → api-SsFxK3hw.js} +1 -1
- package/app/assets/arrow-down-Dm8ejo47.js +1 -0
- package/app/assets/arrow-left-CrtjcWhu.js +1 -0
- package/app/assets/arrow-up-right-FAUwydEi.js +1 -0
- package/app/assets/{book-open-CGihUjJl.js → book-open-BHnwW_0N.js} +1 -1
- package/app/assets/{calendar-days-BawZ7TDg.js → calendar-days-DQXKth-z.js} +1 -1
- package/app/assets/{chart-column-C5B0FpPZ.js → chart-column-B3ugUaKH.js} +1 -1
- package/app/assets/{chart-no-axes-combined-KPdsF5yV.js → chart-no-axes-combined-DbjiVuVa.js} +1 -1
- package/app/assets/check-B7m80-Hk.js +1 -0
- package/app/assets/chevron-down-9e3l9_Db.js +1 -0
- package/app/assets/chevron-right-DyOe1NsY.js +1 -0
- package/app/assets/{clock-3-FwWbroxq.js → clock-3-TXgD8tS6.js} +1 -1
- package/app/assets/competitor-analysis-XIYJL66C.js +1 -0
- package/app/assets/components-DMbkJLkK.js +2 -0
- package/app/assets/{download-BVBV4KKz.js → download-BMipQ3n8.js} +1 -1
- package/app/assets/entry-C4p4TKbJ.js +1 -0
- package/app/assets/{entry-D5VE-SQl.js → entry-CGu91Jpg.js} +2 -2
- package/app/assets/entry-CeW_5ZGi.js +1 -0
- package/app/assets/entry-Cxj3NkyT.js +42 -0
- package/app/assets/entry-DcwBlAO0.js +2 -0
- package/app/assets/{entry-B-rfN4Mo.js → entry-aDwWfs__.js} +1 -1
- package/app/assets/{favorites.module-CgbzaqYg.js → favorites.module-CaTR2ido.js} +1 -1
- package/app/assets/{file-text-D-xO0CF5.js → file-text-D6meDmAz.js} +1 -1
- package/app/assets/{getRadiusAndStrokeWidthFromDot-BYo9p5rw.js → getRadiusAndStrokeWidthFromDot-zEte6bM_.js} +1 -1
- package/app/assets/{grid-2x2-xmvbZjjZ.js → grid-2x2-sRKLAhuD.js} +1 -1
- package/app/assets/index-Dfy2jMWq.js +10 -0
- package/app/assets/{layers-B2HCPHyD.js → layers-B4gCFnEm.js} +1 -1
- package/app/assets/{layout-dashboard-CN-GUcgy.js → layout-dashboard-C54_ZKS5.js} +1 -1
- package/app/assets/{link-2-D-RHqmyJ.js → link-2-CC7rgyRC.js} +1 -1
- package/app/assets/{list-8yiowEk7.js → list-DI2UZ46g.js} +1 -1
- package/app/assets/module-host-BIy_fI1T.js +1 -0
- package/app/assets/{orbit-To2V4DpK.js → orbit-tMF8WRbG.js} +1 -1
- package/app/assets/package-rnaOiBPn.js +1 -0
- package/app/assets/play-DjZ3mG-r.js +1 -0
- package/app/assets/plus-_W4OFi32.js +1 -0
- package/app/assets/products-6S_LnOq6.js +1 -0
- package/app/assets/{project-public-AZkceU9T.js → project-public-B9DNEfwS.js} +1 -1
- package/app/assets/{project-public-BMmK5Vm_.js → project-public-DN0-E_G2.js} +1 -1
- package/app/assets/public-Csb687JC.js +1 -0
- package/app/assets/{refresh-cw-D4mG6C6S.js → refresh-cw-CiIEylYp.js} +1 -1
- package/app/assets/search-DlLds8Ae.js +1 -0
- package/app/assets/star-CcsEzP_q.js +1 -0
- package/app/assets/trending-up-CWfLLrC6.js +1 -0
- package/app/assets/{triangle-alert-BjPylqGH.js → triangle-alert-CEMUxCrJ.js} +1 -1
- package/app/assets/{ui-public-C5KBq8lf.js → ui-public-DVwBGbKN.js} +1 -1
- package/app/assets/workbench-5eWqMgfJ.css +1 -0
- package/app/assets/workbench-jvMSCBRw.js +2 -0
- package/app/assets/{workspace-view-state-DipEJ8gV.js → workspace-view-state-BuK4-c0r.js} +1 -1
- package/app/desktop/main.mjs +30 -17
- package/app/index.html +1 -1
- package/app/tools/bootstrap.bin +0 -0
- package/package.json +1 -1
- package/release.json +1 -1
- package/release.sig +1 -1
- package/app/assets/CompetitorAnalysis-Dt4doRKL.js +0 -1
- package/app/assets/EmptyState-BFap_1Q-.js +0 -1
- package/app/assets/Favorites-DwkgGH7U.js +0 -1
- package/app/assets/Opportunities-BviVM3vh.js +0 -1
- package/app/assets/ShopLayoutPage-D7nxgQt-.js +0 -1
- package/app/assets/arrow-down-CiiB45Lr.js +0 -1
- package/app/assets/arrow-left-Cd1Dxt2a.js +0 -1
- package/app/assets/arrow-up-right-Lmceqlov.js +0 -1
- package/app/assets/check-BRKoKLWu.js +0 -1
- package/app/assets/chevron-down-CDesghm0.js +0 -1
- package/app/assets/chevron-right-CBsoF5G4.js +0 -1
- package/app/assets/competitor-analysis-CBWPcuCI.js +0 -1
- package/app/assets/components-OqcJqT4X.js +0 -2
- package/app/assets/entry-3Eu0LGFu.js +0 -1
- package/app/assets/entry-Bh5oVBfk.js +0 -1
- package/app/assets/entry-DrY2zJMp.js +0 -2
- package/app/assets/entry-sDaY299x.js +0 -42
- package/app/assets/index-D-naxjQC.js +0 -10
- package/app/assets/module-host-CgoJybnQ.js +0 -1
- package/app/assets/play-DfGF9_hu.js +0 -1
- package/app/assets/plus-K0mohnuj.js +0 -1
- package/app/assets/products-CbH-UtYD.js +0 -1
- package/app/assets/public-Bld0NLnN.js +0 -1
- package/app/assets/search-CdjDi2Fc.js +0 -1
- package/app/assets/workbench-m_vwZRfc.js +0 -2
- package/app/assets/workbench-nB1eQGHA.css +0 -1
- /package/app/assets/{format-B433Uv2T.js → format-B2iJpu8S.js} +0 -0
- /package/app/assets/{graphicalItemSelectors-DbR99A7o.js → graphicalItemSelectors-DCiyiwSe.js} +0 -0
- /package/app/assets/{group-CvTiToSZ.js → group-DIi_QccB.js} +0 -0
- /package/app/assets/{market.module-DuLBV4PK.js → market.module-MVB-GO7b.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as e}from"./index-Dfy2jMWq.js";var t=e(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as e}from"./index-Dfy2jMWq.js";var t=e(`calendar-days`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M12 13h.01`,key:`y0uutt`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M8 17h.01`,key:`p3bg7i`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M16 17h.01`,key:`ql8jdd`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as e}from"./index-Dfy2jMWq.js";var t=e(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]);export{t};
|
package/app/assets/{chart-no-axes-combined-KPdsF5yV.js → chart-no-axes-combined-DbjiVuVa.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as e}from"./index-Dfy2jMWq.js";var t=e(`chart-no-axes-combined`,[[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14.639V21`,key:`1s85h0`}],[`path`,{d:`M20 10.656V21`,key:`q45596`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18.463V21`,key:`1otddq`}],[`path`,{d:`M8 14.656V21`,key:`1t2idw`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e}from"./index-Dfy2jMWq.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e}from"./index-Dfy2jMWq.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e}from"./index-Dfy2jMWq.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as e}from"./index-Dfy2jMWq.js";var t=e(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),n=e(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]);export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=864e5;function t(e){let t=String(e??``).trim();if(/^\d{6,20}$/.test(t))return t;try{let e=new URL(t);if(![`https:`,`http:`].includes(e.protocol)||e.username||e.password||e.port||![`taobao.com`,`tmall.com`].some(t=>e.hostname===t||e.hostname.endsWith(`.`+t)))return null;let n=e.searchParams.get(`id`);return/^\d{6,20}$/.test(n||``)?n:null}catch{return null}}function n(e){let n=t(e?.id);return n?`https://item.taobao.com/item.htm?id=${n}`:null}function r(e,r){let i=t(r?.id);if(!i)throw Error(`请输入有效的淘宝/天猫商品 ID 或完整商品链接`);if(e.some(e=>e.id===i))throw Error(`该商品已在分析列表中`);if(e.length>=2)throw Error(`最多同时分析 2 个商品,请先移除一个商品`);return[...e,{...r,id:i,name:String(r.name||`商品 ${i}`).slice(0,300),url:n({id:i})}]}function i(t=Date.now()){return new Date(Number(t)+8*36e5-e).toISOString().slice(0,10)}function a(t,n,r=Date.now()){if(![7,30].includes(t)||!/^\d{4}-\d{2}-\d{2}$/.test(n||``))throw Error(`请选择近 7 天或近 30 天和有效的结束日期`);let a=Date.parse(n+`T00:00:00Z`);if(!Number.isFinite(a)||new Date(a).toISOString().slice(0,10)!==n||n>i(r))throw Error(`结束日期必须是有效日期,且不能晚于昨天`);let o=t=>new Date(a-t*e).toISOString().slice(0,10);return{days:t,startDate:o(t-1),endDate:n,peerBeginDate:o(t*2-1),peerEndDate:o(t)}}export{i as a,a as i,t as n,n as r,r as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./TrendChart-Doe6C5Aa.js","./index-Dfy2jMWq.js","./index-DT6aELxD.css","./CartesianChart-aa0EJ6w3.js","./getRadiusAndStrokeWidthFromDot-zEte6bM_.js","./graphicalItemSelectors-DCiyiwSe.js","./format-B2iJpu8S.js","./market.module-MVB-GO7b.js","./market-BS0kvHW4.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./chevron-down-9e3l9_Db.js";import{t}from"./chevron-right-DyOe1NsY.js";import{t as n}from"./search-DlLds8Ae.js";import{_ as r,c as i,l as a,p as o,r as s,v as c,x as l}from"./index-Dfy2jMWq.js";import{n as u}from"./workspace-view-state-BuK4-c0r.js";import"./public-Csb687JC.js";import{r as d,t as f}from"./format-B2iJpu8S.js";import{t as p}from"./market.module-MVB-GO7b.js";var m=[[`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`]],h={categoryId:``,month:``,view:`categories`,metric:`sales`,recentYear:!1,q:``,sort:`sales`,direction:`desc`,page:1,pageSize:100,minPrice:``,maxPrice:``};function g(e,t){return u(`market.`+e,t)}var _=l(c(),1),v=l(r(),1),y=i();function b({text:e,label:t,title:n,children:r}){let[i,a]=(0,_.useState)(!1),[s,c]=(0,_.useState)(``),l=(0,_.useRef)(null),u=(0,_.useRef)(0);(0,_.useEffect)(()=>()=>{u.current++,l.current&&clearTimeout(l.current)},[]);async function d(){let t=++u.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!==u.current)return;a(!0)}catch{if(t!==u.current)return;n=`复制失败,请重试`,a(!1)}l.current&&clearTimeout(l.current),c(n),l.current=setTimeout(()=>c(``),1e3)}return(0,y.jsxs)(`span`,{className:p.copyControl,children:[(0,y.jsx)(`button`,{className:p.copyButton,"data-copied":i,"aria-label":t,title:n,onClick:()=>void d(),children:r||(0,y.jsx)(o,{size:12})}),s&&(0,y.jsx)(`span`,{className:p.copyFeedback,role:`status`,children:s})]})}function x({src:e,name:t,onClose:n}){let r=(0,_.useRef)(null),[i,o]=(0,_.useState)(!1);return(0,_.useEffect)(()=>{let e=document.activeElement;return r.current?.showModal(),()=>e?.focus()},[]),(0,v.createPortal)((0,y.jsxs)(`dialog`,{ref:r,className:p.imageViewer,"aria-label":`${t}大图`,onCancel:e=>{e.preventDefault(),n()},onClick:e=>{e.target===e.currentTarget&&n()},children:[(0,y.jsx)(`button`,{autoFocus:!0,className:p.imageViewerClose,"aria-label":`关闭商品大图`,onClick:n,children:(0,y.jsx)(a,{size:24})}),i?(0,y.jsx)(`p`,{role:`status`,children:`图片暂时无法加载`}):(0,y.jsx)(`img`,{src:e,alt:t,referrerPolicy:`no-referrer`,onError:()=>o(!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 S({src:e,name:t,hoverPreview:n=!0}){let[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(!1);(0,_.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,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`button`,{className:p.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,y.jsx)(`img`,{src:e,alt:t,loading:`lazy`,referrerPolicy:`no-referrer`})}),r&&!a&&(0,v.createPortal)((0,y.jsx)(`div`,{className:p.imageHoverPreview,"aria-hidden":`true`,style:{left:r.left,top:r.top,width:r.size,height:r.size},children:(0,y.jsx)(`img`,{src:e,alt:``,referrerPolicy:`no-referrer`})}),document.body),a&&(0,y.jsx)(x,{src:e,name:t,onClose:()=>{i(null),o(!1)}})]})}function C({title:e,children:t,onClose:n}){let r=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let e=document.activeElement;return r.current?.showModal(),()=>e?.focus()},[]),(0,y.jsxs)(`dialog`,{ref:r,className:p.dialog,onCancel:n,onClick:e=>{e.target===e.currentTarget&&n()},children:[(0,y.jsxs)(`header`,{children:[(0,y.jsx)(`h2`,{children:e}),(0,y.jsx)(`button`,{autoFocus:!0,onClick:n,"aria-label":`关闭弹窗`,children:(0,y.jsx)(a,{size:18})})]}),t]})}function w({categories:e,onChoose:t,disabled:r}){let[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(!1),c=(0,_.useRef)(null),l=d(e,i);(0,_.useEffect)(()=>{let e=e=>{e.target instanceof Node&&!c.current?.contains(e.target)&&s(!1)};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[]);function u(e){t(e),a(``),s(!1),c.current?.querySelector(`input`)?.focus()}return(0,y.jsxs)(`div`,{ref:c,className:p.categorySearch,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||s(!1)},onKeyDown:e=>{e.key===`Escape`&&(s(!1),c.current?.querySelector(`input`)?.focus()),e.key===`ArrowDown`&&e.target instanceof HTMLInputElement&&(e.preventDefault(),c.current?.querySelector(`[data-category-result]`)?.focus()),e.key===`Enter`&&e.target instanceof HTMLInputElement&&l[0]&&(e.preventDefault(),u(l[0].id))},children:[(0,y.jsxs)(`label`,{className:p.search,children:[(0,y.jsx)(n,{size:14}),(0,y.jsx)(`input`,{type:`search`,"aria-label":`搜索类目`,placeholder:`搜索类目名称或ID`,maxLength:100,disabled:r,value:i,onFocus:()=>s(!0),onChange:e=>{a(e.target.value),s(!0)}})]}),o&&!!i.trim()&&(0,y.jsxs)(`section`,{className:p.categorySearchResults,"aria-label":`类目搜索结果`,children:[(0,y.jsx)(`p`,{role:`status`,children:l.length?`找到 ${l.length} 个类目${l.length>100?`,显示前100个,请继续输入缩小范围`:``}`:`没有匹配的获准类目`}),l.slice(0,100).map(t=>(0,y.jsx)(`button`,{"data-category-result":!0,onClick:()=>u(t.id),children:f(e,t.id).map(e=>e.name).join(` / `)},t.id))]})]})}function T({categories:r,value:i,onChoose:a,disabled:o,favoriteIds:s}){let[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(``),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(!1),b=(0,_.useRef)(null);(0,_.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=f(r,u||i),S=r.filter(e=>s.includes(e.id)),C=(m?S:r).filter(e=>e.name.includes(c.trim()));function w(e){a(e),l(``),d(e),b.current&&(b.current.open=!1)}let T=[r.filter(e=>!e.parentId),...x.filter(e=>!e.leaf).map(e=>r.filter(t=>t.parentId===e.id))];return(0,y.jsxs)(`details`,{className:p.picker,ref:b,onToggle:e=>v(e.currentTarget.open),onKeyDown:e=>{e.key===`Escape`&&b.current&&(b.current.open=!1,b.current.querySelector(`summary`)?.focus())},children:[(0,y.jsxs)(`summary`,{"aria-label":`选择市场类目`,"aria-disabled":o,onClick:e=>{o&&e.preventDefault()},children:[f(r,i).map(e=>e.name).join(` / `)||`全部类目`,(0,y.jsx)(e,{size:14})]}),g&&(0,y.jsxs)(`div`,{className:p.pickerPanel,children:[(0,y.jsxs)(`label`,{children:[(0,y.jsx)(n,{size:14}),(0,y.jsx)(`input`,{"aria-label":`查找授权类目`,placeholder:`搜索类目名称`,value:c,onChange:e=>l(e.target.value)})]}),(0,y.jsxs)(`nav`,{className:p.pickerModes,"aria-label":`类目选择方式`,children:[(0,y.jsx)(`button`,{"aria-pressed":!m,onClick:()=>h(!1),children:`全部类目`}),(0,y.jsxs)(`button`,{"aria-pressed":m,onClick:()=>h(!0),children:[`我的收藏(`,S.length,`)`]})]}),!m&&(0,y.jsx)(`button`,{onClick:()=>w(``),children:`全部获准类目`}),c.trim()||m?(0,y.jsxs)(`div`,{className:p.pickerResults,children:[!C.length&&(0,y.jsx)(`p`,{role:`status`,className:p.pickerEmpty,children:m&&!S.length?`暂无收藏类目,点击类目旁的星标即可收藏。`:`没有匹配的类目。`}),(m?C:C.slice(0,100)).map(e=>(0,y.jsx)(`button`,{onClick:()=>w(e.id),children:f(r,e.id).map(e=>e.name).join(` / `)},e.id))]}):(0,y.jsx)(`div`,{className:p.cascade,children:T.map((e,n)=>(0,y.jsx)(`div`,{children:e.map(e=>(0,y.jsxs)(`div`,{onPointerEnter:t=>{t.pointerType===`mouse`&&d(e.id)},className:x.some(t=>t.id===e.id)?p.selectedCategory:``,children:[(0,y.jsx)(`button`,{onClick:()=>w(e.id),children:e.name}),!e.leaf&&(0,y.jsx)(`button`,{"aria-label":`展开${e.name}`,"aria-expanded":x.some(t=>t.id===e.id),onClick:()=>d(e.id),children:(0,y.jsx)(t,{size:13})})]},e.id))},n))})]})]})}function E({columns:e,allowed:t,onSave:n,onClose:r}){let[i,a]=(0,_.useState)(e),[o,s]=(0,_.useState)(null),c=e=>m.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,y.jsxs)(C,{title:`自定义数据字段(${i.length}/${t.length})`,onClose:r,children:[(0,y.jsxs)(`div`,{className:p.fieldLayout,children:[(0,y.jsxs)(`section`,{children:[(0,y.jsx)(`h3`,{children:`排行榜指标`}),t.map(e=>(0,y.jsxs)(`label`,{children:[(0,y.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,y.jsxs)(`section`,{children:[(0,y.jsxs)(`div`,{className:p.fieldTools,children:[(0,y.jsxs)(`span`,{children:[`已选 `,i.length,`/`,t.length]}),(0,y.jsx)(`button`,{onClick:()=>a(t),children:`恢复默认`}),(0,y.jsx)(`button`,{onClick:()=>a([]),children:`清空`})]}),(0,y.jsx)(`h3`,{children:`当前字段顺序`}),(0,y.jsx)(`ol`,{children:i.map((e,t)=>(0,y.jsxs)(`li`,{draggable:!0,onDragStart:()=>s(e),onDragOver:e=>e.preventDefault(),onDrop:()=>{o&&l(i.indexOf(o),t),s(null)},children:[(0,y.jsxs)(`span`,{children:[`⠿ `,t+1,`. `,c(e)]}),(0,y.jsx)(`button`,{disabled:t===0,"aria-label":`上移${c(e)}`,onClick:()=>l(t,t-1),children:`↑`}),(0,y.jsx)(`button`,{disabled:t===i.length-1,"aria-label":`下移${c(e)}`,onClick:()=>l(t,t+1),children:`↓`})]},e))})]})]}),(0,y.jsxs)(`footer`,{className:p.dialogActions,children:[(0,y.jsx)(`button`,{onClick:r,children:`取消`}),(0,y.jsx)(`button`,{className:p.primary,onClick:()=>n(i),children:`确定`})]})]})}var D=(0,_.lazy)(()=>s(()=>import(`./TrendChart-Doe6C5Aa.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url));function O(e){return(0,y.jsx)(_.Suspense,{fallback:(0,y.jsx)(`p`,{role:`status`,children:`正在加载趋势图…`}),children:(0,y.jsx)(D,{...e})})}export{C as a,h as c,b as i,g as l,w as n,S as o,E as r,O as s,T as t,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as e}from"./index-Dfy2jMWq.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./CollaborationWorkspace-mIgLrpSm.js";import{c as t}from"./index-Dfy2jMWq.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./project-public-
|
|
2
|
-
import{n as e}from"./clock-3-FwWbroxq.js";import{t}from"./chevron-right-CBsoF5G4.js";import{i as n,n as r,r as i,t as a}from"./products-CbH-UtYD.js";import{t as o}from"./layers-B2HCPHyD.js";import{t as s}from"./refresh-cw-D4mG6C6S.js";import{t as c}from"./search-CdjDi2Fc.js";import{a as l,g as u,o as d,p as f,s as p,t as m,y as h}from"./index-D-naxjQC.js";import{n as g}from"./module-host-CgoJybnQ.js";import{n as _}from"./workspace-view-state-DipEJ8gV.js";import"./public-Bld0NLnN.js";import{t as v}from"./group-CvTiToSZ.js";var y=f(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),b=h(u(),1);async function x(e){let t=await e(`/growth-center`);if(!t||!Array.isArray(t.products)||typeof t.updatedAt!=`string`||t.products.some(e=>!e||typeof e.key!=`string`||typeof e.itemId!=`string`||typeof e.project!=`string`||!Array.isArray(e.series)||e.series.some(e=>!e||!Array.isArray(e.points))))throw Error(`商品资料返回格式异常`);return t}function S(e){let[t,n]=(0,b.useState)(null),[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(!0),s=(0,b.useRef)(0),c=(0,b.useRef)(!1),l=(0,b.useCallback)(()=>{let t=++s.current;return x(e).then(e=>c.current&&s.current===t?(n(e),i(``),!0):!1).catch(e=>(c.current&&s.current===t&&(n(null),i(e instanceof Error?e.message:`商品资料读取失败`)),!1)).finally(()=>{c.current&&s.current===t&&o(!1)})},[e]),u=(0,b.useCallback)(()=>(o(!0),i(``),l()),[l]);return(0,b.useEffect)(()=>(c.current=!0,l(),()=>{c.current=!1}),[l]),{data:t,error:r,loading:a,refresh:u}}var C=[{id:`test`,n:`03`,name:`新品测试`,caption:`运营策略 · 测试`,color:`var(--omni-chart-primary,#6fa7ff)`,goal:`少量投入,找到有人喜欢的商品`,cadence:`推广每天看 · 商品每5天看`,rule:`同品类、同属性、同材质一起测。对照店里第二梯队头部商品:低的继续跑,中的进入孵化候选,高的进一步评估。`,action:`查看点击、加购表现,筛选候选商品。`},{id:`incubate`,n:`02`,name:`持续孵化`,caption:`运营策略 · 培养`,color:`var(--omni-chart-secondary,#b99aff)`,goal:`培养潜力款,让成熟商品赚钱`,cadence:`新品每5天看 · 老品每7天看`,rule:`新商品看加购率与转化率;成熟商品看付费占比。低的放大,高的调整计划或暂停,同时优化主图、视频等。`,action:`区分赚钱款与潜力款,安排下一轮优化。`},{id:`scale`,n:`01`,name:`重点推广`,caption:`运营策略 · 放大`,color:`var(--omni-chart-teal,#44cdb5)`,goal:`集中资源,持续增加付款人数`,cadence:`推广每30–60分钟看 · 商品每天看`,rule:`拉新看点击成本、加购成本;收割看点击成本、成交成本。调整差计划,把预算分配给同类好计划;没有合适计划就新建测试。`,action:`查看广告计划,按老师给企业制定的标准处理。`}],w={unassigned:`待分组`,test:`新品测试`,incubate:`持续孵化`,scale:`重点推广`},T=e=>typeof e==`number`?e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}):`—`;function E(e,t){return e.filter(e=>t===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`)}function D(e,t,n){let r=n.trim().toLowerCase();return e.filter(e=>(t===`all`||e.tier===t)&&`${e.itemId} ${e.projectName} ${e.title||``} ${e.shopName||``}`.toLowerCase().includes(r))}function O(e,t){return e.find(e=>e.key===t)||e[0]}var k=d();function A({series:e}){if(!e?.points.length)return(0,k.jsx)(`div`,{className:`gw-chart-empty`,children:`选择商品后,查看已有数据趋势。`});let t=e.points.slice(-30),n=t.flatMap(e=>e.value===null?[]:[e.value]),r=n.length?Math.min(...n):0,i=n.length?Math.max(...n):1,a=(e,n)=>[32+n*636/Math.max(1,t.length-1),150-((e.value??r)-r)/(i-r||1)*115],o=null,s=[];return t.forEach((t,n)=>{if(t.value===null){o=null;return}let[r,i]=a(t,n);o&&Date.parse(t.date)-Date.parse(o.date)===864e5&&s.push((0,k.jsx)(`line`,{x1:o.x,y1:o.y,x2:r,y2:i},`l`+n)),s.push((0,k.jsx)(`circle`,{cx:r,cy:i,r:`3`,children:(0,k.jsxs)(`title`,{children:[t.date,`:`,T(t.value),` `,e.unit]})},`p`+n)),o={x:r,y:i,date:t.date}}),(0,k.jsxs)(`div`,{className:`gw-chart`,children:[(0,k.jsxs)(`svg`,{viewBox:`0 0 700 185`,role:`img`,"aria-label":`${e.name}最近${t.length}个归档日期的趋势,缺失日期不连线`,children:[(0,k.jsx)(`defs`,{children:(0,k.jsxs)(`linearGradient`,{id:`product-chart-bg`,x1:`0`,x2:`0`,y1:`0`,y2:`1`,children:[(0,k.jsx)(`stop`,{stopColor:`var(--omni-chart-teal,#4cd5af)`,stopOpacity:`.1`}),(0,k.jsx)(`stop`,{offset:`1`,stopColor:`var(--omni-chart-teal,#4cd5af)`,stopOpacity:`0`})]})}),(0,k.jsx)(`rect`,{x:`30`,y:`20`,width:`640`,height:`145`,fill:`url(#product-chart-bg)`}),[35,92,150].map(e=>(0,k.jsx)(`line`,{x1:`30`,x2:`670`,y1:e,y2:e,className:`grid`},e)),(0,k.jsx)(`g`,{className:`plot`,children:s}),(0,k.jsx)(`text`,{x:`32`,y:`178`,children:t[0]?.date}),(0,k.jsx)(`text`,{x:`668`,y:`178`,textAnchor:`end`,children:t.at(-1)?.date}),(0,k.jsxs)(`text`,{x:`32`,y:`16`,children:[T(i),` `,e.unit]})]}),(0,k.jsx)(`span`,{children:`最近最多30个归档日期 · 缺失不补零 · 不同日期不汇总`})]})}function j({product:t,metricKey:n,onMetric:r,onGroup:i,onTask:o,onOpen:s}){if(!t)return(0,k.jsx)(`div`,{className:`gw-empty`,children:`选择商品查看趋势与后续操作。`});let c=t.series.find(e=>e.key===n)||t.series.find(e=>e.metric===`buyers`)||t.series[0],l=C.find(e=>e.id===t.tier);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`gw-selected-product`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(a,{product:t}),(0,k.jsx)(`span`,{className:`gw-tag `+t.tier,children:w[t.tier]})]}),(0,k.jsxs)(`button`,{onClick:()=>i(t),children:[(0,k.jsx)(y,{size:14}),`分组`]})]}),(0,k.jsxs)(`div`,{className:`gw-metric-selector`,children:[(0,k.jsx)(`select`,{"aria-label":`商品趋势指标`,value:c?.key||``,onChange:e=>r(e.target.value),children:t.series.map(e=>(0,k.jsxs)(`option`,{value:e.key,children:[e.name,` · `,e.unit||`原始单位`]},e.key))}),(0,k.jsxs)(`strong`,{children:[T(c?.points.at(-1)?.value),(0,k.jsx)(`small`,{children:c?.unit})]}),(0,k.jsxs)(`span`,{children:[`最后统计日:`,c?.points.at(-1)?.date||`—`]})]}),(0,k.jsx)(A,{series:c}),(0,k.jsxs)(`details`,{className:`gw-points`,children:[(0,k.jsx)(`summary`,{children:`查看每日原值与来源`}),(0,k.jsx)(`div`,{className:`gw-table-scroll`,children:(0,k.jsxs)(`table`,{children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`th`,{children:`日期`}),(0,k.jsx)(`th`,{children:`原值`}),(0,k.jsx)(`th`,{children:`来源`})]})}),(0,k.jsx)(`tbody`,{children:c?.points.slice(-30).map(e=>(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`td`,{children:e.date}),(0,k.jsx)(`td`,{children:T(e.value)}),(0,k.jsx)(`td`,{children:(0,k.jsx)(`a`,{href:`/api/workbench/`+t.project+`/file/`+e.fileId,children:`原始归档`})})]},e.date))})]})})]}),(0,k.jsxs)(`div`,{className:`gw-next`,children:[(0,k.jsx)(`span`,{children:`NEXT / 下一步`}),(0,k.jsx)(`h3`,{children:l?.action||`先选择这个商品的运营策略`}),(0,k.jsxs)(`p`,{children:[l?.cadence||`分组后查看对应检查频率和处理办法。`,t.note&&` · `+t.note]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`button`,{onClick:()=>o(t),children:`查看当前任务`}),(0,k.jsxs)(`button`,{className:`gw-primary`,onClick:()=>s(t.project,{tab:`monitor`,itemId:t.itemId}),children:[`查看监控与取数 `,(0,k.jsx)(e,{size:13})]}),(0,k.jsx)(`button`,{onClick:()=>s(t.project,{tab:`optimization`,itemId:t.itemId}),children:`商品优化`})]})]}),(0,k.jsx)(`p`,{className:`gw-detail-note`,children:`展示本项目归档的商品指标。点击率、加购率、计划成本等尚未汇入此表;请到来源数据中核对。`})]})}function M({section:e,onSection:l}){let u=g(),{data:d,error:f,loading:p,refresh:m}=S(u.api),h=u.archiveScope||`real`,[y,x]=_(`products.query`,``),[T,A]=_(`products.key`,``),[M,N]=_(`products.metric`,``),[P,F]=(0,b.useState)(``),[I,L]=(0,b.useState)(null),[R,z]=(0,b.useState)(null),B=(0,b.useRef)(null),V=e===`all`||w[e]?e:`all`,H=E(d?.products||[],h),U=D(H,V,y),W=O(U,T);function G(e){A(e.key),N(``),F(``)}function K(e,t){if(t===`work`){z(e);return}t===`data`?(l(`all`),x(``),G(e),requestAnimationFrame(()=>{B.current?.scrollIntoView({behavior:`smooth`,block:`start`}),B.current?.focus({preventScroll:!0})})):u.onOpen(e.project,{tab:t,itemId:e.itemId})}return(0,k.jsx)(`div`,{className:`products-module`,children:(0,k.jsx)(`div`,{className:`gw`,children:(0,k.jsxs)(`div`,{className:`gw-body`,children:[(0,k.jsxs)(`header`,{className:`gw-header`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`small`,{children:`商品 / 商品看板`}),(0,k.jsx)(`h1`,{children:`从测试到重点推广`})]}),(0,k.jsxs)(`div`,{className:`gw-header-actions`,children:[(0,k.jsxs)(`span`,{children:[(0,k.jsx)(`i`,{className:`gw-dot`}),`归档数据 · 非实时`]}),(0,k.jsxs)(`button`,{onClick:()=>void m(),disabled:p,children:[(0,k.jsx)(s,{size:14}),p?`读取中`:`刷新数据`]})]})]}),(0,k.jsx)(`div`,{className:`gw-scope`,children:(0,k.jsx)(`span`,{children:d?`${new Date(d.updatedAt).toLocaleString(`zh-CN`)} 读取归档`:p?`正在读取归档…`:`商品资料未就绪`})}),f&&(0,k.jsxs)(`p`,{role:`alert`,className:`gw-message`,children:[f,` `,(0,k.jsx)(`button`,{onClick:()=>void m(),children:`重试`})]}),P&&(0,k.jsx)(`p`,{role:`status`,className:`gw-message`,children:P}),(0,k.jsx)(n,{products:H,tiers:C,ready:!!d&&!p,onAction:K,onAssign:(e,t)=>L({product:e,suggestedTier:t})}),R&&(0,k.jsx)(i,{product:R,onOpen:u.onOpen,onClose:()=>z(null)}),I&&(0,k.jsx)(r,{...I,products:H,onDirty:u.onDirty,onBusy:u.onBusy,onClose:()=>L(null),onSave:async(e,t,n,r)=>{await v(u.api,e,t,n,r),F(await m()?`分组已保存,看板已更新。`:`分组已保存,但看板读取失败,请刷新后查看。`)}}),(0,k.jsxs)(`div`,{className:`gw-operating`,children:[(0,k.jsxs)(`section`,{className:`gw-panel gw-products`,children:[(0,k.jsxs)(`div`,{className:`gw-section-title`,children:[(0,k.jsx)(`h2`,{children:`商品工作清单`}),(0,k.jsxs)(`span`,{children:[U.length,` 个观察对象`]})]}),(0,k.jsxs)(`div`,{className:`gw-filters`,children:[(0,k.jsxs)(`label`,{children:[(0,k.jsx)(c,{size:14}),(0,k.jsx)(`input`,{"aria-label":`搜索经营商品`,placeholder:`搜索商品ID或项目`,value:y,onChange:e=>x(e.target.value)})]}),(0,k.jsxs)(`select`,{"aria-label":`商品运营分组`,value:V,onChange:e=>{l(e.target.value),A(``)},children:[(0,k.jsx)(`option`,{value:`all`,children:`全部运营分组`}),Object.entries(w).map(([e,t])=>(0,k.jsx)(`option`,{value:e,children:t},e))]})]}),V!==`all`&&(0,k.jsxs)(`div`,{className:`gw-rule`,children:[(0,k.jsx)(`b`,{children:w[V]}),(0,k.jsx)(`p`,{children:C.find(e=>e.id===V)?.rule||`选择商品后确认分组。归档记录不能直接证明商品属于哪个梯队。`})]}),(0,k.jsx)(`div`,{className:`gw-table-scroll`,children:(0,k.jsxs)(`table`,{children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`th`,{children:`商品 / 所属项目`}),(0,k.jsx)(`th`,{children:`当前运营分组`}),(0,k.jsx)(`th`,{children:`已有指标`}),(0,k.jsx)(`th`,{children:`操作`})]})}),(0,k.jsx)(`tbody`,{children:U.map(e=>(0,k.jsxs)(`tr`,{className:W?.key===e.key?`selected`:``,children:[(0,k.jsx)(`td`,{children:(0,k.jsx)(a,{product:e})}),(0,k.jsx)(`td`,{children:(0,k.jsx)(`span`,{className:`gw-tag `+e.tier,children:w[e.tier]})}),(0,k.jsxs)(`td`,{children:[e.series.length,` 项`,(0,k.jsx)(`small`,{children:e.series.map(e=>e.name).slice(0,2).join(` / `)})]}),(0,k.jsx)(`td`,{children:(0,k.jsxs)(`button`,{"aria-label":`查看商品 `+e.itemId+` `+e.projectName,onClick:()=>G(e),children:[`查看 `,(0,k.jsx)(t,{size:12})]})})]},e.key))})]})}),!U.length&&(0,k.jsxs)(`div`,{className:`gw-empty`,children:[(0,k.jsx)(o,{size:29}),(0,k.jsx)(`b`,{children:f?`商品资料读取失败`:p?`正在读取商品…`:y?`没有匹配的商品`:`这个分组还没有商品`}),(0,k.jsx)(`p`,{children:`切换到“待分组”确认商品运营分组,或从项目监控中归档商品数据。`}),(0,k.jsx)(`button`,{onClick:()=>{x(``),l(`unassigned`)},children:`查看待分组`}),(0,k.jsx)(`button`,{onClick:()=>u.onModule(`projects`),children:`进入项目执行`})]})]}),(0,k.jsxs)(`section`,{ref:B,tabIndex:-1,className:`gw-panel gw-product-detail`,children:[(0,k.jsxs)(`div`,{className:`gw-section-title`,children:[(0,k.jsx)(`h2`,{children:`商品数据与下一步`}),(0,k.jsx)(`span`,{children:`点表格切换`})]}),(0,k.jsx)(j,{product:W,metricKey:M,onMetric:N,onGroup:e=>L({product:e}),onTask:z,onOpen:u.onOpen})]})]}),(0,k.jsx)(`p`,{className:`gw-detail-note`,children:`这里的“新品测试、持续孵化、重点推广”是人工保存的运营策略,不是按全店支付销售额贡献、访客和支付买家核验的第一、二、三梯队。切换分组不会自动投放或改变经营梯队。`}),(0,k.jsxs)(`footer`,{className:`gw-footer`,children:[(0,k.jsx)(`span`,{children:`规则来源:店铺链接 AI 自动化孵化与打爆`}),(0,k.jsxs)(`details`,{children:[(0,k.jsx)(`summary`,{children:`检查频率与执行状态说明`}),(0,k.jsx)(`p`,{children:`运营策略卡片展示原方案的建议检查频率,不表示调度已启用。老师结合企业数据制定具体判断标准;本页支持归档查询、趋势查看和分组保存。广告计划的建立、暂停及预算调整尚未在本页接通。`})]})]})]})})})}function N(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function P(e){return typeof e==`string`&&!!e.trim()}function F(e){if(e==null||e===``)return null;let t=typeof e==`number`?e:typeof e==`string`?Number(e):NaN;if(!Number.isFinite(t)||t<0)throw Error(`商品价格格式异常`);return t}async function I(e){async function t(t){let n=await fetch(`/v1/enterprise/`+t,{signal:e,cache:`no-store`});if(!n.ok)throw Error(n.status===401?`登录已失效,请重新登录`:n.status===403?`当前账号没有店铺商品读取权限`:`店铺商品读取失败,请重试`);if(!n.headers.get(`content-type`)?.includes(`application/json`))throw Error(`店铺商品服务尚未接入`);return n.json()}let[n,r]=await Promise.all([t(`products`),t(`shops`)]);if(!N(n)||!Array.isArray(n.products)||!Array.isArray(n.listings)||!N(r)||!Array.isArray(r.shops))throw Error(`店铺商品返回格式异常`);let i=new Map;for(let e of n.products){if(!N(e)||!P(e.product_id)||!P(e.project_id)||!P(e.name))throw Error(`商品关联项目格式异常`);i.set(e.product_id,{id:e.project_id,name:e.name})}let a=new Map;for(let e of r.shops){if(!N(e)||!P(e.id)||!P(e.name)||![`real`,`simulated`,`unverified`].includes(String(e.mode)))throw Error(`店铺资料格式异常`);a.set(e.id,{name:e.name,mode:e.mode===`real`?`declared-real`:e.mode})}let o=[],s=new Set;for(let e of n.listings){if(!N(e)||!P(e.id)||!P(e.product_id)||!P(e.shop_id)||!P(e.platform_item_id)||typeof e.title!=`string`)throw Error(`店铺商品记录不完整`);let t=a.get(e.shop_id),n=i.get(e.product_id);if(!t)continue;if(!n)throw Error(`店铺商品关联项目缺失,请刷新重试`);let r=JSON.stringify([e.shop_id,e.platform_item_id]);if(s.has(r))throw Error(`店铺商品身份重复,请核对资料`);s.add(r),o.push({key:e.id,itemId:e.platform_item_id,title:e.title,image:typeof e.image_data_url==`string`?e.image_data_url:void 0,shopId:e.shop_id,shopName:t.name,project:n.id,projectName:n.name,mode:t.mode,category:typeof e.category==`string`?e.category:void 0,price:F(e.price)})}return o}function L(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(!0),o=(0,b.useRef)(null),s=(0,b.useCallback)(()=>{o.current?.abort();let e=new AbortController;return o.current=e,I(e.signal).then(n=>{e.signal.aborted||(t(n),r(``))}).catch(n=>{e.signal.aborted||(t(null),r(n instanceof Error?n.message:`店铺商品读取失败`))}).finally(()=>{e.signal.aborted||a(!1)})},[]),c=(0,b.useCallback)(()=>(a(!0),r(``),s()),[s]);return(0,b.useEffect)(()=>(s(),()=>o.current?.abort()),[s]),{data:e,error:n,loading:i,refresh:c}}function R(e,t,n,r=``){return e.filter(e=>(!r||e.shopId===r)&&(n===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`)).map(e=>({...e,archives:t.filter(t=>t.project===e.project&&t.itemId===e.itemId&&t.shopIds?.length===1&&t.shopIds[0]===e.shopId&&(n===`stored-demo`?t.mode===`simulated`:t.mode!==`simulated`))}))}function z(e){let t=e.archives.length===1?e.archives[0]:void 0,n=t?.series.flatMap(e=>e.points.map(e=>e.date)).sort().at(-1)||``;function r(e,r){let i=t?.series.filter(t=>e.includes(t.metric)&&r.includes(t.unit))||[];if(i.length!==1)return null;let a=i[0].points.find(e=>e.date===n);return typeof a?.value==`number`&&Number.isFinite(a.value)?a.value:null}return{date:n,paid:r([`paid`,`revenue`],[`元`,`CNY`]),uv:r([`visitors`,`uv`],[`人`]),buyers:r([`buyers`],[`人`])}}function B(e,t,n){let r=t.trim().toLowerCase();return e.filter(e=>`${e.itemId} ${e.title} ${e.shopName} ${e.projectName} ${e.category||``}`.toLowerCase().includes(r)&&(n===`all`||(e.archives.length===1?e.archives[0].tier:e.archives.length===0?`unassigned`:``)===n))}var V=20;function H(){let e=g(),n=l(),u=L(),d=S(e.api),f=e.archiveScope||`real`,[m,h]=_(`products.query`,``),[y,x]=_(`products.shopTier`,`all`),[C,E]=_(`products.key`,``),[D,O]=_(`products.metric`,``),[A,M]=(0,b.useState)(1),[N,P]=(0,b.useState)(``),[F,I]=(0,b.useState)(null),[H,U]=(0,b.useState)(null),W=(0,b.useRef)(null),G=R(u.data||[],d.data?.products||[],f,n?.selected),K=d.error||d.loading?`all`:y,q=B(G,m,K),J=Math.max(1,Math.ceil(q.length/V)),Y=Math.min(A,J),X=d.data?.products.find(e=>e.key===C&&(f===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`)),Z=G.filter(e=>e.archives.some(e=>e.series.some(e=>e.points.length))).length,Q=u.loading||d.loading;function $(e){E(e.key),O(``),requestAnimationFrame(()=>{W.current?.scrollIntoView({behavior:`smooth`,block:`start`}),W.current?.focus({preventScroll:!0})})}return(0,k.jsx)(`div`,{className:`products-module`,children:(0,k.jsx)(`div`,{className:`gw shop-catalog`,children:(0,k.jsxs)(`div`,{className:`gw-body`,children:[(0,k.jsxs)(`header`,{className:`gw-header`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`small`,{children:`商品 / 全部商品`}),(0,k.jsx)(`h1`,{children:`店铺商品`}),(0,k.jsx)(`p`,{children:`查看店铺内已建档的商品与经营数据,再安排测试、孵化和推广。`})]}),(0,k.jsxs)(`div`,{className:`gw-header-actions`,children:[(0,k.jsxs)(`span`,{children:[(0,k.jsx)(`i`,{className:`gw-dot`}),`店铺建档与归档数据 · 非实时`]}),(0,k.jsxs)(`button`,{disabled:Q,onClick:()=>{u.refresh(),d.refresh()},children:[(0,k.jsx)(s,{size:14}),Q?`读取中`:`刷新数据`]})]})]}),(0,k.jsx)(`div`,{className:`gw-scope`,children:(0,k.jsx)(`span`,{children:n?.shops.find(e=>e.id===n.selected)?.name||`全部授权店铺`})}),u.error&&(0,k.jsxs)(`p`,{className:`gw-message`,role:`alert`,children:[u.error,` `,(0,k.jsx)(`button`,{onClick:()=>void u.refresh(),children:`重试店铺商品`})]}),d.error&&(0,k.jsxs)(`p`,{className:`gw-message`,role:`alert`,children:[`经营指标暂不可用:`,d.error,` `,(0,k.jsx)(`button`,{onClick:()=>void d.refresh(),children:`重试经营指标`})]}),N&&(0,k.jsx)(`p`,{className:`gw-message`,role:`status`,children:N}),(0,k.jsxs)(`section`,{className:`gw-panel shop-catalog-list`,"aria-label":`店铺商品列表`,children:[(0,k.jsxs)(`div`,{className:`gw-section-title`,children:[(0,k.jsx)(`h2`,{children:`全部商品`}),(0,k.jsx)(`span`,{children:u.loading?`正在读取商品…`:u.error?`商品总数暂不可用`:`当前范围 ${G.length} 个已建档商品`})]}),!u.error&&u.data&&(0,k.jsxs)(`div`,{className:`shop-catalog-summary`,children:[(0,k.jsxs)(`span`,{children:[`已有经营归档 `,(0,k.jsx)(`b`,{children:d.error||d.loading?`—`:Z})]}),(0,k.jsxs)(`span`,{children:[`待补充经营数据 `,(0,k.jsx)(`b`,{children:d.error||d.loading?`—`:G.length-Z})]}),(0,k.jsx)(`span`,{children:`未归档的指标显示“—”`})]}),(0,k.jsxs)(`div`,{className:`gw-filters`,children:[(0,k.jsxs)(`label`,{children:[(0,k.jsx)(c,{size:15}),(0,k.jsx)(`input`,{"aria-label":`搜索店铺商品`,placeholder:`搜索商品名称、ID、店铺、类目或项目`,value:m,onChange:e=>{h(e.target.value),M(1)}})]}),(0,k.jsxs)(`select`,{"aria-label":`筛选店铺商品分组`,value:K,disabled:d.loading||!!d.error,onChange:e=>{x(e.target.value),M(1)},children:[(0,k.jsx)(`option`,{value:`all`,children:`全部运营分组`}),Object.entries(w).map(([e,t])=>(0,k.jsx)(`option`,{value:e,children:t},e))]})]}),(0,k.jsx)(`div`,{className:`gw-table-scroll`,children:(0,k.jsxs)(`table`,{children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`th`,{children:`商品 / 店铺`}),(0,k.jsx)(`th`,{children:`建档价格(元)`}),(0,k.jsx)(`th`,{children:`访客数`}),(0,k.jsx)(`th`,{children:`支付买家数`}),(0,k.jsx)(`th`,{children:`支付销售额(元)`}),(0,k.jsx)(`th`,{children:`统计日期`}),(0,k.jsx)(`th`,{children:`运营分组`}),(0,k.jsx)(`th`,{children:`操作`})]})}),(0,k.jsx)(`tbody`,{children:q.slice((Y-1)*V,Y*V).map(n=>{let r=z(n),i=n.archives.length===1?n.archives[0]:void 0;return(0,k.jsxs)(`tr`,{className:i?.key===X?.key&&i?`selected`:``,children:[(0,k.jsxs)(`td`,{children:[(0,k.jsx)(a,{product:n}),(0,k.jsxs)(`small`,{children:[n.category||`类目未录入`,` · `,n.projectName]})]}),(0,k.jsx)(`td`,{children:T(n.price)}),(0,k.jsx)(`td`,{children:T(r.uv)}),(0,k.jsx)(`td`,{children:T(r.buyers)}),(0,k.jsx)(`td`,{children:T(r.paid)}),(0,k.jsxs)(`td`,{children:[r.date||`—`,(0,k.jsx)(`small`,{children:d.loading?`读取指标中`:d.error?`指标读取失败`:n.archives.length>1?`多份归档,分别查看`:r.date?`已归档`:`暂无经营数据`})]}),(0,k.jsx)(`td`,{children:d.error||d.loading?`—`:n.archives.length>1?`分组待核对`:(0,k.jsx)(`span`,{className:`gw-tag `+(i?.tier||`unassigned`),children:w[i?.tier||`unassigned`]})}),(0,k.jsx)(`td`,{children:n.archives.length?n.archives.map((e,r)=>(0,k.jsxs)(`button`,{"aria-label":`查看商品 ${n.itemId} ${n.shopName} 归档 ${r+1}`,onClick:()=>$(e),children:[n.archives.length>1?`查看归档 ${r+1}`:`查看数据`,(0,k.jsx)(t,{size:12})]},e.key)):(0,k.jsxs)(`button`,{disabled:d.loading||!!d.error,onClick:()=>e.onOpen(n.project,{tab:`monitor`,itemId:n.itemId}),children:[d.loading?`读取中`:d.error?`指标不可用`:`补充数据`,(0,k.jsx)(t,{size:12})]})})]},n.key)})})]})}),!q.length&&(0,k.jsxs)(`div`,{className:`gw-empty`,role:`status`,children:[(0,k.jsx)(o,{size:29}),(0,k.jsx)(`b`,{children:u.error?`店铺商品读取失败`:u.loading?`正在读取店铺商品…`:m||K!==`all`?`没有匹配的商品`:`当前范围还没有已建档商品`}),(0,k.jsx)(`p`,{children:u.error?`请重试,或检查账号与数据服务连接。`:u.loading?`正在读取当前授权范围的商品目录。`:m||K!==`all`?`调整搜索或运营分组筛选后再查看。`:`请先关联店铺商品。已关联商品即使没有经营归档,也会显示在这里。`}),!u.loading&&!u.error&&(m||K!==`all`)&&(0,k.jsx)(`button`,{onClick:()=>{h(``),x(`all`),M(1)},children:`清除筛选`})]}),q.length>0&&(0,k.jsxs)(`div`,{className:`shop-catalog-pagination`,children:[(0,k.jsxs)(`span`,{children:[`筛选结果 `,q.length,` 个 · 第 `,Y,` / `,J,` 页`]}),(0,k.jsx)(`button`,{disabled:Y<=1,onClick:()=>M(Y-1),children:`上一页`}),(0,k.jsx)(`button`,{disabled:Y>=J,onClick:()=>M(Y+1),children:`下一页`})]})]}),(0,k.jsx)(`p`,{className:`gw-detail-note`,children:`仅显示当前授权店铺已建档商品,尚不代表平台全店商品已同步。经营指标按每个商品的最新归档统计日展示,不同商品日期可能不同;缺值不补零,多店合并归档不分摊到单店。`}),X&&(0,k.jsxs)(`section`,{ref:W,tabIndex:-1,className:`gw-panel gw-product-detail shop-catalog-detail`,children:[(0,k.jsxs)(`div`,{className:`gw-section-title`,children:[(0,k.jsx)(`h2`,{children:`商品数据与下一步`}),(0,k.jsx)(`button`,{"aria-label":`关闭商品详情`,onClick:()=>E(``),children:(0,k.jsx)(p,{size:15})})]}),(0,k.jsx)(j,{product:X,metricKey:D,onMetric:O,onGroup:I,onTask:U,onOpen:e.onOpen})]}),H&&(0,k.jsx)(i,{product:H,onOpen:e.onOpen,onClose:()=>U(null)}),F&&(0,k.jsx)(r,{product:F,products:(d.data?.products||[]).filter(e=>f===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`),onDirty:e.onDirty,onBusy:e.onBusy,onClose:()=>I(null),onSave:async(t,n,r,i)=>{await v(e.api,t,n,r,i),P(await d.refresh()?`分组已保存,商品数据已更新。`:`分组已保存,但数据读取失败,请刷新后查看。`)}})]})})})}var U=(0,b.lazy)(()=>m(()=>import(`./project-public-BMmK5Vm_.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url));function W({section:e,onSection:t,project:n}){return n?(0,k.jsx)(b.Suspense,{fallback:(0,k.jsx)(`p`,{role:`status`,children:`正在打开商品工具…`}),children:(0,k.jsx)(U,{section:e,project:n})}):e===`all`?(0,k.jsx)(H,{}):(0,k.jsx)(M,{section:e,onSection:t})}export{W as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./project-public-DN0-E_G2.js","./index-Dfy2jMWq.js","./index-DT6aELxD.css","./CartesianChart-aa0EJ6w3.js","./LineChart-tppycNHl.js","./ErrorBarContext-BeuyujN4.js","./getRadiusAndStrokeWidthFromDot-zEte6bM_.js","./EvidenceSourceGuide-BeBcvVcI.js","./HelpTip-BfrAVfV_.js","./HelpTip-BsHPhMNf.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e}from"./clock-3-TXgD8tS6.js";import{t}from"./chevron-right-DyOe1NsY.js";import{i as n,n as r,r as i,t as a}from"./products-6S_LnOq6.js";import{t as o}from"./layers-B4gCFnEm.js";import{t as s}from"./refresh-cw-CiIEylYp.js";import{t as c}from"./search-DlLds8Ae.js";import{c as l,h as u,l as d,r as f,s as p,v as m,x as h}from"./index-Dfy2jMWq.js";import{n as g}from"./module-host-BIy_fI1T.js";import{n as _}from"./workspace-view-state-BuK4-c0r.js";import"./public-Csb687JC.js";import{t as v}from"./group-DIi_QccB.js";var y=u(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),b=h(m(),1);async function x(e){let t=await e(`/growth-center`);if(!t||!Array.isArray(t.products)||typeof t.updatedAt!=`string`||t.products.some(e=>!e||typeof e.key!=`string`||typeof e.itemId!=`string`||typeof e.project!=`string`||!Array.isArray(e.series)||e.series.some(e=>!e||!Array.isArray(e.points))))throw Error(`商品资料返回格式异常`);return t}function S(e){let[t,n]=(0,b.useState)(null),[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(!0),s=(0,b.useRef)(0),c=(0,b.useRef)(!1),l=(0,b.useCallback)(()=>{let t=++s.current;return x(e).then(e=>c.current&&s.current===t?(n(e),i(``),!0):!1).catch(e=>(c.current&&s.current===t&&(n(null),i(e instanceof Error?e.message:`商品资料读取失败`)),!1)).finally(()=>{c.current&&s.current===t&&o(!1)})},[e]),u=(0,b.useCallback)(()=>(o(!0),i(``),l()),[l]);return(0,b.useEffect)(()=>(c.current=!0,l(),()=>{c.current=!1}),[l]),{data:t,error:r,loading:a,refresh:u}}var C=[{id:`test`,n:`03`,name:`新品测试`,caption:`运营策略 · 测试`,color:`var(--omni-chart-primary,#6fa7ff)`,goal:`少量投入,找到有人喜欢的商品`,cadence:`推广每天看 · 商品每5天看`,rule:`同品类、同属性、同材质一起测。对照店里第二梯队头部商品:低的继续跑,中的进入孵化候选,高的进一步评估。`,action:`查看点击、加购表现,筛选候选商品。`},{id:`incubate`,n:`02`,name:`持续孵化`,caption:`运营策略 · 培养`,color:`var(--omni-chart-secondary,#b99aff)`,goal:`培养潜力款,让成熟商品赚钱`,cadence:`新品每5天看 · 老品每7天看`,rule:`新商品看加购率与转化率;成熟商品看付费占比。低的放大,高的调整计划或暂停,同时优化主图、视频等。`,action:`区分赚钱款与潜力款,安排下一轮优化。`},{id:`scale`,n:`01`,name:`重点推广`,caption:`运营策略 · 放大`,color:`var(--omni-chart-teal,#44cdb5)`,goal:`集中资源,持续增加付款人数`,cadence:`推广每30–60分钟看 · 商品每天看`,rule:`拉新看点击成本、加购成本;收割看点击成本、成交成本。调整差计划,把预算分配给同类好计划;没有合适计划就新建测试。`,action:`查看广告计划,按老师给企业制定的标准处理。`}],w={unassigned:`待分组`,test:`新品测试`,incubate:`持续孵化`,scale:`重点推广`},T=e=>typeof e==`number`?e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}):`—`;function E(e,t){return e.filter(e=>t===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`)}function D(e,t,n){let r=n.trim().toLowerCase();return e.filter(e=>(t===`all`||e.tier===t)&&`${e.itemId} ${e.projectName} ${e.title||``} ${e.shopName||``}`.toLowerCase().includes(r))}function O(e,t){return e.find(e=>e.key===t)||e[0]}var k=l();function A({series:e}){if(!e?.points.length)return(0,k.jsx)(`div`,{className:`gw-chart-empty`,children:`选择商品后,查看已有数据趋势。`});let t=e.points.slice(-30),n=t.flatMap(e=>e.value===null?[]:[e.value]),r=n.length?Math.min(...n):0,i=n.length?Math.max(...n):1,a=(e,n)=>[32+n*636/Math.max(1,t.length-1),150-((e.value??r)-r)/(i-r||1)*115],o=null,s=[];return t.forEach((t,n)=>{if(t.value===null){o=null;return}let[r,i]=a(t,n);o&&Date.parse(t.date)-Date.parse(o.date)===864e5&&s.push((0,k.jsx)(`line`,{x1:o.x,y1:o.y,x2:r,y2:i},`l`+n)),s.push((0,k.jsx)(`circle`,{cx:r,cy:i,r:`3`,children:(0,k.jsxs)(`title`,{children:[t.date,`:`,T(t.value),` `,e.unit]})},`p`+n)),o={x:r,y:i,date:t.date}}),(0,k.jsxs)(`div`,{className:`gw-chart`,children:[(0,k.jsxs)(`svg`,{viewBox:`0 0 700 185`,role:`img`,"aria-label":`${e.name}最近${t.length}个归档日期的趋势,缺失日期不连线`,children:[(0,k.jsx)(`defs`,{children:(0,k.jsxs)(`linearGradient`,{id:`product-chart-bg`,x1:`0`,x2:`0`,y1:`0`,y2:`1`,children:[(0,k.jsx)(`stop`,{stopColor:`var(--omni-chart-teal,#4cd5af)`,stopOpacity:`.1`}),(0,k.jsx)(`stop`,{offset:`1`,stopColor:`var(--omni-chart-teal,#4cd5af)`,stopOpacity:`0`})]})}),(0,k.jsx)(`rect`,{x:`30`,y:`20`,width:`640`,height:`145`,fill:`url(#product-chart-bg)`}),[35,92,150].map(e=>(0,k.jsx)(`line`,{x1:`30`,x2:`670`,y1:e,y2:e,className:`grid`},e)),(0,k.jsx)(`g`,{className:`plot`,children:s}),(0,k.jsx)(`text`,{x:`32`,y:`178`,children:t[0]?.date}),(0,k.jsx)(`text`,{x:`668`,y:`178`,textAnchor:`end`,children:t.at(-1)?.date}),(0,k.jsxs)(`text`,{x:`32`,y:`16`,children:[T(i),` `,e.unit]})]}),(0,k.jsx)(`span`,{children:`最近最多30个归档日期 · 缺失不补零 · 不同日期不汇总`})]})}function j({product:t,metricKey:n,onMetric:r,onGroup:i,onTask:o,onOpen:s}){if(!t)return(0,k.jsx)(`div`,{className:`gw-empty`,children:`选择商品查看趋势与后续操作。`});let c=t.series.find(e=>e.key===n)||t.series.find(e=>e.metric===`buyers`)||t.series[0],l=C.find(e=>e.id===t.tier);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`gw-selected-product`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(a,{product:t}),(0,k.jsx)(`span`,{className:`gw-tag `+t.tier,children:w[t.tier]})]}),(0,k.jsxs)(`button`,{onClick:()=>i(t),children:[(0,k.jsx)(y,{size:14}),`分组`]})]}),(0,k.jsxs)(`div`,{className:`gw-metric-selector`,children:[(0,k.jsx)(`select`,{"aria-label":`商品趋势指标`,value:c?.key||``,onChange:e=>r(e.target.value),children:t.series.map(e=>(0,k.jsxs)(`option`,{value:e.key,children:[e.name,` · `,e.unit||`原始单位`]},e.key))}),(0,k.jsxs)(`strong`,{children:[T(c?.points.at(-1)?.value),(0,k.jsx)(`small`,{children:c?.unit})]}),(0,k.jsxs)(`span`,{children:[`最后统计日:`,c?.points.at(-1)?.date||`—`]})]}),(0,k.jsx)(A,{series:c}),(0,k.jsxs)(`details`,{className:`gw-points`,children:[(0,k.jsx)(`summary`,{children:`查看每日原值与来源`}),(0,k.jsx)(`div`,{className:`gw-table-scroll`,children:(0,k.jsxs)(`table`,{children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`th`,{children:`日期`}),(0,k.jsx)(`th`,{children:`原值`}),(0,k.jsx)(`th`,{children:`来源`})]})}),(0,k.jsx)(`tbody`,{children:c?.points.slice(-30).map(e=>(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`td`,{children:e.date}),(0,k.jsx)(`td`,{children:T(e.value)}),(0,k.jsx)(`td`,{children:(0,k.jsx)(`a`,{href:`/api/workbench/`+t.project+`/file/`+e.fileId,children:`原始归档`})})]},e.date))})]})})]}),(0,k.jsxs)(`div`,{className:`gw-next`,children:[(0,k.jsx)(`span`,{children:`NEXT / 下一步`}),(0,k.jsx)(`h3`,{children:l?.action||`先选择这个商品的运营策略`}),(0,k.jsxs)(`p`,{children:[l?.cadence||`分组后查看对应检查频率和处理办法。`,t.note&&` · `+t.note]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`button`,{onClick:()=>o(t),children:`查看当前任务`}),(0,k.jsxs)(`button`,{className:`gw-primary`,onClick:()=>s(t.project,{tab:`monitor`,itemId:t.itemId}),children:[`查看监控与取数 `,(0,k.jsx)(e,{size:13})]}),(0,k.jsx)(`button`,{onClick:()=>s(t.project,{tab:`optimization`,itemId:t.itemId}),children:`商品优化`})]})]}),(0,k.jsx)(`p`,{className:`gw-detail-note`,children:`展示本项目归档的商品指标。点击率、加购率、计划成本等尚未汇入此表;请到来源数据中核对。`})]})}function M({section:e,onSection:l}){let u=g(),{data:d,error:f,loading:p,refresh:m}=S(u.api),h=u.archiveScope||`real`,[y,x]=_(`products.query`,``),[T,A]=_(`products.key`,``),[M,N]=_(`products.metric`,``),[P,F]=(0,b.useState)(``),[I,L]=(0,b.useState)(null),[R,z]=(0,b.useState)(null),B=(0,b.useRef)(null),V=e===`all`||w[e]?e:`all`,H=E(d?.products||[],h),U=D(H,V,y),W=O(U,T);function G(e){A(e.key),N(``),F(``)}function K(e,t){if(t===`work`){z(e);return}t===`data`?(l(`all`),x(``),G(e),requestAnimationFrame(()=>{B.current?.scrollIntoView({behavior:`smooth`,block:`start`}),B.current?.focus({preventScroll:!0})})):u.onOpen(e.project,{tab:t,itemId:e.itemId})}return(0,k.jsx)(`div`,{className:`products-module`,children:(0,k.jsx)(`div`,{className:`gw`,children:(0,k.jsxs)(`div`,{className:`gw-body`,children:[(0,k.jsxs)(`header`,{className:`gw-header`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`small`,{children:`商品 / 商品看板`}),(0,k.jsx)(`h1`,{children:`从测试到重点推广`})]}),(0,k.jsxs)(`div`,{className:`gw-header-actions`,children:[(0,k.jsxs)(`span`,{children:[(0,k.jsx)(`i`,{className:`gw-dot`}),`归档数据 · 非实时`]}),(0,k.jsxs)(`button`,{onClick:()=>void m(),disabled:p,children:[(0,k.jsx)(s,{size:14}),p?`读取中`:`刷新数据`]})]})]}),(0,k.jsx)(`div`,{className:`gw-scope`,children:(0,k.jsx)(`span`,{children:d?`${new Date(d.updatedAt).toLocaleString(`zh-CN`)} 读取归档`:p?`正在读取归档…`:`商品资料未就绪`})}),f&&(0,k.jsxs)(`p`,{role:`alert`,className:`gw-message`,children:[f,` `,(0,k.jsx)(`button`,{onClick:()=>void m(),children:`重试`})]}),P&&(0,k.jsx)(`p`,{role:`status`,className:`gw-message`,children:P}),(0,k.jsx)(n,{products:H,tiers:C,ready:!!d&&!p,onAction:K,onAssign:(e,t)=>L({product:e,suggestedTier:t})}),R&&(0,k.jsx)(i,{product:R,onOpen:u.onOpen,onClose:()=>z(null)}),I&&(0,k.jsx)(r,{...I,products:H,onDirty:u.onDirty,onBusy:u.onBusy,onClose:()=>L(null),onSave:async(e,t,n,r)=>{await v(u.api,e,t,n,r),F(await m()?`分组已保存,看板已更新。`:`分组已保存,但看板读取失败,请刷新后查看。`)}}),(0,k.jsxs)(`div`,{className:`gw-operating`,children:[(0,k.jsxs)(`section`,{className:`gw-panel gw-products`,children:[(0,k.jsxs)(`div`,{className:`gw-section-title`,children:[(0,k.jsx)(`h2`,{children:`商品工作清单`}),(0,k.jsxs)(`span`,{children:[U.length,` 个观察对象`]})]}),(0,k.jsxs)(`div`,{className:`gw-filters`,children:[(0,k.jsxs)(`label`,{children:[(0,k.jsx)(c,{size:14}),(0,k.jsx)(`input`,{"aria-label":`搜索经营商品`,placeholder:`搜索商品ID或项目`,value:y,onChange:e=>x(e.target.value)})]}),(0,k.jsxs)(`select`,{"aria-label":`商品运营分组`,value:V,onChange:e=>{l(e.target.value),A(``)},children:[(0,k.jsx)(`option`,{value:`all`,children:`全部运营分组`}),Object.entries(w).map(([e,t])=>(0,k.jsx)(`option`,{value:e,children:t},e))]})]}),V!==`all`&&(0,k.jsxs)(`div`,{className:`gw-rule`,children:[(0,k.jsx)(`b`,{children:w[V]}),(0,k.jsx)(`p`,{children:C.find(e=>e.id===V)?.rule||`选择商品后确认分组。归档记录不能直接证明商品属于哪个梯队。`})]}),(0,k.jsx)(`div`,{className:`gw-table-scroll`,children:(0,k.jsxs)(`table`,{children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`th`,{children:`商品 / 所属项目`}),(0,k.jsx)(`th`,{children:`当前运营分组`}),(0,k.jsx)(`th`,{children:`已有指标`}),(0,k.jsx)(`th`,{children:`操作`})]})}),(0,k.jsx)(`tbody`,{children:U.map(e=>(0,k.jsxs)(`tr`,{className:W?.key===e.key?`selected`:``,children:[(0,k.jsx)(`td`,{children:(0,k.jsx)(a,{product:e})}),(0,k.jsx)(`td`,{children:(0,k.jsx)(`span`,{className:`gw-tag `+e.tier,children:w[e.tier]})}),(0,k.jsxs)(`td`,{children:[e.series.length,` 项`,(0,k.jsx)(`small`,{children:e.series.map(e=>e.name).slice(0,2).join(` / `)})]}),(0,k.jsx)(`td`,{children:(0,k.jsxs)(`button`,{"aria-label":`查看商品 `+e.itemId+` `+e.projectName,onClick:()=>G(e),children:[`查看 `,(0,k.jsx)(t,{size:12})]})})]},e.key))})]})}),!U.length&&(0,k.jsxs)(`div`,{className:`gw-empty`,children:[(0,k.jsx)(o,{size:29}),(0,k.jsx)(`b`,{children:f?`商品资料读取失败`:p?`正在读取商品…`:y?`没有匹配的商品`:`这个分组还没有商品`}),(0,k.jsx)(`p`,{children:`切换到“待分组”确认商品运营分组,或从项目监控中归档商品数据。`}),(0,k.jsx)(`button`,{onClick:()=>{x(``),l(`unassigned`)},children:`查看待分组`}),(0,k.jsx)(`button`,{onClick:()=>u.onModule(`projects`),children:`进入项目执行`})]})]}),(0,k.jsxs)(`section`,{ref:B,tabIndex:-1,className:`gw-panel gw-product-detail`,children:[(0,k.jsxs)(`div`,{className:`gw-section-title`,children:[(0,k.jsx)(`h2`,{children:`商品数据与下一步`}),(0,k.jsx)(`span`,{children:`点表格切换`})]}),(0,k.jsx)(j,{product:W,metricKey:M,onMetric:N,onGroup:e=>L({product:e}),onTask:z,onOpen:u.onOpen})]})]}),(0,k.jsx)(`p`,{className:`gw-detail-note`,children:`这里的“新品测试、持续孵化、重点推广”是人工保存的运营策略,不是按全店支付销售额贡献、访客和支付买家核验的第一、二、三梯队。切换分组不会自动投放或改变经营梯队。`}),(0,k.jsxs)(`footer`,{className:`gw-footer`,children:[(0,k.jsx)(`span`,{children:`规则来源:店铺链接 AI 自动化孵化与打爆`}),(0,k.jsxs)(`details`,{children:[(0,k.jsx)(`summary`,{children:`检查频率与执行状态说明`}),(0,k.jsx)(`p`,{children:`运营策略卡片展示原方案的建议检查频率,不表示调度已启用。老师结合企业数据制定具体判断标准;本页支持归档查询、趋势查看和分组保存。广告计划的建立、暂停及预算调整尚未在本页接通。`})]})]})]})})})}function N(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function P(e){return typeof e==`string`&&!!e.trim()}function F(e){if(e==null||e===``)return null;let t=typeof e==`number`?e:typeof e==`string`?Number(e):NaN;if(!Number.isFinite(t)||t<0)throw Error(`商品价格格式异常`);return t}async function I(e){async function t(t){let n=await fetch(`/v1/enterprise/`+t,{signal:e,cache:`no-store`});if(!n.ok)throw Error(n.status===401?`登录已失效,请重新登录`:n.status===403?`当前账号没有店铺商品读取权限`:`店铺商品读取失败,请重试`);if(!n.headers.get(`content-type`)?.includes(`application/json`))throw Error(`店铺商品服务尚未接入`);return n.json()}let[n,r]=await Promise.all([t(`products`),t(`shops`)]);if(!N(n)||!Array.isArray(n.products)||!Array.isArray(n.listings)||!N(r)||!Array.isArray(r.shops))throw Error(`店铺商品返回格式异常`);let i=new Map;for(let e of n.products){if(!N(e)||!P(e.product_id)||!P(e.project_id)||!P(e.name))throw Error(`商品关联项目格式异常`);i.set(e.product_id,{id:e.project_id,name:e.name})}let a=new Map;for(let e of r.shops){if(!N(e)||!P(e.id)||!P(e.name)||![`real`,`simulated`,`unverified`].includes(String(e.mode)))throw Error(`店铺资料格式异常`);a.set(e.id,{name:e.name,mode:e.mode===`real`?`declared-real`:e.mode})}let o=[],s=new Set;for(let e of n.listings){if(!N(e)||!P(e.id)||!P(e.product_id)||!P(e.shop_id)||!P(e.platform_item_id)||typeof e.title!=`string`)throw Error(`店铺商品记录不完整`);let t=a.get(e.shop_id),n=i.get(e.product_id);if(!t)continue;if(!n)throw Error(`店铺商品关联项目缺失,请刷新重试`);let r=JSON.stringify([e.shop_id,e.platform_item_id]);if(s.has(r))throw Error(`店铺商品身份重复,请核对资料`);s.add(r),o.push({key:e.id,itemId:e.platform_item_id,title:e.title,image:typeof e.image_data_url==`string`?e.image_data_url:void 0,shopId:e.shop_id,shopName:t.name,project:n.id,projectName:n.name,mode:t.mode,category:typeof e.category==`string`?e.category:void 0,price:F(e.price)})}return o}function L(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(!0),o=(0,b.useRef)(null),s=(0,b.useCallback)(()=>{o.current?.abort();let e=new AbortController;return o.current=e,I(e.signal).then(n=>{e.signal.aborted||(t(n),r(``))}).catch(n=>{e.signal.aborted||(t(null),r(n instanceof Error?n.message:`店铺商品读取失败`))}).finally(()=>{e.signal.aborted||a(!1)})},[]),c=(0,b.useCallback)(()=>(a(!0),r(``),s()),[s]);return(0,b.useEffect)(()=>(s(),()=>o.current?.abort()),[s]),{data:e,error:n,loading:i,refresh:c}}function R(e,t,n,r=``){return e.filter(e=>(!r||e.shopId===r)&&(n===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`)).map(e=>({...e,archives:t.filter(t=>t.project===e.project&&t.itemId===e.itemId&&t.shopIds?.length===1&&t.shopIds[0]===e.shopId&&(n===`stored-demo`?t.mode===`simulated`:t.mode!==`simulated`))}))}function z(e){let t=e.archives.length===1?e.archives[0]:void 0,n=t?.series.flatMap(e=>e.points.map(e=>e.date)).sort().at(-1)||``;function r(e,r){let i=t?.series.filter(t=>e.includes(t.metric)&&r.includes(t.unit))||[];if(i.length!==1)return null;let a=i[0].points.find(e=>e.date===n);return typeof a?.value==`number`&&Number.isFinite(a.value)?a.value:null}return{date:n,paid:r([`paid`,`revenue`],[`元`,`CNY`]),uv:r([`visitors`,`uv`],[`人`]),buyers:r([`buyers`],[`人`])}}function B(e,t,n){let r=t.trim().toLowerCase();return e.filter(e=>`${e.itemId} ${e.title} ${e.shopName} ${e.projectName} ${e.category||``}`.toLowerCase().includes(r)&&(n===`all`||(e.archives.length===1?e.archives[0].tier:e.archives.length===0?`unassigned`:``)===n))}var V=20;function H(){let e=g(),n=p(),l=L(),u=S(e.api),f=e.archiveScope||`real`,[m,h]=_(`products.query`,``),[y,x]=_(`products.shopTier`,`all`),[C,E]=_(`products.key`,``),[D,O]=_(`products.metric`,``),[A,M]=(0,b.useState)(1),[N,P]=(0,b.useState)(``),[F,I]=(0,b.useState)(null),[H,U]=(0,b.useState)(null),W=(0,b.useRef)(null),G=R(l.data||[],u.data?.products||[],f,n?.selected),K=u.error||u.loading?`all`:y,q=B(G,m,K),J=Math.max(1,Math.ceil(q.length/V)),Y=Math.min(A,J),X=u.data?.products.find(e=>e.key===C&&(f===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`)),Z=G.filter(e=>e.archives.some(e=>e.series.some(e=>e.points.length))).length,Q=l.loading||u.loading;function $(e){E(e.key),O(``),requestAnimationFrame(()=>{W.current?.scrollIntoView({behavior:`smooth`,block:`start`}),W.current?.focus({preventScroll:!0})})}return(0,k.jsx)(`div`,{className:`products-module`,children:(0,k.jsx)(`div`,{className:`gw shop-catalog`,children:(0,k.jsxs)(`div`,{className:`gw-body`,children:[(0,k.jsxs)(`header`,{className:`gw-header`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`small`,{children:`商品 / 全部商品`}),(0,k.jsx)(`h1`,{children:`店铺商品`}),(0,k.jsx)(`p`,{children:`查看店铺内已建档的商品与经营数据,再安排测试、孵化和推广。`})]}),(0,k.jsxs)(`div`,{className:`gw-header-actions`,children:[(0,k.jsxs)(`span`,{children:[(0,k.jsx)(`i`,{className:`gw-dot`}),`店铺建档与归档数据 · 非实时`]}),(0,k.jsxs)(`button`,{disabled:Q,onClick:()=>{l.refresh(),u.refresh()},children:[(0,k.jsx)(s,{size:14}),Q?`读取中`:`刷新数据`]})]})]}),(0,k.jsx)(`div`,{className:`gw-scope`,children:(0,k.jsx)(`span`,{children:n?.shops.find(e=>e.id===n.selected)?.name||`全部授权店铺`})}),l.error&&(0,k.jsxs)(`p`,{className:`gw-message`,role:`alert`,children:[l.error,` `,(0,k.jsx)(`button`,{onClick:()=>void l.refresh(),children:`重试店铺商品`})]}),u.error&&(0,k.jsxs)(`p`,{className:`gw-message`,role:`alert`,children:[`经营指标暂不可用:`,u.error,` `,(0,k.jsx)(`button`,{onClick:()=>void u.refresh(),children:`重试经营指标`})]}),N&&(0,k.jsx)(`p`,{className:`gw-message`,role:`status`,children:N}),(0,k.jsxs)(`section`,{className:`gw-panel shop-catalog-list`,"aria-label":`店铺商品列表`,children:[(0,k.jsxs)(`div`,{className:`gw-section-title`,children:[(0,k.jsx)(`h2`,{children:`全部商品`}),(0,k.jsx)(`span`,{children:l.loading?`正在读取商品…`:l.error?`商品总数暂不可用`:`当前范围 ${G.length} 个已建档商品`})]}),!l.error&&l.data&&(0,k.jsxs)(`div`,{className:`shop-catalog-summary`,children:[(0,k.jsxs)(`span`,{children:[`已有经营归档 `,(0,k.jsx)(`b`,{children:u.error||u.loading?`—`:Z})]}),(0,k.jsxs)(`span`,{children:[`待补充经营数据 `,(0,k.jsx)(`b`,{children:u.error||u.loading?`—`:G.length-Z})]}),(0,k.jsx)(`span`,{children:`未归档的指标显示“—”`})]}),(0,k.jsxs)(`div`,{className:`gw-filters`,children:[(0,k.jsxs)(`label`,{children:[(0,k.jsx)(c,{size:15}),(0,k.jsx)(`input`,{"aria-label":`搜索店铺商品`,placeholder:`搜索商品名称、ID、店铺、类目或项目`,value:m,onChange:e=>{h(e.target.value),M(1)}})]}),(0,k.jsxs)(`select`,{"aria-label":`筛选店铺商品分组`,value:K,disabled:u.loading||!!u.error,onChange:e=>{x(e.target.value),M(1)},children:[(0,k.jsx)(`option`,{value:`all`,children:`全部运营分组`}),Object.entries(w).map(([e,t])=>(0,k.jsx)(`option`,{value:e,children:t},e))]})]}),(0,k.jsx)(`div`,{className:`gw-table-scroll`,children:(0,k.jsxs)(`table`,{children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`th`,{children:`商品 / 店铺`}),(0,k.jsx)(`th`,{children:`建档价格(元)`}),(0,k.jsx)(`th`,{children:`访客数`}),(0,k.jsx)(`th`,{children:`支付买家数`}),(0,k.jsx)(`th`,{children:`支付销售额(元)`}),(0,k.jsx)(`th`,{children:`统计日期`}),(0,k.jsx)(`th`,{children:`运营分组`}),(0,k.jsx)(`th`,{children:`操作`})]})}),(0,k.jsx)(`tbody`,{children:q.slice((Y-1)*V,Y*V).map(n=>{let r=z(n),i=n.archives.length===1?n.archives[0]:void 0;return(0,k.jsxs)(`tr`,{className:i?.key===X?.key&&i?`selected`:``,children:[(0,k.jsxs)(`td`,{children:[(0,k.jsx)(a,{product:n}),(0,k.jsxs)(`small`,{children:[n.category||`类目未录入`,` · `,n.projectName]})]}),(0,k.jsx)(`td`,{children:T(n.price)}),(0,k.jsx)(`td`,{children:T(r.uv)}),(0,k.jsx)(`td`,{children:T(r.buyers)}),(0,k.jsx)(`td`,{children:T(r.paid)}),(0,k.jsxs)(`td`,{children:[r.date||`—`,(0,k.jsx)(`small`,{children:u.loading?`读取指标中`:u.error?`指标读取失败`:n.archives.length>1?`多份归档,分别查看`:r.date?`已归档`:`暂无经营数据`})]}),(0,k.jsx)(`td`,{children:u.error||u.loading?`—`:n.archives.length>1?`分组待核对`:(0,k.jsx)(`span`,{className:`gw-tag `+(i?.tier||`unassigned`),children:w[i?.tier||`unassigned`]})}),(0,k.jsx)(`td`,{children:n.archives.length?n.archives.map((e,r)=>(0,k.jsxs)(`button`,{"aria-label":`查看商品 ${n.itemId} ${n.shopName} 归档 ${r+1}`,onClick:()=>$(e),children:[n.archives.length>1?`查看归档 ${r+1}`:`查看数据`,(0,k.jsx)(t,{size:12})]},e.key)):(0,k.jsxs)(`button`,{disabled:u.loading||!!u.error,onClick:()=>e.onOpen(n.project,{tab:`monitor`,itemId:n.itemId}),children:[u.loading?`读取中`:u.error?`指标不可用`:`补充数据`,(0,k.jsx)(t,{size:12})]})})]},n.key)})})]})}),!q.length&&(0,k.jsxs)(`div`,{className:`gw-empty`,role:`status`,children:[(0,k.jsx)(o,{size:29}),(0,k.jsx)(`b`,{children:l.error?`店铺商品读取失败`:l.loading?`正在读取店铺商品…`:m||K!==`all`?`没有匹配的商品`:`当前范围还没有已建档商品`}),(0,k.jsx)(`p`,{children:l.error?`请重试,或检查账号与数据服务连接。`:l.loading?`正在读取当前授权范围的商品目录。`:m||K!==`all`?`调整搜索或运营分组筛选后再查看。`:`请先关联店铺商品。已关联商品即使没有经营归档,也会显示在这里。`}),!l.loading&&!l.error&&(m||K!==`all`)&&(0,k.jsx)(`button`,{onClick:()=>{h(``),x(`all`),M(1)},children:`清除筛选`})]}),q.length>0&&(0,k.jsxs)(`div`,{className:`shop-catalog-pagination`,children:[(0,k.jsxs)(`span`,{children:[`筛选结果 `,q.length,` 个 · 第 `,Y,` / `,J,` 页`]}),(0,k.jsx)(`button`,{disabled:Y<=1,onClick:()=>M(Y-1),children:`上一页`}),(0,k.jsx)(`button`,{disabled:Y>=J,onClick:()=>M(Y+1),children:`下一页`})]})]}),(0,k.jsx)(`p`,{className:`gw-detail-note`,children:`仅显示当前授权店铺已建档商品,尚不代表平台全店商品已同步。经营指标按每个商品的最新归档统计日展示,不同商品日期可能不同;缺值不补零,多店合并归档不分摊到单店。`}),X&&(0,k.jsxs)(`section`,{ref:W,tabIndex:-1,className:`gw-panel gw-product-detail shop-catalog-detail`,children:[(0,k.jsxs)(`div`,{className:`gw-section-title`,children:[(0,k.jsx)(`h2`,{children:`商品数据与下一步`}),(0,k.jsx)(`button`,{"aria-label":`关闭商品详情`,onClick:()=>E(``),children:(0,k.jsx)(d,{size:15})})]}),(0,k.jsx)(j,{product:X,metricKey:D,onMetric:O,onGroup:I,onTask:U,onOpen:e.onOpen})]}),H&&(0,k.jsx)(i,{product:H,onOpen:e.onOpen,onClose:()=>U(null)}),F&&(0,k.jsx)(r,{product:F,products:(u.data?.products||[]).filter(e=>f===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`),onDirty:e.onDirty,onBusy:e.onBusy,onClose:()=>I(null),onSave:async(t,n,r,i)=>{await v(e.api,t,n,r,i),P(await u.refresh()?`分组已保存,商品数据已更新。`:`分组已保存,但数据读取失败,请刷新后查看。`)}})]})})})}var U=(0,b.lazy)(()=>f(()=>import(`./project-public-DN0-E_G2.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url));function W({section:e,onSection:t,project:n}){return n?(0,k.jsx)(b.Suspense,{fallback:(0,k.jsx)(`p`,{role:`status`,children:`正在打开商品工具…`}),children:(0,k.jsx)(U,{section:e,project:n})}):e===`all`?(0,k.jsx)(H,{}):(0,k.jsx)(M,{section:e,onSection:t})}export{W as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./orbit-tMF8WRbG.js";import{t as n}from"./arrow-down-Dm8ejo47.js";import{t as r}from"./arrow-left-CrtjcWhu.js";import{n as i,t as a}from"./clock-3-TXgD8tS6.js";import{t as o}from"./book-open-BHnwW_0N.js";import{t as s}from"./calendar-days-DQXKth-z.js";import{t as c}from"./chart-no-axes-combined-DbjiVuVa.js";import{t as l}from"./check-B7m80-Hk.js";import{n as u,t as d}from"./layout-dashboard-C54_ZKS5.js";import{t as f}from"./layers-B4gCFnEm.js";import{t as p}from"./play-DjZ3mG-r.js";import{t as m}from"./refresh-cw-CiIEylYp.js";import{t as h}from"./triangle-alert-CEMUxCrJ.js";import{c as g,f as _,g as v,h as y,m as ee,s as te,u as ne,v as re,x as b}from"./index-Dfy2jMWq.js";import{n as x}from"./module-host-BIy_fI1T.js";import{n as ie}from"./workspace-view-state-BuK4-c0r.js";import"./public-Csb687JC.js";var ae=y(`folder-kanban`,[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]),oe=y(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),S=y(`radar`,[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`,key:`z3du51`}],[`path`,{d:`M4 6h.01`,key:`oypzma`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`,key:`qzzz0`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`,key:`1yjesh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`,key:`1u2y91`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`m13.41 10.59 5.66-5.66`,key:`mhq4k0`}]]),C=y(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),w=y(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),T=b(re(),1),se=[{id:`omni-start`,title:`山海入门:从市场机会到新品项目`,category:`入门指南`,date:`2026-11-20`,time:`14:00–15:30`,duration:`90 分钟`,format:`线上直播`,teacher:`林老师`,teacherBio:`课程示例讲师,围绕新品开发与团队协作,讲解山海的完整使用路径。`,description:`以一次新品机会评估为线索,认识山海的功能分工,将市场观察整理成可推进的项目,让资料、任务和成果各有归属。`,audience:`首次使用山海的同事、产品开发与电商运营人员。`,outcomes:[`理解五个业务模块的分工与使用顺序`,`将一个市场研究方向整理成项目目标`,`建立任务、资料与成果之间的关联`],preparation:[`准备一个希望研究的商品方向或类目`,`确认可以登录山海并进入企业工作区`],agenda:[{time:`14:00–14:15`,title:`认识山海的工作方式`,description:`从市场、经营、商品、项目与资料五个视角,理解信息如何流动。`},{time:`14:15–14:40`,title:`从市场观察提出问题`,description:`查看类目与榜单,记录观察、证据和需要进一步核实的问题。`},{time:`14:40–15:10`,title:`建立第一个新品项目`,description:`明确目标,组织节点与任务,关联资料并记录下一步行动。`},{time:`15:10–15:30`,title:`练习复盘与答疑`,description:`检查项目是否具备明确目标、可执行任务及可引用的依据。`}]},{id:`market-practice`,title:`市场大盘实战:筛选值得研究的赛道`,category:`市场研究`,date:`2026-11-24`,time:`19:30–21:00`,duration:`90 分钟`,format:`线上实操`,teacher:`陈老师`,teacherBio:`课程示例讲师,以类目趋势和竞争结构为线索,讲解市场研究方法。`,description:`从类目规模、增长和竞争分布出发,结合商品榜与店铺榜交叉查看,形成有证据、有边界的赛道研究结论。`,audience:`负责选品、市场研究、类目规划的产品与运营同事。`,outcomes:[`理解规模、增长和竞争指标的适用范围`,`完成从机会赛道到商品与店铺的下钻`,`整理一份包含证据与待核实问题的研究摘要`],preparation:[`选择一个已授权且有榜单数据的类目`,`准备一个业务问题,例如增长来自哪些商品或店铺`],agenda:[{time:`19:30–19:45`,title:`确定研究问题与比较范围`,description:`选择类目、月份与比较周期,识别缺失数据及可比范围。`},{time:`19:45–20:10`,title:`识别机会与竞争结构`,description:`结合规模、增长、基数与店铺数量,筛选值得进一步研究的方向。`},{time:`20:10–20:40`,title:`商品与店铺交叉验证`,description:`下钻榜单,观察商品增长、店铺分布和趋势,检验初步判断。`},{time:`20:40–21:00`,title:`形成结论与答疑`,description:`区分事实、假设和行动建议,明确下一步补充哪些证据。`}]},{id:`agent-workflow`,title:`项目与 Agent 协作:从任务交接到成果归档`,category:`协作进阶`,date:`2026-11-27`,time:`14:00–16:00`,duration:`120 分钟`,format:`实战工作坊`,teacher:`周老师`,teacherBio:`课程示例讲师,关注任务组织、Agent 协作与项目知识沉淀。`,description:`围绕一个具体任务,练习准备上下文、交接给已连接的 Agent、沟通修改,并将结果与证据归档到原项目。`,audience:`希望使用 Agent 完成研究、分析或内容任务的项目负责人和执行同事。`,outcomes:[`写清任务目标、输入与完成标准`,`理解任务交接、实际执行与成果回写的区别`,`在原任务中查看成果、执行记录和项目知识`],preparation:[`准备一个项目及可独立完成的任务`,`连接一个本机 Agent,并确认具备任务所需 Skill`,`准备可用于该任务的资料和附件`],agenda:[{time:`14:00–14:20`,title:`准备可执行的任务`,description:`明确目标、前置资料、完成标准和需要人工判断的事项。`},{time:`14:20–14:50`,title:`将任务交接给 Agent`,description:`检查连接,打开任务对话,读取项目背景并确认执行范围。`},{time:`14:50–15:30`,title:`执行、反馈与修改`,description:`在 Agent 对话中补充资料,检视结果,并记录受阻原因与处理方式。`},{time:`15:30–16:00`,title:`归档成果与知识`,description:`回到山海核对文件、结果摘要、项目 Wiki 和任务状态,复盘完整链路。`}]}];function E(e){return new Intl.DateTimeFormat(`zh-CN`,{timeZone:`Asia/Shanghai`,month:`long`,day:`numeric`,weekday:`long`}).format(new Date(`${e}T12:00:00+08:00`))}var ce=[{version:`0.1.7`,date:`2026-11-17`,title:`市场洞察与项目工作流,更进一步`,summary:`从发现机会到推进项目,让研究与行动衔接得更顺畅。`,changes:[{kind:`新增`,title:`机会市场与增长商品下钻`,description:`从机会市场继续查看增长商品,支持进一步研究市场变化。`},{kind:`优化`,title:`项目统一入口`,description:`统一项目访问入口,并在工作台展示项目摘要。`},{kind:`优化`,title:`店铺商品目录`,description:`更新店铺商品目录,方便浏览经营商品。`},{kind:`优化`,title:`机会发现页面`,description:`调整页面留白、筛选栏及统计月份卡片,提升阅读和筛选体验。`}]},{version:`0.1.6`,date:`2026-11-17`,title:`更清晰的项目模板与任务编辑`,summary:`完善项目配置细节,让模板选择与任务组织更加顺手。`,changes:[{kind:`优化`,title:`SOP 与任务模板详情`,description:`优化模板详情,便于查看内容并组织项目。`},{kind:`优化`,title:`平台选择与 Skill 标注`,description:`完善平台全选、反选及 Skill 标注的展示。`},{kind:`优化`,title:`添加节点与任务`,description:`优化编辑过程中的滚动和预览布局。`}]},{version:`0.1.5`,date:`2026-11-16`,title:`市场分析,连接真实业务数据`,summary:`完善市场分析的数据、方案与视窗交互。`,changes:[{kind:`新增`,title:`真实市场数据分析`,description:`市场分析接入真实数据,支持在业务场景中开展研究。`},{kind:`新增`,title:`账号分析方案`,description:`支持保存账号分析方案,便于持续使用。`},{kind:`优化`,title:`分析视窗交互`,description:`完善市场分析视窗的浏览体验。`}]},{version:`0.1.4`,date:`2026-11-15`,title:`账号管理与桌面导航体验升级`,summary:`完善企业账号管理,并统一日常使用的导航与页头。`,changes:[{kind:`新增`,title:`更完整的企业账号管理`,description:`支持管理员子账号、选填使用人与电话,以及自助修改密码。`},{kind:`优化`,title:`统一页头与固定业务导航`,description:`提供可折叠菜单、快捷按钮名称提示和固定业务导航。`},{kind:`优化`,title:`账号菜单与 Agent 提示词`,description:`优化账号菜单和 Agent 使用提示词。`}]}],D;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(D||={});var le;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(le||={});var O=D.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),k=e=>{switch(typeof e){case`undefined`:return O.undefined;case`string`:return O.string;case`number`:return Number.isNaN(e)?O.nan:O.number;case`boolean`:return O.boolean;case`function`:return O.function;case`bigint`:return O.bigint;case`symbol`:return O.symbol;case`object`:return Array.isArray(e)?O.array:e===null?O.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?O.promise:typeof Map<`u`&&e instanceof Map?O.map:typeof Set<`u`&&e instanceof Set?O.set:typeof Date<`u`&&e instanceof Date?O.date:O.object;default:return O.unknown}},A=D.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),j=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,D.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};j.create=e=>new j(e);var ue=(e,t)=>{let n;switch(e.code){case A.invalid_type:n=e.received===O.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case A.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,D.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:n=`Unrecognized key(s) in object: ${D.joinValues(e.keys,`, `)}`;break;case A.invalid_union:n=`Invalid input`;break;case A.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${D.joinValues(e.options)}`;break;case A.invalid_enum_value:n=`Invalid enum value. Expected ${D.joinValues(e.options)}, received '${e.received}'`;break;case A.invalid_arguments:n=`Invalid function arguments`;break;case A.invalid_return_type:n=`Invalid function return type`;break;case A.invalid_date:n=`Invalid date`;break;case A.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:D.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case A.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case A.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case A.custom:n=`Invalid input`;break;case A.invalid_intersection_types:n=`Intersection results could not be merged`;break;case A.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case A.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,D.assertNever(e)}return{message:n}},de=ue;function fe(){return de}var pe=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function M(e,t){let n=fe(),r=pe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ue?void 0:ue].filter(e=>!!e)});e.common.issues.push(r)}var N=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return P;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return P;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},P=Object.freeze({status:`aborted`}),me=e=>({status:`dirty`,value:e}),F=e=>({status:`valid`,value:e}),he=e=>e.status===`aborted`,ge=e=>e.status===`dirty`,_e=e=>e.status===`valid`,ve=e=>typeof Promise<`u`&&e instanceof Promise,I;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(I||={});var L=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ye=(e,t)=>{if(_e(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new j(e.common.issues);return this._error=t,this._error}}};function R(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var z=class{get description(){return this._def.description}_getType(e){return k(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:k(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new N,ctx:{common:e.parent.common,data:e.data,parsedType:k(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ve(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:k(e)};return ye(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:k(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return _e(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>_e(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:k(e)},r=this._parse({data:e,path:n.path,parent:n});return ye(n,await(ve(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:A.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new W({schema:this,typeName:q.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return G.create(this,this._def)}nullable(){return K.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return nt.create(this)}promise(){return _t.create(this,this._def)}or(e){return it.create([this,e],this._def)}and(e){return st.create(this,e,this._def)}transform(e){return new W({...R(this._def),schema:this,typeName:q.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new vt({...R(this._def),innerType:this,defaultValue:t,typeName:q.ZodDefault})}brand(){return new xt({typeName:q.ZodBranded,type:this,...R(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new yt({...R(this._def),innerType:this,catchValue:t,typeName:q.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return St.create(this,e)}readonly(){return Ct.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},be=/^c[^\s-]{8,}$/i,xe=/^[0-9a-z]+$/,Se=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ce=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,we=/^[a-z0-9_-]{21}$/i,Te=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ee=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,De=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Oe=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,ke,Ae=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,je=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Me=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ne=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Pe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ie=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Le=RegExp(`^${Ie}$`);function Re(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function ze(e){return RegExp(`^${Re(e)}$`)}function Be(e){let t=`${Ie}T${Re(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function Ve(e,t){return!!((t===`v4`||!t)&&Ae.test(e)||(t===`v6`||!t)&&Me.test(e))}function He(e,t){if(!Te.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function Ue(e,t){return!!((t===`v4`||!t)&&je.test(e)||(t===`v6`||!t)&&Ne.test(e))}var We=class e extends z{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==O.string){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.string,received:t.parsedType}),P}let t=new N,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?M(n,{code:A.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&M(n,{code:A.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)De.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`email`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)ke||=new RegExp(Oe,`u`),ke.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`emoji`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)Ce.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`uuid`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)we.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`nanoid`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)be.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`cuid`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)xe.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`cuid2`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)Se.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`ulid`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),M(n,{validation:`url`,code:A.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`regex`,code:A.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?Be(r).test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?Le.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?ze(r).test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?Ee.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`duration`,code:A.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?Ve(e.data,r.version)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`ip`,code:A.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?He(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`jwt`,code:A.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?Ue(e.data,r.version)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`cidr`,code:A.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?Pe.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`base64`,code:A.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?Fe.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`base64url`,code:A.invalid_string,message:r.message}),t.dirty()):D.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:A.invalid_string,...I.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...I.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...I.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...I.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...I.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...I.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...I.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...I.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...I.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...I.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...I.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...I.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...I.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...I.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...I.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...I.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...I.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...I.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...I.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...I.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...I.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...I.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...I.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...I.errToObj(t)})}nonempty(e){return this.min(1,I.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};We.create=e=>new We({checks:[],typeName:q.ZodString,coerce:e?.coerce??!1,...R(e)});function Ge(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var Ke=class e extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==O.number){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.number,received:t.parsedType}),P}let t,n=new N;for(let r of this._def.checks)r.kind===`int`?D.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),M(t,{code:A.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?Ge(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),M(t,{code:A.not_finite,message:r.message}),n.dirty()):D.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,I.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,I.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,I.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,I.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:I.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:I.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:I.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:I.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:I.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:I.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:I.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&D.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};Ke.create=e=>new Ke({checks:[],typeName:q.ZodNumber,coerce:e?.coerce||!1,...R(e)});var qe=class e extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==O.bigint)return this._getInvalidInput(e);let t,n=new N;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):D.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.bigint,received:t.parsedType}),P}gte(e,t){return this.setLimit(`min`,e,!0,I.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,I.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,I.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,I.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:I.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:I.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:I.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};qe.create=e=>new qe({checks:[],typeName:q.ZodBigInt,coerce:e?.coerce??!1,...R(e)});var Je=class extends z{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==O.boolean){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.boolean,received:t.parsedType}),P}return F(e.data)}};Je.create=e=>new Je({typeName:q.ZodBoolean,coerce:e?.coerce||!1,...R(e)});var Ye=class e extends z{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==O.date){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.date,received:t.parsedType}),P}if(Number.isNaN(e.data.getTime()))return M(this._getOrReturnCtx(e),{code:A.invalid_date}),P;let t=new N,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):D.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:I.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:I.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};Ye.create=e=>new Ye({checks:[],coerce:e?.coerce||!1,typeName:q.ZodDate,...R(e)});var Xe=class extends z{_parse(e){if(this._getType(e)!==O.symbol){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.symbol,received:t.parsedType}),P}return F(e.data)}};Xe.create=e=>new Xe({typeName:q.ZodSymbol,...R(e)});var Ze=class extends z{_parse(e){if(this._getType(e)!==O.undefined){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.undefined,received:t.parsedType}),P}return F(e.data)}};Ze.create=e=>new Ze({typeName:q.ZodUndefined,...R(e)});var Qe=class extends z{_parse(e){if(this._getType(e)!==O.null){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.null,received:t.parsedType}),P}return F(e.data)}};Qe.create=e=>new Qe({typeName:q.ZodNull,...R(e)});var $e=class extends z{constructor(){super(...arguments),this._any=!0}_parse(e){return F(e.data)}};$e.create=e=>new $e({typeName:q.ZodAny,...R(e)});var et=class extends z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return F(e.data)}};et.create=e=>new et({typeName:q.ZodUnknown,...R(e)});var B=class extends z{_parse(e){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.never,received:t.parsedType}),P}};B.create=e=>new B({typeName:q.ZodNever,...R(e)});var tt=class extends z{_parse(e){if(this._getType(e)!==O.undefined){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.void,received:t.parsedType}),P}return F(e.data)}};tt.create=e=>new tt({typeName:q.ZodVoid,...R(e)});var nt=class e extends z{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==O.array)return M(t,{code:A.invalid_type,expected:O.array,received:t.parsedType}),P;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(M(t,{code:e?A.too_big:A.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(M(t,{code:A.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(M(t,{code:A.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new L(t,e,t.path,n)))).then(e=>N.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new L(t,e,t.path,n)));return N.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:I.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:I.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:I.toString(n)}})}nonempty(e){return this.min(1,e)}};nt.create=(e,t)=>new nt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray,...R(t)});function rt(e){if(e instanceof V){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=G.create(rt(r))}return new V({...e._def,shape:()=>t})}else if(e instanceof nt)return new nt({...e._def,type:rt(e.element)});else if(e instanceof G)return G.create(rt(e.unwrap()));else if(e instanceof K)return K.create(rt(e.unwrap()));else if(e instanceof U)return U.create(e.items.map(e=>rt(e)));else return e}var V=class e extends z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=D.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==O.object){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.object,received:t.parsedType}),P}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof B&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new L(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof B){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(M(n,{code:A.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new L(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>N.mergeObjectSync(t,e)):N.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return I.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:I.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:q.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of D.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of D.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return rt(this)}partial(t){let n={};for(let e of D.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of D.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof G;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return mt(D.objectKeys(this.shape))}};V.create=(e,t)=>new V({shape:()=>e,unknownKeys:`strip`,catchall:B.create(),typeName:q.ZodObject,...R(t)}),V.strictCreate=(e,t)=>new V({shape:()=>e,unknownKeys:`strict`,catchall:B.create(),typeName:q.ZodObject,...R(t)}),V.lazycreate=(e,t)=>new V({shape:e,unknownKeys:`strip`,catchall:B.create(),typeName:q.ZodObject,...R(t)});var it=class extends z{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new j(e.ctx.common.issues));return M(t,{code:A.invalid_union,unionErrors:n}),P}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new j(e));return M(t,{code:A.invalid_union,unionErrors:i}),P}}get options(){return this._def.options}};it.create=(e,t)=>new it({options:e,typeName:q.ZodUnion,...R(t)});var H=e=>e instanceof ft?H(e.schema):e instanceof W?H(e.innerType()):e instanceof pt?[e.value]:e instanceof ht?e.options:e instanceof gt?D.objectValues(e.enum):e instanceof vt?H(e._def.innerType):e instanceof Ze?[void 0]:e instanceof Qe?[null]:e instanceof G?[void 0,...H(e.unwrap())]:e instanceof K?[null,...H(e.unwrap())]:e instanceof xt||e instanceof Ct?H(e.unwrap()):e instanceof yt?H(e._def.innerType):[],at=class e extends z{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==O.object)return M(t,{code:A.invalid_type,expected:O.object,received:t.parsedType}),P;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(M(t,{code:A.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),P)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=H(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:q.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...R(r)})}};function ot(e,t){let n=k(e),r=k(t);if(e===t)return{valid:!0,data:e};if(n===O.object&&r===O.object){let n=D.objectKeys(t),r=D.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=ot(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===O.array&&r===O.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ot(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===O.date&&r===O.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var st=class extends z{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(he(e)||he(r))return P;let i=ot(e.value,r.value);return i.valid?((ge(e)||ge(r))&&t.dirty(),{status:t.value,value:i.data}):(M(n,{code:A.invalid_intersection_types}),P)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};st.create=(e,t,n)=>new st({left:e,right:t,typeName:q.ZodIntersection,...R(n)});var U=class e extends z{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.array)return M(n,{code:A.invalid_type,expected:O.array,received:n.parsedType}),P;if(n.data.length<this._def.items.length)return M(n,{code:A.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),P;!this._def.rest&&n.data.length>this._def.items.length&&(M(n,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new L(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>N.mergeArray(t,e)):N.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};U.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new U({items:e,typeName:q.ZodTuple,rest:null,...R(t)})};var ct=class e extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.object)return M(n,{code:A.invalid_type,expected:O.object,received:n.parsedType}),P;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new L(n,e,n.path,e)),value:a._parse(new L(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?N.mergeObjectAsync(t,r):N.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof z?new e({keyType:t,valueType:n,typeName:q.ZodRecord,...R(r)}):new e({keyType:We.create(),valueType:t,typeName:q.ZodRecord,...R(n)})}},lt=class extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.map)return M(n,{code:A.invalid_type,expected:O.map,received:n.parsedType}),P;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new L(n,e,n.path,[a,`key`])),value:i._parse(new L(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return P;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return P;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};lt.create=(e,t,n)=>new lt({valueType:t,keyType:e,typeName:q.ZodMap,...R(n)});var ut=class e extends z{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.set)return M(n,{code:A.invalid_type,expected:O.set,received:n.parsedType}),P;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(M(n,{code:A.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(M(n,{code:A.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return P;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new L(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:I.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:I.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};ut.create=(e,t)=>new ut({valueType:e,minSize:null,maxSize:null,typeName:q.ZodSet,...R(t)});var dt=class e extends z{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==O.function)return M(t,{code:A.invalid_type,expected:O.function,received:t.parsedType}),P;function n(e,n){return pe({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,fe(),ue].filter(e=>!!e),issueData:{code:A.invalid_arguments,argumentsError:n}})}function r(e,n){return pe({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,fe(),ue].filter(e=>!!e),issueData:{code:A.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof _t){let e=this;return F(async function(...t){let o=new j([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}else{let e=this;return F(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new j([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new j([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:U.create(t).rest(et.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||U.create([]).rest(et.create()),returns:n||et.create(),typeName:q.ZodFunction,...R(r)})}},ft=class extends z{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};ft.create=(e,t)=>new ft({getter:e,typeName:q.ZodLazy,...R(t)});var pt=class extends z{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return M(t,{received:t.data,code:A.invalid_literal,expected:this._def.value}),P}return{status:`valid`,value:e.data}}get value(){return this._def.value}};pt.create=(e,t)=>new pt({value:e,typeName:q.ZodLiteral,...R(t)});function mt(e,t){return new ht({values:e,typeName:q.ZodEnum,...R(t)})}var ht=class e extends z{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return M(t,{expected:D.joinValues(n),received:t.parsedType,code:A.invalid_type}),P}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return M(t,{received:t.data,code:A.invalid_enum_value,options:n}),P}return F(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};ht.create=mt;var gt=class extends z{_parse(e){let t=D.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==O.string&&n.parsedType!==O.number){let e=D.objectValues(t);return M(n,{expected:D.joinValues(e),received:n.parsedType,code:A.invalid_type}),P}if(this._cache||=new Set(D.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=D.objectValues(t);return M(n,{received:n.data,code:A.invalid_enum_value,options:e}),P}return F(e.data)}get enum(){return this._def.values}};gt.create=(e,t)=>new gt({values:e,typeName:q.ZodNativeEnum,...R(t)});var _t=class extends z{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==O.promise&&t.common.async===!1?(M(t,{code:A.invalid_type,expected:O.promise,received:t.parsedType}),P):F((t.parsedType===O.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};_t.create=(e,t)=>new _t({type:e,typeName:q.ZodPromise,...R(t)});var W=class extends z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{M(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return P;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?P:r.status===`dirty`||t.value===`dirty`?me(r.value):r});{if(t.value===`aborted`)return P;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?P:r.status===`dirty`||t.value===`dirty`?me(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?P:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?P:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!_e(e))return P;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>_e(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):P);D.assertNever(r)}};W.create=(e,t,n)=>new W({schema:e,typeName:q.ZodEffects,effect:t,...R(n)}),W.createWithPreprocess=(e,t,n)=>new W({schema:t,effect:{type:`preprocess`,transform:e},typeName:q.ZodEffects,...R(n)});var G=class extends z{_parse(e){return this._getType(e)===O.undefined?F(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};G.create=(e,t)=>new G({innerType:e,typeName:q.ZodOptional,...R(t)});var K=class extends z{_parse(e){return this._getType(e)===O.null?F(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};K.create=(e,t)=>new K({innerType:e,typeName:q.ZodNullable,...R(t)});var vt=class extends z{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===O.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};vt.create=(e,t)=>new vt({innerType:e,typeName:q.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...R(t)});var yt=class extends z{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ve(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new j(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new j(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};yt.create=(e,t)=>new yt({innerType:e,typeName:q.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...R(t)});var bt=class extends z{_parse(e){if(this._getType(e)!==O.nan){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:O.nan,received:t.parsedType}),P}return{status:`valid`,value:e.data}}};bt.create=e=>new bt({typeName:q.ZodNaN,...R(e)});var xt=class extends z{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},St=class e extends z{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?P:e.status===`dirty`?(t.dirty(),me(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?P:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:q.ZodPipeline})}},Ct=class extends z{_parse(e){let t=this._def.innerType._parse(e),n=e=>(_e(e)&&(e.value=Object.freeze(e.value)),e);return ve(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};Ct.create=(e,t)=>new Ct({innerType:e,typeName:q.ZodReadonly,...R(t)}),V.lazycreate;var q;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(q||={});var J=We.create,Y=Ke.create;bt.create,qe.create;var wt=Je.create;Ye.create,Xe.create,Ze.create,Qe.create,$e.create;var Tt=et.create;B.create,tt.create;var Et=nt.create,X=V.create;V.strictCreate,it.create,at.create,st.create,U.create;var Dt=ct.create;lt.create,ut.create,dt.create,ft.create;var Ot=pt.create;ht.create,gt.create,_t.create,W.create,G.create,K.create,W.createWithPreprocess,St.create;var kt=J().regex(/^\d{4}-\d{2}-\d{2}$/).refine(e=>Number.isFinite(Date.parse(e))&&new Date(e).toISOString().slice(0,10)===e),At=X({id:J(),name:J(),goal:J().optional(),stages:Et(J()),taskCount:Y().int().nonnegative(),updatedAt:J().optional(),archivedAt:J().nullable().optional()}),jt=X({taskCount:Y().int().nonnegative(),statusCounts:Dt(J(),Y().int().nonnegative())}).refine(e=>Object.values(e.statusCounts).reduce((e,t)=>e+t,0)===e.taskCount),Mt=X({id:J(),project:J(),projectName:J(),mode:J(),created:J(),start:kt,end:kt,total:Y().finite().nonnegative(),shopId:J().optional(),shopIds:Et(J()).default([]),scopeLabel:J(),basis:J(),count:Y().nonnegative().optional(),breakdown:Et(X({name:J(),sales:Y().finite(),count:Y().optional()})).default([])}).refine(e=>e.start<=e.end);function Nt(e){return[...new Set(e.map(e=>`${e.start}|${e.end}`))].sort((e,t)=>t.split(`|`)[1].localeCompare(e.split(`|`)[1])||t.localeCompare(e))}function Pt(e,t,n){let r=new Set(t.map(e=>e.id)),i=e.filter(e=>`${e.start}|${e.end}`===n&&e.mode!==`simulated`),a=new Map,o=[];for(let e of i){let t=e.shopId||(e.shopIds.length===1?e.shopIds[0]:``);if(!t||!r.has(t)||e.shopIds.some(e=>e!==t)){o.push(e);continue}let n=a.get(t);(!n||e.created>n.created||e.created===n.created&&e.id>n.id)&&a.set(t,e)}let s=t.map(e=>({...e,report:a.get(e.id)})),c=[...a.values()].reduce((e,t)=>e+Math.round(t.total*100),0);return{rows:s,covered:a.size,total:a.size?c/100:null,unassigned:o}}function Ft(e){let t=e.filter(e=>!e.archivedAt),n=t.filter(e=>e.counts!==null),r=e=>n.reduce((t,n)=>t+(n.counts?.[e]||0),0),i=t.reduce((e,t)=>e+t.taskCount,0),a=r(`已完成`);return{total:t.length,tasks:i,done:a,running:r(`进行中`),blocked:r(`已阻塞`),covered:n.length,complete:n.length===t.length,active:n.filter(e=>e.taskCount>0&&(e.counts?.已完成||0)<e.taskCount).length,progress:i?Math.round(a/i*100):0}}var It=X({ok:Ot(!0),data:X({items:Et(At),total:Y().int().nonnegative(),hasMore:wt()})});async function Lt(e){let t=[];for(let n=1;n<=100;n++){let r=It.parse(await e(`/collaboration/query/project/list?limit=100&page=${n}`));if(t.push(...r.data.items.map(e=>({...e,counts:null}))),!r.data.hasMore)break;if(!r.data.items.length||n===100)throw Error(`项目清单未读取完整,请重试`)}for(let n=0;n<t.length;n+=4)await Promise.all(t.slice(n,n+4).filter(e=>!e.archivedAt).map(async t=>{try{let n=X({ok:Ot(!0),data:jt}).parse(await e(`/collaboration/query/project/context?projectId=`+encodeURIComponent(t.id)));t.counts=n.data.statusCounts,t.taskCount=n.data.taskCount}catch{t.counts=null}}));return t}async function Rt(e){let t=X({products:Et(X({mode:J()})),metrics:X({sales:Et(Tt())})}).parse(await e(`/growth-center`)),n=[],r=0;for(let e of t.metrics.sales){let t=Mt.safeParse(e);t.success?t.data.mode!==`simulated`&&n.push(t.data):typeof e==`object`&&e&&`mode`in e&&e.mode===`simulated`||r++}return{sales:n,productCount:t.products.filter(e=>e.mode!==`simulated`).length,invalidSales:r}}var Z={overview:`_overview_ngsjb_1`,network:`_network_ngsjb_1`,pageHeading:`_pageHeading_ngsjb_1`,eyebrow:`_eyebrow_ngsjb_1`,refresh:`_refresh_ngsjb_1`,panelHeading:`_panelHeading_ngsjb_1`,shopDetails:`_shopDetails_ngsjb_1`,bottomMeta:`_bottomMeta_ngsjb_1`,topGrid:`_topGrid_ngsjb_1`,kpis:`_kpis_ngsjb_1`,money:`_money_ngsjb_1`,mainGrid:`_mainGrid_ngsjb_1`,panel:`_panel_ngsjb_1`,filters:`_filters_ngsjb_1`,shop:`_shop_ngsjb_1`,shopIcon:`_shopIcon_ngsjb_1`,shopIdentity:`_shopIdentity_ngsjb_1`,salesBar:`_salesBar_ngsjb_1`,projectStatus:`_projectStatus_ngsjb_1`,warning:`_warning_ngsjb_1`,projectRow:`_projectRow_ngsjb_1`,progress:`_progress_ngsjb_1`,note:`_note_ngsjb_1`,empty:`_empty_ngsjb_1`,error:`_error_ngsjb_1`,unassigned:`_unassigned_ngsjb_1`,networkHead:`_networkHead_ngsjb_1`,canvas:`_canvas_ngsjb_1`,networkCenter:`_networkCenter_ngsjb_1`,networkTags:`_networkTags_ngsjb_1`,motionNote:`_motionNote_ngsjb_1`,spinning:`_spinning_ngsjb_1`,spin:`_spin_ngsjb_1`},Q=g(),zt=()=>window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,Bt=e=>{let t=window.matchMedia(`(prefers-reduced-motion: reduce)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)};function Vt({projects:e,shops:t,tasks:n}){let r=(0,T.useRef)(null),i=(0,T.useSyncExternalStore)(Bt,zt,()=>!1),[a,o]=(0,T.useState)(()=>{try{let e=localStorage.getItem(`omni.home.effects`);return e===`playing`||e===`paused`?e:`system`}catch{return`system`}}),s=a===`playing`||a===`system`&&!i;function c(){let e=s?`paused`:`playing`;o(e);try{localStorage.setItem(`omni.home.effects`,e)}catch{}}return(0,T.useEffect)(()=>{let e=r.current,t=e?.getContext(`2d`);if(!e||!t)return;let n=0,i=0,a=0,o=-1/0,c=0,l=!0,u=``,d=``,f=Array.from({length:64},(e,t)=>{let n=1-t/63*2,r=Math.sqrt(1-n*n),i=t*2.399963229728653;return{x:Math.cos(i)*r,y:n,z:Math.sin(i)*r}});function p(r){if(!t||!e)return;if(r-o<32){s&&l&&!document.hidden&&(n=requestAnimationFrame(p));return}o=r,s&&(c+=.018),t.clearRect(0,0,i,a);let m=Math.min(i*.3,a*.39),h=i*.51,g=a*.48,_=f.map(e=>{let t=e.x*Math.cos(c)-e.z*Math.sin(c),n=e.x*Math.sin(c)+e.z*Math.cos(c);return{x:h+t*m,y:g+e.y*m*.82+Math.sin(c+e.x)*8,z:n}}),v=t.createRadialGradient(h,g,8,h,g,m*1.6);v.addColorStop(0,u+`25`),v.addColorStop(1,u+`00`),t.fillStyle=v,t.fillRect(0,0,i,a);for(let e=0;e<_.length;e++)for(let n=e+1;n<_.length;n++){let r=_[e],i=_[n],a=Math.hypot(r.x-i.x,r.y-i.y);if(!(a>m*.57||Math.abs(r.z-i.z)>1)&&(t.globalAlpha=(1-a/(m*.57))*.32,t.strokeStyle=u,t.lineWidth=.8,t.beginPath(),t.moveTo(r.x,r.y),t.lineTo(i.x,i.y),t.stroke(),(e+n)%13==0)){let n=(c*.8+e*.13)%1;t.globalAlpha=.8,t.fillStyle=u,t.beginPath(),t.arc(r.x+(i.x-r.x)*n,r.y+(i.y-r.y)*n,2.4,0,Math.PI*2),t.fill()}}_.forEach((e,n)=>{t.globalAlpha=(e.z+1)*.32+.25,t.fillStyle=n%7==0?u:d,t.beginPath(),t.arc(e.x,e.y,n%7==0?3:1.6,0,Math.PI*2),t.fill()}),t.globalAlpha=.5,t.strokeStyle=u,t.lineWidth=1;for(let e=0;e<2;e++)t.beginPath(),t.ellipse(h,g,m*1.24,m*.4,e?-.35:.35,c*(e?-1:1),c*(e?-1:1)+Math.PI*1.55),t.stroke();t.globalAlpha=1,s&&l&&!document.hidden&&(n=requestAnimationFrame(p))}function m(){cancelAnimationFrame(n),o=-1/0,n=requestAnimationFrame(p)}function h(){if(!e||!t)return;let n=e.getBoundingClientRect();i=n.width,a=n.height;let r=Math.min(devicePixelRatio||1,2);e.width=i*r,e.height=a*r,t.setTransform(r,0,0,r,0,0);let o=document.documentElement.dataset.omniTheme===`light`;u=o?`#087b86`:`#61e1ec`,d=o?`#477596`:`#7ca8d5`,m()}let g=new ResizeObserver(h);g.observe(e);let _=new MutationObserver(h);_.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-omni-theme`]});let v=new IntersectionObserver(e=>{l=e[0].isIntersecting,l?m():cancelAnimationFrame(n)});v.observe(e);let y=()=>{document.hidden?cancelAnimationFrame(n):l&&m()};return document.addEventListener(`visibilitychange`,y),h(),()=>{cancelAnimationFrame(n),g.disconnect(),_.disconnect(),v.disconnect(),document.removeEventListener(`visibilitychange`,y)}},[s]),(0,Q.jsxs)(`section`,{className:Z.network,"aria-label":`项目与店铺动态数据网络`,children:[(0,Q.jsxs)(`div`,{className:Z.networkHead,children:[(0,Q.jsx)(`span`,{children:`OMNI / DATA NETWORK`}),(0,Q.jsxs)(`button`,{onClick:c,"aria-label":s?`暂停科技动效`:`开启科技动效`,"aria-pressed":s,children:[s?(0,Q.jsx)(oe,{size:12}):(0,Q.jsx)(p,{size:12}),` `,s?`动效运行中`:`开启科技动效`]})]}),(0,Q.jsx)(`canvas`,{ref:r,className:Z.canvas,"aria-hidden":`true`}),(0,Q.jsxs)(`div`,{className:Z.networkCenter,children:[(0,Q.jsx)(`strong`,{children:`OMNI`}),(0,Q.jsx)(`span`,{children:`连接业务与行动`})]}),(0,Q.jsxs)(`div`,{className:Z.networkTags,children:[(0,Q.jsxs)(`span`,{children:[`项目 `,(0,Q.jsx)(`b`,{children:e??`—`})]}),(0,Q.jsxs)(`span`,{children:[`店铺 `,(0,Q.jsx)(`b`,{children:t})]}),(0,Q.jsxs)(`span`,{children:[`进行中任务 `,(0,Q.jsx)(`b`,{children:n??`—`})]})]}),!s&&i&&(0,Q.jsx)(`small`,{className:Z.motionNote,children:`系统偏好减少动态,可单独开启本页动效`})]})}var Ht=e=>e===null?`—`:new Intl.NumberFormat(`zh-CN`,{style:`currency`,currency:`CNY`,maximumFractionDigits:2}).format(e),Ut=e=>new Date(e).toLocaleTimeString(`zh-CN`,{timeZone:`Asia/Shanghai`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`});function Wt({api:t,onModule:n,onOpen:r}){let a=te(),[o,s]=(0,T.useState)(null),[l,u]=(0,T.useState)(null),[d,f]=(0,T.useState)([]),[p,g]=(0,T.useState)(!0),[_,v]=(0,T.useState)(``),[y,ne]=(0,T.useState)(0),[re,b]=ie(`home.sales.period`,``),x=(0,T.useRef)(!1),oe=(0,T.useCallback)(()=>{x.current||(f([]),g(!0),ne(e=>e+1))},[]);(0,T.useEffect)(()=>{let e=!0,n=new Set([`项目统计`,`经营归档`]),r=[];x.current=!0;let i=e=>{n.delete(e),f([...r]),n.size||(clearTimeout(a),v(new Date().toISOString()),g(!1),x.current=!1)},a=setTimeout(()=>{e&&(e=!1,f([...r,...[...n].map(e=>`${e}读取超时`)]),g(!1),x.current=!1)},3e4);return Lt(t).then(t=>{e&&s(t)},()=>{e&&(s(null),r.push(`项目统计读取失败`))}).finally(()=>{e&&i(`项目统计`)}),Rt(t).then(t=>{e&&u(t)},()=>{e&&(u(null),r.push(`经营归档读取失败`))}).finally(()=>{e&&i(`经营归档`)}),()=>{e=!1,clearTimeout(a),x.current=!1}},[t,y]);let S=o?Ft(o):null,C=(a?.shops||[]).filter(e=>!a?.selected||e.id===a.selected),w=Nt(l?.sales||[]),se=w.includes(re)?re:w[0]||``,E=Pt(l?.sales||[],C,se),ce=(o||[]).filter(e=>!e.archivedAt).sort((e,t)=>{let n=e=>e.counts?.已阻塞?0:e.counts&&e.taskCount>(e.counts.已完成||0)?1:2;return n(e)-n(t)||(t.updatedAt||``).localeCompare(e.updatedAt||``)}),D=Math.max(1,...E.rows.map(e=>e.report?.total||0));return(0,Q.jsxs)(`div`,{className:Z.overview,children:[(0,Q.jsxs)(`div`,{className:Z.pageHeading,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`span`,{className:Z.eyebrow,children:`山海 · OMNI / 企业总览`}),(0,Q.jsx)(`h1`,{children:`今天的业务,一屏掌握`}),(0,Q.jsx)(`p`,{children:`项目推进、店铺经营与销售归档,连接到下一步行动。`})]}),(0,Q.jsxs)(`div`,{className:Z.refresh,children:[(0,Q.jsx)(`span`,{children:p?`正在读取…`:d.length?`部分数据未更新`:_?`${Ut(_)} 更新`:``}),(0,Q.jsxs)(`button`,{disabled:p,onClick:oe,"aria-label":`刷新首页数据`,children:[(0,Q.jsx)(m,{size:14,className:p?Z.spinning:void 0}),p?`读取中`:`刷新`]})]})]}),d.length>0&&(0,Q.jsxs)(`div`,{role:`alert`,className:Z.error,children:[d.join(`;`),`,可刷新重试。其他已成功读取的信息继续显示。`]}),(0,Q.jsxs)(`div`,{className:Z.topGrid,children:[(0,Q.jsxs)(`div`,{className:Z.kpis,children:[(0,Q.jsxs)(`button`,{onClick:()=>n(`projects`),children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(ae,{size:17}),`企业项目`]}),(0,Q.jsxs)(`strong`,{children:[S?.total??`—`,(0,Q.jsx)(`small`,{children:`个`})]}),(0,Q.jsxs)(`p`,{children:[`当前未归档项目 · `,S?.active??`—`,` 个待推进`]})]}),(0,Q.jsxs)(`button`,{onClick:()=>n(`projects`),children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(e,{size:17}),`进行中任务`]}),(0,Q.jsxs)(`strong`,{children:[S?.complete?S.running:`—`,(0,Q.jsx)(`small`,{children:`项`})]}),(0,Q.jsx)(`p`,{children:S?.complete?`已完成 ${S.done} / ${S.tasks} 项任务`:`等待读取完整任务统计`})]}),(0,Q.jsxs)(`button`,{onClick:()=>document.getElementById(`home-shops`)?.scrollIntoView({block:`start`}),children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(ee,{size:17}),`授权店铺`]}),(0,Q.jsxs)(`strong`,{children:[C.length,(0,Q.jsx)(`small`,{children:`家`})]}),(0,Q.jsx)(`p`,{children:a?.selected?`当前选定店铺`:`当前账号可访问的店铺`})]}),(0,Q.jsxs)(`button`,{onClick:()=>document.getElementById(`home-shops`)?.scrollIntoView({block:`start`}),children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(c,{size:17}),`同期店铺销售额`]}),(0,Q.jsx)(`strong`,{className:Z.money,children:Ht(E.total)}),(0,Q.jsx)(`p`,{children:se?`${se.replace(`|`,` 至 `)} · 覆盖 ${E.covered}/${C.length} 家`:`尚无可汇总的店铺销售归档`})]})]}),(0,Q.jsx)(Vt,{projects:S?.total??null,shops:C.length,tasks:S?.complete?S.running:null})]}),(0,Q.jsxs)(`div`,{className:Z.mainGrid,children:[(0,Q.jsxs)(`section`,{className:Z.panel,id:`home-shops`,children:[(0,Q.jsxs)(`div`,{className:Z.panelHeading,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h2`,{children:`店铺经营概览`}),(0,Q.jsx)(`p`,{children:`支付销售额 · 不扣退款 · 按归档统计周期`})]}),(0,Q.jsxs)(`button`,{onClick:()=>n(`overview`),children:[`经营分析 `,(0,Q.jsx)(i,{size:13})]})]}),(0,Q.jsxs)(`div`,{className:Z.filters,children:[a&&(0,Q.jsxs)(`label`,{children:[`店铺范围`,(0,Q.jsxs)(`select`,{"aria-label":`首页店铺范围`,value:a.selected,onChange:e=>a.onSelect(e.target.value),children:[(0,Q.jsx)(`option`,{value:``,children:`全部授权店铺`}),a.shops.map(e=>(0,Q.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,Q.jsxs)(`label`,{children:[`销售统计周期`,(0,Q.jsxs)(`select`,{"aria-label":`首页销售统计周期`,value:se,disabled:!w.length,onChange:e=>b(e.target.value),children:[!w.length&&(0,Q.jsx)(`option`,{value:``,children:`暂无销售归档`}),w.map(e=>(0,Q.jsx)(`option`,{value:e,children:e.replace(`|`,` 至 `)},e))]})]})]}),(0,Q.jsx)(`div`,{className:Z.shopList,children:E.rows.map(e=>(0,Q.jsxs)(`details`,{className:Z.shop,children:[(0,Q.jsxs)(`summary`,{children:[(0,Q.jsx)(`span`,{className:Z.shopIcon,children:(0,Q.jsx)(ee,{size:17})}),(0,Q.jsxs)(`span`,{className:Z.shopIdentity,children:[(0,Q.jsx)(`b`,{children:e.name}),(0,Q.jsx)(`small`,{children:e.report?`${e.report.count??`—`} 个商品链接 · 点击核对来源`:`该周期暂无已关联的销售记录`})]}),(0,Q.jsx)(`div`,{className:Z.salesBar,"aria-hidden":`true`,children:(0,Q.jsx)(`i`,{style:{width:`${(e.report?.total||0)/D*100}%`}})}),(0,Q.jsx)(`strong`,{children:Ht(e.report?.total??null)})]}),(0,Q.jsxs)(`div`,{className:Z.shopDetails,children:[(0,Q.jsxs)(`p`,{children:[`店铺编号:`,e.id]}),e.report?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`p`,{children:[`统计周期:`,e.report.start,` 至 `,e.report.end]}),(0,Q.jsxs)(`p`,{children:[`来源:`,e.report.projectName,` · `,e.report.scopeLabel]}),(0,Q.jsx)(`p`,{children:e.report.basis}),(0,Q.jsxs)(`p`,{children:[`归档时间:`,new Date(e.report.created).toLocaleString(`zh-CN`,{timeZone:`Asia/Shanghai`})]})]}):(0,Q.jsx)(`p`,{children:`请在资料中心归档并关联本店铺的全店销售记录。`}),(0,Q.jsxs)(`button`,{onClick:()=>n(`data`),children:[`查看资料中心 `,(0,Q.jsx)(i,{size:12})]})]})]},e.id))}),!C.length&&(0,Q.jsx)(`p`,{className:Z.empty,children:`当前账号尚无授权店铺。`}),l&&!w.length&&(0,Q.jsx)(`p`,{className:Z.empty,children:`尚未读取到销售归档。导入全店销售账本后,将按店铺及相同统计周期汇总。`}),E.unassigned.length>0&&(0,Q.jsxs)(`details`,{className:Z.unassigned,children:[(0,Q.jsxs)(`summary`,{children:[(0,Q.jsx)(h,{size:13}),E.unassigned.length,` 份销售归档待核对店铺归属`]}),E.unassigned.map(e=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`b`,{children:[e.scopeLabel,` · `,Ht(e.total)]}),(0,Q.jsxs)(`p`,{children:[e.projectName,` · `,e.start,` 至 `,e.end]})]},e.id)),(0,Q.jsx)(`p`,{children:`这些原件保持独立展示,确认唯一店铺归属后计入汇总。`})]}),l?.invalidSales?(0,Q.jsxs)(`p`,{className:Z.warning,children:[l.invalidSales,` 份归档缺少有效金额或周期,未计入。`]}):null,(0,Q.jsx)(`p`,{className:Z.note,children:`同店、同期采用最新归档,避免重复累计。覆盖不足时显示已覆盖店铺小计;跨周期金额分别查看。`})]}),(0,Q.jsxs)(`section`,{className:Z.panel,children:[(0,Q.jsxs)(`div`,{className:Z.panelHeading,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h2`,{children:`项目推进`}),(0,Q.jsx)(`p`,{children:`企业共享项目 · 与项目工作台同步`})]}),(0,Q.jsxs)(`button`,{onClick:()=>n(`projects`),children:[`全部项目 `,(0,Q.jsx)(i,{size:13})]})]}),(0,Q.jsxs)(`div`,{className:Z.projectStatus,children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`b`,{children:S?.complete?S.done:`—`}),`已完成任务`]}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`b`,{children:S?.complete?S.running:`—`}),`进行中`]}),(0,Q.jsxs)(`span`,{className:Z.warning,children:[(0,Q.jsx)(`b`,{children:S?.complete?S.blocked:`—`}),`受阻任务`]})]}),!S?.complete&&o&&(0,Q.jsxs)(`p`,{className:Z.warning,children:[`已读取 `,S?.covered,`/`,S?.total,` 个项目的任务统计,请刷新重试。`]}),ce.slice(0,5).map(e=>{let t=e.counts?.已完成||0,n=e.taskCount?Math.round(t/e.taskCount*100):0;return(0,Q.jsxs)(`button`,{className:Z.projectRow,onClick:()=>r(e.id,{tab:`overview`}),children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`b`,{children:e.name}),(0,Q.jsxs)(`span`,{children:[e.counts?`${t}/${e.taskCount} 项完成`:`任务统计暂不可用`,(0,Q.jsx)(i,{size:13})]})]}),(0,Q.jsx)(`p`,{children:e.goal||`进入项目查看目标与任务`}),(0,Q.jsx)(`div`,{className:Z.progress,role:`progressbar`,"aria-label":e.name+`任务完成比例`,"aria-valuenow":e.counts?n:void 0,"aria-valuemin":0,"aria-valuemax":100,children:(0,Q.jsx)(`i`,{style:{width:`${e.counts?n:0}%`}})})]},e.id)}),!ce.length&&(0,Q.jsx)(`p`,{className:Z.empty,children:p?`正在读取企业项目…`:o?`还没有项目,进入项目工作台建立第一个项目。`:`项目服务暂不可用,请刷新重试。`}),(0,Q.jsxs)(`div`,{className:Z.bottomMeta,children:[(0,Q.jsxs)(`span`,{children:[`经营商品档案 `,(0,Q.jsx)(`b`,{children:l?.productCount??`—`})]}),(0,Q.jsxs)(`button`,{onClick:()=>n(`products`),children:[`查看商品 `,(0,Q.jsx)(i,{size:13})]})]})]})]}),(0,Q.jsx)(`p`,{className:Z.note,children:`进入首页时读取最新项目状态与经营归档,可点击刷新更新;销售额按归档周期统计。店铺按当前授权范围读取,项目按企业共享范围统计。`})]})}var $={landing:`_landing_b83tr_1`,hero:`_hero_b83tr_3`,heroCopy:`_heroCopy_b83tr_4`,brand:`_brand_b83tr_4`,brandCaption:`_brandCaption_b83tr_4`,heroEyebrow:`_heroEyebrow_b83tr_4`,heroActions:`_heroActions_b83tr_4`,primary:`_primary_b83tr_4`,heroSecondary:`_heroSecondary_b83tr_4`,universe:`_universe_b83tr_5`,orbitOuter:`_orbitOuter_b83tr_5`,orbitInner:`_orbitInner_b83tr_5`,planet:`_planet_b83tr_5`,orbitLabel:`_orbitLabel_b83tr_5`,orbitMarket:`_orbitMarket_b83tr_5`,orbitProject:`_orbitProject_b83tr_5`,orbitAgent:`_orbitAgent_b83tr_5`,orbitData:`_orbitData_b83tr_5`,universeCaption:`_universeCaption_b83tr_5`,section:`_section_b83tr_6`,sectionHeading:`_sectionHeading_b83tr_6`,kicker:`_kicker_b83tr_6`,principles:`_principles_b83tr_6`,principleTop:`_principleTop_b83tr_6`,modules:`_modules_b83tr_7`,moduleCard:`_moduleCard_b83tr_7`,moduleTop:`_moduleTop_b83tr_7`,features:`_features_b83tr_7`,moduleLink:`_moduleLink_b83tr_7`,sectionIntro:`_sectionIntro_b83tr_8`,scheduleLabel:`_scheduleLabel_b83tr_8`,courses:`_courses_b83tr_8`,course:`_course_b83tr_8`,courseCover:`_courseCover_b83tr_8`,cover1:`_cover1_b83tr_8`,cover2:`_cover2_b83tr_8`,courseContent:`_courseContent_b83tr_8`,courseMeta:`_courseMeta_b83tr_8`,courseDate:`_courseDate_b83tr_8`,courseFooter:`_courseFooter_b83tr_8`,textButton:`_textButton_b83tr_8`,footnote:`_footnote_b83tr_8`,releaseList:`_releaseList_b83tr_9`,release:`_release_b83tr_9`,releaseStamp:`_releaseStamp_b83tr_9`,version:`_version_b83tr_9`,badge:`_badge_b83tr_9`,releaseBody:`_releaseBody_b83tr_9`,changeKind:`_changeKind_b83tr_9`,footer:`_footer_b83tr_10`,detail:`_detail_b83tr_11`,detailHero:`_detailHero_b83tr_11`,metadata:`_metadata_b83tr_11`,detailGrid:`_detailGrid_b83tr_11`,detailPanel:`_detailPanel_b83tr_11`,outcomes:`_outcomes_b83tr_11`,agenda:`_agenda_b83tr_11`,agendaNumber:`_agendaNumber_b83tr_11`,teacher:`_teacher_b83tr_11`,subheading:`_subheading_b83tr_11`,desktopBreak:`_desktopBreak_b83tr_15`,siteNav:`_siteNav_b83tr_20`,siteBrand:`_siteBrand_b83tr_20`,gridDrift:`_gridDrift_b83tr_1`,dataFlow:`_dataFlow_b83tr_31`,flowSignals:`_flowSignals_b83tr_31`,dataTravel:`_dataTravel_b83tr_1`,signalPulse:`_signalPulse_b83tr_1`,outerOrbit:`_outerOrbit_b83tr_1`,innerOrbit:`_innerOrbit_b83tr_1`,orbitSweep:`_orbitSweep_b83tr_32`,radarSweep:`_radarSweep_b83tr_1`,coreBreathe:`_coreBreathe_b83tr_1`,nodeBreathe:`_nodeBreathe_b83tr_1`,motionControl:`_motionControl_b83tr_42`,productIntroduction:`_productIntroduction_b83tr_45`},Gt=[{id:`market`,name:`市场大盘`,icon:S,label:`发现机会`,description:`看清类目变化,发现值得研究的市场机会。`,features:`类目趋势 / 商品与店铺榜 / 机会发现`},{id:`overview`,name:`工作台`,icon:d,label:`统览经营`,description:`掌握经营概况,把观察转化为下一步行动。`,features:`经营总览 / 待处理事项 / 执行记录`},{id:`products`,name:`商品`,icon:f,label:`深入商品`,description:`围绕具体商品,持续跟进经营与优化。`,features:`商品目录 / 运营分组 / 商品工具`},{id:`projects`,name:`项目工作台`,icon:u,label:`推进协作`,description:`用节点与任务连接目标、执行和成果。`,features:`项目看板 / 节点任务 / Agent 协作`},{id:`data`,name:`资料中心`,icon:_,label:`沉淀知识`,description:`让资料有归属,让结论与证据相互关联。`,features:`数据与附件 / 分析复盘 / 资料归档`}],Kt=[{icon:S,number:`01`,title:`以证据形成判断`,text:`将市场数据、研究资料与分析结论联系起来,让每一次决策有据可查。`},{icon:u,number:`02`,title:`以项目推动行动`,text:`把目标拆解成节点与任务,明确下一步,在协作中持续推进。`},{icon:C,number:`03`,title:`与 Agent 协作,沉淀成果`,text:`由山海组织上下文,Agent 执行具体工作,让成果回到项目,成为下一次工作的起点。`}];function qt({course:e,onBack:t}){let n=(0,T.useRef)(null),i=(0,T.useRef)(null);return(0,T.useEffect)(()=>{i.current?.scrollIntoView({block:`start`}),n.current?.focus({preventScroll:!0})},[]),(0,Q.jsxs)(`article`,{ref:i,className:$.detail,children:[(0,Q.jsxs)(`button`,{className:$.textButton,onClick:t,children:[(0,Q.jsx)(r,{size:16}),`返回课程排期`]}),(0,Q.jsxs)(`header`,{className:$.detailHero,children:[(0,Q.jsxs)(`span`,{className:$.kicker,children:[e.category,` · 示例课程`]}),(0,Q.jsx)(`h1`,{ref:n,tabIndex:-1,children:e.title}),(0,Q.jsx)(`p`,{children:e.description}),(0,Q.jsxs)(`div`,{className:$.metadata,children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(s,{size:16}),E(e.date)]}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(a,{size:16}),e.time,` · `,e.duration]}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(w,{size:16}),e.format]})]})]}),(0,Q.jsxs)(`div`,{className:$.detailGrid,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`section`,{className:$.detailPanel,children:[(0,Q.jsx)(`h2`,{children:`这堂课,你将收获`}),(0,Q.jsx)(`ul`,{className:$.outcomes,children:e.outcomes.map(e=>(0,Q.jsxs)(`li`,{children:[(0,Q.jsx)(l,{size:16}),e]},e))})]}),(0,Q.jsxs)(`section`,{className:$.detailPanel,children:[(0,Q.jsx)(`h2`,{children:`课程大纲`}),(0,Q.jsx)(`ol`,{className:$.agenda,children:e.agenda.map((e,t)=>(0,Q.jsxs)(`li`,{children:[(0,Q.jsx)(`span`,{className:$.agendaNumber,children:String(t+1).padStart(2,`0`)}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`time`,{children:e.time}),(0,Q.jsx)(`h3`,{children:e.title}),(0,Q.jsx)(`p`,{children:e.description})]})]},e.time))})]})]}),(0,Q.jsxs)(`aside`,{children:[(0,Q.jsxs)(`section`,{className:$.detailPanel,children:[(0,Q.jsx)(`span`,{className:$.kicker,children:`讲师介绍`}),(0,Q.jsxs)(`div`,{className:$.teacher,children:[(0,Q.jsx)(`span`,{children:e.teacher.slice(0,1)}),(0,Q.jsx)(`h2`,{children:e.teacher})]}),(0,Q.jsx)(`p`,{children:e.teacherBio})]}),(0,Q.jsxs)(`section`,{className:$.detailPanel,children:[(0,Q.jsx)(`h2`,{children:`适合谁学习`}),(0,Q.jsx)(`p`,{children:e.audience}),(0,Q.jsx)(`h2`,{className:$.subheading,children:`课前准备`}),(0,Q.jsx)(`ul`,{children:e.preparation.map(e=>(0,Q.jsx)(`li`,{children:e},e))})]}),(0,Q.jsxs)(`section`,{className:$.detailPanel,children:[(0,Q.jsx)(`h2`,{children:`上课与课程资料`}),(0,Q.jsx)(`p`,{children:`当前为示例排期,用于预览课程内容。正式开课时间、入会方式、课件与回放将在课程确认后提供。`})]})]})]})]})}function Jt({full:e}){let t=e?ce:ce.slice(0,2);return(0,Q.jsx)(`div`,{className:$.releaseList,children:t.map((t,r)=>(0,Q.jsxs)(`article`,{className:$.release,children:[(0,Q.jsxs)(`div`,{className:$.releaseStamp,children:[(0,Q.jsxs)(`span`,{className:$.version,children:[`v`,t.version]}),r===0&&(0,Q.jsx)(`span`,{className:$.badge,children:`最近发布`}),(0,Q.jsx)(`time`,{dateTime:t.date,children:t.date.replaceAll(`-`,`.`)})]}),(0,Q.jsxs)(`div`,{className:$.releaseBody,children:[(0,Q.jsx)(`h3`,{children:t.title}),(0,Q.jsx)(`p`,{children:t.summary}),(0,Q.jsxs)(`details`,{open:e||void 0,children:[(0,Q.jsxs)(`summary`,{children:[`查看更新内容 `,(0,Q.jsx)(n,{size:14})]}),(0,Q.jsx)(`ul`,{children:t.changes.map(e=>(0,Q.jsxs)(`li`,{children:[(0,Q.jsx)(`span`,{className:$.changeKind,children:e.kind}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`strong`,{children:e.title}),(0,Q.jsx)(`p`,{children:e.description})]})]},e.title))})]})]})]},t.version))})}function Yt({api:e,onModule:n,onOpen:r}){let[a,c]=(0,T.useState)(null),[l,d]=(0,T.useState)(!1),[f,m]=(0,T.useState)(!1),h=(0,T.useRef)(new Map),g=(0,T.useRef)(``),y=(0,T.useRef)(null),ee=(0,T.useRef)(null),te=(0,T.useRef)(null),re=(0,T.useRef)(null);function b(e){e?.scrollIntoView({behavior:`auto`,block:`start`}),e?.querySelector(`h2`)?.focus({preventScroll:!0})}function x(){c(null),requestAnimationFrame(()=>{h.current.get(g.current)?.focus()})}return a?(0,Q.jsx)(`div`,{className:$.landing,children:(0,Q.jsx)(qt,{course:a,onBack:x})}):(0,Q.jsxs)(`div`,{className:$.landing,children:[(0,Q.jsx)(Wt,{api:e,onModule:n,onOpen:r}),(0,Q.jsxs)(`details`,{className:$.productIntroduction,children:[(0,Q.jsx)(`summary`,{children:`了解山海 · 设计理念与功能模块`}),(0,Q.jsxs)(`nav`,{className:$.siteNav,"aria-label":`首页内容导航`,children:[(0,Q.jsxs)(`span`,{className:$.siteBrand,children:[`山海 `,(0,Q.jsx)(`i`,{children:`·`}),` OMNI`]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`button`,{onClick:()=>b(te.current),children:`设计理念`}),(0,Q.jsx)(`button`,{onClick:()=>b(y.current),children:`功能模块`}),(0,Q.jsx)(`button`,{onClick:()=>b(ee.current),children:`课程排期`}),(0,Q.jsx)(`button`,{onClick:()=>b(re.current),children:`版本更新`})]})]}),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`section`,{className:$.hero,"data-motion":f?`paused`:`playing`,"aria-labelledby":`home-brand-title`,children:[(0,Q.jsxs)(`div`,{className:$.heroCopy,children:[(0,Q.jsxs)(`div`,{className:$.brand,children:[(0,Q.jsx)(`img`,{src:v,alt:``,width:40,height:40}),(0,Q.jsxs)(`span`,{children:[`山海 `,(0,Q.jsx)(`i`,{children:`·`}),` OMNI`]}),(0,Q.jsx)(`span`,{className:$.brandCaption,children:`智能工作空间`})]}),(0,Q.jsx)(`span`,{className:$.heroEyebrow,children:`连接洞察、行动与知识`}),(0,Q.jsxs)(`h1`,{id:`home-brand-title`,children:[`让洞察成为行动`,(0,Q.jsx)(`br`,{}),(0,Q.jsx)(`em`,{children:`让成果持续沉淀`})]}),(0,Q.jsxs)(`p`,{children:[`连接市场研究、商品经营与项目协作,`,(0,Q.jsx)(`br`,{className:$.desktopBreak}),`与 Agent 一起,把每一次探索变成有价值的积累。`]}),(0,Q.jsxs)(`div`,{className:$.heroActions,children:[(0,Q.jsxs)(`button`,{className:$.primary,onClick:()=>b(y.current),children:[`探索山海 `,(0,Q.jsx)(i,{size:16})]}),(0,Q.jsxs)(`button`,{className:$.heroSecondary,onClick:()=>b(ee.current),children:[(0,Q.jsx)(o,{size:16}),`查看课程`]})]})]}),(0,Q.jsxs)(`div`,{className:$.universe,"aria-hidden":`true`,children:[(0,Q.jsxs)(`svg`,{className:$.dataFlow,viewBox:`0 0 500 400`,preserveAspectRatio:`none`,children:[(0,Q.jsxs)(`g`,{children:[(0,Q.jsx)(`path`,{d:`M80 95 H155 L250 192`}),(0,Q.jsx)(`path`,{d:`M420 120 H350 L250 192`}),(0,Q.jsx)(`path`,{d:`M420 295 H350 L250 192`}),(0,Q.jsx)(`path`,{d:`M80 305 H155 L250 192`})]}),(0,Q.jsxs)(`g`,{className:$.flowSignals,children:[(0,Q.jsx)(`path`,{d:`M80 95 H155 L250 192`}),(0,Q.jsx)(`path`,{d:`M250 192 L350 120 H420`}),(0,Q.jsx)(`path`,{d:`M420 295 H350 L250 192`}),(0,Q.jsx)(`path`,{d:`M250 192 L155 305 H80`})]})]}),(0,Q.jsx)(`div`,{className:$.orbitOuter}),(0,Q.jsx)(`div`,{className:$.orbitInner}),(0,Q.jsx)(`div`,{className:$.orbitSweep}),(0,Q.jsxs)(`div`,{className:$.planet,children:[(0,Q.jsx)(`img`,{src:v,alt:``,width:110,height:110}),(0,Q.jsx)(`span`,{children:`OMNI`})]}),(0,Q.jsxs)(`span`,{className:$.orbitLabel+` `+$.orbitMarket,children:[(0,Q.jsx)(S,{size:15}),`市场洞察`]}),(0,Q.jsxs)(`span`,{className:$.orbitLabel+` `+$.orbitProject,children:[(0,Q.jsx)(u,{size:15}),`项目协作`]}),(0,Q.jsxs)(`span`,{className:$.orbitLabel+` `+$.orbitAgent,children:[(0,Q.jsx)(C,{size:15}),`Agent 执行`]}),(0,Q.jsxs)(`span`,{className:$.orbitLabel+` `+$.orbitData,children:[(0,Q.jsx)(_,{size:15}),`知识沉淀`]}),(0,Q.jsx)(`span`,{className:$.universeCaption,children:`EXPLORE · CONNECT · CREATE`})]}),(0,Q.jsxs)(`button`,{className:$.motionControl,onClick:()=>m(e=>!e),"aria-pressed":f,"aria-label":f?`播放品牌动效`:`暂停品牌动效`,children:[f?(0,Q.jsx)(p,{size:12}):(0,Q.jsx)(oe,{size:12}),(0,Q.jsx)(`span`,{children:f?`播放动效`:`暂停动效`})]})]}),(0,Q.jsxs)(`section`,{ref:te,className:$.section,"aria-labelledby":`home-philosophy-title`,children:[(0,Q.jsxs)(`div`,{className:$.sectionHeading,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`span`,{className:$.kicker,children:`OUR PHILOSOPHY`}),(0,Q.jsx)(`h2`,{id:`home-philosophy-title`,tabIndex:-1,children:`从一次洞察,到持续创造`})]}),(0,Q.jsx)(`p`,{children:`让信息有联系,让工作有方向,让经验可积累。`})]}),(0,Q.jsx)(`div`,{className:$.principles,children:Kt.map(({icon:e,...t})=>(0,Q.jsxs)(`article`,{children:[(0,Q.jsxs)(`div`,{className:$.principleTop,children:[(0,Q.jsx)(e,{size:23}),(0,Q.jsx)(`span`,{children:t.number})]}),(0,Q.jsx)(`h3`,{children:t.title}),(0,Q.jsx)(`p`,{children:t.text})]},t.number))})]}),(0,Q.jsxs)(`section`,{className:$.section,ref:y,"aria-labelledby":`home-modules-title`,children:[(0,Q.jsxs)(`div`,{className:$.sectionHeading,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`span`,{className:$.kicker,children:`ONE CONNECTED WORKSPACE`}),(0,Q.jsx)(`h2`,{id:`home-modules-title`,tabIndex:-1,children:`五个模块,一条完整的工作路径`})]}),(0,Q.jsx)(`p`,{children:`从认识市场到沉淀成果,每一步都有合适的工具。`})]}),(0,Q.jsx)(`div`,{className:$.modules,children:Gt.map(({icon:e,...t},r)=>(0,Q.jsxs)(`button`,{className:$.moduleCard,onClick:()=>n(t.id),"aria-label":`进入${t.name}`,children:[(0,Q.jsxs)(`div`,{className:$.moduleTop,children:[(0,Q.jsx)(e,{size:23}),(0,Q.jsxs)(`span`,{children:[`0`,r+1]})]}),(0,Q.jsx)(`small`,{children:t.label}),(0,Q.jsx)(`h3`,{children:t.name}),(0,Q.jsx)(`p`,{children:t.description}),(0,Q.jsx)(`span`,{className:$.features,children:t.features}),(0,Q.jsxs)(`span`,{className:$.moduleLink,children:[`进入模块 `,(0,Q.jsx)(i,{size:15})]})]},t.id))})]})]})]}),(0,Q.jsxs)(`section`,{ref:ee,className:$.section,"aria-labelledby":`home-courses-title`,children:[(0,Q.jsxs)(`div`,{className:$.sectionHeading,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`span`,{className:$.kicker,children:`LEARN WITH OMNI`}),(0,Q.jsx)(`h2`,{id:`home-courses-title`,tabIndex:-1,children:`一起学习,把方法用起来`})]}),(0,Q.jsxs)(`span`,{className:$.scheduleLabel,children:[(0,Q.jsx)(s,{size:16}),`2026 年 11 月 · 示例排期`]})]}),(0,Q.jsx)(`p`,{className:$.sectionIntro,children:`从入门到实战,沿着真实工作场景,逐步掌握山海与 Agent 的协作方法。`}),(0,Q.jsx)(`div`,{className:$.courses,children:se.map((e,t)=>(0,Q.jsxs)(`article`,{className:$.course,children:[(0,Q.jsxs)(`div`,{className:`${$.courseCover} ${$[`cover`+t]}`,children:[(0,Q.jsx)(`span`,{children:e.category}),(0,Q.jsx)(o,{size:56,strokeWidth:1}),(0,Q.jsxs)(`strong`,{children:[`OMNI CLASS `,(0,Q.jsxs)(`i`,{children:[`0`,t+1]})]})]}),(0,Q.jsxs)(`div`,{className:$.courseContent,children:[(0,Q.jsxs)(`div`,{className:$.courseMeta,children:[(0,Q.jsx)(`span`,{children:e.format}),(0,Q.jsx)(`span`,{children:e.duration})]}),(0,Q.jsx)(`h3`,{children:e.title}),(0,Q.jsx)(`p`,{children:e.description}),(0,Q.jsxs)(`div`,{className:$.courseDate,children:[(0,Q.jsx)(s,{size:14}),(0,Q.jsxs)(`time`,{dateTime:e.date,children:[E(e.date),` `,e.time]})]}),(0,Q.jsxs)(`div`,{className:$.courseFooter,children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(ne,{size:14}),e.teacher]}),(0,Q.jsxs)(`button`,{ref:t=>{t?h.current.set(e.id,t):h.current.delete(e.id)},onClick:()=>{g.current=e.id,c(e)},"aria-label":`查看课程详情:${e.title}`,children:[`查看详情 `,(0,Q.jsx)(i,{size:15})]})]})]})]},e.id))}),(0,Q.jsx)(`p`,{className:$.footnote,children:`课程时间与讲师为示例内容,点击卡片中的“查看详情”可预览完整课程安排。`})]}),(0,Q.jsxs)(`section`,{ref:re,className:$.section,"aria-labelledby":`home-releases-title`,children:[(0,Q.jsxs)(`div`,{className:$.sectionHeading,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`span`,{className:$.kicker,children:`WHAT’S NEW`}),(0,Q.jsx)(`h2`,{id:`home-releases-title`,tabIndex:-1,children:`山海,持续生长`})]}),(0,Q.jsxs)(`button`,{className:$.textButton,"aria-expanded":l,onClick:()=>d(e=>!e),children:[l?`收起历史版本`:`全部版本记录`,(0,Q.jsx)(i,{size:15})]})]}),(0,Q.jsx)(`p`,{className:$.sectionIntro,children:`每一次更新,都向更顺畅的工作体验前进一步。`}),(0,Q.jsx)(Jt,{full:l}),(0,Q.jsx)(`p`,{className:$.footnote,children:`依据项目已确认的桌面发布记录整理 · 此处展示产品更新历史,设备升级状态请查看左侧“升级”入口。`})]}),(0,Q.jsxs)(`footer`,{className:$.footer,children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(t,{size:17}),`山海 · OMNI`]}),(0,Q.jsx)(`span`,{children:`洞察有据,行动有序,成果有归。`})]})]})}function Xt({api:e,onModule:t,onOpen:n}){return(0,Q.jsx)(Yt,{api:e,onModule:t,onOpen:n})}function Zt(e,t){return e.some(e=>e.key===t.key)?e.filter(e=>e.key!==t.key):[t,...e].slice(0,20)}function Qt({section:e}){let t=x(),[n,r]=ie(`home.pins`,[]);return(0,Q.jsx)(Xt,{mode:e,...t,pins:n,onPin:e=>r(t=>Zt(t,e))})}export{Qt as default};
|