hunter-mate 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/extension/background/{service-worker.20261019161523.js → service-worker.20261023013927.js} +4 -0
- package/dist/assets/extension/background/service-worker.js +4 -0
- package/dist/assets/extension/build-info.json +1 -1
- package/dist/assets/extension/content/index.js +284 -64
- package/dist/assets/extension/manifest.json +3 -3
- package/dist/assets/extension/sidepanel/index.html +1 -1
- package/dist/assets/extension/sidepanel/index.js +14 -14
- package/dist/assets/server/main.mjs +1464 -1207
- package/dist/index.js +62 -67
- package/dist/watchdog.js +49 -4
- package/dist/web/dist/404.html +1 -1
- package/dist/web/dist/_next/static/chunks/187-48dc1acca97c62ba.js +1 -0
- package/dist/web/dist/_next/static/chunks/{253-9278ce6c4d446329.js → 327-6b8f348b06e7977f.js} +1 -1
- package/dist/web/dist/_next/static/chunks/353-845111f2789c5a03.js +12 -0
- package/dist/web/dist/_next/static/chunks/587-e449469e56a2bfff.js +1 -0
- package/dist/web/dist/_next/static/chunks/{589-cc56950ae4117cdd.js → 589-5bb84ab8060e960b.js} +1 -1
- package/dist/web/dist/_next/static/chunks/603-765c4fa1ed757ca5.js +32 -0
- package/dist/web/dist/_next/static/chunks/659-3db6e9c90ee9d238.js +1 -0
- package/dist/web/dist/_next/static/chunks/{686-05b99d3674f45bf7.js → 686-5f4ee3649cce07f1.js} +1 -1
- package/dist/web/dist/_next/static/chunks/882-1bcdfd2499403efd.js +1 -0
- package/dist/web/dist/_next/static/chunks/896-9dce6a3bc525edba.js +1 -0
- package/dist/web/dist/_next/static/chunks/{935-efb30b9f6f558e3f.js → 935-12f1084f0e18c962.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/_not-found/{page-d939b40bb8878d26.js → page-46929212b0496a89.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/admin/data/{page-df1d84c14e85f294.js → page-666f99fbfee46cc9.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/auth/verify/{page-cfeb844e1b72ccaa.js → page-2da5807d6cdfdb4e.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/companies/{page-57b1ef0b12134ce0.js → page-e1e730e2dc5ad84c.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/company/admin/{page-010928306f8df0ed.js → page-02244f3f1a212c76.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/entity/{page-fa96319650d38e78.js → page-d59a8103f8107d3b.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/jobs/page-a32a17c5a6384358.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/layout-1e492ed8c639edf5.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/logs/{page-bcdbb3885abda5a2.js → page-badf48f4e7e32e17.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/matching/jobs/[id]/talents/{page-8aca89db1e666a49.js → page-73bca3864b8b9e44.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/matching/portraits/[id]/jobs/{page-7086f1b773e57511.js → page-477c66bee61225fa.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/{page-49fe1e8630d2237e.js → page-8ea324b366e3d374.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/parselog/{page-fcdfdd41cf1f86f7.js → page-4f5c186442feb386.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/recordings/page-0fb8cafdd2f6762c.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/resource-usage/{page-7b939cf673d764e6.js → page-76be36ca978391a3.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/shared/[token]/page-6741cd1b0a4aca2e.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/snapshots/[id]/agent-prompt/{page-7d4d25de2c6704e9.js → page-60ea46364a74b294.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/talents/{page-5a2caa7a503ee041.js → page-4b00d69580f49f97.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/team/insights/{page-f097b4b8578a6e5d.js → page-5385dcd363f6e0cd.js} +1 -1
- package/dist/web/dist/_next/static/chunks/webpack-9cebd25e322e2cd7.js +1 -0
- package/dist/web/dist/_next/static/css/8f3c454cab3414d0.css +3 -0
- package/dist/web/dist/admin/data.html +1 -1
- package/dist/web/dist/admin/data.txt +5 -5
- package/dist/web/dist/auth/verify.html +1 -1
- package/dist/web/dist/auth/verify.txt +5 -5
- package/dist/web/dist/companies.html +1 -1
- package/dist/web/dist/companies.txt +5 -5
- package/dist/web/dist/company/admin.html +1 -1
- package/dist/web/dist/company/admin.txt +5 -5
- package/dist/web/dist/entity.html +1 -1
- package/dist/web/dist/entity.txt +5 -5
- package/dist/web/dist/index.html +1 -1
- package/dist/web/dist/index.txt +5 -5
- package/dist/web/dist/jobs.html +1 -1
- package/dist/web/dist/jobs.txt +5 -5
- package/dist/web/dist/logs.html +1 -1
- package/dist/web/dist/logs.txt +5 -5
- package/dist/web/dist/matching/jobs/placeholder/talents.html +1 -1
- package/dist/web/dist/matching/jobs/placeholder/talents.txt +5 -5
- package/dist/web/dist/matching/portraits/placeholder/jobs.html +1 -1
- package/dist/web/dist/matching/portraits/placeholder/jobs.txt +5 -5
- package/dist/web/dist/parselog.html +1 -1
- package/dist/web/dist/parselog.txt +5 -5
- package/dist/web/dist/recordings.html +1 -1
- package/dist/web/dist/recordings.txt +5 -5
- package/dist/web/dist/resource-usage.html +1 -1
- package/dist/web/dist/resource-usage.txt +5 -5
- package/dist/web/dist/shared/placeholder.html +1 -1
- package/dist/web/dist/shared/placeholder.txt +5 -5
- package/dist/web/dist/snapshots/placeholder/agent-prompt.html +1 -1
- package/dist/web/dist/snapshots/placeholder/agent-prompt.txt +5 -5
- package/dist/web/dist/talents.html +1 -1
- package/dist/web/dist/talents.txt +5 -5
- package/dist/web/dist/team/insights.html +1 -1
- package/dist/web/dist/team/insights.txt +5 -5
- package/package.json +1 -4
- package/dist/web/dist/_next/static/chunks/166.b263e636ff66212f.js +0 -1
- package/dist/web/dist/_next/static/chunks/187-f067914dcd1330c2.js +0 -32
- package/dist/web/dist/_next/static/chunks/659-122057f46f941df7.js +0 -1
- package/dist/web/dist/_next/static/chunks/728-cffab7e836020551.js +0 -12
- package/dist/web/dist/_next/static/chunks/app/jobs/page-5ba0bdc881b98d42.js +0 -1
- package/dist/web/dist/_next/static/chunks/app/layout-bd9a7e5e4474b692.js +0 -1
- package/dist/web/dist/_next/static/chunks/app/recordings/page-7ba5d89391c9dace.js +0 -1
- package/dist/web/dist/_next/static/chunks/app/shared/[token]/page-df87328c52f862f1.js +0 -1
- package/dist/web/dist/_next/static/chunks/webpack-54e74ccc9e9451ee.js +0 -1
- package/dist/web/dist/_next/static/css/a8f0a381a2372781.css +0 -3
- package/dist/web/dist/_next/static/css/f60d210841fab76b.css +0 -1
- /package/dist/web/dist/_next/static/{m0UGHVTGvtvb9mn4-uzJJ → cC7rsTCys5_15wJ8BiPDm}/_buildManifest.js +0 -0
- /package/dist/web/dist/_next/static/{m0UGHVTGvtvb9mn4-uzJJ → cC7rsTCys5_15wJ8BiPDm}/_ssgManifest.js +0 -0
package/dist/web/dist/_next/static/chunks/{253-9278ce6c4d446329.js → 327-6b8f348b06e7977f.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9718ccf1-22b2-4fa0-9793-71c183f46705",e._sentryDebugIdIdentifier="sentry-dbid-9718ccf1-22b2-4fa0-9793-71c183f46705")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[253],{94518:function(e,t,n){n.d(t,{m:function(){return r}});var l=n(72835);function r(e){let{filterBar:t,listPanel:n,detailPanel:r}=e;return(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"flex w-80 flex-col border-r border-gray-200 bg-white",children:[t,n]}),(0,l.jsx)("div",{className:"flex-1 overflow-auto bg-gray-50 p-6",children:r})]})}},63718:function(e,t,n){n.d(t,{L:function(){return a}});var l=n(72835),r=n(60635);function a(e){let{items:t,selectedId:n,onSelect:a,loading:s,emptyText:i="暂无数据",onLoadMore:c,loadingMore:u,exhausted:o}=e,d=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!c)return;let e=d.current;if(!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&c()},{root:e.closest(".overflow-auto"),rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[c]),(0,l.jsxs)("div",{className:"flex-1 overflow-auto",children:[s?(0,l.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:"加载中…"}):0===t.length?(0,l.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:i}):(0,l.jsx)("ul",{className:"divide-y divide-gray-100",children:t.map(e=>(0,l.jsx)("li",{role:"button",tabIndex:0,onClick:()=>a(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&a(e.id)},className:"cursor-pointer px-3 py-2 text-sm transition-colors ".concat(n===e.id?"bg-blue-50":"hover:bg-gray-50"),children:e.content},e.id))}),c&&!s&&t.length>0&&(0,l.jsx)("div",{ref:d,className:"p-3 text-center text-xs text-gray-400",children:u?"加载更多…":o?"没有更多了":""})]})}},27828:function(e,t,n){n.d(t,{dy:function(){return f},rY:function(){return g},h5:function(){return x},oj:function(){return i}});var l=n(72835),r=n(84704);function a(e){return String(e).padStart(2,"0")}function s(e){let{value:t}=e;if(!t)return null;let n=new Date(t);return Number.isNaN(n.getTime())?null:(0,l.jsx)("span",{title:function(e){let t="string"==typeof e?new Date(e):e;return Number.isNaN(t.getTime())?"":"".concat(t.getFullYear(),"/").concat(a(t.getMonth()+1),"/").concat(a(t.getDate())," ")+"".concat(a(t.getHours()),":").concat(a(t.getMinutes()),":").concat(a(t.getSeconds()))}(n),className:"cursor-default",children:function(e,t){let n="string"==typeof e?new Date(e):e,l=n.getTime();if(Number.isNaN(l))return"";let r=Math.floor(Math.max(0,t.getTime()-l)/6e4);if(r<1)return"刚刚";if(r<60)return"".concat(r," 分钟前");let s=Math.floor(r/60);if(s<24)return"".concat(s," 小时前");let i=Math.floor((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime())/864e5);return i<=1?"昨天":i<30?"".concat(i," 天前"):"".concat(n.getFullYear(),"/").concat(a(n.getMonth()+1),"/").concat(a(n.getDate()))}(n,new Date)})}function i(e){let{name:t,headline:n,source:r,updatedAt:a}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900",children:t}),n?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:n}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{children:r}),(0,l.jsx)("span",{children:"\xb7"})]}):null,(0,l.jsx)(s,{value:a})]})]})}let c={active:"启动中",closed:"结束"},u={recommended:"推荐人才",pending_invite:"待邀请",invited:"已邀请待回复",replied:"已回复待筛选",to_client:"待推荐给客户",interview_pending:"已推荐待安排面试",interview_scheduled:"已安排面试",offer_pending:"待offer",onboarding:"待上班",rejected:"不合适"};function o(e){let{stages:t}=e,n=Object.keys(t).filter(e=>{var n,l;return(null!==(l=null===(n=t[e])||void 0===n?void 0:n.total)&&void 0!==l?l:0)>0});return n.length?(0,l.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:n.map(e=>{var n;let r=t[e],a=null!==(n=u[e])&&void 0!==n?n:e;return(0,l.jsxs)("span",{title:"".concat(a," 今天").concat(r.today,"/本周").concat(r.week,"/全部").concat(r.total),className:"rounded bg-[color:var(--brand-soft)] px-1.5 py-0.5 text-[10px] font-medium",style:{color:"var(--brand)"},children:[a," ",r.today,"/",r.week,"/",r.total]},e)})}):null}function d(e){let{platforms:t}=e;return t.length?(0,l.jsx)("span",{className:"flex items-center gap-0.5",title:t.join("、"),children:t.map(e=>{let t=(0,r.mS)(e);return(0,l.jsx)("span",{title:e,className:"flex h-4 w-4 items-center justify-center rounded bg-[color:var(--brand-soft)] text-[9px] font-semibold",style:{color:t.fg},children:t.label},e)})}):null}function f(e){var t,n;let{title:r,status:a,hmhLocal:i,subtitle:u,customerName:f,opName:x,rsNames:g,time:h,updatedAt:m,createdAt:p,stages:v,platforms:y,myRole:b}=e,j=null!==(t=null!=m?m:h)&&void 0!==t?t:"",N=null!=p?p:"",w=!!j&&!!N&&1e3>Math.abs(new Date(j).getTime()-new Date(N).getTime());return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"truncate font-medium text-gray-900",children:r}),(0,l.jsx)("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-xs ".concat("active"===a?"bg-emerald-100 text-emerald-700":"bg-gray-100 text-gray-500"),children:null!==(n=c[a])&&void 0!==n?n:a}),i?(0,l.jsx)("span",{className:"shrink-0 rounded bg-purple-100 px-1.5 py-0.5 text-xs text-purple-700",children:"本地"}):null,"op"===b?(0,l.jsx)("span",{className:"shrink-0 rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-700",children:"op"}):null,"rs"===b?(0,l.jsx)("span",{className:"shrink-0 rounded bg-cyan-100 px-1.5 py-0.5 text-xs text-cyan-700",children:"rs"}):null,y?(0,l.jsx)(d,{platforms:y}):null]}),u?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:u}):null,void 0!==f?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:f}):null,x||g&&g.length?(0,l.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-gray-500",children:[x?(0,l.jsxs)("span",{children:["op:",(0,l.jsx)("span",{className:"text-gray-700",children:x})]}):null,g&&g.length?(0,l.jsxs)("span",{children:["rs:",(0,l.jsx)("span",{className:"text-gray-700",children:g.join("、")})]}):null]}):null,v?(0,l.jsx)(o,{stages:v}):null,j?(0,l.jsxs)("div",{className:"mt-0.5 flex items-center justify-between gap-2 text-xs text-gray-400",children:[(0,l.jsx)(s,{value:j}),N&&!w?(0,l.jsx)(s,{value:N}):null]}):null]})}function x(e){var t;let{name:n,headline:r,aiReason:a,overall:i,invitationChannel:c,stageLabel:u,updatedAt:o,onNameClick:d}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[d?(0,l.jsx)("button",{type:"button",title:"查看人才详情",onClick:e=>{e.stopPropagation(),d()},className:"font-medium text-blue-600 hover:underline",children:n}):(0,l.jsx)("span",{className:"font-medium text-gray-900",children:n}),null!=i?(0,l.jsxs)("span",{className:"rounded bg-emerald-100 px-1.5 py-0.5 text-xs text-emerald-700",children:[i,"分"]}):null,c?(0,l.jsx)("span",{className:"rounded bg-sky-100 px-1.5 py-0.5 text-xs text-sky-700",children:null!==(t=({email:"邮件",linkedin:"LinkedIn",wechat:"微信"})[c])&&void 0!==t?t:c}):null]}),a?(0,l.jsxs)("div",{className:"line-clamp-2 text-xs text-gray-600",title:a,children:[(0,l.jsx)("span",{className:"text-blue-500",children:"AI 理由:"}),a]}):r?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:r}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[u?(0,l.jsx)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-500",children:u}):null,(0,l.jsx)(s,{value:o})]})]})}function g(e){let{title:t,source:n,company:r,sourceUrl:a,updatedAt:i}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"font-medium text-gray-900",children:t}),(0,l.jsx)("span",{className:"rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-700",children:n})]}),r?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:r}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[(0,l.jsx)(s,{value:i}),a?(0,l.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",className:"text-blue-500 hover:underline",onClick:e=>e.stopPropagation(),children:"来源"}):null]})]})}},26119:function(e,t,n){n.d(t,{B:function(){return s}});var l=n(72835),r=n(60635),a=n(82182);function s(e){let[t,n]=(0,r.useState)(new Set),[s,i]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),[o,d]=(0,r.useState)(null),f=(0,r.useCallback)(e=>{n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),x=(0,r.useCallback)(e=>{let t=new Set(e);n(e=>{let n=new Set(Array.from(e).filter(e=>t.has(e)));return n.size===e.size?e:n})},[]),g=(0,r.useCallback)(()=>n(new Set),[]),h=(0,r.useCallback)(e=>(0,l.jsx)("input",{type:"checkbox",className:"mt-1 accent-blue-600",checked:t.has(e),onChange:()=>f(e),onClick:e=>e.stopPropagation()}),[t,f]),m=(0,r.useCallback)(async()=>{if(!s)return;u(!0),d(null);let t=s.ids;try{var l,r;let s=await fetch(e.deleteUrl,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})});if(!s.ok){let l=await s.json().catch(()=>null),i=null==l?void 0:l.message;if(401===s.status){d("登录已过期,请在弹窗中重新登录;登录后自动继续删除"),(0,a.jr)({message:"string"==typeof i?i:"登录已过期,请重新登录",oldUserId:null!==(r=e.currentUserId)&&void 0!==r?r:null,retry:async()=>{var l;let r=await fetch(e.deleteUrl,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})});if(!r.ok){let e=await r.json().catch(()=>null),t=null==e?void 0:e.message;return d("string"==typeof t?t:"续跑删除仍失败,请稍后重试"),!1}return n(new Set),d("已删除 ".concat(t.length," 条")),null===(l=e.onDeleted)||void 0===l||l.call(e),!0}});return}d("string"==typeof i?i:"操作失败,请稍后重试");return}n(new Set),d("已删除 ".concat(t.length," 条")),null===(l=e.onDeleted)||void 0===l||l.call(e)}finally{u(!1),i(null)}},[s,e.deleteUrl,e.onDeleted,e.currentUserId]),p=(0,r.useCallback)(e=>(0,l.jsxs)("div",{className:"flex items-center gap-3 border-t border-gray-100 px-3 py-2",children:[(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-sm text-gray-600",children:[(0,l.jsx)("input",{type:"checkbox",className:"accent-blue-600",checked:e.length>0&&t.size===e.length,onChange:()=>n(t=>t.size===e.length&&e.length>0?new Set:new Set(e.map(e=>String(e.id))))}),"全选"]}),t.size>0&&(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm",children:[(0,l.jsxs)("span",{className:"text-gray-500",children:["已选 ",t.size," 条"]}),(0,l.jsx)("button",{type:"button",onClick:()=>i({ids:Array.from(t).map(Number)}),className:"rounded-lg bg-red-600 px-3 py-1 text-white hover:bg-red-700",children:"删除"})]}),o&&(0,l.jsx)("span",{className:"text-xs text-green-600",children:o})]}),[t,o]);return{selectedIds:t,checkbox:h,prune:x,bar:p,modal:(0,r.useCallback)(()=>s?(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:(0,l.jsxs)("div",{className:"w-96 rounded-xl bg-white p-6 shadow-xl",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"删除确认"}),(0,l.jsxs)("p",{className:"mt-3 text-sm text-gray-600",children:["确定删除选中的 ",s.ids.length," 条",e.label,"吗?删除后不能自行恢复;如误删,请联系管理员找回。"]}),(0,l.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,l.jsx)("button",{type:"button",disabled:c,onClick:()=>i(null),className:"rounded-lg px-4 py-1.5 text-sm text-gray-600 hover:bg-gray-100",children:"取消"}),(0,l.jsx)("button",{type:"button",disabled:c,onClick:()=>void m(),className:"rounded-lg bg-red-600 px-4 py-1.5 text-sm text-white hover:bg-red-700 disabled:opacity-50",children:c?"处理中…":"确定"})]})]})}):null,[s,c,m,e.label]),clear:g}}},93464:function(e,t,n){n.d(t,{k:function(){return r}});var l=n(60635);function r(e){var t,n,r;let a=null!==(t=e.pageSize)&&void 0!==t?t:50,[s,i]=(0,l.useState)([]),[c,u]=(0,l.useState)(0),[o,d]=(0,l.useState)(!0),[f,x]=(0,l.useState)(!1),[g,h]=(0,l.useState)(null),m=(0,l.useRef)(0),p=(0,l.useRef)(!1),v=(0,l.useRef)([]),y=null!==(n=e.byKey)&&void 0!==n?n:e=>String(e.id),b=(0,l.useRef)(0),j=(0,l.useCallback)(async(t,n)=>{let l=++m.current;0===t?d(!0):x(!0),h(null);try{var r;let s=await e.fetchPage(t,a);if(l!==m.current)return;b.current=null!==(r=s.nextOffset)&&void 0!==r?r:t+s.items.length,n&&0===s.items.length?u(e=>Math.min(e,v.current.length)):u(s.total),i(e=>{if(!n)return s.items;let t=new Set(e.map(y));return[...e,...s.items.filter(e=>!t.has(y(e)))]})}catch(e){if(l!==m.current)return;h(e instanceof Error?e.message:"加载失败")}finally{l===m.current&&(d(!1),x(!1),p.current=!1)}},[e.fetchPage,a]);(0,l.useEffect)(()=>{p.current=!0,j(0,!1)},[j,...null!==(r=e.deps)&&void 0!==r?r:[]]),(0,l.useEffect)(()=>{v.current=s},[s]);let N=(0,l.useCallback)(()=>{!p.current&&(v.current.length>=c||(p.current=!0,j(b.current,!0)))},[j,c]),w=(0,l.useCallback)(()=>{p.current=!0,b.current=0,j(0,!1)},[j]);return{items:s,total:c,loading:o,loadingMore:f,exhausted:!o&&s.length>=c,error:g,loadMore:N,refresh:w}}},65777:function(e,t,n){let l;n.d(t,{Cd:function(){return S},Xc:function(){return C},aG:function(){return w},cp:function(){return k},nu:function(){return N},tQ:function(){return E}});var r=n(60635),a=n(74431),s=n(67002),i=n(60529);let c=null,u=null,o=null,d=new Set;function f(){d.forEach(e=>e())}function x(e){c=c?{...c,refreshing:e}:{...y,refreshing:e},f()}async function g(){try{return await (0,a.aA)("/auth/session")}catch(e){return null}}async function h(e){let t=new Headers,n=(0,s.Xc)();n&&t.set("Authorization","UTOKEN ".concat(n));try{return await (0,a.aA)(e,{headers:t})}catch(e){return null}}async function m(){x(!0);try{var e;let[t,n]=await Promise.all([g(),h("/datasync/state")]),r=(null==t?void 0:t.loggedIn)&&t.token?t.token:null,a=null!=n?n:null;!a&&t&&r&&r!==(0,s.Xc)()?((0,s.GK)(r),a=await h("/datasync/state")):(0,s.GK)(r),function(e){if(void 0===l){l=e;return}if(e!==l){l=e;try{window.localStorage.removeItem("hm-view-mode")}catch(e){}}}((null==t?void 0:t.loggedIn)&&null!==(e=t.hmUserId)&&void 0!==e?e:null);let i=!!((null==t?void 0:t.loggedIn)||(null==a?void 0:a.loggedIn));if(!t&&!a){c=c?{...c,loadError:"本地服务无响应"}:{...y,loadError:"本地服务无响应"},f();return}c={session:null!=t?t:{loggedIn:!1},sync:a,utoken:(0,s.Xc)(),loadError:null,refreshing:!1,authStatus:i?"in":"out",refresh:p},f()}finally{(null==c?void 0:c.refreshing)&&x(!1)}}function p(){return u||(u=m().finally(()=>{u=null}))}function v(e){return d.add(e),1===d.size&&(p(),o=setInterval(()=>void p(),6e4)),()=>{d.delete(e),0===d.size&&o&&(clearInterval(o),o=null)}}let y={session:null,sync:null,utoken:null,loadError:null,refreshing:!1,authStatus:"loading",refresh:p};function b(){return null!=c?c:y}function j(){return b()}function N(){return(0,r.useSyncExternalStore)(v,b,j)}function w(e){var t;return(null!==(t=null==e?void 0:e.memberships)&&void 0!==t?t:[]).filter(e=>!e.isPersonal&&!e.leftAt)}function k(e){var t,n;let l=null!==(t=null==e?void 0:e.activeTenantId)&&void 0!==t?t:null;if(null==l)return null;let r=(null!==(n=null==e?void 0:e.memberships)&&void 0!==n?n:[]).find(e=>e.tenantId===l&&!e.leftAt);return!r||r.isPersonal?null:l}function S(e,t){var n,l;if(!t)return null;let r=(null!==(n=null==e?void 0:e.memberships)&&void 0!==n?n:[]).find(e=>e.tenantId===t&&!e.leftAt&&!e.isPersonal);return null!==(l=null==r?void 0:r.role)&&void 0!==l?l:null}function E(){return i.env.NEXT_PUBLIC_HUNTER_MATE_SERVER_URL||""}function C(){return(0,s.Xc)()}},82182:function(e,t,n){n.d(t,{H7:function(){return o},jr:function(){return s},mn:function(){return u},nk:function(){return c},qd:function(){return i}});let l=null,r=new Set;function a(){r.forEach(e=>e())}function s(e){l=e,a()}function i(){l&&(l=null,a())}function c(){return l}function u(e){return r.add(e),()=>r.delete(e)}function o(e){if(!e)return null;try{var t,n,l,r,a;let s=e.split(".")[1],i=JSON.parse(decodeURIComponent(escape(atob(s.replace(/-/g,"+").replace(/_/g,"/"))))),c=null!==(a=null!==(r=null!==(l=null==i?void 0:null===(t=i.data)||void 0===t?void 0:t._id)&&void 0!==l?l:null==i?void 0:null===(n=i.data)||void 0===n?void 0:n.id)&&void 0!==r?r:null==i?void 0:i.sub)&&void 0!==a?a:null;return"number"==typeof c?c:null}catch(e){return null}}},8448:function(e,t,n){n.d(t,{d3:function(){return l}});function l(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("zh-CN",{hour12:!1}):""}},74431:function(e,t,n){n.d(t,{Ox:function(){return a},aA:function(){return c}});var l=n(67002),r=n(60529);function a(){return r.env.HUNTER_MATE_SERVER_URL||""}let s=a();class i extends Error{constructor(e,t,n){super(null!=n?n:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function c(e,t){let n;try{n=await fetch("".concat(s).concat(e),{cache:"no-store",...function(e){let t=(0,l.Xc)();if(!t)return e;let n=new Headers(null==e?void 0:e.headers);return n.has("Authorization")||n.set("Authorization","UTOKEN ".concat(t)),{...e,headers:n}}(t)})}catch(t){throw new i(0,e,t instanceof Error?t.message:"网络错误")}if(!n.ok)throw new i(n.status,e,"HTTP ".concat(n.status));try{return await n.json()}catch(t){throw new i(n.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},84704:function(e,t,n){n.d(t,{mS:function(){return r}});let l={linkedin:{label:"in",fg:"#0a66c2"},builtin:{label:"bi",fg:"#5c2d91"},lagou:{label:"拉",fg:"#00b38a"},zhaopin:{label:"智",fg:"#ff7f00"},"51job":{label:"前",fg:"#ff6000"},liepin:{label:"猎",fg:"#008ccb"},boss:{label:"B",fg:"#00bebd"}};function r(e){var t;return null!==(t=l[e.replace(/^www\./,"").split(".")[0].toLowerCase()])&&void 0!==t?t:{label:e.slice(0,1).toUpperCase(),fg:"var(--brand)"}}},67002:function(e,t,n){n.d(t,{GK:function(){return s},Lc:function(){return i},Xc:function(){return a}});let l=null,r=new Set;function a(){return l}function s(e){e!==l&&(l=e,r.forEach(e=>e()))}function i(e){return r.add(e),()=>{r.delete(e)}}}}]);
|
|
1
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="39aee89a-c96a-4221-97bc-b261818ad89c",e._sentryDebugIdIdentifier="sentry-dbid-39aee89a-c96a-4221-97bc-b261818ad89c")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[327],{94518:function(e,t,n){n.d(t,{m:function(){return r}});var l=n(72835);function r(e){let{filterBar:t,listPanel:n,detailPanel:r}=e;return(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"flex w-80 flex-col border-r border-gray-200 bg-white",children:[t,n]}),(0,l.jsx)("div",{className:"flex-1 overflow-auto bg-gray-50 p-6",children:r})]})}},63718:function(e,t,n){n.d(t,{L:function(){return a}});var l=n(72835),r=n(60635);function a(e){let{items:t,selectedId:n,onSelect:a,loading:s,emptyText:i="暂无数据",onLoadMore:c,loadingMore:u,exhausted:d}=e,o=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!c)return;let e=o.current;if(!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&c()},{root:e.closest(".overflow-auto"),rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[c]),(0,l.jsxs)("div",{className:"flex-1 overflow-auto",children:[s?(0,l.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:"加载中…"}):0===t.length?(0,l.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:i}):(0,l.jsx)("ul",{className:"divide-y divide-gray-100",children:t.map(e=>(0,l.jsx)("li",{role:"button",tabIndex:0,onClick:()=>a(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&a(e.id)},className:"cursor-pointer px-3 py-2 text-sm transition-colors ".concat(n===e.id?"bg-blue-50":"hover:bg-gray-50"),children:e.content},e.id))}),c&&!s&&t.length>0&&(0,l.jsx)("div",{ref:o,className:"p-3 text-center text-xs text-gray-400",children:u?"加载更多…":d?"没有更多了":""})]})}},27828:function(e,t,n){n.d(t,{dy:function(){return x},rY:function(){return g},h5:function(){return f},oj:function(){return i}});var l=n(72835),r=n(84704);function a(e){return String(e).padStart(2,"0")}function s(e){let{value:t}=e;if(!t)return null;let n=new Date(t);return Number.isNaN(n.getTime())?null:(0,l.jsx)("span",{title:function(e){let t="string"==typeof e?new Date(e):e;return Number.isNaN(t.getTime())?"":"".concat(t.getFullYear(),"/").concat(a(t.getMonth()+1),"/").concat(a(t.getDate())," ")+"".concat(a(t.getHours()),":").concat(a(t.getMinutes()),":").concat(a(t.getSeconds()))}(n),className:"cursor-default",children:function(e,t){let n="string"==typeof e?new Date(e):e,l=n.getTime();if(Number.isNaN(l))return"";let r=Math.floor(Math.max(0,t.getTime()-l)/6e4);if(r<1)return"刚刚";if(r<60)return"".concat(r," 分钟前");let s=Math.floor(r/60);if(s<24)return"".concat(s," 小时前");let i=Math.floor((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime())/864e5);return i<=1?"昨天":i<30?"".concat(i," 天前"):"".concat(n.getFullYear(),"/").concat(a(n.getMonth()+1),"/").concat(a(n.getDate()))}(n,new Date)})}function i(e){let{name:t,headline:n,source:r,updatedAt:a}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900",children:t}),n?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:n}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{children:r}),(0,l.jsx)("span",{children:"\xb7"})]}):null,(0,l.jsx)(s,{value:a})]})]})}let c={active:"启动中",closed:"结束"},u={recommended:"推荐人才",pending_invite:"待邀请",invited:"已邀请待回复",replied:"已回复待筛选",to_client:"待推荐给客户",interview_pending:"已推荐待安排面试",interview_scheduled:"已安排面试",offer_pending:"待offer",onboarding:"待上班",rejected:"不合适"};function d(e){let{stages:t}=e,n=Object.keys(t).filter(e=>{var n,l;return(null!==(l=null===(n=t[e])||void 0===n?void 0:n.total)&&void 0!==l?l:0)>0});return n.length?(0,l.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:n.map(e=>{var n;let r=t[e],a=null!==(n=u[e])&&void 0!==n?n:e;return(0,l.jsxs)("span",{title:"".concat(a," 今天").concat(r.today,"/本周").concat(r.week,"/全部").concat(r.total),className:"rounded bg-[color:var(--brand-soft)] px-1.5 py-0.5 text-[10px] font-medium",style:{color:"var(--brand)"},children:[a," ",r.today,"/",r.week,"/",r.total]},e)})}):null}function o(e){let{platforms:t}=e;return t.length?(0,l.jsx)("span",{className:"flex items-center gap-0.5",title:t.join("、"),children:t.map(e=>{let t=(0,r.mS)(e);return(0,l.jsx)("span",{title:e,className:"flex h-4 w-4 items-center justify-center rounded bg-[color:var(--brand-soft)] text-[9px] font-semibold",style:{color:t.fg},children:t.label},e)})}):null}function x(e){var t,n;let{title:r,status:a,hmhLocal:i,subtitle:u,customerName:x,opName:f,rsNames:g,time:m,updatedAt:h,createdAt:p,stages:b,platforms:y,myRole:v}=e,j=null!==(t=null!=h?h:m)&&void 0!==t?t:"",N=null!=p?p:"",w=!!j&&!!N&&1e3>Math.abs(new Date(j).getTime()-new Date(N).getTime());return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"truncate font-medium text-gray-900",children:r}),(0,l.jsx)("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-xs ".concat("active"===a?"bg-emerald-100 text-emerald-700":"bg-gray-100 text-gray-500"),children:null!==(n=c[a])&&void 0!==n?n:a}),i?(0,l.jsx)("span",{className:"shrink-0 rounded bg-purple-100 px-1.5 py-0.5 text-xs text-purple-700",children:"本地"}):null,"op"===v?(0,l.jsx)("span",{className:"shrink-0 rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-700",children:"op"}):null,"rs"===v?(0,l.jsx)("span",{className:"shrink-0 rounded bg-cyan-100 px-1.5 py-0.5 text-xs text-cyan-700",children:"rs"}):null,y?(0,l.jsx)(o,{platforms:y}):null]}),u?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:u}):null,void 0!==x?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:x}):null,f||g&&g.length?(0,l.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-gray-500",children:[f?(0,l.jsxs)("span",{children:["op:",(0,l.jsx)("span",{className:"text-gray-700",children:f})]}):null,g&&g.length?(0,l.jsxs)("span",{children:["rs:",(0,l.jsx)("span",{className:"text-gray-700",children:g.join("、")})]}):null]}):null,b?(0,l.jsx)(d,{stages:b}):null,j?(0,l.jsxs)("div",{className:"mt-0.5 flex items-center justify-between gap-2 text-xs text-gray-400",children:[(0,l.jsx)(s,{value:j}),N&&!w?(0,l.jsx)(s,{value:N}):null]}):null]})}function f(e){var t;let{name:n,headline:r,aiReason:a,overall:i,invitationChannel:c,stageLabel:u,updatedAt:d,onNameClick:o}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[o?(0,l.jsx)("button",{type:"button",title:"查看人才详情",onClick:e=>{e.stopPropagation(),o()},className:"font-medium text-blue-600 hover:underline",children:n}):(0,l.jsx)("span",{className:"font-medium text-gray-900",children:n}),null!=i?(0,l.jsxs)("span",{className:"rounded bg-emerald-100 px-1.5 py-0.5 text-xs text-emerald-700",children:[i,"分"]}):null,c?(0,l.jsx)("span",{className:"rounded bg-sky-100 px-1.5 py-0.5 text-xs text-sky-700",children:null!==(t=({email:"邮件",linkedin:"LinkedIn",wechat:"微信"})[c])&&void 0!==t?t:c}):null]}),a?(0,l.jsxs)("div",{className:"line-clamp-2 text-xs text-gray-600",title:a,children:[(0,l.jsx)("span",{className:"text-blue-500",children:"AI 理由:"}),a]}):r?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:r}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[u?(0,l.jsx)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-500",children:u}):null,(0,l.jsx)(s,{value:d})]})]})}function g(e){let{title:t,source:n,company:r,sourceUrl:a,updatedAt:i}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"font-medium text-gray-900",children:t}),(0,l.jsx)("span",{className:"rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-700",children:n})]}),r?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:r}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[(0,l.jsx)(s,{value:i}),a?(0,l.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",className:"text-blue-500 hover:underline",onClick:e=>e.stopPropagation(),children:"来源"}):null]})]})}},26119:function(e,t,n){n.d(t,{B:function(){return s}});var l=n(72835),r=n(60635),a=n(82182);function s(e){let[t,n]=(0,r.useState)(new Set),[s,i]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),[d,o]=(0,r.useState)(null),x=(0,r.useCallback)(e=>{n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),f=(0,r.useCallback)(e=>{let t=new Set(e);n(e=>{let n=new Set(Array.from(e).filter(e=>t.has(e)));return n.size===e.size?e:n})},[]),g=(0,r.useCallback)(()=>n(new Set),[]),m=(0,r.useCallback)(e=>(0,l.jsx)("input",{type:"checkbox",className:"mt-1 accent-blue-600",checked:t.has(e),onChange:()=>x(e),onClick:e=>e.stopPropagation()}),[t,x]),h=(0,r.useCallback)(async()=>{if(!s)return;u(!0),o(null);let t=s.ids;try{var l,r;let s=await fetch(e.deleteUrl,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})});if(!s.ok){let l=await s.json().catch(()=>null),i=null==l?void 0:l.message;if(401===s.status){o("登录已过期,请在弹窗中重新登录;登录后自动继续删除"),(0,a.jr)({message:"string"==typeof i?i:"登录已过期,请重新登录",oldUserId:null!==(r=e.currentUserId)&&void 0!==r?r:null,retry:async()=>{var l;let r=await fetch(e.deleteUrl,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})});if(!r.ok){let e=await r.json().catch(()=>null),t=null==e?void 0:e.message;return o("string"==typeof t?t:"续跑删除仍失败,请稍后重试"),!1}return n(new Set),o("已删除 ".concat(t.length," 条")),null===(l=e.onDeleted)||void 0===l||l.call(e),!0}});return}o("string"==typeof i?i:"操作失败,请稍后重试");return}n(new Set),o("已删除 ".concat(t.length," 条")),null===(l=e.onDeleted)||void 0===l||l.call(e)}finally{u(!1),i(null)}},[s,e.deleteUrl,e.onDeleted,e.currentUserId]),p=(0,r.useCallback)(e=>(0,l.jsxs)("div",{className:"flex items-center gap-3 border-t border-gray-100 px-3 py-2",children:[(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-sm text-gray-600",children:[(0,l.jsx)("input",{type:"checkbox",className:"accent-blue-600",checked:e.length>0&&t.size===e.length,onChange:()=>n(t=>t.size===e.length&&e.length>0?new Set:new Set(e.map(e=>String(e.id))))}),"全选"]}),t.size>0&&(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm",children:[(0,l.jsxs)("span",{className:"text-gray-500",children:["已选 ",t.size," 条"]}),(0,l.jsx)("button",{type:"button",onClick:()=>i({ids:Array.from(t).map(Number)}),className:"rounded-lg bg-red-600 px-3 py-1 text-white hover:bg-red-700",children:"删除"})]}),d&&(0,l.jsx)("span",{className:"text-xs text-green-600",children:d})]}),[t,d]);return{selectedIds:t,checkbox:m,prune:f,bar:p,modal:(0,r.useCallback)(()=>s?(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:(0,l.jsxs)("div",{className:"w-96 rounded-xl bg-white p-6 shadow-xl",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"删除确认"}),(0,l.jsxs)("p",{className:"mt-3 text-sm text-gray-600",children:["确定删除选中的 ",s.ids.length," 条",e.label,"吗?删除后不能自行恢复;如误删,请联系管理员找回。"]}),(0,l.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,l.jsx)("button",{type:"button",disabled:c,onClick:()=>i(null),className:"rounded-lg px-4 py-1.5 text-sm text-gray-600 hover:bg-gray-100",children:"取消"}),(0,l.jsx)("button",{type:"button",disabled:c,onClick:()=>void h(),className:"rounded-lg bg-red-600 px-4 py-1.5 text-sm text-white hover:bg-red-700 disabled:opacity-50",children:c?"处理中…":"确定"})]})]})}):null,[s,c,h,e.label]),clear:g}}},93464:function(e,t,n){n.d(t,{k:function(){return r}});var l=n(60635);function r(e){var t,n,r;let a=null!==(t=e.pageSize)&&void 0!==t?t:50,[s,i]=(0,l.useState)([]),[c,u]=(0,l.useState)(0),[d,o]=(0,l.useState)(!0),[x,f]=(0,l.useState)(!1),[g,m]=(0,l.useState)(null),h=(0,l.useRef)(0),p=(0,l.useRef)(!1),b=(0,l.useRef)([]),y=null!==(n=e.byKey)&&void 0!==n?n:e=>String(e.id),v=(0,l.useRef)(0),j=(0,l.useCallback)(async(t,n)=>{let l=++h.current;0===t?o(!0):f(!0),m(null);try{var r;let s=await e.fetchPage(t,a);if(l!==h.current)return;v.current=null!==(r=s.nextOffset)&&void 0!==r?r:t+s.items.length,n&&0===s.items.length?u(e=>Math.min(e,b.current.length)):u(s.total),i(e=>{if(!n)return s.items;let t=new Set(e.map(y));return[...e,...s.items.filter(e=>!t.has(y(e)))]})}catch(e){if(l!==h.current)return;m(e instanceof Error?e.message:"加载失败")}finally{l===h.current&&(o(!1),f(!1),p.current=!1)}},[e.fetchPage,a]);(0,l.useEffect)(()=>{p.current=!0,j(0,!1)},[j,...null!==(r=e.deps)&&void 0!==r?r:[]]),(0,l.useEffect)(()=>{b.current=s},[s]);let N=(0,l.useCallback)(()=>{!p.current&&(b.current.length>=c||(p.current=!0,j(v.current,!0)))},[j,c]),w=(0,l.useCallback)(()=>{p.current=!0,v.current=0,j(0,!1)},[j]);return{items:s,total:c,loading:d,loadingMore:x,exhausted:!d&&s.length>=c,error:g,loadMore:N,refresh:w}}},82182:function(e,t,n){n.d(t,{H7:function(){return d},jr:function(){return s},mn:function(){return u},nk:function(){return c},qd:function(){return i}});let l=null,r=new Set;function a(){r.forEach(e=>e())}function s(e){l=e,a()}function i(){l&&(l=null,a())}function c(){return l}function u(e){return r.add(e),()=>r.delete(e)}function d(e){if(!e)return null;try{var t,n,l,r,a;let s=e.split(".")[1],i=JSON.parse(decodeURIComponent(escape(atob(s.replace(/-/g,"+").replace(/_/g,"/"))))),c=null!==(a=null!==(r=null!==(l=null==i?void 0:null===(t=i.data)||void 0===t?void 0:t._id)&&void 0!==l?l:null==i?void 0:null===(n=i.data)||void 0===n?void 0:n.id)&&void 0!==r?r:null==i?void 0:i.sub)&&void 0!==a?a:null;return"number"==typeof c?c:null}catch(e){return null}}},84704:function(e,t,n){n.d(t,{mS:function(){return r}});let l={linkedin:{label:"in",fg:"#0a66c2"},builtin:{label:"bi",fg:"#5c2d91"},lagou:{label:"拉",fg:"#00b38a"},zhaopin:{label:"智",fg:"#ff7f00"},"51job":{label:"前",fg:"#ff6000"},liepin:{label:"猎",fg:"#008ccb"},boss:{label:"B",fg:"#00bebd"}};function r(e){var t;return null!==(t=l[e.replace(/^www\./,"").split(".")[0].toLowerCase()])&&void 0!==t?t:{label:e.slice(0,1).toUpperCase(),fg:"var(--brand)"}}}}]);
|