import{k as G,j as s,t as H,m as f,n as k,p as t,f as C,i as E,v as O,A as u,w as X,x as B,s as J,S as z}from"./web.Os7kOAdY.js";import{g as A,t as K}from"./i18n-runtime._BAkvU05.js";var Q=u("<p style=color:#e53e3e;font-size:14px>"),U=u('<div style="border:1px solid var(--border);border-radius:8px;padding:20px"><div style=display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px><div><p style=margin:0;font-size:12px;color:var(--text-2)></p><p style="margin:4px 0 0;font-size:18px;font-weight:bold;font-family:monospace"></p></div><div><p style=margin:0;font-size:12px;color:var(--text-2)></p><p style="margin:4px 0 0;font-size:18px;font-weight:bold"></p></div><div><p style=margin:0;font-size:12px;color:var(--text-2)></p><p style="margin:4px 0 0;font-size:18px;font-weight:bold">'),V=u("<div class=tool-container><div style=display:flex;gap:12px;margin-bottom:16px;flex-wrap:wrap;align-items:center><input class=tool-input maxlength=11 style=flex:1;min-width:200px><button class=tool-btn></button></div><!$><!/><!$><!/><p style=font-size:12px;color:var(--text-2);margin-top:16px>");const W=[{range:[130,132],carrier:"中国联通"},{range:[133,133],carrier:"中国电信"},{range:[134,139],carrier:"中国移动"},{range:[145,145],carrier:"中国联通"},{range:[147,147],carrier:"中国移动"},{range:[149,149],carrier:"中国电信"},{range:[150,152],carrier:"中国移动"},{range:[153,153],carrier:"中国电信"},{range:[155,156],carrier:"中国联通"},{range:[157,159],carrier:"中国移动"},{range:[165,165],carrier:"中国移动"},{range:[166,166],carrier:"中国联通"},{range:[170,171],carrier:"虚拟运营商"},{range:[172,172],carrier:"中国移动"},{range:[173,173],carrier:"中国电信"},{range:[175,176],carrier:"中国联通"},{range:[177,177],carrier:"中国电信"},{range:[178,178],carrier:"中国移动"},{range:[180,181],carrier:"中国电信"},{range:[182,184],carrier:"中国移动"},{range:[185,186],carrier:"中国联通"},{range:[187,188],carrier:"中国移动"},{range:[189,189],carrier:"中国电信"},{range:[190,190],carrier:"中国移动"},{range:[191,191],carrier:"中国电信"},{range:[192,192],carrier:"中国广电"},{range:[193,193],carrier:"中国电信"},{range:[195,195],carrier:"中国移动"},{range:[196,196],carrier:"中国联通"},{range:[197,198],carrier:"中国移动"},{range:[199,199],carrier:"中国电信"}],Y={"0010":"北京","0011":"北京","0020":"上海","0021":"上海","0510":"广州","0511":"广州","0520":"深圳","0521":"深圳","0300":"天津","0301":"天津","0710":"武汉","0711":"武汉","0280":"成都","0281":"成都","0250":"南京","0251":"南京","0571":"杭州","0570":"杭州","0531":"济南","0530":"济南","0230":"哈尔滨","0231":"哈尔滨","0240":"沈阳","0241":"沈阳","0431":"长春","0430":"长春","0731":"长沙","0730":"长沙","0290":"西安","0291":"西安","0351":"太原","0350":"太原","0371":"郑州","0370":"郑州","0551":"合肥","0550":"合肥","0591":"福州","0590":"福州","0791":"南昌","0790":"南昌","0871":"昆明","0870":"昆明","0851":"贵阳","0850":"贵阳","0771":"南宁","0770":"南宁","0311":"石家庄","0310":"石家庄"};function re(){const[L,$]=s(A(),{equals:!1}),i=e=>K(e,L());H(()=>{const e=a=>{const r=a.detail?.locale;r&&$(r)};window.addEventListener("taitan:locale-change",e),$(A()),J(()=>window.removeEventListener("taitan:locale-change",e))});const[c,P]=s(""),[g,p]=s(null),[m,d]=s("");function _(){const e=c().replace(/\D/g,"");if(e.length<7){d("请输入至少7位手机号码"),p(null);return}const a=parseInt(e.substring(0,3));let r="";for(const l of W)if(a>=l.range[0]&&a<=l.range[1]){r=l.carrier;break}if(!r){d("未识别的号段，请检查号码"),p(null);return}const o=e.substring(3,7),x=Y[o]||"全国";d(""),p({carrier:r,region:x})}return(()=>{var e=f(V),a=e.firstChild,r=a.firstChild,o=r.nextSibling,x=a.nextSibling,[l,R]=k(x.nextSibling),D=l.nextSibling,[v,I]=k(D.nextSibling),M=v.nextSibling;return r.$$keydown=n=>n.key==="Enter"&&_(),r.$$input=n=>P(n.currentTarget.value),o.$$click=_,t(o,()=>i("查询")),t(e,C(z,{get when(){return m()},get children(){var n=f(Q);return t(n,m),n}}),l,R),t(e,C(z,{get when(){return g()},get children(){var n=f(U),N=n.firstChild,b=N.firstChild,h=b.firstChild,T=h.nextSibling,y=b.nextSibling,w=y.firstChild,j=w.nextSibling,q=y.nextSibling,S=q.firstChild,F=S.nextSibling;return t(h,()=>i("手机号码")),t(T,()=>c().replace(/\D/g,"").replace(/(\d{3})(\d{4})(\d{0,4})/,"$1 $2 $3").trim()),t(w,()=>i("运营商")),t(j,()=>g().carrier),t(S,()=>i("归属地")),t(F,()=>g().region),n}}),v,I),t(M,()=>i("基于号段规则离线判断，仅供参考。支持中国大陆手机号码（130-199号段）。")),E(()=>X(r,"placeholder",i("输入手机号码（至少7位）"))),E(()=>B(r,"value",c())),O(),e})()}G(["input","keydown","click"]);export{re as default};
