import{r as e}from"./norm-f7iXVy-b.js";import{n as t,r as n,t as r}from"./salaryText-DlREJ1k0.js";var i=e=>{let t=String(e||``),n=2166136261;for(let e=0;e<t.length;e++)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return(n>>>0).toString(16)},a=e=>{let t=String(e||``).trim().toLowerCase();return t?t.includes(`zhipin.com`)?`zhipin`:t.includes(`liepin.com`)?`liepin`:t.includes(`zhaopin.com`)?`zhaopin`:t.includes(`51job.com`)?`51job`:t.includes(`lagou.com`)?`lagou`:`import`:`import`},o=o=>{let s=e(o.title),c=e(o.company),l=e(o.location),u=e(t(o.salaryText)),d=e(o.experience),f=e(o.education),p=e(o.jd),m=(e=>{let t=String(e||``).trim();return t?/^https?:\/\//i.test(t)?t:/^\/\//.test(t)?`https:${t}`:/^www\./i.test(t)?`https://${t}`:``:``})(e(o.url)),h=a(m),g=`import_${i([h,s,c,l,u,m,p.slice(0,240)].join(`|`)).slice(0,14)}`,_=n(u),v=t(u),y=r(u),b=(()=>{if(!v||v===`面议`)return{min:0,max:0};let e=v.match(/(\d+(?:\.\d+)?)-(\d+(?:\.\d+)?)(K|万)/);if(e){let t=Number(e[1]),n=Number(e[2]),r=e[3]===`万`?10:1;if(!Number.isFinite(t)||!Number.isFinite(n))return{min:0,max:0};let i=Math.min(t,n)*r,a=Math.max(t,n)*r;return y&&(i/=12,a/=12),{min:i,max:a}}let t=v.match(/(\d+(?:\.\d+)?)(K|万)/);if(t){let e=Number(t[1]),n=t[2]===`万`?10:1;if(!Number.isFinite(e))return{min:0,max:0};let r=e*n;return y&&(r/=12),{min:r,max:r}}return{min:0,max:0}})(),x=b.min,S=b.max;return{id:g,title:s,company:c,location:l,experience:d||void 0,education:f||void 0,salary:{min:x>0?Math.round(x*10)/10:0,max:S>0?Math.round(S*10)/10:0,currency:`CNY`,text:u||void 0,unit:`month`,months:_||void 0},description:p||void 0,url:m||`manual://${g}`,detail_url:m||void 0,platform:h,tags:[],created_at:Date.now()}};export{o as t};