text: module.exports=function(e){var n={};function t(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:a})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(a,r,function(n){return e[n]}.bind(null,r));return a},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=6)}([function(e,n){e.exports=flarum.core.compat.extend},function(e,n){e.exports=flarum.core.compat["components/SignUpModal"]},function(e,n){e.exports=flarum.core.compat["components/LogInModal"]},,function(e,n){e.exports=flarum.core.compat.app},,function(e,n,t){"use strict";t.r(n);var a=t(0),r=t(4),o=t.n(r),i=t(1),c=t.n(i),d=t(2),l=t.n(d);o.a.initializers.add("ardiansah/login-with-qrcode",(function(){console.log("[ardiansah/login-with-qrcode] Hello, forum!"),Object(a.extend)(c.a.prototype,"body",(function(e){e.forEach((function(e){e.attrs&&"Form Form--centered"==e.attrs.className&&(e.children.splice(e.children.length-1,0,m("div.Form-group",m("canvas",{id:"qr-canvas",hidden:""}),"")),e.children.splice(e.children.length-2,0,m("div.Form-group",{style:{"background-color":"darkblue",padding:"8px","border-radius":"8px"}},m("span",{style:{color:"#f0f0f0"}},"Scan QrCode pada kartu KTA anda untuk melanjutkan prose pendaftaran, pastikan anda telah memberikan izin kamera"))))}))})),Object(a.extend)(c.a.prototype,"onready",(function(){var e=document.getElementsByClassName("Button Button--primary Button--block");e.item(0).style.display="none";var n=document.createElement("video"),t=document.getElementById("qr-canvas"),a=t.getContext("2d"),r=!1;qrcode.callback=function(a){a&&(r=!1,"THE FIRST TWO THOUSAND AND THREE"==a?e.item(0).click():alert("QR code anda tidak sesuai. Harap gunakan QR code dari KTA anda"),n.srcObject.getTracks().forEach((function(e){e.stop()})),t.hidden=!0)};try{navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then((function(e){r=!0,t.hidden=!1,n.setAttribute("playsinline",!0),n.srcObject=e,n.play(),o(),i()})).catch((function(e){alert("anda tidak mengizinkan kamera. Harap berikan izin dan muat ulang halaman ini."),console.log(e)}))}catch(e){alert(e)}function o(){t.height=250,t.width=300,a.drawImage(n,0,0,t.width,t.height),r&&requestAnimationFrame(o)}function i(){try{qrcode.decode()}catch(e){setTimeout(i,300)}}})),Object(a.extend)(l.a.prototype,"body",(function(e){e.forEach((function(e){e.attrs&&"Form Form--centered"==e.attrs.className&&(e.children.splice(e.children.length-1,0,m("div.Form-group",m("canvas",{id:"qr-canvas",hidden:""}),"")),e.children.splice(e.children.length-2,0,m("div.Form-group",{style:{"background-color":"darkblue",padding:"8px","border-radius":"8px"}},m("span",{style:{color:"#f0f0f0"}},"Scan QrCode pada kartu KTA anda untuk melanjutkan prose Login, pastikan anda telah memberikan izin kamera"))))}))})),Object(a.extend)(l.a.prototype,"onready",(function(){var e=document.getElementsByClassName("Button Button--primary Button--block");e.item(0).style.display="none";var n=document.createElement("video"),t=document.getElementById("qr-canvas"),a=t.getContext("2d"),r=!1;qrcode.callback=function(a){a&&(r=!1,"THE FIRST TWO THOUSAND AND THREE"==a?e.item(0).click():alert("QR code anda tidak sesuai. Harap gunakan QR code dari KTA anda"),n.srcObject.getTracks().forEach((function(e){e.stop()})),t.hidden=!0)};try{navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then((function(e){r=!0,t.hidden=!1,n.setAttribute("playsinline",!0),n.srcObject=e,n.play(),o(),i()})).catch((function(e){alert("anda tidak mengizinkan kamera. Harap berikan izin dan muat ulang halaman ini."),console.log(e)}))}catch(e){alert(e)}function o(){t.height=250,t.width=300,a.drawImage(n,0,0,t.width,t.height),r&&requestAnimationFrame(o)}function i(){try{qrcode.decode()}catch(e){setTimeout(i,300)}}}))}))}]);
  //# sourceMappingURL=forum.js.map