!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VueRecaptcha=t()}(this,function(){"use strict";var e=function(){var e=!1,t=[];return{resolved:function(){return e},resolve:function(n){if(!e){e=!0;for(var i=0,r=t.length;i<r;i++)t[i](n)}},promise:{then:function(n){e?n():t.push(n)}}}},t=function(){var t=e();return{notify:function(){t.resolve()},wait:function(){return t.promise},render:function(e,t,n){this.wait().then(function(){n(window.grecaptcha.render(e,t))})},reset:function(e){void 0!==e&&(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.reset(e)}))},execute:function(e){void 0!==e&&(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.execute(e)}))},checkRecaptchaLoad:function(){window.hasOwnProperty("grecaptcha")&&this.notify()},assertLoaded:function(){if(!t.resolved())throw new Error("ReCAPTCHA has not been loaded")}}}();"undefined"!=typeof window&&(window.vueRecaptchaApiLoaded=t.notify);var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};return{name:"VueRecaptcha",props:{sitekey:{type:String,required:!0},theme:{type:String},badge:{type:String},type:{type:String},size:{type:String},tabindex:{type:String}},mounted:function(){var e=this;t.checkRecaptchaLoad();var i=n({},this.$props,{callback:this.emitVerify,"expired-callback":this.emitExpired}),r=this.$slots.default?this.$el.children[0]:this.$el;t.render(r,i,function(t){e.$widgetId=t,e.$emit("render",t)})},methods:{reset:function(){t.reset(this.$widgetId)},execute:function(){t.execute(this.$widgetId)},emitVerify:function(e){this.$emit("verify",e)},emitExpired:function(){this.$emit("expired")}},render:function(e){return e("div",{},this.$slots.default)}}});