diff --git a/server/dist/js/app.85fd0a94.js b/server/dist/js/app.85fd0a94.js index f63cbb5..c71f104 100644 --- a/server/dist/js/app.85fd0a94.js +++ b/server/dist/js/app.85fd0a94.js @@ -1,2 +1,2 @@ -(function(t){function e(e){for(var o,r,i=e[0],c=e[1],l=e[2],d=0,h=[];d3?(t.intervalCounter=0,t.contentSuffix=""):t.contentSuffix=t.contentSuffix+"."}),666)}},watch:{status:function(){1===this.status?(this.ripple=!1,this.isLoading(),this.$set(this.maskClass,1,""),this.maskStyle["background-color"]="rgba(22,22,22,0.3)",this.maskFontStyle["margin-top"]="0"):2===this.status&&(this.isLoading(),this.maskStyle["background-color"]="rgba(22,22,22,0.0)",this.maskStyle.transition="background-color 0.5s ease-in",this.maskFontStyle["margin-top"]="-400px")}},mounted:function(){this.maskContent=this.content}},Zt=Qt,te=(n("7fd8"),n("3dfe")),ee=n.n(te),ne=n("a048"),oe=Object(h["a"])(Zt,Xt,Yt,!1,null,"0845749d",null),se=oe.exports;ee()(oe,{Ripple:ne["a"]});var ae={name:"Radar",components:{CommonMask:se},data:function(){return{RadarChart:null,dom:null,scaning:!1,maskStatus:0}},computed:Object(E["a"])({},Object(I["d"])(["wsResponse"])),methods:Object(E["a"])({handleWindowResize:function(){this.dom.style.height=this.dom.offsetWidth+"px",this.mask.style.height=this.$refs.wrapper.offsetHeight+"px",this.RadarChart.resize()},handleMaskClick:function(){this.scaning||(this.maskStatus=1,this.scaning=!0,this.changeWsContent("scan"))},drawChart:function(t){var e=null,n=[];function o(t){return{coordinateSystem:"polar",name:"line",type:"line",lineStyle:{color:"#22ee22"},itemStyle:{color:"black"},data:t}}for(var s in t||(n=[{coordinateSystem:"polar",name:"line",type:"line",data:[[0,0],[0,0]]}]),t){var a=t[s][0],r=t[s][1];n.push(o([[0,r],[a,r]]))}e={polar:{},tooltip:{trigger:"axis",axisPointer:{type:"cross"}},angleAxis:{type:"value",min:15,max:375,startAngle:165,clockwise:!0},radiusAxis:{},series:n},e&&"object"===Object(Gt["a"])(e)&&(this.RadarChart.clear(),this.RadarChart.setOption(e,!0))}},Object(I["b"])(["changeWsContent"])),watch:{wsResponse:function(){if("scanResult"===this.wsResponse.title){this.maskStatus=2,this.scaning=!1,console.log(this.wsResponse);var t=this.wsResponse.data;this.drawChart(t)}}},mounted:function(){this.mask=this.$refs.mask,this.dom=this.$refs.container,this.RadarChart=qt.a.init(this.dom),this.drawChart(),window.addEventListener("resize",this.handleWindowResize),this.handleWindowResize()},distory:function(){window.removeEventListener("resize",this.handleWindowResize)}},re=ae,ie=(n("2c8b"),Object(h["a"])(re,Kt,zt,!1,null,"c2c10634",null)),ce=ie.exports,le=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-expansion-panels",{staticClass:"expansion",attrs:{accordion:"",mandatory:""},model:{value:t.witchOpen,callback:function(e){t.witchOpen=e},expression:"witchOpen"}},[n("v-expansion-panel",[n("v-expansion-panel-header",{scopedSlots:t._u([{key:"default",fn:function(e){var o=e.open;return[n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{attrs:{cols:"4"}},[t._v("Base Control")]),t._l(t.instructContent["Base Control"][0],(function(e){return n("v-col",{key:e,staticClass:"text--secondary",attrs:{cols:"4"}},[n("v-fade-transition",{attrs:{"leave-absolute":""}},[o?n("span",[t._v(" "+t._s(e)+" ")]):t._e()])],1)}))],2)]}}])}),n("v-expansion-panel-content",[n("v-row",{attrs:{"no-gutters":""}},[n("v-spacer"),t._l(t.instructContent["Base Control"][1],(function(e,o){return n("v-col",{key:o,attrs:{cols:"4"}},t._l(e,(function(e,o){return n("div",{key:o},[t._v(" "+t._s(o)+" - "+t._s(e)),n("br")])})),0)}))],2)],1)],1),n("v-expansion-panel",[n("v-expansion-panel-header",[t._v("About Us")]),n("v-expansion-panel-content",{staticStyle:{"text-indent":"2rem"}},[t._v(" "+t._s(t.instructContent["About Us"])+" ")])],1)],1)},ue=[],de={name:"InstructionMod",data:function(){return{cols:1,witchOpen:0,instructContent:{"Base Control":[["Move Control","Arm Control"],[{W:"move forward",A:"turn left",S:"move backward",D:"turn right"},{I:"camera up",J:"head left turn",K:"camera down",L:"head right turn",U:"grab",O:"loose",P:"hand up",";":"hand down",Y:"arm up",H:"arm down"}]],"About Us":"Adeept is a technical service team of open source software and hardware. Dedicated to applying the Internet and the latest industrial technology in open source area, we strive to provide best hardware support and software service for general makers and electronic enthusiasts around the world. We aim to create infinite possibilities with sharing. No matter what field you are in, we can lead you into the electronic world and bring your ideas into reality.","Contact Us":"Have a technical question for Tech Support? support@adeept.com"}}}},he=de,pe=(n("0388"),n("ddd1")),me=n("a305"),fe=n("4f19"),ve=n("95e7"),Ce=n("d10c"),be=n("24c5"),ge=n("c6c4"),we=Object(h["a"])(he,le,ue,!1,null,"175a0aee",null),ke=we.exports;m()(we,{VCol:pe["a"],VExpansionPanel:me["a"],VExpansionPanelContent:fe["a"],VExpansionPanelHeader:ve["a"],VExpansionPanels:Ce["a"],VFadeTransition:be["c"],VRow:ge["a"],VSpacer:C["a"]});var ye=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"ports-wrapper"},[n("ButtonsChild",{attrs:{buttons:t.buttons,cols:t.cols}})],1)},Se=[],xe={name:"ActionsMod",components:{ButtonsChild:it},data:function(){return{buttons:[[!1,"P1","Switch_1_on","","","Switch_1_off"],[!1,"P2","Switch_2_on","","","Switch_2_off"],[!1,"P3","Switch_3_on","","","Switch_3_off"]],cols:3}}},_e=xe,Me=(n("07e2"),Object(h["a"])(_e,ye,Se,!1,null,"522b1d6c",null)),Fe=Me.exports,Oe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"wrapper"},[n("v-text-field",{staticClass:"pwm-inputer",attrs:{label:"PWM",type:"number",maxlength:"2",placeholder:"Num Requier",outlined:"","hide-details":"",dense:"",width:".2rem"},model:{value:t.PWMNum,callback:function(e){t.PWMNum=e},expression:"PWMNum"}}),n("div",{staticClass:"button-wrapper"},t._l(t.buttons,(function(t,e){return n("ControlButton",{key:e,staticClass:"buttons",style:t.style,attrs:{attr:t.attr}})})),1)],1)},Ve=[],We=(n("3e5e"),{name:"ServoInitMod",components:{ControlButton:ot},data:function(){return{PWMNum:0,buttons:[{style:{width:"15%"},attr:{isIcon:!1,content:"<",sendContent:"SiLeft 0"}},{style:{width:"40%"},attr:{isIcon:!1,content:"setPWM",sendContent:"PWMMS 0"}},{style:{width:"15%"},attr:{isIcon:!1,content:">",sendContent:"SiRight 0"}},{style:{width:"14%"},attr:{isIcon:!0,content:"mdi-cog-counterclockwise",sendContent:"PWMD"}}],cols:3}},watch:{PWMNum:function(){var t=this;for(var e in console.log(this.PWMNum),(this.PWMNum<0||this.PWMNum>15)&&(console.log("change"),setTimeout((function(){t.PWMNum=0}),1)),this.buttons){var n=this.buttons[e].attr.sendContent;if("PWMINIT"===n)return;n=n.split(" ")[0]+" "+this.PWMNum,this.buttons[e].attr.sendContent=n}}}}),Ae=We,je=(n("0c8e"),n("2c54")),Ee=Object(h["a"])(Ae,Oe,Ve,!1,null,"fa85e006",null),Ie=Ee.exports;m()(Ee,{VTextField:je["a"]});var Le=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"ports-wrapper"},[n("ButtonsChild",{attrs:{buttons:t.buttons,cols:t.cols}})],1)},Pe=[],Re={name:"ActionsMod",components:{ButtonsChild:it},data:function(){return{buttons:[[!1,"ARM","AR"],"",[!1,"HOME","home"],"",[!1,"PT","PT"]],cols:3}}},Ne=Re,$e=(n("4102"),Object(h["a"])(Ne,Le,Pe,!1,null,"865517e4",null)),Te=$e.exports,Be={name:"ControllArea",components:{ControllerSheet:W,VedioMod:N,StatusMod:K,ArmControlMod:dt,ActionsMod:Ct,MoveControlMod:xt,CVFLMod:Wt,FindColorMod:Ut,RadarScanMod:ce,InstructionMod:ke,PortsControlMod:Fe,ServoInitMod:Ie,HomeMod:Te},data:function(){return{isMx:!1}},watch:{isMx:function(){var t=this.$refs.VedioModDom.$el.parentNode.removeChild(this.$refs.VedioModDom.$el);this.isMx?this.$refs.xsVedioWrapper.appendChild(t):this.$refs.smVedioWrapper.appendChild(t)}},methods:{checkIsMx:function(){this.isMx=window.innerWidth1.5}},mounted:function(){this.checkIsMx(),window.addEventListener("resize",this.checkIsMx)}},He=Be,De=(n("b729"),n("3583")),Ue=Object(h["a"])(He,y,S,!1,null,"2c512172",null),Ke=Ue.exports;m()(Ue,{VCol:pe["a"],VContainer:De["a"],VRow:ge["a"]});var ze={name:"Home",components:{ControllArea:Ke}},Ge=ze,Je=Object(h["a"])(Ge,w,k,!1,null,null,null),qe=Je.exports,Xe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("v-snackbar",{staticClass:"reconnect-tip",attrs:{color:"grey lighten-4 black--text",timeout:0},model:{value:t.reconnectTip,callback:function(e){t.reconnectTip=e},expression:"reconnectTip"}},[t._v(" Connect Failed "),n("v-btn",{attrs:{color:"pink",text:""}},[t._v(" Reconnecting ")]),n("AniLoading"),n("v-overlay",{attrs:{absolute:"",opacity:0}})],1)],1)},Ye=[],Qe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"light",style:t.lightStyle})},Ze=[],tn={name:"AniLoading",data:function(){return{lightStyle:{height:"52px","margin-left":"-10%","transition-duration":"1.3s"},timer:null}},mounted:function(){var t=this;this.lightStyle.height=this.$el.parentNode.offsetHeight+50+"px",this.$el.parentNode.style.position||(this.$el.parentNode.style.position="relative"),this.timer=setInterval((function(){"-10%"===t.lightStyle["margin-left"]?(t.lightStyle["margin-left"]="105%",t.lightStyle["transition-duration"]="1.3s"):(t.lightStyle["margin-left"]="-10%",t.lightStyle["transition-duration"]="0s")}),1300)}},en=tn,nn=(n("de38"),Object(h["a"])(en,Qe,Ze,!1,null,"49c65f16",null)),on=nn.exports,sn={name:"HandleWebsocket",data:function(){return{websock:null,reconnectTip:!1}},components:{AniLoading:on},computed:Object(E["a"])({},Object(I["d"])(["wsContent","setVedioTimmer"])),created:function(){this.initWebSocket()},destroyed:function(){this.websock.close()},methods:Object(E["a"])({initWebSocket:function(){var t="ws://"+location.hostname+":8888";this.websock=new WebSocket(t),this.websock.onmessage=this.websocketonmessage,this.websock.onopen=this.websocketonopen,this.websock.onerror=this.websocketonerror,this.websock.onclose=this.websocketclose},websocketonopen:function(){this.websock.send("admin:123456")},websocketonerror:function(){},websocketonmessage:function(t){this.reconnectTip&&(this.reconnectTip=!1,this.setVedioTimmer());var e=null;try{e=JSON.parse(t.data)}catch(n){e=t.data}this.changeWsResponse(e)},websocketsend:function(t){if(t){try{t=JSON.stringify(t)}catch(e){}this.websock.send(t),this.changeWsContent("")}},websocketclose:function(t){this.reconnectTip=!0,this.initWebSocket()}},Object(I["b"])(["changeWsResponse","changeWsContent"])),watch:{wsContent:function(){if(this.wsContent)try{this.websocketsend(this.wsContent)}catch(t){console.log("连接已关闭或正在连接中,无法发送数据"),this.changeWsContent("")}}}},an=sn,rn=n("fe8e"),cn=n("4b28"),ln=Object(h["a"])(an,Xe,Ye,!1,null,null,null),un=ln.exports;m()(ln,{VBtn:tt["a"],VOverlay:rn["a"],VSnackbar:cn["a"]});var dn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div")},hn=[],pn=(n("ec8a"),{name:"HandleKeyEvent",computed:Object(E["a"])({},Object(I["d"])(["keyEvents"])),created:function(){var t=this;document.onkeydown=function(e){if(!e.repeat)for(var n in t.keyEvents.down)if(e.keyCode===Number(n)){var o=t.keyEvents.down[n];o()}},document.onkeyup=function(e){for(var n in t.keyEvents.up)if(e.keyCode===Number(n)){var o=t.keyEvents.up[n];o()}}}}),mn=pn,fn=Object(h["a"])(mn,dn,hn,!1,null,null,null),vn=fn.exports,Cn={name:"App",components:{AppBar:g,Home:qe,HandleWebsocket:un,HandleKeyEvent:vn},data:function(){return{}}},bn=null!=navigator.userAgent.toLowerCase().match(/(ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i);bn&&console.log("mobaView");var gn=Cn,wn=(n("7faf"),n("446f")),kn=n("ebb2"),yn=Object(h["a"])(gn,r,i,!1,null,null,null),Sn=yn.exports;m()(yn,{VApp:wn["a"],VContent:kn["a"]});var xn=n("c730");Object(xn["a"])("".concat("/","service-worker.js"),{ready:function(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered:function(){console.log("Service worker has been registered.")},cached:function(){console.log("Content has been cached for offline use.")},updatefound:function(){console.log("New content is downloading.")},updated:function(){console.log("New content is available; please refresh.")},offline:function(){console.log("No internet connection found. App is running in offline mode.")},error:function(t){console.error("Error during service worker registration:",t)}});var _n=n("1bee");o["a"].use(_n["a"]);var Mn=[{path:"/",name:"Home",component:qe}],Fn=new _n["a"]({mode:"history",base:"/",routes:Mn}),On=Fn;o["a"].use(I["a"]);var Vn=new I["a"].Store({state:{setVedioTimmer:null,CVFLColor:"#FFFFFF",FCColor:"#FFFF00",nowAction:"none",wsContent:"",wsResponse:"",keyEvents:{down:{},up:{}}},actions:{changeWsContent:function(t,e){t.commit("changeWsContent",e)},changeWsResponse:function(t,e){e&&t.commit("changeWsResponse",e)}},mutations:{changeSetVedioTimmer:function(t,e){t.setVedioTimmer=e},changeCVFLColor:function(t,e){t.CVFLColor=e},changeFCColor:function(t,e){console.log(e),t.FCColor=e},changeWsContent:function(t,e){t.wsContent=e},changeWsResponse:function(t,e){t.wsResponse=e},setKeyEvent:function(t,e){e&&e[0]&&e[1]&&e[2]&&(t.keyEvents[e[2]][e[0]]=e[1])}},modules:{}});n("8ae3");o["a"].config.productionTip=!1,o["a"].prototype.RGBToHSV255=function(t){var e=0,n=0,o=0,s=t[0],a=t[1],r=t[2];t.sort((function(t,e){return t-e}));var i=t[2],c=t[0];return o=i/255,n=0===i?0:1-c/i,i===c?e=0:i===s&&a>=r?e=(a-r)/(i-c)*60+0:i===s&&a3?(t.intervalCounter=0,t.contentSuffix=""):t.contentSuffix=t.contentSuffix+"."}),666)}},watch:{status:function(){1===this.status?(this.ripple=!1,this.isLoading(),this.$set(this.maskClass,1,""),this.maskStyle["background-color"]="rgba(22,22,22,0.3)",this.maskFontStyle["margin-top"]="0"):2===this.status&&(this.isLoading(),this.maskStyle["background-color"]="rgba(22,22,22,0.0)",this.maskStyle.transition="background-color 0.5s ease-in",this.maskFontStyle["margin-top"]="-400px")}},mounted:function(){this.maskContent=this.content}},Zt=Qt,te=(n("7fd8"),n("3dfe")),ee=n.n(te),ne=n("a048"),oe=Object(h["a"])(Zt,Xt,Yt,!1,null,"0845749d",null),se=oe.exports;ee()(oe,{Ripple:ne["a"]});var ae={name:"Radar",components:{CommonMask:se},data:function(){return{RadarChart:null,dom:null,scaning:!1,maskStatus:0}},computed:Object(E["a"])({},Object(I["d"])(["wsResponse"])),methods:Object(E["a"])({handleWindowResize:function(){this.dom.style.height=this.dom.offsetWidth+"px",this.mask.style.height=this.$refs.wrapper.offsetHeight+"px",this.RadarChart.resize()},handleMaskClick:function(){this.scaning||(this.maskStatus=1,this.scaning=!0,this.changeWsContent("scan"))},drawChart:function(t){var e=null,n=[];function o(t){return{coordinateSystem:"polar",name:"line",type:"line",lineStyle:{color:"#22ee22"},itemStyle:{color:"black"},data:t}}for(var s in t||(n=[{coordinateSystem:"polar",name:"line",type:"line",data:[[0,0],[0,0]]}]),t){var a=t[s][0],r=t[s][1];n.push(o([[0,r],[a,r]]))}e={polar:{},tooltip:{trigger:"axis",axisPointer:{type:"cross"}},angleAxis:{type:"value",min:15,max:375,startAngle:165,clockwise:!0},radiusAxis:{},series:n},e&&"object"===Object(Gt["a"])(e)&&(this.RadarChart.clear(),this.RadarChart.setOption(e,!0))}},Object(I["b"])(["changeWsContent"])),watch:{wsResponse:function(){if("scanResult"===this.wsResponse.title){this.maskStatus=2,this.scaning=!1,console.log(this.wsResponse);var t=this.wsResponse.data;this.drawChart(t)}}},mounted:function(){this.mask=this.$refs.mask,this.dom=this.$refs.container,this.RadarChart=qt.a.init(this.dom),this.drawChart(),window.addEventListener("resize",this.handleWindowResize),this.handleWindowResize()},distory:function(){window.removeEventListener("resize",this.handleWindowResize)}},re=ae,ie=(n("2c8b"),Object(h["a"])(re,Kt,zt,!1,null,"c2c10634",null)),ce=ie.exports,le=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-expansion-panels",{staticClass:"expansion",attrs:{accordion:"",mandatory:""},model:{value:t.witchOpen,callback:function(e){t.witchOpen=e},expression:"witchOpen"}},[n("v-expansion-panel",[n("v-expansion-panel-header",{scopedSlots:t._u([{key:"default",fn:function(e){var o=e.open;return[n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{attrs:{cols:"4"}},[t._v("Base Control")]),t._l(t.instructContent["Base Control"][0],(function(e){return n("v-col",{key:e,staticClass:"text--secondary",attrs:{cols:"4"}},[n("v-fade-transition",{attrs:{"leave-absolute":""}},[o?n("span",[t._v(" "+t._s(e)+" ")]):t._e()])],1)}))],2)]}}])}),n("v-expansion-panel-content",[n("v-row",{attrs:{"no-gutters":""}},[n("v-spacer"),t._l(t.instructContent["Base Control"][1],(function(e,o){return n("v-col",{key:o,attrs:{cols:"4"}},t._l(e,(function(e,o){return n("div",{key:o},[t._v(" "+t._s(o)+" - "+t._s(e)),n("br")])})),0)}))],2)],1)],1),n("v-expansion-panel",[n("v-expansion-panel-header",[t._v("About Us")]),n("v-expansion-panel-content",{staticStyle:{"text-indent":"2rem"}},[t._v(" "+t._s(t.instructContent["About Us"])+" ")])],1)],1)},ue=[],de={name:"InstructionMod",data:function(){return{cols:1,witchOpen:0,instructContent:{"Base Control":[["Move Control","Arm Control"],[{W:"move forward",A:"turn left",S:"move backward",D:"turn right"},{I:"camera up",J:"head left turn",K:"camera down",L:"head right turn",U:"grab",O:"loose",P:"hand up",";":"hand down",Y:"arm up",H:"arm down"}]],"About Us":"Adeept is a technical service team of open source software and hardware. Dedicated to applying the Internet and the latest industrial technology in open source area, we strive to provide best hardware support and software service for general makers and electronic enthusiasts around the world. We aim to create infinite possibilities with sharing. No matter what field you are in, we can lead you into the electronic world and bring your ideas into reality.","Contact Us":"Have a technical question for Tech Support? support@adeept.com"}}}},he=de,pe=(n("0388"),n("ddd1")),me=n("a305"),fe=n("4f19"),ve=n("95e7"),Ce=n("d10c"),be=n("24c5"),ge=n("c6c4"),we=Object(h["a"])(he,le,ue,!1,null,"175a0aee",null),ke=we.exports;m()(we,{VCol:pe["a"],VExpansionPanel:me["a"],VExpansionPanelContent:fe["a"],VExpansionPanelHeader:ve["a"],VExpansionPanels:Ce["a"],VFadeTransition:be["c"],VRow:ge["a"],VSpacer:C["a"]});var ye=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"ports-wrapper"},[n("ButtonsChild",{attrs:{buttons:t.buttons,cols:t.cols}})],1)},Se=[],xe={name:"ActionsMod",components:{ButtonsChild:it},data:function(){return{buttons:[[!1,"P1","Switch_1_on","","","Switch_1_off"],[!1,"P2","Switch_2_on","","","Switch_2_off"],[!1,"P3","Switch_3_on","","","Switch_3_off"]],cols:3}}},_e=xe,Me=(n("07e2"),Object(h["a"])(_e,ye,Se,!1,null,"522b1d6c",null)),Fe=Me.exports,Oe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"wrapper"},[n("v-text-field",{staticClass:"pwm-inputer",attrs:{label:"PWM",type:"number",maxlength:"2",placeholder:"Num Requier",outlined:"","hide-details":"",dense:"",width:".2rem"},model:{value:t.PWMNum,callback:function(e){t.PWMNum=e},expression:"PWMNum"}}),n("div",{staticClass:"button-wrapper"},t._l(t.buttons,(function(t,e){return n("ControlButton",{key:e,staticClass:"buttons",style:t.style,attrs:{attr:t.attr}})})),1)],1)},Ve=[],We=(n("3e5e"),{name:"ServoInitMod",components:{ControlButton:ot},data:function(){return{PWMNum:0,buttons:[{style:{width:"15%"},attr:{isIcon:!1,content:"<",sendContent:"SiLeft 0"}},{style:{width:"40%"},attr:{isIcon:!1,content:"setPWM",sendContent:"PWMMS 0"}},{style:{width:"15%"},attr:{isIcon:!1,content:">",sendContent:"SiRight 0"}},{style:{width:"14%"},attr:{isIcon:!0,content:"mdi-cog-counterclockwise",sendContent:"PWMD"}}],cols:3}},watch:{PWMNum:function(){var t=this;for(var e in console.log(this.PWMNum),(this.PWMNum<0||this.PWMNum>15)&&(console.log("change"),setTimeout((function(){t.PWMNum=0}),1)),this.buttons){var n=this.buttons[e].attr.sendContent;if("PWMINIT"===n)return;n=n.split(" ")[0]+" "+this.PWMNum,this.buttons[e].attr.sendContent=n}}}}),Ae=We,je=(n("0c8e"),n("2c54")),Ee=Object(h["a"])(Ae,Oe,Ve,!1,null,"fa85e006",null),Ie=Ee.exports;m()(Ee,{VTextField:je["a"]});var Le=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"ports-wrapper"},[n("ButtonsChild",{attrs:{buttons:t.buttons,cols:t.cols}})],1)},Pe=[],Re={name:"ActionsMod",components:{ButtonsChild:it},data:function(){return{buttons:[[!1,"ARM","AR"],"",[!1,"HOME","home"],"",[!1,"PT","PT"]],cols:3}}},Ne=Re,$e=(n("4102"),Object(h["a"])(Ne,Le,Pe,!1,null,"865517e4",null)),Te=$e.exports,Be={name:"ControllArea",components:{ControllerSheet:W,VedioMod:N,StatusMod:K,ArmControlMod:dt,ActionsMod:Ct,MoveControlMod:xt,CVFLMod:Wt,FindColorMod:Ut,RadarScanMod:ce,InstructionMod:ke,PortsControlMod:Fe,ServoInitMod:Ie,HomeMod:Te},data:function(){return{isMx:!1}},watch:{isMx:function(){var t=this.$refs.VedioModDom.$el.parentNode.removeChild(this.$refs.VedioModDom.$el);this.isMx?this.$refs.xsVedioWrapper.appendChild(t):this.$refs.smVedioWrapper.appendChild(t)}},methods:{checkIsMx:function(){this.isMx=window.innerWidth1.5}},mounted:function(){this.checkIsMx(),window.addEventListener("resize",this.checkIsMx)}},He=Be,De=(n("b729"),n("3583")),Ue=Object(h["a"])(He,y,S,!1,null,"2c512172",null),Ke=Ue.exports;m()(Ue,{VCol:pe["a"],VContainer:De["a"],VRow:ge["a"]});var ze={name:"Home",components:{ControllArea:Ke}},Ge=ze,Je=Object(h["a"])(Ge,w,k,!1,null,null,null),qe=Je.exports,Xe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("v-snackbar",{staticClass:"reconnect-tip",attrs:{color:"grey lighten-4 black--text",timeout:0},model:{value:t.reconnectTip,callback:function(e){t.reconnectTip=e},expression:"reconnectTip"}},[t._v(" Connect Failed "),n("v-btn",{attrs:{color:"pink",text:""}},[t._v(" Reconnecting ")]),n("AniLoading"),n("v-overlay",{attrs:{absolute:"",opacity:0}})],1)],1)},Ye=[],Qe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"light",style:t.lightStyle})},Ze=[],tn={name:"AniLoading",data:function(){return{lightStyle:{height:"52px","margin-left":"-10%","transition-duration":"1.3s"},timer:null}},mounted:function(){var t=this;this.lightStyle.height=this.$el.parentNode.offsetHeight+50+"px",this.$el.parentNode.style.position||(this.$el.parentNode.style.position="relative"),this.timer=setInterval((function(){"-10%"===t.lightStyle["margin-left"]?(t.lightStyle["margin-left"]="105%",t.lightStyle["transition-duration"]="1.3s"):(t.lightStyle["margin-left"]="-10%",t.lightStyle["transition-duration"]="0s")}),1300)}},en=tn,nn=(n("de38"),Object(h["a"])(en,Qe,Ze,!1,null,"49c65f16",null)),on=nn.exports,sn={name:"HandleWebsocket",data:function(){return{websock:null,reconnectTip:!1}},components:{AniLoading:on},computed:Object(E["a"])({},Object(I["d"])(["wsContent","setVedioTimmer"])),created:function(){this.initWebSocket()},destroyed:function(){this.websock.close()},methods:Object(E["a"])({initWebSocket:function(){var t="ws://"+location.hostname+":8888";this.websock=new WebSocket(t),this.websock.onmessage=this.websocketonmessage,this.websock.onopen=this.websocketonopen,this.websock.onerror=this.websocketonerror,this.websock.onclose=this.websocketclose},websocketonopen:function(){this.websock.send("admin:123456")},websocketonerror:function(){},websocketonmessage:function(t){this.reconnectTip&&(this.reconnectTip=!1,this.setVedioTimmer());var e=null;try{e=JSON.parse(t.data)}catch(n){e=t.data}this.changeWsResponse(e)},websocketsend:function(t){if(t){try{t=JSON.stringify(t)}catch(e){}this.websock.send(t),this.changeWsContent("")}},websocketclose:function(t){this.reconnectTip=!0,this.initWebSocket()}},Object(I["b"])(["changeWsResponse","changeWsContent"])),watch:{wsContent:function(){if(this.wsContent)try{this.websocketsend(this.wsContent)}catch(t){console.log("连接已关闭或正在连接中,无法发送数据"),this.changeWsContent("")}}}},an=sn,rn=n("fe8e"),cn=n("4b28"),ln=Object(h["a"])(an,Xe,Ye,!1,null,null,null),un=ln.exports;m()(ln,{VBtn:tt["a"],VOverlay:rn["a"],VSnackbar:cn["a"]});var dn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div")},hn=[],pn=(n("ec8a"),{name:"HandleKeyEvent",computed:Object(E["a"])({},Object(I["d"])(["keyEvents"])),created:function(){var t=this;document.onkeydown=function(e){if(!e.repeat)for(var n in t.keyEvents.down)if(e.keyCode===Number(n)){var o=t.keyEvents.down[n];o()}},document.onkeyup=function(e){for(var n in t.keyEvents.up)if(e.keyCode===Number(n)){var o=t.keyEvents.up[n];o()}}}}),mn=pn,fn=Object(h["a"])(mn,dn,hn,!1,null,null,null),vn=fn.exports,Cn={name:"App",components:{AppBar:g,Home:qe,HandleWebsocket:un,HandleKeyEvent:vn},data:function(){return{}}},bn=null!=navigator.userAgent.toLowerCase().match(/(ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i);bn&&console.log("mobaView");var gn=Cn,wn=(n("7faf"),n("446f")),kn=n("ebb2"),yn=Object(h["a"])(gn,r,i,!1,null,null,null),Sn=yn.exports;m()(yn,{VApp:wn["a"],VContent:kn["a"]});var xn=n("c730");Object(xn["a"])("".concat("/","service-worker.js"),{ready:function(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered:function(){console.log("Service worker has been registered.")},cached:function(){console.log("Content has been cached for offline use.")},updatefound:function(){console.log("New content is downloading.")},updated:function(){console.log("New content is available; please refresh.")},offline:function(){console.log("No internet connection found. App is running in offline mode.")},error:function(t){console.error("Error during service worker registration:",t)}});var _n=n("1bee");o["a"].use(_n["a"]);var Mn=[{path:"/",name:"Home",component:qe}],Fn=new _n["a"]({mode:"history",base:"/",routes:Mn}),On=Fn;o["a"].use(I["a"]);var Vn=new I["a"].Store({state:{setVedioTimmer:null,CVFLColor:"#FFFFFF",FCColor:"#FFFF00",nowAction:"none",wsContent:"",wsResponse:"",keyEvents:{down:{},up:{}}},actions:{changeWsContent:function(t,e){t.commit("changeWsContent",e)},changeWsResponse:function(t,e){e&&t.commit("changeWsResponse",e)}},mutations:{changeSetVedioTimmer:function(t,e){t.setVedioTimmer=e},changeCVFLColor:function(t,e){t.CVFLColor=e},changeFCColor:function(t,e){console.log(e),t.FCColor=e},changeWsContent:function(t,e){t.wsContent=e},changeWsResponse:function(t,e){t.wsResponse=e},setKeyEvent:function(t,e){e&&e[0]&&e[1]&&e[2]&&(t.keyEvents[e[2]][e[0]]=e[1])}},modules:{}});n("8ae3");o["a"].config.productionTip=!1,o["a"].prototype.RGBToHSV255=function(t){var e=0,n=0,o=0,s=t[0],a=t[1],r=t[2];t.sort((function(t,e){return t-e}));var i=t[2],c=t[0];return o=i/255,n=0===i?0:1-c/i,i===c?e=0:i===s&&a>=r?e=(a-r)/(i-c)*60+0:i===s&&a