import{k as S,j as r,t as L,h as g,m as F,p as a,q as M,i as $,v as T,A as k,x,s as q}from"./web.Os7kOAdY.js";import{g as _,t as B}from"./i18n-runtime._BAkvU05.js";var H=k("<div class=panel style=display:flex;flex-direction:column;gap:14px><div class=tool-grid-2><div class=tool-field><span class=tool-label></span><input class=tool-input type=number></div><div class=tool-field><span class=tool-label></span><input class=tool-input type=number></div></div><pre class=tool-pre style=font-size:18px;text-align:center></pre><p class=tool-hint>");function A(){const[b,o]=r(_(),{equals:!1}),s=e=>B(e,b());L(()=>{const e=t=>{const l=t.detail?.locale;l&&o(l)};window.addEventListener("taitan:locale-change",e),o(_()),q(()=>window.removeEventListener("taitan:locale-change",e))});const[c,h]=r("170"),[u,y]=r("65"),i=g(()=>{const e=parseFloat(c()),t=parseFloat(u());if(!e||!t||e<=0||t<=0)return null;const l=e/100;return t/(l*l)}),w=g(()=>{const e=i();return e==null?"":e<18.5?"偏瘦":e<24?"正常":e<28?"偏胖":"肥胖"});return(()=>{var e=F(H),t=e.firstChild,l=t.firstChild,p=l.firstChild,d=p.nextSibling,C=l.nextSibling,v=C.firstChild,f=v.nextSibling,m=t.nextSibling,E=m.nextSibling;return a(p,()=>s("身高（cm）")),d.$$input=n=>h(n.currentTarget.value),a(v,()=>s("体重（kg）")),f.$$input=n=>y(n.currentTarget.value),a(m,(()=>{var n=M(()=>i()==null);return()=>n()?"请输入身高与体重":`BMI ${i().toFixed(1)}  →  ${w()}`})()),a(E,()=>s("参考标准（中国成年人）：偏瘦 &lt;18.5 / 正常 18.5–24 / 偏胖 24–28 / 肥胖 ≥28。")),$(()=>x(d,"value",c())),$(()=>x(f,"value",u())),T(),e})()}S(["input"]);export{A as default};
