@alipay/ams-checkout 0.0.1694400497-dev.1 → 0.0.1694675458-dev.0

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.
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={861:function(e,t){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=c(e),a=i[0],s=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a<s;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var o,i,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},207:function(e,t,n){"use strict";var r=n(861),o=n(90),i=n(736);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n);e=s(e,r);var o=e.write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<s;i++)if(u(e,i)===u(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){for(var f=!0,d=0;d<c;d++)if(u(e,i+d)!==u(t,d)){f=!1;break}if(f)return i}return-1}function E(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return Y(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return Y(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return w(e,t,n,r)}function R(e,t,n,r){return Y(z(t),e,n,r)}function A(e,t,n,r){return Y(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,c,u=e[o],l=null,f=u>239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}t.lW=c,t.h2=50,c.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=h,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?O(this,0,e):m.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.h2;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;f<s;++f)if(u[f]!==l[f]){i=u[f],a=l[f];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return R(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function x(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function k(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=K(e[i]);return o}function C(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function I(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var o=t-e;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=c.isBuffer(e)?e:F(new c(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}},736:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},90:function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+p]=255&a,p+=h,a/=256,u-=8);e[n+p-h]|=128*m}},317:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},180:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},374:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},404:function(e){function t(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,c,"next",e)}function c(e){t(a,o,i,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},486:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},702:function(e,t,n){var r=n(281);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},746:function(e,t,n){var r=n(508);e.exports=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},400:function(e,t,n){var r=n(242),o=n(424),i=n(983);e.exports=function(e){var t=o();return function(){var n,o=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return i(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},143:function(e,t,n){var r=n(281);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},242:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},821:function(e,t,n){var r=n(687);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},424:function(e){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},249:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},20:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},118:function(e,t,n){var r=n(143);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},983:function(e,t,n){var r=n(944).default,o=n(374);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},662:function(e,t,n){var r=n(944).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),s=new x(r||[]);return a(i,"_invoke",{value:A(e,n,s)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h={};function m(){}function v(){}function y(){}var g={};f(g,c,(function(){return this}));var E=Object.getPrototypeOf,b=E&&E(E(P([])));b&&b!==n&&i.call(b,c)&&(g=b);var w=y.prototype=m.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(o,a,s,c){var u=p(e[o],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function A(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=p(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function S(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=p(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:k}}function k(){return{value:void 0,done:!0}}return v.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=f(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,f(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},_(R.prototype),f(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new R(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),f(w,l,"Generator"),f(w,c,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},687:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},925:function(e,t,n){var r=n(180),o=n(249),i=n(508),a=n(20);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},224:function(e,t,n){var r=n(944).default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},281:function(e,t,n){var r=n(944).default,o=n(224);e.exports=function(e){var t=o(e,"string");return"symbol"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},944:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},508:function(e,t,n){var r=n(317);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AMSAutoDebit:function(){return Dr},AMSCheckout:function(){return Ir},checkoutDisplayEnum:function(){return P},componentSignEnum:function(){return S},default:function(){return Lr},environmentEnum:function(){return I},errorEnum:function(){return B},eventCodeEnum:function(){return j},localeEnum:function(){return x},messageName:function(){return M},modeEnum:function(){return k},networkModeEnum:function(){return C},osTypeEnum:function(){return D},paymentMethodCategoryTypeEnum:function(){return T},platformEnum:function(){return N},productSceneEnum:function(){return O},renderDisplayTypeEnum:function(){return A},targetEnum:function(){return U},terminalTypeEnum:function(){return L}});var e,t=n(702),o=n.n(t),i=n(486),a=n.n(i),s=n(821),c=n.n(s),u=n(400),l=n.n(u),f=n(374),d=n.n(f),p=n(143),h=n.n(p),m=n(925),v=n.n(m),y={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},g=new Uint8Array(16);function E(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(g)}for(var b=[],w=0;w<256;++w)b.push((w+256).toString(16).slice(1));function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(b[e[t+0]]+b[e[t+1]]+b[e[t+2]]+b[e[t+3]]+"-"+b[e[t+4]]+b[e[t+5]]+"-"+b[e[t+6]]+b[e[t+7]]+"-"+b[e[t+8]]+b[e[t+9]]+"-"+b[e[t+10]]+b[e[t+11]]+b[e[t+12]]+b[e[t+13]]+b[e[t+14]]+b[e[t+15]]).toLowerCase()}var R=function(e,t,n){if(y.randomUUID&&!t&&!e)return y.randomUUID();var r=(e=e||{}).random||(e.rng||E)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return _(r)},A=function(e){return e.popup="popup",e.inline="inline",e}({}),S=function(e){return e.EASY_PAY_WALLET="EASY_PAY_WALLET",e.CASHIER_PAYMENT_CARD="CASHIER_PAYMENT_CARD",e.CASHIER_PAYMENT_BANK="CASHIER_PAYMENT_BANK",e.AUTO_DEBIT_WALLET="AUTO_DEBIT_WALLET",e.NONE="NONE",e}({}),O=function(e){return e.EASY_PAY="EASY_PAY",e.CASHIER_PAYMENT="CASHIER_PAYMENT",e.AUTO_DEBIT="AUTO_DEBIT",e}({}),T=function(e){return e.CARD="CARD",e.WALLET="WALLET",e.BANK="BANK",e}({}),x=function(e){return e["en-US"]="en-US",e}({}),P=function(e){return e.horizon="horizon",e.vertical="vertical",e}({}),k=function(e){return e.dropin="dropin",e.component="component",e}({}),C=function(e){return e.proxy="proxy",e.session="session",e}({}),I=function(e){return e.sandbox="sandbox",e.prod="prod",e.light_sandbox="light_sandbox",e}({}),D=function(e){return e.IOS="IOS",e.ANDROID="ANDROID",e.ELSE="ELSE",e}({}),L=function(e){return e.WEB="WEB",e.WAP="WAP",e.APP="APP",e.MINI_APP="MINI_APP",e}({}),N=function(e){return e.desktop="desktop",e.mobile="mobile",e}({}),M=function(e){return e.SDK_TO_APP="SDK_TO_APP",e.APP_TO_SDK="APP_TO_SDK",e.APP_TO_APP="APP_TO_APP",e}({}),U=function(e){return e.BLANK="_blank",e.SELF="_self",e}({}),B=function(e){return e.PARAMS="PARAMS",e.TIMEOUT="TIMEOUT",e.NETWORK="NETWORK",e.SYSTEM="SYSTEM",e.LOGIN="LOGIN",e.GATEWAY="GATEWAY",e.VALIDATION="VALIDATION",e.TAOBAOBINDALIPAY="TAOBAOBINDALIPAY",e.REGISTERWALLET="REGISTERWALLET",e.NOALIPAYID="NOALIPAYID",e.TRUSTLOGINERROR="TRUSTLOGINERROR",e.SIGNIN="SIGNIN",e.GETSIGNPARAMSERROR="GETSIGNPARAMSERROR",e}({}),j=function(e){return e.SDK_START_OF_LOADING="SDK_START_OF_LOADING",e.SDK_END_OF_LOADING="SDK_END_OF_LOADING",e.SDK_INTERNAL_ERROR="SDK_INTERNAL_ERROR",e.SDK_CREATEPAYMENT_PARAMETER_ERROR="SDK_CREATEPAYMENT_PARAMETER_ERROR",e.SDK_INIT_PARAMETER_ERROR="SDK_INIT_PARAMETER_ERROR",e.SDK_CREATECOMPONENT_ERROR="SDK_CREATECOMPONENT_ERROR",e.SDK_CALL_URL_ERROR="SDK_CALL_URL_ERROR",e.SDK_CALL_URL_SUCCESS="SDK_CALL_URL_SUCCESS",e}({}),K={DOMAIN_NOT_IN_WHITE_LIST:{code:j.SDK_INTERNAL_ERROR,message:"Origin of the message is not in the white list"},NOT_JSON_FORMAT:{code:j.SDK_INTERNAL_ERROR,message:"The message string should conform to the json format"},SDK_COMPATIBILITY_ISSUES:{code:j.SDK_INTERNAL_ERROR,BROWSER_NOT_SUPPORT_POSTMESSAGE:{code:j.SDK_INTERNAL_ERROR,message:"The browser does not support the postmessage communication mode"},FAILED_TO_CREATE_IFRAME:{code:j.SDK_INTERNAL_ERROR,message:"Failed to create iframe"}},INIT_PARAMETER_ERROR:{code:j.SDK_INIT_PARAMETER_ERROR,UI_MODE_NOT_SUPPORTED:{code:j.SDK_INIT_PARAMETER_ERROR,message:"This UI mode is not supported"},ENVIRONMENT_ERROR:{code:j.SDK_INIT_PARAMETER_ERROR,message:"The current input environment does not support or is not in the standard enumeration"},MODE_ERROR:{code:j.SDK_INIT_PARAMETER_ERROR,message:"mode value not in enum"},LOCALE_ERROR:{code:j.SDK_INIT_PARAMETER_ERROR,message:"The current input language does not support or is not in the standard enumeration"},NET_MODE_NOT_SUPPORT:{code:j.SDK_INIT_PARAMETER_ERROR,message:"The network mode is not supported"},EVENT_ERROR:{code:j.SDK_INIT_PARAMETER_ERROR,message:"Parameter type should be function"}},CREATEPAYMENT_PARAMETER_ERROR:{code:j.SDK_CREATEPAYMENT_PARAMETER_ERROR},CONFIRMPAYMENT_PARAMETER_ERROR:{code:"SDK_CONFIRMPAYMENT_PARAMETER_ERROR"},CREATECOMPONENT_ERROR:{code:j.SDK_CREATECOMPONENT_ERROR,message:"Failed to create component",SINGLETON_COMPONENT_ERROR:{code:j.SDK_CREATECOMPONENT_ERROR,message:"Only one component can be rendered simultaneously"},LOAD_APP_TIMEOUT:{code:j.SDK_CREATECOMPONENT_ERROR,message:"Load resource timeout"}},SDK_CALL_URL_ERROR:{code:j.SDK_CALL_URL_ERROR,REDIRECT_ERROR:{code:j.SDK_CALL_URL_ERROR,message:"Redirect data exception"}},SDK_SUBMIT_ERROR:{code:j.SDK_CALL_URL_ERROR,message:"Component not created or current browser compatibility issue, not supported"}},F="COMPONENT",z={name:"onError",uniqueKey:"userOnError"},Y={name:"onPaymentMethodSelected",uniqueKey:"userOnPaymentMethodSelected"},H={name:"onSizeChanged",uniqueKey:"userOnSizeChanged"},q={name:"onLog",uniqueKey:"userOnLog"},W={name:"onLaunch"},V={name:"onRedirect"},G={name:"onClose",uniqueKey:"userOnClose"},J={name:"onEventCallback",uniqueKey:"userEventCallback"},Z={name:"submitForm"},Q={name:"hideCloseButton"},$={name:"showCloseButton"},X={name:"setAllowRetention"},ee={name:"declareCheckoutInfo"},te={name:"showPopup"},ne={name:"dismissLoading"},re="ams-component-container",oe="ams-component-section",ie="ams-checkout-component",ae="asm-component-close-block",se="ams-component-retention",ce="ams-component-mockup",ue="ams-component-loading",le="_ams_sdk_component_listener",fe="inline-loading",de=n(662),pe=n.n(de),he=n(404),me=n.n(he),ve=n(118),ye=n.n(ve),ge={dev:"http://page.alipay.net/page/antom-web-checkout/src/component-app",sit:"http://page.test.alipay.net/page/antom-web-checkout/src/component-app",pre:"https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app",sandbox:"https://ac.alipay.com/page/antom-web-checkout/src/component-app",light_sandbox:"https://ac.alipay.com/page/antom-web-checkout/src/component-app",prod:"https://ac.alipay.com/page/antom-web-checkout/src/component-app"},Ee="1.5.4",be=n(944),we=n.n(be),_e=".".charCodeAt(0),Re=/\\(\\)?/g,Ae=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),Se=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oe=/^\w*$/;function Te(e){if("string"==typeof e)return e;var t="".concat(e);return"0"===t&&1/e==-Infinity?"-0":t}function xe(e,t){return Array.isArray(e)?e:function(e,t){if(Array.isArray(e))return!1;var n=we()(e);return"number"===n||"boolean"===n||null===e||Oe.test(e)||!Se.test(e)||null!==t&&e in Object(t)}(e,t)?[e]:(r=[],(n=e).charCodeAt(0)===_e&&r.push(""),n.replace(Ae,(function(e,t,n,o){var i=e;return n?i=o.replace(Re,"$1"):t&&(i=t.trim()),r.push(i),""})),r);var n,r}function Pe(e,t,n){var r=null===e?void 0:function(e,t){for(var n=xe(t,e),r=0,o=n.length,i=e;null!==i&&r<o;)i=i[Te(n[r++])];return r&&r===o?i:void 0}(e,t);return void 0===r?n:r}var ke=function(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()},Ce=function(){function e(){a()(this,e),h()(this,"events",void 0),h()(this,"eventsKey",void 0),this.events=new Map,this.eventsKey=new Map}return o()(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n){if(this.eventsKey.has("".concat(e,"-").concat(n)))return void console.warn("".concat(n,":Has been registered. Please use another key or do not pass the key"));this.eventsKey.set("".concat(e,"-").concat(n),!0)}var r=this.events.get(e)||[];r.push({func:t,key:n||""}),this.events.set(e,r)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n&&this.eventsKey.has("".concat(e,"-").concat(n))&&this.eventsKey.delete("".concat(e,"-").concat(n)),this.events.has(e)){var r=this.events.get(e);r=r.filter((function(e){return(t!==e.func||e.key!==n)&&(!e.key||e.key!==n)})),this.events.set(e,r)}}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.events.has(e)){var o=this.events.get(e);o.forEach((function(e){e.func.apply(e,n)}))}}},{key:"once",value:function(e,t,n){var r=this;this.on(e,(function o(){t.apply(void 0,arguments),r.off(e,o,n)}),n)}}]),e}(),Ie=window.navigator,De=Ie.userAgent,Le=/iPhone|iPad|iPod/i.test(De)||"MacIntel"===Ie.platform&&Ie.maxTouchPoints>1,Ne=/Android/i.test(De),Me=(/\bMacintosh\b/.test(De),/Windows NT/.test(De),Le),Ue=Ne,Be=!!/Android|iPhone|iPad|iPod|Mobile/.test(De),je=function(e,t){try{return JSON.parse(e)||t}catch(e){return t}},Ke=function(e,t){var n=Pe(e,"Result-Status")||Pe(e,"result-status","");if(!n)return null;if(2e3==+n)return{success:!1,traceId:t,errorCode:B.LOGIN,resultStatus:n};if(4001==+n)return{success:!1,traceId:t,errorCode:B.TIMEOUT,resultStatus:n};if(1e3!=+n){var r=Pe(e,"Tips")||Pe(e,"tips",""),o=Pe(e,"Memo")||Pe(e,"memo","");return{success:!1,traceId:t,errorCode:B.GATEWAY,errorMessage:decodeURIComponent(r||""),result:{resultStatus:n||"",tips:decodeURIComponent(r||""),memo:decodeURIComponent(o||"")},resultStatus:n}}return null},Fe=function(){var e=Ie.userAgent;return!["Android","iPhone","SymbianOS","Windows Phone","iPod"].some((function(t){return e.includes(t)}))},ze=function(e){var t={};return e||(e=window.location.href),e.replace(/([^?=&#]+)(=([^&#]*))?/g,(function(e,n,r,o){return void 0===o?"":(t[n]=decodeURIComponent(o),t[n])})),t},Ye=function(){var e=document.documentElement.clientWidth,t=Fe()?130:100*e/390;return Math.min(t,130)},He=function(e,t){try{(t||document.getElementById("ams-component-container")).style.fontSize="".concat(Ye(),"px"),innerHeight=window.innerHeight}catch(e){}},qe=ze(),We=qe._light_sandbox,Ve=qe.groupId,Ge=qe.requestHost,Je={local:"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",dev:Ge||"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",sit:Ge||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",pre:"https://imgs-sea-pre.alipay.com/mgw.htm",prod:"https://imgs-sea-global.alipay.com/mgw.htm",sandbox:"https://imgs-sea-global.alipay.com/mgw.htm"},Ze="ANTOM_PAYMENT_WEB",Qe=Ve||"GROUP_20230523202227";function $e(e,t){return function(){return e.apply(t,arguments)}}var Xe,et=Object.prototype.toString,tt=Object.getPrototypeOf,nt=(Xe=Object.create(null),function(e){var t=et.call(e);return Xe[t]||(Xe[t]=t.slice(8,-1).toLowerCase())}),rt=function(e){return e=e.toLowerCase(),function(t){return nt(t)===e}},ot=function(e){return function(t){return be(t)===e}},it=Array.isArray,at=ot("undefined");var st=rt("ArrayBuffer");var ct=ot("string"),ut=ot("function"),lt=ot("number"),ft=function(e){return null!==e&&"object"===be(e)},dt=function(e){if("object"!==nt(e))return!1;var t=tt(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},pt=rt("Date"),ht=rt("File"),mt=rt("Blob"),vt=rt("FileList"),yt=rt("URLSearchParams");function gt(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.allOwnKeys,a=void 0!==i&&i;if(null!=e)if("object"!==be(e)&&(e=[e]),it(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{var s,c=a?Object.getOwnPropertyNames(e):Object.keys(e),u=c.length;for(n=0;n<u;n++)s=c[n],t.call(null,e[s],s,e)}}function Et(e,t){t=t.toLowerCase();for(var n,r=Object.keys(e),o=r.length;o-- >0;)if(t===(n=r[o]).toLowerCase())return n;return null}var bt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,wt=function(e){return!at(e)&&e!==bt};var _t,Rt,At=(_t="undefined"!=typeof Uint8Array&&tt(Uint8Array),function(e){return _t&&e instanceof _t}),St=rt("HTMLFormElement"),Ot=(Rt=Object.prototype.hasOwnProperty,function(e,t){return Rt.call(e,t)}),Tt=rt("RegExp"),xt=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};gt(n,(function(n,o){var i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},Pt="abcdefghijklmnopqrstuvwxyz",kt="0123456789",Ct={DIGIT:kt,ALPHA:Pt,ALPHA_DIGIT:Pt+Pt.toUpperCase()+kt};var It=rt("AsyncFunction"),Dt={isArray:it,isArrayBuffer:st,isBuffer:function(e){return null!==e&&!at(e)&&null!==e.constructor&&!at(e.constructor)&&ut(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||ut(e.append)&&("formdata"===(t=nt(e))||"object"===t&&ut(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&st(e.buffer)},isString:ct,isNumber:lt,isBoolean:function(e){return!0===e||!1===e},isObject:ft,isPlainObject:dt,isUndefined:at,isDate:pt,isFile:ht,isBlob:mt,isRegExp:Tt,isFunction:ut,isStream:function(e){return ft(e)&&ut(e.pipe)},isURLSearchParams:yt,isTypedArray:At,isFileList:vt,forEach:gt,merge:function e(){for(var t=wt(this)&&this||{},n=t.caseless,r={},o=function(t,o){var i=n&&Et(r,o)||o;dt(r[i])&&dt(t)?r[i]=e(r[i],t):dt(t)?r[i]=e({},t):it(t)?r[i]=t.slice():r[i]=t},i=0,a=arguments.length;i<a;i++)arguments[i]&&gt(arguments[i],o);return r},extend:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.allOwnKeys;return gt(t,(function(t,r){n&&ut(t)?e[r]=$e(t,n):e[r]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&tt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:nt,kindOfTest:rt,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(it(e))return e;var t=e.length;if(!lt(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:St,hasOwnProperty:Ot,hasOwnProp:Ot,reduceDescriptors:xt,freezeMethods:function(e){xt(e,(function(t,n){if(ut(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];ut(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return it(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t},findKey:Et,global:bt,isContextDefined:wt,ALPHABET:Ct,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ct.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&ut(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(ft(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=it(n)?[]:{};return gt(n,(function(t,n){var i=e(t,r+1);!at(i)&&(o[n]=i)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:It,isThenable:function(e){return e&&(ft(e)||ut(e))&&ut(e.then)&&ut(e.catch)}};function Lt(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Dt.inherits(Lt,Error,{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:Dt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Nt=Lt.prototype,Mt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){Mt[e]={value:e}})),Object.defineProperties(Lt,Mt),Object.defineProperty(Nt,"isAxiosError",{value:!0}),Lt.from=function(e,t,n,r,o,i){var a=Object.create(Nt);return Dt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),Lt.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var Ut=Lt,Bt=n(207).lW;function jt(e){return Dt.isPlainObject(e)||Dt.isArray(e)}function Kt(e){return Dt.endsWith(e,"[]")?e.slice(0,-2):e}function Ft(e,t,n){return e?e.concat(t).map((function(e,t){return e=Kt(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var zt=Dt.toFlatObject(Dt,{},null,(function(e){return/^is[A-Z]/.test(e)}));var Yt=function(e,t,n){if(!Dt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=Dt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Dt.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Dt.isSpecCompliantForm(t);if(!Dt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Dt.isDate(e))return e.toISOString();if(!s&&Dt.isBlob(e))throw new Ut("Blob is not supported. Use a Buffer instead.");return Dt.isArrayBuffer(e)||Dt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Bt.from(e):e}function u(e,n,o){var s=e;if(e&&!o&&"object"===be(e))if(Dt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Dt.isArray(e)&&function(e){return Dt.isArray(e)&&!e.some(jt)}(e)||(Dt.isFileList(e)||Dt.endsWith(n,"[]"))&&(s=Dt.toArray(e)))return n=Kt(n),s.forEach((function(e,r){!Dt.isUndefined(e)&&null!==e&&t.append(!0===a?Ft([n],r,i):null===a?n:n+"[]",c(e))})),!1;return!!jt(e)||(t.append(Ft(o,n,i),c(e)),!1)}var l=[],f=Object.assign(zt,{defaultVisitor:u,convertValue:c,isVisitable:jt});if(!Dt.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Dt.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),Dt.forEach(n,(function(n,i){!0===(!(Dt.isUndefined(n)||null===n)&&o.call(t,n,Dt.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function Ht(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function qt(e,t){this._pairs=[],e&&Yt(e,this,t)}var Wt=qt.prototype;Wt.append=function(e,t){this._pairs.push([e,t])},Wt.toString=function(e){var t=e?function(t){return e.call(this,t,Ht)}:Ht;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Vt=qt;function Gt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Jt(e,t,n){if(!t)return e;var r,o=n&&n.encode||Gt,i=n&&n.serialize;if(r=i?i(t,n):Dt.isURLSearchParams(t)?t.toString():new Vt(t,n).toString(o)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var Zt,Qt=function(){function e(){i(this,e),this.handlers=[]}return t(e,[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){Dt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),$t={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Vt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:("undefined"==typeof navigator||"ReactNative"!==(Zt=navigator.product)&&"NativeScript"!==Zt&&"NS"!==Zt)&&"undefined"!=typeof window&&"undefined"!=typeof document,isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};var en=function(e){function t(e,n,r,o){var i=e[o++],a=Number.isFinite(+i),s=o>=e.length;return i=!i&&Dt.isArray(r)?r.length:i,s?(Dt.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&Dt.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&Dt.isArray(r[i])&&(r[i]=function(e){var t,n,r={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)r[n=o[t]]=e[n];return r}(r[i])),!a)}if(Dt.isFormData(e)&&Dt.isFunction(e.entries)){var n={};return Dt.forEachEntry(e,(function(e,r){t(function(e){return Dt.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null};var tn={transitional:$t,adapter:Xt.isNode?"http":"xhr",transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=Dt.isObject(e);if(i&&Dt.isHTMLForm(e)&&(e=new FormData(e)),Dt.isFormData(e))return o&&o?JSON.stringify(en(e)):e;if(Dt.isArrayBuffer(e)||Dt.isBuffer(e)||Dt.isStream(e)||Dt.isFile(e)||Dt.isBlob(e))return e;if(Dt.isArrayBufferView(e))return e.buffer;if(Dt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Yt(e,new Xt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Xt.isNode&&Dt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=Dt.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Yt(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(Dt.isString(e))try{return(t||JSON.parse)(e),Dt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||tn.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&Dt.isString(e)&&(n&&!this.responseType||r)){var o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Ut.from(e,Ut.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xt.classes.FormData,Blob:Xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Dt.forEach(["delete","get","head","post","put","patch"],(function(e){tn.headers[e]={}}));var nn=tn,rn=Dt.toObjectSet(["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"]),on=Symbol("internals");function an(e){return e&&String(e).trim().toLowerCase()}function sn(e){return!1===e||null==e?e:Dt.isArray(e)?e.map(sn):String(e)}function cn(e,t,n,r,o){return Dt.isFunction(r)?r.call(this,t,n):(o&&(t=n),Dt.isString(t)?Dt.isString(r)?-1!==t.indexOf(r):Dt.isRegExp(r)?r.test(t):void 0:void 0)}var un=function(e,n){function r(e){i(this,r),e&&this.set(e)}return t(r,[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=an(t);if(!o)throw new Error("header name must be a non-empty string");var i=Dt.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=sn(e))}var i=function(e,t){return Dt.forEach(e,(function(e,n){return o(e,n,t)}))};return Dt.isPlainObject(e)||e instanceof this.constructor?i(e,t):Dt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i(function(e){var t,n,r,o={};return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||o[t]&&rn[t]||("set-cookie"===t?o[t]?o[t].push(n):o[t]=[n]:o[t]=o[t]?o[t]+", "+n:n)})),o}(e),t):null!=e&&o(t,e,n),this}},{key:"get",value:function(e,t){if(e=an(e)){var n=Dt.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(Dt.isFunction(t))return t.call(this,r,n);if(Dt.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=an(e)){var n=Dt.findKey(this,e);return!(!n||void 0===this[n]||t&&!cn(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=an(e)){var o=Dt.findKey(n,e);!o||t&&!cn(0,n[o],o,t)||(delete n[o],r=!0)}}return Dt.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!cn(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return Dt.forEach(this,(function(r,o){var i=Dt.findKey(n,o);if(i)return t[i]=sn(r),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(o):String(o).trim();a!==o&&delete t[o],t[a]=sn(r),n[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return Dt.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&Dt.isArray(n)?n.join(", "):n)})),t}},{key:e,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=m(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:n,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[on]=this[on]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=an(e);t[r]||(!function(e,t){var n=Dt.toCamelCase(" "+t);["get","set","has"].forEach((function(r){Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return Dt.isArray(e)?e.forEach(r):r(e),this}}]),r}(Symbol.iterator,Symbol.toStringTag);un.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Dt.reduceDescriptors(un.prototype,(function(e,t){var n=e.value,r=t[0].toUpperCase()+t.slice(1);return{get:function(){return n},set:function(e){this[r]=e}}})),Dt.freezeMethods(un);var ln=un;function fn(e,t){var n=this||nn,r=t||n,o=ln.from(r.headers),i=r.data;return Dt.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function dn(e){return!(!e||!e.__CANCEL__)}function pn(e,t,n){Ut.call(this,null==e?"canceled":e,Ut.ERR_CANCELED,t,n),this.name="CanceledError"}Dt.inherits(pn,Ut,{__CANCEL__:!0});var hn=pn;var mn=Xt.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),Dt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Dt.isString(r)&&a.push("path="+r),Dt.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function vn(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var yn=Xt.isStandardBrowserEnv?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(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 e=r(window.location.href),function(t){var n=Dt.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};var gn=function(e,t){e=e||10;var n,r=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(s){var c=Date.now(),u=o[a];n||(n=c),r[i]=s,o[i]=c;for(var l=a,f=0;l!==i;)f+=r[l++],l%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(c-n<t)){var d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}};function En(e,t){var n=0,r=gn(50,250);return function(o){var i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,c=r(s);n=i;var u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}var bn="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,o=e.data,i=ln.from(e.headers).normalize(),a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}Dt.isFormData(o)&&(Xt.isStandardBrowserEnv||Xt.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(u+":"+l))}var f=vn(e.baseURL,e.url);function d(){if(c){var r=ln.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ut("Request failed with status code "+n.status,[Ut.ERR_BAD_REQUEST,Ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}}if(c.open(e.method.toUpperCase(),Jt(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(n(new Ut("Request aborted",Ut.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new Ut("Network Error",Ut.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||$t;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Ut(t,r.clarifyTimeoutError?Ut.ETIMEDOUT:Ut.ECONNABORTED,e,c)),c=null},Xt.isStandardBrowserEnv){var p=(e.withCredentials||yn(f))&&e.xsrfCookieName&&mn.read(e.xsrfCookieName);p&&i.set(e.xsrfHeaderName,p)}void 0===o&&i.setContentType(null),"setRequestHeader"in c&&Dt.forEach(i.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),Dt.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",En(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",En(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){c&&(n(!t||t.type?new hn(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));var h,m=(h=/^([-+\w]{1,25})(:?\/\/|:)/.exec(f))&&h[1]||"";m&&-1===Xt.protocols.indexOf(m)?n(new Ut("Unsupported protocol "+m+":",Ut.ERR_BAD_REQUEST,e)):c.send(o||null)}))},wn={http:null,xhr:bn};Dt.forEach(wn,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var _n=function(e){for(var t,n,r=(e=Dt.isArray(e)?e:[e]).length,o=0;o<r&&(t=e[o],!(n=Dt.isString(t)?wn[t.toLowerCase()]:t));o++);if(!n){if(!1===n)throw new Ut("Adapter ".concat(t," is not supported by the environment"),"ERR_NOT_SUPPORT");throw new Error(Dt.hasOwnProp(wn,t)?"Adapter '".concat(t,"' is not available in the build"):"Unknown adapter '".concat(t,"'"))}if(!Dt.isFunction(n))throw new TypeError("adapter is not a function");return n};function Rn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hn(null,e)}function An(e){return Rn(e),e.headers=ln.from(e.headers),e.data=fn.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),_n(e.adapter||nn.adapter)(e).then((function(t){return Rn(e),t.data=fn.call(e,e.transformResponse,t),t.headers=ln.from(t.headers),t}),(function(t){return dn(t)||(Rn(e),t&&t.response&&(t.response.data=fn.call(e,e.transformResponse,t.response),t.response.headers=ln.from(t.response.headers))),Promise.reject(t)}))}var Sn=function(e){return e instanceof ln?e.toJSON():e};function On(e,t){t=t||{};var n={};function r(e,t,n){return Dt.isPlainObject(e)&&Dt.isPlainObject(t)?Dt.merge.call({caseless:n},e,t):Dt.isPlainObject(t)?Dt.merge({},t):Dt.isArray(t)?t.slice():t}function o(e,t,n){return Dt.isUndefined(t)?Dt.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!Dt.isUndefined(t))return r(void 0,t)}function a(e,t){return Dt.isUndefined(t)?Dt.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}var c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return o(Sn(e),Sn(t),!0)}};return Dt.forEach(Object.keys(Object.assign({},e,t)),(function(r){var i=c[r]||o,a=i(e[r],t[r],r);Dt.isUndefined(a)&&i!==s||(n[r]=a)})),n}var Tn="1.5.0",xn={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){xn[e]=function(n){return be(n)===e||"a"+(t<1?"n ":" ")+e}}));var Pn={};xn.transitional=function(e,t,n){function r(e,t){return"[Axios v1.5.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new Ut(r(o," has been removed"+(t?" in "+t:"")),Ut.ERR_DEPRECATED);return t&&!Pn[o]&&(Pn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var kn={assertOptions:function(e,t,n){if("object"!==be(e))throw new Ut("options must be an object",Ut.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new Ut("option "+i+" must be "+c,Ut.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ut("Unknown option "+i,Ut.ERR_BAD_OPTION)}},validators:xn},Cn=kn.validators,In=function(){function e(t){i(this,e),this.defaults=t,this.interceptors={request:new Qt,response:new Qt}}return t(e,[{key:"request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n=t=On(this.defaults,t),r=n.transitional,o=n.paramsSerializer,i=n.headers;void 0!==r&&kn.assertOptions(r,{silentJSONParsing:Cn.transitional(Cn.boolean),forcedJSONParsing:Cn.transitional(Cn.boolean),clarifyTimeoutError:Cn.transitional(Cn.boolean)},!1),null!=o&&(Dt.isFunction(o)?t.paramsSerializer={serialize:o}:kn.assertOptions(o,{encode:Cn.function,serialize:Cn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&Dt.merge(i.common,i[t.method]);i&&Dt.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]})),t.headers=ln.concat(a,i);var s=[],c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var u,l=[];this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));var f,d=0;if(!c){var p=[An.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,l),f=p.length,u=Promise.resolve(t);d<f;)u=u.then(p[d++],p[d++]);return u}f=s.length;var h=t;for(d=0;d<f;){var m=s[d++],v=s[d++];try{h=m(h)}catch(e){v.call(this,e);break}}try{u=An.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,f=l.length;d<f;)u=u.then(l[d++],l[d++]);return u}},{key:"getUri",value:function(e){return Jt(vn((e=On(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),e}();Dt.forEach(["delete","get","head","options"],(function(e){In.prototype[e]=function(t,n){return this.request(On(n||{},{method:e,url:t,data:(n||{}).data}))}})),Dt.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(On(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}In.prototype[e]=t(),In.prototype[e+"Form"]=t(!0)}));var Dn=In,Ln=function(){function e(t){if(i(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t((function(e,t,o){r.reason||(r.reason=new hn(e,t,o),n(r.reason))}))}return t(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}(),Nn=Ln;var Mn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Mn).forEach((function(e){var t=m(e,2),n=t[0],r=t[1];Mn[r]=n}));var Un=Mn;var Bn=function e(t){var n=new Dn(t),r=$e(Dn.prototype.request,n);return Dt.extend(r,Dn.prototype,n,{allOwnKeys:!0}),Dt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(On(t,n))},r}(nn);Bn.Axios=Dn,Bn.CanceledError=hn,Bn.CancelToken=Nn,Bn.isCancel=dn,Bn.VERSION=Tn,Bn.toFormData=Yt,Bn.AxiosError=Ut,Bn.Cancel=Bn.CanceledError,Bn.all=function(e){return Promise.all(e)},Bn.spread=function(e){return function(t){return e.apply(null,t)}},Bn.isAxiosError=function(e){return Dt.isObject(e)&&!0===e.isAxiosError},Bn.mergeConfig=On,Bn.AxiosHeaders=ln,Bn.formToJSON=function(e){return en(Dt.isHTMLForm(e)?new FormData(e):e)},Bn.getAdapter=_n,Bn.HttpStatusCode=Un,Bn.default=Bn;var jn=Bn,Kn=ze()._sandbox;function Fn(e){var t,n,r,o=new Date,i=o.getTime()+60*o.getTimezoneOffset()*1e3,a=e.env||"prod",s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n={pre:"https://imgs-sea-pre.alipay.com/mgw.htm",sit:Ge||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",dev:Ge||"http://imgs-13.sggz00b.stable.alipay.net/mgw.htm"},r={"com.ipay.iexpcashier.sdkAction.query":"com.ipay.iopensandbox.sdk.paymentSession.query"},o="SDK_MOCK_SANDBOX",i=Ve||"GROUP_20230315210531";return r[e]&&"light_sandbox"===t||"true"===We?{appId:o,sofaId:i,baseURL:n[t],"Operation-Type":r[e]}:{appId:"",sofaId:"",baseURL:"","Operation-Type":""}}(e["Operation-Type"],a),c=e.baseURL||s.baseURL||function(e,t){return"prod"===t||"sandbox"===t||"light_sandbox"===t?{SG:"https://imgs-sea-global.alipay.com/mgw.htm",US:"https://imgs-na-global.alipay.com/mgw.htm",DE:"https://imgs-de-global.alipay.com/mgw.htm"}[e||"SG"]:"pre"===t?{SG:"https://imgs-sea-pre.alipay.com/mgw.htm",US:"https://imgs-pre.alipay.com/mgw.htm",DE:"https://imgs-de-pre.alipay.com/mgw.htm"}[e||"SG"]:""}(null==e?void 0:e.hostSign,a)||Je[a],u=ye()((t={appId:s.appId||Ze,workspaceId:"pre"===e.env?"pre":"default"},h()(t,"x-cors-".concat(Ze.toLowerCase(),"-default"),"1"),h()(t,"version","2.0"),h()(t,"sofa-group-name",s.sofaId||Qe),h()(t,"Operation-Type",s["Operation-Type"]||e["Operation-Type"]||""),h()(t,"Client-Time",i),h()(t,"tntInstId","ALIPW3SG"),h()(t,"sdk-version",Ee||""),t),e.headers);return"true"!==Kn&&"sandbox"!==a||(u["load-test"]=!0,u.sofaPenAttrs="instMock=O&loadMode=2"),"dev"!==a&&delete u["sofa-group-name"],jn.create({baseURL:c,timeout:null!==(n=e.timeout)&&void 0!==n?n:15e3,headers:u,withCredentials:null===(r=e.withCredentials)||void 0===r||r,method:"POST"}).request}function zn(e,t){return Yn.apply(this,arguments)}function Yn(){return(Yn=me()(pe()().mark((function e(t,n){var r,o,i,a,s,c,u,l,f,d,p,h,m,v;return pe()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Fn(n),Date.now(),o={terminalType:Fe()?"WEB":"WAP",browserInfo:{browserJavaScriptEnabled:!0,browserLanguage:navigator.language,browserUserAgent:navigator.userAgent,browserColorDepth:screen.colorDepth},locale:n.locale||"en_US",deviceLanguage:navigator.language,screenWidth:screen.width,screenHeight:screen.height,timeZoneOffset:(new Date).getTimezoneOffset()};try{o.browserInfo.browserJavaEnabled=(null===(i=navigator)||void 0===i?void 0:i.javaEnabled())||!1}catch(e){}return"WAP"===o.terminalType&&(o.osType=Me?"IOS":"ANDROID"),a=n.needEnvInfo?[ye()(ye()({},t),{},{envInfo:o,extParams:{refUrl:window.location.href}})]:[t],e.prev=6,e.next=9,r({data:a});case 9:if(s=e.sent,c=s.data,u=s.headers,l=c||{},f=Pe(u,"Mgw-TraceId")||Pe(u,"mgw-traceid",""),l.traceId=f||"",null==(d=Ke(u,f))||!d.errorCode){e.next=18;break}throw new Error(JSON.stringify({errorMessage:(null==l?void 0:l.errorMessage)||(null==d?void 0:d.errorMessage),errorCode:null==d?void 0:d.errorCode,success:!1}));case 18:return e.abrupt("return",l);case 21:return e.prev=21,e.t0=e.catch(6),h=je(null===e.t0||void 0===e.t0?void 0:e.t0.message,{success:!1,errorCode:B.SYSTEM,errorMessage:""}),m=null!==e.t0&&void 0!==e.t0&&null!==(p=e.t0.message)&&void 0!==p&&p.includes("timeout")?B.TIMEOUT:"",v=(null==h?void 0:h.errorCode)||m,e.abrupt("return",Promise.reject({success:!1,errorCode:v,errorMessage:""}));case 27:case"end":return e.stop()}}),e,null,[[6,21]])})))).apply(this,arguments)}function Hn(){return(Hn=me()(pe()().mark((function e(t,n){var r;return pe()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=((null==t?void 0:t.paymentSessionData)||"").split("&&")[1]||"",e.abrupt("return",zn(t,ye()(ye()({},n),{},{hostSign:r,needEnvInfo:!0,"Operation-Type":"com.ipay.iexpcashier.sdkAction.query"})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qn,Wn,Vn,Gn=function(e){try{return JSON.parse(e).versionMap.web[Ee].targetWebVerison}catch(e){return""}},Jn=function(e,t){var n,r=(n={},h()(n,S.NONE,[""]),h()(n,S.AUTO_DEBIT_WALLET,["1.0"]),h()(n,S.CASHIER_PAYMENT_BANK,["1.0"]),h()(n,S.CASHIER_PAYMENT_CARD,["1.0"]),h()(n,S.EASY_PAY_WALLET,["1.0","2.0"]),n)[e],o=r.find((function(e){return e===t})),i=r[r.length-1];return o?t:i},Zn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"prod",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=ze()||{},a=i.host,s=Gn(o)||t,c=Jn(n,r);return a&&!["sandbox","light_sandbox","prod"].includes(e)?a:"".concat(ge[e],"/").concat(n,"/").concat(c,"/index.").concat(s,".html")},Qn=function(e){var t=e.componentSign,n=e.analytics,r=void 0===n?{enabled:!0}:n,o=e.productSceneVersion,i=e.environment,a=e.appVersion,s=e.extendInfo,c=e.locale,u=e.instanceId,l=Zn(i,a,t,o,s||""),f=function(e){var t=document.getElementsByTagName("meta").viewPort,n={};if(t)for(var r=t.content.split(","),o=0;o<r.length;o++){var i=r[o].split("=");n[i[0]]=i[1]}return n[e]}("initial-scale")||1,d=ze(),p=d._sandbox,h=d._light_sandbox,m=d.requestHost,v=void 0===m?"":m,y=d.groupId,g=void 0===y?"":y,E=d.LOCAL_MOCK,b=Object.assign({},{locale:c,scale:f,instanceId:u,analyticsEnabled:!1===(null==r?void 0:r.enabled)?"false":"true",sdkVersion:Ee,refUrl:window.location.href});E&&(b.LOCAL_MOCK=E),v&&(b.requestHost=v),g&&(b.groupId=g),"light_sandbox"!==i&&"true"!==h||(b.sandbox="true"),"sandbox"!==i&&"true"!==p||(b.shadow="true");var w=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=encodeURIComponent(n),o=encodeURIComponent(null===e[n]?"":e[n]);t.push("".concat(r,"=").concat(o))}return t.join("&")}(b);return"".concat(l,"?").concat(w)},$n="#".concat(ie,"-desktop{\n border-radius: 8px;\n position: absolute;\n top: 0;\n left: 0;\n}\n#").concat(ie,"-mobile{\n position: absolute;\n top: 0;\n left: 0;\n}\n.").concat(re,"-inline{\n width: 100%;\n height: auto;\n position: relative;\n line-height: 0;\n display: flex;\n}\n#").concat(ue,"{\n width: 100%;\n flex: 1;\n}\n.").concat(fe,"{\n width: 100%;\n height: auto;\n object-fit: contain;\n box-sizing: border-box;\n}\n.").concat(fe,"-mobile{\n padding: 0 0.16em;\n}\n.").concat(fe,"-desktop{}\n"),Xn=function(e){var t;if(document.getElementById("ams-inline-component-style")||((t=document.createElement("style")).id="ams-inline-component-style",t.type="text/css",t.innerHTML=$n,document.head.appendChild(t)),!document.getElementById(re)){var n=document.createElement("div");n.className="".concat(re,"-inline"),n.id=re;var r=document.querySelector(e);return r&&r.appendChild(n),n}},er=".ams-component-container-mobile {\n width: 100%;\n height: 1px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n}\n.ams-component-container-mobile-animation{\n animation: ams-component-container-slide-in 0.3s ease-in-out;\n}\n\n.ams-component-section-desktop {\n font-size: 0;\n}\n\n.ams-component-container-hidden-mobile {\n width: 100%;\n height: 0px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n background-color: transparent;\n border-radius: 12px 12px 0 0;\n animation: ams-component-container-slide-out 0.26s ease-in forwards;\n overflow: hidden;\n}\n\n.ams-component-section-mobile {\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n font-size: 0;\n}\n\n.ams-component-container-desktop {\n display: block;\n width: 672px;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n transform-origin: 50% 50%;\n}\n.ams-component-container-desktop-animation{\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n@keyframes ams-component-container-zoom-out {\n 0% {\n transform: translate(-50%, -50%) scale(1);\n -webkit-transform: translate(-50%, -50%) scale(1);\n opacity: 1\n }\n \n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.4);\n -webkit-transform: translate(-50%, -50%) scale(0.4);\n }\n}\n\n@keyframes ams-component-container-zoom-in {\n 0% {\n transform: translate(-50%, -50%) scale(0.4);\n opacity: 0\n }\n\n 80% {\n opacity: 1\n }\n\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n\n.ams-component-container-hidden-desktop {\n display: block;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n animation-fill-mode: forwards;\n transform-origin: 50% 50%;\n}\n\n.ams-component-loading {\n width: 0.8em;\n height:0.8em;\n background: rgba(0, 0, 0, 0.5);\n border-radius: 8px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.ams-component-loading .line {\n width: 40px;\n height: 40px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ams-component-loading .line div {\n position: absolute;\n left: 17.67px;\n top: 0;\n width: 5.33px;\n height: 40px;\n}\n\n.ams-component-loading .line div:before,\n.ams-component-loading .line div:after {\n content: '';\n display: block;\n height: 13.33px;\n background: #fcfcfc;\n border-radius: 5.3px;\n}\n.ams-component-loading .line div:after {\n margin-top: 13.33px;\n}\n\n.ams-component-loading .line div:nth-child(2) {\n -webkit-transform: rotate(45deg);\n}\n\n.ams-component-loading .line div:nth-child(3) {\n -webkit-transform: rotate(90deg);\n}\n\n.ams-component-loading .line div:nth-child(4) {\n -webkit-transform: rotate(135deg);\n}\n\n/** 加载动画 **/\n@-webkit-keyframes load {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.ams-component-loading .line div:nth-child(1):before {\n -webkit-animation: load 1s linear 0s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):before {\n -webkit-animation: load 1s linear 0.125s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):before {\n -webkit-animation: load 1s linear 0.25s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):before {\n -webkit-animation: load 1s linear 0.375s infinite;\n}\n\n.ams-component-loading .line div:nth-child(1):after {\n -webkit-animation: load 1s linear 0.5s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):after {\n -webkit-animation: load 1s linear 0.675s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):after {\n -webkit-animation: load 1s linear 0.75s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):after {\n -webkit-animation: load 1s linear 0.875s infinite;\n}\n\n.ams-component-loading-logo {\n width: 0.44em;\n height: 0.44em;\n -webkit-transform:rotate(360deg);\n transform:rotate(360deg);\n -webkit-transition:-webkit-transform 1s linear;\n transition:transform 1s linear;\n animation: ams-component-loading-logo 1s linear infinite;\n}\n\n.asm-component-close-block-desktop {\n position: absolute;\n width: 40px;\n height: 40px;\n right: 0;\n top: 0;\n cursor: pointer;\n}\n.asm-component-close-block-btn-desktop {\n width: 11px;\n height: 11px;\n object-fit: fill;\n position: absolute;\n right: 18.7px;\n top: 26.7px;\n}\n.asm-component-close-block-hidden {\n width: 0px !important;\n height: 0px !important;\n visibility: hidden;\n}\n.asm-component-close-block-mobile {\n position: absolute;\n width: 0.4em;\n height: 0.4em;\n right: 0;\n top: 0;\n cursor: pointer;\n z-index: 1009;\n}\n\n.asm-component-close-block-btn-mobile {\n width: 0.11em;\n height: 0.11em;\n object-fit: fill;\n position: absolute;\n right: 0.147em;\n top: 0.167em;\n}\n\n\n.ams-component-container-opacity{\n opacity: 1;\n}\n\n.ams-component-container-opacity:after{\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: block;\n content: \"\";\n z-index: 1010;\n background-color: rgba(0, 0, 0, 0.35);\n}\n\n#ams-component-retention {\n position: fixed;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: 50%;\n height: auto;\n display: none;\n z-index: 1009;\n}\n\n.ams-component-retention-show {\n display: flex !important;\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-hidden {\n display: flex !important;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n -webkit-animation: ams-component-container-zoom-out 0.3s ease-in-out;\n animation-fill-mode: forwards;\n -webkit-animation-fill-mode: forwards;\n}\n\n.ams-component-retention-mobile {\n width: 294px;\n border-radius: 12px;\n padding: 24px 0;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-desktop {\n width: 544px;\n border-radius: 12px;\n padding: 32px;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n@media screen and (max-width: 300px) {\n .ams-component-retention-mobile {\n transform: translate(-50%, -50%) scale(0.8);\n }\n}\n\n.ams-component-retention-title-mobile {\n width: 100%;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-title-desktop {\n text-align: left;\n width: 100%;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n}\n\n.ams-component-retention-sub-title-mobile {\n width: 100%;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 8px;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-sub-title-desktop {\n text-align: left;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 10px;\n}\n\n.ams-component-retention-btn-block-mobile {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n margin-top: 24px;\n padding: 0 24px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-btn-block-desktop {\n width: 100%;\n margin-top: 24px;\n}\n\n#ams-component-retention-remain {\n background: #0079FF;\n border-radius: 100px;\n font-style: normal;\n font-weight: 500;\n text-align: center;\n box-sizing: border-box;\n color: #FFFFFF;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.ams-component-retention-remain-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n padding: 0 6px;\n}\n\n.ams-component-retention-remain-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n display: inline-block;\n padding: 0 24px;\n float: right;\n cursor: pointer;\n padding: 0 8px;\n max-width: 225px;\n}\n\n#ams-component-retention-leave {\n border-radius: 100px;\n border: 1px solid #0079FF;\n font-style: normal;\n font-weight: 500;\n text-align: center;\n box-sizing: border-box;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.ams-component-retention-leave-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n margin-top: 12px;\n padding: 0 6px;\n}\n\n.ams-component-retention-leave-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n display: inline-block;\n padding: 0 24px;\n float: right;\n margin-right: 16px;\n cursor: pointer;\n padding: 0 8px;\n max-width: 225px;\n}\n.".concat(ce,"-hidden{\nanimation: ").concat(ce,"-opacity 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n/** 加载动画 **/\n@-webkit-keyframes ").concat(ce,"-opacity {\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n}\n"),tr=function(e,t){if(!document.getElementById(re)){var n;(n=document.createElement("style")).type="text/css",n.innerHTML=er,document.head.appendChild(n),window.removeEventListener("resize",He),window.removeEventListener("pageShow",He),window.removeEventListener("DOMContentLoaded",He),window.addEventListener("resize",He),window.addEventListener("pageShow",He),window.addEventListener("DOMContentLoaded",He);var r=document.createElement("div");r.className="".concat(re,"-hidden-").concat(e),r.id=re,He(0,r),document.body.appendChild(r);var o=document.createElement("div");return o.className="ams-component-section-".concat(e),o.id=oe,r.appendChild(o),r.classList.remove("".concat(re,"-hidden-").concat(e)),r.classList.add("".concat(re,"-").concat(e)),nr(e,t),r}},nr=function(e,t){var n=e===N.mobile?"touchend":"click",r=document.getElementById(re),o="<img class='".concat(ae,"-btn-").concat(e,"' src=\"").concat("https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg",'"/>'),i=document.createElement("div");i.classList.add("".concat(ae,"-").concat(e),"".concat(ae,"-hidden")),i.id=ae,i.innerHTML=o,i.addEventListener(n,(function(){t()})),r&&r.appendChild(i)},rr=window.innerHeight,or=function(){function e(){a()(this,e),h()(this,"app",void 0),h()(this,"AMSSDK",void 0),h()(this,"platform",void 0),h()(this,"_performanceData",[]),h()(this,"_loadAppPromiseResolve",null),h()(this,"_isInitComponent",void 0),h()(this,"appDomain",void 0),h()(this,"createIframeNode",void 0),h()(this,"_selector",void 0),h()(this,"_appVersion",void 0),h()(this,"_isRetention",void 0),h()(this,"_actionQueryPromise",null),h()(this,"_renderParams",null),h()(this,"_componentSign",S.NONE),h()(this,"_clickEventName",void 0),h()(this,"_renderDisplayType",A.popup),this._appVersion="1.5.4",this._isInitComponent=!1,this._selector="#".concat(oe),this.createIframeNode=function(){return Promise.resolve()},this.platform=Fe()?N.desktop:N.mobile,this._clickEventName=this.platform===N.mobile?"touchend":"click",this._isRetention=!0,this._performanceData.push({key:"sdk_init",value:Date.now()})}var t;return o()(e,[{key:"logoutPlugin",value:function(){this.cleanContainer(!0)}},{key:"applyPlugin",value:function(e){this.AMSSDK=e,this.subscribeFromSDK()}},{key:"setRender",value:function(e){this.createIframeNode=e}},{key:"appendIframeNodes",value:function(e,t){var n=this;if(this._isInitComponent)return this.dispatchToSDK(z.name,K.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR),Promise.reject(K.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR);this._isInitComponent=!0,this._renderParams=t,this._componentSign=e,null!=t&&t.selector&&(this._selector=t.selector),this._renderDisplayType=t.renderDisplayType;var r=this._renderDisplayType===A.inline?"#".concat(re):this._selector;if(this._performanceData.push({key:"sdk_create_component",value:Date.now()}),this.dispatchToSDK(J.name,{code:j.SDK_START_OF_LOADING}),this._renderDisplayType===A.inline){var o=Xn(this._selector);o&&this.renderInlineLoading(t,o)}return this._renderDisplayType===A.popup&&(tr(this.platform,this.closeBtnFunc.bind(this)),function(e,t,n){var r=e===N.mobile?"touchend":"click",o=document.createElement("div");o.id=se,o.classList.add("".concat(se,"-").concat(e)),o.innerHTML='\n <span id="'.concat(se,'-title" class="').concat(se,"-title-").concat(e,'">\n Are you sure you want to leave?\n </span>\n <span\n id="').concat(se,'-sub-title"\n class="').concat(se,"-sub-title-").concat(e,'"\n >\n If you leave this page, you\'ll have to start over again.\n </span>\n <div class="').concat(se,"-btn-block-").concat(e,'">\n <div id="').concat(se,'-remain" class="').concat(se,"-remain-").concat(e,'">\n Continue Payment\n </div>\n <div id="').concat(se,'-leave" class="').concat(se,"-leave-").concat(e,'">\n Leave\n </div>\n </div>'),document.body.appendChild(o);var i=document.getElementById("".concat(se,"-remain"));i&&i.addEventListener(r,t);var a=document.getElementById("".concat(se,"-leave"));a&&a.addEventListener(r,n)}(this.platform,this.hideRetentionPopupFunc.bind(this),this.retentionPopupLeaveFunc.bind(this)),function(){var e=document.getElementsByTagName("body")[0];e.style.overflow="hidden";var t=document.createElement("div");t.style.width="100vw",t.style.height="100vh",t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.zIndex="1000",t.style.background="rgba(0,0,0,0.5)",t.style.display="none",t.id=ce,e.appendChild(t)}(),this.renderPopupLoading(t)),this.createApp(t),Promise.all([this.createActionQueryPromise(),this.createIframeNode(this,r,this._renderDisplayType),this._createLoadAppPromise()]).then((function(){return Promise.resolve()})).catch((function(e){return n._isInitComponent=!1,n.cleanContainer(),Promise.reject(e)}))}},{key:"renderInlineLoading",value:function(e,t){var n,r=null==e||null===(n=e.appearance)||void 0===n?void 0:n.showLoading;(r="boolean"!=typeof r||r)&&function(e,t){var n=document.createElement("div");n.id=ue,t===N.desktop&&(n.innerHTML='<svg class="'.concat(fe," ").concat(fe,"-").concat(t,'" width="740" height="360" viewBox="0 0 740 360" fill="none" xmlns="">\n <rect width="740" height="360" rx="12" fill="#F6F6F6"/>\n <rect opacity="0.7" x="44" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="94" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="144" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M136 100H48C43.5817 100 40 103.582 40 108C40 112.418 43.5817 116 48 116H136C140.418 116 144 112.418 144 108C144 103.582 140.418 100 136 100Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M682 126H58C48.0589 126 40 134.059 40 144C40 153.941 48.0589 162 58 162H682C691.941 162 700 153.941 700 144C700 134.059 691.941 126 682 126Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M682 182H58C48.0589 182 40 190.059 40 200C40 209.941 48.0589 218 58 218H682C691.941 218 700 209.941 700 200C700 190.059 691.941 182 682 182Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M504 274H64C52.9543 274 44 282.954 44 294C44 305.046 52.9543 314 64 314H504C515.046 314 524 305.046 524 294C524 282.954 515.046 274 504 274Z" fill="#E1E6ED"/>\n </g>\n </svg>')),t===N.mobile&&(n.innerHTML='<svg class="'.concat(fe," ").concat(fe,"-").concat(t,'" width="358" height="186" viewBox="0 0 358 186" fill="none" xmlns="">\n <g clip-path="url(#clip0_2543_91192)">\n <rect width="358" height="186" fill="white"/>\n <g clip-path="url(#clip1_2543_91192)">\n <rect width="358" height="186" fill="white"/>\n <rect width="358" height="40" fill="white"/>\n <rect opacity="0.7" x="4" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="54" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="104" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <g clip-path="url(#clip2_2543_91192)">\n <rect width="358" height="120" transform="translate(0 66)" fill="white"/>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M95 66H9C4.02944 66 0 70.0294 0 75C0 79.9706 4.02943 84 9 84H95C99.9706 84 104 79.9706 104 75C104 70.0294 99.9706 66 95 66Z" fill="#E1E6ED"/>\n </g>\n <g clip-path="url(#clip3_2543_91192)">\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M340 94H18C8.05888 94 0 102.059 0 112C0 121.941 8.05887 130 18 130H340C349.941 130 358 121.941 358 112C358 102.059 349.941 94 340 94Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M340 150H18C8.05888 150 0 158.059 0 168C0 177.941 8.05887 186 18 186H340C349.941 186 358 177.941 358 168C358 158.059 349.941 150 340 150Z" fill="#E1E6ED"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id="clip0_2543_91192">\n <rect width="358" height="186" fill="white"/>\n </clipPath>\n <clipPath id="clip1_2543_91192">\n <rect width="358" height="186" fill="white"/>\n </clipPath>\n <clipPath id="clip2_2543_91192">\n <rect width="358" height="120" fill="white" transform="translate(0 66)"/>\n </clipPath>\n <clipPath id="clip3_2543_91192">\n <rect width="358" height="92" fill="white" transform="translate(0 94)"/>\n </clipPath>\n </defs>\n </svg>\n ')),e&&e.appendChild(n);var r=document.getElementById(ue);He(0,r)}(t,this.platform)}},{key:"renderPopupLoading",value:function(e){var t,n=null==e||null===(t=e.appearance)||void 0===t?void 0:t.showLoading;if(n="boolean"!=typeof n||n){var r=document.getElementById(ce);r&&(r.style.display="block"),function(){var e=document.createElement("div");null==e||e.classList.add(ue),e.id=ue,e.innerHTML='<div class="line"><div></div><div></div><div></div><div></div></div>',e.style.fontSize="".concat(Ye(),"px");var t=document.getElementsByTagName("body")[0];null==t||t.appendChild(e)}()}}},{key:"_createLoadAppPromise",value:function(){var e=this;return new Promise((function(t,n){e._loadAppPromiseResolve=t,setTimeout((function(){n(K.CREATECOMPONENT_ERROR.LOAD_APP_TIMEOUT)}),15e3)})).catch((function(t){return e.dispatchToSDK(z.name,{code:K.CREATECOMPONENT_ERROR.code,message:K.CREATECOMPONENT_ERROR.LOAD_APP_TIMEOUT.message}),Promise.reject(t)}))}},{key:"createActionQueryPromise",value:function(){var e=this;return this._performanceData.push({key:"sdk_action_query_start",value:Date.now()}),this._actionQueryPromise=new Promise((function(t,n){var r,o,i,a={paymentSessionData:e._renderParams&&(null===(r=e._renderParams)||void 0===r?void 0:r.paymentSessionData)||"",paymentSessionConfig:null===(o=e._renderParams)||void 0===o||null===(i=o.paymentSessionMetaData)||void 0===i?void 0:i.paymentSessionConfig};if(S.CASHIER_PAYMENT_CARD===e._componentSign&&(a.paymentMethodType="CARD"),S.EASY_PAY_WALLET===e._componentSign){var s,c=a.paymentSessionConfig||{},u=c.productSceneVersion,l=void 0===u?"":u,f=c.productScene,d=void 0===f?"":f,p=((null===(s=e._renderParams)||void 0===s?void 0:s.paymentSessionMetaData)||{}).action,h=(void 0===p?{}:p).autoDebitWithToken,m=void 0!==h&&h;if(d===O.EASY_PAY&&"2.0"===l&&!m)return t({message:"sdk no need to make query request",success:!0})}if(S.AUTO_DEBIT_WALLET===e._componentSign){var v,y,g,E,b=(null===(v=e._renderParams)||void 0===v||null===(y=v.paymentSessionMetaData)||void 0===y?void 0:y.action)||{},w=Fe()?null==b||null===(g=b.web)||void 0===g?void 0:g.signType:null==b||null===(E=b.wap)||void 0===E?void 0:E.signType;if("SMS"===w)return t({message:"sdk no need to make query request",success:!0});if(!w||"REDIRECT"!==w)return t({success:!1})}if(window.location.href.indexOf("LOCAL_MOCK=1")>-1)return t({message:"sdk no need to make query request",success:!0});(function(e,t){return Hn.apply(this,arguments)})(a,{env:e.AMSSDK.options.env.environment,locale:e.AMSSDK.options.locale}).then((function(n){e._performanceData.push({key:"sdk_action_query_end",value:Date.now()}),null!=n&&n.success,t(n)})).catch((function(t){e.dispatchToSDK(z.name,{code:K.CREATECOMPONENT_ERROR.code}),n(t)}))})),this._actionQueryPromise}},{key:"cleanElement",value:function(){try{var e;if("string"===ke(this._selector)){var t=document.querySelector(this._selector);t&&(t.innerHTML="")}var n=document.getElementById(re);n&&(null==n||n.remove()),null===(e=document.getElementById("".concat(re,"-").concat(this.platform,"-animation-style")))||void 0===e||e.remove(),document.getElementsByTagName("body")[0].style.overflow="auto";var r=document.getElementById(ce);null==r||r.remove(),this.removeRetentionPopup(this.platform),this.removeEventListener()}catch(e){console.error(e)}}},{key:"createApp",value:function(e){if(!0==!!window.postMessage){this._performanceData.push({key:"sdk_popup_start",value:Date.now()});try{var t,n,r,o=(null==e||null===(t=e.paymentSessionMetaData)||void 0===t||null===(n=t.paymentSessionConfig)||void 0===n?void 0:n.productSceneVersion)||"",i=(null==e||null===(r=e.paymentSessionMetaData)||void 0===r?void 0:r.extendInfo)||"",a=this.AMSSDK.options.env.environment;this.appDomain=function(e){var t=e.environment,n=e.appVersion,r=e.componentSign,o=e.productSceneVersion,i=e.extendInfo,a=/^https?:\/\/([^/<>\s]+\.?)*/.exec(Zn(t,n,r,o,i));return a&&a[0]||""}({environment:a,appVersion:this._appVersion,componentSign:this._componentSign,productSceneVersion:o,extendInfo:i}),this.app=function(e,t){var n=document.createElement("iframe"),r={dropin:"ams-checkout-dropin-".concat(t),component:"ams-checkout-component-".concat(t)}[e]||"ams-checkout-component";return n.id=r,n.style.height="0",n.style.width="100%",n.style.border="0",n.style.opacity="0",n.style.overflow="hidden",n}(this.AMSSDK.options.mode,this.platform),this.app.src=Qn({componentSign:this._componentSign,analytics:this.AMSSDK.options.analytics,productSceneVersion:o,environment:a,appVersion:this._appVersion,extendInfo:i,locale:this.AMSSDK.options.locale,instanceId:this.AMSSDK._instanceId}),this.addEventListener()}catch(e){this.dispatchToSDK(z.name,Object.assign({},K.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME,{stack:e}))}}else this.dispatchToSDK(z.name,K.SDK_COMPATIBILITY_ISSUES.BROWSER_NOT_SUPPORT_POSTMESSAGE)}},{key:"listener",value:function(e){if(e.origin===this.appDomain)if(function(e){try{JSON.parse(e)}catch(e){return!1}return!0}(e.data)){var t=JSON.parse(e.data);if(t.name!==M.APP_TO_SDK&&t.name!==M.APP_TO_APP||t.instanceId!==this.AMSSDK._instanceId)return;this._handleAppMessage(t)}else console.warn(K.NOT_JSON_FORMAT),this.dispatchToSDK(z.name,K.NOT_JSON_FORMAT)}},{key:"resizeListener",value:function(){document.getElementById(re).style.transition="none",this.dispatchToApp({context:{event:"renderResize",data:{heightOfVisible:window.innerHeight,widthOfVisible:window.innerWidth}}})}},{key:"addEventListener",value:function(){this.removeEventListener(),window["".concat(le,"_").concat(this.AMSSDK._instanceId)]=this.listener.bind(this),window["".concat(le,"_").concat(this.AMSSDK._instanceId,"_resize")]=this.resizeListener.bind(this),window.addEventListener("message",window["".concat(le,"_").concat(this.AMSSDK._instanceId)]),window.addEventListener("resize",window["".concat(le,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"removeEventListener",value:function(){window.removeEventListener("message",window["".concat(le,"_").concat(this.AMSSDK._instanceId)]),window.removeEventListener("resize",window["".concat(le,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"_handleAppMessage",value:function(e){if([W.name,V.name,H.name,q.name,G.name,z.name,J.name,Z.name,$.name,Q.name,X.name,ee.name,te.name,ne.name].includes(e.context.event))if(e.context.event!==ne.name){if(e.context.event===W.name)return this._performanceData.push({key:"sdk_onLaunch",value:Date.now()}),this._loadAppPromiseResolve&&this._loadAppPromiseResolve(!0),void this.sendRenderEvent();if(e.context.event===H.name&&this.handleSizeChanged(e),e.context.event===G.name)return this.closeBtnFunc();if(e.context.event===V.name)return this.handleRedirect(e.context.data);if(e.context.event!==Z.name)if(e.context.event!==Q.name){if(e.context.event!==$.name)return e.context.event===X.name?(!0===e.context.data&&(this._isRetention=!0),void(!1===e.context.data&&(this._isRetention=!1))):void(e.context.event!==ee.name?this.dispatchToSDK(e.context.event,e.context.data,e.context.eventCallbackId):this.handleDeclareInfo(e.context.data));this.handleCloseBtnShow(!0)}else this.handleCloseBtnShow(!1);else this.submitForm(e.context.data)}else{var t;this.dispatchToSDK(J.name,{code:"SDK_END_OF_LOADING",message:(null===(t=e.context.data)||void 0===t?void 0:t.message)||""})}}},{key:"handleSizeChanged",value:function(e){var t;if(!((null===(t=e.context.data)||void 0===t?void 0:t.height)<=1)){var n,r=document.getElementById(re);if(r.style.height="".concat(e.context.data.height,"px"),this._renderDisplayType===A.popup){var o,i=document.getElementById(ce);if(i&&(i.style.background="rgb(0, 0, 0, 0.6)",i.style.display="block"),null===(o=document.getElementById(ue))||void 0===o||o.remove(),"desktop"===this.platform&&(r.classList.add("".concat(re,"-").concat(this.platform,"-animation")),e.context.data.width&&(r.style.width="".concat(e.context.data.width,"px"))),"mobile"===this.platform){r.classList.add("".concat(re,"-").concat(this.platform,"-animation"));var a="".concat(re,"-").concat(this.platform,"-animation-style"),s=document.getElementById(a);s&&(null==s||s.remove());var c="@keyframes ".concat(re,"-slide-in {\n 0% {\n height: 1px;\n }\n 100% {\n height: ").concat(e.context.data.height,"px;\n }\n }\n @keyframes ").concat(re,"-slide-out {\n 0% {\n height: ").concat(e.context.data.height,"px;\n opacity: 1;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n height: 1px;\n opacity: 0;\n }\n }"),u=document.createElement("style");u.id=a,u.type="text/css",u.innerHTML=c,document.getElementsByTagName("head")[0].appendChild(u),setTimeout((function(){r.style.transition="height 0.28s ease-in-out"}),500)}}if(this._renderDisplayType===A.inline)null===(n=document.getElementById(ue))||void 0===n||n.remove();this.app.style.height="".concat(e.context.data.height,"px"),this.app.style.opacity="1"}}},{key:"handleRedirect",value:function(e){var t=this,n="string"==typeof e?{normalUrl:e}:{applinkUrl:(null==e?void 0:e.applinkUrl)||"",schemeUrl:(null==e?void 0:e.schemeUrl)||"",normalUrl:(null==e?void 0:e.normalUrl)||"",target:null==e?void 0:e.target},r=function(e,n){t.dispatchToSDK(J.name,{code:j.SDK_CALL_URL_SUCCESS,message:"Successfully opened the app,".concat(e,": ").concat(n)})},o=function(){t.dispatchToSDK(J.name,{code:j.SDK_CALL_URL_SUCCESS,message:"Failed to open app,applinkUrl: ".concat(null==n?void 0:n.applinkUrl," schemeUrl: ").concat(null==n?void 0:n.schemeUrl," normalUrl: ").concat(null==n?void 0:n.normalUrl)})};if(n.target===U.BLANK)return n.normalUrl?(r("normalUrl",n.normalUrl),void window.open(n.normalUrl)):o();this.cleanContainer(),this.AMSSDK._redirect({applinkUrl:null==n?void 0:n.applinkUrl}).then((function(){r("applinkUrl",null==n?void 0:n.applinkUrl)})).catch((function(){return t.AMSSDK._redirect({schemeUrl:null==n?void 0:n.schemeUrl})})).then((function(){r("schemeUrl",null==n?void 0:n.schemeUrl)})).catch((function(){return t.AMSSDK._redirect({normalUrl:null==n?void 0:n.normalUrl})})).then((function(){r("normalUrl",null==n?void 0:n.normalUrl)})).catch((function(){o()}))}},{key:"handleDeclareInfo",value:function(e){var t=e.closeDialogData;!function(e){var t=e.closeDialogData,n=void 0===t?{}:t;try{if(n){var r,o,i,a=document.getElementById("".concat(se,"-title"));a&&(a.style.fontSize="".concat(null==n||null===(r=n.title)||void 0===r?void 0:r.fontSize,"px"),a.style.color=null==n||null===(o=n.title)||void 0===o?void 0:o.fontColor,a.innerHTML=null==n||null===(i=n.title)||void 0===i?void 0:i.text);var s,c,u,l=document.getElementById("".concat(se,"-sub-title"));l&&(l.style.fontSize="".concat(null==n||null===(s=n.message)||void 0===s?void 0:s.fontSize,"px"),l.style.color=null==n||null===(c=n.message)||void 0===c?void 0:c.fontColor,l.innerHTML=null==n||null===(u=n.message)||void 0===u?void 0:u.text);var f,d,p,h,m,v,y,g=document.getElementById("".concat(se,"-remain"));g&&(g.innerHTML=null==n||null===(f=n.btnOK)||void 0===f?void 0:f.text,g.style.fontSize="".concat(null==n||null===(d=n.btnOK)||void 0===d?void 0:d.fontSize,"px"),g.style.color=null==n||null===(p=n.btnOK)||void 0===p?void 0:p.fontColor,g.style.borderRadius="".concat(null==n||null===(h=n.btnOK)||void 0===h?void 0:h.corner,"px"),"stroke"===(null==n||null===(m=n.btnOK)||void 0===m?void 0:m.type)?g.style.border="1px solid ".concat(null==n||null===(y=n.btnOK)||void 0===y?void 0:y.bg):g.style.backgroundColor=null==n||null===(v=n.btnOK)||void 0===v?void 0:v.bg);var E,b,w,_,R,A,S,O=document.getElementById("".concat(se,"-leave"));O&&(O.innerHTML=null==n||null===(E=n.btnCancel)||void 0===E?void 0:E.text,O.style.fontSize="".concat(null==n||null===(b=n.btnCancel)||void 0===b?void 0:b.fontSize,"px"),O.style.color=null==n||null===(w=n.btnCancel)||void 0===w?void 0:w.fontColor,O.style.borderRadius="".concat(null==n||null===(_=n.btnCancel)||void 0===_?void 0:_.corner,"px"),"stroke"===(null==n||null===(R=n.btnCancel)||void 0===R?void 0:R.type)?O.style.border="1px solid ".concat(null==n||null===(S=n.btnCancel)||void 0===S?void 0:S.bg):O.style.backgroundColor=null==n||null===(A=n.btnCancel)||void 0===A?void 0:A.bg)}}catch(e){console.error(e)}}({closeDialogData:void 0===t?{}:t})}},{key:"handleCloseBtnShow",value:function(e){var t=document.getElementById(ae);e?null==t||t.classList.remove("".concat(ae,"-hidden")):!1===e&&(null==t||t.classList.add("".concat(ae,"-hidden")))}},{key:"dispatchToSDK",value:function(e,t,n){this.AMSSDK._eventCenter.emit(e,t),n&&this.AMSSDK._eventCenter.emit(n,t)}},{key:"dispatchToApp",value:function(e){var t=Object.assign({},e,{name:M.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:F,instanceId:this.AMSSDK._instanceId});if(this.app&&this.app.contentWindow)return this.app.contentWindow.postMessage(JSON.stringify(t),this.appDomain);throw new Error(K.SDK_SUBMIT_ERROR.message)}},{key:"subscribeFromSDK",value:function(){var e={};for(var t in e)e.hasOwnProperty(t)&&this.AMSSDK._eventCenter.on("".concat(F,"-").concat(t),e[t].bind(this))}},{key:"sendRenderEvent",value:(t=me()(pe()().mark((function e(){var t,n,r,o,i;return pe()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this._actionQueryPromise){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._actionQueryPromise;case 5:i=e.sent,this._performanceData.push({key:"sdk_render_component",value:Date.now()}),this.dispatchToApp({context:{event:"renderComponent",data:{queryResult:i,sessionResult:null===(t=this._renderParams)||void 0===t?void 0:t.paymentSessionMetaData,paymentSessionData:null===(n=this._renderParams)||void 0===n?void 0:n.paymentSessionData,heightOfVisible:Math.max(rr,window.innerHeight),renderDisplayType:null===(r=this._renderParams)||void 0===r?void 0:r.renderDisplayType,appearance:null===(o=this._renderParams)||void 0===o?void 0:o.appearance,envInfo:{screenHeight:screen.height,screenWidth:screen.width}}}}),this.dispatchToApp({context:{event:"web-sdk-performance",data:{performanceData:this._performanceData}}}),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(0);case 13:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(){return t.apply(this,arguments)})},{key:"cleanContainer",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._loadAppPromiseResolve&&this._loadAppPromiseResolve(!0),this._performanceData=[],this._isInitComponent=!1,this.app=null,null===(e=document.getElementById(ue))||void 0===e||e.remove(),this.hideComponentAnimation();var r=document.getElementById(ce);null==r||r.classList.add("".concat(ce,"-hidden")),n?this.cleanElement():setTimeout((function(){t.cleanElement()}),300)}},{key:"hideComponentAnimation",value:function(){var e=document.getElementById(re);e&&(e.style.transition="",null==e||e.classList.remove("".concat(re,"-").concat(this.platform)),null==e||e.classList.remove("".concat(re,"-").concat(this.platform,"-animation")),null==e||e.classList.add("".concat(re,"-hidden-").concat(this.platform)))}},{key:"closeBtnFunc",value:function(){this._isRetention?this.showRetentionPopup():(this.cleanContainer(),this.dispatchToSDK(G.name,{}))}},{key:"retentionPopupLeaveFunc",value:function(){this.dispatchToSDK(G.name,{}),this.hideRetentionPopupFunc(),this.cleanContainer()}},{key:"removeRetentionPopup",value:function(e){!function(e,t,n){var r,o=e===N.mobile?"touchend":"click",i=document.getElementById("".concat(se,"-remain"));i&&i.removeEventListener(o,t);var a=document.getElementById("".concat(se,"-leave"));a&&a.removeEventListener(o,n),null===(r=document.getElementById(se))||void 0===r||r.remove()}(e,this.hideRetentionPopupFunc.bind(this),this.retentionPopupLeaveFunc.bind(this))}},{key:"showRetentionPopup",value:function(){var e=document.getElementById(se),t=document.getElementById(re);e&&(null==t||t.classList.add("".concat(re,"-opacity")),e.classList.remove("".concat(se,"-hidden")),e.classList.add("".concat(se,"-show")))}},{key:"hideRetentionPopupFunc",value:function(){var e,t;e=document.getElementById(se),t=document.getElementById(re),e&&(e.classList.remove("".concat(se,"-show")),e.classList.add("".concat(se,"-hidden")),setTimeout((function(){e.classList.remove("".concat(se,"-hidden")),null==t||t.classList.remove("".concat(re,"-opacity"))}),300))}},{key:"submitForm",value:function(e){var t=e.attributes,n=document.body,r=document.createElement("form");r.setAttribute("height","1"),r.setAttribute("width","1"),Object.keys(t.data).forEach((function(e){var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t.data[e]),r.appendChild(n)})),r.setAttribute("action",t.action),r.setAttribute("method","post"),n.appendChild(r),setTimeout((function(){r.submit()}),0)}}]),e}(),ir=function(e,t,n){return new Promise((function(r,o){var i=null;if("string"===ke(t)&&(i=document.querySelector(t)),null===i){var a={code:K.CREATEPAYMENT_PARAMETER_ERROR.code,message:"Failed to execute 'querySelector' on 'Document': ".concat(t," is not a valid selector")};return o(a),void e._dispatchToSDK({name:M.APP_TO_SDK,instanceId:e.AMSSDK._instanceId,context:{event:z.name,data:a}})}n===A.popup&&(i.innerHTML=""),e.app&&i.appendChild(e.app),r()}))},ar=n(746),sr=n.n(ar),cr=window.navigator.userAgent||"",ur=function(){var e=cr.match(/OS (\d+)_(\d+)_?(\d+)?/);return Number.parseInt(e[1],10)},lr=/android/i.test(cr),fr=/iphone|ipad|ipod/i.test(cr),dr=/chrome\/[\d.]+ mobile safari\/[\d.]+/i.test(cr)&&lr&&cr.indexOf("Version")<0,pr=/qqbrowser/i.test(cr),hr=/firefox/i.test(cr);/baidubrowser/i.test(cr);function mr(e,t){return function(e,t){var n=new URL(e);for(var r in t)r&&n.searchParams.set(r,t[r]);return n.toString()}(e,t)}var vr,yr,gr,Er=5e3;function br(e,t){vr=+new Date,yr=setTimeout((function(){!(!!Wn&&document[Wn])&&e&&e()}),t||5e3)}function wr(e){var t=e.evokeAppBy;(null==t?void 0:t.url)&&(!function(e){var t=e.evokeAppBy,n=e.successCb,r=e.timeout;if(n){var o=+new Date,i=r||Er;o-(vr||+new Date)<i&&n(t)}}(e),yr&&clearTimeout(yr))}function _r(e){return/^(http|https|itms-apps|itms-appss|market):\/\//.test(e)}function Rr(e){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(e)}function Ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ar(Object(n),!0).forEach((function(t){Or(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Or(e,t,n){return(t=xr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xr(r.key),r)}}function xr(e){var t=function(e,t){if("object"!==Rr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Rr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Rr(t)?t:String(t)}!function(e){void 0!==e&&(void 0!==e.hidden?(Wn="hidden",Vn="visibilitychange"):void 0!==e.mozHidden?(Wn="mozHidden",Vn="mozvisibilitychange"):void 0!==e.msHidden?(Wn="msHidden",Vn="msvisibilitychange"):void 0!==e.webkitHidden&&(Wn="webkitHidden",Vn="webkitvisibilitychange"))}(document),function(e){e.SCHEME="Scheme",e.LINK="Link",e.INTENT="Intent"}(gr||(gr={}));var Pr=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=void 0,this.timer=void 0,this.options=void 0,this.evokeAppBy=void 0,this.handleDegradationStrategy=function(){var e=n.options,t=e.scheme,r=e.link,o=e.intent,i=e.params;r&&t?(n.options.link=mr(r,i),n.options.scheme=mr(t,i),fr&&ur()>9?n.evokeLink():n.evokeScheme(n.evokeLink.bind(n))):r?(n.options.link=mr(r,i),n.evokeLink()):t?(n.options.scheme=mr(t,i),n.evokeScheme()):o&&o.scheme&&o.package&&n.handleIntent()};this.config=Sr(Sr({},{delay:0}),t),this.options={},this.timer=null,this.evokeAppBy={url:"",type:gr.LINK},this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e;qn||((qn=document.createElement("iframe")).id="callapp_iframe_".concat(Date.now()),qn.style.cssText="display:none;border:0;width:0;height:0;",document.body.appendChild(qn)),e={evokeAppBy:this.evokeAppBy,successCb:this.config.successCb,timeout:this.config.resultJudgmentTime},void 0!==Vn?document.addEventListener(Vn,(function(){return wr(e)})):window.addEventListener("pagehide",(function(){return wr(e)}))}},{key:"open",value:function(e){this.options=e;var t=this.options,n=t.scheme,r=t.intent,o=t.link;if(!n&&!o&&!(null==r?void 0:r.scheme))throw new Error("请至少填一个链接");if(n&&_r(n))throw new Error("请填写正确格式的scheme");if(o&&!_r(o))throw new Error("请填写正确格式的link");if(r&&r.scheme&&_r(r.scheme))throw new Error("请填写正确格式的intent");this.handleDegradationStrategy()}},{key:"evokeLink",value:function(){this.evokeAppBy.type=gr.LINK;var e=this.options,t=e.link,n=e.delay;this.evokeByLocationDelay(t,n)}},{key:"evokeScheme",value:function(e){this.evokeAppBy.type=gr.SCHEME;var t=this.options,n=t.scheme,r=t.delay,o=t.fallback;fr?ur()>9||pr?this.evokeByTagADelay(n,r,o,e):this.evokeByIFrameDelay(n,r,o,e):dr||hr?this.handleOriginalChrome():this.evokeByIFrameDelay(n,r,o,e)}},{key:"handleIntent",value:function(){var e,t=this,n=this.options,r=n.scheme,o=n.intent,i=n.delay,a=n.link,s=n.fallback,c=(null==o?void 0:o.scheme)||r;c&&!_r(c)&&(this.evokeAppBy.type=gr.INTENT,a&&(e=function(){return t.evokeLink()}),this.evokeByLocationDelay(function(e,t,n){var r="";n&&(r="S.browser_fallback_url=".concat(encodeURIComponent(n),";"));var o=e.substring(0,e.indexOf("://")),i=t?"#Intent;scheme=".concat(o,";package=").concat(t,";"):"#Intent;scheme=".concat(o,";"),a=e.replace(/.*?:\/\//,"intent://");return"".concat(a+i+r,"end")}(c,null==o?void 0:o.package,(null==o?void 0:o.fallbackUrl)||""),i,s,e))}},{key:"handleOriginalChrome",value:function(){this.handleIntent()}},{key:"evokeAppDelay",value:function(e,t,n,r,o){var i=this,a=n||this.config.delay,s=r||this.config.fallback;this.timer=setTimeout((function(){i.clearTimer(),e(),i.checkIsOpen(t,s,o)}),a)}},{key:"evokeByLocationDelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){window.location.href=e}(e)}),e,t,n,r)}},{key:"evokeByTagADelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){var t=document.createElement("a");t.setAttribute("href",e),t.style.display="none",document.body.appendChild(t);var n=document.createEvent("HTMLEvents");n.initEvent("click",!1,!1),t.dispatchEvent(n)}(e)}),e,t,n,r)}},{key:"evokeByIFrameDelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){qn.src=e}(e)}),e,t,n,r)}},{key:"checkIsOpen",value:function(e,t,n){return this.evokeAppBy.url=e,br(n||t,this.config.resultJudgmentTime)}},{key:"clearTimer",value:function(){this.timer&&clearTimeout(this.timer)}}])&&Tr(t.prototype,n),r&&Tr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),kr=function(e){var t=function(e){try{return[JSON.parse(atob(e.split("&&")[3])),e.split("&&").slice(0,3).join("&&")]}catch(t){return console.error("Parsing paymentSessionData is abnormal and may affect the payment link. Please ensure to use the new version of SDK."),[{},e]}}(e),n=v()(t,2),r=n[0],o=n[1];return function(e){Fe()&&null!=e&&e.paymentSessionConfig&&e.paymentSessionConfig.productScene===O.EASY_PAY&&(e.paymentSessionConfig.productSceneVersion="1.0")}(r),[r,o]},Cr=function(e){var t=Object.assign({paymentSessionMetaData:{},renderDisplayType:A.popup},e),n=kr(t.paymentSessionData),r=v()(n,2),o=r[0],i=r[1],a=function(e){var t=e.paymentSessionConfig,n=void 0===t?{}:t,r=n.productScene,o=void 0===r?"":r,i=n.paymentMethodCategoryType,a=void 0===i?"":i;return o&&a?"".concat(o,"_").concat(a):S.NONE}(o);return a===S.NONE?Promise.reject({code:K.CREATEPAYMENT_PARAMETER_ERROR.code,message:"Abnormal response data, interface failure, or unsupported payment method"}):(t.paymentSessionData=i,t.paymentSessionMetaData=o,Promise.resolve({iframeNodesParams:t,componentSign:a}))},Ir=function(e){c()(n,e);var t=l()(n);function n(){return a()(this,n),t.apply(this,arguments)}return o()(n)}(function(e){c()(n,e);var t=l()(n);function n(e){var r;a()(this,n),r=t.call(this,e),h()(d()(r),"_componentApp",void 0);var o=new or;return o.setRender(ir),r._registerPlugin(F,o),r._componentApp=r._getPlugin(F),r}return o()(n,[{key:"parameterInitAndCheck",value:function(e){var t=e.params,n=e.selector,r=e.renderDisplayType;this.options.mode=k.component,this.options.networkMode=this.options.networkMode||C.session;var o=Object.assign({selector:n,renderDisplayType:r},t);return o&&!o.paymentSessionData?Promise.reject(K.CREATEPAYMENT_PARAMETER_ERROR):this.options.networkMode===C.proxy?(console.warn(K.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.message),Promise.reject(K.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT)):Promise.resolve(o)}},{key:"pluginAppendIframe",value:function(e){try{return this._componentApp.appendIframeNodes(e.componentSign,e.iframeNodesParams)}catch(e){return Promise.reject(e)}}},{key:"createComponent",value:function(e){var t=this;return this.parameterInitAndCheck({params:e,renderDisplayType:A.popup}).then((function(e){return Cr(e)})).catch((function(e){return t._eventCenter.emit(z.name,e),Promise.reject(e)})).then((function(e){return t.pluginAppendIframe(e)}))}},{key:"mountComponent",value:function(e,t){var n=this;return this.parameterInitAndCheck({params:e,renderDisplayType:A.inline,selector:t}).then((function(e){return Cr(e)})).catch((function(e){return n._eventCenter.emit(z.name,e),Promise.reject(e)})).then((function(e){return n.pluginAppendIframe(e)}))}},{key:"submit",value:function(){var e=this;return new Promise((function(t,n){try{var r=R();e._eventCenter.once(r,(function(e){t(e)})),e._componentApp.dispatchToApp({context:{event:"submitPay",eventCallbackId:r,data:{}}})}catch(e){n(e)}}))}}]),n}(function(){function e(t){a()(this,e),h()(this,"options",void 0),h()(this,"checkoutState",void 0),h()(this,"_eventCenter",void 0),h()(this,"plugins",void 0),h()(this,"_instanceId",void 0),this._instanceId=R(),this.options={},this._eventCenter=new Ce,this._initEvent(t),this._setOptions(t),this.plugins=new Map}return o()(e,[{key:"unmount",value:function(){var e,t=sr()(this.plugins.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;try{n.logoutPlugin()}catch(e){console.error(e)}}}catch(e){t.e(e)}finally{t.f()}}},{key:"_setOptions",value:function(e){this._setMode(e),this._setEnv(e),this.options.locale=(null==e?void 0:e.locale)||""}},{key:"_setEnv",value:function(e){var t=ze()._moreEnv;null!=e&&e.environment&&!((null==e?void 0:e.environment)in I)&&"true"!==t&&(console.warn(K.INIT_PARAMETER_ERROR.ENVIRONMENT_ERROR.message),e.environment="prod"),this.options.env={terminalType:Be?L.WAP:L.WEB,environment:(null==e?void 0:e.environment)||"prod"},this.options.env.terminalType===L.WAP&&(this.options.env.osType=Me?D.IOS:Ue?D.ANDROID:D.ELSE)}},{key:"_setMode",value:function(e){this.options.mode=(null==e?void 0:e.mode)||k.component,null!=e&&e.mode&&!((null==e?void 0:e.mode)in k)&&(console.warn(K.INIT_PARAMETER_ERROR.MODE_ERROR.message),this.options.mode=k.component),this.options.networkMode=(null==e?void 0:e.networkMode)||C.session,null!=e&&e.networkMode&&!((null==e?void 0:e.networkMode)in C)&&(console.warn(K.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.message),this.options.networkMode=C.proxy)}},{key:"_initEvent",value:function(e){if(null!=e&&e.onError){if("function"!==ke(e.onError))throw new Error(K.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(z.name,e.onError,z.uniqueKey)}if(null!=e&&e.onPaymentMethodSelected){if("function"!==ke(e.onPaymentMethodSelected))throw new Error(K.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(Y.name,e.onPaymentMethodSelected,Y.uniqueKey)}if(null!=e&&e.onSizeChanged){if("function"!==ke(e.onSizeChanged))throw new Error(K.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(H.name,e.onSizeChanged,H.uniqueKey)}if(null!=e&&e.onLog){if("function"!==ke(e.onLog))throw new Error(K.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(q.name,e.onLog,q.uniqueKey)}if(null!=e&&e.onEventCallback){if("function"!==ke(e.onEventCallback))throw new Error(K.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(J.name,e.onEventCallback,J.uniqueKey)}if(null!=e&&e.onClose){if("function"!==ke(e.onClose))throw new Error(K.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(G.name,e.onClose,G.uniqueKey)}}},{key:"_registerPlugin",value:function(e,t){this.plugins.set(e,t);try{t.applyPlugin(this)}catch(t){if(this.plugins.delete(e),"error"===ke(t))throw t;throw new Error("Failed to register plug-in:".concat(e," Exception in the apply function of the plug-in"))}}},{key:"_getPlugin",value:function(e){return this.plugins.has(e)?this.plugins.get(e):(console.warn("".concat(e,"Plugin unregistered")),null)}},{key:"_redirect",value:function(e){var t=this;return new Promise((function(n,r){var o=t.options.env.terminalType===L.WEB,i=(null==e?void 0:e.normalUrl)||"",a=(null==e?void 0:e.schemeUrl)||"",s=(null==e?void 0:e.applinkUrl)||"",c=function(){if(i)return n(),void(window.location.href=i);r(K.SDK_CALL_URL_ERROR.REDIRECT_ERROR)};o?c():function(){if(a||s){var e={fallback:function(){c()},successCb:function(){n()},delay:0};try{new Pr(e).open({scheme:a,link:s})}catch(e){c()}}else c()}()}))}},{key:"_overrideSubscription",value:function(e,t,n){this._eventCenter.off(e,t,n),this._eventCenter.on(e,t,n)}}]),e}())),Dr=function(e){c()(n,e);var t=l()(n);function n(e){return a()(this,n),t.call(this,e)}return o()(n)}(Ir),Lr=Ir}(),r}()}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={861:function(e,t){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=c(e),a=i[0],s=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a<s;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var o,i,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},207:function(e,t,n){"use strict";var r=n(861),o=n(90),i=n(736);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n);e=s(e,r);var o=e.write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<s;i++)if(u(e,i)===u(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){for(var f=!0,d=0;d<c;d++)if(u(e,i+d)!==u(t,d)){f=!1;break}if(f)return i}return-1}function E(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return Y(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return Y(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return w(e,t,n,r)}function R(e,t,n,r){return Y(z(t),e,n,r)}function A(e,t,n,r){return Y(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,c,u=e[o],l=null,f=u>239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}t.lW=c,t.h2=50,c.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=h,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?O(this,0,e):m.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.h2;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;f<s;++f)if(u[f]!==l[f]){i=u[f],a=l[f];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return R(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function x(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function k(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=K(e[i]);return o}function C(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function I(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var o=t-e;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=c.isBuffer(e)?e:F(new c(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}},736:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},90:function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+p]=255&a,p+=h,a/=256,u-=8);e[n+p-h]|=128*m}},317:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},180:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},374:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},404:function(e){function t(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,c,"next",e)}function c(e){t(a,o,i,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},486:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},702:function(e,t,n){var r=n(281);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},746:function(e,t,n){var r=n(508);e.exports=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},400:function(e,t,n){var r=n(242),o=n(424),i=n(983);e.exports=function(e){var t=o();return function(){var n,o=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return i(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},143:function(e,t,n){var r=n(281);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},242:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},821:function(e,t,n){var r=n(687);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},424:function(e){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},249:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},20:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},118:function(e,t,n){var r=n(143);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},983:function(e,t,n){var r=n(944).default,o=n(374);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},662:function(e,t,n){var r=n(944).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),s=new x(r||[]);return a(i,"_invoke",{value:A(e,n,s)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h={};function m(){}function v(){}function y(){}var g={};f(g,c,(function(){return this}));var E=Object.getPrototypeOf,b=E&&E(E(P([])));b&&b!==n&&i.call(b,c)&&(g=b);var w=y.prototype=m.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(o,a,s,c){var u=p(e[o],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function A(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=p(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function S(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=p(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:k}}function k(){return{value:void 0,done:!0}}return v.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=f(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,f(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},_(R.prototype),f(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new R(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),f(w,l,"Generator"),f(w,c,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},687:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},925:function(e,t,n){var r=n(180),o=n(249),i=n(508),a=n(20);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},224:function(e,t,n){var r=n(944).default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},281:function(e,t,n){var r=n(944).default,o=n(224);e.exports=function(e){var t=o(e,"string");return"symbol"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},944:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},508:function(e,t,n){var r=n(317);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AMSAutoDebit:function(){return Dr},AMSCheckout:function(){return Ir},checkoutDisplayEnum:function(){return w},componentSignEnum:function(){return y},default:function(){return Lr},environmentEnum:function(){return A},errorEnum:function(){return k},eventCodeEnum:function(){return C},localeEnum:function(){return b},messageName:function(){return x},modeEnum:function(){return _},networkModeEnum:function(){return R},osTypeEnum:function(){return S},paymentMethodCategoryTypeEnum:function(){return E},platformEnum:function(){return T},productSceneEnum:function(){return g},renderDisplayTypeEnum:function(){return v},targetEnum:function(){return P},terminalTypeEnum:function(){return O}});var e=n(702),t=n.n(e),o=n(486),i=n.n(o),a=n(821),s=n.n(a),c=n(400),u=n.n(c),l=n(374),f=n.n(l),d=n(143),p=n.n(d),h=n(925),m=n.n(h),v=function(e){return e.popup="popup",e.inline="inline",e}({}),y=function(e){return e.EASY_PAY_WALLET="EASY_PAY_WALLET",e.CASHIER_PAYMENT_CARD="CASHIER_PAYMENT_CARD",e.CASHIER_PAYMENT_BANK="CASHIER_PAYMENT_BANK",e.AUTO_DEBIT_WALLET="AUTO_DEBIT_WALLET",e.NONE="NONE",e}({}),g=function(e){return e.EASY_PAY="EASY_PAY",e.CASHIER_PAYMENT="CASHIER_PAYMENT",e.AUTO_DEBIT="AUTO_DEBIT",e}({}),E=function(e){return e.CARD="CARD",e.WALLET="WALLET",e.BANK="BANK",e}({}),b=function(e){return e["en-US"]="en-US",e}({}),w=function(e){return e.horizon="horizon",e.vertical="vertical",e}({}),_=function(e){return e.dropin="dropin",e.component="component",e}({}),R=function(e){return e.proxy="proxy",e.session="session",e}({}),A=function(e){return e.sandbox="sandbox",e.prod="prod",e.light_sandbox="light_sandbox",e}({}),S=function(e){return e.IOS="IOS",e.ANDROID="ANDROID",e.ELSE="ELSE",e}({}),O=function(e){return e.WEB="WEB",e.WAP="WAP",e.APP="APP",e.MINI_APP="MINI_APP",e}({}),T=function(e){return e.desktop="desktop",e.mobile="mobile",e}({}),x=function(e){return e.SDK_TO_APP="SDK_TO_APP",e.APP_TO_SDK="APP_TO_SDK",e.APP_TO_APP="APP_TO_APP",e}({}),P=function(e){return e.BLANK="_blank",e.SELF="_self",e}({}),k=function(e){return e.PARAMS="PARAMS",e.TIMEOUT="TIMEOUT",e.NETWORK="NETWORK",e.SYSTEM="SYSTEM",e.LOGIN="LOGIN",e.GATEWAY="GATEWAY",e.VALIDATION="VALIDATION",e.TAOBAOBINDALIPAY="TAOBAOBINDALIPAY",e.REGISTERWALLET="REGISTERWALLET",e.NOALIPAYID="NOALIPAYID",e.TRUSTLOGINERROR="TRUSTLOGINERROR",e.SIGNIN="SIGNIN",e.GETSIGNPARAMSERROR="GETSIGNPARAMSERROR",e}({}),C=function(e){return e.SDK_START_OF_LOADING="SDK_START_OF_LOADING",e.SDK_END_OF_LOADING="SDK_END_OF_LOADING",e.SDK_INTERNAL_ERROR="SDK_INTERNAL_ERROR",e.SDK_CREATEPAYMENT_PARAMETER_ERROR="SDK_CREATEPAYMENT_PARAMETER_ERROR",e.SDK_INIT_PARAMETER_ERROR="SDK_INIT_PARAMETER_ERROR",e.SDK_CREATECOMPONENT_ERROR="SDK_CREATECOMPONENT_ERROR",e.SDK_CALL_URL_ERROR="SDK_CALL_URL_ERROR",e.SDK_CALL_URL_SUCCESS="SDK_CALL_URL_SUCCESS",e}({}),I={DOMAIN_NOT_IN_WHITE_LIST:{code:C.SDK_INTERNAL_ERROR,message:"Origin of the message is not in the white list"},NOT_JSON_FORMAT:{code:C.SDK_INTERNAL_ERROR,message:"The message string should conform to the json format"},SDK_COMPATIBILITY_ISSUES:{code:C.SDK_INTERNAL_ERROR,BROWSER_NOT_SUPPORT_POSTMESSAGE:{code:C.SDK_INTERNAL_ERROR,message:"The browser does not support the postmessage communication mode"},FAILED_TO_CREATE_IFRAME:{code:C.SDK_INTERNAL_ERROR,message:"Failed to create iframe"}},INIT_PARAMETER_ERROR:{code:C.SDK_INIT_PARAMETER_ERROR,UI_MODE_NOT_SUPPORTED:{code:C.SDK_INIT_PARAMETER_ERROR,message:"This UI mode is not supported"},ENVIRONMENT_ERROR:{code:C.SDK_INIT_PARAMETER_ERROR,message:"The current input environment does not support or is not in the standard enumeration"},MODE_ERROR:{code:C.SDK_INIT_PARAMETER_ERROR,message:"mode value not in enum"},LOCALE_ERROR:{code:C.SDK_INIT_PARAMETER_ERROR,message:"The current input language does not support or is not in the standard enumeration"},NET_MODE_NOT_SUPPORT:{code:C.SDK_INIT_PARAMETER_ERROR,message:"The network mode is not supported"},EVENT_ERROR:{code:C.SDK_INIT_PARAMETER_ERROR,message:"Parameter type should be function"}},CREATEPAYMENT_PARAMETER_ERROR:{code:C.SDK_CREATEPAYMENT_PARAMETER_ERROR},CONFIRMPAYMENT_PARAMETER_ERROR:{code:"SDK_CONFIRMPAYMENT_PARAMETER_ERROR"},CREATECOMPONENT_ERROR:{code:C.SDK_CREATECOMPONENT_ERROR,message:"Failed to create component",SINGLETON_COMPONENT_ERROR:{code:C.SDK_CREATECOMPONENT_ERROR,message:"Only one component can be rendered simultaneously"},LOAD_APP_TIMEOUT:{code:C.SDK_CREATECOMPONENT_ERROR,message:"Load resource timeout"}},SDK_CALL_URL_ERROR:{code:C.SDK_CALL_URL_ERROR,REDIRECT_ERROR:{code:C.SDK_CALL_URL_ERROR,message:"Redirect data exception"}},SDK_SUBMIT_ERROR:{code:C.SDK_CALL_URL_ERROR,message:"Component not created or current browser compatibility issue, not supported"}},D="COMPONENT",L={name:"onError",uniqueKey:"userOnError"},N={name:"onPaymentMethodSelected",uniqueKey:"userOnPaymentMethodSelected"},M={name:"onSizeChanged",uniqueKey:"userOnSizeChanged"},U={name:"onLog",uniqueKey:"userOnLog"},B={name:"onLaunch"},j={name:"onRedirect"},K={name:"onClose",uniqueKey:"userOnClose"},F={name:"onEventCallback",uniqueKey:"userEventCallback"},z={name:"submitForm"},Y={name:"hideCloseButton"},H={name:"showCloseButton"},q={name:"setAllowRetention"},W={name:"declareCheckoutInfo"},V={name:"showPopup"},G={name:"dismissLoading"},J="ams-component-container",Z="ams-component-section",Q="ams-checkout-component",$="asm-component-close-block",X="ams-component-retention",ee="ams-component-mockup",te="ams-component-loading",ne="_ams_sdk_component_listener",re="inline-loading",oe=n(662),ie=n.n(oe),ae=n(404),se=n.n(ae),ce=n(118),ue=n.n(ce),le={dev:"http://page.alipay.net/page/antom-web-checkout/src/component-app",sit:"http://page.test.alipay.net/page/antom-web-checkout/src/component-app",pre:"https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app",sandbox:"https://ac.alipay.com/page/antom-web-checkout/src/component-app",light_sandbox:"https://ac.alipay.com/page/antom-web-checkout/src/component-app",prod:"https://ac.alipay.com/page/antom-web-checkout/src/component-app"},fe="1.5.6",de=n(944),pe=n.n(de),he=".".charCodeAt(0),me=/\\(\\)?/g,ve=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),ye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ge=/^\w*$/;function Ee(e){if("string"==typeof e)return e;var t="".concat(e);return"0"===t&&1/e==-Infinity?"-0":t}function be(e,t){return Array.isArray(e)?e:function(e,t){if(Array.isArray(e))return!1;var n=pe()(e);return"number"===n||"boolean"===n||null===e||ge.test(e)||!ye.test(e)||null!==t&&e in Object(t)}(e,t)?[e]:(r=[],(n=e).charCodeAt(0)===he&&r.push(""),n.replace(ve,(function(e,t,n,o){var i=e;return n?i=o.replace(me,"$1"):t&&(i=t.trim()),r.push(i),""})),r);var n,r}function we(e,t,n){var r=null===e?void 0:function(e,t){for(var n=be(t,e),r=0,o=n.length,i=e;null!==i&&r<o;)i=i[Ee(n[r++])];return r&&r===o?i:void 0}(e,t);return void 0===r?n:r}var _e=function(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()},Re=function(){function e(){i()(this,e),p()(this,"events",void 0),p()(this,"eventsKey",void 0),this.events=new Map,this.eventsKey=new Map}return t()(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n){if(this.eventsKey.has("".concat(e,"-").concat(n)))return void console.warn("".concat(n,":Has been registered. Please use another key or do not pass the key"));this.eventsKey.set("".concat(e,"-").concat(n),!0)}var r=this.events.get(e)||[];r.push({func:t,key:n||""}),this.events.set(e,r)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n&&this.eventsKey.has("".concat(e,"-").concat(n))&&this.eventsKey.delete("".concat(e,"-").concat(n)),this.events.has(e)){var r=this.events.get(e);r=r.filter((function(e){return(t!==e.func||e.key!==n)&&(!e.key||e.key!==n)})),this.events.set(e,r)}}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.events.has(e)){var o=this.events.get(e);o.forEach((function(e){e.func.apply(e,n)}))}}},{key:"once",value:function(e,t,n){var r=this;this.on(e,(function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];t.call.apply(t,[r].concat(a)),r.off(e,o,n)}),n)}}]),e}(),Ae=window.navigator,Se=Ae.userAgent,Oe=/iPhone|iPad|iPod/i.test(Se)||"MacIntel"===Ae.platform&&Ae.maxTouchPoints>1,Te=/Android/i.test(Se),xe=(/\bMacintosh\b/.test(Se),/Windows NT/.test(Se),Oe),Pe=Te,ke=!!/Android|iPhone|iPad|iPod|Mobile/.test(Se),Ce=function(e,t){try{return JSON.parse(e)||t}catch(e){return t}},Ie=function(e,t){var n=we(e,"Result-Status")||we(e,"result-status","");if(!n)return null;if(2e3==+n)return{success:!1,traceId:t,errorCode:k.LOGIN,resultStatus:n};if(4001==+n)return{success:!1,traceId:t,errorCode:k.TIMEOUT,resultStatus:n};if(1e3!=+n){var r=we(e,"Tips")||we(e,"tips",""),o=we(e,"Memo")||we(e,"memo","");return{success:!1,traceId:t,errorCode:k.GATEWAY,errorMessage:decodeURIComponent(r||""),result:{resultStatus:n||"",tips:decodeURIComponent(r||""),memo:decodeURIComponent(o||"")},resultStatus:n}}return null},De=function(){var e=Ae.userAgent;return!["Android","iPhone","SymbianOS","Windows Phone","iPod"].some((function(t){return e.includes(t)}))},Le=function(e){var t={};return e||(e=window.location.href),e.replace(/([^?=&#]+)(=([^&#]*))?/g,(function(e,n,r,o){return void 0===o?"":(t[n]=decodeURIComponent(o),t[n])})),t},Ne=function(){var e=document.documentElement.clientWidth,t=De()?130:100*e/390;return Math.min(t,130)},Me=function(e,t){try{(t||document.getElementById("ams-component-container")).style.fontSize="".concat(Ne(),"px"),innerHeight=window.innerHeight}catch(e){}},Ue=Le(),Be=Ue._light_sandbox,je=Ue.groupId,Ke=Ue.requestHost,Fe={local:"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",dev:Ke||"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",sit:Ke||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",pre:"https://imgs-sea-pre.alipay.com/mgw.htm",prod:"https://imgs-sea-global.alipay.com/mgw.htm",sandbox:"https://imgs-sea-global.alipay.com/mgw.htm"},ze="ANTOM_PAYMENT_WEB",Ye=je||"GROUP_20230523202227";function He(e,t){return function(){return e.apply(t,arguments)}}var qe,We=Object.prototype.toString,Ve=Object.getPrototypeOf,Ge=(qe=Object.create(null),function(e){var t=We.call(e);return qe[t]||(qe[t]=t.slice(8,-1).toLowerCase())}),Je=function(e){return e=e.toLowerCase(),function(t){return Ge(t)===e}},Ze=function(e){return function(t){return de(t)===e}},Qe=Array.isArray,$e=Ze("undefined");var Xe=Je("ArrayBuffer");var et=Ze("string"),tt=Ze("function"),nt=Ze("number"),rt=function(e){return null!==e&&"object"===de(e)},ot=function(e){if("object"!==Ge(e))return!1;var t=Ve(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},it=Je("Date"),at=Je("File"),st=Je("Blob"),ct=Je("FileList"),ut=Je("URLSearchParams");function lt(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.allOwnKeys,a=void 0!==i&&i;if(null!=e)if("object"!==de(e)&&(e=[e]),Qe(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{var s,c=a?Object.getOwnPropertyNames(e):Object.keys(e),u=c.length;for(n=0;n<u;n++)s=c[n],t.call(null,e[s],s,e)}}function ft(e,t){t=t.toLowerCase();for(var n,r=Object.keys(e),o=r.length;o-- >0;)if(t===(n=r[o]).toLowerCase())return n;return null}var dt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,pt=function(e){return!$e(e)&&e!==dt};var ht,mt,vt=(ht="undefined"!=typeof Uint8Array&&Ve(Uint8Array),function(e){return ht&&e instanceof ht}),yt=Je("HTMLFormElement"),gt=(mt=Object.prototype.hasOwnProperty,function(e,t){return mt.call(e,t)}),Et=Je("RegExp"),bt=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};lt(n,(function(n,o){var i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},wt="abcdefghijklmnopqrstuvwxyz",_t="0123456789",Rt={DIGIT:_t,ALPHA:wt,ALPHA_DIGIT:wt+wt.toUpperCase()+_t};var At=Je("AsyncFunction"),St={isArray:Qe,isArrayBuffer:Xe,isBuffer:function(e){return null!==e&&!$e(e)&&null!==e.constructor&&!$e(e.constructor)&&tt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||tt(e.append)&&("formdata"===(t=Ge(e))||"object"===t&&tt(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Xe(e.buffer)},isString:et,isNumber:nt,isBoolean:function(e){return!0===e||!1===e},isObject:rt,isPlainObject:ot,isUndefined:$e,isDate:it,isFile:at,isBlob:st,isRegExp:Et,isFunction:tt,isStream:function(e){return rt(e)&&tt(e.pipe)},isURLSearchParams:ut,isTypedArray:vt,isFileList:ct,forEach:lt,merge:function e(){for(var t=pt(this)&&this||{},n=t.caseless,r={},o=function(t,o){var i=n&&ft(r,o)||o;ot(r[i])&&ot(t)?r[i]=e(r[i],t):ot(t)?r[i]=e({},t):Qe(t)?r[i]=t.slice():r[i]=t},i=0,a=arguments.length;i<a;i++)arguments[i]&&lt(arguments[i],o);return r},extend:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.allOwnKeys;return lt(t,(function(t,r){n&&tt(t)?e[r]=He(t,n):e[r]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Ve(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Ge,kindOfTest:Je,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(Qe(e))return e;var t=e.length;if(!nt(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:yt,hasOwnProperty:gt,hasOwnProp:gt,reduceDescriptors:bt,freezeMethods:function(e){bt(e,(function(t,n){if(tt(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];tt(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return Qe(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t},findKey:ft,global:dt,isContextDefined:pt,ALPHABET:Rt,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rt.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&tt(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(rt(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=Qe(n)?[]:{};return lt(n,(function(t,n){var i=e(t,r+1);!$e(i)&&(o[n]=i)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:At,isThenable:function(e){return e&&(rt(e)||tt(e))&&tt(e.then)&&tt(e.catch)}};function Ot(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}St.inherits(Ot,Error,{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:St.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Tt=Ot.prototype,xt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){xt[e]={value:e}})),Object.defineProperties(Ot,xt),Object.defineProperty(Tt,"isAxiosError",{value:!0}),Ot.from=function(e,t,n,r,o,i){var a=Object.create(Tt);return St.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),Ot.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var Pt=Ot,kt=n(207).lW;function Ct(e){return St.isPlainObject(e)||St.isArray(e)}function It(e){return St.endsWith(e,"[]")?e.slice(0,-2):e}function Dt(e,t,n){return e?e.concat(t).map((function(e,t){return e=It(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var Lt=St.toFlatObject(St,{},null,(function(e){return/^is[A-Z]/.test(e)}));var Nt=function(e,t,n){if(!St.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=St.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!St.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&St.isSpecCompliantForm(t);if(!St.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(St.isDate(e))return e.toISOString();if(!s&&St.isBlob(e))throw new Pt("Blob is not supported. Use a Buffer instead.");return St.isArrayBuffer(e)||St.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):kt.from(e):e}function u(e,n,o){var s=e;if(e&&!o&&"object"===de(e))if(St.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(St.isArray(e)&&function(e){return St.isArray(e)&&!e.some(Ct)}(e)||(St.isFileList(e)||St.endsWith(n,"[]"))&&(s=St.toArray(e)))return n=It(n),s.forEach((function(e,r){!St.isUndefined(e)&&null!==e&&t.append(!0===a?Dt([n],r,i):null===a?n:n+"[]",c(e))})),!1;return!!Ct(e)||(t.append(Dt(o,n,i),c(e)),!1)}var l=[],f=Object.assign(Lt,{defaultVisitor:u,convertValue:c,isVisitable:Ct});if(!St.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!St.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),St.forEach(n,(function(n,i){!0===(!(St.isUndefined(n)||null===n)&&o.call(t,n,St.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function Mt(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Ut(e,t){this._pairs=[],e&&Nt(e,this,t)}var Bt=Ut.prototype;Bt.append=function(e,t){this._pairs.push([e,t])},Bt.toString=function(e){var t=e?function(t){return e.call(this,t,Mt)}:Mt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var jt=Ut;function Kt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ft(e,t,n){if(!t)return e;var r,o=n&&n.encode||Kt,i=n&&n.serialize;if(r=i?i(t,n):St.isURLSearchParams(t)?t.toString():new jt(t,n).toString(o)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var zt,Yt=function(){function t(){o(this,t),this.handlers=[]}return e(t,[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){St.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),t}(),Ht={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:jt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:("undefined"==typeof navigator||"ReactNative"!==(zt=navigator.product)&&"NativeScript"!==zt&&"NS"!==zt)&&"undefined"!=typeof window&&"undefined"!=typeof document,isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};var Wt=function(e){function t(e,n,r,o){var i=e[o++],a=Number.isFinite(+i),s=o>=e.length;return i=!i&&St.isArray(r)?r.length:i,s?(St.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&St.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&St.isArray(r[i])&&(r[i]=function(e){var t,n,r={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)r[n=o[t]]=e[n];return r}(r[i])),!a)}if(St.isFormData(e)&&St.isFunction(e.entries)){var n={};return St.forEachEntry(e,(function(e,r){t(function(e){return St.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null};var Vt={transitional:Ht,adapter:qt.isNode?"http":"xhr",transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=St.isObject(e);if(i&&St.isHTMLForm(e)&&(e=new FormData(e)),St.isFormData(e))return o&&o?JSON.stringify(Wt(e)):e;if(St.isArrayBuffer(e)||St.isBuffer(e)||St.isStream(e)||St.isFile(e)||St.isBlob(e))return e;if(St.isArrayBufferView(e))return e.buffer;if(St.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Nt(e,new qt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return qt.isNode&&St.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=St.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Nt(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(St.isString(e))try{return(t||JSON.parse)(e),St.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Vt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&St.isString(e)&&(n&&!this.responseType||r)){var o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Pt.from(e,Pt.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qt.classes.FormData,Blob:qt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};St.forEach(["delete","get","head","post","put","patch"],(function(e){Vt.headers[e]={}}));var Gt=Vt,Jt=St.toObjectSet(["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"]),Zt=Symbol("internals");function Qt(e){return e&&String(e).trim().toLowerCase()}function $t(e){return!1===e||null==e?e:St.isArray(e)?e.map($t):String(e)}function Xt(e,t,n,r,o){return St.isFunction(r)?r.call(this,t,n):(o&&(t=n),St.isString(t)?St.isString(r)?-1!==t.indexOf(r):St.isRegExp(r)?r.test(t):void 0:void 0)}var en=function(t,n){function r(e){o(this,r),e&&this.set(e)}return e(r,[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=Qt(t);if(!o)throw new Error("header name must be a non-empty string");var i=St.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=$t(e))}var i=function(e,t){return St.forEach(e,(function(e,n){return o(e,n,t)}))};return St.isPlainObject(e)||e instanceof this.constructor?i(e,t):St.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i(function(e){var t,n,r,o={};return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||o[t]&&Jt[t]||("set-cookie"===t?o[t]?o[t].push(n):o[t]=[n]:o[t]=o[t]?o[t]+", "+n:n)})),o}(e),t):null!=e&&o(t,e,n),this}},{key:"get",value:function(e,t){if(e=Qt(e)){var n=St.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(St.isFunction(t))return t.call(this,r,n);if(St.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Qt(e)){var n=St.findKey(this,e);return!(!n||void 0===this[n]||t&&!Xt(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=Qt(e)){var o=St.findKey(n,e);!o||t&&!Xt(0,n[o],o,t)||(delete n[o],r=!0)}}return St.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!Xt(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return St.forEach(this,(function(r,o){var i=St.findKey(n,o);if(i)return t[i]=$t(r),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(o):String(o).trim();a!==o&&delete t[o],t[a]=$t(r),n[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return St.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&St.isArray(n)?n.join(", "):n)})),t}},{key:t,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=h(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:n,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[Zt]=this[Zt]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=Qt(e);t[r]||(!function(e,t){var n=St.toCamelCase(" "+t);["get","set","has"].forEach((function(r){Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return St.isArray(e)?e.forEach(r):r(e),this}}]),r}(Symbol.iterator,Symbol.toStringTag);en.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),St.reduceDescriptors(en.prototype,(function(e,t){var n=e.value,r=t[0].toUpperCase()+t.slice(1);return{get:function(){return n},set:function(e){this[r]=e}}})),St.freezeMethods(en);var tn=en;function nn(e,t){var n=this||Gt,r=t||n,o=tn.from(r.headers),i=r.data;return St.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function rn(e){return!(!e||!e.__CANCEL__)}function on(e,t,n){Pt.call(this,null==e?"canceled":e,Pt.ERR_CANCELED,t,n),this.name="CanceledError"}St.inherits(on,Pt,{__CANCEL__:!0});var an=on;var sn=qt.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),St.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),St.isString(r)&&a.push("path="+r),St.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function cn(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var un=qt.isStandardBrowserEnv?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(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 e=r(window.location.href),function(t){var n=St.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};var ln=function(e,t){e=e||10;var n,r=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(s){var c=Date.now(),u=o[a];n||(n=c),r[i]=s,o[i]=c;for(var l=a,f=0;l!==i;)f+=r[l++],l%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(c-n<t)){var d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}};function fn(e,t){var n=0,r=ln(50,250);return function(o){var i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,c=r(s);n=i;var u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}var dn="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,o=e.data,i=tn.from(e.headers).normalize(),a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}St.isFormData(o)&&(qt.isStandardBrowserEnv||qt.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(u+":"+l))}var f=cn(e.baseURL,e.url);function d(){if(c){var r=tn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Pt("Request failed with status code "+n.status,[Pt.ERR_BAD_REQUEST,Pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}}if(c.open(e.method.toUpperCase(),Ft(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(n(new Pt("Request aborted",Pt.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new Pt("Network Error",Pt.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||Ht;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Pt(t,r.clarifyTimeoutError?Pt.ETIMEDOUT:Pt.ECONNABORTED,e,c)),c=null},qt.isStandardBrowserEnv){var p=(e.withCredentials||un(f))&&e.xsrfCookieName&&sn.read(e.xsrfCookieName);p&&i.set(e.xsrfHeaderName,p)}void 0===o&&i.setContentType(null),"setRequestHeader"in c&&St.forEach(i.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),St.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",fn(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",fn(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){c&&(n(!t||t.type?new an(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));var h,m=(h=/^([-+\w]{1,25})(:?\/\/|:)/.exec(f))&&h[1]||"";m&&-1===qt.protocols.indexOf(m)?n(new Pt("Unsupported protocol "+m+":",Pt.ERR_BAD_REQUEST,e)):c.send(o||null)}))},pn={http:null,xhr:dn};St.forEach(pn,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var hn=function(e){for(var t,n,r=(e=St.isArray(e)?e:[e]).length,o=0;o<r&&(t=e[o],!(n=St.isString(t)?pn[t.toLowerCase()]:t));o++);if(!n){if(!1===n)throw new Pt("Adapter ".concat(t," is not supported by the environment"),"ERR_NOT_SUPPORT");throw new Error(St.hasOwnProp(pn,t)?"Adapter '".concat(t,"' is not available in the build"):"Unknown adapter '".concat(t,"'"))}if(!St.isFunction(n))throw new TypeError("adapter is not a function");return n};function mn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new an(null,e)}function vn(e){return mn(e),e.headers=tn.from(e.headers),e.data=nn.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),hn(e.adapter||Gt.adapter)(e).then((function(t){return mn(e),t.data=nn.call(e,e.transformResponse,t),t.headers=tn.from(t.headers),t}),(function(t){return rn(t)||(mn(e),t&&t.response&&(t.response.data=nn.call(e,e.transformResponse,t.response),t.response.headers=tn.from(t.response.headers))),Promise.reject(t)}))}var yn=function(e){return e instanceof tn?e.toJSON():e};function gn(e,t){t=t||{};var n={};function r(e,t,n){return St.isPlainObject(e)&&St.isPlainObject(t)?St.merge.call({caseless:n},e,t):St.isPlainObject(t)?St.merge({},t):St.isArray(t)?t.slice():t}function o(e,t,n){return St.isUndefined(t)?St.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!St.isUndefined(t))return r(void 0,t)}function a(e,t){return St.isUndefined(t)?St.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}var c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return o(yn(e),yn(t),!0)}};return St.forEach(Object.keys(Object.assign({},e,t)),(function(r){var i=c[r]||o,a=i(e[r],t[r],r);St.isUndefined(a)&&i!==s||(n[r]=a)})),n}var En="1.5.0",bn={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){bn[e]=function(n){return de(n)===e||"a"+(t<1?"n ":" ")+e}}));var wn={};bn.transitional=function(e,t,n){function r(e,t){return"[Axios v1.5.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new Pt(r(o," has been removed"+(t?" in "+t:"")),Pt.ERR_DEPRECATED);return t&&!wn[o]&&(wn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var _n={assertOptions:function(e,t,n){if("object"!==de(e))throw new Pt("options must be an object",Pt.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new Pt("option "+i+" must be "+c,Pt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Pt("Unknown option "+i,Pt.ERR_BAD_OPTION)}},validators:bn},Rn=_n.validators,An=function(){function t(e){o(this,t),this.defaults=e,this.interceptors={request:new Yt,response:new Yt}}return e(t,[{key:"request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n=t=gn(this.defaults,t),r=n.transitional,o=n.paramsSerializer,i=n.headers;void 0!==r&&_n.assertOptions(r,{silentJSONParsing:Rn.transitional(Rn.boolean),forcedJSONParsing:Rn.transitional(Rn.boolean),clarifyTimeoutError:Rn.transitional(Rn.boolean)},!1),null!=o&&(St.isFunction(o)?t.paramsSerializer={serialize:o}:_n.assertOptions(o,{encode:Rn.function,serialize:Rn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&St.merge(i.common,i[t.method]);i&&St.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]})),t.headers=tn.concat(a,i);var s=[],c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var u,l=[];this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));var f,d=0;if(!c){var p=[vn.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,l),f=p.length,u=Promise.resolve(t);d<f;)u=u.then(p[d++],p[d++]);return u}f=s.length;var h=t;for(d=0;d<f;){var m=s[d++],v=s[d++];try{h=m(h)}catch(e){v.call(this,e);break}}try{u=vn.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,f=l.length;d<f;)u=u.then(l[d++],l[d++]);return u}},{key:"getUri",value:function(e){return Ft(cn((e=gn(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),t}();St.forEach(["delete","get","head","options"],(function(e){An.prototype[e]=function(t,n){return this.request(gn(n||{},{method:e,url:t,data:(n||{}).data}))}})),St.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(gn(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}An.prototype[e]=t(),An.prototype[e+"Form"]=t(!0)}));var Sn=An,On=function(){function t(e){if(o(this,t),"function"!=typeof e)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,t,o){r.reason||(r.reason=new an(e,t,o),n(r.reason))}))}return e(t,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],[{key:"source",value:function(){var e;return{token:new t((function(t){e=t})),cancel:e}}}]),t}(),Tn=On;var xn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xn).forEach((function(e){var t=h(e,2),n=t[0],r=t[1];xn[r]=n}));var Pn=xn;var kn=function e(t){var n=new Sn(t),r=He(Sn.prototype.request,n);return St.extend(r,Sn.prototype,n,{allOwnKeys:!0}),St.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(gn(t,n))},r}(Gt);kn.Axios=Sn,kn.CanceledError=an,kn.CancelToken=Tn,kn.isCancel=rn,kn.VERSION=En,kn.toFormData=Nt,kn.AxiosError=Pt,kn.Cancel=kn.CanceledError,kn.all=function(e){return Promise.all(e)},kn.spread=function(e){return function(t){return e.apply(null,t)}},kn.isAxiosError=function(e){return St.isObject(e)&&!0===e.isAxiosError},kn.mergeConfig=gn,kn.AxiosHeaders=tn,kn.formToJSON=function(e){return Wt(St.isHTMLForm(e)?new FormData(e):e)},kn.getAdapter=hn,kn.HttpStatusCode=Pn,kn.default=kn;var Cn=kn,In=Le()._sandbox;function Dn(e){var t,n,r,o=new Date,i=o.getTime()+60*o.getTimezoneOffset()*1e3,a=e.env||"prod",s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n={pre:"https://imgs-sea-pre.alipay.com/mgw.htm",sit:Ke||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",dev:Ke||"http://imgs-13.sggz00b.stable.alipay.net/mgw.htm"},r={"com.ipay.iexpcashier.sdkAction.query":"com.ipay.iopensandbox.sdk.paymentSession.query"},o="SDK_MOCK_SANDBOX",i=je||"GROUP_20230315210531";return r[e]&&"light_sandbox"===t||"true"===Be?{appId:o,sofaId:i,baseURL:n[t],"Operation-Type":r[e]}:{appId:"",sofaId:"",baseURL:"","Operation-Type":""}}(e["Operation-Type"],a),c=e.baseURL||s.baseURL||function(e,t){return"prod"===t||"sandbox"===t||"light_sandbox"===t?{SG:"https://imgs-sea-global.alipay.com/mgw.htm",US:"https://imgs-na-global.alipay.com/mgw.htm",DE:"https://imgs-de-global.alipay.com/mgw.htm"}[e||"SG"]:"pre"===t?{SG:"https://imgs-sea-pre.alipay.com/mgw.htm",US:"https://imgs-pre.alipay.com/mgw.htm",DE:"https://imgs-de-pre.alipay.com/mgw.htm"}[e||"SG"]:""}(null==e?void 0:e.hostSign,a)||Fe[a],u=ue()((t={appId:s.appId||ze,workspaceId:"pre"===e.env?"pre":"default"},p()(t,"x-cors-".concat(ze.toLowerCase(),"-default"),"1"),p()(t,"version","2.0"),p()(t,"sofa-group-name",s.sofaId||Ye),p()(t,"Operation-Type",s["Operation-Type"]||e["Operation-Type"]||""),p()(t,"Client-Time",i),p()(t,"tntInstId","ALIPW3SG"),p()(t,"sdk-version",fe||""),t),e.headers);return"true"!==In&&"sandbox"!==a||(u["load-test"]=!0,u.sofaPenAttrs="instMock=O&loadMode=2"),"dev"!==a&&delete u["sofa-group-name"],Cn.create({baseURL:c,timeout:null!==(n=e.timeout)&&void 0!==n?n:15e3,headers:u,withCredentials:null===(r=e.withCredentials)||void 0===r||r,method:"POST"}).request}function Ln(e,t){return Nn.apply(this,arguments)}function Nn(){return(Nn=se()(ie()().mark((function e(t,n){var r,o,i,a,s,c,u,l,f,d,p,h,m,v;return ie()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Dn(n),Date.now(),o={terminalType:De()?"WEB":"WAP",browserInfo:{browserJavaScriptEnabled:!0,browserLanguage:navigator.language,browserUserAgent:navigator.userAgent,browserColorDepth:screen.colorDepth},locale:n.locale||"en_US",deviceLanguage:navigator.language,screenWidth:screen.width,screenHeight:screen.height,timeZoneOffset:(new Date).getTimezoneOffset()};try{o.browserInfo.browserJavaEnabled=(null===(i=navigator)||void 0===i?void 0:i.javaEnabled())||!1}catch(e){}return"WAP"===o.terminalType&&(o.osType=xe?"IOS":"ANDROID"),a=n.needEnvInfo?[ue()(ue()({},t),{},{envInfo:o,extParams:{refUrl:window.location.href}})]:[t],e.prev=6,e.next=9,r({data:a});case 9:if(s=e.sent,c=s.data,u=s.headers,l=c||{},f=we(u,"Mgw-TraceId")||we(u,"mgw-traceid",""),l.traceId=f||"",null==(d=Ie(u,f))||!d.errorCode){e.next=18;break}throw new Error(JSON.stringify({errorMessage:(null==l?void 0:l.errorMessage)||(null==d?void 0:d.errorMessage),errorCode:null==d?void 0:d.errorCode,success:!1}));case 18:return e.abrupt("return",l);case 21:return e.prev=21,e.t0=e.catch(6),console.log("request error",null===e.t0||void 0===e.t0?void 0:e.t0.message),h=Ce(null===e.t0||void 0===e.t0?void 0:e.t0.message,{success:!1,errorCode:k.SYSTEM,errorMessage:""}),m=null!==e.t0&&void 0!==e.t0&&null!==(p=e.t0.message)&&void 0!==p&&p.includes("timeout")?k.TIMEOUT:"",v=(null==h?void 0:h.errorCode)||m,e.abrupt("return",Promise.reject({success:!1,errorCode:v,errorMessage:""}));case 28:case"end":return e.stop()}}),e,null,[[6,21]])})))).apply(this,arguments)}function Mn(){return(Mn=se()(ie()().mark((function e(t,n){var r;return ie()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=((null==t?void 0:t.paymentSessionData)||"").split("&&")[1]||"",e.abrupt("return",Ln(t,ue()(ue()({},n),{},{hostSign:r,needEnvInfo:!0,"Operation-Type":"com.ipay.iexpcashier.sdkAction.query"})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Un,Bn=function(e){try{return JSON.parse(e).versionMap.web[fe].targetWebVerison}catch(e){return""}},jn=function(e,t){var n,r=(n={},p()(n,y.NONE,[""]),p()(n,y.AUTO_DEBIT_WALLET,["1.0"]),p()(n,y.CASHIER_PAYMENT_BANK,["1.0"]),p()(n,y.CASHIER_PAYMENT_CARD,["1.0"]),p()(n,y.EASY_PAY_WALLET,["1.0","2.0"]),n)[e],o=r.find((function(e){return e===t})),i=r[r.length-1];return o?t:i},Kn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"prod",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=Le()||{},a=i.host,s=Bn(o)||t,c=jn(n,r);return a&&!["sandbox","light_sandbox","prod"].includes(e)?a:"".concat(le[e],"/").concat(n,"/").concat(c,"/index.").concat(s,".html")},Fn=function(e){var t=e.componentSign,n=e.analytics,r=void 0===n?{enabled:!0}:n,o=e.productSceneVersion,i=e.environment,a=e.appVersion,s=e.extendInfo,c=e.locale,u=e.instanceId,l=Kn(i,a,t,o,s||""),f=function(e){var t=document.getElementsByTagName("meta").viewPort,n={};if(t)for(var r=t.content.split(","),o=0;o<r.length;o++){var i=r[o].split("=");n[i[0]]=i[1]}return n[e]}("initial-scale")||1,d=Le(),p=d._sandbox,h=d._light_sandbox,m=d.requestHost,v=void 0===m?"":m,y=d.groupId,g=void 0===y?"":y,E=d.LOCAL_MOCK,b=Object.assign({},{locale:c,scale:f,instanceId:u,analyticsEnabled:!1===(null==r?void 0:r.enabled)?"false":"true",sdkVersion:fe,refUrl:window.location.href});E&&(b.LOCAL_MOCK=E),v&&(b.requestHost=v),g&&(b.groupId=g),"light_sandbox"!==i&&"true"!==h||(b.sandbox="true"),"sandbox"!==i&&"true"!==p||(b.shadow="true");var w=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=encodeURIComponent(n),o=encodeURIComponent(null===e[n]?"":e[n]);t.push("".concat(r,"=").concat(o))}return t.join("&")}(b);return"".concat(l,"?").concat(w)},zn="#".concat(Q,"-desktop{\n border-radius: 8px;\n position: absolute;\n top: 0;\n left: 0;\n}\n#").concat(Q,"-mobile{\n position: absolute;\n top: 0;\n left: 0;\n}\n.").concat(J,"-inline{\n width: 100%;\n height: auto;\n position: relative;\n line-height: 0;\n display: flex;\n}\n#").concat(te,"{\n width: 100%;\n flex: 1;\n}\n.").concat(re,"{\n width: 100%;\n height: auto;\n object-fit: contain;\n box-sizing: border-box;\n}\n.").concat(re,"-mobile{\n padding: 0 0.16em;\n}\n.").concat(re,"-desktop{}\n"),Yn=function(e){var t;if(document.getElementById("ams-inline-component-style")||((t=document.createElement("style")).id="ams-inline-component-style",t.type="text/css",t.innerHTML=zn,document.head.appendChild(t)),!document.getElementById(J)){var n=document.createElement("div");n.className="".concat(J,"-inline"),n.id=J;var r=document.querySelector(e);return r&&r.appendChild(n),n}},Hn=".ams-component-container-mobile {\n width: 100%;\n height: 1px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n}\n.ams-component-container-mobile-animation{\n animation: ams-component-container-slide-in 0.3s ease-in-out;\n}\n\n.ams-component-section-desktop {\n font-size: 0;\n}\n\n.ams-component-container-hidden-mobile {\n width: 100%;\n height: 0px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n background-color: transparent;\n border-radius: 12px 12px 0 0;\n animation: ams-component-container-slide-out 0.26s ease-in forwards;\n overflow: hidden;\n}\n\n.ams-component-section-mobile {\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n font-size: 0;\n}\n\n.ams-component-container-desktop {\n display: block;\n width: 672px;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n transform-origin: 50% 50%;\n}\n.ams-component-container-desktop-animation{\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n@keyframes ams-component-container-zoom-out {\n 0% {\n transform: translate(-50%, -50%) scale(1);\n -webkit-transform: translate(-50%, -50%) scale(1);\n opacity: 1\n }\n \n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.4);\n -webkit-transform: translate(-50%, -50%) scale(0.4);\n }\n}\n\n@keyframes ams-component-container-zoom-in {\n 0% {\n transform: translate(-50%, -50%) scale(0.4);\n opacity: 0\n }\n\n 80% {\n opacity: 1\n }\n\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n\n.ams-component-container-hidden-desktop {\n display: block;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n animation-fill-mode: forwards;\n transform-origin: 50% 50%;\n}\n\n.ams-component-loading {\n width: 0.8em;\n height:0.8em;\n background: rgba(0, 0, 0, 0.5);\n border-radius: 8px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.ams-component-loading .line {\n width: 40px;\n height: 40px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ams-component-loading .line div {\n position: absolute;\n left: 17.67px;\n top: 0;\n width: 5.33px;\n height: 40px;\n}\n\n.ams-component-loading .line div:before,\n.ams-component-loading .line div:after {\n content: '';\n display: block;\n height: 13.33px;\n background: #fcfcfc;\n border-radius: 5.3px;\n}\n.ams-component-loading .line div:after {\n margin-top: 13.33px;\n}\n\n.ams-component-loading .line div:nth-child(2) {\n -webkit-transform: rotate(45deg);\n}\n\n.ams-component-loading .line div:nth-child(3) {\n -webkit-transform: rotate(90deg);\n}\n\n.ams-component-loading .line div:nth-child(4) {\n -webkit-transform: rotate(135deg);\n}\n\n/** 加载动画 **/\n@-webkit-keyframes load {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.ams-component-loading .line div:nth-child(1):before {\n -webkit-animation: load 1s linear 0s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):before {\n -webkit-animation: load 1s linear 0.125s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):before {\n -webkit-animation: load 1s linear 0.25s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):before {\n -webkit-animation: load 1s linear 0.375s infinite;\n}\n\n.ams-component-loading .line div:nth-child(1):after {\n -webkit-animation: load 1s linear 0.5s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):after {\n -webkit-animation: load 1s linear 0.675s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):after {\n -webkit-animation: load 1s linear 0.75s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):after {\n -webkit-animation: load 1s linear 0.875s infinite;\n}\n\n.ams-component-loading-logo {\n width: 0.44em;\n height: 0.44em;\n -webkit-transform:rotate(360deg);\n transform:rotate(360deg);\n -webkit-transition:-webkit-transform 1s linear;\n transition:transform 1s linear;\n animation: ams-component-loading-logo 1s linear infinite;\n}\n\n.asm-component-close-block-desktop {\n position: absolute;\n width: 40px;\n height: 40px;\n right: 0;\n top: 0;\n cursor: pointer;\n}\n.asm-component-close-block-btn-desktop {\n width: 11px;\n height: 11px;\n object-fit: fill;\n position: absolute;\n right: 18.7px;\n top: 26.7px;\n}\n.asm-component-close-block-hidden {\n width: 0px !important;\n height: 0px !important;\n visibility: hidden;\n}\n.asm-component-close-block-mobile {\n position: absolute;\n width: 0.4em;\n height: 0.4em;\n right: 0;\n top: 0;\n cursor: pointer;\n z-index: 1009;\n}\n\n.asm-component-close-block-btn-mobile {\n width: 0.11em;\n height: 0.11em;\n object-fit: fill;\n position: absolute;\n right: 0.147em;\n top: 0.167em;\n}\n\n\n.ams-component-container-opacity{\n opacity: 1;\n}\n\n.ams-component-container-opacity:after{\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: block;\n content: \"\";\n z-index: 1010;\n background-color: rgba(0, 0, 0, 0.35);\n}\n\n#ams-component-retention {\n position: fixed;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: 50%;\n height: auto;\n display: none;\n z-index: 1009;\n}\n\n.ams-component-retention-show {\n display: flex !important;\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-hidden {\n display: flex !important;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n -webkit-animation: ams-component-container-zoom-out 0.3s ease-in-out;\n animation-fill-mode: forwards;\n -webkit-animation-fill-mode: forwards;\n}\n\n.ams-component-retention-mobile {\n width: 294px;\n border-radius: 12px;\n padding: 24px 0;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-desktop {\n width: 544px;\n border-radius: 12px;\n padding: 32px;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n@media screen and (max-width: 300px) {\n .ams-component-retention-mobile {\n transform: translate(-50%, -50%) scale(0.8);\n }\n}\n\n.ams-component-retention-title-mobile {\n width: 100%;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-title-desktop {\n text-align: left;\n width: 100%;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n}\n\n.ams-component-retention-sub-title-mobile {\n width: 100%;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 8px;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-sub-title-desktop {\n text-align: left;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 10px;\n}\n\n.ams-component-retention-btn-block-mobile {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n margin-top: 24px;\n padding: 0 24px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-btn-block-desktop {\n width: 100%;\n margin-top: 24px;\n}\n\n#ams-component-retention-remain {\n background: #0079FF;\n border-radius: 100px;\n font-style: normal;\n font-weight: 500;\n text-align: center;\n box-sizing: border-box;\n color: #FFFFFF;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.ams-component-retention-remain-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n padding: 0 6px;\n}\n\n.ams-component-retention-remain-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n display: inline-block;\n padding: 0 24px;\n float: right;\n cursor: pointer;\n padding: 0 8px;\n max-width: 225px;\n}\n\n#ams-component-retention-leave {\n border-radius: 100px;\n border: 1px solid #0079FF;\n font-style: normal;\n font-weight: 500;\n text-align: center;\n box-sizing: border-box;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.ams-component-retention-leave-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n margin-top: 12px;\n padding: 0 6px;\n}\n\n.ams-component-retention-leave-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n display: inline-block;\n padding: 0 24px;\n float: right;\n margin-right: 16px;\n cursor: pointer;\n padding: 0 8px;\n max-width: 225px;\n}\n.".concat(ee,"-hidden{\nanimation: ").concat(ee,"-opacity 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n/** 加载动画 **/\n@-webkit-keyframes ").concat(ee,"-opacity {\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n}\n"),qn=function(e,t){if(!document.getElementById(J)){var n;(n=document.createElement("style")).type="text/css",n.innerHTML=Hn,document.head.appendChild(n),window.removeEventListener("resize",Me),window.removeEventListener("pageShow",Me),window.removeEventListener("DOMContentLoaded",Me),window.addEventListener("resize",Me),window.addEventListener("pageShow",Me),window.addEventListener("DOMContentLoaded",Me);var r=document.createElement("div");r.className="".concat(J,"-hidden-").concat(e),r.id=J,Me(0,r),document.body.appendChild(r);var o=document.createElement("div");return o.className="ams-component-section-".concat(e),o.id=Z,r.appendChild(o),r.classList.remove("".concat(J,"-hidden-").concat(e)),r.classList.add("".concat(J,"-").concat(e)),Wn(e,t),r}},Wn=function(e,t){var n=e===T.mobile?"touchend":"click",r=document.getElementById(J),o="<img class='".concat($,"-btn-").concat(e,"' src=\"").concat("https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg",'"/>'),i=document.createElement("div");i.classList.add("".concat($,"-").concat(e),"".concat($,"-hidden")),i.id=$,i.innerHTML=o,i.addEventListener(n,(function(){t()})),r&&r.appendChild(i)},Vn=window.innerHeight,Gn=function(){function e(){i()(this,e),p()(this,"app",void 0),p()(this,"AMSSDK",void 0),p()(this,"platform",void 0),p()(this,"_performanceData",[]),p()(this,"_loadAppPromiseResolve",null),p()(this,"_isInitComponent",void 0),p()(this,"appDomain",void 0),p()(this,"createIframeNode",void 0),p()(this,"_selector",void 0),p()(this,"_appVersion",void 0),p()(this,"_isRetention",void 0),p()(this,"_actionQueryPromise",null),p()(this,"_renderParams",null),p()(this,"_componentSign",y.NONE),p()(this,"_clickEventName",void 0),p()(this,"_renderDisplayType",v.popup),this._appVersion="1.5.6",this._isInitComponent=!1,this._selector="#".concat(Z),this.createIframeNode=function(){return Promise.resolve()},this.platform=De()?T.desktop:T.mobile,this._clickEventName=this.platform===T.mobile?"touchend":"click",this._isRetention=!0,this._performanceData.push({key:"sdk_init",value:Date.now()})}var n;return t()(e,[{key:"logoutPlugin",value:function(){this.cleanContainer(!0)}},{key:"applyPlugin",value:function(e){this.AMSSDK=e,this.subscribeFromSDK()}},{key:"setRender",value:function(e){this.createIframeNode=e}},{key:"appendIframeNodes",value:function(e,t){var n=this;if(this._isInitComponent)return this.dispatchToSDK(L.name,I.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR),Promise.reject(I.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR);this._isInitComponent=!0,this._renderParams=t,this._componentSign=e,null!=t&&t.selector&&(this._selector=t.selector),this._renderDisplayType=t.renderDisplayType;var r=this._renderDisplayType===v.inline?"#".concat(J):this._selector;if(this._performanceData.push({key:"sdk_create_component",value:Date.now()}),this.dispatchToSDK(F.name,{code:C.SDK_START_OF_LOADING}),this._renderDisplayType===v.inline){var o=Yn(this._selector);o&&this.renderInlineLoading(t,o)}return this._renderDisplayType===v.popup&&(qn(this.platform,this.closeBtnFunc.bind(this)),function(e,t,n){var r=e===T.mobile?"touchend":"click",o=document.createElement("div");o.id=X,o.classList.add("".concat(X,"-").concat(e)),o.innerHTML='\n <span id="'.concat(X,'-title" class="').concat(X,"-title-").concat(e,'">\n Are you sure you want to leave?\n </span>\n <span\n id="').concat(X,'-sub-title"\n class="').concat(X,"-sub-title-").concat(e,'"\n >\n If you leave this page, you\'ll have to start over again.\n </span>\n <div class="').concat(X,"-btn-block-").concat(e,'">\n <div id="').concat(X,'-remain" class="').concat(X,"-remain-").concat(e,'">\n Continue Payment\n </div>\n <div id="').concat(X,'-leave" class="').concat(X,"-leave-").concat(e,'">\n Leave\n </div>\n </div>'),document.body.appendChild(o);var i=document.getElementById("".concat(X,"-remain"));i&&i.addEventListener(r,t);var a=document.getElementById("".concat(X,"-leave"));a&&a.addEventListener(r,n)}(this.platform,this.hideRetentionPopupFunc.bind(this),this.retentionPopupLeaveFunc.bind(this)),function(){var e=document.getElementsByTagName("body")[0];e.style.overflow="hidden";var t=document.createElement("div");t.style.width="100vw",t.style.height="100vh",t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.zIndex="1000",t.style.background="rgba(0,0,0,0.5)",t.style.display="none",t.id=ee,e.appendChild(t)}(),this.renderPopupLoading(t)),this.createApp(t),Promise.all([this.createActionQueryPromise(),this.createIframeNode(this,r,this._renderDisplayType),this._createLoadAppPromise()]).then((function(){return Promise.resolve()})).catch((function(e){return n._isInitComponent=!1,n.cleanContainer(),Promise.reject(e)}))}},{key:"renderInlineLoading",value:function(e,t){var n,r=null==e||null===(n=e.appearance)||void 0===n?void 0:n.showLoading;(r="boolean"!=typeof r||r)&&function(e,t){var n=document.createElement("div");n.id=te,t===T.desktop&&(n.innerHTML='<svg class="'.concat(re," ").concat(re,"-").concat(t,'" width="740" height="360" viewBox="0 0 740 360" fill="none" xmlns="">\n <rect width="740" height="360" rx="12" fill="#F6F6F6"/>\n <rect opacity="0.7" x="44" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="94" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="144" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M136 100H48C43.5817 100 40 103.582 40 108C40 112.418 43.5817 116 48 116H136C140.418 116 144 112.418 144 108C144 103.582 140.418 100 136 100Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M682 126H58C48.0589 126 40 134.059 40 144C40 153.941 48.0589 162 58 162H682C691.941 162 700 153.941 700 144C700 134.059 691.941 126 682 126Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M682 182H58C48.0589 182 40 190.059 40 200C40 209.941 48.0589 218 58 218H682C691.941 218 700 209.941 700 200C700 190.059 691.941 182 682 182Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M504 274H64C52.9543 274 44 282.954 44 294C44 305.046 52.9543 314 64 314H504C515.046 314 524 305.046 524 294C524 282.954 515.046 274 504 274Z" fill="#E1E6ED"/>\n </g>\n </svg>')),t===T.mobile&&(n.innerHTML='<svg class="'.concat(re," ").concat(re,"-").concat(t,'" width="358" height="186" viewBox="0 0 358 186" fill="none" xmlns="">\n <g clip-path="url(#clip0_2543_91192)">\n <rect width="358" height="186" fill="white"/>\n <g clip-path="url(#clip1_2543_91192)">\n <rect width="358" height="186" fill="white"/>\n <rect width="358" height="40" fill="white"/>\n <rect opacity="0.7" x="4" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="54" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="104" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <g clip-path="url(#clip2_2543_91192)">\n <rect width="358" height="120" transform="translate(0 66)" fill="white"/>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M95 66H9C4.02944 66 0 70.0294 0 75C0 79.9706 4.02943 84 9 84H95C99.9706 84 104 79.9706 104 75C104 70.0294 99.9706 66 95 66Z" fill="#E1E6ED"/>\n </g>\n <g clip-path="url(#clip3_2543_91192)">\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M340 94H18C8.05888 94 0 102.059 0 112C0 121.941 8.05887 130 18 130H340C349.941 130 358 121.941 358 112C358 102.059 349.941 94 340 94Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M340 150H18C8.05888 150 0 158.059 0 168C0 177.941 8.05887 186 18 186H340C349.941 186 358 177.941 358 168C358 158.059 349.941 150 340 150Z" fill="#E1E6ED"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id="clip0_2543_91192">\n <rect width="358" height="186" fill="white"/>\n </clipPath>\n <clipPath id="clip1_2543_91192">\n <rect width="358" height="186" fill="white"/>\n </clipPath>\n <clipPath id="clip2_2543_91192">\n <rect width="358" height="120" fill="white" transform="translate(0 66)"/>\n </clipPath>\n <clipPath id="clip3_2543_91192">\n <rect width="358" height="92" fill="white" transform="translate(0 94)"/>\n </clipPath>\n </defs>\n </svg>\n ')),e&&e.appendChild(n);var r=document.getElementById(te);Me(0,r)}(t,this.platform)}},{key:"renderPopupLoading",value:function(e){var t,n=null==e||null===(t=e.appearance)||void 0===t?void 0:t.showLoading;if(n="boolean"!=typeof n||n){var r=document.getElementById(ee);r&&(r.style.display="block"),function(){var e=document.createElement("div");null==e||e.classList.add(te),e.id=te,e.innerHTML='<div class="line"><div></div><div></div><div></div><div></div></div>',e.style.fontSize="".concat(Ne(),"px");var t=document.getElementsByTagName("body")[0];null==t||t.appendChild(e)}()}}},{key:"_createLoadAppPromise",value:function(){var e=this;return new Promise((function(t,n){e._loadAppPromiseResolve=t,setTimeout((function(){n(I.CREATECOMPONENT_ERROR.LOAD_APP_TIMEOUT)}),15e3)})).catch((function(t){return e.dispatchToSDK(L.name,{code:I.CREATECOMPONENT_ERROR.code,message:I.CREATECOMPONENT_ERROR.LOAD_APP_TIMEOUT.message}),Promise.reject(t)}))}},{key:"createActionQueryPromise",value:function(){var e=this;return this._performanceData.push({key:"sdk_action_query_start",value:Date.now()}),this._actionQueryPromise=new Promise((function(t,n){var r,o,i,a={paymentSessionData:e._renderParams&&(null===(r=e._renderParams)||void 0===r?void 0:r.paymentSessionData)||"",paymentSessionConfig:null===(o=e._renderParams)||void 0===o||null===(i=o.paymentSessionMetaData)||void 0===i?void 0:i.paymentSessionConfig};if(y.CASHIER_PAYMENT_CARD===e._componentSign&&(a.paymentMethodType="CARD"),y.EASY_PAY_WALLET===e._componentSign){var s,c=a.paymentSessionConfig||{},u=c.productSceneVersion,l=void 0===u?"":u,f=c.productScene,d=void 0===f?"":f,p=((null===(s=e._renderParams)||void 0===s?void 0:s.paymentSessionMetaData)||{}).action,h=(void 0===p?{}:p).autoDebitWithToken,m=void 0!==h&&h;if(d===g.EASY_PAY&&"2.0"===l&&!m)return t({message:"sdk no need to make query request",success:!0})}if(y.AUTO_DEBIT_WALLET===e._componentSign){var v,E,b,w,_=(null===(v=e._renderParams)||void 0===v||null===(E=v.paymentSessionMetaData)||void 0===E?void 0:E.action)||{},R=De()?null==_||null===(b=_.web)||void 0===b?void 0:b.signType:null==_||null===(w=_.wap)||void 0===w?void 0:w.signType;if("SMS"===R)return t({message:"sdk no need to make query request",success:!0});if(!R||"REDIRECT"!==R)return t({success:!1})}if(window.location.href.indexOf("LOCAL_MOCK=1")>-1)return t({message:"sdk no need to make query request",success:!0});(function(e,t){return Mn.apply(this,arguments)})(a,{env:e.AMSSDK.options.env.environment,locale:e.AMSSDK.options.locale}).then((function(n){e._performanceData.push({key:"sdk_action_query_end",value:Date.now()}),null!=n&&n.success,t(n)})).catch((function(t){e.dispatchToSDK(L.name,{code:I.CREATECOMPONENT_ERROR.code}),n(t)}))})),this._actionQueryPromise}},{key:"cleanElement",value:function(){try{var e;if("string"===_e(this._selector)){var t=document.querySelector(this._selector);t&&(t.innerHTML="")}var n=document.getElementById(J);n&&(null==n||n.remove()),null===(e=document.getElementById("".concat(J,"-").concat(this.platform,"-animation-style")))||void 0===e||e.remove(),document.getElementsByTagName("body")[0].style.overflow="auto";var r=document.getElementById(ee);null==r||r.remove(),this.removeRetentionPopup(this.platform),this.removeEventListener()}catch(e){console.error(e)}}},{key:"createApp",value:function(e){if(!0==!!window.postMessage){this._performanceData.push({key:"sdk_popup_start",value:Date.now()});try{var t,n,r,o=(null==e||null===(t=e.paymentSessionMetaData)||void 0===t||null===(n=t.paymentSessionConfig)||void 0===n?void 0:n.productSceneVersion)||"",i=(null==e||null===(r=e.paymentSessionMetaData)||void 0===r?void 0:r.extendInfo)||"",a=this.AMSSDK.options.env.environment;this.appDomain=function(e){var t=e.environment,n=e.appVersion,r=e.componentSign,o=e.productSceneVersion,i=e.extendInfo,a=/^https?:\/\/([^/<>\s]+\.?)*/.exec(Kn(t,n,r,o,i));return a&&a[0]||""}({environment:a,appVersion:this._appVersion,componentSign:this._componentSign,productSceneVersion:o,extendInfo:i}),this.app=function(e,t){var n=document.createElement("iframe"),r={dropin:"ams-checkout-dropin-".concat(t),component:"ams-checkout-component-".concat(t)}[e]||"ams-checkout-component";return n.id=r,n.style.height="0",n.style.width="100%",n.style.border="0",n.style.opacity="0",n.style.overflow="hidden",n}(this.AMSSDK.options.mode,this.platform),this.app.src=Fn({componentSign:this._componentSign,analytics:this.AMSSDK.options.analytics,productSceneVersion:o,environment:a,appVersion:this._appVersion,extendInfo:i,locale:this.AMSSDK.options.locale,instanceId:this.AMSSDK._instanceId}),this.addEventListener()}catch(e){this.dispatchToSDK(L.name,Object.assign({},I.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME,{stack:e}))}}else this.dispatchToSDK(L.name,I.SDK_COMPATIBILITY_ISSUES.BROWSER_NOT_SUPPORT_POSTMESSAGE)}},{key:"listener",value:function(e){if(e.origin===this.appDomain)if(function(e){try{JSON.parse(e)}catch(e){return!1}return!0}(e.data)){var t=JSON.parse(e.data);if(t.name!==x.APP_TO_SDK&&t.name!==x.APP_TO_APP||t.instanceId!==this.AMSSDK._instanceId)return;this._handleAppMessage(t)}else console.warn(I.NOT_JSON_FORMAT),this.dispatchToSDK(L.name,I.NOT_JSON_FORMAT)}},{key:"resizeListener",value:function(){document.getElementById(J).style.transition="none",this.dispatchToApp({context:{event:"renderResize",data:{heightOfVisible:window.innerHeight,widthOfVisible:window.innerWidth}}})}},{key:"addEventListener",value:function(){this.removeEventListener(),window["".concat(ne,"_").concat(this.AMSSDK._instanceId)]=this.listener.bind(this),window["".concat(ne,"_").concat(this.AMSSDK._instanceId,"_resize")]=this.resizeListener.bind(this),window.addEventListener("message",window["".concat(ne,"_").concat(this.AMSSDK._instanceId)]),window.addEventListener("resize",window["".concat(ne,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"removeEventListener",value:function(){window.removeEventListener("message",window["".concat(ne,"_").concat(this.AMSSDK._instanceId)]),window.removeEventListener("resize",window["".concat(ne,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"_handleAppMessage",value:function(e){if([B.name,j.name,M.name,U.name,K.name,L.name,F.name,z.name,H.name,Y.name,q.name,W.name,V.name,G.name].includes(e.context.event))if(e.context.event!==G.name){if(e.context.event===B.name)return this._performanceData.push({key:"sdk_onLaunch",value:Date.now()}),this._loadAppPromiseResolve&&this._loadAppPromiseResolve(!0),void this.sendRenderEvent();if(e.context.event===M.name&&this.handleSizeChanged(e),e.context.event===K.name)return this.closeBtnFunc();if(e.context.event===j.name)return this.handleRedirect(e.context.data);if(e.context.event!==z.name)if(e.context.event!==Y.name){if(e.context.event!==H.name)return e.context.event===q.name?(!0===e.context.data&&(this._isRetention=!0),void(!1===e.context.data&&(this._isRetention=!1))):void(e.context.event!==W.name?this.dispatchToSDK(e.context.event,e.context.data):this.handleDeclareInfo(e.context.data));this.handleCloseBtnShow(!0)}else this.handleCloseBtnShow(!1);else this.submitForm(e.context.data)}else{var t;this.dispatchToSDK(F.name,{code:"SDK_END_OF_LOADING",message:(null===(t=e.context.data)||void 0===t?void 0:t.message)||""})}}},{key:"handleSizeChanged",value:function(e){var t;if(!((null===(t=e.context.data)||void 0===t?void 0:t.height)<=1)){var n,r=document.getElementById(J);if(r.style.height="".concat(e.context.data.height,"px"),this._renderDisplayType===v.popup){var o,i=document.getElementById(ee);if(i&&(i.style.background="rgb(0, 0, 0, 0.6)",i.style.display="block"),null===(o=document.getElementById(te))||void 0===o||o.remove(),"desktop"===this.platform&&(r.classList.add("".concat(J,"-").concat(this.platform,"-animation")),e.context.data.width&&(r.style.width="".concat(e.context.data.width,"px"))),"mobile"===this.platform){r.classList.add("".concat(J,"-").concat(this.platform,"-animation"));var a="".concat(J,"-").concat(this.platform,"-animation-style"),s=document.getElementById(a);s&&(null==s||s.remove());var c="@keyframes ".concat(J,"-slide-in {\n 0% {\n height: 1px;\n }\n 100% {\n height: ").concat(e.context.data.height,"px;\n }\n }\n @keyframes ").concat(J,"-slide-out {\n 0% {\n height: ").concat(e.context.data.height,"px;\n opacity: 1;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n height: 1px;\n opacity: 0;\n }\n }"),u=document.createElement("style");u.id=a,u.type="text/css",u.innerHTML=c,document.getElementsByTagName("head")[0].appendChild(u),setTimeout((function(){r.style.transition="height 0.28s ease-in-out"}),500)}}if(this._renderDisplayType===v.inline)null===(n=document.getElementById(te))||void 0===n||n.remove();this.app.style.height="".concat(e.context.data.height,"px"),this.app.style.opacity="1"}}},{key:"handleRedirect",value:function(e){var t=this,n="string"==typeof e?{normalUrl:e}:{applinkUrl:(null==e?void 0:e.applinkUrl)||"",schemeUrl:(null==e?void 0:e.schemeUrl)||"",normalUrl:(null==e?void 0:e.normalUrl)||"",target:null==e?void 0:e.target},r=function(e,n){t.dispatchToSDK(F.name,{code:C.SDK_CALL_URL_SUCCESS,message:"Successfully opened the app,".concat(e,": ").concat(n)})},o=function(){t.dispatchToSDK(F.name,{code:C.SDK_CALL_URL_SUCCESS,message:"Failed to open app,applinkUrl: ".concat(null==n?void 0:n.applinkUrl," schemeUrl: ").concat(null==n?void 0:n.schemeUrl," normalUrl: ").concat(null==n?void 0:n.normalUrl)})};if(n.target===P.BLANK)return n.normalUrl?(r("normalUrl",n.normalUrl),void window.open(n.normalUrl)):o();this.cleanContainer(),this.AMSSDK._redirect({applinkUrl:null==n?void 0:n.applinkUrl}).then((function(){r("applinkUrl",null==n?void 0:n.applinkUrl)})).catch((function(){return t.AMSSDK._redirect({schemeUrl:null==n?void 0:n.schemeUrl})})).then((function(){r("schemeUrl",null==n?void 0:n.schemeUrl)})).catch((function(){return t.AMSSDK._redirect({normalUrl:null==n?void 0:n.normalUrl})})).then((function(){r("normalUrl",null==n?void 0:n.normalUrl)})).catch((function(){o()}))}},{key:"handleDeclareInfo",value:function(e){var t=e.closeDialogData;!function(e){var t=e.closeDialogData,n=void 0===t?{}:t;try{if(n){var r,o,i,a=document.getElementById("".concat(X,"-title"));a&&(a.style.fontSize="".concat(null==n||null===(r=n.title)||void 0===r?void 0:r.fontSize,"px"),a.style.color=null==n||null===(o=n.title)||void 0===o?void 0:o.fontColor,a.innerHTML=null==n||null===(i=n.title)||void 0===i?void 0:i.text);var s,c,u,l=document.getElementById("".concat(X,"-sub-title"));l&&(l.style.fontSize="".concat(null==n||null===(s=n.message)||void 0===s?void 0:s.fontSize,"px"),l.style.color=null==n||null===(c=n.message)||void 0===c?void 0:c.fontColor,l.innerHTML=null==n||null===(u=n.message)||void 0===u?void 0:u.text);var f,d,p,h,m,v,y,g=document.getElementById("".concat(X,"-remain"));g&&(g.innerHTML=null==n||null===(f=n.btnOK)||void 0===f?void 0:f.text,g.style.fontSize="".concat(null==n||null===(d=n.btnOK)||void 0===d?void 0:d.fontSize,"px"),g.style.color=null==n||null===(p=n.btnOK)||void 0===p?void 0:p.fontColor,g.style.borderRadius="".concat(null==n||null===(h=n.btnOK)||void 0===h?void 0:h.corner,"px"),"stroke"===(null==n||null===(m=n.btnOK)||void 0===m?void 0:m.type)?g.style.border="1px solid ".concat(null==n||null===(y=n.btnOK)||void 0===y?void 0:y.bg):g.style.backgroundColor=null==n||null===(v=n.btnOK)||void 0===v?void 0:v.bg);var E,b,w,_,R,A,S,O=document.getElementById("".concat(X,"-leave"));O&&(O.innerHTML=null==n||null===(E=n.btnCancel)||void 0===E?void 0:E.text,O.style.fontSize="".concat(null==n||null===(b=n.btnCancel)||void 0===b?void 0:b.fontSize,"px"),O.style.color=null==n||null===(w=n.btnCancel)||void 0===w?void 0:w.fontColor,O.style.borderRadius="".concat(null==n||null===(_=n.btnCancel)||void 0===_?void 0:_.corner,"px"),"stroke"===(null==n||null===(R=n.btnCancel)||void 0===R?void 0:R.type)?O.style.border="1px solid ".concat(null==n||null===(S=n.btnCancel)||void 0===S?void 0:S.bg):O.style.backgroundColor=null==n||null===(A=n.btnCancel)||void 0===A?void 0:A.bg)}}catch(e){console.error(e)}}({closeDialogData:void 0===t?{}:t})}},{key:"handleCloseBtnShow",value:function(e){var t=document.getElementById($);e?null==t||t.classList.remove("".concat($,"-hidden")):!1===e&&(null==t||t.classList.add("".concat($,"-hidden")))}},{key:"dispatchToSDK",value:function(e,t){this.AMSSDK._eventCenter.emit(e,t)}},{key:"dispatchToApp",value:function(e){var t=Object.assign({},e,{name:x.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:D,instanceId:this.AMSSDK._instanceId});if(this.app&&this.app.contentWindow)return this.app.contentWindow.postMessage(JSON.stringify(t),this.appDomain);throw new Error(I.SDK_SUBMIT_ERROR.message)}},{key:"subscribeFromSDK",value:function(){var e={};for(var t in e)e.hasOwnProperty(t)&&this.AMSSDK._eventCenter.on("".concat(D,"-").concat(t),e[t].bind(this))}},{key:"sendRenderEvent",value:(n=se()(ie()().mark((function e(){var t,n,r,o,i;return ie()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this._actionQueryPromise){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._actionQueryPromise;case 5:i=e.sent,this._performanceData.push({key:"sdk_render_component",value:Date.now()}),this.dispatchToApp({context:{event:"renderComponent",data:{queryResult:i,sessionResult:null===(t=this._renderParams)||void 0===t?void 0:t.paymentSessionMetaData,paymentSessionData:null===(n=this._renderParams)||void 0===n?void 0:n.paymentSessionData,heightOfVisible:Math.max(Vn,window.innerHeight),renderDisplayType:null===(r=this._renderParams)||void 0===r?void 0:r.renderDisplayType,appearance:null===(o=this._renderParams)||void 0===o?void 0:o.appearance,envInfo:{screenHeight:screen.height,screenWidth:screen.width}}}}),this.dispatchToApp({context:{event:"web-sdk-performance",data:{performanceData:this._performanceData}}}),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(0);case 13:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(){return n.apply(this,arguments)})},{key:"cleanContainer",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._loadAppPromiseResolve&&this._loadAppPromiseResolve(!0),this._performanceData=[],this._isInitComponent=!1,this.app=null,null===(e=document.getElementById(te))||void 0===e||e.remove(),this.hideComponentAnimation();var r=document.getElementById(ee);null==r||r.classList.add("".concat(ee,"-hidden")),n?this.cleanElement():setTimeout((function(){t.cleanElement()}),300)}},{key:"hideComponentAnimation",value:function(){var e=document.getElementById(J);e&&(e.style.transition="",null==e||e.classList.remove("".concat(J,"-").concat(this.platform)),null==e||e.classList.remove("".concat(J,"-").concat(this.platform,"-animation")),null==e||e.classList.add("".concat(J,"-hidden-").concat(this.platform)))}},{key:"closeBtnFunc",value:function(){this._isRetention?this.showRetentionPopup():(this.cleanContainer(),this.dispatchToSDK(K.name,{}))}},{key:"retentionPopupLeaveFunc",value:function(){this.dispatchToSDK(K.name,{}),this.hideRetentionPopupFunc(),this.cleanContainer()}},{key:"removeRetentionPopup",value:function(e){!function(e,t,n){var r,o=e===T.mobile?"touchend":"click",i=document.getElementById("".concat(X,"-remain"));i&&i.removeEventListener(o,t);var a=document.getElementById("".concat(X,"-leave"));a&&a.removeEventListener(o,n),null===(r=document.getElementById(X))||void 0===r||r.remove()}(e,this.hideRetentionPopupFunc.bind(this),this.retentionPopupLeaveFunc.bind(this))}},{key:"showRetentionPopup",value:function(){var e=document.getElementById(X),t=document.getElementById(J);e&&(null==t||t.classList.add("".concat(J,"-opacity")),e.classList.remove("".concat(X,"-hidden")),e.classList.add("".concat(X,"-show")))}},{key:"hideRetentionPopupFunc",value:function(){var e,t;e=document.getElementById(X),t=document.getElementById(J),e&&(e.classList.remove("".concat(X,"-show")),e.classList.add("".concat(X,"-hidden")),setTimeout((function(){e.classList.remove("".concat(X,"-hidden")),null==t||t.classList.remove("".concat(J,"-opacity"))}),300))}},{key:"submitForm",value:function(e){var t=e.attributes,n=document.body,r=document.createElement("form");r.setAttribute("height","1"),r.setAttribute("width","1"),Object.keys(t.data).forEach((function(e){var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t.data[e]),r.appendChild(n)})),r.setAttribute("action",t.action),r.setAttribute("method","post"),n.appendChild(r),setTimeout((function(){r.submit()}),0)}}]),e}(),Jn=function(e,t,n){return new Promise((function(r,o){var i=null;if("string"===_e(t)&&(i=document.querySelector(t)),null===i){var a={code:I.CREATEPAYMENT_PARAMETER_ERROR.code,message:"Failed to execute 'querySelector' on 'Document': ".concat(t," is not a valid selector")};return o(a),void e._dispatchToSDK({name:x.APP_TO_SDK,instanceId:e.AMSSDK._instanceId,context:{event:L.name,data:a}})}n===v.popup&&(i.innerHTML=""),e.app&&i.appendChild(e.app),r()}))},Zn=n(746),Qn=n.n(Zn),$n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},Xn=new Uint8Array(16);function er(){if(!Un&&!(Un="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Un(Xn)}for(var tr=[],nr=0;nr<256;++nr)tr.push((nr+256).toString(16).slice(1));function rr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return tr[e[t+0]]+tr[e[t+1]]+tr[e[t+2]]+tr[e[t+3]]+"-"+tr[e[t+4]]+tr[e[t+5]]+"-"+tr[e[t+6]]+tr[e[t+7]]+"-"+tr[e[t+8]]+tr[e[t+9]]+"-"+tr[e[t+10]]+tr[e[t+11]]+tr[e[t+12]]+tr[e[t+13]]+tr[e[t+14]]+tr[e[t+15]]}var or,ir,ar,sr=function(e,t,n){if($n.randomUUID&&!t&&!e)return $n.randomUUID();var r=(e=e||{}).random||(e.rng||er)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return rr(r)},cr=window.navigator.userAgent||"",ur=function(){var e=cr.match(/OS (\d+)_(\d+)_?(\d+)?/);return Number.parseInt(e[1],10)},lr=/android/i.test(cr),fr=/iphone|ipad|ipod/i.test(cr),dr=/chrome\/[\d.]+ mobile safari\/[\d.]+/i.test(cr)&&lr&&cr.indexOf("Version")<0,pr=/qqbrowser/i.test(cr),hr=/firefox/i.test(cr);/baidubrowser/i.test(cr);function mr(e,t){return function(e,t){var n=new URL(e);for(var r in t)r&&n.searchParams.set(r,t[r]);return n.toString()}(e,t)}var vr,yr,gr,Er=5e3;function br(e,t){vr=+new Date,yr=setTimeout((function(){!(!!ir&&document[ir])&&e&&e()}),t||5e3)}function wr(e){var t=e.evokeAppBy;(null==t?void 0:t.url)&&(!function(e){var t=e.evokeAppBy,n=e.successCb,r=e.timeout;if(n){var o=+new Date,i=r||Er;o-(vr||+new Date)<i&&n(t)}}(e),yr&&clearTimeout(yr))}function _r(e){return/^(http|https|itms-apps|itms-appss|market):\/\//.test(e)}function Rr(e){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(e)}function Ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ar(Object(n),!0).forEach((function(t){Or(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Or(e,t,n){return(t=xr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xr(r.key),r)}}function xr(e){var t=function(e,t){if("object"!==Rr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Rr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Rr(t)?t:String(t)}!function(e){void 0!==e&&(void 0!==e.hidden?(ir="hidden",ar="visibilitychange"):void 0!==e.mozHidden?(ir="mozHidden",ar="mozvisibilitychange"):void 0!==e.msHidden?(ir="msHidden",ar="msvisibilitychange"):void 0!==e.webkitHidden&&(ir="webkitHidden",ar="webkitvisibilitychange"))}(document),function(e){e.SCHEME="Scheme",e.LINK="Link",e.INTENT="Intent"}(gr||(gr={}));var Pr=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=void 0,this.timer=void 0,this.options=void 0,this.evokeAppBy=void 0,this.handleDegradationStrategy=function(){var e=n.options,t=e.scheme,r=e.link,o=e.intent,i=e.params;r&&t?(n.options.link=mr(r,i),n.options.scheme=mr(t,i),fr&&ur()>9?n.evokeLink():n.evokeScheme(n.evokeLink.bind(n))):r?(n.options.link=mr(r,i),n.evokeLink()):t?(n.options.scheme=mr(t,i),n.evokeScheme()):o&&o.scheme&&o.package&&n.handleIntent()};this.config=Sr(Sr({},{delay:0}),t),this.options={},this.timer=null,this.evokeAppBy={url:"",type:gr.LINK},this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e;or||((or=document.createElement("iframe")).id="callapp_iframe_".concat(Date.now()),or.style.cssText="display:none;border:0;width:0;height:0;",document.body.appendChild(or)),e={evokeAppBy:this.evokeAppBy,successCb:this.config.successCb,timeout:this.config.resultJudgmentTime},void 0!==ar?document.addEventListener(ar,(function(){return wr(e)})):window.addEventListener("pagehide",(function(){return wr(e)}))}},{key:"open",value:function(e){this.options=e;var t=this.options,n=t.scheme,r=t.intent,o=t.link;if(!n&&!o&&!(null==r?void 0:r.scheme))throw new Error("请至少填一个链接");if(n&&_r(n))throw new Error("请填写正确格式的scheme");if(o&&!_r(o))throw new Error("请填写正确格式的link");if(r&&r.scheme&&_r(r.scheme))throw new Error("请填写正确格式的intent");this.handleDegradationStrategy()}},{key:"evokeLink",value:function(){this.evokeAppBy.type=gr.LINK;var e=this.options,t=e.link,n=e.delay;this.evokeByLocationDelay(t,n)}},{key:"evokeScheme",value:function(e){this.evokeAppBy.type=gr.SCHEME;var t=this.options,n=t.scheme,r=t.delay,o=t.fallback;fr?ur()>9||pr?this.evokeByTagADelay(n,r,o,e):this.evokeByIFrameDelay(n,r,o,e):dr||hr?this.handleOriginalChrome():this.evokeByIFrameDelay(n,r,o,e)}},{key:"handleIntent",value:function(){var e,t=this,n=this.options,r=n.scheme,o=n.intent,i=n.delay,a=n.link,s=n.fallback,c=(null==o?void 0:o.scheme)||r;c&&!_r(c)&&(this.evokeAppBy.type=gr.INTENT,a&&(e=function(){return t.evokeLink()}),this.evokeByLocationDelay(function(e,t,n){var r="";n&&(r="S.browser_fallback_url=".concat(encodeURIComponent(n),";"));var o=e.substring(0,e.indexOf("://")),i=t?"#Intent;scheme=".concat(o,";package=").concat(t,";"):"#Intent;scheme=".concat(o,";"),a=e.replace(/.*?:\/\//,"intent://");return"".concat(a+i+r,"end")}(c,null==o?void 0:o.package,(null==o?void 0:o.fallbackUrl)||""),i,s,e))}},{key:"handleOriginalChrome",value:function(){this.handleIntent()}},{key:"evokeAppDelay",value:function(e,t,n,r,o){var i=this,a=n||this.config.delay,s=r||this.config.fallback;this.timer=setTimeout((function(){i.clearTimer(),e(),i.checkIsOpen(t,s,o)}),a)}},{key:"evokeByLocationDelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){window.location.href=e}(e)}),e,t,n,r)}},{key:"evokeByTagADelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){var t=document.createElement("a");t.setAttribute("href",e),t.style.display="none",document.body.appendChild(t);var n=document.createEvent("HTMLEvents");n.initEvent("click",!1,!1),t.dispatchEvent(n)}(e)}),e,t,n,r)}},{key:"evokeByIFrameDelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){or.src=e}(e)}),e,t,n,r)}},{key:"checkIsOpen",value:function(e,t,n){return this.evokeAppBy.url=e,br(n||t,this.config.resultJudgmentTime)}},{key:"clearTimer",value:function(){this.timer&&clearTimeout(this.timer)}}])&&Tr(t.prototype,n),r&&Tr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),kr=function(e){var t=function(e){try{return[JSON.parse(atob(e.split("&&")[3])),e.split("&&").slice(0,3).join("&&")]}catch(t){return console.error("Parsing paymentSessionData is abnormal and may affect the payment link. Please ensure to use the new version of SDK."),[{},e]}}(e),n=m()(t,2),r=n[0],o=n[1];return function(e){De()&&null!=e&&e.paymentSessionConfig&&e.paymentSessionConfig.productScene===g.EASY_PAY&&(e.paymentSessionConfig.productSceneVersion="1.0")}(r),[r,o]},Cr=function(e){var t=Object.assign({paymentSessionMetaData:{},renderDisplayType:v.popup},e),n=kr(t.paymentSessionData),r=m()(n,2),o=r[0],i=r[1],a=function(e){var t=e.paymentSessionConfig,n=void 0===t?{}:t,r=n.productScene,o=void 0===r?"":r,i=n.paymentMethodCategoryType,a=void 0===i?"":i;return o&&a?"".concat(o,"_").concat(a):y.NONE}(o);return a===y.NONE?Promise.reject({code:I.CREATEPAYMENT_PARAMETER_ERROR.code,message:"Abnormal response data, interface failure, or unsupported payment method"}):(t.paymentSessionData=i,t.paymentSessionMetaData=o,Promise.resolve({iframeNodesParams:t,componentSign:a}))},Ir=function(e){s()(r,e);var n=u()(r);function r(){return i()(this,r),n.apply(this,arguments)}return t()(r)}(function(e){s()(r,e);var n=u()(r);function r(e){var t;i()(this,r),t=n.call(this,e),p()(f()(t),"_componentApp",void 0);var o=new Gn;return o.setRender(Jn),t._registerPlugin(D,o),t._componentApp=t._getPlugin(D),t}return t()(r,[{key:"parameterInitAndCheck",value:function(e){var t=e.params,n=e.selector,r=e.renderDisplayType;this.options.mode=_.component,this.options.networkMode=this.options.networkMode||R.session;var o=Object.assign({selector:n,renderDisplayType:r},t);return o&&!o.paymentSessionData?Promise.reject(I.CREATEPAYMENT_PARAMETER_ERROR):this.options.networkMode===R.proxy?(console.warn(I.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.message),Promise.reject(I.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT)):Promise.resolve(o)}},{key:"pluginAppendIframe",value:function(e){try{return this._componentApp.appendIframeNodes(e.componentSign,e.iframeNodesParams)}catch(e){return Promise.reject(e)}}},{key:"createComponent",value:function(e){var t=this;return this.parameterInitAndCheck({params:e,renderDisplayType:v.popup}).then((function(e){return Cr(e)})).catch((function(e){return t._eventCenter.emit(L.name,e),Promise.reject(e)})).then((function(e){return t.pluginAppendIframe(e)}))}},{key:"mountComponent",value:function(e,t){var n=this;return this.parameterInitAndCheck({params:e,renderDisplayType:v.inline,selector:t}).then((function(e){return Cr(e)})).catch((function(e){return n._eventCenter.emit(L.name,e),Promise.reject(e)})).then((function(e){return n.pluginAppendIframe(e)}))}},{key:"submit",value:function(){try{this._componentApp.dispatchToApp({context:{event:"submitPay",data:{}}})}catch(e){console.error(e)}}}]),r}(function(){function e(t){i()(this,e),p()(this,"options",void 0),p()(this,"checkoutState",void 0),p()(this,"_eventCenter",void 0),p()(this,"plugins",void 0),p()(this,"_instanceId",void 0),this._instanceId=sr(),this.options={},this._eventCenter=new Re,this._initEvent(t),this._setOptions(t),this.plugins=new Map}return t()(e,[{key:"unmount",value:function(){var e,t=Qn()(this.plugins.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;try{n.logoutPlugin()}catch(e){console.error(e)}}}catch(e){t.e(e)}finally{t.f()}}},{key:"_setOptions",value:function(e){this._setMode(e),this._setEnv(e),this.options.locale=(null==e?void 0:e.locale)||""}},{key:"_setEnv",value:function(e){var t=Le()._moreEnv;null!=e&&e.environment&&!((null==e?void 0:e.environment)in A)&&"true"!==t&&(console.warn(I.INIT_PARAMETER_ERROR.ENVIRONMENT_ERROR.message),e.environment="prod"),this.options.env={terminalType:ke?O.WAP:O.WEB,environment:(null==e?void 0:e.environment)||"prod"},this.options.env.terminalType===O.WAP&&(this.options.env.osType=xe?S.IOS:Pe?S.ANDROID:S.ELSE)}},{key:"_setMode",value:function(e){this.options.mode=(null==e?void 0:e.mode)||_.component,null!=e&&e.mode&&!((null==e?void 0:e.mode)in _)&&(console.warn(I.INIT_PARAMETER_ERROR.MODE_ERROR.message),this.options.mode=_.component),this.options.networkMode=(null==e?void 0:e.networkMode)||R.session,null!=e&&e.networkMode&&!((null==e?void 0:e.networkMode)in R)&&(console.warn(I.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.message),this.options.networkMode=R.proxy)}},{key:"_initEvent",value:function(e){if(null!=e&&e.onError){if("function"!==_e(e.onError))throw new Error(I.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(L.name,e.onError,L.uniqueKey)}if(null!=e&&e.onPaymentMethodSelected){if("function"!==_e(e.onPaymentMethodSelected))throw new Error(I.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(N.name,e.onPaymentMethodSelected,N.uniqueKey)}if(null!=e&&e.onSizeChanged){if("function"!==_e(e.onSizeChanged))throw new Error(I.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(M.name,e.onSizeChanged,M.uniqueKey)}if(null!=e&&e.onLog){if("function"!==_e(e.onLog))throw new Error(I.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(U.name,e.onLog,U.uniqueKey)}if(null!=e&&e.onEventCallback){if("function"!==_e(e.onEventCallback))throw new Error(I.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(F.name,e.onEventCallback,F.uniqueKey)}if(null!=e&&e.onClose){if("function"!==_e(e.onClose))throw new Error(I.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(K.name,e.onClose,K.uniqueKey)}}},{key:"_registerPlugin",value:function(e,t){this.plugins.set(e,t);try{t.applyPlugin(this)}catch(t){if(this.plugins.delete(e),"error"===_e(t))throw t;throw new Error("Failed to register plug-in:".concat(e," Exception in the apply function of the plug-in"))}}},{key:"_getPlugin",value:function(e){return this.plugins.has(e)?this.plugins.get(e):(console.warn("".concat(e,"Plugin unregistered")),null)}},{key:"_redirect",value:function(e){var t=this;return new Promise((function(n,r){var o=t.options.env.terminalType===O.WEB,i=(null==e?void 0:e.normalUrl)||"",a=(null==e?void 0:e.schemeUrl)||"",s=(null==e?void 0:e.applinkUrl)||"",c=function(){if(i)return n(),void(window.location.href=i);r(I.SDK_CALL_URL_ERROR.REDIRECT_ERROR)};o?c():function(){if(a||s){var e={fallback:function(){c()},successCb:function(){n()},delay:0};try{new Pr(e).open({scheme:a,link:s})}catch(e){c()}}else c()}()}))}},{key:"_overrideSubscription",value:function(e,t,n){this._eventCenter.off(e,t,n),this._eventCenter.on(e,t,n)}}]),e}())),Dr=function(e){s()(r,e);var n=u()(r);function r(e){return i()(this,r),n.call(this,e)}return t()(r)}(Ir),Lr=Ir}(),r}()}));
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+ * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
6
+ * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
7
+ */
1
8
  import ComponentApp from '../../plugin/component';
2
9
  import { IcreateComponent, IoptionsParams, Iselector } from '../../types';
3
10
  import CoreInstance from '../instance/index';
@@ -20,5 +27,5 @@ export declare class AMSComponent extends CoreInstance {
20
27
  * @description Execute payment submission process
21
28
  * @description - When using your own payment button, you can execute the submit payment process by actively calling this function.
22
29
  */
23
- submit(): Promise<unknown>;
30
+ submit(): void;
24
31
  }
@@ -25,7 +25,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
25
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
26
26
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
27
27
  */
28
- import { v4 as uuid } from 'uuid';
28
+
29
29
  import { COMPONENTPLUGINID, ERRORMESSAGE, EVENT } from "../../constant";
30
30
  import ComponentApp from "../../plugin/component";
31
31
  import { componentSignEnum, modeEnum, networkModeEnum, productSceneEnum, renderDisplayTypeEnum } from "../../types";
@@ -186,25 +186,16 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
186
186
  }, {
187
187
  key: "submit",
188
188
  value: function submit() {
189
- var _this4 = this;
190
- return new Promise(function (resolve, reject) {
191
- try {
192
- var eventCallbackId = uuid();
193
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
194
- _this4._eventCenter.once(eventCallbackId, function (_data) {
195
- resolve(_data);
196
- });
197
- _this4._componentApp.dispatchToApp({
198
- context: {
199
- event: 'submitPay',
200
- eventCallbackId: eventCallbackId,
201
- data: {}
202
- }
203
- });
204
- } catch (error) {
205
- reject(error);
206
- }
207
- });
189
+ try {
190
+ this._componentApp.dispatchToApp({
191
+ context: {
192
+ event: 'submitPay',
193
+ data: {}
194
+ }
195
+ });
196
+ } catch (error) {
197
+ console.error(error);
198
+ }
208
199
  }
209
200
  }]);
210
201
  return AMSComponent;
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+ * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
6
+ * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
7
+ */
1
8
  import { IcreatePaymentParams, IoptionsParams } from '../../types';
2
9
  export declare const mixinDropInConstructor: (options: IoptionsParams, context: any) => void;
3
10
  /**
@@ -8,7 +8,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
8
8
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
9
9
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
10
10
  */
11
- /* eslint-disable @typescript-eslint/no-explicit-any */
11
+
12
12
  import { BASEPLUGINID, ERRORMESSAGE, EVENT } from "../../constant";
13
13
  import CheckoutApp from "../../plugin/drop-in";
14
14
  import { messageName, networkModeEnum } from "../../types";
@@ -49,8 +49,8 @@ export var createPayment = function createPayment(params) {
49
49
  export var confirmPayment = function confirmPayment(result) {
50
50
  var _this2 = this;
51
51
  return new Promise(function (resolve, reject) {
52
- _this2.eventCenter.once('onRedirect', function (payload) {
53
- _this2._redirect(payload).then(function () {
52
+ _this2.eventCenter.once('onRedirect', function (playload) {
53
+ _this2._redirect(playload).then(function () {
54
54
  resolve();
55
55
  }).catch(function (err) {
56
56
  reject(err);
@@ -73,21 +73,21 @@ export var confirmPayment = function confirmPayment(result) {
73
73
  */
74
74
  export var _subscribeFromCheckoutPlugin = function _subscribeFromCheckoutPlugin() {
75
75
  var _this3 = this;
76
- var eventKeyMap = new Map([[EVENT.error.name, function (payload) {
77
- _this3.eventCenter.emit(EVENT.error.name, payload.context.data);
78
- }], [EVENT.ready.name, function (payload) {
79
- _this3.eventCenter.emit(EVENT.ready.name, payload.context.data);
80
- }], [EVENT.redirect.name, function (payload) {
81
- _this3.eventCenter.emit(EVENT.redirect.name, payload.context.data);
82
- }], [EVENT.paymentMethodSelected.name, function (payload) {
83
- _this3.checkoutState.paymentMethodType = payload.context.data.paymentMethodType;
76
+ var eventKeyMap = new Map([[EVENT.error.name, function (playload) {
77
+ _this3.eventCenter.emit(EVENT.error.name, playload.context.data);
78
+ }], [EVENT.ready.name, function (playload) {
79
+ _this3.eventCenter.emit(EVENT.ready.name, playload.context.data);
80
+ }], [EVENT.redirect.name, function (playload) {
81
+ _this3.eventCenter.emit(EVENT.redirect.name, playload.context.data);
82
+ }], [EVENT.paymentMethodSelected.name, function (playload) {
83
+ _this3.checkoutState.paymentMethodType = playload.context.data.paymentMethodType;
84
84
  _this3.eventCenter.emit(EVENT.paymentMethodSelected.name, {
85
- paymentMethodType: payload.context.data.paymentMethodType
85
+ paymentMethodType: playload.context.data.paymentMethodType
86
86
  });
87
- }], [EVENT.sizeChanged.name, function (payload) {
88
- _this3.eventCenter.emit(EVENT.sizeChanged.name, payload.context.data);
89
- }], [EVENT.log.name, function (payload) {
90
- _this3.eventCenter.emit(EVENT.log.name, payload.context.data);
87
+ }], [EVENT.sizeChanged.name, function (playload) {
88
+ _this3.eventCenter.emit(EVENT.sizeChanged.name, playload.context.data);
89
+ }], [EVENT.log.name, function (playload) {
90
+ _this3.eventCenter.emit(EVENT.log.name, playload.context.data);
91
91
  }]]);
92
92
  var _iterator = _createForOfIteratorHelper(eventKeyMap.keys()),
93
93
  _step;
@@ -15,7 +15,6 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
15
15
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
16
16
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
17
17
  */
18
- /* eslint-disable @typescript-eslint/no-explicit-any */
19
18
  import { v4 as uuid } from 'uuid';
20
19
  import { ERRORMESSAGE, EVENT } from "../../constant";
21
20
  import { environmentEnum, modeEnum, networkModeEnum, osTypeEnum, terminalTypeEnum } from "../../types/index";
@@ -113,8 +113,6 @@ export var addPopupLoading = function addPopupLoading() {
113
113
  var body = document.getElementsByTagName('body')[0];
114
114
  body === null || body === void 0 ? void 0 : body.appendChild(loading);
115
115
  };
116
-
117
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
118
116
  export var handleDeclareInfo = function handleDeclareInfo(_ref) {
119
117
  var _ref$closeDialogData = _ref.closeDialogData,
120
118
  closeDialogData = _ref$closeDialogData === void 0 ? {} : _ref$closeDialogData;
@@ -1,5 +1,5 @@
1
1
  import type AMSCheckout from '../../core/instance';
2
- import type { eventPayload, eventPayloadContext, IappendIframeNodesParams, Iselector } from '../../types';
2
+ import type { eventPlayload, IappendIframeNodesParams, Iselector } from '../../types';
3
3
  import { componentSignEnum, platformEnum, renderDisplayTypeEnum } from '../../types';
4
4
  type IrenderFuncParams = (context: ComponentApp, selector: Iselector, renderDisplayType: renderDisplayTypeEnum) => Promise<void>;
5
5
  export default class ComponentApp {
@@ -7,7 +7,7 @@ export default class ComponentApp {
7
7
  AMSSDK: AMSCheckout;
8
8
  platform: platformEnum;
9
9
  _performanceData: any[];
10
- _loadAppPromiseResolve: ((value: boolean) => void) | null;
10
+ _loadAppPromiseResolve: ((value: Boolean) => void) | null;
11
11
  _isInitComponent: boolean;
12
12
  private appDomain;
13
13
  private createIframeNode;
@@ -58,7 +58,7 @@ export default class ComponentApp {
58
58
  /**
59
59
  * @description Processing messages from iframe
60
60
  */
61
- _handleAppMessage(data: eventPayload): void;
61
+ _handleAppMessage(data: eventPlayload): void;
62
62
  private handleSizeChanged;
63
63
  private handleRedirect;
64
64
  private handleDeclareInfo;
@@ -66,12 +66,15 @@ export default class ComponentApp {
66
66
  /**
67
67
  * @description Send message to SDK
68
68
  */
69
- dispatchToSDK(event: string, data: any, eventCallbackId?: string): void;
69
+ dispatchToSDK(event: string, data: any): void;
70
70
  /**
71
71
  * @description Send message to iframe
72
72
  */
73
73
  dispatchToApp(payload: {
74
- context: eventPayloadContext;
74
+ context: {
75
+ event: string;
76
+ data: any;
77
+ };
75
78
  }): any;
76
79
  /**
77
80
  * @description Subscribe to messages from SDK
@@ -15,7 +15,6 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
15
15
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
16
16
  */
17
17
  /* eslint-disable no-console */
18
- /* eslint-disable @typescript-eslint/no-explicit-any */
19
18
  import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CONTAINER_ID, COMPONENT_RETENTION_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LISTENER_PREFIX, LOADING_ID, LOADTIME_LIMIT, MOCKUP_ID } from "../../constant";
20
19
  import { queryPaymentInfo } from "../../service";
21
20
  import { componentSignEnum, eventCodeEnum, messageName, platformEnum, productSceneEnum, renderDisplayTypeEnum, targetEnum } from "../../types";
@@ -45,7 +44,7 @@ var ComponentApp = /*#__PURE__*/function () {
45
44
  _defineProperty(this, "_componentSign", componentSignEnum.NONE);
46
45
  _defineProperty(this, "_clickEventName", void 0);
47
46
  _defineProperty(this, "_renderDisplayType", renderDisplayTypeEnum.popup);
48
- this._appVersion = '1.5.4';
47
+ this._appVersion = '1.5.6';
49
48
  this._isInitComponent = false;
50
49
  this._selector = "#".concat(COMPONENT_SECTION_ID);
51
50
  this.createIframeNode = function () {
@@ -456,7 +455,7 @@ var ComponentApp = /*#__PURE__*/function () {
456
455
  }
457
456
 
458
457
  // The plug-in communicates with the sdk after processing
459
- this.dispatchToSDK(data.context.event, data.context.data, data.context.eventCallbackId);
458
+ this.dispatchToSDK(data.context.event, data.context.data);
460
459
  }
461
460
  }, {
462
461
  key: "handleSizeChanged",
@@ -586,9 +585,8 @@ var ComponentApp = /*#__PURE__*/function () {
586
585
  */
587
586
  }, {
588
587
  key: "dispatchToSDK",
589
- value: function dispatchToSDK(event, data, eventCallbackId) {
588
+ value: function dispatchToSDK(event, data) {
590
589
  this.AMSSDK._eventCenter.emit(event, data);
591
- if (eventCallbackId) this.AMSSDK._eventCenter.emit(eventCallbackId, data);
592
590
  }
593
591
 
594
592
  /**
@@ -1,5 +1,5 @@
1
1
  import type AMSCheckout from '../../core/instance';
2
- import type { IcreatePaymentParams, eventPayload } from '../../types';
2
+ import type { IcreatePaymentParams, eventPlayload } from '../../types';
3
3
  export default class CheckoutApp {
4
4
  app: any;
5
5
  paymentMethodsResult: any;
@@ -47,15 +47,15 @@ export default class CheckoutApp {
47
47
  /**
48
48
  * @description Processing messages from iframe
49
49
  */
50
- _handleAppMessage(data: eventPayload): void;
50
+ _handleAppMessage(data: eventPlayload): void;
51
51
  /**
52
52
  * @description Send message to SDK
53
53
  */
54
- _dispatchToSDK(data: eventPayload): void;
54
+ _dispatchToSDK(data: eventPlayload): void;
55
55
  /**
56
56
  * @description Send message to iframe
57
57
  */
58
- _dispatchToApp(data: eventPayload): void;
58
+ _dispatchToApp(data: eventPlayload): void;
59
59
  /**
60
60
  * @description Subscribe to messages from SDK
61
61
  */
@@ -67,5 +67,5 @@ export default class CheckoutApp {
67
67
  /**
68
68
  * @description Send the post submission processing event, and the cashier applies the consumption result
69
69
  */
70
- _handleRequestPayment(data: eventPayload): void;
70
+ _handleRequestPayment(data: eventPlayload): void;
71
71
  }
@@ -11,7 +11,6 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
11
11
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
12
12
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
13
13
  */
14
- /* eslint-disable @typescript-eslint/no-explicit-any */
15
14
  import { BASEPLUGINID, ERRORMESSAGE, EVENT } from "../../constant";
16
15
  import { messageName } from "../../types";
17
16
  import { getOrigin, getType, getViewPort, isDom, isJsonString, serialize } from "../../util";
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+ * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
6
+ * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
7
+ */
1
8
  import { IrequestConfig } from '../types';
2
9
  /**
3
10
  *
@@ -14,7 +14,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
14
14
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
15
15
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
16
16
  */
17
- /* eslint-disable @typescript-eslint/no-explicit-any */
17
+
18
18
  import { sdkVersion } from "../config/index";
19
19
  import { appId, hostSignMap, lightSandboxMap, requestHost, sofaId, tntInstId } from "../config/request";
20
20
  import { errorEnum } from "../types";
@@ -121,6 +121,8 @@ function _request() {
121
121
  case 21:
122
122
  _context.prev = 21;
123
123
  _context.t0 = _context["catch"](6);
124
+ // eslint-disable-next-line no-console
125
+ console.log('request error', _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message);
124
126
  _error = safeJson(_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message, {
125
127
  success: false,
126
128
  errorCode: errorEnum.SYSTEM,
@@ -133,7 +135,7 @@ function _request() {
133
135
  errorCode: errorCode,
134
136
  errorMessage: ''
135
137
  }));
136
- case 27:
138
+ case 28:
137
139
  case "end":
138
140
  return _context.stop();
139
141
  }
@@ -8,8 +8,6 @@
8
8
 
9
9
  import { errorEnum } from "../types";
10
10
  import { get } from "../util/get";
11
-
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
11
  export var safeJson = function safeJson(data, obj) {
14
12
  try {
15
13
  return JSON.parse(data) || obj;
@@ -158,17 +158,15 @@ export declare enum messageName {
158
158
  APP_TO_SDK = "APP_TO_SDK",
159
159
  APP_TO_APP = "APP_TO_APP"
160
160
  }
161
- export interface eventPayload {
161
+ export interface eventPlayload {
162
162
  name: messageName;
163
163
  mode?: string;
164
164
  appId?: string;
165
165
  instanceId: string;
166
- context: eventPayloadContext;
167
- }
168
- export interface eventPayloadContext {
169
- event: string;
170
- data: any;
171
- eventCallbackId?: string;
166
+ context: {
167
+ event: string;
168
+ data: any;
169
+ };
172
170
  }
173
171
  export interface AMSCheckoutOptions {
174
172
  env: Ienv;
@@ -5,7 +5,7 @@
5
5
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
6
6
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
7
7
  */
8
- /* eslint-disable @typescript-eslint/no-explicit-any */
8
+
9
9
  /**
10
10
  * SDK options
11
11
  */
@@ -1,10 +1,3 @@
1
- /**
2
- * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
3
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
- * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
5
- * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
6
- */
7
- /* eslint-disable @typescript-eslint/no-explicit-any */
8
1
  import { getType } from '.';
9
2
  import { ERRORMESSAGE, EVENT } from "../constant";
10
3
  import { messageName, renderDisplayTypeEnum } from "../types";
package/esm/util/get.js CHANGED
@@ -1,11 +1,4 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- /**
3
- * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
4
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
- * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
6
- * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
7
- */
8
- /* eslint-disable @typescript-eslint/no-explicit-any */
9
2
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
3
  // @ts-nocheck
11
4
  var charCodeOfDot = '.'.charCodeAt(0);
@@ -1,10 +1,10 @@
1
+ import { errorEnum } from '../types';
1
2
  /**
2
3
  * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
3
4
  * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
5
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
5
6
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
6
7
  */
7
- import { errorEnum } from '../types';
8
8
  declare const getType: (target: any) => string;
9
9
  declare class EventCenter {
10
10
  private events;
package/esm/util/index.js CHANGED
@@ -5,15 +5,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import { errorEnum } from "../types";
9
+ import { get } from "./get";
10
+
8
11
  /**
9
12
  * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
10
13
  * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11
14
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
12
15
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
13
16
  */
14
- /* eslint-disable @typescript-eslint/no-explicit-any */
15
- import { errorEnum } from "../types";
16
- import { get } from "./get";
17
17
  var getType = function getType(target) {
18
18
  return Object.prototype.toString.call(target).slice(8, -1).toLowerCase();
19
19
  };
@@ -79,7 +79,10 @@ var EventCenter = /*#__PURE__*/function () {
79
79
  value: function once(name, func, key) {
80
80
  var _this = this;
81
81
  var onceF = function onceF() {
82
- func.apply(void 0, arguments);
82
+ for (var _len2 = arguments.length, rest = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
83
+ rest[_key2] = arguments[_key2];
84
+ }
85
+ func.call.apply(func, [_this].concat(rest));
83
86
  _this.off(name, onceF, key);
84
87
  };
85
88
  this.on(name, onceF, key);
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@alipay/ams-checkout","version":"0.0.1694400497-dev.1","description":"","author":"","main":"esm/index.js","module":"esm/index.js","typings":"esm/index.d.ts","files":["dist","esm","LEGAL.md","LICENSE","README.md"],"scripts":{"build":"father build","ci":"npm run lint","cov":"jest --coverage","format":"prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"","lint":"eslint ./src","test":"jest"},"dependencies":{"axios":"^1.3.4","uuid":"^9.0.0"},"devDependencies":{"@babel/core":"^7.20.7","@babel/preset-env":"^7.20.2","@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^9.5.0","@types/jest":"^29.2.4","@types/uuid":"^9.0.0","@typescript-eslint/eslint-plugin":"latest","@typescript-eslint/parser":"^5.60.0","babel-jest":"^29.3.1","babel-loader":"^9.1.0","babel-plugin-import":"^1.13.0","eslint":"^8.36.0","eslint-plugin-prettier":"latest","father":"^4.2.3","jest":"^29.5.0","jest-environment-jsdom":"^29.3.1","prettier":"^2.8.4","prettier-plugin-organize-imports":"^3.2.3","prettier-plugin-packagejson":"^2.4.5","ts-jest":"^29.0.3","ts-node":"^10.9.1","typescript":"^4.9.5"},"engines":{},"publishConfig":{"access":"public"}}
1
+ {"name":"@alipay/ams-checkout","version":"0.0.1694675458-dev.0","description":"","author":"","main":"esm/index.js","module":"esm/index.js","typings":"esm/index.d.ts","files":["dist","esm","LEGAL.md","LICENSE","README.md"],"scripts":{"build":"father build","ci":"npm run lint","cov":"jest --coverage","format":"prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"","lint":"eslint ./src","test":"jest"},"dependencies":{"axios":"^1.3.4","uuid":"^9.0.0"},"devDependencies":{"@babel/core":"^7.20.7","@babel/preset-env":"^7.20.2","@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^9.5.0","@types/jest":"^29.2.4","@types/uuid":"^9.0.0","@typescript-eslint/parser":"^5.60.0","babel-jest":"^29.3.1","babel-loader":"^9.1.0","babel-plugin-import":"^1.13.0","eslint":"^8.36.0","father":"^4.2.3","jest":"^29.5.0","jest-environment-jsdom":"^29.3.1","prettier":"^2.8.4","prettier-plugin-organize-imports":"^3.2.3","prettier-plugin-packagejson":"^2.4.5","ts-jest":"^29.0.3","ts-node":"^10.9.1","typescript":"^4.9.5"},"engines":{},"publishConfig":{"access":"public"}}