@aws-amplify/core 4.7.7-unstable.1 → 4.7.7-unstable.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -658,12 +658,8 @@ __webpack_require__.r(__webpack_exports__);
658
658
  /* harmony import */ var _whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./whatwgEncodingApi */ "../../node_modules/@aws-crypto/sha256-browser/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js");
659
659
 
660
660
 
661
- var fromUtf8 = function (input) {
662
- return typeof TextEncoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["fromUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["fromUtf8"])(input);
663
- };
664
- var toUtf8 = function (input) {
665
- return typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
666
- };
661
+ const fromUtf8 = (input) => typeof TextEncoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["fromUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["fromUtf8"])(input);
662
+ const toUtf8 = (input) => typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
667
663
 
668
664
 
669
665
  /***/ }),
@@ -679,44 +675,44 @@ var toUtf8 = function (input) {
679
675
  __webpack_require__.r(__webpack_exports__);
680
676
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromUtf8", function() { return fromUtf8; });
681
677
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toUtf8", function() { return toUtf8; });
682
- var fromUtf8 = function (input) {
683
- var bytes = [];
684
- for (var i = 0, len = input.length; i < len; i++) {
685
- var value = input.charCodeAt(i);
678
+ const fromUtf8 = (input) => {
679
+ const bytes = [];
680
+ for (let i = 0, len = input.length; i < len; i++) {
681
+ const value = input.charCodeAt(i);
686
682
  if (value < 0x80) {
687
683
  bytes.push(value);
688
684
  }
689
685
  else if (value < 0x800) {
690
- bytes.push((value >> 6) | 192, (value & 63) | 128);
686
+ bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);
691
687
  }
692
688
  else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {
693
- var surrogatePair = 0x10000 + ((value & 1023) << 10) + (input.charCodeAt(++i) & 1023);
694
- bytes.push((surrogatePair >> 18) | 240, ((surrogatePair >> 12) & 63) | 128, ((surrogatePair >> 6) & 63) | 128, (surrogatePair & 63) | 128);
689
+ const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);
690
+ bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);
695
691
  }
696
692
  else {
697
- bytes.push((value >> 12) | 224, ((value >> 6) & 63) | 128, (value & 63) | 128);
693
+ bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);
698
694
  }
699
695
  }
700
696
  return Uint8Array.from(bytes);
701
697
  };
702
- var toUtf8 = function (input) {
703
- var decoded = "";
704
- for (var i = 0, len = input.length; i < len; i++) {
705
- var byte = input[i];
698
+ const toUtf8 = (input) => {
699
+ let decoded = "";
700
+ for (let i = 0, len = input.length; i < len; i++) {
701
+ const byte = input[i];
706
702
  if (byte < 0x80) {
707
703
  decoded += String.fromCharCode(byte);
708
704
  }
709
- else if (192 <= byte && byte < 224) {
710
- var nextByte = input[++i];
711
- decoded += String.fromCharCode(((byte & 31) << 6) | (nextByte & 63));
705
+ else if (0b11000000 <= byte && byte < 0b11100000) {
706
+ const nextByte = input[++i];
707
+ decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));
712
708
  }
713
- else if (240 <= byte && byte < 365) {
714
- var surrogatePair = [byte, input[++i], input[++i], input[++i]];
715
- var encoded = "%" + surrogatePair.map(function (byteValue) { return byteValue.toString(16); }).join("%");
709
+ else if (0b11110000 <= byte && byte < 0b101101101) {
710
+ const surrogatePair = [byte, input[++i], input[++i], input[++i]];
711
+ const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%");
716
712
  decoded += decodeURIComponent(encoded);
717
713
  }
718
714
  else {
719
- decoded += String.fromCharCode(((byte & 15) << 12) | ((input[++i] & 63) << 6) | (input[++i] & 63));
715
+ decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));
720
716
  }
721
717
  }
722
718
  return decoded;
@@ -1253,12 +1249,8 @@ __webpack_require__.r(__webpack_exports__);
1253
1249
  /* harmony import */ var _whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./whatwgEncodingApi */ "../../node_modules/@aws-crypto/sha256-js/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js");
1254
1250
 
1255
1251
 
