import{_,a as p,b as m,c as u}from"./15.js";import{o as v,c as g,a as s,n as d,t as n,e as r,d as w,p as y,g as T,_ as S}from"./index.js";const c=t=>(y("data-v-b9b0c003"),t=t(),T(),t),f={class:"iface-centered"},b=c(()=>s("img",{class:"glass",src:_},null,-1)),M={class:"watch-slides__item watch-main"},P=c(()=>s("img",{class:"logo",src:p},null,-1)),x={class:"time"},Y={class:"time-value"},G={class:"time-value"},k={class:"text"},I=c(()=>s("br",null,null,-1)),E={class:"watch-slides__item watch-stats"},D={class:"watch-stats__date"},H={class:"date"},C={class:"time"},B={class:"watch-stats__list"},N={class:"watch-stats__list-item"},O=c(()=>s("div",{class:"text"},"Время в игре за час",-1)),U={class:"value"},z={class:"watch-stats__list-item"},A=c(()=>s("div",{class:"text"},"Время в игре за сегодня",-1)),L={class:"value"},V={class:"watch-stats__list-item"},W=c(()=>s("div",{class:"text"},"Время в игре за вчера",-1)),X={class:"value"};function j(t,e,h,l,o,i){return v(),g("div",f,[s("div",{class:d(["watch",{watch_mobile:i.isMobile}]),style:w({backgroundImage:i.watchTypeStyle})},[s("div",{class:"watch-content",ref:"content",onTouchstart:e[2]||(e[2]=(...a)=>i.onTouchStart&&i.onTouchStart(...a)),onTouchmove:e[3]||(e[3]=(...a)=>i.onTouchMove&&i.onTouchMove(...a)),onTouchend:e[4]||(e[4]=(...a)=>i.onTouchEnd&&i.onTouchEnd(...a))},[b,s("div",{class:d(["watch-slides",`slide_${o.slide}`,{swiping:o.isSwiping}])},[s("div",M,[s("div",{class:"watch-slides__item-overlay overlay",onMousedown:e[0]||(e[0]=(...a)=>i.onMouseDown&&i.onMouseDown(...a)),onMouseup:e[1]||(e[1]=(...a)=>i.onMouseUp&&i.onMouseUp(...a))},null,32),P,s("div",x,[s("div",Y,n(o.time.split(":")[0]),1),s("div",G,n(o.time.split(":")[1]),1)]),s("div",k,[r("Свайпните снизу вверх"),I,r(" "+n(i.isMobile?"":"при помощи ALT"),1)])]),s("div",E,[s("div",D,[s("div",H,n(o.date),1),s("div",C,n(o.time),1)]),s("div",B,[s("div",N,[O,s("div",U,n(o.hoursGameTime),1)]),s("div",z,[A,s("div",L,n(o.dayGameTime),1)]),s("div",V,[W,s("div",X,n(o.yesterdayGameTime),1)])])])],2)],544)],6)])}const q={props:["openParams"],data(){return{backgroundTypes:Object.assign({"/src/assets/images/watch/types/0.svg":m,"/src/assets/images/watch/types/1.svg":u}),MONTHES:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],type:0,slide:0,time:"20:19",date:"11 ноября",isSwiping:!1,swipingStartY:null,pos:0,prevPos:0,hoursGameTime:"23 мин",dayGameTime:"4 ч 23 мин",yesterdayGameTime:"4 ч 20 мин"}},computed:{watchTypeStyle(){return"url("+this.backgroundTypes[`/src/assets/images/watch/types/${this.type}.svg`]+")"},slideOffset(){return this.slide==0?-(this.prevPos-this.pos)+"px":`-${parseInt(getComputedStyle(this.$refs.content).heightPX)}px`},isMobile(){return this.$root.isMobile}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.type=this.openParams[0],this.hoursGameTime=this.openParams[1],this.dayGameTime=this.openParams[2],this.yesterdayGameTime=this.openParams[3],this.time=this.openParams[4],this.date=this.openParams[5]),document.addEventListener("keydown",t=>{t.keyCode==18&&(this.slide==0?this.swipe(1):this.swipe(0))})},methods:{onMouseDown(t){this.prevPos=t.screenY,this.pos=t.screenY},onMouseUp(t){const e=t.screenY;e<this.pos&&console.log(e,this.pos),this.prevPos=0,this.pos=0,this.swipe(this.slide)},onTouchStart(t){this.swipingStartY=t.touches[0].clientY},onTouchMove(t){this.isSwiping=!0;const h=parseInt(getComputedStyle(this.$refs.content).heightPX)/6,l=t.touches[0].clientY;this.swipingStartY&&(l-h>=this.swipingStartY?this.slide=0:l+h<=this.swipingStartY&&(this.slide=1))},onTouchEnd(){this.swipingStartY=null,this.isSwiping=!1},swipe(t){this.isSwiping||(this.slide=t,this.isSwiping=!0,setTimeout(()=>{this.isSwiping=!1},500))}}},K=S(q,[["render",j],["__scopeId","data-v-b9b0c003"]]);export{K as default};
