wavelovers/docs/js/app.faf311ed.js

2 lines
12 KiB
JavaScript
Raw Normal View History

2022-08-11 15:43:21 +03:00
(function(){"use strict";var t={4421:function(t,e,n){var a=n(9242),i=n(3396);const o={class:"wavelovers"},r=(0,i.Uk)("Press any gamepad button or connect a new gamepad to vibrate.");function s(t,e,n,a,s,c){const u=(0,i.up)("NavigationList"),d=(0,i.up)("router-view"),p=(0,i.up)("GamepadList"),m=(0,i.up)("MessageItem");return(0,i.wg)(),(0,i.iD)("div",o,[(0,i.Wm)(u),(0,i.Wm)(d),t.gamepads.length>0?((0,i.wg)(),(0,i.j4)(p,{key:0,gamepads:t.gamepads},null,8,["gamepads"])):((0,i.wg)(),(0,i.j4)(m,{key:1},{default:(0,i.w5)((()=>[r])),_:1}))])}var c=n(1746);const u={class:"content-item navigation-list"},d=(0,i.Uk)("Patterns"),p=(0,i.Uk)("Custom"),m=(0,i.Uk)("Manual"),l=(0,i.Uk)("Diagnostic");function f(t,e,n,a,o,r){const s=(0,i.up)("router-link");return(0,i.wg)(),(0,i.iD)("div",u,[(0,i.Wm)(s,{to:"/",class:"navigation-item"},{default:(0,i.w5)((()=>[d])),_:1}),(0,i.Wm)(s,{to:"/custom",class:"navigation-item"},{default:(0,i.w5)((()=>[p])),_:1}),(0,i.Wm)(s,{to:"/manual",class:"navigation-item"},{default:(0,i.w5)((()=>[m])),_:1}),(0,i.Wm)(s,{to:"/diagnostic",class:"navigation-item"},{default:(0,i.w5)((()=>[l])),_:1})])}var v=(0,i.aZ)({name:"NavigationList"}),g=n(89);const h=(0,g.Z)(v,[["render",f]]);var w=h,b=n(7139);const y={class:"content-item device-list"};function A(t,e,n,a,o,r){const s=(0,i.up)("GamepadItem");return(0,i.wg)(),(0,i.iD)("div",y,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t.gamepads,(t=>((0,i.wg)(),(0,i.j4)(s,{key:t.id,textContent:(0,b.zw)(t.unit.id)},null,8,["textContent"])))),128))])}const Z={class:"list-item"};function k(t,e,n,a,o,r){return(0,i.wg)(),(0,i.iD)("div",Z)}var C=(0,i.aZ)({name:"GamepadItem"});const _=(0,g.Z)(C,[["render",k]]);var P=_,E=(0,i.aZ)({name:"GamepadList",props:{gamepads:{type:Array}},components:{GamepadItem:P}});const L=(0,g.Z)(E,[["render",A]]);var j=L;const I={class:"content-item message"};function x(t,e,n,a,o,r){return(0,i.wg)(),(0,i.iD)("div",I,[(0,i._)("span",null,[(0,i.WI)(t.$slots,"default")])])}var G=(0,i.aZ)({name:"MessageItem"});const M=(0,g.Z)(G,[["render",x]]);var O=M,D=(0,i.aZ)({name:"App",components:{NavigationList:w,GamepadList:j,MessageItem:O},computed:{gamepads:function(){return c.Z.getters.gamepads}},methods:{addEventListeners(){window.addEventListener("gamepadconnected",(t=>c.Z.dispatch("addGamepad",t))),window.addEventListener("gamepaddisconnected",(t=>c.Z.dispatch("deleteGamepad",t)))},removeEventListeners(){window.removeEventListener("gamepadconnected",(t=>c.Z.dispatch("addGamepad",t))),window.removeEventListener("gamepaddisconnected",(t=>c.Z.dispatch("deleteGamepad",t)))}},mounted(){this.addEventListeners()},unmounted(){this.removeEventListeners()}});const N=(0,g.Z)(D,[["render",s]]);var T=N,S=n(2483);function V(t,e,n,a,o,r){const s=(0,i.up)("AppPatterns");return(0,i.wg)(),(0,i.j4)(s)}const U={class:"app-patterns"},W=(0,i.Uk)("Loading...");function B(t,e,n,a,o,r){const s=(0,i.up)("PatternList"),c=(0,i.up)("MessageItem");return(0,i.wg)(),(0,i.iD)("div",U,[t.patterns.length>0?((0,i.wg)(),(0,i.j4)(s,{key:0,patterns:t.patterns,mode:t.mode,isActive:t.isActive,onChange:t.change},null,8,["patterns","mode","isActive","onChange"])):((0,i.wg)(),(0,i.j4)(c,{key:1},{default:(0,i.w5)((()=>[W])),_:1}))])}const z={class:"content-item pattern-list"};function F(t,e,n,a,o,r){const s=(0,i.up)("PatternItem");return(0,i.wg)(),(0,i.iD)("div",z,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t.patterns,((e,n)=>((0,i.wg)(),(0,i.j4)(s,{key:e.name,pattern:e,index:n,mode:t.mode,isActive:t.isActive,onChange:t.change},null,8,["pattern","index","mode","isActive","onChange"])))),128))])}const H=["textContent"],K={class:"pattern-item__info-container"},$=["textContent"],q=["textContent"];function Y(t,e,n,a,o,r){return(0,i.wg)(),(0,i.iD)("div",{onClick:e[0]||(e[0]=e=>t.change(t.index)),class:(0,b.C_)(["pattern-item",t.index===t.mode&&!0===t.isActive?"pattern-item_selected":""])},[(0,i._)("span",{class:"pattern-item__icon",textContent:(0,b.zw)(t.pattern.icon)},null,8,H),(0,i._)("div",K,[(0,i._)("span",{class:"pattern-item__name",textContent:(0,b.zw)(t.pattern.name)},null,8,$),(0,i._)("span",{class:"pattern-it
//# sourceMappingURL=app.faf311ed.js.map