@alipay/ams-checkout 0.0.1691379784-dev.2 → 0.0.1691379784-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umd/ams-checkout.min.js +1 -0
- package/esm/config/index.d.ts +2 -0
- package/esm/config/index.js +17 -0
- package/esm/config/request.d.ts +21 -0
- package/esm/config/request.js +67 -0
- package/esm/constant/index.d.ts +136 -0
- package/esm/constant/index.js +136 -0
- package/esm/core/component/index.d.ts +17 -0
- package/esm/core/component/index.js +100 -0
- package/esm/core/drop-in/index.d.ts +29 -0
- package/esm/core/drop-in/index.js +104 -0
- package/esm/core/instance/index.d.ts +59 -0
- package/esm/core/instance/index.js +254 -0
- package/esm/image/cta.svg +9 -0
- package/esm/index.d.ts +22 -0
- package/esm/index.js +63 -0
- package/esm/plugin/component/cashierApp.d.ts +23 -0
- package/esm/plugin/component/cashierApp.js +122 -0
- package/esm/plugin/component/component.style.d.ts +8 -0
- package/esm/plugin/component/component.style.js +15 -0
- package/esm/plugin/component/index.d.ts +102 -0
- package/esm/plugin/component/index.js +900 -0
- package/esm/plugin/drop-in/index.d.ts +73 -0
- package/esm/plugin/drop-in/index.js +323 -0
- package/esm/request/index.d.ts +15 -0
- package/esm/request/index.js +145 -0
- package/esm/request/utils.d.ts +28 -0
- package/esm/request/utils.js +59 -0
- package/esm/service/index.d.ts +2 -0
- package/esm/service/index.js +40 -0
- package/esm/types/index.d.ts +216 -0
- package/esm/types/index.js +97 -0
- package/esm/util/createIframeNode.d.ts +5 -0
- package/esm/util/createIframeNode.js +35 -0
- package/esm/util/get.d.ts +25 -0
- package/esm/util/get.js +145 -0
- package/esm/util/index.d.ts +53 -0
- package/esm/util/index.js +237 -0
- package/esm/util/intl-callapp/es/browser.d.ts +21 -0
- package/esm/util/intl-callapp/es/browser.js +42 -0
- package/esm/util/intl-callapp/es/evoke.d.ts +13 -0
- package/esm/util/intl-callapp/es/evoke.js +39 -0
- package/esm/util/intl-callapp/es/generate.d.ts +29 -0
- package/esm/util/intl-callapp/es/generate.js +44 -0
- package/esm/util/intl-callapp/es/index.d.ts +43 -0
- package/esm/util/intl-callapp/es/index.js +298 -0
- package/esm/util/intl-callapp/es/main.d.ts +41 -0
- package/esm/util/intl-callapp/es/main.js +305 -0
- package/esm/util/intl-callapp/es/openWallet.d.ts +15 -0
- package/esm/util/intl-callapp/es/openWallet.js +197 -0
- package/esm/util/intl-callapp/es/types.d.ts +46 -0
- package/esm/util/intl-callapp/es/types.js +1 -0
- package/esm/util/intl-callapp/es/utils/config.d.ts +24 -0
- package/esm/util/intl-callapp/es/utils/config.js +57 -0
- package/esm/util/intl-callapp/es/utils/index.d.ts +15 -0
- package/esm/util/intl-callapp/es/utils/index.js +98 -0
- package/esm/util/mock.d.ts +1 -0
- package/esm/util/mock.js +4 -0
- package/package.json +1 -1
@@ -0,0 +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 A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(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 b(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 E(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 S(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 A(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 b(this,e,t,n);case"utf8":case"utf-8":return E(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 S(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 I(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 M(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 C(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 D(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 L(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||L(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||L(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||M(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||M(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||M(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||M(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||M(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||M(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||M(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||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||M(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||M(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||M(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||M(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||M(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||M(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)||C(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)||C(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||C(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||C(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||C(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||C(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);C(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);C(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||C(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||C(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||C(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||C(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(992),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},992: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:S(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 b=Object.getPrototypeOf,E=b&&b(b(P([])));E&&E!==n&&i.call(E,c)&&(g=E);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 S(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=A(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 A(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,A(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 Pr},AMSCheckout:function(){return xr},ERROR:function(){return ne},Target:function(){return re},checkoutDisplay:function(){return J},componentSignEnum:function(){return H},default:function(){return kr},environment:function(){return $},localeEnum:function(){return G},messageName:function(){return te},mode:function(){return Q},networkMode:function(){return X},osType:function(){return Z},paymentMethodCategoryTypeEnum:function(){return V},productSceneEnum:function(){return W},terminalType:function(){return ee}});var e=n(702),t=n.n(e),o=n(486),i=n.n(o),a=n(374),s=n.n(a),c=n(821),u=n.n(c),l=n(400),f=n.n(l),d=n(143),p=n.n(d),h=n(925),m=n.n(h),v={DOMAIN_NOT_IN_WHITE_LIST:{errorCode:"SDK_INTERNAL_ERROR",errorMessage:"Origin of the message is not in the white list"},NOT_JSON_FORMAT:{errorCode:"SDK_INTERNAL_ERROR",errorMessage:"The message string should conform to the json format"},SDK_COMPATIBILITY_ISSUES:{errorCode:"SDK_INTERNAL_ERROR",BROWSER_NOT_SUPPORT_POSTMESSAGE:{errorCode:"SDK_INTERNAL_ERROR",errorMessage:"The browser does not support the postmessage communication mode"},FAILED_TO_CREATE_IFRAME:{errorCode:"SDK_INTERNAL_ERROR",errorMessage:"Failed to create iframe"}},INIT_PARAMETER_ERROR:{errorCode:"SDK_INIT_PARAMETER_ERROR",UI_MODE_NOT_SUPPORTED:{errorCode:"SDK_INIT_PARAMETER_ERROR",errorMessage:"This UI mode is not supported"},ENVIRONMENT_ERROR:{errorCode:"SDK_INIT_PARAMETER_ERROR",errorMessage:"The current input environment does not support or is not in the standard enumeration"},MODE_ERROR:{errorCode:"SDK_INIT_PARAMETER_ERROR",errorMessage:"mode value not in enum"},LOCALE_ERROR:{errorCode:"SDK_INIT_PARAMETER_ERROR",errorMessage:"The current input language does not support or is not in the standard enumeration"},NET_MODE_NOT_SUPPORT:{errorCode:"SDK_INIT_PARAMETER_ERROR",errorMessage:"The network mode is not supported"},EVENT_ERROR:{errorCode:"SDK_INIT_PARAMETER_ERROR",errorMessage:"Parameter type should be function"}},CREATEPAYMENT_PARAMETER_ERROR:{errorCode:"SDK_CREATEPAYMENT_PARAMETER_ERROR"},CONFIRMPAYMENT_PARAMETER_ERROR:{errorCode:"SDK_CONFIRMPAYMENT_PARAMETER_ERROR"},CREATECOMPONENT_ERROR:{errorCode:"SDK_CREATECOMPONENT_ERROR",errorMessage:"Failed to create component",SINGLETON_COMPONENT_ERROR:{errorCode:"SDK_CREATECOMPONENT_ERROR",errorMessage:"Only one component can be rendered simultaneously"}},SDK_CALL_URL_ERROR:{errorCode:"SDK_CALL_URL_ERROR",REDIRECT_ERROR:{errorCode:"SDK_CALL_URL_ERROR",errorMessage:"Redirect data exception"}}},y="CHECKOUT",g="COMPONENT",b={name:"onReady",uniqueKey:"userOnReady"},E={name:"onError",uniqueKey:"userOnError"},w={name:"onPaymentMethodSelected",uniqueKey:"userOnPaymentMethodSelected"},_={name:"onSizeChanged",uniqueKey:"userOnSizeChanged"},R={name:"onLog",uniqueKey:"userOnLog"},S={name:"onLaunch"},A={name:"onRedirect"},O={name:"onClose",uniqueKey:"userOnClose"},T={name:"onEventCallback",uniqueKey:"userEventCallback"},x={name:"submitForm"},P={name:"hideCloseButton"},k={name:"showCloseButton"},I={name:"setAllowRetention"},M={name:"declareCheckoutInfo"},C={name:"showPopup"},D={name:"dismissLoading"},N=n(662),L=n.n(N),U=n(404),B=n.n(U),j=n(118),K=n.n(j),F={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"},z="1.4.0",Y=n(944),q=n.n(Y),H=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}({}),W=function(e){return e.EASY_PAY="EASY_PAY",e.CASHIER_PAYMENT="CASHIER_PAYMENT",e.AUTO_DEBIT="AUTO_DEBIT",e}({}),V=function(e){return e.CARD="CARD",e.WALLET="WALLET",e.BANK="BANK",e}({}),G=function(e){return e["en-US"]="en-US",e}({}),J=function(e){return e.horizon="horizon",e.vertical="vertical",e}({}),Q=function(e){return e.dropin="dropin",e.component="component",e}({}),X=function(e){return e.proxy="proxy",e.session="session",e}({}),$=function(e){return e.sandbox="sandbox",e.prod="prod",e.light_sandbox="light_sandbox",e}({}),Z=function(e){return e.IOS="IOS",e.ANDROID="ANDROID",e.ELSE="ELSE",e}({}),ee=function(e){return e.WEB="WEB",e.WAP="WAP",e.APP="APP",e.MINI_APP="MINI_APP",e}({}),te=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}({}),ne=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}({}),re=function(e){return e.BLANK="_blank",e.SELF="_self",e}({}),oe=".".charCodeAt(0),ie=/\\(\\)?/g,ae=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),se=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ce=/^\w*$/;function ue(e){if("string"==typeof e)return e;var t="".concat(e);return"0"===t&&1/e==-Infinity?"-0":t}function le(e,t){return Array.isArray(e)?e:function(e,t){if(Array.isArray(e))return!1;var n=q()(e);return"number"===n||"boolean"===n||null===e||ce.test(e)||!se.test(e)||null!==t&&e in Object(t)}(e,t)?[e]:(r=[],(n=e).charCodeAt(0)===oe&&r.push(""),n.replace(ae,(function(e,t,n,o){var i=e;return n?i=o.replace(ie,"$1"):t&&(i=t.trim()),r.push(i),""})),r);var n,r}function fe(e,t,n){var r=null===e?void 0:function(e,t){for(var n=le(t,e),r=0,o=n.length,i=e;null!==i&&r<o;)i=i[ue(n[r++])];return r&&r===o?i:void 0}(e,t);return void 0===r?n:r}var de=function(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()},pe=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}(),he=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]},me=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("&")},ve=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},ye=window.navigator,ge=ye.userAgent,be=/iPhone|iPad|iPod/i.test(ge)||"MacIntel"===ye.platform&&ye.maxTouchPoints>1,Ee=/Android/i.test(ge),we=(/\bMacintosh\b/.test(ge),/Windows NT/.test(ge),be),_e=Ee,Re=!!/Android|iPhone|iPad|iPod|Mobile/.test(ge),Se=function(e,t){try{return JSON.parse(e)||t}catch(e){return t}},Ae=function(e,t){var n=fe(e,"Result-Status")||fe(e,"result-status","");if(!n)return null;if(2e3==+n)return{success:!1,traceId:t,errorCode:ne.LOGIN,resultStatus:n};if(4001==+n)return{success:!1,traceId:t,errorCode:ne.TIMEOUT,resultStatus:n};if(1e3!=+n){var r=fe(e,"Tips")||fe(e,"tips",""),o=fe(e,"Memo")||fe(e,"memo","");return{success:!1,traceId:t,errorCode:ne.GATEWAY,errorMessage:decodeURIComponent(r||""),result:{resultStatus:n||"",tips:decodeURIComponent(r||""),memo:decodeURIComponent(o||"")},resultStatus:n}}return null},Oe=function(){var e=ye.userAgent;return!["Android","iPhone","SymbianOS","Windows Phone","iPod"].some((function(t){return e.includes(t)}))},Te=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},xe=function(){var e=document.documentElement.clientWidth,t=Oe()?130:100*e/390;return Math.min(t,130)},Pe=Te(),ke=Pe._light_sandbox,Ie=Pe.groupId,Me=Pe.requestHost,Ce={local:"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",dev:Me||"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",sit:Me||"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"},De="ANTOM_PAYMENT_WEB",Ne=Ie||"GROUP_20230523202227";function Le(e,t){return function(){return e.apply(t,arguments)}}var Ue,Be=Object.prototype.toString,je=Object.getPrototypeOf,Ke=(Ue=Object.create(null),function(e){var t=Be.call(e);return Ue[t]||(Ue[t]=t.slice(8,-1).toLowerCase())}),Fe=function(e){return e=e.toLowerCase(),function(t){return Ke(t)===e}},ze=function(e){return function(t){return Y(t)===e}},Ye=Array.isArray,qe=ze("undefined");var He=Fe("ArrayBuffer");var We=ze("string"),Ve=ze("function"),Ge=ze("number"),Je=function(e){return null!==e&&"object"===Y(e)},Qe=function(e){if("object"!==Ke(e))return!1;var t=je(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Xe=Fe("Date"),$e=Fe("File"),Ze=Fe("Blob"),et=Fe("FileList"),tt=Fe("URLSearchParams");function nt(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"!==Y(e)&&(e=[e]),Ye(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 rt(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 ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,it=function(e){return!qe(e)&&e!==ot};var at,st,ct=(at="undefined"!=typeof Uint8Array&&je(Uint8Array),function(e){return at&&e instanceof at}),ut=Fe("HTMLFormElement"),lt=(st=Object.prototype.hasOwnProperty,function(e,t){return st.call(e,t)}),ft=Fe("RegExp"),dt=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};nt(n,(function(n,o){!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},pt="abcdefghijklmnopqrstuvwxyz",ht="0123456789",mt={DIGIT:ht,ALPHA:pt,ALPHA_DIGIT:pt+pt.toUpperCase()+ht};var vt=Fe("AsyncFunction"),yt={isArray:Ye,isArrayBuffer:He,isBuffer:function(e){return null!==e&&!qe(e)&&null!==e.constructor&&!qe(e.constructor)&&Ve(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||Ve(e.append)&&("formdata"===(t=Ke(e))||"object"===t&&Ve(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&He(e.buffer)},isString:We,isNumber:Ge,isBoolean:function(e){return!0===e||!1===e},isObject:Je,isPlainObject:Qe,isUndefined:qe,isDate:Xe,isFile:$e,isBlob:Ze,isRegExp:ft,isFunction:Ve,isStream:function(e){return Je(e)&&Ve(e.pipe)},isURLSearchParams:tt,isTypedArray:ct,isFileList:et,forEach:nt,merge:function e(){for(var t=it(this)&&this||{},n=t.caseless,r={},o=function(t,o){var i=n&&rt(r,o)||o;Qe(r[i])&&Qe(t)?r[i]=e(r[i],t):Qe(t)?r[i]=e({},t):Ye(t)?r[i]=t.slice():r[i]=t},i=0,a=arguments.length;i<a;i++)arguments[i]&&nt(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 nt(t,(function(t,r){n&&Ve(t)?e[r]=Le(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&&je(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Ke,kindOfTest:Fe,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(Ye(e))return e;var t=e.length;if(!Ge(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:ut,hasOwnProperty:lt,hasOwnProp:lt,reduceDescriptors:dt,freezeMethods:function(e){dt(e,(function(t,n){if(Ve(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];Ve(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 Ye(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:rt,global:ot,isContextDefined:it,ALPHABET:mt,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]:mt.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&Ve(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(Je(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=Ye(n)?[]:{};return nt(n,(function(t,n){var i=e(t,r+1);!qe(i)&&(o[n]=i)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:vt,isThenable:function(e){return e&&(Je(e)||Ve(e))&&Ve(e.then)&&Ve(e.catch)}};function gt(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)}yt.inherits(gt,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:yt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var bt=gt.prototype,Et={};["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){Et[e]={value:e}})),Object.defineProperties(gt,Et),Object.defineProperty(bt,"isAxiosError",{value:!0}),gt.from=function(e,t,n,r,o,i){var a=Object.create(bt);return yt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),gt.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var wt=gt,_t=n(207).lW;function Rt(e){return yt.isPlainObject(e)||yt.isArray(e)}function St(e){return yt.endsWith(e,"[]")?e.slice(0,-2):e}function At(e,t,n){return e?e.concat(t).map((function(e,t){return e=St(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var Ot=yt.toFlatObject(yt,{},null,(function(e){return/^is[A-Z]/.test(e)}));var Tt=function(e,t,n){if(!yt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=yt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!yt.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&yt.isSpecCompliantForm(t);if(!yt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(yt.isDate(e))return e.toISOString();if(!s&&yt.isBlob(e))throw new wt("Blob is not supported. Use a Buffer instead.");return yt.isArrayBuffer(e)||yt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):_t.from(e):e}function u(e,n,o){var s=e;if(e&&!o&&"object"===Y(e))if(yt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(yt.isArray(e)&&function(e){return yt.isArray(e)&&!e.some(Rt)}(e)||(yt.isFileList(e)||yt.endsWith(n,"[]"))&&(s=yt.toArray(e)))return n=St(n),s.forEach((function(e,r){!yt.isUndefined(e)&&null!==e&&t.append(!0===a?At([n],r,i):null===a?n:n+"[]",c(e))})),!1;return!!Rt(e)||(t.append(At(o,n,i),c(e)),!1)}var l=[],f=Object.assign(Ot,{defaultVisitor:u,convertValue:c,isVisitable:Rt});if(!yt.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!yt.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),yt.forEach(n,(function(n,i){!0===(!(yt.isUndefined(n)||null===n)&&o.call(t,n,yt.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function xt(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Pt(e,t){this._pairs=[],e&&Tt(e,this,t)}var kt=Pt.prototype;kt.append=function(e,t){this._pairs.push([e,t])},kt.toString=function(e){var t=e?function(t){return e.call(this,t,xt)}:xt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var It=Pt;function Mt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ct(e,t,n){if(!t)return e;var r,o=n&&n.encode||Mt,i=n&&n.serialize;if(r=i?i(t,n):yt.isURLSearchParams(t)?t.toString():new It(t,n).toString(o)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var Dt,Nt=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){yt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),t}(),Lt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ut={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:It,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:("undefined"==typeof navigator||"ReactNative"!==(Dt=navigator.product)&&"NativeScript"!==Dt&&"NS"!==Dt)&&"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 Bt=function(e){function t(e,n,r,o){var i=e[o++],a=Number.isFinite(+i),s=o>=e.length;return i=!i&&yt.isArray(r)?r.length:i,s?(yt.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&yt.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&yt.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(yt.isFormData(e)&&yt.isFunction(e.entries)){var n={};return yt.forEachEntry(e,(function(e,r){t(function(e){return yt.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null},jt={"Content-Type":void 0};var Kt={transitional:Lt,adapter:["xhr","http"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=yt.isObject(e);if(i&&yt.isHTMLForm(e)&&(e=new FormData(e)),yt.isFormData(e))return o&&o?JSON.stringify(Bt(e)):e;if(yt.isArrayBuffer(e)||yt.isBuffer(e)||yt.isStream(e)||yt.isFile(e)||yt.isBlob(e))return e;if(yt.isArrayBufferView(e))return e.buffer;if(yt.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 Tt(e,new Ut.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Ut.isNode&&yt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=yt.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Tt(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(yt.isString(e))try{return(t||JSON.parse)(e),yt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Kt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&yt.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 wt.from(e,wt.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:Ut.classes.FormData,Blob:Ut.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};yt.forEach(["delete","get","head"],(function(e){Kt.headers[e]={}})),yt.forEach(["post","put","patch"],(function(e){Kt.headers[e]=yt.merge(jt)}));var Ft=Kt,zt=yt.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"]),Yt=Symbol("internals");function qt(e){return e&&String(e).trim().toLowerCase()}function Ht(e){return!1===e||null==e?e:yt.isArray(e)?e.map(Ht):String(e)}function Wt(e,t,n,r,o){return yt.isFunction(r)?r.call(this,t,n):(o&&(t=n),yt.isString(t)?yt.isString(r)?-1!==t.indexOf(r):yt.isRegExp(r)?r.test(t):void 0:void 0)}var Vt=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=yt.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Ht(e))}var i=function(e,t){return yt.forEach(e,(function(e,n){return o(e,n,t)}))};return yt.isPlainObject(e)||e instanceof this.constructor?i(e,t):yt.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]&&zt[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=yt.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(yt.isFunction(t))return t.call(this,r,n);if(yt.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=yt.findKey(this,e);return!(!n||void 0===this[n]||t&&!Wt(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=yt.findKey(n,e);!o||t&&!Wt(0,n[o],o,t)||(delete n[o],r=!0)}}return yt.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&&!Wt(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return yt.forEach(this,(function(r,o){var i=yt.findKey(n,o);if(i)return t[i]=Ht(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]=Ht(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 yt.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&yt.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[Yt]=this[Yt]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=qt(e);t[r]||(!function(e,t){var n=yt.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 yt.isArray(e)?e.forEach(r):r(e),this}}]),r}(Symbol.iterator,Symbol.toStringTag);Vt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),yt.freezeMethods(Vt.prototype),yt.freezeMethods(Vt);var Gt=Vt;function Jt(e,t){var n=this||Ft,r=t||n,o=Gt.from(r.headers),i=r.data;return yt.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Qt(e){return!(!e||!e.__CANCEL__)}function Xt(e,t,n){wt.call(this,null==e?"canceled":e,wt.ERR_CANCELED,t,n),this.name="CanceledError"}yt.inherits(Xt,wt,{__CANCEL__:!0});var $t=Xt;var Zt=Ut.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),yt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),yt.isString(r)&&a.push("path="+r),yt.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 en(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 tn=Ut.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=yt.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};var nn=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 rn(e,t){var n=0,r=nn(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 on="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,o=e.data,i=Gt.from(e.headers).normalize(),a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}yt.isFormData(o)&&(Ut.isStandardBrowserEnv||Ut.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=en(e.baseURL,e.url);function d(){if(c){var r=Gt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new wt("Request failed with status code "+n.status,[wt.ERR_BAD_REQUEST,wt.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(),Ct(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 wt("Request aborted",wt.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new wt("Network Error",wt.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||Lt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new wt(t,r.clarifyTimeoutError?wt.ETIMEDOUT:wt.ECONNABORTED,e,c)),c=null},Ut.isStandardBrowserEnv){var p=(e.withCredentials||tn(f))&&e.xsrfCookieName&&Zt.read(e.xsrfCookieName);p&&i.set(e.xsrfHeaderName,p)}void 0===o&&i.setContentType(null),"setRequestHeader"in c&&yt.forEach(i.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),yt.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",rn(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",rn(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){c&&(n(!t||t.type?new $t(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===Ut.protocols.indexOf(m)?n(new wt("Unsupported protocol "+m+":",wt.ERR_BAD_REQUEST,e)):c.send(o||null)}))},an={http:null,xhr:on};yt.forEach(an,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var sn=function(e){for(var t,n,r=(e=yt.isArray(e)?e:[e]).length,o=0;o<r&&(t=e[o],!(n=yt.isString(t)?an[t.toLowerCase()]:t));o++);if(!n){if(!1===n)throw new wt("Adapter ".concat(t," is not supported by the environment"),"ERR_NOT_SUPPORT");throw new Error(yt.hasOwnProp(an,t)?"Adapter '".concat(t,"' is not available in the build"):"Unknown adapter '".concat(t,"'"))}if(!yt.isFunction(n))throw new TypeError("adapter is not a function");return n};function cn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $t(null,e)}function un(e){return cn(e),e.headers=Gt.from(e.headers),e.data=Jt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sn(e.adapter||Ft.adapter)(e).then((function(t){return cn(e),t.data=Jt.call(e,e.transformResponse,t),t.headers=Gt.from(t.headers),t}),(function(t){return Qt(t)||(cn(e),t&&t.response&&(t.response.data=Jt.call(e,e.transformResponse,t.response),t.response.headers=Gt.from(t.response.headers))),Promise.reject(t)}))}var ln=function(e){return e instanceof Gt?e.toJSON():e};function fn(e,t){t=t||{};var n={};function r(e,t,n){return yt.isPlainObject(e)&&yt.isPlainObject(t)?yt.merge.call({caseless:n},e,t):yt.isPlainObject(t)?yt.merge({},t):yt.isArray(t)?t.slice():t}function o(e,t,n){return yt.isUndefined(t)?yt.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!yt.isUndefined(t))return r(void 0,t)}function a(e,t){return yt.isUndefined(t)?yt.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(ln(e),ln(t),!0)}};return yt.forEach(Object.keys(Object.assign({},e,t)),(function(r){var i=c[r]||o,a=i(e[r],t[r],r);yt.isUndefined(a)&&i!==s||(n[r]=a)})),n}var dn="1.4.0",pn={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){pn[e]=function(n){return Y(n)===e||"a"+(t<1?"n ":" ")+e}}));var hn={};pn.transitional=function(e,t,n){function r(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new wt(r(o," has been removed"+(t?" in "+t:"")),wt.ERR_DEPRECATED);return t&&!hn[o]&&(hn[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 mn={assertOptions:function(e,t,n){if("object"!==Y(e))throw new wt("options must be an object",wt.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 wt("option "+i+" must be "+c,wt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new wt("Unknown option "+i,wt.ERR_BAD_OPTION)}},validators:pn},vn=mn.validators,yn=function(){function t(e){o(this,t),this.defaults=e,this.interceptors={request:new Nt,response:new Nt}}return e(t,[{key:"request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n,r=t=fn(this.defaults,t),o=r.transitional,i=r.paramsSerializer,a=r.headers;void 0!==o&&mn.assertOptions(o,{silentJSONParsing:vn.transitional(vn.boolean),forcedJSONParsing:vn.transitional(vn.boolean),clarifyTimeoutError:vn.transitional(vn.boolean)},!1),null!=i&&(yt.isFunction(i)?t.paramsSerializer={serialize:i}:mn.assertOptions(i,{encode:vn.function,serialize:vn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),(n=a&&yt.merge(a.common,a[t.method]))&&yt.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete a[e]})),t.headers=Gt.concat(n,a);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=[un.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=un.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 Ct(en((e=fn(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),t}();yt.forEach(["delete","get","head","options"],(function(e){yn.prototype[e]=function(t,n){return this.request(fn(n||{},{method:e,url:t,data:(n||{}).data}))}})),yt.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(fn(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}yn.prototype[e]=t(),yn.prototype[e+"Form"]=t(!0)}));var gn=yn,bn=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 $t(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}(),En=bn;var wn={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(wn).forEach((function(e){var t=h(e,2),n=t[0],r=t[1];wn[r]=n}));var _n=wn;var Rn=function e(t){var n=new gn(t),r=Le(gn.prototype.request,n);return yt.extend(r,gn.prototype,n,{allOwnKeys:!0}),yt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(fn(t,n))},r}(Ft);Rn.Axios=gn,Rn.CanceledError=$t,Rn.CancelToken=En,Rn.isCancel=Qt,Rn.VERSION=dn,Rn.toFormData=Tt,Rn.AxiosError=wt,Rn.Cancel=Rn.CanceledError,Rn.all=function(e){return Promise.all(e)},Rn.spread=function(e){return function(t){return e.apply(null,t)}},Rn.isAxiosError=function(e){return yt.isObject(e)&&!0===e.isAxiosError},Rn.mergeConfig=fn,Rn.AxiosHeaders=Gt,Rn.formToJSON=function(e){return Bt(yt.isHTMLForm(e)?new FormData(e):e)},Rn.HttpStatusCode=_n,Rn.default=Rn;var Sn=Rn,An=Te()._sandbox;function On(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:Me||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",dev:Me||"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=Ie||"GROUP_20230315210531";return r[e]&&"light_sandbox"===t||"true"===ke?{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)||Ce[a],u=K()((t={appId:s.appId||De,workspaceId:"pre"===e.env?"pre":"default"},p()(t,"x-cors-".concat(De.toLowerCase(),"-default"),"1"),p()(t,"version","2.0"),p()(t,"sofa-group-name",s.sofaId||Ne),p()(t,"Operation-Type",s["Operation-Type"]||e["Operation-Type"]||""),p()(t,"Client-Time",i),p()(t,"tntInstId","ALIPW3SG"),p()(t,"sdk-version",z||""),t),e.headers);return"true"!==An&&"sandbox"!==a||(u["load-test"]=!0,u.sofaPenAttrs="instMock=O&loadMode=2"),"dev"!==a&&delete u["sofa-group-name"],Sn.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 Tn(e,t){return xn.apply(this,arguments)}function xn(){return(xn=B()(L()().mark((function e(t,n){var r,o,i,a,s,c,u,l,f,d,p,h,m,v;return L()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=On(n),Date.now(),o={terminalType:Oe()?"WEB":"WAP",browserInfo:{browserJavaScriptEnabled:!0,browserLanguage:navigator.language,browserUserAgent:navigator.userAgent,browserColorDepth:screen.colorDepth},locale:window._amsSdkLanguage||"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=we?"IOS":"ANDROID"),a=n.needEnvInfo?[K()(K()({},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=fe(u,"Mgw-TraceId")||fe(u,"mgw-traceid",""),l.traceId=f||"",null==(d=Ae(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=Se(null===e.t0||void 0===e.t0?void 0:e.t0.message,{success:!1,errorCode:ne.SYSTEM,errorMessage:""}),m=null!==e.t0&&void 0!==e.t0&&null!==(p=e.t0.message)&&void 0!==p&&p.includes("timeout")?ne.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 Pn(){return(Pn=B()(L()().mark((function e(t,n){var r;return L()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=((null==t?void 0:t.paymentSessionData)||"").split("&&")[1]||"",e.abrupt("return",Tn(t,K()(K()({},n),{},{hostSign:r,needEnvInfo:!0,"Operation-Type":"com.ipay.iexpcashier.sdkAction.query"})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var kn=function(e){try{return JSON.parse(e).versionMap.web[z].targetWebVerison}catch(e){return""}},In=function(e,t){var n,r=(n={},p()(n,H.NONE,[""]),p()(n,H.AUTO_DEBIT_WALLET,["1.0"]),p()(n,H.CASHIER_PAYMENT_BANK,["1.0"]),p()(n,H.CASHIER_PAYMENT_CARD,["1.0"]),p()(n,H.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},Mn=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=Te()||{},a=i.host,s=kn(o)||t,c=In(n,r);return a&&!["sandbox","light_sandbox","prod"].includes(e)?a:"".concat(F[e],"/").concat(n,"/").concat(c,"/index.").concat(s,".html")};var Cn,Dn=window.innerHeight,Nn=function(e,t){try{(t||document.getElementById("ams-component-container")).style.fontSize="".concat(xe(),"px"),Dn=window.innerHeight}catch(e){}},Ln="ams-component-mockup",Un="ams-component-loading",Bn="_ams_sdk_component_listener",jn=function(){function e(){i()(this,e),p()(this,"app",void 0),p()(this,"appDomain",void 0),p()(this,"AMSSDK",void 0),p()(this,"platform",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",H.NONE),p()(this,"_performanceData",[]),p()(this,"_isInitComponent",void 0),p()(this,"_clickEventName",void 0),this._appVersion="1.4.0",this._isInitComponent=!1,this._selector="#ams-component-section",this.createIframeNode=function(){return Promise.resolve()},this.platform=Oe()?"desktop":"mobile",this._clickEventName="mobile"===this.platform?"touchend":"click",this._isRetention=!0,window.removeEventListener("resize",Nn),window.removeEventListener("pageShow",Nn),window.removeEventListener("DOMContentLoaded",Nn),window.addEventListener("resize",Nn),window.addEventListener("pageShow",Nn),window.addEventListener("DOMContentLoaded",Nn),this.createMountElement(),this._performanceData.push({key:"sdk_init",value:Date.now()})}var n;return t()(e,[{key:"logoutPlugin",value:function(){this.closeCashier()}},{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,r=this;if(this._isInitComponent)return Promise.reject(v.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR);if(this._isInitComponent=!0,this._renderParams=t,this._componentSign=e,this._performanceData.push({key:"sdk_create_component",value:Date.now()}),this.createRetentionPopup(),this.createMockup(),!1!==(null==t||null===(n=t.appearance)||void 0===n?void 0:n.showLoading)){var o=document.getElementById(Ln);o&&(o.style.display="block"),this.showLoading()}return this.showCashier(),this.createApp(t),this.createActionQueryPromise(),Promise.all([this.createIframeNode(this,K()(K()({},t),{},{selector:this._selector})),this._actionQueryPromise]).catch((function(){r._isInitComponent=!1}))}},{key:"createActionQueryPromise",value:function(){var e=this;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(H.CASHIER_PAYMENT_CARD===e._componentSign&&(a.paymentMethodType="CARD"),H.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===W.EASY_PAY&&"2.0"===l&&!m)return t({message:"sdk no need to make query request",success:!0})}if(H.AUTO_DEBIT_WALLET===e._componentSign){var y,g,b,w,_=(null===(y=e._renderParams)||void 0===y||null===(g=y.paymentSessionMetaData)||void 0===g?void 0:g.action)||{},R=Oe()?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(function(){var e,t,n;return"MOCK"===(null===(e=window)||void 0===e||null===(t=e.process)||void 0===t||null===(n=t.env)||void 0===n?void 0:n.NODE_ENV)&&window.location.href.indexOf("LOCAL_MOCK=1")>-1}())return t({message:"sdk no need to make query request",success:!0});(function(e,t){return Pn.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):(t(n),e.dispatchToSDK(E.name,v.CREATECOMPONENT_ERROR))})).catch((function(t){n(t),e.closeCashier()}))}))}},{key:"cleanApp",value:function(){try{if(this.app=null,this._removeEventListener(),"string"===de(this._selector)){var e=document.querySelector(this._selector);e&&(e.innerHTML="")}}catch(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(Mn(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){var t=document.createElement("iframe"),n={dropin:"checkout-dropin",component:"checkout-component"}[e]||"checkout-component";return t.id=n,t.style.height="0",t.style.width="100%",t.style.border="0",t.style.overflow="hidden",t}(this.AMSSDK.options.mode),this.app.src=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=Mn(i,a,t,o,s||""),f=he("initial-scale")||1,d=Te(),p=d._sandbox,h=d._light_sandbox,m=d.requestHost,v=void 0===m?"":m,y=d.groupId,g=void 0===y?"":y,b=d.LOCAL_MOCK,E=Object.assign({},{locale:c,scale:f,instanceId:u,sandbox:"light_sandbox"===i||"true"===h?"true":"false",analyticsEnabled:!1===(null==r?void 0:r.enabled)?"false":"true",sdkVersion:z,refUrl:window.location.href,shadow:"sandbox"===i||"true"===p?"true":"false",requestHost:v,groupId:g,LOCAL_MOCK:b}),w=me(E);return"".concat(l,"?").concat(w)}({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(E.name,Object.assign({},v.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME,{stack:e}))}}else this.dispatchToSDK(E.name,v.SDK_COMPATIBILITY_ISSUES.BROWSER_NOT_SUPPORT_POSTMESSAGE)}},{key:"listener",value:function(e){if(e.origin===this.appDomain)if(ve(e.data)){var t=JSON.parse(e.data);if(t.name!==te.APP_TO_SDK&&t.name!==te.APP_TO_APP||t.instanceId!==this.AMSSDK._instanceId)return;this._handleAppMessage(t)}else console.warn(v.NOT_JSON_FORMAT),this.dispatchToSDK(E.name,v.NOT_JSON_FORMAT)}},{key:"resizeListener",value:function(){document.getElementById("ams-component-container").style.transition="none",this.dispatchToApp({context:{event:"renderResize",data:{heightOfVisible:window.innerHeight,widthOfVisible:window.innerWidth}}})}},{key:"_addEventListener",value:function(){this._removeEventListener(),window["".concat(Bn,"_").concat(this.AMSSDK._instanceId)]=this.listener.bind(this),window["".concat(Bn,"_").concat(this.AMSSDK._instanceId,"_resize")]=this.resizeListener.bind(this),window.addEventListener("message",window["".concat(Bn,"_").concat(this.AMSSDK._instanceId)]),window.addEventListener("resize",window["".concat(Bn,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"_removeEventListener",value:function(){window.removeEventListener("message",window["".concat(Bn,"_").concat(this.AMSSDK._instanceId)]),window.removeEventListener("resize",window["".concat(Bn,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"_handleAppMessage",value:function(e){var t,n=[S.name,A.name,_.name,R.name,O.name,T.name,x.name,k.name,P.name,I.name,M.name,C.name,D.name];if(e.context.event!==D.name){if(n.includes(e.context.event)){if(e.context.event===S.name)return this._performanceData.push({key:"sdk_onLaunch",value:Date.now()}),void this.sendRenderEvent();if(e.context.event===_.name&&this.handleSizeChanged(e),e.context.event===O.name)return this.closeBtnFunc();if(e.context.event===A.name)return this.handleRedirect(e.context.data);if(e.context.event!==x.name)if(e.context.event!==P.name){if(e.context.event!==k.name)return e.context.event===I.name?(!0===e.context.data&&(this._isRetention=!0),void(!1===e.context.data&&(this._isRetention=!1))):void(e.context.event!==M.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 this.dispatchToSDK(T.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(Ln);r&&(r.style.background="#000000",r.style.opacity="0.6",r.style.display="block"),null===(n=document.getElementById(Un))||void 0===n||n.remove();var o=document.getElementById("ams-component-container");if(o.style.height="".concat(e.context.data.height,"px"),"desktop"===this.platform&&(o.classList.add("ams-component-container-desktop-animation"),e.context.data.width&&(o.style.width="".concat(e.context.data.width,"px"))),"mobile"===this.platform){o.classList.add("ams-component-container-mobile-animation");var i="ams-component-container-mobile-animation-style",a=document.getElementById(i);a&&(null==a||a.remove());var s=" @keyframes ams-component-container-slide-in {\n 0% {\n height: 1px;\n }\n 100% {\n height: ".concat(e.context.data.height,"px;\n }\n }\n @keyframes ams-component-container-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 }"),c=document.createElement("style");c.id=i,c.type="text/css",c.innerHTML=s,document.getElementsByTagName("head")[0].appendChild(c),setTimeout((function(){o.style.transition="height 0.28s ease-in-out"}),500)}this.app.style.height="".concat(e.context.data.height,"px"),this.app.style.width="100%",this.app.style.border="0",this.app.style.overflow="hidden"}}},{key:"handleRedirect",value:function(e){var t=this;this.closeCashier();var 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(T.name,{code:"SDK_CALL_URL_SUCCESS",message:"Successfully opened the app,".concat(e,": ").concat(n)})},o=function(){t.dispatchToSDK(T.name,{code:"SDK_CALL_URL_ERROR",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===re.BLANK)return n.normalUrl?(r("normalUrl",n.normalUrl),void window.open(n.normalUrl)):o();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,n=void 0===t?{}:t;try{if(n){var r,o,i,a=document.getElementById("ams-component-retention-title");if(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("ams-component-retention-sub-title");if(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("ams-component-retention-remain");if(g)if(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);else g.style.backgroundColor=null==n||null===(v=n.btnOK)||void 0===v?void 0:v.bg;var b,E,w,_,R,S,A,O=document.getElementById("ams-component-retention-leave");if(O)if(O.innerHTML=null==n||null===(b=n.btnCancel)||void 0===b?void 0:b.text,O.style.fontSize="".concat(null==n||null===(E=n.btnCancel)||void 0===E?void 0:E.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===(A=n.btnCancel)||void 0===A?void 0:A.bg);else O.style.backgroundColor=null==n||null===(S=n.btnCancel)||void 0===S?void 0:S.bg}}catch(e){console.error(e)}}},{key:"handleCloseBtnShow",value:function(e){var t=document.getElementById("asm-component-section-close-block");e?null==t||t.classList.remove("asm-component-close-block-hidden"):!1===e&&(null==t||t.classList.add("asm-component-close-block-hidden"))}},{key:"dispatchToSDK",value:function(e,t){this.AMSSDK.eventCenter.emit(e,t)}},{key:"dispatchToApp",value:function(e){var t=Object.assign({},e,{name:te.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:g,instanceId:this.AMSSDK._instanceId});this.app&&this.app.contentWindow&&this.app.contentWindow.postMessage(JSON.stringify(t),this.appDomain)}},{key:"subscribeFromSDK",value:function(){var e={};for(var t in e)e.hasOwnProperty(t)&&this.AMSSDK.eventCenter.on("".concat(g,"-").concat(t),e[t].bind(this))}},{key:"sendRenderEvent",value:(n=B()(L()().mark((function e(){var t,n,r;return L()().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:r=e.sent,this._performanceData.push({key:"sdk_render_component",value:Date.now()}),this.dispatchToApp({context:{event:"renderComponent",data:{queryResult:r,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(Dn,window.innerHeight),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:"showLoading",value:function(){var e=document.createElement("div");null==e||e.classList.add(Un),e.id=Un,e.innerHTML='<div class="line"><div></div><div></div><div></div><div></div></div>',e.style.fontSize="".concat(xe(),"px");var t=document.getElementsByTagName("body")[0];null==t||t.appendChild(e)}},{key:"showCashier",value:function(){var e=document.getElementById("ams-component-container");null==e||e.classList.remove("ams-component-container-hidden-".concat(this.platform)),null==e||e.classList.add("ams-component-container-".concat(this.platform))}},{key:"closeCashier",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._performanceData=[],this._isInitComponent=!1,null===(e=document.getElementById(Un))||void 0===e||e.remove(),this.hideComponentAndCleanDom(t)}},{key:"hideComponentAndCleanDom",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=document.getElementById("ams-component-container");n.style.transition="",null==n||n.classList.remove("ams-component-container-".concat(this.platform)),null==n||n.classList.remove("ams-component-container-".concat(this.platform,"-animation")),null==n||n.classList.add("ams-component-container-hidden-".concat(this.platform));var r=function(){var t;document.getElementsByTagName("body")[0].style.overflow="auto";var r=document.getElementById(Ln);null==r||r.remove(),n&&(n.style.height=""),null===(t=document.getElementById("ams-component-container-mobile-animation-style"))||void 0===t||t.remove(),e.removeRetentionPopup(),e.cleanApp()};t?r():setTimeout((function(){r()}),300)}},{key:"closeBtnFunc",value:function(){this._isRetention?this.showRetentionPopup():(this.closeCashier(),this.dispatchToSDK(O.name,{}))}},{key:"createMountElement",value:function(){var e;(e=document.createElement("style")).type="text/css",e.innerHTML=".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: 1px;\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: translateX(-50%) translateY(-50%) scale(1);\n opacity: 1\n }\n \n 100% {\n opacity: 0;\n transform: translateX(-50%) translateY(-50%) scale(0.4);\n }\n}\n\n@keyframes ams-component-container-zoom-in {\n 0% {\n transform: translateX(-50%) translateY(-50%) scale(0.4);\n opacity: 0\n }\n\n 80% {\n opacity: 1\n }\n\n 100% {\n opacity: 1;\n transform: translateX(-50%) translateY(-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-fill-mode: forwards;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\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\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-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-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 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: 600;\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: 600;\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: 600;\n text-align: center;\n box-sizing: border-box;\n color: #FFFFFF;\n}\n\n.ams-component-retention-remain-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\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}\n\n#ams-component-retention-leave {\n border-radius: 100px;\n border: 1px solid #0079FF;\n font-style: normal;\n font-weight: 600;\n text-align: center;\n box-sizing: border-box;\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}\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}\n\n",document.head.appendChild(e);var t=document.createElement("div");t.className="ams-component-container-hidden-".concat(this.platform),t.id="ams-component-container",Nn(0,t),document.body.appendChild(t);var n=document.createElement("div");n.className="ams-component-section-".concat(this.platform),n.id=this._selector.slice(1),t.appendChild(n),this.createCloseBtn()}},{key:"createCloseBtn",value:function(){var e=this,t=document.getElementById("ams-component-container"),n="<img class='asm-component-close-btn-".concat(this.platform,"' src=\"").concat("https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg",'"/>'),r=document.createElement("div");r.classList.add("asm-component-close-block-".concat(this.platform),"asm-component-close-block-hidden"),r.id="asm-component-section-close-block",r.innerHTML=n,r.addEventListener(this._clickEventName,(function(){e.closeBtnFunc()})),t&&t.appendChild(r)}},{key:"createRetentionPopup",value:function(){var e=document.createElement("div");e.id="ams-component-retention",e.classList.add("ams-component-retention-".concat(this.platform)),e.innerHTML='\n <span id="ams-component-retention-title" class="ams-component-retention-title-'.concat(this.platform,'">\n Are you sure you want to leave?\n </span>\n <span\n id="ams-component-retention-sub-title"\n class="ams-component-retention-sub-title-').concat(this.platform,'"\n >\n If you leave this page, you\'ll have to start over again.\n </span>\n <div class="ams-component-retention-btn-block-').concat(this.platform,'">\n <div id="ams-component-retention-remain" class="ams-component-retention-remain-').concat(this.platform,'">\n Continue Payment\n </div>\n <div id="ams-component-retention-leave" class="ams-component-retention-leave-').concat(this.platform,'">\n Leave\n </div>\n </div>'),document.body.appendChild(e);var t=document.getElementById("ams-component-retention-remain");t&&t.addEventListener(this._clickEventName,this.hideRetentionPopup.bind(this));var n=document.getElementById("ams-component-retention-leave");n&&n.addEventListener(this._clickEventName,this.retentionPopupLeaveFunc.bind(this))}},{key:"retentionPopupLeaveFunc",value:function(){this.dispatchToSDK(O.name,{}),this.hideRetentionPopup(),this.closeCashier()}},{key:"removeRetentionPopup",value:function(){var e,t=document.getElementById("ams-component-retention-remain");t&&t.removeEventListener(this._clickEventName,this.hideRetentionPopup);var n=document.getElementById("ams-component-retention-leave");n&&n.removeEventListener(this._clickEventName,this.retentionPopupLeaveFunc),null===(e=document.getElementById("ams-component-retention"))||void 0===e||e.remove()}},{key:"showRetentionPopup",value:function(){var e=document.getElementById("ams-component-retention"),t=document.getElementById("ams-component-container");e&&(null==t||t.classList.add("ams-component-container-opacity"),e.classList.remove("ams-component-retention-hidden"),e.classList.add("ams-component-retention-show"))}},{key:"hideRetentionPopup",value:function(){var e=document.getElementById("ams-component-retention"),t=document.getElementById("ams-component-container");e&&(e.classList.remove("ams-component-retention-show"),e.classList.add("ams-component-retention-hidden"),setTimeout((function(){e.classList.remove("ams-component-retention-hidden"),null==t||t.classList.remove("ams-component-container-opacity")}),250))}},{key:"createMockup",value: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="#ffffff",t.style.opacity="0.5",t.style.display="none",t.id=Ln,e.appendChild(t)}},{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),this.closeCashier(!0),setTimeout((function(){r.submit()}),0)}}]),e}(),Kn=function(e,t){return new Promise((function(n,r){var o=null;if("string"===de(t.selector)&&(o=document.querySelector(t.selector)),null===o){var i={errorCode:v.CREATEPAYMENT_PARAMETER_ERROR.errorCode,errorMessage:"Failed to execute 'querySelector' on 'Document': ".concat(t.selector," is not a valid selector")};return r(i),void e._dispatchToSDK({name:te.APP_TO_SDK,instanceId:e.AMSSDK._instanceId,context:{event:E.name,data:i}})}o.innerHTML="",e.app&&o.appendChild(e.app),n()}))},Fn=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){Oe()&&null!=e&&e.paymentSessionConfig&&e.paymentSessionConfig.productScene===W.EASY_PAY&&(e.paymentSessionConfig.productSceneVersion="1.0")}(r),[r,o]},zn=function(e){var t=this;this.options.mode=Q.component,this.options.networkMode=this.options.networkMode||X.session;var n=e;return n&&!n.paymentSessionData?Promise.reject(v.CREATECOMPONENT_ERROR):this.options.networkMode===X.proxy?(console.warn(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage),Promise.reject(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT)):new Promise((function(e,r){var o=Fn(n.paymentSessionData),i=m()(o,2),a=i[0],s=i[1],c=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):H.NONE}(a);if(c===H.NONE)return r("".concat(v.CREATEPAYMENT_PARAMETER_ERROR.errorCode,":Abnormal response data, interface failure, or unsupported payment method"));n.paymentSessionData=s,n.paymentSessionMetaData=a;try{t._getPlugin(g).appendIframeNodes(c,n).then((function(){e()}))}catch(e){r(e)}}))},Yn=n(746),qn=n.n(Yn),Hn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"prod",t=arguments.length>1?arguments[1]:void 0,n="";switch(e){case"dev":n="http://page.alipay.net/page/antom-web-checkout/src/drop-in-app/index.".concat(t,".html");break;case"sandbox":n="https://pre.ac.alipay.com/page/antom-web-checkout/src/drop-in-app/index.".concat(t,".html");break;default:n="https://ac.alipay.com/page/antom-web-checkout/src/drop-in-app/index.".concat(t,".html")}return n},Wn=function(){function e(){i()(this,e),p()(this,"app",void 0),p()(this,"paymentMethodsResult",void 0),p()(this,"appDomain",void 0),p()(this,"AMSSDK",void 0),p()(this,"_render",void 0),p()(this,"_selector",void 0),p()(this,"_version",void 0),this._version="1.0.0",this._render=function(){return Promise.resolve()}}return t()(e,[{key:"applyPlugin",value:function(e){var t,n,r;this.AMSSDK=e,this._subscribeFromSDK(),this._addEventListener(),this.appDomain=(t=this.AMSSDK.options.env.environment,n=this._version,(r=/^https?:\/\/([^/<>\s]+\.?)*/.exec(Hn(t,n)))&&r[0]||""),this.app=this._createApp()}},{key:"setRender",value:function(e){this._render=e}},{key:"render",value:function(e){return this.paymentMethodsResult=e.paymentMethodsResult,this._selector=e.selector,this.app.src=this._getIframeUrl((null==e?void 0:e.appearance)||{}),this._render(this,{selector:e.selector})}},{key:"logoutPlugin",value:function(){try{this.app=null,this._removeEventListener();var e=null;"string"===de(this._selector)&&(e=document.querySelector(this._selector)),t=this._selector,("object"===("undefined"==typeof HTMLElement?"undefined":q()(HTMLElement))?t instanceof HTMLElement:t&&"object"===q()(t)&&1===t.nodeType&&"string"==typeof t.nodeName)&&(e=this._selector),e&&(e.innerHTML="")}catch(e){}var t}},{key:"_createApp",value:function(){var e;try{e=this._createIframe()}catch(e){return void this._dispatchToSDK({name:te.APP_TO_SDK,instanceId:this.AMSSDK._instanceId,context:{event:"onError",data:Object.assign({},v.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME,{stack:e})}})}if(!0==!!window.postMessage)return e;this._dispatchToSDK({name:te.APP_TO_SDK,instanceId:this.AMSSDK._instanceId,context:{event:"onError",data:v.SDK_COMPATIBILITY_ISSUES.BROWSER_NOT_SUPPORT_POSTMESSAGE}})}},{key:"_getIframeUrl",value:function(e){var t,n,r,o,i,a=Hn(this.AMSSDK.options.env.environment,this._version),s=he("initial-scale")||1,c=this.AMSSDK._instanceId,u=Object.assign({locale:this.AMSSDK.options.locale,scale:s,merchantDomain:window.btoa((t=window.location,n=t.origin,r=t.protocol,o=t.hostname,i=t.port,n||"".concat(r,"//").concat(o).concat(i?":".concat(i):""))),instanceId:c},e),l=me(u);return"".concat(a,"?").concat(l)}},{key:"_createIframe",value:function(){var e=document.createElement("iframe"),t=this._getIframeId(this.AMSSDK.options.mode);return e.id=t,e.style.height="100%",e.style.width="100%",e.style.border="0",e.style.overflow="hidden",e}},{key:"_getIframeId",value:function(e){var t="checkout-dropin";switch(e){case"DROPIN":t="checkout-dropin";break;case"COMPONENT":t="checkout-component"}return t}},{key:"_listener",value:function(e){if(e.origin===this.appDomain)if(ve(e.data)){var t=JSON.parse(e.data);if(t.name!==te.APP_TO_SDK&&t.name!==te.APP_TO_APP||t.instanceId!==this.AMSSDK._instanceId)return;this._handleAppMessage(t)}else console.warn(v.NOT_JSON_FORMAT),this._dispatchToSDK({name:te.APP_TO_SDK,instanceId:this.AMSSDK._instanceId,context:{event:"onError",data:v.NOT_JSON_FORMAT}})}},{key:"_addEventListener",value:function(){this._removeEventListener(),window.addEventListener("message",this._listener.bind(this))}},{key:"_removeEventListener",value:function(){window.removeEventListener("message",this._listener.bind(this))}},{key:"_handleAppMessage",value:function(e){[E.name,b.name,S.name,A.name,_.name,"onPaymentMethodsSelected",R.name].includes(e.context.event)&&("onLaunch"===e.context.event&&this._renderPaymentMethods(this.paymentMethodsResult),"onSizeChanged"===e.context.event&&(this.app.style.height="".concat(e.context.data.height,"px"),this.app.style.width="100%",this.app.style.border="0",this.app.style.overflow="hidden"),"onPaymentMethodsSelected"===e.context.event&&(e.context.event="onPaymentMethodSelected"),this._dispatchToSDK(e))}},{key:"_dispatchToSDK",value:function(e){var t=Object.assign({name:te.APP_TO_SDK,mode:this.AMSSDK.options.mode,appId:y,instanceId:this.AMSSDK._instanceId},e);this.AMSSDK.eventCenter.emit("".concat(y,"-").concat(e.context.event),t)}},{key:"_dispatchToApp",value:function(e){this.app&&this.app.contentWindow&&this.app.contentWindow.postMessage(JSON.stringify(e),this.appDomain)}},{key:"_subscribeFromSDK",value:function(){var e={handleRequestPayment:this._handleRequestPayment};for(var t in e)e.hasOwnProperty(t)&&this.AMSSDK.eventCenter.on("".concat(y,"-").concat(t),e[t].bind(this))}},{key:"_renderPaymentMethods",value:function(e){this._dispatchToApp({name:te.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:y,instanceId:this.AMSSDK._instanceId,context:{event:"renderPaymentMethods",data:e}})}},{key:"_handleRequestPayment",value:function(e){this._dispatchToApp(e)}}]),e}(),Vn=function(e){var t=this;return this.options.networkMode===X.proxy?new Promise((function(n,r){try{n(t._getPlugin(y).render(e))}catch(e){r(e)}})):(console.warn(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage),Promise.reject(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT))},Gn=function(e){var t=this;return new Promise((function(n,r){t.eventCenter.once("onRedirect",(function(e){t._redirect(e).then((function(){n()})).catch((function(e){r(e)}))})),t.eventCenter.emit("".concat(y,"-handleRequestPayment"),{name:te.SDK_TO_APP,mode:t.options.mode,appId:y,instanceId:t._instanceId,context:{event:"handleRequestPayment",data:e}})}))},Jn=function(){var e,t=this,n=new Map([[E.name,function(e){t.eventCenter.emit(E.name,e.context.data)}],[b.name,function(e){t.eventCenter.emit(b.name,e.context.data)}],[A.name,function(e){t.eventCenter.emit(A.name,e.context.data)}],[w.name,function(e){t.checkoutState.paymentMethodType=e.context.data.paymentMethodType,t.eventCenter.emit(w.name,{paymentMethodType:e.context.data.paymentMethodType})}],[_.name,function(e){t.eventCenter.emit(_.name,e.context.data)}],[R.name,function(e){t.eventCenter.emit(R.name,e.context.data)}]]),r=qn()(n.keys());try{for(r.s();!(e=r.n()).done;){var o=e.value;this.eventCenter.on("".concat(y,"-").concat(o),n.get(o))}}catch(e){r.e(e)}finally{r.f()}},Qn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},Xn=new Uint8Array(16);function $n(){if(!Cn&&!(Cn="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 Cn(Xn)}for(var Zn=[],er=0;er<256;++er)Zn.push((er+256).toString(16).slice(1));function tr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(Zn[e[t+0]]+Zn[e[t+1]]+Zn[e[t+2]]+Zn[e[t+3]]+"-"+Zn[e[t+4]]+Zn[e[t+5]]+"-"+Zn[e[t+6]]+Zn[e[t+7]]+"-"+Zn[e[t+8]]+Zn[e[t+9]]+"-"+Zn[e[t+10]]+Zn[e[t+11]]+Zn[e[t+12]]+Zn[e[t+13]]+Zn[e[t+14]]+Zn[e[t+15]]).toLowerCase()}var nr,rr,or,ir=function(e,t,n){if(Qn.randomUUID&&!t&&!e)return Qn.randomUUID();var r=(e=e||{}).random||(e.rng||$n)();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 tr(r)},ar=window.navigator.userAgent||"",sr=function(){var e=ar.match(/OS (\d+)_(\d+)_?(\d+)?/);return Number.parseInt(e[1],10)},cr=/android/i.test(ar),ur=/iphone|ipad|ipod/i.test(ar),lr=/chrome\/[\d.]+ mobile safari\/[\d.]+/i.test(ar)&&cr&&ar.indexOf("Version")<0,fr=/qqbrowser/i.test(ar),dr=/firefox/i.test(ar);/baidubrowser/i.test(ar);function pr(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 hr,mr,vr,yr=5e3;function gr(e,t){hr=+new Date,mr=setTimeout((function(){!(!!rr&&document[rr])&&e&&e()}),t||5e3)}function br(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||yr;o-(hr||+new Date)<i&&n(t)}}(e),mr&&clearTimeout(mr))}function Er(e){return/^(http|https|itms-apps|itms-appss|market):\/\//.test(e)}function wr(e){return wr="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},wr(e)}function _r(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 Rr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_r(Object(n),!0).forEach((function(t){Sr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sr(e,t,n){return(t=Or(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ar(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,Or(r.key),r)}}function Or(e){var t=function(e,t){if("object"!==wr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==wr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wr(t)?t:String(t)}!function(e){void 0!==e&&(void 0!==e.hidden?(rr="hidden",or="visibilitychange"):void 0!==e.mozHidden?(rr="mozHidden",or="mozvisibilitychange"):void 0!==e.msHidden?(rr="msHidden",or="msvisibilitychange"):void 0!==e.webkitHidden&&(rr="webkitHidden",or="webkitvisibilitychange"))}(document),function(e){e.SCHEME="Scheme",e.LINK="Link",e.INTENT="Intent"}(vr||(vr={}));var Tr=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=pr(r,i),n.options.scheme=pr(t,i),ur&&sr()>9?n.evokeLink():n.evokeScheme(n.evokeLink.bind(n))):r?(n.options.link=pr(r,i),n.evokeLink()):t?(n.options.scheme=pr(t,i),n.evokeScheme()):o&&o.scheme&&o.package&&n.handleIntent()};this.config=Rr(Rr({},{delay:0}),t),this.options={},this.timer=null,this.evokeAppBy={url:"",type:vr.LINK},this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e;nr||((nr=document.createElement("iframe")).id="callapp_iframe_".concat(Date.now()),nr.style.cssText="display:none;border:0;width:0;height:0;",document.body.appendChild(nr)),e={evokeAppBy:this.evokeAppBy,successCb:this.config.successCb,timeout:this.config.resultJudgmentTime},void 0!==or?document.addEventListener(or,(function(){return br(e)})):window.addEventListener("pagehide",(function(){return br(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&&Er(n))throw new Error("请填写正确格式的scheme");if(o&&!Er(o))throw new Error("请填写正确格式的link");if(r&&r.scheme&&Er(r.scheme))throw new Error("请填写正确格式的intent");this.handleDegradationStrategy()}},{key:"evokeLink",value:function(){this.evokeAppBy.type=vr.LINK;var e=this.options,t=e.link,n=e.delay;this.evokeByLocationDelay(t,n)}},{key:"evokeScheme",value:function(e){this.evokeAppBy.type=vr.SCHEME;var t=this.options,n=t.scheme,r=t.delay,o=t.fallback;ur?sr()>9||fr?this.evokeByTagADelay(n,r,o,e):this.evokeByIFrameDelay(n,r,o,e):lr||dr?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&&!Er(c)&&(this.evokeAppBy.type=vr.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){nr.src=e}(e)}),e,t,n,r)}},{key:"checkIsOpen",value:function(e,t,n){return this.evokeAppBy.url=e,gr(n||t,this.config.resultJudgmentTime)}},{key:"clearTimer",value:function(){this.timer&&clearTimeout(this.timer)}}])&&Ar(t.prototype,n),r&&Ar(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),xr=function(e){u()(r,e);var n=f()(r);function r(e){var t,o,a;return i()(this,r),t=n.call(this,e),p()(s()(t),"createComponent",void 0),p()(s()(t),"createPayment",void 0),p()(s()(t),"confirmPayment",void 0),Object.defineProperty(s()(t),"createComponent",{value:zn}),Object.defineProperty(s()(t),"createPayment",{value:Vn}),Object.defineProperty(s()(t),"confirmPayment",{value:Gn}),Object.defineProperty(s()(t),"_subscribeFromCheckoutPlugin",{value:Jn}),o=s()(t),(a=new jn).setRender(Kn),o._registerPlugin(g,a),function(e,t){var n=new Wn;n.setRender(Kn),t._registerPlugin(y,n),t._subscribeFromCheckoutPlugin()}(0,s()(t)),t}return t()(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=ir(),this.options={},this.eventCenter=new pe,this.checkoutState={paymentMethodType:""},this._initEvent(t),this._setOptions(t),this.plugins=new Map}return t()(e,[{key:"destroy",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){}}}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=Te()._moreEnv;null!=e&&e.environment&&!((null==e?void 0:e.environment)in $)&&"true"!==t&&(console.warn(v.INIT_PARAMETER_ERROR.ENVIRONMENT_ERROR.errorMessage),e.environment="prod"),this.options.env={terminalType:Re?ee.WAP:ee.WEB,environment:(null==e?void 0:e.environment)||"prod"},this.options.env.terminalType===ee.WAP&&(this.options.env.osType=we?Z.IOS:_e?Z.ANDROID:Z.ELSE)}},{key:"_setMode",value:function(e){this.options.mode=(null==e?void 0:e.mode)||Q.dropin,null!=e&&e.mode&&!((null==e?void 0:e.mode)in Q)&&(console.warn(v.INIT_PARAMETER_ERROR.MODE_ERROR.errorMessage),this.options.mode=Q.component),this.options.networkMode=(null==e?void 0:e.networkMode)||X.session,null!=e&&e.networkMode&&!((null==e?void 0:e.networkMode)in X)&&(console.warn(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage),this.options.networkMode=X.proxy)}},{key:"_initEvent",value:function(e){if(null!=e&&e.onError){if("function"!==de(e.onError))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(E.name,e.onError,E.uniqueKey)}if(null!=e&&e.onPaymentMethodSelected){if("function"!==de(e.onPaymentMethodSelected))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(w.name,e.onPaymentMethodSelected,w.uniqueKey)}if(null!=e&&e.onSizeChanged){if("function"!==de(e.onSizeChanged))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(_.name,e.onSizeChanged,_.uniqueKey)}if(null!=e&&e.onLog){if("function"!==de(e.onLog))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(R.name,e.onLog,R.uniqueKey)}if(null!=e&&e.onEventCallback){if("function"!==de(e.onEventCallback))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(T.name,e.onEventCallback,T.uniqueKey)}if(null!=e&&e.onClose){if("function"!==de(e.onClose))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(O.name,e.onClose,O.uniqueKey)}}},{key:"_registerPlugin",value:function(e,t){this.plugins.set(e,t);try{t.applyPlugin(this)}catch(t){if(this.plugins.delete(e),"error"===de(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===ee.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(v.SDK_CALL_URL_ERROR.REDIRECT_ERROR)};o?c():function(){if(a||s){var e={fallback:function(){c()},successCb:function(){n()},delay:0};try{new Tr(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)}},{key:"onError",value:function(e){this._overrideSubscription(E.name,e,E.uniqueKey)}},{key:"onSizeChanged",value:function(e){this._overrideSubscription(_.name,e,_.uniqueKey)}},{key:"onLog",value:function(e){this._overrideSubscription(R.name,e,R.uniqueKey)}}]),e}()),Pr=function(e){u()(r,e);var n=f()(r);function r(e){return i()(this,r),n.call(this,e)}return t()(r)}(xr),kr=xr}(),r}()}));
|
@@ -0,0 +1,17 @@
|
|
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
|
+
*/
|
8
|
+
import json from "../../package.json";
|
9
|
+
export var marmptMap = {
|
10
|
+
dev: 'http://page.alipay.net/page/antom-web-checkout/src/component-app',
|
11
|
+
sit: 'http://page.test.alipay.net/page/antom-web-checkout/src/component-app',
|
12
|
+
pre: 'https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app',
|
13
|
+
sandbox: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app',
|
14
|
+
light_sandbox: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app',
|
15
|
+
prod: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app'
|
16
|
+
};
|
17
|
+
export var sdkVersion = json.version;
|
@@ -0,0 +1,21 @@
|
|
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
|
+
*/
|
8
|
+
export declare const requestHost: {
|
9
|
+
[key: string]: string;
|
10
|
+
};
|
11
|
+
export declare const clientId = "5J5Y8X4E2Y25GR00690";
|
12
|
+
export declare const tntInstId = "ALIPW3SG";
|
13
|
+
export declare const appId = "ANTOM_PAYMENT_WEB";
|
14
|
+
export declare const sofaId: any;
|
15
|
+
export declare const hostSignMap: (hostSign: string | undefined, env: string) => string;
|
16
|
+
export declare const lightSandboxMap: (operationType: string | undefined, env: string) => {
|
17
|
+
appId: string;
|
18
|
+
sofaId: any;
|
19
|
+
baseURL: string;
|
20
|
+
'Operation-Type': string;
|
21
|
+
};
|
@@ -0,0 +1,67 @@
|
|
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
|
+
*/
|
8
|
+
|
9
|
+
import { queryParse } from "../util";
|
10
|
+
var _queryParse = queryParse(),
|
11
|
+
_light_sandbox = _queryParse._light_sandbox,
|
12
|
+
groupId = _queryParse.groupId,
|
13
|
+
host = _queryParse.requestHost;
|
14
|
+
export var requestHost = {
|
15
|
+
local: 'http://imgs-1164.gz00b.dev.alipay.net/mgw.htm',
|
16
|
+
dev: host || 'http://imgs-1164.gz00b.dev.alipay.net/mgw.htm',
|
17
|
+
sit: host || 'http://imgs-9.sggz00a.test.alipay.net/mgw.htm',
|
18
|
+
pre: 'https://imgs-sea-pre.alipay.com/mgw.htm',
|
19
|
+
prod: 'https://imgs-sea-global.alipay.com/mgw.htm',
|
20
|
+
sandbox: 'https://imgs-sea-global.alipay.com/mgw.htm'
|
21
|
+
};
|
22
|
+
export var clientId = '5J5Y8X4E2Y25GR00690';
|
23
|
+
export var tntInstId = 'ALIPW3SG';
|
24
|
+
export var appId = 'ANTOM_PAYMENT_WEB';
|
25
|
+
export var sofaId = groupId || 'GROUP_20230523202227';
|
26
|
+
export var hostSignMap = function hostSignMap(hostSign, env) {
|
27
|
+
var map = {
|
28
|
+
SG: 'https://imgs-sea-global.alipay.com/mgw.htm',
|
29
|
+
US: 'https://imgs-na-global.alipay.com/mgw.htm',
|
30
|
+
DE: 'https://imgs-de-global.alipay.com/mgw.htm'
|
31
|
+
};
|
32
|
+
var preMap = {
|
33
|
+
SG: 'https://imgs-sea-pre.alipay.com/mgw.htm',
|
34
|
+
US: 'https://imgs-pre.alipay.com/mgw.htm',
|
35
|
+
DE: 'https://imgs-de-pre.alipay.com/mgw.htm'
|
36
|
+
};
|
37
|
+
if (env === 'prod' || env === 'sandbox' || env === 'light_sandbox') {
|
38
|
+
return map[hostSign || 'SG'];
|
39
|
+
} else if (env === 'pre') {
|
40
|
+
return preMap[hostSign || 'SG'];
|
41
|
+
} else return '';
|
42
|
+
};
|
43
|
+
export var lightSandboxMap = function lightSandboxMap() {
|
44
|
+
var operationType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
45
|
+
var env = arguments.length > 1 ? arguments[1] : undefined;
|
46
|
+
var map = {
|
47
|
+
pre: 'https://imgs-sea-pre.alipay.com/mgw.htm',
|
48
|
+
sit: host || 'http://imgs-9.sggz00a.test.alipay.net/mgw.htm',
|
49
|
+
dev: host || 'http://imgs-13.sggz00b.stable.alipay.net/mgw.htm'
|
50
|
+
};
|
51
|
+
var typeMap = {
|
52
|
+
'com.ipay.iexpcashier.sdkAction.query': 'com.ipay.iopensandbox.sdk.paymentSession.query'
|
53
|
+
};
|
54
|
+
var appId = 'SDK_MOCK_SANDBOX';
|
55
|
+
var sofaId = groupId || 'GROUP_20230315210531';
|
56
|
+
if (typeMap[operationType] && env === 'light_sandbox' || _light_sandbox === 'true') return {
|
57
|
+
appId: appId,
|
58
|
+
sofaId: sofaId,
|
59
|
+
baseURL: map[env],
|
60
|
+
'Operation-Type': typeMap[operationType]
|
61
|
+
};else return {
|
62
|
+
appId: '',
|
63
|
+
sofaId: '',
|
64
|
+
baseURL: '',
|
65
|
+
'Operation-Type': ''
|
66
|
+
};
|
67
|
+
};
|
@@ -0,0 +1,136 @@
|
|
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
|
+
export declare const ERRORMESSAGE: {
|
8
|
+
DOMAIN_NOT_IN_WHITE_LIST: {
|
9
|
+
errorCode: string;
|
10
|
+
errorMessage: string;
|
11
|
+
};
|
12
|
+
NOT_JSON_FORMAT: {
|
13
|
+
errorCode: string;
|
14
|
+
errorMessage: string;
|
15
|
+
};
|
16
|
+
SDK_COMPATIBILITY_ISSUES: {
|
17
|
+
errorCode: string;
|
18
|
+
BROWSER_NOT_SUPPORT_POSTMESSAGE: {
|
19
|
+
errorCode: string;
|
20
|
+
errorMessage: string;
|
21
|
+
};
|
22
|
+
FAILED_TO_CREATE_IFRAME: {
|
23
|
+
errorCode: string;
|
24
|
+
errorMessage: string;
|
25
|
+
};
|
26
|
+
};
|
27
|
+
INIT_PARAMETER_ERROR: {
|
28
|
+
errorCode: string;
|
29
|
+
UI_MODE_NOT_SUPPORTED: {
|
30
|
+
errorCode: string;
|
31
|
+
errorMessage: string;
|
32
|
+
};
|
33
|
+
ENVIRONMENT_ERROR: {
|
34
|
+
errorCode: string;
|
35
|
+
errorMessage: string;
|
36
|
+
};
|
37
|
+
MODE_ERROR: {
|
38
|
+
errorCode: string;
|
39
|
+
errorMessage: string;
|
40
|
+
};
|
41
|
+
LOCALE_ERROR: {
|
42
|
+
errorCode: string;
|
43
|
+
errorMessage: string;
|
44
|
+
};
|
45
|
+
NET_MODE_NOT_SUPPORT: {
|
46
|
+
errorCode: string;
|
47
|
+
errorMessage: string;
|
48
|
+
};
|
49
|
+
EVENT_ERROR: {
|
50
|
+
errorCode: string;
|
51
|
+
errorMessage: string;
|
52
|
+
};
|
53
|
+
};
|
54
|
+
CREATEPAYMENT_PARAMETER_ERROR: {
|
55
|
+
errorCode: string;
|
56
|
+
};
|
57
|
+
CONFIRMPAYMENT_PARAMETER_ERROR: {
|
58
|
+
errorCode: string;
|
59
|
+
};
|
60
|
+
CREATECOMPONENT_ERROR: {
|
61
|
+
errorCode: string;
|
62
|
+
errorMessage: string;
|
63
|
+
SINGLETON_COMPONENT_ERROR: {
|
64
|
+
errorCode: string;
|
65
|
+
errorMessage: string;
|
66
|
+
};
|
67
|
+
};
|
68
|
+
SDK_CALL_URL_ERROR: {
|
69
|
+
errorCode: string;
|
70
|
+
REDIRECT_ERROR: {
|
71
|
+
errorCode: string;
|
72
|
+
errorMessage: string;
|
73
|
+
};
|
74
|
+
};
|
75
|
+
};
|
76
|
+
export declare const BASEPLUGINID = "CHECKOUT";
|
77
|
+
export declare const COMPONENTPLUGINID = "COMPONENT";
|
78
|
+
export declare const EVENT: {
|
79
|
+
ready: {
|
80
|
+
name: string;
|
81
|
+
uniqueKey: string;
|
82
|
+
};
|
83
|
+
error: {
|
84
|
+
name: string;
|
85
|
+
uniqueKey: string;
|
86
|
+
};
|
87
|
+
paymentMethodSelected: {
|
88
|
+
name: string;
|
89
|
+
uniqueKey: string;
|
90
|
+
};
|
91
|
+
sizeChanged: {
|
92
|
+
name: string;
|
93
|
+
uniqueKey: string;
|
94
|
+
};
|
95
|
+
log: {
|
96
|
+
name: string;
|
97
|
+
uniqueKey: string;
|
98
|
+
};
|
99
|
+
launch: {
|
100
|
+
name: string;
|
101
|
+
};
|
102
|
+
redirect: {
|
103
|
+
name: string;
|
104
|
+
};
|
105
|
+
onClose: {
|
106
|
+
name: string;
|
107
|
+
uniqueKey: string;
|
108
|
+
};
|
109
|
+
eventCallback: {
|
110
|
+
name: string;
|
111
|
+
uniqueKey: string;
|
112
|
+
};
|
113
|
+
submitForm: {
|
114
|
+
name: string;
|
115
|
+
};
|
116
|
+
hideCloseButton: {
|
117
|
+
name: string;
|
118
|
+
};
|
119
|
+
showCloseButton: {
|
120
|
+
name: string;
|
121
|
+
};
|
122
|
+
setAllowRetention: {
|
123
|
+
name: string;
|
124
|
+
};
|
125
|
+
declareCheckoutInfo: {
|
126
|
+
name: string;
|
127
|
+
};
|
128
|
+
showPopup: {
|
129
|
+
name: string;
|
130
|
+
};
|
131
|
+
dismissLoading: {
|
132
|
+
name: string;
|
133
|
+
};
|
134
|
+
};
|
135
|
+
export declare const closeImg = "https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg";
|
136
|
+
export declare const LOADINGIMG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACEBAMAAACjap6UAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAJcEhZcwAAITgAACE4AUWWMWAAAAAqUExURUdwTKe3zKGxyK27z7K/05ytxLbD1bvH2Jaowb/K28DL3JCjvYueucDL2xLcxpgAAAAOdFJOUwCKoHRft0w5zCgY4fYKKSYvdQAABvtJREFUaN6lmt+LG1UUx6fddbcZHOgkpWutBTPbVBEfNp1xS6uF2oQURUGnBBbqw7YdsooV2ipZ06c+uBBZCistDRMUqgV1gnnwJ4HMg2jBh+Qh1bW1A/lfPOfcO9lkNz/m3j3dh2XT+eznfM+dmTvTKsroUovpeGotbyetlXuKTH17vFxeKq9R5fOJG8KAR6+Uy2vlJag8ALDmxSDa2TLWEhos5UPKnEA7sy8yALNYyod1/mpUwiYpQB9MYy1sJZWybwgRgLGGDLRAhg1ftn0qIqHBkijzefBO7HwKRN6cTJguNxoho38gjGHb7y5PTHJpvdyLgsaap3UBSdjISKWMCZlqzzTBosGj4CMJC+LEmh8/20+b62jRM+EGjIAQsLDnxhH+IQduUS7P50p1RQk85zgRwCIPhJTx9pjz6gIev84k1o59tfVJ7HIKw0iRRio5upX3GaGBjPMbg5/FjnOAYRvGC6MIU83mOkGAcHLnx7cxC8O2ETNqsofhcIgT2xja7WOmYRsp4+hwwt9NKErz1xG/ZJYRsE4PXRIX0GAdwxi5AGfjNrYCiGRnyMf/kgRgGmNm9ihl8DoyVAKOxzxfGrdy7vOZGPM7NfaiBDI+G38KXDK4yMKOj16lNiDKCVc3Nc47OTpkTRCjeWTi9SRMY3voHzZZ/TL5inKJAPHtS1TlhMZyhIszk4hvm+t/HPF5lEvjNyRhxAd7PuwziY0oCJV3cqz/hzPNph9ZQlG+hi6SRjze/wu/9/3oEnywycEVerhFFr9FvVldT5LFgb4Lvw8EEFmIipihiSSNLet9PjKaP0a/656Nx0FD37+1uFvNVstv3oqOeGgksZeDvXTWW8BoNgXu/VocS++trj1tHzppPRDZgVzHOON6uJh/gDag3hFBTCWpwrE+1/aB4AttyTRsIxnnYag+9uH/LLYZu5hM6nFdZ2HMYBdt/5YY4iEMBDxYGPvaGGd7WQwxCwpJna+MK+DQ9hui20pQgK9n6fuX29jJA1HENYxCpyuo2m7Bn/ZNUcQeGAnPcxpGCoxlUcSMToXbpqfaUH5beKOuoURcP4Nrkxr5SXyff5EscH2+hRbtv8QRXxBijgYilSbkSQhc4j5ZPC+O4HnCHooI7aviCJUhOjBTrJbMc1M41b2E+EMG8TohlvEkg/pTBnGNEAvK07IzhZsaIfYrXxLidxnEQ11P6OkjyhVC3JRBTOlpsDikvCa7LNjCSCfm4NqLtV8GMQsAPX1QeY8QZ2QQMR07sTjiqhQiARLpA/wU2ZBBqBiFbnKE1JsBDS0SCYWdZR0pBMWZ5gip1xNKGiuxK4RODGU3ZSagdocgC1NRMEmpNBWNLHQ4utORIygqKCS4hSRDJYKpaFCKJocAQjptYRCdrhwiZoJDelHROh30kDrZgZBIAAIY3a4UYgYApnlIUbpaFzAyiGkTLU5CI8CQs5iCRkzzFDTSBYaUxX2QMBMLChCgpBAfo4QJ18wOMWQQlwkBO6yuNIII5sYuECpD3OOIoCOzLKgUhghk8pwmwiKe9d16HRhSM4XC90ZavYsQ2YGcDi3qdYlrVjhTRQu6AVRH/FTPWGymkGe9XpdAQJoZQNBxQYAQ4U5uZzLgsagwi1oQ1ITzzJAFexes1RBSE+wkZlkQRYZtTDS0qIsiNqELgPBdBRxfr9UEw7idNSEMi//igDHEVoVFFovhKQfHQwltU2aylgUTCV84ajViCHVyxwSGZfWe6ALGEOkjQwSrs4UQ7WSTEU5sXX8YQkDjE7DIZDJ921UCeNGXRgwBINK312SdeJEDvWNlrWwme6L/SgqAarVWjaihZYEAUfS/4dVIwouqsZkFBjQysGcOPA/DiKahZqky5wZ/ShIRNUACB5IdfFOtQRSIiKIRy/La9ncDzLPqetUI4+B9vLG9P48sXG/iEp1lgGx2xzMMt3DdSQN1eBvndsbMCJ47oZW7WSdHiCGvXTBMtHDHtvI4yy1yQ4IHDbfquuMZMcfJMYmPhn3sIQE13JGTVaEJsHCGS6CGy6o0ykN1CrkcWjjDJVDDIwm34g69McUKSIDjnSHj4PNiEpWKWyoNWelewXEoCuhj5EPpEzeEVFa3L3X1bgHaKOQcjOOD0YFXqYtSCRkDEPW7ApbjMJExZ5LasyCIW8M9mBZ4FQLkHB7G2MfzJ3Q8eKyGtVIsFlcKvBwayfh/ldW8Ck4Va7USEorFAkEoi1zu3KQrEu+Ca6wwi54GpFmYeC6ruLRAgffCLVgv2EchwkuGgGVZWe15bElAL5FeUwSUBR1f5AQUESCQR2mVh1FkjfAkohJgLj1GEVtZIRFACP0fCm/AgmdREnzYqIRhFHkvq+J77MBFQpEPpCQOYPcntwIWeK6Mu0P9D9pzJq4u5hj+AAAAAElFTkSuQmCC";
|