platypush/platypush/backend/http/webapp/dist/static/js/306.a654daef.js.map

1 line
15 KiB
Plaintext

{"version":3,"file":"static/js/306.a654daef.js","mappings":"oMACOA,MAAM,a,8EAAXC,EAAAA,EAAAA,IAGM,MAHNC,EAGM,CAF6CC,EAAAC,YAAS,WAA1DH,EAAAA,EAAAA,IAA8D,O,MAAzDD,MAAM,O,aAAOK,EAAAA,EAAAA,IAAQC,EAAgBC,WAALD,EAAAE,O,2BAC0BL,EAAAM,YAAS,WAAxER,EAAAA,EAAAA,IAA4E,O,MAAvED,MAAM,O,aAAOK,EAAAA,EAAAA,IAAQC,EAA8BI,WAAnBJ,EAAAE,IAAKL,EAAAQ,gB,2CAQ9C,GACEC,KAAM,WACNC,OAAQ,CAACC,EAAAA,GACTC,MAAO,CAELC,SAAU,CACRC,UAAU,EACVC,SAAS,GAIXC,SAAU,CACRF,UAAU,EACVC,SAAS,GAIXE,YAAa,CACXH,UAAU,EACVC,SAAS,IAIbG,SAAU,CACRZ,SAAAA,GACE,OAAOa,KAAKC,aAAaD,KAAKH,SAChC,EAEAf,SAAAA,GACE,OAAOkB,KAAKC,aAAaD,KAAKN,SAChC,EAEAL,YAAAA,GACE,OAAOW,KAAKC,aAAaD,KAAKF,YAChC,GAGFI,KAAM,WACJ,MAAO,CACLhB,IAAK,IAAIiB,KAEb,EAEAC,QAAS,CACPC,WAAAA,GACEL,KAAKd,IAAM,IAAIiB,IACjB,GAGFG,QAAS,WACPN,KAAKK,cACLE,YAAYP,KAAKK,YAAa,IAChC,G,UCxDF,MAAMG,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,GAAQ,CAAC,YAAY,qBAEzF,O,oGCRO/B,MAAM,kB,GAEJgC,IAAI,aAAahC,MAAM,c,mBAIvBA,MAAM,sB,GACJA,MAAM,2B,aAMNA,MAAM,6B,mHAbfC,EAAAA,EAAAA,IAkBM,MAlBNC,EAkBM,CAjBY+B,EAAAC,OAAOC,QAAU,iBAAJ,WAA7BC,EAAAA,EAAA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,MAGhBvE,KAAKsE,MAAME,WAAWlD,MAAM,oBAAsB,OAAStB,KAAKoB,OAAS,IACzEpB,KAAKsE,MAAMC,IAAIjD,MAAMmD,MAAQ,OAEzBzE,KAAKsE,MAAMC,IAAIE,MAAQzE,KAAKsE,MAAMC,IAAIG,QAAQ,CAChD,MAAMC,EAAQ3E,KAAKsE,MAAMC,IAAIE,MAAQzE,KAAKsE,MAAMC,IAAIG,OAChDC,GAAS,EAAE,GAAKA,GAAS,GAAG,EAC9B3E,KAAKsE,MAAMC,IAAIjD,MAAMmD,MAAQ,OACpBE,GAAS,EAAE,IACpB3E,KAAKsE,MAAMC,IAAIjD,MAAMoD,OAAS,OAElC,CACF,EAEAP,aAAAA,GACE,IAAK,IAAIS,EAAE5E,KAAKY,OAAOC,OAAO,EAAG+D,EAAI,EAAGA,IAAK,CAC3C,IAAIC,EAAIC,KAAKC,MAAMD,KAAKE,UAAYJ,EAAE,IAClCK,EAAIjF,KAAKY,OAAOgE,GACpB5E,KAAKY,OAAOgE,GAAK5E,KAAKY,OAAOiE,GAC7B7E,KAAKY,OAAOiE,GAAKI,CACnB,CACF,GAGF3E,OAAAA,GACEN,KAAKsE,MAAMC,IAAIW,iBAAiB,OAAQlF,KAAKqE,YAC7CrE,KAAKsE,MAAMC,IAAIW,iBAAiB,QAASlF,KAAK+D,SAE9C/D,KAAK+D,UACLxD,YAAYP,KAAK+D,QAASe,KAAKK,MAA4B,IAAtBnF,KAAK+C,gBAC5C,G,UCjNF,MAAMvC,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,GAAQ,CAAC,YAAY,qBAEzF,O","sources":["webpack://platypush/./src/components/widgets/DateTime/Index.vue","webpack://platypush/./src/components/widgets/DateTime/Index.vue?dfd6","webpack://platypush/./src/components/widgets/ImageCarousel/Index.vue","webpack://platypush/./src/components/widgets/ImageCarousel/Index.vue?2054"],"sourcesContent":["<template>\n <div class=\"date-time\">\n <div class=\"date\" v-text=\"formatDate(now)\" v-if=\"_showDate\" />\n <div class=\"time\" v-text=\"formatTime(now, _showSeconds)\" v-if=\"_showTime\" />\n </div>\n</template>\n\n<script>\nimport Utils from \"@/Utils\";\n\n// Widget to show date and time\nexport default {\n name: 'DateTime',\n mixins: [Utils],\n props: {\n // If false then don't display the date.\n showDate: {\n required: false,\n default: true,\n },\n\n // If false then don't display the time.\n showTime: {\n required: false,\n default: true,\n },\n\n // If false then don't display the seconds.\n showSeconds: {\n required: false,\n default: true,\n },\n },\n\n computed: {\n _showTime() {\n return this.parseBoolean(this.showTime)\n },\n\n _showDate() {\n return this.parseBoolean(this.showDate)\n },\n\n _showSeconds() {\n return this.parseBoolean(this.showSeconds)\n },\n },\n\n data: function() {\n return {\n now: new Date(),\n };\n },\n\n methods: {\n refreshTime() {\n this.now = new Date()\n },\n },\n\n mounted: function() {\n this.refreshTime()\n setInterval(this.refreshTime, 1000)\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.date-time {\n .date {\n font-size: 1.3em;\n }\n\n .time {\n font-size: 2em;\n }\n}\n</style>\n","import { render } from \"./Index.vue?vue&type=template&id=ca42eb9c&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=ca42eb9c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-ca42eb9c\"]])\n\nexport default __exports__","<template>\n <div class=\"image-carousel\">\n <Loading v-if=\"!images.length\" />\n <div ref=\"background\" class=\"background\" />\n <img ref=\"img\" :src=\"imgURL\" alt=\"Your carousel images\"\n :style=\"{display: !images.length ? 'none' : 'block'}\">\n\n <div class=\"row info-container\" v-if=\"_showDate || _showTime\">\n <div class=\"col-6 weather-container\">\n <span v-if=\"!_showWeather\">&nbsp;</span>\n <Weather :show-icon=\"_showWeatherIcon\" :show-summary=\"_showWeatherSummary\" :show-temperature=\"_showTemperature\"\n :icon-color=\"weatherIconColor\" :icon-size=\"weatherIconSize\" :animate=\"_animateWeatherIcon\" v-else />\n </div>\n\n <div class=\"col-6 date-time-container\">\n <DateTime :show-date=\"_showDate\" :show-time=\"_showTime\" :show-seconds=\"_showSeconds\"\n v-if=\"_showTime || _showDate\" />\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport Utils from \"@/Utils\";\nimport Loading from \"@/components/Loading\";\nimport DateTime from \"@/components/widgets/DateTime/Index\";\nimport Weather from \"@/components/widgets/Weather/Index\";\n\n/**\n * In order to use the image carousel widget you have to specify one or more\n * resource directories in your backend.http configuration - that's needed to\n * specify the external directories that will be exported through the web server.\n * Example:\n *\n * ```yaml\n * backend.http:\n * resources:\n * carousel: /mnt/hd/photos/albums/carousel\n * ```\n */\nexport default {\n name: \"ImageCarousel\",\n components: {Weather, DateTime, Loading},\n mixins: [Utils],\n props: {\n // Images directory\n imgDir: {\n type: String,\n required: true,\n },\n\n // Refresh interval in seconds.\n refreshSeconds: {\n type: Number,\n default: 15,\n },\n\n // Show the current date on top of the images\n showDate: {\n default: false,\n },\n\n // Show the current time on top of the images\n showTime: {\n default: false,\n },\n\n // If false then don't display the seconds.\n showSeconds: {\n default: false,\n },\n\n // If false then don't display weather info.\n showWeather: {\n default: false,\n },\n\n // If false then temperature won't be displayed.\n showTemperature: {\n default: true,\n },\n\n // If false then don't display the weather state icon.\n showWeatherIcon: {\n default: true,\n },\n\n // If false then don't display the weather summary text.\n showWeatherSummary: {\n default: true,\n },\n\n // Weather icon color.\n weatherIconColor: {\n type: String,\n default: 'white',\n },\n\n // Size of the weather icon in pixels.\n weatherIconSize: {\n type: Number,\n default: 70,\n },\n\n // If false then the weather icon will be animated.\n // Otherwise, it will be a static image.\n animateWeatherIcon: {\n default: true,\n },\n },\n\n data() {\n return {\n images: [],\n currentImage: undefined,\n loading: false,\n }\n },\n\n computed: {\n imgURL() {\n let port = 8008\n if ('backend.http' in this.$root.config && 'port' in this.$root.config['backend.http']) {\n port = this.$root.config['backend.http'].port\n }\n\n return '//' + window.location.hostname + ':' + port + this.currentImage\n },\n\n _showDate() {\n return this.parseBoolean(this.showDate)\n },\n\n _showTime() {\n return this.parseBoolean(this.showTime)\n },\n\n _showSeconds() {\n return this.parseBoolean(this.showSeconds)\n },\n\n _showTemperature() {\n return this.parseBoolean(this.showTemperature)\n },\n\n _showWeather() {\n return this.parseBoolean(this.showWeather)\n },\n\n _showWeatherIcon() {\n return this.parseBoolean(this.showWeatherIcon)\n },\n\n _showWeatherSummary() {\n return this.parseBoolean(this.showWeatherSummary)\n },\n\n _animateWeatherIcon() {\n return this.parseBoolean(this.animateWeatherIcon)\n }\n },\n\n methods: {\n async refresh() {\n if (!this.images.length) {\n this.loading = true\n\n try {\n this.images = await this.request('utils.search_web_directory', {\n directory: this.imgDir,\n extensions: ['.jpg', '.jpeg', '.png'],\n })\n\n this.shuffleImages()\n } finally {\n this.loading = false\n }\n }\n\n if (this.images.length) {\n this.currentImage = this.images.pop()\n }\n },\n\n onNewImage() {\n if (!this.$refs.img)\n return\n\n this.$refs.background.style['background-image'] = 'url(' + this.imgURL + ')'\n this.$refs.img.style.width = 'auto'\n\n if (this.$refs.img.width > this.$refs.img.height) {\n const ratio = this.$refs.img.width / this.$refs.img.height\n if (ratio >= 4/3 && ratio <= 16/9) {\n this.$refs.img.style.width = '100%'\n } else if (ratio <= 4/3) {\n this.$refs.img.style.height = '100%'\n }\n }\n },\n\n shuffleImages() {\n for (let i=this.images.length-1; i > 0; i--) {\n let j = Math.floor(Math.random() * (i+1))\n let x = this.images[i]\n this.images[i] = this.images[j]\n this.images[j] = x\n }\n },\n },\n\n mounted() {\n this.$refs.img.addEventListener('load', this.onNewImage)\n this.$refs.img.addEventListener('error', this.refresh)\n\n this.refresh()\n setInterval(this.refresh, Math.round(this.refreshSeconds * 1000))\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.image-carousel {\n width: calc(100% + 1.5em);\n height: calc(100% + 1.5em);\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: black;\n margin: -0.75em 0.75em 0.75em -0.75em !important;\n\n .background {\n position: absolute;\n top: 0;\n width: 100%;\n height: 100vh;\n background-color: black;\n background-position: center;\n background-size: cover;\n background-repeat: no-repeat;\n filter: blur(13px);\n -webkit-filter: blur(13px);\n }\n\n img {\n position: absolute;\n max-height: 100%;\n z-index: 2;\n }\n}\n\n.info-container {\n width: 100%;\n position: absolute;\n bottom: 0;\n display: flex;\n align-items: flex-end;\n z-index: 10;\n color: white;\n text-shadow: 3px 3px 4px black;\n font-size: 1.25em;\n margin: 0.5em;\n padding: 0 1em;\n\n .date-time {\n text-align: right;\n }\n}\n</style>\n\n<style lang=\"scss\">\n.image-carousel {\n .info-container {\n .weather-container {\n margin-bottom: 0.5em;\n\n .weather {\n font-size: 1.5em;\n }\n\n h1 {\n justify-content: left;\n margin-bottom: -0.5em;\n font-size: 0.8em;\n }\n }\n\n .date-time {\n margin-right: 1em;\n\n .date {\n font-size: 2em;\n }\n\n .time {\n font-size: 4em;\n }\n }\n }\n}\n</style>\n","import { render } from \"./Index.vue?vue&type=template&id=72b02f7c&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=72b02f7c&lang=scss&scoped=true\"\nimport \"./Index.vue?vue&type=style&index=1&id=72b02f7c&lang=scss\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-72b02f7c\"]])\n\nexport default __exports__"],"names":["class","_createElementBlock","_hoisted_1","$options","_showDate","_toDisplayString","_ctx","formatDate","now","_showTime","formatTime","_showSeconds","name","mixins","Utils","props","showDate","required","default","showTime","showSeconds","computed","this","parseBoolean","data","Date","methods","refreshTime","mounted","setInterval","__exports__","render","ref","$data","images","length","_createBlock","_component_Loading","key","_createElementVNode","_hoisted_2","src","imgURL","alt","style","_normalizeStyle","display","_hoisted_4","_hoisted_5","_showWeather","_component_Weather","_showWeatherIcon","_showWeatherSummary","_showTemperature","$props","weatherIconColor","weatherIconSize","animate","_animateWeatherIcon","_hoisted_6","_hoisted_7","_component_DateTime","components","Weather","DateTime","Loading","imgDir","type","String","refreshSeconds","Number","showWeather","showTemperature","showWeatherIcon","showWeatherSummary","animateWeatherIcon","currentImage","undefined","loading","port","$root","config","window","location","hostname","refresh","request","directory","extensions","shuffleImages","pop","onNewImage","$refs","img","background","width","height","ratio","i","j","Math","floor","random","x","addEventListener","round"],"sourceRoot":""}