Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d33349ccbc |
No files matched your search
@@ -2038,10 +2038,49 @@ def get_cookies_details(current_user: Dict[str, Any] = Depends(get_current_user)
|
||||
'username': cookie_details.get('username', ''),
|
||||
'login_password': cookie_details.get('password', '') or cookie_details.get('login_password', ''),
|
||||
'show_browser': bool(cookie_details.get('show_browser', False)),
|
||||
# 登录有效期提示:闲鱼登录态没有固定到期日,靠自动续期维持,
|
||||
# 所以这里给的是「最近一次续期/活动时间 + 续期能力(密码/通知)」,
|
||||
# 让前端能显示「登录有效 · 最近续期 X 前」以及失效后能否自动救回。
|
||||
'login_info': _build_login_info(cookie_id, cookie_details),
|
||||
})
|
||||
return result
|
||||
|
||||
|
||||
def _build_login_info(cookie_id: str, cookie_details: Dict[str, Any]) -> Dict[str, Any]:
|
||||
"""账号登录有效期信息:最近 token 刷续 / cookie 刷新 / 连接活动时间戳,
|
||||
以及失效自动救回能力(密码已填?cookie_invalid 通知已绑定?)。"""
|
||||
instance = None
|
||||
try:
|
||||
instance = (cookie_manager.manager.instances or {}).get(cookie_id)
|
||||
except Exception:
|
||||
instance = None
|
||||
|
||||
def _ts(attr: str) -> Optional[int]:
|
||||
try:
|
||||
value = float(getattr(instance, attr, 0) or 0)
|
||||
return int(value) if value > 0 else None
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
notify_ready = False
|
||||
try:
|
||||
# 不传 user_id:通知能力只看「该账号是否绑定了启用渠道 +订阅了失效事件」,
|
||||
# 渠道归属另一个用户也不影响失效通知会发出去。
|
||||
rules = db_manager.get_account_notifications(cookie_id, event_type='cookie_invalid')
|
||||
notify_ready = any(rule.get('enabled') for rule in rules)
|
||||
except Exception:
|
||||
notify_ready = False
|
||||
|
||||
return {
|
||||
'last_token_refresh': _ts('last_token_refresh_time'),
|
||||
'last_cookie_refresh': _ts('last_cookie_refresh_time'),
|
||||
'last_connected': _ts('last_successful_connection'),
|
||||
'password_set': bool(cookie_details.get('password') or cookie_details.get('login_password')),
|
||||
'notify_ready': notify_ready,
|
||||
'created_at': cookie_details.get('created_at'),
|
||||
}
|
||||
|
||||
|
||||
@app.post("/cookies")
|
||||
def add_cookie(item: CookieIn, current_user: Dict[str, Any] = Depends(get_current_user)):
|
||||
if cookie_manager.manager is None:
|
||||
|
||||
@@ -28,6 +28,16 @@ import {Power, Edit2, Trash2, QrCode, X, Check, Loader2, MessageSquare, RefreshC
|
||||
import { EmptyState, PageHeader, PageLoading } from './ui';
|
||||
import { AiOptimizeResult } from '../types';
|
||||
|
||||
// 相对时间(秒级时间戳):刚刚 / N 分钟前 / N 小时前 / N 天前
|
||||
const fmtAgo = (ts?: number | null): string | null => {
|
||||
if (!ts || ts <= 0) return null;
|
||||
const diff = Math.max(0, Math.floor(Date.now() / 1000) - ts);
|
||||
if (diff < 60) return '刚刚';
|
||||
if (diff < 3600) return `${Math.floor(diff / 60)} 分钟前`;
|
||||
if (diff < 86400) return `${Math.floor(diff / 3600)} 小时前`;
|
||||
return `${Math.floor(diff / 86400)} 天前`;
|
||||
};
|
||||
|
||||
type ModalType = 'edit' | 'ai-settings' | null;
|
||||
|
||||
const AccountList: React.FC = () => {
|
||||
@@ -733,6 +743,29 @@ const AccountList: React.FC = () => {
|
||||
提示:挂 VPN、代理或部署在海外服务器时,闲鱼风控会明显收紧,滑块和人脸验证的通过率大幅下降,建议使用国内网络环境登录与运行。
|
||||
</p>
|
||||
|
||||
{/* 登录有效期说明 + 失效通知处理方案 + 提高登录稳定性的方法(用户侧一次说清) */}
|
||||
<div className="rounded-lg border border-blue-200 bg-blue-50 px-4 py-3 text-xs leading-5 text-blue-900">
|
||||
<p className="font-bold">关于登录有效期与失效处理</p>
|
||||
<ul className="mt-1 list-disc space-y-0.5 pl-4">
|
||||
<li>
|
||||
<b>登录有效期</b>:闲鱼登录态没有固定到期日,系统每 20 分钟自动续期一次,
|
||||
续期成功即一直有效;卡片上的「最近续期 / 最近活跃」就是当前登录状态。
|
||||
</li>
|
||||
<li>
|
||||
<b>失效通知</b>:账号失效会立即按绑定的渠道推送「Token/Cookie 异常」通知;
|
||||
若卡片显示「失效不通知」,请到 消息中心 → 通知设置 绑定渠道并勾选该事件。
|
||||
</li>
|
||||
<li>
|
||||
<b>失效处理</b>:收到通知后点右上角「扫码添加账号」,用同一个闲鱼账号重新扫码即可覆盖恢复;
|
||||
<b>建议先补填账号密码(点卡片「编辑」)</b>,之后失效时系统会自动用密码重新登录,无需再扫码。
|
||||
</li>
|
||||
<li>
|
||||
<b>提高稳定性</b>:保持国内网络(勿挂代理/海外服务器)、同一账号避免多处同时登录、
|
||||
保持监听常开(持续活跃更有利于维持登录态)。
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Account Grid */}
|
||||
<div className="grid grid-cols-1 gap-3">
|
||||
{accounts.map((account) => {
|
||||
@@ -803,11 +836,43 @@ const AccountList: React.FC = () => {
|
||||
{account.auto_confirm && <span className="status-badge status-badge-warning flex items-center gap-1.5"><MessageSquare className="w-3 h-3"/> 自动确认</span>}
|
||||
{account.pause_duration > 0 && <span className="status-badge status-badge-info flex items-center gap-1.5"><Clock className="w-3 h-3"/> 暂停 {account.pause_duration} 分钟</span>}
|
||||
</div>
|
||||
{/* 登录有效期:闲鱼登录态无固定到期日,靠自动续期维持;
|
||||
给出最近续期/活跃时间,以及失效后能否自动救回(密码)与会不会通知你 */}
|
||||
<div className="mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500">
|
||||
{account.runtime_state === 'need_relogin' ? (
|
||||
<span className="font-medium text-red-600">登录已失效 · 需重新扫码</span>
|
||||
) : account.login_info?.last_cookie_refresh || account.login_info?.last_connected ? (
|
||||
<>
|
||||
<span className="font-medium text-emerald-600">登录有效</span>
|
||||
{account.login_info?.last_cookie_refresh && (
|
||||
<span>最近续期 {fmtAgo(account.login_info.last_cookie_refresh)}</span>
|
||||
)}
|
||||
{account.login_info?.last_connected && (
|
||||
<span>最近活跃 {fmtAgo(account.login_info.last_connected)}</span>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<span>监听未运行,暂无续期记录</span>
|
||||
)}
|
||||
{account.login_info?.password_set ? (
|
||||
<span className="text-emerald-600">密码已设 · 失效自动重登</span>
|
||||
) : (
|
||||
<span className="text-amber-600">未设密码 · 失效需手动扫码</span>
|
||||
)}
|
||||
{account.login_info?.notify_ready ? (
|
||||
<span className="text-emerald-600">失效通知已开</span>
|
||||
) : (
|
||||
<span className="text-amber-600">失效不通知</span>
|
||||
)}
|
||||
</div>
|
||||
{/* 登录态过期给出明确动作,只挂一个徽标用户不知道该做什么 */}
|
||||
{account.runtime_state === 'need_relogin' && (
|
||||
<p className="mt-2 rounded-md bg-red-50 px-3 py-2 text-xs leading-5 text-red-700">
|
||||
闲鱼登录态已过期,人机验证和等待都无法恢复。请点右上角「扫码添加账号」
|
||||
用同一个闲鱼账号重新扫码,即可覆盖并恢复该账号。
|
||||
闲鱼登录态已过期,人机验证和等待都无法恢复。
|
||||
{account.login_info?.password_set
|
||||
? '系统已尝试用密码自动重登仍失败,说明该账号密码登录也被风控拦下。'
|
||||
: '补填账号密码(点「编辑」保存)后,下次失效系统会自动用密码重新登录,无需再扫码。'}
|
||||
请点右上角「扫码添加账号」用同一个闲鱼账号重新扫码,即可覆盖并恢复该账号。
|
||||
</p>
|
||||
)}
|
||||
{/* 闲鱼要求人机验证时给出「自己浏览器打开」的入口。
|
||||
|
||||
@@ -119,6 +119,7 @@ export const getAccountDetails = async (): Promise<AccountDetail[]> => {
|
||||
following: item.following,
|
||||
profile_updated_at: item.profile_updated_at,
|
||||
runtime_state: item.runtime_state,
|
||||
login_info: item.login_info,
|
||||
ai_enabled: false,
|
||||
})) as AccountDetail[];
|
||||
};
|
||||
|
||||
@@ -52,6 +52,15 @@ export interface AccountDetail {
|
||||
following?: number;
|
||||
profile_updated_at?: string;
|
||||
runtime_state?: 'running' | 'connecting' | 'need_relogin' | 'stopped' | 'cancelled' | 'failed';
|
||||
// 登录有效期信息:闲鱼登录态无固定到期日,靠自动续期维持(时间戳为秒)
|
||||
login_info?: {
|
||||
last_token_refresh?: number | null; // 最近一次 token 自动刷新成功
|
||||
last_cookie_refresh?: number | null; // 最近一次 cookie 续期(浏览器刷新)
|
||||
last_connected?: number | null; // 最近一次连接活动
|
||||
password_set?: boolean; // 已补填密码 → 失效可自动密码重登
|
||||
notify_ready?: boolean; // cookie_invalid 失效通知已绑定启用渠道
|
||||
created_at?: string | null; // 账号加入时间
|
||||
};
|
||||
// AI设置
|
||||
ai_enabled?: boolean;
|
||||
max_discount_percent?: number;
|
||||
|
||||
@@ -1 +1 @@
|
||||
import{r as l,o as O,n as i,z as k,j as e,B as j,L as A,E as H,aE as q,S,K as z,aR as B}from"./index-BZnqBmwp.js";import{P as F,a as U,E as D,S as o}from"./ui-B9Jzqjf7.js";import{S as $}from"./save-Dxf2dvgb.js";import{M as E}from"./message-square-text-Bnj1FXzX.js";import{E as G}from"./eye-off-D1JuM9mR.js";import{E as J}from"./eye-BibUMjxU.js";import{P as C}from"./play-P9T6ppIo.js";const I="https://ai.88531.cn/v1",Q="https://ai.88531.cn",f={ai_enabled:!1,model_name:"qwen-plus",api_key:"",api_key_configured:!1,base_url:I,user_agent:"codex_cli_rs/0.0.0 (Hermes Agent)",max_discount_percent:10,max_discount_amount:100,max_bargain_rounds:3,context_enabled:!0,context_message_limit:12,context_expire_minutes:120,custom_prompts:""},ae=()=>{const[c,P]=l.useState([]),[t,y]=l.useState(""),[a,d]=l.useState(f),[R,x]=l.useState(!0),[p,N]=l.useState(!1),[u,_]=l.useState(!1),[g,w]=l.useState(!1),[h,K]=l.useState("你好,这个商品现在还能买吗?"),[v,b]=l.useState(""),r=l.useMemo(()=>c.find(s=>s.id===t),[c,t]);l.useEffect(()=>{O().then(s=>{var m;P(s),y(((m=s[0])==null?void 0:m.id)||"")}).catch(s=>i(s instanceof Error?s.message:"账号加载失败","error")).finally(()=>x(!1))},[]),l.useEffect(()=>{t&&(x(!0),b(""),w(!1),k(t).then(s=>d({...f,...s,api_key:""})).catch(s=>i(s instanceof Error?s.message:"AI配置加载失败","error")).finally(()=>x(!1)))},[t]);const n=(s,m)=>{d(M=>({...M,[s]:m}))},T=async()=>{if(!t){i("请先选择账号","warning");return}if(!a.model_name.trim()||!a.base_url.trim()){i("模型名称和接口地址不能为空","warning");return}N(!0);try{await z(t,a);const s=await k(t);d({...f,...s,api_key:""}),i("人工智能回复配置已保存","success")}catch(s){i(s instanceof Error?s.message:"AI配置保存失败","error")}finally{N(!1)}},L=async()=>{if(!t||!h.trim()){i("请选择账号并输入测试消息","warning");return}_(!0),b("");try{const s=await B(t,{message:h.trim(),item_title:"测试商品",item_price:100,item_desc:"仅用于测试人工智能回复,不会发送到闲鱼。"});b(s.reply||s.message||"测试完成"),i("AI回复测试完成","success")}catch(s){i(s instanceof Error?s.message:"AI回复测试失败","error")}finally{_(!1)}};return R&&c.length===0?e.jsx(F,{label:"正在加载 AI 回复配置"}):e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(U,{title:"AI 回复",description:"按账号配置模型连接、上下文记忆、议价边界和业务回复规则。",icon:j,actions:e.jsxs("div",{className:"flex min-w-0 flex-wrap items-end gap-2",children:[e.jsxs("label",{className:"min-w-0 sm:w-72",children:[e.jsx("span",{className:"field-label",children:"当前账号"}),e.jsx("select",{value:t,onChange:s=>y(s.target.value),className:"ios-input w-full rounded-md px-3 py-2 text-sm font-semibold",children:c.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||`账号 ${s.id.slice(0,8)}`},s.id))})]}),e.jsxs("button",{type:"button",onClick:T,disabled:p||!t,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[p?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx($,{className:"h-4 w-4"}),p?"保存中":"保存配置"]})]})}),t?e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"section-panel grid gap-4 p-4 lg:grid-cols-[1fr_auto] lg:items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 font-bold text-gray-900",children:[e.jsx(E,{className:"h-5 w-5"}),(r==null?void 0:r.nickname)||(r==null?void 0:r.remark)||t]}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"回复优先级:关键词回复 → 人工智能回复 → 默认回复。AI失败时不会中断消息处理。"})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-3",children:[e.jsx("span",{className:"text-sm font-bold text-gray-700",children:a.ai_enabled?"已启用":"已停用"}),e.jsx("input",{type:"checkbox",checked:a.ai_enabled,onChange:s=>n("ai_enabled",s.target.checked),className:"h-5 w-5 accent-yellow-400"})]})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1.35fr)_minmax(340px,0.65fr)]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"模型连接",description:"支持 OpenAI 兼容接口;密钥留空时保留服务器中已有配置。",icon:j}),e.jsxs("div",{className:"grid gap-4 p-5 md:grid-cols-2",children:[e.jsxs("div",{className:"md:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-brand-200 bg-brand-50 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800",children:"没有 API Key?每天可免费领取额度"}),e.jsx("p",{className:"mt-0.5 text-xs text-gray-600",children:"兼容 OpenAI 接口,注册后把密钥填到下方即可直接用。"})]}),e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:e.jsxs("a",{href:Q,target:"_blank",rel:"norefLine truncated
|
||||
import{r as l,o as O,n as i,z as k,j as e,B as j,L as A,E as H,aE as q,S,K as z,aR as B}from"./index-CkAjw-Zl.js";import{P as F,a as U,E as D,S as o}from"./ui-DGhuFsSA.js";import{S as $}from"./save-2L2g6g1L.js";import{M as E}from"./message-square-text-DqMbrfJm.js";import{E as G}from"./eye-off-DVn7pRcv.js";import{E as J}from"./eye-vwq0YQk5.js";import{P as C}from"./play-BTeYe-0U.js";const I="https://ai.88531.cn/v1",Q="https://ai.88531.cn",f={ai_enabled:!1,model_name:"qwen-plus",api_key:"",api_key_configured:!1,base_url:I,user_agent:"codex_cli_rs/0.0.0 (Hermes Agent)",max_discount_percent:10,max_discount_amount:100,max_bargain_rounds:3,context_enabled:!0,context_message_limit:12,context_expire_minutes:120,custom_prompts:""},ae=()=>{const[c,P]=l.useState([]),[t,y]=l.useState(""),[a,d]=l.useState(f),[R,x]=l.useState(!0),[p,N]=l.useState(!1),[u,_]=l.useState(!1),[g,w]=l.useState(!1),[h,K]=l.useState("你好,这个商品现在还能买吗?"),[v,b]=l.useState(""),r=l.useMemo(()=>c.find(s=>s.id===t),[c,t]);l.useEffect(()=>{O().then(s=>{var m;P(s),y(((m=s[0])==null?void 0:m.id)||"")}).catch(s=>i(s instanceof Error?s.message:"账号加载失败","error")).finally(()=>x(!1))},[]),l.useEffect(()=>{t&&(x(!0),b(""),w(!1),k(t).then(s=>d({...f,...s,api_key:""})).catch(s=>i(s instanceof Error?s.message:"AI配置加载失败","error")).finally(()=>x(!1)))},[t]);const n=(s,m)=>{d(M=>({...M,[s]:m}))},T=async()=>{if(!t){i("请先选择账号","warning");return}if(!a.model_name.trim()||!a.base_url.trim()){i("模型名称和接口地址不能为空","warning");return}N(!0);try{await z(t,a);const s=await k(t);d({...f,...s,api_key:""}),i("人工智能回复配置已保存","success")}catch(s){i(s instanceof Error?s.message:"AI配置保存失败","error")}finally{N(!1)}},L=async()=>{if(!t||!h.trim()){i("请选择账号并输入测试消息","warning");return}_(!0),b("");try{const s=await B(t,{message:h.trim(),item_title:"测试商品",item_price:100,item_desc:"仅用于测试人工智能回复,不会发送到闲鱼。"});b(s.reply||s.message||"测试完成"),i("AI回复测试完成","success")}catch(s){i(s instanceof Error?s.message:"AI回复测试失败","error")}finally{_(!1)}};return R&&c.length===0?e.jsx(F,{label:"正在加载 AI 回复配置"}):e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(U,{title:"AI 回复",description:"按账号配置模型连接、上下文记忆、议价边界和业务回复规则。",icon:j,actions:e.jsxs("div",{className:"flex min-w-0 flex-wrap items-end gap-2",children:[e.jsxs("label",{className:"min-w-0 sm:w-72",children:[e.jsx("span",{className:"field-label",children:"当前账号"}),e.jsx("select",{value:t,onChange:s=>y(s.target.value),className:"ios-input w-full rounded-md px-3 py-2 text-sm font-semibold",children:c.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||`账号 ${s.id.slice(0,8)}`},s.id))})]}),e.jsxs("button",{type:"button",onClick:T,disabled:p||!t,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[p?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx($,{className:"h-4 w-4"}),p?"保存中":"保存配置"]})]})}),t?e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"section-panel grid gap-4 p-4 lg:grid-cols-[1fr_auto] lg:items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 font-bold text-gray-900",children:[e.jsx(E,{className:"h-5 w-5"}),(r==null?void 0:r.nickname)||(r==null?void 0:r.remark)||t]}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"回复优先级:关键词回复 → 人工智能回复 → 默认回复。AI失败时不会中断消息处理。"})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-3",children:[e.jsx("span",{className:"text-sm font-bold text-gray-700",children:a.ai_enabled?"已启用":"已停用"}),e.jsx("input",{type:"checkbox",checked:a.ai_enabled,onChange:s=>n("ai_enabled",s.target.checked),className:"h-5 w-5 accent-yellow-400"})]})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1.35fr)_minmax(340px,0.65fr)]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"模型连接",description:"支持 OpenAI 兼容接口;密钥留空时保留服务器中已有配置。",icon:j}),e.jsxs("div",{className:"grid gap-4 p-5 md:grid-cols-2",children:[e.jsxs("div",{className:"md:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-brand-200 bg-brand-50 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800",children:"没有 API Key?每天可免费领取额度"}),e.jsx("p",{className:"mt-0.5 text-xs text-gray-600",children:"兼容 OpenAI 接口,注册后把密钥填到下方即可直接用。"})]}),e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:e.jsxs("a",{href:Q,target:"_blank",rel:"norefLine truncated
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as m,r as n,j as e,bD as h,e as g,P as b,E as l,aE as j,aU as f,aV as o,bE as N}from"./index-BZnqBmwp.js";import{a as u,E as y}from"./ui-B9Jzqjf7.js";/**
|
||||
import{c as m,r as n,j as e,bD as h,e as g,P as b,E as l,aE as j,aU as f,aV as o,bE as N}from"./index-CkAjw-Zl.js";import{a as u,E as y}from"./ui-DGhuFsSA.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import{c as ee,r as i,j as e,U as Ce,B as Q,M as Ze,L as C,S as G,e as Ae,k as es,b as z,X as T,l as ss,m as O,o as ts,p as as,q as rs,s as ls,t as ns,n as m,u as Ie,v as Me,w as is,x as os,y as ds,z as cs,A as ms,D as xs,F as us,G as hs,H as ps,I as gs,J as fs,K as bs,N as ys}from"./index-CkAjw-Zl.js";import{P as js,a as Ns,E as _s}from"./ui-DGhuFsSA.js";import{C as Z}from"./check-B6GSSnq6.js";import{S as ws}from"./sparkles-ITX60YIA.js";import{P as vs,a as ks}from"./power-DZ_kRimy.js";import{T as Ss}from"./trash-2-H_4vB0ks.js";import{K as Cs}from"./key-B8XT9PyZ.js";import{E as As}from"./eye-off-DVn7pRcv.js";import{E as Is}from"./eye-vwq0YQk5.js";import{S as $e}from"./save-2L2g6g1L.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ms=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ee=ee("clock",Ms);/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const $s=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Es=ee("map-pin",$s);/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ps=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Rs=ee("qr-code",Ps),Pe=A=>{if(!A||A<=0)return null;const w=Math.max(0,Math.floor(Date.now()/1e3)-A);return w<60?"刚刚":w<3600?`${Math.floor(w/60)} 分钟前`:w<86400?`${Math.floor(w/3600)} 小时前`:`${Math.floor(w/86400)} 天前`},Bs=()=>{var Ne;const[A,w]=i.useState([]),[Re,se]=i.useState(!0),[M,U]=i.useState([]),[Le,B]=i.useState(!1),[qe,Fe]=i.useState(""),[v,p]=i.useState("pending"),[K,g]=i.useState(""),[te,ae]=i.useState(""),[re,le]=i.useState(""),j=i.useRef(null),N=i.useRef(""),[ne,k]=i.useState(null),[o,ie]=i.useState(null),[oe,de]=i.useState(null),[ce,me]=i.useState(null),[xe,ue]=i.useState(null),[$,Y]=i.useState(null),[he,pe]=i.useState(""),[ge,L]=i.useState("starting"),[ze,q]=i.useState(""),E=i.useRef(null),f=i.useRef(null),fe=i.useRef(null),[Te,be]=i.useState(new Set),[W,ye]=i.useState(null),[c,H]=i.useState(null),[b,je]=i.useState(null),[Ue,J]=i.useState(0);i.useEffect(()=>{if(!b)return;J(0);const s=setInterval(()=>{J(Math.floor((Date.now()-b.startedAt)/1e3))},500);return()=>clearInterval(s)},[b]);const[n,_]=i.useState({remark:"",cookie:"",auto_confirm:!1,pause_duration:0,username:"",login_password:"",show_browser:!1,showLoginPassword:!1}),[u,P]=i.useState({ai_enabled:!1,model_name:"qwen-plus",api_key:"",base_url:"https://dashscope.aliyuncs.com/compatible-mode/v1",user_agent:"",max_discount_percent:10,max_discount_amount:100,max_bargain_rounds:3,context_enabled:!0,context_message_limit:12,context_expire_minutes:120,custom_prompts:""}),[S,R]=i.useState(!1),h=async s=>{s!=null&&s.silent||se(!0);try{const t=await ts();let r={};try{r=await as()}catch(l){console.error("Failed to load AI settings:",l)}const a=t.map(l=>{var d,y,I,x,F;return{...l,ai_enabled:((d=r[l.id])==null?void 0:d.ai_enabled)??!1,max_discount_percent:((y=r[l.id])==null?void 0:y.max_discount_percent)??10,max_discount_amount:((I=r[l.id])==null?void 0:I.max_discount_amount)??100,max_bargain_rounds:((x=r[l.id])==null?void 0:x.max_bargain_rounds)??3,custom_prompts:((F=r[l.id])==null?void 0:F.custom_prompts)??""}});w(a)}catch(t){console.error("Failed to load accounts:",t)}finally{s!=null&&s.silent||se(!1)}};i.useEffect(()=>{const s=()=>{O().then(r=>U((r.accounts||[]).filter(a=>a.blocked||a.verification_type&&a.verification_type!=="none"))).catch(()=>U([]))};s();const t=setInterval(s,3e4);return()=>clearInterval(t)},[]),i.useEffect(()=>{h();const s=setInterval(()=>{h({silent:!0})},3e4);return()=>{clearInterval(s),N.current="",j.current&&clearTimeout(j.current),f.current&&clearInterval(f.current)}},[]);const We=async(s,t)=>{await ms(s,!t),h()},De=async s=>{me(s);try{const t=await ns(s);if(!t.need_verify){m(t.message||"该账号风控已解除,无需验证","success"),await h({silent:!0});const r=await O();U((r.accounts||[]).filter(a=>a.blocked||a.verification_type&&a.verification_type!=="none"));return}if(t.verification_url){window.open(t.verification_url,"_blank","noopener,noreferrer"),m("已打开验证页;滑块通过后页面可能跳转到淘宝,属正常现象,直接关闭即可","info"),f.current&&clearInterval(f.current);let r=18;f.current=setInterval(async()=>{r-=1;try{((await O()).accounts||[]).some(d=>d.blocked||d.verification_type&&d.verification_type!=="none")?r<=0&&f.current&&(clearInterval(f.current),f.current=null):(f.current&&clearInterval(f.current),f.current=null,m("验证已生效,账号恢复运行","success"),h({silent:!0}))}catch{}},1e4)}}catch(t){m(t instanceof Error?t.message:"获取验证链接失败","error")}finally{me(null)}},Qe=async s=>{de(s);try{await ds(s),be(t=>{const r=new Set(t);return r.delete(s),r}),await h()}catch(t){console.error("Failed to refresh account profile:",t),m(t instanceof Error?t.message:"账号资料刷新失败")}finally{de(null)}},Oe=async s=>{await Me("确认删除该账号吗?")&&(await xs(s),h())},Be=async s=>{Y(s),pe(""),L("starting"),q("正在服务器上启动验证页面,请稍候…"),ue(s.id);try{const t=await os(s.id);if(!t.success)throw new Error(t.message||"人工验证未完成");L("done"),q(t.message||"验证完成,账号 Cookie 已更新"),m(t.message||"人工验证完成,账号 Cookie 已更新","success");const r=await O();U((r.accounts||[]).filter(a=>a.blocked||a.verification_type&&a.verification_type!=="none")),await h({silent:!0})}catch(t){const r=t instanceof Error?t.message:"人工验证启动失败";L("failed"),q(r),m(r,"error")}finally{ue(null)}};i.useEffect(()=>{var l;iLine truncated
|
||||
|
||||
例如:回复时保持礼貌专业、使用简洁的语言、强调产品质量等`,className:"ios-input h-36 w-full resize-y rounded-md px-3 py-2.5"})]}),e.jsxs("div",{className:"rounded-md border border-blue-200 bg-blue-50 p-4",children:[e.jsxs("h4",{className:"mb-2 flex items-center gap-2 font-bold text-blue-900",children:[e.jsx(ss,{className:"w-4 h-4"}),"AI如何工作"]}),e.jsxs("ul",{className:"text-xs text-blue-800 space-y-1",children:[e.jsx("li",{children:"• 自动识别买家的砍价请求"}),e.jsx("li",{children:"• 根据设定的策略智能回复"}),e.jsx("li",{children:"• 在合理范围内同意降价或礼貌拒绝"}),e.jsx("li",{children:"• 保持专业友好的沟通风格"})]})]})]}),e.jsx("div",{className:"modal-footer",children:e.jsxs("div",{className:"flex w-full gap-2",children:[e.jsx("button",{type:"button",onClick:()=>k(null),className:"ios-btn-secondary flex-1 rounded-md px-4 py-2.5 text-sm",disabled:S,children:"取消"}),e.jsxs("button",{type:"button",onClick:Ve,className:"ios-btn-primary flex flex-1 items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",disabled:S,children:[S?e.jsx(C,{className:"w-4 h-4 animate-spin"}):e.jsx($e,{className:"w-4 h-4"}),S?"保存中...":"保存"]})]})})]})}),document.body),$&&z.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container modal-container-lg",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"人工滑块验证"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:$.nickname||$.id})]}),e.jsx("button",{type:"button",onClick:()=>Y(null),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(T,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-blue-200 bg-blue-50 px-3 py-2 text-xs leading-relaxed text-blue-800",children:[e.jsx("p",{className:"font-bold",children:"这是什么?"}),e.jsxs("p",{className:"mt-1",children:["闲鱼要求人机验证时,系统会自动尝试滑动,但成功率有限。此处把",e.jsx("b",{children:"服务器上浏览器的画面实时投屏"}),"到这里,你用鼠标拖动, 操作会回传到服务器驱动真实浏览器 —— 因此部署在无桌面的服务器上也能用。"]}),e.jsx("p",{className:"mt-1",children:"验证通过后系统会自动回收新的登录凭证,账号立即恢复运行。"})]}),e.jsx("div",{className:`rounded-md px-3 py-2 text-sm font-semibold ${ge==="done"?"bg-green-50 text-green-700":ge==="failed"?"bg-red-50 text-red-700":"bg-amber-50 text-amber-800"}`,children:ze||"正在准备…"}),e.jsx("div",{className:"flex min-h-[320px] items-center justify-center rounded-md border-2 border-dashed border-gray-200 bg-gray-50 p-2",children:he?e.jsx("img",{ref:fe,src:he,alt:"服务器端验证页面",draggable:!1,className:"max-h-[460px] w-auto cursor-crosshair select-none rounded",onMouseDown:s=>{s.preventDefault(),D("down",s)},onMouseMove:s=>{s.buttons===1&&D("move",s)},onMouseUp:s=>D("up",s),onMouseLeave:s=>{s.buttons===1&&D("up",s)}}):e.jsxs("div",{className:"text-center text-sm text-gray-500",children:[e.jsx(C,{className:"mx-auto mb-2 h-6 w-6 animate-spin text-gray-400"}),"正在服务器上打开验证页面…",e.jsx("p",{className:"mt-1 text-xs text-gray-400",children:"首次启动需要几秒,若账号当前不在风控状态则不会出现滑块"})]})}),e.jsxs("p",{className:"text-xs text-gray-500",children:["操作方式:在上方画面的滑块按钮上 ",e.jsx("b",{children:"按住鼠标左键"}),",",e.jsx("b",{children:"向右拖到底"})," 后松开。画面会随你的操作实时刷新。"]})]}),e.jsx("div",{className:"modal-footer flex justify-end",children:e.jsx("button",{type:"button",onClick:()=>Y(null),className:"ios-btn-secondary rounded-md px-4 py-2 text-sm",children:"关闭"})})]})}),document.body),c&&z.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",style:{maxWidth:"44rem"},children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-bold text-gray-900",children:["AI 优化建议 · ",c.account.nickname||c.account.username||c.account.id]}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["共分析 ",c.data.analyzed_count??((Ne=c.data.items)==null?void 0:Ne.length)??0," 件商品",c.data.model?` · 模型 ${c.data.model}`:"",c.data.truncated?" · 商品较多已截断分析":""]})]}),e.jsx("button",{type:"button",onClick:()=>H(null),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭AI优化建议",children:e.jsx(T,{className:"h-5 w-5 text-gray-600"})})]}),e.jsxs("div",{className:"modal-body py-5",children:[c.data.stats&&e.jsxs("div",{className:"mb-4 flex fle
Line truncated
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
import{c as X,r as i,j as e,U as je,B as U,M as Ke,L as S,S as J,e as Ne,k as Ye,b as L,X as q,l as He,m as W,o as Je,p as Ve,q as Xe,s as Ge,t as Ze,n as m,u as _e,v as ve,w as es,x as ss,y as ts,z as as,A as rs,D as ls,F as ns,G as is,H as os,I as ds,J as cs,K as ms,N as xs}from"./index-BZnqBmwp.js";import{P as us,a as hs,E as ps}from"./ui-B9Jzqjf7.js";import{C as V}from"./check-C6LyX_Nv.js";import{S as gs}from"./sparkles-DVlvGI-3.js";import{P as bs,a as fs}from"./power-D9WTjX12.js";import{T as ys}from"./trash-2-CmT2n80I.js";import{K as js}from"./key-C0msAg8e.js";import{E as Ns}from"./eye-off-D1JuM9mR.js";import{E as _s}from"./eye-BibUMjxU.js";import{S as we}from"./save-Dxf2dvgb.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const vs=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ke=X("clock",vs);/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ws=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],ks=X("map-pin",ws);/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ss=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Cs=X("qr-code",Ss),Fs=()=>{var fe;const[Q,Se]=i.useState([]),[Ce,G]=i.useState(!0),[A,z]=i.useState([]),[Ae,D]=i.useState(!1),[Ie,Me]=i.useState(""),[v,p]=i.useState("pending"),[O,g]=i.useState(""),[Z,ee]=i.useState(""),[se,te]=i.useState(""),j=i.useRef(null),N=i.useRef(""),[ae,w]=i.useState(null),[o,re]=i.useState(null),[le,ne]=i.useState(null),[ie,oe]=i.useState(null),[de,ce]=i.useState(null),[I,B]=i.useState(null),[me,xe]=i.useState(""),[ue,P]=i.useState("starting"),[$e,R]=i.useState(""),M=i.useRef(null),b=i.useRef(null),he=i.useRef(null),[Ee,pe]=i.useState(new Set),[F,ge]=i.useState(null),[c,K]=i.useState(null),[f,be]=i.useState(null),[Pe,Y]=i.useState(0);i.useEffect(()=>{if(!f)return;Y(0);const s=setInterval(()=>{Y(Math.floor((Date.now()-f.startedAt)/1e3))},500);return()=>clearInterval(s)},[f]);const[n,_]=i.useState({remark:"",cookie:"",auto_confirm:!1,pause_duration:0,username:"",login_password:"",show_browser:!1,showLoginPassword:!1}),[u,$]=i.useState({ai_enabled:!1,model_name:"qwen-plus",api_key:"",base_url:"https://dashscope.aliyuncs.com/compatible-mode/v1",user_agent:"",max_discount_percent:10,max_discount_amount:100,max_bargain_rounds:3,context_enabled:!0,context_message_limit:12,context_expire_minutes:120,custom_prompts:""}),[k,E]=i.useState(!1),h=async s=>{s!=null&&s.silent||G(!0);try{const t=await Je();let r={};try{r=await Ve()}catch(l){console.error("Failed to load AI settings:",l)}const a=t.map(l=>{var d,y,C,x,ye;return{...l,ai_enabled:((d=r[l.id])==null?void 0:d.ai_enabled)??!1,max_discount_percent:((y=r[l.id])==null?void 0:y.max_discount_percent)??10,max_discount_amount:((C=r[l.id])==null?void 0:C.max_discount_amount)??100,max_bargain_rounds:((x=r[l.id])==null?void 0:x.max_bargain_rounds)??3,custom_prompts:((ye=r[l.id])==null?void 0:ye.custom_prompts)??""}});Se(a)}catch(t){console.error("Failed to load accounts:",t)}finally{s!=null&&s.silent||G(!1)}};i.useEffect(()=>{const s=()=>{W().then(r=>z((r.accounts||[]).filter(a=>a.blocked||a.verification_type&&a.verification_type!=="none"))).catch(()=>z([]))};s();const t=setInterval(s,3e4);return()=>clearInterval(t)},[]),i.useEffect(()=>{h();const s=setInterval(()=>{h({silent:!0})},3e4);return()=>{clearInterval(s),N.current="",j.current&&clearTimeout(j.current),b.current&&clearInterval(b.current)}},[]);const Re=async(s,t)=>{await rs(s,!t),h()},Le=async s=>{oe(s);try{const t=await Ze(s);if(!t.need_verify){m(t.message||"该账号风控已解除,无需验证","success"),await h({silent:!0});const r=await W();z((r.accounts||[]).filter(a=>a.blocked||a.verification_type&&a.verification_type!=="none"));return}if(t.verification_url){window.open(t.verification_url,"_blank","noopener,noreferrer"),m("已打开验证页;滑块通过后页面可能跳转到淘宝,属正常现象,直接关闭即可","info"),b.current&&clearInterval(b.current);let r=18;b.current=setInterval(async()=>{r-=1;try{((await W()).accounts||[]).some(d=>d.blocked||d.verification_type&&d.verification_type!=="none")?r<=0&&b.current&&(clearInterval(b.current),b.current=null):(b.current&&clearInterval(b.current),b.current=null,m("验证已生效,账号恢复运行","success"),h({silent:!0}))}catch{}},1e4)}}catch(t){m(t instanceof Error?t.message:"获取验证链接失败","error")}finally{oe(null)}},qe=async s=>{ne(s);try{await ts(s),pe(t=>{const r=new Set(t);return r.delete(s),r}),await h()}catch(t){console.error("Failed to refresh account profile:",t),m(t instanceof Error?t.message:"账号资料刷新失败")}finally{ne(null)}},ze=async s=>{await ve("确认删除该账号吗?")&&(await ls(s),h())},Fe=async s=>{B(s),xe(""),P("starting"),R("正在服务器上启动验证页面,请稍候…"),ce(s.id);try{const t=await ss(s.id);if(!t.success)throw new Error(t.message||"人工验证未完成");P("done"),R(t.message||"验证完成,账号 Cookie 已更新"),m(t.message||"人工验证完成,账号 Cookie 已更新","success");const r=await W();z((r.accounts||[]).filter(a=>a.blocked||a.verification_type&&a.verification_type!=="none")),await h({silent:!0})}catch(t){const r=t instanceof Error?t.message:"人工验证启动失败";P("failed"),R(r),m(r,"error")}finally{ce(null)}};i.useEffect(()=>{var l;if(!I){(l=M.current)==null||l.close(),M.current=null;return}let s=!1,t=0,r;const a=()=>{if(s)return;const d=location.protocol==="https:"?"wss":"ws",y=new WebSocket(`${d}://${location.host}/api/captcha/ws/${encodeURICLine truncated
|
||||
|
||||
例如:回复时保持礼貌专业、使用简洁的语言、强调产品质量等`,className:"ios-input h-36 w-full resize-y rounded-md px-3 py-2.5"})]}),e.jsxs("div",{className:"rounded-md border border-blue-200 bg-blue-50 p-4",children:[e.jsxs("h4",{className:"mb-2 flex items-center gap-2 font-bold text-blue-900",children:[e.jsx(He,{className:"w-4 h-4"}),"AI如何工作"]}),e.jsxs("ul",{className:"text-xs text-blue-800 space-y-1",children:[e.jsx("li",{children:"• 自动识别买家的砍价请求"}),e.jsx("li",{children:"• 根据设定的策略智能回复"}),e.jsx("li",{children:"• 在合理范围内同意降价或礼貌拒绝"}),e.jsx("li",{children:"• 保持专业友好的沟通风格"})]})]})]}),e.jsx("div",{className:"modal-footer",children:e.jsxs("div",{className:"flex w-full gap-2",children:[e.jsx("button",{type:"button",onClick:()=>w(null),className:"ios-btn-secondary flex-1 rounded-md px-4 py-2.5 text-sm",disabled:k,children:"取消"}),e.jsxs("button",{type:"button",onClick:De,className:"ios-btn-primary flex flex-1 items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",disabled:k,children:[k?e.jsx(S,{className:"w-4 h-4 animate-spin"}):e.jsx(we,{className:"w-4 h-4"}),k?"保存中...":"保存"]})]})})]})}),document.body),I&&L.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container modal-container-lg",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"人工滑块验证"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:I.nickname||I.id})]}),e.jsx("button",{type:"button",onClick:()=>B(null),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(q,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-blue-200 bg-blue-50 px-3 py-2 text-xs leading-relaxed text-blue-800",children:[e.jsx("p",{className:"font-bold",children:"这是什么?"}),e.jsxs("p",{className:"mt-1",children:["闲鱼要求人机验证时,系统会自动尝试滑动,但成功率有限。此处把",e.jsx("b",{children:"服务器上浏览器的画面实时投屏"}),"到这里,你用鼠标拖动, 操作会回传到服务器驱动真实浏览器 —— 因此部署在无桌面的服务器上也能用。"]}),e.jsx("p",{className:"mt-1",children:"验证通过后系统会自动回收新的登录凭证,账号立即恢复运行。"})]}),e.jsx("div",{className:`rounded-md px-3 py-2 text-sm font-semibold ${ue==="done"?"bg-green-50 text-green-700":ue==="failed"?"bg-red-50 text-red-700":"bg-amber-50 text-amber-800"}`,children:$e||"正在准备…"}),e.jsx("div",{className:"flex min-h-[320px] items-center justify-center rounded-md border-2 border-dashed border-gray-200 bg-gray-50 p-2",children:me?e.jsx("img",{ref:he,src:me,alt:"服务器端验证页面",draggable:!1,className:"max-h-[460px] w-auto cursor-crosshair select-none rounded",onMouseDown:s=>{s.preventDefault(),T("down",s)},onMouseMove:s=>{s.buttons===1&&T("move",s)},onMouseUp:s=>T("up",s),onMouseLeave:s=>{s.buttons===1&&T("up",s)}}):e.jsxs("div",{className:"text-center text-sm text-gray-500",children:[e.jsx(S,{className:"mx-auto mb-2 h-6 w-6 animate-spin text-gray-400"}),"正在服务器上打开验证页面…",e.jsx("p",{className:"mt-1 text-xs text-gray-400",children:"首次启动需要几秒,若账号当前不在风控状态则不会出现滑块"})]})}),e.jsxs("p",{className:"text-xs text-gray-500",children:["操作方式:在上方画面的滑块按钮上 ",e.jsx("b",{children:"按住鼠标左键"}),",",e.jsx("b",{children:"向右拖到底"})," 后松开。画面会随你的操作实时刷新。"]})]}),e.jsx("div",{className:"modal-footer flex justify-end",children:e.jsx("button",{type:"button",onClick:()=>B(null),className:"ios-btn-secondary rounded-md px-4 py-2 text-sm",children:"关闭"})})]})}),document.body),c&&L.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",style:{maxWidth:"44rem"},children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-bold text-gray-900",children:["AI 优化建议 · ",c.account.nickname||c.account.username||c.account.id]}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["共分析 ",c.data.analyzed_count??((fe=c.data.items)==null?void 0:fe.length)??0," 件商品",c.data.model?` · 模型 ${c.data.model}`:"",c.data.truncated?" · 商品较多已截断分析":""]})]}),e.jsx("button",{type:"button",onClick:()=>K(null),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭AI优化建议",children:e.jsx(q,{className:"h-5 w-5 text-gray-600"})})]}),e.jsxs("div",{className:"modal-body py-5",children:[c.data.stats&&e.jsxs("div",{className:"mb-4 flex fle
Line truncated
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{r as n,j as e,Q as C,e as A,aS as $,T as P,o as B,n as i,aX as H,bF as M}from"./index-BZnqBmwp.js";import{P as D,a as R,N as z,S as d}from"./ui-B9Jzqjf7.js";import{S as O}from"./save-Dxf2dvgb.js";import{S as U}from"./shield-alert-rM_NVGQr.js";import{F as X}from"./flower-2-B1FJm-vw.js";import{M as q}from"./message-square-text-Bnj1FXzX.js";const r=200,E="宝贝收到了,很满意,感谢老板,欢迎下次再来!",G="亲,感谢支持!有任何问题随时找我~",I={auto_rate_enabled:"评价买家",auto_flower_enabled:"索要小红花",auto_thanks_enabled:"收货致谢",auto_receive_flower_enabled:"自动收下小红花"},K=[{value:300,label:"5 分钟"},{value:900,label:"15 分钟"},{value:1800,label:"30 分钟"},{value:3600,label:"1 小时"},{value:7200,label:"2 小时(默认)"},{value:21600,label:"6 小时"},{value:86400,label:"24 小时"}],ee=()=>{const[l,c]=n.useState(null),[p,h]=n.useState(!1),[b,_]=n.useState(!1),[o,T]=n.useState([]),[f,x]=n.useState({}),j=()=>{h(!0),Promise.all([$(),P().catch(()=>null),B().catch(()=>[])]).then(([t,a,s])=>{c({...t,auto_rate_template:(t.auto_rate_template??"").trim()||(a==null?void 0:a.auto_rate_template)||E}),T(s),x((a==null?void 0:a.accounts)??{})}).finally(()=>h(!1))},F=async(t,a)=>{const s=f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},w={...s,[a]:!s[a]};x(u=>({...u,[t]:w}));try{await M(t,{[a]:w[a]})}catch(u){x(k=>({...k,[t]:s})),i(`保存失败:${u.message}`)}};n.useEffect(()=>{j()},[]);const L=async()=>{if(!l)return;const t=(l.auto_rate_template||"").trim();if(!t){i("默认评价内容不能为空");return}if(t.length>r){i(`默认评价内容不能超过 ${r} 字`);return}_(!0);try{await H({auto_rate_template:t,auto_thanks_template:(l.auto_thanks_template||"").trim(),buyer_interaction_interval:String(S)}),i("买家互动配置已保存")}catch(a){i(`保存失败:${a.message}`)}finally{_(!1)}};if(!l)return e.jsx(D,{label:"正在加载买家互动配置"});const m=t=>f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},g=o.some(t=>m(t.id).auto_rate_enabled),y=o.some(t=>m(t.id).auto_thanks_enabled),N=l.auto_rate_template??"",v=l.auto_thanks_template??"",S=Number(l.buyer_interaction_interval)||7200;return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(R,{title:"买家互动",description:"评价买家、索要小红花与自动收花。涉及平台实际操作,请按账号开启。",icon:C,actions:e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:j,disabled:p,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(A,{className:`h-4 w-4 ${p?"animate-spin":""}`}),"刷新"]}),e.jsxs("button",{type:"button",onClick:()=>void L(),disabled:b,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(O,{className:"h-4 w-4"}),b?"保存中":"保存设置"]})]})}),e.jsx(z,{type:"warning",message:"评价提交后无法撤销,求花会向买家发送一条消息。建议先用测试订单验证效果。"}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-2",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"按账号开启",description:"逐个账号控制。关闭的账号不会自动执行,订单页也不显示入口、后端拒绝请求。",icon:U}),o.length===0?e.jsx("p",{className:"px-4 py-6 text-sm text-gray-500",children:"还没有账号,请先在账号管理里添加。"}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs text-gray-500",children:[e.jsx("th",{className:"px-4 py-2 font-semibold",children:"账号"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"评价买家"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"索要小红花"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"收货致谢"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"自动收下小红花"})]})}),e.jsx("tbody",{children:o.map(t=>{const a=m(t.id);return e.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-semibold text-gray-900",children:t.nickname||t.id}),e.jsx("p",{className:"mt-0.5 font-mono text-xs text-gray-400",children:t.id})]}),["auto_rate_enabled","auto_flower_enabled","auto_thanks_enabled","auto_receive_flower_enabled"].map(s=>e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{type:"button",role:"switch","aria-checked":a[s],"aria-label":`${t.nickname||t.id} ${I[s]}`,onClick:()=>void F(t.id,s),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${a[s]?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{cLine truncated
|
||||
import{r as n,j as e,Q as C,e as A,aS as $,T as P,o as B,n as i,aX as H,bF as M}from"./index-CkAjw-Zl.js";import{P as D,a as R,N as z,S as d}from"./ui-DGhuFsSA.js";import{S as O}from"./save-2L2g6g1L.js";import{S as U}from"./shield-alert-BxxLkcUR.js";import{F as X}from"./flower-2-Cth4QkK1.js";import{M as q}from"./message-square-text-DqMbrfJm.js";const r=200,E="宝贝收到了,很满意,感谢老板,欢迎下次再来!",G="亲,感谢支持!有任何问题随时找我~",I={auto_rate_enabled:"评价买家",auto_flower_enabled:"索要小红花",auto_thanks_enabled:"收货致谢",auto_receive_flower_enabled:"自动收下小红花"},K=[{value:300,label:"5 分钟"},{value:900,label:"15 分钟"},{value:1800,label:"30 分钟"},{value:3600,label:"1 小时"},{value:7200,label:"2 小时(默认)"},{value:21600,label:"6 小时"},{value:86400,label:"24 小时"}],ee=()=>{const[l,c]=n.useState(null),[p,h]=n.useState(!1),[b,_]=n.useState(!1),[o,T]=n.useState([]),[f,x]=n.useState({}),j=()=>{h(!0),Promise.all([$(),P().catch(()=>null),B().catch(()=>[])]).then(([t,a,s])=>{c({...t,auto_rate_template:(t.auto_rate_template??"").trim()||(a==null?void 0:a.auto_rate_template)||E}),T(s),x((a==null?void 0:a.accounts)??{})}).finally(()=>h(!1))},F=async(t,a)=>{const s=f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},w={...s,[a]:!s[a]};x(u=>({...u,[t]:w}));try{await M(t,{[a]:w[a]})}catch(u){x(k=>({...k,[t]:s})),i(`保存失败:${u.message}`)}};n.useEffect(()=>{j()},[]);const L=async()=>{if(!l)return;const t=(l.auto_rate_template||"").trim();if(!t){i("默认评价内容不能为空");return}if(t.length>r){i(`默认评价内容不能超过 ${r} 字`);return}_(!0);try{await H({auto_rate_template:t,auto_thanks_template:(l.auto_thanks_template||"").trim(),buyer_interaction_interval:String(S)}),i("买家互动配置已保存")}catch(a){i(`保存失败:${a.message}`)}finally{_(!1)}};if(!l)return e.jsx(D,{label:"正在加载买家互动配置"});const m=t=>f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},g=o.some(t=>m(t.id).auto_rate_enabled),y=o.some(t=>m(t.id).auto_thanks_enabled),N=l.auto_rate_template??"",v=l.auto_thanks_template??"",S=Number(l.buyer_interaction_interval)||7200;return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(R,{title:"买家互动",description:"评价买家、索要小红花与自动收花。涉及平台实际操作,请按账号开启。",icon:C,actions:e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:j,disabled:p,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(A,{className:`h-4 w-4 ${p?"animate-spin":""}`}),"刷新"]}),e.jsxs("button",{type:"button",onClick:()=>void L(),disabled:b,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(O,{className:"h-4 w-4"}),b?"保存中":"保存设置"]})]})}),e.jsx(z,{type:"warning",message:"评价提交后无法撤销,求花会向买家发送一条消息。建议先用测试订单验证效果。"}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-2",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"按账号开启",description:"逐个账号控制。关闭的账号不会自动执行,订单页也不显示入口、后端拒绝请求。",icon:U}),o.length===0?e.jsx("p",{className:"px-4 py-6 text-sm text-gray-500",children:"还没有账号,请先在账号管理里添加。"}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs text-gray-500",children:[e.jsx("th",{className:"px-4 py-2 font-semibold",children:"账号"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"评价买家"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"索要小红花"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"收货致谢"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"自动收下小红花"})]})}),e.jsx("tbody",{children:o.map(t=>{const a=m(t.id);return e.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-semibold text-gray-900",children:t.nickname||t.id}),e.jsx("p",{className:"mt-0.5 font-mono text-xs text-gray-400",children:t.id})]}),["auto_rate_enabled","auto_flower_enabled","auto_thanks_enabled","auto_receive_flower_enabled"].map(s=>e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{type:"button",role:"switch","aria-checked":a[s],"aria-label":`${t.nickname||t.id} ${I[s]}`,onClick:()=>void F(t.id,s),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${a[s]?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{cLine truncated
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as P,r as m,j as e,X as D,a6 as re,n as j,a7 as de,a8 as M,a9 as G,b as z,aa as H,v as Y,ab as ce,ac as oe,ad as me}from"./index-BZnqBmwp.js";import{a as pe,S as xe,E as B}from"./ui-B9Jzqjf7.js";import{P as U}from"./plus-BljRK6L8.js";import{S as he}from"./square-pen-Bmle-FRS.js";import{T as ye}from"./trash-2-CmT2n80I.js";import{P as Z}from"./package-CDIx-vGO.js";import{S as ue}from"./save-Dxf2dvgb.js";import{I as q}from"./image-BE6TxU00.js";import{P as be}from"./package-check-BKkFNxd0.js";/**
|
||||
import{c as P,r as m,j as e,X as D,a6 as re,n as j,a7 as de,a8 as M,a9 as G,b as z,aa as H,v as Y,ab as ce,ac as oe,ad as me}from"./index-CkAjw-Zl.js";import{a as pe,S as xe,E as B}from"./ui-DGhuFsSA.js";import{P as U}from"./plus-BXZgwA0o.js";import{S as he}from"./square-pen-B8Sj6MD6.js";import{T as ye}from"./trash-2-H_4vB0ks.js";import{P as Z}from"./package-CwcnsKO8.js";import{S as ue}from"./save-2L2g6g1L.js";import{I as q}from"./image-BN5k8Hl-.js";import{P as be}from"./package-check-DD7mkdH5.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
var Db=Object.defineProperty;var $b=(e,t,r)=>t in e?Db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _i=(e,t,r)=>$b(e,typeof t!="symbol"?t+"":t,r);import{c as gu,r as v,a as bu,b as xu,g as Nb,R as Rb,d as Lb,j as I,C as zb,e as Bb,U as Fb,E as Wb,f as Kb,h as Ub,n as Hb,i as Ac}from"./index-BZnqBmwp.js";import{P as Yb,a as Gb,b as Vb,S as qb,E as Ii}from"./ui-B9Jzqjf7.js";import{P as Ro}from"./package-CDIx-vGO.js";import{T as Lh}from"./trending-up-BLnHDV6T.js";import{A as Xb}from"./activity-D09genEZ.js";import{P as Zb}from"./package-check-BKkFNxd0.js";/**
|
||||
var Db=Object.defineProperty;var $b=(e,t,r)=>t in e?Db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _i=(e,t,r)=>$b(e,typeof t!="symbol"?t+"":t,r);import{c as gu,r as v,a as bu,b as xu,g as Nb,R as Rb,d as Lb,j as I,C as zb,e as Bb,U as Fb,E as Wb,f as Kb,h as Ub,n as Hb,i as Ac}from"./index-CkAjw-Zl.js";import{P as Yb,a as Gb,b as Vb,S as qb,E as Ii}from"./ui-DGhuFsSA.js";import{P as Ro}from"./package-CwcnsKO8.js";import{T as Lh}from"./trending-up-DkO2MYj4.js";import{A as Xb}from"./activity-DQLHFHES.js";import{P as Zb}from"./package-check-DD7mkdH5.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1 +1 @@
|
||||
import{r as o,j as e}from"./index-BZnqBmwp.js";const r=[{group:"快速开始",items:[{id:"dashboard",label:"系统总览"},{id:"accounts",label:"账号管理"}]},{group:"闲鱼业务",items:[{id:"items",label:"商品与发货"},{id:"resell",label:"一键转卖"},{id:"hotlist",label:"实时热卖榜"},{id:"pricewatch",label:"价格监控"},{id:"orders",label:"订单管理"},{id:"buyer-interaction",label:"买家互动"},{id:"cards",label:"卡密库存"}]},{group:"消息与自动化",items:[{id:"messages",label:"消息中心"},{id:"auto-reply",label:"自动回复"},{id:"ai-reply",label:"AI 回复"},{id:"product-automation",label:"商品自动化"}]},{group:"系统",items:[{id:"notifications",label:"通知与日志"},{id:"settings",label:"系统设置"},{id:"users",label:"用户管理"},{id:"about",label:"关于本系统"}]}],p={dashboard:{title:"系统总览",intro:"登录后的首页,汇总账号、订单、营收和库存数据,一眼判断当前经营状态。",steps:["顶部时间筛选可切换统计周期:今天 / 昨天 / 三天内 / 7天内 / 一个月内 / 自定义。","「有效成交额」与「已到账」两张卡片展示所选周期内的资金数据。","「系统运行中」状态灯表示后端自动回复、定时任务正常运行。","左侧菜单点击任意功能即可切换页面,右上角可切换日间/夜间模式。"],tips:["新部署时没有订单记录,金额显示 ¥0.00 属正常,产生交易后自动累计。"]},accounts:{title:"账号管理",intro:"所有功能的入口:先把闲鱼账号接入系统,其他页面才能选择该账号操作。",steps:["点击「添加账号」,填入账号备注名与 Cookie(从浏览器登录闲鱼后在开发者工具 Network 里复制)。","保存后列表会显示该账号,可点击「检测」验证 Cookie 是否仍然有效。","失效的账号需要重新复制 Cookie 更新;不用的账号可「禁用」而不必删除。","启用状态的账号才会参与自动回复、订单同步、消息聚合等自动化。"],tips:["Cookie 等同账号登录态,请勿泄露;本系统只保存在自己的服务器数据库中。"]},items:{title:"商品与发货",intro:"同步闲鱼在售商品,为每个商品配置自动发货内容(卡密、网盘链接或文字说明)。",steps:["选择账号后点击同步,把该账号在闲鱼的在售商品拉取到列表。","给商品设置发货内容:虚拟商品可填卡密说明或网盘链接,实物商品可填物流备注。","买家付款后系统按这里配置的内容自动回复发货,无需手动复制粘贴。","商品价格、标题变化可通过刷新按钮同步最新状态。"],tips:["发货内容支持多行文本与链接,建议按「商品名称 + 提取码」格式写清楚。"]},resell:{title:"一键转卖",intro:"从收藏或搜索结果里挑商品,改好标题价格直接发布到自己账号,做无货源转卖。",steps:["右上角先选择要发布到的闲鱼账号。","点「我的收藏」→「加载收藏」读取该账号收藏的在售商品;或切到「搜索商品」按关键词找货。","在列表中勾选想转卖的商品,修改标题、价格、描述等发布信息。","点「一键转卖」发布,商品即挂到自己账号名下。"],tips:["发布前核对价格是否留足利润;同名商品重复转卖前先在商品列表确认未上架过。"]},hotlist:{title:"实时热卖榜",intro:"抓取闲鱼实时热卖数据,帮你判断什么好卖、该上什么货。",steps:["选择分类或直接查看综合热卖榜,列表按近期成交热度排序。","点击商品可查看详情与价格区间,作为自己定价的参考。","看中的品可直接跳「一键转卖」上架到自己账号。"],tips:["榜单数据为实时抓取,个别时段可能延迟,可点刷新重新拉取。"]},pricewatch:{title:"价格监控",intro:"设定关键词和目标价,系统定时搜索闲鱼,出现低于目标价的商品立即通知你捡漏。",steps:["点「新建规则」:填写关键词(如想蹲的商品名)、目标价、检测间隔,保存后立即执行一次检测。","检测结果展示匹配商品数、历史最低价与「最近一次」的完整商品信息(超长内容自动换行展示)。","低于目标价时触发通知——前提是已在「通知与日志」页配置好通知渠道并勾选「价格监控」事件(见下方章节)。","点「历史记录」查看每次检测的明细;不需要的规则可停用或删除。"],tips:["通知没发出来时,页面顶部的红色提示会写明去哪配置,按提示到「通知与日志」页补配即可。","关键词越具体匹配越准,避免太宽泛导致噪音过多。"]},orders:{title:"订单管理",intro:"汇总所选账号的闲鱼订单,查看状态、手动补发与核对发货记录。",steps:["选择账号与时间范围筛选订单,列表显示买家、商品、金额与状态。","自动发货成Line truncated
|
||||
import{r as o,j as e}from"./index-CkAjw-Zl.js";const r=[{group:"快速开始",items:[{id:"dashboard",label:"系统总览"},{id:"accounts",label:"账号管理"}]},{group:"闲鱼业务",items:[{id:"items",label:"商品与发货"},{id:"resell",label:"一键转卖"},{id:"hotlist",label:"实时热卖榜"},{id:"pricewatch",label:"价格监控"},{id:"orders",label:"订单管理"},{id:"buyer-interaction",label:"买家互动"},{id:"cards",label:"卡密库存"}]},{group:"消息与自动化",items:[{id:"messages",label:"消息中心"},{id:"auto-reply",label:"自动回复"},{id:"ai-reply",label:"AI 回复"},{id:"product-automation",label:"商品自动化"}]},{group:"系统",items:[{id:"notifications",label:"通知与日志"},{id:"settings",label:"系统设置"},{id:"users",label:"用户管理"},{id:"about",label:"关于本系统"}]}],p={dashboard:{title:"系统总览",intro:"登录后的首页,汇总账号、订单、营收和库存数据,一眼判断当前经营状态。",steps:["顶部时间筛选可切换统计周期:今天 / 昨天 / 三天内 / 7天内 / 一个月内 / 自定义。","「有效成交额」与「已到账」两张卡片展示所选周期内的资金数据。","「系统运行中」状态灯表示后端自动回复、定时任务正常运行。","左侧菜单点击任意功能即可切换页面,右上角可切换日间/夜间模式。"],tips:["新部署时没有订单记录,金额显示 ¥0.00 属正常,产生交易后自动累计。"]},accounts:{title:"账号管理",intro:"所有功能的入口:先把闲鱼账号接入系统,其他页面才能选择该账号操作。",steps:["点击「添加账号」,填入账号备注名与 Cookie(从浏览器登录闲鱼后在开发者工具 Network 里复制)。","保存后列表会显示该账号,可点击「检测」验证 Cookie 是否仍然有效。","失效的账号需要重新复制 Cookie 更新;不用的账号可「禁用」而不必删除。","启用状态的账号才会参与自动回复、订单同步、消息聚合等自动化。"],tips:["Cookie 等同账号登录态,请勿泄露;本系统只保存在自己的服务器数据库中。"]},items:{title:"商品与发货",intro:"同步闲鱼在售商品,为每个商品配置自动发货内容(卡密、网盘链接或文字说明)。",steps:["选择账号后点击同步,把该账号在闲鱼的在售商品拉取到列表。","给商品设置发货内容:虚拟商品可填卡密说明或网盘链接,实物商品可填物流备注。","买家付款后系统按这里配置的内容自动回复发货,无需手动复制粘贴。","商品价格、标题变化可通过刷新按钮同步最新状态。"],tips:["发货内容支持多行文本与链接,建议按「商品名称 + 提取码」格式写清楚。"]},resell:{title:"一键转卖",intro:"从收藏或搜索结果里挑商品,改好标题价格直接发布到自己账号,做无货源转卖。",steps:["右上角先选择要发布到的闲鱼账号。","点「我的收藏」→「加载收藏」读取该账号收藏的在售商品;或切到「搜索商品」按关键词找货。","在列表中勾选想转卖的商品,修改标题、价格、描述等发布信息。","点「一键转卖」发布,商品即挂到自己账号名下。"],tips:["发布前核对价格是否留足利润;同名商品重复转卖前先在商品列表确认未上架过。"]},hotlist:{title:"实时热卖榜",intro:"抓取闲鱼实时热卖数据,帮你判断什么好卖、该上什么货。",steps:["选择分类或直接查看综合热卖榜,列表按近期成交热度排序。","点击商品可查看详情与价格区间,作为自己定价的参考。","看中的品可直接跳「一键转卖」上架到自己账号。"],tips:["榜单数据为实时抓取,个别时段可能延迟,可点刷新重新拉取。"]},pricewatch:{title:"价格监控",intro:"设定关键词和目标价,系统定时搜索闲鱼,出现低于目标价的商品立即通知你捡漏。",steps:["点「新建规则」:填写关键词(如想蹲的商品名)、目标价、检测间隔,保存后立即执行一次检测。","检测结果展示匹配商品数、历史最低价与「最近一次」的完整商品信息(超长内容自动换行展示)。","低于目标价时触发通知——前提是已在「通知与日志」页配置好通知渠道并勾选「价格监控」事件(见下方章节)。","点「历史记录」查看每次检测的明细;不需要的规则可停用或删除。"],tips:["通知没发出来时,页面顶部的红色提示会写明去哪配置,按提示到「通知与日志」页补配即可。","关键词越具体匹配越准,避免太宽泛导致噪音过多。"]},orders:{title:"订单管理",intro:"汇总所选账号的闲鱼订单,查看状态、手动补发与核对发货记录。",steps:["选择账号与时间范围筛选订单,列表显示买家、商品、金额与状态。","自动发货成Line truncated
|
||||
@@ -1 +1 @@
|
||||
import{r as n,bN as H,bO as O,j as e,bP as S,L as y,e as A,E as B}from"./index-BZnqBmwp.js";import{P as F,a as U,N as q,b as z,E as V}from"./ui-B9Jzqjf7.js";import{T as R}from"./trending-up-BLnHDV6T.js";import{P as W}from"./package-CDIx-vGO.js";const Y=2500,L=r=>r?r>=1e4?`${(r/1e4).toFixed(1).replace(/\.0$/,"")}万`:String(r):"0",G=r=>{if(!r)return"—";const i=Date.now()-r;if(i<6e4)return"刚刚";if(i<36e5)return`${Math.floor(i/6e4)}分钟前`;if(i<864e5)return`${Math.floor(i/36e5)}小时前`;if(i<7*864e5)return`${Math.floor(i/864e5)}天前`;const o=new Date(r);return`${o.getMonth()+1}月${o.getDate()}日`},J=r=>{if(!r)return"—";const i=new Date(r),o=v=>String(v).padStart(2,"0");return`${i.getFullYear()}-${o(i.getMonth()+1)}-${o(i.getDate())}`},K=({rank:r})=>{const i=r===1?"bg-amber-400 text-white":r===2?"bg-gray-300 text-gray-700":r===3?"bg-orange-300 text-orange-900":"bg-[var(--surface-subtle)] text-[var(--text-soft)]";return e.jsx("span",{className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-sm font-bold ${i}`,children:r})},se=()=>{const[r,i]=n.useState(!0),[o,v]=n.useState({}),[$,P]=n.useState([]),[d,M]=n.useState("digital"),[j,f]=n.useState(null),[h,_]=n.useState(0),[u,k]=n.useState(!1),g=n.useRef(null),I=n.useRef(d);I.current=d;const w=n.useCallback(()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),b=n.useCallback(async s=>{try{const a=await H();v(a.boards||{}),P(a.categories||[]),s!=null&&s.silent||i(!1),Object.values(a.boards||{}).some(x=>x.refreshing)?E():w()}catch(a){s!=null&&s.silent||(i(!1),f({type:"error",message:a.message||"榜单加载失败"}))}},[]),E=n.useCallback(()=>{g.current||(g.current=setInterval(()=>{b({silent:!0})},Y))},[b]);n.useEffect(()=>(b(),w),[b,w]),n.useEffect(()=>{if(h<=0)return;const s=setInterval(()=>_(a=>a<=1?0:a-1),1e3);return()=>clearInterval(s)},[h]);const t=o[d];n.useEffect(()=>{const s=o[d];!s||r||s.refreshing||s.items.length>0||s.cooldown_remaining>0||N(d)},[d,r,o]);const N=async s=>{if(!u){k(!0);try{const a=await O(s);a.started?(f({type:"info",message:a.categories&&a.categories.length>1?"已开始刷新全部类目,完成后自动更新。":"已开始抓取,十几秒后榜单自动刷新。"}),E()):a.reason==="cooldown"?f({type:"error",message:a.message||"刷新过于频繁,请稍后再试"}):f({type:"info",message:a.message||"已有刷新任务进行中"})}catch(a){f({type:"error",message:a.message||"刷新触发失败"})}finally{k(!1)}}};n.useEffect(()=>{t&&t.cooldown_remaining>0&&_(t.cooldown_remaining)},[t]);const T=n.useMemo(()=>$.map(s=>{var a;return{id:s.id,label:s.name,count:(a=o[s.id])==null?void 0:a.items.length}}),[$,o]),C=n.useMemo(()=>{if(!t)return[];const s={};return(t.items||[]).forEach(l=>{(l.keywords||[]).forEach(x=>{const p=s[x]||(s[x]={hits:0,want:0});p.hits+=1,p.want+=l.want_count||0})}),(t.keywords&&t.keywords.length?t.keywords:Object.keys(s)).map(l=>{var x,p;return{kw:l,hits:((x=s[l])==null?void 0:x.hits)||0,want:((p=s[l])==null?void 0:p.want)||0}}).sort((l,x)=>x.want-l.want)},[t]),m=!!(t!=null&&t.refreshing),c=t==null?void 0:t.progress,D=t!=null&&t.updated_at?G(t.updated_at*1e3):"尚未生成";return r?e.jsx(F,{label:"正在加载热卖榜"}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(U,{title:"实时热卖榜",description:"按「想要人数」排序的全网热卖商品,数据来自闲鱼实时搜索聚合。",icon:S,badge:e.jsx("span",{className:"rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text-soft)]",children:t?`更新于 ${D}`:"待生成"}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",className:"ios-btn-secondary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N("all"),disabled:u||m||h>0,children:[u||m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(A,{className:"h-4 w-4"}),"全部刷新"]}),e.jsxs("button",{type:"button",className:"ios-btn-primary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N(d),disabled:u||m||h>0,children:[m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(R,{className:"h-4 w-4"}),h>0?`${h}s 后可刷新`:"刷新本类目"]})]})}),j&&e.jsx(q,{type:j.type==="info"?"success":j.type,message:j.message,onClose:()=>f(null)}),e.jsx("div",{className:"toolbar",children:e.jsx(z,{value:d,onChange:M,items:T,ariaLabel:"热卖榜类目"})}),m&&e.jsx("div",{className:"section-panel",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm text-[var(--text-soft)]",children:[e.jsx(y,{className:"h-4 w-4 animate-spin text-[#ff4400]"}),e.jsxs("span",{children:["正在抓取「",(c==null?void 0:c.keyword)||"…","」",c&&c.total>0?`(${Math.min(c.done+1,c.total)}/${c.total})`:""]}),c&&c.total>0&&e.jsx("span",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--surface-subtle)]",children:e.jsx("span",{className:"block h-full rounded-full bg-[#ff4400] transition-all",style:{width:`${Math.round(c.Line truncated
|
||||
import{r as n,bN as H,bO as O,j as e,bP as S,L as y,e as A,E as B}from"./index-CkAjw-Zl.js";import{P as F,a as U,N as q,b as z,E as V}from"./ui-DGhuFsSA.js";import{T as R}from"./trending-up-DkO2MYj4.js";import{P as W}from"./package-CwcnsKO8.js";const Y=2500,L=r=>r?r>=1e4?`${(r/1e4).toFixed(1).replace(/\.0$/,"")}万`:String(r):"0",G=r=>{if(!r)return"—";const i=Date.now()-r;if(i<6e4)return"刚刚";if(i<36e5)return`${Math.floor(i/6e4)}分钟前`;if(i<864e5)return`${Math.floor(i/36e5)}小时前`;if(i<7*864e5)return`${Math.floor(i/864e5)}天前`;const o=new Date(r);return`${o.getMonth()+1}月${o.getDate()}日`},J=r=>{if(!r)return"—";const i=new Date(r),o=v=>String(v).padStart(2,"0");return`${i.getFullYear()}-${o(i.getMonth()+1)}-${o(i.getDate())}`},K=({rank:r})=>{const i=r===1?"bg-amber-400 text-white":r===2?"bg-gray-300 text-gray-700":r===3?"bg-orange-300 text-orange-900":"bg-[var(--surface-subtle)] text-[var(--text-soft)]";return e.jsx("span",{className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-sm font-bold ${i}`,children:r})},se=()=>{const[r,i]=n.useState(!0),[o,v]=n.useState({}),[$,P]=n.useState([]),[d,M]=n.useState("digital"),[j,f]=n.useState(null),[h,_]=n.useState(0),[u,k]=n.useState(!1),g=n.useRef(null),I=n.useRef(d);I.current=d;const w=n.useCallback(()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),b=n.useCallback(async s=>{try{const a=await H();v(a.boards||{}),P(a.categories||[]),s!=null&&s.silent||i(!1),Object.values(a.boards||{}).some(x=>x.refreshing)?E():w()}catch(a){s!=null&&s.silent||(i(!1),f({type:"error",message:a.message||"榜单加载失败"}))}},[]),E=n.useCallback(()=>{g.current||(g.current=setInterval(()=>{b({silent:!0})},Y))},[b]);n.useEffect(()=>(b(),w),[b,w]),n.useEffect(()=>{if(h<=0)return;const s=setInterval(()=>_(a=>a<=1?0:a-1),1e3);return()=>clearInterval(s)},[h]);const t=o[d];n.useEffect(()=>{const s=o[d];!s||r||s.refreshing||s.items.length>0||s.cooldown_remaining>0||N(d)},[d,r,o]);const N=async s=>{if(!u){k(!0);try{const a=await O(s);a.started?(f({type:"info",message:a.categories&&a.categories.length>1?"已开始刷新全部类目,完成后自动更新。":"已开始抓取,十几秒后榜单自动刷新。"}),E()):a.reason==="cooldown"?f({type:"error",message:a.message||"刷新过于频繁,请稍后再试"}):f({type:"info",message:a.message||"已有刷新任务进行中"})}catch(a){f({type:"error",message:a.message||"刷新触发失败"})}finally{k(!1)}}};n.useEffect(()=>{t&&t.cooldown_remaining>0&&_(t.cooldown_remaining)},[t]);const T=n.useMemo(()=>$.map(s=>{var a;return{id:s.id,label:s.name,count:(a=o[s.id])==null?void 0:a.items.length}}),[$,o]),C=n.useMemo(()=>{if(!t)return[];const s={};return(t.items||[]).forEach(l=>{(l.keywords||[]).forEach(x=>{const p=s[x]||(s[x]={hits:0,want:0});p.hits+=1,p.want+=l.want_count||0})}),(t.keywords&&t.keywords.length?t.keywords:Object.keys(s)).map(l=>{var x,p;return{kw:l,hits:((x=s[l])==null?void 0:x.hits)||0,want:((p=s[l])==null?void 0:p.want)||0}}).sort((l,x)=>x.want-l.want)},[t]),m=!!(t!=null&&t.refreshing),c=t==null?void 0:t.progress,D=t!=null&&t.updated_at?G(t.updated_at*1e3):"尚未生成";return r?e.jsx(F,{label:"正在加载热卖榜"}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(U,{title:"实时热卖榜",description:"按「想要人数」排序的全网热卖商品,数据来自闲鱼实时搜索聚合。",icon:S,badge:e.jsx("span",{className:"rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text-soft)]",children:t?`更新于 ${D}`:"待生成"}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",className:"ios-btn-secondary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N("all"),disabled:u||m||h>0,children:[u||m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(A,{className:"h-4 w-4"}),"全部刷新"]}),e.jsxs("button",{type:"button",className:"ios-btn-primary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N(d),disabled:u||m||h>0,children:[m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(R,{className:"h-4 w-4"}),h>0?`${h}s 后可刷新`:"刷新本类目"]})]})}),j&&e.jsx(q,{type:j.type==="info"?"success":j.type,message:j.message,onClose:()=>f(null)}),e.jsx("div",{className:"toolbar",children:e.jsx(z,{value:d,onChange:M,items:T,ariaLabel:"热卖榜类目"})}),m&&e.jsx("div",{className:"section-panel",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm text-[var(--text-soft)]",children:[e.jsx(y,{className:"h-4 w-4 animate-spin text-[#ff4400]"}),e.jsxs("span",{children:["正在抓取「",(c==null?void 0:c.keyword)||"…","」",c&&c.total>0?`(${Math.min(c.done+1,c.total)}/${c.total})`:""]}),c&&c.total>0&&e.jsx("span",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--surface-subtle)]",children:e.jsx("span",{className:"block h-full rounded-full bg-[#ff4400] transition-all",style:{width:`${Math.round(c.Line truncated
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as _e,r,ae as fs,af as Ee,n as w,j as e,e as ve,X as ee,L as V,ag as js,ah as Ns,ai as _s,v as xe,aj as vs,ak as Be,b as re,al as fe,am as je,an as ws,ao as ks,ap as Qe,aq as Re,o as Te,h as ye,a8 as Le,ar as ze,as as be,w as Ss,at as Cs,au as Ue,av as Ke,aw as Is,ax as $s,ay as Ms,az as Ds}from"./index-BZnqBmwp.js";import{E as se,S as Ne,P as qe,a as Fs,b as Ps,N as Es}from"./ui-B9Jzqjf7.js";import{S as de}from"./shield-alert-rM_NVGQr.js";import{S as ce}from"./save-Dxf2dvgb.js";import{T as me}from"./trash-2-CmT2n80I.js";import{P as oe}from"./plus-BljRK6L8.js";import{P as Bs}from"./power-off-NLH-bTqs.js";import{a as Rs,P as Ts}from"./power-D9WTjX12.js";import{P as We}from"./package-check-BKkFNxd0.js";import{S as Oe}from"./sparkles-DVlvGI-3.js";import{S as Ls}from"./settings-2-CRN1TI2k.js";import{S as zs}from"./square-pen-Bmle-FRS.js";/**
|
||||
import{c as _e,r,ae as fs,af as Ee,n as w,j as e,e as ve,X as ee,L as V,ag as js,ah as Ns,ai as _s,v as xe,aj as vs,ak as Be,b as re,al as fe,am as je,an as ws,ao as ks,ap as Qe,aq as Re,o as Te,h as ye,a8 as Le,ar as ze,as as be,w as Ss,at as Cs,au as Ue,av as Ke,aw as Is,ax as $s,ay as Ms,az as Ds}from"./index-CkAjw-Zl.js";import{E as se,S as Ne,P as qe,a as Fs,b as Ps,N as Es}from"./ui-DGhuFsSA.js";import{S as de}from"./shield-alert-BxxLkcUR.js";import{S as ce}from"./save-2L2g6g1L.js";import{T as me}from"./trash-2-H_4vB0ks.js";import{P as oe}from"./plus-BXZgwA0o.js";import{P as Bs}from"./power-off-BEy-96bB.js";import{a as Rs,P as Ts}from"./power-DZ_kRimy.js";import{P as We}from"./package-check-DD7mkdH5.js";import{S as Oe}from"./sparkles-ITX60YIA.js";import{S as Ls}from"./settings-2-CVdvHFW4.js";import{S as zs}from"./square-pen-B8Sj6MD6.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1 +1 @@
|
||||
import{r as i,o as J,b2 as fe,ar as Ne,a8 as ve,b3 as we,j as e,M as R,B as P,e as Q,b as E,X as F,v as k,b4 as _e,n as t,al as V,am as ke,b5 as Se,b6 as Ce,b7 as De,b8 as Re,b9 as Pe}from"./index-BZnqBmwp.js";import{a as Ee,b as Fe,E as S,P as Me,S as M}from"./ui-B9Jzqjf7.js";import{T}from"./truck-3I9pdhz5.js";import{K as W}from"./key-C0msAg8e.js";import{P as Te}from"./plus-BljRK6L8.js";import{P as $,a as $e}from"./power-D9WTjX12.js";import{T as A}from"./trash-2-CmT2n80I.js";import{P as Ae}from"./power-off-NLH-bTqs.js";import{S as K}from"./save-Dxf2dvgb.js";import{S as Ke}from"./sparkles-DVlvGI-3.js";const Ve=({mode:l})=>{const[x,L]=i.useState([]),[d,B]=i.useState(""),[y,Y]=i.useState("reply"),[j,Z]=i.useState([]),[I,h]=i.useState(!1),[f,z]=i.useState(null),[c,N]=i.useState({keyword:"",reply_content:""}),[C,ee]=i.useState([]),[se,ae]=i.useState([]),[te,u]=i.useState(!1),[v,H]=i.useState(null),[r,o]=i.useState({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),[O,le]=i.useState({}),[ie,g]=i.useState(!1),[Le,q]=i.useState(null),[n,m]=i.useState({cookie_id:"",enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),[re,U]=i.useState(!1);i.useEffect(()=>{if(l==="delivery"){b(),X(),J().then(L);return}J().then(s=>{L(s),s&&s.length>0&&B(a=>a||s[0].id)})},[l]),i.useEffect(()=>{l==="reply"&&d&&(_(),w())},[l,d]);const w=async()=>{try{const s=await fe();le(s)}catch(s){console.error("加载默认回复失败",s)}},b=async()=>{try{const s=await Ne();ee(s.filter(a=>!a.item_id))}catch(s){console.error("加载发货规则失败",s)}},X=async()=>{try{const s=await ve();ae(s)}catch(s){console.error("加载卡券失败",s)}},_=async()=>{if(d){U(!0);try{const s=await we(d);Z(s)}catch(s){console.error("加载关键词失败",s)}finally{U(!1)}}},ne=()=>{if(l==="delivery")H(null),o({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),u(!0);else if(y==="reply")z(null),N({keyword:"",reply_content:""}),h(!0);else{if(!d)return;G(d)}},G=async s=>{try{const a=await Se(s);q(a),m({cookie_id:s,enabled:a.enabled,reply_content:a.reply_content,reply_once:a.reply_once,reply_image_url:a.reply_image_url||""}),g(!0)}catch(a){console.error("加载默认回复失败",a),q(null),m({cookie_id:s,enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),g(!0)}},de=s=>{y==="reply"&&(z(s),N({keyword:s.keyword,reply_content:s.reply_content}),h(!0))},ce=s=>{H(s),o({keyword:s.item_keyword,cookie_id:s.cookie_id||"",card_id:String(s.card_group_id),description:s.name,enabled:s.enabled}),u(!0)},oe=async()=>{if(!d){t("请先选择账号");return}if(!c.keyword.trim()||!c.reply_content.trim()){t("请填写关键词和回复内容");return}try{await Re({id:f==null?void 0:f.id,keyword:c.keyword,reply_content:c.reply_content,match_type:"exact",enabled:!0},d),h(!1),_(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},me=async()=>{if(!r.keyword.trim()){t("请填写触发关键词");return}if(!r.card_id){t("请选择卡券");return}try{await V({id:v==null?void 0:v.id,item_keyword:r.keyword,cookie_id:r.cookie_id||void 0,item_id:void 0,card_group_id:parseInt(r.card_id),name:r.description,priority:1,enabled:r.enabled}),u(!1),b(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},pe=async s=>{if(!(!d||!await k("确认删除该关键词吗?")))try{await _e(s,d),_(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},xe=async s=>{if(await k("确认删除该发货规则吗?"))try{await ke(s),b(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ye=async s=>{try{await V({id:s.id,item_keyword:s.item_keyword,cookie_id:s.cookie_id,item_id:s.item_id,card_group_id:s.card_group_id,name:s.name,priority:s.priority,enabled:!s.enabled}),b()}catch(a){t("操作失败:"+a.message)}},he=async()=>{if(!n.cookie_id){t("请先选择账号");return}try{await Pe(n.cookie_id,{enabled:n.enabled,reply_content:n.reply_content,reply_once:n.reply_once,reply_image_url:n.reply_image_url}),g(!1),w(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},ue=async s=>{if(await k("确认删除该默认回复吗?"))try{await De(s),w(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ge=async s=>{if(await k("确认清空该账号的回复记录吗?清空后可以重新对所有对话使用默认回复。"))try{await Ce(s),t("清空成功!")}catch(a){t("清空失败:"+a.message)}},be=Object.values(O).filter(s=>s.enabled).length,je=()=>{l==="delivery"?Promise.all([b(),X()]):y==="reply"?_():w()},D=(s,a,p)=>e.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":p,onClick:a,className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${s?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${s?"translate-x-5":""}`})});return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(Ee,{title:l==="reply"?"自动回复":"通用自动发货",description:l==="reply"?"管理账Line truncated
|
||||
import{r as i,o as J,b2 as fe,ar as Ne,a8 as ve,b3 as we,j as e,M as R,B as P,e as Q,b as E,X as F,v as k,b4 as _e,n as t,al as V,am as ke,b5 as Se,b6 as Ce,b7 as De,b8 as Re,b9 as Pe}from"./index-CkAjw-Zl.js";import{a as Ee,b as Fe,E as S,P as Me,S as M}from"./ui-DGhuFsSA.js";import{T}from"./truck-hG3NWX-r.js";import{K as W}from"./key-B8XT9PyZ.js";import{P as Te}from"./plus-BXZgwA0o.js";import{P as $,a as $e}from"./power-DZ_kRimy.js";import{T as A}from"./trash-2-H_4vB0ks.js";import{P as Ae}from"./power-off-BEy-96bB.js";import{S as K}from"./save-2L2g6g1L.js";import{S as Ke}from"./sparkles-ITX60YIA.js";const Ve=({mode:l})=>{const[x,L]=i.useState([]),[d,B]=i.useState(""),[y,Y]=i.useState("reply"),[j,Z]=i.useState([]),[I,h]=i.useState(!1),[f,z]=i.useState(null),[c,N]=i.useState({keyword:"",reply_content:""}),[C,ee]=i.useState([]),[se,ae]=i.useState([]),[te,u]=i.useState(!1),[v,H]=i.useState(null),[r,o]=i.useState({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),[O,le]=i.useState({}),[ie,g]=i.useState(!1),[Le,q]=i.useState(null),[n,m]=i.useState({cookie_id:"",enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),[re,U]=i.useState(!1);i.useEffect(()=>{if(l==="delivery"){b(),X(),J().then(L);return}J().then(s=>{L(s),s&&s.length>0&&B(a=>a||s[0].id)})},[l]),i.useEffect(()=>{l==="reply"&&d&&(_(),w())},[l,d]);const w=async()=>{try{const s=await fe();le(s)}catch(s){console.error("加载默认回复失败",s)}},b=async()=>{try{const s=await Ne();ee(s.filter(a=>!a.item_id))}catch(s){console.error("加载发货规则失败",s)}},X=async()=>{try{const s=await ve();ae(s)}catch(s){console.error("加载卡券失败",s)}},_=async()=>{if(d){U(!0);try{const s=await we(d);Z(s)}catch(s){console.error("加载关键词失败",s)}finally{U(!1)}}},ne=()=>{if(l==="delivery")H(null),o({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),u(!0);else if(y==="reply")z(null),N({keyword:"",reply_content:""}),h(!0);else{if(!d)return;G(d)}},G=async s=>{try{const a=await Se(s);q(a),m({cookie_id:s,enabled:a.enabled,reply_content:a.reply_content,reply_once:a.reply_once,reply_image_url:a.reply_image_url||""}),g(!0)}catch(a){console.error("加载默认回复失败",a),q(null),m({cookie_id:s,enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),g(!0)}},de=s=>{y==="reply"&&(z(s),N({keyword:s.keyword,reply_content:s.reply_content}),h(!0))},ce=s=>{H(s),o({keyword:s.item_keyword,cookie_id:s.cookie_id||"",card_id:String(s.card_group_id),description:s.name,enabled:s.enabled}),u(!0)},oe=async()=>{if(!d){t("请先选择账号");return}if(!c.keyword.trim()||!c.reply_content.trim()){t("请填写关键词和回复内容");return}try{await Re({id:f==null?void 0:f.id,keyword:c.keyword,reply_content:c.reply_content,match_type:"exact",enabled:!0},d),h(!1),_(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},me=async()=>{if(!r.keyword.trim()){t("请填写触发关键词");return}if(!r.card_id){t("请选择卡券");return}try{await V({id:v==null?void 0:v.id,item_keyword:r.keyword,cookie_id:r.cookie_id||void 0,item_id:void 0,card_group_id:parseInt(r.card_id),name:r.description,priority:1,enabled:r.enabled}),u(!1),b(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},pe=async s=>{if(!(!d||!await k("确认删除该关键词吗?")))try{await _e(s,d),_(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},xe=async s=>{if(await k("确认删除该发货规则吗?"))try{await ke(s),b(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ye=async s=>{try{await V({id:s.id,item_keyword:s.item_keyword,cookie_id:s.cookie_id,item_id:s.item_id,card_group_id:s.card_group_id,name:s.name,priority:s.priority,enabled:!s.enabled}),b()}catch(a){t("操作失败:"+a.message)}},he=async()=>{if(!n.cookie_id){t("请先选择账号");return}try{await Pe(n.cookie_id,{enabled:n.enabled,reply_content:n.reply_content,reply_once:n.reply_once,reply_image_url:n.reply_image_url}),g(!1),w(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},ue=async s=>{if(await k("确认删除该默认回复吗?"))try{await De(s),w(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ge=async s=>{if(await k("确认清空该账号的回复记录吗?清空后可以重新对所有对话使用默认回复。"))try{await Ce(s),t("清空成功!")}catch(a){t("清空失败:"+a.message)}},be=Object.values(O).filter(s=>s.enabled).length,je=()=>{l==="delivery"?Promise.all([b(),X()]):y==="reply"?_():w()},D=(s,a,p)=>e.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":p,onClick:a,className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${s?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${s?"translate-x-5":""}`})});return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(Ee,{title:l==="reply"?"自动回复":"通用自动发货",description:l==="reply"?"管理账Line truncated
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c as We,r as n,aW as mt,o as xt,n as u,h as ut,ba as ht,bb as ft,j as t,e as $e,L as U,bc as pt,X as gt,bd as bt,be as jt,bf as yt,aT as vt,bg as wt,bh as Nt,bi as kt,bj as St,v as Te,bk as Ct,bl as Mt}from"./index-BZnqBmwp.js";import{I as Re,c as _t,S as Ee,E as It}from"./ui-B9Jzqjf7.js";import{S as Z}from"./settings-2-CRN1TI2k.js";import{S as $t}from"./search-FaxHcuoK.js";import{P as Tt}from"./package-CDIx-vGO.js";import{I as Rt}from"./image-BE6TxU00.js";import{Z as Et}from"./zap-BWofDPZm.js";import{S as Lt}from"./send-BjFPcqyQ.js";import{P as Le}from"./plus-BljRK6L8.js";import{T as Ue}from"./trash-2-CmT2n80I.js";/**
|
||||
import{c as We,r as n,aW as mt,o as xt,n as u,h as ut,ba as ht,bb as ft,j as t,e as $e,L as U,bc as pt,X as gt,bd as bt,be as jt,bf as yt,aT as vt,bg as wt,bh as Nt,bi as kt,bj as St,v as Te,bk as Ct,bl as Mt}from"./index-CkAjw-Zl.js";import{I as Re,c as _t,S as Ee,E as It}from"./ui-DGhuFsSA.js";import{S as Z}from"./settings-2-CVdvHFW4.js";import{S as $t}from"./search-BUYv4hib.js";import{P as Tt}from"./package-CwcnsKO8.js";import{I as Rt}from"./image-BN5k8Hl-.js";import{Z as Et}from"./zap-BGhU4xU3.js";import{S as Lt}from"./send-jdubw9eF.js";import{P as Le}from"./plus-BXZgwA0o.js";import{T as Ue}from"./trash-2-H_4vB0ks.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
import{r as l,j as t,bc as E,e as ee,L as te,aE as ot,C as ct,X as Se,o as dt,bm as mt,bn as xt,bo as pt,n as o,bp as ut,bq as ht,br as _e,v as se,bs as yt,bt as Re,bu as bt,bv as gt,bw as ft,bx as jt,by as Nt}from"./index-BZnqBmwp.js";import{a as vt,b as wt,S as $,E as L}from"./ui-B9Jzqjf7.js";import{L as ae}from"./link-2-CTuWzTfU.js";import{S as le}from"./shield-alert-rM_NVGQr.js";import{A as ne}from"./activity-D09genEZ.js";import{P as Ee}from"./plus-BljRK6L8.js";import{P as $e}from"./pen-line-CmEoWNKp.js";import{T as ie}from"./trash-2-CmT2n80I.js";import{S as kt}from"./send-BjFPcqyQ.js";import{C as Ct,a as St}from"./chevron-right-pxFcnXJt.js";import{S as Le}from"./save-Dxf2dvgb.js";import{C as _t}from"./check-C6LyX_Nv.js";const y={dingtalk:{label:"钉钉",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://oapi.dingtalk.com/robot/send?..."},{key:"secret",label:"加签密钥",type:"password",optional:!0}],defaults:{}},feishu:{label:"飞书",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://open.feishu.cn/open-apis/bot/v2/hook/..."},{key:"secret",label:"签名密钥",type:"password",optional:!0}],defaults:{}},bark:{label:"Bark",fields:[{key:"device_key",label:"Device Key",type:"password"},{key:"server_url",label:"服务器地址",placeholder:"https://api.day.app",optional:!0}],defaults:{server_url:"https://api.day.app"}},email:{label:"邮件",fields:[{key:"smtp_server",label:"SMTP 服务器",placeholder:"留空则使用「系统设置 → 邮件服务」",optional:!0},{key:"smtp_port",label:"SMTP 端口",type:"number",placeholder:"留空则使用系统设置(如 465)",optional:!0},{key:"email_user",label:"发件邮箱",placeholder:"留空则使用系统设置的发件邮箱",optional:!0},{key:"email_password",label:"邮箱密码或授权码",type:"password",placeholder:"留空则使用系统设置的授权码",optional:!0},{key:"recipient_email",label:"接收邮箱",placeholder:"必填,通知发到这个邮箱"}],defaults:{}},webhook:{label:"Webhook",fields:[{key:"webhook_url",label:"Webhook 地址"},{key:"http_method",label:"请求方法",type:"select",options:["POST","PUT"]},{key:"headers",label:"请求头 JSON",type:"textarea",placeholder:'{"Authorization":"Bearer ..."}',optional:!0}],defaults:{http_method:"POST",headers:"{}"}},wechat:{label:"企业微信",fields:[{key:"webhook_url",label:"机器人 Webhook 地址"}],defaults:{}},telegram:{label:"Telegram",fields:[{key:"bot_token",label:"Bot Token",type:"password"},{key:"chat_id",label:"Chat ID"}],defaults:{}}},re=20,Rt=i=>{var k,x;const r=(x=(k=i==null?void 0:i.response)==null?void 0:k.data)==null?void 0:x.detail;if(r&&typeof r=="object"&&"message"in r){const b=r.message;if(typeof b=="string"&&b.trim())return b.trim()}return typeof r=="string"&&r.trim()?r.trim():i instanceof Error&&i.message?i.message:"测试发送失败,请稍后重试"},oe=i=>i.nickname||i.remark||i.id,T=i=>{if(!i)return"-";const r=new Date(i.includes("T")?i:`${i.replace(" ","T")}Z`);return Number.isNaN(r.getTime())?i:r.toLocaleString("zh-CN")},Wt=({isAdmin:i})=>{const[r,k]=l.useState("channels"),[x,b]=l.useState([]),[A,ce]=l.useState([]),[de,D]=l.useState([]),[Te,g]=l.useState({}),[f,Ae]=l.useState([]),[me,De]=l.useState([]),[C,xe]=l.useState(!0),[Pe,j]=l.useState(!1),[N,pe]=l.useState(null),[P,B]=l.useState("dingtalk"),[O,I]=l.useState(""),[d,p]=l.useState({}),[ue,he]=l.useState(!1),[Be,u]=l.useState(!1),[v,ye]=l.useState(null),[M,q]=l.useState(""),[W,G]=l.useState(""),[z,F]=l.useState(""),[H,h]=l.useState([]),[be,S]=l.useState(!1),[ge,Oe]=l.useState([]),[fe,Ie]=l.useState(0),[U,Me]=l.useState(""),[Z,qe]=l.useState(""),[w,_]=l.useState(0),[J,je]=l.useState(!1),[Ne,We]=l.useState([]),[ve,Ge]=l.useState(""),[R,we]=l.useState(""),[K,ke]=l.useState(!1),m=async()=>{xe(!0);try{const[e,s,a,n]=await Promise.all([dt(),mt(),xt(),pt()]);b(e),ce(s.data),D(a.data),g(c=>{const rt=new Set(a.data.map(Y=>String(Y.id)));return Object.fromEntries(Object.entries(c).filter(([Y])=>rt.has(Y)))}),Ae(n.events),De(n.priorities)}catch(e){o(`加载通知配置失败:${e.message}`)}finally{xe(!1)}};l.useEffect(()=>{m()},[]);const ze=()=>{const e="dingtalk";pe(null),B(e),I(""),p({...y[e].defaults}),j(!0)},Fe=e=>{pe(e),B(e.type),I(e.name),p({...y[e.type].defaults,...e.config}),j(!0)},He=e=>{B(e),p({...y[e].defaults})},Ue=async()=>{he(!0);try{N?await _e(N.id,{name:O,config:d,enabled:N.enabled}):await jt({name:O,type:P,config:d}),j(!1),await m()}catch(e){o(`保存通知渠道失败:${e.message}`)}finally{he(!1)}},Ze=async e=>{try{await _e(e.id,{enabled:!e.enabled}),ce(s=>s.map(a=>a.id===e.id?{...a,enabled:!a.enabled}:a)),e.enabled?D(s=>s.filter(a=>a.channel_id!==Number(e.id))):await m()}catch(s){o(`更新渠道状态失败:${s.message}`)}},Je=async e=>{if(await se(`确认删除通知渠道“${e.name}”?相关账号绑定也会被删除。`))try{await yt(e.id),await m()}catch(s){o(`删除通知渠道失败:${s.message}`)}},Ke=e=>{var s;return((s=f.find(a=Line truncated
|
||||
import{r as l,j as t,bc as E,e as ee,L as te,aE as ot,C as ct,X as Se,o as dt,bm as mt,bn as xt,bo as pt,n as o,bp as ut,bq as ht,br as _e,v as se,bs as yt,bt as Re,bu as bt,bv as gt,bw as ft,bx as jt,by as Nt}from"./index-CkAjw-Zl.js";import{a as vt,b as wt,S as $,E as L}from"./ui-DGhuFsSA.js";import{L as ae}from"./link-2-PznVeo4F.js";import{S as le}from"./shield-alert-BxxLkcUR.js";import{A as ne}from"./activity-DQLHFHES.js";import{P as Ee}from"./plus-BXZgwA0o.js";import{P as $e}from"./pen-line-CsaG3RgF.js";import{T as ie}from"./trash-2-H_4vB0ks.js";import{S as kt}from"./send-jdubw9eF.js";import{C as Ct,a as St}from"./chevron-right-DidJSJ1m.js";import{S as Le}from"./save-2L2g6g1L.js";import{C as _t}from"./check-B6GSSnq6.js";const y={dingtalk:{label:"钉钉",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://oapi.dingtalk.com/robot/send?..."},{key:"secret",label:"加签密钥",type:"password",optional:!0}],defaults:{}},feishu:{label:"飞书",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://open.feishu.cn/open-apis/bot/v2/hook/..."},{key:"secret",label:"签名密钥",type:"password",optional:!0}],defaults:{}},bark:{label:"Bark",fields:[{key:"device_key",label:"Device Key",type:"password"},{key:"server_url",label:"服务器地址",placeholder:"https://api.day.app",optional:!0}],defaults:{server_url:"https://api.day.app"}},email:{label:"邮件",fields:[{key:"smtp_server",label:"SMTP 服务器",placeholder:"留空则使用「系统设置 → 邮件服务」",optional:!0},{key:"smtp_port",label:"SMTP 端口",type:"number",placeholder:"留空则使用系统设置(如 465)",optional:!0},{key:"email_user",label:"发件邮箱",placeholder:"留空则使用系统设置的发件邮箱",optional:!0},{key:"email_password",label:"邮箱密码或授权码",type:"password",placeholder:"留空则使用系统设置的授权码",optional:!0},{key:"recipient_email",label:"接收邮箱",placeholder:"必填,通知发到这个邮箱"}],defaults:{}},webhook:{label:"Webhook",fields:[{key:"webhook_url",label:"Webhook 地址"},{key:"http_method",label:"请求方法",type:"select",options:["POST","PUT"]},{key:"headers",label:"请求头 JSON",type:"textarea",placeholder:'{"Authorization":"Bearer ..."}',optional:!0}],defaults:{http_method:"POST",headers:"{}"}},wechat:{label:"企业微信",fields:[{key:"webhook_url",label:"机器人 Webhook 地址"}],defaults:{}},telegram:{label:"Telegram",fields:[{key:"bot_token",label:"Bot Token",type:"password"},{key:"chat_id",label:"Chat ID"}],defaults:{}}},re=20,Rt=i=>{var k,x;const r=(x=(k=i==null?void 0:i.response)==null?void 0:k.data)==null?void 0:x.detail;if(r&&typeof r=="object"&&"message"in r){const b=r.message;if(typeof b=="string"&&b.trim())return b.trim()}return typeof r=="string"&&r.trim()?r.trim():i instanceof Error&&i.message?i.message:"测试发送失败,请稍后重试"},oe=i=>i.nickname||i.remark||i.id,T=i=>{if(!i)return"-";const r=new Date(i.includes("T")?i:`${i.replace(" ","T")}Z`);return Number.isNaN(r.getTime())?i:r.toLocaleString("zh-CN")},Wt=({isAdmin:i})=>{const[r,k]=l.useState("channels"),[x,b]=l.useState([]),[A,ce]=l.useState([]),[de,D]=l.useState([]),[Te,g]=l.useState({}),[f,Ae]=l.useState([]),[me,De]=l.useState([]),[C,xe]=l.useState(!0),[Pe,j]=l.useState(!1),[N,pe]=l.useState(null),[P,B]=l.useState("dingtalk"),[O,I]=l.useState(""),[d,p]=l.useState({}),[ue,he]=l.useState(!1),[Be,u]=l.useState(!1),[v,ye]=l.useState(null),[M,q]=l.useState(""),[W,G]=l.useState(""),[z,F]=l.useState(""),[H,h]=l.useState([]),[be,S]=l.useState(!1),[ge,Oe]=l.useState([]),[fe,Ie]=l.useState(0),[U,Me]=l.useState(""),[Z,qe]=l.useState(""),[w,_]=l.useState(0),[J,je]=l.useState(!1),[Ne,We]=l.useState([]),[ve,Ge]=l.useState(""),[R,we]=l.useState(""),[K,ke]=l.useState(!1),m=async()=>{xe(!0);try{const[e,s,a,n]=await Promise.all([dt(),mt(),xt(),pt()]);b(e),ce(s.data),D(a.data),g(c=>{const rt=new Set(a.data.map(Y=>String(Y.id)));return Object.fromEntries(Object.entries(c).filter(([Y])=>rt.has(Y)))}),Ae(n.events),De(n.priorities)}catch(e){o(`加载通知配置失败:${e.message}`)}finally{xe(!1)}};l.useEffect(()=>{m()},[]);const ze=()=>{const e="dingtalk";pe(null),B(e),I(""),p({...y[e].defaults}),j(!0)},Fe=e=>{pe(e),B(e.type),I(e.name),p({...y[e.type].defaults,...e.config}),j(!0)},He=e=>{B(e),p({...y[e].defaults})},Ue=async()=>{he(!0);try{N?await _e(N.id,{name:O,config:d,enabled:N.enabled}):await jt({name:O,type:P,config:d}),j(!1),await m()}catch(e){o(`保存通知渠道失败:${e.message}`)}finally{he(!1)}},Ze=async e=>{try{await _e(e.id,{enabled:!e.enabled}),ce(s=>s.map(a=>a.id===e.id?{...a,enabled:!a.enabled}:a)),e.enabled?D(s=>s.filter(a=>a.channel_id!==Number(e.id))):await m()}catch(s){o(`更新渠道状态失败:${s.message}`)}},Je=async e=>{if(await se(`确认删除通知渠道“${e.name}”?相关账号绑定也会被删除。`))try{await yt(e.id),await m()}catch(s){o(`删除通知渠道失败:${s.message}`)}},Ke=e=>{var s;return((s=f.find(a=Line truncated
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as Re,r as l,h as ys,O as js,j as e,e as $,P as fs,E as vs,Q as Ns,b as N,X as _,o as _s,T as ws,V as Me,W as ks,Y as Ss,n,Z as Cs,v as Pe,_ as Os,$ as Es,a0 as Ls,a1 as Is,a2 as Ms,a3 as Ps,a4 as Ds,a5 as Fs}from"./index-BZnqBmwp.js";import{a as As,b as $s,E as Rs}from"./ui-B9Jzqjf7.js";import{P as qs}from"./plus-BljRK6L8.js";import{T as De}from"./truck-3I9pdhz5.js";import{S as Ts}from"./search-FaxHcuoK.js";import{P as Y}from"./package-check-BKkFNxd0.js";import{F as zs}from"./flower-2-B1FJm-vw.js";import{E as Vs}from"./eye-BibUMjxU.js";import{S as Hs}from"./square-pen-Bmle-FRS.js";import{T as Js}from"./trash-2-CmT2n80I.js";import{C as Ws,a as Bs}from"./chevron-right-pxFcnXJt.js";import{S as Fe}from"./save-Dxf2dvgb.js";/**
|
||||
import{c as Re,r as l,h as ys,O as js,j as e,e as $,P as fs,E as vs,Q as Ns,b as N,X as _,o as _s,T as ws,V as Me,W as ks,Y as Ss,n,Z as Cs,v as Pe,_ as Os,$ as Es,a0 as Ls,a1 as Is,a2 as Ms,a3 as Ps,a4 as Ds,a5 as Fs}from"./index-CkAjw-Zl.js";import{a as As,b as $s,E as Rs}from"./ui-DGhuFsSA.js";import{P as qs}from"./plus-BXZgwA0o.js";import{T as De}from"./truck-hG3NWX-r.js";import{S as Ts}from"./search-BUYv4hib.js";import{P as Y}from"./package-check-DD7mkdH5.js";import{F as zs}from"./flower-2-Cth4QkK1.js";import{E as Vs}from"./eye-vwq0YQk5.js";import{S as Hs}from"./square-pen-B8Sj6MD6.js";import{T as Js}from"./trash-2-H_4vB0ks.js";import{C as Ws,a as Bs}from"./chevron-right-DidJSJ1m.js";import{S as Fe}from"./save-2L2g6g1L.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c as A,r as n,bQ as oe,bR as me,j as e,bS as X,e as M,X as q,bT as xe,aE as pe,bU as he,bV as ue,bW as be,bX as je,bY as ge,bZ as ve}from"./index-BZnqBmwp.js";import{P as Q,a as ye,N as E,E as U}from"./ui-B9Jzqjf7.js";import{P as Ne}from"./plus-BljRK6L8.js";import{P as _e}from"./play-P9T6ppIo.js";import{P as fe}from"./pen-line-CmEoWNKp.js";import{T as we}from"./trash-2-CmT2n80I.js";import{S as V}from"./search-FaxHcuoK.js";/**
|
||||
import{c as A,r as n,bQ as oe,bR as me,j as e,bS as X,e as M,X as q,bT as xe,aE as pe,bU as he,bV as ue,bW as be,bX as je,bY as ge,bZ as ve}from"./index-CkAjw-Zl.js";import{P as Q,a as ye,N as E,E as U}from"./ui-DGhuFsSA.js";import{P as Ne}from"./plus-BXZgwA0o.js";import{P as _e}from"./play-BTeYe-0U.js";import{P as fe}from"./pen-line-CsaG3RgF.js";import{T as we}from"./trash-2-H_4vB0ks.js";import{S as V}from"./search-BUYv4hib.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c as H,r as c,j as e,aA as J,e as ye,S as ge,E as be,L as j,aB as je,aC as _e,aD as Ne,aE as ve,X as O,o as fe,aF as we,aG as ke,aH as Ce,aI as U,n as r,v as E,aJ as $e,aK as Se,aL as Pe,aM as De,aN as Re,aO as Fe,aP as Me,aQ as Le}from"./index-BZnqBmwp.js";import{P as Ie,a as Ae,b as Ee,S as _,E as N,N as ze}from"./ui-B9Jzqjf7.js";import{S as C}from"./search-FaxHcuoK.js";import{T as v}from"./trash-2-CmT2n80I.js";import{S as z}from"./save-Dxf2dvgb.js";import{P as X}from"./play-P9T6ppIo.js";import{P as Te}from"./package-check-BKkFNxd0.js";import{L as Be}from"./link-2-CTuWzTfU.js";/**
|
||||
import{c as H,r as c,j as e,aA as J,e as ye,S as ge,E as be,L as j,aB as je,aC as _e,aD as Ne,aE as ve,X as O,o as fe,aF as we,aG as ke,aH as Ce,aI as U,n as r,v as E,aJ as $e,aK as Se,aL as Pe,aM as De,aN as Re,aO as Fe,aP as Me,aQ as Le}from"./index-CkAjw-Zl.js";import{P as Ie,a as Ae,b as Ee,S as _,E as N,N as ze}from"./ui-DGhuFsSA.js";import{S as C}from"./search-BUYv4hib.js";import{T as v}from"./trash-2-H_4vB0ks.js";import{S as z}from"./save-2L2g6g1L.js";import{P as X}from"./play-BTeYe-0U.js";import{P as Te}from"./package-check-DD7mkdH5.js";import{L as Be}from"./link-2-PznVeo4F.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as Fe,r,o as Ee,j as e,bG as le,L as g,b as Re,X as ie,E as Ae,bH as $e,bI as Ue,bJ as qe,bK as De,bL as Me,bM as Te}from"./index-BZnqBmwp.js";import{a as ze,N as Be,b as He,E as ne}from"./ui-B9Jzqjf7.js";import{S as F}from"./search-FaxHcuoK.js";import{P as Oe}from"./plus-BljRK6L8.js";import{S as Ke}from"./sparkles-DVlvGI-3.js";import{P as We}from"./package-CDIx-vGO.js";/**
|
||||
import{c as Fe,r,o as Ee,j as e,bG as le,L as g,b as Re,X as ie,E as Ae,bH as $e,bI as Ue,bJ as qe,bK as De,bL as Me,bM as Te}from"./index-CkAjw-Zl.js";import{a as ze,N as Be,b as He,E as ne}from"./ui-DGhuFsSA.js";import{S as F}from"./search-BUYv4hib.js";import{P as Oe}from"./plus-BXZgwA0o.js";import{S as Ke}from"./sparkles-ITX60YIA.js";import{P as We}from"./package-CwcnsKO8.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as se,r as l,aS as ae,j as e,l as te,e as K,aT as ne,aU as v,aV as q,S as le,ak as O,aW as ie,aX as re,n as c,aY as ce,aZ as oe,a_ as de,a$ as pe,b0 as me,b1 as ue}from"./index-BZnqBmwp.js";import{P as xe,a as he,b as ge,S as p,N as ye}from"./ui-B9Jzqjf7.js";import{S as je}from"./save-Dxf2dvgb.js";import{S as Q}from"./sparkles-DVlvGI-3.js";import{Z as L}from"./zap-BWofDPZm.js";import{E as w}from"./eye-off-D1JuM9mR.js";import{E as C}from"./eye-BibUMjxU.js";/**
|
||||
import{c as se,r as l,aS as ae,j as e,l as te,e as K,aT as ne,aU as v,aV as q,S as le,ak as O,aW as ie,aX as re,n as c,aY as ce,aZ as oe,a_ as de,a$ as pe,b0 as me,b1 as ue}from"./index-CkAjw-Zl.js";import{P as xe,a as he,b as ge,S as p,N as ye}from"./ui-DGhuFsSA.js";import{S as je}from"./save-2L2g6g1L.js";import{S as Q}from"./sparkles-ITX60YIA.js";import{Z as L}from"./zap-BGhU4xU3.js";import{E as w}from"./eye-off-DVn7pRcv.js";import{E as C}from"./eye-vwq0YQk5.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{r as l,j as e,U as h,e as $,S as j,aT as A,L as f,ak as T,bz as L,n as i,v as y,bA as P,bB as R,aY as E,bC as _}from"./index-BZnqBmwp.js";import{a as I,S as N,E as B}from"./ui-B9Jzqjf7.js";import{T as z}from"./trash-2-CmT2n80I.js";const D=n=>{if(!n)return"-";const c=new Date(n.includes("T")?n:`${n.replace(" ","T")}Z`);return Number.isNaN(c.getTime())?n:c.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})},Y=()=>{const[n,c]=l.useState([]),[u,g]=l.useState(!0),[o,d]=l.useState(null),[w,p]=l.useState(null),[b,m]=l.useState(""),x=async()=>{g(!0);try{c(await L())}catch(t){i(`加载用户列表失败:${t.message}`,"error")}finally{g(!1)}};l.useEffect(()=>{x()},[]);const U=async t=>{if(o!==null)return;const s=t.is_active!==!1;if(!(s&&!await y(`禁用用户「${t.username}」?其所有在线会话将立即下线,且无法再登录。`,{title:"禁用用户",confirmLabel:"禁用",danger:!0}))){d(t.id);try{const a=await P(t.id,!s);i(a.message||"状态已更新","success"),await x()}catch(a){i(`操作失败:${a.message}`,"error")}finally{d(null)}}},C=async t=>{const[s,a]=E(b);if(!s){i(a,"warning");return}if(o===null){d(t.id);try{const r=await _(t.id,b);i(r.message||"密码已重置","success"),p(null),m("")}catch(r){i(`重置失败:${r.message}`,"error")}finally{d(null)}}},k=async t=>{if(o===null&&await y(`删除用户「${t.username}」?其名下的闲鱼账号、卡密、回复规则等数据将一并删除,不可恢复。`,{title:"删除用户",confirmLabel:"删除",danger:!0})){d(t.id);try{const s=await R(t.id);i(s.message||"用户已删除","success"),await x()}catch(s){i(`删除失败:${s.message}`,"error")}finally{d(null)}}};return e.jsxs("div",{className:"page-stack",children:[e.jsx(I,{title:"用户管理",description:"管理注册用户与登录权限。普通用户仅能操作分配给其名下的账号数据。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>void x(),className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx($,{className:`h-4 w-4 ${u?"animate-spin":""}`}),"刷新"]})}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"权限说明",icon:j}),e.jsxs("div",{className:"grid gap-3 p-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(j,{className:"h-4 w-4 text-[#8a6300]"}),"管理员(admin)"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"拥有全部权限:系统设置、通知与系统日志、用户管理,以及所有闲鱼账号和数据。"})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(A,{className:"h-4 w-4 text-[var(--text-soft)]"}),"普通用户"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"只能看到并操作自己名下的闲鱼账号、商品、订单与消息;侧栏不显示系统设置与用户管理,接口层也会拒绝其访问。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"用户列表",description:`共 ${n.length} 个用户`,icon:h}),e.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[n.map(t=>{const s=t.username==="admin",a=t.is_active===!1,r=o===t.id,v=w===t.id;return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[var(--brand)] text-sm font-black text-[#2a2416]",children:t.username.slice(0,1).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-sm font-bold text-[var(--text)]",children:t.username}),s&&e.jsx("span",{className:"rounded-full bg-[var(--brand)] px-2 py-0.5 text-[10px] font-bold text-[#2a2416]",children:"内置管理员"}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-bold ${a?"bg-red-50 text-red-600":"bg-emerald-50 text-emerald-600"}`,children:a?"已禁用":"正常"})]}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-[var(--text-muted)]",children:t.email}),e.jsxs("p",{className:"mt-1 text-[11px] text-[var(--text-soft)]",children:[t.cookie_count??0," 个闲鱼账号 · ",t.card_count??0," 张卡密 · 注册于 ",D(t.created_at)]})]}),!s&&e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void U(t),disabled:r,className:a?"rounded-md bg-emerald-50 px-3 py-2 text-xs font-bold text-emerald-700 hover:bg-emerald-100 disabled:opacity-50":"rounded-md bg-amber-50 px-3 py-2 text-xs font-bolLine truncated
|
||||
import{r as l,j as e,U as h,e as $,S as j,aT as A,L as f,ak as T,bz as L,n as i,v as y,bA as P,bB as R,aY as E,bC as _}from"./index-CkAjw-Zl.js";import{a as I,S as N,E as B}from"./ui-DGhuFsSA.js";import{T as z}from"./trash-2-H_4vB0ks.js";const D=n=>{if(!n)return"-";const c=new Date(n.includes("T")?n:`${n.replace(" ","T")}Z`);return Number.isNaN(c.getTime())?n:c.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})},Y=()=>{const[n,c]=l.useState([]),[u,g]=l.useState(!0),[o,d]=l.useState(null),[w,p]=l.useState(null),[b,m]=l.useState(""),x=async()=>{g(!0);try{c(await L())}catch(t){i(`加载用户列表失败:${t.message}`,"error")}finally{g(!1)}};l.useEffect(()=>{x()},[]);const U=async t=>{if(o!==null)return;const s=t.is_active!==!1;if(!(s&&!await y(`禁用用户「${t.username}」?其所有在线会话将立即下线,且无法再登录。`,{title:"禁用用户",confirmLabel:"禁用",danger:!0}))){d(t.id);try{const a=await P(t.id,!s);i(a.message||"状态已更新","success"),await x()}catch(a){i(`操作失败:${a.message}`,"error")}finally{d(null)}}},C=async t=>{const[s,a]=E(b);if(!s){i(a,"warning");return}if(o===null){d(t.id);try{const r=await _(t.id,b);i(r.message||"密码已重置","success"),p(null),m("")}catch(r){i(`重置失败:${r.message}`,"error")}finally{d(null)}}},k=async t=>{if(o===null&&await y(`删除用户「${t.username}」?其名下的闲鱼账号、卡密、回复规则等数据将一并删除,不可恢复。`,{title:"删除用户",confirmLabel:"删除",danger:!0})){d(t.id);try{const s=await R(t.id);i(s.message||"用户已删除","success"),await x()}catch(s){i(`删除失败:${s.message}`,"error")}finally{d(null)}}};return e.jsxs("div",{className:"page-stack",children:[e.jsx(I,{title:"用户管理",description:"管理注册用户与登录权限。普通用户仅能操作分配给其名下的账号数据。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>void x(),className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx($,{className:`h-4 w-4 ${u?"animate-spin":""}`}),"刷新"]})}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"权限说明",icon:j}),e.jsxs("div",{className:"grid gap-3 p-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(j,{className:"h-4 w-4 text-[#8a6300]"}),"管理员(admin)"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"拥有全部权限:系统设置、通知与系统日志、用户管理,以及所有闲鱼账号和数据。"})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(A,{className:"h-4 w-4 text-[var(--text-soft)]"}),"普通用户"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"只能看到并操作自己名下的闲鱼账号、商品、订单与消息;侧栏不显示系统设置与用户管理,接口层也会拒绝其访问。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"用户列表",description:`共 ${n.length} 个用户`,icon:h}),e.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[n.map(t=>{const s=t.username==="admin",a=t.is_active===!1,r=o===t.id,v=w===t.id;return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[var(--brand)] text-sm font-black text-[#2a2416]",children:t.username.slice(0,1).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-sm font-bold text-[var(--text)]",children:t.username}),s&&e.jsx("span",{className:"rounded-full bg-[var(--brand)] px-2 py-0.5 text-[10px] font-bold text-[#2a2416]",children:"内置管理员"}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-bold ${a?"bg-red-50 text-red-600":"bg-emerald-50 text-emerald-600"}`,children:a?"已禁用":"正常"})]}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-[var(--text-muted)]",children:t.email}),e.jsxs("p",{className:"mt-1 text-[11px] text-[var(--text-soft)]",children:[t.cookie_count??0," 个闲鱼账号 · ",t.card_count??0," 张卡密 · 注册于 ",D(t.created_at)]})]}),!s&&e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void U(t),disabled:r,className:a?"rounded-md bg-emerald-50 px-3 py-2 text-xs font-bold text-emerald-700 hover:bg-emerald-100 disabled:opacity-50":"rounded-md bg-amber-50 px-3 py-2 text-xs font-bolLine truncated
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as t}from"./index-BZnqBmwp.js";/**
|
||||
import{c as t}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c}from"./index-BZnqBmwp.js";/**
|
||||
import{c}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c as o}from"./index-BZnqBmwp.js";/**
|
||||
import{c as o}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as e}from"./index-BZnqBmwp.js";/**
|
||||
import{c as e}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c}from"./index-BZnqBmwp.js";/**
|
||||
import{c}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c}from"./index-BZnqBmwp.js";/**
|
||||
import{c}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as e}from"./index-BZnqBmwp.js";/**
|
||||
import{c as e}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--gray-200) / 1)}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}input::placeholder,textarea::placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relativeLine truncated
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--gray-200) / 1)}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}input::placeholder,textarea::placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relativeLine truncated
|
||||
@@ -1,4 +1,4 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-SIGinmod.js","assets/ui-B9Jzqjf7.js","assets/package-CDIx-vGO.js","assets/trending-up-BLnHDV6T.js","assets/activity-D09genEZ.js","assets/package-check-BKkFNxd0.js","assets/AccountList-BxMZ8Udh.js","assets/check-C6LyX_Nv.js","assets/sparkles-DVlvGI-3.js","assets/power-D9WTjX12.js","assets/trash-2-CmT2n80I.js","assets/key-C0msAg8e.js","assets/eye-off-D1JuM9mR.js","assets/eye-BibUMjxU.js","assets/save-Dxf2dvgb.js","assets/OrderList-ZwW4LdUq.js","assets/plus-BljRK6L8.js","assets/truck-3I9pdhz5.js","assets/search-FaxHcuoK.js","assets/flower-2-B1FJm-vw.js","assets/square-pen-Bmle-FRS.js","assets/chevron-right-pxFcnXJt.js","assets/CardList-Camdnn7z.js","assets/image-BE6TxU00.js","assets/ItemList-D_zO1nzP.js","assets/shield-alert-rM_NVGQr.js","assets/power-off-NLH-bTqs.js","assets/settings-2-CRN1TI2k.js","assets/ProductAutomation-MbnRCc-u.js","assets/play-P9T6ppIo.js","assets/link-2-CTuWzTfU.js","assets/AIReply-teRO4Zqo.js","assets/message-square-text-Bnj1FXzX.js","assets/Settings-C3ht1_iw.js","assets/zap-BWofDPZm.js","assets/Keywords-GHbY9xAn.js","assets/MessageManagement-B1rvp6fJ.js","assets/send-BjFPcqyQ.js","assets/NotificationsAndLogs-BsCaJ8H7.js","assets/pen-line-CmEoWNKp.js","assets/UserManagement-BCtLeLer.js","assets/About-B_6kryH7.js","assets/BuyerInteraction-DnC0dxfT.js","assets/Resell-45XAV9t5.js","assets/HotList-SDSWlemc.js","assets/PriceWatch-nQDi2og7.js"])))=>i.map(i=>d[i]);
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-YbRCdkEx.js","assets/ui-DGhuFsSA.js","assets/package-CwcnsKO8.js","assets/trending-up-DkO2MYj4.js","assets/activity-DQLHFHES.js","assets/package-check-DD7mkdH5.js","assets/AccountList-Bc2Yv0W8.js","assets/check-B6GSSnq6.js","assets/sparkles-ITX60YIA.js","assets/power-DZ_kRimy.js","assets/trash-2-H_4vB0ks.js","assets/key-B8XT9PyZ.js","assets/eye-off-DVn7pRcv.js","assets/eye-vwq0YQk5.js","assets/save-2L2g6g1L.js","assets/OrderList-Bl_9hfcv.js","assets/plus-BXZgwA0o.js","assets/truck-hG3NWX-r.js","assets/search-BUYv4hib.js","assets/flower-2-Cth4QkK1.js","assets/square-pen-B8Sj6MD6.js","assets/chevron-right-DidJSJ1m.js","assets/CardList-MdsiObLx.js","assets/image-BN5k8Hl-.js","assets/ItemList-CtALEPY8.js","assets/shield-alert-BxxLkcUR.js","assets/power-off-BEy-96bB.js","assets/settings-2-CVdvHFW4.js","assets/ProductAutomation-CgvrvUY8.js","assets/play-BTeYe-0U.js","assets/link-2-PznVeo4F.js","assets/AIReply-BGbSjkXO.js","assets/message-square-text-DqMbrfJm.js","assets/Settings-DTKbGyYP.js","assets/zap-BGhU4xU3.js","assets/Keywords-D8S9L4tw.js","assets/MessageManagement-LKRQ4rFr.js","assets/send-jdubw9eF.js","assets/NotificationsAndLogs-BXbdIicr.js","assets/pen-line-CsaG3RgF.js","assets/UserManagement-ClhaMsDE.js","assets/About-HAsBMH6n.js","assets/BuyerInteraction-GyhcBrDa.js","assets/Resell-Op0d7Nd7.js","assets/HotList-DWh7Y7Wd.js","assets/PriceWatch-Dmiap8Bb.js"])))=>i.map(i=>d[i]);
|
||||
function xp(l,s){for(var c=0;c<s.length;c++){const r=s[c];if(typeof r!="string"&&!Array.isArray(r)){for(const f in r)if(f!=="default"&&!(f in l)){const m=Object.getOwnPropertyDescriptor(r,f);m&&Object.defineProperty(l,f,m.get?m:{enumerable:!0,get:()=>r[f]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const h of m.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function c(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function r(f){if(f.ep)return;f.ep=!0;const m=c(f);fetch(f.href,m)}})();function hh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Ic={exports:{}},lu={};/**
|
||||
* @license React
|
||||
* react-jsx-runtime.production.js
|
||||
@@ -275,4 +275,4 @@ Error generating stack: `+n.message+`
|
||||
`);return h===-1?"":f.stack.slice(h+1)})();try{if(!r.stack)r.stack=m;else if(m){const h=m.indexOf(`
|
||||
`),p=h===-1?-1:m.indexOf(`
|
||||
`,h+1),v=p===-1?"":m.slice(p+1);String(r.stack).endsWith(v)||(r.stack+=`
|
||||
`+m)}}catch{}}throw r}}_request(s,c){typeof s=="string"?(c=c||{},c.url=s):c=s||{},c=bn(this.defaults,c);const{transitional:r,paramsSerializer:f,headers:m}=c;r!==void 0&&Ci.assertOptions(r,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean),advertiseZstdAcceptEncoding:ot.transitional(ot.boolean),validateStatusUndefinedResolves:ot.transitional(ot.boolean)},!1),f!=null&&(x.isFunction(f)?c.paramsSerializer={serialize:f}:Ci.assertOptions(f,{encode:ot.function,serialize:ot.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),Ci.assertOptions(c,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let h=m&&x.merge(m.common,m[c.method]);m&&x.forEach(["delete","get","head","post","put","patch","query","common"],W=>{delete m[W]}),c.headers=ft.concat(h,m);const p=[];let v=!0;this.interceptors.request.forEach(function(X){if(typeof X.runWhen=="function"&&X.runWhen(c)===!1)return;v=v&&X.synchronous;const Y=c.transitional||Er;Y&&Y.legacyInterceptorReqResOrdering?p.unshift(X.fulfilled,X.rejected):p.push(X.fulfilled,X.rejected)});const g=[];this.interceptors.response.forEach(function(X){g.push(X.fulfilled,X.rejected)});let A,N=0,q;if(!v){const W=[rr.bind(this),void 0];for(W.unshift(...p),W.push(...g),q=W.length,A=Promise.resolve(c);N<q;)A=A.then(W[N++],W[N++]);return A}q=p.length;let F=c;for(;N<q;){const W=p[N++],X=p[N++];try{F=W?W(F):F}catch(Y){if(!X){A=Promise.reject(Y);break}try{const C=X.call(this,Y);x.isThenable(C)&&(A=Promise.resolve(C).then(()=>rr.call(this,F)))}catch(C){A=Promise.reject(C)}break}}if(!A)try{A=rr.call(this,F)}catch(W){A=Promise.reject(W)}for(N=0,q=g.length;N<q;)A=A.then(g[N++],g[N++]);return A}getUri(s){s=bn(this.defaults,s);const c=Gh(s.baseURL,s.url,s.allowAbsoluteUrls,s);return Lh(c,s.params,s.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(s){yn.prototype[s]=function(c,r){return this.request(bn(r||{},{method:s,url:c,data:r&&x.hasOwnProp(r,"data")?r.data:void 0}))}});x.forEach(["post","put","patch","query"],function(s){function c(r){return function(m,h,p){return this.request(bn(p||{},{method:s,headers:r?{"Content-Type":"multipart/form-data"}:{},url:m,data:h}))}}yn.prototype[s]=c(),s!=="query"&&(yn.prototype[s+"Form"]=c(!0))});let hv=class $h{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let c;this.promise=new Promise(function(m){c=m});const r=this;this.promise.then(f=>{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](f);r._listeners=null}),this.promise.then=f=>{let m;const h=new Promise(p=>{r.subscribe(p),m=p}).then(f);return h.cancel=function(){r.unsubscribe(m)},h},s(function(m,h,p){r.reason||(r.reason=new du(m,h,p),c(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const c=this._listeners.indexOf(s);c!==-1&&this._listeners.splice(c,1)}toAbortSignal(){const s=new AbortController,c=r=>{s.abort(r)};return this.subscribe(c),s.signal.unsubscribe=()=>this.unsubscribe(c),s.signal}static source(){let s;return{token:new $h(function(f){s=f}),cancel:s}}};function yv(l){return function(c){return l.apply(null,c)}}function pv(l){return x.isObject(l)&&l.isAxiosError===!0}const pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCe
Line truncated
|
||||
`+m)}}catch{}}throw r}}_request(s,c){typeof s=="string"?(c=c||{},c.url=s):c=s||{},c=bn(this.defaults,c);const{transitional:r,paramsSerializer:f,headers:m}=c;r!==void 0&&Ci.assertOptions(r,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean),advertiseZstdAcceptEncoding:ot.transitional(ot.boolean),validateStatusUndefinedResolves:ot.transitional(ot.boolean)},!1),f!=null&&(x.isFunction(f)?c.paramsSerializer={serialize:f}:Ci.assertOptions(f,{encode:ot.function,serialize:ot.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),Ci.assertOptions(c,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let h=m&&x.merge(m.common,m[c.method]);m&&x.forEach(["delete","get","head","post","put","patch","query","common"],W=>{delete m[W]}),c.headers=ft.concat(h,m);const p=[];let v=!0;this.interceptors.request.forEach(function(X){if(typeof X.runWhen=="function"&&X.runWhen(c)===!1)return;v=v&&X.synchronous;const Y=c.transitional||Er;Y&&Y.legacyInterceptorReqResOrdering?p.unshift(X.fulfilled,X.rejected):p.push(X.fulfilled,X.rejected)});const g=[];this.interceptors.response.forEach(function(X){g.push(X.fulfilled,X.rejected)});let A,N=0,q;if(!v){const W=[rr.bind(this),void 0];for(W.unshift(...p),W.push(...g),q=W.length,A=Promise.resolve(c);N<q;)A=A.then(W[N++],W[N++]);return A}q=p.length;let F=c;for(;N<q;){const W=p[N++],X=p[N++];try{F=W?W(F):F}catch(Y){if(!X){A=Promise.reject(Y);break}try{const C=X.call(this,Y);x.isThenable(C)&&(A=Promise.resolve(C).then(()=>rr.call(this,F)))}catch(C){A=Promise.reject(C)}break}}if(!A)try{A=rr.call(this,F)}catch(W){A=Promise.reject(W)}for(N=0,q=g.length;N<q;)A=A.then(g[N++],g[N++]);return A}getUri(s){s=bn(this.defaults,s);const c=Gh(s.baseURL,s.url,s.allowAbsoluteUrls,s);return Lh(c,s.params,s.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(s){yn.prototype[s]=function(c,r){return this.request(bn(r||{},{method:s,url:c,data:r&&x.hasOwnProp(r,"data")?r.data:void 0}))}});x.forEach(["post","put","patch","query"],function(s){function c(r){return function(m,h,p){return this.request(bn(p||{},{method:s,headers:r?{"Content-Type":"multipart/form-data"}:{},url:m,data:h}))}}yn.prototype[s]=c(),s!=="query"&&(yn.prototype[s+"Form"]=c(!0))});let hv=class $h{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let c;this.promise=new Promise(function(m){c=m});const r=this;this.promise.then(f=>{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](f);r._listeners=null}),this.promise.then=f=>{let m;const h=new Promise(p=>{r.subscribe(p),m=p}).then(f);return h.cancel=function(){r.unsubscribe(m)},h},s(function(m,h,p){r.reason||(r.reason=new du(m,h,p),c(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const c=this._listeners.indexOf(s);c!==-1&&this._listeners.splice(c,1)}toAbortSignal(){const s=new AbortController,c=r=>{s.abort(r)};return this.subscribe(c),s.signal.unsubscribe=()=>this.unsubscribe(c),s.signal}static source(){let s;return{token:new $h(function(f){s=f}),cancel:s}}};function yv(l){return function(c){return l.apply(null,c)}}function pv(l){return x.isObject(l)&&l.isAxiosError===!0}const pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCe
Line truncated
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c}from"./index-BZnqBmwp.js";/**
|
||||
import{c}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as e}from"./index-BZnqBmwp.js";/**
|
||||
import{c as e}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c as e}from"./index-BZnqBmwp.js";/**
|
||||
import{c as e}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as a}from"./index-BZnqBmwp.js";/**
|
||||
import{c as a}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c as e}from"./index-BZnqBmwp.js";/**
|
||||
import{c as e}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as e}from"./index-BZnqBmwp.js";/**
|
||||
import{c as e}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as a}from"./index-BZnqBmwp.js";/**
|
||||
import{c as a}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as e}from"./index-BZnqBmwp.js";/**
|
||||
import{c as e}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as o}from"./index-BZnqBmwp.js";/**
|
||||
import{c as o}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as o}from"./index-BZnqBmwp.js";/**
|
||||
import{c as o}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as a}from"./index-BZnqBmwp.js";/**
|
||||
import{c as a}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c}from"./index-BZnqBmwp.js";/**
|
||||
import{c}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as a}from"./index-BZnqBmwp.js";/**
|
||||
import{c as a}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c}from"./index-BZnqBmwp.js";/**
|
||||
import{c}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c as e}from"./index-BZnqBmwp.js";/**
|
||||
import{c as e}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as a}from"./index-BZnqBmwp.js";/**
|
||||
import{c as a}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c as a}from"./index-BZnqBmwp.js";/**
|
||||
import{c as a}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as a}from"./index-BZnqBmwp.js";/**
|
||||
import{c as a}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c as e}from"./index-BZnqBmwp.js";/**
|
||||
import{c as e}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c}from"./index-BZnqBmwp.js";/**
|
||||
import{c}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as W,j as e,L as $,aE as A,bT as H,X as R,r as x,b as z}from"./index-BZnqBmwp.js";/**
|
||||
import{c as W,j as e,L as $,aE as A,bT as H,X as R,r as x,b as z}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
@@ -1,4 +1,4 @@
|
||||
import{c as a}from"./index-BZnqBmwp.js";/**
|
||||
import{c as a}from"./index-CkAjw-Zl.js";/**
|
||||
* @license lucide-react v0.562.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
+2
-2
@@ -24,8 +24,8 @@
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script type="module" crossorigin src="/static/assets/index-BZnqBmwp.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/static/assets/index-CRJ6TC5_.css">
|
||||
<script type="module" crossorigin src="/static/assets/index-CkAjw-Zl.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/static/assets/index-CFvjDKMG.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Reference in new issue
Block a user