1256
- var fromUtf8 = function (input) {
1257
- return typeof TextEncoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["fromUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["fromUtf8"])(input);
1258
- };
1259
- var toUtf8 = function (input) {
1260
- return typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
1261
- };
1252
+ const fromUtf8 = (input) => typeof TextEncoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["fromUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["fromUtf8"])(input);
1253
+ const toUtf8 = (input) => typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
1262
1254
 
1263
1255
 
1264
1256
  /***/ }),
@@ -1274,44 +1266,44 @@ var toUtf8 = function (input) {
1274
1266
  __webpack_require__.r(__webpack_exports__);
1275
1267
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromUtf8", function() { return fromUtf8; });
1276
1268
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toUtf8", function() { return toUtf8; });
1277
- var fromUtf8 = function (input) {
1278
- var bytes = [];
1279
- for (var i = 0, len = input.length; i < len; i++) {
1280
- var value = input.charCodeAt(i);
1269
+ const fromUtf8 = (input) => {
1270
+ const bytes = [];
1271
+ for (let i = 0, len = input.length; i < len; i++) {
1272
+ const value = input.charCodeAt(i);
1281
1273
  if (value < 0x80) {
1282
1274
  bytes.push(value);
1283
1275
  }
1284
1276
  else if (value < 0x800) {
1285
- bytes.push((value >> 6) | 192, (value & 63) | 128);
1277
+ bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);
1286
1278
  }
1287
1279
  else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {
1288
- var surrogatePair = 0x10000 + ((value & 1023) << 10) + (input.charCodeAt(++i) & 1023);
1289
- bytes.push((surrogatePair >> 18) | 240, ((surrogatePair >> 12) & 63) | 128, ((surrogatePair >> 6) & 63) | 128, (surrogatePair & 63) | 128);
1280
+ const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);
1281
+ bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);
1290
1282
  }
1291
1283
  else {
1292
- bytes.push((value >> 12) | 224, ((value >> 6) & 63) | 128, (value & 63) | 128);
1284
+ bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);
1293
1285
  }
1294
1286
  }
1295
1287
  return Uint8Array.from(bytes);
1296
1288
  };
1297
- var toUtf8 = function (input) {
1298
- var decoded = "";
1299
- for (var i = 0, len = input.length; i < len; i++) {
1300
- var byte = input[i];
1289
+ const toUtf8 = (input) => {
1290
+ let decoded = "";
1291
+ for (let i = 0, len = input.length; i < len; i++) {
1292
+ const byte = input[i];
1301
1293
  if (byte < 0x80) {
1302
1294
  decoded += String.fromCharCode(byte);
1303
1295
  }
1304
- else if (192 <= byte && byte < 224) {
1305
- var nextByte = input[++i];
1306
- decoded += String.fromCharCode(((byte & 31) << 6) | (nextByte & 63));
1296
+ else if (0b11000000 <= byte && byte < 0b11100000) {
1297
+ const nextByte = input[++i];
1298
+ decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));
1307
1299
  }
1308
- else if (240 <= byte && byte < 365) {
1309
- var surrogatePair = [byte, input[++i], input[++i], input[++i]];
1310
- var encoded = "%" + surrogatePair.map(function (byteValue) { return byteValue.toString(16); }).join("%");
1300
+ else if (0b11110000 <= byte && byte < 0b101101101) {
1301
+ const surrogatePair = [byte, input[++i], input[++i], input[++i]];
1302
+ const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%");
1311
1303
  decoded += decodeURIComponent(encoded);
1312
1304
  }
1313
1305
  else {
1314
- decoded += String.fromCharCode(((byte & 15) << 12) | ((input[++i] & 63) << 6) | (input[++i] & 63));
1306
+ decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));
1315
1307
  }
1316
1308
  }
1317
1309
  return decoded;
@@ -23874,7 +23866,7 @@ function calculateBodyLength(body) {
23874
23866
  "use strict";
23875
23867
  __webpack_require__.r(__webpack_exports__);
23876
23868
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "locateWindow", function() { return locateWindow; });
23877
- var fallbackWindow = {};
23869
+ const fallbackWindow = {};
23878
23870
  function locateWindow() {
23879
23871
  if (typeof window !== "undefined") {
23880
23872
  return window;