PageSourceSearch

https://tomeight.com/_nuxt/tomeight-timer.VOTj1tFx.js

js tomeight.com collected 2026-10-04 13:30:21 UTC 10,232 bytes, 1 lines download raw bytes

1import{f as D,k as x,o as s,c as l,a as t,t as z,h as e,p as ee,e as te,_ as j,b as M,w as Q,d as T,z as h,m as W,G as _e,F as q,i as O,H as oe,l as _,n as ye,A as E,v as Z,y as be,I as fe,q as ne,J as ge}from"./entry.3-HIeTSr.js";import{_ as se}from"./RangeInput.vue.zG-jGj3c.js";import{_ as Ce}from"./CheckboxOption.mjIZHW7c.js";import{u as X}from"./index.zxNNnXJl.js";import{z as he,a as xe,u as ke}from"./zundamon-notice.VnfEcKCy.js";import{u as Se}from"./tomeight.BpD2cz_8.js";import"./vue.f36acd1f.YLkSvQFl.js";const le=b=>(ee("data-v-9f7f962c"),b=b(),te(),b),Ve={class:"timer-display-root"},Ie=["textContent"],$e=le(()=>t("span",{class:"unit"},"分",-1)),Ae=["textContent"],Te=le(()=>t("span",{class:"unit"},"秒",-1)),Ee=D({__name:"TimerDisplay",props:{millSeconds:{type:Number,required:!0}},setup(b){const f=b,a=x(()=>Math.floor(f.millSeconds/1e3)),i=x(()=>String(a.value%60).padStart(2,"0")),y=x(()=>String(Math.floor(a.value/60)).padStart(2,"0"));return(u,c)=>(s(),l("div",Ve,[t("span",{class:"digits",textContent:z(e(y))},null,8,Ie),$e,t("span",{class:"digits",textContent:z(e(i))},null,8,Ae),Te]))}}),Ne=j(Ee,[["__scopeId","data-v-9f7f962c"]]),Me={class:"tomeight-timer-settings-root"},Ue=["value"],we={class:"volume-settings"},Be={id:"volumes"},qe=["value"],Oe=D({__name:"TomeightTimerSettings",props:{isAutoStartNextCycleEnabled:{type:Boolean,required:!0},isItsTimeAudioEnabled:{type:Boolean,required:!0},isNoticeAudioEnabled:{type:Boolean,required:!0},noticeBeforeSeconds:{type:Number,required:!0},audioVolume:{type:Number,required:!0}},emits:["update:is-auto-start-next-cycle-enabled","update:is-its-time-audio-enabled","update:is-notice-audio-enabled","update:notice-before-seconds","update:audio-volume","audio-volume-change","audio-test"],setup(b,{emit:f}){const a=b,i=f,y=x({get:()=>a.isAutoStartNextCycleEnabled,set:d=>i("update:is-auto-start-next-cycle-enabled",d)}),u=x({get:()=>a.isItsTimeAudioEnabled,set:d=>i("update:is-its-time-audio-enabled",d)}),c=x({get:()=>a.isNoticeAudioEnabled,set:d=>i("update:is-notice-audio-enabled",d)}),m=x({get:()=>a.noticeBeforeSeconds,set:d=>i("update:notice-before-seconds",d)}),v=x({get:()=>a.audioVolume,set:d=>i("update:audio-volume",d)}),U=d=>{i("audio-volume-change",d)},w=d=>{i("audio-test",d)};return(d,g)=>{const $=Ce,N=se;return s(),l("div",Me,[M($,{modelValue:e(y),"onUpdate:modelValue":g[0]||(g[0]=r=>h(y)?y.value=r:null)},{default:Q(()=>[T("次のサイクルに自動的に進む")]),_:1},8,["modelValue"]),M($,{modelValue:e(u),"onUpdate:modelValue":g[1]||(g[1]=r=>h(u)?u.value=r:null)},{default:Q(()=>[T("サイクル終了を音声で案内する")]),_:1},8,["modelValue"]),M($,{modelValue:e(c),"onUpdate:modelValue":g[2]||(g[2]=r=>h(c)?c.value=r:null)},{default:Q(()=>[T("サイクル終了予告を音声で案内する")]),_:1},8,["modelValue"]),t("label",null,[T(" 終了前に予告 "),W(t("select",{class:"notice-seconds","onUpdate:modelValue":g[3]||(g[3]=r=>h(m)?m.value=r:null)},[(s(),l(q,null,O(51,r=>t("option",{value:r+9},z(r+9)+"秒前",9,Ue)),64))],512),[[_e,e(m)]])]),t("label",we,[T(" 音量"),M(N,{modelValue:e(v),"onUpdate:modelValue":g[4]||(g[4]=r=>h(v)?v.value=r:null),min:0,max:1,step:.01,onInput:U,list:"volumes"},null,8,["modelValue"]),t("datalist",Be,[(s(),l(q,null,O(5,r=>t("option",{value:(r-1)*25},null,8,qe)),64))])]),t("div",null,[t("button",{class:"button",onClick:w}," 音声案内のテスト ")])])}}}),ze=j(Oe,[["__scopeId","data-v-baf122d1"]]),Y=b=>(ee("data-v-88dfeed0"),b=b(),te(),b),De={class:"tomato-timer-cycler-root"},Fe={key:0,class:"cycle-items"},Re={class:"molecule"},Ge=["onClick"],Pe=["textContent"],We=["textContent"],je={key:1,class:"editor-section"},He={class:"editor-grid"},Je=Y(()=>t("div",null,"作業",-1)),Le=Y(()=>t("div",null,"休憩",-1)),Ke=Y(()=>t("div",null,null,-1)),Qe={class:"input-item"},Xe=["value","onChange"],Ye={class:"input-item"},Ze=["value","onChange"],et=["onClick"],tt={class:"input-item new-item-line"},ot={class:"input-item new-item-line"},nt={class:"button-area"},st=D({__name:"TimerCycler",props:{cycle:{type:Array,required:!0},current:{type:Object,required:!0}},emits:["select","cycle-updated","cycle-editor-opened","cycle-editor-closed"],setup(b,{emit:f}){const a=k=>{switch(k){case"work":return"作業";case"break":return"休憩"}},i=b,y=f,u=oe(),c=k=>{y("select",k)},m=_([]),v=_(!1),U=()=>{m.value=i.cycle,v.value=!0,y("cycle-editor-opened")},w=()=>{v.value=!1,y("cycle-editor-closed")},d=k=>`${k/60}分`,g=k=>I=>{I.target!==null&&(k.seconds=parseInt(I.target.value)*60)},$=_(25),N=_(5),r=()=>
1{m.value.push([{id:String(u()),seconds:$.value*60,type:"work"},{id:String(u()),seconds:N.value*60,type:"break"}])},H=()=>{y("cycle-updated",m.value),w()},B=k=>{m.value=m.value.filter(([I,C])=>I.id!==k)},J=x(()=>m.value.length>1);return(k,I)=>(s(),l("div",De,[e(v)?E("",!0):(s(),l("ol",Fe,[(s(!0),l(q,null,O(i.cycle,C=>(s(),l("li",null,[t("ol",Re,[(s(!0),l(q,null,O(C,S=>(s(),l("li",{onClick:A=>c(S)},[t("div",{class:ye(["cycle-item",{current:S.id===i.current.id}])},[t("p",{textContent:z(d(S.seconds))},null,8,Pe),t("p",{textContent:z(a(S.type))},null,8,We)],2)],8,Ge))),256))])]))),256))])),e(v)?(s(),l("section",je,[t("div",He,[Je,Le,Ke,(s(!0),l(q,null,O(e(m),([C,S])=>(s(),l(q,null,[t("div",Qe,[t("input",{type:"number",class:"input",value:C.seconds/60,onChange:A=>g(C)(A)},null,40,Xe),T("分 ")]),t("div",Ye,[t("input",{type:"number",class:"input",value:S.seconds/60,onChange:A=>g(S)(A)},null,40,Ze),T("分 ")]),t("div",null,[e(J)?(s(),l("button",{key:0,class:"button danger-color",onClick:A=>B(C.id)}," 削除 ",8,et)):E("",!0)])],64))),256)),t("div",tt,[W(t("input",{type:"number",class:"input","onUpdate:modelValue":I[0]||(I[0]=C=>h($)?$.value=C:null)},null,512),[[Z,e($),void 0,{number:!0}]]),T("分 ")]),t("div",ot,[W(t("input",{type:"number",class:"input","onUpdate:modelValue":I[1]||(I[1]=C=>h(N)?N.value=C:null)},null,512),[[Z,e(N),void 0,{number:!0}]]),T("分 ")]),t("div",{class:"new-item-line"},[t("button",{class:"button",onClick:r},"追加")])])])):E("",!0),t("div",nt,[e(v)?(s(),l("button",{key:0,class:"button",onClick:w}," キャンセル ")):E("",!0),e(v)?(s(),l("button",{key:1,class:"button positive-color",onClick:H}," 確定 ")):E("",!0),e(v)?E("",!0):(s(),l("button",{key:2,class:"button",onClick:U}," サイクル編集 "))])]))}}),lt=j(st,[["__scopeId","data-v-88dfeed0"]]),ut={class:"progressbar-area"},at={class:"controllers"},it=["disabled"],ct={class:"center-bottom"},dt={class:"button"},rt={key:1,class:"hint"},pt={key:2,class:"settings"},mt=D({__name:"TomeightTimer",setup(b){const f=_(null),a=_(null);be(()=>{f.value=new Audio(he),f.value.volume=.5,a.value=new Audio(xe),a.value.volume=.5});const i=oe(),y=_([[1500,300],[1500,300],[1500,300],[1500,1800]].map(([n,o])=>[{id:String(i()),seconds:n,type:"work"},{id:String(i()),seconds:o,type:"break"}])),u=_(0),c=_(y.value[0][0]),m=n=>{V.pause(),c.value=n,u.value=n.seconds*1e3},v=x(()=>y.value.flat()),U=n=>v.value.flat().find(o=>o.id===n)||null,w=()=>v.value.findIndex(n=>n.id===c.value.id),d=()=>{const n=w();return n+1===v.value.length?v.value[0]:v.value[n+1]},g=()=>{f.value!==null&&f.value.play(),$(),G.value&&V.start()},$=()=>{m(d()),C.value=!1},N=n=>{U(n.id)!==null&&m(n)},r=()=>{f.value!==null&&f.value.play()},H=n=>{y.value=n;const o=U(c.value.id);m(o===null?y.value[0][0]:o)},B=_(!1),J=()=>{B.value=!0,V.pause()},k=()=>{B.value=!1},I=n=>{f.value!==null&&(f.value.volume=n),a.value!==null&&(a.value.volume=n)},C=_(!1),S=_(!0),A=_(30),ue=()=>{V.pause(),u.value=c.value.seconds*1e3},F=x({get:()=>c.value.seconds-u.value/1e3,set:n=>{u.value=(c.value.seconds-n)*1e3}}),V=ke(n=>{if(u.value-=n,u.value<=0){X({title:"00:00 トメイトタイマー | トメイト"}),ce(),g();return}X({title:`${ie.value}:${ae.value} トメイトタイマー | トメイト`}),S.value&&!C.value&&u.value/1e3<A.value&&(C.value=!0,a.value!==null&&a.value.play())},250),L=x(()=>u.value/1e3%60),ae=x(()=>L.value<=0?"00":String(Math.floor(L.value)).padStart(2,"0")),ie=x(()=>String((u.value/1e3-L.value)/60).padStart(2,"0")),ce=()=>{V.pause(),u.value=0},de=()=>{V.pause(),u.value=(c.value.seconds-F.value)*1e3};fe(()=>{V.pause()});const R=_(!1),G=_(!1),K=_(!0),P=_(.5);return m(c.value),ue(),(n,o)=>{const re=Ne,pe=se,me=ze,ve=lt;return s(),l("div",null,[e(c)!==null?(s(),ne(re,{key:0,"mill-seconds":e(u)},null,8,["mill-seconds"])):E("",!0),t("div",ut,[M(pe,{class:"progress-input",modelValue:e(F),"onUpdate:modelValue":o[0]||(o[0]=p=>h(F)?F.value=p:null),min:0,max:e(c).seconds,step:1,onInput:de},null,8,["modelValue","max"])]),t("div",at,[e(V).isWorking.value?(s(),l("button",{key:0,class:"button danger-color large",onClick:o[1]||(o[1]=(...p)=>e(V).pause&&e(V).pause(...p))}," 一時停止 ")):(s(),l("button",{key:1,class:"button positive-color large",onClick:o[2]||(o[2]=(...p)=>e(V).start&&e(V).start(...p)),disabled:e(B)}
1," 開始 ",8,it)),t("div",ct,[t("label",dt,[W(t("input",{type:"checkbox",class:"checkbox","onUpdate:modelValue":o[3]||(o[3]=p=>h(R)?R.value=p:null)},null,512),[[ge,e(R)]]),T(" 設定 ")])])]),e(B)?(s(),l("p",rt," 開始するにはサイクル編集を完了してください。 ")):E("",!0),e(R)?(s(),l("section",pt,[M(me,{"is-auto-start-next-cycle-enabled":e(G),"onUpdate:isAutoStartNextCycleEnabled":o[4]||(o[4]=p=>h(G)?G.value=p:null),"is-its-time-audio-enabled":e(K),"onUpdate:isItsTimeAudioEnabled":o[5]||(o[5]=p=>h(K)?K.value=p:null),"is-notice-audio-enabled":e(S),"onUpdate:isNoticeAudioEnabled":o[6]||(o[6]=p=>h(S)?S.value=p:null),"notice-before-seconds":e(A),"onUpdate:noticeBeforeSeconds":o[7]||(o[7]=p=>h(A)?A.value=p:null),"audio-volume":e(P),"onUpdate:audioVolume":o[8]||(o[8]=p=>h(P)?P.value=p:null),onAudioTest:r,onAudioVolumeChange:o[9]||(o[9]=p=>I(e(P)))},null,8,["is-auto-start-next-cycle-enabled","is-its-time-audio-enabled","is-notice-audio-enabled","notice-before-seconds","audio-volume"])])):E("",!0),M(ve,{cycle:e(y),current:e(c),onSelect:N,onCycleUpdated:H,onCycleEditorOpened:J,onCycleEditorClosed:k},null,8,["cycle","current"])])}}}),vt=j(mt,[["__scopeId","data-v-bf0c216d"]]),kt=D({__name:"tomeight-timer",setup(b){return X({title:Se().titlePage("トメイトタイマー")}),(f,a)=>{const i=vt;return s(),ne(i,{class:"container main"})}}});export{kt 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.