indexeddbshim 13.0.0-pre.1 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/badges/licenses-badge-dev.svg +1 -1
  3. package/badges/licenses-badge.svg +1 -1
  4. package/dist/indexeddbshim-Key.js +152 -151
  5. package/dist/indexeddbshim-Key.js.map +1 -1
  6. package/dist/indexeddbshim-Key.min.js +2 -2
  7. package/dist/indexeddbshim-Key.min.js.map +1 -1
  8. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +872 -13041
  9. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
  10. package/dist/indexeddbshim-UnicodeIdentifiers.js +1165 -1024
  11. package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
  12. package/dist/indexeddbshim-UnicodeIdentifiers.min.js +2 -2
  13. package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
  14. package/dist/indexeddbshim-node.cjs +872 -13041
  15. package/dist/indexeddbshim-node.cjs.map +1 -1
  16. package/dist/indexeddbshim-noninvasive.js +1164 -1020
  17. package/dist/indexeddbshim-noninvasive.js.map +1 -1
  18. package/dist/indexeddbshim-noninvasive.min.js +2 -2
  19. package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
  20. package/dist/indexeddbshim.js +1165 -1024
  21. package/dist/indexeddbshim.js.map +1 -1
  22. package/dist/indexeddbshim.min.js +2 -2
  23. package/dist/indexeddbshim.min.js.map +1 -1
  24. package/index.html +1 -1
  25. package/package.json +40 -39
  26. package/src/DOMException.js +3 -4
  27. package/src/DOMStringList.js +1 -1
  28. package/src/IDBCursor.js +19 -17
  29. package/src/IDBDatabase.js +1 -0
  30. package/src/IDBFactory.js +23 -16
  31. package/src/IDBIndex.js +17 -23
  32. package/src/IDBKeyRange.js +4 -4
  33. package/src/IDBObjectStore.js +29 -26
  34. package/src/IDBTransaction.js +7 -8
  35. package/src/Key.d.ts +1 -0
  36. package/src/Key.js +11 -12
  37. package/src/setGlobalVars.js +3 -1
  38. package/src/util.js +1 -0
@@ -1,4 +1,4 @@
1
- /*! indexeddbshim - v12.0.0-pre.0 - 6/7/2023 */
1
+ /*! indexeddbshim - v13.0.0 - 7/7/2024 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -12,568 +12,524 @@
12
12
  // ID_Continue (includes Other_ID_Continue)
13
13
  var UnicodeIDContinue = "(?:[$0-9A-Z_a-z\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0AF9\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58-\\u0C5A\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C80-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDDFD\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE0\\uDF00-\\uDF1F\\uDF30-\\uDF4A\\uDF50-\\uDF7A\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE33\\uDE38-\\uDE3A\\uDE3F\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE6\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2]|\\uD804[\\uDC00-\\uDC46\\uDC66-\\uDC6F\\uDC7F-\\uDCBA\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD00-\\uDD34\\uDD36-\\uDD3F\\uDD50-\\uDD73\\uDD76\\uDD80-\\uDDC4\\uDDCA-\\uDDCC\\uDDD0-\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE37\\uDE3E\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEEA\\uDEF0-\\uDEF9\\uDF00-\\uDF03\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3C-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF50\\uDF57\\uDF5D-\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC00-\\uDC4A\\uDC50-\\uDC59\\uDC80-\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDB5\\uDDB8-\\uDDC0\\uDDD8-\\uDDDD\\uDE00-\\uDE40\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEB7\\uDEC0-\\uDEC9\\uDF00-\\uDF19\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDCA0-\\uDCE9\\uDCFF\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC36\\uDC38-\\uDC40\\uDC50-\\uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50-\\uDF7E\\uDF8F-\\uDF9F\\uDFE0]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6\\uDD00-\\uDD4A\\uDD50-\\uDD59]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF])";
14
14
 
15
- function _defineAccessor(type, obj, key, fn) {
16
- var desc = {
15
+ function _arrayLikeToArray$1(r, a) {
16
+ (null == a || a > r.length) && (a = r.length);
17
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
18
+ return n;
19
+ }
20
+ function _arrayWithHoles(r) {
21
+ if (Array.isArray(r)) return r;
22
+ }
23
+ function _arrayWithoutHoles(r) {
24
+ if (Array.isArray(r)) return _arrayLikeToArray$1(r);
25
+ }
26
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
27
+ try {
28
+ var i = n[a](c),
29
+ u = i.value;
30
+ } catch (n) {
31
+ return void e(n);
32
+ }
33
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
34
+ }
35
+ function _asyncToGenerator(n) {
36
+ return function () {
37
+ var t = this,
38
+ e = arguments;
39
+ return new Promise(function (r, o) {
40
+ var a = n.apply(t, e);
41
+ function _next(n) {
42
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
43
+ }
44
+ function _throw(n) {
45
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
46
+ }
47
+ _next(void 0);
48
+ });
49
+ };
50
+ }
51
+ function _classCallCheck$1(a, n) {
52
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
53
+ }
54
+ function _construct(t, e, r) {
55
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
56
+ var o = [null];
57
+ o.push.apply(o, e);
58
+ var p = new (t.bind.apply(t, o))();
59
+ return p;
60
+ }
61
+ function _defineProperties(e, r) {
62
+ for (var t = 0; t < r.length; t++) {
63
+ var o = r[t];
64
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$1(o.key), o);
65
+ }
66
+ }
67
+ function _createClass$1(e, r, t) {
68
+ return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
69
+ writable: !1
70
+ }), e;
71
+ }
72
+ function _createForOfIteratorHelper(r, e) {
73
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
74
+ if (!t) {
75
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e ) {
76
+ t && (r = t);
77
+ var n = 0,
78
+ F = function () {};
79
+ return {
80
+ s: F,
81
+ n: function () {
82
+ return n >= r.length ? {
83
+ done: !0
84
+ } : {
85
+ done: !1,
86
+ value: r[n++]
87
+ };
88
+ },
89
+ e: function (r) {
90
+ throw r;
91
+ },
92
+ f: F
93
+ };
94
+ }
95
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
96
+ }
97
+ var o,
98
+ a = !0,
99
+ u = !1;
100
+ return {
101
+ s: function () {
102
+ t = t.call(r);
103
+ },
104
+ n: function () {
105
+ var r = t.next();
106
+ return a = r.done, r;
107
+ },
108
+ e: function (r) {
109
+ u = !0, o = r;
110
+ },
111
+ f: function () {
112
+ try {
113
+ a || null == t.return || t.return();
114
+ } finally {
115
+ if (u) throw o;
116
+ }
117
+ }
118
+ };
119
+ }
120
+ function _defineAccessor(e, r, n, t) {
121
+ var c = {
17
122
  configurable: !0,
18
123
  enumerable: !0
19
124
  };
20
- return desc[type] = fn, Object.defineProperty(obj, key, desc);
21
- }
22
- function _iterableToArrayLimit(arr, i) {
23
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
24
- if (null != _i) {
25
- var _s,
26
- _e,
27
- _x,
28
- _r,
29
- _arr = [],
30
- _n = !0,
31
- _d = !1;
125
+ return c[e] = t, Object.defineProperty(r, n, c);
126
+ }
127
+ function _defineProperty$1(e, r, t) {
128
+ return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, {
129
+ value: t,
130
+ enumerable: !0,
131
+ configurable: !0,
132
+ writable: !0
133
+ }) : e[r] = t, e;
134
+ }
135
+ function _isNativeReflectConstruct() {
136
+ try {
137
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
138
+ } catch (t) {}
139
+ return (_isNativeReflectConstruct = function () {
140
+ return !!t;
141
+ })();
142
+ }
143
+ function _iterableToArray(r) {
144
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
145
+ }
146
+ function _iterableToArrayLimit(r, l) {
147
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
148
+ if (null != t) {
149
+ var e,
150
+ n,
151
+ i,
152
+ u,
153
+ a = [],
154
+ f = !0,
155
+ o = !1;
32
156
  try {
33
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
34
- if (Object(_i) !== _i) return;
35
- _n = !1;
36
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
37
- } catch (err) {
38
- _d = !0, _e = err;
157
+ if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
158
+ } catch (r) {
159
+ o = !0, n = r;
39
160
  } finally {
40
161
  try {
41
- if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
162
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
42
163
  } finally {
43
- if (_d) throw _e;
164
+ if (o) throw n;
44
165
  }
45
166
  }
46
- return _arr;
167
+ return a;
47
168
  }
48
169
  }
49
- function ownKeys$1(object, enumerableOnly) {
50
- var keys = Object.keys(object);
170
+ function _nonIterableRest() {
171
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
172
+ }
173
+ function _nonIterableSpread() {
174
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
175
+ }
176
+ function ownKeys$1(e, r) {
177
+ var t = Object.keys(e);
51
178
  if (Object.getOwnPropertySymbols) {
52
- var symbols = Object.getOwnPropertySymbols(object);
53
- enumerableOnly && (symbols = symbols.filter(function (sym) {
54
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
55
- })), keys.push.apply(keys, symbols);
56
- }
57
- return keys;
58
- }
59
- function _objectSpread2$1(target) {
60
- for (var i = 1; i < arguments.length; i++) {
61
- var source = null != arguments[i] ? arguments[i] : {};
62
- i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
63
- _defineProperty$1(target, key, source[key]);
64
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
65
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
179
+ var o = Object.getOwnPropertySymbols(e);
180
+ r && (o = o.filter(function (r) {
181
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
182
+ })), t.push.apply(t, o);
183
+ }
184
+ return t;
185
+ }
186
+ function _objectSpread2$1(e) {
187
+ for (var r = 1; r < arguments.length; r++) {
188
+ var t = null != arguments[r] ? arguments[r] : {};
189
+ r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) {
190
+ _defineProperty$1(e, r, t[r]);
191
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) {
192
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
66
193
  });
67
194
  }
68
- return target;
195
+ return e;
69
196
  }
70
197
  function _regeneratorRuntime() {
71
198
  _regeneratorRuntime = function () {
72
- return exports;
199
+ return e;
73
200
  };
74
- var exports = {},
75
- Op = Object.prototype,
76
- hasOwn = Op.hasOwnProperty,
77
- defineProperty = Object.defineProperty || function (obj, key, desc) {
78
- obj[key] = desc.value;
201
+ var t,
202
+ e = {},
203
+ r = Object.prototype,
204
+ n = r.hasOwnProperty,
205
+ o = Object.defineProperty || function (t, e, r) {
206
+ t[e] = r.value;
79
207
  },
80
- $Symbol = "function" == typeof Symbol ? Symbol : {},
81
- iteratorSymbol = $Symbol.iterator || "@@iterator",
82
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
83
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
84
- function define(obj, key, value) {
85
- return Object.defineProperty(obj, key, {
86
- value: value,
208
+ i = "function" == typeof Symbol ? Symbol : {},
209
+ a = i.iterator || "@@iterator",
210
+ c = i.asyncIterator || "@@asyncIterator",
211
+ u = i.toStringTag || "@@toStringTag";
212
+ function define(t, e, r) {
213
+ return Object.defineProperty(t, e, {
214
+ value: r,
87
215
  enumerable: !0,
88
216
  configurable: !0,
89
217
  writable: !0
90
- }), obj[key];
218
+ }), t[e];
91
219
  }
92
220
  try {
93
221
  define({}, "");
94
- } catch (err) {
95
- define = function (obj, key, value) {
96
- return obj[key] = value;
222
+ } catch (t) {
223
+ define = function (t, e, r) {
224
+ return t[e] = r;
97
225
  };
98
226
  }
99
- function wrap(innerFn, outerFn, self, tryLocsList) {
100
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
101
- generator = Object.create(protoGenerator.prototype),
102
- context = new Context(tryLocsList || []);
103
- return defineProperty(generator, "_invoke", {
104
- value: makeInvokeMethod(innerFn, self, context)
105
- }), generator;
227
+ function wrap(t, e, r, n) {
228
+ var i = e && e.prototype instanceof Generator ? e : Generator,
229
+ a = Object.create(i.prototype),
230
+ c = new Context(n || []);
231
+ return o(a, "_invoke", {
232
+ value: makeInvokeMethod(t, r, c)
233
+ }), a;
106
234
  }
107
- function tryCatch(fn, obj, arg) {
235
+ function tryCatch(t, e, r) {
108
236
  try {
109
237
  return {
110
238
  type: "normal",
111
- arg: fn.call(obj, arg)
239
+ arg: t.call(e, r)
112
240
  };
113
- } catch (err) {
241
+ } catch (t) {
114
242
  return {
115
243
  type: "throw",
116
- arg: err
244
+ arg: t
117
245
  };
118
246
  }
119
247
  }
120
- exports.wrap = wrap;
121
- var ContinueSentinel = {};
248
+ e.wrap = wrap;
249
+ var h = "suspendedStart",
250
+ l = "suspendedYield",
251
+ f = "executing",
252
+ s = "completed",
253
+ y = {};
122
254
  function Generator() {}
123
255
  function GeneratorFunction() {}
124
256
  function GeneratorFunctionPrototype() {}
125
- var IteratorPrototype = {};
126
- define(IteratorPrototype, iteratorSymbol, function () {
257
+ var p = {};
258
+ define(p, a, function () {
127
259
  return this;
128
260
  });
129
- var getProto = Object.getPrototypeOf,
130
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
131
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
132
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
133
- function defineIteratorMethods(prototype) {
134
- ["next", "throw", "return"].forEach(function (method) {
135
- define(prototype, method, function (arg) {
136
- return this._invoke(method, arg);
261
+ var d = Object.getPrototypeOf,
262
+ v = d && d(d(values([])));
263
+ v && v !== r && n.call(v, a) && (p = v);
264
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
265
+ function defineIteratorMethods(t) {
266
+ ["next", "throw", "return"].forEach(function (e) {
267
+ define(t, e, function (t) {
268
+ return this._invoke(e, t);
137
269
  });
138
270
  });
139
271
  }
140
- function AsyncIterator(generator, PromiseImpl) {
141
- function invoke(method, arg, resolve, reject) {
142
- var record = tryCatch(generator[method], generator, arg);
143
- if ("throw" !== record.type) {
144
- var result = record.arg,
145
- value = result.value;
146
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
147
- invoke("next", value, resolve, reject);
148
- }, function (err) {
149
- invoke("throw", err, resolve, reject);
150
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
151
- result.value = unwrapped, resolve(result);
152
- }, function (error) {
153
- return invoke("throw", error, resolve, reject);
272
+ function AsyncIterator(t, e) {
273
+ function invoke(r, o, i, a) {
274
+ var c = tryCatch(t[r], t, o);
275
+ if ("throw" !== c.type) {
276
+ var u = c.arg,
277
+ h = u.value;
278
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
279
+ invoke("next", t, i, a);
280
+ }, function (t) {
281
+ invoke("throw", t, i, a);
282
+ }) : e.resolve(h).then(function (t) {
283
+ u.value = t, i(u);
284
+ }, function (t) {
285
+ return invoke("throw", t, i, a);
154
286
  });
155
287
  }
156
- reject(record.arg);
288
+ a(c.arg);
157
289
  }
158
- var previousPromise;
159
- defineProperty(this, "_invoke", {
160
- value: function (method, arg) {
290
+ var r;
291
+ o(this, "_invoke", {
292
+ value: function (t, n) {
161
293
  function callInvokeWithMethodAndArg() {
162
- return new PromiseImpl(function (resolve, reject) {
163
- invoke(method, arg, resolve, reject);
294
+ return new e(function (e, r) {
295
+ invoke(t, n, e, r);
164
296
  });
165
297
  }
166
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
298
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
167
299
  }
168
300
  });
169
301
  }
170
- function makeInvokeMethod(innerFn, self, context) {
171
- var state = "suspendedStart";
172
- return function (method, arg) {
173
- if ("executing" === state) throw new Error("Generator is already running");
174
- if ("completed" === state) {
175
- if ("throw" === method) throw arg;
176
- return doneResult();
177
- }
178
- for (context.method = method, context.arg = arg;;) {
179
- var delegate = context.delegate;
180
- if (delegate) {
181
- var delegateResult = maybeInvokeDelegate(delegate, context);
182
- if (delegateResult) {
183
- if (delegateResult === ContinueSentinel) continue;
184
- return delegateResult;
302
+ function makeInvokeMethod(e, r, n) {
303
+ var o = h;
304
+ return function (i, a) {
305
+ if (o === f) throw Error("Generator is already running");
306
+ if (o === s) {
307
+ if ("throw" === i) throw a;
308
+ return {
309
+ value: t,
310
+ done: !0
311
+ };
312
+ }
313
+ for (n.method = i, n.arg = a;;) {
314
+ var c = n.delegate;
315
+ if (c) {
316
+ var u = maybeInvokeDelegate(c, n);
317
+ if (u) {
318
+ if (u === y) continue;
319
+ return u;
185
320
  }
186
321
  }
187
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
188
- if ("suspendedStart" === state) throw state = "completed", context.arg;
189
- context.dispatchException(context.arg);
190
- } else "return" === context.method && context.abrupt("return", context.arg);
191
- state = "executing";
192
- var record = tryCatch(innerFn, self, context);
193
- if ("normal" === record.type) {
194
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
322
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
323
+ if (o === h) throw o = s, n.arg;
324
+ n.dispatchException(n.arg);
325
+ } else "return" === n.method && n.abrupt("return", n.arg);
326
+ o = f;
327
+ var p = tryCatch(e, r, n);
328
+ if ("normal" === p.type) {
329
+ if (o = n.done ? s : l, p.arg === y) continue;
195
330
  return {
196
- value: record.arg,
197
- done: context.done
331
+ value: p.arg,
332
+ done: n.done
198
333
  };
199
334
  }
200
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
335
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
201
336
  }
202
337
  };
203
338
  }
204
- function maybeInvokeDelegate(delegate, context) {
205
- var methodName = context.method,
206
- method = delegate.iterator[methodName];
207
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
208
- var record = tryCatch(method, delegate.iterator, context.arg);
209
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
210
- var info = record.arg;
211
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
212
- }
213
- function pushTryEntry(locs) {
214
- var entry = {
215
- tryLoc: locs[0]
339
+ function maybeInvokeDelegate(e, r) {
340
+ var n = r.method,
341
+ o = e.iterator[n];
342
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
343
+ var i = tryCatch(o, e.iterator, r.arg);
344
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
345
+ var a = i.arg;
346
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
347
+ }
348
+ function pushTryEntry(t) {
349
+ var e = {
350
+ tryLoc: t[0]
216
351
  };
217
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
352
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
218
353
  }
219
- function resetTryEntry(entry) {
220
- var record = entry.completion || {};
221
- record.type = "normal", delete record.arg, entry.completion = record;
354
+ function resetTryEntry(t) {
355
+ var e = t.completion || {};
356
+ e.type = "normal", delete e.arg, t.completion = e;
222
357
  }
223
- function Context(tryLocsList) {
358
+ function Context(t) {
224
359
  this.tryEntries = [{
225
360
  tryLoc: "root"
226
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
227
- }
228
- function values(iterable) {
229
- if (iterable) {
230
- var iteratorMethod = iterable[iteratorSymbol];
231
- if (iteratorMethod) return iteratorMethod.call(iterable);
232
- if ("function" == typeof iterable.next) return iterable;
233
- if (!isNaN(iterable.length)) {
234
- var i = -1,
235
- next = function next() {
236
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
237
- return next.value = undefined, next.done = !0, next;
361
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
362
+ }
363
+ function values(e) {
364
+ if (e || "" === e) {
365
+ var r = e[a];
366
+ if (r) return r.call(e);
367
+ if ("function" == typeof e.next) return e;
368
+ if (!isNaN(e.length)) {
369
+ var o = -1,
370
+ i = function next() {
371
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
372
+ return next.value = t, next.done = !0, next;
238
373
  };
239
- return next.next = next;
374
+ return i.next = i;
240
375
  }
241
376
  }
242
- return {
243
- next: doneResult
244
- };
245
- }
246
- function doneResult() {
247
- return {
248
- value: undefined,
249
- done: !0
250
- };
377
+ throw new TypeError(typeof e + " is not iterable");
251
378
  }
252
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
379
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
253
380
  value: GeneratorFunctionPrototype,
254
381
  configurable: !0
255
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
382
+ }), o(GeneratorFunctionPrototype, "constructor", {
256
383
  value: GeneratorFunction,
257
384
  configurable: !0
258
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
259
- var ctor = "function" == typeof genFun && genFun.constructor;
260
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
261
- }, exports.mark = function (genFun) {
262
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
263
- }, exports.awrap = function (arg) {
385
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
386
+ var e = "function" == typeof t && t.constructor;
387
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
388
+ }, e.mark = function (t) {
389
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
390
+ }, e.awrap = function (t) {
264
391
  return {
265
- __await: arg
392
+ __await: t
266
393
  };
267
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
394
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
268
395
  return this;
269
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
270
- void 0 === PromiseImpl && (PromiseImpl = Promise);
271
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
272
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
273
- return result.done ? result.value : iter.next();
396
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
397
+ void 0 === i && (i = Promise);
398
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
399
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
400
+ return t.done ? t.value : a.next();
274
401
  });
275
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
402
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
276
403
  return this;
277
- }), define(Gp, "toString", function () {
404
+ }), define(g, "toString", function () {
278
405
  return "[object Generator]";
279
- }), exports.keys = function (val) {
280
- var object = Object(val),
281
- keys = [];
282
- for (var key in object) keys.push(key);
283
- return keys.reverse(), function next() {
284
- for (; keys.length;) {
285
- var key = keys.pop();
286
- if (key in object) return next.value = key, next.done = !1, next;
406
+ }), e.keys = function (t) {
407
+ var e = Object(t),
408
+ r = [];
409
+ for (var n in e) r.push(n);
410
+ return r.reverse(), function next() {
411
+ for (; r.length;) {
412
+ var t = r.pop();
413
+ if (t in e) return next.value = t, next.done = !1, next;
287
414
  }
288
415
  return next.done = !0, next;
289
416
  };
290
- }, exports.values = values, Context.prototype = {
417
+ }, e.values = values, Context.prototype = {
291
418
  constructor: Context,
292
- reset: function (skipTempReset) {
293
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
419
+ reset: function (e) {
420
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
294
421
  },
295
422
  stop: function () {
296
423
  this.done = !0;
297
- var rootRecord = this.tryEntries[0].completion;
298
- if ("throw" === rootRecord.type) throw rootRecord.arg;
424
+ var t = this.tryEntries[0].completion;
425
+ if ("throw" === t.type) throw t.arg;
299
426
  return this.rval;
300
427
  },
301
- dispatchException: function (exception) {
302
- if (this.done) throw exception;
303
- var context = this;
304
- function handle(loc, caught) {
305
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
306
- }
307
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
308
- var entry = this.tryEntries[i],
309
- record = entry.completion;
310
- if ("root" === entry.tryLoc) return handle("end");
311
- if (entry.tryLoc <= this.prev) {
312
- var hasCatch = hasOwn.call(entry, "catchLoc"),
313
- hasFinally = hasOwn.call(entry, "finallyLoc");
314
- if (hasCatch && hasFinally) {
315
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
316
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
317
- } else if (hasCatch) {
318
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
428
+ dispatchException: function (e) {
429
+ if (this.done) throw e;
430
+ var r = this;
431
+ function handle(n, o) {
432
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
433
+ }
434
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
435
+ var i = this.tryEntries[o],
436
+ a = i.completion;
437
+ if ("root" === i.tryLoc) return handle("end");
438
+ if (i.tryLoc <= this.prev) {
439
+ var c = n.call(i, "catchLoc"),
440
+ u = n.call(i, "finallyLoc");
441
+ if (c && u) {
442
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
443
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
444
+ } else if (c) {
445
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
319
446
  } else {
320
- if (!hasFinally) throw new Error("try statement without catch or finally");
321
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
447
+ if (!u) throw Error("try statement without catch or finally");
448
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
322
449
  }
323
450
  }
324
451
  }
325
452
  },
326
- abrupt: function (type, arg) {
327
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
328
- var entry = this.tryEntries[i];
329
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
330
- var finallyEntry = entry;
453
+ abrupt: function (t, e) {
454
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
455
+ var o = this.tryEntries[r];
456
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
457
+ var i = o;
331
458
  break;
332
459
  }
333
460
  }
334
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
335
- var record = finallyEntry ? finallyEntry.completion : {};
336
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
461
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
462
+ var a = i ? i.completion : {};
463
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
337
464
  },
338
- complete: function (record, afterLoc) {
339
- if ("throw" === record.type) throw record.arg;
340
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
465
+ complete: function (t, e) {
466
+ if ("throw" === t.type) throw t.arg;
467
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
341
468
  },
342
- finish: function (finallyLoc) {
343
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
344
- var entry = this.tryEntries[i];
345
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
469
+ finish: function (t) {
470
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
471
+ var r = this.tryEntries[e];
472
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
346
473
  }
347
474
  },
348
- catch: function (tryLoc) {
349
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
350
- var entry = this.tryEntries[i];
351
- if (entry.tryLoc === tryLoc) {
352
- var record = entry.completion;
353
- if ("throw" === record.type) {
354
- var thrown = record.arg;
355
- resetTryEntry(entry);
475
+ catch: function (t) {
476
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
477
+ var r = this.tryEntries[e];
478
+ if (r.tryLoc === t) {
479
+ var n = r.completion;
480
+ if ("throw" === n.type) {
481
+ var o = n.arg;
482
+ resetTryEntry(r);
356
483
  }
357
- return thrown;
484
+ return o;
358
485
  }
359
486
  }
360
- throw new Error("illegal catch attempt");
487
+ throw Error("illegal catch attempt");
361
488
  },
362
- delegateYield: function (iterable, resultName, nextLoc) {
489
+ delegateYield: function (e, r, n) {
363
490
  return this.delegate = {
364
- iterator: values(iterable),
365
- resultName: resultName,
366
- nextLoc: nextLoc
367
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
491
+ iterator: values(e),
492
+ resultName: r,
493
+ nextLoc: n
494
+ }, "next" === this.method && (this.arg = t), y;
368
495
  }
369
- }, exports;
370
- }
371
- function _typeof$2(obj) {
372
- "@babel/helpers - typeof";
373
-
374
- return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
375
- return typeof obj;
376
- } : function (obj) {
377
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
378
- }, _typeof$2(obj);
379
- }
380
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
381
- try {
382
- var info = gen[key](arg);
383
- var value = info.value;
384
- } catch (error) {
385
- reject(error);
386
- return;
387
- }
388
- if (info.done) {
389
- resolve(value);
390
- } else {
391
- Promise.resolve(value).then(_next, _throw);
392
- }
393
- }
394
- function _asyncToGenerator(fn) {
395
- return function () {
396
- var self = this,
397
- args = arguments;
398
- return new Promise(function (resolve, reject) {
399
- var gen = fn.apply(self, args);
400
- function _next(value) {
401
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
402
- }
403
- function _throw(err) {
404
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
405
- }
406
- _next(undefined);
407
- });
408
- };
409
- }
410
- function _classCallCheck$1(instance, Constructor) {
411
- if (!(instance instanceof Constructor)) {
412
- throw new TypeError("Cannot call a class as a function");
413
- }
414
- }
415
- function _defineProperties$1(target, props) {
416
- for (var i = 0; i < props.length; i++) {
417
- var descriptor = props[i];
418
- descriptor.enumerable = descriptor.enumerable || false;
419
- descriptor.configurable = true;
420
- if ("value" in descriptor) descriptor.writable = true;
421
- Object.defineProperty(target, _toPropertyKey$1(descriptor.key), descriptor);
422
- }
423
- }
424
- function _createClass$1(Constructor, protoProps, staticProps) {
425
- if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
426
- if (staticProps) _defineProperties$1(Constructor, staticProps);
427
- Object.defineProperty(Constructor, "prototype", {
428
- writable: false
429
- });
430
- return Constructor;
431
- }
432
- function _defineProperty$1(obj, key, value) {
433
- key = _toPropertyKey$1(key);
434
- if (key in obj) {
435
- Object.defineProperty(obj, key, {
436
- value: value,
437
- enumerable: true,
438
- configurable: true,
439
- writable: true
440
- });
441
- } else {
442
- obj[key] = value;
443
- }
444
- return obj;
496
+ }, e;
445
497
  }
446
- function _setPrototypeOf(o, p) {
447
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
448
- o.__proto__ = p;
449
- return o;
450
- };
451
- return _setPrototypeOf(o, p);
498
+ function _slicedToArray$1(r, e) {
499
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$1(r, e) || _nonIterableRest();
452
500
  }
453
- function _isNativeReflectConstruct() {
454
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
455
- if (Reflect.construct.sham) return false;
456
- if (typeof Proxy === "function") return true;
457
- try {
458
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
459
- return true;
460
- } catch (e) {
461
- return false;
462
- }
501
+ function _toConsumableArray(r) {
502
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread();
463
503
  }
464
- function _construct(Parent, args, Class) {
465
- if (_isNativeReflectConstruct()) {
466
- _construct = Reflect.construct.bind();
467
- } else {
468
- _construct = function _construct(Parent, args, Class) {
469
- var a = [null];
470
- a.push.apply(a, args);
471
- var Constructor = Function.bind.apply(Parent, a);
472
- var instance = new Constructor();
473
- if (Class) _setPrototypeOf(instance, Class.prototype);
474
- return instance;
475
- };
504
+ function _toPrimitive(t, r) {
505
+ if ("object" != typeof t || !t) return t;
506
+ var e = t[Symbol.toPrimitive];
507
+ if (void 0 !== e) {
508
+ var i = e.call(t, r || "default");
509
+ if ("object" != typeof i) return i;
510
+ throw new TypeError("@@toPrimitive must return a primitive value.");
476
511
  }
477
- return _construct.apply(null, arguments);
478
- }
479
- function _slicedToArray$1(arr, i) {
480
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
481
- }
482
- function _toConsumableArray(arr) {
483
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
484
- }
485
- function _arrayWithoutHoles(arr) {
486
- if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
487
- }
488
- function _arrayWithHoles(arr) {
489
- if (Array.isArray(arr)) return arr;
490
- }
491
- function _iterableToArray(iter) {
492
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
493
- }
494
- function _unsupportedIterableToArray$1(o, minLen) {
495
- if (!o) return;
496
- if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
497
- var n = Object.prototype.toString.call(o).slice(8, -1);
498
- if (n === "Object" && o.constructor) n = o.constructor.name;
499
- if (n === "Map" || n === "Set") return Array.from(o);
500
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
512
+ return ("string" === r ? String : Number)(t);
501
513
  }
502
- function _arrayLikeToArray$1(arr, len) {
503
- if (len == null || len > arr.length) len = arr.length;
504
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
505
- return arr2;
514
+ function _toPropertyKey$1(t) {
515
+ var i = _toPrimitive(t, "string");
516
+ return "symbol" == typeof i ? i : i + "";
506
517
  }
507
- function _nonIterableSpread() {
508
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
509
- }
510
- function _nonIterableRest() {
511
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
512
- }
513
- function _createForOfIteratorHelper(o, allowArrayLike) {
514
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
515
- if (!it) {
516
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") {
517
- if (it) o = it;
518
- var i = 0;
519
- var F = function () {};
520
- return {
521
- s: F,
522
- n: function () {
523
- if (i >= o.length) return {
524
- done: true
525
- };
526
- return {
527
- done: false,
528
- value: o[i++]
529
- };
530
- },
531
- e: function (e) {
532
- throw e;
533
- },
534
- f: F
535
- };
536
- }
537
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
538
- }
539
- var normalCompletion = true,
540
- didErr = false,
541
- err;
542
- return {
543
- s: function () {
544
- it = it.call(o);
545
- },
546
- n: function () {
547
- var step = it.next();
548
- normalCompletion = step.done;
549
- return step;
550
- },
551
- e: function (e) {
552
- didErr = true;
553
- err = e;
554
- },
555
- f: function () {
556
- try {
557
- if (!normalCompletion && it.return != null) it.return();
558
- } finally {
559
- if (didErr) throw err;
560
- }
561
- }
562
- };
518
+ function _typeof$2(o) {
519
+ "@babel/helpers - typeof";
520
+
521
+ return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
522
+ return typeof o;
523
+ } : function (o) {
524
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
525
+ }, _typeof$2(o);
563
526
  }
564
- function _toPrimitive(input, hint) {
565
- if (typeof input !== "object" || input === null) return input;
566
- var prim = input[Symbol.toPrimitive];
567
- if (prim !== undefined) {
568
- var res = prim.call(input, hint || "default");
569
- if (typeof res !== "object") return res;
570
- throw new TypeError("@@toPrimitive must return a primitive value.");
527
+ function _unsupportedIterableToArray$1(r, a) {
528
+ if (r) {
529
+ if ("string" == typeof r) return _arrayLikeToArray$1(r, a);
530
+ var t = {}.toString.call(r).slice(8, -1);
531
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0;
571
532
  }
572
- return (hint === "string" ? String : Number)(input);
573
- }
574
- function _toPropertyKey$1(arg) {
575
- var key = _toPrimitive(arg, "string");
576
- return typeof key === "symbol" ? key : String(key);
577
533
  }
578
534
 
579
535
  function _typeof$1(obj) {
@@ -720,10 +676,9 @@
720
676
  pr;
721
677
  Object.defineProperty(_this, prop, {
722
678
  get: function get() {
723
- return (/* prop in _evCfg && */_evCfg[prop] !== undefined ? _evCfg[prop] : prop in _ev ? _ev[prop] :
724
- // Defaults
725
- prop === 'eventPhase' ? 0 : prop === 'defaultPrevented' ? false : null
726
- );
679
+ return /* prop in _evCfg && */_evCfg[prop] !== undefined ? _evCfg[prop] : prop in _ev ? _ev[prop] :
680
+ // Defaults
681
+ prop === 'eventPhase' ? 0 : prop === 'defaultPrevented' ? false : null;
727
682
  }
