@aws-amplify/geo 1.1.5-unstable.5 → 1.1.5

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.
@@ -22,5 +22,5 @@ var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
22
22
  */
23
23
  var n=r(20),i=r(21),o=r(22);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=a(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|h(t.length);return 0===(e=a(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?a(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(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 l(e,t){if(f(t),e=a(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function d(e,t){var r=t.length<0?0:0|h(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function h(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(u.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 r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return D(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return L(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var f=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var l=!0,d=0;d<u;d++)if(c(e,o+d)!==c(t,d)){l=!1;break}if(l)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function b(e,t,r,n){return q(D(t,e.length-r),e,r,n)}function S(e,t,r,n){return q(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return S(e,t,r,n)}function A(e,t,r,n){return q(z(t),e,r,n)}function P(e,t,r,n){return q(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function M(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.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}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return f(t),t<=0?a(e,t):void 0!==r?"string"==typeof n?a(e,t).fill(r,n):a(e,t).fill(r):a(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?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(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=p,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=0|this.length;return 0===e?"":0===arguments.length?M(this,0,e):v.apply(this,arguments)},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="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(n,i),f=e.slice(t,r),l=0;l<a;++l)if(c[l]!==f[l]){o=c[l],s=f[l];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function L(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function R(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=U(e[o]);return i}function T(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function B(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function k(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function I(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,o){return o||I(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return o||I(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((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),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||O(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 t||O(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 t||O(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||C(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||C(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):k(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);C(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);C(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):k(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=u.isBuffer(e)?e:D(new u(e,n).toString()),a=s.length;for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function D(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(19))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),s=n[0],a=n[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),f=0,l=a>0?s-4:s;for(r=0;r<l;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[f++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(f(e,s,s+16383>a?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],i[s.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 r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,r){for(var i,o,s=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
24
24
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
25
- t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,l=r?i-1:0,d=r?-1:1,h=e[t+l];for(l+=d,o=h&(1<<-f)-1,h>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=d,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=d,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=c}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+l>=1?d/u:d*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+h]=255&s,h+=p,s/=256,c-=8);e[r+h-p]|=128*v}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(1).__exportStar)(r(27),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(1),i=r(8),o=r(28),s=r(7),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,s.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var r=new o.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(i.BLOCK_SIZE);return n.set(t),n}(e),r=new Uint8Array(i.BLOCK_SIZE);r.set(t);for(var n=0;n<i.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(n=0;n<t.byteLength;n++)t[n]=0}}return e.prototype.update=function(e){if(!(0,s.isEmptyData)(e)&&!this.error)try{this.hash.update((0,s.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var n=r(8),i=function(){function e(){this.state=Int32Array.from(n.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var i=this.bufferLength;i<n.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<n.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(n.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(n.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(n.DIGEST_LENGTH);for(i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],c=t[6],f=t[7],l=0;l<n.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(h+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var v=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(f+(n.KEY[l]+this.temp[l]|0)|0)|0,g=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&o^i&o)|0;f=c,c=u,u=a,a=s+v|0,s=o,o=i,i=r,r=v+g|0}t[0]+=r,t[1]+=i,t[2]+=o,t[3]+=s,t[4]+=a,t[5]+=u,t[6]+=c,t[7]+=f},e}();t.RawSha256=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1).__exportStar(r(30),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var n=r(1),i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function o(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function s(e){return e&&i.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&s(e.crypto.subtle)},t.supportsSecureRandom=o,t.supportsSubtleCrypto=s,t.supportsZeroByteGCM=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:if(!s(e))return[2,!1];r.label=1;case 1:return r.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=r.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===r.sent().byteLength];case 4:return r.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);n.__exportStar(r(32),t),n.__exportStar(r(33),t),n.__exportStar(r(34),t),n.__exportStar(r(35),t),n.__exportStar(r(36),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,i=t.subtle;return n.map((function(e){return i[e]})).concat(r).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,r){"use strict";r.r(t),r.d(t,"Geo",(function(){return Bi}));var n=r(0),i=r(3),o=r.n(i),s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function c(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function f(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}Object.create;function d(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function p(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;var v=r(11),g=r(9),y=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}(),m=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,r=new e(u(u({},this),{headers:u({},this.headers)}));return r.query&&(r.query=(t=r.query,Object.keys(t).reduce((function(e,r){var n,i=t[r];return u(u({},e),((n={})[r]=Array.isArray(i)?p([],h(i)):i,n))}),{}))),r},e}();function w(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}var b=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,S)},S=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var _=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=(void 0===t?{}:t).abortSignal,n=this.requestTimeout;if(null==r?void 0:r.aborted){var i=new Error("Request aborted");return i.name="AbortError",Promise.reject(i)}var o=e.path;if(e.query){var s=function(e){var t,r,n=[];try{for(var i=d(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var s=o.value,a=e[s];if(s=b(s),Array.isArray(a))for(var u=0,c=a.length;u<c;u++)n.push(s+"="+b(a[u]));else{var f=s;(a||"string"==typeof a)&&(f+="="+b(a)),n.push(f)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.join("&")}(e.query);s&&(o+="?"+s)}var a=e.port,u=e.method,c=e.protocol+"//"+e.hostname+(a?":"+a:"")+o,f={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(f.signal=r);var l,h=new Request(c,f),p=[fetch(h).then((function(e){var t,r,n=e.headers,i={};try{for(var o=d(n.entries()),s=o.next();!s.done;s=o.next()){var a=s.value;i[a[0]]=a[1]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new y({headers:i,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new y({headers:i,statusCode:e.status,body:t})}}))})),(l=n,void 0===l&&(l=0),new Promise((function(e,t){l&&setTimeout((function(){var e=new Error("Request did not complete within "+l+" ms");e.name="TimeoutError",t(e)}),l)})))];return r&&p.push(new Promise((function(e,t){r.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(p)},e}(),A={},P=new Array(64),E=0,M="A".charCodeAt(0),x="Z".charCodeAt(0);E+M<=x;E++){var L=String.fromCharCode(E+M);A[L]=E,P[E]=L}for(E=0,M="a".charCodeAt(0),x="z".charCodeAt(0);E+M<=x;E++){L=String.fromCharCode(E+M);var R=E+26;A[L]=R,P[R]=L}for(E=0;E<10;E++){A[E.toString(10)]=E+52;L=E.toString(10),R=E+52;A[L]=R,P[R]=L}A["+"]=62,P[62]="+",A["/"]=63,P[63]="/";function T(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var r=new ArrayBuffer(t),n=new DataView(r),i=0;i<e.length;i+=4){for(var o=0,s=0,a=i,u=i+3;a<=u;a++)"="!==e[a]?(o|=A[e[a]]<<6*(u-a),s+=6):o>>=6;var c=i/4*3;o>>=s%8;for(var f=Math.floor(s/8),l=0;l<f;l++){var d=8*(f-l-1);n.setUint8(c+l,(o&255<<d)>>d)}}return new Uint8Array(r)}function O(e){return new Promise((function(t,r){var n=new FileReader;n.onloadend=function(){var e;if(2!==n.readyState)return r(new Error("Reader aborted too early"));var i=null!==(e=n.result)&&void 0!==e?e:"",o=i.indexOf(","),s=o>-1?o+1:i.length;t(i.substring(s))},n.onabort=function(){return r(new Error("Read aborted"))},n.onerror=function(){return r(n.error)},n.readAsDataURL(e)}))}var C,B={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},k=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,r){return function(n){return f(void 0,void 0,void 0,(function(){var i;return l(this,(function(o){switch(o.label){case 0:return[4,e.retryStrategy()];case 1:return(null==(i=o.sent())?void 0:i.mode)&&(r.userAgent=p(p([],h(r.userAgent||[])),[["cfg/retry-mode",i.mode]])),[2,i.retry(t,n)]}}))}))}}}(e),B)}}},I=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],N=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],j=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],F=[500,502,503,504],U=function(e){var t,r;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||N.includes(e.name)||1==(null===(r=e.$retryable)||void 0===r?void 0:r.throttling)},D=new Uint8Array(16);function z(){if(!C&&!(C="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return C(D)}var q=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var H=function(e){return"string"==typeof e&&q.test(e)},G=[],W=0;W<256;++W)G.push((W+256).toString(16).substr(1));var Y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(G[e[t+0]]+G[e[t+1]]+G[e[t+2]]+G[e[t+3]]+"-"+G[e[t+4]]+G[e[t+5]]+"-"+G[e[t+6]]+G[e[t+7]]+"-"+G[e[t+8]]+G[e[t+9]]+"-"+G[e[t+10]]+G[e[t+11]]+G[e[t+12]]+G[e[t+13]]+G[e[t+14]]+G[e[t+15]]).toLowerCase();if(!H(r))throw TypeError("Stringified UUID is invalid");return r};var V,$=function(e,t,r){var n=(e=e||{}).random||(e.rng||z)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return Y(n)};!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(V||(V={}));var K=V.STANDARD,Z=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Q=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return I.includes(e.name)}(e)||U(e)||function(e){var t;return j.includes(e.name)||F.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},X=function(){function e(e,t){var r,n,i;this.maxAttemptsProvider=e,this.mode=V.STANDARD,this.retryDecider=null!==(r=null==t?void 0:t.retryDecider)&&void 0!==r?r:Q,this.delayDecider=null!==(n=null==t?void 0:t.delayDecider)&&void 0!==n?n:Z,this.retryQuota=null!==(i=null==t?void 0:t.retryQuota)&&void 0!==i?i:function(e,t){var r,n,i,o=e,s=null!==(r=null==t?void 0:t.noRetryIncrement)&&void 0!==r?r:1,a=null!==(n=null==t?void 0:t.retryCost)&&void 0!==n?n:5,u=null!==(i=null==t?void 0:t.timeoutRetryCost)&&void 0!==i?i:10,c=e,f=function(e){return"TimeoutError"===e.name?u:a},l=function(e){return f(e)<=c};return Object.freeze({hasRetryTokens:l,retrieveRetryTokens:function(e){if(!l(e))throw new Error("No retry token available");var t=f(e);return c-=t,t},releaseRetryTokens:function(e){c+=null!=e?e:s,c=Math.min(c,o)}})}(500)}return e.prototype.shouldRetry=function(e,t,r){return t<r&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return f(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t,r){return f(this,void 0,void 0,(function(){var n,i,o,s,a,u,c,f;return l(this,(function(d){switch(d.label){case 0:return i=0,o=0,[4,this.getMaxAttempts()];case 1:s=d.sent(),a=t.request,m.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=$()),u=function(){var u,f,d,h,p,v;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,4,,7]),m.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(i+1)+"; max="+s),(null==r?void 0:r.beforeRequest)?[4,r.beforeRequest()]:[3,2];case 1:l.sent(),l.label=2;case 2:return[4,e(t)];case 3:return u=l.sent(),f=u.response,d=u.output,(null==r?void 0:r.afterRequest)&&r.afterRequest(f),c.retryQuota.releaseRetryTokens(n),d.$metadata.attempts=i+1,d.$metadata.totalRetryDelay=o,[2,{value:{response:f,output:d}}];case 4:return h=l.sent(),p=J(h),i++,c.shouldRetry(p,i,s)?(n=c.retryQuota.retrieveRetryTokens(p),v=c.delayDecider(U(p)?500:100,i),o+=v,[4,new Promise((function(e){return setTimeout(e,v)}))]):[3,6];case 5:return l.sent(),[2,"continue"];case 6:throw p.$metadata||(p.$metadata={}),p.$metadata.attempts=i,p.$metadata.totalRetryDelay=o,p;case 7:return[2]}}))},c=this,d.label=2;case 2:return[5,u()];case 3:return"object"==typeof(f=d.sent())?[2,f.value]:[3,2];case 4:return[2]}}))}))},e}(),J=function(e){return e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error("AWS SDK error wrapper for "+e)},ee=function(){function e(e){var t,r,n,i,o;this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=null!==(t=null==e?void 0:e.beta)&&void 0!==t?t:.7,this.minCapacity=null!==(r=null==e?void 0:e.minCapacity)&&void 0!==r?r:1,this.minFillRate=null!==(n=null==e?void 0:e.minFillRate)&&void 0!==n?n:.5,this.scaleConstant=null!==(i=null==e?void 0:e.scaleConstant)&&void 0!==i?i:.4,this.smooth=null!==(o=null==e?void 0:e.smooth)&&void 0!==o?o:.8;var s=this.getCurrentTimeInSeconds();this.lastThrottleTime=s,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}return e.prototype.getCurrentTimeInSeconds=function(){return Date.now()/1e3},e.prototype.getSendToken=function(){return f(this,void 0,void 0,(function(){return l(this,(function(e){return[2,this.acquireTokenBucket(1)]}))}))},e.prototype.acquireTokenBucket=function(e){return f(this,void 0,void 0,(function(){var t;return l(this,(function(r){switch(r.label){case 0:return this.enabled?(this.refillTokenBucket(),e>this.currentCapacity?(t=(e-this.currentCapacity)/this.fillRate*1e3,[4,new Promise((function(e){return setTimeout(e,t)}))]):[3,2]):[2];case 1:r.sent(),r.label=2;case 2:return this.currentCapacity=this.currentCapacity-e,[2]}}))}))},e.prototype.refillTokenBucket=function(){var e=this.getCurrentTimeInSeconds();if(this.lastTimestamp){var t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}else this.lastTimestamp=e},e.prototype.updateClientSendingRate=function(e){var t;if(this.updateMeasuredRate(),U(e)){var r=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=r,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(r),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());var n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)},e.prototype.calculateTimeWindow=function(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))},e.prototype.cubicThrottle=function(e){return this.getPrecise(e*this.beta)},e.prototype.cubicSuccess=function(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)},e.prototype.enableTokenBucket=function(){this.enabled=!0},e.prototype.updateTokenBucketRate=function(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)},e.prototype.updateMeasuredRate=function(){var e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){var r=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}},e.prototype.getPrecise=function(e){return parseFloat(e.toFixed(8))},e}(),te=function(e){function t(t,r){var n=this,i=null!=r?r:{},o=i.rateLimiter,s=c(i,["rateLimiter"]);return(n=e.call(this,t,s)||this).rateLimiter=null!=o?o:new ee,n.mode=V.ADAPTIVE,n}return a(t,e),t.prototype.retry=function(t,r){return f(this,void 0,void 0,(function(){var n=this;return l(this,(function(i){return[2,e.prototype.retry.call(this,t,r,{beforeRequest:function(){return f(n,void 0,void 0,(function(){return l(this,(function(e){return[2,this.rateLimiter.getSendToken()]}))}))},afterRequest:function(e){n.rateLimiter.updateClientSendingRate(e)}})]}))}))},t}(X),re=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var ne=r(10),ie=r.n(ne);var oe=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),se=new Set(["cn-north-1","cn-northwest-1"]),ae=new Set(["us-iso-east-1"]),ue=new Set(["us-isob-east-1"]),ce=new Set(["us-gov-east-1","us-gov-west-1"]);var fe,le,de,he,pe={apiVersion:"2020-11-19",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var r=void 0;return oe.has(e)&&(r={hostname:"geo.{region}.amazonaws.com".replace("{region}",e),partition:"aws"}),se.has(e)&&(r={hostname:"geo.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),ae.has(e)&&(r={hostname:"geo.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),ue.has(e)&&(r={hostname:"geo.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),ce.has(e)&&(r={hostname:"geo.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===r&&(r={hostname:"geo.{region}.amazonaws.com".replace("{region}",e),partition:"aws"}),Promise.resolve(u({signingService:"geo"},r))},serviceId:"Location",urlParser:function(e){var t,r=new URL(e),n=r.hostname,i=r.pathname,o=r.port,s=r.protocol,a=r.search;return a&&(t=function(e){var t,r,n={};if(e=e.replace(/^\?/,""))try{for(var i=d(e.split("&")),o=i.next();!o.done;o=i.next()){var s=h(o.value.split("="),2),a=s[0],u=s[1],c=void 0===u?null:u;a=decodeURIComponent(a),c&&(c=decodeURIComponent(c)),a in n?Array.isArray(n[a])?n[a].push(c):n[a]=[n[a],c]:n[a]=c}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}(a)),{hostname:n,port:o?parseInt(o):void 0,protocol:s,path:i,query:t}}},ve=u(u({},pe),{runtime:"browser",base64Decoder:T,base64Encoder:function(e){for(var t="",r=0;r<e.length;r+=3){for(var n=0,i=0,o=r,s=Math.min(r+3,e.length);o<s;o++)n|=e[o]<<8*(s-o-1),i+=8;var a=Math.ceil(i/6);n<<=6*a-i;for(var u=1;u<=a;u++){var c=6*(a-u);t+=P[(n&63<<c)>>c]}t+="==".slice(0,4-a)}return t},bodyLengthChecker:function(e){if("string"==typeof e){for(var t=e.length,r=t-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0},credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(le={serviceId:pe.serviceId,clientVersion:v.version},de=le.serviceId,he=le.clientVersion,function(){return f(void 0,void 0,void 0,(function(){var e,t,r,n,i,o,s,a,u;return l(this,(function(c){return e="undefined"!=typeof window&&(null===(r=null===window||void 0===window?void 0:window.navigator)||void 0===r?void 0:r.userAgent)?ie.a.parse(window.navigator.userAgent):void 0,t=[["aws-sdk-js",he],["os/"+((null===(n=null==e?void 0:e.os)||void 0===n?void 0:n.name)||"other"),null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.version],["lang/js"],["md/browser",(null!==(s=null===(o=null==e?void 0:e.browser)||void 0===o?void 0:o.name)&&void 0!==s?s:"unknown")+"_"+(null!==(u=null===(a=null==e?void 0:e.browser)||void 0===a?void 0:a.version)&&void 0!==u?u:"unknown")]],de&&t.push(["api/"+de,he]),[2,t]}))}))}),maxAttempts:3,region:(fe="Region is missing",function(){return Promise.reject(fe)}),requestHandler:new _,retryModeProvider:function(){return Promise.resolve(K)},sha256:g.Sha256,streamCollector:function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return f(this,void 0,void 0,(function(){var t,r;return l(this,(function(n){switch(n.label){case 0:return[4,O(e)];case 1:return t=n.sent(),r=T(t),[2,new Uint8Array(r)]}}))}))}(e):function(e){return f(this,void 0,void 0,(function(){var t,r,n,i,o,s,a;return l(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),r=e.getReader(),n=!1,u.label=1;case 1:return n?[3,3]:[4,r.read()];case 2:return i=u.sent(),o=i.done,(s=i.value)&&(a=t,(t=new Uint8Array(a.length+s.length)).set(a),t.set(s,a.length)),n=o,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},utf8Encoder:function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}}),ge=function(e){var t=e.endpoint,r=e.urlParser;if("string"==typeof t){var n=Promise.resolve(r(t));return function(){return n}}if("object"==typeof t){var i=Promise.resolve(t);return function(){return i}}return t},ye=function(e){return f(void 0,void 0,void 0,(function(){var t,r,n,i,o;return l(this,(function(s){switch(s.label){case 0:return t=e.tls,r=void 0===t||t,[4,e.region()];case 1:if(n=s.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(n)];case 2:if(!(i=(null!==(o=s.sent())&&void 0!==o?o:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((r?"https:":"http:")+"//"+i)]}}))}))},me=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var we={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},be=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return f(t,void 0,void 0,(function(){var t,i,o,s,a;return l(this,(function(c){return t=n.request,m.isInstance(t)&&(i=t.body,o=t.headers,i&&-1===Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(s=e(i))&&(t.headers=u(u({},t.headers),((a={})["content-length"]=String(s),a)))),[2,r(u(u({},n),{request:t}))]}))}))}}}(e.bodyLengthChecker),we)}}};var Se={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},_e=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return f(void 0,void 0,void 0,(function(){var n,i;return l(this,(function(o){return m.isInstance(r.request)?(n=r.request,i=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===i?"":i).indexOf("h2")>=0&&!n.headers[":authority"]?(delete n.headers.host,n.headers[":authority"]=""):n.headers.host||(n.headers.host=n.hostname),[2,t(r)]):[2,t(r)]}))}))}}}(e),Se)}}},Ae={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Pe=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(r){return f(void 0,void 0,void 0,(function(){var n,i,o,s,a,u,f,d,h;return l(this,(function(l){switch(l.label){case 0:return n=t.clientName,i=t.commandName,o=t.inputFilterSensitiveLog,s=t.logger,a=t.outputFilterSensitiveLog,[4,e(r)];case 1:return u=l.sent(),s?("function"==typeof s.info&&(f=u.output,d=f.$metadata,h=c(f,["$metadata"]),s.info({clientName:n,commandName:i,input:o(r.input),output:a(h),metadata:d})),[2,u]):[2,u]}}))}))}}),Ae)}}},Ee=function(e,t){return(Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Me(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ee(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function xe(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function Le(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}Object.create;Object.create;(function(e){function t(t,r){void 0===r&&(r=!0);var n=e.call(this,t)||this;return n.tryNextLink=r,n}Me(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.defineProperty(e,"tryNextLink",{value:t,configurable:!1,enumerable:!1,writable:!1}),e}})(Error),function(e){function t(t,r){void 0===r&&(r=!0);var n=e.call(this,t)||this;return n.tryNextLink=r,n.name="CredentialsProviderError",n}Me(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.defineProperty(e,"tryNextLink",{value:t,configurable:!1,enumerable:!1,writable:!1}),e}}(Error);for(var Re={},Te={},Oe=0;Oe<256;Oe++){var Ce=Oe.toString(16).toLowerCase();1===Ce.length&&(Ce="0"+Ce),Re[Oe]=Ce,Te[Ce]=Oe}function Be(e){for(var t="",r=0;r<e.byteLength;r++)t+=Re[e[r]];return t}var ke="X-Amz-Date".toLowerCase(),Ie=["authorization",ke,"date"],Ne="X-Amz-Signature".toLowerCase(),je="X-Amz-Security-Token".toLowerCase(),Fe={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Ue=/^proxy-/,De=/^sec-/,ze="AWS4-HMAC-SHA256-PAYLOAD",qe={},He=[];function Ge(e,t,r){return e+"/"+t+"/"+r+"/aws4_request"}function We(e,t,r){var n=new e(t);return n.update(r),n.digest()}function Ye(e,t,r){var n,i,o=e.headers,s={};try{for(var a=d(Object.keys(o).sort()),u=a.next();!u.done;u=a.next()){var c=u.value,f=c.toLowerCase();(f in Fe||(null==t?void 0:t.has(f))||Ue.test(f)||De.test(f))&&(!r||r&&!r.has(f))||(s[f]=o[c].trim().replace(/\s+/g," "))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return s}function Ve(e,t){var r=e.headers,n=e.body;return f(this,void 0,void 0,(function(){var e,i,o,s,a,u,c;return l(this,(function(f){switch(f.label){case 0:try{for(e=d(Object.keys(r)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(o=i.value).toLowerCase())return[2,r[o]]}catch(e){u={error:e}}finally{try{i&&!i.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=n?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof n||ArrayBuffer.isView(n)||(l=n,"function"==typeof ArrayBuffer&&l instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(l))?((s=new t).update(n),a=Be,[4,s.digest()]):[3,3];case 2:return[2,a.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var l}))}))}function $e(e){var t=e.headers,r=e.query,n=c(e,["headers","query"]);return u(u({},n),{headers:u({},t),query:r?Ke(r):void 0})}function Ke(e){return Object.keys(e).reduce((function(t,r){var n,i=e[r];return u(u({},t),((n={})[r]=Array.isArray(i)?p([],h(i)):i,n))}),{})}function Ze(e){var t,r;e="function"==typeof e.clone?e.clone():$e(e);try{for(var n=d(Object.keys(e.headers)),i=n.next();!i.done;i=n.next()){var o=i.value;Ie.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return e}function Qe(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var Xe=function(){function e(e){var t=e.applyChecksum,r=e.credentials,n=e.region,i=e.service,o=e.sha256,s=e.uriEscapePath,a=void 0===s||s;this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=tt(n),this.credentialProvider=rt(r)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),f(this,void 0,void 0,(function(){var r,n,i,o,s,a,c,f,h,p,v,g,y,m,w,b,S,_,A,P,E,M,x,L;return l(this,(function(l){switch(l.label){case 0:return r=t.signingDate,n=void 0===r?new Date:r,i=t.expiresIn,o=void 0===i?3600:i,s=t.unsignableHeaders,a=t.unhoistableHeaders,c=t.signableHeaders,f=t.signingRegion,h=t.signingService,[4,this.credentialProvider()];case 1:return p=l.sent(),null==f?[3,2]:(g=f,[3,4]);case 2:return[4,this.regionProvider()];case 3:g=l.sent(),l.label=4;case 4:return v=g,y=Je(n),m=y.longDate,w=y.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(b=Ge(w,v,null!=h?h:this.service),S=function(e,t){var r,n,i;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():$e(e),s=o.headers,a=o.query,c=void 0===a?{}:a;try{for(var f=d(Object.keys(s)),l=f.next();!l.done;l=f.next()){var h=l.value,p=h.toLowerCase();"x-amz-"!==p.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(p))||(c[h]=s[h],delete s[h])}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}return u(u({},e),{headers:s,query:c})}(Ze(e),{unhoistableHeaders:a}),p.sessionToken&&(S.query["X-Amz-Security-Token"]=p.sessionToken),S.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",S.query["X-Amz-Credential"]=p.accessKeyId+"/"+b,S.query["X-Amz-Date"]=m,S.query["X-Amz-Expires"]=o.toString(10),_=Ye(S,s,c),S.query["X-Amz-SignedHeaders"]=et(_),A=S.query,P="X-Amz-Signature",E=this.getSignature,M=[m,b,this.getSigningKey(p,v,w,h)],x=this.createCanonicalRequest,L=[S,_],[4,Ve(e,this.sha256)]);case 5:return[4,E.apply(this,M.concat([x.apply(this,L.concat([l.sent()]))]))];case 6:return A[P]=l.sent(),[2,S]}}))}))},e.prototype.sign=function(e,t){return f(this,void 0,void 0,(function(){return l(this,(function(r){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var r=e.headers,n=e.payload,i=t.signingDate,o=void 0===i?new Date:i,s=t.priorSignature,a=t.signingRegion,u=t.signingService;return f(this,void 0,void 0,(function(){var e,t,i,c,f,d,h,p,v,g,y;return l(this,(function(l){switch(l.label){case 0:return null==a?[3,1]:(t=a,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=l.sent(),l.label=3;case 3:return e=t,i=Je(o),c=i.shortDate,f=i.longDate,d=Ge(c,e,null!=u?u:this.service),[4,Ve({headers:{},body:n},this.sha256)];case 4:return h=l.sent(),(p=new this.sha256).update(r),g=Be,[4,p.digest()];case 5:return v=g.apply(void 0,[l.sent()]),y=[ze,f,d,s,v,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signingRegion,s=r.signingService;return f(this,void 0,void 0,(function(){var t,r,n,a,u,c,f,d;return l(this,(function(l){switch(l.label){case 0:return[4,this.credentialProvider()];case 1:return t=l.sent(),null==o?[3,2]:(n=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=l.sent(),l.label=4;case 4:return r=n,a=Je(i).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,r,a,s)];case 5:return(u=new(f.apply(c,[void 0,l.sent()]))).update(e),d=Be,[4,u.digest()];case 6:return[2,d.apply(void 0,[l.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signableHeaders,s=r.unsignableHeaders,a=r.signingRegion,u=r.signingService;return f(this,void 0,void 0,(function(){var t,r,n,c,f,h,p,v,g,y,m;return l(this,(function(l){switch(l.label){case 0:return[4,this.credentialProvider()];case 1:return t=l.sent(),null==a?[3,2]:(n=a,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=l.sent(),l.label=4;case 4:return r=n,c=Ze(e),f=Je(i),h=f.longDate,p=f.shortDate,v=Ge(p,r,null!=u?u:this.service),c.headers[ke]=h,t.sessionToken&&(c.headers[je]=t.sessionToken),[4,Ve(c,this.sha256)];case 5:return g=l.sent(),!function(e,t){var r,n;e=e.toLowerCase();try{for(var i=d(Object.keys(t)),o=i.next();!o.done;o=i.next()){if(e===o.value.toLowerCase())return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=g),y=Ye(c,s,o),[4,this.getSignature(h,v,this.getSigningKey(t,r,p,u),this.createCanonicalRequest(c,y,g))];case 6:return m=l.sent(),c.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+v+", SignedHeaders="+et(y)+", Signature="+m,[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,r){var n=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,r,n=e.query,i=void 0===n?{}:n,o=[],s={},a=function(e){if(e.toLowerCase()===Ne)return"continue";o.push(e);var t=i[e];"string"==typeof t?s[e]=b(e)+"="+b(t):Array.isArray(t)&&(s[e]=t.slice(0).sort().reduce((function(t,r){return t.concat([b(e)+"="+b(r)])}),[]).join("&"))};try{for(var u=d(Object.keys(i).sort()),c=u.next();!c.done;c=u.next()){a(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o.map((function(e){return s[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+n.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+n.join(";")+"\n"+r},e.prototype.createStringToSign=function(e,t,r){return f(this,void 0,void 0,(function(){var n,i;return l(this,(function(o){switch(o.label){case 0:return(n=new this.sha256).update(r),[4,n.digest()];case 1:return i=o.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Be(i)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,r,n){return f(this,void 0,void 0,(function(){var i,o,s,a,u;return l(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,n)];case 1:return i=c.sent(),a=(s=this.sha256).bind,[4,r];case 2:return(o=new(a.apply(s,[void 0,c.sent()]))).update(i),u=Be,[4,o.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,r,n){return function(e,t,r,n,i){return f(void 0,void 0,void 0,(function(){var o,s,a,u,c,f,h,p,v;return l(this,(function(l){switch(l.label){case 0:return[4,We(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=l.sent(),(s=r+":"+n+":"+i+":"+Be(o)+":"+t.sessionToken)in qe)return[2,qe[s]];for(He.push(s);He.length>50;)delete qe[He.shift()];a="AWS4"+t.secretAccessKey,l.label=2;case 2:l.trys.push([2,7,8,9]),u=d([r,n,i,"aws4_request"]),c=u.next(),l.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,We(e,a,f)]);case 4:a=l.sent(),l.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return h=l.sent(),p={error:h},[3,9];case 8:try{c&&!c.done&&(v=u.return)&&v.call(u)}finally{if(p)throw p.error}return[7];case 9:return[2,qe[s]=a]}}))}))}(this.sha256,e,r,t,n||this.service)},e}(),Je=function(e){var t=Qe(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},et=function(e){return Object.keys(e).sort().join(";")},tt=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},rt=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},nt=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},it=function(e){return"function"==typeof e?function(e,t,r){var n,i;if(void 0===t)return function(){return i||(n=e(),i=!0),n};var o=!1;return function(){return xe(void 0,void 0,void 0,(function(){var s;return Le(this,(function(a){switch(a.label){case 0:return i||(n=e(),i=!0),o?[2,n]:[4,n];case 1:return s=a.sent(),r&&!r(s)?(o=!0,[2,s]):t(s)?[2,n=e()]:[2,s]}}))}))}}(e,(function(e){return void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5}),(function(e){return void 0!==e.expiration})):nt(e)},ot=function(e){return new Date(Date.now()+e)};function st(e){return function(t,r){return function(n){return f(this,void 0,void 0,(function(){var i,o,s,a,c,f,d,h,p;return l(this,(function(l){switch(l.label){case 0:return m.isInstance(n.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(n)];case 1:return o=l.sent(),[3,3];case 2:o=e.signer,l.label=3;case 3:return i=o,a=t,c=[u({},n)],p={},[4,i.sign(n.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:r.signing_region,signingService:r.signing_service})];case 4:return[4,a.apply(void 0,[u.apply(void 0,c.concat([(p.request=l.sent(),p)]))])];case 5:return s=l.sent(),f=s.response.headers,(d=f&&(f.date||f.Date))&&(h=Date.parse(d),v=h,g=e.systemClockOffset,Math.abs(ot(g).getTime()-v)>=3e5&&(e.systemClockOffset=h-Date.now())),[2,s]}var v,g}))}))}}}var at={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},ut=function(e){return{applyToStack:function(t){t.addRelativeTo(st(e),at)}}};var ct=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,ft=function(e){var t=h(e,2),r=t[0],n=t[1],i=r.indexOf("/"),o=r.substring(0,i),s=r.substring(i+1);return"api"===o&&(s=s.toLowerCase()),[o,s,n].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(ct,"_")})).join("/")},lt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},dt=function(e){return{applyToStack:function(t){var r;t.add((r=e,function(e,t){return function(n){return f(void 0,void 0,void 0,(function(){var i,o,s,a,c,f,d,v,g;return l(this,(function(l){switch(l.label){case 0:return i=n.request,m.isInstance(i)?(o=i.headers,s=(null===(v=null==t?void 0:t.userAgent)||void 0===v?void 0:v.map(ft))||[],[4,r.defaultUserAgentProvider()]):[2,e(n)];case 1:return a=l.sent().map(ft),c=(null===(g=null==r?void 0:r.customUserAgent)||void 0===g?void 0:g.map(ft))||[],f=p(p(p([],h(a)),h(s)),h(c)).join(" "),d=p(p([],h(a.filter((function(e){return e.startsWith("aws-sdk-")})))),h(c)).join(" "),"browser"!==r.runtime?(d&&(o["x-amz-user-agent"]=o["x-amz-user-agent"]?o["user-agent"]+" "+d:d),o["user-agent"]=f):o["x-amz-user-agent"]=f,[2,e(u(u({},n),{request:i}))]}}))}))}}),lt)}}},ht=function(){var e=[],t=[],r=new Set,n=function(r){return e.forEach((function(e){r.add(e.middleware,u({},e))})),t.forEach((function(e){r.addRelativeTo(e.middleware,u({},e))})),r},i=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,p([],h(i(e))))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,p([],h(i(e))))})),t},o=function(){var r,n=[],o=[],s={};return e.forEach((function(e){var t=u(u({},e),{before:[],after:[]});t.name&&(s[t.name]=t),n.push(t)})),t.forEach((function(e){var t=u(u({},e),{before:[],after:[]});t.name&&(s[t.name]=t),o.push(t)})),o.forEach((function(e){if(e.toMiddleware){var t=s[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(r=n,r.sort((function(e,t){return pt[t.step]-pt[e.step]||vt[t.priority||"normal"]-vt[e.priority||"normal"]}))).map(i).reduce((function(e,t){return e.push.apply(e,p([],h(t))),e}),[]).map((function(e){return e.middleware}))},s={add:function(t,n){void 0===n&&(n={});var i=n.name,o=n.override,s=u({step:"initialize",priority:"normal",middleware:t},n);if(i){if(r.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var a=e.findIndex((function(e){return e.name===i})),c=e[a];if(c.step!==s.step||c.priority!==s.priority)throw new Error('"'+i+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+s.priority+" priority in "+s.step+" step.");e.splice(a,1)}r.add(i)}e.push(s)},addRelativeTo:function(e,n){var i=n.name,o=n.override,s=u({middleware:e},n);if(i){if(r.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var a=t.findIndex((function(e){return e.name===i})),c=t[a];if(c.toMiddleware!==s.toMiddleware||c.relation!==s.relation)throw new Error('"'+i+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+s.relation+' "'+s.toMiddleware+'" middleware.');t.splice(a,1)}r.add(i)}t.push(s)},clone:function(){return n(ht())},use:function(e){e.applyToStack(s)},remove:function(n){return"string"==typeof n?function(n){var i=!1,o=function(e){return!e.name||e.name!==n||(i=!0,r.delete(n),!1)};return e=e.filter(o),t=t.filter(o),i}(n):function(n){var i=!1,o=function(e){return e.middleware!==n||(i=!0,e.name&&r.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(n)},removeByTag:function(n){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(n)||(o&&r.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=n(ht());return t.use(e),t},applyToStack:n,resolve:function(e,t){var r,n;try{for(var i=d(o().reverse()),s=i.next();!s.done;s=i.next()){e=(0,s.value)(e,t)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e}};return s},pt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},vt={high:3,normal:2,low:1},gt=function(){function e(e){this.middlewareStack=ht(),this.config=e}return e.prototype.send=function(e,t,r){var n="function"!=typeof t?t:void 0,i="function"==typeof t?t:r,o=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!i)return o(e).then((function(e){return e.output}));o(e).then((function(e){return i(null,e.output)}),(function(e){return i(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),yt=function(){this.middlewareStack=ht()};function mt(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}var wt=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,p([null],h(arguments))),r=new t;return Object.setPrototypeOf(r,e.prototype),r};wt.prototype=Object.create(String.prototype,{constructor:{value:wt,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(wt,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}a(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(wt);var bt=function(e){if(null!=e){if("number"==typeof e)return e;throw new TypeError("Expected number, got "+typeof e)}},St=function(e){if(null!=e){if("string"==typeof e)return e;throw new TypeError("Expected string, got "+typeof e)}},_t=function(e){if("string"==typeof e)switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error("Unable to parse float value: "+e)}return bt(e)},At=function(e){if(e!=e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}};var Pt,Et,Mt,xt,Lt,Rt,Tt,Ot,Ct,Bt,kt,It,Nt,jt,Ft,Ut,Dt,zt,qt,Ht,Gt,Wt,Yt,Vt,$t,Kt,Zt,Qt,Xt,Jt,er,tr,rr,nr,ir,or,sr,ar,ur,cr,fr,lr,dr,hr,pr,vr,gr,yr,mr,wr,br,Sr,_r,Ar,Pr,Er,Mr,xr,Lr,Rr,Tr,Or,Cr,Br,kr,Ir,Nr,jr,Fr,Ur,Dr,zr,qr,Hr,Gr,Wr,Yr,Vr,$r,Kr,Zr,Qr,Xr,Jr,en,tn,rn,nn,on,sn,an,un,cn,fn,ln,dn,hn,pn,vn,gn,yn,mn,wn,bn,Sn,_n,An,Pn,En,Mn,xn,Ln,Rn,Tn,On,Cn,Bn,kn,In,Nn,jn,Fn,Un,Dn,zn,qn,Hn,Gn,Wn,Yn,Vn,$n,Kn="***SensitiveInformation***",Zn=function(e){function t(t){var r,n,i=this,o=function(e){var t;return u(u({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?ge(e):function(){return ye(e)},isCustomEndpoint:!!e.endpoint})}(function(e){if(!e.region)throw new Error("Region is missing");return u(u({},e),{region:me(e.region)})}(u(u({},ve),t))),s=function(e){return u(u({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}(function(e){var t,r=e.credentials?it(e.credentials):e.credentialDefaultProvider(e),n=e.signingEscapePath,i=void 0===n||n,o=e.systemClockOffset,s=void 0===o?e.systemClockOffset||0:o,a=e.sha256;return t=e.signer?nt(e.signer):function(){return nt(e.region)().then((function(t){return f(void 0,void 0,void 0,(function(){return l(this,(function(r){switch(r.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[r.sent()||{},t]]}}))}))})).then((function(t){var n=h(t,2),o=n[0],s=n[1],u=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||u||s,e.signingName=e.signingName||c||e.serviceId,new Xe({credentials:r,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i})}))},u(u({},e),{systemClockOffset:s,signingEscapePath:i,credentials:r,signer:t})}((n=re((r=o).maxAttempts),u(u({},r),{maxAttempts:n,retryStrategy:function(){return f(void 0,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return r.retryStrategy?[2,r.retryStrategy]:(e=r.retryMode)?[3,2]:[4,r.retryModeProvider()];case 1:e=t.sent(),t.label=2;case 2:return e===V.ADAPTIVE?[2,new te(n)]:[2,new X(n)]}}))}))}}))));return(i=e.call(this,s)||this).config=s,i.middlewareStack.use(k(i.config)),i.middlewareStack.use(be(i.config)),i.middlewareStack.use(_e(i.config)),i.middlewareStack.use(Pe(i.config)),i.middlewareStack.use(ut(i.config)),i.middlewareStack.use(dt(i.config)),i}return a(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(gt);(Pt||(Pt={})).filterSensitiveLog=function(e){return u({},e)},(Et||(Et={})).filterSensitiveLog=function(e){return u({},e)},(Mt||(Mt={})).filterSensitiveLog=function(e){return u({},e)},(xt||(xt={})).filterSensitiveLog=function(e){return u({},e)},(Lt||(Lt={})).filterSensitiveLog=function(e){return u({},e)},(Rt||(Rt={})).filterSensitiveLog=function(e){return u({},e)},(Tt||(Tt={})).filterSensitiveLog=function(e){return u({},e)},(Ot||(Ot={})).filterSensitiveLog=function(e){return u({},e)},(Ct||(Ct={})).filterSensitiveLog=function(e){return u({},e)},(Bt||(Bt={})).filterSensitiveLog=function(e){return u({},e)},(kt||(kt={})).filterSensitiveLog=function(e){return u({},e)},(It||(It={})).filterSensitiveLog=function(e){return u({},e)},(Nt||(Nt={})).filterSensitiveLog=function(e){return u({},e)},(jt||(jt={})).filterSensitiveLog=function(e){return u({},e)},(Ft||(Ft={})).filterSensitiveLog=function(e){return u({},e)},(Ut||(Ut={})).filterSensitiveLog=function(e){return u({},e)},(Dt||(Dt={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(zt||(zt={})).filterSensitiveLog=function(e){return u(u({},e),e.DevicePositionUpdates&&{DevicePositionUpdates:e.DevicePositionUpdates.map((function(e){return Dt.filterSensitiveLog(e)}))})},(qt||(qt={})).filterSensitiveLog=function(e){return u({},e)},(Ht||(Ht={})).filterSensitiveLog=function(e){return u({},e)},(Gt||(Gt={})).filterSensitiveLog=function(e){return u({},e)},(Wt||(Wt={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(Yt||(Yt={})).filterSensitiveLog=function(e){return u({},e)},(Vt||(Vt={})).filterSensitiveLog=function(e){return u(u({},e),e.DevicePositions&&{DevicePositions:e.DevicePositions.map((function(e){return Wt.filterSensitiveLog(e)}))})},($t||($t={})).filterSensitiveLog=function(e){return u(u({},e),e.Polygon&&{Polygon:e.Polygon.map((function(e){return Kn}))})},(Kt||(Kt={})).filterSensitiveLog=function(e){return u(u({},e),e.Geometry&&{Geometry:$t.filterSensitiveLog(e.Geometry)})},(Zt||(Zt={})).filterSensitiveLog=function(e){return u(u({},e),e.Entries&&{Entries:e.Entries.map((function(e){return Kt.filterSensitiveLog(e)}))})},(Qt||(Qt={})).filterSensitiveLog=function(e){return u({},e)},(Xt||(Xt={})).filterSensitiveLog=function(e){return u({},e)},(Jt||(Jt={})).filterSensitiveLog=function(e){return u({},e)},(er||(er={})).filterSensitiveLog=function(e){return u(u({},e),e.Updates&&{Updates:e.Updates.map((function(e){return Dt.filterSensitiveLog(e)}))})},(tr||(tr={})).filterSensitiveLog=function(e){return u({},e)},(rr||(rr={})).filterSensitiveLog=function(e){return u({},e)},(nr||(nr={})).filterSensitiveLog=function(e){return u({},e)},(ir||(ir={})).filterSensitiveLog=function(e){return u({},e)},(or||(or={})).filterSensitiveLog=function(e){return u({},e)},(sr||(sr={})).filterSensitiveLog=function(e){return u({},e)},(ar||(ar={})).filterSensitiveLog=function(e){return u(u(u(u({},e),e.DeparturePosition&&{DeparturePosition:Kn}),e.DestinationPosition&&{DestinationPosition:Kn}),e.WaypointPositions&&{WaypointPositions:Kn})},(ur||(ur={})).filterSensitiveLog=function(e){return u(u({},e),e.LineString&&{LineString:Kn})},(cr||(cr={})).filterSensitiveLog=function(e){return u(u(u({},e),e.StartPosition&&{StartPosition:Kn}),e.EndPosition&&{EndPosition:Kn})},(fr||(fr={})).filterSensitiveLog=function(e){return u(u(u(u(u({},e),e.StartPosition&&{StartPosition:Kn}),e.EndPosition&&{EndPosition:Kn}),e.Geometry&&{Geometry:ur.filterSensitiveLog(e.Geometry)}),e.Steps&&{Steps:e.Steps.map((function(e){return cr.filterSensitiveLog(e)}))})},(lr||(lr={})).filterSensitiveLog=function(e){return u(u({},e),e.RouteBBox&&{RouteBBox:Kn})},(dr||(dr={})).filterSensitiveLog=function(e){return u(u(u({},e),e.Legs&&{Legs:e.Legs.map((function(e){return fr.filterSensitiveLog(e)}))}),e.Summary&&{Summary:lr.filterSensitiveLog(e.Summary)})},(hr||(hr={})).filterSensitiveLog=function(e){return u({},e)},(pr||(pr={})).filterSensitiveLog=function(e){return u({},e)},(vr||(vr={})).filterSensitiveLog=function(e){return u({},e)},(gr||(gr={})).filterSensitiveLog=function(e){return u({},e)},(yr||(yr={})).filterSensitiveLog=function(e){return u({},e)},(mr||(mr={})).filterSensitiveLog=function(e){return u({},e)},(wr||(wr={})).filterSensitiveLog=function(e){return u({},e)},(br||(br={})).filterSensitiveLog=function(e){return u({},e)},(Sr||(Sr={})).filterSensitiveLog=function(e){return u({},e)},(_r||(_r={})).filterSensitiveLog=function(e){return u({},e)},(Ar||(Ar={})).filterSensitiveLog=function(e){return u({},e)},(Pr||(Pr={})).filterSensitiveLog=function(e){return u({},e)},(Er||(Er={})).filterSensitiveLog=function(e){return u({},e)},(Mr||(Mr={})).filterSensitiveLog=function(e){return u({},e)},(xr||(xr={})).filterSensitiveLog=function(e){return u({},e)},(Lr||(Lr={})).filterSensitiveLog=function(e){return u({},e)},(Rr||(Rr={})).filterSensitiveLog=function(e){return u({},e)},(Tr||(Tr={})).filterSensitiveLog=function(e){return u({},e)},(Or||(Or={})).filterSensitiveLog=function(e){return u({},e)},(Cr||(Cr={})).filterSensitiveLog=function(e){return u({},e)},(Br||(Br={})).filterSensitiveLog=function(e){return u({},e)},(kr||(kr={})).filterSensitiveLog=function(e){return u({},e)},(Ir||(Ir={})).filterSensitiveLog=function(e){return u({},e)},(Nr||(Nr={})).filterSensitiveLog=function(e){return u({},e)},(jr||(jr={})).filterSensitiveLog=function(e){return u({},e)},(Fr||(Fr={})).filterSensitiveLog=function(e){return u({},e)},(Ur||(Ur={})).filterSensitiveLog=function(e){return u({},e)},(Dr||(Dr={})).filterSensitiveLog=function(e){return u({},e)},(zr||(zr={})).filterSensitiveLog=function(e){return u({},e)},(qr||(qr={})).filterSensitiveLog=function(e){return u({},e)},(Hr||(Hr={})).filterSensitiveLog=function(e){return u({},e)},(Gr||(Gr={})).filterSensitiveLog=function(e){return u({},e)},(Wr||(Wr={})).filterSensitiveLog=function(e){return u({},e)},(Yr||(Yr={})).filterSensitiveLog=function(e){return u({},e)},(Vr||(Vr={})).filterSensitiveLog=function(e){return u({},e)},($r||($r={})).filterSensitiveLog=function(e){return u({},e)},(Kr||(Kr={})).filterSensitiveLog=function(e){return u({},e)},(Zr||(Zr={})).filterSensitiveLog=function(e){return u({},e)},(Qr||(Qr={})).filterSensitiveLog=function(e){return u({},e)},(Xr||(Xr={})).filterSensitiveLog=function(e){return u({},e)},(Jr||(Jr={})).filterSensitiveLog=function(e){return u({},e)},(en||(en={})).filterSensitiveLog=function(e){return u(u({},e),e.Geometry&&{Geometry:$t.filterSensitiveLog(e.Geometry)})},(tn||(tn={})).filterSensitiveLog=function(e){return u({},e)},(rn||(rn={})).filterSensitiveLog=function(e){return u({},e)},(nn||(nn={})).filterSensitiveLog=function(e){return u({},e)},(on||(on={})).filterSensitiveLog=function(e){return u({},e)},(sn||(sn={})).filterSensitiveLog=function(e){return u(u({},e),e.Geometry&&{Geometry:$t.filterSensitiveLog(e.Geometry)})},(an||(an={})).filterSensitiveLog=function(e){return u(u({},e),e.Entries&&{Entries:e.Entries.map((function(e){return sn.filterSensitiveLog(e)}))})},(un||(un={})).filterSensitiveLog=function(e){return u(u({},e),e.Geometry&&{Geometry:$t.filterSensitiveLog(e.Geometry)})},(cn||(cn={})).filterSensitiveLog=function(e){return u({},e)},(fn||(fn={})).filterSensitiveLog=function(e){return u({},e)},(ln||(ln={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(dn||(dn={})).filterSensitiveLog=function(e){return u({},e)},(hn||(hn={})).filterSensitiveLog=function(e){return u(u({},e),e.DevicePositions&&{DevicePositions:e.DevicePositions.map((function(e){return Wt.filterSensitiveLog(e)}))})},(pn||(pn={})).filterSensitiveLog=function(e){return u({},e)},(vn||(vn={})).filterSensitiveLog=function(e){return u({},e)},(gn||(gn={})).filterSensitiveLog=function(e){return u({},e)},(yn||(yn={})).filterSensitiveLog=function(e){return u({},e)},(mn||(mn={})).filterSensitiveLog=function(e){return u({},e)},(wn||(wn={})).filterSensitiveLog=function(e){return u({},e)},(bn||(bn={})).filterSensitiveLog=function(e){return u({},e)},(Sn||(Sn={})).filterSensitiveLog=function(e){return u({},e)},(_n||(_n={})).filterSensitiveLog=function(e){return u({},e)},(An||(An={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(Pn||(Pn={})).filterSensitiveLog=function(e){return u(u({},e),e.Entries&&{Entries:e.Entries.map((function(e){return An.filterSensitiveLog(e)}))})},(En||(En={})).filterSensitiveLog=function(e){return u({},e)},(Mn||(Mn={})).filterSensitiveLog=function(e){return u({},e)},(xn||(xn={})).filterSensitiveLog=function(e){return u({},e)},(Ln||(Ln={})).filterSensitiveLog=function(e){return u({},e)},(Rn||(Rn={})).filterSensitiveLog=function(e){return u({},e)},(Tn||(Tn={})).filterSensitiveLog=function(e){return u({},e)},(On||(On={})).filterSensitiveLog=function(e){return u({},e)},(Cn||(Cn={})).filterSensitiveLog=function(e){return u({},e)},(Bn||(Bn={})).filterSensitiveLog=function(e){return u({},e)},(kn||(kn={})).filterSensitiveLog=function(e){return u({},e)},(In||(In={})).filterSensitiveLog=function(e){return u({},e)},(Nn||(Nn={})).filterSensitiveLog=function(e){return u({},e)},(jn||(jn={})).filterSensitiveLog=function(e){return u({},e)},(Fn||(Fn={})).filterSensitiveLog=function(e){return u({},e)},(Un||(Un={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(Dn||(Dn={})).filterSensitiveLog=function(e){return u(u({},e),e.Point&&{Point:Kn})},(zn||(zn={})).filterSensitiveLog=function(e){return u(u({},e),e.Geometry&&{Geometry:Dn.filterSensitiveLog(e.Geometry)})},(qn||(qn={})).filterSensitiveLog=function(e){return u(u({},e),e.Place&&{Place:zn.filterSensitiveLog(e.Place)})},(Hn||(Hn={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(Gn||(Gn={})).filterSensitiveLog=function(e){return u(u(u({},e),e.Summary&&{Summary:Hn.filterSensitiveLog(e.Summary)}),e.Results&&{Results:e.Results.map((function(e){return qn.filterSensitiveLog(e)}))})},(Wn||(Wn={})).filterSensitiveLog=function(e){return u(u(u(u({},e),e.Text&&{Text:Kn}),e.BiasPosition&&{BiasPosition:Kn}),e.FilterBBox&&{FilterBBox:Kn})},(Yn||(Yn={})).filterSensitiveLog=function(e){return u(u({},e),e.Place&&{Place:zn.filterSensitiveLog(e.Place)})},(Vn||(Vn={})).filterSensitiveLog=function(e){return u(u(u(u(u({},e),e.Text&&{Text:Kn}),e.BiasPosition&&{BiasPosition:Kn}),e.FilterBBox&&{FilterBBox:Kn}),e.ResultBBox&&{ResultBBox:Kn})},($n||($n={})).filterSensitiveLog=function(e){return u(u(u({},e),e.Summary&&{Summary:Vn.filterSensitiveLog(e.Summary)}),e.Results&&{Results:e.Results.map((function(e){return Yn.filterSensitiveLog(e)}))})};var Qn=function(e,t){return f(void 0,void 0,void 0,(function(){var r,n,i,o,s,a,c,f,d,h,p,v;return l(this,(function(l){switch(l.label){case 0:return n=[u({},e)],v={},[4,wi(e.body,t)];case 1:switch(r=u.apply(void 0,n.concat([(v.body=l.sent(),v)])),o="UnknownError",o=bi(e,r.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return s=[{}],[4,Jn(r,t)];case 3:return i=u.apply(void 0,[u.apply(void 0,s.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 4:return a=[{}],[4,ei(r,t)];case 5:return i=u.apply(void 0,[u.apply(void 0,a.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 6:return c=[{}],[4,ti(r,t)];case 7:return i=u.apply(void 0,[u.apply(void 0,c.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 8:return f=[{}],[4,ri(r,t)];case 9:return i=u.apply(void 0,[u.apply(void 0,f.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 10:return d=[{}],[4,ni(r,t)];case 11:return i=u.apply(void 0,[u.apply(void 0,d.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 12:h=r.body,o=h.code||h.Code||o,i=u(u({},h),{name:""+o,message:h.message||h.Message||o,$fault:"client",$metadata:yi(e)}),l.label=13;case 13:return p=i.message||i.Message||o,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Xn=function(e,t){return f(void 0,void 0,void 0,(function(){var r,n,i,o,s,a,c,f,d,h,p,v;return l(this,(function(l){switch(l.label){case 0:return n=[u({},e)],v={},[4,wi(e.body,t)];case 1:switch(r=u.apply(void 0,n.concat([(v.body=l.sent(),v)])),o="UnknownError",o=bi(e,r.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return s=[{}],[4,Jn(r,t)];case 3:return i=u.apply(void 0,[u.apply(void 0,s.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 4:return a=[{}],[4,ei(r,t)];case 5:return i=u.apply(void 0,[u.apply(void 0,a.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 6:return c=[{}],[4,ti(r,t)];case 7:return i=u.apply(void 0,[u.apply(void 0,c.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 8:return f=[{}],[4,ri(r,t)];case 9:return i=u.apply(void 0,[u.apply(void 0,f.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 10:return d=[{}],[4,ni(r,t)];case 11:return i=u.apply(void 0,[u.apply(void 0,d.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 12:h=r.body,o=h.code||h.Code||o,i=u(u({},h),{name:""+o,message:h.message||h.Message||o,$fault:"client",$metadata:yi(e)}),l.label=13;case 13:return p=i.message||i.Message||o,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Jn=function(e,t){return f(void 0,void 0,void 0,(function(){var t,r;return l(this,(function(n){return t={name:"AccessDeniedException",$fault:"client",$metadata:yi(e),Message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.Message=St(r.message)),[2,t]}))}))},ei=function(e,t){return f(void 0,void 0,void 0,(function(){var t,r;return l(this,(function(n){return t={name:"InternalServerException",$fault:"server",$retryable:{},$metadata:yi(e),Message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.Message=St(r.message)),[2,t]}))}))},ti=function(e,t){return f(void 0,void 0,void 0,(function(){var t,r;return l(this,(function(n){return t={name:"ResourceNotFoundException",$fault:"client",$metadata:yi(e),Message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.Message=St(r.message)),[2,t]}))}))},ri=function(e,t){return f(void 0,void 0,void 0,(function(){var t,r;return l(this,(function(n){return t={name:"ThrottlingException",$fault:"client",$retryable:{},$metadata:yi(e),Message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.Message=St(r.message)),[2,t]}))}))},ni=function(e,t){return f(void 0,void 0,void 0,(function(){var r,n;return l(this,(function(i){return r={name:"ValidationException",$fault:"client",$metadata:yi(e),FieldList:void 0,Message:void 0,Reason:void 0},void 0!==(n=e.body).fieldList&&null!==n.fieldList&&(r.FieldList=gi(n.fieldList,t)),void 0!==n.message&&null!==n.message&&(r.Message=St(n.message)),void 0!==n.reason&&null!==n.reason&&(r.Reason=St(n.reason)),[2,r]}))}))},ii=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:At(e)}))},oi=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:e}))},si=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:At(e)}))},ai=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:_t(e)}))},ui=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:St(e)}))},ci=function(e,t){return{AddressNumber:St(e.AddressNumber),Country:St(e.Country),Geometry:void 0!==e.Geometry&&null!==e.Geometry?fi(e.Geometry,t):void 0,Label:St(e.Label),Municipality:St(e.Municipality),Neighborhood:St(e.Neighborhood),PostalCode:St(e.PostalCode),Region:St(e.Region),Street:St(e.Street),SubRegion:St(e.SubRegion)}},fi=function(e,t){return{Point:void 0!==e.Point&&null!==e.Point?li(e.Point,t):void 0}},li=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:_t(e)}))},di=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Place:void 0!==e.Place&&null!==e.Place?ci(e.Place,t):void 0}}(e,t)}))},hi=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Place:void 0!==e.Place&&null!==e.Place?ci(e.Place,t):void 0}}(e,t)}))},pi=function(e,t){return{DataSource:St(e.DataSource),MaxResults:bt(e.MaxResults),Position:void 0!==e.Position&&null!==e.Position?li(e.Position,t):void 0}},vi=function(e,t){return{BiasPosition:void 0!==e.BiasPosition&&null!==e.BiasPosition?li(e.BiasPosition,t):void 0,DataSource:St(e.DataSource),FilterBBox:void 0!==e.FilterBBox&&null!==e.FilterBBox?ai(e.FilterBBox):void 0,FilterCountries:void 0!==e.FilterCountries&&null!==e.FilterCountries?ui(e.FilterCountries):void 0,MaxResults:bt(e.MaxResults),ResultBBox:void 0!==e.ResultBBox&&null!==e.ResultBBox?ai(e.ResultBBox):void 0,Text:St(e.Text)}},gi=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Message:St(e.message),Name:St(e.name)}}(e)}))},yi=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},mi=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},wi=function(e,t){return function(e,t){return mi(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},bi=function(e,t){var r,n,i=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=(r=e.headers,n="x-amzn-errortype",Object.keys(r).find((function(e){return e.toLowerCase()===n.toLowerCase()})));return void 0!==o?i(e.headers[o]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):""},Si={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},_i={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ai(e,t,r){return{applyToStack:function(n){n.add(function(e,t){return function(r,n){return function(n){return f(void 0,void 0,void 0,(function(){var i,o;return l(this,(function(s){switch(s.label){case 0:return[4,r(n)];case 1:return i=s.sent().response,[4,t(i,e)];case 2:return o=s.sent(),[2,{response:i,output:o}]}}))}))}}}(e,r),Si),n.add(function(e,t){return function(r,n){return function(n){return f(void 0,void 0,void 0,(function(){var i;return l(this,(function(o){switch(o.label){case 0:return[4,t(n.input,e)];case 1:return i=o.sent(),[2,r(u(u({},n),{request:i}))]}}))}))}}}(e,t),_i)}}}var Pi=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return a(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Ai(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForTextCommand",inputFilterSensitiveLog:Wn.filterSensitiveLog,outputFilterSensitiveLog:$n.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return f(void 0,void 0,void 0,(function(){var r,n,i,o,s,a,c,f,d,h;return l(this,(function(l){switch(l.label){case 0:return[4,t.endpoint()];case 1:if(r=l.sent(),r.hostname,n=r.protocol,i=void 0===n?"https":n,o=r.port,s=r.path,a={"content-type":"application/json"},c=((null==s?void 0:s.endsWith("/"))?s.slice(0,-1):s||"")+"/places/v0/indexes/{IndexName}/search/text",void 0===e.IndexName)throw new Error("No value provided for input HTTP label: IndexName.");if((f=e.IndexName).length<=0)throw new Error("Empty value provided for input HTTP label: IndexName.");return c=c.replace("{IndexName}",mt(f)),d=JSON.stringify(u(u(u(u(u({},void 0!==e.BiasPosition&&null!==e.BiasPosition&&{BiasPosition:si(e.BiasPosition,t)}),void 0!==e.FilterBBox&&null!==e.FilterBBox&&{FilterBBox:ii(e.FilterBBox,t)}),void 0!==e.FilterCountries&&null!==e.FilterCountries&&{FilterCountries:oi(e.FilterCountries,t)}),void 0!==e.MaxResults&&null!==e.MaxResults&&{MaxResults:e.MaxResults}),void 0!==e.Text&&null!==e.Text&&{Text:e.Text})),[4,t.endpoint()];case 2:if(h=l.sent().hostname,!0!==t.disableHostPrefix&&!w(h="places."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new m({protocol:i,hostname:h,port:o,method:"POST",headers:a,path:c,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return f(void 0,void 0,void 0,(function(){var r,n;return l(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Xn(e,t)]:(r={$metadata:yi(e),Results:void 0,Summary:void 0},[4,wi(e.body,t)]);case 1:return void 0!==(n=i.sent()).Results&&null!==n.Results&&(r.Results=hi(n.Results,t)),void 0!==n.Summary&&null!==n.Summary&&(r.Summary=vi(n.Summary,t)),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(yt),Ei=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return a(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Ai(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForPositionCommand",inputFilterSensitiveLog:Un.filterSensitiveLog,outputFilterSensitiveLog:Gn.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return f(void 0,void 0,void 0,(function(){var r,n,i,o,s,a,c,f,d,h;return l(this,(function(l){switch(l.label){case 0:return[4,t.endpoint()];case 1:if(r=l.sent(),r.hostname,n=r.protocol,i=void 0===n?"https":n,o=r.port,s=r.path,a={"content-type":"application/json"},c=((null==s?void 0:s.endsWith("/"))?s.slice(0,-1):s||"")+"/places/v0/indexes/{IndexName}/search/position",void 0===e.IndexName)throw new Error("No value provided for input HTTP label: IndexName.");if((f=e.IndexName).length<=0)throw new Error("Empty value provided for input HTTP label: IndexName.");return c=c.replace("{IndexName}",mt(f)),d=JSON.stringify(u(u({},void 0!==e.MaxResults&&null!==e.MaxResults&&{MaxResults:e.MaxResults}),void 0!==e.Position&&null!==e.Position&&{Position:si(e.Position,t)})),[4,t.endpoint()];case 2:if(h=l.sent().hostname,!0!==t.disableHostPrefix&&!w(h="places."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new m({protocol:i,hostname:h,port:o,method:"POST",headers:a,path:c,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return f(void 0,void 0,void 0,(function(){var r,n;return l(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Qn(e,t)]:(r={$metadata:yi(e),Results:void 0,Summary:void 0},[4,wi(e.body,t)]);case 1:return void 0!==(n=i.sent()).Results&&null!==n.Results&&(r.Results=di(n.Results,t)),void 0!==n.Summary&&null!==n.Summary&&(r.Summary=pi(n.Summary,t)),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(yt),Mi=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},xi=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Li=new n.ConsoleLogger("AmazonLocationServiceProvider"),Ri=function(){function e(e){this._config=e||{},Li.debug("Geo Options",this._config)}return e.prototype.getCategory=function(){return e.CATEGORY},e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.configure=function(e){return Li.debug("configure Amazon Location Service Provider",e),e?(this._config=Object.assign({},this._config,e),this._config):this._config},e.prototype.getAvailableMaps=function(){this._verifyMapResources();var e=[],t=this._config.maps.items,r=this._config.region;for(var n in t){var i=t[n].style;e.push({mapName:n,style:i,region:r})}return e},e.prototype.getDefaultMap=function(){this._verifyMapResources();var e=this._config.maps.default;return{mapName:e,style:this._config.maps.items[e].style,region:this._config.region}},e.prototype.searchByText=function(e,t){var r;return Mi(this,void 0,void 0,(function(){var i,s,a,u,c,f;return xi(this,(function(l){switch(l.label){case 0:return[4,this._ensureCredentials()];case 1:if(!l.sent())throw new Error("No credentials");this._verifySearchIndex(null===(r=t)||void 0===r?void 0:r.searchIndexName),i={Text:e,IndexName:this._config.search_indices.default},t&&(i.FilterCountries=t.countries,i.MaxResults=t.maxResults,t.searchIndexName&&(i.IndexName=t.searchIndexName),t.biasPosition?i.BiasPosition=t.biasPosition:t.searchAreaConstraints&&(i.FilterBBox=t.searchAreaConstraints)),s=new Zn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(n.getAmplifyUserAgent)()}),a=new Pi(i),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,s.send(a)];case 3:return u=l.sent(),[3,5];case 4:throw c=l.sent(),Li.debug(c),c;case 5:return f=u.Results.map((function(e){return e.Place})),[2,o()(f,{deep:!0})]}}))}))},e.prototype.searchByCoordinates=function(e,t){var r;return Mi(this,void 0,void 0,(function(){var i,s,a,u,c,f;return xi(this,(function(l){switch(l.label){case 0:return[4,this._ensureCredentials()];case 1:if(!l.sent())throw new Error("No credentials");this._verifySearchIndex(null===(r=t)||void 0===r?void 0:r.searchIndexName),i={Position:e,IndexName:this._config.search_indices.default},t&&(t.searchIndexName&&(i.IndexName=t.searchIndexName),i.MaxResults=t.maxResults),s=new Zn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(n.getAmplifyUserAgent)()}),a=new Ei(i),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,s.send(a)];case 3:return u=l.sent(),[3,5];case 4:throw c=l.sent(),Li.debug(c),c;case 5:return f=u.Results.map((function(e){return e.Place})),[2,o()(f[0],{deep:!0})]}}))}))},e.prototype._ensureCredentials=function(){return Mi(this,void 0,void 0,(function(){var e,t,r;return xi(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,n.Credentials.get()];case 1:return(e=i.sent())?(t=n.Credentials.shear(e),Li.debug("Set credentials for storage. Credentials are:",t),this._config.credentials=t,[2,!0]):[2,!1];case 2:return r=i.sent(),Li.warn("Ensure credentials error. Credentials are:",r),[2,!1];case 3:return[2]}}))}))},e.prototype._verifyMapResources=function(){if(!this._config.maps){var e="No map resources found in amplify config, run 'amplify add geo' to create them and ensure to run `amplify push` after";throw Li.warn(e),new Error(e)}if(!this._config.maps.default){e="No default map resource found in amplify config, run 'amplify add geo' to create one and ensure to run `amplify push` after";throw Li.warn(e),new Error(e)}},e.prototype._verifySearchIndex=function(e){if(!(this._config.search_indices&&this._config.search_indices.default||e)){var t="No Search Index found, please run `amplify add geo` to add one and ensure to run `amplify push` after.";throw Li.warn(t),new Error(t)}},e.CATEGORY="Geo",e.PROVIDER_NAME="AmazonLocationService",e}(),Ti=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},Oi=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Ci=new n.ConsoleLogger("Geo"),Bi=new(function(){function e(){this._config={},this._pluggables=[],Ci.debug("Geo Options",this._config)}return e.prototype.getModuleName=function(){return e.MODULE},e.prototype.addPluggable=function(e){if(e&&"Geo"===e.getCategory())return this._pluggables.push(e),e.configure(this._config[e.getProviderName()])},e.prototype.getPluggable=function(e){var t=this._pluggables.find((function(t){return t.getProviderName()===e}));if(void 0===t)throw Ci.debug("No plugin found with providerName",e),new Error("No plugin found in Geo for the provider");return t},e.prototype.removePluggable=function(e){this._pluggables=this._pluggables.filter((function(t){return t.getProviderName()!==e}))},e.prototype.configure=function(e){var t=this;if(Ci.debug("configure Geo"),!e)return this._config;var r=Object(n.parseMobileHubConfig)(e);return this._config=Object.assign({},this._config,r.Geo,e),this._pluggables.forEach((function(e){e.configure(t._config[e.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new Ri),this._config},e.prototype.getAvailableMaps=function(e){return void 0===e&&(e="AmazonLocationService"),this.getPluggable(e).getAvailableMaps()},e.prototype.getDefaultMap=function(e){return void 0===e&&(e="AmazonLocationService"),this.getPluggable(e).getDefaultMap()},e.prototype.searchByText=function(e,t){return Ti(this,void 0,void 0,(function(){var r,n,i,o;return Oi(this,(function(s){switch(s.label){case 0:r=(t||{}).providerName,n=void 0===r?"AmazonLocationService":r,i=this.getPluggable(n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,i.searchByText(e,t)];case 2:return[2,s.sent()];case 3:throw o=s.sent(),Ci.debug(o),o;case 4:return[2]}}))}))},e.prototype.searchByCoordinates=function(e,t){return Ti(this,void 0,void 0,(function(){var r,n,i,o;return Oi(this,(function(s){switch(s.label){case 0:r=(t||{}).providerName,n=void 0===r?"AmazonLocationService":r,i=this.getPluggable(n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,i.searchByCoordinates(e,t)];case 2:return[2,s.sent()];case 3:throw o=s.sent(),Ci.debug(o),o;case 4:return[2]}}))}))},e.MODULE="Geo",e}());n.Amplify.register(Bi)},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));var n=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));var n=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}}])}));
25
+ t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,l=r?i-1:0,d=r?-1:1,h=e[t+l];for(l+=d,o=h&(1<<-f)-1,h>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=d,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=d,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=c}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+l>=1?d/u:d*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+h]=255&s,h+=p,s/=256,c-=8);e[r+h-p]|=128*v}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(1).__exportStar)(r(27),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(1),i=r(8),o=r(28),s=r(7),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,s.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var r=new o.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(i.BLOCK_SIZE);return n.set(t),n}(e),r=new Uint8Array(i.BLOCK_SIZE);r.set(t);for(var n=0;n<i.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(n=0;n<t.byteLength;n++)t[n]=0}}return e.prototype.update=function(e){if(!(0,s.isEmptyData)(e)&&!this.error)try{this.hash.update((0,s.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var n=r(8),i=function(){function e(){this.state=Int32Array.from(n.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var i=this.bufferLength;i<n.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<n.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(n.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(n.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(n.DIGEST_LENGTH);for(i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],c=t[6],f=t[7],l=0;l<n.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(h+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var v=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(f+(n.KEY[l]+this.temp[l]|0)|0)|0,g=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&o^i&o)|0;f=c,c=u,u=a,a=s+v|0,s=o,o=i,i=r,r=v+g|0}t[0]+=r,t[1]+=i,t[2]+=o,t[3]+=s,t[4]+=a,t[5]+=u,t[6]+=c,t[7]+=f},e}();t.RawSha256=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1).__exportStar(r(30),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var n=r(1),i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function o(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function s(e){return e&&i.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&s(e.crypto.subtle)},t.supportsSecureRandom=o,t.supportsSubtleCrypto=s,t.supportsZeroByteGCM=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:if(!s(e))return[2,!1];r.label=1;case 1:return r.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=r.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===r.sent().byteLength];case 4:return r.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);n.__exportStar(r(32),t),n.__exportStar(r(33),t),n.__exportStar(r(34),t),n.__exportStar(r(35),t),n.__exportStar(r(36),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,i=t.subtle;return n.map((function(e){return i[e]})).concat(r).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,r){"use strict";r.r(t),r.d(t,"Geo",(function(){return Bi}));var n=r(0),i=r(3),o=r.n(i),s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function c(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function f(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}Object.create;function d(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function p(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;var v=r(11),g=r(9),y=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}(),m=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,r=new e(u(u({},this),{headers:u({},this.headers)}));return r.query&&(r.query=(t=r.query,Object.keys(t).reduce((function(e,r){var n,i=t[r];return u(u({},e),((n={})[r]=Array.isArray(i)?p([],h(i)):i,n))}),{}))),r},e}();function w(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}var b=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,S)},S=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var _=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=(void 0===t?{}:t).abortSignal,n=this.requestTimeout;if(null==r?void 0:r.aborted){var i=new Error("Request aborted");return i.name="AbortError",Promise.reject(i)}var o=e.path;if(e.query){var s=function(e){var t,r,n=[];try{for(var i=d(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var s=o.value,a=e[s];if(s=b(s),Array.isArray(a))for(var u=0,c=a.length;u<c;u++)n.push(s+"="+b(a[u]));else{var f=s;(a||"string"==typeof a)&&(f+="="+b(a)),n.push(f)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.join("&")}(e.query);s&&(o+="?"+s)}var a=e.port,u=e.method,c=e.protocol+"//"+e.hostname+(a?":"+a:"")+o,f={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(f.signal=r);var l,h=new Request(c,f),p=[fetch(h).then((function(e){var t,r,n=e.headers,i={};try{for(var o=d(n.entries()),s=o.next();!s.done;s=o.next()){var a=s.value;i[a[0]]=a[1]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new y({headers:i,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new y({headers:i,statusCode:e.status,body:t})}}))})),(l=n,void 0===l&&(l=0),new Promise((function(e,t){l&&setTimeout((function(){var e=new Error("Request did not complete within "+l+" ms");e.name="TimeoutError",t(e)}),l)})))];return r&&p.push(new Promise((function(e,t){r.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(p)},e}(),A={},P=new Array(64),E=0,M="A".charCodeAt(0),x="Z".charCodeAt(0);E+M<=x;E++){var L=String.fromCharCode(E+M);A[L]=E,P[E]=L}for(E=0,M="a".charCodeAt(0),x="z".charCodeAt(0);E+M<=x;E++){L=String.fromCharCode(E+M);var R=E+26;A[L]=R,P[R]=L}for(E=0;E<10;E++){A[E.toString(10)]=E+52;L=E.toString(10),R=E+52;A[L]=R,P[R]=L}A["+"]=62,P[62]="+",A["/"]=63,P[63]="/";function T(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var r=new ArrayBuffer(t),n=new DataView(r),i=0;i<e.length;i+=4){for(var o=0,s=0,a=i,u=i+3;a<=u;a++)"="!==e[a]?(o|=A[e[a]]<<6*(u-a),s+=6):o>>=6;var c=i/4*3;o>>=s%8;for(var f=Math.floor(s/8),l=0;l<f;l++){var d=8*(f-l-1);n.setUint8(c+l,(o&255<<d)>>d)}}return new Uint8Array(r)}function O(e){return new Promise((function(t,r){var n=new FileReader;n.onloadend=function(){var e;if(2!==n.readyState)return r(new Error("Reader aborted too early"));var i=null!==(e=n.result)&&void 0!==e?e:"",o=i.indexOf(","),s=o>-1?o+1:i.length;t(i.substring(s))},n.onabort=function(){return r(new Error("Read aborted"))},n.onerror=function(){return r(n.error)},n.readAsDataURL(e)}))}var C,B={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},k=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,r){return function(n){return f(void 0,void 0,void 0,(function(){var i;return l(this,(function(o){switch(o.label){case 0:return[4,e.retryStrategy()];case 1:return(null==(i=o.sent())?void 0:i.mode)&&(r.userAgent=p(p([],h(r.userAgent||[])),[["cfg/retry-mode",i.mode]])),[2,i.retry(t,n)]}}))}))}}}(e),B)}}},I=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],N=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],j=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],F=[500,502,503,504],U=function(e){var t,r;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||N.includes(e.name)||1==(null===(r=e.$retryable)||void 0===r?void 0:r.throttling)},D=new Uint8Array(16);function z(){if(!C&&!(C="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return C(D)}var q=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var H=function(e){return"string"==typeof e&&q.test(e)},G=[],W=0;W<256;++W)G.push((W+256).toString(16).substr(1));var Y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(G[e[t+0]]+G[e[t+1]]+G[e[t+2]]+G[e[t+3]]+"-"+G[e[t+4]]+G[e[t+5]]+"-"+G[e[t+6]]+G[e[t+7]]+"-"+G[e[t+8]]+G[e[t+9]]+"-"+G[e[t+10]]+G[e[t+11]]+G[e[t+12]]+G[e[t+13]]+G[e[t+14]]+G[e[t+15]]).toLowerCase();if(!H(r))throw TypeError("Stringified UUID is invalid");return r};var V,$=function(e,t,r){var n=(e=e||{}).random||(e.rng||z)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return Y(n)};!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(V||(V={}));var K=V.STANDARD,Z=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Q=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return I.includes(e.name)}(e)||U(e)||function(e){var t;return j.includes(e.name)||F.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},X=function(){function e(e,t){var r,n,i;this.maxAttemptsProvider=e,this.mode=V.STANDARD,this.retryDecider=null!==(r=null==t?void 0:t.retryDecider)&&void 0!==r?r:Q,this.delayDecider=null!==(n=null==t?void 0:t.delayDecider)&&void 0!==n?n:Z,this.retryQuota=null!==(i=null==t?void 0:t.retryQuota)&&void 0!==i?i:function(e,t){var r,n,i,o=e,s=null!==(r=null==t?void 0:t.noRetryIncrement)&&void 0!==r?r:1,a=null!==(n=null==t?void 0:t.retryCost)&&void 0!==n?n:5,u=null!==(i=null==t?void 0:t.timeoutRetryCost)&&void 0!==i?i:10,c=e,f=function(e){return"TimeoutError"===e.name?u:a},l=function(e){return f(e)<=c};return Object.freeze({hasRetryTokens:l,retrieveRetryTokens:function(e){if(!l(e))throw new Error("No retry token available");var t=f(e);return c-=t,t},releaseRetryTokens:function(e){c+=null!=e?e:s,c=Math.min(c,o)}})}(500)}return e.prototype.shouldRetry=function(e,t,r){return t<r&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return f(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t,r){return f(this,void 0,void 0,(function(){var n,i,o,s,a,u,c,f;return l(this,(function(d){switch(d.label){case 0:return i=0,o=0,[4,this.getMaxAttempts()];case 1:s=d.sent(),a=t.request,m.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=$()),u=function(){var u,f,d,h,p,v;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,4,,7]),m.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(i+1)+"; max="+s),(null==r?void 0:r.beforeRequest)?[4,r.beforeRequest()]:[3,2];case 1:l.sent(),l.label=2;case 2:return[4,e(t)];case 3:return u=l.sent(),f=u.response,d=u.output,(null==r?void 0:r.afterRequest)&&r.afterRequest(f),c.retryQuota.releaseRetryTokens(n),d.$metadata.attempts=i+1,d.$metadata.totalRetryDelay=o,[2,{value:{response:f,output:d}}];case 4:return h=l.sent(),p=J(h),i++,c.shouldRetry(p,i,s)?(n=c.retryQuota.retrieveRetryTokens(p),v=c.delayDecider(U(p)?500:100,i),o+=v,[4,new Promise((function(e){return setTimeout(e,v)}))]):[3,6];case 5:return l.sent(),[2,"continue"];case 6:throw p.$metadata||(p.$metadata={}),p.$metadata.attempts=i,p.$metadata.totalRetryDelay=o,p;case 7:return[2]}}))},c=this,d.label=2;case 2:return[5,u()];case 3:return"object"==typeof(f=d.sent())?[2,f.value]:[3,2];case 4:return[2]}}))}))},e}(),J=function(e){return e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error("AWS SDK error wrapper for "+e)},ee=function(){function e(e){var t,r,n,i,o;this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=null!==(t=null==e?void 0:e.beta)&&void 0!==t?t:.7,this.minCapacity=null!==(r=null==e?void 0:e.minCapacity)&&void 0!==r?r:1,this.minFillRate=null!==(n=null==e?void 0:e.minFillRate)&&void 0!==n?n:.5,this.scaleConstant=null!==(i=null==e?void 0:e.scaleConstant)&&void 0!==i?i:.4,this.smooth=null!==(o=null==e?void 0:e.smooth)&&void 0!==o?o:.8;var s=this.getCurrentTimeInSeconds();this.lastThrottleTime=s,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}return e.prototype.getCurrentTimeInSeconds=function(){return Date.now()/1e3},e.prototype.getSendToken=function(){return f(this,void 0,void 0,(function(){return l(this,(function(e){return[2,this.acquireTokenBucket(1)]}))}))},e.prototype.acquireTokenBucket=function(e){return f(this,void 0,void 0,(function(){var t;return l(this,(function(r){switch(r.label){case 0:return this.enabled?(this.refillTokenBucket(),e>this.currentCapacity?(t=(e-this.currentCapacity)/this.fillRate*1e3,[4,new Promise((function(e){return setTimeout(e,t)}))]):[3,2]):[2];case 1:r.sent(),r.label=2;case 2:return this.currentCapacity=this.currentCapacity-e,[2]}}))}))},e.prototype.refillTokenBucket=function(){var e=this.getCurrentTimeInSeconds();if(this.lastTimestamp){var t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}else this.lastTimestamp=e},e.prototype.updateClientSendingRate=function(e){var t;if(this.updateMeasuredRate(),U(e)){var r=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=r,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(r),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());var n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)},e.prototype.calculateTimeWindow=function(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))},e.prototype.cubicThrottle=function(e){return this.getPrecise(e*this.beta)},e.prototype.cubicSuccess=function(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)},e.prototype.enableTokenBucket=function(){this.enabled=!0},e.prototype.updateTokenBucketRate=function(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)},e.prototype.updateMeasuredRate=function(){var e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){var r=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}},e.prototype.getPrecise=function(e){return parseFloat(e.toFixed(8))},e}(),te=function(e){function t(t,r){var n=this,i=null!=r?r:{},o=i.rateLimiter,s=c(i,["rateLimiter"]);return(n=e.call(this,t,s)||this).rateLimiter=null!=o?o:new ee,n.mode=V.ADAPTIVE,n}return a(t,e),t.prototype.retry=function(t,r){return f(this,void 0,void 0,(function(){var n=this;return l(this,(function(i){return[2,e.prototype.retry.call(this,t,r,{beforeRequest:function(){return f(n,void 0,void 0,(function(){return l(this,(function(e){return[2,this.rateLimiter.getSendToken()]}))}))},afterRequest:function(e){n.rateLimiter.updateClientSendingRate(e)}})]}))}))},t}(X),re=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var ne=r(10),ie=r.n(ne);var oe=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),se=new Set(["cn-north-1","cn-northwest-1"]),ae=new Set(["us-iso-east-1"]),ue=new Set(["us-isob-east-1"]),ce=new Set(["us-gov-east-1","us-gov-west-1"]);var fe,le,de,he,pe={apiVersion:"2020-11-19",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var r=void 0;return oe.has(e)&&(r={hostname:"geo.{region}.amazonaws.com".replace("{region}",e),partition:"aws"}),se.has(e)&&(r={hostname:"geo.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),ae.has(e)&&(r={hostname:"geo.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),ue.has(e)&&(r={hostname:"geo.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),ce.has(e)&&(r={hostname:"geo.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===r&&(r={hostname:"geo.{region}.amazonaws.com".replace("{region}",e),partition:"aws"}),Promise.resolve(u({signingService:"geo"},r))},serviceId:"Location",urlParser:function(e){var t,r=new URL(e),n=r.hostname,i=r.pathname,o=r.port,s=r.protocol,a=r.search;return a&&(t=function(e){var t,r,n={};if(e=e.replace(/^\?/,""))try{for(var i=d(e.split("&")),o=i.next();!o.done;o=i.next()){var s=h(o.value.split("="),2),a=s[0],u=s[1],c=void 0===u?null:u;a=decodeURIComponent(a),c&&(c=decodeURIComponent(c)),a in n?Array.isArray(n[a])?n[a].push(c):n[a]=[n[a],c]:n[a]=c}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}(a)),{hostname:n,port:o?parseInt(o):void 0,protocol:s,path:i,query:t}}},ve=u(u({},pe),{runtime:"browser",base64Decoder:T,base64Encoder:function(e){for(var t="",r=0;r<e.length;r+=3){for(var n=0,i=0,o=r,s=Math.min(r+3,e.length);o<s;o++)n|=e[o]<<8*(s-o-1),i+=8;var a=Math.ceil(i/6);n<<=6*a-i;for(var u=1;u<=a;u++){var c=6*(a-u);t+=P[(n&63<<c)>>c]}t+="==".slice(0,4-a)}return t},bodyLengthChecker:function(e){if("string"==typeof e){for(var t=e.length,r=t-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0},credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(le={serviceId:pe.serviceId,clientVersion:v.version},de=le.serviceId,he=le.clientVersion,function(){return f(void 0,void 0,void 0,(function(){var e,t,r,n,i,o,s,a,u;return l(this,(function(c){return e="undefined"!=typeof window&&(null===(r=null===window||void 0===window?void 0:window.navigator)||void 0===r?void 0:r.userAgent)?ie.a.parse(window.navigator.userAgent):void 0,t=[["aws-sdk-js",he],["os/"+((null===(n=null==e?void 0:e.os)||void 0===n?void 0:n.name)||"other"),null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.version],["lang/js"],["md/browser",(null!==(s=null===(o=null==e?void 0:e.browser)||void 0===o?void 0:o.name)&&void 0!==s?s:"unknown")+"_"+(null!==(u=null===(a=null==e?void 0:e.browser)||void 0===a?void 0:a.version)&&void 0!==u?u:"unknown")]],de&&t.push(["api/"+de,he]),[2,t]}))}))}),maxAttempts:3,region:(fe="Region is missing",function(){return Promise.reject(fe)}),requestHandler:new _,retryModeProvider:function(){return Promise.resolve(K)},sha256:g.Sha256,streamCollector:function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return f(this,void 0,void 0,(function(){var t,r;return l(this,(function(n){switch(n.label){case 0:return[4,O(e)];case 1:return t=n.sent(),r=T(t),[2,new Uint8Array(r)]}}))}))}(e):function(e){return f(this,void 0,void 0,(function(){var t,r,n,i,o,s,a;return l(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),r=e.getReader(),n=!1,u.label=1;case 1:return n?[3,3]:[4,r.read()];case 2:return i=u.sent(),o=i.done,(s=i.value)&&(a=t,(t=new Uint8Array(a.length+s.length)).set(a),t.set(s,a.length)),n=o,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},utf8Encoder:function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}}),ge=function(e){var t=e.endpoint,r=e.urlParser;if("string"==typeof t){var n=Promise.resolve(r(t));return function(){return n}}if("object"==typeof t){var i=Promise.resolve(t);return function(){return i}}return t},ye=function(e){return f(void 0,void 0,void 0,(function(){var t,r,n,i,o;return l(this,(function(s){switch(s.label){case 0:return t=e.tls,r=void 0===t||t,[4,e.region()];case 1:if(n=s.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(n)];case 2:if(!(i=(null!==(o=s.sent())&&void 0!==o?o:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((r?"https:":"http:")+"//"+i)]}}))}))},me=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var we={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},be=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return f(t,void 0,void 0,(function(){var t,i,o,s,a;return l(this,(function(c){return t=n.request,m.isInstance(t)&&(i=t.body,o=t.headers,i&&-1===Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(s=e(i))&&(t.headers=u(u({},t.headers),((a={})["content-length"]=String(s),a)))),[2,r(u(u({},n),{request:t}))]}))}))}}}(e.bodyLengthChecker),we)}}};var Se={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},_e=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return f(void 0,void 0,void 0,(function(){var n,i;return l(this,(function(o){return m.isInstance(r.request)?(n=r.request,i=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===i?"":i).indexOf("h2")>=0&&!n.headers[":authority"]?(delete n.headers.host,n.headers[":authority"]=""):n.headers.host||(n.headers.host=n.hostname),[2,t(r)]):[2,t(r)]}))}))}}}(e),Se)}}},Ae={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Pe=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(r){return f(void 0,void 0,void 0,(function(){var n,i,o,s,a,u,f,d,h;return l(this,(function(l){switch(l.label){case 0:return n=t.clientName,i=t.commandName,o=t.inputFilterSensitiveLog,s=t.logger,a=t.outputFilterSensitiveLog,[4,e(r)];case 1:return u=l.sent(),s?("function"==typeof s.info&&(f=u.output,d=f.$metadata,h=c(f,["$metadata"]),s.info({clientName:n,commandName:i,input:o(r.input),output:a(h),metadata:d})),[2,u]):[2,u]}}))}))}}),Ae)}}},Ee=function(e,t){return(Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Me(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ee(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function xe(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function Le(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}Object.create;Object.create;(function(e){function t(t,r){void 0===r&&(r=!0);var n=e.call(this,t)||this;return n.tryNextLink=r,n}Me(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.defineProperty(e,"tryNextLink",{value:t,configurable:!1,enumerable:!1,writable:!1}),e}})(Error),function(e){function t(t,r){void 0===r&&(r=!0);var n=e.call(this,t)||this;return n.tryNextLink=r,n.name="CredentialsProviderError",n}Me(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.defineProperty(e,"tryNextLink",{value:t,configurable:!1,enumerable:!1,writable:!1}),e}}(Error);for(var Re={},Te={},Oe=0;Oe<256;Oe++){var Ce=Oe.toString(16).toLowerCase();1===Ce.length&&(Ce="0"+Ce),Re[Oe]=Ce,Te[Ce]=Oe}function Be(e){for(var t="",r=0;r<e.byteLength;r++)t+=Re[e[r]];return t}var ke="X-Amz-Date".toLowerCase(),Ie=["authorization",ke,"date"],Ne="X-Amz-Signature".toLowerCase(),je="X-Amz-Security-Token".toLowerCase(),Fe={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Ue=/^proxy-/,De=/^sec-/,ze="AWS4-HMAC-SHA256-PAYLOAD",qe={},He=[];function Ge(e,t,r){return e+"/"+t+"/"+r+"/aws4_request"}function We(e,t,r){var n=new e(t);return n.update(r),n.digest()}function Ye(e,t,r){var n,i,o=e.headers,s={};try{for(var a=d(Object.keys(o).sort()),u=a.next();!u.done;u=a.next()){var c=u.value,f=c.toLowerCase();(f in Fe||(null==t?void 0:t.has(f))||Ue.test(f)||De.test(f))&&(!r||r&&!r.has(f))||(s[f]=o[c].trim().replace(/\s+/g," "))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return s}function Ve(e,t){var r=e.headers,n=e.body;return f(this,void 0,void 0,(function(){var e,i,o,s,a,u,c;return l(this,(function(f){switch(f.label){case 0:try{for(e=d(Object.keys(r)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(o=i.value).toLowerCase())return[2,r[o]]}catch(e){u={error:e}}finally{try{i&&!i.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=n?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof n||ArrayBuffer.isView(n)||(l=n,"function"==typeof ArrayBuffer&&l instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(l))?((s=new t).update(n),a=Be,[4,s.digest()]):[3,3];case 2:return[2,a.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var l}))}))}function $e(e){var t=e.headers,r=e.query,n=c(e,["headers","query"]);return u(u({},n),{headers:u({},t),query:r?Ke(r):void 0})}function Ke(e){return Object.keys(e).reduce((function(t,r){var n,i=e[r];return u(u({},t),((n={})[r]=Array.isArray(i)?p([],h(i)):i,n))}),{})}function Ze(e){var t,r;e="function"==typeof e.clone?e.clone():$e(e);try{for(var n=d(Object.keys(e.headers)),i=n.next();!i.done;i=n.next()){var o=i.value;Ie.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return e}function Qe(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var Xe=function(){function e(e){var t=e.applyChecksum,r=e.credentials,n=e.region,i=e.service,o=e.sha256,s=e.uriEscapePath,a=void 0===s||s;this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=tt(n),this.credentialProvider=rt(r)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),f(this,void 0,void 0,(function(){var r,n,i,o,s,a,c,f,h,p,v,g,y,m,w,b,S,_,A,P,E,M,x,L;return l(this,(function(l){switch(l.label){case 0:return r=t.signingDate,n=void 0===r?new Date:r,i=t.expiresIn,o=void 0===i?3600:i,s=t.unsignableHeaders,a=t.unhoistableHeaders,c=t.signableHeaders,f=t.signingRegion,h=t.signingService,[4,this.credentialProvider()];case 1:return p=l.sent(),null==f?[3,2]:(g=f,[3,4]);case 2:return[4,this.regionProvider()];case 3:g=l.sent(),l.label=4;case 4:return v=g,y=Je(n),m=y.longDate,w=y.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(b=Ge(w,v,null!=h?h:this.service),S=function(e,t){var r,n,i;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():$e(e),s=o.headers,a=o.query,c=void 0===a?{}:a;try{for(var f=d(Object.keys(s)),l=f.next();!l.done;l=f.next()){var h=l.value,p=h.toLowerCase();"x-amz-"!==p.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(p))||(c[h]=s[h],delete s[h])}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}return u(u({},e),{headers:s,query:c})}(Ze(e),{unhoistableHeaders:a}),p.sessionToken&&(S.query["X-Amz-Security-Token"]=p.sessionToken),S.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",S.query["X-Amz-Credential"]=p.accessKeyId+"/"+b,S.query["X-Amz-Date"]=m,S.query["X-Amz-Expires"]=o.toString(10),_=Ye(S,s,c),S.query["X-Amz-SignedHeaders"]=et(_),A=S.query,P="X-Amz-Signature",E=this.getSignature,M=[m,b,this.getSigningKey(p,v,w,h)],x=this.createCanonicalRequest,L=[S,_],[4,Ve(e,this.sha256)]);case 5:return[4,E.apply(this,M.concat([x.apply(this,L.concat([l.sent()]))]))];case 6:return A[P]=l.sent(),[2,S]}}))}))},e.prototype.sign=function(e,t){return f(this,void 0,void 0,(function(){return l(this,(function(r){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var r=e.headers,n=e.payload,i=t.signingDate,o=void 0===i?new Date:i,s=t.priorSignature,a=t.signingRegion,u=t.signingService;return f(this,void 0,void 0,(function(){var e,t,i,c,f,d,h,p,v,g,y;return l(this,(function(l){switch(l.label){case 0:return null==a?[3,1]:(t=a,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=l.sent(),l.label=3;case 3:return e=t,i=Je(o),c=i.shortDate,f=i.longDate,d=Ge(c,e,null!=u?u:this.service),[4,Ve({headers:{},body:n},this.sha256)];case 4:return h=l.sent(),(p=new this.sha256).update(r),g=Be,[4,p.digest()];case 5:return v=g.apply(void 0,[l.sent()]),y=[ze,f,d,s,v,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signingRegion,s=r.signingService;return f(this,void 0,void 0,(function(){var t,r,n,a,u,c,f,d;return l(this,(function(l){switch(l.label){case 0:return[4,this.credentialProvider()];case 1:return t=l.sent(),null==o?[3,2]:(n=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=l.sent(),l.label=4;case 4:return r=n,a=Je(i).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,r,a,s)];case 5:return(u=new(f.apply(c,[void 0,l.sent()]))).update(e),d=Be,[4,u.digest()];case 6:return[2,d.apply(void 0,[l.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signableHeaders,s=r.unsignableHeaders,a=r.signingRegion,u=r.signingService;return f(this,void 0,void 0,(function(){var t,r,n,c,f,h,p,v,g,y,m;return l(this,(function(l){switch(l.label){case 0:return[4,this.credentialProvider()];case 1:return t=l.sent(),null==a?[3,2]:(n=a,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=l.sent(),l.label=4;case 4:return r=n,c=Ze(e),f=Je(i),h=f.longDate,p=f.shortDate,v=Ge(p,r,null!=u?u:this.service),c.headers[ke]=h,t.sessionToken&&(c.headers[je]=t.sessionToken),[4,Ve(c,this.sha256)];case 5:return g=l.sent(),!function(e,t){var r,n;e=e.toLowerCase();try{for(var i=d(Object.keys(t)),o=i.next();!o.done;o=i.next()){if(e===o.value.toLowerCase())return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=g),y=Ye(c,s,o),[4,this.getSignature(h,v,this.getSigningKey(t,r,p,u),this.createCanonicalRequest(c,y,g))];case 6:return m=l.sent(),c.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+v+", SignedHeaders="+et(y)+", Signature="+m,[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,r){var n=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,r,n=e.query,i=void 0===n?{}:n,o=[],s={},a=function(e){if(e.toLowerCase()===Ne)return"continue";o.push(e);var t=i[e];"string"==typeof t?s[e]=b(e)+"="+b(t):Array.isArray(t)&&(s[e]=t.slice(0).sort().reduce((function(t,r){return t.concat([b(e)+"="+b(r)])}),[]).join("&"))};try{for(var u=d(Object.keys(i).sort()),c=u.next();!c.done;c=u.next()){a(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o.map((function(e){return s[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+n.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+n.join(";")+"\n"+r},e.prototype.createStringToSign=function(e,t,r){return f(this,void 0,void 0,(function(){var n,i;return l(this,(function(o){switch(o.label){case 0:return(n=new this.sha256).update(r),[4,n.digest()];case 1:return i=o.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Be(i)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,r,n){return f(this,void 0,void 0,(function(){var i,o,s,a,u;return l(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,n)];case 1:return i=c.sent(),a=(s=this.sha256).bind,[4,r];case 2:return(o=new(a.apply(s,[void 0,c.sent()]))).update(i),u=Be,[4,o.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,r,n){return function(e,t,r,n,i){return f(void 0,void 0,void 0,(function(){var o,s,a,u,c,f,h,p,v;return l(this,(function(l){switch(l.label){case 0:return[4,We(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=l.sent(),(s=r+":"+n+":"+i+":"+Be(o)+":"+t.sessionToken)in qe)return[2,qe[s]];for(He.push(s);He.length>50;)delete qe[He.shift()];a="AWS4"+t.secretAccessKey,l.label=2;case 2:l.trys.push([2,7,8,9]),u=d([r,n,i,"aws4_request"]),c=u.next(),l.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,We(e,a,f)]);case 4:a=l.sent(),l.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return h=l.sent(),p={error:h},[3,9];case 8:try{c&&!c.done&&(v=u.return)&&v.call(u)}finally{if(p)throw p.error}return[7];case 9:return[2,qe[s]=a]}}))}))}(this.sha256,e,r,t,n||this.service)},e}(),Je=function(e){var t=Qe(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},et=function(e){return Object.keys(e).sort().join(";")},tt=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},rt=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},nt=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},it=function(e){return"function"==typeof e?function(e,t,r){var n,i;if(void 0===t)return function(){return i||(n=e(),i=!0),n};var o=!1;return function(){return xe(void 0,void 0,void 0,(function(){var s;return Le(this,(function(a){switch(a.label){case 0:return i||(n=e(),i=!0),o?[2,n]:[4,n];case 1:return s=a.sent(),r&&!r(s)?(o=!0,[2,s]):t(s)?[2,n=e()]:[2,s]}}))}))}}(e,(function(e){return void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5}),(function(e){return void 0!==e.expiration})):nt(e)},ot=function(e){return new Date(Date.now()+e)};function st(e){return function(t,r){return function(n){return f(this,void 0,void 0,(function(){var i,o,s,a,c,f,d,h,p;return l(this,(function(l){switch(l.label){case 0:return m.isInstance(n.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(n)];case 1:return o=l.sent(),[3,3];case 2:o=e.signer,l.label=3;case 3:return i=o,a=t,c=[u({},n)],p={},[4,i.sign(n.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:r.signing_region,signingService:r.signing_service})];case 4:return[4,a.apply(void 0,[u.apply(void 0,c.concat([(p.request=l.sent(),p)]))])];case 5:return s=l.sent(),f=s.response.headers,(d=f&&(f.date||f.Date))&&(h=Date.parse(d),v=h,g=e.systemClockOffset,Math.abs(ot(g).getTime()-v)>=3e5&&(e.systemClockOffset=h-Date.now())),[2,s]}var v,g}))}))}}}var at={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},ut=function(e){return{applyToStack:function(t){t.addRelativeTo(st(e),at)}}};var ct=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,ft=function(e){var t=h(e,2),r=t[0],n=t[1],i=r.indexOf("/"),o=r.substring(0,i),s=r.substring(i+1);return"api"===o&&(s=s.toLowerCase()),[o,s,n].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(ct,"_")})).join("/")},lt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},dt=function(e){return{applyToStack:function(t){var r;t.add((r=e,function(e,t){return function(n){return f(void 0,void 0,void 0,(function(){var i,o,s,a,c,f,d,v,g;return l(this,(function(l){switch(l.label){case 0:return i=n.request,m.isInstance(i)?(o=i.headers,s=(null===(v=null==t?void 0:t.userAgent)||void 0===v?void 0:v.map(ft))||[],[4,r.defaultUserAgentProvider()]):[2,e(n)];case 1:return a=l.sent().map(ft),c=(null===(g=null==r?void 0:r.customUserAgent)||void 0===g?void 0:g.map(ft))||[],f=p(p(p([],h(a)),h(s)),h(c)).join(" "),d=p(p([],h(a.filter((function(e){return e.startsWith("aws-sdk-")})))),h(c)).join(" "),"browser"!==r.runtime?(d&&(o["x-amz-user-agent"]=o["x-amz-user-agent"]?o["user-agent"]+" "+d:d),o["user-agent"]=f):o["x-amz-user-agent"]=f,[2,e(u(u({},n),{request:i}))]}}))}))}}),lt)}}},ht=function(){var e=[],t=[],r=new Set,n=function(r){return e.forEach((function(e){r.add(e.middleware,u({},e))})),t.forEach((function(e){r.addRelativeTo(e.middleware,u({},e))})),r},i=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,p([],h(i(e))))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,p([],h(i(e))))})),t},o=function(){var r,n=[],o=[],s={};return e.forEach((function(e){var t=u(u({},e),{before:[],after:[]});t.name&&(s[t.name]=t),n.push(t)})),t.forEach((function(e){var t=u(u({},e),{before:[],after:[]});t.name&&(s[t.name]=t),o.push(t)})),o.forEach((function(e){if(e.toMiddleware){var t=s[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(r=n,r.sort((function(e,t){return pt[t.step]-pt[e.step]||vt[t.priority||"normal"]-vt[e.priority||"normal"]}))).map(i).reduce((function(e,t){return e.push.apply(e,p([],h(t))),e}),[]).map((function(e){return e.middleware}))},s={add:function(t,n){void 0===n&&(n={});var i=n.name,o=n.override,s=u({step:"initialize",priority:"normal",middleware:t},n);if(i){if(r.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var a=e.findIndex((function(e){return e.name===i})),c=e[a];if(c.step!==s.step||c.priority!==s.priority)throw new Error('"'+i+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+s.priority+" priority in "+s.step+" step.");e.splice(a,1)}r.add(i)}e.push(s)},addRelativeTo:function(e,n){var i=n.name,o=n.override,s=u({middleware:e},n);if(i){if(r.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var a=t.findIndex((function(e){return e.name===i})),c=t[a];if(c.toMiddleware!==s.toMiddleware||c.relation!==s.relation)throw new Error('"'+i+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+s.relation+' "'+s.toMiddleware+'" middleware.');t.splice(a,1)}r.add(i)}t.push(s)},clone:function(){return n(ht())},use:function(e){e.applyToStack(s)},remove:function(n){return"string"==typeof n?function(n){var i=!1,o=function(e){return!e.name||e.name!==n||(i=!0,r.delete(n),!1)};return e=e.filter(o),t=t.filter(o),i}(n):function(n){var i=!1,o=function(e){return e.middleware!==n||(i=!0,e.name&&r.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(n)},removeByTag:function(n){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(n)||(o&&r.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=n(ht());return t.use(e),t},applyToStack:n,resolve:function(e,t){var r,n;try{for(var i=d(o().reverse()),s=i.next();!s.done;s=i.next()){e=(0,s.value)(e,t)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e}};return s},pt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},vt={high:3,normal:2,low:1},gt=function(){function e(e){this.middlewareStack=ht(),this.config=e}return e.prototype.send=function(e,t,r){var n="function"!=typeof t?t:void 0,i="function"==typeof t?t:r,o=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!i)return o(e).then((function(e){return e.output}));o(e).then((function(e){return i(null,e.output)}),(function(e){return i(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),yt=function(){this.middlewareStack=ht()};function mt(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}var wt=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,p([null],h(arguments))),r=new t;return Object.setPrototypeOf(r,e.prototype),r};wt.prototype=Object.create(String.prototype,{constructor:{value:wt,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(wt,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}a(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(wt);var bt=function(e){if(null!=e){if("number"==typeof e)return e;throw new TypeError("Expected number, got "+typeof e)}},St=function(e){if(null!=e){if("string"==typeof e)return e;throw new TypeError("Expected string, got "+typeof e)}},_t=function(e){if("string"==typeof e)switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error("Unable to parse float value: "+e)}return bt(e)},At=function(e){if(e!=e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}};var Pt,Et,Mt,xt,Lt,Rt,Tt,Ot,Ct,Bt,kt,It,Nt,jt,Ft,Ut,Dt,zt,qt,Ht,Gt,Wt,Yt,Vt,$t,Kt,Zt,Qt,Xt,Jt,er,tr,rr,nr,ir,or,sr,ar,ur,cr,fr,lr,dr,hr,pr,vr,gr,yr,mr,wr,br,Sr,_r,Ar,Pr,Er,Mr,xr,Lr,Rr,Tr,Or,Cr,Br,kr,Ir,Nr,jr,Fr,Ur,Dr,zr,qr,Hr,Gr,Wr,Yr,Vr,$r,Kr,Zr,Qr,Xr,Jr,en,tn,rn,nn,on,sn,an,un,cn,fn,ln,dn,hn,pn,vn,gn,yn,mn,wn,bn,Sn,_n,An,Pn,En,Mn,xn,Ln,Rn,Tn,On,Cn,Bn,kn,In,Nn,jn,Fn,Un,Dn,zn,qn,Hn,Gn,Wn,Yn,Vn,$n,Kn="***SensitiveInformation***",Zn=function(e){function t(t){var r,n,i=this,o=function(e){var t;return u(u({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?ge(e):function(){return ye(e)},isCustomEndpoint:!!e.endpoint})}(function(e){if(!e.region)throw new Error("Region is missing");return u(u({},e),{region:me(e.region)})}(u(u({},ve),t))),s=function(e){return u(u({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}(function(e){var t,r=e.credentials?it(e.credentials):e.credentialDefaultProvider(e),n=e.signingEscapePath,i=void 0===n||n,o=e.systemClockOffset,s=void 0===o?e.systemClockOffset||0:o,a=e.sha256;return t=e.signer?nt(e.signer):function(){return nt(e.region)().then((function(t){return f(void 0,void 0,void 0,(function(){return l(this,(function(r){switch(r.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[r.sent()||{},t]]}}))}))})).then((function(t){var n=h(t,2),o=n[0],s=n[1],u=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||u||s,e.signingName=e.signingName||c||e.serviceId,new Xe({credentials:r,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i})}))},u(u({},e),{systemClockOffset:s,signingEscapePath:i,credentials:r,signer:t})}((n=re((r=o).maxAttempts),u(u({},r),{maxAttempts:n,retryStrategy:function(){return f(void 0,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return r.retryStrategy?[2,r.retryStrategy]:(e=r.retryMode)?[3,2]:[4,r.retryModeProvider()];case 1:e=t.sent(),t.label=2;case 2:return e===V.ADAPTIVE?[2,new te(n)]:[2,new X(n)]}}))}))}}))));return(i=e.call(this,s)||this).config=s,i.middlewareStack.use(k(i.config)),i.middlewareStack.use(be(i.config)),i.middlewareStack.use(_e(i.config)),i.middlewareStack.use(Pe(i.config)),i.middlewareStack.use(ut(i.config)),i.middlewareStack.use(dt(i.config)),i}return a(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(gt);(Pt||(Pt={})).filterSensitiveLog=function(e){return u({},e)},(Et||(Et={})).filterSensitiveLog=function(e){return u({},e)},(Mt||(Mt={})).filterSensitiveLog=function(e){return u({},e)},(xt||(xt={})).filterSensitiveLog=function(e){return u({},e)},(Lt||(Lt={})).filterSensitiveLog=function(e){return u({},e)},(Rt||(Rt={})).filterSensitiveLog=function(e){return u({},e)},(Tt||(Tt={})).filterSensitiveLog=function(e){return u({},e)},(Ot||(Ot={})).filterSensitiveLog=function(e){return u({},e)},(Ct||(Ct={})).filterSensitiveLog=function(e){return u({},e)},(Bt||(Bt={})).filterSensitiveLog=function(e){return u({},e)},(kt||(kt={})).filterSensitiveLog=function(e){return u({},e)},(It||(It={})).filterSensitiveLog=function(e){return u({},e)},(Nt||(Nt={})).filterSensitiveLog=function(e){return u({},e)},(jt||(jt={})).filterSensitiveLog=function(e){return u({},e)},(Ft||(Ft={})).filterSensitiveLog=function(e){return u({},e)},(Ut||(Ut={})).filterSensitiveLog=function(e){return u({},e)},(Dt||(Dt={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(zt||(zt={})).filterSensitiveLog=function(e){return u(u({},e),e.DevicePositionUpdates&&{DevicePositionUpdates:e.DevicePositionUpdates.map((function(e){return Dt.filterSensitiveLog(e)}))})},(qt||(qt={})).filterSensitiveLog=function(e){return u({},e)},(Ht||(Ht={})).filterSensitiveLog=function(e){return u({},e)},(Gt||(Gt={})).filterSensitiveLog=function(e){return u({},e)},(Wt||(Wt={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(Yt||(Yt={})).filterSensitiveLog=function(e){return u({},e)},(Vt||(Vt={})).filterSensitiveLog=function(e){return u(u({},e),e.DevicePositions&&{DevicePositions:e.DevicePositions.map((function(e){return Wt.filterSensitiveLog(e)}))})},($t||($t={})).filterSensitiveLog=function(e){return u(u({},e),e.Polygon&&{Polygon:e.Polygon.map((function(e){return Kn}))})},(Kt||(Kt={})).filterSensitiveLog=function(e){return u(u({},e),e.Geometry&&{Geometry:$t.filterSensitiveLog(e.Geometry)})},(Zt||(Zt={})).filterSensitiveLog=function(e){return u(u({},e),e.Entries&&{Entries:e.Entries.map((function(e){return Kt.filterSensitiveLog(e)}))})},(Qt||(Qt={})).filterSensitiveLog=function(e){return u({},e)},(Xt||(Xt={})).filterSensitiveLog=function(e){return u({},e)},(Jt||(Jt={})).filterSensitiveLog=function(e){return u({},e)},(er||(er={})).filterSensitiveLog=function(e){return u(u({},e),e.Updates&&{Updates:e.Updates.map((function(e){return Dt.filterSensitiveLog(e)}))})},(tr||(tr={})).filterSensitiveLog=function(e){return u({},e)},(rr||(rr={})).filterSensitiveLog=function(e){return u({},e)},(nr||(nr={})).filterSensitiveLog=function(e){return u({},e)},(ir||(ir={})).filterSensitiveLog=function(e){return u({},e)},(or||(or={})).filterSensitiveLog=function(e){return u({},e)},(sr||(sr={})).filterSensitiveLog=function(e){return u({},e)},(ar||(ar={})).filterSensitiveLog=function(e){return u(u(u(u({},e),e.DeparturePosition&&{DeparturePosition:Kn}),e.DestinationPosition&&{DestinationPosition:Kn}),e.WaypointPositions&&{WaypointPositions:Kn})},(ur||(ur={})).filterSensitiveLog=function(e){return u(u({},e),e.LineString&&{LineString:Kn})},(cr||(cr={})).filterSensitiveLog=function(e){return u(u(u({},e),e.StartPosition&&{StartPosition:Kn}),e.EndPosition&&{EndPosition:Kn})},(fr||(fr={})).filterSensitiveLog=function(e){return u(u(u(u(u({},e),e.StartPosition&&{StartPosition:Kn}),e.EndPosition&&{EndPosition:Kn}),e.Geometry&&{Geometry:ur.filterSensitiveLog(e.Geometry)}),e.Steps&&{Steps:e.Steps.map((function(e){return cr.filterSensitiveLog(e)}))})},(lr||(lr={})).filterSensitiveLog=function(e){return u(u({},e),e.RouteBBox&&{RouteBBox:Kn})},(dr||(dr={})).filterSensitiveLog=function(e){return u(u(u({},e),e.Legs&&{Legs:e.Legs.map((function(e){return fr.filterSensitiveLog(e)}))}),e.Summary&&{Summary:lr.filterSensitiveLog(e.Summary)})},(hr||(hr={})).filterSensitiveLog=function(e){return u({},e)},(pr||(pr={})).filterSensitiveLog=function(e){return u({},e)},(vr||(vr={})).filterSensitiveLog=function(e){return u({},e)},(gr||(gr={})).filterSensitiveLog=function(e){return u({},e)},(yr||(yr={})).filterSensitiveLog=function(e){return u({},e)},(mr||(mr={})).filterSensitiveLog=function(e){return u({},e)},(wr||(wr={})).filterSensitiveLog=function(e){return u({},e)},(br||(br={})).filterSensitiveLog=function(e){return u({},e)},(Sr||(Sr={})).filterSensitiveLog=function(e){return u({},e)},(_r||(_r={})).filterSensitiveLog=function(e){return u({},e)},(Ar||(Ar={})).filterSensitiveLog=function(e){return u({},e)},(Pr||(Pr={})).filterSensitiveLog=function(e){return u({},e)},(Er||(Er={})).filterSensitiveLog=function(e){return u({},e)},(Mr||(Mr={})).filterSensitiveLog=function(e){return u({},e)},(xr||(xr={})).filterSensitiveLog=function(e){return u({},e)},(Lr||(Lr={})).filterSensitiveLog=function(e){return u({},e)},(Rr||(Rr={})).filterSensitiveLog=function(e){return u({},e)},(Tr||(Tr={})).filterSensitiveLog=function(e){return u({},e)},(Or||(Or={})).filterSensitiveLog=function(e){return u({},e)},(Cr||(Cr={})).filterSensitiveLog=function(e){return u({},e)},(Br||(Br={})).filterSensitiveLog=function(e){return u({},e)},(kr||(kr={})).filterSensitiveLog=function(e){return u({},e)},(Ir||(Ir={})).filterSensitiveLog=function(e){return u({},e)},(Nr||(Nr={})).filterSensitiveLog=function(e){return u({},e)},(jr||(jr={})).filterSensitiveLog=function(e){return u({},e)},(Fr||(Fr={})).filterSensitiveLog=function(e){return u({},e)},(Ur||(Ur={})).filterSensitiveLog=function(e){return u({},e)},(Dr||(Dr={})).filterSensitiveLog=function(e){return u({},e)},(zr||(zr={})).filterSensitiveLog=function(e){return u({},e)},(qr||(qr={})).filterSensitiveLog=function(e){return u({},e)},(Hr||(Hr={})).filterSensitiveLog=function(e){return u({},e)},(Gr||(Gr={})).filterSensitiveLog=function(e){return u({},e)},(Wr||(Wr={})).filterSensitiveLog=function(e){return u({},e)},(Yr||(Yr={})).filterSensitiveLog=function(e){return u({},e)},(Vr||(Vr={})).filterSensitiveLog=function(e){return u({},e)},($r||($r={})).filterSensitiveLog=function(e){return u({},e)},(Kr||(Kr={})).filterSensitiveLog=function(e){return u({},e)},(Zr||(Zr={})).filterSensitiveLog=function(e){return u({},e)},(Qr||(Qr={})).filterSensitiveLog=function(e){return u({},e)},(Xr||(Xr={})).filterSensitiveLog=function(e){return u({},e)},(Jr||(Jr={})).filterSensitiveLog=function(e){return u({},e)},(en||(en={})).filterSensitiveLog=function(e){return u(u({},e),e.Geometry&&{Geometry:$t.filterSensitiveLog(e.Geometry)})},(tn||(tn={})).filterSensitiveLog=function(e){return u({},e)},(rn||(rn={})).filterSensitiveLog=function(e){return u({},e)},(nn||(nn={})).filterSensitiveLog=function(e){return u({},e)},(on||(on={})).filterSensitiveLog=function(e){return u({},e)},(sn||(sn={})).filterSensitiveLog=function(e){return u(u({},e),e.Geometry&&{Geometry:$t.filterSensitiveLog(e.Geometry)})},(an||(an={})).filterSensitiveLog=function(e){return u(u({},e),e.Entries&&{Entries:e.Entries.map((function(e){return sn.filterSensitiveLog(e)}))})},(un||(un={})).filterSensitiveLog=function(e){return u(u({},e),e.Geometry&&{Geometry:$t.filterSensitiveLog(e.Geometry)})},(cn||(cn={})).filterSensitiveLog=function(e){return u({},e)},(fn||(fn={})).filterSensitiveLog=function(e){return u({},e)},(ln||(ln={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(dn||(dn={})).filterSensitiveLog=function(e){return u({},e)},(hn||(hn={})).filterSensitiveLog=function(e){return u(u({},e),e.DevicePositions&&{DevicePositions:e.DevicePositions.map((function(e){return Wt.filterSensitiveLog(e)}))})},(pn||(pn={})).filterSensitiveLog=function(e){return u({},e)},(vn||(vn={})).filterSensitiveLog=function(e){return u({},e)},(gn||(gn={})).filterSensitiveLog=function(e){return u({},e)},(yn||(yn={})).filterSensitiveLog=function(e){return u({},e)},(mn||(mn={})).filterSensitiveLog=function(e){return u({},e)},(wn||(wn={})).filterSensitiveLog=function(e){return u({},e)},(bn||(bn={})).filterSensitiveLog=function(e){return u({},e)},(Sn||(Sn={})).filterSensitiveLog=function(e){return u({},e)},(_n||(_n={})).filterSensitiveLog=function(e){return u({},e)},(An||(An={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(Pn||(Pn={})).filterSensitiveLog=function(e){return u(u({},e),e.Entries&&{Entries:e.Entries.map((function(e){return An.filterSensitiveLog(e)}))})},(En||(En={})).filterSensitiveLog=function(e){return u({},e)},(Mn||(Mn={})).filterSensitiveLog=function(e){return u({},e)},(xn||(xn={})).filterSensitiveLog=function(e){return u({},e)},(Ln||(Ln={})).filterSensitiveLog=function(e){return u({},e)},(Rn||(Rn={})).filterSensitiveLog=function(e){return u({},e)},(Tn||(Tn={})).filterSensitiveLog=function(e){return u({},e)},(On||(On={})).filterSensitiveLog=function(e){return u({},e)},(Cn||(Cn={})).filterSensitiveLog=function(e){return u({},e)},(Bn||(Bn={})).filterSensitiveLog=function(e){return u({},e)},(kn||(kn={})).filterSensitiveLog=function(e){return u({},e)},(In||(In={})).filterSensitiveLog=function(e){return u({},e)},(Nn||(Nn={})).filterSensitiveLog=function(e){return u({},e)},(jn||(jn={})).filterSensitiveLog=function(e){return u({},e)},(Fn||(Fn={})).filterSensitiveLog=function(e){return u({},e)},(Un||(Un={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(Dn||(Dn={})).filterSensitiveLog=function(e){return u(u({},e),e.Point&&{Point:Kn})},(zn||(zn={})).filterSensitiveLog=function(e){return u(u({},e),e.Geometry&&{Geometry:Dn.filterSensitiveLog(e.Geometry)})},(qn||(qn={})).filterSensitiveLog=function(e){return u(u({},e),e.Place&&{Place:zn.filterSensitiveLog(e.Place)})},(Hn||(Hn={})).filterSensitiveLog=function(e){return u(u({},e),e.Position&&{Position:Kn})},(Gn||(Gn={})).filterSensitiveLog=function(e){return u(u(u({},e),e.Summary&&{Summary:Hn.filterSensitiveLog(e.Summary)}),e.Results&&{Results:e.Results.map((function(e){return qn.filterSensitiveLog(e)}))})},(Wn||(Wn={})).filterSensitiveLog=function(e){return u(u(u(u({},e),e.Text&&{Text:Kn}),e.BiasPosition&&{BiasPosition:Kn}),e.FilterBBox&&{FilterBBox:Kn})},(Yn||(Yn={})).filterSensitiveLog=function(e){return u(u({},e),e.Place&&{Place:zn.filterSensitiveLog(e.Place)})},(Vn||(Vn={})).filterSensitiveLog=function(e){return u(u(u(u(u({},e),e.Text&&{Text:Kn}),e.BiasPosition&&{BiasPosition:Kn}),e.FilterBBox&&{FilterBBox:Kn}),e.ResultBBox&&{ResultBBox:Kn})},($n||($n={})).filterSensitiveLog=function(e){return u(u(u({},e),e.Summary&&{Summary:Vn.filterSensitiveLog(e.Summary)}),e.Results&&{Results:e.Results.map((function(e){return Yn.filterSensitiveLog(e)}))})};var Qn=function(e,t){return f(void 0,void 0,void 0,(function(){var r,n,i,o,s,a,c,f,d,h,p,v;return l(this,(function(l){switch(l.label){case 0:return n=[u({},e)],v={},[4,wi(e.body,t)];case 1:switch(r=u.apply(void 0,n.concat([(v.body=l.sent(),v)])),o="UnknownError",o=bi(e,r.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return s=[{}],[4,Jn(r,t)];case 3:return i=u.apply(void 0,[u.apply(void 0,s.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 4:return a=[{}],[4,ei(r,t)];case 5:return i=u.apply(void 0,[u.apply(void 0,a.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 6:return c=[{}],[4,ti(r,t)];case 7:return i=u.apply(void 0,[u.apply(void 0,c.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 8:return f=[{}],[4,ri(r,t)];case 9:return i=u.apply(void 0,[u.apply(void 0,f.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 10:return d=[{}],[4,ni(r,t)];case 11:return i=u.apply(void 0,[u.apply(void 0,d.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 12:h=r.body,o=h.code||h.Code||o,i=u(u({},h),{name:""+o,message:h.message||h.Message||o,$fault:"client",$metadata:yi(e)}),l.label=13;case 13:return p=i.message||i.Message||o,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Xn=function(e,t){return f(void 0,void 0,void 0,(function(){var r,n,i,o,s,a,c,f,d,h,p,v;return l(this,(function(l){switch(l.label){case 0:return n=[u({},e)],v={},[4,wi(e.body,t)];case 1:switch(r=u.apply(void 0,n.concat([(v.body=l.sent(),v)])),o="UnknownError",o=bi(e,r.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return s=[{}],[4,Jn(r,t)];case 3:return i=u.apply(void 0,[u.apply(void 0,s.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 4:return a=[{}],[4,ei(r,t)];case 5:return i=u.apply(void 0,[u.apply(void 0,a.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 6:return c=[{}],[4,ti(r,t)];case 7:return i=u.apply(void 0,[u.apply(void 0,c.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 8:return f=[{}],[4,ri(r,t)];case 9:return i=u.apply(void 0,[u.apply(void 0,f.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 10:return d=[{}],[4,ni(r,t)];case 11:return i=u.apply(void 0,[u.apply(void 0,d.concat([l.sent()])),{name:o,$metadata:yi(e)}]),[3,13];case 12:h=r.body,o=h.code||h.Code||o,i=u(u({},h),{name:""+o,message:h.message||h.Message||o,$fault:"client",$metadata:yi(e)}),l.label=13;case 13:return p=i.message||i.Message||o,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Jn=function(e,t){return f(void 0,void 0,void 0,(function(){var t,r;return l(this,(function(n){return t={name:"AccessDeniedException",$fault:"client",$metadata:yi(e),Message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.Message=St(r.message)),[2,t]}))}))},ei=function(e,t){return f(void 0,void 0,void 0,(function(){var t,r;return l(this,(function(n){return t={name:"InternalServerException",$fault:"server",$retryable:{},$metadata:yi(e),Message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.Message=St(r.message)),[2,t]}))}))},ti=function(e,t){return f(void 0,void 0,void 0,(function(){var t,r;return l(this,(function(n){return t={name:"ResourceNotFoundException",$fault:"client",$metadata:yi(e),Message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.Message=St(r.message)),[2,t]}))}))},ri=function(e,t){return f(void 0,void 0,void 0,(function(){var t,r;return l(this,(function(n){return t={name:"ThrottlingException",$fault:"client",$retryable:{},$metadata:yi(e),Message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.Message=St(r.message)),[2,t]}))}))},ni=function(e,t){return f(void 0,void 0,void 0,(function(){var r,n;return l(this,(function(i){return r={name:"ValidationException",$fault:"client",$metadata:yi(e),FieldList:void 0,Message:void 0,Reason:void 0},void 0!==(n=e.body).fieldList&&null!==n.fieldList&&(r.FieldList=gi(n.fieldList,t)),void 0!==n.message&&null!==n.message&&(r.Message=St(n.message)),void 0!==n.reason&&null!==n.reason&&(r.Reason=St(n.reason)),[2,r]}))}))},ii=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:At(e)}))},oi=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:e}))},si=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:At(e)}))},ai=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:_t(e)}))},ui=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:St(e)}))},ci=function(e,t){return{AddressNumber:St(e.AddressNumber),Country:St(e.Country),Geometry:void 0!==e.Geometry&&null!==e.Geometry?fi(e.Geometry,t):void 0,Label:St(e.Label),Municipality:St(e.Municipality),Neighborhood:St(e.Neighborhood),PostalCode:St(e.PostalCode),Region:St(e.Region),Street:St(e.Street),SubRegion:St(e.SubRegion)}},fi=function(e,t){return{Point:void 0!==e.Point&&null!==e.Point?li(e.Point,t):void 0}},li=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:_t(e)}))},di=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Place:void 0!==e.Place&&null!==e.Place?ci(e.Place,t):void 0}}(e,t)}))},hi=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Place:void 0!==e.Place&&null!==e.Place?ci(e.Place,t):void 0}}(e,t)}))},pi=function(e,t){return{DataSource:St(e.DataSource),MaxResults:bt(e.MaxResults),Position:void 0!==e.Position&&null!==e.Position?li(e.Position,t):void 0}},vi=function(e,t){return{BiasPosition:void 0!==e.BiasPosition&&null!==e.BiasPosition?li(e.BiasPosition,t):void 0,DataSource:St(e.DataSource),FilterBBox:void 0!==e.FilterBBox&&null!==e.FilterBBox?ai(e.FilterBBox):void 0,FilterCountries:void 0!==e.FilterCountries&&null!==e.FilterCountries?ui(e.FilterCountries):void 0,MaxResults:bt(e.MaxResults),ResultBBox:void 0!==e.ResultBBox&&null!==e.ResultBBox?ai(e.ResultBBox):void 0,Text:St(e.Text)}},gi=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Message:St(e.message),Name:St(e.name)}}(e)}))},yi=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},mi=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},wi=function(e,t){return function(e,t){return mi(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},bi=function(e,t){var r,n,i=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=(r=e.headers,n="x-amzn-errortype",Object.keys(r).find((function(e){return e.toLowerCase()===n.toLowerCase()})));return void 0!==o?i(e.headers[o]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):""},Si={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},_i={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ai(e,t,r){return{applyToStack:function(n){n.add(function(e,t){return function(r,n){return function(n){return f(void 0,void 0,void 0,(function(){var i,o;return l(this,(function(s){switch(s.label){case 0:return[4,r(n)];case 1:return i=s.sent().response,[4,t(i,e)];case 2:return o=s.sent(),[2,{response:i,output:o}]}}))}))}}}(e,r),Si),n.add(function(e,t){return function(r,n){return function(n){return f(void 0,void 0,void 0,(function(){var i;return l(this,(function(o){switch(o.label){case 0:return[4,t(n.input,e)];case 1:return i=o.sent(),[2,r(u(u({},n),{request:i}))]}}))}))}}}(e,t),_i)}}}var Pi=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return a(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Ai(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForTextCommand",inputFilterSensitiveLog:Wn.filterSensitiveLog,outputFilterSensitiveLog:$n.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return f(void 0,void 0,void 0,(function(){var r,n,i,o,s,a,c,f,d,h;return l(this,(function(l){switch(l.label){case 0:return[4,t.endpoint()];case 1:if(r=l.sent(),r.hostname,n=r.protocol,i=void 0===n?"https":n,o=r.port,s=r.path,a={"content-type":"application/json"},c=((null==s?void 0:s.endsWith("/"))?s.slice(0,-1):s||"")+"/places/v0/indexes/{IndexName}/search/text",void 0===e.IndexName)throw new Error("No value provided for input HTTP label: IndexName.");if((f=e.IndexName).length<=0)throw new Error("Empty value provided for input HTTP label: IndexName.");return c=c.replace("{IndexName}",mt(f)),d=JSON.stringify(u(u(u(u(u({},void 0!==e.BiasPosition&&null!==e.BiasPosition&&{BiasPosition:si(e.BiasPosition,t)}),void 0!==e.FilterBBox&&null!==e.FilterBBox&&{FilterBBox:ii(e.FilterBBox,t)}),void 0!==e.FilterCountries&&null!==e.FilterCountries&&{FilterCountries:oi(e.FilterCountries,t)}),void 0!==e.MaxResults&&null!==e.MaxResults&&{MaxResults:e.MaxResults}),void 0!==e.Text&&null!==e.Text&&{Text:e.Text})),[4,t.endpoint()];case 2:if(h=l.sent().hostname,!0!==t.disableHostPrefix&&!w(h="places."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new m({protocol:i,hostname:h,port:o,method:"POST",headers:a,path:c,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return f(void 0,void 0,void 0,(function(){var r,n;return l(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Xn(e,t)]:(r={$metadata:yi(e),Results:void 0,Summary:void 0},[4,wi(e.body,t)]);case 1:return void 0!==(n=i.sent()).Results&&null!==n.Results&&(r.Results=hi(n.Results,t)),void 0!==n.Summary&&null!==n.Summary&&(r.Summary=vi(n.Summary,t)),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(yt),Ei=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return a(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Ai(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForPositionCommand",inputFilterSensitiveLog:Un.filterSensitiveLog,outputFilterSensitiveLog:Gn.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return f(void 0,void 0,void 0,(function(){var r,n,i,o,s,a,c,f,d,h;return l(this,(function(l){switch(l.label){case 0:return[4,t.endpoint()];case 1:if(r=l.sent(),r.hostname,n=r.protocol,i=void 0===n?"https":n,o=r.port,s=r.path,a={"content-type":"application/json"},c=((null==s?void 0:s.endsWith("/"))?s.slice(0,-1):s||"")+"/places/v0/indexes/{IndexName}/search/position",void 0===e.IndexName)throw new Error("No value provided for input HTTP label: IndexName.");if((f=e.IndexName).length<=0)throw new Error("Empty value provided for input HTTP label: IndexName.");return c=c.replace("{IndexName}",mt(f)),d=JSON.stringify(u(u({},void 0!==e.MaxResults&&null!==e.MaxResults&&{MaxResults:e.MaxResults}),void 0!==e.Position&&null!==e.Position&&{Position:si(e.Position,t)})),[4,t.endpoint()];case 2:if(h=l.sent().hostname,!0!==t.disableHostPrefix&&!w(h="places."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new m({protocol:i,hostname:h,port:o,method:"POST",headers:a,path:c,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return f(void 0,void 0,void 0,(function(){var r,n;return l(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Qn(e,t)]:(r={$metadata:yi(e),Results:void 0,Summary:void 0},[4,wi(e.body,t)]);case 1:return void 0!==(n=i.sent()).Results&&null!==n.Results&&(r.Results=di(n.Results,t)),void 0!==n.Summary&&null!==n.Summary&&(r.Summary=pi(n.Summary,t)),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(yt),Mi=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},xi=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Li=new n.ConsoleLogger("AmazonLocationServiceProvider"),Ri=function(){function e(e){this._config=e||{},Li.debug("Geo Options",this._config)}return e.prototype.getCategory=function(){return e.CATEGORY},e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.configure=function(e){return Li.debug("configure Amazon Location Service Provider",e),e?(this._config=Object.assign({},this._config,e),this._config):this._config},e.prototype.getAvailableMaps=function(){this._verifyMapResources();var e=[],t=this._config.maps.items,r=this._config.region;for(var n in t){var i=t[n].style;e.push({mapName:n,style:i,region:r})}return e},e.prototype.getDefaultMap=function(){this._verifyMapResources();var e=this._config.maps.default;return{mapName:e,style:this._config.maps.items[e].style,region:this._config.region}},e.prototype.searchByText=function(e,t){return Mi(this,void 0,void 0,(function(){var r,i,s,a,u,c;return xi(this,(function(f){switch(f.label){case 0:return[4,this._ensureCredentials()];case 1:if(!f.sent())throw new Error("No credentials");this._verifySearchIndex(null==t?void 0:t.searchIndexName),r={Text:e,IndexName:this._config.search_indices.default},t&&(r.FilterCountries=t.countries,r.MaxResults=t.maxResults,t.searchIndexName&&(r.IndexName=t.searchIndexName),t.biasPosition?r.BiasPosition=t.biasPosition:t.searchAreaConstraints&&(r.FilterBBox=t.searchAreaConstraints)),i=new Zn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(n.getAmplifyUserAgent)()}),s=new Pi(r),f.label=2;case 2:return f.trys.push([2,4,,5]),[4,i.send(s)];case 3:return a=f.sent(),[3,5];case 4:throw u=f.sent(),Li.debug(u),u;case 5:return c=a.Results.map((function(e){return e.Place})),[2,o()(c,{deep:!0})]}}))}))},e.prototype.searchByCoordinates=function(e,t){return Mi(this,void 0,void 0,(function(){var r,i,s,a,u,c;return xi(this,(function(f){switch(f.label){case 0:return[4,this._ensureCredentials()];case 1:if(!f.sent())throw new Error("No credentials");this._verifySearchIndex(null==t?void 0:t.searchIndexName),r={Position:e,IndexName:this._config.search_indices.default},t&&(t.searchIndexName&&(r.IndexName=t.searchIndexName),r.MaxResults=t.maxResults),i=new Zn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(n.getAmplifyUserAgent)()}),s=new Ei(r),f.label=2;case 2:return f.trys.push([2,4,,5]),[4,i.send(s)];case 3:return a=f.sent(),[3,5];case 4:throw u=f.sent(),Li.debug(u),u;case 5:return c=a.Results.map((function(e){return e.Place})),[2,o()(c[0],{deep:!0})]}}))}))},e.prototype._ensureCredentials=function(){return Mi(this,void 0,void 0,(function(){var e,t,r;return xi(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,n.Credentials.get()];case 1:return(e=i.sent())?(t=n.Credentials.shear(e),Li.debug("Set credentials for storage. Credentials are:",t),this._config.credentials=t,[2,!0]):[2,!1];case 2:return r=i.sent(),Li.warn("Ensure credentials error. Credentials are:",r),[2,!1];case 3:return[2]}}))}))},e.prototype._verifyMapResources=function(){if(!this._config.maps){var e="No map resources found in amplify config, run 'amplify add geo' to create them and ensure to run `amplify push` after";throw Li.warn(e),new Error(e)}if(!this._config.maps.default){e="No default map resource found in amplify config, run 'amplify add geo' to create one and ensure to run `amplify push` after";throw Li.warn(e),new Error(e)}},e.prototype._verifySearchIndex=function(e){if(!(this._config.search_indices&&this._config.search_indices.default||e)){var t="No Search Index found, please run `amplify add geo` to add one and ensure to run `amplify push` after.";throw Li.warn(t),new Error(t)}},e.CATEGORY="Geo",e.PROVIDER_NAME="AmazonLocationService",e}(),Ti=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},Oi=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Ci=new n.ConsoleLogger("Geo"),Bi=new(function(){function e(){this._config={},this._pluggables=[],Ci.debug("Geo Options",this._config)}return e.prototype.getModuleName=function(){return e.MODULE},e.prototype.addPluggable=function(e){if(e&&"Geo"===e.getCategory())return this._pluggables.push(e),e.configure(this._config[e.getProviderName()])},e.prototype.getPluggable=function(e){var t=this._pluggables.find((function(t){return t.getProviderName()===e}));if(void 0===t)throw Ci.debug("No plugin found with providerName",e),new Error("No plugin found in Geo for the provider");return t},e.prototype.removePluggable=function(e){this._pluggables=this._pluggables.filter((function(t){return t.getProviderName()!==e}))},e.prototype.configure=function(e){var t=this;if(Ci.debug("configure Geo"),!e)return this._config;var r=Object(n.parseMobileHubConfig)(e);return this._config=Object.assign({},this._config,r.Geo,e),this._pluggables.forEach((function(e){e.configure(t._config[e.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new Ri),this._config},e.prototype.getAvailableMaps=function(e){return void 0===e&&(e="AmazonLocationService"),this.getPluggable(e).getAvailableMaps()},e.prototype.getDefaultMap=function(e){return void 0===e&&(e="AmazonLocationService"),this.getPluggable(e).getDefaultMap()},e.prototype.searchByText=function(e,t){return Ti(this,void 0,void 0,(function(){var r,n,i,o;return Oi(this,(function(s){switch(s.label){case 0:r=(t||{}).providerName,n=void 0===r?"AmazonLocationService":r,i=this.getPluggable(n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,i.searchByText(e,t)];case 2:return[2,s.sent()];case 3:throw o=s.sent(),Ci.debug(o),o;case 4:return[2]}}))}))},e.prototype.searchByCoordinates=function(e,t){return Ti(this,void 0,void 0,(function(){var r,n,i,o;return Oi(this,(function(s){switch(s.label){case 0:r=(t||{}).providerName,n=void 0===r?"AmazonLocationService":r,i=this.getPluggable(n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,i.searchByCoordinates(e,t)];case 2:return[2,s.sent()];case 3:throw o=s.sent(),Ci.debug(o),o;case 4:return[2]}}))}))},e.MODULE="Geo",e}());n.Amplify.register(Bi)},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));var n=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));var n=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}}])}));
26
26
  //# sourceMappingURL=aws-amplify-geo.min.js.map