1import{b as j}from"./B1ANI7s_.js";import{d as x}from"./DpSUvzOu.js";import{g as M}from"./dQh_cajN.js";import{d as s}from"./B9BvQYN_.js";import{_ as E}from"./DlAUqK2U.js";import{a as g}from"./CrfJppij.js";import{V as H}from"./6nf4KObW.js";import{r as l,B as K,g as S,o as W,c as q,b as c,w as v,a as y,H as a,ae as N,aj as A,G as D,n as L}from"./C--HIF4D.js";import"./COzyvX5r.js";const O=["innerHTML"],z="width: 200px;",F={__name:"WariaiRatioTimes",props:{params:Object},emits:["answer"],setup(T,{expose:V,emit:R}){const m=T,r=l(""),t=l(""),n=l(""),u=l(""),d=l(null),h=K(()=>`${r.value}${n.value}ã¯${u.value}${n.value}ã®ä½åï¼`),k=[e=>!!e||"å
¥ãã¦ï¼"],b=async()=>{r.value="",t.value="",n.value="",u.value="",C(),await L(()=>d.value.focus())},C=()=>{n.value=x.unit[Math.floor(Math.random()*x.unit.length)];const e=()=>{for(let w=0;w<1e4;w++){const f=M.randomNumComfortable(m.params.factor_array,m.params.moto_min,m.params.moto_max),p=M.randomNum(1,99,0)/100;if(f*p==Math.round(f*p))return[f,p]}},[o,i]=e();u.value=o,r.value=Math.round(o*i)},$=()=>{const e=Math.round(r.value/u.value*100)/100,o=e==t.value;return{question:h.value,true_answer:e,your_answer:t.value,is_correct:o,kuraberu:r.value,moto:u.value,unit:n.value}},_=R,B=e=>{if(e.key=="Enter"&&t.value)return _("answer")};V({start:b,checkAnswer:$,onTouchPanelPress:e=>{t.value===null&&(t.value=""),e=="C"?t.value="":e==="answer"?_("answer"):t.value+=e,d.value.focus()}});const P=j();return S(()=>b()),(e,o)=>(W(),q("div",null,[c(g,{class:"text-h4 mb-2 text-center"},{default:v(()=>[y("span",{innerHTML:a(h),class:N(["font-weight-bold",{"text-h3":!a(s).isMobile(),"text-h5":a(s).isMobile()}])},null,10,O)]),_:1}),c(g,null,{default:v(()=>[c(H,{class:"justify-center pb-6 mb-2"},{default:v(()=>[y("div",{style:z},[c(A,{ref_key:"answerRef",ref:d,onKeydown:B,modelValue:a(t),"onUpdate:modelValue":o[0]||(o[0]=i=>D(t)?t.value=i:null),label:"çã",class:N(["text-h3 answer",{"text-h3":!a(s).isMobile(),"text-h5":a(s).isMobile()}]),height:a(s).isMobile()?60:100,"hide-spin-buttons":"",variant:"outlined",readonly:a(s).isMobileOrTablet()&&!a(P).isEnableKeyboard,rules:k},null,8,["modelValue","class","height","readonly"])])]),_:1})]),_:1})]))}},ae=E(F,[["__scopeId","data-v-e0bc4e0b"]]);export{ae as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.