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GAC9B,OAAOG,QAAQC,UAAUC,MAAK,WAC7B,IAAIb,EAAI,IAAIc,MAAM,uBAAyBN,EAAM,KAEjD,MADAR,EAAEe,KAAO,mBACHf,CACP,IAGD,IAAIgB,EAAMtB,EAAIc,GAAMS,EAAKD,EAAI,GAC7B,OAAOL,QAAQO,IAAIF,EAAInB,MAAM,GAAGH,IAAIe,EAAoBT,IAAIa,MAAK,WAChE,OAAOJ,EAAoBQ,EAC5B,GACD,CACAV,EAAoBvC,KAAO,WAAa,OAAOD,OAAOC,KAAK0B,EAAM,EACjEa,EAAoBU,GAAK,KACzBE,EAAOC,QAAUb,C","sources":["webpack://platypush/./src/components/panels/Switches/Index.vue","webpack://platypush/./src/components/panels/Switches/Index.vue?3eac","webpack://platypush/./src/components/panels/Switches|lazy|/^\\.\\/.*\\/Index$/|groupOptions: {}|namespace object"],"sourcesContent":["<template>\n <div class=\"switches-container\">\n <Loading v-if=\"loading\" />\n\n <div class=\"switch-plugins\">\n <div class=\"no-content\" v-if=\"!Object.keys(plugins).length\">No switch plugins configured</div>\n\n <div class=\"switch-plugin\" v-for=\"pluginName in Object.keys(plugins)\" :key=\"pluginName\"\n @click=\"selectedPlugin = selectedPlugin === pluginName ? null : pluginName\">\n <div class=\"header\" :class=\"{selected: selectedPlugin === pluginName}\">\n <div class=\"name col-10\" v-text=\"pluginName\" />\n <div class=\"refresh col-2\" v-if=\"selectedPlugin === pluginName\">\n <button @click.stop=\"bus.emit('refresh', pluginName)\" title=\"Refresh plugin\" :disabled=\"loading\">\n <i class=\"fa fa-sync\" />\n </button>\n </div>\n </div>\n\n <div class=\"body\" :class=\"{hidden: selectedPlugin !== pluginName}\">\n <component :is=\"components[pluginName]\" :config=\"plugins[pluginName]\" :plugin-name=\"pluginName\"\n :selected=\"selectedPlugin === pluginName\" :bus=\"bus\" />\n </div>\n </div>\n </div>\n\n <div class=\"refresh-button\">\n <button @click=\"refresh\" :disabled=\"loading\" title=\"Refresh plugins\">\n <i class=\"fa fa-sync\" />\n </button>\n </div>\n </div>\n</template>\n\n<script>\nimport Loading from \"@/components/Loading\";\nimport Utils from \"@/Utils\";\nimport {defineAsyncComponent} from \"vue\";\nimport mitt from \"mitt\";\n\nexport default {\n name: \"Switches\",\n components: {Loading},\n mixins: [Utils],\n\n data() {\n return {\n loading: false,\n plugins: {},\n components: {},\n selectedPlugin: null,\n bus: mitt(),\n }\n },\n\n methods: {\n initPanels() {\n this.components = {}\n\n Object.keys(this.plugins).forEach(async (pluginName) => {\n const componentName = pluginName.split('.').map((token) => token[0].toUpperCase() + token.slice(1)).join('')\n let comp = null\n try {\n comp = await import(`@/components/panels/Switches/${componentName}/Index`)\n } catch (e) {\n return\n }\n\n const component = defineAsyncComponent(async () => { return comp })\n this.$options.components[pluginName] = component\n this.components[pluginName] = component\n })\n },\n\n async refresh() {\n this.loading = true\n\n try {\n this.plugins = await this.request('utils.get_switch_plugins')\n this.initPanels()\n } finally {\n this.loading = false\n }\n },\n },\n\n mounted() {\n this.refresh()\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import \"vars\";\n\n.switches-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow: auto;\n\n .switch-plugins {\n background: $background-color;\n display: flex;\n flex-direction: column;\n box-shadow: $border-shadow-bottom-right;\n\n @media screen and (max-width: calc(#{$tablet - 1px})) {\n width: 100%;\n }\n\n @media screen and (min-width: $tablet) {\n width: 90%;\n border-radius: 1em;\n margin-top: 2em;\n }\n\n @media screen and (min-width: $desktop) {\n width: 500pt;\n margin-top: 3em;\n }\n }\n\n .no-content {\n padding: 1.5em;\n }\n\n .switch-plugin {\n display: flex;\n flex-direction: column;\n\n .header {\n display: flex;\n align-items: center;\n padding: 1em 1.5em 1em .5em;\n text-transform: uppercase;\n letter-spacing: .075em;\n border-bottom: $default-border-2;\n cursor: pointer;\n\n &:hover {\n background: $hover-bg;\n }\n\n &.selected {\n background: $selected-bg;\n box-shadow: $border-shadow-bottom-right;\n border: none;\n }\n\n .refresh {\n text-align: right;\n }\n\n button {\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n\n &:hover {\n color: $default-hover-fg-2;\n }\n }\n }\n\n @media screen and (min-width: $tablet) {\n &:first-child {\n .header {\n border-radius: 1em 1em 0 0;\n }\n }\n\n &:last-child {\n .header {\n border-radius: 0 0 1em 1em;\n }\n }\n }\n\n .body {\n display: flex;\n border: $default-border-2;\n border-bottom: 0;\n box-shadow: $border-shadow-bottom;\n }\n }\n\n .refresh-button {\n position: fixed;\n bottom: 1.5em;\n right: 1.5em;\n\n button {\n width: 4em;\n height: 4em;\n border-radius: 2em;\n background: $refresh-button-bg;\n color: $refresh-button-fg;\n border: none;\n box-shadow: $border-shadow-bottom-right;\n\n &:hover {\n color: $default-hover-fg-2;\n }\n\n &:disabled {\n opacity: .7;\n }\n }\n }\n}\n</style>\n","import { render } from \"./Index.vue?vue&type=template&id=eac2ea44&scoped=true\"\nimport script from \"./Index.vue?vue&type=script&lang=js\"\nexport * from \"./Index.vue?vue&type=script&lang=js\"\n\nimport \"./Index.vue?vue&type=style&index=0&id=eac2ea44&lang=scss&scoped=true\"\n\nimport exportComponent from \"/home/blacklight/git_tree/platypush/platypush/backend/http/webapp/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-eac2ea44\"]])\n\nexport default __exports__","var map = {\n\t\"./LightHue/Index\": [\n\t\t2844,\n\t\t3490,\n\t\t6590,\n\t\t2844\n\t],\n\t\"./Smartthings/Index\": [\n\t\t9196,\n\t\t3490,\n\t\t6590,\n\t\t9196\n\t],\n\t\"./SwitchTplink/Index\": [\n\t\t3785,\n\t\t3490,\n\t\t6590,\n\t\t3785\n\t],\n\t\"./SwitchWemo/Index\": [\n\t\t5210,\n\t\t3490,\n\t\t6590,\n\t\t5210\n\t],\n\t\"./Switchbot/Index\": [\n\t\t9694,\n\t\t3490,\n\t\t6590,\n\t\t9694\n\t],\n\t\"./SwitchbotBluetooth/Index\": [\n\t\t9694,\n\t\t3490,\n\t\t6590,\n\t\t9694\n\t],\n\t\"./ZigbeeMqtt/Index\": [\n\t\t5466,\n\t\t3490,\n\t\t6590,\n\t\t5466\n\t],\n\t\"./Zwave/Index\": [\n\t\t7262,\n\t\t3490,\n\t\t6590,\n\t\t7262\n\t],\n\t\"./ZwaveMqtt/Index\": [\n\t\t2380,\n\t\t3490,\n\t\t6590,\n\t\t2380\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function() { return Object.keys(map); };\nwebpackAsyncContext.id = 6371;\nmodule.exports = webpackAsyncContext;"],"names":["class","loading","Object","keys","plugins","length","pluginName","key","selectedPlugin","bus","emit","title","disabled","components","config","selected","refresh","name","Loading","mixins","Utils","data","methods","initPanels","this","forEach","async","componentName","split","map","token","toUpperCase","slice","join","comp","e","component","$options","request","mounted","__exports__","render","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","Error","code","ids","id","all","module","exports"],"sourceRoot":""}