MarseyWorld/files/assets/js/hcaptcha.js

2 lines
87 KiB
JavaScript
Raw Normal View History

var hcaptcha=function(){"use strict";function e(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}function t(e){return new this((function(t,n){if(!e||"undefined"==typeof e.length)return n(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);var r=i.length;function o(e,n){if(n&&("object"==typeof n||"function"==typeof n)){var a=n.then;if("function"==typeof a)return void a.call(n,(function(t){o(e,t)}),(function(n){i[e]={status:"rejected",reason:n},0==--r&&t(i)}))}i[e]={status:"fulfilled",value:n},0==--r&&t(i)}for(var a=0;a<i.length;a++)o(a,i[a])}))}var n=setTimeout,i="undefined"!=typeof setImmediate?setImmediate:null;function r(e){return Boolean(e&&"undefined"!=typeof e.length)}function o(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],u(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(r){return void c(t.promise,r)}h(t.promise,i)}else(1===e._state?h:c)(t.promise,e._value)}))):e._deferreds.push(t)}function h(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void l(e);if("function"==typeof n)return void u((i=n,r=t,function(){i.apply(r,arguments)}),e)}e._state=1,e._value=t,l(e)}catch(o){c(e,o)}var i,r}function c(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&a._immediateFn((function(){e._handled||a._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function u(e,t){var n=!1;try{e((function(e){n||(n=!0,h(t,e))}),(function(e){n||(n=!0,c(t,e))}))}catch(i){if(n)return;n=!0,c(t,i)}}a.prototype["catch"]=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(o);return s(this,new d(e,t,n)),n},a.prototype["finally"]=e,a.all=function(e){return new a((function(t,n){if(!r(e))return n(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);var o=i.length;function a(e,r){try{if(r&&("object"==typeof r||"function"==typeof r)){var s=r.then;if("function"==typeof s)return void s.call(r,(function(t){a(e,t)}),n)}i[e]=r,0==--o&&t(i)}catch(h){n(h)}}for(var s=0;s<i.length;s++)a(s,i[s])}))},a.allSettled=t,a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a((function(t){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},a.race=function(e){return new a((function(t,n){if(!r(e))return n(new TypeError("Promise.race accepts an array"));for(var i=0,o=e.length;i<o;i++)a.resolve(e[i]).then(t,n)}))},a._immediateFn="function"==typeof i&&function(e){i(e)}||function(e){n(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var p,f=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();"function"!=typeof f.Promise?f.Promise=a:(f.Promise.prototype["finally"]||(f.Promise.prototype["finally"]=e),f.Promise.allSettled||(f.Promise.allSettled=t)),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){return function(t,n){if(null===this||this===undefined)throw TypeError("Array.prototype.indexOf called on null or undefined");var i=e(this),r=i.length>>>0,o=Math.min(0|n,r);if(o<0)o=Math