728
683
  });
729
684
  });
@@ -1218,7 +1173,6 @@
1218
1173
  }
1219
1174
  });
1220
1175
  }
1221
-
1222
1176
  var _eventCopy = eventCopy,
1223
1177
  type = _eventCopy.type;
1224
1178
 
@@ -1972,12 +1926,11 @@
1972
1926
  */
1973
1927
  function defineOuterInterface(obj, props) {
1974
1928
  props.forEach(function (prop) {
1975
- var _o;
1976
- var o = (_o = {}, _defineAccessor("get", _o, prop, function () {
1929
+ var o = _defineAccessor("set", _defineAccessor("get", {}, prop, function () {
1977
1930
  throw new TypeError('Illegal invocation');
1978
- }), _defineAccessor("set", _o, prop, function (val) {
1931
+ }), prop, function (val) {
1979
1932
  throw new TypeError('Illegal invocation');
1980
- }), _o);
1933
+ });
1981
1934
  var desc = /** @type {PropertyDescriptor} */
1982
1935
  Object.getOwnPropertyDescriptor(o, prop);
1983
1936
  Object.defineProperty(obj, prop, desc);
@@ -2012,12 +1965,11 @@
2012
1965
  function defineListenerProperties(obj, listeners) {
2013
1966
  listeners = typeof listeners === 'string' ? [listeners] : listeners;
2014
1967
  listeners.forEach(function (listener) {
2015
- var _o3;
2016
- var o = (_o3 = {}, _defineAccessor("get", _o3, listener, function () {
1968
+ var o = _defineAccessor("set", _defineAccessor("get", {}, listener, function () {
2017
1969
  return obj['__' + listener];
2018
- }), _defineAccessor("set", _o3, listener, function (val) {
1970
+ }), listener, function (val) {
2019
1971
  obj['__' + listener] = val;
2020
- }), _o3);
1972
+ });
2021
1973
  var desc = /** @type {PropertyDescriptor} */
2022
1974
  Object.getOwnPropertyDescriptor(o, listener);
2023
1975
  // desc.enumerable = true; // Default
@@ -2400,7 +2352,7 @@
2400
2352
  function DOMException(message, name) {
2401
2353
  // const err = Error.prototype.constructor.call(this, message); // Any use to this? Won't set this.message
2402
2354
  this[Symbol.toStringTag] = 'DOMException';
2403
- this._code = name in codes ? codes[/** @type {Code} */name] : legacyCodes[/** @type {LegacyCode} */name] || 0;
2355
+ this._code = name in codes ? codes[( /** @type {Code} */name)] : legacyCodes[( /** @type {LegacyCode} */name)] || 0;
2404
2356
  this._name = name || 'Error';
2405
2357
  // We avoid `String()` in this next line as it converts Symbols
2406
2358
  this._message = message === undefined ? '' : '' + message; // eslint-disable-line no-implicit-coercion
@@ -2537,10 +2489,12 @@
2537
2489
  */
2538
2490
  function logError(name, message, error) {
2539
2491
  if (CFG.DEBUG) {
2540
- var msg = error && _typeof$2(error) === 'object' && error.message ? error.message : /** @type {string} */error;
2492
+ var msg = error && _typeof$2(error) === 'object' && error.message ? error.message : ( /** @type {string} */error);
2541
2493
  var method = typeof console.error === 'function' ? 'error' : 'log';
2542
2494
  console[method](name + ': ' + message + '. ' + (msg || ''));
2543
- console.trace && console.trace();
2495
+ if (console.trace) {
2496
+ console.trace();
2497
+ }
2544
2498
  }
2545
2499
  }
2546
2500
 
@@ -2648,7 +2602,7 @@
2648
2602
  }
2649
2603
  } catch (e) {}
2650
2604
  var createDOMException = useNativeDOMException
2651
- // eslint-disable-next-line operator-linebreak -- Need JSDoc
2605
+ // eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
2652
2606
  ?
2653
2607
  /**
2654
2608
  * @param {string} name
@@ -2660,7 +2614,7 @@
2660
2614
  logError(name, message, error);
2661
2615
  return createNativeDOMException(name, message);
2662
2616
  }
2663
- // eslint-disable-next-line operator-linebreak -- Need JSDoc
2617
+ // eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
2664
2618
  :
2665
2619
  /**
2666
2620
  * @param {string} name
@@ -2720,7 +2674,6 @@
2720
2674
  this.__setOptions({
2721
2675
  legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
2722
2676
  });
2723
-
2724
2677
  doneFlagGetters.forEach(function (prop) {
2725
2678
  Object.defineProperty(_this, '__' + prop, {
2726
2679
  enumerable: false,
@@ -3249,17 +3202,15 @@
3249
3202
  var types = {
3250
3203
  invalid: {
3251
3204
  /**
3252
- * @param {AnyValue} _key
3253
3205
  * @returns {string}
3254
3206
  */
3255
- encode: function encode(_key) {
3207
+ encode: function encode() {
3256
3208
  return keyTypeToEncodedChar.invalid + '-';
3257
3209
  },
3258
3210
  /**
3259
- * @param {string} _key
3260
3211
  * @returns {undefined}
3261
3212
  */
3262
- decode: function decode(_key) {
3213
+ decode: function decode() {
3263
3214
  return undefined;
3264
3215
  }
3265
3216
  },
@@ -3597,11 +3548,17 @@
3597
3548
  * @returns {KeyType|"invalid"}
3598
3549
  */
3599
3550
  function getKeyType(key) {
3600
- if (Array.isArray(key)) return 'array';
3601
- if (isDate(key)) return 'date';
3602
- if (isBinary(key)) return 'binary';
3551
+ if (Array.isArray(key)) {
3552
+ return 'array';
3553
+ }
3554
+ if (isDate(key)) {
3555
+ return 'date';
3556
+ }
3557
+ if (isBinary(key)) {
3558
+ return 'binary';
3559
+ }
3603
3560
  var keyType = _typeof$2(key);
3604
- return ['string', 'number'].includes(keyType) ? /** @type {"string"|"number"} */keyType : 'invalid';
3561
+ return ['string', 'number'].includes(keyType) ? ( /** @type {"string"|"number"} */keyType) : 'invalid';
3605
3562
  }
3606
3563
 
3607
3564
  /**
@@ -3698,13 +3655,11 @@
3698
3655
  value: 0
3699
3656
  };
3700
3657
  }
3701
- return (/** @type {{type: KeyType; value: Value}} */ret
3702
- );
3658
+ return /** @type {{type: KeyType; value: Value}} */ret;
3703
3659
  }
3704
3660
  case 'string':
3705
3661
  {
3706
- return (/** @type {{type: KeyType; value: Value}} */ret
3707
- );
3662
+ return /** @type {{type: KeyType; value: Value}} */ret;
3708
3663
  }
3709
3664
  case 'binary':
3710
3665
  {
@@ -3727,48 +3682,49 @@
3727
3682
  /** @type {(KeyValueObject|Value)[]} */
3728
3683
  var keys = [];
3729
3684
  var _loop = function _loop() {
3730
- // We cannot iterate here with array extras as we must ensure sparse arrays are invalidated
3731
- if (!multiEntry && !Object.hasOwn(arr, i)) {
3732
- return {
3733
- v: {
3734
- type: type,
3735
- invalid: true,
3736
- message: 'Does not have own index property'
3737
- }
3738
- };
3739
- }
3740
- try {
3741
- var entry = arr[i];
3742
- var key = convertValueToKeyValueDecoded(entry, seen, false, fullKeys); // Though steps do not list rethrowing, the next is returnifabrupt when not multiEntry
3743
- if (key.invalid) {
3744
- if (multiEntry) {
3745
- return "continue";
3746
- }
3685
+ // We cannot iterate here with array extras as we must ensure sparse arrays are invalidated
3686
+ if (!multiEntry && !Object.hasOwn(arr, i)) {
3747
3687
  return {
3748
3688
  v: {
3749
3689
  type: type,
3750
3690
  invalid: true,
3751
- message: 'Bad array entry value-to-key conversion'
3691
+ message: 'Does not have own index property'
3752
3692
  }
3753
3693
  };
3754
3694
  }
3755
- if (!multiEntry || !fullKeys && keys.every(function (k) {
3756
- return cmp(k, key.value) !== 0;
3757
- }) || fullKeys && keys.every(function (k) {
3758
- return cmp(k, key) !== 0;
3759
- })) {
3760
- keys.push(fullKeys ? key : key.value);
3761
- }
3762
- } catch (err) {
3763
- if (!multiEntry) {
3764
- throw err;
3695
+ try {
3696
+ var entry = arr[i];
3697
+ var key = convertValueToKeyValueDecoded(entry, seen, false, fullKeys); // Though steps do not list rethrowing, the next is returnifabrupt when not multiEntry
3698
+ if (key.invalid) {
3699
+ if (multiEntry) {
3700
+ return 0; // continue
3701
+ }
3702
+ return {
3703
+ v: {
3704
+ type: type,
3705
+ invalid: true,
3706
+ message: 'Bad array entry value-to-key conversion'
3707
+ }
3708
+ };
3709
+ }
3710
+ if (!multiEntry || !fullKeys && keys.every(function (k) {
3711
+ return cmp(k, key.value) !== 0;
3712
+ }) || fullKeys && keys.every(function (k) {
3713
+ return cmp(k, key) !== 0;
3714
+ })) {
3715
+ keys.push(fullKeys ? key : key.value);
3716
+ }
3717
+ } catch (err) {
3718
+ if (!multiEntry) {
3719
+ throw err;
3720
+ }
3765
3721
  }
3766
- }
3767
- };
3722
+ },
3723
+ _ret;
3768
3724
  for (var i = 0; i < len; i++) {
3769
- var _ret = _loop();
3770
- if (_ret === "continue") continue;
3771
- if (_typeof$2(_ret) === "object") return _ret.v;
3725
+ _ret = _loop();
3726
+ if (_ret === 0) continue;
3727
+ if (_ret) return _ret.v;
3772
3728
  }
3773
3729
  return {
3774
3730
  type: type,
@@ -3930,7 +3886,7 @@
3930
3886
  };
3931
3887
  }
3932
3888
  var identifiers = keyPath.split('.');
3933
- return identifiers.some(function (idntfr, i) {
3889
+ return identifiers.some(function (idntfr) {
3934
3890
  if (idntfr === 'length' && (typeof value === 'string' || Array.isArray(value))) {
3935
3891
  value = value.length;
3936
3892
  } else if (isBlob(value)) {
@@ -3981,7 +3937,7 @@
3981
3937
  }
3982
3938
  value = value[identifier];
3983
3939
  });
3984
- value[/** @type {string} */last] = key; // key is already a `keyValue` in our processing so no need to convert
3940
+ value[( /** @type {string} */last)] = key; // key is already a `keyValue` in our processing so no need to convert
3985
3941
  }
3986
3942
 
3987
3943
  /**
@@ -4153,6 +4109,7 @@
4153
4109
  return null;
4154
4110
  }
4155
4111
  // array, date, number, string, binary (should already have detected "invalid")
4112
+ // @ts-expect-error Argument may be ignored
4156
4113
  return types[getKeyType(key)].encode(key, inArray);
4157
4114
  }
4158
4115
 
@@ -4214,7 +4171,7 @@
4214
4171
  }
4215
4172
  }, function (tx, error) {
4216
4173
  sqlFailCb(createDOMException('DataError', 'Could not get the auto increment value for key', error));
4217
- return true;
4174
+ return false;
4218
4175
  });
4219
4176
  }
4220
4177
 
@@ -4230,12 +4187,14 @@
4230
4187
  function assignCurrentNumber(tx, store, num, successCb, failCb) {
4231
4188
  var sql = 'UPDATE __sys__ SET "currNum" = ? WHERE "name" = ?';
4232
4189
  var sqlValues = [num, escapeSQLiteStatement(store.__currentName)];
4233
- CFG.DEBUG && console.log(sql, sqlValues);
4234
- tx.executeSql(sql, sqlValues, function (tx, data) {
4190
+ if (CFG.DEBUG) {
4191
+ console.log(sql, sqlValues);
4192
+ }
4193
+ tx.executeSql(sql, sqlValues, function () {
4235
4194
  successCb(num);
4236
4195
  }, function (tx, err) {
4237
4196
  failCb(createDOMException('UnknownError', 'Could not set the auto increment value for key', err));
4238
- return true;
4197
+ return false;
4239
4198
  });
4240
4199
  }
4241
4200
 
@@ -4402,7 +4361,7 @@
4402
4361
  convertValueToKeyRethrowingAndIfInvalid(upper);
4403
4362
  }
4404
4363
  if (lower !== undefined && upper !== undefined && lower !== upper) {
4405
- if ( /** @type {string} */_encode(lower) > /** @type {string} */_encode(upper)) {
4364
+ if ( /** @type {string} */_encode(lower) > ( /** @type {string} */_encode(upper))) {
4406
4365
  throw createDOMException('DataError', '`lower` must not be greater than `upper` argument in `bound()` call.');
4407
4366
  }
4408
4367
  }
@@ -4449,7 +4408,7 @@
4449
4408
  * @param {import('./Key.js').Value} value
4450
4409
  * @returns {globalThis.IDBKeyRange}
4451
4410
  */
4452
- IDBKeyRange.lowerBound = function (value /*, open */) {
4411
+ IDBKeyRange.lowerBound = function (value /* , open */) {
4453
4412
  if (!arguments.length) {
4454
4413
  throw new TypeError('IDBKeyRange.lowerBound requires a value argument');
4455
4414
  }
@@ -4461,7 +4420,7 @@
4461
4420
  * @param {import('./Key.js').Value} value
4462
4421
  * @returns {globalThis.IDBKeyRange}
4463
4422
  */
4464
- IDBKeyRange.upperBound = function (value /*, open */) {
4423
+ IDBKeyRange.upperBound = function (value /* , open */) {
4465
4424
  if (!arguments.length) {
4466
4425
  throw new TypeError('IDBKeyRange.upperBound requires a value argument');
4467
4426
  }
@@ -4527,7 +4486,9 @@
4527
4486
  */
4528
4487
  function setSQLForKeyRange(range, quotedKeyColumnName, sql, sqlValues, addAnd, checkCached) {
4529
4488
  if (range && (range.lower !== undefined || range.upper !== undefined)) {
4530
- if (addAnd) sql.push('AND');
4489
+ if (addAnd) {
4490
+ sql.push('AND');
4491
+ }
4531
4492
  var encodedLowerKey, encodedUpperKey;
4532
4493
  var hasLower = range.lower !== undefined;
4533
4494
  var hasUpper = range.upper !== undefined;
@@ -4545,7 +4506,9 @@
4545
4506
  }
4546
4507
  sql.push(quotedKeyColumnName, range.lowerOpen ? '>' : '>=', '?');
4547
4508
  }
4548
- hasLower && hasUpper && sql.push('AND');
4509
+ if (hasLower && hasUpper) {
4510
+ sql.push('AND');
4511
+ }
4549
4512
  if (hasUpper) {
4550
4513
  sql.push(quotedKeyColumnName, range.upperOpen ? '<' : '<=', '?');
4551
4514
  sqlValues.push(escapeSQLiteStatement( /** @type {string} */encodedUpperKey));
@@ -4573,12 +4536,10 @@
4573
4536
  }
4574
4537
  return undefined; // Represents unbounded
4575
4538
  }
4576
-
4577
4539
  convertValueToKeyRethrowingAndIfInvalid(value);
4578
4540
  return IDBKeyRange.only(value);
4579
4541
  }
4580
4542
 
4581
- var _DOMStringList$protot;
4582
4543
  /**
4583
4544
  * @typedef {number} Integer
4584
4545
  */
@@ -4631,7 +4592,7 @@
4631
4592
  };
4632
4593
 
4633
4594
  // @ts-expect-error It's ok
4634
- DOMStringList.prototype = (_DOMStringList$protot = {
4595
+ DOMStringList.prototype = _defineProperty$1(_defineProperty$1({
4635
4596
  constructor: DOMStringList,
4636
4597
  // Interface.
4637
4598
  /**
@@ -4742,7 +4703,7 @@
4742
4703
  }
4743
4704
  this.sortList();
4744
4705
  }
4745
- }, _defineProperty$1(_DOMStringList$protot, Symbol.toStringTag, 'DOMStringListPrototype'), _defineProperty$1(_DOMStringList$protot, Symbol.iterator, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
4706
+ }, Symbol.toStringTag, 'DOMStringListPrototype'), Symbol.iterator, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
4746
4707
  var i;
4747
4708
  return _regeneratorRuntime().wrap(function _callee$(_context) {
4748
4709
  while (1) switch (_context.prev = _context.next) {
@@ -4763,7 +4724,7 @@
4763
4724
  return _context.stop();
4764
4725
  }
4765
4726
  }, _callee, this);
4766
- })), _DOMStringList$protot);
4727
+ }));
4767
4728
 
4768
4729
  /**
4769
4730
  * @typedef {any} AnyValue
@@ -4802,8 +4763,7 @@
4802
4763
  this._length = 0;
4803
4764
  };
4804
4765
  DOMStringList.prototype = DOMStringListAlias.prototype;
4805
- return (/** @type {DOMStringListFull} */new DOMStringList()
4806
- );
4766
+ return /** @type {DOMStringListFull} */new DOMStringList();
4807
4767
  }
4808
4768
  });
4809
4769
  if (cleanInterface) {
@@ -4950,7 +4910,6 @@
4950
4910
  me.__setOptions({
4951
4911
  legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
4952
4912
  });
4953
-
4954
4913
  readonlyProperties$3.forEach(function (readonlyProp) {
4955
4914
  Object.defineProperty(_this, readonlyProp, {
4956
4915
  configurable: true
@@ -4972,6 +4931,7 @@
4972
4931
 
4973
4932
  // @ts-expect-error It's ok
4974
4933
  IDBTransaction.prototype = EventTargetFactory.createInstance({
4934
+ // eslint-disable-next-line n/no-sync -- API
4975
4935
  defaultSync: true,
4976
4936
  // Ensure EventTarget preserves our properties
4977
4937
  extraProperties: ['complete']
@@ -4993,7 +4953,9 @@
4993
4953
  IDBTransaction.prototype.__executeRequests = function () {
4994
4954
  var me = this;
4995
4955
  if (me.__running) {
4996
- CFG.DEBUG && console.log('Looks like the request set is already running', me.mode);
4956
+ if (CFG.DEBUG) {
4957
+ console.log('Looks like the request set is already running', me.mode);
4958
+ }
4997
4959
  return;
4998
4960
  }
4999
4961
  me.__running = true;
@@ -5022,7 +4984,6 @@
5022
4984
  if (req) {
5023
4985
  q.req = req; // Need to do this in case of cursors
5024
4986
  }
5025
-
5026
4987
  if (!q.req) {
5027
4988
  // TS guard
5028
4989
  return;
@@ -5186,7 +5147,9 @@
5186
5147
  */
5187
5148
  function complete() {
5188
5149
  me.__completed = true;
5189
- CFG.DEBUG && console.log('Transaction completed');
5150
+ if (CFG.DEBUG) {
5151
+ console.log('Transaction completed');
5152
+ }
5190
5153
  var evt = createEvent('complete');
5191
5154
  try {
5192
5155
  me.__internal = true;
@@ -5411,11 +5374,15 @@
5411
5374
  */
5412
5375
  function abort(tx, errOrResult) {
5413
5376
  if (!tx) {
5414
- CFG.DEBUG && console.log('Rollback not possible due to missing transaction', me);
5377
+ if (CFG.DEBUG) {
5378
+ console.log('Rollback not possible due to missing transaction', me);
5379
+ }
5415
5380
  } else if (errOrResult && 'code' in errOrResult && typeof errOrResult.code === 'number') {
5416
- CFG.DEBUG && console.log('Rollback erred; feature is probably not supported as per WebSQL', me);
5417
- } else {
5418
- CFG.DEBUG && console.log('Rollback succeeded', me);
5381
+ if (CFG.DEBUG) {
5382
+ console.log('Rollback erred; feature is probably not supported as per WebSQL', me);
5383
+ }
5384
+ } else if (CFG.DEBUG) {
5385
+ console.log('Rollback succeeded', me);
5419
5386
  }
5420
5387
  me.dispatchEvent(createEvent('__preabort'));
5421
5388
  me.__requests.filter(function (q, i, arr) {
@@ -5507,7 +5474,9 @@
5507
5474
  if (!(me instanceof IDBTransaction)) {
5508
5475
  throw new TypeError('Illegal invocation');
5509
5476
  }
5510
- CFG.DEBUG && console.log('The transaction was aborted', me);
5477
+ if (CFG.DEBUG) {
5478
+ console.log('The transaction was aborted', me);
5479
+ }
5511
5480
  IDBTransaction.__assertNotFinished(me);
5512
5481
  me.__abortTransaction(null);
5513
5482
  };
@@ -5627,14 +5596,13 @@
5627
5596
  function _classCallCheck(e, t) {
5628
5597
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
5629
5598
  }
5630
- function _defineProperties(e, t) {
5631
- for (var r = 0; r < t.length; r++) {
5632
- var n = t[r];
5633
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, _toPropertyKey(n.key), n);
5634
- }
5635
- }
5636
5599
  function _createClass(e, t, r) {
5637
- return t && _defineProperties(e.prototype, t), r && _defineProperties(e, r), Object.defineProperty(e, "prototype", {
5600
+ return t && function _defineProperties(e, t) {
5601
+ for (var r = 0; r < t.length; r++) {
5602
+ var n = t[r];
5603
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, _toPropertyKey(n.key), n);
5604
+ }
5605
+ }(e.prototype, t), Object.defineProperty(e, "prototype", {
5638
5606
  writable: !1
5639
5607
  }), e;
5640
5608
  }
@@ -5653,24 +5621,24 @@
5653
5621
  var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
5654
5622
  if (null != r) {
5655
5623
  var n,
5656
- o,
5657
5624
  a,
5625
+ o,
5658
5626
  i,
5659
5627
  c = [],
5660
5628
  s = !0,
5661
5629
  u = !1;
5662
5630
  try {
5663
- if (a = (r = r.call(e)).next, 0 === t) {
5631
+ if (o = (r = r.call(e)).next, 0 === t) {
5664
5632
  if (Object(r) !== r) return;
5665
5633
  s = !1;
5666
- } else for (; !(s = (n = a.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
5634
+ } else for (; !(s = (n = o.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
5667
5635
  } catch (e) {
5668
- u = !0, o = e;
5636
+ u = !0, a = e;
5669
5637
  } finally {
5670
5638
  try {
5671
5639
  if (!s && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
5672
5640
  } finally {
5673
- if (u) throw o;
5641
+ if (u) throw a;
5674
5642
  }
5675
5643
  }
5676
5644
  return c;
@@ -5696,11 +5664,11 @@
5696
5664
  if ("object" != _typeof$2(e) || null === e) return e;
5697
5665
  var r = e[Symbol.toPrimitive];
5698
5666
  if (void 0 !== r) {
5699
- var n = r.call(e, t || "default");
5667
+ var n = r.call(e, t );
5700
5668
  if ("object" != _typeof$2(n)) return n;
5701
5669
  throw new TypeError("@@toPrimitive must return a primitive value.");
5702
5670
  }
5703
- return ("string" === t ? String : Number)(e);
5671
+ return (String )(e);
5704
5672
  }(e, "string");
5705
5673
  return "symbol" == _typeof$2(t) ? t : String(t);
5706
5674
  }
@@ -5713,12 +5681,12 @@
5713
5681
  }
5714
5682
  }), e.prototype.then = function (t, r) {
5715
5683
  var n = this;
5716
- return new e(function (e, o) {
5684
+ return new e(function (e, a) {
5717
5685
  n.p.then(function (r) {
5718
5686
  e(t ? t(r) : r);
5719
5687
  })["catch"](function (e) {
5720
5688
  return r ? r(e) : Promise.reject(e);
5721
- }).then(e, o);
5689
+ }).then(e, a);
5722
5690
  });
5723
5691
  }, e.prototype["catch"] = function (e) {
5724
5692
  return this.then(function () {}, e);
@@ -5752,17 +5720,17 @@
5752
5720
  var t = Object.hasOwn,
5753
5721
  r = Object.getPrototypeOf;
5754
5722
  function isThenable(e, t) {
5755
- return isObject(e) && "function" == typeof e.then && (!t || "function" == typeof e["catch"]);
5723
+ return isObject(e) && "function" == typeof e.then && (!t );
5756
5724
  }
5757
5725
  function toStringTag(e) {
5758
5726
  return Object.prototype.toString.call(e).slice(8, -1);
5759
5727
  }
5760
5728
  function hasConstructorOf(e, n) {
5761
5729
  if (!e || "object" !== _typeof(e)) return !1;
5762
- var o = r(e);
5763
- if (!o) return null === n;
5764
- var a = t(o, "constructor") && o.constructor;
5765
- return "function" != typeof a ? null === n : n === a || null !== n && Function.prototype.toString.call(a) === Function.prototype.toString.call(n) || "function" == typeof n && "string" == typeof a.__typeson__type__ && a.__typeson__type__ === n.__typeson__type__;
5730
+ var a = r(e);
5731
+ if (!a) return null === n;
5732
+ var o = t(a, "constructor") && a.constructor;
5733
+ return "function" != typeof o ? null === n : n === o || null !== n && Function.prototype.toString.call(o) === Function.prototype.toString.call(n) || "function" == typeof n && "string" == typeof o.__typeson__type__ && o.__typeson__type__ === n.__typeson__type__;
5766
5734
  }
5767
5735
  function isPlainObject(e) {
5768
5736
  return !(!e || "Object" !== toStringTag(e)) && (!r(e) || hasConstructorOf(e, Object));
@@ -5776,10 +5744,10 @@
5776
5744
  return null !== e && "object" === _typeof(e);
5777
5745
  }
5778
5746
  function escapeKeyPathComponent(e) {
5779
- return e.replace(/''/g, "''''").replace(/^$/, "''").replace(/~/g, "~0").replace(/\./g, "~1");
5747
+ return e.replaceAll("''", "''''").replace(/^$/, "''").replaceAll("~", "~0").replaceAll(".", "~1");
5780
5748
  }
5781
5749
  function unescapeKeyPathComponent(e) {
5782
- return e.replace(/~1/g, ".").replace(/~0/g, "~").replace(/^''$/, "").replace(/''''/g, "''");
5750
+ return e.replaceAll("~1", ".").replaceAll("~0", "~").replace(/^''$/, "").replaceAll("''''", "''");
5783
5751
  }
5784
5752
  function getByKeyPath(e, t) {
5785
5753
  if ("" === t) return e;
@@ -5801,11 +5769,11 @@
5801
5769
  return null === e ? "null" : Array.isArray(e) ? "array" : _typeof(e);
5802
5770
  }
5803
5771
  function _await(e, t, r) {
5804
- return r ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
5772
+ return e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e;
5805
5773
  }
5806
5774
  var n = Object.keys,
5807
- o = Object.hasOwn,
5808
- a = Array.isArray,
5775
+ a = Object.hasOwn,
5776
+ o = Array.isArray,
5809
5777
  i = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
5810
5778
  function _async(e) {
5811
5779
  return function () {
@@ -5820,9 +5788,9 @@
5820
5788
  function nestedPathsFirst(e, t) {
5821
5789
  var r, n;
5822
5790
  if ("" === e.keypath) return -1;
5823
- var o = null !== (r = e.keypath.match(/\./g)) && void 0 !== r ? r : 0,
5824
- a = null !== (n = t.keypath.match(/\./g)) && void 0 !== n ? n : 0;
5825
- return o && (o = o.length), a && (a = a.length), o > a ? -1 : o < a ? 1 : e.keypath < t.keypath ? -1 : e.keypath > t.keypath ? 1 : 0;
5791
+ var a = null !== (r = e.keypath.match(/\./g)) && void 0 !== r ? r : 0,
5792
+ o = null !== (n = t.keypath.match(/\./g)) && void 0 !== n ? n : 0;
5793
+ return a && (a = a.length), o && (o = o.length), a > o ? -1 : a < o ? 1 : e.keypath < t.keypath ? -1 : e.keypath > t.keypath ? 1 : 0;
5826
5794
  }
5827
5795
  var c = function () {
5828
5796
  function Typeson(e) {
@@ -5834,8 +5802,8 @@
5834
5802
  n = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), n), {}, {
5835
5803
  stringification: !0
5836
5804
  });
5837
- var o = this.encapsulate(e, null, n);
5838
- return a(o) ? JSON.stringify(o[0], t, r) : o.then(function (e) {
5805
+ var a = this.encapsulate(e, null, n);
5806
+ return o(a) ? JSON.stringify(a[0], t, r) : a.then(function (e) {
5839
5807
  return JSON.stringify(e, t, r);
5840
5808
  });
5841
5809
  }
@@ -5907,8 +5875,8 @@
5907
5875
  p = [],
5908
5876
  d = [],
5909
5877
  v = !("cyclic" in u) || u.cyclic,
5910
- b = u.encapsulateObserver,
5911
- h = function finish(e) {
5878
+ m = u.encapsulateObserver,
5879
+ b = function finish(e) {
5912
5880
  var t = Object.values(f);
5913
5881
  if (u.iterateNone) return t.length ? t[0] : getJSONType(e);
5914
5882
  if (t.length) {
@@ -5921,25 +5889,25 @@
5921
5889
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5922
5890
  }();
5923
5891
  }(new Set(t));
5924
- e && isPlainObject(e) && !o(e, "$types") ? e.$types = f : e = {
5892
+ e && isPlainObject(e) && !a(e, "$types") ? e.$types = f : e = {
5925
5893
  $: e,
5926
5894
  $types: {
5927
5895
  $: f
5928
5896
  }
5929
5897
  };
5930
- } else isObject(e) && o(e, "$types") && (e = {
5898
+ } else isObject(e) && a(e, "$types") && (e = {
5931
5899
  $: e,
5932
5900
  $types: !0
5933
5901
  });
5934
5902
  return !u.returnTypeNames && e;
5935
5903
  },
5936
- g = _async(function (t, r) {
5904
+ h = _async(function (t, r) {
5937
5905
  return _await(Promise.all(r.map(function (e) {
5938
5906
  return e[1].p;
5939
5907
  })), function (n) {
5940
5908
  return _await(Promise.all(n.map(_async(function (n) {
5941
- var o = !1,
5942
- a = [],
5909
+ var a = !1,
5910
+ o = [],
5943
5911
  i = _slicedToArray(r.splice(0, 1), 1),
5944
5912
  c = _slicedToArray(i[0], 7),
5945
5913
  s = c[0],
@@ -5948,7 +5916,7 @@
5948
5916
  f = c[4],
5949
5917
  y = c[5],
5950
5918
  p = c[6],
5951
- d = _(s, n, u, l, a, !0, p),
5919
+ d = O(s, n, u, l, o, !0, p),
5952
5920
  v = hasConstructorOf(d, e);
5953
5921
  return function _invoke(e, t) {
5954
5922
  var r = e();
@@ -5956,18 +5924,18 @@
5956
5924
  }(function () {
5957
5925
  if (s && v) return _await(d.p, function (e) {
5958
5926
  f[y] = e;
5959
- var r = g(t, a);
5960
- return o = !0, r;
5927
+ var r = h(t, o);
5928
+ return a = !0, r;
5961
5929
  });
5962
5930
  }, function (e) {
5963
- return o ? e : (s ? f[y] = d : t = v ? d.p : d, g(t, a));
5931
+ return a ? e : (s ? f[y] = d : t = v ? d.p : d, h(t, o));
5964
5932
  });
5965
5933
  }))), function () {
5966
5934
  return t;
5967
5935
  });
5968
5936
  });
5969
5937
  }),
5970
- m = function _adaptBuiltinStateObjectProperties(e, t, r) {
5938
+ g = function _adaptBuiltinStateObjectProperties(e, t, r) {
5971
5939
  Object.assign(e, t);
5972
5940
  var n = i.map(function (t) {
5973
5941
  var r = e[t];
@@ -5977,14 +5945,14 @@
5977
5945
  e[t] = n[r];
5978
5946
  });
5979
5947
  },
5980
- _ = function _encapsulate(t, r, i, c, l, d, v) {
5981
- var h,
5982
- g = {},
5983
- _ = _typeof(r),
5984
- w = b ? function (n) {
5985
- var o,
5986
- a = null !== (o = null != v ? v : c.type) && void 0 !== o ? o : getJSONType(r);
5987
- b(Object.assign(null != n ? n : g, {
5948
+ O = function _encapsulate(t, r, i, c, l, d, v) {
5949
+ var b,
5950
+ h = {},
5951
+ O = _typeof(r),
5952
+ _ = m ? function (n) {
5953
+ var a,
5954
+ o = null !== (a = null != v ? v : c.type) && void 0 !== a ? a : getJSONType(r);
5955
+ m(Object.assign(null != n ? n : h, {
5988
5956
  keypath: t,
5989
5957
  value: r,
5990
5958
  cyclic: i,
@@ -5993,16 +5961,16 @@
5993
5961
  resolvingTypesonPromise: d,
5994
5962
  awaitingTypesonPromise: hasConstructorOf(r, e)
5995
5963
  }, {
5996
- type: a
5964
+ type: o
5997
5965
  }));
5998
5966
  } : null;
5999
- if (["string", "boolean", "number", "undefined"].includes(_)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (h = c.replaced ? r : O(t, r, c, l, !1, d, w)) !== r && (g = {
6000
- replaced: h
6001
- }) : h = r, w && w(), h;
6002
- if (null === r) return w && w(), r;
5967
+ if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (b = c.replaced ? r : w(t, r, c, l, !1, d, _)) !== r && (h = {
5968
+ replaced: b
5969
+ }) : b = r, _ && _(), b;
5970
+ if (null === r) return _ && _(), r;
6003
5971
  if (i && !c.iterateIn && !c.iterateUnsetNumeric && r && "object" === _typeof(r)) {
6004
5972
  var A = y.indexOf(r);
6005
- if (!(A < 0)) return f[t] = "#", w && w({
5973
+ if (!(A < 0)) return f[t] = "#", _ && _({
6006
5974
  cyclicKeypath: p[A]
6007
5975
  }), "#" + p[A];
6008
5976
  !0 === i && (y.push(r), p.push(t));
@@ -6010,65 +5978,65 @@
6010
5978
  var S,
6011
5979
  j,
6012
5980
  T = isPlainObject(r),
6013
- I = a(r),
6014
- N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : O(t, r, c, l, T || I, null, w);
6015
- if (N !== r ? (h = N, g = {
5981
+ I = o(r),
5982
+ N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : w(t, r, c, l, T || I, null, _);
5983
+ if (N !== r ? (b = N, h = {
6016
5984
  replaced: N
6017
- }) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), h = r) : I && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), g = {
5985
+ }) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), b = r) : I && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), h = {
6018
5986
  clone: S
6019
- }) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ? h = r : (S = {}, c.addLength && (S.length = r.length), g = {
5987
+ }) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ? b = r : (S = {}, c.addLength && (S.length = r.length), h = {
6020
5988
  clone: S
6021
- }), w && w(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : h;
6022
- if (!S) return h;
5989
+ }), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : b;
5990
+ if (!S) return b;
6023
5991
  if (c.iterateIn) {
6024
5992
  var P = function _loop(n) {
6025
- var a = {
6026
- ownKeys: o(r, n)
5993
+ var o = {
5994
+ ownKeys: a(r, n)
6027
5995
  };
6028
- m(c, a, function () {
6029
- var o = t + (t ? "." : "") + escapeKeyPathComponent(n),
6030
- a = _encapsulate(o, r[n], Boolean(i), c, l, d);
6031
- hasConstructorOf(a, e) ? l.push([o, a, Boolean(i), c, S, n, c.type]) : void 0 !== a && (S[n] = a);
5996
+ g(c, o, function () {
5997
+ var a = t + (t ? "." : "") + escapeKeyPathComponent(n),
5998
+ o = _encapsulate(a, r[n], Boolean(i), c, l, d);
5999
+ hasConstructorOf(o, e) ? l.push([a, o, Boolean(i), c, S, n, c.type]) : void 0 !== o && (S[n] = o);
6032
6000
  });
6033
6001
  };
6034
- for (var E in r) P(E);
6035
- w && w({
6002
+ for (var x in r) P(x);
6003
+ _ && _({
6036
6004
  endIterateIn: !0,
6037
6005
  end: !0
6038
6006
  });
6039
6007
  } else n(r).forEach(function (n) {
6040
- var o = t + (t ? "." : "") + escapeKeyPathComponent(n);
6041
- m(c, {
6008
+ var a = t + (t ? "." : "") + escapeKeyPathComponent(n);
6009
+ g(c, {
6042
6010
  ownKeys: !0
6043
6011
  }, function () {
6044
- var t = _encapsulate(o, r[n], Boolean(i), c, l, d);
6045
- hasConstructorOf(t, e) ? l.push([o, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
6012
+ var t = _encapsulate(a, r[n], Boolean(i), c, l, d);
6013
+ hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
6046
6014
  });
6047
- }), w && w({
6015
+ }), _ && _({
6048
6016
  endIterateOwn: !0,
6049
6017
  end: !0
6050
6018
  });
6051
6019
  if (c.iterateUnsetNumeric) {
6052
- for (var C = r.length, x = function _loop2(n) {
6020
+ for (var E = r.length, C = function _loop2(n) {
6053
6021
  if (!(n in r)) {
6054
- var o = "".concat(t).concat(t ? "." : "").concat(n);
6055
- m(c, {
6022
+ var a = "".concat(t).concat(t ? "." : "").concat(n);
6023
+ g(c, {
6056
6024
  ownKeys: !1
6057
6025
  }, function () {
6058
- var t = _encapsulate(o, void 0, Boolean(i), c, l, d);
6059
- hasConstructorOf(t, e) ? l.push([o, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
6026
+ var t = _encapsulate(a, void 0, Boolean(i), c, l, d);
6027
+ hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
6060
6028
  });
6061
6029
  }
6062
- }, k = 0; k < C; k++) x(k);
6063
- w && w({
6030
+ }, B = 0; B < E; B++) C(B);
6031
+ _ && _({
6064
6032
  endIterateUnsetNumeric: !0,
6065
6033
  end: !0
6066
6034
  });
6067
6035
  }
6068
6036
  return S;
6069
6037
  },
6070
- O = function replace(e, t, r, n, o, a, i) {
6071
- for (var c = o ? s.plainObjectReplacers : s.nonplainObjectReplacers, u = c.length; u--;) {
6038
+ w = function replace(e, t, r, n, a, o, i) {
6039
+ for (var c = a ? s.plainObjectReplacers : s.nonplainObjectReplacers, u = c.length; u--;) {
6072
6040
  var y = c[u];
6073
6041
  if (y.test(t, r)) {
6074
6042
  var p = y.type;
@@ -6081,26 +6049,26 @@
6081
6049
  replaced: !0
6082
6050
  }), (l || !y.replaceAsync) && !y.replace) return i && i({
6083
6051
  typeDetected: !0
6084
- }), _(e, t, v && "readonly", r, n, a, p);
6052
+ }), O(e, t, v && "readonly", r, n, o, p);
6085
6053
  i && i({
6086
6054
  replacing: !0
6087
6055
  });
6088
- var b = void 0;
6056
+ var m = void 0;
6089
6057
  if (l || !y.replaceAsync) {
6090
6058
  if (void 0 === y.replace) throw new TypeError("Missing replacer");
6091
- b = y.replace(t, r);
6092
- } else b = y.replaceAsync(t, r);
6093
- return _(e, b, v && "readonly", r, n, a, p);
6059
+ m = y.replace(t, r);
6060
+ } else m = y.replaceAsync(t, r);
6061
+ return O(e, m, v && "readonly", r, n, o, p);
6094
6062
  }
6095
6063
  }
6096
6064
  return t;
6097
6065
  },
6098
- w = _("", t, v, null != r ? r : {}, d);
6066
+ _ = O("", t, v, null != r ? r : {}, d);
6099
6067
  if (d.length) return l && u.throwOnBadSyncType ? function () {
6100
6068
  throw new TypeError("Sync method requested but async result obtained");
6101
- }() : Promise.resolve(g(w, d)).then(h);
6069
+ }() : Promise.resolve(h(_, d)).then(b);
6102
6070
  if (!l && u.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
6103
- return u.stringification && l ? [h(w)] : l ? h(w) : Promise.resolve(h(w));
6071
+ return u.stringification && l ? [b(_)] : l ? b(_) : Promise.resolve(b(_));
6104
6072
  }
6105
6073
  }, {
6106
6074
  key: "encapsulateSync",
@@ -6123,7 +6091,7 @@
6123
6091
  }, {
6124
6092
  key: "revive",
6125
6093
  value: function revive(t, r) {
6126
- var o = this,
6094
+ var a = this,
6127
6095
  i = _objectSpread2(_objectSpread2({
6128
6096
  sync: !0
6129
6097
  }, this.options), r),
@@ -6143,7 +6111,7 @@
6143
6111
  u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y = !1);
6144
6112
  var p = function executeReviver(e, t) {
6145
6113
  var r,
6146
- n = _slicedToArray(null !== (r = o.revivers[e]) && void 0 !== r ? r : [], 1)[0];
6114
+ n = _slicedToArray(null !== (r = a.revivers[e]) && void 0 !== r ? r : [], 1)[0];
6147
6115
  if (!n) throw new Error("Unregistered type: " + e);
6148
6116
  if (c && !("revive" in n)) return t;
6149
6117
  if (!c && n.reviveAsync) return n.reviveAsync(t, f);
@@ -6155,69 +6123,69 @@
6155
6123
  return hasConstructorOf(e, s) ? void 0 : e;
6156
6124
  }
6157
6125
  var v,
6158
- b = function revivePlainObjects() {
6126
+ m = function revivePlainObjects() {
6159
6127
  var r = [];
6160
6128
  if (!u) throw new Error("Found bad `types`");
6161
6129
  if (Object.entries(u).forEach(function (e) {
6162
6130
  var t = _slicedToArray(e, 2),
6163
6131
  n = t[0],
6164
- a = t[1];
6165
- "#" !== a && [].concat(a).forEach(function (e) {
6132
+ o = t[1];
6133
+ "#" !== o && [].concat(o).forEach(function (e) {
6166
6134
  var t;
6167
- _slicedToArray(null !== (t = o.revivers[e]) && void 0 !== t ? t : [null, {}], 2)[1].plain && (r.push({
6135
+ _slicedToArray(null !== (t = a.revivers[e]) && void 0 !== t ? t : [null, {}], 2)[1].plain && (r.push({
6168
6136
  keypath: n,
6169
6137
  type: e
6170
6138
  }), delete u[n]);
6171
6139
  });
6172
6140
  }), r.length) return r.sort(nestedPathsFirst).reduce(function reducer(r, n) {
6173
- var o = n.keypath,
6174
- a = n.type;
6141
+ var a = n.keypath,
6142
+ o = n.type;
6175
6143
  if (isThenable(r)) return r.then(function (e) {
6176
6144
  return reducer(e, {
6177
- keypath: o,
6178
- type: a
6145
+ keypath: a,
6146
+ type: o
6179
6147
  });
6180
6148
  });
6181
- var i = getByKeyPath(t, o);
6182
- if (hasConstructorOf(i = p(a, i), e)) return i.then(function (e) {
6183
- var r = setAtKeyPath(t, o, e);
6149
+ var i = getByKeyPath(t, a);
6150
+ if (hasConstructorOf(i = p(o, i), e)) return i.then(function (e) {
6151
+ var r = setAtKeyPath(t, a, e);
6184
6152
  r === e && (t = r);
6185
6153
  });
6186
- var c = setAtKeyPath(t, o, i);
6154
+ var c = setAtKeyPath(t, a, i);
6187
6155
  c === i && (t = c);
6188
6156
  }, void 0);
6189
6157
  }();
6190
- return hasConstructorOf(b, e) ? v = b.then(function () {
6158
+ return hasConstructorOf(m, e) ? v = m.then(function () {
6191
6159
  return t;
6192
- }) : (v = function _revive(t, r, o, i, c) {
6160
+ }) : (v = function _revive(t, r, a, i, c) {
6193
6161
  if (!y || "$types" !== t) {
6194
6162
  var f = u[t],
6195
- v = a(r);
6163
+ v = o(r);
6196
6164
  if (v || isPlainObject(r)) {
6197
- var b = v ? new Array(r.length) : {};
6165
+ var m = v ? new Array(r.length) : {};
6198
6166
  for (n(r).forEach(function (n) {
6199
- var a = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != o ? o : b, b, n),
6167
+ var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a : m, m, n),
6200
6168
  i = function set(e) {
6201
- return hasConstructorOf(e, s) ? b[n] = void 0 : void 0 !== e && (b[n] = e), e;
6169
+ return hasConstructorOf(e, s) ? m[n] = void 0 : void 0 !== e && (m[n] = e), e;
6202
6170
  };
6203
- hasConstructorOf(a, e) ? d.push(a.then(function (e) {
6171
+ hasConstructorOf(o, e) ? d.push(o.then(function (e) {
6204
6172
  return i(e);
6205
- })) : i(a);
6206
- }), r = b; l.length;) {
6207
- var h = _slicedToArray(l[0], 4),
6208
- g = h[0],
6209
- m = h[1],
6210
- _ = h[2],
6211
- O = h[3],
6212
- w = getByKeyPath(g, m);
6213
- if (void 0 === w) break;
6214
- _[O] = w, l.splice(0, 1);
6173
+ })) : i(o);
6174
+ }), r = m; l.length;) {
6175
+ var b = _slicedToArray(l[0], 4),
6176
+ h = b[0],
6177
+ g = b[1],
6178
+ O = b[2],
6179
+ w = b[3],
6180
+ _ = getByKeyPath(h, g);
6181
+ if (void 0 === _) break;
6182
+ O[w] = _, l.splice(0, 1);
6215
6183
  }
6216
6184
  }
6217
6185
  if (!f) return r;
6218
6186
  if ("#" === f) {
6219
- var A = getByKeyPath(o, r.slice(1));
6220
- return void 0 === A && l.push([o, r.slice(1), i, c]), A;
6187
+ var A = getByKeyPath(a, r.slice(1));
6188
+ return void 0 === A && l.push([a, r.slice(1), i, c]), A;
6221
6189
  }
6222
6190
  return [].concat(f).reduce(function reducer(t, r) {
6223
6191
  if (hasConstructorOf(t, e)) return t.then(function (e) {
@@ -6259,9 +6227,9 @@
6259
6227
  key: "register",
6260
6228
  value: function register(e, t) {
6261
6229
  var r = this,
6262
- o = null != t ? t : {},
6230
+ a = null != t ? t : {},
6263
6231
  i = function R(e) {
6264
- a(e) ? e.forEach(function (e) {
6232
+ o(e) ? e.forEach(function (e) {
6265
6233
  return R(e);
6266
6234
  }) : n(e).forEach(function (t) {
6267
6235
  var n;
@@ -6285,7 +6253,7 @@
6285
6253
  return Object.assign(Object.create(l.prototype), e);
6286
6254
  }
6287
6255
  };
6288
- } else if (a(i)) {
6256
+ } else if (o(i)) {
6289
6257
  var f = _slicedToArray(i, 3);
6290
6258
  i = {
6291
6259
  test: f[0],
@@ -6299,7 +6267,7 @@
6299
6267
  test: i.test.bind(i)
6300
6268
  };
6301
6269
  i.replace && (y.replace = i.replace.bind(i)), i.replaceAsync && (y.replaceAsync = i.replaceAsync.bind(i));
6302
- var p = "number" == typeof o.fallback ? o.fallback : o.fallback ? 0 : Number.POSITIVE_INFINITY;
6270
+ var p = "number" == typeof a.fallback ? a.fallback : a.fallback ? 0 : Number.POSITIVE_INFINITY;
6303
6271
  if (i.testPlainObjects ? r.plainObjectReplacers.splice(p, 0, y) : r.nonplainObjectReplacers.splice(p, 0, y), i.revive || i.reviveAsync) {
6304
6272
  var d = {};
6305
6273
  i.revive && (d.revive = i.revive.bind(i)), i.reviveAsync && (d.reviveAsync = i.reviveAsync.bind(i)), r.revivers[t] = [d, {
@@ -6323,21 +6291,21 @@
6323
6291
  for (var u = ["null", "boolean", "number", "string", "array", "object"], l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", f = new Uint8Array(256), y = 0; y < 64; y++) f[l.codePointAt(y)] = y;
6324
6292
  var p = function encode(e, t, r) {
6325
6293
  null == r && (r = e.byteLength);
6326
- for (var n = new Uint8Array(e, t || 0, r), o = n.length, a = "", i = 0; i < o; i += 3) a += l[n[i] >> 2], a += l[(3 & n[i]) << 4 | n[i + 1] >> 4], a += l[(15 & n[i + 1]) << 2 | n[i + 2] >> 6], a += l[63 & n[i + 2]];
6327
- return o % 3 == 2 ? a = a.slice(0, -1) + "=" : o % 3 == 1 && (a = a.slice(0, -2) + "=="), a;
6294
+ for (var n = new Uint8Array(e, 0, r), a = n.length, o = "", i = 0; i < a; i += 3) o += l[n[i] >> 2], o += l[(3 & n[i]) << 4 | n[i + 1] >> 4], o += l[(15 & n[i + 1]) << 2 | n[i + 2] >> 6], o += l[63 & n[i + 2]];
6295
+ return a % 3 == 2 ? o = o.slice(0, -1) + "=" : a % 3 == 1 && (o = o.slice(0, -2) + "=="), o;
6328
6296
  },
6329
- d = function decode(e) {
6330
- var t = e.length;
6331
- if (t % 4) throw new Error("Bad base64 length: not divisible by four");
6332
- var r,
6333
- n,
6334
- o,
6297
+ d = function decode(e, t) {
6298
+ var r = e.length;
6299
+ if (r % 4) throw new Error("Bad base64 length: not divisible by four");
6300
+ var n,
6335
6301
  a,
6336
- i = .75 * e.length,
6337
- c = 0;
6338
- "=" === e[e.length - 1] && (i--, "=" === e[e.length - 2] && i--);
6339
- for (var s = new ArrayBuffer(i), u = new Uint8Array(s), l = 0; l < t; l += 4) r = f[e.codePointAt(l)], n = f[e.codePointAt(l + 1)], o = f[e.codePointAt(l + 2)], a = f[e.codePointAt(l + 3)], u[c++] = r << 2 | n >> 4, u[c++] = (15 & n) << 4 | o >> 2, u[c++] = (3 & o) << 6 | 63 & a;
6340
- return s;
6302
+ o,
6303
+ i,
6304
+ c = .75 * e.length,
6305
+ s = 0;
6306
+ "=" === e[e.length - 1] && (c--, "=" === e[e.length - 2] && c--);
6307
+ for (var u = new ArrayBuffer(c, t), l = new Uint8Array(u), y = 0; y < r; y += 4) n = f[e.codePointAt(y)], a = f[e.codePointAt(y + 1)], o = f[e.codePointAt(y + 2)], i = f[e.codePointAt(y + 3)], l[s++] = n << 2 | a >> 4, l[s++] = (15 & a) << 4 | o >> 2, l[s++] = (3 & o) << 6 | 63 & i;
6308
+ return u;
6341
6309
  };
6342
6310
  var v = {
6343
6311
  arraybuffer: {
@@ -6349,16 +6317,21 @@
6349
6317
  var r = t.buffers.indexOf(e);
6350
6318
  return r > -1 ? {
6351
6319
  index: r
6352
- } : (t.buffers.push(e), p(e));
6320
+ } : (t.buffers.push(e), {
6321
+ s: p(e),
6322
+ maxByteLength: e.maxByteLength
6323
+ });
6353
6324
  },
6354
6325
  revive: function revive(e, t) {
6355
- if (t.buffers || (t.buffers = []), "object" == _typeof$2(e)) return t.buffers[e.index];
6356
- var r = d(e);
6326
+ if (t.buffers || (t.buffers = []), Object.hasOwn(e, "index")) return t.buffers[e.index];
6327
+ var r = d(e.s, {
6328
+ maxByteLength: e.maxByteLength
6329
+ });
6357
6330
  return t.buffers.push(r), r;
6358
6331
  }
6359
6332
  }
6360
6333
  },
6361
- b = {
6334
+ m = {
6362
6335
  bigintObject: {
6363
6336
  test: function test(e) {
6364
6337
  return "object" == _typeof$2(e) && hasConstructorOf(e, BigInt);
@@ -6369,7 +6342,7 @@
6369
6342
  }
6370
6343
  }
6371
6344
  },
6372
- h = {
6345
+ b = {
6373
6346
  bigint: {
6374
6347
  test: function test(e) {
6375
6348
  return "bigint" == typeof e;
@@ -6385,7 +6358,7 @@
6385
6358
  for (var _r = 0; _r < e.length; _r++) t[_r] = e.charCodeAt(_r);
6386
6359
  return t.buffer;
6387
6360
  }
6388
- var g = {
6361
+ var h = {
6389
6362
  blob: {
6390
6363
  test: function test(e) {
6391
6364
  return "Blob" === toStringTag(e);
@@ -6420,7 +6393,7 @@
6420
6393
  }
6421
6394
  }
6422
6395
  };
6423
- var O = {
6396
+ var w = {
6424
6397
  cryptokey: {
6425
6398
  test: function test(e) {
6426
6399
  return "CryptoKey" === toStringTag(e) && e.extractable;
@@ -6468,7 +6441,7 @@
6468
6441
  }
6469
6442
  }
6470
6443
  },
6471
- w = {
6444
+ _ = {
6472
6445
  dataview: {
6473
6446
  test: function test(e) {
6474
6447
  return "DataView" === toStringTag(e);
@@ -6478,13 +6451,14 @@
6478
6451
  t = _ref2.byteOffset,
6479
6452
  r = _ref2.byteLength;
6480
6453
  n.buffers || (n.buffers = []);
6481
- var o = n.buffers.indexOf(e);
6482
- return o > -1 ? {
6483
- index: o,
6454
+ var a = n.buffers.indexOf(e);
6455
+ return a > -1 ? {
6456
+ index: a,
6484
6457
  byteOffset: t,
6485
6458
  byteLength: r
6486
6459
  } : (n.buffers.push(e), {
6487
6460
  encoded: p(e),
6461
+ maxByteLength: e.maxByteLength,
6488
6462
  byteOffset: t,
6489
6463
  byteLength: r
6490
6464
  });
@@ -6493,10 +6467,13 @@
6493
6467
  t.buffers || (t.buffers = []);
6494
6468
  var r = e.byteOffset,
6495
6469
  n = e.byteLength,
6496
- o = e.encoded,
6497
- a = e.index;
6498
- var i;
6499
- return "index" in e ? i = t.buffers[a] : (i = d(o), t.buffers.push(i)), new DataView(i, r, n);
6470
+ a = e.encoded,
6471
+ o = e.index,
6472
+ i = e.maxByteLength;
6473
+ var c;
6474
+ return "index" in e ? c = t.buffers[o] : (c = d(a, void 0 === i ? i : {
6475
+ maxByteLength: i
6476
+ }), t.buffers.push(c)), new DataView(c, r, n);
6500
6477
  }
6501
6478
  }
6502
6479
  },
@@ -6515,25 +6492,152 @@
6515
6492
  }
6516
6493
  },
6517
6494
  S = {
6495
+ domexception: {
6496
+ test: function test(e) {
6497
+ return "DOMException" === toStringTag(e);
6498
+ },
6499
+ replace: function replace(e) {
6500
+ return {
6501
+ name: e.name,
6502
+ message: e.message
6503
+ };
6504
+ },
6505
+ revive: function revive(_ref3) {
6506
+ var e = _ref3.message,
6507
+ t = _ref3.name;
6508
+ return new DOMException(e, t);
6509
+ }
6510
+ }
6511
+ },
6512
+ j = {};
6513
+ function create$5(e) {
6514
+ j[e.name.toLowerCase()] = {
6515
+ test: function test(t) {
6516
+ return toStringTag(t) === e.name;
6517
+ },
6518
+ replace: function replace(e) {
6519
+ return e.is2D ? {
6520
+ a: e.a,
6521
+ b: e.b,
6522
+ c: e.c,
6523
+ d: e.d,
6524
+ e: e.e,
6525
+ f: e.f
6526
+ } : {
6527
+ m11: e.m11,
6528
+ m12: e.m12,
6529
+ m13: e.m13,
6530
+ m14: e.m14,
6531
+ m21: e.m21,
6532
+ m22: e.m22,
6533
+ m23: e.m23,
6534
+ m24: e.m24,
6535
+ m31: e.m31,
6536
+ m32: e.m32,
6537
+ m33: e.m33,
6538
+ m34: e.m34,
6539
+ m41: e.m41,
6540
+ m42: e.m42,
6541
+ m43: e.m43,
6542
+ m44: e.m44
6543
+ };
6544
+ },
6545
+ revive: function revive(t) {
6546
+ return Object.hasOwn(t, "a") ? new e([t.a, t.b, t.c, t.d, t.e, t.f]) : new e([t.m11, t.m12, t.m13, t.m14, t.m21, t.m22, t.m23, t.m24, t.m31, t.m32, t.m33, t.m34, t.m41, t.m42, t.m43, t.m44]);
6547
+ }
6548
+ };
6549
+ }
6550
+ "undefined" != typeof DOMMatrix && create$5(DOMMatrix), "undefined" != typeof DOMMatrixReadOnly && create$5(DOMMatrixReadOnly);
6551
+ var T = {};
6552
+ function create$4(e) {
6553
+ T[e.name.toLowerCase()] = {
6554
+ test: function test(t) {
6555
+ return toStringTag(t) === e.name;
6556
+ },
6557
+ replace: function replace(e) {
6558
+ return {
6559
+ x: e.x,
6560
+ y: e.y,
6561
+ z: e.z,
6562
+ w: e.w
6563
+ };
6564
+ },
6565
+ revive: function revive(_ref4) {
6566
+ var t = _ref4.x,
6567
+ r = _ref4.y,
6568
+ n = _ref4.z,
6569
+ a = _ref4.w;
6570
+ return new e(t, r, n, a);
6571
+ }
6572
+ };
6573
+ }
6574
+ "undefined" != typeof DOMPoint && create$4(DOMPoint), "undefined" != typeof DOMPointReadOnly && create$4(DOMPointReadOnly);
6575
+ var I = {
6576
+ domquad: {
6577
+ test: function test(e) {
6578
+ return "DOMQuad" === toStringTag(e);
6579
+ },
6580
+ replace: function replace(e) {
6581
+ return {
6582
+ p1: e.p1,
6583
+ p2: e.p2,
6584
+ p3: e.p3,
6585
+ p4: e.p4
6586
+ };
6587
+ },
6588
+ revive: function revive(_ref5) {
6589
+ var e = _ref5.p1,
6590
+ t = _ref5.p2,
6591
+ r = _ref5.p3,
6592
+ n = _ref5.p4;
6593
+ return new DOMQuad(e, t, r, n);
6594
+ }
6595
+ }
6596
+ },
6597
+ N = {};
6598
+ function create$3(e) {
6599
+ N[e.name.toLowerCase()] = {
6600
+ test: function test(t) {
6601
+ return toStringTag(t) === e.name;
6602
+ },
6603
+ replace: function replace(e) {
6604
+ return {
6605
+ x: e.x,
6606
+ y: e.y,
6607
+ width: e.width,
6608
+ height: e.height
6609
+ };
6610
+ },
6611
+ revive: function revive(_ref6) {
6612
+ var t = _ref6.x,
6613
+ r = _ref6.y,
6614
+ n = _ref6.width,
6615
+ a = _ref6.height;
6616
+ return new e(t, r, n, a);
6617
+ }
6618
+ };
6619
+ }
6620
+ "undefined" != typeof DOMRect && create$3(DOMRect), "undefined" != typeof DOMRectReadOnly && create$3(DOMRectReadOnly);
6621
+ var P = {
6518
6622
  error: {
6519
6623
  test: function test(e) {
6520
6624
  return "Error" === toStringTag(e);
6521
6625
  },
6522
- replace: function replace(_ref3) {
6523
- var e = _ref3.name,
6524
- t = _ref3.message,
6525
- r = _ref3.cause,
6526
- n = _ref3.stack,
6527
- o = _ref3.fileName,
6528
- a = _ref3.lineNumber,
6529
- i = _ref3.columnNumber;
6626
+ replace: function replace(_ref7) {
6627
+ var e = _ref7.name,
6628
+ t = _ref7.message,
6629
+ r = _ref7.cause,
6630
+ n = _ref7.stack,
6631
+ a = _ref7.fileName,
6632
+ o = _ref7.lineNumber,
6633
+ i = _ref7.columnNumber;
6530
6634
  return {
6531
6635
  name: e,
6532
6636
  message: t,
6533
6637
  cause: r,
6534
6638
  stack: n,
6535
- fileName: o,
6536
- lineNumber: a,
6639
+ fileName: a,
6640
+ lineNumber: o,
6537
6641
  columnNumber: i
6538
6642
  };
6539
6643
  },
@@ -6543,43 +6647,42 @@
6543
6647
  }
6544
6648
  }
6545
6649
  },
6546
- j = {};
6650
+ x = {};
6547
6651
  function create$2(e) {
6548
- j[e.name.toLowerCase()] = {
6652
+ x[e.name.toLowerCase()] = {
6549
6653
  test: function test(t) {
6550
6654
  return hasConstructorOf(t, e);
6551
6655
  },
6552
- replace: function replace(_ref4) {
6553
- var e = _ref4.name,
6554
- t = _ref4.message,
6555
- r = _ref4.cause,
6556
- n = _ref4.stack,
6557
- o = _ref4.fileName,
6558
- a = _ref4.lineNumber,
6559
- i = _ref4.columnNumber,
6560
- c = _ref4.errors;
6656
+ replace: function replace(_ref8) {
6657
+ var e = _ref8.name,
6658
+ t = _ref8.message,
6659
+ r = _ref8.cause,
6660
+ n = _ref8.stack,
6661
+ a = _ref8.fileName,
6662
+ o = _ref8.lineNumber,
6663
+ i = _ref8.columnNumber,
6664
+ c = _ref8.errors;
6561
6665
  return {
6562
6666
  name: e,
6563
6667
  message: t,
6564
6668
  cause: r,
6565
6669
  stack: n,
6566
- fileName: o,
6567
- lineNumber: a,
6670
+ fileName: a,
6671
+ lineNumber: o,
6568
6672
  columnNumber: i,
6569
6673
  errors: c
6570
6674
  };
6571
6675
  },
6572
6676
  revive: function revive(t) {
6573
- var r = "undefined" != typeof AggregateError && e === AggregateError,
6574
- n = r ? new e(t.errors, t.message) : new e(t.message);
6575
- return n.name = t.name, n.cause = t.cause, n.stack = t.stack, n.fileName = t.fileName, n.lineNumber = t.lineNumber, n.columnNumber = t.columnNumber, r && (n.errors = t.errors), n;
6677
+ var r = "undefined" != typeof AggregateError && e === AggregateError ? new e(t.errors, t.message) : new e(t.message);
6678
+ return r.name = t.name, r.cause = t.cause, r.stack = t.stack, r.fileName = t.fileName, r.lineNumber = t.lineNumber, r.columnNumber = t.columnNumber, r;
6576
6679
  }
6577
6680
  };
6578
6681
  }
6579
6682
  [TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError].forEach(function (e) {
6580
6683
  return create$2(e);
6581
6684
  }), "undefined" != typeof AggregateError && create$2(AggregateError), "function" == typeof InternalError && create$2(InternalError);
6582
- var T = {
6685
+ var E = {
6583
6686
  file: {
6584
6687
  test: function test(e) {
6585
6688
  return "File" === toStringTag(e);
@@ -6594,11 +6697,11 @@
6594
6697
  lastModified: e.lastModified
6595
6698
  };
6596
6699
  },
6597
- revive: function revive(_ref5) {
6598
- var e = _ref5.name,
6599
- t = _ref5.type,
6600
- r = _ref5.stringContents,
6601
- n = _ref5.lastModified;
6700
+ revive: function revive(_ref9) {
6701
+ var e = _ref9.name,
6702
+ t = _ref9.type,
6703
+ r = _ref9.stringContents,
6704
+ n = _ref9.lastModified;
6602
6705
  return new File([string2arraybuffer(r)], e, {
6603
6706
  type: t,
6604
6707
  lastModified: n
@@ -6621,8 +6724,8 @@
6621
6724
  }
6622
6725
  }
6623
6726
  },
6624
- I = {
6625
- file: T.file,
6727
+ C = {
6728
+ file: E.file,
6626
6729
  filelist: {
6627
6730
  test: function test(e) {
6628
6731
  return "FileList" === toStringTag(e);
@@ -6633,53 +6736,56 @@
6633
6736
  return t;
6634
6737
  },
6635
6738
  revive: function revive(e) {
6636
- var FileList = /*#__PURE__*/function (_Symbol$toStringTag) {
6739
+ var FileList = /*#__PURE__*/function () {
6637
6740
  function FileList() {
6638
6741
  _classCallCheck$1(this, FileList);
6639
6742
  this._files = arguments[0], this.length = this._files.length;
6640
6743
  }
6641
- _createClass$1(FileList, [{
6744
+ return _createClass$1(FileList, [{
6642
6745
  key: "item",
6643
6746
  value: function item(e) {
6644
6747
  return this._files[e];
6645
6748
  }
6646
6749
  }, {
6647
- key: _Symbol$toStringTag,
6750
+ key: Symbol.toStringTag,
6648
6751
  get: function get() {
6649
6752
  return "FileList";
6650
6753
  }
6651
6754
  }]);
6652
- return FileList;
6653
- }(Symbol.toStringTag);
6755
+ }();
6654
6756
  return new FileList(e);
6655
6757
  }
6656
6758
  }
6657
6759
  },
6658
- N = {
6760
+ B = {
6659
6761
  imagebitmap: {
6660
6762
  test: function test(e) {
6661
6763
  return "ImageBitmap" === toStringTag(e) || e && e.dataset && "ImageBitmap" === e.dataset.toStringTag;
6662
6764
  },
6663
6765
  replace: function replace(e) {
6664
6766
  var t = document.createElement("canvas");
6665
- return t.getContext("2d").drawImage(e, 0, 0), t.toDataURL();
6767
+ return t.getContext("2d").drawImage(e, 0, 0), {
6768
+ width: e.width,
6769
+ height: e.height,
6770
+ dataURL: t.toDataURL()
6771
+ };
6666
6772
  },
6667
6773
  revive: function revive(e) {
6668
- var t = document.createElement("canvas"),
6774
+ var t = "undefined" == typeof OffscreenCanvas ? document.createElement("canvas") : new OffscreenCanvas(e.width, e.height),
6669
6775
  r = t.getContext("2d"),
6670
6776
  n = document.createElement("img");
6671
6777
  return n.addEventListener("load", function () {
6672
6778
  r.drawImage(n, 0, 0);
6673
- }), n.src = e, t;
6779
+ }), n.src = e.dataURL, "undefined" == typeof OffscreenCanvas ? t : t.transferToImageBitmap();
6674
6780
  },
6675
6781
  reviveAsync: function reviveAsync(t) {
6676
6782
  var r = document.createElement("canvas"),
6677
6783
  n = r.getContext("2d"),
6678
- o = document.createElement("img");
6679
- return o.addEventListener("load", function () {
6680
- n.drawImage(o, 0, 0);
6681
- }), o.src = t, new e( /*#__PURE__*/function () {
6682
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, t) {
6784
+ a = document.createElement("img");
6785
+ return a.addEventListener("load", function () {
6786
+ n.drawImage(a, 0, 0);
6787
+ }), a.src = t.dataURL, new e( /*#__PURE__*/function () {
6788
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, t) {
6683
6789
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
6684
6790
  while (1) switch (_context2.prev = _context2.next) {
6685
6791
  case 0:
@@ -6703,13 +6809,13 @@
6703
6809
  }, _callee2, null, [[0, 8]]);
6704
6810
  }));
6705
6811
  return function (_x3, _x4) {
6706
- return _ref6.apply(this, arguments);
6812
+ return _ref10.apply(this, arguments);
6707
6813
  };
6708
6814
  }());
6709
6815
  }
6710
6816
  }
6711
6817
  },
6712
- P = {
6818
+ k = {
6713
6819
  imagedata: {
6714
6820
  test: function test(e) {
6715
6821
  return "ImageData" === toStringTag(e);
@@ -6726,56 +6832,20 @@
6726
6832
  }
6727
6833
  }
6728
6834
  },
6729
- E = {
6835
+ U = {
6730
6836
  infinity: {
6731
6837
  test: function test(e) {
6732
6838
  return e === Number.POSITIVE_INFINITY;
6733
6839
  },
6734
- replace: function replace(e) {
6840
+ replace: function replace() {
6735
6841
  return "Infinity";
6736
6842
  },
6737
- revive: function revive(e) {
6843
+ revive: function revive() {
6738
6844
  return Number.POSITIVE_INFINITY;
6739
6845
  }
6740
6846
  }
6741
6847
  },
6742
- C = {
6743
- test: function test(e) {
6744
- return hasConstructorOf(e, Intl.Collator);
6745
- },
6746
- replace: function replace(e) {
6747
- return e.resolvedOptions();
6748
- },
6749
- revive: function revive(e) {
6750
- return new Intl.Collator(e.locale, e);
6751
- }
6752
- },
6753
- x = {
6754
- IntlCollator: C,
6755
- IntlDateTimeFormat: {
6756
- test: function test(e) {
6757
- return hasConstructorOf(e, Intl.DateTimeFormat);
6758
- },
6759
- replace: function replace(e) {
6760
- return e.resolvedOptions();
6761
- },
6762
- revive: function revive(e) {
6763
- return new Intl.DateTimeFormat(e.locale, e);
6764
- }
6765
- },
6766
- IntlNumberFormat: {
6767
- test: function test(e) {
6768
- return hasConstructorOf(e, Intl.NumberFormat);
6769
- },
6770
- replace: function replace(e) {
6771
- return e.resolvedOptions();
6772
- },
6773
- revive: function revive(e) {
6774
- return new Intl.NumberFormat(e.locale, e);
6775
- }
6776
- }
6777
- },
6778
- k = {
6848
+ D = {
6779
6849
  map: {
6780
6850
  test: function test(e) {
6781
6851
  return "Map" === toStringTag(e);
@@ -6788,46 +6858,46 @@
6788
6858
  }
6789
6859
  }
6790
6860
  },
6791
- B = {
6861
+ K = {
6792
6862
  nan: {
6793
6863
  test: function test(e) {
6794
6864
  return Number.isNaN(e);
6795
6865
  },
6796
- replace: function replace(e) {
6866
+ replace: function replace() {
6797
6867
  return "NaN";
6798
6868
  },
6799
- revive: function revive(e) {
6869
+ revive: function revive() {
6800
6870
  return Number.NaN;
6801
6871
  }
6802
6872
  }
6803
6873
  },
6804
- U = {
6874
+ F = {
6805
6875
  negativeInfinity: {
6806
6876
  test: function test(e) {
6807
6877
  return e === Number.NEGATIVE_INFINITY;
6808
6878
  },
6809
- replace: function replace(e) {
6879
+ replace: function replace() {
6810
6880
  return "-Infinity";
6811
6881
  },
6812
- revive: function revive(e) {
6882
+ revive: function revive() {
6813
6883
  return Number.NEGATIVE_INFINITY;
6814
6884
  }
6815
6885
  }
6816
6886
  },
6817
- K = {
6887
+ $ = {
6818
6888
  negativeZero: {
6819
6889
  test: function test(e) {
6820
6890
  return Object.is(e, -0);
6821
6891
  },
6822
- replace: function replace(e) {
6892
+ replace: function replace() {
6823
6893
  return 0;
6824
6894
  },
6825
- revive: function revive(e) {
6895
+ revive: function revive() {
6826
6896
  return -0;
6827
6897
  }
6828
6898
  }
6829
6899
  },
6830
- F = {
6900
+ V = {
6831
6901
  StringObject: {
6832
6902
  test: function test(e) {
6833
6903
  return "String" === toStringTag(e) && "object" == _typeof$2(e);
@@ -6856,7 +6926,7 @@
6856
6926
  }
6857
6927
  }
6858
6928
  },
6859
- M = {
6929
+ q = {
6860
6930
  regexp: {
6861
6931
  test: function test(e) {
6862
6932
  return "RegExp" === toStringTag(e);
@@ -6867,14 +6937,14 @@
6867
6937
  flags: (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.sticky ? "y" : "") + (e.unicode ? "u" : "")
6868
6938
  };
6869
6939
  },
6870
- revive: function revive(_ref7) {
6871
- var e = _ref7.source,
6872
- t = _ref7.flags;
6940
+ revive: function revive(_ref11) {
6941
+ var e = _ref11.source,
6942
+ t = _ref11.flags;
6873
6943
  return new RegExp(e, t);
6874
6944
  }
6875
6945
  }
6876
6946
  },
6877
- J = {
6947
+ G = {
6878
6948
  set: {
6879
6949
  test: function test(e) {
6880
6950
  return "Set" === toStringTag(e);
@@ -6887,11 +6957,11 @@
6887
6957
  }
6888
6958
  }
6889
6959
  },
6890
- V = {};
6960
+ H = {};
6891
6961
  "function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
6892
6962
  return function create$1(e) {
6893
6963
  var t = e.name;
6894
- V[t.toLowerCase()] = {
6964
+ H[t.toLowerCase()] = {
6895
6965
  test: function test(e) {
6896
6966
  return toStringTag(e) === t;
6897
6967
  },
@@ -6904,25 +6974,26 @@
6904
6974
  };
6905
6975
  }(e);
6906
6976
  });
6907
- var Y = {};
6977
+ var z = {};
6908
6978
  "function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
6909
6979
  return function create(e) {
6910
6980
  var t = e.name;
6911
- Y[t.toLowerCase()] = {
6981
+ z[t.toLowerCase()] = {
6912
6982
  test: function test(e) {
6913
6983
  return toStringTag(e) === t;
6914
6984
  },
6915
- replace: function replace(_ref8, n) {
6916
- var e = _ref8.buffer,
6917
- t = _ref8.byteOffset,
6918
- r = _ref8.length;
6985
+ replace: function replace(_ref12, n) {
6986
+ var e = _ref12.buffer,
6987
+ t = _ref12.byteOffset,
6988
+ r = _ref12.length;
6919
6989
  n.buffers || (n.buffers = []);
6920
- var o = n.buffers.indexOf(e);
6921
- return o > -1 ? {
6922
- index: o,
6990
+ var a = n.buffers.indexOf(e);
6991
+ return a > -1 ? {
6992
+ index: a,
6923
6993
  byteOffset: t,
6924
6994
  length: r
6925
6995
  } : (n.buffers.push(e), {
6996
+ maxByteLength: e.maxByteLength,
6926
6997
  encoded: p(e),
6927
6998
  byteOffset: t,
6928
6999
  length: r
@@ -6931,31 +7002,34 @@
6931
7002
  revive: function revive(t, r) {
6932
7003
  r.buffers || (r.buffers = []);
6933
7004
  var n = t.byteOffset,
6934
- o = t.length,
6935
- a = t.encoded,
6936
- i = t.index;
6937
- var c;
6938
- return "index" in t ? c = r.buffers[i] : (c = d(a), r.buffers.push(c)), new e(c, n, o);
7005
+ a = t.length,
7006
+ o = t.encoded,
7007
+ i = t.index,
7008
+ c = t.maxByteLength;
7009
+ var s;
7010
+ return "index" in t ? s = r.buffers[i] : (s = d(o, void 0 === c ? void 0 : {
7011
+ maxByteLength: c
7012
+ }), r.buffers.push(s)), new e(s, n, a);
6939
7013
  }
6940
7014
  };
6941
7015
  }(e);
6942
7016
  });
6943
- var q = {
7017
+ var Q = {
6944
7018
  undef: {
6945
7019
  test: function test(e, t) {
6946
7020
  return void 0 === e && (t.ownKeys || !("ownKeys" in t));
6947
7021
  },
6948
- replace: function replace(e) {
7022
+ replace: function replace() {
6949
7023
  return 0;
6950
7024
  },
6951
- revive: function revive(e) {
7025
+ revive: function revive() {
6952
7026
  return new s();
6953
7027
  }
6954
7028
  }
6955
7029
  },
6956
- W = {
7030
+ X = {
6957
7031
  userObject: {
6958
- test: function test(e, t) {
7032
+ test: function test(e) {
6959
7033
  return isUserObject(e);
6960
7034
  },
6961
7035
  replace: function replace(e) {
@@ -6966,7 +7040,7 @@
6966
7040
  }
6967
7041
  }
6968
7042
  },
6969
- G = [{
7043
+ Z = [{
6970
7044
  arrayNonindexKeys: {
6971
7045
  testPlainObjects: !0,
6972
7046
  test: function test(e, t) {
@@ -6980,10 +7054,10 @@
6980
7054
  revive: function revive(e) {
6981
7055
  if (Array.isArray(e)) return e;
6982
7056
  var t = [];
6983
- return Object.entries(e).forEach(function (_ref9) {
6984
- var _ref10 = _slicedToArray$1(_ref9, 2),
6985
- e = _ref10[0],
6986
- r = _ref10[1];
7057
+ return Object.entries(e).forEach(function (_ref13) {
7058
+ var _ref14 = _slicedToArray$1(_ref13, 2),
7059
+ e = _ref14[0],
7060
+ r = _ref14[1];
6987
7061
  t[e] = r;
6988
7062
  }), t;
6989
7063
  }
@@ -6993,19 +7067,19 @@
6993
7067
  test: function test(e, t) {
6994
7068
  return void 0 === e && !1 === t.ownKeys;
6995
7069
  },
6996
- replace: function replace(e) {
7070
+ replace: function replace() {
6997
7071
  return 0;
6998
7072
  },
6999
- revive: function revive(e) {}
7073
+ revive: function revive() {}
7000
7074
  }
7001
7075
  }],
7002
- H = [B, E, U, K],
7003
- ee = [W, q, G, F, H, A, M, P, N, T, I, g, S, j].concat("function" == typeof Map ? k : [], "function" == typeof Set ? J : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? Y : [], "function" == typeof DataView ? w : [], "undefined" != typeof Intl ? x : [], "undefined" != typeof crypto ? O : [], "undefined" != typeof BigInt ? [h, b] : []),
7004
- te = ee.concat({
7076
+ ee = [K, U, F, $],
7077
+ oe = [X, Q, Z, V, ee, A, q, k, B, E, C, h, P, x].concat("function" == typeof Map ? D : [], "function" == typeof Set ? G : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? z : [], "function" == typeof DataView ? _ : [], "undefined" != typeof crypto ? w : [], "undefined" != typeof BigInt ? [b, m] : [], "undefined" != typeof DOMException ? S : [], "undefined" != typeof DOMRect ? N : [], "undefined" != typeof DOMPoint ? T : [], "undefined" != typeof DOMQuad ? I : [], "undefined" != typeof DOMMatrix ? j : []),
7078
+ ie = oe.concat({
7005
7079
  checkDataCloneException: {
7006
7080
  test: function test(e) {
7007
7081
  var t = {}.toString.call(e).slice(8, -1);
7008
- if (["symbol", "function"].includes(_typeof$2(e)) || ["Arguments", "Module", "Error", "Promise", "WeakMap", "WeakSet", "Event", "MessageChannel"].includes(t) || e && "object" == _typeof$2(e) && "number" == typeof e.nodeType && "function" == typeof e.insertBefore) throw new DOMException("The object cannot be cloned.", "DataCloneError");
7082
+ if (["symbol", "function"].includes(_typeof$2(e)) || ["Arguments", "Module", "Promise", "WeakMap", "WeakSet", "Event", "MessageChannel"].includes(t) || e && "object" == _typeof$2(e) && "number" == typeof e.nodeType && "function" == typeof e.insertBefore) throw new DOMException("The object cannot be cloned.", "DataCloneError");
7009
7083
  return !1;
7010
7084
  }
7011
7085
  }
@@ -7013,7 +7087,7 @@
7013
7087
 
7014
7088
  // See: http://stackoverflow.com/questions/42170826/categories-for-rejection-by-the-structured-cloning-algorithm
7015
7089
 
7016
- var typeson = new c().register(te);
7090
+ var typeson = new c().register(ie);
7017
7091
 
7018
7092
  /**
7019
7093
  * @param {(preset: import('typeson-registry').Preset) =>
@@ -7021,7 +7095,7 @@
7021
7095
  * @returns {void}
7022
7096
  */
7023
7097
  function register(func) {
7024
- typeson = new c().register(func(te));
7098
+ typeson = new c().register(func(ie));
7025
7099
  }
7026
7100
 
7027
7101
  /**
@@ -7170,7 +7244,7 @@
7170
7244
  * @returns {string}
7171
7245
  */
7172
7246
  get: function get() {
7173
- return '__pendingName' in me ? /** @type {string} */me.__pendingName : me.name;
7247
+ return '__pendingName' in me ? ( /** @type {string} */me.__pendingName) : me.name;
7174
7248
  }
7175
7249
  });
7176
7250
  Object.defineProperty(me, 'name', {
@@ -7318,7 +7392,9 @@
7318
7392
  IDBIndex.__updateIndexList(store, tx, function () {
7319
7393
  // Add index entries for all existing records
7320
7394
  tx.executeSql('SELECT "key", "value" FROM ' + escapeStoreNameForSQL(storeName), [], function (tx, data) {
7321
- CFG.DEBUG && console.log('Adding existing ' + storeName + ' records to the ' + indexName + ' index');
7395
+ if (CFG.DEBUG) {
7396
+ console.log('Adding existing ' + storeName + ' records to the ' + indexName + ' index');
7397
+ }
7322
7398
  addIndexEntry(0);
7323
7399
 
7324
7400
  /**
@@ -7344,7 +7420,7 @@
7344
7420
  }
7345
7421
  indexValues[indexKeyStr] = true;
7346
7422
  }
7347
- tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function (tx, data) {
7423
+ tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function () {
7348
7424
  addIndexEntry(i + 1);
7349
7425
  }, /** @type {SQLStatementErrorCallback} */error);
7350
7426
  } catch (e) {
@@ -7393,7 +7469,9 @@
7393
7469
  } else {
7394
7470
  // For a new index, add a new column to the object store, then apply the index
7395
7471
  var sql = ['ALTER TABLE', escapedStoreNameSQL, 'ADD', escapedIndexNameSQL, 'BLOB'].join(' ');
7396
- CFG.DEBUG && console.log(sql);
7472
+ if (CFG.DEBUG) {
7473
+ console.log(sql);
7474
+ }
7397
7475
  tx.executeSql(sql, [], addIndexSQL, /** @type {SQLStatementErrorCallback} */error);
7398
7476
  }
7399
7477
  });
@@ -7481,7 +7559,9 @@
7481
7559
  deleted: Boolean(idx.__deleted)
7482
7560
  };
7483
7561
  }
7484
- CFG.DEBUG && console.log('Updating the index list for ' + store.__currentName, indexList);
7562
+ if (CFG.DEBUG) {
7563
+ console.log('Updating the index list for ' + store.__currentName, indexList);
7564
+ }
7485
7565
  tx.executeSql('UPDATE __sys__ SET "indexList" = ? WHERE "name" = ?', [JSON.stringify(indexList), escapeSQLiteStatement(store.__currentName)], function () {
7486
7566
  success(store);
7487
7567
  }, /** @type {SQLStatementErrorCallback} */failure);
@@ -7515,13 +7595,12 @@
7515
7595
  throw createDOMException('DataError', 'No key or range was specified');
7516
7596
  }
7517
7597
  var fetchArgs = buildFetchIndexDataSQL(nullDisallowed, me, range, opType, false);
7518
- return (/** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.objectStore.transaction.__addToTransactionQueue(function () {
7519
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7520
- args[_key] = arguments[_key];
7521
- }
7522
- executeFetchIndexData.apply(void 0, [count].concat(_toConsumableArray(fetchArgs), args));
7523
- }, undefined, me)
7524
- );
7598
+ return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.objectStore.transaction.__addToTransactionQueue(function () {
7599
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7600
+ args[_key] = arguments[_key];
7601
+ }
7602
+ executeFetchIndexData.apply(void 0, [count].concat(_toConsumableArray(fetchArgs), args));
7603
+ }, undefined, me);
7525
7604
  };
7526
7605
 
7527
7606
  /**
@@ -7692,17 +7771,25 @@
7692
7771
  // We don't query for indexes as we already have the info
7693
7772
  // This approach has the advantage of auto-deleting indexes via the DROP TABLE
7694
7773
  var sql = 'CREATE TABLE ' + escapedTmpStoreNameSQL + '(' + listColInfoToPreserve + escapedNewIndexNameSQL + ' ' + newNameType + ')';
7695
- CFG.DEBUG && console.log(sql);
7774
+ if (CFG.DEBUG) {
7775
+ console.log(sql);
7776
+ }
7696
7777
  tx.executeSql(sql, [], function () {
7697
7778
  var sql = 'INSERT INTO ' + escapedTmpStoreNameSQL + '(' + listColsToPreserve + escapedNewIndexNameSQL + ') SELECT ' + listColsToPreserve + escapeIndexNameForSQL(oldName) + ' FROM ' + escapedStoreNameSQL;
7698
- CFG.DEBUG && console.log(sql);
7779
+ if (CFG.DEBUG) {
7780
+ console.log(sql);
7781
+ }
7699
7782
  tx.executeSql(sql, [], function () {
7700
7783
  var sql = 'DROP TABLE ' + escapedStoreNameSQL;
7701
- CFG.DEBUG && console.log(sql);
7784
+ if (CFG.DEBUG) {
7785
+ console.log(sql);
7786
+ }
7702
7787
  tx.executeSql(sql, [], function () {
7703
7788
  var sql = 'ALTER TABLE ' + escapedTmpStoreNameSQL + ' RENAME TO ' + escapedStoreNameSQL;
7704
- CFG.DEBUG && console.log(sql);
7705
- tx.executeSql(sql, [], function (tx, data) {
7789
+ if (CFG.DEBUG) {
7790
+ console.log(sql);
7791
+ }
7792
+ tx.executeSql(sql, [], function (tx) {
7706
7793
  if (!CFG.useSQLiteIndexes) {
7707
7794
  finish();
7708
7795
  return;
@@ -7712,40 +7799,39 @@
7712
7799
  return new SyncPromise(function (resolve, reject) {
7713
7800
  var escapedIndexToRecreate = sqlQuote(escapedStoreNameSQL.slice(1, -1) + '^5' + escapedIndexNameSQL.slice(1, -1));
7714
7801
  // const sql = 'DROP INDEX IF EXISTS ' + escapedIndexToRecreate;
7715
- // CFG.DEBUG && console.log(sql);
7802
+ // if (CFG.DEBUG) { console.log(sql); }
7716
7803
  // tx.executeSql(sql, [], function () {
7717
7804
  var sql = 'CREATE INDEX ' + escapedIndexToRecreate + ' ON ' + escapedStoreNameSQL + '(' + escapedIndexNameSQL + ')';
7718
- CFG.DEBUG && console.log(sql);
7719
- tx.executeSql(sql, [], resolve, /* eslint-disable no-extra-parens -- TS */
7720
- /** @type {SQLStatementErrorCallback} */
7805
+ if (CFG.DEBUG) {
7806
+ console.log(sql);
7807
+ }
7808
+ tx.executeSql(sql, [], resolve, /** @type {SQLStatementErrorCallback} */
7721
7809
  function (tx, err) {
7722
7810
  reject(err);
7723
- }
7724
- /* eslint-enable no-extra-parens -- TS */);
7811
+ });
7725
7812
  // }, function (tx, err) {
7726
7813
  // reject(err);
7727
7814
  // });
7728
7815
  });
7729
7816
  });
7730
-
7731
7817
  indexCreations.push(new SyncPromise(function (resolve, reject) {
7732
7818
  var escapedIndexToRecreate = sqlQuote('sk_' + escapedStoreNameSQL.slice(1, -1));
7733
7819
  // Chrome erring here if not dropped first; Node does not
7734
7820
  var sql = 'DROP INDEX IF EXISTS ' + escapedIndexToRecreate;
7735
- CFG.DEBUG && console.log(sql);
7821
+ if (CFG.DEBUG) {
7822
+ console.log(sql);
7823
+ }
7736
7824
  tx.executeSql(sql, [], function () {
7737
7825
  var sql = 'CREATE INDEX ' + escapedIndexToRecreate + ' ON ' + escapedStoreNameSQL + '("key")';
7738
- CFG.DEBUG && console.log(sql);
7739
- tx.executeSql(sql, [], resolve, /* eslint-disable no-extra-parens -- TS */
7740
- /** @type {SQLStatementErrorCallback} */
7826
+ if (CFG.DEBUG) {
7827
+ console.log(sql);
7828
+ }
7829
+ tx.executeSql(sql, [], resolve, /** @type {SQLStatementErrorCallback} */
7741
7830
  function (tx, err) {
7742
- /* eslint-enable no-extra-parens -- TS */
7743
7831
  reject(err);
7744
7832
  });
7745
- }, /* eslint-disable no-extra-parens -- TS */
7746
- /** @type {SQLStatementErrorCallback} */
7833
+ }, /** @type {SQLStatementErrorCallback} */
7747
7834
  function (tx, err) {
7748
- /* eslint-enable no-extra-parens -- TS */
7749
7835
  reject(err);
7750
7836
  });
7751
7837
  }));
@@ -7805,12 +7891,14 @@
7805
7891
  sql.push('LIMIT', String(count));
7806
7892
  }
7807
7893
  var isCount = opType === 'count';
7808
- CFG.DEBUG && console.log('Trying to fetch data for Index', sql.join(' '), sqlValues);
7894
+ if (CFG.DEBUG) {
7895
+ console.log('Trying to fetch data for Index', sql.join(' '), sqlValues);
7896
+ }
7809
7897
  tx.executeSql(sql.join(' '), sqlValues, function (tx, data) {
7810
7898
  var records = [];
7811
7899
  var recordCount = 0;
7812
7900
  var decode$1 = isCount ? function () {/* */} : opType === 'key'
7813
- // eslint-disable-next-line operator-linebreak -- JSDoc
7901
+ // eslint-disable-next-line @stylistic/operator-linebreak -- JSDoc
7814
7902
  ?
7815
7903
  /**
7816
7904
  * @param {{
@@ -7822,7 +7910,7 @@
7822
7910
  // Key.convertValueToKey(record.key); // Already validated before storage
7823
7911
  return _decode(unescapeSQLiteResponse(record.key));
7824
7912
  }
7825
- // eslint-disable-next-line operator-linebreak -- JSDoc
7913
+ // eslint-disable-next-line @stylistic/operator-linebreak -- JSDoc
7826
7914
  :
7827
7915
  /**
7828
7916
  * @param {{
@@ -7864,13 +7952,12 @@
7864
7952
  if (record) {
7865
7953
  records.push(decode$1(record));
7866
7954
  if (unboundedDisallowed) {
7867
- return "break";
7955
+ return 1; // break
7868
7956
  }
7869
7957
  }
7870
7958
  };
7871
7959
  for (var i = 0; i < data.rows.length; i++) {
7872
- var _ret = _loop();
7873
- if (_ret === "break") break;
7960
+ if (_loop()) break;
7874
7961
  }
7875
7962
  } else {
7876
7963
  for (var _i = 0; _i < data.rows.length; _i++) {
@@ -7920,7 +8007,9 @@
7920
8007
  sql.push('AND (');
7921
8008
  /** @type {import('./Key.js').KeyPathArray} */
7922
8009
  range.forEach(function (innerKey, i) {
7923
- if (i > 0) sql.push('OR');
8010
+ if (i > 0) {
8011
+ sql.push('OR');
8012
+ }
7924
8013
  sql.push(escapeIndexNameForSQL(index.name), "LIKE ? ESCAPE '^' ");
7925
8014
  sqlValues.push('%' + sqlLIKEEscape( /** @type {string} */_encode(innerKey, index.multiEntry)) + '%');
7926
8015
  });
@@ -8068,20 +8157,24 @@
8068
8157
  me.__pendingName = oldName;
8069
8158
  var sql = 'UPDATE __sys__ SET "name" = ? WHERE "name" = ?';
8070
8159
  var sqlValues = [escapeSQLiteStatement(name), escapeSQLiteStatement(oldName)];
8071
- CFG.DEBUG && console.log(sql, sqlValues);
8160
+ if (CFG.DEBUG) {
8161
+ console.log(sql, sqlValues);
8162
+ }
8072
8163
  /** @type {import('./IDBTransaction.js').IDBTransactionFull} */
8073
8164
  me.transaction.__addNonRequestToTransactionQueue(function objectStoreClear(tx, args, success, error) {
8074
- tx.executeSql(sql, sqlValues, function (tx, data) {
8165
+ tx.executeSql(sql, sqlValues, function (tx) {
8075
8166
  // This SQL preserves indexes per https://www.sqlite.org/lang_altertable.html
8076
8167
  var sql = 'ALTER TABLE ' + escapeStoreNameForSQL(oldName) + ' RENAME TO ' + escapeStoreNameForSQL(name);
8077
- CFG.DEBUG && console.log(sql);
8078
- tx.executeSql(sql, [], function (tx, data) {
8168
+ if (CFG.DEBUG) {
8169
+ console.log(sql);
8170
+ }
8171
+ tx.executeSql(sql, [], function () {
8079
8172
  delete me.__pendingName;
8080
8173
  success();
8081
8174
  });
8082
8175
  }, function (tx, err) {
8083
8176
  error(err);
8084
- return true;
8177
+ return false;
8085
8178
  });
8086
8179
  });
8087
8180
  }
@@ -8160,15 +8253,19 @@
8160
8253
  * @returns {boolean}
8161
8254
  */
8162
8255
  function error(tx, err) {
8163
- CFG.DEBUG && console.log(err);
8256
+ if (CFG.DEBUG) {
8257
+ console.log(err);
8258
+ }
8164
8259
  failure(createDOMException('UnknownError', 'Could not create object store "' + storeName + '"', err));
8165
- return true;
8260
+ return false;
8166
8261
  }
8167
8262
  var escapedStoreNameSQL = escapeStoreNameForSQL(storeName);
8168
8263
  // key INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE
8169
8264
  var sql = ['CREATE TABLE', escapedStoreNameSQL, '(key BLOB', store.autoIncrement ? 'UNIQUE, inc INTEGER PRIMARY KEY AUTOINCREMENT' : 'PRIMARY KEY', ', value BLOB)'].join(' ');
8170
- CFG.DEBUG && console.log(sql);
8171
- tx.executeSql(sql, [], function (tx, data) {
8265
+ if (CFG.DEBUG) {
8266
+ console.log(sql);
8267
+ }
8268
+ tx.executeSql(sql, [], function (tx) {
8172
8269
  /**
8173
8270
  * @returns {void}
8174
8271
  */
@@ -8222,9 +8319,11 @@
8222
8319
  * @returns {boolean}
8223
8320
  */
8224
8321
  function error(tx, err) {
8225
- CFG.DEBUG && console.log(err);
8322
+ if (CFG.DEBUG) {
8323
+ console.log(err);
8324
+ }
8226
8325
  failure(createDOMException('UnknownError', 'Could not delete ObjectStore', err));
8227
- return true;
8326
+ return false;
8228
8327
  }
8229
8328
  tx.executeSql('SELECT "name" FROM __sys__ WHERE "name" = ?', [escapeSQLiteStatement(store.__currentName)], function (tx, data) {
8230
8329
  if (data.rows.length > 0) {
@@ -8341,6 +8440,7 @@
8341
8440
  if (me.autoIncrement) {
8342
8441
  // If auto-increment and no valid primaryKey found on the keyPath, get and set the new value, and use
8343
8442
  if (key === undefined) {
8443
+ // @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
8344
8444
  generateKeyForStore(tx, me, function (failure, key, oldCn) {
8345
8445
  if (failure) {
8346
8446
  failCb(createDOMException('ConstraintError', 'The key generator\'s current number has reached the maximum safe integer limit'));
@@ -8354,6 +8454,7 @@
8354
8454
  success(key, oldCn);
8355
8455
  }, failCb);
8356
8456
  } else {
8457
+ // @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
8357
8458
  possiblyUpdateKeyGenerator(tx, me, key, keyCloneThenSuccess, failCb);
8358
8459
  }
8359
8460
  // Not auto-increment
@@ -8476,13 +8577,15 @@
8476
8577
  sqlEnd.push('?)');
8477
8578
  insertSqlValues.push(escapeSQLiteStatement(encoded));
8478
8579
  var insertSql = sqlStart.join(' ') + sqlEnd.join(' ');
8479
- CFG.DEBUG && console.log('SQL for adding', insertSql, insertSqlValues);
8480
- tx.executeSql(insertSql, insertSqlValues, function (tx, data) {
8580
+ if (CFG.DEBUG) {
8581
+ console.log('SQL for adding', insertSql, insertSqlValues);
8582
+ }
8583
+ tx.executeSql(insertSql, insertSqlValues, function () {
8481
8584
  success(clonedKeyOrCurrentNumber);
8482
8585
  }, function (tx, err) {
8483
8586
  // Should occur for `add` operation
8484
8587
  error(createDOMException('ConstraintError', /** @type {string} */err.message, err));
8485
- return true;
8588
+ return false;
8486
8589
  });
8487
8590
  return undefined;
8488
8591
  })["catch"](function (err) {
@@ -8495,6 +8598,7 @@
8495
8598
  error(err);
8496
8599
  }
8497
8600
  if (typeof oldCn === 'number') {
8601
+ // @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
8498
8602
  assignCurrentNumber(tx, me, oldCn, fail, fail);
8499
8603
  return null;
8500
8604
  }
@@ -8539,7 +8643,7 @@
8539
8643
  * @this {IDBObjectStoreFull}
8540
8644
  * @returns {import('./IDBRequest.js').IDBRequestFull}
8541
8645
  */
8542
- IDBObjectStore.prototype.put = function (value /*, key */) {
8646
+ IDBObjectStore.prototype.put = function (value /* , key */) {
8543
8647
  var me = this;
8544
8648
  // eslint-disable-next-line prefer-rest-params
8545
8649
  var key = arguments[1];
@@ -8578,11 +8682,13 @@
8578
8682
  var sql = 'DELETE FROM ' + escapeStoreNameForSQL(me.__currentName) + ' WHERE "key" = ?';
8579
8683
  var encodedKey = /** @type {string} */_encode(key);
8580
8684
  tx.executeSql(sql, [escapeSQLiteStatement(encodedKey)], function (tx, data) {
8581
- CFG.DEBUG && console.log('Did the row with the', key, 'exist?', data.rowsAffected);
8685
+ if (CFG.DEBUG) {
8686
+ console.log('Did the row with the', key, 'exist?', data.rowsAffected);
8687
+ }
8582
8688
  cb(tx);
8583
8689
  }, function (tx, err) {
8584
8690
  error(err);
8585
- return true;
8691
+ return false;
8586
8692
  });
8587
8693
  };
8588
8694
 
@@ -8661,46 +8767,51 @@
8661
8767
  sql.push('LIMIT', String(count));
8662
8768
  }
8663
8769
  var sqlStr = sql.join(' ');
8664
- return (/** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreGet(tx, args, success, error) {
8665
- CFG.DEBUG && console.log('Fetching', me.__currentName, sqlValues);
8666
- tx.executeSql(sqlStr, sqlValues, function (tx, data) {
8667
- CFG.DEBUG && console.log('Fetched data', data);
8668
- var ret;
8669
- try {
8670
- // Opera can't deal with the try-catch here.
8671
- if (data.rows.length === 0) {
8672
- if (getAll) {
8673
- success([]);
8674
- } else {
8675
- success();
8676
- }
8677
- return;
8678
- }
8679
- ret = [];
8680
- if (getKey) {
8681
- for (var i = 0; i < data.rows.length; i++) {
8682
- // Key.convertValueToKey(data.rows.item(i).key); // Already validated before storage
8683
- ret.push(_decode(unescapeSQLiteResponse(data.rows.item(i).key), false));
8684
- }
8770
+ return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreGet(tx, args, success, error) {
8771
+ if (CFG.DEBUG) {
8772
+ console.log('Fetching', me.__currentName, sqlValues);
8773
+ }
8774
+ tx.executeSql(sqlStr, sqlValues, function (tx, data) {
8775
+ if (CFG.DEBUG) {
8776
+ console.log('Fetched data', data);
8777
+ }
8778
+ var ret;
8779
+ try {
8780
+ // Opera can't deal with the try-catch here.
8781
+ if (data.rows.length === 0) {
8782
+ if (getAll) {
8783
+ success([]);
8685
8784
  } else {
8686
- for (var _i = 0; _i < data.rows.length; _i++) {
8687
- ret.push(decode(unescapeSQLiteResponse(data.rows.item(_i).value)));
8688
- }
8785
+ success();
8689
8786
  }
8690
- if (!getAll) {
8691
- ret = ret[0];
8787
+ return;
8788
+ }
8789
+ ret = [];
8790
+ if (getKey) {
8791
+ for (var i = 0; i < data.rows.length; i++) {
8792
+ // Key.convertValueToKey(data.rows.item(i).key); // Already validated before storage
8793
+ ret.push(_decode(unescapeSQLiteResponse(data.rows.item(i).key), false));
8794
+ }
8795
+ } else {
8796
+ for (var _i = 0; _i < data.rows.length; _i++) {
8797
+ ret.push(decode(unescapeSQLiteResponse(data.rows.item(_i).value)));
8692
8798
  }
8693
- } catch (e) {
8694
- // If no result is returned, or error occurs when parsing JSON
8695
- CFG.DEBUG && console.log(e);
8696
8799
  }
8697
- success(ret);
8698
- }, function (tx, err) {
8699
- error(err);
8700
- return true;
8701
- });
8702
- }, undefined, me)
8703
- );
8800
+ if (!getAll) {
8801
+ ret = ret[0];
8802
+ }
8803
+ } catch (e) {
8804
+ // If no result is returned, or error occurs when parsing JSON
8805
+ if (CFG.DEBUG) {
8806
+ console.log(e);
8807
+ }
8808
+ }
8809
+ success(ret);
8810
+ }, function (tx, err) {
8811
+ error(err);
8812
+ return false;
8813
+ });
8814
+ }, undefined, me);
8704
8815
  };
8705
8816
 
8706
8817
  /**
@@ -8781,21 +8892,23 @@
8781
8892
  var sqlValues = [];
8782
8893
  setSQLForKeyRange(range, sqlQuote('key'), sqlArr, sqlValues);
8783
8894
  var sql = sqlArr.join(' ');
8784
- return (/** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreDelete(tx, args, success, error) {
8785
- CFG.DEBUG && console.log('Deleting', me.__currentName, sqlValues);
8786
- tx.executeSql(sql, sqlValues, function (tx, data) {
8787
- CFG.DEBUG && console.log('Deleted from database', data.rowsAffected);
8788
- me.__cursors.forEach(function (cursor) {
8789
- cursor.__invalidateCache(); // Delete
8790
- });
8791
-
8792
- success();
8793
- }, function (tx, err) {
8794
- error(err);
8795
- return true;
8895
+ return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreDelete(tx, args, success, error) {
8896
+ if (CFG.DEBUG) {
8897
+ console.log('Deleting', me.__currentName, sqlValues);
8898
+ }
8899
+ tx.executeSql(sql, sqlValues, function (tx, data) {
8900
+ if (CFG.DEBUG) {
8901
+ console.log('Deleted from database', data.rowsAffected);
8902
+ }
8903
+ me.__cursors.forEach(function (cursor) {
8904
+ cursor.__invalidateCache(); // Delete
8796
8905
  });
8797
- }, undefined, me)
8798
- );
8906
+ success();
8907
+ }, function (tx, err) {
8908
+ error(err);
8909
+ return false;
8910
+ });
8911
+ }, undefined, me);
8799
8912
  };
8800
8913
 
8801
8914
  /**
@@ -8811,20 +8924,20 @@
8811
8924
  IDBTransaction.__assertActive(me.transaction);
8812
8925
  /** @type {import('./IDBTransaction.js').IDBTransactionFull} */
8813
8926
  me.transaction.__assertWritable();
8814
- return (/** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreClear(tx, args, success, error) {
8815
- tx.executeSql('DELETE FROM ' + escapeStoreNameForSQL(me.__currentName), [], function (tx, data) {
8816
- CFG.DEBUG && console.log('Cleared all records from database', data.rowsAffected);
8817
- me.__cursors.forEach(function (cursor) {
8818
- cursor.__invalidateCache(); // Clear
8819
- });
8820
-
8821
- success();
8822
- }, function (tx, err) {
8823
- error(err);
8824
- return true;
8927
+ return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreClear(tx, args, success, error) {
8928
+ tx.executeSql('DELETE FROM ' + escapeStoreNameForSQL(me.__currentName), [], function (tx, data) {
8929
+ if (CFG.DEBUG) {
8930
+ console.log('Cleared all records from database', data.rowsAffected);
8931
+ }
8932
+ me.__cursors.forEach(function (cursor) {
8933
+ cursor.__invalidateCache(); // Clear
8825
8934
  });
8826
- }, undefined, me)
8827
- );
8935
+ success();
8936
+ }, function (tx, err) {
8937
+ error(err);
8938
+ return false;
8939
+ });
8940
+ }, undefined, me);
8828
8941
  };
8829
8942
 
8830
8943
  /**
@@ -9287,7 +9400,6 @@
9287
9400
  this.__setOptions({
9288
9401
  legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
9289
9402
  });
9290
-
9291
9403
  this.__transactions = [];
9292
9404
 
9293
9405
  /** @type {{[key: string]: IDBObjectStore}} */
@@ -9502,6 +9614,7 @@
9502
9614
  me.close();
9503
9615
  var ct = 0;
9504
9616
  me.__transactions.forEach(function (trans) {
9617
+ // eslint-disable-next-line camelcase -- Clear API
9505
9618
  trans.on__abort = function () {
9506
9619
  ct++;
9507
9620
  if (ct === me.__transactions.length) {
@@ -9813,14 +9926,14 @@
9813
9926
  deleteTables(i + 1);
9814
9927
  }, function () {
9815
9928
  deleteTables(i + 1);
9816
- return true;
9929
+ return false;
9817
9930
  });
9818
9931
  }
9819
9932
  })(0);
9820
- }, function (e) {
9933
+ }, function () {
9821
9934
  // __sys__ table does not exist, but that does not mean delete did not happen
9822
9935
  databaseDeleted();
9823
- return true;
9936
+ return false;
9824
9937
  });
9825
9938
  });
9826
9939
  }
@@ -9846,7 +9959,9 @@
9846
9959
  */
9847
9960
  function sysDbCreateError(tx, err) {
9848
9961
  var er = webSQLErrback( /** @type {SQLError} */err || tx);
9849
- CFG.DEBUG && console.log('Error in sysdb transaction - when creating dbVersions', err);
9962
+ if (CFG.DEBUG) {
9963
+ console.log('Error in sysdb transaction - when creating dbVersions', err);
9964
+ }
9850
9965
  failure(er);
9851
9966
  }
9852
9967
  if (sysdb) {
@@ -9961,9 +10076,9 @@
9961
10076
  */
9962
10077
  function dbCreateError(tx, err) {
9963
10078
  if (calledDbCreateError) {
9964
- return true;
10079
+ return false;
9965
10080
  }
9966
- var er = err ? webSQLErrback(err) : /** @type {Error} */tx;
10081
+ var er = err ? webSQLErrback(err) : ( /** @type {Error} */tx);
9967
10082
  calledDbCreateError = true;
9968
10083
  // Re: why bubbling here (and how cancelable is only really relevant for `window.onerror`) see: https://github.com/w3c/IndexedDB/issues/86
9969
10084
  var evt = createEvent('error', er, {
@@ -9974,7 +10089,7 @@
9974
10089
  req.__error = er;
9975
10090
  req.__result = undefined; // Must be undefined if an error per `result` getter
9976
10091
  req.dispatchEvent(evt);
9977
- return true;
10092
+ return false;
9978
10093
  }
9979
10094
 
9980
10095
  /**
@@ -10047,7 +10162,6 @@
10047
10162
  // In browser, should auto-commit
10048
10163
  cb(); // eslint-disable-line promise/no-callback-in-promise
10049
10164
  };
10050
-
10051
10165
  sysdb.transaction(function (systx) {
10052
10166
  /**
10053
10167
  * @returns {void}
@@ -10061,7 +10175,7 @@
10061
10175
  req.__result = connection;
10062
10176
  connection.__upgradeTransaction = req.__transaction = req.__result.__versionTransaction = IDBTransaction.__createInstance(req.__result, req.__result.objectStoreNames, 'versionchange');
10063
10177
  req.__done = true;
10064
- req.transaction.__addNonRequestToTransactionQueue(function onupgradeneeded(tx, args, finished, error) {
10178
+ req.transaction.__addNonRequestToTransactionQueue(function onupgradeneeded(tx, args, finished /* , error */) {
10065
10179
  req.dispatchEvent(e);
10066
10180
  if (e.__legacyOutputDidListenersThrowError) {
10067
10181
  logError('Error', 'An error occurred in an upgradeneeded handler attached to request chain', /** @type {Error} */e.__legacyOutputDidListenersThrowError); // We do nothing else with this error as per spec
@@ -10070,6 +10184,8 @@
10070
10184
  }
10071
10185
  finished();
10072
10186
  });
10187
+
10188
+ // eslint-disable-next-line camelcase -- Clear API
10073
10189
  req.transaction.on__beforecomplete = function (ev) {
10074
10190
  connection.__upgradeTransaction = null;
10075
10191
  /** @type {import('./IDBDatabase.js').IDBDatabaseFull} */
@@ -10079,9 +10195,11 @@
10079
10195
  ev.complete();
10080
10196
  req.__transaction = null;
10081
10197
  });
10082
- return true;
10198
+ return false;
10083
10199
  });
10084
10200
  };
10201
+
10202
+ // eslint-disable-next-line camelcase -- Clear API
10085
10203
  req.transaction.on__preabort = function () {
10086
10204
  connection.__upgradeTransaction = null;
10087
10205
  // We ensure any cache is deleted before any request error events fire and try to reopen
@@ -10091,6 +10209,8 @@
10091
10209
  }
10092
10210
  }
10093
10211
  };
10212
+
10213
+ // eslint-disable-next-line camelcase -- Clear API
10094
10214
  req.transaction.on__abort = function () {
10095
10215
  req.__transaction = null;
10096
10216
  // `readyState` and `result` will be reset anyways by `dbCreateError` but we follow spec.
@@ -10104,13 +10224,15 @@
10104
10224
  cleanupDatabaseResources(me.__openDatabase, name, escapedDatabaseName, dbCreateError.bind(null, err),
10105
10225
  // @ts-expect-error It's ok
10106
10226
  reportError || dbCreateError);
10107
- return true;
10227
+ return false;
10108
10228
  }
10109
10229
  dbCreateError(err);
10110
- return true;
10230
+ return false;
10111
10231
  });
10112
10232
  });
10113
10233
  };
10234
+
10235
+ // eslint-disable-next-line camelcase -- Clear API
10114
10236
  req.transaction.on__complete = function () {
10115
10237
  if ( /** @type {import('./IDBDatabase.js').IDBDatabaseFull} */req.__result.__closePending) {
10116
10238
  req.__transaction = null;
@@ -10137,7 +10259,6 @@
10137
10259
  // });
10138
10260
  };
10139
10261
  }
10140
-
10141
10262
  if (oldVersion === 0) {
10142
10263
  systx.executeSql('INSERT INTO dbVersions VALUES (?,?)', [sqlSafeName, version], versionSet, dbCreateError);
10143
10264
  } else {
@@ -10218,7 +10339,7 @@
10218
10339
  }, /** @type {SQLStatementErrorCallback} */dbCreateError);
10219
10340
  }, dbCreateError);
10220
10341
  }
10221
- addRequestToConnectionQueue(req, name, /* origin */undefined, function (req) {
10342
+ addRequestToConnectionQueue(req, name, /* origin */undefined, function () {
10222
10343
  var latestCachedVersion;
10223
10344
  if (useDatabaseCache) {
10224
10345
  if (!(name in websqlDBCache)) {
@@ -10275,7 +10396,6 @@
10275
10396
  } catch (err) {
10276
10397
  throw err; // throw new TypeError('You have supplied a database name which does not match the currently supported configuration, possibly due to a length limit enforced for Node compatibility.');
10277
10398
  }
10278
-
10279
10399
  var useMemoryDatabase = typeof CFG.memoryDatabase === 'string';
10280
10400
  var useDatabaseCache = CFG.cacheDatabaseInstances !== false || useMemoryDatabase;
10281
10401
  var req = IDBOpenDBRequest.__createInstance();
@@ -10303,7 +10423,7 @@
10303
10423
  */
10304
10424
  function dbError(tx, err) {
10305
10425
  if (calledDBError || err === true) {
10306
- return true;
10426
+ return false;
10307
10427
  }
10308
10428
  var er = webSQLErrback( /** @type {SQLError} */err || tx);
10309
10429
  sysdbFinishedCbDelete(true, function () {
@@ -10318,7 +10438,7 @@
10318
10438
  req.dispatchEvent(e);
10319
10439
  calledDBError = true;
10320
10440
  });
10321
- return true;
10441
+ return false;
10322
10442
  }
10323
10443
  addRequestToConnectionQueue(req, name, /* origin */undefined, function (req) {
10324
10444
  createSysDB(me.__openDatabase, function () {
@@ -10345,7 +10465,6 @@
10345
10465
  if (useDatabaseCache && name in websqlDBCache) {
10346
10466
  delete websqlDBCache[name]; // New calls will treat as though never existed
10347
10467
  }
10348
-
10349
10468
  delete me.__connections[name];
10350
10469
  completeDatabaseDelete();
10351
10470
  });
@@ -10447,12 +10566,12 @@
10447
10566
  */
10448
10567
  function dbGetDatabaseNamesError(tx, err) {
10449
10568
  if (calledDbCreateError) {
10450
- return true;
10569
+ return false;
10451
10570
  }
10452
10571
  var er = err ? webSQLErrback( /** @type {SQLError} */err) : tx;
10453
10572
  calledDbCreateError = true;
10454
10573
  reject(er);
10455
- return true;
10574
+ return false;
10456
10575
  }
10457
10576
  createSysDB(me.__openDatabase, function () {
10458
10577
  sysdb.readTransaction(function (sysReadTx) {
@@ -10767,25 +10886,33 @@
10767
10886
  sql.push('LIMIT', String(recordsToLoad));
10768
10887
  }
10769
10888
  var sqlStr = sql.join(' ');
10770
- CFG.DEBUG && console.log(sqlStr, sqlValues);
10889
+ if (CFG.DEBUG) {
10890
+ console.log(sqlStr, sqlValues);
10891
+ }
10771
10892
  tx.executeSql(sqlStr, sqlValues, function (tx, data) {
10772
10893
  if (me.__count) {
10773
10894
  success(undefined, data.rows.length, undefined);
10774
10895
  } else if (data.rows.length > 1) {
10775
10896
  me.__prefetchedIndex = 0;
10776
10897
  me.__prefetchedData = data.rows;
10777
- CFG.DEBUG && console.log('Preloaded ' + me.__prefetchedData.length + ' records for cursor');
10898
+ if (CFG.DEBUG) {
10899
+ console.log('Preloaded ' + me.__prefetchedData.length + ' records for cursor');
10900
+ }
10778
10901
  me.__decode(data.rows.item(0), success);
10779
10902
  } else if (data.rows.length === 1) {
10780
10903
  me.__decode(data.rows.item(0), success);
10781
10904
  } else {
10782
- CFG.DEBUG && console.log('Reached end of cursors');
10905
+ if (CFG.DEBUG) {
10906
+ console.log('Reached end of cursors');
10907
+ }
10783
10908
  success(undefined, undefined, undefined);
10784
10909
  }
10785
10910
  }, function (tx, err) {
10786
- CFG.DEBUG && console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
10911
+ if (CFG.DEBUG) {
10912
+ console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
10913
+ }
10787
10914
  error(err);
10788
- return true;
10915
+ return false;
10789
10916
  });
10790
10917
  };
10791
10918
  var leftBracketRegex = /\[/g;
@@ -10803,7 +10930,9 @@
10803
10930
  IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, error) {
10804
10931
  var me = this;
10805
10932
  if (me.__prefetchedData && me.__prefetchedData.length === me.__prefetchedIndex) {
10806
- CFG.DEBUG && console.log('Reached end of multiEntry cursor');
10933
+ if (CFG.DEBUG) {
10934
+ console.log('Reached end of multiEntry cursor');
10935
+ }
10807
10936
  success(undefined, undefined, undefined);
10808
10937
  return;
10809
10938
  }
@@ -10855,7 +10984,9 @@
10855
10984
  }
10856
10985
  }
10857
10986
  var sqlStr = sql.join(' ');
10858
- CFG.DEBUG && console.log(sqlStr, sqlValues);
10987
+ if (CFG.DEBUG) {
10988
+ console.log(sqlStr, sqlValues);
10989
+ }
10859
10990
  tx.executeSql(sqlStr, sqlValues, function (tx, data) {
10860
10991
  if (data.rows.length > 0) {
10861
10992
  if (me.__count) {
@@ -10884,8 +11015,8 @@
10884
11015
  * @type {RowItemNonNull}
10885
11016
  */
10886
11017
  var clone = {
10887
- matchingKey: /** @type {string} */
10888
- _encode(matchingKey, true),
11018
+ matchingKey: ( /** @type {string} */
11019
+ _encode(matchingKey, true)),
10889
11020
  key: _rowItem.key
10890
11021
  };
10891
11022
  clone[me.__keyColumnName] = _rowItem[me.__keyColumnName];
@@ -10927,23 +11058,33 @@
10927
11058
  return this.data[index];
10928
11059
  }
10929
11060
  };
10930
- CFG.DEBUG && console.log('Preloaded ' + me.__prefetchedData.length + ' records for multiEntry cursor');
11061
+ if (CFG.DEBUG) {
11062
+ console.log('Preloaded ' + me.__prefetchedData.length + ' records for multiEntry cursor');
11063
+ }
10931
11064
  me.__decode(rows[0], success);
10932
11065
  } else if (rows.length === 1) {
10933
- CFG.DEBUG && console.log('Reached end of multiEntry cursor');
11066
+ if (CFG.DEBUG) {
11067
+ console.log('Reached end of multiEntry cursor');
11068
+ }
10934
11069
  me.__decode(rows[0], success);
10935
11070
  } else {
10936
- CFG.DEBUG && console.log('Reached end of multiEntry cursor');
11071
+ if (CFG.DEBUG) {
11072
+ console.log('Reached end of multiEntry cursor');
11073
+ }
10937
11074
  success(undefined, undefined, undefined);
10938
11075
  }
10939
11076
  } else {
10940
- CFG.DEBUG && console.log('Reached end of multiEntry cursor');
11077
+ if (CFG.DEBUG) {
11078
+ console.log('Reached end of multiEntry cursor');
11079
+ }
10941
11080
  success(undefined, undefined, undefined);
10942
11081
  }
10943
11082
  }, function (tx, err) {
10944
- CFG.DEBUG && console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
11083
+ if (CFG.DEBUG) {
11084
+ console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
11085
+ }
10945
11086
  error(err);
10946
- return true;
11087
+ return false;
10947
11088
  });
10948
11089
  };
10949
11090
 
@@ -11032,7 +11173,7 @@
11032
11173
  var key = _decode(encKey, me.__multiEntryIndex);
11033
11174
  var val = me.__valueDecoder.decode(encVal);
11034
11175
  var primaryKey = _decode(encPrimaryKey);
11035
- callback(key, val, primaryKey, encKey /*, encVal, encPrimaryKey */);
11176
+ callback(key, val, primaryKey, encKey /* , encVal, encPrimaryKey */);
11036
11177
  };
11037
11178
 
11038
11179
  /**
@@ -11244,7 +11385,9 @@
11244
11385
  */
11245
11386
  IDBCursor.prototype.update = function (valueToUpdate) {
11246
11387
  var me = this;
11247
- if (!arguments.length) throw new TypeError('A value must be passed to update()');
11388
+ if (!arguments.length) {
11389
+ throw new TypeError('A value must be passed to update()');
11390
+ }
11248
11391
  IDBTransaction.__assertActive(me.__store.transaction);
11249
11392
  /** @type {import('./IDBTransaction.js').IDBTransactionFull} */
11250
11393
  me.__store.transaction.__assertWritable();
@@ -11298,28 +11441,29 @@
11298
11441
  if (me.__keyOnly) {
11299
11442
  throw createDOMException('InvalidStateError', 'This cursor method cannot be called when the key only flag has been set.');
11300
11443
  }
11301
- return (/** @type {import('./IDBTransaction.js').IDBTransactionFull} */this.__store.transaction.__addToTransactionQueue(function cursorDelete(tx, args, success, error) {
11302
- me.__find(undefined, undefined, tx, /** @type {KeySuccess} */
11303
- function (key, value, primaryKey) {
11304
- var sql = 'DELETE FROM ' + escapeStoreNameForSQL(me.__store.__currentName) + ' WHERE "key" = ?';
11305
- CFG.DEBUG && console.log(sql, key, primaryKey);
11306
- // Key.convertValueToKey(primaryKey); // Already checked when entered
11307
- tx.executeSql(sql, [escapeSQLiteStatement( /** @type {string} */_encode(primaryKey))], function (tx, data) {
11308
- if (data.rowsAffected === 1) {
11309
- // We don't invalidate the cache (as we don't access it anymore
11310
- // and it will set the index off)
11311
- success(undefined);
11312
- } else {
11313
- // @ts-expect-error Apparently ok
11314
- error('No rows with key found' + key);
11315
- }
11316
- }, function (tx, data) {
11317
- error(data);
11318
- return true;
11319
- });
11320
- }, error);
11321
- }, undefined, me)
11322
- );
11444
+ return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */this.__store.transaction.__addToTransactionQueue(function cursorDelete(tx, args, success, error) {
11445
+ me.__find(undefined, undefined, tx, /** @type {KeySuccess} */
11446
+ function (key, value, primaryKey) {
11447
+ var sql = 'DELETE FROM ' + escapeStoreNameForSQL(me.__store.__currentName) + ' WHERE "key" = ?';
11448
+ if (CFG.DEBUG) {
11449
+ console.log(sql, key, primaryKey);
11450
+ }
11451
+ // Key.convertValueToKey(primaryKey); // Already checked when entered
11452
+ tx.executeSql(sql, [escapeSQLiteStatement( /** @type {string} */_encode(primaryKey))], function (tx, data) {
11453
+ if (data.rowsAffected === 1) {
11454
+ // We don't invalidate the cache (as we don't access it anymore
11455
+ // and it will set the index off)
11456
+ success(undefined);
11457
+ } else {
11458
+ // @ts-expect-error Apparently ok
11459
+ error('No rows with key found' + key);
11460
+ }
11461
+ }, function (tx, data) {
11462
+ error(data);
11463
+ return false;
11464
+ });
11465
+ }, error);
11466
+ }, undefined, me);
11323
11467
  };
11324
11468
  IDBCursor.prototype[Symbol.toStringTag] = 'IDBCursorPrototype';
11325
11469
  defineReadonlyOuterInterface(IDBCursor.prototype, ['source', 'direction', 'key', 'primaryKey', 'request']);
@@ -11517,8 +11661,7 @@
11517
11661
  }
11518
11662
  } else {
11519
11663
  var o = _defineAccessor("get", {}, name, function () {
11520
- return (/** @type {AnyFunction} */ /** @type {PropertyDescriptor} */propDesc.get.call(this)
11521
- );
11664
+ return /** @type {AnyFunction} */( /** @type {PropertyDescriptor} */propDesc.get).call(this);
11522
11665
  });
11523
11666
  desc = /** @type {PropertyDescriptor} */
11524
11667
  Object.getOwnPropertyDescriptor(o, name);
@@ -11533,7 +11676,9 @@
11533
11676
 
11534
11677
  // @ts-expect-error It's ok
11535
11678
  if (IDB[name] !== value) {
11536
- typeof console !== 'undefined' && console.warn && console.warn('Unable to shim ' + name);
11679
+ if (typeof console !== 'undefined' && console.warn) {
11680
+ console.warn('Unable to shim ' + name);
11681
+ }
11537
11682
  }
11538
11683
  }
11539
11684
  if (CFG.win.openDatabase !== undefined) {
@@ -11712,8 +11857,7 @@
11712
11857
  IDB.IDBCursor = IDB.IDBCursor || 'webkitIDBCursor' in IDB && IDB.webkitIDBCursor;
11713
11858
  IDB.IDBKeyRange = IDB.IDBKeyRange || 'webkitIDBKeyRange' in IDB && IDB.webkitIDBKeyRange;
11714
11859
  }
11715
- return (/** @type {ShimmedObject} */IDB
11716
- );
11860
+ return /** @type {ShimmedObject} */IDB;
11717
11861
  }
11718
11862
 
11719
11863
  /* eslint-env browser, worker */