{"version":3,"sources":["webpack:///./src/views/components/Dialogs/EnrollDialog.vue?1e9d","webpack:///./src/views/components/Dialogs/EnrollDialog.vue?8bd8","webpack:///./src/views/components/Dialogs/EnrollDialog.vue","webpack:///./src/views/components/Dialogs/EnrollDialog.vue?0bf8","webpack:///./src/views/components/Dialogs/EnrollDialog.vue?9a40"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","model","value","callback","$$v","dialog","expression","staticClass","_v","_s","getName","deviceType","imgSrc","_e","actionText","timeLeft","on","close","staticRenderFns","props","type","String","Boolean","default","Number","context","enrollInProgress","progress","EnrollInProgress","emit","StartEnroll","countdownInterval","startCountdown","setInterval","clearInterval","$watch","module","newValue","oldValue","startsWith","useDevice","component","VBtn","VCard","VCardActions","VCardTitle","VDialog","VFlex","VImg","VLayout","VProgressCircular","VSpacer"],"mappings":"2IAAA,W,yCCAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,WAAW,CAACE,MAAM,CAAC,WAAa,GAAG,YAAY,OAAOC,MAAM,CAACC,MAAOR,EAAU,OAAES,SAAS,SAAUC,GAAMV,EAAIW,OAAOD,GAAKE,WAAW,WAAW,CAACR,EAAG,SAAS,CAACS,YAAY,mBAAmB,CAACT,EAAG,eAAe,CAACS,YAAY,2BAA2B,CAACT,EAAG,OAAO,CAACS,YAAY,eAAe,CAACb,EAAIc,GAAG,YAAYd,EAAIe,GAAGf,EAAIgB,QAAQhB,EAAIiB,kBAAkBb,EAAG,MAAM,CAACS,YAAY,QAAQ,CAACT,EAAG,WAAW,CAACE,MAAM,CAAC,IAAM,KAAK,CAACF,EAAG,SAAS,CAACE,MAAM,CAAC,KAAO,GAAG,iBAAiB,GAAG,IAAM,GAAG,eAAe,KAAK,CAACF,EAAG,MAAM,CAACS,YAAY,QAAQ,CAACT,EAAG,QAAQ,CAACE,MAAM,CAAC,SAAW,SAAS,YAA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K,SAAS,IAE1B,eACI,IAAMV,EAAMjB,MACZ,KACQiB,EAAMjB,MACN,OAAY4B,YAAYX,EAAMR,aAE9Be,EAAiBxB,OAAQ,EACzBY,EAAWZ,MAAQ,yBACnBa,EAASb,MAAQ,MAK7B,IAAI6B,EAAoB,KAExB,SAASC,IACLjB,EAASb,MAAQ,GACjBY,EAAWZ,MAAQ,mBACnBwB,EAAiBxB,OAAQ,EAEzB6B,EAAoBE,YAAY,KAC5BlB,EAASb,QACLa,EAASb,OAAS,GAClBgC,cAAcH,GACdA,EAAoB,KACpBd,KAEAH,EAAWZ,MAAQ,oBAExB,KAqBP,OAlBA,OAAYiC,OACRC,GAAUA,EAAOR,iBACjB,CAACS,EAAUC,KACHD,EACKN,GACDC,IAGAlB,EAAWZ,MAAMqC,WAAW,sBAAwBF,IACpDH,cAAcH,GACdA,EAAoB,KACpBd,OAOT,CACHZ,SACAY,QACAH,aACAC,WACAY,WACAD,sBACG,OAAAc,EAAA,YC7H4Z,I,yJCQvaC,EAAY,eACd,EACAhD,EACAyB,GACA,EACA,KACA,WACA,MAIa,aAAAuB,EAAiB,QAchC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,QAAA,KAAMC,aAAA,OAAaC,WAAA,OAAWC,UAAA,KAAQC,QAAA,KAAMC,OAAA,KAAKC,UAAA,KAAQC,oBAAA,KAAkBC,UAAA","file":"js/chunk-3226abeb.2c9f829b.js","sourcesContent":["export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EnrollDialog.vue?vue&type=style&index=0&id=2db6ccb8&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"persistent\":\"\",\"max-width\":\"95%\"},model:{value:(_vm.dialog),callback:function ($$v) {_vm.dialog=$$v},expression:\"dialog\"}},[_c('v-card',{staticClass:\"backgroundWhite\"},[_c('v-card-title',{staticClass:\"headline justify-center\"},[_c('span',{staticClass:\"text-center\"},[_vm._v(\" Pairing \"+_vm._s(_vm.getName(_vm.deviceType)))])]),_c('div',{staticClass:\"pt-2\"},[_c('v-layout',{attrs:{\"row\":\"\"}},[_c('v-flex',{attrs:{\"xs12\":\"\",\"justify-center\":\"\",\"row\":\"\",\"align-center\":\"\"}},[_c('div',{staticClass:\"mb-2\"},[_c('v-img',{attrs:{\"position\":\"center\",\"max-width\":\"100\",\"max-height\":\"150px\",\"Contain\":\"\",\"src\":_vm.imgSrc}})],1)]),_c('v-flex',{staticClass:\"mt-2 mb-2\",attrs:{\"xs12\":\"\",\"justify-center\":\"\",\"row\":\"\",\"align-center\":\"\"}},[(_vm.progress)?[_c('v-progress-circular',{attrs:{\"size\":50,\"color\":\"primary\",\"indeterminate\":\"\"}})]:_vm._e()],2),_c('v-flex',{attrs:{\"xs12\":\"\",\"justify-center\":\"\",\"row\":\"\",\"align-center\":\"\"}},[_c('span',[_vm._v(\" \"+_vm._s(_vm.actionText)+\" \")])]),(_vm.enrollInProgress)?_c('v-flex',{attrs:{\"xs12\":\"\",\"justify-center\":\"\",\"row\":\"\",\"align-center\":\"\"}},[_c('span',[_c('b',[_vm._v(_vm._s(_vm.timeLeft))]),_vm._v(\"s remaining \")])]):_vm._e()],1)],1),_c('v-card-actions',[_c('v-spacer'),_c('v-btn',{attrs:{\"color\":\"green darken-1\",\"text\":\"\"},on:{\"click\":_vm.close}},[_vm._v(\" Cancel \")])],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { defineComponent, computed, ref, watch } from \"@vue/composition-api\";\nimport { enrollState } from \"@/store\";\nimport useDevice from \"@/utilities/useDevice\";\nexport default defineComponent({\n props: {\n imgSrc: { type: String },\n value: { type: Boolean, default: false },\n deviceType: { type: Number, default: 0 }\n },\n setup(props, context) {\n const actionText = ref(\"Preparing enrollment..\");\n const timeLeft = ref(60);\n const enrollInProgress = ref(false);\n const progress = computed(() => !enrollState.EnrollInProgress);\n const dialog = computed(() => {\n return props.value;\n });\n const close = () => {\n actionText.value = \"Preparing enrollment..\";\n timeLeft.value = 60;\n context.emit(\"input\", false);\n };\n watch(\n () => props.value,\n () => {\n if (props.value) {\n enrollState.StartEnroll(props.deviceType);\n } else {\n enrollInProgress.value = false;\n actionText.value = \"Preparing enrollment..\";\n timeLeft.value = 60;\n }\n }\n );\n\n let countdownInterval = null;\n\n function startCountdown() {\n timeLeft.value = 60; // set initial time left to 60 seconds\n actionText.value = \"Ready to enroll!\";\n enrollInProgress.value = true;\n\n countdownInterval = setInterval(() => {\n timeLeft.value--;\n if (timeLeft.value <= 0) {\n clearInterval(countdownInterval);\n countdownInterval = null;\n close();\n } else {\n actionText.value = \"Ready to enroll!\";\n }\n }, 1000);\n }\n\n enrollState.$watch(\n module => module.EnrollInProgress,\n (newValue, oldValue) => {\n if (newValue) {\n if (!countdownInterval) {\n startCountdown();\n }\n } else {\n if (actionText.value.startsWith(\"Ready to enroll!\") && !newValue) {\n clearInterval(countdownInterval);\n countdownInterval = null;\n close();\n }\n }\n }\n );\n\n\n return {\n dialog,\n close,\n actionText,\n timeLeft,\n progress,\n enrollInProgress,\n ...useDevice()\n };\n }\n});\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EnrollDialog.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EnrollDialog.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./EnrollDialog.vue?vue&type=template&id=2db6ccb8&scoped=true&\"\nimport script from \"./EnrollDialog.vue?vue&type=script&lang=ts&\"\nexport * from \"./EnrollDialog.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./EnrollDialog.vue?vue&type=style&index=0&id=2db6ccb8&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2db6ccb8\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VFlex } from 'vuetify/lib/components/VGrid';\nimport { VImg } from 'vuetify/lib/components/VImg';\nimport { VLayout } from 'vuetify/lib/components/VGrid';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardTitle,VDialog,VFlex,VImg,VLayout,VProgressCircular,VSpacer})\n"],"sourceRoot":""}