{"version":3,"sources":["webpack:///./node_modules/vue-plugin-load-script/index.js","webpack:///./src/lib/Beamer/index.js"],"names":["install","Vue","loadScript","prototype","$loadScript","src","Promise","resolve","reject","shouldAppend","el","document","querySelector","hasAttribute","createElement","type","async","addEventListener","setAttribute","head","appendChild","unloadScript","$unloadScript","removeChild","use","LoadScript","window","beamer_config","product_id","process","selector","delay","then","catch"],"mappings":"iIA+Ce,MA9CI,CACjBA,QAAS,SAAUC,GACjBA,EAAIC,WAAaD,EAAIE,UAAUC,YAAc,SAAUC,GACrD,OAAO,IAAIC,SAAQ,SAAUC,EAASC,GACpC,IAAIC,GAAe,EACfC,EAAKC,SAASC,cAAc,eAAiBP,EAAM,MACvD,GAAKK,GAOA,GAAIA,EAAGG,aAAa,eAEvB,YADAN,EAAQG,QAPRA,EAAKC,SAASG,cAAc,UAC5BJ,EAAGK,KAAO,kBACVL,EAAGM,OAAQ,EACXN,EAAGL,IAAMA,EACTI,GAAe,EAOjBC,EAAGO,iBAAiB,QAAST,GAC7BE,EAAGO,iBAAiB,QAAST,GAC7BE,EAAGO,iBAAiB,QAAQ,WAC1BP,EAAGQ,aAAa,eAAe,GAC/BX,EAAQG,MAGND,GAAcE,SAASQ,KAAKC,YAAYV,OAIhDT,EAAIoB,aAAepB,EAAIE,UAAUmB,cAAgB,SAAUjB,GACzD,OAAO,IAAIC,SAAQ,SAAUC,EAASC,GACpC,MAAME,EAAKC,SAASC,cAAc,eAAiBP,EAAM,MAEpDK,GAKLC,SAASQ,KAAKI,YAAYb,GAE1BH,KANEC,UCjCVP,UAAIuB,IAAIC,GAWNC,OAAOC,cAPa,CAClBC,WAAYC,gBACZC,SAAU,kBACVC,MAAO,KAMT9B,UAAIC,WAAW,gDACZ8B,MAAK,eAGLC,OAAM","file":"assets/js/chunk-2d21e75b.d83d27b4.js","sourcesContent":["/* eslint-env browser */\nconst LoadScript = {\n install: function (Vue) {\n Vue.loadScript = Vue.prototype.$loadScript = function (src) { // eslint-disable-line no-param-reassign\n return new Promise(function (resolve, reject) {\n let shouldAppend = false;\n let el = document.querySelector('script[src=\"' + src + '\"]');\n if (!el) {\n el = document.createElement('script');\n el.type = 'text/javascript';\n el.async = true;\n el.src = src;\n shouldAppend = true;\n }\n else if (el.hasAttribute('data-loaded')) {\n resolve(el);\n return;\n }\n\n el.addEventListener('error', reject);\n el.addEventListener('abort', reject);\n el.addEventListener('load', function loadScriptHandler() {\n el.setAttribute('data-loaded', true);\n resolve(el);\n });\n\n if (shouldAppend) document.head.appendChild(el);\n });\n };\n\n Vue.unloadScript = Vue.prototype.$unloadScript = function (src) { // eslint-disable-line no-param-reassign\n return new Promise(function (resolve, reject) {\n const el = document.querySelector('script[src=\"' + src + '\"]');\n\n if (!el) {\n reject();\n return;\n }\n\n document.head.removeChild(el);\n\n resolve();\n });\n };\n },\n};\n\nexport default LoadScript;\n","import Vue from 'vue';\nimport LoadScript from 'vue-plugin-load-script';\nVue.use(LoadScript);\n\nif (process.env.VUE_APP_BEAMER_ID != '') {\n // GLOBAL variable for older style scripts like (beamers)\n let beamer_config = {\n product_id: process.env.VUE_APP_BEAMER_ID,\n selector: '.beamerSelector',\n delay: 2000,\n };\n\n // communicate using global window variables with th ebeamer api\n window.beamer_config = beamer_config;\n\n Vue.loadScript('https://app.getbeamer.com/js/beamer-embed.js')\n .then(() => {\n // what to do after beamer is loaded\n })\n .catch(() => {\n // Failed to fetch script\n });\n}\n"],"sourceRoot":""}