@alipay/ams-checkout 1.3.1-dev → 1.3.2

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.
Files changed (59) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/config/index.d.ts +16 -0
  3. package/{dist/esm → esm}/config/index.js +3 -2
  4. package/{dist/esm → esm}/core/component/index.js +12 -0
  5. package/{dist/esm → esm}/plugin/component/cashierApp.d.ts +1 -1
  6. package/{dist/esm → esm}/plugin/component/cashierApp.js +13 -14
  7. package/esm/plugin/component/component.style.js +15 -0
  8. package/{dist/esm → esm}/plugin/component/index.d.ts +1 -0
  9. package/{dist/esm → esm}/plugin/component/index.js +36 -18
  10. package/{dist/esm → esm}/request/index.js +2 -3
  11. package/{dist/esm → esm}/types/index.d.ts +4 -4
  12. package/{dist/esm → esm}/util/index.js +4 -2
  13. package/package.json +1 -54
  14. package/dist/esm/config/index.d.ts +0 -22
  15. package/dist/esm/plugin/component/component.style.js +0 -15
  16. /package/{dist/esm → esm}/constant/index.d.ts +0 -0
  17. /package/{dist/esm → esm}/constant/index.js +0 -0
  18. /package/{dist/esm → esm}/core/component/index.d.ts +0 -0
  19. /package/{dist/esm → esm}/core/drop-in/index.d.ts +0 -0
  20. /package/{dist/esm → esm}/core/drop-in/index.js +0 -0
  21. /package/{dist/esm → esm}/core/instance/index.d.ts +0 -0
  22. /package/{dist/esm → esm}/core/instance/index.js +0 -0
  23. /package/{dist/esm → esm}/image/cta.svg +0 -0
  24. /package/{dist/esm → esm}/index.d.ts +0 -0
  25. /package/{dist/esm → esm}/index.js +0 -0
  26. /package/{dist/esm → esm}/plugin/component/component.style.d.ts +0 -0
  27. /package/{dist/esm → esm}/plugin/drop-in/index.d.ts +0 -0
  28. /package/{dist/esm → esm}/plugin/drop-in/index.js +0 -0
  29. /package/{dist/esm → esm}/request/index.d.ts +0 -0
  30. /package/{dist/esm → esm}/request/utils.d.ts +0 -0
  31. /package/{dist/esm → esm}/request/utils.js +0 -0
  32. /package/{dist/esm → esm}/service/index.d.ts +0 -0
  33. /package/{dist/esm → esm}/service/index.js +0 -0
  34. /package/{dist/esm → esm}/types/index.js +0 -0
  35. /package/{dist/esm → esm}/util/createIframeNode.d.ts +0 -0
  36. /package/{dist/esm → esm}/util/createIframeNode.js +0 -0
  37. /package/{dist/esm → esm}/util/get.d.ts +0 -0
  38. /package/{dist/esm → esm}/util/get.js +0 -0
  39. /package/{dist/esm → esm}/util/index.d.ts +0 -0
  40. /package/{dist/esm → esm}/util/intl-callapp/es/browser.d.ts +0 -0
  41. /package/{dist/esm → esm}/util/intl-callapp/es/browser.js +0 -0
  42. /package/{dist/esm → esm}/util/intl-callapp/es/evoke.d.ts +0 -0
  43. /package/{dist/esm → esm}/util/intl-callapp/es/evoke.js +0 -0
  44. /package/{dist/esm → esm}/util/intl-callapp/es/generate.d.ts +0 -0
  45. /package/{dist/esm → esm}/util/intl-callapp/es/generate.js +0 -0
  46. /package/{dist/esm → esm}/util/intl-callapp/es/index.d.ts +0 -0
  47. /package/{dist/esm → esm}/util/intl-callapp/es/index.js +0 -0
  48. /package/{dist/esm → esm}/util/intl-callapp/es/main.d.ts +0 -0
  49. /package/{dist/esm → esm}/util/intl-callapp/es/main.js +0 -0
  50. /package/{dist/esm → esm}/util/intl-callapp/es/openWallet.d.ts +0 -0
  51. /package/{dist/esm → esm}/util/intl-callapp/es/openWallet.js +0 -0
  52. /package/{dist/esm → esm}/util/intl-callapp/es/types.d.ts +0 -0
  53. /package/{dist/esm → esm}/util/intl-callapp/es/types.js +0 -0
  54. /package/{dist/esm → esm}/util/intl-callapp/es/utils/config.d.ts +0 -0
  55. /package/{dist/esm → esm}/util/intl-callapp/es/utils/config.js +0 -0
  56. /package/{dist/esm → esm}/util/intl-callapp/es/utils/index.d.ts +0 -0
  57. /package/{dist/esm → esm}/util/intl-callapp/es/utils/index.js +0 -0
  58. /package/{dist/esm → esm}/util/mock.d.ts +0 -0
  59. /package/{dist/esm → esm}/util/mock.js +0 -0
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={974: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},848:function(e,t,n){"use strict";var r=n(722).default,o=n(974),i=n(795),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=u,t.h2=50;var s=2147483647;function c(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|v(e,t),r=c(n),o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+r(e));if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return u.from(o,t,n);var i=function(e){if(u.isBuffer(e)){var t=0|m(e.length),n=c(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||q(e.length)?c(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+r(e))}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return f(e),c(e<0?0:0|m(e))}function d(e){for(var t=e.length<0?0:0|m(e.length),n=c(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,u.prototype),r}function m(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function v(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+r(e));var n=e.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return K(e).length;default:if(i)return o?-1:j(e).length;t=(""+t).toLowerCase(),i=!0}}function y(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 I(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return k(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 M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(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),q(n=+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=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:E(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):E(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function E(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,p=0;p<c;p++)if(u(e,i+p)!==u(t,p)){f=!1;break}if(f)return i}return-1}function w(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;r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(q(s))return a;e[n+a]=s}return a}function _(e,t,n,r){return F(j(t,e.length-n),e,n,r)}function R(e,t,n,r){return F(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return F(K(t),e,n,r)}function O(e,t,n,r){return F(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?o.fromByteArray(e):o.fromByteArray(e.slice(t,n))}function x(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)}u.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,n){return function(e,t,n){return f(e),e<=0?c(e):void 0!==t?"string"==typeof n?c(e).fill(t,n):c(e).fill(t):c(e)}(e,t,n)},u.allocUnsafe=function(e){return p(e)},u.allocUnsafeSlow=function(e){return p(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');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},u.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}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(z(i,Uint8Array))o+i.length>r.length?u.from(i).copy(r,o):Uint8Array.prototype.set.call(r,i,o);else{if(!u.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o)}o+=i.length}return r},u.byteLength=v,u.prototype._isBuffer=!0,u.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)g(this,t,t+1);return this},u.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)g(this,t,t+3),g(this,t+1,t+2);return this},u.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)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?x(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.h2;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(u.prototype[a]=u.prototype.inspect),u.prototype.compare=function(e,t,n,o,i){if(z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+r(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),t<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&t>=n)return 0;if(o>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(o>>>=0),s=(n>>>=0)-(t>>>=0),c=Math.min(a,s),l=this.slice(o,i),f=e.slice(t,n),p=0;p<c;++p)if(l[p]!==f[p]){a=l[p],s=f[p];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},u.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 w(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":case"latin1":case"binary":return R(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function k(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 I(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+=H[e[i]];return o}function M(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length-1;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function C(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!u.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 N(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 L(e,t,n,r,o){return t=+t,n>>>=0,o||N(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,o){return t=+t,n>>>=0,o||N(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||C(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||C(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||C(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},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||C(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},u.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");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("Index out of range");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=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},u.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),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var o=e.charCodeAt(0);("utf8"===r&&o<128||"latin1"===r)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));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=u.isBuffer(e)?e:u.from(e,r),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var B=/[^+/0-9A-Za-z-_]/g;function j(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 K(e){return o.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(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}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}var H=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,o=0;o<16;++o)t[r+o]=e[n]+e[o];return t}()},795: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,p=n?-1:1,d=e[t+f];for(f+=p,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=u}return(d?-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,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=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?p/c:p*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+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+d]=255&a,d+=h,a/=256,u-=8);e[n+d-h]|=128*m}},103: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},741:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},425: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},148: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},735: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},475:function(e,t,n){var r=n(649);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},704:function(e,t,n){var r=n(489);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},185:function(e,t,n){var r=n(537),o=n(10),i=n(73);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},557:function(e,t,n){var r=n(649);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},537: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},180:function(e,t,n){var r=n(790);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},10: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},579: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},378: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},914:function(e,t,n){var r=n(557);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},73:function(e,t,n){var r=n(722).default,o=n(425);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},399:function(e,t,n){var r=n(722).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 p(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),s=new T(r||[]);return a(i,"_invoke",{value:S(e,n,s)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h={};function m(){}function v(){}function y(){}var g={};f(g,c,(function(){return this}));var b=Object.getPrototypeOf,E=b&&b(b(k([])));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=d(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 P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=O(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=d(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 O(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,O(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=d(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 A(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function k(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:P}}function P(){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(p(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=k,T.prototype={constructor:T,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(x),!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),x(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;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(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},790: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},358:function(e,t,n){var r=n(741),o=n(579),i=n(489),a=n(378);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},609:function(e,t,n){var r=n(722).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},649:function(e,t,n){var r=n(722).default,o=n(609);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},722: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},489:function(e,t,n){var r=n(103);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.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 Ar},AMSCheckout:function(){return Or},ERROR:function(){return ee},Target:function(){return te},checkoutDisplay:function(){return G},componentNameEnum:function(){return q},default:function(){return xr},environment:function(){return Q},localeEnum:function(){return V},messageName:function(){return Z},mode:function(){return Y},networkMode:function(){return J},osType:function(){return X},paymentMethodCategoryTypeEnum:function(){return W},productSceneEnum:function(){return H},terminalType:function(){return $}});var e=n(475),t=n.n(e),o=n(735),i=n.n(o),a=n(425),s=n.n(a),c=n(180),u=n.n(c),l=n(185),f=n.n(l),p=n(557),d=n.n(p),h=n(399),m=n.n(h),v=n(358),y=n.n(v),g=n(148),b=n.n(g),E={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"}}},w="CHECKOUT",_="COMPONENT",R={name:"onReady",uniqueKey:"userOnReady"},S={name:"onError",uniqueKey:"userOnError"},O={name:"onPaymentMethodSelected",uniqueKey:"userOnPaymentMethodSelected"},A={name:"onSizeChanged",uniqueKey:"userOnSizeChanged"},x={name:"onLog",uniqueKey:"userOnLog"},T={name:"onLaunch"},k={name:"onRedirect"},P={name:"onClose",uniqueKey:"userOnClose"},I={name:"onEventCallback",uniqueKey:"userEventCallback"},M={name:"submitForm"},C={name:"hideCloseButton"},D={name:"showCloseButton"},N={name:"setAllowRetention"},L={name:"declareCheckoutInfo"},U={name:"showPopup"},B={name:"dismissLoading"},j=n(914),K=n.n(j),F=n(722),z=n.n(F),q=function(e){return e.card="card",e.easyPay="easyPay",e.autoDebit="autoDebit",e}({}),H=function(e){return e.EASY_PAY="EASY_PAY",e.CASHIER_PAYMENT="CASHIER_PAYMENT",e.AUTO_DEBIT="AUTO_DEBIT",e}({}),W=function(e){return e.CARD="CARD",e.WALLET="WALLET",e}({}),V=function(e){return e["en-US"]="en-US",e}({}),G=function(e){return e.horizon="horizon",e.vertical="vertical",e}({}),Y=function(e){return e.dropin="dropin",e.component="component",e}({}),J=function(e){return e.proxy="proxy",e.session="session",e}({}),Q=function(e){return e.sandbox="sandbox",e.prod="prod",e.light_sandbox="light_sandbox",e}({}),X=function(e){return e.IOS="IOS",e.ANDROID="ANDROID",e.ELSE="ELSE",e}({}),$=function(e){return e.WEB="WEB",e.WAP="WAP",e.APP="APP",e.MINI_APP="MINI_APP",e}({}),Z=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}({}),ee=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}({}),te=function(e){return e.BLANK="_blank",e.SELF="_self",e}({}),ne=".".charCodeAt(0),re=/\\(\\)?/g,oe=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),ie=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ae=/^\w*$/;function se(e){if("string"==typeof e)return e;var t="".concat(e);return"0"===t&&1/e==-Infinity?"-0":t}function ce(e,t){return Array.isArray(e)?e:function(e,t){if(Array.isArray(e))return!1;var n=z()(e);return"number"===n||"boolean"===n||null===e||ae.test(e)||!ie.test(e)||null!==t&&e in Object(t)}(e,t)?[e]:(r=[],(n=e).charCodeAt(0)===ne&&r.push(""),n.replace(oe,(function(e,t,n,o){var i=e;return n?i=o.replace(re,"$1"):t&&(i=t.trim()),r.push(i),""})),r);var n,r}function ue(e,t,n){var r=null===e?void 0:function(e,t){for(var n=ce(t,e),r=0,o=n.length,i=e;null!==i&&r<o;)i=i[se(n[r++])];return r&&r===o?i:void 0}(e,t);return void 0===r?n:r}var le=function(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()},fe=function(){function e(){i()(this,e),d()(this,"events",void 0),d()(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}(),pe=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]},de=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("&")},he=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},me=window.navigator,ve=me.userAgent,ye=/iPhone|iPad|iPod/i.test(ve)||"MacIntel"===me.platform&&me.maxTouchPoints>1,ge=/Android/i.test(ve),be=(/\bMacintosh\b/.test(ve),/Windows NT/.test(ve),ye),Ee=ge,we=!!/Android|iPhone|iPad|iPod|Mobile/.test(ve),_e=function(e,t){try{return JSON.parse(e)||t}catch(e){return t}},Re=function(e,t){var n=ue(e,"Result-Status")||ue(e,"result-status","");if(!n)return null;if(2e3==+n)return{success:!1,traceId:t,errorCode:ee.LOGIN,resultStatus:n};if(4001==+n)return{success:!1,traceId:t,errorCode:ee.TIMEOUT,resultStatus:n};if(1e3!=+n){var r=ue(e,"Tips")||ue(e,"tips",""),o=ue(e,"Memo")||ue(e,"memo","");return{success:!1,traceId:t,errorCode:ee.GATEWAY,errorMessage:decodeURIComponent(r||""),result:{resultStatus:n||"",tips:decodeURIComponent(r||""),memo:decodeURIComponent(o||"")},resultStatus:n}}return null},Se=function(){var e=me.userAgent;return!["Android","iPhone","SymbianOS","Windows Phone","iPod"].some((function(t){return e.includes(t)}))},Oe=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},Ae=function(){var e=document.documentElement.clientWidth;return Se()?100:100*e/390},xe=Oe(),Te=xe._light_sandbox,ke=xe.groupId,Pe=xe.requestHost,Ie={local:"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",dev:Pe||"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",sit:Pe||"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"},Me="ANTOM_PAYMENT_WEB",Ce=ke||"GROUP_20230523202227";function De(e,t){return function(){return e.apply(t,arguments)}}var Ne,Le=Object.prototype.toString,Ue=Object.getPrototypeOf,Be=(Ne=Object.create(null),function(e){var t=Le.call(e);return Ne[t]||(Ne[t]=t.slice(8,-1).toLowerCase())}),je=function(e){return e=e.toLowerCase(),function(t){return Be(t)===e}},Ke=function(e){return function(t){return F(t)===e}},Fe=Array.isArray,ze=Ke("undefined");var qe=je("ArrayBuffer");var He=Ke("string"),We=Ke("function"),Ve=Ke("number"),Ge=function(e){return null!==e&&"object"===F(e)},Ye=function(e){if("object"!==Be(e))return!1;var t=Ue(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Je=je("Date"),Qe=je("File"),Xe=je("Blob"),$e=je("FileList"),Ze=je("URLSearchParams");function et(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"!==F(e)&&(e=[e]),Fe(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 tt(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 nt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,rt=function(e){return!ze(e)&&e!==nt};var ot,it,at=(ot="undefined"!=typeof Uint8Array&&Ue(Uint8Array),function(e){return ot&&e instanceof ot}),st=je("HTMLFormElement"),ct=(it=Object.prototype.hasOwnProperty,function(e,t){return it.call(e,t)}),ut=je("RegExp"),lt=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};et(n,(function(n,o){!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},ft="abcdefghijklmnopqrstuvwxyz",pt="0123456789",dt={DIGIT:pt,ALPHA:ft,ALPHA_DIGIT:ft+ft.toUpperCase()+pt};var ht=je("AsyncFunction"),mt={isArray:Fe,isArrayBuffer:qe,isBuffer:function(e){return null!==e&&!ze(e)&&null!==e.constructor&&!ze(e.constructor)&&We(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||We(e.append)&&("formdata"===(t=Be(e))||"object"===t&&We(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&qe(e.buffer)},isString:He,isNumber:Ve,isBoolean:function(e){return!0===e||!1===e},isObject:Ge,isPlainObject:Ye,isUndefined:ze,isDate:Je,isFile:Qe,isBlob:Xe,isRegExp:ut,isFunction:We,isStream:function(e){return Ge(e)&&We(e.pipe)},isURLSearchParams:Ze,isTypedArray:at,isFileList:$e,forEach:et,merge:function e(){for(var t=rt(this)&&this||{},n=t.caseless,r={},o=function(t,o){var i=n&&tt(r,o)||o;Ye(r[i])&&Ye(t)?r[i]=e(r[i],t):Ye(t)?r[i]=e({},t):Fe(t)?r[i]=t.slice():r[i]=t},i=0,a=arguments.length;i<a;i++)arguments[i]&&et(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 et(t,(function(t,r){n&&We(t)?e[r]=De(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&&Ue(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Be,kindOfTest:je,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(Fe(e))return e;var t=e.length;if(!Ve(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:st,hasOwnProperty:ct,hasOwnProp:ct,reduceDescriptors:lt,freezeMethods:function(e){lt(e,(function(t,n){if(We(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];We(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 Fe(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:tt,global:nt,isContextDefined:rt,ALPHABET:dt,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]:dt.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&We(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(Ge(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=Fe(n)?[]:{};return et(n,(function(t,n){var i=e(t,r+1);!ze(i)&&(o[n]=i)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:ht,isThenable:function(e){return e&&(Ge(e)||We(e))&&We(e.then)&&We(e.catch)}};function vt(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)}mt.inherits(vt,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:mt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var yt=vt.prototype,gt={};["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){gt[e]={value:e}})),Object.defineProperties(vt,gt),Object.defineProperty(yt,"isAxiosError",{value:!0}),vt.from=function(e,t,n,r,o,i){var a=Object.create(yt);return mt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),vt.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var bt=vt,Et=n(848).lW;function wt(e){return mt.isPlainObject(e)||mt.isArray(e)}function _t(e){return mt.endsWith(e,"[]")?e.slice(0,-2):e}function Rt(e,t,n){return e?e.concat(t).map((function(e,t){return e=_t(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var St=mt.toFlatObject(mt,{},null,(function(e){return/^is[A-Z]/.test(e)}));var Ot=function(e,t,n){if(!mt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=mt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!mt.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&mt.isSpecCompliantForm(t);if(!mt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(mt.isDate(e))return e.toISOString();if(!s&&mt.isBlob(e))throw new bt("Blob is not supported. Use a Buffer instead.");return mt.isArrayBuffer(e)||mt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Et.from(e):e}function u(e,n,o){var s=e;if(e&&!o&&"object"===F(e))if(mt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(mt.isArray(e)&&function(e){return mt.isArray(e)&&!e.some(wt)}(e)||(mt.isFileList(e)||mt.endsWith(n,"[]"))&&(s=mt.toArray(e)))return n=_t(n),s.forEach((function(e,r){!mt.isUndefined(e)&&null!==e&&t.append(!0===a?Rt([n],r,i):null===a?n:n+"[]",c(e))})),!1;return!!wt(e)||(t.append(Rt(o,n,i),c(e)),!1)}var l=[],f=Object.assign(St,{defaultVisitor:u,convertValue:c,isVisitable:wt});if(!mt.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!mt.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),mt.forEach(n,(function(n,i){!0===(!(mt.isUndefined(n)||null===n)&&o.call(t,n,mt.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function At(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function xt(e,t){this._pairs=[],e&&Ot(e,this,t)}var Tt=xt.prototype;Tt.append=function(e,t){this._pairs.push([e,t])},Tt.toString=function(e){var t=e?function(t){return e.call(this,t,At)}:At;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var kt=xt;function Pt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function It(e,t,n){if(!t)return e;var r,o=n&&n.encode||Pt,i=n&&n.serialize;if(r=i?i(t,n):mt.isURLSearchParams(t)?t.toString():new kt(t,n).toString(o)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var Mt,Ct=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){mt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),t}(),Dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:kt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:("undefined"==typeof navigator||"ReactNative"!==(Mt=navigator.product)&&"NativeScript"!==Mt&&"NS"!==Mt)&&"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 Lt=function(e){function t(e,n,r,o){var i=e[o++],a=Number.isFinite(+i),s=o>=e.length;return i=!i&&mt.isArray(r)?r.length:i,s?(mt.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&mt.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&mt.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(mt.isFormData(e)&&mt.isFunction(e.entries)){var n={};return mt.forEachEntry(e,(function(e,r){t(function(e){return mt.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null},Ut={"Content-Type":void 0};var Bt={transitional:Dt,adapter:["xhr","http"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=mt.isObject(e);if(i&&mt.isHTMLForm(e)&&(e=new FormData(e)),mt.isFormData(e))return o&&o?JSON.stringify(Lt(e)):e;if(mt.isArrayBuffer(e)||mt.isBuffer(e)||mt.isStream(e)||mt.isFile(e)||mt.isBlob(e))return e;if(mt.isArrayBufferView(e))return e.buffer;if(mt.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 Ot(e,new Nt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Nt.isNode&&mt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=mt.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Ot(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(mt.isString(e))try{return(t||JSON.parse)(e),mt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Bt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&mt.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 bt.from(e,bt.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:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};mt.forEach(["delete","get","head"],(function(e){Bt.headers[e]={}})),mt.forEach(["post","put","patch"],(function(e){Bt.headers[e]=mt.merge(Ut)}));var jt=Bt,Kt=mt.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"]),Ft=Symbol("internals");function zt(e){return e&&String(e).trim().toLowerCase()}function qt(e){return!1===e||null==e?e:mt.isArray(e)?e.map(qt):String(e)}function Ht(e,t,n,r,o){return mt.isFunction(r)?r.call(this,t,n):(o&&(t=n),mt.isString(t)?mt.isString(r)?-1!==t.indexOf(r):mt.isRegExp(r)?r.test(t):void 0:void 0)}var Wt=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=zt(t);if(!o)throw new Error("header name must be a non-empty string");var i=mt.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=qt(e))}var i=function(e,t){return mt.forEach(e,(function(e,n){return o(e,n,t)}))};return mt.isPlainObject(e)||e instanceof this.constructor?i(e,t):mt.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]&&Kt[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=zt(e)){var n=mt.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(mt.isFunction(t))return t.call(this,r,n);if(mt.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=zt(e)){var n=mt.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ht(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=zt(e)){var o=mt.findKey(n,e);!o||t&&!Ht(0,n[o],o,t)||(delete n[o],r=!0)}}return mt.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&&!Ht(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return mt.forEach(this,(function(r,o){var i=mt.findKey(n,o);if(i)return t[i]=qt(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]=qt(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 mt.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&mt.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=v(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[Ft]=this[Ft]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=zt(e);t[r]||(!function(e,t){var n=mt.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 mt.isArray(e)?e.forEach(r):r(e),this}}]),r}(Symbol.iterator,Symbol.toStringTag);Wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),mt.freezeMethods(Wt.prototype),mt.freezeMethods(Wt);var Vt=Wt;function Gt(e,t){var n=this||jt,r=t||n,o=Vt.from(r.headers),i=r.data;return mt.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Yt(e){return!(!e||!e.__CANCEL__)}function Jt(e,t,n){bt.call(this,null==e?"canceled":e,bt.ERR_CANCELED,t,n),this.name="CanceledError"}mt.inherits(Jt,bt,{__CANCEL__:!0});var Qt=Jt;var Xt=Nt.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),mt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),mt.isString(r)&&a.push("path="+r),mt.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 $t(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 Zt=Nt.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=mt.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};var en=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 p=u&&c-u;return p?Math.round(1e3*f/p):void 0}}};function tn(e,t){var n=0,r=en(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 nn="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,o=e.data,i=Vt.from(e.headers).normalize(),a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}mt.isFormData(o)&&(Nt.isStandardBrowserEnv||Nt.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=$t(e.baseURL,e.url);function p(){if(c){var r=Vt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new bt("Request failed with status code "+n.status,[bt.ERR_BAD_REQUEST,bt.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(),It(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(p)},c.onabort=function(){c&&(n(new bt("Request aborted",bt.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new bt("Network Error",bt.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||Dt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new bt(t,r.clarifyTimeoutError?bt.ETIMEDOUT:bt.ECONNABORTED,e,c)),c=null},Nt.isStandardBrowserEnv){var d=(e.withCredentials||Zt(f))&&e.xsrfCookieName&&Xt.read(e.xsrfCookieName);d&&i.set(e.xsrfHeaderName,d)}void 0===o&&i.setContentType(null),"setRequestHeader"in c&&mt.forEach(i.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),mt.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",tn(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",tn(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){c&&(n(!t||t.type?new Qt(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===Nt.protocols.indexOf(m)?n(new bt("Unsupported protocol "+m+":",bt.ERR_BAD_REQUEST,e)):c.send(o||null)}))},rn={http:null,xhr:nn};mt.forEach(rn,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var on=function(e){for(var t,n,r=(e=mt.isArray(e)?e:[e]).length,o=0;o<r&&(t=e[o],!(n=mt.isString(t)?rn[t.toLowerCase()]:t));o++);if(!n){if(!1===n)throw new bt("Adapter ".concat(t," is not supported by the environment"),"ERR_NOT_SUPPORT");throw new Error(mt.hasOwnProp(rn,t)?"Adapter '".concat(t,"' is not available in the build"):"Unknown adapter '".concat(t,"'"))}if(!mt.isFunction(n))throw new TypeError("adapter is not a function");return n};function an(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qt(null,e)}function sn(e){return an(e),e.headers=Vt.from(e.headers),e.data=Gt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),on(e.adapter||jt.adapter)(e).then((function(t){return an(e),t.data=Gt.call(e,e.transformResponse,t),t.headers=Vt.from(t.headers),t}),(function(t){return Yt(t)||(an(e),t&&t.response&&(t.response.data=Gt.call(e,e.transformResponse,t.response),t.response.headers=Vt.from(t.response.headers))),Promise.reject(t)}))}var cn=function(e){return e instanceof Vt?e.toJSON():e};function un(e,t){t=t||{};var n={};function r(e,t,n){return mt.isPlainObject(e)&&mt.isPlainObject(t)?mt.merge.call({caseless:n},e,t):mt.isPlainObject(t)?mt.merge({},t):mt.isArray(t)?t.slice():t}function o(e,t,n){return mt.isUndefined(t)?mt.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!mt.isUndefined(t))return r(void 0,t)}function a(e,t){return mt.isUndefined(t)?mt.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(cn(e),cn(t),!0)}};return mt.forEach(Object.keys(Object.assign({},e,t)),(function(r){var i=c[r]||o,a=i(e[r],t[r],r);mt.isUndefined(a)&&i!==s||(n[r]=a)})),n}var ln="1.4.0",fn={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){fn[e]=function(n){return F(n)===e||"a"+(t<1?"n ":" ")+e}}));var pn={};fn.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 bt(r(o," has been removed"+(t?" in "+t:"")),bt.ERR_DEPRECATED);return t&&!pn[o]&&(pn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var dn={assertOptions:function(e,t,n){if("object"!==F(e))throw new bt("options must be an object",bt.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 bt("option "+i+" must be "+c,bt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new bt("Unknown option "+i,bt.ERR_BAD_OPTION)}},validators:fn},hn=dn.validators,mn=function(){function t(e){o(this,t),this.defaults=e,this.interceptors={request:new Ct,response:new Ct}}return e(t,[{key:"request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n,r=t=un(this.defaults,t),o=r.transitional,i=r.paramsSerializer,a=r.headers;void 0!==o&&dn.assertOptions(o,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean)},!1),null!=i&&(mt.isFunction(i)?t.paramsSerializer={serialize:i}:dn.assertOptions(i,{encode:hn.function,serialize:hn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),(n=a&&mt.merge(a.common,a[t.method]))&&mt.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete a[e]})),t.headers=Vt.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,p=0;if(!c){var d=[sn.bind(this),void 0];for(d.unshift.apply(d,s),d.push.apply(d,l),f=d.length,u=Promise.resolve(t);p<f;)u=u.then(d[p++],d[p++]);return u}f=s.length;var h=t;for(p=0;p<f;){var m=s[p++],v=s[p++];try{h=m(h)}catch(e){v.call(this,e);break}}try{u=sn.call(this,h)}catch(e){return Promise.reject(e)}for(p=0,f=l.length;p<f;)u=u.then(l[p++],l[p++]);return u}},{key:"getUri",value:function(e){return It($t((e=un(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),t}();mt.forEach(["delete","get","head","options"],(function(e){mn.prototype[e]=function(t,n){return this.request(un(n||{},{method:e,url:t,data:(n||{}).data}))}})),mt.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(un(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}mn.prototype[e]=t(),mn.prototype[e+"Form"]=t(!0)}));var vn=mn,yn=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 Qt(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}(),gn=yn;var bn={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(bn).forEach((function(e){var t=v(e,2),n=t[0],r=t[1];bn[r]=n}));var En=bn;var wn=function e(t){var n=new vn(t),r=De(vn.prototype.request,n);return mt.extend(r,vn.prototype,n,{allOwnKeys:!0}),mt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(un(t,n))},r}(jt);wn.Axios=vn,wn.CanceledError=Qt,wn.CancelToken=gn,wn.isCancel=Yt,wn.VERSION=ln,wn.toFormData=Ot,wn.AxiosError=bt,wn.Cancel=wn.CanceledError,wn.all=function(e){return Promise.all(e)},wn.spread=function(e){return function(t){return e.apply(null,t)}},wn.isAxiosError=function(e){return mt.isObject(e)&&!0===e.isAxiosError},wn.mergeConfig=un,wn.AxiosHeaders=Vt,wn.formToJSON=function(e){return Lt(mt.isHTMLForm(e)?new FormData(e):e)},wn.HttpStatusCode=En,wn.default=wn;var _n=wn,Rn="1.3.1-dev",Sn=Oe()._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:Pe||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",dev:Pe||"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=ke||"GROUP_20230315210531";return r[e]&&"light_sandbox"===t||"true"===Te?{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)||Ie[a],u=K()((t={appId:s.appId||Me,workspaceId:"pre"===e.env?"pre":"default"},d()(t,"x-cors-".concat(Me.toLowerCase(),"-default"),"1"),d()(t,"version","2.0"),d()(t,"sofa-group-name",s.sofaId||Ce),d()(t,"Operation-Type",s["Operation-Type"]||e["Operation-Type"]||""),d()(t,"Client-Time",i),d()(t,"tntInstId","ALIPW3SG"),d()(t,"sdk-version",Rn||""),t),e.headers);return"true"!==Sn&&"sandbox"!==a||(u["load-test"]=!0,u.sofaPenAttrs="instMock=O&loadMode=2"),"dev"!==a&&delete u["sofa-group-name"],_n.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 An(e,t){return xn.apply(this,arguments)}function xn(){return(xn=b()(m()().mark((function e(t,n){var r,o,i,a,s,c,u,l,f,p,d,h,v,y;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=On(n),Date.now(),o={terminalType:Se()?"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=be?"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=ue(u,"Mgw-TraceId")||ue(u,"mgw-traceid",""),l.traceId=f||"",null==(p=Re(u,f))||!p.errorCode){e.next=18;break}throw new Error(JSON.stringify({errorMessage:(null==l?void 0:l.errorMessage)||(null==p?void 0:p.errorMessage),errorCode:null==p?void 0:p.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=_e(null===e.t0||void 0===e.t0?void 0:e.t0.message,{success:!1,errorCode:ee.SYSTEM,errorMessage:""}),v=null!==e.t0&&void 0!==e.t0&&null!==(d=e.t0.message)&&void 0!==d&&d.includes("timeout")?ee.TIMEOUT:"",y=(null==h?void 0:h.errorCode)||v,e.abrupt("return",{success:!1,errorCode:y,errorMessage:""});case 28:case"end":return e.stop()}}),e,null,[[6,21]])})))).apply(this,arguments)}function Tn(){return(Tn=b()(m()().mark((function e(t,n){var r;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=((null==t?void 0:t.paymentSessionData)||"").split("&&")[1]||"",e.abrupt("return",An(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(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"prod",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=Oe()||{},s=a.host,c=a._appVersion,u=void 0===c?"":c,l="",f=function(e){try{return u&&!["sandbox","light_sandbox","prod"].includes(t)?u:JSON.parse(e).versionMap.web[Rn].targetWebVerison||n}catch(e){return n}},p={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"},h=f(i),m=function(e){var t=e.find((function(e){return e===o})),n=e[e.length-1];return t&&(n=o),n},v=(e={},d()(e,q.card,(function(){l="".concat(p[t],"/").concat(q.card,"/index.").concat(h,".html")})),d()(e,q.easyPay,(function(){var e=m(["1.0","2.0"]);l="".concat(p[t],"/").concat(q.easyPay,"/").concat(e,"/index.").concat(h,".html")})),d()(e,q.autoDebit,(function(){var e=m(["1.0"]);l="".concat(p[t],"/").concat(q.autoDebit,"/").concat(e,"/index.").concat(h,".html")})),e);return v[r]&&v[r](),s&&!["sandbox","light_sandbox","prod"].includes(t)?s:l};var Pn,In=function(e,t){try{(t||document.getElementById("ams-component-container")).style.fontSize="".concat(Ae(),"px")}catch(e){}},Mn=window.innerHeight,Cn="ams-component-mockup",Dn="ams-component-loading",Nn=function(){function e(){i()(this,e),d()(this,"app",void 0),d()(this,"appDomain",void 0),d()(this,"AMSSDK",void 0),d()(this,"platform",void 0),d()(this,"createIframeNode",void 0),d()(this,"_selector",void 0),d()(this,"_appVersion",void 0),d()(this,"_isRetention",void 0),d()(this,"_actionQueryPromise",null),d()(this,"_renderParams",null),d()(this,"_componentName",""),d()(this,"_performanceData",[]),d()(this,"_isInitComponent",void 0),d()(this,"_clickEventName",void 0),this._appVersion="1.3.1",this._isInitComponent=!1,this._selector="#ams-component-section",this.createIframeNode=function(){return Promise.resolve()},this.platform=Se()?"desktop":"mobile",this._clickEventName="mobile"===this.platform?"touchend":"click",this._isRetention=!0,window.removeEventListener("resize",In),window.removeEventListener("pageShow",In),window.removeEventListener("DOMContentLoaded",In),window.addEventListener("resize",In),window.addEventListener("pageShow",In),window.addEventListener("DOMContentLoaded",In),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(E.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR);if(this._isInitComponent=!0,this._renderParams=t,this._componentName=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(Cn);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(q.card===e._componentName&&(a.paymentMethodType="CARD"),q.easyPay===e._componentName){var s,c=a.paymentSessionConfig||{},u=c.productSceneVersion,l=void 0===u?"":u,f=c.productScene,p=void 0===f?"":f,d=((null===(s=e._renderParams)||void 0===s?void 0:s.paymentSessionMetaData)||{}).action,h=(void 0===d?{}:d).autoDebitWithToken;if("EASY_PAY"===p&&"2.0"===l&&!(void 0!==h&&h))return t({message:"sdk no need to make query request"})}if(q.autoDebit===e._componentName){var m,v,y,g,b=(null===(m=e._renderParams)||void 0===m||null===(v=m.paymentSessionMetaData)||void 0===v?void 0:v.action)||{},w=(Se()?null==b||null===(y=b.web)||void 0===y?void 0:y.signType:null==b||null===(g=b.wap)||void 0===g?void 0:g.signType)||"";if("SMS"===w)return t({message:"sdk no need to make query request"});if(!w||"REDIRECT"!==w)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"});(function(e,t){return Tn.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()}),n&&n.success?t(n):(t(n),e.dispatchToSDK(S.name,E.CREATECOMPONENT_ERROR))})).catch((function(t){n(t),e.closeCashier()}))}))}},{key:"cleanApp",value:function(){try{if(this.app=null,this._removeEventListener(),"string"===le(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.componentName,o=e.productSceneVersion,i=e.extendInfo,a=/^https?:\/\/([^/<>\s]+\.?)*/.exec(kn(t,n,r,o,i));return a&&a[0]||""}({environment:a,appVersion:this._appVersion,componentName:this._componentName,productSceneVersion:o,extendInfo:i}),this.app=function(e){var t=document.createElement("iframe"),n=function(e){return{dropin:"checkout-dropin",component:"checkout-component"}[e]||"checkout-component"}(e);return t.id=n,t.style.height="0px",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.componentName,n=e.appearance,r=e.analytics,o=void 0===r?{enabled:!0}:r,i=e.productSceneVersion,a=e.environment,s=e.appVersion,c=e.extendInfo,u=e.locale,l=e.instanceId,f=kn(a,s,t,i,c||""),p=pe("initial-scale")||1,d=Oe(),h=d._sandbox,m=d._light_sandbox,v=d.requestHost,y=void 0===v?"":v,g=d.groupId,b=void 0===g?"":g,E=d.LOCAL_MOCK,w=Object.assign({locale:u,scale:p,instanceId:l,sandbox:"light_sandbox"===a||"true"===m?"true":"false",analyticsEnabled:!1===(null==o?void 0:o.enabled)?"false":"true",sdkVersion:Rn,refUrl:window.location.href,shadow:"sandbox"===a||"true"===h?"true":"false",requestHost:y,groupId:b,LOCAL_MOCK:E},n),_=de(w);return"".concat(f,"?").concat(_)}({componentName:this._componentName,appearance:(null==e?void 0:e.appearance)||{},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(S.name,Object.assign({},E.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME,{stack:e}))}}else this.dispatchToSDK(S.name,E.SDK_COMPATIBILITY_ISSUES.BROWSER_NOT_SUPPORT_POSTMESSAGE)}},{key:"listener",value:function(e){if(e.origin===this.appDomain)if(he(e.data)){var t=JSON.parse(e.data);if(t.name!==Z.APP_TO_SDK&&t.name!==Z.APP_TO_APP||t.instanceId!==this.AMSSDK._instanceId)return;this._handleAppMessage(t)}else console.warn(E.NOT_JSON_FORMAT),this.dispatchToSDK(S.name,E.NOT_JSON_FORMAT)}},{key:"_addEventListener",value:function(){window["_ams_sdk_component_listener_".concat(this.AMSSDK._instanceId)]=this.listener.bind(this),this._removeEventListener(),window.addEventListener("message",window["_ams_sdk_component_listener_".concat(this.AMSSDK._instanceId)])}},{key:"_removeEventListener",value:function(){window.removeEventListener("message",window["_ams_sdk_component_listener_".concat(this.AMSSDK._instanceId)])}},{key:"_handleAppMessage",value:function(e){var t,n=[T.name,k.name,A.name,x.name,P.name,I.name,M.name,D.name,C.name,N.name,L.name,U.name,B.name];if(e.context.event!==B.name){if(n.includes(e.context.event)){if(e.context.event===T.name)return this._performanceData.push({key:"sdk_onLaunch",value:Date.now()}),void this.sendRenderEvent();if(e.context.event===A.name&&this.handleSizeChanged(e),e.context.event===P.name)return this.closeBtnFunc();if(e.context.event===k.name)return this.handleRedirect(e.context.data);if(e.context.event!==M.name)if(e.context.event!==C.name){if(e.context.event!==D.name)return e.context.event===N.name?(!0===e.context.data&&(this._isRetention=!0),void(!1===e.context.data&&(this._isRetention=!1))):void(e.context.event!==L.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(I.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(Cn);r&&(r.style.background="#000000",r.style.opacity="0.6",r.style.display="block"),null===(n=document.getElementById(Dn))||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"}),400)}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(I.name,{code:"SDK_CALL_URL_SUCCESS",message:"Successfully opened the app,".concat(e,": ").concat(n)})};if(n.target!==te.BLANK)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(){t.dispatchToSDK(I.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)})}));else{if(r("normalUrl",n.normalUrl),!n.normalUrl)return;window.open(n.normalUrl)}}},{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,p,d,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===(p=n.btnOK)||void 0===p?void 0:p.fontSize,"px"),g.style.color=null==n||null===(d=n.btnOK)||void 0===d?void 0:d.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,O,A=document.getElementById("ams-component-retention-leave");if(A)if(A.innerHTML=null==n||null===(b=n.btnCancel)||void 0===b?void 0:b.text,A.style.fontSize="".concat(null==n||null===(E=n.btnCancel)||void 0===E?void 0:E.fontSize,"px"),A.style.color=null==n||null===(w=n.btnCancel)||void 0===w?void 0:w.fontColor,A.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))A.style.border="1px solid ".concat(null==n||null===(O=n.btnCancel)||void 0===O?void 0:O.bg);else A.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){this.app&&this.app.contentWindow&&this.app.contentWindow.postMessage(JSON.stringify(e),this.appDomain)}},{key:"subscribeFromSDK",value:function(){var e={};for(var t in e)e.hasOwnProperty(t)&&this.AMSSDK.eventCenter.on("".concat(_,"-").concat(t),e[t].bind(this))}},{key:"sendRenderEvent",value:(n=b()(m()().mark((function e(){var t,n,r;return m()().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({name:Z.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:_,instanceId:this.AMSSDK._instanceId,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(Mn,window.innerHeight),envInfo:{screenHeight:screen.height,screenWidth:screen.width}}}}),this.dispatchToApp({name:Z.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:_,instanceId:this.AMSSDK._instanceId,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(Dn),e.id=Dn,e.innerHTML='<div class="line"><div></div><div></div><div></div><div></div></div>',e.style.fontSize="".concat(Ae(),"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(Dn))||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(Cn);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(P.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 background-color: #ffffff;\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 background-color: #ffffff;\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 80% {\n opacity: 0\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 background-color: #ffffff;\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",In(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="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(P.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=Cn,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}(),Ln=function(e,t){return new Promise((function(n,r){var o=null;if("string"===le(t.selector)&&(o=document.querySelector(t.selector)),null===o){var i={errorCode:E.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:Z.APP_TO_SDK,instanceId:e.AMSSDK._instanceId,context:{event:S.name,data:i}})}o.innerHTML="",e.app&&o.appendChild(e.app),n()}))},Un=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===H.EASY_PAY?q.easyPay:o===H.CASHIER_PAYMENT&&a===W.CARD?q.card:o===H.AUTO_DEBIT?q.autoDebit:""},Bn=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]}},jn=function(){var e=b()(m()().mark((function e(t,n){var r,o=this;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.options.mode=Y.component,this.options.networkMode=this.options.networkMode||J.session,"string"!=typeof t||!n){e.next=8;break}if(r=n,t in q){e.next=6;break}return e.abrupt("return",Promise.reject(E.CREATECOMPONENT_ERROR));case 6:e.next=9;break;case 8:r=t;case 9:if(!r||r.paymentSessionData){e.next=11;break}return e.abrupt("return",Promise.reject(E.CREATECOMPONENT_ERROR));case 11:if(this.options.networkMode!==J.proxy){e.next=16;break}return console.warn(E.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage),e.abrupt("return",Promise.reject(E.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT));case 16:return e.abrupt("return",new Promise((function(e,n){var i=Bn(r.paymentSessionData),a=y()(i,2),s=a[0],c=a[1],u="string"==typeof t?t:Un(s);if(""!==u){r.paymentSessionData=c,r.paymentSessionMetaData=s;try{o._getPlugin(_).appendIframeNodes(u,r).then((function(){e()}))}catch(e){n(e)}}else n("".concat(E.CREATEPAYMENT_PARAMETER_ERROR.errorCode,":Abnormal response data, interface failure, or unsupported payment method"))})));case 17:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),Kn=n(704),Fn=n.n(Kn),zn=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},qn=function(){function e(){i()(this,e),d()(this,"app",void 0),d()(this,"paymentMethodsResult",void 0),d()(this,"appDomain",void 0),d()(this,"AMSSDK",void 0),d()(this,"_render",void 0),d()(this,"_selector",void 0),d()(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(zn(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"===le(this._selector)&&(e=document.querySelector(this._selector)),t=this._selector,("object"===("undefined"==typeof HTMLElement?"undefined":z()(HTMLElement))?t instanceof HTMLElement:t&&"object"===z()(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:Z.APP_TO_SDK,instanceId:this.AMSSDK._instanceId,context:{event:"onError",data:Object.assign({},E.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME,{stack:e})}})}if(!0==!!window.postMessage)return e;this._dispatchToSDK({name:Z.APP_TO_SDK,instanceId:this.AMSSDK._instanceId,context:{event:"onError",data:E.SDK_COMPATIBILITY_ISSUES.BROWSER_NOT_SUPPORT_POSTMESSAGE}})}},{key:"_getIframeUrl",value:function(e){var t,n,r,o,i,a=zn(this.AMSSDK.options.env.environment,this._version),s=pe("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=de(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(he(e.data)){var t=JSON.parse(e.data);if(t.name!==Z.APP_TO_SDK&&t.name!==Z.APP_TO_APP||t.instanceId!==this.AMSSDK._instanceId)return;this._handleAppMessage(t)}else console.warn(E.NOT_JSON_FORMAT),this._dispatchToSDK({name:Z.APP_TO_SDK,instanceId:this.AMSSDK._instanceId,context:{event:"onError",data:E.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){[S.name,R.name,T.name,k.name,A.name,"onPaymentMethodsSelected",x.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:Z.APP_TO_SDK,mode:this.AMSSDK.options.mode,appId:w,instanceId:this.AMSSDK._instanceId},e);this.AMSSDK.eventCenter.emit("".concat(w,"-").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(w,"-").concat(t),e[t].bind(this))}},{key:"_renderPaymentMethods",value:function(e){this._dispatchToApp({name:Z.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:w,instanceId:this.AMSSDK._instanceId,context:{event:"renderPaymentMethods",data:e}})}},{key:"_handleRequestPayment",value:function(e){this._dispatchToApp(e)}}]),e}(),Hn=function(e){var t=this;return this.options.networkMode===J.proxy?new Promise((function(n,r){try{n(t._getPlugin(w).render(e))}catch(e){r(e)}})):(console.warn(E.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage),Promise.reject(E.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT))},Wn=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(w,"-handleRequestPayment"),{name:Z.SDK_TO_APP,mode:t.options.mode,appId:w,instanceId:t._instanceId,context:{event:"handleRequestPayment",data:e}})}))},Vn=function(){var e,t=this,n=new Map([[S.name,function(e){t.eventCenter.emit(S.name,e.context.data)}],[R.name,function(e){t.eventCenter.emit(R.name,e.context.data)}],[k.name,function(e){t.eventCenter.emit(k.name,e.context.data)}],[O.name,function(e){t.checkoutState.paymentMethodType=e.context.data.paymentMethodType,t.eventCenter.emit(O.name,{paymentMethodType:e.context.data.paymentMethodType})}],[A.name,function(e){t.eventCenter.emit(A.name,e.context.data)}],[x.name,function(e){t.eventCenter.emit(x.name,e.context.data)}]]),r=Fn()(n.keys());try{for(r.s();!(e=r.n()).done;){var o=e.value;this.eventCenter.on("".concat(w,"-").concat(o),n.get(o))}}catch(e){r.e(e)}finally{r.f()}},Gn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},Yn=new Uint8Array(16);function Jn(){if(!Pn&&!(Pn="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 Pn(Yn)}for(var Qn=[],Xn=0;Xn<256;++Xn)Qn.push((Xn+256).toString(16).slice(1));function $n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(Qn[e[t+0]]+Qn[e[t+1]]+Qn[e[t+2]]+Qn[e[t+3]]+"-"+Qn[e[t+4]]+Qn[e[t+5]]+"-"+Qn[e[t+6]]+Qn[e[t+7]]+"-"+Qn[e[t+8]]+Qn[e[t+9]]+"-"+Qn[e[t+10]]+Qn[e[t+11]]+Qn[e[t+12]]+Qn[e[t+13]]+Qn[e[t+14]]+Qn[e[t+15]]).toLowerCase()}var Zn,er,tr,nr=function(e,t,n){if(Gn.randomUUID&&!t&&!e)return Gn.randomUUID();var r=(e=e||{}).random||(e.rng||Jn)();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 $n(r)},rr=window.navigator.userAgent||"",or=function(){var e=rr.match(/OS (\d+)_(\d+)_?(\d+)?/);return Number.parseInt(e[1],10)},ir=/android/i.test(rr),ar=/iphone|ipad|ipod/i.test(rr),sr=/chrome\/[\d.]+ mobile safari\/[\d.]+/i.test(rr)&&ir&&rr.indexOf("Version")<0,cr=/qqbrowser/i.test(rr),ur=/firefox/i.test(rr);/baidubrowser/i.test(rr);function lr(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 fr,pr,dr,hr=5e3;function mr(e,t){fr=+new Date,pr=setTimeout((function(){!(!!er&&document[er])&&e&&e()}),t||5e3)}function vr(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||hr;o-(fr||+new Date)<i&&n(t)}}(e),pr&&clearTimeout(pr))}function yr(e){return/^(http|https|itms-apps|itms-appss|market):\/\//.test(e)}function gr(e){return gr="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},gr(e)}function br(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 Er(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?br(Object(n),!0).forEach((function(t){wr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):br(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wr(e,t,n){return(t=Rr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _r(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,Rr(r.key),r)}}function Rr(e){var t=function(e,t){if("object"!==gr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==gr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===gr(t)?t:String(t)}!function(e){void 0!==e&&(void 0!==e.hidden?(er="hidden",tr="visibilitychange"):void 0!==e.mozHidden?(er="mozHidden",tr="mozvisibilitychange"):void 0!==e.msHidden?(er="msHidden",tr="msvisibilitychange"):void 0!==e.webkitHidden&&(er="webkitHidden",tr="webkitvisibilitychange"))}(document),function(e){e.SCHEME="Scheme",e.LINK="Link",e.INTENT="Intent"}(dr||(dr={}));var Sr=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=lr(r,i),n.options.scheme=lr(t,i),ar&&or()>9?n.evokeLink():n.evokeScheme(n.evokeLink.bind(n))):r?(n.options.link=lr(r,i),n.evokeLink()):t?(n.options.scheme=lr(t,i),n.evokeScheme()):o&&o.scheme&&o.package&&n.handleIntent()};this.config=Er(Er({},{delay:0}),t),this.options={},this.timer=null,this.evokeAppBy={url:"",type:dr.LINK},this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e;Zn||((Zn=document.createElement("iframe")).id="callapp_iframe_".concat(Date.now()),Zn.style.cssText="display:none;border:0;width:0;height:0;",document.body.appendChild(Zn)),e={evokeAppBy:this.evokeAppBy,successCb:this.config.successCb,timeout:this.config.resultJudgmentTime},void 0!==tr?document.addEventListener(tr,(function(){return vr(e)})):window.addEventListener("pagehide",(function(){return vr(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&&yr(n))throw new Error("请填写正确格式的scheme");if(o&&!yr(o))throw new Error("请填写正确格式的link");if(r&&r.scheme&&yr(r.scheme))throw new Error("请填写正确格式的intent");this.handleDegradationStrategy()}},{key:"evokeLink",value:function(){this.evokeAppBy.type=dr.LINK;var e=this.options,t=e.link,n=e.delay;this.evokeByLocationDelay(t,n)}},{key:"evokeScheme",value:function(e){this.evokeAppBy.type=dr.SCHEME;var t=this.options,n=t.scheme,r=t.delay,o=t.fallback;ar?or()>9||cr?this.evokeByTagADelay(n,r,o,e):this.evokeByIFrameDelay(n,r,o,e):sr||ur?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&&!yr(c)&&(this.evokeAppBy.type=dr.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){Zn.src=e}(e)}),e,t,n,r)}},{key:"checkIsOpen",value:function(e,t,n){return this.evokeAppBy.url=e,mr(n||t,this.config.resultJudgmentTime)}},{key:"clearTimer",value:function(){this.timer&&clearTimeout(this.timer)}}])&&_r(t.prototype,n),r&&_r(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Or=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),d()(s()(t),"createComponent",void 0),d()(s()(t),"createPayment",void 0),d()(s()(t),"confirmPayment",void 0),Object.defineProperty(s()(t),"createComponent",{value:jn}),Object.defineProperty(s()(t),"createPayment",{value:Hn}),Object.defineProperty(s()(t),"confirmPayment",{value:Wn}),Object.defineProperty(s()(t),"_subscribeFromCheckoutPlugin",{value:Vn}),o=s()(t),(a=new Nn).setRender(Ln),o._registerPlugin(_,a),function(e,t){var n=new qn;n.setRender(Ln),t._registerPlugin(w,n),t._subscribeFromCheckoutPlugin()}(0,s()(t)),t}return t()(r)}(function(){function e(t){i()(this,e),d()(this,"options",void 0),d()(this,"checkoutState",void 0),d()(this,"eventCenter",void 0),d()(this,"plugins",void 0),d()(this,"_instanceId",void 0),this._instanceId=nr(),this.options={},this.eventCenter=new fe,this.checkoutState={paymentMethodType:""},this._initEvent(t),this._setOptions(t),this.plugins=new Map}return t()(e,[{key:"destroy",value:function(){var e,t=Fn()(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=Oe()._moreEnv;null!=e&&e.environment&&!((null==e?void 0:e.environment)in Q)&&"true"!==t&&(console.warn(E.INIT_PARAMETER_ERROR.ENVIRONMENT_ERROR.errorMessage),e.environment="prod"),this.options.env={terminalType:we?$.WAP:$.WEB,environment:(null==e?void 0:e.environment)||"prod"},this.options.env.terminalType===$.WAP&&(this.options.env.osType=be?X.IOS:Ee?X.ANDROID:X.ELSE)}},{key:"_setMode",value:function(e){this.options.mode=(null==e?void 0:e.mode)||Y.dropin,null!=e&&e.mode&&!((null==e?void 0:e.mode)in Y)&&(console.warn(E.INIT_PARAMETER_ERROR.MODE_ERROR.errorMessage),this.options.mode=Y.component),this.options.networkMode=(null==e?void 0:e.networkMode)||J.session,null!=e&&e.networkMode&&!((null==e?void 0:e.networkMode)in J)&&(console.warn(E.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage),this.options.networkMode=J.proxy)}},{key:"_initEvent",value:function(e){if(null!=e&&e.onError){if("function"!==le(e.onError))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(S.name,e.onError,S.uniqueKey)}if(null!=e&&e.onPaymentMethodSelected){if("function"!==le(e.onPaymentMethodSelected))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(O.name,e.onPaymentMethodSelected,O.uniqueKey)}if(null!=e&&e.onReady){if("function"!==le(e.onReady))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(R.name,e.onReady,R.uniqueKey)}if(null!=e&&e.onSizeChanged){if("function"!==le(e.onSizeChanged))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(A.name,e.onSizeChanged,A.uniqueKey)}if(null!=e&&e.onLog){if("function"!==le(e.onLog))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(x.name,e.onLog,x.uniqueKey)}if(null!=e&&e.onEventCallback){if("function"!==le(e.onEventCallback))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(I.name,e.onEventCallback,I.uniqueKey)}if(null!=e&&e.onClose){if("function"!==le(e.onClose))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(P.name,e.onClose,P.uniqueKey)}}},{key:"_registerPlugin",value:function(e,t){this.plugins.set(e,t);try{t.applyPlugin(this)}catch(t){if(this.plugins.delete(e),"error"===le(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===$.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(E.SDK_CALL_URL_ERROR.REDIRECT_ERROR)};o?c():function(){if(a||s){var e={fallback:function(){c()},successCb:function(){n()},delay:0};try{new Sr(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(S.name,e,S.uniqueKey)}},{key:"onSizeChanged",value:function(e){this._overrideSubscription(A.name,e,A.uniqueKey)}},{key:"onLog",value:function(e){this._overrideSubscription(x.name,e,x.uniqueKey)}}]),e}()),Ar=function(e){u()(r,e);var n=f()(r);function r(e){return i()(this,r),n.call(this,e)}return t()(r)}(Or),xr=Or}(),r}()}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={861:function(e,t){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=c(e),a=i[0],s=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a<s;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var o,i,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},207:function(e,t,n){"use strict";var r=n(861),o=n(90),i=n(736);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n);e=s(e,r);var o=e.write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return T(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<=x)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=x));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 x=4096;function T(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(242),o=n(424),i=n(983);e.exports=function(e){var t=o();return function(){var n,o=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return i(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},143:function(e,t,n){var r=n(281);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},242:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},821:function(e,t,n){var r=n(687);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},424:function(e){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},249:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},20:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},118:function(e,t,n){var r=n(143);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},983:function(e,t,n){var r=n(944).default,o=n(374);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},662:function(e,t,n){var r=n(944).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),s=new T(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(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,T.prototype={constructor:T,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(x),!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),x(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;x(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 Tr},AMSCheckout:function(){return xr},ERROR:function(){return ee},Target:function(){return te},checkoutDisplay:function(){return V},componentNameEnum:function(){return Y},default:function(){return Pr},environment:function(){return Q},localeEnum:function(){return W},messageName:function(){return Z},mode:function(){return G},networkMode:function(){return J},osType:function(){return X},paymentMethodCategoryTypeEnum:function(){return H},productSceneEnum:function(){return q},terminalType:function(){return $}});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(662),m=n.n(h),v=n(925),y=n.n(v),g=n(404),b=n.n(g),E={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"}}},w="CHECKOUT",_="COMPONENT",R={name:"onReady",uniqueKey:"userOnReady"},S={name:"onError",uniqueKey:"userOnError"},A={name:"onPaymentMethodSelected",uniqueKey:"userOnPaymentMethodSelected"},O={name:"onSizeChanged",uniqueKey:"userOnSizeChanged"},x={name:"onLog",uniqueKey:"userOnLog"},T={name:"onLaunch"},P={name:"onRedirect"},k={name:"onClose",uniqueKey:"userOnClose"},I={name:"onEventCallback",uniqueKey:"userEventCallback"},M={name:"submitForm"},C={name:"hideCloseButton"},D={name:"showCloseButton"},N={name:"setAllowRetention"},L={name:"declareCheckoutInfo"},U={name:"showPopup"},B={name:"dismissLoading"},j=n(118),K=n.n(j),F=n(944),z=n.n(F),Y=function(e){return e.card="card",e.easyPay="easyPay",e.autoDebit="autoDebit",e}({}),q=function(e){return e.EASY_PAY="EASY_PAY",e.CASHIER_PAYMENT="CASHIER_PAYMENT",e.AUTO_DEBIT="AUTO_DEBIT",e}({}),H=function(e){return e.CARD="CARD",e.WALLET="WALLET",e}({}),W=function(e){return e["en-US"]="en-US",e}({}),V=function(e){return e.horizon="horizon",e.vertical="vertical",e}({}),G=function(e){return e.dropin="dropin",e.component="component",e}({}),J=function(e){return e.proxy="proxy",e.session="session",e}({}),Q=function(e){return e.sandbox="sandbox",e.prod="prod",e.light_sandbox="light_sandbox",e}({}),X=function(e){return e.IOS="IOS",e.ANDROID="ANDROID",e.ELSE="ELSE",e}({}),$=function(e){return e.WEB="WEB",e.WAP="WAP",e.APP="APP",e.MINI_APP="MINI_APP",e}({}),Z=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}({}),ee=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}({}),te=function(e){return e.BLANK="_blank",e.SELF="_self",e}({}),ne=".".charCodeAt(0),re=/\\(\\)?/g,oe=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),ie=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ae=/^\w*$/;function se(e){if("string"==typeof e)return e;var t="".concat(e);return"0"===t&&1/e==-Infinity?"-0":t}function ce(e,t){return Array.isArray(e)?e:function(e,t){if(Array.isArray(e))return!1;var n=z()(e);return"number"===n||"boolean"===n||null===e||ae.test(e)||!ie.test(e)||null!==t&&e in Object(t)}(e,t)?[e]:(r=[],(n=e).charCodeAt(0)===ne&&r.push(""),n.replace(oe,(function(e,t,n,o){var i=e;return n?i=o.replace(re,"$1"):t&&(i=t.trim()),r.push(i),""})),r);var n,r}function ue(e,t,n){var r=null===e?void 0:function(e,t){for(var n=ce(t,e),r=0,o=n.length,i=e;null!==i&&r<o;)i=i[se(n[r++])];return r&&r===o?i:void 0}(e,t);return void 0===r?n:r}var le=function(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()},fe=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}(),de=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]},pe=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("&")},he=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},me=window.navigator,ve=me.userAgent,ye=/iPhone|iPad|iPod/i.test(ve)||"MacIntel"===me.platform&&me.maxTouchPoints>1,ge=/Android/i.test(ve),be=(/\bMacintosh\b/.test(ve),/Windows NT/.test(ve),ye),Ee=ge,we=!!/Android|iPhone|iPad|iPod|Mobile/.test(ve),_e=function(e,t){try{return JSON.parse(e)||t}catch(e){return t}},Re=function(e,t){var n=ue(e,"Result-Status")||ue(e,"result-status","");if(!n)return null;if(2e3==+n)return{success:!1,traceId:t,errorCode:ee.LOGIN,resultStatus:n};if(4001==+n)return{success:!1,traceId:t,errorCode:ee.TIMEOUT,resultStatus:n};if(1e3!=+n){var r=ue(e,"Tips")||ue(e,"tips",""),o=ue(e,"Memo")||ue(e,"memo","");return{success:!1,traceId:t,errorCode:ee.GATEWAY,errorMessage:decodeURIComponent(r||""),result:{resultStatus:n||"",tips:decodeURIComponent(r||""),memo:decodeURIComponent(o||"")},resultStatus:n}}return null},Se=function(){var e=me.userAgent;return!["Android","iPhone","SymbianOS","Windows Phone","iPod"].some((function(t){return e.includes(t)}))},Ae=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},Oe=function(){var e=document.documentElement.clientWidth,t=Se()?130:100*e/390;return Math.min(t,130)},xe=Ae(),Te=xe._light_sandbox,Pe=xe.groupId,ke=xe.requestHost,Ie={local:"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",dev:ke||"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",sit:ke||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",pre:"https://imgs-sea-pre.alipay.com/mgw.htm",prod:"https://imgs-sea-global.alipay.com/mgw.htm",sandbox:"https://imgs-sea-global.alipay.com/mgw.htm"},Me="ANTOM_PAYMENT_WEB",Ce=Pe||"GROUP_20230523202227",De="1.3.2";function Ne(e,t){return function(){return e.apply(t,arguments)}}var Le,Ue=Object.prototype.toString,Be=Object.getPrototypeOf,je=(Le=Object.create(null),function(e){var t=Ue.call(e);return Le[t]||(Le[t]=t.slice(8,-1).toLowerCase())}),Ke=function(e){return e=e.toLowerCase(),function(t){return je(t)===e}},Fe=function(e){return function(t){return F(t)===e}},ze=Array.isArray,Ye=Fe("undefined");var qe=Ke("ArrayBuffer");var He=Fe("string"),We=Fe("function"),Ve=Fe("number"),Ge=function(e){return null!==e&&"object"===F(e)},Je=function(e){if("object"!==je(e))return!1;var t=Be(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Qe=Ke("Date"),Xe=Ke("File"),$e=Ke("Blob"),Ze=Ke("FileList"),et=Ke("URLSearchParams");function tt(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"!==F(e)&&(e=[e]),ze(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 nt(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 rt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ot=function(e){return!Ye(e)&&e!==rt};var it,at,st=(it="undefined"!=typeof Uint8Array&&Be(Uint8Array),function(e){return it&&e instanceof it}),ct=Ke("HTMLFormElement"),ut=(at=Object.prototype.hasOwnProperty,function(e,t){return at.call(e,t)}),lt=Ke("RegExp"),ft=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};tt(n,(function(n,o){!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},dt="abcdefghijklmnopqrstuvwxyz",pt="0123456789",ht={DIGIT:pt,ALPHA:dt,ALPHA_DIGIT:dt+dt.toUpperCase()+pt};var mt=Ke("AsyncFunction"),vt={isArray:ze,isArrayBuffer:qe,isBuffer:function(e){return null!==e&&!Ye(e)&&null!==e.constructor&&!Ye(e.constructor)&&We(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||We(e.append)&&("formdata"===(t=je(e))||"object"===t&&We(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&qe(e.buffer)},isString:He,isNumber:Ve,isBoolean:function(e){return!0===e||!1===e},isObject:Ge,isPlainObject:Je,isUndefined:Ye,isDate:Qe,isFile:Xe,isBlob:$e,isRegExp:lt,isFunction:We,isStream:function(e){return Ge(e)&&We(e.pipe)},isURLSearchParams:et,isTypedArray:st,isFileList:Ze,forEach:tt,merge:function e(){for(var t=ot(this)&&this||{},n=t.caseless,r={},o=function(t,o){var i=n&&nt(r,o)||o;Je(r[i])&&Je(t)?r[i]=e(r[i],t):Je(t)?r[i]=e({},t):ze(t)?r[i]=t.slice():r[i]=t},i=0,a=arguments.length;i<a;i++)arguments[i]&&tt(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 tt(t,(function(t,r){n&&We(t)?e[r]=Ne(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&&Be(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:je,kindOfTest:Ke,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(ze(e))return e;var t=e.length;if(!Ve(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:ct,hasOwnProperty:ut,hasOwnProp:ut,reduceDescriptors:ft,freezeMethods:function(e){ft(e,(function(t,n){if(We(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];We(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 ze(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:nt,global:rt,isContextDefined:ot,ALPHABET:ht,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]:ht.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&We(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(Ge(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=ze(n)?[]:{};return tt(n,(function(t,n){var i=e(t,r+1);!Ye(i)&&(o[n]=i)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:mt,isThenable:function(e){return e&&(Ge(e)||We(e))&&We(e.then)&&We(e.catch)}};function yt(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)}vt.inherits(yt,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:vt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var gt=yt.prototype,bt={};["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){bt[e]={value:e}})),Object.defineProperties(yt,bt),Object.defineProperty(gt,"isAxiosError",{value:!0}),yt.from=function(e,t,n,r,o,i){var a=Object.create(gt);return vt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),yt.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var Et=yt,wt=n(207).lW;function _t(e){return vt.isPlainObject(e)||vt.isArray(e)}function Rt(e){return vt.endsWith(e,"[]")?e.slice(0,-2):e}function St(e,t,n){return e?e.concat(t).map((function(e,t){return e=Rt(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var At=vt.toFlatObject(vt,{},null,(function(e){return/^is[A-Z]/.test(e)}));var Ot=function(e,t,n){if(!vt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=vt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!vt.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&vt.isSpecCompliantForm(t);if(!vt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(vt.isDate(e))return e.toISOString();if(!s&&vt.isBlob(e))throw new Et("Blob is not supported. Use a Buffer instead.");return vt.isArrayBuffer(e)||vt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):wt.from(e):e}function u(e,n,o){var s=e;if(e&&!o&&"object"===F(e))if(vt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(vt.isArray(e)&&function(e){return vt.isArray(e)&&!e.some(_t)}(e)||(vt.isFileList(e)||vt.endsWith(n,"[]"))&&(s=vt.toArray(e)))return n=Rt(n),s.forEach((function(e,r){!vt.isUndefined(e)&&null!==e&&t.append(!0===a?St([n],r,i):null===a?n:n+"[]",c(e))})),!1;return!!_t(e)||(t.append(St(o,n,i),c(e)),!1)}var l=[],f=Object.assign(At,{defaultVisitor:u,convertValue:c,isVisitable:_t});if(!vt.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!vt.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),vt.forEach(n,(function(n,i){!0===(!(vt.isUndefined(n)||null===n)&&o.call(t,n,vt.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 Tt(e,t){this._pairs=[],e&&Ot(e,this,t)}var Pt=Tt.prototype;Pt.append=function(e,t){this._pairs.push([e,t])},Pt.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 kt=Tt;function It(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mt(e,t,n){if(!t)return e;var r,o=n&&n.encode||It,i=n&&n.serialize;if(r=i?i(t,n):vt.isURLSearchParams(t)?t.toString():new kt(t,n).toString(o)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var Ct,Dt=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){vt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),t}(),Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:kt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:("undefined"==typeof navigator||"ReactNative"!==(Ct=navigator.product)&&"NativeScript"!==Ct&&"NS"!==Ct)&&"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 Ut=function(e){function t(e,n,r,o){var i=e[o++],a=Number.isFinite(+i),s=o>=e.length;return i=!i&&vt.isArray(r)?r.length:i,s?(vt.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&vt.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&vt.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(vt.isFormData(e)&&vt.isFunction(e.entries)){var n={};return vt.forEachEntry(e,(function(e,r){t(function(e){return vt.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null},Bt={"Content-Type":void 0};var jt={transitional:Nt,adapter:["xhr","http"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=vt.isObject(e);if(i&&vt.isHTMLForm(e)&&(e=new FormData(e)),vt.isFormData(e))return o&&o?JSON.stringify(Ut(e)):e;if(vt.isArrayBuffer(e)||vt.isBuffer(e)||vt.isStream(e)||vt.isFile(e)||vt.isBlob(e))return e;if(vt.isArrayBufferView(e))return e.buffer;if(vt.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 Ot(e,new Lt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Lt.isNode&&vt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=vt.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Ot(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(vt.isString(e))try{return(t||JSON.parse)(e),vt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||jt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&vt.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 Et.from(e,Et.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:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};vt.forEach(["delete","get","head"],(function(e){jt.headers[e]={}})),vt.forEach(["post","put","patch"],(function(e){jt.headers[e]=vt.merge(Bt)}));var Kt=jt,Ft=vt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zt=Symbol("internals");function Yt(e){return e&&String(e).trim().toLowerCase()}function qt(e){return!1===e||null==e?e:vt.isArray(e)?e.map(qt):String(e)}function Ht(e,t,n,r,o){return vt.isFunction(r)?r.call(this,t,n):(o&&(t=n),vt.isString(t)?vt.isString(r)?-1!==t.indexOf(r):vt.isRegExp(r)?r.test(t):void 0:void 0)}var Wt=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=Yt(t);if(!o)throw new Error("header name must be a non-empty string");var i=vt.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=qt(e))}var i=function(e,t){return vt.forEach(e,(function(e,n){return o(e,n,t)}))};return vt.isPlainObject(e)||e instanceof this.constructor?i(e,t):vt.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]&&Ft[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=Yt(e)){var n=vt.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(vt.isFunction(t))return t.call(this,r,n);if(vt.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Yt(e)){var n=vt.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ht(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=Yt(e)){var o=vt.findKey(n,e);!o||t&&!Ht(0,n[o],o,t)||(delete n[o],r=!0)}}return vt.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&&!Ht(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return vt.forEach(this,(function(r,o){var i=vt.findKey(n,o);if(i)return t[i]=qt(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]=qt(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 vt.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&vt.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=v(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:n,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[zt]=this[zt]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=Yt(e);t[r]||(!function(e,t){var n=vt.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 vt.isArray(e)?e.forEach(r):r(e),this}}]),r}(Symbol.iterator,Symbol.toStringTag);Wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),vt.freezeMethods(Wt.prototype),vt.freezeMethods(Wt);var Vt=Wt;function Gt(e,t){var n=this||Kt,r=t||n,o=Vt.from(r.headers),i=r.data;return vt.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Jt(e){return!(!e||!e.__CANCEL__)}function Qt(e,t,n){Et.call(this,null==e?"canceled":e,Et.ERR_CANCELED,t,n),this.name="CanceledError"}vt.inherits(Qt,Et,{__CANCEL__:!0});var Xt=Qt;var $t=Lt.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),vt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),vt.isString(r)&&a.push("path="+r),vt.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 Zt(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 en=Lt.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=vt.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};var tn=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 nn(e,t){var n=0,r=tn(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 rn="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,o=e.data,i=Vt.from(e.headers).normalize(),a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}vt.isFormData(o)&&(Lt.isStandardBrowserEnv||Lt.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=Zt(e.baseURL,e.url);function d(){if(c){var r=Vt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Et("Request failed with status code "+n.status,[Et.ERR_BAD_REQUEST,Et.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(),Mt(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 Et("Request aborted",Et.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new Et("Network Error",Et.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||Nt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Et(t,r.clarifyTimeoutError?Et.ETIMEDOUT:Et.ECONNABORTED,e,c)),c=null},Lt.isStandardBrowserEnv){var p=(e.withCredentials||en(f))&&e.xsrfCookieName&&$t.read(e.xsrfCookieName);p&&i.set(e.xsrfHeaderName,p)}void 0===o&&i.setContentType(null),"setRequestHeader"in c&&vt.forEach(i.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),vt.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",nn(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",nn(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){c&&(n(!t||t.type?new Xt(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===Lt.protocols.indexOf(m)?n(new Et("Unsupported protocol "+m+":",Et.ERR_BAD_REQUEST,e)):c.send(o||null)}))},on={http:null,xhr:rn};vt.forEach(on,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var an=function(e){for(var t,n,r=(e=vt.isArray(e)?e:[e]).length,o=0;o<r&&(t=e[o],!(n=vt.isString(t)?on[t.toLowerCase()]:t));o++);if(!n){if(!1===n)throw new Et("Adapter ".concat(t," is not supported by the environment"),"ERR_NOT_SUPPORT");throw new Error(vt.hasOwnProp(on,t)?"Adapter '".concat(t,"' is not available in the build"):"Unknown adapter '".concat(t,"'"))}if(!vt.isFunction(n))throw new TypeError("adapter is not a function");return n};function sn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xt(null,e)}function cn(e){return sn(e),e.headers=Vt.from(e.headers),e.data=Gt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),an(e.adapter||Kt.adapter)(e).then((function(t){return sn(e),t.data=Gt.call(e,e.transformResponse,t),t.headers=Vt.from(t.headers),t}),(function(t){return Jt(t)||(sn(e),t&&t.response&&(t.response.data=Gt.call(e,e.transformResponse,t.response),t.response.headers=Vt.from(t.response.headers))),Promise.reject(t)}))}var un=function(e){return e instanceof Vt?e.toJSON():e};function ln(e,t){t=t||{};var n={};function r(e,t,n){return vt.isPlainObject(e)&&vt.isPlainObject(t)?vt.merge.call({caseless:n},e,t):vt.isPlainObject(t)?vt.merge({},t):vt.isArray(t)?t.slice():t}function o(e,t,n){return vt.isUndefined(t)?vt.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!vt.isUndefined(t))return r(void 0,t)}function a(e,t){return vt.isUndefined(t)?vt.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(un(e),un(t),!0)}};return vt.forEach(Object.keys(Object.assign({},e,t)),(function(r){var i=c[r]||o,a=i(e[r],t[r],r);vt.isUndefined(a)&&i!==s||(n[r]=a)})),n}var fn="1.4.0",dn={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){dn[e]=function(n){return F(n)===e||"a"+(t<1?"n ":" ")+e}}));var pn={};dn.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 Et(r(o," has been removed"+(t?" in "+t:"")),Et.ERR_DEPRECATED);return t&&!pn[o]&&(pn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var hn={assertOptions:function(e,t,n){if("object"!==F(e))throw new Et("options must be an object",Et.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 Et("option "+i+" must be "+c,Et.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Et("Unknown option "+i,Et.ERR_BAD_OPTION)}},validators:dn},mn=hn.validators,vn=function(){function t(e){o(this,t),this.defaults=e,this.interceptors={request:new Dt,response:new Dt}}return e(t,[{key:"request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n,r=t=ln(this.defaults,t),o=r.transitional,i=r.paramsSerializer,a=r.headers;void 0!==o&&hn.assertOptions(o,{silentJSONParsing:mn.transitional(mn.boolean),forcedJSONParsing:mn.transitional(mn.boolean),clarifyTimeoutError:mn.transitional(mn.boolean)},!1),null!=i&&(vt.isFunction(i)?t.paramsSerializer={serialize:i}:hn.assertOptions(i,{encode:mn.function,serialize:mn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),(n=a&&vt.merge(a.common,a[t.method]))&&vt.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete a[e]})),t.headers=Vt.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=[cn.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=cn.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 Mt(Zt((e=ln(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),t}();vt.forEach(["delete","get","head","options"],(function(e){vn.prototype[e]=function(t,n){return this.request(ln(n||{},{method:e,url:t,data:(n||{}).data}))}})),vt.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(ln(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}vn.prototype[e]=t(),vn.prototype[e+"Form"]=t(!0)}));var yn=vn,gn=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 Xt(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}(),bn=gn;var En={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(En).forEach((function(e){var t=v(e,2),n=t[0],r=t[1];En[r]=n}));var wn=En;var _n=function e(t){var n=new yn(t),r=Ne(yn.prototype.request,n);return vt.extend(r,yn.prototype,n,{allOwnKeys:!0}),vt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ln(t,n))},r}(Kt);_n.Axios=yn,_n.CanceledError=Xt,_n.CancelToken=bn,_n.isCancel=Jt,_n.VERSION=fn,_n.toFormData=Ot,_n.AxiosError=Et,_n.Cancel=_n.CanceledError,_n.all=function(e){return Promise.all(e)},_n.spread=function(e){return function(t){return e.apply(null,t)}},_n.isAxiosError=function(e){return vt.isObject(e)&&!0===e.isAxiosError},_n.mergeConfig=ln,_n.AxiosHeaders=Vt,_n.formToJSON=function(e){return Ut(vt.isHTMLForm(e)?new FormData(e):e)},_n.HttpStatusCode=wn,_n.default=_n;var Rn=_n,Sn=Ae()._sandbox;function An(e){var t,n,r,o=new Date,i=o.getTime()+60*o.getTimezoneOffset()*1e3,a=e.env||"prod",s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n={pre:"https://imgs-sea-pre.alipay.com/mgw.htm",sit:ke||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",dev:ke||"http://imgs-13.sggz00b.stable.alipay.net/mgw.htm"},r={"com.ipay.iexpcashier.sdkAction.query":"com.ipay.iopensandbox.sdk.paymentSession.query"},o="SDK_MOCK_SANDBOX",i=Pe||"GROUP_20230315210531";return r[e]&&"light_sandbox"===t||"true"===Te?{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)||Ie[a],u=K()((t={appId:s.appId||Me,workspaceId:"pre"===e.env?"pre":"default"},p()(t,"x-cors-".concat(Me.toLowerCase(),"-default"),"1"),p()(t,"version","2.0"),p()(t,"sofa-group-name",s.sofaId||Ce),p()(t,"Operation-Type",s["Operation-Type"]||e["Operation-Type"]||""),p()(t,"Client-Time",i),p()(t,"tntInstId","ALIPW3SG"),p()(t,"sdk-version",De||""),t),e.headers);return"true"!==Sn&&"sandbox"!==a||(u["load-test"]=!0,u.sofaPenAttrs="instMock=O&loadMode=2"),"dev"!==a&&delete u["sofa-group-name"],Rn.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 On(e,t){return xn.apply(this,arguments)}function xn(){return(xn=b()(m()().mark((function e(t,n){var r,o,i,a,s,c,u,l,f,d,p,h,v,y;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=An(n),Date.now(),o={terminalType:Se()?"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=be?"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=ue(u,"Mgw-TraceId")||ue(u,"mgw-traceid",""),l.traceId=f||"",null==(d=Re(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=_e(null===e.t0||void 0===e.t0?void 0:e.t0.message,{success:!1,errorCode:ee.SYSTEM,errorMessage:""}),v=null!==e.t0&&void 0!==e.t0&&null!==(p=e.t0.message)&&void 0!==p&&p.includes("timeout")?ee.TIMEOUT:"",y=(null==h?void 0:h.errorCode)||v,e.abrupt("return",{success:!1,errorCode:y,errorMessage:""});case 28:case"end":return e.stop()}}),e,null,[[6,21]])})))).apply(this,arguments)}function Tn(){return(Tn=b()(m()().mark((function e(t,n){var r;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=((null==t?void 0:t.paymentSessionData)||"").split("&&")[1]||"",e.abrupt("return",On(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 Pn=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"prod",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=Ae()||{},s=a.host,c="",u=function(e){try{return JSON.parse(e).versionMap.web[De].targetWebVerison||n}catch(e){return n}},l={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"},f=u(i),d=function(e){var t=e.find((function(e){return e===o})),n=e[e.length-1];return t&&(n=o),n},h=(e={},p()(e,Y.card,(function(){c="".concat(l[t],"/").concat(Y.card,"/index.").concat(f,".html")})),p()(e,Y.easyPay,(function(){var e=d(["1.0","2.0"]);c="".concat(l[t],"/").concat(Y.easyPay,"/").concat(e,"/index.").concat(f,".html")})),p()(e,Y.autoDebit,(function(){var e=d(["1.0"]);c="".concat(l[t],"/").concat(Y.autoDebit,"/").concat(e,"/index.").concat(f,".html")})),e);return h[r]&&h[r](),s&&!["sandbox","light_sandbox","prod"].includes(t)?s:c};var kn,In=window.innerHeight,Mn=function(e,t){try{(t||document.getElementById("ams-component-container")).style.fontSize="".concat(Oe(),"px"),In=window.innerHeight}catch(e){}},Cn="ams-component-mockup",Dn="ams-component-loading",Nn="_ams_sdk_component_listener",Ln=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,"_componentName",""),p()(this,"_performanceData",[]),p()(this,"_isInitComponent",void 0),p()(this,"_clickEventName",void 0),this._appVersion="1.3.1",this._isInitComponent=!1,this._selector="#ams-component-section",this.createIframeNode=function(){return Promise.resolve()},this.platform=Se()?"desktop":"mobile",this._clickEventName="mobile"===this.platform?"touchend":"click",this._isRetention=!0,window.removeEventListener("resize",Mn),window.removeEventListener("pageShow",Mn),window.removeEventListener("DOMContentLoaded",Mn),window.addEventListener("resize",Mn),window.addEventListener("pageShow",Mn),window.addEventListener("DOMContentLoaded",Mn),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(E.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR);if(this._isInitComponent=!0,this._renderParams=t,this._componentName=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(Cn);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(Y.card===e._componentName&&(a.paymentMethodType="CARD"),Y.easyPay===e._componentName){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;if("EASY_PAY"===d&&"2.0"===l&&!(void 0!==h&&h))return t({message:"sdk no need to make query request"})}if(Y.autoDebit===e._componentName){var m,v,y,g,b=(null===(m=e._renderParams)||void 0===m||null===(v=m.paymentSessionMetaData)||void 0===v?void 0:v.action)||{},w=(Se()?null==b||null===(y=b.web)||void 0===y?void 0:y.signType:null==b||null===(g=b.wap)||void 0===g?void 0:g.signType)||"";if("SMS"===w)return t({message:"sdk no need to make query request"});if(!w||"REDIRECT"!==w)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"});(function(e,t){return Tn.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(S.name,E.CREATECOMPONENT_ERROR))})).catch((function(t){n(t),e.closeCashier()}))}))}},{key:"cleanApp",value:function(){try{if(this.app=null,this._removeEventListener(),"string"===le(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.componentName,o=e.productSceneVersion,i=e.extendInfo,a=/^https?:\/\/([^/<>\s]+\.?)*/.exec(Pn(t,n,r,o,i));return a&&a[0]||""}({environment:a,appVersion:this._appVersion,componentName:this._componentName,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.componentName,n=e.appearance,r=e.analytics,o=void 0===r?{enabled:!0}:r,i=e.productSceneVersion,a=e.environment,s=e.appVersion,c=e.extendInfo,u=e.locale,l=e.instanceId,f=Pn(a,s,t,i,c||""),d=de("initial-scale")||1,p=Ae(),h=p._sandbox,m=p._light_sandbox,v=p.requestHost,y=void 0===v?"":v,g=p.groupId,b=void 0===g?"":g,E=p.LOCAL_MOCK,w=Object.assign({locale:u,scale:d,instanceId:l,sandbox:"light_sandbox"===a||"true"===m?"true":"false",analyticsEnabled:!1===(null==o?void 0:o.enabled)?"false":"true",sdkVersion:De,refUrl:window.location.href,shadow:"sandbox"===a||"true"===h?"true":"false",requestHost:y,groupId:b,LOCAL_MOCK:E},n),_=pe(w);return"".concat(f,"?").concat(_)}({componentName:this._componentName,appearance:(null==e?void 0:e.appearance)||{},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(S.name,Object.assign({},E.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME,{stack:e}))}}else this.dispatchToSDK(S.name,E.SDK_COMPATIBILITY_ISSUES.BROWSER_NOT_SUPPORT_POSTMESSAGE)}},{key:"listener",value:function(e){if(e.origin===this.appDomain)if(he(e.data)){var t=JSON.parse(e.data);if(t.name!==Z.APP_TO_SDK&&t.name!==Z.APP_TO_APP||t.instanceId!==this.AMSSDK._instanceId)return;this._handleAppMessage(t)}else console.warn(E.NOT_JSON_FORMAT),this.dispatchToSDK(S.name,E.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(){window["".concat(Nn,"_").concat(this.AMSSDK._instanceId)]=this.listener.bind(this),window["".concat(Nn,"_").concat(this.AMSSDK._instanceId,"_resize")]=this.resizeListener.bind(this),this._removeEventListener(),window.addEventListener("message",window["".concat(Nn,"_").concat(this.AMSSDK._instanceId)]),window.addEventListener("resize",window["".concat(Nn,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"_removeEventListener",value:function(){window.removeEventListener("message",window["".concat(Nn,"_").concat(this.AMSSDK._instanceId)]),window.removeEventListener("resize",window["".concat(Nn,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"_handleAppMessage",value:function(e){var t,n=[T.name,P.name,O.name,x.name,k.name,I.name,M.name,D.name,C.name,N.name,L.name,U.name,B.name];if(e.context.event!==B.name){if(n.includes(e.context.event)){if(e.context.event===T.name)return this._performanceData.push({key:"sdk_onLaunch",value:Date.now()}),void this.sendRenderEvent();if(e.context.event===O.name&&this.handleSizeChanged(e),e.context.event===k.name)return this.closeBtnFunc();if(e.context.event===P.name)return this.handleRedirect(e.context.data);if(e.context.event!==M.name)if(e.context.event!==C.name){if(e.context.event!==D.name)return e.context.event===N.name?(!0===e.context.data&&(this._isRetention=!0),void(!1===e.context.data&&(this._isRetention=!1))):void(e.context.event!==L.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(I.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(Cn);r&&(r.style.background="#000000",r.style.opacity="0.6",r.style.display="block"),null===(n=document.getElementById(Dn))||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(I.name,{code:"SDK_CALL_URL_SUCCESS",message:"Successfully opened the app,".concat(e,": ").concat(n)})},o=function(){t.dispatchToSDK(I.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===te.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:Z.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:_,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(_,"-").concat(t),e[t].bind(this))}},{key:"sendRenderEvent",value:(n=b()(m()().mark((function e(){var t,n,r;return m()().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(In,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(Dn),e.id=Dn,e.innerHTML='<div class="line"><div></div><div></div><div></div><div></div></div>',e.style.fontSize="".concat(Oe(),"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(Dn))||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(Cn);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(k.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 80% {\n opacity: 0\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",Mn(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="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(k.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=Cn,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}(),Un=function(e,t){return new Promise((function(n,r){var o=null;if("string"===le(t.selector)&&(o=document.querySelector(t.selector)),null===o){var i={errorCode:E.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:Z.APP_TO_SDK,instanceId:e.AMSSDK._instanceId,context:{event:S.name,data:i}})}o.innerHTML="",e.app&&o.appendChild(e.app),n()}))},Bn=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===q.EASY_PAY?Y.easyPay:o===q.CASHIER_PAYMENT&&a===H.CARD?Y.card:o===q.AUTO_DEBIT?Y.autoDebit:""},jn=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]}},Kn=function(e){Se()&&null!=e&&e.paymentSessionConfig&&(e.paymentSessionConfig.productScene===q.EASY_PAY&&(e.paymentSessionConfig.productSceneVersion="1.0"))},Fn=function(){var e=b()(m()().mark((function e(t,n){var r,o=this;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.options.mode=G.component,this.options.networkMode=this.options.networkMode||J.session,"string"!=typeof t||!n){e.next=8;break}if(r=n,t in Y){e.next=6;break}return e.abrupt("return",Promise.reject(E.CREATECOMPONENT_ERROR));case 6:e.next=9;break;case 8:r=t;case 9:if(!r||r.paymentSessionData){e.next=11;break}return e.abrupt("return",Promise.reject(E.CREATECOMPONENT_ERROR));case 11:if(this.options.networkMode!==J.proxy){e.next=16;break}return console.warn(E.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage),e.abrupt("return",Promise.reject(E.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT));case 16:return e.abrupt("return",new Promise((function(e,n){var i=jn(r.paymentSessionData),a=y()(i,2),s=a[0],c=a[1];Kn(s);var u="string"==typeof t?t:Bn(s);if(""!==u){r.paymentSessionData=c,r.paymentSessionMetaData=s;try{o._getPlugin(_).appendIframeNodes(u,r).then((function(){e()}))}catch(e){n(e)}}else n("".concat(E.CREATEPAYMENT_PARAMETER_ERROR.errorCode,":Abnormal response data, interface failure, or unsupported payment method"))})));case 17:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),zn=n(746),Yn=n.n(zn),qn=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},Hn=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(qn(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"===le(this._selector)&&(e=document.querySelector(this._selector)),t=this._selector,("object"===("undefined"==typeof HTMLElement?"undefined":z()(HTMLElement))?t instanceof HTMLElement:t&&"object"===z()(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:Z.APP_TO_SDK,instanceId:this.AMSSDK._instanceId,context:{event:"onError",data:Object.assign({},E.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME,{stack:e})}})}if(!0==!!window.postMessage)return e;this._dispatchToSDK({name:Z.APP_TO_SDK,instanceId:this.AMSSDK._instanceId,context:{event:"onError",data:E.SDK_COMPATIBILITY_ISSUES.BROWSER_NOT_SUPPORT_POSTMESSAGE}})}},{key:"_getIframeUrl",value:function(e){var t,n,r,o,i,a=qn(this.AMSSDK.options.env.environment,this._version),s=de("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=pe(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(he(e.data)){var t=JSON.parse(e.data);if(t.name!==Z.APP_TO_SDK&&t.name!==Z.APP_TO_APP||t.instanceId!==this.AMSSDK._instanceId)return;this._handleAppMessage(t)}else console.warn(E.NOT_JSON_FORMAT),this._dispatchToSDK({name:Z.APP_TO_SDK,instanceId:this.AMSSDK._instanceId,context:{event:"onError",data:E.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){[S.name,R.name,T.name,P.name,O.name,"onPaymentMethodsSelected",x.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:Z.APP_TO_SDK,mode:this.AMSSDK.options.mode,appId:w,instanceId:this.AMSSDK._instanceId},e);this.AMSSDK.eventCenter.emit("".concat(w,"-").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(w,"-").concat(t),e[t].bind(this))}},{key:"_renderPaymentMethods",value:function(e){this._dispatchToApp({name:Z.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:w,instanceId:this.AMSSDK._instanceId,context:{event:"renderPaymentMethods",data:e}})}},{key:"_handleRequestPayment",value:function(e){this._dispatchToApp(e)}}]),e}(),Wn=function(e){var t=this;return this.options.networkMode===J.proxy?new Promise((function(n,r){try{n(t._getPlugin(w).render(e))}catch(e){r(e)}})):(console.warn(E.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage),Promise.reject(E.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT))},Vn=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(w,"-handleRequestPayment"),{name:Z.SDK_TO_APP,mode:t.options.mode,appId:w,instanceId:t._instanceId,context:{event:"handleRequestPayment",data:e}})}))},Gn=function(){var e,t=this,n=new Map([[S.name,function(e){t.eventCenter.emit(S.name,e.context.data)}],[R.name,function(e){t.eventCenter.emit(R.name,e.context.data)}],[P.name,function(e){t.eventCenter.emit(P.name,e.context.data)}],[A.name,function(e){t.checkoutState.paymentMethodType=e.context.data.paymentMethodType,t.eventCenter.emit(A.name,{paymentMethodType:e.context.data.paymentMethodType})}],[O.name,function(e){t.eventCenter.emit(O.name,e.context.data)}],[x.name,function(e){t.eventCenter.emit(x.name,e.context.data)}]]),r=Yn()(n.keys());try{for(r.s();!(e=r.n()).done;){var o=e.value;this.eventCenter.on("".concat(w,"-").concat(o),n.get(o))}}catch(e){r.e(e)}finally{r.f()}},Jn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},Qn=new Uint8Array(16);function Xn(){if(!kn&&!(kn="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 kn(Qn)}for(var $n=[],Zn=0;Zn<256;++Zn)$n.push((Zn+256).toString(16).slice(1));function er(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return($n[e[t+0]]+$n[e[t+1]]+$n[e[t+2]]+$n[e[t+3]]+"-"+$n[e[t+4]]+$n[e[t+5]]+"-"+$n[e[t+6]]+$n[e[t+7]]+"-"+$n[e[t+8]]+$n[e[t+9]]+"-"+$n[e[t+10]]+$n[e[t+11]]+$n[e[t+12]]+$n[e[t+13]]+$n[e[t+14]]+$n[e[t+15]]).toLowerCase()}var tr,nr,rr,or=function(e,t,n){if(Jn.randomUUID&&!t&&!e)return Jn.randomUUID();var r=(e=e||{}).random||(e.rng||Xn)();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 er(r)},ir=window.navigator.userAgent||"",ar=function(){var e=ir.match(/OS (\d+)_(\d+)_?(\d+)?/);return Number.parseInt(e[1],10)},sr=/android/i.test(ir),cr=/iphone|ipad|ipod/i.test(ir),ur=/chrome\/[\d.]+ mobile safari\/[\d.]+/i.test(ir)&&sr&&ir.indexOf("Version")<0,lr=/qqbrowser/i.test(ir),fr=/firefox/i.test(ir);/baidubrowser/i.test(ir);function dr(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 pr,hr,mr,vr=5e3;function yr(e,t){pr=+new Date,hr=setTimeout((function(){!(!!nr&&document[nr])&&e&&e()}),t||5e3)}function gr(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||vr;o-(pr||+new Date)<i&&n(t)}}(e),hr&&clearTimeout(hr))}function br(e){return/^(http|https|itms-apps|itms-appss|market):\/\//.test(e)}function Er(e){return Er="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},Er(e)}function wr(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 _r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wr(Object(n),!0).forEach((function(t){Rr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rr(e,t,n){return(t=Ar(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sr(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,Ar(r.key),r)}}function Ar(e){var t=function(e,t){if("object"!==Er(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Er(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Er(t)?t:String(t)}!function(e){void 0!==e&&(void 0!==e.hidden?(nr="hidden",rr="visibilitychange"):void 0!==e.mozHidden?(nr="mozHidden",rr="mozvisibilitychange"):void 0!==e.msHidden?(nr="msHidden",rr="msvisibilitychange"):void 0!==e.webkitHidden&&(nr="webkitHidden",rr="webkitvisibilitychange"))}(document),function(e){e.SCHEME="Scheme",e.LINK="Link",e.INTENT="Intent"}(mr||(mr={}));var Or=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=dr(r,i),n.options.scheme=dr(t,i),cr&&ar()>9?n.evokeLink():n.evokeScheme(n.evokeLink.bind(n))):r?(n.options.link=dr(r,i),n.evokeLink()):t?(n.options.scheme=dr(t,i),n.evokeScheme()):o&&o.scheme&&o.package&&n.handleIntent()};this.config=_r(_r({},{delay:0}),t),this.options={},this.timer=null,this.evokeAppBy={url:"",type:mr.LINK},this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e;tr||((tr=document.createElement("iframe")).id="callapp_iframe_".concat(Date.now()),tr.style.cssText="display:none;border:0;width:0;height:0;",document.body.appendChild(tr)),e={evokeAppBy:this.evokeAppBy,successCb:this.config.successCb,timeout:this.config.resultJudgmentTime},void 0!==rr?document.addEventListener(rr,(function(){return gr(e)})):window.addEventListener("pagehide",(function(){return gr(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&&br(n))throw new Error("请填写正确格式的scheme");if(o&&!br(o))throw new Error("请填写正确格式的link");if(r&&r.scheme&&br(r.scheme))throw new Error("请填写正确格式的intent");this.handleDegradationStrategy()}},{key:"evokeLink",value:function(){this.evokeAppBy.type=mr.LINK;var e=this.options,t=e.link,n=e.delay;this.evokeByLocationDelay(t,n)}},{key:"evokeScheme",value:function(e){this.evokeAppBy.type=mr.SCHEME;var t=this.options,n=t.scheme,r=t.delay,o=t.fallback;cr?ar()>9||lr?this.evokeByTagADelay(n,r,o,e):this.evokeByIFrameDelay(n,r,o,e):ur||fr?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&&!br(c)&&(this.evokeAppBy.type=mr.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){tr.src=e}(e)}),e,t,n,r)}},{key:"checkIsOpen",value:function(e,t,n){return this.evokeAppBy.url=e,yr(n||t,this.config.resultJudgmentTime)}},{key:"clearTimer",value:function(){this.timer&&clearTimeout(this.timer)}}])&&Sr(t.prototype,n),r&&Sr(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:Fn}),Object.defineProperty(s()(t),"createPayment",{value:Wn}),Object.defineProperty(s()(t),"confirmPayment",{value:Vn}),Object.defineProperty(s()(t),"_subscribeFromCheckoutPlugin",{value:Gn}),o=s()(t),(a=new Ln).setRender(Un),o._registerPlugin(_,a),function(e,t){var n=new Hn;n.setRender(Un),t._registerPlugin(w,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=or(),this.options={},this.eventCenter=new fe,this.checkoutState={paymentMethodType:""},this._initEvent(t),this._setOptions(t),this.plugins=new Map}return t()(e,[{key:"destroy",value:function(){var e,t=Yn()(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=Ae()._moreEnv;null!=e&&e.environment&&!((null==e?void 0:e.environment)in Q)&&"true"!==t&&(console.warn(E.INIT_PARAMETER_ERROR.ENVIRONMENT_ERROR.errorMessage),e.environment="prod"),this.options.env={terminalType:we?$.WAP:$.WEB,environment:(null==e?void 0:e.environment)||"prod"},this.options.env.terminalType===$.WAP&&(this.options.env.osType=be?X.IOS:Ee?X.ANDROID:X.ELSE)}},{key:"_setMode",value:function(e){this.options.mode=(null==e?void 0:e.mode)||G.dropin,null!=e&&e.mode&&!((null==e?void 0:e.mode)in G)&&(console.warn(E.INIT_PARAMETER_ERROR.MODE_ERROR.errorMessage),this.options.mode=G.component),this.options.networkMode=(null==e?void 0:e.networkMode)||J.session,null!=e&&e.networkMode&&!((null==e?void 0:e.networkMode)in J)&&(console.warn(E.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage),this.options.networkMode=J.proxy)}},{key:"_initEvent",value:function(e){if(null!=e&&e.onError){if("function"!==le(e.onError))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(S.name,e.onError,S.uniqueKey)}if(null!=e&&e.onPaymentMethodSelected){if("function"!==le(e.onPaymentMethodSelected))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(A.name,e.onPaymentMethodSelected,A.uniqueKey)}if(null!=e&&e.onReady){if("function"!==le(e.onReady))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(R.name,e.onReady,R.uniqueKey)}if(null!=e&&e.onSizeChanged){if("function"!==le(e.onSizeChanged))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(O.name,e.onSizeChanged,O.uniqueKey)}if(null!=e&&e.onLog){if("function"!==le(e.onLog))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(x.name,e.onLog,x.uniqueKey)}if(null!=e&&e.onEventCallback){if("function"!==le(e.onEventCallback))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(I.name,e.onEventCallback,I.uniqueKey)}if(null!=e&&e.onClose){if("function"!==le(e.onClose))throw new Error(E.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage);this._overrideSubscription(k.name,e.onClose,k.uniqueKey)}}},{key:"_registerPlugin",value:function(e,t){this.plugins.set(e,t);try{t.applyPlugin(this)}catch(t){if(this.plugins.delete(e),"error"===le(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===$.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(E.SDK_CALL_URL_ERROR.REDIRECT_ERROR)};o?c():function(){if(a||s){var e={fallback:function(){c()},successCb:function(){n()},delay:0};try{new Or(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(S.name,e,S.uniqueKey)}},{key:"onSizeChanged",value:function(e){this._overrideSubscription(O.name,e,O.uniqueKey)}},{key:"onLog",value:function(e){this._overrideSubscription(x.name,e,x.uniqueKey)}}]),e}()),Tr=function(e){u()(r,e);var n=f()(r);function r(e){return i()(this,r),n.call(this,e)}return t()(r)}(xr),Pr=xr}(),r}()}));