@paystack/checkout-js 1.10.0-dev.5 → 1.10.0-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/checkout.js CHANGED
@@ -1 +1 @@
1
- var Paystack=function(t){"use strict";var e="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function n(){throw Error("setTimeout has not been defined")}function r(){throw Error("clearTimeout has not been defined")}var i=n,o=r;function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===n||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}"function"==typeof e.setTimeout&&(i=setTimeout),"function"==typeof e.clearTimeout&&(o=clearTimeout);var s,u=[],c=!1,h=-1;function l(){c&&s&&(c=!1,s.length?u=s.concat(u):h=-1,u.length&&f())}function f(){if(!c){var t=a(l);c=!0;for(var e=u.length;e;){for(s=u,u=[];++h<e;)s&&s[h].run();h=-1,e=u.length}s=null,c=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===r||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function p(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var n=1;arguments.length>n;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||c||a(f)}function d(t,e){this.fun=t,this.array=e}d.prototype.run=function(){this.fun.apply(null,this.array)};function g(){}var m=g,y=g,v=g,b=g,T=g,w=g,S=g;var E=e.performance||{},A=E.now||E.mozNow||E.msNow||E.oNow||E.webkitNow||function(){return(new Date).getTime()};var k=new Date;var x={nextTick:p,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:m,addListener:y,once:v,off:b,removeListener:T,removeAllListeners:w,emit:S,binding:function(t){throw Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*A.call(E),n=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(n-=t[0],0>(r-=t[1])&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-k)/1e3}};(function(t,e){for(var n=""+e,r="return "+n,i=n.match(/.*\(([^)]*)\)/)[1],o=/['"]!!!([^'"]*)['"]/g,a=[];;){var s=o.exec(r);if(!s)break;a.push(s)}return a.reverse().forEach(function(e){r=r.slice(0,e.index)+t[e[1]]+r.substr(e.index+e[0].length)}),r=r.replace(/\/\*[^*]*\*\//g," ").replace(/\s+/g," "),Function(i,r)()})({zousan:""+function(t){t=t||"object"==typeof x&&p||"function"==typeof setImmediate&&setImmediate||function(t){setTimeout(t,0)};var e=function(){var e=[],n=0,r=1024;function i(){for(;e.length-n;){try{e[n]()}catch(t){}e[n++]=void 0,n===r&&(e.splice(0,r),n=0)}}return function(r){e.push(r),e.length-n==1&&t(i)}}();function n(t){if(t){var e=this;t(function(t){e.resolve(t)},function(t){e.reject(t)})}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}return n.prototype={resolve:function(t){if(void 0===this.state){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var n=this;if(t&&("function"==typeof t||"object"==typeof t))try{var i=0,o=t.then;if("function"==typeof o)return void o.call(t,function(t){i++||n.resolve(t)},function(t){i++||n.reject(t)})}catch(t){return void(i||this.reject(t))}this.state=r,this.v=t,n.c&&e(function(){for(var e=0,i=n.c.length;i>e;e++)r(n.c[e],t)})}},reject:function(t){if(void 0===this.state){this.state=i,this.v=t;var n=this.c;n&&e(function(){for(var e=0,r=n.length;r>e;e++)i(n[e],t)})}},then:function(t,r){var i=new n,o={y:t,n:r,p:i};if(void 0===this.state)this.c?this.c.push(o):this.c=[o];else{var a=this.state,s=this.v;e(function(){a(o,s)})}return i}},n.resolve=function(t){if(t&&t instanceof n)return t;var e=new n;return e.resolve(t),e},n.reject=function(t){if(t&&t instanceof n)return t;var e=new n;return e.reject(t),e},n.version="2.3.3-nodent",n},thenable:""+function(){function t(t){return t&&t instanceof Object&&"function"==typeof t.then}function e(n,r,i){try{var o=i?i(r):r;if(n===o)return n.reject(new TypeError("Promise resolution loop"));t(o)?o.then(function(t){e(n,t)},function(t){n.reject(t)}):n.resolve(o)}catch(t){n.reject(t)}}function n(t){}function r(){}function i(n,i){var o=new r;try{this._resolver(function(r){return t(r)?r.then(n,i):e(o,r,n)},function(t){e(o,t,i)})}catch(t){e(o,t,i)}return o}function o(t){this._resolver=t,this.then=i}return r.prototype={resolve:n,reject:n,then:function(t,e){this.resolve=t,this.reject=e}},o.resolve=function(t){return o.isThenable(t)?t:{then:function(e){return e(t)}}},o.isThenable=t,o}},function t(e,n){function r(){return i.apply(e,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:t,enumerable:!1,configurable:!0,writable:!0}),t.trampoline||(t.trampoline=function(t,e,n,r,i){return function o(a){for(;a;){if(a.then)return a=a.then(o,r),i?void 0:a;try{if(a.pop){if(a.length)return a.pop()?e.call(t):a;a=n}else a=a.call(t)}catch(t){return r(t)}}}}),t.LazyThenable||(t.LazyThenable="!!!thenable"(),t.EagerThenable=t.Thenable=(t.EagerThenableFactory="!!!zousan")());var i=this;switch(n){case!0:return new t.Thenable(r);case 0:return new t.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(e,arguments)}catch(t){return n(t)}}}})(),function t(e,n){if(Function.prototype.$asyncspawn||Object.defineProperty(Function.prototype,"$asyncspawn",{value:t,enumerable:!1,configurable:!0,writable:!0}),this instanceof Function){var r=this;return new e(function(t,e){var i=r.call(n,t,e);!function n(r,o){var a;try{if((a=r.call(i,o)).done){if(a.value!==t){if(a.value&&a.value===a.value.then)return a.value(t,e);t&&t(a.value),t=null}return}a.value.then?a.value.then(function(t){n(i.next,t)},function(t){n(i.throw,t)}):n(i.next,a.value)}catch(t){return e&&e(t),void(e=null)}}(i.next)})}}();var C=function(t,e){return function(){for(var n=Array(arguments.length),r=0;n.length>r;r++)n[r]=arguments[r];return t.apply(e,n)}},B=Object.prototype.toString;function D(t){return"[object Array]"===B.call(t)}function O(t){return void 0===t}function P(t){return null!==t&&"object"==typeof t}function R(t){if("[object Object]"!==B.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function I(t){return"[object Function]"===B.call(t)}function N(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),D(t))for(var n=0,r=t.length;r>n;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}var M={isArray:D,isArrayBuffer:function(t){return"[object ArrayBuffer]"===B.call(t)},isBuffer:function(t){return null!==t&&!O(t)&&null!==t.constructor&&!O(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:P,isPlainObject:R,isUndefined:O,isDate:function(t){return"[object Date]"===B.call(t)},isFile:function(t){return"[object File]"===B.call(t)},isBlob:function(t){return"[object Blob]"===B.call(t)},isFunction:I,isStream:function(t){return P(t)&&I(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:N,merge:function t(){var e={};function n(n,r){e[r]=R(e[r])&&R(n)?t(e[r],n):R(n)?t({},n):D(n)?n.slice():n}for(var r=0,i=arguments.length;i>r;r++)N(arguments[r],n);return e},extend:function(t,e,n){return N(e,function(e,r){t[r]=n&&"function"==typeof e?C(e,n):e}),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}};function _(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var V=function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(M.isURLSearchParams(e))r=""+e;else{var i=[];M.forEach(e,function(t,e){null!==t&&void 0!==t&&(M.isArray(t)?e+="[]":t=[t],M.forEach(t,function(t){M.isDate(t)?t=t.toISOString():M.isObject(t)&&(t=JSON.stringify(t)),i.push(_(e)+"="+_(t))}))}),r=i.join("&")}if(r){var o=t.indexOf("#");-1!==o&&(t=t.slice(0,o)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t};function j(){this.handlers=[]}j.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},j.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},j.prototype.forEach=function(t){M.forEach(this.handlers,function(e){null!==e&&t(e)})};var L=j,U=function(t,e){M.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})},F=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t},q=function(t,e,n,r,i){return F(Error(t),e,n,r,i)},H=function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(q("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)},z=M.isStandardBrowserEnv()?{write:function(t,e,n,r,i,o){var a=[];a.push(t+"="+encodeURIComponent(e)),M.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),M.isString(r)&&a.push("path="+r),M.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},G=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],K=function(t){var e,n,r,i={};return t?(M.forEach(t.split("\n"),function(t){if(r=t.indexOf(":"),e=M.trim(t.substr(0,r)).toLowerCase(),n=M.trim(t.substr(r+1)),e){if(i[e]&&G.indexOf(e)>=0)return;i[e]="set-cookie"===e?(i[e]?i[e]:[]).concat([n]):i[e]?i[e]+", "+n:n}}),i):i},X=M.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=r(window.location.href),function(e){var n=M.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},W=function(t){return new Promise(function(e,n){var r=t.data,i=t.headers,o=t.responseType;M.isFormData(r)&&delete i["Content-Type"];var a=new XMLHttpRequest;t.auth&&(i.Authorization="Basic "+btoa((t.auth.username||"")+":"+(t.auth.password?unescape(encodeURIComponent(t.auth.password)):"")));var s,u,c=(u=t.url,(s=t.baseURL)&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(u)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(s,u):u);function h(){if(a){var r="getAllResponseHeaders"in a?K(a.getAllResponseHeaders()):null;H(e,n,{data:o&&"text"!==o&&"json"!==o?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:r,config:t,request:a}),a=null}}if(a.open(t.method.toUpperCase(),V(c,t.params,t.paramsSerializer),!0),a.timeout=t.timeout,"onloadend"in a?a.onloadend=h:a.onreadystatechange=function(){a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))&&setTimeout(h)},a.onabort=function(){a&&(n(q("Request aborted",t,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(q("Network Error",t,null,a)),a=null},a.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(q(e,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",a)),a=null},M.isStandardBrowserEnv()){var l=(t.withCredentials||X(c))&&t.xsrfCookieName?z.read(t.xsrfCookieName):void 0;l&&(i[t.xsrfHeaderName]=l)}"setRequestHeader"in a&&M.forEach(i,function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete i[e]:a.setRequestHeader(e,t)}),M.isUndefined(t.withCredentials)||(a.withCredentials=!!t.withCredentials),o&&"json"!==o&&(a.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&a.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){a&&(a.abort(),n(t),a=null)}),r||(r=null),a.send(r)})},Z={"Content-Type":"application/x-www-form-urlencoded"};function J(t,e){!M.isUndefined(t)&&M.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var Y,$={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?Y=W:void 0!==x&&"[object process]"===Object.prototype.toString.call(x)&&(Y=W),Y),transformRequest:[function(t,e){return U(e,"Accept"),U(e,"Content-Type"),M.isFormData(t)||M.isArrayBuffer(t)||M.isBuffer(t)||M.isStream(t)||M.isFile(t)||M.isBlob(t)?t:M.isArrayBufferView(t)?t.buffer:M.isURLSearchParams(t)?(J(e,"application/x-www-form-urlencoded;charset=utf-8"),""+t):M.isObject(t)||e&&"application/json"===e["Content-Type"]?(J(e,"application/json"),JSON.stringify(t)):t}],transformResponse:[function(t){var e=this.transitional,n=!(e&&e.silentJSONParsing)&&"json"===this.responseType;if(n||e&&e.forcedJSONParsing&&M.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw F(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&300>t}};$.headers={common:{Accept:"application/json, text/plain, */*"}},M.forEach(["delete","get","head"],function(t){$.headers[t]={}}),M.forEach(["post","put","patch"],function(t){$.headers[t]=M.merge(Z)});var Q=$,tt=function(t,e,n){var r=this||Q;return M.forEach(n,function(n){t=n.call(r,t,e)}),t},et=function(t){return!(!t||!t.__CANCEL__)};function nt(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var rt=function(t){return nt(t),t.headers=t.headers||{},t.data=tt.call(t,t.data,t.headers,t.transformRequest),t.headers=M.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),M.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||Q.adapter)(t).then(function(e){return nt(t),e.data=tt.call(t,e.data,e.headers,t.transformResponse),e},function(e){return et(e)||(nt(t),e&&e.response&&(e.response.data=tt.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})},it=function(t,e){e=e||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(t,e){return M.isPlainObject(t)&&M.isPlainObject(e)?M.merge(t,e):M.isPlainObject(e)?M.merge({},e):M.isArray(e)?e.slice():e}function u(r){M.isUndefined(e[r])?M.isUndefined(t[r])||(n[r]=s(void 0,t[r])):n[r]=s(t[r],e[r])}M.forEach(r,function(t){M.isUndefined(e[t])||(n[t]=s(void 0,e[t]))}),M.forEach(i,u),M.forEach(o,function(r){M.isUndefined(e[r])?M.isUndefined(t[r])||(n[r]=s(void 0,t[r])):n[r]=s(void 0,e[r])}),M.forEach(a,function(r){r in e?n[r]=s(t[r],e[r]):r in t&&(n[r]=s(void 0,t[r]))});var c=r.concat(i).concat(o).concat(a),h=Object.keys(t).concat(Object.keys(e)).filter(function(t){return-1===c.indexOf(t)});return M.forEach(h,u),n},ot="Promise based HTTP client for the browser and node.js",at={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},st={type:"git",url:"https://github.com/axios/axios.git"},ut=["xhr","http","ajax","promise","node"],ct={url:"https://github.com/axios/axios/issues"},ht={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},lt={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},ft="dist/axios.min.js",pt={"follow-redirects":"^1.14.0"},dt=[{path:"./dist/axios.min.js",threshold:"5kB"}],gt="https://registry.npmjs.org/axios/-/axios-0.21.2.tgz",mt="sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg==",yt={name:"axios",version:"0.21.2",description:ot,main:"index.js",scripts:at,repository:st,keywords:ut,author:"Matt Zabriskie",license:"MIT",bugs:ct,homepage:"https://axios-http.com",devDependencies:ht,browser:lt,jsdelivr:"dist/axios.min.js",unpkg:ft,typings:"./index.d.ts",dependencies:pt,bundlesize:dt,_resolved:gt,_integrity:mt,_from:"axios@0.21.2"},vt=Object.freeze({name:"axios",version:"0.21.2",description:ot,main:"index.js",scripts:at,repository:st,keywords:ut,author:"Matt Zabriskie",license:"MIT",bugs:ct,homepage:"https://axios-http.com",devDependencies:ht,browser:lt,jsdelivr:"dist/axios.min.js",unpkg:ft,typings:"./index.d.ts",dependencies:pt,bundlesize:dt,_resolved:gt,_integrity:mt,_from:"axios@0.21.2",default:yt}),bt=vt&&yt||vt,Tt={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Tt[t]=function(n){return typeof n===t||"a"+(1>e?"n ":" ")+t}});var wt={},St=bt.version.split(".");function Et(t,e){for(var n=e?e.split("."):St,r=t.split("."),i=0;3>i;i++){if(n[i]>r[i])return!0;if(r[i]>n[i])return!1}return!1}Tt.transitional=function(t,e,n){var r=e&&Et(e);function i(t,e){return"[Axios v"+bt.version+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,o,a){if(!1===t)throw Error(i(o," has been removed in "+e));return r&&!wt[o]&&(wt[o]=!0,console.warn(i(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,a)}};var At={isOlderVersion:Et,assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var o=r[i],a=e[o];if(a){var s=t[o],u=void 0===s||a(s,o,t);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:Tt},kt=At.validators;function xt(t){this.defaults=t,this.interceptors={request:new L,response:new L}}xt.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=it(this.defaults,t)).method=t.method?t.method.toLowerCase():this.defaults.method?this.defaults.method.toLowerCase():"get";var e=t.transitional;void 0!==e&&At.assertOptions(e,{silentJSONParsing:kt.transitional(kt.boolean,"1.0.0"),forcedJSONParsing:kt.transitional(kt.boolean,"1.0.0"),clarifyTimeoutError:kt.transitional(kt.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))});var i,o=[];if(this.interceptors.response.forEach(function(t){o.push(t.fulfilled,t.rejected)}),!r){var a=[rt,void 0];for(Array.prototype.unshift.apply(a,n),a.concat(o),i=Promise.resolve(t);a.length;)i=i.then(a.shift(),a.shift());return i}for(var s=t;n.length;){var u=n.shift(),c=n.shift();try{s=u(s)}catch(t){c(t);break}}try{i=rt(s)}catch(t){return Promise.reject(t)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},xt.prototype.getUri=function(t){return t=it(this.defaults,t),V(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},M.forEach(["delete","get","head","options"],function(t){xt.prototype[t]=function(e,n){return this.request(it(n||{},{method:t,url:e,data:(n||{}).data}))}}),M.forEach(["post","put","patch"],function(t){xt.prototype[t]=function(e,n,r){return this.request(it(r||{},{method:t,url:e,data:n}))}});var Ct=xt;function Bt(t){this.message=t}Bt.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Bt.prototype.__CANCEL__=!0;var Dt=Bt;function Ot(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new Dt(t),e(n.reason))})}Ot.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Ot.source=function(){var t;return{token:new Ot(function(e){t=e}),cancel:t}};var Pt=Ot;function Rt(t){var e=new Ct(t),n=C(Ct.prototype.request,e);return M.extend(n,Ct.prototype,e),M.extend(n,e),n}var It=Rt(Q);It.Axios=Ct,It.create=function(t){return Rt(it(It.defaults,t))},It.Cancel=Dt,It.CancelToken=Pt,It.isCancel=et,It.all=function(t){return Promise.all(t)},It.spread=function(t){return function(e){return t.apply(null,e)}},It.isAxiosError=function(t){return"object"==typeof t&&!0===t.isAxiosError};var Nt=It;Nt.default=It;var Mt=Nt,_t=Object.prototype.hasOwnProperty,Vt=Array.isArray,jt=function(){for(var t=[],e=0;256>e;++e)t.push("%"+((16>e?"0":"")+e.toString(16)).toUpperCase());return t}(),Lt=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;t.length>r;++r)void 0!==t[r]&&(n[r]=t[r]);return n},Ut={arrayToObject:Lt,assign:function(t,e){return Object.keys(e).reduce(function(t,n){return t[n]=e[n],t},t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;e.length>r;++r)for(var i=e[r],o=i.obj[i.prop],a=Object.keys(o),s=0;a.length>s;++s){var u=a[s],c=o[u];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(e.push({obj:o,prop:u}),n.push(c))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(Vt(n)){for(var r=[],i=0;n.length>i;++i)void 0!==n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n){if(0===t.length)return t;var r="string"==typeof t?t:t+"";if("iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"});for(var i="",o=0;r.length>o;++o){var a=r.charCodeAt(o);45!==a&&46!==a&&95!==a&&126!==a&&(48>a||a>57)&&(65>a||a>90)&&(97>a||a>122)?128>a?i+=jt[a]:2048>a?i+=jt[192|a>>6]+jt[128|63&a]:a>=55296&&57344>a?(a=65536+((1023&a)<<10|1023&r.charCodeAt(o+=1)),i+=jt[240|a>>18]+jt[128|a>>12&63]+jt[128|a>>6&63]+jt[128|63&a]):i+=jt[224|a>>12]+jt[128|a>>6&63]+jt[128|63&a]:i+=r.charAt(o)}return i},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},merge:function t(e,n,r){if(!n)return e;if("object"!=typeof n){if(Vt(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!_t.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var i=e;return Vt(e)&&!Vt(n)&&(i=Lt(e,r)),Vt(e)&&Vt(n)?(n.forEach(function(n,i){if(_t.call(e,i)){var o=e[i];o&&"object"==typeof o&&n&&"object"==typeof n?e[i]=t(o,n,r):e.push(n)}else e[i]=n}),e):Object.keys(n).reduce(function(e,i){var o=n[i];return e[i]=_t.call(e,i)?t(e[i],o,r):o,e},i)}},Ft=String.prototype.replace,qt=/%20/g,Ht={default:"RFC3986",formatters:{RFC1738:function(t){return Ft.call(t,qt,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"},zt=Object.prototype.hasOwnProperty,Gt={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},Kt=Array.isArray,Xt=Array.prototype.push,Wt=function(t,e){Xt.apply(t,Kt(e)?e:[e])},Zt=Date.prototype.toISOString,Jt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ut.encode,encodeValuesOnly:!1,formatter:Ht.formatters[Ht.default],indices:!1,serializeDate:function(t){return Zt.call(t)},skipNulls:!1,strictNullHandling:!1},Yt=function t(e,n,r,i,o,a,s,u,c,h,l,f,p){var d=e;if("function"==typeof s?d=s(n,d):d instanceof Date?d=h(d):"comma"===r&&Kt(d)&&(d=d.join(",")),null===d){if(i)return a&&!f?a(n,Jt.encoder,p):n;d=""}if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||Ut.isBuffer(d))return a?[l(f?n:a(n,Jt.encoder,p))+"="+l(a(d,Jt.encoder,p))]:[l(n)+"="+l(d+"")];var g,m=[];if(void 0===d)return m;if(Kt(s))g=s;else{var y=Object.keys(d);g=u?y.sort(u):y}for(var v=0;g.length>v;++v){var b=g[v];o&&null===d[b]||(Kt(d)?Wt(m,t(d[b],"function"==typeof r?r(n,b):n,r,i,o,a,s,u,c,h,l,f,p)):Wt(m,t(d[b],n+(c?"."+b:"["+b+"]"),r,i,o,a,s,u,c,h,l,f,p)))}return m},$t=function(t,e){var n,r=t,i=function(t){if(!t)return Jt;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||Jt.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Ht.default;if(void 0!==t.format){if(!zt.call(Ht.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=Ht.formatters[n],i=Jt.filter;return("function"==typeof t.filter||Kt(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:Jt.addQueryPrefix,allowDots:void 0===t.allowDots?Jt.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:Jt.charsetSentinel,delimiter:void 0===t.delimiter?Jt.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:Jt.encode,encoder:"function"==typeof t.encoder?t.encoder:Jt.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:Jt.encodeValuesOnly,filter:i,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:Jt.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:Jt.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:Jt.strictNullHandling}}(e);"function"==typeof i.filter?r=(0,i.filter)("",r):Kt(i.filter)&&(n=i.filter);var o=[];if("object"!=typeof r||null===r)return"";var a=Gt[e&&e.arrayFormat in Gt?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices"];n||(n=Object.keys(r)),i.sort&&n.sort(i.sort);for(var s=0;n.length>s;++s){var u=n[s];i.skipNulls&&null===r[u]||Wt(o,Yt(r[u],u,a,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.formatter,i.encodeValuesOnly,i.charset))}var c=o.join(i.delimiter),h=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&(h+="iso-8859-1"===i.charset?"utf8=%26%2310003%3B&":"utf8=%E2%9C%93&"),c.length>0?h+c:""},Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te=function(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,o){try{var a=e[i](o),s=a.value}catch(t){return void n(t)}if(!a.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}},ee=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ne=function(){function t(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),re=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ie=function(t,e){var n={};for(var r in t)0>e.indexOf(r)&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},oe=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},ae=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),se=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);t.length>e;e++)n[e]=t[e];return n}return Array.from(t)},ue=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(t).filter(function(e){return![void 0,null].includes(t[e])}).reduce(function(e,n){return re({},e,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,t[n]))},{})},ce=Mt.create({paramsSerializer:function(t){var e=ue(t);return $t(e,{arrayFormat:"brackets"})}}),he={cookieTestUrl:"https://legacy-staging.paystack.co/test-iframe/start.html",publishableKey:"uFmz/uE/SDT6GupOrSEXIZXGByjQ0zFkPyc9LqKHFqnTI0WPN3JS5kQPo/j9or0TOXlqMQj2lzHn/UGsQT4XeQ==",publicKey:"-----BEGIN PUBLIC KEY-----\r\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALhZs/7hP0g0+hrqTq0hFyGVxgco0NMx\r\nZD8nPS6ihxap0yNFjzdyUuZED6P4/aK9Ezl5ajEI9pcx5/1BrEE+F3kCAwEAAQ==\r\n-----END PUBLIC KEY-----"},le=re({},he,{checkoutUrl:"http://localhost:8080/",paymentBaseUrl:"https://legacy-staging.paystack.co/",paystackApiUrl:"https://studio-api.paystack.co/",pusherKey:"1c7b262ee18455815893",pusherUrl:"https://s3-eu-west-1.amazonaws.com/pstk-public-files/js/pusher.min.js"}),fe=re({},he,{checkoutUrl:"https://checkout-studio.paystack.com/",paymentBaseUrl:"https://legacy-staging.paystack.co/",paystackApiUrl:"https://studio-api.paystack.co/",pusherKey:"1c7b262ee18455815893",pusherUrl:"https://s3-eu-west-1.amazonaws.com/pstk-public-files/js/pusher.min.js"}),pe=re({},he,{checkoutUrl:"https://checkout.paystack.com/",paymentBaseUrl:"https://standard.paystack.co/",paystackApiUrl:"https://api.paystack.co/",pusherKey:"8e4b9b7ca3418bd5cdc8",pusherUrl:"https://checkout.paystack.com/static/vendor/pusher.min.js"}),de=void 0;switch((window||x.env).paystackEnvironment){case"dev":de=le;break;case"staging":de=fe;break;default:de=pe}var ge=de,me={success:function(t){var e=t.message,n=ie(t,["message","status","errors"]);return{status:"success",message:e||"Successful",data:n}},pending:function(t){var e=t.message,n=ie(t,["message","status","errors"]);return{status:"pending",message:e||"Payment in progress",data:n}},transferCreditRequest:function(t){var e=t.message,n=t.status,r=ie(t,["message","status","errors"]);return{status:n,message:e||"Transfer credit request",data:r}},incorrectAmountSent:function(t){var e=t.message,n=t.status,r=ie(t,["message","status","errors"]);return{status:n,message:e||"Incorrect amount sent",data:r}},auth:function(t){return{status:"auth",message:t.otpmessage||t.message||"Authentication required",data:re({auth:t.auth},t.countryCode&&{countryCode:t.countryCode},t.openInNewTab&&{openInNewTab:t.openInNewTab},t.length&&{length:t.length})}},requery:function(t){return{status:"requery",message:t.message||"Requery"}},requestCustomField:function(t){return{status:"custom_field",message:t.message,data:{type:t.type,format:t.format,field:t.field}}},error:function(t){var e={status:"failed",message:t.message||"Failed",errors:t.errors||[]};return t.bank&&(e.bank=t.bank),e},parse:function(t){var e="object"===(void 0===t?"undefined":Qt(t))?t:{};if(e.data&&"object"===Qt(e.data)&&(Object.assign(e,e.data),delete e.data),["true",!0,"success"].includes(e.status))return this.success(e);if("pending"===e.status)return this.pending(e);if("requery"===e.status)return this.requery(e);if("send"===e.status)return this.requestCustomField(e);if(["transfer-credit-request-received","transfer-credit-request-pending","transfer-credit-request-rejected"].includes(e.status))return this.transferCreditRequest(e);if("incorrect-amount-sent"===e.status)this.incorrectAmountSent(e);else if(e.auth&&"none"!==e.auth)return this.auth(e);return this.error(e)}},ye=function(t){return ce.get(ge.paystackApiUrl+"checkout/request_inline",{params:t}).then(function(t){return t.data})},ve=function(t){return ce.get(ge.paystackApiUrl+"transaction/verify_access_code/"+t).then(function(t){return t.data})},be=function(t){return ce.get(ge.paystackApiUrl+"transaction/verify/"+t).then(function(t){return t.data})},Te=function(t){return ce.get(ge.paymentBaseUrl+"charge/requery/"+t).then(function(t){return me.parse(t.data)})},we=function(t){return ce.patch(ge.paystackApiUrl+"transaction/"+t.transactionId+"/mark-as-abandoned",{},{headers:{Authorization:"Bearer "+t.publicKey}}).then(function(t){return t.data})};var Se=function(t){for(var e,n=0,r=!1,i=t.length-1;i>=0;)e=parseInt(t.charAt(i),10),r&&(e*=2)>9&&(e=e%10+1),r=!r,n+=e,i--;return n%10==0},Ee={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[624,626],[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[622019,622999],[62207,62209],[622126,622925],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}};var Ae=function(t){return t?JSON.parse(JSON.stringify(t)):null};var ke=function(t){if(function(t){var e=t.filter(function(t){return t.matchStrength}).length;return e>0&&e===t.length}(t))return t.reduce(function(t,e){return t?e.matchStrength>t.matchStrength?e:t:e})};var xe=function(t){return"string"==typeof t||t instanceof String};var Ce=function(t,e){return Array.isArray(e)?function(t,e,n){var r=t.substr(0,(e+"").length),i=parseInt(r,10);return e=parseInt((e+"").substr(0,r.length),10),n=parseInt((n+"").substr(0,r.length),10),i>=e&&n>=i}(t,e[0],e[1]):function(t,e){return(e+="").substring(0,t.length)===t.substring(0,e.length)}(t,e)};var Be,De=function(t,e,n){var r,i,o,a;for(r=0;e.patterns.length>r;r++)if(Ce(t,i=e.patterns[r])){a=Ae(e),(o=Array.isArray(i)?(i[0]+"").length:(i+"").length)>t.length||(a.matchStrength=o),n.push(a);break}},Oe={},Pe={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},Re=[Pe.VISA,Pe.MASTERCARD,Pe.AMERICAN_EXPRESS,Pe.DINERS_CLUB,Pe.DISCOVER,Pe.JCB,Pe.UNIONPAY,Pe.MAESTRO,Pe.ELO,Pe.MIR,Pe.HIPER,Pe.HIPERCARD];function Ie(t){return Oe[t]||Ee[t]}function Ne(t,e){var n=Be.indexOf(t);if(!e&&-1===n)throw Error('"'+t+'" is not a supported card type.');return n}function Me(t){var e,n=[];return xe(t)?0===t.length?Be.map(function(t){return Ae(Ie(t))}):(Be.forEach(function(e){var r=Ie(e);De(t,r,n)}),(e=ke(n))?[e]:n):[]}Be=Ae(Re),Me.getTypeInfo=function(t){return Ae(Ie(t))},Me.removeCard=function(t){var e=Ne(t);Be.splice(e,1)},Me.addCard=function(t){var e=Ne(t.type,!0);Oe[t.type]=t,-1===e&&Be.push(t.type)},Me.updateCard=function(t,e){var n,r=Oe[t]||Ee[t];if(!r)throw Error('"'+t+'" is not a recognized type. Use `addCard` instead.');if(e.type&&r.type!==e.type)throw Error("Cannot overwrite type parameter.");n=Ae(r,!0),Object.keys(n).forEach(function(t){e[t]&&(n[t]=e[t])}),Oe[n.type]=n},Me.changeOrder=function(t,e){var n=Ne(t);Be.splice(n,1),Be.splice(e,0,t)},Me.resetModifications=function(){Be=Ae(Re),Oe={}},Me.types=Pe;var _e=Me;function Ve(t,e,n){return{card:t,isPotentiallyValid:e,isValid:n}}var je=19;function Le(t,e,n){return{isValid:t,isPotentiallyValid:e,isCurrentYear:n||!1}}var Ue=function(t,e){var n,r,i,o,a;return e=e||je,"string"!=typeof t?Le(!1,!1):""===t.replace(/\s/g,"")?Le(!1,!0):/^\d*$/.test(t)?2>(r=t.length)?Le(!1,!0):(n=(new Date).getFullYear(),3===r?Le(!1,t.slice(0,2)===(n+"").slice(0,2)):r>4?Le(!1,!1):(t=parseInt(t,10),i=+(n+"").substr(2,2),2===r?(a=i===t,o=t>=i&&i+e>=t):4===r&&(a=n===t,o=t>=n&&n+e>=t),Le(o,o,a))):Le(!1,!1)},Fe=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};var qe=function(t){var e,n,r,i,o;return/^\d{4}-\d{1,2}$/.test(t)?t=t.split("-").reverse():/\//.test(t)?t=t.split(/\s*\/\s*/g):/\s/.test(t)&&(t=t.split(/ +/g)),Fe(t)?{month:t[0]||"",year:t.slice(1).join()}:(n=0==(o=+(r=t)[0])?2:o>1?1:1===o&&+r[1]>2?1:1===o?(i=r.substr(1),Ue(i).isPotentiallyValid?1:2):5===r.length?1:r.length>5?2:1,{month:e=t.substr(0,n),year:t.substr(e.length)})};function He(t,e,n){return{isValid:t,isPotentiallyValid:e,isValidForThisYear:n||!1}}var ze=function(t){var e,n,r=(new Date).getMonth()+1;return"string"!=typeof t?He(!1,!1):""===t.replace(/\s/g,"")||"0"===t?He(!1,!0):/^\d*$/.test(t)?(e=parseInt(t,10),isNaN(t)?He(!1,!1):He(n=e>0&&13>e,n,n&&e>=r)):He(!1,!1)};function Ge(t,e,n,r){return{isValid:t,isPotentiallyValid:e,month:n,year:r}}var Ke=3;function Xe(t,e){return{isValid:t,isPotentiallyValid:e}}var We=3;function Ze(t,e){return{isValid:t,isPotentiallyValid:e}}var Je={number:function(t,e){var n,r,i,o,a;if(e=e||{},"number"==typeof t&&(t+=""),"string"!=typeof t)return Ve(null,!1,!1);if(t=t.replace(/\-|\s/g,""),!/^\d*$/.test(t))return Ve(null,!1,!1);if(0===(n=_e(t)).length)return Ve(null,!1,!1);if(1!==n.length)return Ve(null,!0,!1);if(r=n[0],e.maxLength&&t.length>e.maxLength)return Ve(r,!1,!1);for(i=r.type===_e.types.UNIONPAY&&!0!==e.luhnValidateUnionPay||Se(t),a=Math.max.apply(null,r.lengths),e.maxLength&&(a=Math.min(e.maxLength,a)),o=0;r.lengths.length>o;o++)if(r.lengths[o]===t.length)return Ve(r,a>t.length||i,i);return Ve(r,a>t.length,!1)},expirationDate:function(t,e){var n,r,i,o;if("string"==typeof t)t=t.replace(/^(\d\d) (\d\d(\d\d)?)$/,"$1/$2"),n=qe(t);else{if(null===t||"object"!=typeof t)return Ge(!1,!1,null,null);n={month:t.month+"",year:t.year+""}}if(r=ze(n.month),i=Ue(n.year,e),r.isValid){if(i.isCurrentYear)return Ge(o=r.isValidForThisYear,o,n.month,n.year);if(i.isValid)return Ge(!0,!0,n.month,n.year)}return Ge(!1,!(!r.isPotentiallyValid||!i.isPotentiallyValid),null,null)},expirationMonth:ze,expirationYear:Ue,cvv:function(t,e){return e=(e=e||Ke)instanceof Array?e:[e],"string"!=typeof t?Xe(!1,!1):/^\d*$/.test(t)?function(t,e){for(var n=0;t.length>n;n++)if(e===t[n])return!0;return!1}(e,t.length)?Xe(!0,!0):t.length<Math.min.apply(null,e)?Xe(!1,!0):t.length>function(t){for(var e=Ke,n=0;t.length>n;n++)e=t[n]>e?t[n]:e;return e}(e)?Xe(!1,!1):Xe(!0,!0):Xe(!1,!1)},postalCode:function(t,e){var n;return n=(e=e||{}).minLength||We,"string"!=typeof t?Ze(!1,!1):Ze(t.length>=n,!0)},creditCardType:_e},Ye=[{type:"bank_auth",name:"Bank authorization",number:"4084080000000409",cvv:"000",month:"01",year:"30"},{type:"success",name:"Success",number:"4084084084084081",cvv:"408",month:"12",year:"30"},{type:"declined",name:"Declined",number:"4084080000005408",cvv:"001",month:"12",year:"30"},{type:"pin",name:"Pin only validation",number:"507850785078507812",cvv:"884",month:"01",year:"30"},{type:"pin+otp",name:"Pin and OTP validation",number:"5060666666666666666",cvv:"123",month:"01",year:"30"},{type:"pin+phone+otp",name:"Pin, phone and OTP validation",number:"507850785078507812",cvv:"884",month:"01",year:"30"},{type:"default",name:"No validation",number:"4084084084084081",cvv:"408",month:"01",year:"30"}],$e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Qe(t,e){return t(e={exports:{}},e.exports),e.exports}var tn,en=Qe(function(t,e){!function(t){var e="0123456789abcdefghijklmnopqrstuvwxyz";function n(t){return e.charAt(t)}function r(t,e){return t&e}function i(t,e){return t|e}function o(t,e){return t^e}function a(t,e){return t&~e}function s(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function u(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h="=";function l(t){var e,n,r="";for(e=0;t.length>=e+3;e+=3)n=parseInt(t.substring(e,e+3),16),r+=c.charAt(n>>6)+c.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=c.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=c.charAt(n>>2)+c.charAt((3&n)<<4));(3&r.length)>0;)r+=h;return r}function f(t){var e,r="",i=0,o=0;for(e=0;t.length>e&&t.charAt(e)!=h;++e){var a=c.indexOf(t.charAt(e));0>a||(0==i?(r+=n(a>>2),o=3&a,i=1):1==i?(r+=n(o<<2|a>>4),o=15&a,i=2):2==i?(r+=n(o),r+=n(a>>2),o=3&a,i=3):(r+=n(o<<2|a>>4),r+=n(15&a),i=0))}return 1==i&&(r+=n(o<<2)),r}var p,d,g=function(t,e){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},m={decode:function(t){var e;if(void 0===p){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(p={},e=0;16>e;++e)p[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;16>e;++e)p[n.charAt(e)]=e;for(e=0;8>e;++e)p[r.charAt(e)]=-1}var i=[],o=0,a=0;for(e=0;t.length>e;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=p[s])){if(void 0===s)throw Error("Illegal character at offset "+e);o|=s,2>++a?o<<=4:(i[i.length]=o,o=0,a=0)}}if(a)throw Error("Hex encoding incomplete: 4 bits missing");return i}},y={decode:function(t){var e;if(void 0===d){var n="= \f\n\r\t \u2028\u2029";for(d=Object.create(null),e=0;64>e;++e)d["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(e=0;9>e;++e)d[n.charAt(e)]=-1}var r=[],i=0,o=0;for(e=0;t.length>e;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=d[a])){if(void 0===a)throw Error("Illegal character at offset "+e);i|=a,4>++o?i<<=6:(r[r.length]=i>>16,r[r.length]=i>>8&255,r[r.length]=255&i,i=0,o=0)}}switch(o){case 1:throw Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=i>>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=y.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw Error("RegExp out of sync");t=e[2]}return y.decode(t)}},v=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,r,i=this.buf,o=i.length;for(n=0;o>n;++n)1e13>(r=i[n]*t+e)?e=0:r-=1e13*(e=0|r/1e13),i[n]=r;e>0&&(i[n]=e)},t.prototype.sub=function(t){var e,n,r=this.buf,i=r.length;for(e=0;i>e;++e)0>(n=r[e]-t)?(n+=1e13,t=1):t=0,r[e]=n;for(;0===r[r.length-1];)r.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw Error("only base 10 is supported");for(var e=this.buf,n=""+e[e.length-1],r=e.length-2;r>=0;--r)n+=(""+(1e13+e[r])).substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;n>=0;--n)e=1e13*e+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),b="…",T=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,w=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function S(t,e){return t.length>e&&(t=t.substring(0,e)+b),t}var E,A=function(){function t(e,n){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=n)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,n){for(var r="",i=t;e>i;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},t.prototype.isASCII=function(t,e){for(var n=t;e>n;++n){var r=this.get(n);if(32>r||r>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var n="",r=t;e>r;++r)n+=String.fromCharCode(this.get(r));return n},t.prototype.parseStringUTF=function(t,e){for(var n="",r=t;e>r;){var i=this.get(r++);n+=String.fromCharCode(128>i?i:i>191&&224>i?(31&i)<<6|63&this.get(r++):(15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},t.prototype.parseStringBMP=function(t,e){for(var n,r,i="",o=t;e>o;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},t.prototype.parseTime=function(t,e,n){var r=this.parseStringISO(t,e),i=(n?T:w).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=70>+i[1]?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},t.prototype.parseInteger=function(t,e){for(var n,r=this.get(t),i=r>127,o=i?255:0,a="";r==o&&++t<e;)r=this.get(t);if(0==(n=e-t))return i?-1:0;if(n>4){for(a=r,n<<=3;0==(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)\n"}i&&(r-=256);for(var s=new v(r),u=t+1;e>u;++u)s.mulAdd(256,this.get(u));return a+""+s},t.prototype.parseBitString=function(t,e,n){for(var r=this.get(t),i=(e-t-1<<3)-r,o="("+i+" bit)\n",a="",s=t+1;e>s;++s){for(var u=this.get(s),c=s==e-1?r:0,h=7;h>=c;--h)a+=u>>h&1?"1":"0";if(a.length>n)return o+S(a,n)}return o+a},t.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return S(this.parseStringISO(t,e),n);var r=e-t,i="("+r+" byte)\n";r>(n/=2)&&(e=t+n);for(var o=t;e>o;++o)i+=this.hexByte(this.get(o));return r>n&&(i+=b),i},t.prototype.parseOID=function(t,e,n){for(var r="",i=new v,o=0,a=t;e>a;++a){var s=this.get(a);if(i.mulAdd(128,127&s),o+=7,!(128&s)){if(""===r)if((i=i.simplify())instanceof v)i.sub(80),r="2."+i;else{var u=80>i?40>i?0:1:2;r=u+"."+(i-40*u)}else r+="."+i;if(r.length>n)return S(r,n);i=new v,o=0}}return o>0&&(r+=".incomplete"),r},t}(),k=function(){function t(t,e,n,r,i){if(!(r instanceof x))throw Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=r,this.sub=i}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber;case 1:return"Application_"+this.tag.tagNumber;case 2:return"["+this.tag.tagNumber+"]";case 3:return"Private_"+this.tag.tagNumber}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return S(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return S(this.stream.parseStringISO(e,e+n),t);case 30:return S(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(0>this.length||(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var n=0,r=this.sub.length;r>n;++n)e+=this.sub[n].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(n>6)throw Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;e=0;for(var r=0;n>r;++r)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},t.decode=function(e){var n;n=e instanceof A?e:new A(e,0);var r=new A(n),i=new x(n),o=t.decodeLength(n),a=n.pos,s=a-r.pos,u=null,c=function(){var e=[];if(null!==o){for(var r=a+o;r>n.pos;)e[e.length]=t.decode(n);if(n.pos!=r)throw Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var i=t.decode(n);if(i.tag.isEOC())break;e[e.length]=i}o=a-n.pos}catch(t){throw Error("Exception while decoding undefined length content: "+t)}return e};if(i.tagConstructed)u=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw Error("BIT STRINGs with unused bits cannot encapsulate.");u=c();for(var h=0;u.length>h;++h)if(u[h].tag.isEOC())throw Error("EOC is not supposed to be actual content.")}catch(t){u=null}if(null===u){if(null===o)throw Error("We can't skip over an invalid tag with undefined length at offset "+a);n.pos=a+Math.abs(o)}return new t(r,s,o,i,u)},t}(),x=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var n=new v;do{e=t.get(),n.mulAdd(128,127&e)}while(128&e);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],B=(1<<26)/C[C.length-1],D=function(){function t(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):this.fromString(t,null==e&&"string"!=typeof t?256:e))}return t.prototype.toString=function(t){if(0>this.s)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<<e)-1,o=!1,a="",s=this.t,u=this.DB-s*this.DB%e;if(s-- >0)for(this.DB>u&&(r=this[s]>>u)>0&&(o=!0,a=n(r));s>=0;)e>u?(r=(this[s]&(1<<u)-1)<<e-u,r|=this[--s]>>(u+=this.DB-e)):(r=this[s]>>(u-=e)&i,u>0||(u+=this.DB,--s)),r>0&&(o=!0),o&&(a+=n(r));return o?a:"0"},t.prototype.negate=function(){var e=N();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return 0>this.s?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return 0>this.s?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},t.prototype.bitLength=function(){return this.t>0?this.DB*(this.t-1)+F(this[this.t-1]^this.s&this.DM):0},t.prototype.mod=function(e){var n=N();return this.abs().divRemTo(e,null,n),0>this.s&&n.compareTo(t.ZERO)>0&&e.subTo(n,n),n},t.prototype.modPowInt=function(t,e){var n;return n=256>t||e.isEven()?new P(e):new R(e),this.exp(t,n)},t.prototype.clone=function(){var t=N();return this.copyTo(t),t},t.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this[0]?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(this.DB>r&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)8>r?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r>0||(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return 0>this.compareTo(t)?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=N();return this.bitwiseTo(t,r,e),e},t.prototype.or=function(t){var e=N();return this.bitwiseTo(t,i,e),e},t.prototype.xor=function(t){var e=N();return this.bitwiseTo(t,o,e),e},t.prototype.andNot=function(t){var e=N();return this.bitwiseTo(t,a,e),e},t.prototype.not=function(){for(var t=N(),e=0;this.t>e;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=N();return 0>t?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=N();return 0>t?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;this.t>t;++t)if(0!=this[t])return t*this.DB+s(this[t]);return 0>this.s?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;this.t>n;++n)t+=u(this[n]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return this.t>e?0!=(this[e]&1<<t%this.DB):0!=this.s},t.prototype.setBit=function(t){return this.changeBit(t,i)},t.prototype.clearBit=function(t){return this.changeBit(t,a)},t.prototype.flipBit=function(t){return this.changeBit(t,o)},t.prototype.add=function(t){var e=N();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=N();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=N();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=N();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=N();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=N(),n=N();return this.divRemTo(t,e,n),[e,n]},t.prototype.modPow=function(t,e){var n,r,i=t.bitLength(),o=U(1);if(0>=i)return o;n=18>i?1:48>i?3:144>i?4:768>i?5:6,r=8>i?new P(e):e.isEven()?new I(e):new R(e);var a=[],s=3,u=n-1,c=(1<<n)-1;if(a[1]=r.convert(this),n>1){var h=N();for(r.sqrTo(a[1],h);c>=s;)a[s]=N(),r.mulTo(h,a[s-2],a[s]),s+=2}var l,f,p=t.t-1,d=!0,g=N();for(i=F(t[p])-1;p>=0;){for(u>i?(l=(t[p]&(1<<i+1)-1)<<u-i,p>0&&(l|=t[p-1]>>this.DB+i-u)):l=t[p]>>i-u&c,s=n;0==(1&l);)l>>=1,--s;if(0>(i-=s)&&(i+=this.DB,--p),d)a[l].copyTo(o),d=!1;else{for(;s>1;)r.sqrTo(o,g),r.sqrTo(g,o),s-=2;s>0?r.sqrTo(o,g):(f=o,o=g,g=f),r.mulTo(g,a[l],o)}for(;p>=0&&0==(t[p]&1<<i);)r.sqrTo(o,g),f=o,o=g,g=f,0>--i&&(i=this.DB-1,--p)}return r.revert(o)},t.prototype.modInverse=function(e){var n=e.isEven();if(this.isEven()&&n||0==e.signum())return t.ZERO;for(var r=e.clone(),i=this.clone(),o=U(1),a=U(0),s=U(0),u=U(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),n?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);0>r.compareTo(i)?(i.subTo(r,i),n&&s.subTo(o,s),u.subTo(a,u)):(r.subTo(i,r),n&&o.subTo(s,o),a.subTo(u,a))}return 0!=i.compareTo(t.ONE)?t.ZERO:0>u.compareTo(e)?0>u.signum()?(u.addTo(e,u),0>u.signum()?u.add(e):u):u:u.subtract(e)},t.prototype.pow=function(t){return this.exp(t,new O)},t.prototype.gcd=function(t){var e=0>this.s?this.negate():this.clone(),n=0>t.s?t.negate():t.clone();if(0>e.compareTo(n)){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(0>o)return e;for(o>i&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),0>e.compareTo(n)?(n.subTo(e,n),n.rShiftTo(1,n)):(e.subTo(n,e),e.rShiftTo(1,e));return o>0&&n.lShiftTo(o,n),n},t.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&C[C.length-1]>=n[0]){for(e=0;C.length>e;++e)if(n[0]==C[e])return!0;return!1}if(n.isEven())return!1;for(e=1;C.length>e;){for(var r=C[e],i=e+1;C.length>i&&B>r;)r*=C[i++];for(r=n.modInt(r);i>e;)if(r%C[e++]==0)return!1}return n.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=0>t?-1:0,t>0?this[0]=t:-1>t?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(e,n);r=2}this.t=0,this.s=0;for(var i=e.length,o=!1,a=0;--i>=0;){var s=8==r?255&+e[i]:L(e,i);0>s?"-"==e.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,this.DB>(a+=r)||(a-=this.DB))}8==r&&0!=(128&+e[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var n=t;this.t>n;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(t/this.DB),a=this.s<<n&this.DM,s=this.t-1;s>=0;--s)e[s+o+1]=this[s]>>r|a,a=(this[s]&i)<<n;for(var s=o-1;s>=0;--s)e[s]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(this.t>n){var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(var a=n+1;this.t>a;++a)e[a-n-1]|=(this[a]&o)<<i,e[a-n]=this[a]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}else e.t=0},t.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);i>n;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(this.t>t.t){for(r-=t.s;this.t>n;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;t.t>n;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=0>r?-1:0,-1>r?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},t.prototype.multiplyTo=function(e,n){var r=this.abs(),i=e.abs(),o=r.t;for(n.t=o+i.t;--o>=0;)n[o]=0;for(o=0;i.t>o;++o)n[o+r.t]=r.am(0,i[o],n,o,0,r.t);n.s=0,n.clamp(),this.s!=e.s&&t.ZERO.subTo(n,n)},t.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;e.t-1>n;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))<e.DV||(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,n,r){var i=e.abs();if(i.t>0){var o=this.abs();if(i.t>o.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=N());var a=N(),s=this.s,u=e.s,c=this.DB-F(i[i.t-1]);c>0?(i.lShiftTo(c,a),o.lShiftTo(c,r)):(i.copyTo(a),o.copyTo(r));var h=a.t,l=a[h-1];if(0!=l){var f=l*(1<<this.F1)+(h>1?a[h-2]>>this.F2:0),p=this.FV/f,d=(1<<this.F1)/f,g=1<<this.F2,m=r.t,y=m-h,v=null==n?N():n;for(a.dlShiftTo(y,v),0>r.compareTo(v)||(r[r.t++]=1,r.subTo(v,r)),t.ONE.dlShiftTo(h,v),v.subTo(a,a);h>a.t;)a[a.t++]=0;for(;--y>=0;){var b=r[--m]==l?this.DM:Math.floor(r[m]*p+(r[m-1]+g)*d);if((r[m]+=a.am(0,b,r,y,0,h))<b)for(a.dlShiftTo(y,v),r.subTo(v,r);r[m]<--b;)r.subTo(v,r)}null!=n&&(r.drShiftTo(h,n),s!=u&&t.ZERO.subTo(n,n)),r.t=h,r.clamp(),c>0&&r.rShiftTo(c,r),0>s&&t.ZERO.subTo(r,r)}}},t.prototype.invDigit=function(){if(1>this.t)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,n){if(e>4294967295||1>e)return t.ONE;var r=N(),i=N(),o=n.convert(this),a=F(e)-1;for(o.copyTo(r);--a>=0;)if(n.sqrTo(r,i),(e&1<<a)>0)n.mulTo(i,o,r);else{var s=r;r=i,i=s}return n.revert(r)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||2>t||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=U(n),i=N(),o=N(),a="";for(this.divRemTo(r,i,o);i.signum()>0;)a=(n+o.intValue()).toString(t).substr(1)+a,i.divRemTo(r,i,o);return o.intValue().toString(t)+a},t.prototype.fromRadix=function(e,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),o=!1,a=0,s=0,u=0;e.length>u;++u){var c=L(e,u);0>c?"-"==e.charAt(u)&&0==this.signum()&&(o=!0):(s=n*s+c,++a<r||(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(s,0)),o&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,n,r){if("number"==typeof n)if(2>e)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),i,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var o=[],a=7&e;o.length=1+(e>>3),n.nextBytes(o),a>0?o[0]&=(1<<a)-1:o[0]=0,this.fromString(o,256)}},t.prototype.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;o>r;++r)n[r]=e(this[r],t[r]);if(this.t>t.t){for(i=t.s&this.DM,r=o;this.t>r;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;t.t>r;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},t.prototype.changeBit=function(e,n){var r=t.ONE.shiftLeft(e);return this.bitwiseTo(r,n,r),r},t.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);i>n;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(this.t>t.t){for(r+=t.s;this.t>n;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;t.t>n;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=0>r?-1:0,r>0?e[n++]=r:-1>r&&(e[n++]=this.DV+r),e.t=n,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;e>=this.t;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e<this.t||(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;i>r;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(var i=Math.min(t.t,e);i>r;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()},t.prototype.multiplyUpperTo=function(t,e,n){var r=n.t=this.t+t.t- --e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);t.t>r;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},t.prototype.modInt=function(t){if(0>=t)return 0;var e=this.DV%t,n=0>this.s?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},t.prototype.millerRabin=function(e){var n=this.subtract(t.ONE),r=n.getLowestSetBit();if(0>=r)return!1;var i=n.shiftRight(r);(e=e+1>>1)>C.length&&(e=C.length);for(var o=N(),a=0;e>a;++a){o.fromInt(C[Math.floor(Math.random()*C.length)]);var s=o.modPow(i,this);if(0!=s.compareTo(t.ONE)&&0!=s.compareTo(n)){for(var u=1;u++<r&&0!=s.compareTo(n);)if(0==(s=s.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=s.compareTo(n))return!1}}return!0},t.prototype.square=function(){var t=N();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var n=0>this.s?this.negate():this.clone(),r=0>t.s?t.negate():t.clone();if(0>n.compareTo(r)){var i=n;n=r,r=i}var o=n.getLowestSetBit(),a=r.getLowestSetBit();if(0>a)e(n);else{a>o&&(a=o),a>0&&(n.rShiftTo(a,n),r.rShiftTo(a,r));var s=function(){(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),0>n.compareTo(r)?(r.subTo(n,r),r.rShiftTo(1,r)):(n.subTo(r,n),n.rShiftTo(1,n)),n.signum()>0?setTimeout(s,0):(a>0&&r.lShiftTo(a,r),setTimeout(function(){e(r)},0))};setTimeout(s,10)}},t.prototype.fromNumberAsync=function(e,n,r,o){if("number"==typeof n)if(2>e)this.fromInt(1);else{this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),i,this),this.isEven()&&this.dAddOffset(1,0);var a=this,s=function(){a.dAddOffset(2,0),a.bitLength()>e&&a.subTo(t.ONE.shiftLeft(e-1),a),a.isProbablePrime(n)?setTimeout(function(){o()},0):setTimeout(s,0)};setTimeout(s,0)}else{var u=[],c=7&e;u.length=1+(e>>3),n.nextBytes(u),c>0?u[0]&=(1<<c)-1:u[0]=0,this.fromString(u,256)}},t}(),O=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),P=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return 0>t.s||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),R=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=N();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),0>t.s&&e.compareTo(D.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=N();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;this.mt2>=t.t;)t[t.t++]=0;for(var e=0;this.m.t>e;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),0>t.compareTo(this.m)||t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),I=function(){function t(t){this.m=t,this.r2=N(),this.q3=N(),D.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(0>t.s||t.t>2*this.m.t)return t.mod(this.m);if(0>t.compareTo(this.m))return t;var e=N();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>t.compareTo(this.r2);)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function N(){return new D(null)}function M(t,e){return new D(t,e)}"Microsoft Internet Explorer"==navigator.appName?(D.prototype.am=function(t,e,n,r,i,o){for(var a=32767&e,s=e>>15;--o>=0;){var u=32767&this[t],c=this[t++]>>15,h=s*u+c*a;i=((u=a*u+((32767&h)<<15)+n[r]+(1073741823&i))>>>30)+(h>>>15)+s*c+(i>>>30),n[r++]=1073741823&u}return i},E=30):"Netscape"!=navigator.appName?(D.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var a=e*this[t++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i},E=26):(D.prototype.am=function(t,e,n,r,i,o){for(var a=16383&e,s=e>>14;--o>=0;){var u=16383&this[t],c=this[t++]>>14,h=s*u+c*a;i=((u=a*u+((16383&h)<<14)+n[r]+i)>>28)+(h>>14)+s*c,n[r++]=268435455&u}return i},E=28),D.prototype.DB=E,D.prototype.DM=(1<<E)-1,D.prototype.DV=1<<E,D.prototype.FV=Math.pow(2,52),D.prototype.F1=52-E,D.prototype.F2=2*E-52;var _,V,j=[];for(_=48,V=0;9>=V;++V)j[_++]=V;for(_=97,V=10;36>V;++V)j[_++]=V;for(_=65,V=10;36>V;++V)j[_++]=V;function L(t,e){var n=j[t.charCodeAt(e)];return null==n?-1:n}function U(t){var e=N();return e.fromInt(t),e}function F(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}D.ZERO=U(0),D.ONE=U(1);var q,H,z=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,r;for(e=0;256>e;++e)this.S[e]=e;for(n=0,e=0;256>e;++e)r=this.S[e],this.S[e]=this.S[n=n+this.S[e]+t[e%t.length]&255],this.S[n]=r;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),G=256,K=null;if(null==K){K=[],H=0;var X=void 0;if(window.crypto&&window.crypto.getRandomValues){var W=new Uint32Array(256);for(window.crypto.getRandomValues(W),X=0;W.length>X;++X)K[H++]=255&W[X]}var Z=function(t){if(this.count=this.count||0,256>this.count&&G>H)try{var e=t.x+t.y;K[H++]=255&e,this.count+=1}catch(t){}else window.removeEventListener?window.removeEventListener("mousemove",Z,!1):window.detachEvent&&window.detachEvent("onmousemove",Z)};window.addEventListener?window.addEventListener("mousemove",Z,!1):window.attachEvent&&window.attachEvent("onmousemove",Z)}function J(){if(null==q){for(q=new z;G>H;){var t=Math.floor(65536*Math.random());K[H++]=255&t}for(q.init(K),H=0;K.length>H;++H)K[H]=0;H=0}return q.next()}var Y=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;t.length>e;++e)t[e]=J()},t}(),$=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);0>e.compareTo(n);)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=M(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=function(t,e){if(t.length+11>e)return console.error("Message too long for RSA"),null;for(var n=[],r=t.length-1;r>=0&&e>0;){var i=t.charCodeAt(r--);128>i?n[--e]=i:i>127&&2048>i?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var o=new Y,a=[];e>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--e]=a[0]}return n[--e]=2,n[--e]=0,new D(n)}(t,this.n.bitLength()+7>>3);if(null==e)return null;var n=this.doPublic(e);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=M(t,16),this.e=parseInt(e,16),this.d=M(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,r,i,o,a,s){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=M(t,16),this.e=parseInt(e,16),this.d=M(n,16),this.p=M(r,16),this.q=M(i,16),this.dmp1=M(o,16),this.dmq1=M(a,16),this.coeff=M(s,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new Y,r=t>>1;this.e=parseInt(e,16);for(var i=new D(e,16);;){for(;this.p=new D(t-r,1,n),0!=this.p.subtract(D.ONE).gcd(i).compareTo(D.ONE)||!this.p.isProbablePrime(10););for(;this.q=new D(r,1,n),0!=this.q.subtract(D.ONE).gcd(i).compareTo(D.ONE)||!this.q.isProbablePrime(10););if(0>=this.p.compareTo(this.q)){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(D.ONE),s=this.q.subtract(D.ONE),u=a.multiply(s);if(0==u.gcd(i).compareTo(D.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(u),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=M(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){for(var n=t.toByteArray(),r=0;n.length>r&&0==n[r];)++r;if(n.length-r!=e-1||2!=n[r])return null;for(++r;0!=n[r];)if(++r>=n.length)return null;for(var i="";++r<n.length;){var o=255&n[r];128>o?i+=String.fromCharCode(o):o>191&&224>o?(i+=String.fromCharCode((31&o)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&o)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,n){var r=new Y,i=t>>1;this.e=parseInt(e,16);var o=new D(e,16),a=this,s=function(){var e=function(){if(0>=a.p.compareTo(a.q)){var t=a.p;a.p=a.q,a.q=t}var e=a.p.subtract(D.ONE),r=a.q.subtract(D.ONE),i=e.multiply(r);0==i.gcd(o).compareTo(D.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(e),a.dmq1=a.d.mod(r),a.coeff=a.q.modInverse(a.p),setTimeout(function(){n()},0)):setTimeout(s,0)},u=function(){a.q=N(),a.q.fromNumberAsync(i,1,r,function(){a.q.subtract(D.ONE).gcda(o,function(t){0==t.compareTo(D.ONE)&&a.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(u,0)})})},c=function(){a.p=N(),a.p.fromNumberAsync(t-i,1,r,function(){a.p.subtract(D.ONE).gcda(o,function(t){0==t.compareTo(D.ONE)&&a.p.isProbablePrime(10)?setTimeout(u,0):setTimeout(c,0)})})};setTimeout(c,0)};setTimeout(s,0)},t.prototype.sign=function(t,e,n){var r=Q[n]||"",i=r+""+e(t),o=function(t,e){if(t.length+22>e)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,r="",i=0;n>i;i+=2)r+="ff";return M("0001"+r+"00"+t,16)}(i,this.n.bitLength()/4);if(null==o)return null;var a=this.doPrivate(o);if(null==a)return null;var s=a.toString(16);return 0==(1&s.length)?s:"0"+s},t.prototype.verify=function(t,e,n){var r=M(e,16),i=this.doPublic(r);if(null==i)return null;var o=i.toString(16).replace(/^1f+00/,""),a=function(t){for(var e in Q)if(Q.hasOwnProperty(e)){var n=Q[e],r=n.length;if(t.substr(0,r)==n)return t.substr(r)}return t}(o);return a==""+n(t)},t}(),Q={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},tt={};tt.lang={extend:function(t,e,n){if(!e||!t)throw Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var i;for(i in n)t.prototype[i]=n[i];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(i=0;a.length>i;i+=1){var n=a[i],r=e[n];"function"==typeof r&&r!=Object.prototype[n]&&(t[n]=r)}})}catch(t){}o(t.prototype,n)}}};var et={};void 0!==et.asn1&&et.asn1||(et.asn1={}),et.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1),r=n.length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",o=0;r>o;o++)i+="f";var a=new D(i,16),s=a.xor(t).add(D.ONE);e=s.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=et,n=e.asn1,r=n.DERBoolean,i=n.DERInteger,o=n.DERBitString,a=n.DEROctetString,s=n.DERNull,u=n.DERObjectIdentifier,c=n.DEREnumerated,h=n.DERUTF8String,l=n.DERNumericString,f=n.DERPrintableString,p=n.DERTeletexString,d=n.DERIA5String,g=n.DERUTCTime,m=n.DERGeneralizedTime,y=n.DERSequence,v=n.DERSet,b=n.DERTaggedObject,T=n.ASN1Util.newObject,w=Object.keys(t);if(1!=w.length)throw"key of param shall be only one.";var S=w[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+S+":"))throw"undefined key: "+S;if("bool"==S)return new r(t[S]);if("int"==S)return new i(t[S]);if("bitstr"==S)return new o(t[S]);if("octstr"==S)return new a(t[S]);if("null"==S)return new s(t[S]);if("oid"==S)return new u(t[S]);if("enum"==S)return new c(t[S]);if("utf8str"==S)return new h(t[S]);if("numstr"==S)return new l(t[S]);if("prnstr"==S)return new f(t[S]);if("telstr"==S)return new p(t[S]);if("ia5str"==S)return new d(t[S]);if("utctime"==S)return new g(t[S]);if("gentime"==S)return new m(t[S]);if("seq"==S){for(var E=t[S],A=[],k=0;E.length>k;k++){var x=T(E[k]);A.push(x)}return new y({array:A})}if("set"==S){for(var E=t[S],A=[],k=0;E.length>k;k++){var x=T(E[k]);A.push(x)}return new v({array:A})}if("tag"==S){var C=t[S];if("[object Array]"===Object.prototype.toString.call(C)&&3==C.length){var B=T(C[2]);return new b({tag:C[0],explicit:C[1],obj:B})}var D={};if(void 0!==C.explicit&&(D.explicit=C.explicit),void 0!==C.tag&&(D.tag=C.tag),void 0===C.obj)throw"obj shall be specified for 'tag'.";return D.obj=T(C.obj),new b(D)}},this.jsonToASN1HEX=function(t){var e=this.newObject(t);return e.getEncodedHex()}},et.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),r=Math.floor(n/40),i=n%40,e=r+"."+i,o="",a=2;t.length>a;a+=2){var s=parseInt(t.substr(a,2),16),u=("00000000"+s.toString(2)).slice(-8);if(o+=u.substr(1,7),"0"==u.substr(0,1)){var c=new D(o,2);e=e+"."+c.toString(10),o=""}}return e},et.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new D(t,10),i=r.toString(2),o=7-i.length%7;7==o&&(o=0);for(var a="",s=0;o>s;s++)a+="0";i=a+i;for(var s=0;i.length-1>s;s+=7){var u=i.substr(s,7);s!=i.length-7&&(u="1"+u),n+=e(parseInt(u,2))}return n};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var a=0;i.length>a;a++)r+=n(i[a]);return r},et.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),128>t)return e;var n=e.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);var r=128+n;return r.toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},et.asn1.DERAbstractString=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},tt.lang.extend(et.asn1.DERAbstractString,et.asn1.ASN1Object),et.asn1.DERAbstractTime=function(t){et.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e},this.formatDate=function(t,e,n){var r=this.zeroPadding,i=this.localDateToUTC(t),o=i.getFullYear()+"";"utc"==e&&(o=o.substr(2,2));var a=r(i.getMonth()+1+"",2),s=r(i.getDate()+"",2),u=r(i.getHours()+"",2),c=r(i.getMinutes()+"",2),h=r(i.getSeconds()+"",2),l=o+a+s+u+c+h;if(!0===n){var f=i.getMilliseconds();if(0!=f){var p=r(f+"",3);p=p.replace(/[0]+$/,""),l=l+"."+p}}return l+"Z"},this.zeroPadding=function(t,e){return e>t.length?Array(e-t.length+1).join("0")+t:t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,o){var a=new Date(Date.UTC(t,e-1,n,r,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},tt.lang.extend(et.asn1.DERAbstractTime,et.asn1.ASN1Object),et.asn1.DERAbstractStructured=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=[],void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},tt.lang.extend(et.asn1.DERAbstractStructured,et.asn1.ASN1Object),et.asn1.DERBoolean=function(){et.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},tt.lang.extend(et.asn1.DERBoolean,et.asn1.ASN1Object),et.asn1.DERInteger=function(t){et.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(t+"",10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DERInteger,et.asn1.ASN1Object),et.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}et.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(0>t||t>7)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;e>=n;n++)t+="0";for(var r="",n=0;t.length-1>n;n+=8){var i=t.substr(n,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),r+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",n=0;t.length>n;n++)e+=1==t[n]?"1":"0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=Array(t),n=0;t>n;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},tt.lang.extend(et.asn1.DERBitString,et.asn1.ASN1Object),et.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}et.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},tt.lang.extend(et.asn1.DEROctetString,et.asn1.DERAbstractString),et.asn1.DERNull=function(){et.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},tt.lang.extend(et.asn1.DERNull,et.asn1.ASN1Object),et.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new D(t,10),i=r.toString(2),o=7-i.length%7;7==o&&(o=0);for(var a="",s=0;o>s;s++)a+="0";i=a+i;for(var s=0;i.length-1>s;s+=7){var u=i.substr(s,7);s!=i.length-7&&(u="1"+u),n+=e(parseInt(u,2))}return n};et.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var a=0;i.length>a;a++)r+=n(i[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(t){var e=et.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},tt.lang.extend(et.asn1.DERObjectIdentifier,et.asn1.ASN1Object),et.asn1.DEREnumerated=function(t){et.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(t+"",10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DEREnumerated,et.asn1.ASN1Object),et.asn1.DERUTF8String=function(t){et.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},tt.lang.extend(et.asn1.DERUTF8String,et.asn1.DERAbstractString),et.asn1.DERNumericString=function(t){et.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},tt.lang.extend(et.asn1.DERNumericString,et.asn1.DERAbstractString),et.asn1.DERPrintableString=function(t){et.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},tt.lang.extend(et.asn1.DERPrintableString,et.asn1.DERAbstractString),et.asn1.DERTeletexString=function(t){et.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},tt.lang.extend(et.asn1.DERTeletexString,et.asn1.DERAbstractString),et.asn1.DERIA5String=function(t){et.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},tt.lang.extend(et.asn1.DERIA5String,et.asn1.DERAbstractString),et.asn1.DERUTCTime=function(t){et.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},tt.lang.extend(et.asn1.DERUTCTime,et.asn1.DERAbstractTime),et.asn1.DERGeneralizedTime=function(t){et.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},tt.lang.extend(et.asn1.DERGeneralizedTime,et.asn1.DERAbstractTime),et.asn1.DERSequence=function(t){et.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;this.asn1Array.length>e;e++){var n=this.asn1Array[e];t+=n.getEncodedHex()}return this.hV=t,this.hV}},tt.lang.extend(et.asn1.DERSequence,et.asn1.DERAbstractStructured),et.asn1.DERSet=function(t){et.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=[],e=0;this.asn1Array.length>e;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},tt.lang.extend(et.asn1.DERSet,et.asn1.DERAbstractStructured),et.asn1.DERTaggedObject=function(t){et.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},tt.lang.extend(et.asn1.DERTaggedObject,et.asn1.ASN1Object);var nt=function(t){function e(n){var r=t.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(e.hasPrivateKeyProperty(n)||e.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return function(t,e){function n(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.parseKey=function(t){try{var e=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?m.decode(t):y.unarmor(t),i=k.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){e=i.sub[1].getHexStringValue(),this.n=M(e,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=i.sub[3].getHexStringValue();this.d=M(o,16);var a=i.sub[4].getHexStringValue();this.p=M(a,16);var s=i.sub[5].getHexStringValue();this.q=M(s,16);var u=i.sub[6].getHexStringValue();this.dmp1=M(u,16);var c=i.sub[7].getHexStringValue();this.dmq1=M(c,16);var h=i.sub[8].getHexStringValue();this.coeff=M(h,16)}else{if(2!==i.sub.length)return!1;var l=i.sub[1],f=l.sub[0];e=f.sub[0].getHexStringValue(),this.n=M(e,16),n=f.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new et.asn1.DERInteger({int:0}),new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e}),new et.asn1.DERInteger({bigint:this.d}),new et.asn1.DERInteger({bigint:this.p}),new et.asn1.DERInteger({bigint:this.q}),new et.asn1.DERInteger({bigint:this.dmp1}),new et.asn1.DERInteger({bigint:this.dmq1}),new et.asn1.DERInteger({bigint:this.coeff})]},e=new et.asn1.DERSequence(t);return e.getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return l(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new et.asn1.DERSequence({array:[new et.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new et.asn1.DERNull]}),e=new et.asn1.DERSequence({array:[new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e})]}),n=new et.asn1.DERBitString({hex:"00"+e.getEncodedHex()}),r=new et.asn1.DERSequence({array:[t,n]});return r.getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return l(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(e=e||64,!t)return t;var n="(.{1,"+e+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}($),rt=function(){function t(t){this.default_key_size=parseInt((t=t||{}).default_key_size,10)||1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new nt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(f(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return l(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return l(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,f(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new nt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version="3.0.0-rc.1",t}();window.JSEncrypt=rt,t.JSEncrypt=rt,t.default=rt,Object.defineProperty(t,"__esModule",{value:!0})}(e)});(tn=en)&&tn.__esModule&&Object.prototype.hasOwnProperty.call(tn,"default");var nn=en.JSEncrypt;function rn(t){var e=new nn;return e.setPublicKey(ge.publicKey),e.encrypt(t)}Je.creditCardType.addCard({niceType:"Verve",type:"verve",patterns:[[506e3,507999],[65e4,650009]],gaps:[4,8,12,16],lengths:[16,18,19],code:{name:"CVV",size:3}}),Je.creditCardType.changeOrder("verve",0);var on=function(){function t(e){var n=e.number,r=e.cvv,i=e.month,o=e.year,a=e.pin;ee(this,t),this.number=n,this.cvv=r,this.month=i,this.year=o,this.pin=a}return ne(t,[{key:"getEncryptedPin",value:function(){return this.pin?rn(this.pin):void 0}},{key:"getLast4",value:function(){return this.number.substring(this.number.length-4)}},{key:"tokenize",value:function(){return rn(this.number+"*"+this.cvv+"*"+this.month+"*"+this.year)}}],[{key:"getType",value:function(t){var e=Je.number(t);return e&&e.card?{type:e.card.type,maxLength:Math.max.apply(Math,se(e.card.lengths)),minLength:Math.min.apply(Math,se(e.card.lengths))}:{type:null,maxLength:0}}},{key:"validate",value:function(e){var n=e.number,r=e.cvv,i=e.month,o=e.year,a=t.getType(n).type,s={number:t.isNumberValid(n),expiry:t.isExpiryValid({month:i,year:o}),cvv:t.isCvvValid(r,a)};return{isValid:Object.values(s).every(function(t){return!0===t}),result:s}}},{key:"validateNumber",value:function(t){return Je.number(t)}},{key:"isNumberValid",value:function(e){return t.validateNumber(e).isValid}},{key:"validateCVV",value:function(t,e){return Je.cvv(t,"american-express"===e?4:3)}},{key:"isCvvValid",value:function(e,n){return t.validateCVV(e,n).isValid}},{key:"validateExpiry",value:function(t){if("object"===(void 0===t?"undefined":Qt(t))){var e=t.year;return Je.expirationMonth(t.month)&&Je.expirationYear(e)}return Je.expirationDate(t)}},{key:"isExpiryValid",value:function(e){return t.validateExpiry(e).isValid}},{key:"generateTestCard",value:function(e){var n=e||"default";return new t(Ye.find(function(t){return t.type===n}))}}]),t}(),an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!!e.sorted,r=!!e.skipIndex,i=!!e.ignorenull,o=function(t){return(t+"").replace(/(?:[\0-\x1F"-&\+-\}\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,encodeURIComponent).replace(/ /g,"+").replace(/[!'()~\*]/g,function(t){return"%"+t.charCodeAt().toString(16).slice(-2).toUpperCase()})},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(t);return n?e.sort():e},s=function(t){return t.filter(function(t){return t}).join("&")},u=function(t,e){return s(a(e).map(function(n){return h(t+"["+n+"]",e[n])}))},c=function(t,e){return e.length?s(e.map(function(e,n){return h(r?t+"[]":t+"["+n+"]",e)})):o(t+"[]")},h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0===e?"undefined":an(e),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return e===r?r=i?r:o(t)+"="+r:/string|number|boolean/.test(n)?r=o(t)+"="+o(e):Array.isArray(e)?r=c(t,e):"object"===n&&(r=u(t,e)),r};return t&&s(a(t).map(function(e){return h(e,t[e])}))},un=function(t){var e=t.pin,n=t.rememberCard,r=t.transactionType,i=t.subscription,o=t.customFields,a=ge.paymentBaseUrl+"charge/",s=re({clientdata:t.clientdata,last4:t.last4,trans:t.trans,device:t.device,offset:(new Date).getTimezoneOffset(),remember_card:n},r&&{transaction_type:r},i&&{subscription:i},o&&o);e&&(s.handle=e);var u=sn(s);return ce.post(a,u,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},cn=function(t){var e=ge.paymentBaseUrl+"charge/resume/"+t.accessCode,n=sn({device:t.device});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},hn=function(t){var e=t.transactionType,n=t.subscription,r=ge.paymentBaseUrl+"charge/",i=re({last4:t.last4,trans:t.trans,device:t.device,cvv:t.cvv,handle:t.pin,authorization_code:t.authorizationCode},e&&{transaction_type:e},n&&{subscription:n}),o=sn(i);return ce.post(r,o,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},ln=function(t,e){var n=ge.paymentBaseUrl+"charge/validate",r=sn({trans:t,token:e});return ce.post(n,r).then(function(t){return me.parse(t.data)})},fn=function(t){var e=ge.paymentBaseUrl+"charge/avs",n=sn({city:t.city,state:t.state,address:t.address,zip_code:t.zipCode,trans:t.transactionId});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},pn=function(t){return ce.post(ge.paystackApiUrl+"rememberme/forget_card",{authorization_id:t.authorizationId},{headers:{Authorization:"Bearer "+t.publicKey}}).then(function(t){return me.parse(t.data)})};function dn(t,e){return new Promise(function(n,r){var i=on.validate(t);if(!i.isValid){var o=e||t.number,a="Invalid card details: "+Object.keys(i.result).filter(function(t){return!1===i.result[t]}).join(", ");r(Error(o?a:"Please set a valid card with Transaction.setCard()"))}n()})}var gn={setCard:function(t){var e=this;return dn(t,!0).then(function(){e.card=new on(t)})},rememberCard:function(){this.remember_card=!0},chargeCard:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return dn(this.card).then(function(){t.logAttempt("card");var n={clientdata:t.card.tokenize(),last4:t.card.getLast4(),pin:t.card.getEncryptedPin(),trans:t.id,device:t.deviceFingerprint,rememberCard:t.remember_card,transactionType:t.transactionType,subscription:t.subscription,customFields:e};return un(n).then(function(e){return t.logAPIResponse(e,"card"),e})})},chargeRememberedCard:function(t){var e=this,n=t.cvv,r=t.authorizationCode,i=t.cardLast4,o=t.pin;this.logAttempt("card");var a=rn(o);return hn({authorizationCode:r,cvv:n,last4:i,trans:this.id,device:this.deviceFingerprint,pin:a,transactionType:this.transactionType,subscription:this.subscription}).then(function(t){return e.logAPIResponse(t,"card"),t})},resumeCardCharge:function(t){var e=this;return cn({accessCode:t.accessCode,device:this.deviceFingerprint}).then(function(t){return e.logAPIResponse(t,"card"),t})},forgetRememberedCard:function(t){var e=this;return pn({authorizationId:t,publicKey:this.merchant.key}).then(function(t){return e.logAPIResponse(t,"card"),t})},authenticateCard:function(t){var e=this;return dn(this.card).then(function(){return ln(e.id,t)}).then(function(t){return e.logAPIResponse(t,"card"),t})},verifyAddress:function(t){var e=this;return fn({city:t.city,state:t.state,address:t.address,zipCode:t.zipCode,transactionId:this.id}).then(function(t){return e.logAPIResponse(t,"card"),t})},listenFor3DSCharge:function(t){return this.listenForCharge({channel:"3DS_"+this.id,paymentMethod:"card"},t)}},mn=function(){function t(e){var n=e.bankId,r=e.accountType,i=e.accountNumber;ee(this,t),this.bankId=n,this.accountType=r,this.accountNumber=i}return ne(t,null,[{key:"validate",value:function(e){var n=e.bankId,r=e.accountType,i=e.accountNumber,o=[];return n&&"number"==typeof n||o.push("Invalid bankId. Please check for supported banks with BankAccount.supportedBanks()"),t.types.indexOf(r)>-1?"nuban"!==r||t.isValidNubanAccount(i)||o.push("Invalid account number. Nuban accounts must be 10 digit numbers"):o.push("Invalid bank type. Please check BankAccount.types for the list of valid bank types"),{isValid:0===o.length,errors:o}}},{key:"isValidNubanAccount",value:function(t){return!!t&&(("number"==typeof t||/^\d+$/.test(t))&&10===t.length)}},{key:"supportedBanks",value:function(){return ce.post(ge.paymentBaseUrl+"bank?pay_with_bank=true").then(function(t){return t.data})}}]),t}();mn.types=["nuban"];var yn=function(t){var e=ge.paymentBaseUrl+"bank/charge_account/"+t.bankId+"/"+t.transactionId,n=sn({account_number:t.accountNumber,device:t.device});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},vn=function(t){var e=ge.paymentBaseUrl+"bank/charge_account/"+t.bankId+"/"+t.transactionId,n=sn({account_number:t.accountNumber,birthday:t.birthday});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},bn=function(t){var e=ge.paymentBaseUrl+"bank/validate_token/"+t.bankId+"/"+t.transactionId,n=sn({device:t.device,token:t.token});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})};function Tn(t,e){return new Promise(function(n,r){var i=mn.validate(t);i.isValid||r(Error(e||t.accountNumber?i.errors[0]:"Please set a valid bank account with Transaction.setBank()"));n()})}var wn=function(t){var e=t.bankId,n=ge.paymentBaseUrl+"bank/digitalbankmandate/"+e+"/"+t.transactionId,r=re({},"sterling-bank"==={16:"sterling-bank",62:"kuda-bank"}[e]?{account_number:t.accountNumber}:{phone_number:t.phoneNumber},{token:t.token}),i=sn(r);return ce.post(n,i,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},Sn=Object.assign({},{setBankAccount:function(t){var e=this;return Tn(t,!0).then(function(){e.bankAccount=new mn(t)})},chargeBankAccount:function(){var t=this;return Tn(this.bankAccount).then(function(){return t.logAttempt("bank account"),yn({bankId:t.bankAccount.bankId,transactionId:t.id,accountNumber:t.bankAccount.accountNumber,device:t.deviceFingerprint}).then(function(e){return t.logAPIResponse(e,"bank account"),e})})},registerBankAccount:function(t){var e=this;return Tn(this.bankAccount).then(function(){return vn({bankId:e.bankAccount.bankId,transactionId:e.id,accountNumber:e.bankAccount.accountNumber,birthday:t}).then(function(t){return e.logAPIResponse(t,"bank account"),t})})},authenticateBankAccount:function(t){var e=this;return Tn(this.bankAccount).then(function(){return bn({bankId:e.bankAccount.bankId,transactionId:e.id,token:t,device:e.deviceFingerprint}).then(function(t){return e.logAPIResponse(t,"bank account"),t})})}},{getIbankUrl:function(t){var e=this,n=t.bankId;return new Promise(function(t,r){n||r(Error("Please send bankId")),t(me.success({url:ge.paymentBaseUrl+"bank/ibank/"+n+"/"+e.id}))})},listenForIbankCharge:function(t){return this.listenForCharge({channel:"IBANK_"+this.id,paymentMethod:"ibank"},t)}},{chargeDigitalBankMandate:function(t){var e=this;return wn({transactionId:this.id,phoneNumber:t.phoneNumber,token:t.token,bankId:t.bankId,accountNumber:t.accountNumber}).then(function(t){return e.logAPIResponse(t,"bank"),t})},listenForDigitalBankMandateCharge:function(t){return this.listenForCharge({paymentMethod:"bank",channel:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""},t)}}),En=function(t,e){return ce.post(ge.paystackApiUrl+"checkout/ussd/reference",{transaction:t.transaction,channel:t.channel},{headers:{Authorization:"Bearer "+e}}).then(function(t){return me.parse(t.data)})},An={getUSSDShortcode:function(t){var e=this,n=t.channel;return this.ussd[n]?this.ussd[n]:En({transaction:this.id,channel:n},this.merchant.key).then(function(t){return"success"===t.status&&(e.ussd[n]=t),t})},listenForUSSDCharge:function(t,e){var n=t.channel;return this.ussd[n]?this.listenForCharge({channel:this.ussd[n].data.channel,paymentMethod:n},e):Promise.reject(Error("Please generate ussd shortcode with Transaction.getUSSDShortcode()"))}},kn=function(t,e){return ce.post(ge.paystackApiUrl+"offline/qr/generate",{source:"checkout",reference:t.transaction,channel:t.channel},{headers:{Authorization:"Bearer "+e}}).then(function(t){return me.parse(t.data)})};function xn(t){return new Promise(function(e,n){var r=["visa","MPASS_OLTI"];if(-1<r.indexOf(t))e();else{var i="Invalid channel. Available channels: "+r.join(", ");n(Error(i))}})}var Cn={getQRCode:function(t){var e=this,n=t.channel;return xn(n).then(function(){return e.qr[n]?e.qr[n]:kn({transaction:e.id,channel:n},e.merchant.key).then(function(t){return"success"===t.status&&(e.qr[n]=t),t})})},listenForQRCharge:function(t,e){var n=this,r=t.channel;return xn(r).then(function(){return n.qr[r]?n.listenForCharge({channel:n.qr[r].data.channel,paymentMethod:r},e):Promise.reject(Error("Please generate qr code with Transaction.getQRCode()"))})}},Bn=function(t){return ce.post(ge.paystackApiUrl+"charge/mobile_money",{transaction:t.transaction,phone:t.phone,device:t.device,channel_name:t.channel_name,provider:t.provider,voucher:t.voucher,registration_token:t.registrationToken}).then(function(t){return me.parse(t.data)})},Dn=function(){function t(){ee(this,t)}return ne(t,null,[{key:"hasCountryCode",value:function(t){return t&&"+"===t[0]}},{key:"hasOnlyDigits",value:function(t){var e;return t&&(e=t.substring(1),/^\d+$/.test(e))}},{key:"isE164Number",value:function(t){return t&&17>t.length}},{key:"validate",value:function(e){var n=[];return t.hasCountryCode(e)||n.push("Number should include country code prefix"),t.hasOnlyDigits(e)||n.push("Number should contain only digits"),t.isE164Number(e)||n.push("Number should not be longer than 16 digits"),{isValid:0===n.length,errors:n}}}]),t}();var On={chargeMobileMoney:function(t){var e=this,n=t.phoneNumber,r=t.provider,i=t.voucher,o=t.registrationToken;return function(t){return new Promise(function(e,n){var r=Dn.validate(t);r.isValid||n(Error(t?r.errors[0]:"Please start a mobile money transaction with Transaction.chargeMobileMoney()")),e(r)})}(n).then(function(){return e.logAttempt("mobile money"),Bn({provider:r,voucher:i,registrationToken:o,transaction:e.id,phone:n,device:e.deviceFingerprint,channel_name:"MOBILE_MONEY_"+e.id}).then(function(t){return"success"===t.status&&(e.mobileMoney=t),t})})},listenForMobileMoneyCharge:function(t){if("success"!==this.mobileMoney.status)return Promise.reject(Error("Please start a mobile money charge with Transaction.chargeMobileMoney()"));var e=this.mobileMoney.data;return this.listenForCharge({channel:e.channel||e.channel_name,paymentMethod:"mobile_money"},t)}},Pn=function(t,e){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/verify",{phone:t},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},Rn=function(t,e,n){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/remove_card",{phone:t,id:n},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},In=function(t,e,n,r){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/validate_otp",{phone:t,otp:n,transaction:r},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},Nn=function(t,e,n,r){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/validate_pin",{phone:t,pin:n,transaction:r},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},Mn=function(t,e,n,r,i){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/set_pin",{phone:t,token:n,transaction:r,pin:i},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},_n=function(t,e,n,r,i,o){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/charge",{id:t,token:n,cvv:i,transaction:r,phone:o},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},Vn=function(t,e,n){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/enroll",{phone:t,transaction:n},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})};function jn(t){return new Promise(function(e,n){var r=Dn.validate(t);r.isValid||n(Error(t?r.errors[0]:"Please set a valid customer with Transaction.setCustomer()"));e(r)})}var Ln={setCustomer:function(t){var e=this,n=t.phoneNumber;return jn(n).then(function(){e.customer=n})},verifyCustomer:function(){var t=this;return jn(this.customer).then(function(){return Pn(t.customer,t.merchant.key)})},deleteSavedCard:function(t){var e=this;return jn(this.customer).then(function(){return Rn(e.customer,e.merchant.key,t)})},authenticateCustomerOtp:function(t){var e=this;return jn(this.customer).then(function(){return In(e.customer,e.merchant.key,t,e.id)})},authenticateCustomerPin:function(t){var e=this;return jn(this.customer).then(function(){return Nn(e.customer,e.merchant.key,t,e.id)})},setCustomerPin:function(t){var e=this,n=t.pin,r=t.token;return jn(this.customer).then(function(){return Mn(e.customer,e.merchant.key,r,e.id,n)})},chargeSavedCard:function(t){var e=this,n=t.cardId,r=t.token,i=t.cvv;return jn(this.customer).then(function(){return _n(n,e.merchant.key,r,e.id,i,e.customer)})},enrollPhoneNumber:function(t){var e=this;return jn(this.customer).then(function(){return Vn(t,e.merchant.key,e.id)})}},Un=function(t){return ce.post(ge.paystackApiUrl+"login",{email:t.email,password:t.password}).then(function(t){return me.parse(t.data)})},Fn=function(t){return ce.post(ge.paystackApiUrl+"directdebit/initiate",{account_code:t.account_code,transaction:t.transaction},{headers:{Authorization:"Bearer "+t.token,"jwt-auth":!0}}).then(function(t){return me.parse(t.data)})},qn=function(t){return ce.post(ge.paystackApiUrl+"directdebit/validate",{otp:t.otp,transaction:t.transaction},{headers:{Authorization:"Bearer "+t.token,"jwt-auth":!0}}).then(function(t){return me.parse(t.data)})},Hn=function(t){return ce.get(ge.paystackApiUrl+"directdebit/account",{headers:{Authorization:"Bearer "+t,"jwt-auth":!0}}).then(function(t){return t.data})};function zn(t){return/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(t)}function Gn(t){return parseInt(t,10)===+t&&+t>=0}function Kn(t){return t&&"string"==typeof t}var Xn={loginToDirectDebitAccount:function(t){var e=this,n=t.email,r={email:n,password:t.password};return zn(n)?Un(r).then(function(t){if("success"===t.status){var n=t.data,r=n.token,i=n.user.permissions;if(!i||1>i.length)throw Error("You do not have the privileges to perform this action");if(i.find(function(t){return"directdebit-*"===t}))return e.directDebit.token=r,t;throw Error("You do not have the privileges to perform this action")}return t}):Promise.reject(Error("Invalid email"))},chargeDirectDebit:function(t){var e=this;return this.directDebit.token?(this.logAttempt("direct debit"),Fn({account_code:t,transaction:this.id,token:this.directDebit.token}).then(function(t){return e.logAPIResponse(t,"direct debit"),t.status&&(e.directDebit.chargeResponse=t),t})):Promise.reject(Error("Please login with Transaction.loginToDirectDebitAccount() to start a Direct debit charge"))},getProvisionedAccounts:function(){var t=this;return Hn(this.directDebit.token).then(function(e){t.logAPIResponse(e,"direct debit");var n=e.data;if(e.status){if(n&&1>n.length)return Promise.reject(Error("You have not provisioned any bank account for Direct Debit yet"));t.directDebit.accounts=e.data}return e})},authenticateAccount:function(t){var e=this;return qn({otp:t,transaction:this.id,token:this.directDebit.token}).then(function(t){return e.logAPIResponse(t,"direct debit"),t})}},Wn=function(t,e){return ce.post(ge.paystackApiUrl+"checkout/pay_with_transfer",t,{headers:{Authorization:"Bearer "+e}}).then(function(t){return me.parse(t.data)})},Zn=function(t,e){return ce.post(ge.paystackApiUrl+"managed_account/customer_claim",t,{headers:{Authorization:"Bearer "+e}}).then(function(t){return me.parse(t.data)})},Jn={getManagedAccount:function(t){var e=this;return Wn({transaction_id:this.id,fulfil_late_notification:t.fulfilLateNotification},this.merchant.key).then(function(t){return"success"===t.status&&(e.bankTransfer=t),t})},submitPayerDetails:function(t){return Zn({reference_id:this.id,account_number:t.accountNumber,email:t.email,institution_id:t.bankId,institution_type:"bank",claim_type:t.claimType,managed_account_number:t.managedAccountNumber,provider_slug:t.providerSlug},this.merchant.key)},listenForPayWithTransferCharge:function(t){var e=this.bankTransfer.data;return this.listenForCharge({channel:e&&e.pusher_channel||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:""),paymentMethod:"bank_transfer"},t)}},Yn=function(t){var e=ge.paymentBaseUrl+"payattitude/charge/"+t.transactionId,n=sn({phone_number:t.phoneNumber});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},$n={chargePayattitude:function(t){var e=this;return Yn({transactionId:this.id,phoneNumber:t.phoneNumber}).then(function(t){return e.logAPIResponse(t,"payattitude"),t})},listenForPayattitudeCharge:function(t){return this.listenForCharge({paymentMethod:"payattitude",channel:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""},t)}},Qn={getEFTUrl:function(t){var e=this,n=t.eftGateway;return new Promise(function(t,r){n||r(Error("Please pass the `eftGateway`")),t(me.success({url:ge.paymentBaseUrl+"eft/"+n+"/"+e.id}))})},listenForEFTCharge:function(t){return this.listenForCharge({channel:"EFT_"+this.id,paymentMethod:"eft"},t)}},tr=function(t){var e=ge.paymentBaseUrl+"applepay/validate-session",n=sn({sessionUrl:t.sessionUrl,displayName:t.displayName,domainName:t.domainName,transaction:t.transactionId});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},er=function(t){var e=ge.paymentBaseUrl+"applepay/charge",n=sn({paymentObject:t.paymentObject,transaction:t.transactionId});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},nr={validateApplePaySession:function(t){var e=this,n=t.sessionUrl,r=t.displayName,i=t.domainName;return this.logAttempt("apple pay"),tr({sessionUrl:n,displayName:r,domainName:i,transactionId:this.id}).then(function(t){return e.logAPIResponseMessage(t.message),t})},chargeApplePay:function(t){var e=this;return er({transactionId:this.id,device:this.deviceFingerprint,paymentObject:t.paymentObject}).then(function(t){return e.logAPIResponse(t,"apple pay"),t})}},rr=function(t){return ce.post(ge.paymentBaseUrl+"paypal/"+t+"/create").then(function(t){return me.parse(t.data)})},ir=function(t){return ce.post(ge.paymentBaseUrl+"paypal/"+t+"/capture").then(function(t){return me.parse(t.data)})},or=function(t){return ce.get(ge.paystackApiUrl+"paypal/config?transaction="+t.transactionId,{headers:{Authorization:"Bearer "+t.publicKey}}).then(function(t){return t.data})},ar={createPayPalOrder:function(){var t=this;return this.logAttempt("paypal"),rr(this.id).then(function(e){return t.logAPIResponseMessage(e.message),e})},capturePayPalOrder:function(){var t=this;return ir(this.id).then(function(e){return t.logAPIResponse(e,"paypal"),e})},getPayPalConfig:function(){return or({publicKey:this.merchant.key,transactionId:this.id})}},sr={get:function(t){return{card:gn,bank:Sn,ussd:An,qr:Cn,mobile_money:On,phone:Ln,direct_debit:Xn,bank_transfer:Jn,eft:Qn,payattitude:$n,apple_pay:nr,paypal:ar}[t]}},ur=function(t){t||"undefined"==typeof navigator||(t=navigator.userAgent);t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]);return"string"==typeof t&&(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))};var cr=function(t,e,n){var r={Authorization:"Bearer "+e};return ce.post(ge.paystackApiUrl+"transaction/update_log/"+t,{payload:JSON.stringify(n)},{headers:r}).then(function(t){return t.data})},hr=function(t,e){return ce.post(ge.paystackApiUrl+"transaction/set_ip/"+t,null,{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},lr=function(t,e,n){return ce.post(ge.paystackApiUrl+"transaction/set_referrer/"+t,{referrer:n},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},fr={initializeLog:function(t){var e=t||{},n=e.attempts,r=e.authentication,i=e.errors,o=e.history;this.log={start_time:Math.round(Date.now()/1e3),time_spent:0,attempts:n||0,authentication:r,errors:i||0,success:!1,mobile:ur(),input:[],history:o||[]}},getTimeSpent:function(){var t=Math.round(Date.now()/1e3);return this.log.time_spent=t-this.log.start_time,this.log.time_spent},logPageOpen:function(){return this.log.history.push({type:"open",message:"Opened checkout",time:this.getTimeSpent()}),this.saveLog()},logChannelSwitch:function(t){return this.log.history.push({type:"action",message:"Set payment method to: "+t,time:this.getTimeSpent()}),this.saveLog()},logValidationErrors:function(t){var e=this;return t.forEach(function(t){e.log.history.push({type:"error",message:"Invalid "+t,time:e.getTimeSpent()})}),this.saveLog()},logInput:function(t){var e=this.log.history.find(function(e){return e.message==="Filled this field: "+t});return this.log.history.push({type:"input",message:(e?"Changed":"Filled")+" this field: "+t,time:this.getTimeSpent()}),this.saveLog()},logBankSelect:function(t){return this.log.history.push({type:"action",message:"Selected bank: "+t,time:this.getTimeSpent()}),this.saveLog()},logAuthWindowOpen:function(){return this.log.history.push({type:"action",message:"Third-party authentication window opened",time:this.getTimeSpent()}),this.saveLog()},logAuthWindowClose:function(){return this.log.history.push({type:"action",message:"Third-party authentication window closed",time:this.getTimeSpent()}),this.saveLog()},logAPIResponse:function(t,e){switch(t.status){case"success":return this.logSuccess(e);case"pending":return this.logPending(e);case"failed":return this.logError(t.message);case"auth":return this.logAuth(t.data.auth);default:return!1}},logAPIResponseMessage:function(t){return this.log.history.push({type:"action",message:t,time:this.getTimeSpent()}),this.saveLog()},logAttempt:function(t){var e="Attempted to pay";return t&&(e+=" with "+t),this.log.attempts+=1,this.log.history.push({type:"action",message:e,time:this.getTimeSpent()}),this.saveLog()},logError:function(t){var e="Error";return t&&(e+=": "+t),this.log.errors+=1,this.log.history.push({type:"error",message:e,time:this.getTimeSpent()}),this.saveLog()},logAuth:function(t){return this.log.authentication=t,this.log.history.push({type:"auth",message:"Authentication Required: "+t,time:this.getTimeSpent()}),this.saveLog()},logSuccess:function(t){var e="Successfully paid";return t&&(e+=" with "+t),this.log.success=!0,this.log.history.push({type:"success",message:e,time:this.getTimeSpent()}),this.saveLog()},logPending:function(t){var e="Payment in progress";return t&&(e+=" with "+t),this.log.history.push({type:"pending",message:e,time:this.getTimeSpent()}),this.saveLog()},logPageClose:function(){return this.log.history.push({type:"close",message:"Closed checkout",time:this.getTimeSpent()}),this.saveLog()},saveLog:function(){return cr(this.id,this.merchant.key,this.log)},saveIpAddress:function(){return hr(this.id,this.merchant.key)},saveReferrer:function(t){return lr(this.id,this.merchant.key,t)}};var pr=function(t){(console?console.log:function(){})(t)},dr=function(){},gr=function(){function t(e){var n=this;ee(this,t),this.email=e.email,this.merchant={id:e.merchant_id,logo:e.merchant_logo,name:e.merchant_name,key:e.merchant_key,channelSettings:e.merchant_channel_settings||{}},this.status=e.transaction_status||e.status,this.accessCode=e.access_code,this.amount=e.amount,this.domain=e.domain,this.isTest="test"===e.domain,this.currency=e.currency,this.id=e.id,this.channels=["apple_pay"].concat(e.channels),this.label=e.label,this.metadata=e.metadata||{},this.cancel_action=e.cancel_action||null,this.channel_options=e.channel_options||null,this.hash=e.hash||null,this.authorizations=e.authorizations,this.remember_card=!1,this.rememberMeEnabled=e.is_remember_me_enabled,this.card={},this.bankAccount={},this.mobileMoney={},this.ussd={},this.bankTransfer={},this.qr={},this.directDebit={},this.deviceFingerprint=e.deviceFingerprint||null,this.customer=e.customer,this.custom_filters=e.custom_filters||null,this.isCharging=!1,this.isListening=!1,this.transactionType=e.transaction_type||null,this.subscription=e.subscription||null,this.planDetails=e.plan_details||null,window?new Promise(function(t,e){var n=new XMLHttpRequest;n.open("GET",ge.pusherUrl),n.onload=function(){if(n.status>=200&&300>n.status){var r=document.createElement("script");r.appendChild(document.createTextNode(n.responseText)),document.head.appendChild(r),t()}else e(n.statusText)},n.onerror=function(){return e(n.statusText)},n.send(null)}):Promise.reject(Error("Window object not available")),this.log=null,Object.assign(this,fr),this.initializeLog(e.log),this.saveIpAddress(),this.channels.forEach(function(t){var e=sr.get(t);Object.assign(n,e)}),this.channels.includes("ussd")&&!this.channels.includes("bank_transfer")&&Object.assign(this,sr.get("bank_transfer"))}return ne(t,[{key:"setMetadata",value:function(t,e){this.metadata[t]=e}},{key:"setDevice",value:function(t){this.deviceFingerprint?pr("Device ID has already been set by Checkout JS so there's no need to set this again"):this.deviceFingerprint=t}},{key:"listenForCharge",value:function(t,e){var n=this,r=t.channel,i=t.paymentMethod,o=void 0;window&&window.Pusher&&(o=new window.Pusher(ge.pusherKey,{cluster:"eu",disableStats:!0}));var a={status:"error",message:"We could not listen for charge response. Use transaction.requery() to check the status."},s=function(){o.unsubscribe(r)};if(!o)return e({status:"error",message:"We could not listen for charge response."},dr);var u=o.subscribe(r);u.bind("pusher:subscription_succeeded",function(){n.isListening=!0}),u.bind("pusher:subscription_error",function(){n.isListening=!1,e(a,dr)}),u.bind("response",function(t){var r=me.parse(t);n.logAPIResponse(r,i),e(r,s)})}},{key:"requery",value:function(){return Te(this.id)}},{key:"markAsAbandoned",value:function(){return we({publicKey:this.merchant.key,transactionId:this.id})}}]),t}(),mr={ref:{required:!1,isValid:Kn},key:{required:!0,isValid:function(t){return t&&"pk"===t.substring(0,2)}},email:{required:!0,fallback:"customer_code",isValid:zn},customer_code:{required:!1,isValid:Kn},amount:{required:!0,fallback:"plan",isValid:Gn},plan:{required:!1,isValid:Kn},transaction_charge:{required:!1,isValid:Gn},bearer:{required:!1,isValid:Kn},channels:{required:!1,isValid:function(t){return t instanceof Array}},currency:{required:!1,isValid:Kn},firstname:{required:!1,isValid:Kn},lastname:{required:!1,isValid:Kn},phone:{required:!1,isValid:Kn},remark:{required:!1,isValid:Kn},payment_page:{required:!1,isValid:Gn},payment_request:{required:!1,isValid:Kn},quantity:{required:!1,isValid:Kn},coupon:{required:!1,isValid:Kn},start_date:{required:!1,isValid:Kn},interval:{required:!1,isValid:Kn},invoice_limit:{required:!1,isValid:Gn},subaccount:{required:!1,isValid:Kn},split_code:{required:!1,isValid:Kn},hash:{required:!1,isValid:Kn},metadata:{required:!1,isValid:Kn},transaction_type:{required:!1,isValid:Kn},subscription:{required:!1,isValid:Gn}};var yr,vr,br=Qe(function(t){var e,n;e=$e,n=function(){var t=function(t,e){var n=[0,0,0,0];return n[3]+=(t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]])[3]+(e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]])[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]+e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]+e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]+e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},e=function(t,e){var n=[0,0,0,0];return n[3]+=(t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]])[3]*(e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]])[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]*e[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=t[3]*e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]*e[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[2]*e[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[3]*e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},n=function(t,e){return 32===(e%=64)?[t[1],t[0]]:32>e?[t[0]<<e|t[1]>>>32-e,t[1]<<e|t[0]>>>32-e]:[t[1]<<(e-=32)|t[0]>>>32-e,t[0]<<e|t[1]>>>32-e]},r=function(t,e){return 0===(e%=64)?t:32>e?[t[0]<<e|t[1]>>>32-e,t[1]<<e]:[t[1]<<e-32,0]},i=function(t,e){return[t[0]^e[0],t[1]^e[1]]},o=function(t){return t=i(t,[0,t[0]>>>1]),t=e(t,[4283543511,3981806797]),t=i(t,[0,t[0]>>>1]),t=e(t,[3301882366,444984403]),t=i(t,[0,t[0]>>>1])},a=function(a,s){for(var u=(a=a||"").length%16,c=a.length-u,h=[0,s=s||0],l=[0,s],f=[0,0],p=[0,0],d=[2277735313,289559509],g=[1291169091,658871167],m=0;c>m;m+=16)f=[255&a.charCodeAt(m+4)|(255&a.charCodeAt(m+5))<<8|(255&a.charCodeAt(m+6))<<16|(255&a.charCodeAt(m+7))<<24,255&a.charCodeAt(m)|(255&a.charCodeAt(m+1))<<8|(255&a.charCodeAt(m+2))<<16|(255&a.charCodeAt(m+3))<<24],p=[255&a.charCodeAt(m+12)|(255&a.charCodeAt(m+13))<<8|(255&a.charCodeAt(m+14))<<16|(255&a.charCodeAt(m+15))<<24,255&a.charCodeAt(m+8)|(255&a.charCodeAt(m+9))<<8|(255&a.charCodeAt(m+10))<<16|(255&a.charCodeAt(m+11))<<24],f=e(f,d),f=n(f,31),f=e(f,g),h=i(h,f),h=n(h,27),h=t(h,l),h=t(e(h,[0,5]),[0,1390208809]),p=e(p,g),p=n(p,33),p=e(p,d),l=i(l,p),l=n(l,31),l=t(l,h),l=t(e(l,[0,5]),[0,944331445]);switch(f=[0,0],p=[0,0],u){case 15:p=i(p,r([0,a.charCodeAt(m+14)],48));case 14:p=i(p,r([0,a.charCodeAt(m+13)],40));case 13:p=i(p,r([0,a.charCodeAt(m+12)],32));case 12:p=i(p,r([0,a.charCodeAt(m+11)],24));case 11:p=i(p,r([0,a.charCodeAt(m+10)],16));case 10:p=i(p,r([0,a.charCodeAt(m+9)],8));case 9:p=i(p,[0,a.charCodeAt(m+8)]),p=e(p,g),p=n(p,33),p=e(p,d),l=i(l,p);case 8:f=i(f,r([0,a.charCodeAt(m+7)],56));case 7:f=i(f,r([0,a.charCodeAt(m+6)],48));case 6:f=i(f,r([0,a.charCodeAt(m+5)],40));case 5:f=i(f,r([0,a.charCodeAt(m+4)],32));case 4:f=i(f,r([0,a.charCodeAt(m+3)],24));case 3:f=i(f,r([0,a.charCodeAt(m+2)],16));case 2:f=i(f,r([0,a.charCodeAt(m+1)],8));case 1:f=i(f,[0,a.charCodeAt(m)]),f=e(f,d),f=n(f,31),f=e(f,g),h=i(h,f)}return h=i(h,[0,a.length]),l=i(l,[0,a.length]),h=t(h,l),l=t(l,h),h=o(h),l=o(l),h=t(h,l),l=t(l,h),("00000000"+(h[0]>>>0).toString(16)).slice(-8)+("00000000"+(h[1]>>>0).toString(16)).slice(-8)+("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)},s={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},u=function(t,e){if(Array.prototype.forEach&&t.forEach===Array.prototype.forEach)t.forEach(e);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e(t[n],n,t);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},c=function(t,e){var n=[];return null==t?n:Array.prototype.map&&t.map===Array.prototype.map?t.map(e):(u(t,function(t,r,i){n.push(e(t,r,i))}),n)},h=function(){return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices},l=function(t){var e=[window.screen.width,window.screen.height];return t.screen.detectScreenOrientation&&e.sort().reverse(),e},f=function(t){if(window.screen.availWidth&&window.screen.availHeight){var e=[window.screen.availHeight,window.screen.availWidth];return t.screen.detectScreenOrientation&&e.sort().reverse(),e}return t.NOT_AVAILABLE},p=function(t){if(null==navigator.plugins)return t.NOT_AVAILABLE;for(var e=[],n=0,r=navigator.plugins.length;r>n;n++)navigator.plugins[n]&&e.push(navigator.plugins[n]);return g(t)&&(e=e.sort(function(t,e){return t.name>e.name?1:e.name>t.name?-1:0})),c(e,function(t){var e=c(t,function(t){return[t.type,t.suffixes]});return[t.name,t.description,e]})},d=function(t){var e=[];if(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window){e=c(["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"],function(e){try{return new window.ActiveXObject(e),e}catch(e){return t.ERROR}})}else e.push(t.NOT_AVAILABLE);return navigator.plugins&&(e=e.concat(p(t))),e},g=function(t){for(var e=!1,n=0,r=t.plugins.sortPluginsFor.length;r>n;n++){if(navigator.userAgent.match(t.plugins.sortPluginsFor[n])){e=!0;break}}return e},m=function(t){try{return!!window.sessionStorage}catch(e){return t.ERROR}},y=function(t){try{return!!window.localStorage}catch(e){return t.ERROR}},v=function(t){try{return!!window.indexedDB}catch(e){return t.ERROR}},b=function(t){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:t.NOT_AVAILABLE},T=function(t){return navigator.cpuClass||t.NOT_AVAILABLE},w=function(t){return navigator.platform?navigator.platform:t.NOT_AVAILABLE},S=function(t){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:t.NOT_AVAILABLE},E=function(){var t,e=0;void 0!==navigator.maxTouchPoints?e=navigator.maxTouchPoints:void 0!==navigator.msMaxTouchPoints&&(e=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(e){t=!1}return[e,t,"ontouchstart"in window]},A=function(t){var e=[],n=document.createElement("canvas");n.width=2e3,n.height=200,n.style.display="inline";var r=n.getContext("2d");return r.rect(0,0,10,10),r.rect(2,2,6,6),e.push("canvas winding:"+(!1===r.isPointInPath(5,5,"evenodd")?"yes":"no")),r.textBaseline="alphabetic",r.fillStyle="#f60",r.fillRect(125,1,62,20),r.fillStyle="#069",r.font=t.dontUseFakeFontInCanvas?"11pt Arial":"11pt no-real-font-123",r.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),r.fillStyle="rgba(102, 204, 0, 0.2)",r.font="18pt Arial",r.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),r.globalCompositeOperation="multiply",r.fillStyle="rgb(255,0,255)",r.beginPath(),r.arc(50,50,50,0,2*Math.PI,!0),r.closePath(),r.fill(),r.fillStyle="rgb(0,255,255)",r.beginPath(),r.arc(100,50,50,0,2*Math.PI,!0),r.closePath(),r.fill(),r.fillStyle="rgb(255,255,0)",r.beginPath(),r.arc(75,100,50,0,2*Math.PI,!0),r.closePath(),r.fill(),r.fillStyle="rgb(255,0,255)",r.arc(75,75,75,0,2*Math.PI,!0),r.arc(75,75,25,0,2*Math.PI,!0),r.fill("evenodd"),n.toDataURL&&e.push("canvas fp:"+n.toDataURL()),e},k=function(){var t,e=function(e){return t.clearColor(0,0,0,1),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),"["+e[0]+", "+e[1]+"]"};if(!(t=j()))return null;var n=[],r=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,r);var i=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);t.bufferData(t.ARRAY_BUFFER,i,t.STATIC_DRAW),r.itemSize=3,r.numItems=3;var o=t.createProgram(),a=t.createShader(t.VERTEX_SHADER);t.shaderSource(a,"attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}"),t.compileShader(a);var s=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(s,"precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}"),t.compileShader(s),t.attachShader(o,a),t.attachShader(o,s),t.linkProgram(o),t.useProgram(o),o.vertexPosAttrib=t.getAttribLocation(o,"attrVertex"),o.offsetUniform=t.getUniformLocation(o,"uniformOffset"),t.enableVertexAttribArray(o.vertexPosArray),t.vertexAttribPointer(o.vertexPosAttrib,r.itemSize,t.FLOAT,!1,0,0),t.uniform2f(o.offsetUniform,1,1),t.drawArrays(t.TRIANGLE_STRIP,0,r.numItems);try{n.push(t.canvas.toDataURL())}catch(t){}n.push("extensions:"+(t.getSupportedExtensions()||[]).join(";")),n.push("webgl aliased line width range:"+e(t.getParameter(t.ALIASED_LINE_WIDTH_RANGE))),n.push("webgl aliased point size range:"+e(t.getParameter(t.ALIASED_POINT_SIZE_RANGE))),n.push("webgl alpha bits:"+t.getParameter(t.ALPHA_BITS)),n.push("webgl antialiasing:"+(t.getContextAttributes().antialias?"yes":"no")),n.push("webgl blue bits:"+t.getParameter(t.BLUE_BITS)),n.push("webgl depth bits:"+t.getParameter(t.DEPTH_BITS)),n.push("webgl green bits:"+t.getParameter(t.GREEN_BITS)),n.push("webgl max anisotropy:"+function(t){var e=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic");if(e){var n=t.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT);return 0===n&&(n=2),n}return null}(t)),n.push("webgl max combined texture image units:"+t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),n.push("webgl max cube map texture size:"+t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE)),n.push("webgl max fragment uniform vectors:"+t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS)),n.push("webgl max render buffer size:"+t.getParameter(t.MAX_RENDERBUFFER_SIZE)),n.push("webgl max texture image units:"+t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)),n.push("webgl max texture size:"+t.getParameter(t.MAX_TEXTURE_SIZE)),n.push("webgl max varying vectors:"+t.getParameter(t.MAX_VARYING_VECTORS)),n.push("webgl max vertex attribs:"+t.getParameter(t.MAX_VERTEX_ATTRIBS)),n.push("webgl max vertex texture image units:"+t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),n.push("webgl max vertex uniform vectors:"+t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS)),n.push("webgl max viewport dims:"+e(t.getParameter(t.MAX_VIEWPORT_DIMS))),n.push("webgl red bits:"+t.getParameter(t.RED_BITS)),n.push("webgl renderer:"+t.getParameter(t.RENDERER)),n.push("webgl shading language version:"+t.getParameter(t.SHADING_LANGUAGE_VERSION)),n.push("webgl stencil bits:"+t.getParameter(t.STENCIL_BITS)),n.push("webgl vendor:"+t.getParameter(t.VENDOR)),n.push("webgl version:"+t.getParameter(t.VERSION));try{var c=t.getExtension("WEBGL_debug_renderer_info");c&&(n.push("webgl unmasked vendor:"+t.getParameter(c.UNMASKED_VENDOR_WEBGL)),n.push("webgl unmasked renderer:"+t.getParameter(c.UNMASKED_RENDERER_WEBGL)))}catch(t){}return t.getShaderPrecisionFormat?(u(["FLOAT","INT"],function(e){u(["VERTEX","FRAGMENT"],function(r){u(["HIGH","MEDIUM","LOW"],function(i){u(["precision","rangeMin","rangeMax"],function(o){var a=t.getShaderPrecisionFormat(t[r+"_SHADER"],t[i+"_"+e])[o];"precision"!==o&&(o="precision "+o);var s="webgl "+r.toLowerCase()+" shader "+i.toLowerCase()+" "+e.toLowerCase()+" "+o+":"+a;n.push(s)})})})}),n):n},x=function(){try{var t=j(),e=t.getExtension("WEBGL_debug_renderer_info");return t.getParameter(e.UNMASKED_VENDOR_WEBGL)+"~"+t.getParameter(e.UNMASKED_RENDERER_WEBGL)}catch(t){return null}},C=function(){var t=document.createElement("div");t.innerHTML="&nbsp;",t.className="adsbox";var e=!1;try{document.body.appendChild(t),e=0===document.getElementsByClassName("adsbox")[0].offsetHeight,document.body.removeChild(t)}catch(t){e=!1}return e},B=function(){if(void 0!==navigator.languages)try{if(navigator.languages[0].substr(0,2)!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},D=function(){return window.screen.width<window.screen.availWidth||window.screen.height<window.screen.availHeight},O=function(){var t,e=navigator.userAgent.toLowerCase(),n=navigator.oscpu,r=navigator.platform.toLowerCase();if(t=0>e.indexOf("windows phone")?0>e.indexOf("win")?0>e.indexOf("android")?0>e.indexOf("linux")?0>e.indexOf("iphone")&&0>e.indexOf("ipad")?0>e.indexOf("mac")?"Other":"Mac":"iOS":"Linux":"Android":"Windows":"Windows Phone",("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&"Windows Phone"!==t&&"Android"!==t&&"iOS"!==t&&"Other"!==t)return!0;if(void 0!==n){if((n=n.toLowerCase()).indexOf("win")>=0&&"Windows"!==t&&"Windows Phone"!==t)return!0;if(n.indexOf("linux")>=0&&"Linux"!==t&&"Android"!==t)return!0;if(n.indexOf("mac")>=0&&"Mac"!==t&&"iOS"!==t)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===t))return!0}return r.indexOf("win")>=0&&"Windows"!==t&&"Windows Phone"!==t||(!(0>r.indexOf("linux")&&0>r.indexOf("android")&&0>r.indexOf("pike")||"Linux"===t||"Android"===t)||(!(0>r.indexOf("mac")&&0>r.indexOf("ipad")&&0>r.indexOf("ipod")&&0>r.indexOf("iphone")||"Mac"===t||"iOS"===t)||((-1===r.indexOf("win")&&-1===r.indexOf("linux")&&-1===r.indexOf("mac"))!=("Other"===t)||void 0===navigator.plugins&&"Windows"!==t&&"Windows Phone"!==t)))},P=function(){var t,e=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(("Chrome"===(t=0>e.indexOf("firefox")?0>e.indexOf("opera")&&0>e.indexOf("opr")?0>e.indexOf("chrome")?0>e.indexOf("safari")?0>e.indexOf("trident")?"Other":"Internet Explorer":"Safari":"Chrome":"Opera":"Firefox")||"Safari"===t||"Opera"===t)&&"20030107"!==n)return!0;var r,i=(""+eval).length;if(37===i&&"Safari"!==t&&"Firefox"!==t&&"Other"!==t)return!0;if(39===i&&"Internet Explorer"!==t&&"Other"!==t)return!0;if(33===i&&"Chrome"!==t&&"Opera"!==t&&"Other"!==t)return!0;try{throw"a"}catch(t){try{t.toSource(),r=!0}catch(t){r=!1}}return r&&"Firefox"!==t&&"Other"!==t},R=function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))},I=function(){if(!R())return!1;var t=j();return!!window.WebGLRenderingContext&&!!t},N=function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},M=function(){return void 0!==window.swfobject},_=function(){return window.swfobject.hasFlashPlayerVersion("9.0.0")},V=function(t,e){window.___fp_swf_loaded=function(e){t(e)};var n=e.fonts.swfContainerId;!function(t){var e=document.createElement("div");e.setAttribute("id",t.fonts.swfContainerId),document.body.appendChild(e)}();window.swfobject.embedSWF(e.fonts.swfPath,n,"1","1","9.0.0",!1,{onReady:"___fp_swf_loaded"},{allowScriptAccess:"always",menu:"false"},{})},j=function(){var t=document.createElement("canvas"),e=null;try{e=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(t){}return e||(e=null),e},L=[{key:"userAgent",getData:function(t){t(navigator.userAgent)}},{key:"language",getData:function(t,e){t(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||e.NOT_AVAILABLE)}},{key:"colorDepth",getData:function(t,e){t(window.screen.colorDepth||e.NOT_AVAILABLE)}},{key:"deviceMemory",getData:function(t,e){t(navigator.deviceMemory||e.NOT_AVAILABLE)}},{key:"pixelRatio",getData:function(t,e){t(window.devicePixelRatio||e.NOT_AVAILABLE)}},{key:"hardwareConcurrency",getData:function(t,e){t(b(e))}},{key:"screenResolution",getData:function(t,e){t(l(e))}},{key:"availableScreenResolution",getData:function(t,e){t(f(e))}},{key:"timezoneOffset",getData:function(t){t((new Date).getTimezoneOffset())}},{key:"timezone",getData:function(t,e){window.Intl&&window.Intl.DateTimeFormat?t((new window.Intl.DateTimeFormat).resolvedOptions().timeZone):t(e.NOT_AVAILABLE)}},{key:"sessionStorage",getData:function(t,e){t(m(e))}},{key:"localStorage",getData:function(t,e){t(y(e))}},{key:"indexedDb",getData:function(t,e){t(v(e))}},{key:"addBehavior",getData:function(t){t(!(!document.body||!document.body.addBehavior))}},{key:"openDatabase",getData:function(t){t(!!window.openDatabase)}},{key:"cpuClass",getData:function(t,e){t(T(e))}},{key:"platform",getData:function(t,e){t(w(e))}},{key:"doNotTrack",getData:function(t,e){t(S(e))}},{key:"plugins",getData:function(t,e){N()?t(e.plugins.excludeIE?e.EXCLUDED:d(e)):t(p(e))}},{key:"canvas",getData:function(t,e){R()?t(A(e)):t(e.NOT_AVAILABLE)}},{key:"webgl",getData:function(t,e){I()?t(k()):t(e.NOT_AVAILABLE)}},{key:"webglVendorAndRenderer",getData:function(t){I()?t(x()):t()}},{key:"adBlock",getData:function(t){t(C())}},{key:"hasLiedLanguages",getData:function(t){t(B())}},{key:"hasLiedResolution",getData:function(t){t(D())}},{key:"hasLiedOs",getData:function(t){t(O())}},{key:"hasLiedBrowser",getData:function(t){t(P())}},{key:"touchSupport",getData:function(t){t(E())}},{key:"fonts",getData:function(t,e){var n=["monospace","sans-serif","serif"],r=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];e.fonts.extendedJsFonts&&(r=r.concat(["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"]));r=(r=r.concat(e.fonts.userDefinedFonts)).filter(function(t,e){return r.indexOf(t)===e});var i=document.getElementsByTagName("body")[0],o=document.createElement("div"),a=document.createElement("div"),s={},u={},c=function(){var t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="72px",t.style.fontStyle="normal",t.style.fontWeight="normal",t.style.letterSpacing="normal",t.style.lineBreak="auto",t.style.lineHeight="normal",t.style.textTransform="none",t.style.textAlign="left",t.style.textDecoration="none",t.style.textShadow="none",t.style.whiteSpace="normal",t.style.wordBreak="normal",t.style.wordSpacing="normal",t.innerHTML="mmmmmmmmmmlli",t},h=function(t,e){var n=c();return n.style.fontFamily="'"+t+"',"+e,n},l=function(t){for(var e=!1,r=0;n.length>r;r++)if(e=t[r].offsetWidth!==s[n[r]]||t[r].offsetHeight!==u[n[r]])return e;return e},f=function(){for(var t=[],e=0,r=n.length;r>e;e++){var i=c();i.style.fontFamily=n[e],o.appendChild(i),t.push(i)}return t}();i.appendChild(o);for(var p=0,d=n.length;d>p;p++)s[n[p]]=f[p].offsetWidth,u[n[p]]=f[p].offsetHeight;var g=function(){for(var t={},e=0,i=r.length;i>e;e++){for(var o=[],s=0,u=n.length;u>s;s++){var c=h(r[e],n[s]);a.appendChild(c),o.push(c)}t[r[e]]=o}return t}();i.appendChild(a);for(var m=[],y=0,v=r.length;v>y;y++)l(g[r[y]])&&m.push(r[y]);i.removeChild(a),i.removeChild(o),t(m)},pauseBefore:!0},{key:"fontsFlash",getData:function(t,e){return M()?_()?e.fonts.swfPath?void V(function(e){t(e)},e):t("missing options.fonts.swfPath"):t("flash not installed"):t("swf object not loaded")},pauseBefore:!0},{key:"audio",getData:function(t,e){var n=e.audio;if(n.excludeIOS11&&navigator.userAgent.match(/OS 11.+Version\/11.+Safari/))return t(e.EXCLUDED);var r=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(null==r)return t(e.NOT_AVAILABLE);var i=new r(1,44100,44100),o=i.createOscillator();o.type="triangle",o.frequency.setValueAtTime(1e4,i.currentTime);var a=i.createDynamicsCompressor();u([["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]],function(t){void 0!==a[t[0]]&&"function"==typeof a[t[0]].setValueAtTime&&a[t[0]].setValueAtTime(t[1],i.currentTime)}),o.connect(a),a.connect(i.destination),o.start(0),i.startRendering();var s=setTimeout(function(){return console.warn('Audio fingerprint timed out. Please report bug at https://github.com/Valve/fingerprintjs2 with your user agent: "'+navigator.userAgent+'".'),i.oncomplete=function(){},i=null,t("audioTimeout")},n.timeout);i.oncomplete=function(e){var n;try{clearTimeout(s),n=""+e.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(function(t,e){return t+Math.abs(e)},0),o.disconnect(),a.disconnect()}catch(e){return void t(e)}t(n)}}},{key:"enumerateDevices",getData:function(t,e){if(!h())return t(e.NOT_AVAILABLE);navigator.mediaDevices.enumerateDevices().then(function(e){t(e.map(function(t){return"id="+t.deviceId+";gid="+t.groupId+";"+t.kind+";"+t.label}))}).catch(function(e){t(e)})}}],U=function(t){throw Error("'new Fingerprint()' is deprecated, see https://github.com/Valve/fingerprintjs2#upgrade-guide-from-182-to-200")};return U.get=function(t,e){e?t||(t={}):(e=t,t={}),function(t,e){if(null==e)return t;var n,r;for(r in e)null==(n=e[r])||Object.prototype.hasOwnProperty.call(t,r)||(t[r]=n)}(t,s),t.components=t.extraComponents.concat(L);var n={data:[],addPreprocessedComponent:function(e,r){"function"==typeof t.preprocessor&&(r=t.preprocessor(e,r)),n.data.push({key:e,value:r})}},r=-1,i=function(o){if(t.components.length>(r+=1)){var a=t.components[r];if(t.excludes[a.key])i(!1);else{if(!o&&a.pauseBefore)return r-=1,void setTimeout(function(){i(!0)},1);try{a.getData(function(t){n.addPreprocessedComponent(a.key,t),i(!1)},t)}catch(t){n.addPreprocessedComponent(a.key,t+""),i(!1)}}}else e(n.data)};i(!1)},U.getPromise=function(t){return new Promise(function(e,n){U.get(t,e)})},U.getV18=function(t,e){return null==e&&(e=t,t={}),U.get(t,function(n){for(var r=[],i=0;n.length>i;i++){var o=n[i];if(o.value===(t.NOT_AVAILABLE||"not available"))r.push({key:o.key,value:"unknown"});else if("plugins"===o.key)r.push({key:"plugins",value:c(o.value,function(t){var e=c(t[2],function(t){return t.join?t.join("~"):t}).join(",");return[t[0],t[1],e].join("::")})});else if(-1!==["canvas","webgl"].indexOf(o.key))r.push({key:o.key,value:o.value.join("~")});else if(-1!==["sessionStorage","localStorage","indexedDb","addBehavior","openDatabase"].indexOf(o.key)){if(!o.value)continue;r.push({key:o.key,value:1})}else r.push(o.value?o.value.join?{key:o.key,value:o.value.join(";")}:o:{key:o.key,value:o.value})}var s=a(c(r,function(t){return t.value}).join("~~~"),31);e(s,r)})},U.x64hash128=a,U.VERSION="2.0.0",U},t.exports?t.exports=n():e.exports?e.exports=n():e.Fingerprint2=n()}),Tr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;return new Promise(function(e){return setTimeout(function(){e()},t)})},wr=(yr=te(regeneratorRuntime.mark(function t(){var e,n,r,i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,br.getPromise();case 3:if(!(e=t.sent)||!Array.isArray(e)){t.next=10;break}return n=e.filter(function(t){return"not available"!==t.value}).sort(function(t,e){return t.key>e.key?1:e.key>t.key?-1:0}).map(function(t){return t.value}),r=n&&n.join(""),i=br.x64hash128(r,31),t.abrupt("return",i);case 10:pr("Device ID could not be calculated"),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),pr(t.t0);case 16:return t.abrupt("return",null);case 17:case"end":return t.stop()}},t,void 0,[[0,13]])})),function(){return yr.apply(this,arguments)}),Sr=(vr=te(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=void 0,t.prev=1,!window){t.next=8;break}return t.next=5,Tr(550);case 5:return t.next=7,wr();case 7:e=t.sent;case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),pr("Device ID could not be calculated but we are moving on with the transaction");case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}},t,void 0,[[1,10]])})),function(){return vr.apply(this,arguments)});function Er(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}var Ar=function(t){function e(t){var n;ee(this,e);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];var a=oe(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(i)));return Error.captureStackTrace&&Error.captureStackTrace(a,e),a.errors=t,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Er(Error)),e}(),kr={validate:function(t){var e=function(t){var e=[];return t&&"object"===(void 0===t?"undefined":Qt(t))?(Object.keys(mr).forEach(function(n){var r=mr[n],i=t[n];!r.required||i||t[r.fallback]?i&&!r.isValid(i)&&e.push({field:n,message:"Invalid field: "+n}):e.push({field:n,message:"Required field: "+n})}),e):(e.push({message:"Please supply a valid object"}),e)}(t);if(e.length){var n=ae(e,1);throw new Ar(e,n[0].message)}},request:function(t){var e=this;return te(regeneratorRuntime.mark(function n(){var r,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sr();case 2:return r=e.sent,e.next=5,ye(re({},t,{device:r}));case 5:return e.abrupt("return",(i=e.sent)&&Object.seal(new gr(re({},i.data,{deviceFingerprint:r}))));case 7:case"end":return e.stop()}},n,e)}))()},requestWithAccessCode:function(t){var e=this;return te(regeneratorRuntime.mark(function n(){var r,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sr();case 2:return r=e.sent,e.next=5,ve(t);case 5:return e.abrupt("return",(i=e.sent)&&Object.seal(new gr(re({},i.data,{deviceFingerprint:r}))));case 7:case"end":return e.stop()}},n,e)}))()},initialize:function(t){return Object.seal(new gr(t))},verify:function(t){var e=this;return te(regeneratorRuntime.mark(function n(){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,be(t);case 2:return e.abrupt("return",(r=e.sent)&&r.data);case 4:case"end":return e.stop()}},n,e)}))()}},xr=function(t){return ce.get(ge.paystackApiUrl+"bank",{params:t}).then(function(t){return t.data})},Cr=function(){return ce.get(ge.paystackApiUrl+"checkout/resolutions").then(function(t){return t.data})},Br=function(){return ce.get(ge.paystackApiUrl+"checkout/celebrations").then(function(t){return t.data})},Dr=function(t){return ce.get(ge.paystackApiUrl+"address_verification/states",{params:t}).then(function(t){return t.data})},Or=function(){function t(){ee(this,t)}return ne(t,null,[{key:"contents",value:function(){return[{key:"banks",usage:"Returns a list of banks that can be used to complete checkout"},{key:"resolutions",usage:"Returns a list of known errors, mapped to their suggested resolutions"},{key:"celebrations",usage:"Returns a list of upcoming celebrations"},{key:"states",usage:"Returns a list of states for a particular country"}]}},{key:"fetch",value:function(t,e){if(-1>=this.contents().map(function(t){return t.key}).indexOf(t))throw Error("Please provide a valid config key. Use Toolkit.contents() to see available}.");var n=void 0;switch(t){case"banks":n=xr(e||{pay_with_bank:"1"});break;case"resolutions":n=Cr();break;case"celebrations":n=Br();break;case"states":n=Dr(e)}return n}}]),t}();return t.Transaction=kr,t.BankAccount=mn,t.Card=on,t.PhoneNumber=Dn,t.Toolkit=Or,t}({});
1
+ var Paystack=function(t){"use strict";var e="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function n(){throw Error("setTimeout has not been defined")}function r(){throw Error("clearTimeout has not been defined")}var i=n,o=r;function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===n||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}"function"==typeof e.setTimeout&&(i=setTimeout),"function"==typeof e.clearTimeout&&(o=clearTimeout);var s,u=[],c=!1,h=-1;function l(){c&&s&&(c=!1,s.length?u=s.concat(u):h=-1,u.length&&f())}function f(){if(!c){var t=a(l);c=!0;for(var e=u.length;e;){for(s=u,u=[];++h<e;)s&&s[h].run();h=-1,e=u.length}s=null,c=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===r||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function p(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var n=1;arguments.length>n;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||c||a(f)}function d(t,e){this.fun=t,this.array=e}d.prototype.run=function(){this.fun.apply(null,this.array)};function g(){}var m=g,y=g,v=g,b=g,T=g,w=g,S=g;var E=e.performance||{},A=E.now||E.mozNow||E.msNow||E.oNow||E.webkitNow||function(){return(new Date).getTime()};var k=new Date;var x={nextTick:p,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:m,addListener:y,once:v,off:b,removeListener:T,removeAllListeners:w,emit:S,binding:function(t){throw Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*A.call(E),n=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(n-=t[0],0>(r-=t[1])&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-k)/1e3}};(function(t,e){for(var n=""+e,r="return "+n,i=n.match(/.*\(([^)]*)\)/)[1],o=/['"]!!!([^'"]*)['"]/g,a=[];;){var s=o.exec(r);if(!s)break;a.push(s)}return a.reverse().forEach(function(e){r=r.slice(0,e.index)+t[e[1]]+r.substr(e.index+e[0].length)}),r=r.replace(/\/\*[^*]*\*\//g," ").replace(/\s+/g," "),Function(i,r)()})({zousan:""+function(t){t=t||"object"==typeof x&&p||"function"==typeof setImmediate&&setImmediate||function(t){setTimeout(t,0)};var e=function(){var e=[],n=0,r=1024;function i(){for(;e.length-n;){try{e[n]()}catch(t){}e[n++]=void 0,n===r&&(e.splice(0,r),n=0)}}return function(r){e.push(r),e.length-n==1&&t(i)}}();function n(t){if(t){var e=this;t(function(t){e.resolve(t)},function(t){e.reject(t)})}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}return n.prototype={resolve:function(t){if(void 0===this.state){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var n=this;if(t&&("function"==typeof t||"object"==typeof t))try{var i=0,o=t.then;if("function"==typeof o)return void o.call(t,function(t){i++||n.resolve(t)},function(t){i++||n.reject(t)})}catch(t){return void(i||this.reject(t))}this.state=r,this.v=t,n.c&&e(function(){for(var e=0,i=n.c.length;i>e;e++)r(n.c[e],t)})}},reject:function(t){if(void 0===this.state){this.state=i,this.v=t;var n=this.c;n&&e(function(){for(var e=0,r=n.length;r>e;e++)i(n[e],t)})}},then:function(t,r){var i=new n,o={y:t,n:r,p:i};if(void 0===this.state)this.c?this.c.push(o):this.c=[o];else{var a=this.state,s=this.v;e(function(){a(o,s)})}return i}},n.resolve=function(t){if(t&&t instanceof n)return t;var e=new n;return e.resolve(t),e},n.reject=function(t){if(t&&t instanceof n)return t;var e=new n;return e.reject(t),e},n.version="2.3.3-nodent",n},thenable:""+function(){function t(t){return t&&t instanceof Object&&"function"==typeof t.then}function e(n,r,i){try{var o=i?i(r):r;if(n===o)return n.reject(new TypeError("Promise resolution loop"));t(o)?o.then(function(t){e(n,t)},function(t){n.reject(t)}):n.resolve(o)}catch(t){n.reject(t)}}function n(t){}function r(){}function i(n,i){var o=new r;try{this._resolver(function(r){return t(r)?r.then(n,i):e(o,r,n)},function(t){e(o,t,i)})}catch(t){e(o,t,i)}return o}function o(t){this._resolver=t,this.then=i}return r.prototype={resolve:n,reject:n,then:function(t,e){this.resolve=t,this.reject=e}},o.resolve=function(t){return o.isThenable(t)?t:{then:function(e){return e(t)}}},o.isThenable=t,o}},function t(e,n){function r(){return i.apply(e,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:t,enumerable:!1,configurable:!0,writable:!0}),t.trampoline||(t.trampoline=function(t,e,n,r,i){return function o(a){for(;a;){if(a.then)return a=a.then(o,r),i?void 0:a;try{if(a.pop){if(a.length)return a.pop()?e.call(t):a;a=n}else a=a.call(t)}catch(t){return r(t)}}}}),t.LazyThenable||(t.LazyThenable="!!!thenable"(),t.EagerThenable=t.Thenable=(t.EagerThenableFactory="!!!zousan")());var i=this;switch(n){case!0:return new t.Thenable(r);case 0:return new t.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(e,arguments)}catch(t){return n(t)}}}})(),function t(e,n){if(Function.prototype.$asyncspawn||Object.defineProperty(Function.prototype,"$asyncspawn",{value:t,enumerable:!1,configurable:!0,writable:!0}),this instanceof Function){var r=this;return new e(function(t,e){var i=r.call(n,t,e);!function n(r,o){var a;try{if((a=r.call(i,o)).done){if(a.value!==t){if(a.value&&a.value===a.value.then)return a.value(t,e);t&&t(a.value),t=null}return}a.value.then?a.value.then(function(t){n(i.next,t)},function(t){n(i.throw,t)}):n(i.next,a.value)}catch(t){return e&&e(t),void(e=null)}}(i.next)})}}();var C=function(t,e){return function(){for(var n=Array(arguments.length),r=0;n.length>r;r++)n[r]=arguments[r];return t.apply(e,n)}},B=Object.prototype.toString;function D(t){return"[object Array]"===B.call(t)}function O(t){return void 0===t}function P(t){return null!==t&&"object"==typeof t}function R(t){if("[object Object]"!==B.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function I(t){return"[object Function]"===B.call(t)}function N(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),D(t))for(var n=0,r=t.length;r>n;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}var M={isArray:D,isArrayBuffer:function(t){return"[object ArrayBuffer]"===B.call(t)},isBuffer:function(t){return null!==t&&!O(t)&&null!==t.constructor&&!O(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:P,isPlainObject:R,isUndefined:O,isDate:function(t){return"[object Date]"===B.call(t)},isFile:function(t){return"[object File]"===B.call(t)},isBlob:function(t){return"[object Blob]"===B.call(t)},isFunction:I,isStream:function(t){return P(t)&&I(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:N,merge:function t(){var e={};function n(n,r){e[r]=R(e[r])&&R(n)?t(e[r],n):R(n)?t({},n):D(n)?n.slice():n}for(var r=0,i=arguments.length;i>r;r++)N(arguments[r],n);return e},extend:function(t,e,n){return N(e,function(e,r){t[r]=n&&"function"==typeof e?C(e,n):e}),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}};function _(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var V=function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(M.isURLSearchParams(e))r=""+e;else{var i=[];M.forEach(e,function(t,e){null!==t&&void 0!==t&&(M.isArray(t)?e+="[]":t=[t],M.forEach(t,function(t){M.isDate(t)?t=t.toISOString():M.isObject(t)&&(t=JSON.stringify(t)),i.push(_(e)+"="+_(t))}))}),r=i.join("&")}if(r){var o=t.indexOf("#");-1!==o&&(t=t.slice(0,o)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t};function j(){this.handlers=[]}j.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},j.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},j.prototype.forEach=function(t){M.forEach(this.handlers,function(e){null!==e&&t(e)})};var L=j,U=function(t,e){M.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})},F=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t},q=function(t,e,n,r,i){return F(Error(t),e,n,r,i)},H=function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(q("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)},z=M.isStandardBrowserEnv()?{write:function(t,e,n,r,i,o){var a=[];a.push(t+"="+encodeURIComponent(e)),M.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),M.isString(r)&&a.push("path="+r),M.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},G=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],K=function(t){var e,n,r,i={};return t?(M.forEach(t.split("\n"),function(t){if(r=t.indexOf(":"),e=M.trim(t.substr(0,r)).toLowerCase(),n=M.trim(t.substr(r+1)),e){if(i[e]&&G.indexOf(e)>=0)return;i[e]="set-cookie"===e?(i[e]?i[e]:[]).concat([n]):i[e]?i[e]+", "+n:n}}),i):i},X=M.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=r(window.location.href),function(e){var n=M.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},W=function(t){return new Promise(function(e,n){var r=t.data,i=t.headers,o=t.responseType;M.isFormData(r)&&delete i["Content-Type"];var a=new XMLHttpRequest;t.auth&&(i.Authorization="Basic "+btoa((t.auth.username||"")+":"+(t.auth.password?unescape(encodeURIComponent(t.auth.password)):"")));var s,u,c=(u=t.url,(s=t.baseURL)&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(u)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(s,u):u);function h(){if(a){var r="getAllResponseHeaders"in a?K(a.getAllResponseHeaders()):null;H(e,n,{data:o&&"text"!==o&&"json"!==o?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:r,config:t,request:a}),a=null}}if(a.open(t.method.toUpperCase(),V(c,t.params,t.paramsSerializer),!0),a.timeout=t.timeout,"onloadend"in a?a.onloadend=h:a.onreadystatechange=function(){a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))&&setTimeout(h)},a.onabort=function(){a&&(n(q("Request aborted",t,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(q("Network Error",t,null,a)),a=null},a.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(q(e,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",a)),a=null},M.isStandardBrowserEnv()){var l=(t.withCredentials||X(c))&&t.xsrfCookieName?z.read(t.xsrfCookieName):void 0;l&&(i[t.xsrfHeaderName]=l)}"setRequestHeader"in a&&M.forEach(i,function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete i[e]:a.setRequestHeader(e,t)}),M.isUndefined(t.withCredentials)||(a.withCredentials=!!t.withCredentials),o&&"json"!==o&&(a.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&a.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){a&&(a.abort(),n(t),a=null)}),r||(r=null),a.send(r)})},Z={"Content-Type":"application/x-www-form-urlencoded"};function J(t,e){!M.isUndefined(t)&&M.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var Y,$={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?Y=W:void 0!==x&&"[object process]"===Object.prototype.toString.call(x)&&(Y=W),Y),transformRequest:[function(t,e){return U(e,"Accept"),U(e,"Content-Type"),M.isFormData(t)||M.isArrayBuffer(t)||M.isBuffer(t)||M.isStream(t)||M.isFile(t)||M.isBlob(t)?t:M.isArrayBufferView(t)?t.buffer:M.isURLSearchParams(t)?(J(e,"application/x-www-form-urlencoded;charset=utf-8"),""+t):M.isObject(t)||e&&"application/json"===e["Content-Type"]?(J(e,"application/json"),JSON.stringify(t)):t}],transformResponse:[function(t){var e=this.transitional,n=!(e&&e.silentJSONParsing)&&"json"===this.responseType;if(n||e&&e.forcedJSONParsing&&M.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw F(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&300>t}};$.headers={common:{Accept:"application/json, text/plain, */*"}},M.forEach(["delete","get","head"],function(t){$.headers[t]={}}),M.forEach(["post","put","patch"],function(t){$.headers[t]=M.merge(Z)});var Q=$,tt=function(t,e,n){var r=this||Q;return M.forEach(n,function(n){t=n.call(r,t,e)}),t},et=function(t){return!(!t||!t.__CANCEL__)};function nt(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var rt=function(t){return nt(t),t.headers=t.headers||{},t.data=tt.call(t,t.data,t.headers,t.transformRequest),t.headers=M.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),M.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||Q.adapter)(t).then(function(e){return nt(t),e.data=tt.call(t,e.data,e.headers,t.transformResponse),e},function(e){return et(e)||(nt(t),e&&e.response&&(e.response.data=tt.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})},it=function(t,e){e=e||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(t,e){return M.isPlainObject(t)&&M.isPlainObject(e)?M.merge(t,e):M.isPlainObject(e)?M.merge({},e):M.isArray(e)?e.slice():e}function u(r){M.isUndefined(e[r])?M.isUndefined(t[r])||(n[r]=s(void 0,t[r])):n[r]=s(t[r],e[r])}M.forEach(r,function(t){M.isUndefined(e[t])||(n[t]=s(void 0,e[t]))}),M.forEach(i,u),M.forEach(o,function(r){M.isUndefined(e[r])?M.isUndefined(t[r])||(n[r]=s(void 0,t[r])):n[r]=s(void 0,e[r])}),M.forEach(a,function(r){r in e?n[r]=s(t[r],e[r]):r in t&&(n[r]=s(void 0,t[r]))});var c=r.concat(i).concat(o).concat(a),h=Object.keys(t).concat(Object.keys(e)).filter(function(t){return-1===c.indexOf(t)});return M.forEach(h,u),n},ot="Promise based HTTP client for the browser and node.js",at={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},st={type:"git",url:"https://github.com/axios/axios.git"},ut=["xhr","http","ajax","promise","node"],ct={url:"https://github.com/axios/axios/issues"},ht={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},lt={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},ft="dist/axios.min.js",pt={"follow-redirects":"^1.14.0"},dt=[{path:"./dist/axios.min.js",threshold:"5kB"}],gt="https://registry.npmjs.org/axios/-/axios-0.21.2.tgz",mt="sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg==",yt={name:"axios",version:"0.21.2",description:ot,main:"index.js",scripts:at,repository:st,keywords:ut,author:"Matt Zabriskie",license:"MIT",bugs:ct,homepage:"https://axios-http.com",devDependencies:ht,browser:lt,jsdelivr:"dist/axios.min.js",unpkg:ft,typings:"./index.d.ts",dependencies:pt,bundlesize:dt,_resolved:gt,_integrity:mt,_from:"axios@0.21.2"},vt=Object.freeze({name:"axios",version:"0.21.2",description:ot,main:"index.js",scripts:at,repository:st,keywords:ut,author:"Matt Zabriskie",license:"MIT",bugs:ct,homepage:"https://axios-http.com",devDependencies:ht,browser:lt,jsdelivr:"dist/axios.min.js",unpkg:ft,typings:"./index.d.ts",dependencies:pt,bundlesize:dt,_resolved:gt,_integrity:mt,_from:"axios@0.21.2",default:yt}),bt=vt&&yt||vt,Tt={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Tt[t]=function(n){return typeof n===t||"a"+(1>e?"n ":" ")+t}});var wt={},St=bt.version.split(".");function Et(t,e){for(var n=e?e.split("."):St,r=t.split("."),i=0;3>i;i++){if(n[i]>r[i])return!0;if(r[i]>n[i])return!1}return!1}Tt.transitional=function(t,e,n){var r=e&&Et(e);function i(t,e){return"[Axios v"+bt.version+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,o,a){if(!1===t)throw Error(i(o," has been removed in "+e));return r&&!wt[o]&&(wt[o]=!0,console.warn(i(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,a)}};var At={isOlderVersion:Et,assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var o=r[i],a=e[o];if(a){var s=t[o],u=void 0===s||a(s,o,t);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:Tt},kt=At.validators;function xt(t){this.defaults=t,this.interceptors={request:new L,response:new L}}xt.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=it(this.defaults,t)).method=t.method?t.method.toLowerCase():this.defaults.method?this.defaults.method.toLowerCase():"get";var e=t.transitional;void 0!==e&&At.assertOptions(e,{silentJSONParsing:kt.transitional(kt.boolean,"1.0.0"),forcedJSONParsing:kt.transitional(kt.boolean,"1.0.0"),clarifyTimeoutError:kt.transitional(kt.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))});var i,o=[];if(this.interceptors.response.forEach(function(t){o.push(t.fulfilled,t.rejected)}),!r){var a=[rt,void 0];for(Array.prototype.unshift.apply(a,n),a.concat(o),i=Promise.resolve(t);a.length;)i=i.then(a.shift(),a.shift());return i}for(var s=t;n.length;){var u=n.shift(),c=n.shift();try{s=u(s)}catch(t){c(t);break}}try{i=rt(s)}catch(t){return Promise.reject(t)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},xt.prototype.getUri=function(t){return t=it(this.defaults,t),V(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},M.forEach(["delete","get","head","options"],function(t){xt.prototype[t]=function(e,n){return this.request(it(n||{},{method:t,url:e,data:(n||{}).data}))}}),M.forEach(["post","put","patch"],function(t){xt.prototype[t]=function(e,n,r){return this.request(it(r||{},{method:t,url:e,data:n}))}});var Ct=xt;function Bt(t){this.message=t}Bt.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Bt.prototype.__CANCEL__=!0;var Dt=Bt;function Ot(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new Dt(t),e(n.reason))})}Ot.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Ot.source=function(){var t;return{token:new Ot(function(e){t=e}),cancel:t}};var Pt=Ot;function Rt(t){var e=new Ct(t),n=C(Ct.prototype.request,e);return M.extend(n,Ct.prototype,e),M.extend(n,e),n}var It=Rt(Q);It.Axios=Ct,It.create=function(t){return Rt(it(It.defaults,t))},It.Cancel=Dt,It.CancelToken=Pt,It.isCancel=et,It.all=function(t){return Promise.all(t)},It.spread=function(t){return function(e){return t.apply(null,e)}},It.isAxiosError=function(t){return"object"==typeof t&&!0===t.isAxiosError};var Nt=It;Nt.default=It;var Mt=Nt,_t=Object.prototype.hasOwnProperty,Vt=Array.isArray,jt=function(){for(var t=[],e=0;256>e;++e)t.push("%"+((16>e?"0":"")+e.toString(16)).toUpperCase());return t}(),Lt=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;t.length>r;++r)void 0!==t[r]&&(n[r]=t[r]);return n},Ut={arrayToObject:Lt,assign:function(t,e){return Object.keys(e).reduce(function(t,n){return t[n]=e[n],t},t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;e.length>r;++r)for(var i=e[r],o=i.obj[i.prop],a=Object.keys(o),s=0;a.length>s;++s){var u=a[s],c=o[u];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(e.push({obj:o,prop:u}),n.push(c))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(Vt(n)){for(var r=[],i=0;n.length>i;++i)void 0!==n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n){if(0===t.length)return t;var r="string"==typeof t?t:t+"";if("iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"});for(var i="",o=0;r.length>o;++o){var a=r.charCodeAt(o);45!==a&&46!==a&&95!==a&&126!==a&&(48>a||a>57)&&(65>a||a>90)&&(97>a||a>122)?128>a?i+=jt[a]:2048>a?i+=jt[192|a>>6]+jt[128|63&a]:a>=55296&&57344>a?(a=65536+((1023&a)<<10|1023&r.charCodeAt(o+=1)),i+=jt[240|a>>18]+jt[128|a>>12&63]+jt[128|a>>6&63]+jt[128|63&a]):i+=jt[224|a>>12]+jt[128|a>>6&63]+jt[128|63&a]:i+=r.charAt(o)}return i},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},merge:function t(e,n,r){if(!n)return e;if("object"!=typeof n){if(Vt(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!_t.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var i=e;return Vt(e)&&!Vt(n)&&(i=Lt(e,r)),Vt(e)&&Vt(n)?(n.forEach(function(n,i){if(_t.call(e,i)){var o=e[i];o&&"object"==typeof o&&n&&"object"==typeof n?e[i]=t(o,n,r):e.push(n)}else e[i]=n}),e):Object.keys(n).reduce(function(e,i){var o=n[i];return e[i]=_t.call(e,i)?t(e[i],o,r):o,e},i)}},Ft=String.prototype.replace,qt=/%20/g,Ht={default:"RFC3986",formatters:{RFC1738:function(t){return Ft.call(t,qt,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"},zt=Object.prototype.hasOwnProperty,Gt={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},Kt=Array.isArray,Xt=Array.prototype.push,Wt=function(t,e){Xt.apply(t,Kt(e)?e:[e])},Zt=Date.prototype.toISOString,Jt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ut.encode,encodeValuesOnly:!1,formatter:Ht.formatters[Ht.default],indices:!1,serializeDate:function(t){return Zt.call(t)},skipNulls:!1,strictNullHandling:!1},Yt=function t(e,n,r,i,o,a,s,u,c,h,l,f,p){var d=e;if("function"==typeof s?d=s(n,d):d instanceof Date?d=h(d):"comma"===r&&Kt(d)&&(d=d.join(",")),null===d){if(i)return a&&!f?a(n,Jt.encoder,p):n;d=""}if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||Ut.isBuffer(d))return a?[l(f?n:a(n,Jt.encoder,p))+"="+l(a(d,Jt.encoder,p))]:[l(n)+"="+l(d+"")];var g,m=[];if(void 0===d)return m;if(Kt(s))g=s;else{var y=Object.keys(d);g=u?y.sort(u):y}for(var v=0;g.length>v;++v){var b=g[v];o&&null===d[b]||(Kt(d)?Wt(m,t(d[b],"function"==typeof r?r(n,b):n,r,i,o,a,s,u,c,h,l,f,p)):Wt(m,t(d[b],n+(c?"."+b:"["+b+"]"),r,i,o,a,s,u,c,h,l,f,p)))}return m},$t=function(t,e){var n,r=t,i=function(t){if(!t)return Jt;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||Jt.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Ht.default;if(void 0!==t.format){if(!zt.call(Ht.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=Ht.formatters[n],i=Jt.filter;return("function"==typeof t.filter||Kt(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:Jt.addQueryPrefix,allowDots:void 0===t.allowDots?Jt.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:Jt.charsetSentinel,delimiter:void 0===t.delimiter?Jt.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:Jt.encode,encoder:"function"==typeof t.encoder?t.encoder:Jt.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:Jt.encodeValuesOnly,filter:i,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:Jt.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:Jt.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:Jt.strictNullHandling}}(e);"function"==typeof i.filter?r=(0,i.filter)("",r):Kt(i.filter)&&(n=i.filter);var o=[];if("object"!=typeof r||null===r)return"";var a=Gt[e&&e.arrayFormat in Gt?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices"];n||(n=Object.keys(r)),i.sort&&n.sort(i.sort);for(var s=0;n.length>s;++s){var u=n[s];i.skipNulls&&null===r[u]||Wt(o,Yt(r[u],u,a,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.formatter,i.encodeValuesOnly,i.charset))}var c=o.join(i.delimiter),h=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&(h+="iso-8859-1"===i.charset?"utf8=%26%2310003%3B&":"utf8=%E2%9C%93&"),c.length>0?h+c:""},Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te=function(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,o){try{var a=e[i](o),s=a.value}catch(t){return void n(t)}if(!a.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}},ee=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ne=function(){function t(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),re=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ie=function(t,e){var n={};for(var r in t)0>e.indexOf(r)&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},oe=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},ae=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),se=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);t.length>e;e++)n[e]=t[e];return n}return Array.from(t)},ue=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(t).filter(function(e){return![void 0,null].includes(t[e])}).reduce(function(e,n){return re({},e,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,t[n]))},{})},ce=Mt.create({paramsSerializer:function(t){var e=ue(t);return $t(e,{arrayFormat:"brackets"})}}),he={cookieTestUrl:"https://legacy-staging.paystack.co/test-iframe/start.html",publishableKey:"uFmz/uE/SDT6GupOrSEXIZXGByjQ0zFkPyc9LqKHFqnTI0WPN3JS5kQPo/j9or0TOXlqMQj2lzHn/UGsQT4XeQ==",publicKey:"-----BEGIN PUBLIC KEY-----\r\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALhZs/7hP0g0+hrqTq0hFyGVxgco0NMx\r\nZD8nPS6ihxap0yNFjzdyUuZED6P4/aK9Ezl5ajEI9pcx5/1BrEE+F3kCAwEAAQ==\r\n-----END PUBLIC KEY-----"},le=re({},he,{checkoutUrl:"http://localhost:8080/",paymentBaseUrl:"https://legacy-staging.paystack.co/",paystackApiUrl:"https://studio-api.paystack.co/",pusherKey:"1c7b262ee18455815893",pusherUrl:"https://s3-eu-west-1.amazonaws.com/pstk-public-files/js/pusher.min.js"}),fe=re({},he,{checkoutUrl:"https://checkout-studio.paystack.com/",paymentBaseUrl:"https://legacy-staging.paystack.co/",paystackApiUrl:"https://studio-api.paystack.co/",pusherKey:"1c7b262ee18455815893",pusherUrl:"https://s3-eu-west-1.amazonaws.com/pstk-public-files/js/pusher.min.js"}),pe=re({},he,{checkoutUrl:"https://checkout.paystack.com/",paymentBaseUrl:"https://standard.paystack.co/",paystackApiUrl:"https://api.paystack.co/",pusherKey:"8e4b9b7ca3418bd5cdc8",pusherUrl:"https://checkout.paystack.com/static/vendor/pusher.min.js"}),de=void 0;switch((window||x.env).paystackEnvironment){case"dev":de=le;break;case"staging":de=fe;break;default:de=pe}var ge=de,me={success:function(t){var e=t.message,n=ie(t,["message","status","errors"]);return{status:"success",message:e||"Successful",data:n}},pending:function(t){var e=t.message,n=ie(t,["message","status","errors"]);return{status:"pending",message:e||"Payment in progress",data:n}},transferCreditRequest:function(t){var e=t.message,n=t.status,r=ie(t,["message","status","errors"]);return{status:n,message:e||"Transfer credit request",data:r}},incorrectAmountSent:function(t){var e=t.message,n=t.status,r=ie(t,["message","status","errors"]);return{status:n,message:e||"Incorrect amount sent",data:r}},auth:function(t){return{status:"auth",message:t.otpmessage||t.message||"Authentication required",data:re({auth:t.auth},t.countryCode&&{countryCode:t.countryCode},t.openInNewTab&&{openInNewTab:t.openInNewTab},t.length&&{length:t.length})}},requery:function(t){return{status:"requery",message:t.message||"Requery"}},requestCustomField:function(t){return{status:"custom_field",message:t.message,data:{type:t.type,format:t.format,field:t.field}}},error:function(t){var e={status:"failed",message:t.message||"Failed",errors:t.errors||[]};return t.bank&&(e.bank=t.bank),e},parse:function(t){var e="object"===(void 0===t?"undefined":Qt(t))?t:{};if(e.data&&"object"===Qt(e.data)&&(Object.assign(e,e.data),delete e.data),["true",!0,"success"].includes(e.status))return this.success(e);if("pending"===e.status)return this.pending(e);if("requery"===e.status)return this.requery(e);if("send"===e.status)return this.requestCustomField(e);if(["transfer-credit-request-received","transfer-credit-request-pending","transfer-credit-request-rejected"].includes(e.status))return this.transferCreditRequest(e);if("incorrect-amount-sent"===e.status)this.incorrectAmountSent(e);else if(e.auth&&"none"!==e.auth)return this.auth(e);return this.error(e)}},ye=function(t){return ce.get(ge.paystackApiUrl+"checkout/request_inline",{params:t}).then(function(t){return t.data})},ve=function(t){return ce.get(ge.paystackApiUrl+"transaction/verify_access_code/"+t).then(function(t){return t.data})},be=function(t){return ce.get(ge.paystackApiUrl+"transaction/verify/"+t).then(function(t){return t.data})},Te=function(t){return ce.get(ge.paymentBaseUrl+"charge/requery/"+t).then(function(t){return me.parse(t.data)})},we=function(t){return ce.patch(ge.paystackApiUrl+"transaction/"+t.transactionId+"/mark-as-abandoned",{},{headers:{Authorization:"Bearer "+t.publicKey}}).then(function(t){return t.data})};var Se=function(t){for(var e,n=0,r=!1,i=t.length-1;i>=0;)e=parseInt(t.charAt(i),10),r&&(e*=2)>9&&(e=e%10+1),r=!r,n+=e,i--;return n%10==0},Ee={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[624,626],[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[622019,622999],[62207,62209],[622126,622925],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}};var Ae=function(t){return t?JSON.parse(JSON.stringify(t)):null};var ke=function(t){if(function(t){var e=t.filter(function(t){return t.matchStrength}).length;return e>0&&e===t.length}(t))return t.reduce(function(t,e){return t?e.matchStrength>t.matchStrength?e:t:e})};var xe=function(t){return"string"==typeof t||t instanceof String};var Ce=function(t,e){return Array.isArray(e)?function(t,e,n){var r=t.substr(0,(e+"").length),i=parseInt(r,10);return e=parseInt((e+"").substr(0,r.length),10),n=parseInt((n+"").substr(0,r.length),10),i>=e&&n>=i}(t,e[0],e[1]):function(t,e){return(e+="").substring(0,t.length)===t.substring(0,e.length)}(t,e)};var Be,De=function(t,e,n){var r,i,o,a;for(r=0;e.patterns.length>r;r++)if(Ce(t,i=e.patterns[r])){a=Ae(e),(o=Array.isArray(i)?(i[0]+"").length:(i+"").length)>t.length||(a.matchStrength=o),n.push(a);break}},Oe={},Pe={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},Re=[Pe.VISA,Pe.MASTERCARD,Pe.AMERICAN_EXPRESS,Pe.DINERS_CLUB,Pe.DISCOVER,Pe.JCB,Pe.UNIONPAY,Pe.MAESTRO,Pe.ELO,Pe.MIR,Pe.HIPER,Pe.HIPERCARD];function Ie(t){return Oe[t]||Ee[t]}function Ne(t,e){var n=Be.indexOf(t);if(!e&&-1===n)throw Error('"'+t+'" is not a supported card type.');return n}function Me(t){var e,n=[];return xe(t)?0===t.length?Be.map(function(t){return Ae(Ie(t))}):(Be.forEach(function(e){var r=Ie(e);De(t,r,n)}),(e=ke(n))?[e]:n):[]}Be=Ae(Re),Me.getTypeInfo=function(t){return Ae(Ie(t))},Me.removeCard=function(t){var e=Ne(t);Be.splice(e,1)},Me.addCard=function(t){var e=Ne(t.type,!0);Oe[t.type]=t,-1===e&&Be.push(t.type)},Me.updateCard=function(t,e){var n,r=Oe[t]||Ee[t];if(!r)throw Error('"'+t+'" is not a recognized type. Use `addCard` instead.');if(e.type&&r.type!==e.type)throw Error("Cannot overwrite type parameter.");n=Ae(r,!0),Object.keys(n).forEach(function(t){e[t]&&(n[t]=e[t])}),Oe[n.type]=n},Me.changeOrder=function(t,e){var n=Ne(t);Be.splice(n,1),Be.splice(e,0,t)},Me.resetModifications=function(){Be=Ae(Re),Oe={}},Me.types=Pe;var _e=Me;function Ve(t,e,n){return{card:t,isPotentiallyValid:e,isValid:n}}var je=19;function Le(t,e,n){return{isValid:t,isPotentiallyValid:e,isCurrentYear:n||!1}}var Ue=function(t,e){var n,r,i,o,a;return e=e||je,"string"!=typeof t?Le(!1,!1):""===t.replace(/\s/g,"")?Le(!1,!0):/^\d*$/.test(t)?2>(r=t.length)?Le(!1,!0):(n=(new Date).getFullYear(),3===r?Le(!1,t.slice(0,2)===(n+"").slice(0,2)):r>4?Le(!1,!1):(t=parseInt(t,10),i=+(n+"").substr(2,2),2===r?(a=i===t,o=t>=i&&i+e>=t):4===r&&(a=n===t,o=t>=n&&n+e>=t),Le(o,o,a))):Le(!1,!1)},Fe=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};var qe=function(t){var e,n,r,i,o;return/^\d{4}-\d{1,2}$/.test(t)?t=t.split("-").reverse():/\//.test(t)?t=t.split(/\s*\/\s*/g):/\s/.test(t)&&(t=t.split(/ +/g)),Fe(t)?{month:t[0]||"",year:t.slice(1).join()}:(n=0==(o=+(r=t)[0])?2:o>1?1:1===o&&+r[1]>2?1:1===o?(i=r.substr(1),Ue(i).isPotentiallyValid?1:2):5===r.length?1:r.length>5?2:1,{month:e=t.substr(0,n),year:t.substr(e.length)})};function He(t,e,n){return{isValid:t,isPotentiallyValid:e,isValidForThisYear:n||!1}}var ze=function(t){var e,n,r=(new Date).getMonth()+1;return"string"!=typeof t?He(!1,!1):""===t.replace(/\s/g,"")||"0"===t?He(!1,!0):/^\d*$/.test(t)?(e=parseInt(t,10),isNaN(t)?He(!1,!1):He(n=e>0&&13>e,n,n&&e>=r)):He(!1,!1)};function Ge(t,e,n,r){return{isValid:t,isPotentiallyValid:e,month:n,year:r}}var Ke=3;function Xe(t,e){return{isValid:t,isPotentiallyValid:e}}var We=3;function Ze(t,e){return{isValid:t,isPotentiallyValid:e}}var Je={number:function(t,e){var n,r,i,o,a;if(e=e||{},"number"==typeof t&&(t+=""),"string"!=typeof t)return Ve(null,!1,!1);if(t=t.replace(/\-|\s/g,""),!/^\d*$/.test(t))return Ve(null,!1,!1);if(0===(n=_e(t)).length)return Ve(null,!1,!1);if(1!==n.length)return Ve(null,!0,!1);if(r=n[0],e.maxLength&&t.length>e.maxLength)return Ve(r,!1,!1);for(i=r.type===_e.types.UNIONPAY&&!0!==e.luhnValidateUnionPay||Se(t),a=Math.max.apply(null,r.lengths),e.maxLength&&(a=Math.min(e.maxLength,a)),o=0;r.lengths.length>o;o++)if(r.lengths[o]===t.length)return Ve(r,a>t.length||i,i);return Ve(r,a>t.length,!1)},expirationDate:function(t,e){var n,r,i,o;if("string"==typeof t)t=t.replace(/^(\d\d) (\d\d(\d\d)?)$/,"$1/$2"),n=qe(t);else{if(null===t||"object"!=typeof t)return Ge(!1,!1,null,null);n={month:t.month+"",year:t.year+""}}if(r=ze(n.month),i=Ue(n.year,e),r.isValid){if(i.isCurrentYear)return Ge(o=r.isValidForThisYear,o,n.month,n.year);if(i.isValid)return Ge(!0,!0,n.month,n.year)}return Ge(!1,!(!r.isPotentiallyValid||!i.isPotentiallyValid),null,null)},expirationMonth:ze,expirationYear:Ue,cvv:function(t,e){return e=(e=e||Ke)instanceof Array?e:[e],"string"!=typeof t?Xe(!1,!1):/^\d*$/.test(t)?function(t,e){for(var n=0;t.length>n;n++)if(e===t[n])return!0;return!1}(e,t.length)?Xe(!0,!0):t.length<Math.min.apply(null,e)?Xe(!1,!0):t.length>function(t){for(var e=Ke,n=0;t.length>n;n++)e=t[n]>e?t[n]:e;return e}(e)?Xe(!1,!1):Xe(!0,!0):Xe(!1,!1)},postalCode:function(t,e){var n;return n=(e=e||{}).minLength||We,"string"!=typeof t?Ze(!1,!1):Ze(t.length>=n,!0)},creditCardType:_e},Ye=[{type:"bank_auth",name:"Bank authorization",number:"4084080000000409",cvv:"000",month:"01",year:"30"},{type:"success",name:"Success",number:"4084084084084081",cvv:"408",month:"12",year:"30"},{type:"declined",name:"Declined",number:"4084080000005408",cvv:"001",month:"12",year:"30"},{type:"pin",name:"Pin only validation",number:"507850785078507812",cvv:"884",month:"01",year:"30"},{type:"pin+otp",name:"Pin and OTP validation",number:"5060666666666666666",cvv:"123",month:"01",year:"30"},{type:"pin+phone+otp",name:"Pin, phone and OTP validation",number:"507850785078507812",cvv:"884",month:"01",year:"30"},{type:"default",name:"No validation",number:"4084084084084081",cvv:"408",month:"01",year:"30"}],$e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Qe(t,e){return t(e={exports:{}},e.exports),e.exports}var tn,en=Qe(function(t,e){!function(t){var e="0123456789abcdefghijklmnopqrstuvwxyz";function n(t){return e.charAt(t)}function r(t,e){return t&e}function i(t,e){return t|e}function o(t,e){return t^e}function a(t,e){return t&~e}function s(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function u(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h="=";function l(t){var e,n,r="";for(e=0;t.length>=e+3;e+=3)n=parseInt(t.substring(e,e+3),16),r+=c.charAt(n>>6)+c.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=c.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=c.charAt(n>>2)+c.charAt((3&n)<<4));(3&r.length)>0;)r+=h;return r}function f(t){var e,r="",i=0,o=0;for(e=0;t.length>e&&t.charAt(e)!=h;++e){var a=c.indexOf(t.charAt(e));0>a||(0==i?(r+=n(a>>2),o=3&a,i=1):1==i?(r+=n(o<<2|a>>4),o=15&a,i=2):2==i?(r+=n(o),r+=n(a>>2),o=3&a,i=3):(r+=n(o<<2|a>>4),r+=n(15&a),i=0))}return 1==i&&(r+=n(o<<2)),r}var p,d,g=function(t,e){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},m={decode:function(t){var e;if(void 0===p){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(p={},e=0;16>e;++e)p[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;16>e;++e)p[n.charAt(e)]=e;for(e=0;8>e;++e)p[r.charAt(e)]=-1}var i=[],o=0,a=0;for(e=0;t.length>e;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=p[s])){if(void 0===s)throw Error("Illegal character at offset "+e);o|=s,2>++a?o<<=4:(i[i.length]=o,o=0,a=0)}}if(a)throw Error("Hex encoding incomplete: 4 bits missing");return i}},y={decode:function(t){var e;if(void 0===d){var n="= \f\n\r\t \u2028\u2029";for(d=Object.create(null),e=0;64>e;++e)d["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(e=0;9>e;++e)d[n.charAt(e)]=-1}var r=[],i=0,o=0;for(e=0;t.length>e;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=d[a])){if(void 0===a)throw Error("Illegal character at offset "+e);i|=a,4>++o?i<<=6:(r[r.length]=i>>16,r[r.length]=i>>8&255,r[r.length]=255&i,i=0,o=0)}}switch(o){case 1:throw Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=i>>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=y.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw Error("RegExp out of sync");t=e[2]}return y.decode(t)}},v=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,r,i=this.buf,o=i.length;for(n=0;o>n;++n)1e13>(r=i[n]*t+e)?e=0:r-=1e13*(e=0|r/1e13),i[n]=r;e>0&&(i[n]=e)},t.prototype.sub=function(t){var e,n,r=this.buf,i=r.length;for(e=0;i>e;++e)0>(n=r[e]-t)?(n+=1e13,t=1):t=0,r[e]=n;for(;0===r[r.length-1];)r.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw Error("only base 10 is supported");for(var e=this.buf,n=""+e[e.length-1],r=e.length-2;r>=0;--r)n+=(""+(1e13+e[r])).substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;n>=0;--n)e=1e13*e+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),b="…",T=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,w=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function S(t,e){return t.length>e&&(t=t.substring(0,e)+b),t}var E,A=function(){function t(e,n){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=n)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,n){for(var r="",i=t;e>i;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},t.prototype.isASCII=function(t,e){for(var n=t;e>n;++n){var r=this.get(n);if(32>r||r>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var n="",r=t;e>r;++r)n+=String.fromCharCode(this.get(r));return n},t.prototype.parseStringUTF=function(t,e){for(var n="",r=t;e>r;){var i=this.get(r++);n+=String.fromCharCode(128>i?i:i>191&&224>i?(31&i)<<6|63&this.get(r++):(15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},t.prototype.parseStringBMP=function(t,e){for(var n,r,i="",o=t;e>o;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},t.prototype.parseTime=function(t,e,n){var r=this.parseStringISO(t,e),i=(n?T:w).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=70>+i[1]?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},t.prototype.parseInteger=function(t,e){for(var n,r=this.get(t),i=r>127,o=i?255:0,a="";r==o&&++t<e;)r=this.get(t);if(0==(n=e-t))return i?-1:0;if(n>4){for(a=r,n<<=3;0==(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)\n"}i&&(r-=256);for(var s=new v(r),u=t+1;e>u;++u)s.mulAdd(256,this.get(u));return a+""+s},t.prototype.parseBitString=function(t,e,n){for(var r=this.get(t),i=(e-t-1<<3)-r,o="("+i+" bit)\n",a="",s=t+1;e>s;++s){for(var u=this.get(s),c=s==e-1?r:0,h=7;h>=c;--h)a+=u>>h&1?"1":"0";if(a.length>n)return o+S(a,n)}return o+a},t.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return S(this.parseStringISO(t,e),n);var r=e-t,i="("+r+" byte)\n";r>(n/=2)&&(e=t+n);for(var o=t;e>o;++o)i+=this.hexByte(this.get(o));return r>n&&(i+=b),i},t.prototype.parseOID=function(t,e,n){for(var r="",i=new v,o=0,a=t;e>a;++a){var s=this.get(a);if(i.mulAdd(128,127&s),o+=7,!(128&s)){if(""===r)if((i=i.simplify())instanceof v)i.sub(80),r="2."+i;else{var u=80>i?40>i?0:1:2;r=u+"."+(i-40*u)}else r+="."+i;if(r.length>n)return S(r,n);i=new v,o=0}}return o>0&&(r+=".incomplete"),r},t}(),k=function(){function t(t,e,n,r,i){if(!(r instanceof x))throw Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=r,this.sub=i}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber;case 1:return"Application_"+this.tag.tagNumber;case 2:return"["+this.tag.tagNumber+"]";case 3:return"Private_"+this.tag.tagNumber}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return S(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return S(this.stream.parseStringISO(e,e+n),t);case 30:return S(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(0>this.length||(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var n=0,r=this.sub.length;r>n;++n)e+=this.sub[n].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(n>6)throw Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;e=0;for(var r=0;n>r;++r)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},t.decode=function(e){var n;n=e instanceof A?e:new A(e,0);var r=new A(n),i=new x(n),o=t.decodeLength(n),a=n.pos,s=a-r.pos,u=null,c=function(){var e=[];if(null!==o){for(var r=a+o;r>n.pos;)e[e.length]=t.decode(n);if(n.pos!=r)throw Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var i=t.decode(n);if(i.tag.isEOC())break;e[e.length]=i}o=a-n.pos}catch(t){throw Error("Exception while decoding undefined length content: "+t)}return e};if(i.tagConstructed)u=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw Error("BIT STRINGs with unused bits cannot encapsulate.");u=c();for(var h=0;u.length>h;++h)if(u[h].tag.isEOC())throw Error("EOC is not supposed to be actual content.")}catch(t){u=null}if(null===u){if(null===o)throw Error("We can't skip over an invalid tag with undefined length at offset "+a);n.pos=a+Math.abs(o)}return new t(r,s,o,i,u)},t}(),x=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var n=new v;do{e=t.get(),n.mulAdd(128,127&e)}while(128&e);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],B=(1<<26)/C[C.length-1],D=function(){function t(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):this.fromString(t,null==e&&"string"!=typeof t?256:e))}return t.prototype.toString=function(t){if(0>this.s)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<<e)-1,o=!1,a="",s=this.t,u=this.DB-s*this.DB%e;if(s-- >0)for(this.DB>u&&(r=this[s]>>u)>0&&(o=!0,a=n(r));s>=0;)e>u?(r=(this[s]&(1<<u)-1)<<e-u,r|=this[--s]>>(u+=this.DB-e)):(r=this[s]>>(u-=e)&i,u>0||(u+=this.DB,--s)),r>0&&(o=!0),o&&(a+=n(r));return o?a:"0"},t.prototype.negate=function(){var e=N();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return 0>this.s?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return 0>this.s?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},t.prototype.bitLength=function(){return this.t>0?this.DB*(this.t-1)+F(this[this.t-1]^this.s&this.DM):0},t.prototype.mod=function(e){var n=N();return this.abs().divRemTo(e,null,n),0>this.s&&n.compareTo(t.ZERO)>0&&e.subTo(n,n),n},t.prototype.modPowInt=function(t,e){var n;return n=256>t||e.isEven()?new P(e):new R(e),this.exp(t,n)},t.prototype.clone=function(){var t=N();return this.copyTo(t),t},t.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this[0]?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(this.DB>r&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)8>r?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r>0||(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return 0>this.compareTo(t)?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=N();return this.bitwiseTo(t,r,e),e},t.prototype.or=function(t){var e=N();return this.bitwiseTo(t,i,e),e},t.prototype.xor=function(t){var e=N();return this.bitwiseTo(t,o,e),e},t.prototype.andNot=function(t){var e=N();return this.bitwiseTo(t,a,e),e},t.prototype.not=function(){for(var t=N(),e=0;this.t>e;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=N();return 0>t?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=N();return 0>t?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;this.t>t;++t)if(0!=this[t])return t*this.DB+s(this[t]);return 0>this.s?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;this.t>n;++n)t+=u(this[n]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return this.t>e?0!=(this[e]&1<<t%this.DB):0!=this.s},t.prototype.setBit=function(t){return this.changeBit(t,i)},t.prototype.clearBit=function(t){return this.changeBit(t,a)},t.prototype.flipBit=function(t){return this.changeBit(t,o)},t.prototype.add=function(t){var e=N();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=N();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=N();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=N();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=N();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=N(),n=N();return this.divRemTo(t,e,n),[e,n]},t.prototype.modPow=function(t,e){var n,r,i=t.bitLength(),o=U(1);if(0>=i)return o;n=18>i?1:48>i?3:144>i?4:768>i?5:6,r=8>i?new P(e):e.isEven()?new I(e):new R(e);var a=[],s=3,u=n-1,c=(1<<n)-1;if(a[1]=r.convert(this),n>1){var h=N();for(r.sqrTo(a[1],h);c>=s;)a[s]=N(),r.mulTo(h,a[s-2],a[s]),s+=2}var l,f,p=t.t-1,d=!0,g=N();for(i=F(t[p])-1;p>=0;){for(u>i?(l=(t[p]&(1<<i+1)-1)<<u-i,p>0&&(l|=t[p-1]>>this.DB+i-u)):l=t[p]>>i-u&c,s=n;0==(1&l);)l>>=1,--s;if(0>(i-=s)&&(i+=this.DB,--p),d)a[l].copyTo(o),d=!1;else{for(;s>1;)r.sqrTo(o,g),r.sqrTo(g,o),s-=2;s>0?r.sqrTo(o,g):(f=o,o=g,g=f),r.mulTo(g,a[l],o)}for(;p>=0&&0==(t[p]&1<<i);)r.sqrTo(o,g),f=o,o=g,g=f,0>--i&&(i=this.DB-1,--p)}return r.revert(o)},t.prototype.modInverse=function(e){var n=e.isEven();if(this.isEven()&&n||0==e.signum())return t.ZERO;for(var r=e.clone(),i=this.clone(),o=U(1),a=U(0),s=U(0),u=U(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),n?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);0>r.compareTo(i)?(i.subTo(r,i),n&&s.subTo(o,s),u.subTo(a,u)):(r.subTo(i,r),n&&o.subTo(s,o),a.subTo(u,a))}return 0!=i.compareTo(t.ONE)?t.ZERO:0>u.compareTo(e)?0>u.signum()?(u.addTo(e,u),0>u.signum()?u.add(e):u):u:u.subtract(e)},t.prototype.pow=function(t){return this.exp(t,new O)},t.prototype.gcd=function(t){var e=0>this.s?this.negate():this.clone(),n=0>t.s?t.negate():t.clone();if(0>e.compareTo(n)){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(0>o)return e;for(o>i&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),0>e.compareTo(n)?(n.subTo(e,n),n.rShiftTo(1,n)):(e.subTo(n,e),e.rShiftTo(1,e));return o>0&&n.lShiftTo(o,n),n},t.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&C[C.length-1]>=n[0]){for(e=0;C.length>e;++e)if(n[0]==C[e])return!0;return!1}if(n.isEven())return!1;for(e=1;C.length>e;){for(var r=C[e],i=e+1;C.length>i&&B>r;)r*=C[i++];for(r=n.modInt(r);i>e;)if(r%C[e++]==0)return!1}return n.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=0>t?-1:0,t>0?this[0]=t:-1>t?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(e,n);r=2}this.t=0,this.s=0;for(var i=e.length,o=!1,a=0;--i>=0;){var s=8==r?255&+e[i]:L(e,i);0>s?"-"==e.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,this.DB>(a+=r)||(a-=this.DB))}8==r&&0!=(128&+e[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var n=t;this.t>n;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(t/this.DB),a=this.s<<n&this.DM,s=this.t-1;s>=0;--s)e[s+o+1]=this[s]>>r|a,a=(this[s]&i)<<n;for(var s=o-1;s>=0;--s)e[s]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(this.t>n){var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(var a=n+1;this.t>a;++a)e[a-n-1]|=(this[a]&o)<<i,e[a-n]=this[a]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}else e.t=0},t.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);i>n;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(this.t>t.t){for(r-=t.s;this.t>n;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;t.t>n;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=0>r?-1:0,-1>r?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},t.prototype.multiplyTo=function(e,n){var r=this.abs(),i=e.abs(),o=r.t;for(n.t=o+i.t;--o>=0;)n[o]=0;for(o=0;i.t>o;++o)n[o+r.t]=r.am(0,i[o],n,o,0,r.t);n.s=0,n.clamp(),this.s!=e.s&&t.ZERO.subTo(n,n)},t.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;e.t-1>n;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))<e.DV||(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,n,r){var i=e.abs();if(i.t>0){var o=this.abs();if(i.t>o.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=N());var a=N(),s=this.s,u=e.s,c=this.DB-F(i[i.t-1]);c>0?(i.lShiftTo(c,a),o.lShiftTo(c,r)):(i.copyTo(a),o.copyTo(r));var h=a.t,l=a[h-1];if(0!=l){var f=l*(1<<this.F1)+(h>1?a[h-2]>>this.F2:0),p=this.FV/f,d=(1<<this.F1)/f,g=1<<this.F2,m=r.t,y=m-h,v=null==n?N():n;for(a.dlShiftTo(y,v),0>r.compareTo(v)||(r[r.t++]=1,r.subTo(v,r)),t.ONE.dlShiftTo(h,v),v.subTo(a,a);h>a.t;)a[a.t++]=0;for(;--y>=0;){var b=r[--m]==l?this.DM:Math.floor(r[m]*p+(r[m-1]+g)*d);if((r[m]+=a.am(0,b,r,y,0,h))<b)for(a.dlShiftTo(y,v),r.subTo(v,r);r[m]<--b;)r.subTo(v,r)}null!=n&&(r.drShiftTo(h,n),s!=u&&t.ZERO.subTo(n,n)),r.t=h,r.clamp(),c>0&&r.rShiftTo(c,r),0>s&&t.ZERO.subTo(r,r)}}},t.prototype.invDigit=function(){if(1>this.t)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,n){if(e>4294967295||1>e)return t.ONE;var r=N(),i=N(),o=n.convert(this),a=F(e)-1;for(o.copyTo(r);--a>=0;)if(n.sqrTo(r,i),(e&1<<a)>0)n.mulTo(i,o,r);else{var s=r;r=i,i=s}return n.revert(r)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||2>t||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=U(n),i=N(),o=N(),a="";for(this.divRemTo(r,i,o);i.signum()>0;)a=(n+o.intValue()).toString(t).substr(1)+a,i.divRemTo(r,i,o);return o.intValue().toString(t)+a},t.prototype.fromRadix=function(e,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),o=!1,a=0,s=0,u=0;e.length>u;++u){var c=L(e,u);0>c?"-"==e.charAt(u)&&0==this.signum()&&(o=!0):(s=n*s+c,++a<r||(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(s,0)),o&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,n,r){if("number"==typeof n)if(2>e)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),i,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var o=[],a=7&e;o.length=1+(e>>3),n.nextBytes(o),a>0?o[0]&=(1<<a)-1:o[0]=0,this.fromString(o,256)}},t.prototype.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;o>r;++r)n[r]=e(this[r],t[r]);if(this.t>t.t){for(i=t.s&this.DM,r=o;this.t>r;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;t.t>r;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},t.prototype.changeBit=function(e,n){var r=t.ONE.shiftLeft(e);return this.bitwiseTo(r,n,r),r},t.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);i>n;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(this.t>t.t){for(r+=t.s;this.t>n;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;t.t>n;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=0>r?-1:0,r>0?e[n++]=r:-1>r&&(e[n++]=this.DV+r),e.t=n,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;e>=this.t;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e<this.t||(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;i>r;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(var i=Math.min(t.t,e);i>r;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()},t.prototype.multiplyUpperTo=function(t,e,n){var r=n.t=this.t+t.t- --e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);t.t>r;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},t.prototype.modInt=function(t){if(0>=t)return 0;var e=this.DV%t,n=0>this.s?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},t.prototype.millerRabin=function(e){var n=this.subtract(t.ONE),r=n.getLowestSetBit();if(0>=r)return!1;var i=n.shiftRight(r);(e=e+1>>1)>C.length&&(e=C.length);for(var o=N(),a=0;e>a;++a){o.fromInt(C[Math.floor(Math.random()*C.length)]);var s=o.modPow(i,this);if(0!=s.compareTo(t.ONE)&&0!=s.compareTo(n)){for(var u=1;u++<r&&0!=s.compareTo(n);)if(0==(s=s.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=s.compareTo(n))return!1}}return!0},t.prototype.square=function(){var t=N();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var n=0>this.s?this.negate():this.clone(),r=0>t.s?t.negate():t.clone();if(0>n.compareTo(r)){var i=n;n=r,r=i}var o=n.getLowestSetBit(),a=r.getLowestSetBit();if(0>a)e(n);else{a>o&&(a=o),a>0&&(n.rShiftTo(a,n),r.rShiftTo(a,r));var s=function(){(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),0>n.compareTo(r)?(r.subTo(n,r),r.rShiftTo(1,r)):(n.subTo(r,n),n.rShiftTo(1,n)),n.signum()>0?setTimeout(s,0):(a>0&&r.lShiftTo(a,r),setTimeout(function(){e(r)},0))};setTimeout(s,10)}},t.prototype.fromNumberAsync=function(e,n,r,o){if("number"==typeof n)if(2>e)this.fromInt(1);else{this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),i,this),this.isEven()&&this.dAddOffset(1,0);var a=this,s=function(){a.dAddOffset(2,0),a.bitLength()>e&&a.subTo(t.ONE.shiftLeft(e-1),a),a.isProbablePrime(n)?setTimeout(function(){o()},0):setTimeout(s,0)};setTimeout(s,0)}else{var u=[],c=7&e;u.length=1+(e>>3),n.nextBytes(u),c>0?u[0]&=(1<<c)-1:u[0]=0,this.fromString(u,256)}},t}(),O=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),P=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return 0>t.s||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),R=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=N();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),0>t.s&&e.compareTo(D.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=N();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;this.mt2>=t.t;)t[t.t++]=0;for(var e=0;this.m.t>e;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),0>t.compareTo(this.m)||t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),I=function(){function t(t){this.m=t,this.r2=N(),this.q3=N(),D.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(0>t.s||t.t>2*this.m.t)return t.mod(this.m);if(0>t.compareTo(this.m))return t;var e=N();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>t.compareTo(this.r2);)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function N(){return new D(null)}function M(t,e){return new D(t,e)}"Microsoft Internet Explorer"==navigator.appName?(D.prototype.am=function(t,e,n,r,i,o){for(var a=32767&e,s=e>>15;--o>=0;){var u=32767&this[t],c=this[t++]>>15,h=s*u+c*a;i=((u=a*u+((32767&h)<<15)+n[r]+(1073741823&i))>>>30)+(h>>>15)+s*c+(i>>>30),n[r++]=1073741823&u}return i},E=30):"Netscape"!=navigator.appName?(D.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var a=e*this[t++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i},E=26):(D.prototype.am=function(t,e,n,r,i,o){for(var a=16383&e,s=e>>14;--o>=0;){var u=16383&this[t],c=this[t++]>>14,h=s*u+c*a;i=((u=a*u+((16383&h)<<14)+n[r]+i)>>28)+(h>>14)+s*c,n[r++]=268435455&u}return i},E=28),D.prototype.DB=E,D.prototype.DM=(1<<E)-1,D.prototype.DV=1<<E,D.prototype.FV=Math.pow(2,52),D.prototype.F1=52-E,D.prototype.F2=2*E-52;var _,V,j=[];for(_=48,V=0;9>=V;++V)j[_++]=V;for(_=97,V=10;36>V;++V)j[_++]=V;for(_=65,V=10;36>V;++V)j[_++]=V;function L(t,e){var n=j[t.charCodeAt(e)];return null==n?-1:n}function U(t){var e=N();return e.fromInt(t),e}function F(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}D.ZERO=U(0),D.ONE=U(1);var q,H,z=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,r;for(e=0;256>e;++e)this.S[e]=e;for(n=0,e=0;256>e;++e)r=this.S[e],this.S[e]=this.S[n=n+this.S[e]+t[e%t.length]&255],this.S[n]=r;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),G=256,K=null;if(null==K){K=[],H=0;var X=void 0;if(window.crypto&&window.crypto.getRandomValues){var W=new Uint32Array(256);for(window.crypto.getRandomValues(W),X=0;W.length>X;++X)K[H++]=255&W[X]}var Z=function(t){if(this.count=this.count||0,256>this.count&&G>H)try{var e=t.x+t.y;K[H++]=255&e,this.count+=1}catch(t){}else window.removeEventListener?window.removeEventListener("mousemove",Z,!1):window.detachEvent&&window.detachEvent("onmousemove",Z)};window.addEventListener?window.addEventListener("mousemove",Z,!1):window.attachEvent&&window.attachEvent("onmousemove",Z)}function J(){if(null==q){for(q=new z;G>H;){var t=Math.floor(65536*Math.random());K[H++]=255&t}for(q.init(K),H=0;K.length>H;++H)K[H]=0;H=0}return q.next()}var Y=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;t.length>e;++e)t[e]=J()},t}(),$=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);0>e.compareTo(n);)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=M(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=function(t,e){if(t.length+11>e)return console.error("Message too long for RSA"),null;for(var n=[],r=t.length-1;r>=0&&e>0;){var i=t.charCodeAt(r--);128>i?n[--e]=i:i>127&&2048>i?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var o=new Y,a=[];e>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--e]=a[0]}return n[--e]=2,n[--e]=0,new D(n)}(t,this.n.bitLength()+7>>3);if(null==e)return null;var n=this.doPublic(e);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=M(t,16),this.e=parseInt(e,16),this.d=M(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,r,i,o,a,s){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=M(t,16),this.e=parseInt(e,16),this.d=M(n,16),this.p=M(r,16),this.q=M(i,16),this.dmp1=M(o,16),this.dmq1=M(a,16),this.coeff=M(s,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new Y,r=t>>1;this.e=parseInt(e,16);for(var i=new D(e,16);;){for(;this.p=new D(t-r,1,n),0!=this.p.subtract(D.ONE).gcd(i).compareTo(D.ONE)||!this.p.isProbablePrime(10););for(;this.q=new D(r,1,n),0!=this.q.subtract(D.ONE).gcd(i).compareTo(D.ONE)||!this.q.isProbablePrime(10););if(0>=this.p.compareTo(this.q)){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(D.ONE),s=this.q.subtract(D.ONE),u=a.multiply(s);if(0==u.gcd(i).compareTo(D.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(u),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=M(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){for(var n=t.toByteArray(),r=0;n.length>r&&0==n[r];)++r;if(n.length-r!=e-1||2!=n[r])return null;for(++r;0!=n[r];)if(++r>=n.length)return null;for(var i="";++r<n.length;){var o=255&n[r];128>o?i+=String.fromCharCode(o):o>191&&224>o?(i+=String.fromCharCode((31&o)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&o)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,n){var r=new Y,i=t>>1;this.e=parseInt(e,16);var o=new D(e,16),a=this,s=function(){var e=function(){if(0>=a.p.compareTo(a.q)){var t=a.p;a.p=a.q,a.q=t}var e=a.p.subtract(D.ONE),r=a.q.subtract(D.ONE),i=e.multiply(r);0==i.gcd(o).compareTo(D.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(e),a.dmq1=a.d.mod(r),a.coeff=a.q.modInverse(a.p),setTimeout(function(){n()},0)):setTimeout(s,0)},u=function(){a.q=N(),a.q.fromNumberAsync(i,1,r,function(){a.q.subtract(D.ONE).gcda(o,function(t){0==t.compareTo(D.ONE)&&a.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(u,0)})})},c=function(){a.p=N(),a.p.fromNumberAsync(t-i,1,r,function(){a.p.subtract(D.ONE).gcda(o,function(t){0==t.compareTo(D.ONE)&&a.p.isProbablePrime(10)?setTimeout(u,0):setTimeout(c,0)})})};setTimeout(c,0)};setTimeout(s,0)},t.prototype.sign=function(t,e,n){var r=Q[n]||"",i=r+""+e(t),o=function(t,e){if(t.length+22>e)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,r="",i=0;n>i;i+=2)r+="ff";return M("0001"+r+"00"+t,16)}(i,this.n.bitLength()/4);if(null==o)return null;var a=this.doPrivate(o);if(null==a)return null;var s=a.toString(16);return 0==(1&s.length)?s:"0"+s},t.prototype.verify=function(t,e,n){var r=M(e,16),i=this.doPublic(r);if(null==i)return null;var o=i.toString(16).replace(/^1f+00/,""),a=function(t){for(var e in Q)if(Q.hasOwnProperty(e)){var n=Q[e],r=n.length;if(t.substr(0,r)==n)return t.substr(r)}return t}(o);return a==""+n(t)},t}(),Q={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},tt={};tt.lang={extend:function(t,e,n){if(!e||!t)throw Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var i;for(i in n)t.prototype[i]=n[i];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(i=0;a.length>i;i+=1){var n=a[i],r=e[n];"function"==typeof r&&r!=Object.prototype[n]&&(t[n]=r)}})}catch(t){}o(t.prototype,n)}}};var et={};void 0!==et.asn1&&et.asn1||(et.asn1={}),et.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1),r=n.length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",o=0;r>o;o++)i+="f";var a=new D(i,16),s=a.xor(t).add(D.ONE);e=s.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=et,n=e.asn1,r=n.DERBoolean,i=n.DERInteger,o=n.DERBitString,a=n.DEROctetString,s=n.DERNull,u=n.DERObjectIdentifier,c=n.DEREnumerated,h=n.DERUTF8String,l=n.DERNumericString,f=n.DERPrintableString,p=n.DERTeletexString,d=n.DERIA5String,g=n.DERUTCTime,m=n.DERGeneralizedTime,y=n.DERSequence,v=n.DERSet,b=n.DERTaggedObject,T=n.ASN1Util.newObject,w=Object.keys(t);if(1!=w.length)throw"key of param shall be only one.";var S=w[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+S+":"))throw"undefined key: "+S;if("bool"==S)return new r(t[S]);if("int"==S)return new i(t[S]);if("bitstr"==S)return new o(t[S]);if("octstr"==S)return new a(t[S]);if("null"==S)return new s(t[S]);if("oid"==S)return new u(t[S]);if("enum"==S)return new c(t[S]);if("utf8str"==S)return new h(t[S]);if("numstr"==S)return new l(t[S]);if("prnstr"==S)return new f(t[S]);if("telstr"==S)return new p(t[S]);if("ia5str"==S)return new d(t[S]);if("utctime"==S)return new g(t[S]);if("gentime"==S)return new m(t[S]);if("seq"==S){for(var E=t[S],A=[],k=0;E.length>k;k++){var x=T(E[k]);A.push(x)}return new y({array:A})}if("set"==S){for(var E=t[S],A=[],k=0;E.length>k;k++){var x=T(E[k]);A.push(x)}return new v({array:A})}if("tag"==S){var C=t[S];if("[object Array]"===Object.prototype.toString.call(C)&&3==C.length){var B=T(C[2]);return new b({tag:C[0],explicit:C[1],obj:B})}var D={};if(void 0!==C.explicit&&(D.explicit=C.explicit),void 0!==C.tag&&(D.tag=C.tag),void 0===C.obj)throw"obj shall be specified for 'tag'.";return D.obj=T(C.obj),new b(D)}},this.jsonToASN1HEX=function(t){var e=this.newObject(t);return e.getEncodedHex()}},et.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),r=Math.floor(n/40),i=n%40,e=r+"."+i,o="",a=2;t.length>a;a+=2){var s=parseInt(t.substr(a,2),16),u=("00000000"+s.toString(2)).slice(-8);if(o+=u.substr(1,7),"0"==u.substr(0,1)){var c=new D(o,2);e=e+"."+c.toString(10),o=""}}return e},et.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new D(t,10),i=r.toString(2),o=7-i.length%7;7==o&&(o=0);for(var a="",s=0;o>s;s++)a+="0";i=a+i;for(var s=0;i.length-1>s;s+=7){var u=i.substr(s,7);s!=i.length-7&&(u="1"+u),n+=e(parseInt(u,2))}return n};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var a=0;i.length>a;a++)r+=n(i[a]);return r},et.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),128>t)return e;var n=e.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);var r=128+n;return r.toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},et.asn1.DERAbstractString=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},tt.lang.extend(et.asn1.DERAbstractString,et.asn1.ASN1Object),et.asn1.DERAbstractTime=function(t){et.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e},this.formatDate=function(t,e,n){var r=this.zeroPadding,i=this.localDateToUTC(t),o=i.getFullYear()+"";"utc"==e&&(o=o.substr(2,2));var a=r(i.getMonth()+1+"",2),s=r(i.getDate()+"",2),u=r(i.getHours()+"",2),c=r(i.getMinutes()+"",2),h=r(i.getSeconds()+"",2),l=o+a+s+u+c+h;if(!0===n){var f=i.getMilliseconds();if(0!=f){var p=r(f+"",3);p=p.replace(/[0]+$/,""),l=l+"."+p}}return l+"Z"},this.zeroPadding=function(t,e){return e>t.length?Array(e-t.length+1).join("0")+t:t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,o){var a=new Date(Date.UTC(t,e-1,n,r,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},tt.lang.extend(et.asn1.DERAbstractTime,et.asn1.ASN1Object),et.asn1.DERAbstractStructured=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=[],void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},tt.lang.extend(et.asn1.DERAbstractStructured,et.asn1.ASN1Object),et.asn1.DERBoolean=function(){et.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},tt.lang.extend(et.asn1.DERBoolean,et.asn1.ASN1Object),et.asn1.DERInteger=function(t){et.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(t+"",10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DERInteger,et.asn1.ASN1Object),et.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}et.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(0>t||t>7)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;e>=n;n++)t+="0";for(var r="",n=0;t.length-1>n;n+=8){var i=t.substr(n,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),r+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",n=0;t.length>n;n++)e+=1==t[n]?"1":"0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=Array(t),n=0;t>n;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},tt.lang.extend(et.asn1.DERBitString,et.asn1.ASN1Object),et.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}et.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},tt.lang.extend(et.asn1.DEROctetString,et.asn1.DERAbstractString),et.asn1.DERNull=function(){et.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},tt.lang.extend(et.asn1.DERNull,et.asn1.ASN1Object),et.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new D(t,10),i=r.toString(2),o=7-i.length%7;7==o&&(o=0);for(var a="",s=0;o>s;s++)a+="0";i=a+i;for(var s=0;i.length-1>s;s+=7){var u=i.substr(s,7);s!=i.length-7&&(u="1"+u),n+=e(parseInt(u,2))}return n};et.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var a=0;i.length>a;a++)r+=n(i[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(t){var e=et.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},tt.lang.extend(et.asn1.DERObjectIdentifier,et.asn1.ASN1Object),et.asn1.DEREnumerated=function(t){et.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(t+"",10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DEREnumerated,et.asn1.ASN1Object),et.asn1.DERUTF8String=function(t){et.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},tt.lang.extend(et.asn1.DERUTF8String,et.asn1.DERAbstractString),et.asn1.DERNumericString=function(t){et.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},tt.lang.extend(et.asn1.DERNumericString,et.asn1.DERAbstractString),et.asn1.DERPrintableString=function(t){et.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},tt.lang.extend(et.asn1.DERPrintableString,et.asn1.DERAbstractString),et.asn1.DERTeletexString=function(t){et.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},tt.lang.extend(et.asn1.DERTeletexString,et.asn1.DERAbstractString),et.asn1.DERIA5String=function(t){et.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},tt.lang.extend(et.asn1.DERIA5String,et.asn1.DERAbstractString),et.asn1.DERUTCTime=function(t){et.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},tt.lang.extend(et.asn1.DERUTCTime,et.asn1.DERAbstractTime),et.asn1.DERGeneralizedTime=function(t){et.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},tt.lang.extend(et.asn1.DERGeneralizedTime,et.asn1.DERAbstractTime),et.asn1.DERSequence=function(t){et.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;this.asn1Array.length>e;e++){var n=this.asn1Array[e];t+=n.getEncodedHex()}return this.hV=t,this.hV}},tt.lang.extend(et.asn1.DERSequence,et.asn1.DERAbstractStructured),et.asn1.DERSet=function(t){et.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=[],e=0;this.asn1Array.length>e;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},tt.lang.extend(et.asn1.DERSet,et.asn1.DERAbstractStructured),et.asn1.DERTaggedObject=function(t){et.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},tt.lang.extend(et.asn1.DERTaggedObject,et.asn1.ASN1Object);var nt=function(t){function e(n){var r=t.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(e.hasPrivateKeyProperty(n)||e.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return function(t,e){function n(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.parseKey=function(t){try{var e=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?m.decode(t):y.unarmor(t),i=k.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){e=i.sub[1].getHexStringValue(),this.n=M(e,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=i.sub[3].getHexStringValue();this.d=M(o,16);var a=i.sub[4].getHexStringValue();this.p=M(a,16);var s=i.sub[5].getHexStringValue();this.q=M(s,16);var u=i.sub[6].getHexStringValue();this.dmp1=M(u,16);var c=i.sub[7].getHexStringValue();this.dmq1=M(c,16);var h=i.sub[8].getHexStringValue();this.coeff=M(h,16)}else{if(2!==i.sub.length)return!1;var l=i.sub[1],f=l.sub[0];e=f.sub[0].getHexStringValue(),this.n=M(e,16),n=f.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new et.asn1.DERInteger({int:0}),new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e}),new et.asn1.DERInteger({bigint:this.d}),new et.asn1.DERInteger({bigint:this.p}),new et.asn1.DERInteger({bigint:this.q}),new et.asn1.DERInteger({bigint:this.dmp1}),new et.asn1.DERInteger({bigint:this.dmq1}),new et.asn1.DERInteger({bigint:this.coeff})]},e=new et.asn1.DERSequence(t);return e.getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return l(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new et.asn1.DERSequence({array:[new et.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new et.asn1.DERNull]}),e=new et.asn1.DERSequence({array:[new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e})]}),n=new et.asn1.DERBitString({hex:"00"+e.getEncodedHex()}),r=new et.asn1.DERSequence({array:[t,n]});return r.getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return l(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(e=e||64,!t)return t;var n="(.{1,"+e+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}($),rt=function(){function t(t){this.default_key_size=parseInt((t=t||{}).default_key_size,10)||1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new nt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(f(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return l(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return l(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,f(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new nt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version="3.0.0-rc.1",t}();window.JSEncrypt=rt,t.JSEncrypt=rt,t.default=rt,Object.defineProperty(t,"__esModule",{value:!0})}(e)});(tn=en)&&tn.__esModule&&Object.prototype.hasOwnProperty.call(tn,"default");var nn=en.JSEncrypt;function rn(t){var e=new nn;return e.setPublicKey(ge.publicKey),e.encrypt(t)}Je.creditCardType.addCard({niceType:"Verve",type:"verve",patterns:[[506e3,507999],[65e4,650009]],gaps:[4,8,12,16],lengths:[16,18,19],code:{name:"CVV",size:3}}),Je.creditCardType.changeOrder("verve",0);var on=function(){function t(e){var n=e.number,r=e.cvv,i=e.month,o=e.year,a=e.pin;ee(this,t),this.number=n,this.cvv=r,this.month=i,this.year=o,this.pin=a}return ne(t,[{key:"getEncryptedPin",value:function(){return this.pin?rn(this.pin):void 0}},{key:"getLast4",value:function(){return this.number.substring(this.number.length-4)}},{key:"tokenize",value:function(){return rn(this.number+"*"+this.cvv+"*"+this.month+"*"+this.year)}}],[{key:"getType",value:function(t){var e=Je.number(t);return e&&e.card?{type:e.card.type,maxLength:Math.max.apply(Math,se(e.card.lengths)),minLength:Math.min.apply(Math,se(e.card.lengths))}:{type:null,maxLength:0}}},{key:"validate",value:function(e){var n=e.number,r=e.cvv,i=e.month,o=e.year,a=t.getType(n).type,s={number:t.isNumberValid(n),expiry:t.isExpiryValid({month:i,year:o}),cvv:t.isCvvValid(r,a)};return{isValid:Object.values(s).every(function(t){return!0===t}),result:s}}},{key:"validateNumber",value:function(t){return Je.number(t)}},{key:"isNumberValid",value:function(e){return t.validateNumber(e).isValid}},{key:"validateCVV",value:function(t,e){return Je.cvv(t,"american-express"===e?4:3)}},{key:"isCvvValid",value:function(e,n){return t.validateCVV(e,n).isValid}},{key:"validateExpiry",value:function(t){if("object"===(void 0===t?"undefined":Qt(t))){var e=t.year;return Je.expirationMonth(t.month)&&Je.expirationYear(e)}return Je.expirationDate(t)}},{key:"isExpiryValid",value:function(e){return t.validateExpiry(e).isValid}},{key:"generateTestCard",value:function(e){var n=e||"default";return new t(Ye.find(function(t){return t.type===n}))}}]),t}(),an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!!e.sorted,r=!!e.skipIndex,i=!!e.ignorenull,o=function(t){return(t+"").replace(/(?:[\0-\x1F"-&\+-\}\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,encodeURIComponent).replace(/ /g,"+").replace(/[!'()~\*]/g,function(t){return"%"+t.charCodeAt().toString(16).slice(-2).toUpperCase()})},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(t);return n?e.sort():e},s=function(t){return t.filter(function(t){return t}).join("&")},u=function(t,e){return s(a(e).map(function(n){return h(t+"["+n+"]",e[n])}))},c=function(t,e){return e.length?s(e.map(function(e,n){return h(r?t+"[]":t+"["+n+"]",e)})):o(t+"[]")},h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0===e?"undefined":an(e),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return e===r?r=i?r:o(t)+"="+r:/string|number|boolean/.test(n)?r=o(t)+"="+o(e):Array.isArray(e)?r=c(t,e):"object"===n&&(r=u(t,e)),r};return t&&s(a(t).map(function(e){return h(e,t[e])}))},un=function(t){var e=t.pin,n=t.rememberCard,r=t.transactionType,i=t.subscription,o=t.customFields,a=ge.paymentBaseUrl+"charge/",s=re({clientdata:t.clientdata,last4:t.last4,trans:t.trans,device:t.device,offset:(new Date).getTimezoneOffset(),remember_card:n},r&&{transaction_type:r},i&&{subscription:i},o&&o);e&&(s.handle=e);var u=sn(s);return ce.post(a,u,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},cn=function(t){var e=t.pin,n=ge.paymentBaseUrl+"charge/resume/"+t.accessCode,r=re({device:t.device},e&&{handle:e}),i=sn(r);return ce.post(n,i,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},hn=function(t){var e=t.transactionType,n=t.subscription,r=ge.paymentBaseUrl+"charge/",i=re({last4:t.last4,trans:t.trans,device:t.device,cvv:t.cvv,handle:t.pin,authorization_code:t.authorizationCode},e&&{transaction_type:e},n&&{subscription:n}),o=sn(i);return ce.post(r,o,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},ln=function(t,e){var n=ge.paymentBaseUrl+"charge/validate",r=sn({trans:t,token:e});return ce.post(n,r).then(function(t){return me.parse(t.data)})},fn=function(t){var e=ge.paymentBaseUrl+"charge/avs",n=sn({city:t.city,state:t.state,address:t.address,zip_code:t.zipCode,trans:t.transactionId});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},pn=function(t){return ce.post(ge.paystackApiUrl+"rememberme/forget_card",{authorization_id:t.authorizationId},{headers:{Authorization:"Bearer "+t.publicKey}}).then(function(t){return me.parse(t.data)})};function dn(t,e){return new Promise(function(n,r){var i=on.validate(t);if(!i.isValid){var o=e||t.number,a="Invalid card details: "+Object.keys(i.result).filter(function(t){return!1===i.result[t]}).join(", ");r(Error(o?a:"Please set a valid card with Transaction.setCard()"))}n()})}var gn={setCard:function(t){var e=this;return dn(t,!0).then(function(){e.card=new on(t)})},rememberCard:function(){this.remember_card=!0},chargeCard:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return dn(this.card).then(function(){t.logAttempt("card");var n={clientdata:t.card.tokenize(),last4:t.card.getLast4(),pin:t.card.getEncryptedPin(),trans:t.id,device:t.deviceFingerprint,rememberCard:t.remember_card,transactionType:t.transactionType,subscription:t.subscription,customFields:e};return un(n).then(function(e){return t.logAPIResponse(e,"card"),e})})},chargeRememberedCard:function(t){var e=this,n=t.cvv,r=t.authorizationCode,i=t.cardLast4,o=t.pin;this.logAttempt("card");var a=rn(o);return hn({authorizationCode:r,cvv:n,last4:i,trans:this.id,device:this.deviceFingerprint,pin:a,transactionType:this.transactionType,subscription:this.subscription}).then(function(t){return e.logAPIResponse(t,"card"),t})},resumeCardCharge:function(t){var e=this,n=t.accessCode,r=this.card.getEncryptedPin();return cn({pin:r,accessCode:n,device:this.deviceFingerprint}).then(function(t){return e.logAPIResponse(t,"card"),t})},forgetRememberedCard:function(t){var e=this;return pn({authorizationId:t,publicKey:this.merchant.key}).then(function(t){return e.logAPIResponse(t,"card"),t})},authenticateCard:function(t){var e=this;return ln(this.id,t).then(function(t){return e.logAPIResponse(t,"card"),t})},verifyAddress:function(t){var e=this;return fn({city:t.city,state:t.state,address:t.address,zipCode:t.zipCode,transactionId:this.id}).then(function(t){return e.logAPIResponse(t,"card"),t})},listenFor3DSCharge:function(t){return this.listenForCharge({channel:"3DS_"+this.id,paymentMethod:"card"},t)}},mn=function(){function t(e){var n=e.bankId,r=e.accountType,i=e.accountNumber;ee(this,t),this.bankId=n,this.accountType=r,this.accountNumber=i}return ne(t,null,[{key:"validate",value:function(e){var n=e.bankId,r=e.accountType,i=e.accountNumber,o=[];return n&&"number"==typeof n||o.push("Invalid bankId. Please check for supported banks with BankAccount.supportedBanks()"),t.types.indexOf(r)>-1?"nuban"!==r||t.isValidNubanAccount(i)||o.push("Invalid account number. Nuban accounts must be 10 digit numbers"):o.push("Invalid bank type. Please check BankAccount.types for the list of valid bank types"),{isValid:0===o.length,errors:o}}},{key:"isValidNubanAccount",value:function(t){return!!t&&(("number"==typeof t||/^\d+$/.test(t))&&10===t.length)}},{key:"supportedBanks",value:function(){return ce.post(ge.paymentBaseUrl+"bank?pay_with_bank=true").then(function(t){return t.data})}}]),t}();mn.types=["nuban"];var yn=function(t){var e=ge.paymentBaseUrl+"bank/charge_account/"+t.bankId+"/"+t.transactionId,n=sn({account_number:t.accountNumber,device:t.device});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},vn=function(t){var e=ge.paymentBaseUrl+"bank/charge_account/"+t.bankId+"/"+t.transactionId,n=sn({account_number:t.accountNumber,birthday:t.birthday});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},bn=function(t){var e=ge.paymentBaseUrl+"bank/validate_token/"+t.bankId+"/"+t.transactionId,n=sn({device:t.device,token:t.token});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})};function Tn(t,e){return new Promise(function(n,r){var i=mn.validate(t);i.isValid||r(Error(e||t.accountNumber?i.errors[0]:"Please set a valid bank account with Transaction.setBank()"));n()})}var wn=function(t){var e=t.bankId,n=ge.paymentBaseUrl+"bank/digitalbankmandate/"+e+"/"+t.transactionId,r=re({},"sterling-bank"==={16:"sterling-bank",62:"kuda-bank"}[e]?{account_number:t.accountNumber}:{phone_number:t.phoneNumber},{token:t.token}),i=sn(r);return ce.post(n,i,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},Sn=Object.assign({},{setBankAccount:function(t){var e=this;return Tn(t,!0).then(function(){e.bankAccount=new mn(t)})},chargeBankAccount:function(){var t=this;return Tn(this.bankAccount).then(function(){return t.logAttempt("bank account"),yn({bankId:t.bankAccount.bankId,transactionId:t.id,accountNumber:t.bankAccount.accountNumber,device:t.deviceFingerprint}).then(function(e){return t.logAPIResponse(e,"bank account"),e})})},registerBankAccount:function(t){var e=this;return Tn(this.bankAccount).then(function(){return vn({bankId:e.bankAccount.bankId,transactionId:e.id,accountNumber:e.bankAccount.accountNumber,birthday:t}).then(function(t){return e.logAPIResponse(t,"bank account"),t})})},authenticateBankAccount:function(t){var e=this;return Tn(this.bankAccount).then(function(){return bn({bankId:e.bankAccount.bankId,transactionId:e.id,token:t,device:e.deviceFingerprint}).then(function(t){return e.logAPIResponse(t,"bank account"),t})})}},{getIbankUrl:function(t){var e=this,n=t.bankId;return new Promise(function(t,r){n||r(Error("Please send bankId")),t(me.success({url:ge.paymentBaseUrl+"bank/ibank/"+n+"/"+e.id}))})},listenForIbankCharge:function(t){return this.listenForCharge({channel:"IBANK_"+this.id,paymentMethod:"ibank"},t)}},{chargeDigitalBankMandate:function(t){var e=this;return wn({transactionId:this.id,phoneNumber:t.phoneNumber,token:t.token,bankId:t.bankId,accountNumber:t.accountNumber}).then(function(t){return e.logAPIResponse(t,"bank"),t})},listenForDigitalBankMandateCharge:function(t){return this.listenForCharge({paymentMethod:"bank",channel:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""},t)}}),En=function(t,e){return ce.post(ge.paystackApiUrl+"checkout/ussd/reference",{transaction:t.transaction,channel:t.channel},{headers:{Authorization:"Bearer "+e}}).then(function(t){return me.parse(t.data)})},An={getUSSDShortcode:function(t){var e=this,n=t.channel;return this.ussd[n]?this.ussd[n]:En({transaction:this.id,channel:n},this.merchant.key).then(function(t){return"success"===t.status&&(e.ussd[n]=t),t})},listenForUSSDCharge:function(t,e){var n=t.channel;return this.ussd[n]?this.listenForCharge({channel:this.ussd[n].data.channel,paymentMethod:n},e):Promise.reject(Error("Please generate ussd shortcode with Transaction.getUSSDShortcode()"))}},kn=function(t,e){return ce.post(ge.paystackApiUrl+"offline/qr/generate",{source:"checkout",reference:t.transaction,channel:t.channel},{headers:{Authorization:"Bearer "+e}}).then(function(t){return me.parse(t.data)})};function xn(t){return new Promise(function(e,n){var r=["visa","MPASS_OLTI"];if(-1<r.indexOf(t))e();else{var i="Invalid channel. Available channels: "+r.join(", ");n(Error(i))}})}var Cn={getQRCode:function(t){var e=this,n=t.channel;return xn(n).then(function(){return e.qr[n]?e.qr[n]:kn({transaction:e.id,channel:n},e.merchant.key).then(function(t){return"success"===t.status&&(e.qr[n]=t),t})})},listenForQRCharge:function(t,e){var n=this,r=t.channel;return xn(r).then(function(){return n.qr[r]?n.listenForCharge({channel:n.qr[r].data.channel,paymentMethod:r},e):Promise.reject(Error("Please generate qr code with Transaction.getQRCode()"))})}},Bn=function(t){return ce.post(ge.paystackApiUrl+"charge/mobile_money",{transaction:t.transaction,phone:t.phone,device:t.device,channel_name:t.channel_name,provider:t.provider,voucher:t.voucher,registration_token:t.registrationToken}).then(function(t){return me.parse(t.data)})},Dn=function(){function t(){ee(this,t)}return ne(t,null,[{key:"hasCountryCode",value:function(t){return t&&"+"===t[0]}},{key:"hasOnlyDigits",value:function(t){var e;return t&&(e=t.substring(1),/^\d+$/.test(e))}},{key:"isE164Number",value:function(t){return t&&17>t.length}},{key:"validate",value:function(e){var n=[];return t.hasCountryCode(e)||n.push("Number should include country code prefix"),t.hasOnlyDigits(e)||n.push("Number should contain only digits"),t.isE164Number(e)||n.push("Number should not be longer than 16 digits"),{isValid:0===n.length,errors:n}}}]),t}();var On={chargeMobileMoney:function(t){var e=this,n=t.phoneNumber,r=t.provider,i=t.voucher,o=t.registrationToken;return function(t){return new Promise(function(e,n){var r=Dn.validate(t);r.isValid||n(Error(t?r.errors[0]:"Please start a mobile money transaction with Transaction.chargeMobileMoney()")),e(r)})}(n).then(function(){return e.logAttempt("mobile money"),Bn({provider:r,voucher:i,registrationToken:o,transaction:e.id,phone:n,device:e.deviceFingerprint,channel_name:"MOBILE_MONEY_"+e.id}).then(function(t){return"success"===t.status&&(e.mobileMoney=t),t})})},listenForMobileMoneyCharge:function(t){if("success"!==this.mobileMoney.status)return Promise.reject(Error("Please start a mobile money charge with Transaction.chargeMobileMoney()"));var e=this.mobileMoney.data;return this.listenForCharge({channel:e.channel||e.channel_name,paymentMethod:"mobile_money"},t)}},Pn=function(t,e){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/verify",{phone:t},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},Rn=function(t,e,n){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/remove_card",{phone:t,id:n},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},In=function(t,e,n,r){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/validate_otp",{phone:t,otp:n,transaction:r},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},Nn=function(t,e,n,r){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/validate_pin",{phone:t,pin:n,transaction:r},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},Mn=function(t,e,n,r,i){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/set_pin",{phone:t,token:n,transaction:r,pin:i},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},_n=function(t,e,n,r,i,o){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/charge",{id:t,token:n,cvv:i,transaction:r,phone:o},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},Vn=function(t,e,n){return ce.post(ge.paystackApiUrl+"checkout/pay_with_phone/enroll",{phone:t,transaction:n},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})};function jn(t){return new Promise(function(e,n){var r=Dn.validate(t);r.isValid||n(Error(t?r.errors[0]:"Please set a valid customer with Transaction.setCustomer()"));e(r)})}var Ln={setCustomer:function(t){var e=this,n=t.phoneNumber;return jn(n).then(function(){e.customer=n})},verifyCustomer:function(){var t=this;return jn(this.customer).then(function(){return Pn(t.customer,t.merchant.key)})},deleteSavedCard:function(t){var e=this;return jn(this.customer).then(function(){return Rn(e.customer,e.merchant.key,t)})},authenticateCustomerOtp:function(t){var e=this;return jn(this.customer).then(function(){return In(e.customer,e.merchant.key,t,e.id)})},authenticateCustomerPin:function(t){var e=this;return jn(this.customer).then(function(){return Nn(e.customer,e.merchant.key,t,e.id)})},setCustomerPin:function(t){var e=this,n=t.pin,r=t.token;return jn(this.customer).then(function(){return Mn(e.customer,e.merchant.key,r,e.id,n)})},chargeSavedCard:function(t){var e=this,n=t.cardId,r=t.token,i=t.cvv;return jn(this.customer).then(function(){return _n(n,e.merchant.key,r,e.id,i,e.customer)})},enrollPhoneNumber:function(t){var e=this;return jn(this.customer).then(function(){return Vn(t,e.merchant.key,e.id)})}},Un=function(t){return ce.post(ge.paystackApiUrl+"login",{email:t.email,password:t.password}).then(function(t){return me.parse(t.data)})},Fn=function(t){return ce.post(ge.paystackApiUrl+"directdebit/initiate",{account_code:t.account_code,transaction:t.transaction},{headers:{Authorization:"Bearer "+t.token,"jwt-auth":!0}}).then(function(t){return me.parse(t.data)})},qn=function(t){return ce.post(ge.paystackApiUrl+"directdebit/validate",{otp:t.otp,transaction:t.transaction},{headers:{Authorization:"Bearer "+t.token,"jwt-auth":!0}}).then(function(t){return me.parse(t.data)})},Hn=function(t){return ce.get(ge.paystackApiUrl+"directdebit/account",{headers:{Authorization:"Bearer "+t,"jwt-auth":!0}}).then(function(t){return t.data})};function zn(t){return/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(t)}function Gn(t){return parseInt(t,10)===+t&&+t>=0}function Kn(t){return t&&"string"==typeof t}var Xn={loginToDirectDebitAccount:function(t){var e=this,n=t.email,r={email:n,password:t.password};return zn(n)?Un(r).then(function(t){if("success"===t.status){var n=t.data,r=n.token,i=n.user.permissions;if(!i||1>i.length)throw Error("You do not have the privileges to perform this action");if(i.find(function(t){return"directdebit-*"===t}))return e.directDebit.token=r,t;throw Error("You do not have the privileges to perform this action")}return t}):Promise.reject(Error("Invalid email"))},chargeDirectDebit:function(t){var e=this;return this.directDebit.token?(this.logAttempt("direct debit"),Fn({account_code:t,transaction:this.id,token:this.directDebit.token}).then(function(t){return e.logAPIResponse(t,"direct debit"),t.status&&(e.directDebit.chargeResponse=t),t})):Promise.reject(Error("Please login with Transaction.loginToDirectDebitAccount() to start a Direct debit charge"))},getProvisionedAccounts:function(){var t=this;return Hn(this.directDebit.token).then(function(e){t.logAPIResponse(e,"direct debit");var n=e.data;if(e.status){if(n&&1>n.length)return Promise.reject(Error("You have not provisioned any bank account for Direct Debit yet"));t.directDebit.accounts=e.data}return e})},authenticateAccount:function(t){var e=this;return qn({otp:t,transaction:this.id,token:this.directDebit.token}).then(function(t){return e.logAPIResponse(t,"direct debit"),t})}},Wn=function(t,e){return ce.post(ge.paystackApiUrl+"checkout/pay_with_transfer",t,{headers:{Authorization:"Bearer "+e}}).then(function(t){return me.parse(t.data)})},Zn=function(t,e){return ce.post(ge.paystackApiUrl+"managed_account/customer_claim",t,{headers:{Authorization:"Bearer "+e}}).then(function(t){return me.parse(t.data)})},Jn={getManagedAccount:function(t){var e=this;return Wn({transaction_id:this.id,fulfil_late_notification:t.fulfilLateNotification},this.merchant.key).then(function(t){return"success"===t.status&&(e.bankTransfer=t),t})},submitPayerDetails:function(t){return Zn({reference_id:this.id,account_number:t.accountNumber,email:t.email,institution_id:t.bankId,institution_type:"bank",claim_type:t.claimType,managed_account_number:t.managedAccountNumber,provider_slug:t.providerSlug},this.merchant.key)},listenForPayWithTransferCharge:function(t){var e=this.bankTransfer.data;return this.listenForCharge({channel:e&&e.pusher_channel||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:""),paymentMethod:"bank_transfer"},t)}},Yn=function(t){var e=ge.paymentBaseUrl+"payattitude/charge/"+t.transactionId,n=sn({phone_number:t.phoneNumber});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},$n={chargePayattitude:function(t){var e=this;return Yn({transactionId:this.id,phoneNumber:t.phoneNumber}).then(function(t){return e.logAPIResponse(t,"payattitude"),t})},listenForPayattitudeCharge:function(t){return this.listenForCharge({paymentMethod:"payattitude",channel:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""},t)}},Qn={getEFTUrl:function(t){var e=this,n=t.eftGateway;return new Promise(function(t,r){n||r(Error("Please pass the `eftGateway`")),t(me.success({url:ge.paymentBaseUrl+"eft/"+n+"/"+e.id}))})},listenForEFTCharge:function(t){return this.listenForCharge({channel:"EFT_"+this.id,paymentMethod:"eft"},t)}},tr=function(t){var e=ge.paymentBaseUrl+"applepay/validate-session",n=sn({sessionUrl:t.sessionUrl,displayName:t.displayName,domainName:t.domainName,transaction:t.transactionId});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},er=function(t){var e=ge.paymentBaseUrl+"applepay/charge",n=sn({paymentObject:t.paymentObject,transaction:t.transactionId});return ce.post(e,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return me.parse(t.data)})},nr={validateApplePaySession:function(t){var e=this,n=t.sessionUrl,r=t.displayName,i=t.domainName;return this.logAttempt("apple pay"),tr({sessionUrl:n,displayName:r,domainName:i,transactionId:this.id}).then(function(t){return e.logAPIResponseMessage(t.message),t})},chargeApplePay:function(t){var e=this;return er({transactionId:this.id,device:this.deviceFingerprint,paymentObject:t.paymentObject}).then(function(t){return e.logAPIResponse(t,"apple pay"),t})}},rr=function(t){return ce.post(ge.paymentBaseUrl+"paypal/"+t+"/create").then(function(t){return me.parse(t.data)})},ir=function(t){return ce.post(ge.paymentBaseUrl+"paypal/"+t+"/capture").then(function(t){return me.parse(t.data)})},or=function(t){return ce.get(ge.paystackApiUrl+"paypal/config?transaction="+t.transactionId,{headers:{Authorization:"Bearer "+t.publicKey}}).then(function(t){return t.data})},ar={createPayPalOrder:function(){var t=this;return this.logAttempt("paypal"),rr(this.id).then(function(e){return t.logAPIResponseMessage(e.message),e})},capturePayPalOrder:function(){var t=this;return ir(this.id).then(function(e){return t.logAPIResponse(e,"paypal"),e})},getPayPalConfig:function(){return or({publicKey:this.merchant.key,transactionId:this.id})}},sr={get:function(t){return{card:gn,bank:Sn,ussd:An,qr:Cn,mobile_money:On,phone:Ln,direct_debit:Xn,bank_transfer:Jn,eft:Qn,payattitude:$n,apple_pay:nr,paypal:ar}[t]}},ur=function(t){t||"undefined"==typeof navigator||(t=navigator.userAgent);t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]);return"string"==typeof t&&(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))};var cr=function(t,e,n){var r={Authorization:"Bearer "+e};return ce.post(ge.paystackApiUrl+"transaction/update_log/"+t,{payload:JSON.stringify(n)},{headers:r}).then(function(t){return t.data})},hr=function(t,e){return ce.post(ge.paystackApiUrl+"transaction/set_ip/"+t,null,{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},lr=function(t,e,n){return ce.post(ge.paystackApiUrl+"transaction/set_referrer/"+t,{referrer:n},{headers:{Authorization:"Bearer "+e}}).then(function(t){return t.data})},fr={initializeLog:function(t){var e=t||{},n=e.attempts,r=e.authentication,i=e.errors,o=e.history;this.log={start_time:Math.round(Date.now()/1e3),time_spent:0,attempts:n||0,authentication:r,errors:i||0,success:!1,mobile:ur(),input:[],history:o||[]}},getTimeSpent:function(){var t=Math.round(Date.now()/1e3);return this.log.time_spent=t-this.log.start_time,this.log.time_spent},logPageOpen:function(){return this.log.history.push({type:"open",message:"Opened checkout",time:this.getTimeSpent()}),this.saveLog()},logChannelSwitch:function(t){return this.log.history.push({type:"action",message:"Set payment method to: "+t,time:this.getTimeSpent()}),this.saveLog()},logValidationErrors:function(t){var e=this;return t.forEach(function(t){e.log.history.push({type:"error",message:"Invalid "+t,time:e.getTimeSpent()})}),this.saveLog()},logInput:function(t){var e=this.log.history.find(function(e){return e.message==="Filled this field: "+t});return this.log.history.push({type:"input",message:(e?"Changed":"Filled")+" this field: "+t,time:this.getTimeSpent()}),this.saveLog()},logBankSelect:function(t){return this.log.history.push({type:"action",message:"Selected bank: "+t,time:this.getTimeSpent()}),this.saveLog()},logAuthWindowOpen:function(){return this.log.history.push({type:"action",message:"Third-party authentication window opened",time:this.getTimeSpent()}),this.saveLog()},logAuthWindowClose:function(){return this.log.history.push({type:"action",message:"Third-party authentication window closed",time:this.getTimeSpent()}),this.saveLog()},logAPIResponse:function(t,e){switch(t.status){case"success":return this.logSuccess(e);case"pending":return this.logPending(e);case"failed":return this.logError(t.message);case"auth":return this.logAuth(t.data.auth);default:return!1}},logAPIResponseMessage:function(t){return this.log.history.push({type:"action",message:t,time:this.getTimeSpent()}),this.saveLog()},logAttempt:function(t){var e="Attempted to pay";return t&&(e+=" with "+t),this.log.attempts+=1,this.log.history.push({type:"action",message:e,time:this.getTimeSpent()}),this.saveLog()},logError:function(t){var e="Error";return t&&(e+=": "+t),this.log.errors+=1,this.log.history.push({type:"error",message:e,time:this.getTimeSpent()}),this.saveLog()},logAuth:function(t){return this.log.authentication=t,this.log.history.push({type:"auth",message:"Authentication Required: "+t,time:this.getTimeSpent()}),this.saveLog()},logSuccess:function(t){var e="Successfully paid";return t&&(e+=" with "+t),this.log.success=!0,this.log.history.push({type:"success",message:e,time:this.getTimeSpent()}),this.saveLog()},logPending:function(t){var e="Payment in progress";return t&&(e+=" with "+t),this.log.history.push({type:"pending",message:e,time:this.getTimeSpent()}),this.saveLog()},logPageClose:function(){return this.log.history.push({type:"close",message:"Closed checkout",time:this.getTimeSpent()}),this.saveLog()},saveLog:function(){return cr(this.id,this.merchant.key,this.log)},saveIpAddress:function(){return hr(this.id,this.merchant.key)},saveReferrer:function(t){return lr(this.id,this.merchant.key,t)}};var pr=function(t){(console?console.log:function(){})(t)},dr=function(){},gr=function(){function t(e){var n=this;ee(this,t),this.email=e.email,this.merchant={id:e.merchant_id,logo:e.merchant_logo,name:e.merchant_name,key:e.merchant_key,channelSettings:e.merchant_channel_settings||{}},this.status=e.transaction_status||e.status,this.accessCode=e.access_code,this.amount=e.amount,this.domain=e.domain,this.isTest="test"===e.domain,this.currency=e.currency,this.id=e.id,this.channels=["apple_pay"].concat(e.channels),this.label=e.label,this.metadata=e.metadata||{},this.cancel_action=e.cancel_action||null,this.channel_options=e.channel_options||null,this.hash=e.hash||null,this.authorizations=e.authorizations,this.remember_card=!1,this.rememberMeEnabled=e.is_remember_me_enabled,this.card={},this.bankAccount={},this.mobileMoney={},this.ussd={},this.bankTransfer={},this.qr={},this.directDebit={},this.deviceFingerprint=e.deviceFingerprint||null,this.customer=e.customer,this.custom_filters=e.custom_filters||null,this.isCharging=!1,this.isListening=!1,this.transactionType=e.transaction_type||null,this.subscription=e.subscription||null,this.planDetails=e.plan_details||null,window?new Promise(function(t,e){var n=new XMLHttpRequest;n.open("GET",ge.pusherUrl),n.onload=function(){if(n.status>=200&&300>n.status){var r=document.createElement("script");r.appendChild(document.createTextNode(n.responseText)),document.head.appendChild(r),t()}else e(n.statusText)},n.onerror=function(){return e(n.statusText)},n.send(null)}):Promise.reject(Error("Window object not available")),this.log=null,Object.assign(this,fr),this.initializeLog(e.log),this.saveIpAddress(),this.channels.forEach(function(t){var e=sr.get(t);Object.assign(n,e)}),this.channels.includes("ussd")&&!this.channels.includes("bank_transfer")&&Object.assign(this,sr.get("bank_transfer"))}return ne(t,[{key:"setMetadata",value:function(t,e){this.metadata[t]=e}},{key:"setDevice",value:function(t){this.deviceFingerprint?pr("Device ID has already been set by Checkout JS so there's no need to set this again"):this.deviceFingerprint=t}},{key:"listenForCharge",value:function(t,e){var n=this,r=t.channel,i=t.paymentMethod,o=void 0;window&&window.Pusher&&(o=new window.Pusher(ge.pusherKey,{cluster:"eu",disableStats:!0}));var a={status:"error",message:"We could not listen for charge response. Use transaction.requery() to check the status."},s=function(){o.unsubscribe(r)};if(!o)return e({status:"error",message:"We could not listen for charge response."},dr);var u=o.subscribe(r);u.bind("pusher:subscription_succeeded",function(){n.isListening=!0}),u.bind("pusher:subscription_error",function(){n.isListening=!1,e(a,dr)}),u.bind("response",function(t){var r=me.parse(t);n.logAPIResponse(r,i),e(r,s)})}},{key:"requery",value:function(){return Te(this.id)}},{key:"markAsAbandoned",value:function(){return we({publicKey:this.merchant.key,transactionId:this.id})}}]),t}(),mr={ref:{required:!1,isValid:Kn},key:{required:!0,isValid:function(t){return t&&"pk"===t.substring(0,2)}},email:{required:!0,fallback:"customer_code",isValid:zn},customer_code:{required:!1,isValid:Kn},amount:{required:!0,fallback:"plan",isValid:Gn},plan:{required:!1,isValid:Kn},transaction_charge:{required:!1,isValid:Gn},bearer:{required:!1,isValid:Kn},channels:{required:!1,isValid:function(t){return t instanceof Array}},currency:{required:!1,isValid:Kn},firstname:{required:!1,isValid:Kn},lastname:{required:!1,isValid:Kn},phone:{required:!1,isValid:Kn},remark:{required:!1,isValid:Kn},payment_page:{required:!1,isValid:Gn},payment_request:{required:!1,isValid:Kn},quantity:{required:!1,isValid:Kn},coupon:{required:!1,isValid:Kn},start_date:{required:!1,isValid:Kn},interval:{required:!1,isValid:Kn},invoice_limit:{required:!1,isValid:Gn},subaccount:{required:!1,isValid:Kn},split_code:{required:!1,isValid:Kn},hash:{required:!1,isValid:Kn},metadata:{required:!1,isValid:Kn},transaction_type:{required:!1,isValid:Kn},subscription:{required:!1,isValid:Gn}};var yr,vr,br=Qe(function(t){var e,n;e=$e,n=function(){var t=function(t,e){var n=[0,0,0,0];return n[3]+=(t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]])[3]+(e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]])[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]+e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]+e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]+e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},e=function(t,e){var n=[0,0,0,0];return n[3]+=(t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]])[3]*(e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]])[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]*e[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=t[3]*e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]*e[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[2]*e[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[3]*e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},n=function(t,e){return 32===(e%=64)?[t[1],t[0]]:32>e?[t[0]<<e|t[1]>>>32-e,t[1]<<e|t[0]>>>32-e]:[t[1]<<(e-=32)|t[0]>>>32-e,t[0]<<e|t[1]>>>32-e]},r=function(t,e){return 0===(e%=64)?t:32>e?[t[0]<<e|t[1]>>>32-e,t[1]<<e]:[t[1]<<e-32,0]},i=function(t,e){return[t[0]^e[0],t[1]^e[1]]},o=function(t){return t=i(t,[0,t[0]>>>1]),t=e(t,[4283543511,3981806797]),t=i(t,[0,t[0]>>>1]),t=e(t,[3301882366,444984403]),t=i(t,[0,t[0]>>>1])},a=function(a,s){for(var u=(a=a||"").length%16,c=a.length-u,h=[0,s=s||0],l=[0,s],f=[0,0],p=[0,0],d=[2277735313,289559509],g=[1291169091,658871167],m=0;c>m;m+=16)f=[255&a.charCodeAt(m+4)|(255&a.charCodeAt(m+5))<<8|(255&a.charCodeAt(m+6))<<16|(255&a.charCodeAt(m+7))<<24,255&a.charCodeAt(m)|(255&a.charCodeAt(m+1))<<8|(255&a.charCodeAt(m+2))<<16|(255&a.charCodeAt(m+3))<<24],p=[255&a.charCodeAt(m+12)|(255&a.charCodeAt(m+13))<<8|(255&a.charCodeAt(m+14))<<16|(255&a.charCodeAt(m+15))<<24,255&a.charCodeAt(m+8)|(255&a.charCodeAt(m+9))<<8|(255&a.charCodeAt(m+10))<<16|(255&a.charCodeAt(m+11))<<24],f=e(f,d),f=n(f,31),f=e(f,g),h=i(h,f),h=n(h,27),h=t(h,l),h=t(e(h,[0,5]),[0,1390208809]),p=e(p,g),p=n(p,33),p=e(p,d),l=i(l,p),l=n(l,31),l=t(l,h),l=t(e(l,[0,5]),[0,944331445]);switch(f=[0,0],p=[0,0],u){case 15:p=i(p,r([0,a.charCodeAt(m+14)],48));case 14:p=i(p,r([0,a.charCodeAt(m+13)],40));case 13:p=i(p,r([0,a.charCodeAt(m+12)],32));case 12:p=i(p,r([0,a.charCodeAt(m+11)],24));case 11:p=i(p,r([0,a.charCodeAt(m+10)],16));case 10:p=i(p,r([0,a.charCodeAt(m+9)],8));case 9:p=i(p,[0,a.charCodeAt(m+8)]),p=e(p,g),p=n(p,33),p=e(p,d),l=i(l,p);case 8:f=i(f,r([0,a.charCodeAt(m+7)],56));case 7:f=i(f,r([0,a.charCodeAt(m+6)],48));case 6:f=i(f,r([0,a.charCodeAt(m+5)],40));case 5:f=i(f,r([0,a.charCodeAt(m+4)],32));case 4:f=i(f,r([0,a.charCodeAt(m+3)],24));case 3:f=i(f,r([0,a.charCodeAt(m+2)],16));case 2:f=i(f,r([0,a.charCodeAt(m+1)],8));case 1:f=i(f,[0,a.charCodeAt(m)]),f=e(f,d),f=n(f,31),f=e(f,g),h=i(h,f)}return h=i(h,[0,a.length]),l=i(l,[0,a.length]),h=t(h,l),l=t(l,h),h=o(h),l=o(l),h=t(h,l),l=t(l,h),("00000000"+(h[0]>>>0).toString(16)).slice(-8)+("00000000"+(h[1]>>>0).toString(16)).slice(-8)+("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)},s={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},u=function(t,e){if(Array.prototype.forEach&&t.forEach===Array.prototype.forEach)t.forEach(e);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e(t[n],n,t);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},c=function(t,e){var n=[];return null==t?n:Array.prototype.map&&t.map===Array.prototype.map?t.map(e):(u(t,function(t,r,i){n.push(e(t,r,i))}),n)},h=function(){return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices},l=function(t){var e=[window.screen.width,window.screen.height];return t.screen.detectScreenOrientation&&e.sort().reverse(),e},f=function(t){if(window.screen.availWidth&&window.screen.availHeight){var e=[window.screen.availHeight,window.screen.availWidth];return t.screen.detectScreenOrientation&&e.sort().reverse(),e}return t.NOT_AVAILABLE},p=function(t){if(null==navigator.plugins)return t.NOT_AVAILABLE;for(var e=[],n=0,r=navigator.plugins.length;r>n;n++)navigator.plugins[n]&&e.push(navigator.plugins[n]);return g(t)&&(e=e.sort(function(t,e){return t.name>e.name?1:e.name>t.name?-1:0})),c(e,function(t){var e=c(t,function(t){return[t.type,t.suffixes]});return[t.name,t.description,e]})},d=function(t){var e=[];if(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window){e=c(["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"],function(e){try{return new window.ActiveXObject(e),e}catch(e){return t.ERROR}})}else e.push(t.NOT_AVAILABLE);return navigator.plugins&&(e=e.concat(p(t))),e},g=function(t){for(var e=!1,n=0,r=t.plugins.sortPluginsFor.length;r>n;n++){if(navigator.userAgent.match(t.plugins.sortPluginsFor[n])){e=!0;break}}return e},m=function(t){try{return!!window.sessionStorage}catch(e){return t.ERROR}},y=function(t){try{return!!window.localStorage}catch(e){return t.ERROR}},v=function(t){try{return!!window.indexedDB}catch(e){return t.ERROR}},b=function(t){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:t.NOT_AVAILABLE},T=function(t){return navigator.cpuClass||t.NOT_AVAILABLE},w=function(t){return navigator.platform?navigator.platform:t.NOT_AVAILABLE},S=function(t){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:t.NOT_AVAILABLE},E=function(){var t,e=0;void 0!==navigator.maxTouchPoints?e=navigator.maxTouchPoints:void 0!==navigator.msMaxTouchPoints&&(e=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(e){t=!1}return[e,t,"ontouchstart"in window]},A=function(t){var e=[],n=document.createElement("canvas");n.width=2e3,n.height=200,n.style.display="inline";var r=n.getContext("2d");return r.rect(0,0,10,10),r.rect(2,2,6,6),e.push("canvas winding:"+(!1===r.isPointInPath(5,5,"evenodd")?"yes":"no")),r.textBaseline="alphabetic",r.fillStyle="#f60",r.fillRect(125,1,62,20),r.fillStyle="#069",r.font=t.dontUseFakeFontInCanvas?"11pt Arial":"11pt no-real-font-123",r.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),r.fillStyle="rgba(102, 204, 0, 0.2)",r.font="18pt Arial",r.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),r.globalCompositeOperation="multiply",r.fillStyle="rgb(255,0,255)",r.beginPath(),r.arc(50,50,50,0,2*Math.PI,!0),r.closePath(),r.fill(),r.fillStyle="rgb(0,255,255)",r.beginPath(),r.arc(100,50,50,0,2*Math.PI,!0),r.closePath(),r.fill(),r.fillStyle="rgb(255,255,0)",r.beginPath(),r.arc(75,100,50,0,2*Math.PI,!0),r.closePath(),r.fill(),r.fillStyle="rgb(255,0,255)",r.arc(75,75,75,0,2*Math.PI,!0),r.arc(75,75,25,0,2*Math.PI,!0),r.fill("evenodd"),n.toDataURL&&e.push("canvas fp:"+n.toDataURL()),e},k=function(){var t,e=function(e){return t.clearColor(0,0,0,1),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),"["+e[0]+", "+e[1]+"]"};if(!(t=j()))return null;var n=[],r=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,r);var i=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);t.bufferData(t.ARRAY_BUFFER,i,t.STATIC_DRAW),r.itemSize=3,r.numItems=3;var o=t.createProgram(),a=t.createShader(t.VERTEX_SHADER);t.shaderSource(a,"attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}"),t.compileShader(a);var s=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(s,"precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}"),t.compileShader(s),t.attachShader(o,a),t.attachShader(o,s),t.linkProgram(o),t.useProgram(o),o.vertexPosAttrib=t.getAttribLocation(o,"attrVertex"),o.offsetUniform=t.getUniformLocation(o,"uniformOffset"),t.enableVertexAttribArray(o.vertexPosArray),t.vertexAttribPointer(o.vertexPosAttrib,r.itemSize,t.FLOAT,!1,0,0),t.uniform2f(o.offsetUniform,1,1),t.drawArrays(t.TRIANGLE_STRIP,0,r.numItems);try{n.push(t.canvas.toDataURL())}catch(t){}n.push("extensions:"+(t.getSupportedExtensions()||[]).join(";")),n.push("webgl aliased line width range:"+e(t.getParameter(t.ALIASED_LINE_WIDTH_RANGE))),n.push("webgl aliased point size range:"+e(t.getParameter(t.ALIASED_POINT_SIZE_RANGE))),n.push("webgl alpha bits:"+t.getParameter(t.ALPHA_BITS)),n.push("webgl antialiasing:"+(t.getContextAttributes().antialias?"yes":"no")),n.push("webgl blue bits:"+t.getParameter(t.BLUE_BITS)),n.push("webgl depth bits:"+t.getParameter(t.DEPTH_BITS)),n.push("webgl green bits:"+t.getParameter(t.GREEN_BITS)),n.push("webgl max anisotropy:"+function(t){var e=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic");if(e){var n=t.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT);return 0===n&&(n=2),n}return null}(t)),n.push("webgl max combined texture image units:"+t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),n.push("webgl max cube map texture size:"+t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE)),n.push("webgl max fragment uniform vectors:"+t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS)),n.push("webgl max render buffer size:"+t.getParameter(t.MAX_RENDERBUFFER_SIZE)),n.push("webgl max texture image units:"+t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)),n.push("webgl max texture size:"+t.getParameter(t.MAX_TEXTURE_SIZE)),n.push("webgl max varying vectors:"+t.getParameter(t.MAX_VARYING_VECTORS)),n.push("webgl max vertex attribs:"+t.getParameter(t.MAX_VERTEX_ATTRIBS)),n.push("webgl max vertex texture image units:"+t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),n.push("webgl max vertex uniform vectors:"+t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS)),n.push("webgl max viewport dims:"+e(t.getParameter(t.MAX_VIEWPORT_DIMS))),n.push("webgl red bits:"+t.getParameter(t.RED_BITS)),n.push("webgl renderer:"+t.getParameter(t.RENDERER)),n.push("webgl shading language version:"+t.getParameter(t.SHADING_LANGUAGE_VERSION)),n.push("webgl stencil bits:"+t.getParameter(t.STENCIL_BITS)),n.push("webgl vendor:"+t.getParameter(t.VENDOR)),n.push("webgl version:"+t.getParameter(t.VERSION));try{var c=t.getExtension("WEBGL_debug_renderer_info");c&&(n.push("webgl unmasked vendor:"+t.getParameter(c.UNMASKED_VENDOR_WEBGL)),n.push("webgl unmasked renderer:"+t.getParameter(c.UNMASKED_RENDERER_WEBGL)))}catch(t){}return t.getShaderPrecisionFormat?(u(["FLOAT","INT"],function(e){u(["VERTEX","FRAGMENT"],function(r){u(["HIGH","MEDIUM","LOW"],function(i){u(["precision","rangeMin","rangeMax"],function(o){var a=t.getShaderPrecisionFormat(t[r+"_SHADER"],t[i+"_"+e])[o];"precision"!==o&&(o="precision "+o);var s="webgl "+r.toLowerCase()+" shader "+i.toLowerCase()+" "+e.toLowerCase()+" "+o+":"+a;n.push(s)})})})}),n):n},x=function(){try{var t=j(),e=t.getExtension("WEBGL_debug_renderer_info");return t.getParameter(e.UNMASKED_VENDOR_WEBGL)+"~"+t.getParameter(e.UNMASKED_RENDERER_WEBGL)}catch(t){return null}},C=function(){var t=document.createElement("div");t.innerHTML="&nbsp;",t.className="adsbox";var e=!1;try{document.body.appendChild(t),e=0===document.getElementsByClassName("adsbox")[0].offsetHeight,document.body.removeChild(t)}catch(t){e=!1}return e},B=function(){if(void 0!==navigator.languages)try{if(navigator.languages[0].substr(0,2)!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},D=function(){return window.screen.width<window.screen.availWidth||window.screen.height<window.screen.availHeight},O=function(){var t,e=navigator.userAgent.toLowerCase(),n=navigator.oscpu,r=navigator.platform.toLowerCase();if(t=0>e.indexOf("windows phone")?0>e.indexOf("win")?0>e.indexOf("android")?0>e.indexOf("linux")?0>e.indexOf("iphone")&&0>e.indexOf("ipad")?0>e.indexOf("mac")?"Other":"Mac":"iOS":"Linux":"Android":"Windows":"Windows Phone",("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&"Windows Phone"!==t&&"Android"!==t&&"iOS"!==t&&"Other"!==t)return!0;if(void 0!==n){if((n=n.toLowerCase()).indexOf("win")>=0&&"Windows"!==t&&"Windows Phone"!==t)return!0;if(n.indexOf("linux")>=0&&"Linux"!==t&&"Android"!==t)return!0;if(n.indexOf("mac")>=0&&"Mac"!==t&&"iOS"!==t)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===t))return!0}return r.indexOf("win")>=0&&"Windows"!==t&&"Windows Phone"!==t||(!(0>r.indexOf("linux")&&0>r.indexOf("android")&&0>r.indexOf("pike")||"Linux"===t||"Android"===t)||(!(0>r.indexOf("mac")&&0>r.indexOf("ipad")&&0>r.indexOf("ipod")&&0>r.indexOf("iphone")||"Mac"===t||"iOS"===t)||((-1===r.indexOf("win")&&-1===r.indexOf("linux")&&-1===r.indexOf("mac"))!=("Other"===t)||void 0===navigator.plugins&&"Windows"!==t&&"Windows Phone"!==t)))},P=function(){var t,e=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(("Chrome"===(t=0>e.indexOf("firefox")?0>e.indexOf("opera")&&0>e.indexOf("opr")?0>e.indexOf("chrome")?0>e.indexOf("safari")?0>e.indexOf("trident")?"Other":"Internet Explorer":"Safari":"Chrome":"Opera":"Firefox")||"Safari"===t||"Opera"===t)&&"20030107"!==n)return!0;var r,i=(""+eval).length;if(37===i&&"Safari"!==t&&"Firefox"!==t&&"Other"!==t)return!0;if(39===i&&"Internet Explorer"!==t&&"Other"!==t)return!0;if(33===i&&"Chrome"!==t&&"Opera"!==t&&"Other"!==t)return!0;try{throw"a"}catch(t){try{t.toSource(),r=!0}catch(t){r=!1}}return r&&"Firefox"!==t&&"Other"!==t},R=function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))},I=function(){if(!R())return!1;var t=j();return!!window.WebGLRenderingContext&&!!t},N=function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},M=function(){return void 0!==window.swfobject},_=function(){return window.swfobject.hasFlashPlayerVersion("9.0.0")},V=function(t,e){window.___fp_swf_loaded=function(e){t(e)};var n=e.fonts.swfContainerId;!function(t){var e=document.createElement("div");e.setAttribute("id",t.fonts.swfContainerId),document.body.appendChild(e)}();window.swfobject.embedSWF(e.fonts.swfPath,n,"1","1","9.0.0",!1,{onReady:"___fp_swf_loaded"},{allowScriptAccess:"always",menu:"false"},{})},j=function(){var t=document.createElement("canvas"),e=null;try{e=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(t){}return e||(e=null),e},L=[{key:"userAgent",getData:function(t){t(navigator.userAgent)}},{key:"language",getData:function(t,e){t(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||e.NOT_AVAILABLE)}},{key:"colorDepth",getData:function(t,e){t(window.screen.colorDepth||e.NOT_AVAILABLE)}},{key:"deviceMemory",getData:function(t,e){t(navigator.deviceMemory||e.NOT_AVAILABLE)}},{key:"pixelRatio",getData:function(t,e){t(window.devicePixelRatio||e.NOT_AVAILABLE)}},{key:"hardwareConcurrency",getData:function(t,e){t(b(e))}},{key:"screenResolution",getData:function(t,e){t(l(e))}},{key:"availableScreenResolution",getData:function(t,e){t(f(e))}},{key:"timezoneOffset",getData:function(t){t((new Date).getTimezoneOffset())}},{key:"timezone",getData:function(t,e){window.Intl&&window.Intl.DateTimeFormat?t((new window.Intl.DateTimeFormat).resolvedOptions().timeZone):t(e.NOT_AVAILABLE)}},{key:"sessionStorage",getData:function(t,e){t(m(e))}},{key:"localStorage",getData:function(t,e){t(y(e))}},{key:"indexedDb",getData:function(t,e){t(v(e))}},{key:"addBehavior",getData:function(t){t(!(!document.body||!document.body.addBehavior))}},{key:"openDatabase",getData:function(t){t(!!window.openDatabase)}},{key:"cpuClass",getData:function(t,e){t(T(e))}},{key:"platform",getData:function(t,e){t(w(e))}},{key:"doNotTrack",getData:function(t,e){t(S(e))}},{key:"plugins",getData:function(t,e){N()?t(e.plugins.excludeIE?e.EXCLUDED:d(e)):t(p(e))}},{key:"canvas",getData:function(t,e){R()?t(A(e)):t(e.NOT_AVAILABLE)}},{key:"webgl",getData:function(t,e){I()?t(k()):t(e.NOT_AVAILABLE)}},{key:"webglVendorAndRenderer",getData:function(t){I()?t(x()):t()}},{key:"adBlock",getData:function(t){t(C())}},{key:"hasLiedLanguages",getData:function(t){t(B())}},{key:"hasLiedResolution",getData:function(t){t(D())}},{key:"hasLiedOs",getData:function(t){t(O())}},{key:"hasLiedBrowser",getData:function(t){t(P())}},{key:"touchSupport",getData:function(t){t(E())}},{key:"fonts",getData:function(t,e){var n=["monospace","sans-serif","serif"],r=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];e.fonts.extendedJsFonts&&(r=r.concat(["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"]));r=(r=r.concat(e.fonts.userDefinedFonts)).filter(function(t,e){return r.indexOf(t)===e});var i=document.getElementsByTagName("body")[0],o=document.createElement("div"),a=document.createElement("div"),s={},u={},c=function(){var t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="72px",t.style.fontStyle="normal",t.style.fontWeight="normal",t.style.letterSpacing="normal",t.style.lineBreak="auto",t.style.lineHeight="normal",t.style.textTransform="none",t.style.textAlign="left",t.style.textDecoration="none",t.style.textShadow="none",t.style.whiteSpace="normal",t.style.wordBreak="normal",t.style.wordSpacing="normal",t.innerHTML="mmmmmmmmmmlli",t},h=function(t,e){var n=c();return n.style.fontFamily="'"+t+"',"+e,n},l=function(t){for(var e=!1,r=0;n.length>r;r++)if(e=t[r].offsetWidth!==s[n[r]]||t[r].offsetHeight!==u[n[r]])return e;return e},f=function(){for(var t=[],e=0,r=n.length;r>e;e++){var i=c();i.style.fontFamily=n[e],o.appendChild(i),t.push(i)}return t}();i.appendChild(o);for(var p=0,d=n.length;d>p;p++)s[n[p]]=f[p].offsetWidth,u[n[p]]=f[p].offsetHeight;var g=function(){for(var t={},e=0,i=r.length;i>e;e++){for(var o=[],s=0,u=n.length;u>s;s++){var c=h(r[e],n[s]);a.appendChild(c),o.push(c)}t[r[e]]=o}return t}();i.appendChild(a);for(var m=[],y=0,v=r.length;v>y;y++)l(g[r[y]])&&m.push(r[y]);i.removeChild(a),i.removeChild(o),t(m)},pauseBefore:!0},{key:"fontsFlash",getData:function(t,e){return M()?_()?e.fonts.swfPath?void V(function(e){t(e)},e):t("missing options.fonts.swfPath"):t("flash not installed"):t("swf object not loaded")},pauseBefore:!0},{key:"audio",getData:function(t,e){var n=e.audio;if(n.excludeIOS11&&navigator.userAgent.match(/OS 11.+Version\/11.+Safari/))return t(e.EXCLUDED);var r=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(null==r)return t(e.NOT_AVAILABLE);var i=new r(1,44100,44100),o=i.createOscillator();o.type="triangle",o.frequency.setValueAtTime(1e4,i.currentTime);var a=i.createDynamicsCompressor();u([["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]],function(t){void 0!==a[t[0]]&&"function"==typeof a[t[0]].setValueAtTime&&a[t[0]].setValueAtTime(t[1],i.currentTime)}),o.connect(a),a.connect(i.destination),o.start(0),i.startRendering();var s=setTimeout(function(){return console.warn('Audio fingerprint timed out. Please report bug at https://github.com/Valve/fingerprintjs2 with your user agent: "'+navigator.userAgent+'".'),i.oncomplete=function(){},i=null,t("audioTimeout")},n.timeout);i.oncomplete=function(e){var n;try{clearTimeout(s),n=""+e.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(function(t,e){return t+Math.abs(e)},0),o.disconnect(),a.disconnect()}catch(e){return void t(e)}t(n)}}},{key:"enumerateDevices",getData:function(t,e){if(!h())return t(e.NOT_AVAILABLE);navigator.mediaDevices.enumerateDevices().then(function(e){t(e.map(function(t){return"id="+t.deviceId+";gid="+t.groupId+";"+t.kind+";"+t.label}))}).catch(function(e){t(e)})}}],U=function(t){throw Error("'new Fingerprint()' is deprecated, see https://github.com/Valve/fingerprintjs2#upgrade-guide-from-182-to-200")};return U.get=function(t,e){e?t||(t={}):(e=t,t={}),function(t,e){if(null==e)return t;var n,r;for(r in e)null==(n=e[r])||Object.prototype.hasOwnProperty.call(t,r)||(t[r]=n)}(t,s),t.components=t.extraComponents.concat(L);var n={data:[],addPreprocessedComponent:function(e,r){"function"==typeof t.preprocessor&&(r=t.preprocessor(e,r)),n.data.push({key:e,value:r})}},r=-1,i=function(o){if(t.components.length>(r+=1)){var a=t.components[r];if(t.excludes[a.key])i(!1);else{if(!o&&a.pauseBefore)return r-=1,void setTimeout(function(){i(!0)},1);try{a.getData(function(t){n.addPreprocessedComponent(a.key,t),i(!1)},t)}catch(t){n.addPreprocessedComponent(a.key,t+""),i(!1)}}}else e(n.data)};i(!1)},U.getPromise=function(t){return new Promise(function(e,n){U.get(t,e)})},U.getV18=function(t,e){return null==e&&(e=t,t={}),U.get(t,function(n){for(var r=[],i=0;n.length>i;i++){var o=n[i];if(o.value===(t.NOT_AVAILABLE||"not available"))r.push({key:o.key,value:"unknown"});else if("plugins"===o.key)r.push({key:"plugins",value:c(o.value,function(t){var e=c(t[2],function(t){return t.join?t.join("~"):t}).join(",");return[t[0],t[1],e].join("::")})});else if(-1!==["canvas","webgl"].indexOf(o.key))r.push({key:o.key,value:o.value.join("~")});else if(-1!==["sessionStorage","localStorage","indexedDb","addBehavior","openDatabase"].indexOf(o.key)){if(!o.value)continue;r.push({key:o.key,value:1})}else r.push(o.value?o.value.join?{key:o.key,value:o.value.join(";")}:o:{key:o.key,value:o.value})}var s=a(c(r,function(t){return t.value}).join("~~~"),31);e(s,r)})},U.x64hash128=a,U.VERSION="2.0.0",U},t.exports?t.exports=n():e.exports?e.exports=n():e.Fingerprint2=n()}),Tr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;return new Promise(function(e){return setTimeout(function(){e()},t)})},wr=(yr=te(regeneratorRuntime.mark(function t(){var e,n,r,i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,br.getPromise();case 3:if(!(e=t.sent)||!Array.isArray(e)){t.next=10;break}return n=e.filter(function(t){return"not available"!==t.value}).sort(function(t,e){return t.key>e.key?1:e.key>t.key?-1:0}).map(function(t){return t.value}),r=n&&n.join(""),i=br.x64hash128(r,31),t.abrupt("return",i);case 10:pr("Device ID could not be calculated"),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),pr(t.t0);case 16:return t.abrupt("return",null);case 17:case"end":return t.stop()}},t,void 0,[[0,13]])})),function(){return yr.apply(this,arguments)}),Sr=(vr=te(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=void 0,t.prev=1,!window){t.next=8;break}return t.next=5,Tr(550);case 5:return t.next=7,wr();case 7:e=t.sent;case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),pr("Device ID could not be calculated but we are moving on with the transaction");case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}},t,void 0,[[1,10]])})),function(){return vr.apply(this,arguments)});function Er(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}var Ar=function(t){function e(t){var n;ee(this,e);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];var a=oe(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(i)));return Error.captureStackTrace&&Error.captureStackTrace(a,e),a.errors=t,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Er(Error)),e}(),kr={validate:function(t){var e=function(t){var e=[];return t&&"object"===(void 0===t?"undefined":Qt(t))?(Object.keys(mr).forEach(function(n){var r=mr[n],i=t[n];!r.required||i||t[r.fallback]?i&&!r.isValid(i)&&e.push({field:n,message:"Invalid field: "+n}):e.push({field:n,message:"Required field: "+n})}),e):(e.push({message:"Please supply a valid object"}),e)}(t);if(e.length){var n=ae(e,1);throw new Ar(e,n[0].message)}},request:function(t){var e=this;return te(regeneratorRuntime.mark(function n(){var r,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sr();case 2:return r=e.sent,e.next=5,ye(re({},t,{device:r}));case 5:return e.abrupt("return",(i=e.sent)&&Object.seal(new gr(re({},i.data,{deviceFingerprint:r}))));case 7:case"end":return e.stop()}},n,e)}))()},requestWithAccessCode:function(t){var e=this;return te(regeneratorRuntime.mark(function n(){var r,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sr();case 2:return r=e.sent,e.next=5,ve(t);case 5:return e.abrupt("return",(i=e.sent)&&Object.seal(new gr(re({},i.data,{deviceFingerprint:r}))));case 7:case"end":return e.stop()}},n,e)}))()},initialize:function(t){return Object.seal(new gr(t))},verify:function(t){var e=this;return te(regeneratorRuntime.mark(function n(){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,be(t);case 2:return e.abrupt("return",(r=e.sent)&&r.data);case 4:case"end":return e.stop()}},n,e)}))()}},xr=function(t){return ce.get(ge.paystackApiUrl+"bank",{params:t}).then(function(t){return t.data})},Cr=function(){return ce.get(ge.paystackApiUrl+"checkout/resolutions").then(function(t){return t.data})},Br=function(){return ce.get(ge.paystackApiUrl+"checkout/celebrations").then(function(t){return t.data})},Dr=function(t){return ce.get(ge.paystackApiUrl+"address_verification/states",{params:t}).then(function(t){return t.data})},Or=function(){function t(){ee(this,t)}return ne(t,null,[{key:"contents",value:function(){return[{key:"banks",usage:"Returns a list of banks that can be used to complete checkout"},{key:"resolutions",usage:"Returns a list of known errors, mapped to their suggested resolutions"},{key:"celebrations",usage:"Returns a list of upcoming celebrations"},{key:"states",usage:"Returns a list of states for a particular country"}]}},{key:"fetch",value:function(t,e){if(-1>=this.contents().map(function(t){return t.key}).indexOf(t))throw Error("Please provide a valid config key. Use Toolkit.contents() to see available options.");var n=void 0;switch(t){case"banks":n=xr(e||{pay_with_bank:"1"});break;case"resolutions":n=Cr();break;case"celebrations":n=Br();break;case"states":n=Dr(e)}return n}}]),t}();return t.Transaction=kr,t.BankAccount=mn,t.Card=on,t.Toolkit=Or,t}({});
package/es/checkout.js CHANGED
@@ -10031,13 +10031,14 @@ var CardAPI = {
10031
10031
  },
10032
10032
  resumeCardCharge: function resumeCardCharge(_ref2) {
10033
10033
  var device = _ref2.device,
10034
- accessCode = _ref2.accessCode;
10034
+ accessCode = _ref2.accessCode,
10035
+ pin = _ref2.pin;
10035
10036
 
10036
10037
  var url = config$2.paymentBaseUrl + 'charge/resume/' + accessCode;
10037
10038
  var headers = {
10038
10039
  'Content-Type': 'application/x-www-form-urlencoded'
10039
10040
  };
10040
- var data = { device: device };
10041
+ var data = _extends({ device: device }, pin && { handle: pin });
10041
10042
 
10042
10043
  var urlEncodedData = formUrlencoded(data);
10043
10044
  return axiosInstance.post(url, urlEncodedData, { headers: headers }).then(function (response) {
@@ -10209,7 +10210,9 @@ var CardCharge = {
10209
10210
 
10210
10211
  var accessCode = _ref2.accessCode;
10211
10212
 
10213
+ var pin = this.card.getEncryptedPin();
10212
10214
  var params = {
10215
+ pin: pin,
10213
10216
  accessCode: accessCode,
10214
10217
  device: this.deviceFingerprint
10215
10218
  };
@@ -10234,9 +10237,7 @@ var CardCharge = {
10234
10237
  authenticateCard: function authenticateCard(token) {
10235
10238
  var _this6 = this;
10236
10239
 
10237
- return validate(this.card).then(function () {
10238
- return CardAPI.authenticate(_this6.id, token);
10239
- }).then(function (response) {
10240
+ return CardAPI.authenticate(this.id, token).then(function (response) {
10240
10241
  _this6.logAPIResponse(response, paymentMethod);
10241
10242
  return response;
10242
10243
  });
@@ -13780,7 +13781,7 @@ var Toolkit = function () {
13780
13781
  return content.key;
13781
13782
  });
13782
13783
  if (availableData.indexOf(key) <= -1) {
13783
- throw new Error('Please provide a valid config key. Use Toolkit.contents() to see available}.');
13784
+ throw new Error('Please provide a valid config key. Use Toolkit.contents() to see available options.');
13784
13785
  }
13785
13786
 
13786
13787
  var data = void 0;
@@ -13806,4 +13807,4 @@ var Toolkit = function () {
13806
13807
  return Toolkit;
13807
13808
  }();
13808
13809
 
13809
- export { Transaction, BankAccount, Card, PhoneNumber, Toolkit };
13810
+ export { Transaction, BankAccount, Card, Toolkit };
package/lib/checkout.js CHANGED
@@ -10035,13 +10035,14 @@ var CardAPI = {
10035
10035
  },
10036
10036
  resumeCardCharge: function resumeCardCharge(_ref2) {
10037
10037
  var device = _ref2.device,
10038
- accessCode = _ref2.accessCode;
10038
+ accessCode = _ref2.accessCode,
10039
+ pin = _ref2.pin;
10039
10040
 
10040
10041
  var url = config$2.paymentBaseUrl + 'charge/resume/' + accessCode;
10041
10042
  var headers = {
10042
10043
  'Content-Type': 'application/x-www-form-urlencoded'
10043
10044
  };
10044
- var data = { device: device };
10045
+ var data = _extends({ device: device }, pin && { handle: pin });
10045
10046
 
10046
10047
  var urlEncodedData = formUrlencoded(data);
10047
10048
  return axiosInstance.post(url, urlEncodedData, { headers: headers }).then(function (response) {
@@ -10213,7 +10214,9 @@ var CardCharge = {
10213
10214
 
10214
10215
  var accessCode = _ref2.accessCode;
10215
10216
 
10217
+ var pin = this.card.getEncryptedPin();
10216
10218
  var params = {
10219
+ pin: pin,
10217
10220
  accessCode: accessCode,
10218
10221
  device: this.deviceFingerprint
10219
10222
  };
@@ -10238,9 +10241,7 @@ var CardCharge = {
10238
10241
  authenticateCard: function authenticateCard(token) {
10239
10242
  var _this6 = this;
10240
10243
 
10241
- return validate(this.card).then(function () {
10242
- return CardAPI.authenticate(_this6.id, token);
10243
- }).then(function (response) {
10244
+ return CardAPI.authenticate(this.id, token).then(function (response) {
10244
10245
  _this6.logAPIResponse(response, paymentMethod);
10245
10246
  return response;
10246
10247
  });
@@ -13784,7 +13785,7 @@ var Toolkit = function () {
13784
13785
  return content.key;
13785
13786
  });
13786
13787
  if (availableData.indexOf(key) <= -1) {
13787
- throw new Error('Please provide a valid config key. Use Toolkit.contents() to see available}.');
13788
+ throw new Error('Please provide a valid config key. Use Toolkit.contents() to see available options.');
13788
13789
  }
13789
13790
 
13790
13791
  var data = void 0;
@@ -13813,5 +13814,4 @@ var Toolkit = function () {
13813
13814
  exports.Transaction = Transaction;
13814
13815
  exports.BankAccount = BankAccount;
13815
13816
  exports.Card = Card;
13816
- exports.PhoneNumber = PhoneNumber;
13817
13817
  exports.Toolkit = Toolkit;
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@paystack/checkout-js",
3
- "version": "1.10.0-dev.5",
3
+ "version": "1.10.0-dev.9",
4
4
  "description": "Client-side JS library for billing on Paystack",
5
5
  "main": "lib/checkout.js",
6
6
  "module": "es/checkout.js",
7
7
  "files": [
8
8
  "dist",
9
9
  "lib",
10
- "es"
10
+ "es",
11
+ "PUBLIC_DOCS"
11
12
  ],
12
13
  "repository": {
13
14
  "type": "git",
@@ -47,7 +48,7 @@
47
48
  "babel-preset-env": "^1.7.0",
48
49
  "babel-preset-es2015": "^6.24.1",
49
50
  "babel-preset-stage-2": "^6.24.1",
50
- "commitizen": "^4.2.3",
51
+ "commitizen": "^4.2.4",
51
52
  "cross-env": "^5.1.6",
52
53
  "cz-conventional-changelog": "^3.3.0",
53
54
  "eslint": "^4.19.1",
@@ -59,7 +60,7 @@
59
60
  "fast-async": "^6.3.7",
60
61
  "http-server": "^0.12.3",
61
62
  "husky": "^4.3.8",
62
- "jest": "^23.6",
63
+ "jest": "^23.6.0",
63
64
  "jest-canvas-mock": "^2.0.0-beta.1",
64
65
  "nodent-runtime": "^3.2.1",
65
66
  "prettier-eslint": "^8.8.0",
@@ -72,7 +73,7 @@
72
73
  "rollup-plugin-node-resolve": "^3.3.0",
73
74
  "rollup-plugin-replace": "^2.2.0",
74
75
  "rollup-plugin-uglify": "^3.0.0",
75
- "semantic-release": "^17.3.8"
76
+ "semantic-release": "^19.0.2"
76
77
  },
77
78
  "scripts": {
78
79
  "clean": "rimraf lib dist es",
@@ -115,5 +116,9 @@
115
116
  "hooks": {
116
117
  "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true"
117
118
  }
119
+ },
120
+ "engines": {
121
+ "node": ">= 12.0.0",
122
+ "npm": ">= 6.0.0"
118
123
  }
119
124
  }