text: /*! indexeddbshim - v9.0.0 - 2/26/2022 */
  !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e=Object.freeze({__proto__:null,UnicodeIDStart:"(?:[$A-Z_a-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\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\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\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\\u2071\\u207F\\u2090-\\u209C\\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-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\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\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF30-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\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\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE33\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F]|\\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\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F\\uDFE0]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\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]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43]|\\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])",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])"});function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t,n,r,u,o,i){try{var a=e[o](i),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,u)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){for(var n in t){(o=t[n]).configurable=o.enumerable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n,o)}if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),u=0;u<r.length;u++){var o,i=r[u];(o=t[i]).configurable=o.enumerable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i,o)}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function f(e,t,n){return(f=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var u=new(Function.bind.apply(e,r));return n&&s(u,n.prototype),u}).apply(null,arguments)}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,u,o=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){a=!0,u=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw u}}return o}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=d(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}var h=void 0!==E?E:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E=void 0!==h?h:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var b=0,g=1,F=2,A=3,C="undefined"==typeof DOMException?function(e,t){var n=new Error(e);return n.name=t,n}:DOMException,m=new WeakMap,B=new WeakMap,w=function(e){this[Symbol.toStringTag]="Event",this.toString=function(){return"[object Event]"};var t=Array.prototype.slice.call(arguments),n=t[1],r=t[2];if(!arguments.length)throw new TypeError("Failed to construct 'Event': 1 argument required, but only 0 present.");r=r||{};var u={};"composed"in(n=n||{})&&(u.composed=n.composed),m.set(this,r),B.set(this,u),this.initEvent(e,n.bubbles,n.cancelable),Object.defineProperties(this,["target","currentTarget","eventPhase","defaultPrevented"].reduce((function(e,t){return e[t]={get:function(){return void 0!==u[t]?u[t]:t in r?r[t]:"eventPhase"===t?0:"defaultPrevented"!==t&&null}},e}),{}));var o=["type","bubbles","cancelable","isTrusted","timeStamp","initEvent","composedPath","composed"];"[object CustomEvent]"===this.toString()&&o.push("detail","initCustomEvent"),Object.defineProperties(this,o.reduce((function(e,t){return e[t]={get:function(){return t in u?u[t]:t in r?r[t]:!["bubbles","cancelable","composed"].includes(t)&&void 0}},e}),{}))};w.prototype.preventDefault=function(){if(!(this instanceof w))throw new TypeError("Illegal invocation");var e=m.get(this),t=B.get(this);this.cancelable&&!t._passive&&(t.defaultPrevented=!0,"function"==typeof e.preventDefault&&e.preventDefault())},w.prototype.stopImmediatePropagation=function(){B.get(this)._stopImmediatePropagation=!0},w.prototype.stopPropagation=function(){B.get(this)._stopPropagation=!0},w.prototype.initEvent=function(e,t,n){var r=B.get(this);r._dispatched||(r.type=e,void 0!==t&&(r.bubbles=t),void 0!==n&&(r.cancelable=n))},["type","target","currentTarget"].forEach((function(e){Object.defineProperty(w.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})})),["eventPhase","defaultPrevented","bubbles","cancelable","timeStamp"].forEach((function(e){Object.defineProperty(w.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})})),["NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE"].forEach((function(e,t){Object.defineProperty(w,e,{enumerable:!0,writable:!1,value:t}),Object.defineProperty(w.prototype,e,{writable:!1,value:t})})),w[Symbol.toStringTag]="Function",w.prototype[Symbol.toStringTag]="EventPrototype",Object.defineProperty(w,"prototype",{writable:!1});var I=function(e){var t=Array.prototype.slice.call(arguments),n=t[1],r=t[2];w.call(this,e,n,r),this[Symbol.toStringTag]="CustomEvent",this.toString=function(){return"[object CustomEvent]"},n=n||{},this.initCustomEvent(e,n.bubbles,n.cancelable,"detail"in n?n.detail:null)};function S(e,t,n){var r=e[t];void 0===r&&(e[t]=r=[]),n="boolean"==typeof n?{capture:n}:n||{};var u=JSON.stringify(n);return{listenersByTypeOptions:r.filter((function(e){return u===JSON.stringify(e.options)})),options:n,listenersByType:r}}Object.defineProperty(I.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:I}),I.prototype.initCustomEvent=function(e,t,n,r){if(!(this instanceof I))throw new TypeError("Illegal invocation");var u=B.get(this);I.call(this,e,{bubbles:t,cancelable:n,detail:r},arguments[4]),u._dispatched||(void 0!==r&&(u.detail=r),Object.defineProperty(this,"detail",{get:function(){return u.detail}}))},I[Symbol.toStringTag]="Function",I.prototype[Symbol.toStringTag]="CustomEventPrototype",Object.defineProperty(I.prototype,"detail",{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}}),Object.defineProperty(I,"prototype",{writable:!1});var O={addListener:function(e,t,n,r){var u=S(e,n,r),o=u.listenersByTypeOptions;r=u.options;var i=u.listenersByType;o.some((function(e){return e.listener===t}))||i.push({listener:t,options:r})},removeListener:function(e,t,n,r){var u=S(e,n,r),o=u.listenersByType,i=JSON.stringify(u.options);o.some((function(r,u){return r.listener===t&&i===JSON.stringify(r.options)&&(o.splice(u,1),o.length||delete e[n],!0)}))},hasListener:function(e,t,n,r){return S(e,n,r).listenersByTypeOptions.some((function(e){return e.listener===t}))}};function T(){throw new TypeError("Illegal constructor")}Object.assign(T.prototype,["Early","","Late","Default"].reduce((function(e,t){return["add","remove","has"].forEach((function(n){e[n+t+"EventListener"]=function(e,r){var u=arguments[2];if(arguments.length<2)throw new TypeError("2 or more arguments required");if("string"!=typeof e)throw new C("UNSPECIFIED_EVENT_TYPE_ERR","UNSPECIFIED_EVENT_TYPE_ERR");try{r.handleEvent&&r.handleEvent.bind&&(r=r.handleEvent.bind(r))}catch(e){console.log("Uncaught `handleEvent` error",e)}var o="_"+t.toLowerCase()+(""===t?"l":"L")+"isteners";return this[o]||Object.defineProperty(this,o,{value:{}}),O[n+"Listener"](this[o],r,e,u)}})),e}),{})),Object.assign(T.prototype,{__setOptions:function(e){e=e||{},this._defaultSync=e.defaultSync,this._extraProperties=e.extraProperties||[],e.legacyOutputDidListenersThrowFlag&&(this._legacyOutputDidListenersThrowCheck=!0,this._extraProperties.push("__legacyOutputDidListenersThrowError"))},dispatchEvent:function(e){return this._dispatchEvent(e,!0)},_dispatchEvent:function(e,t){var n=this;["early","","late","default"].forEach((function(e){var t="_"+e+(""===e?"l":"L")+"isteners";n[t]||Object.defineProperty(n,t,{value:{}})}));var r,u=B.get(e);if(u&&t&&u._dispatched)throw new C("The object is in an invalid state.","InvalidStateError");u?r=e:(r=function(e){var t=e.bubbles,n=e.cancelable,r=e.detail,u=e.type;return"detail"in e?new I(u,{bubbles:t,cancelable:n,detail:r},e):new w(u,{bubbles:t,cancelable:n},e)}(e),(u=B.get(r))._dispatched=!0,this._extraProperties.forEach((function(t){t in e&&(r[t]=e[t])})));var o=r.type;function i(){u.eventPhase=b,u.currentTarget=null,delete u._children}function a(){u._stopImmediatePropagation=void 0,u._stopPropagation=void 0,r.defaultPrevented&&u.cancelable||(u.eventPhase=F,r.target.invokeCurrentListeners(r.target._defaultListeners,r,o)),i()}var c=function(){return u._stopImmediatePropagation=void 0,u._stopPropagation=void 0,n._defaultSync?a():setTimeout(a,0),u.eventPhase=F,u._stopPropagation||(u._stopImmediatePropagation=void 0,u._stopPropagation=void 0,r.target.invokeCurrentListeners(r.target._lateListeners,r,o)),i(),!r.defaultPrevented};switch(t&&(u.target=this),r.eventPhase){default:case b:if(u.eventPhase=F,this.invokeCurrentListeners(this._earlyListeners,r,o),!this.__getParent)return u.eventPhase=F,this._dispatchEvent(r,!1);for(var s=this,l=this;s.__getParent&&null!==(s=s.__getParent());)u._children||(u._children=[]),u._children.push(l),l=s;return l._defaultSync=this._defaultSync,u.eventPhase=g,l._dispatchEvent(r,!1);case g:if(u._stopPropagation)return c();this.invokeCurrentListeners(this._listeners,r,o);var f=u._children&&u._children.length&&u._children.pop();return f&&f!==r.target||(u.eventPhase=F),f&&(f._defaultSync=this._defaultSync),(f||this)._dispatchEvent(r,!1);case F:return u._stopPropagation?c():(this.invokeCurrentListeners(this._listeners,r,o,!0),u.bubbles?(u.eventPhase=A,this._dispatchEvent(r,!1)):c());case A:if(u._stopPropagation)return c();var D=this.__getParent&&this.__getParent();return D?(D.invokeCurrentListeners(D._listeners,r,o,!0),D._defaultSync=this._defaultSync,D._dispatchEvent(r,!1)):c()}},invokeCurrentListeners:function(e,t,n,r){var u=this,o=B.get(t);o.currentTarget=this;var i=S(e,n,{}).listenersByType.concat(),a=i.length?1:0;return i.some((function(e,i){var c=r?u["on"+n]:null;if(o._stopImmediatePropagation)return!0;i===a&&"function"==typeof c&&u.tryCatch(t,(function(){!1===c.call(t.currentTarget,t)&&t.preventDefault()}));var s=e.options,l=s.once,f=s.passive,D=s.capture;if(o._passive=f,D&&t.target!==t.currentTarget&&t.eventPhase===g||t.eventPhase===F||!D&&t.target!==t.currentTarget&&t.eventPhase===A){var _=e.listener;u.tryCatch(t,(function(){_.call(t.currentTarget,t)})),l&&u.removeEventListener(n,_,s)}return!1})),this.tryCatch(t,(function(){var e=r?u["on"+n]:null;"function"==typeof e&&i.length<2&&(!1===e.call(t.currentTarget,t)&&t.preventDefault())})),!t.defaultPrevented},tryCatch:function(e,t){try{t()}catch(t){this.triggerErrorEvent(t,e)}},triggerErrorEvent:function(e,t){var n,r=e;"string"==typeof e&&(r=new Error("Uncaught exception: "+e));var u=!1;"undefined"==typeof window||"undefined"==typeof ErrorEvent||window&&"object"===("undefined"==typeof window?"undefined":v(window))&&!window.dispatchEvent?(u=!0,n=function(){setTimeout((function(){throw r}))}):n=function(){var t=new ErrorEvent("error",{error:e,message:r.message||"",
  // We can't get the actually useful user's values!
  filename:r.fileName||"",lineno:r.lineNumber||0,colno:r.columnNumber||0});window.dispatchEvent(t)},u&&this._legacyOutputDidListenersThrowCheck||n(),this._legacyOutputDidListenersThrowCheck&&(t.__legacyOutputDidListenersThrowError=r)}}),T.prototype[Symbol.toStringTag]="EventTargetPrototype",Object.defineProperty(T,"prototype",{writable:!1});var N=T,x={createInstance:function(e){function t(){this.__setOptions(e)}return t.prototype=N.prototype,new t}};T.ShimEvent=w,T.ShimCustomEvent=I,T.ShimDOMException=C,T.ShimEventTarget=T,T.EventTargetFactory=x;var j={},P={};["DEBUG","cacheDatabaseInstances","autoName","fullIDLSupport","checkOrigin","cursorPreloadPackSize","UnicodeIDStart","UnicodeIDContinue","registerSCA","avoidAutoShim","win","DEFAULT_DB_SIZE","useSQLiteIndexes","fs","addNonIDBGlobals","replaceNonIDBGlobals","escapeDatabaseName","unescapeDatabaseName","databaseCharacterEscapeList","databaseNameLengthLimit","escapeNFDForDatabaseNames","addSQLiteExtension",["memoryDatabase",function(e){if(!/^(?::memory:|file::memory:(\?(?:(?!#)[\s\S])*)?(#(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?)?$/.test(e))throw new TypeError('`memoryDatabase` must be the empty string, ":memory:", or a "file::memory:[?queryString][#hash] URL".')}],"deleteDatabaseFiles","databaseBasePath","sysDatabaseBasePath","sqlBusyTimeout","sqlTrace","sqlProfile"].forEach((function(e){var t;if(Array.isArray(e)){var n=D(e,2);e=n[0],t=n[1]}Object.defineProperty(P,e,{get:function(){return j[e]},set:function(n){t&&t(n),j[e]=n}})}));var k=/[\xC0-\xC5\xC7-\xCF\xD1-\xD6\xD9-\xDD\xE0-\xE5\xE7-\xEF\xF1-\xF6\xF9-\xFD\xFF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165\u0168-\u017E\u01A0\u01A1\u01AF\u01B0\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B\u021E\u021F\u0226-\u0233\u0344\u0385\u0386\u0388-\u038A\u038C\u038E-\u0390\u03AA-\u03B0\u03CA-\u03CE\u03D3\u03D4\u0400\u0401\u0403\u0407\u040C-\u040E\u0419\u0439\u0450\u0451\u0453\u0457\u045C-\u045E\u0476\u0477\u04C1\u04C2\u04D0-\u04D3\u04D6\u04D7\u04DA-\u04DF\u04E2-\u04E7\u04EA-\u04F5\u04F8\u04F9\u0622-\u0626\u06C0\u06C2\u06D3\u0929\u0931\u0934\u0958-\u095F\u09CB\u09CC\u09DC\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B48\u0B4B\u0B4C\u0B5C\u0B5D\u0B94\u0BCA-\u0BCC\u0C48\u0CC0\u0CC7\u0CC8\u0CCA\u0CCB\u0D4A-\u0D4C\u0DDA\u0DDC-\u0DDE\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u0F73\u0F75\u0F76\u0F78\u0F81\u0F93\u0F9D\u0FA2\u0FA7\u0FAC\u0FB9\u1026\u1B06\u1B08\u1B0A\u1B0C\u1B0E\u1B12\u1B3B\u1B3D\u1B40\u1B41\u1B43\u1E00-\u1E99\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FC1-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEE\u1FF2-\u1FF4\u1FF6-\u1FFC\u212B\u219A\u219B\u21AE\u21CD-\u21CF\u2204\u2209\u220C\u2224\u2226\u2241\u2244\u2247\u2249\u2260\u2262\u226D-\u2271\u2274\u2275\u2278\u2279\u2280\u2281\u2284\u2285\u2288\u2289\u22AC-\u22AF\u22E0-\u22E3\u22EA-\u22ED\u2ADC\u304C\u304E\u3050\u3052\u3054\u3056\u3058\u305A\u305C\u305E\u3060\u3062\u3065\u3067\u3069\u3070\u3071\u3073\u3074\u3076\u3077\u3079\u307A\u307C\u307D\u3094\u309E\u30AC\u30AE\u30B0\u30B2\u30B4\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5\u30C7\u30C9\u30D0\u30D1\u30D3\u30D4\u30D6\u30D7\u30D9\u30DA\u30DC\u30DD\u30F4\u30F7-\u30FA\u30FE\uAC00-\uD7A3\uFB1D\uFB1F\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;function R(e){return e.replace(/((?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])))(?!(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))|(^|(?:(?![\uD800-\uDBFF](?![\uDC00-\uDFFF]))[\s\S]))((?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,(function(e,t,n,r){return t?"^2"+t.codePointAt().toString(16).padStart(4,"0"):(n||"")+"^3"+r.codePointAt().toString(16).padStart(4,"0")}))}function L(e){return"_"+R(e.replace(/\^/g,"^^").replace(/\0/g,"^0").replace(/([A-Z])/g,"^$1"))}function q(e){return R(e.replace(/\^/g,"^^").replace(/\0/g,"^0"))}function U(e){return function(e){return e.replace(/(\^+)3(d[0-9a-f]{3})/g,(function(e,t,n){return t.length%2?t.slice(1)+String.fromCodePoint(Number.parseInt(n,16)):e})).replace(/(\^+)2(d[0-9a-f]{3})/g,(function(e,t,n){return t.length%2?t.slice(1)+String.fromCodePoint(Number.parseInt(n,16)):e}))}(e).replace(/(\^+)0/g,(function(e,t){return t.length%2?t.slice(1)+"\0":e})).replace(/\^\^/g,"^")}function M(e){return e.replace(/"/g,'""')}function V(e){return'"'+M(e)+'"'}function K(e){if(P.escapeDatabaseName)return P.escapeDatabaseName(q(e));if(e="D"+L(e),!1!==P.escapeNFDForDatabaseNames&&(e=e.replace(new RegExp(k,"gu"),(function(e){return"^4"+e.codePointAt().toString(16).padStart(6,"0")}))),!1!==P.databaseCharacterEscapeList&&(e=e.replace(P.databaseCharacterEscapeList?new RegExp(P.databaseCharacterEscapeList,"gu"):/[\0-\x1F"\*\/:<>\?\\\|\x7F]/g,(function(e){return"^1"+e.charCodeAt().toString(16).padStart(2,"0")}))),!1!==P.databaseNameLengthLimit&&e.length>=(P.databaseNameLengthLimit||254)-(!1!==P.addSQLiteExtension?7:0))throw new Error("Unexpectedly long database name supplied; length limit required for Node compatibility; passed length: "+e.length+"; length limit setting: "+(P.databaseNameLengthLimit||254)+".");return e+(!1!==P.addSQLiteExtension?".sqlite":"")}function G(e){return V("S"+L(e))}function H(e){return V("I"+L(e))}function W(e){return"I"+L(e)}function Q(e){return M(e).replace(/\^/g,"^^")}function Y(e,t){return t[Symbol.hasInstance](e)}function $(e){return e&&"object"===r(e)}function X(e){return $(e)&&"function"==typeof e[Symbol.iterator]}function J(e,t){t.forEach((function(t){var n,r,u=(n={},(r={})[t]=r[t]||{},r[t].get=function(){throw new TypeError("Illegal invocation")},r[t]=r[t]||{},r[t].set=function(e){throw new TypeError("Illegal invocation")},a(n,r),n),o=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,o)}))}function z(e,t){t.forEach((function(t){var n,r,u=(n={},(r={})[t]=r[t]||{},r[t].get=function(){throw new TypeError("Illegal invocation")},a(n,r),n),o=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,o)}))}function Z(e,t){(t="string"==typeof t?[t]:t).forEach((function(t){var n,r,u=(n={},(r={})[t]=r[t]||{},r[t].get=function(){return e["__"+t]},r[t]=r[t]||{},r[t].set=function(n){e["__"+t]=n},a(n,r),n),o=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,o)})),t.forEach((function(t){e[t]=null}))}function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(t="string"==typeof t?[t]:t).forEach((function(t){var r,u,o;n&&t in n?r=n[t]:(Object.defineProperty(e,"__"+t,{enumerable:!1,configurable:!1,writable:!0}),u={},(o={})[t]=o[t]||{},o[t].get=function(){return this["__"+t]},a(u,o),r=u);var i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i)}))}function te(e){var t=P.UnicodeIDStart||"[$A-Z_a-z]",n=P.UnicodeIDContinue||"[$0-9A-Z_a-z]";return new RegExp("^"+("(?:"+t+"|[$_])")+("(?:"+n+"|[$_‌‍])")+"*$","u").test(e)}function ne(e){return"string"==typeof e&&(""===e||te(e)||e.split(".").every((function(e){return te(e)})))}function re(e){return ne(e)||Array.isArray(e)&&e.length&&_(e).every((function(e){return ne(e)}))}function ue(e,t){var n,r;switch(e=Math.floor(Number(e)),t){case"unsigned long long":n=9007199254740991,r=0;break;case"unsigned long":n=4294967295,r=0;break;default:throw new Error("Unrecognized type supplied to enforceRange")}if(!Number.isFinite(e)||e>n||e<r)throw new TypeError("Invalid range: "+e);return e}function oe(e,t){return null===e&&t?"":ie(e)}function ie(e){return""+e}function ae(e){return X(e)?_(e).map((function(e){return ie(e)})):ie(e)}function ce(e){return null==e}function se(e,t,n){var r=new w(e,n);return r.debug=t,r}Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return $(e)&&"target"in e&&"boolean"==typeof e.bubbles}});function le(e){w.call(this,e),this[Symbol.toStringTag]="IDBVersionChangeEvent",this.toString=function(){return"[object IDBVersionChangeEvent]"},this.__eventInitDict=arguments[1]||{}}function fe(e,t){return new DOMException.prototype.constructor(t,e||"DOMException")}le.prototype=Object.create(w.prototype),le.prototype[Symbol.toStringTag]="IDBVersionChangeEventPrototype",["oldVersion","newVersion"].forEach((function(e){var t,n,r=(t={},(n={})[e]=n[e]||{},n[e].get=function(){if(!(this instanceof le))throw new TypeError("Illegal invocation");return this.__eventInitDict&&this.__eventInitDict[e]||("oldVersion"===e?0:null)},a(t,n),t),u=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(le.prototype,e,u)})),Object.defineProperty(le,Symbol.hasInstance,{value:function(e){return $(e)&&"oldVersion"in e&&"boolean"==typeof e.defaultPrevented}}),Object.defineProperty(le.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:le}),Object.defineProperty(le,"prototype",{writable:!1});var De={IndexSizeError:1,HierarchyRequestError:3,WrongDocumentError:4,InvalidCharacterError:5,NoModificationAllowedError:7,NotFoundError:8,NotSupportedError:9,InUseAttributeError:10,InvalidStateError:11,SyntaxError:12,InvalidModificationError:13,NamespaceError:14,InvalidAccessError:15,TypeMismatchError:17,SecurityError:18,NetworkError:19,AbortError:20,URLMismatchError:21,QuotaExceededError:22,TimeoutError:23,InvalidNodeTypeError:24,DataCloneError:25,EncodingError:0,NotReadableError:0,UnknownError:0,ConstraintError:0,DataError:0,TransactionInactiveError:0,ReadOnlyError:0,VersionError:0,OperationError:0,NotAllowedError:0},_e={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};var de=function(){function e(e,t){this[Symbol.toStringTag]="DOMException",this._code=t in De?De[t]:_e[t]||0,this._name=t||"Error",this._message=void 0===e?"":""+e,Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,writable:!0,value:this._code}),void 0!==t&&Object.defineProperty(this,"name",{configurable:!0,enumerable:!0,writable:!0,value:this._name}),void 0!==e&&Object.defineProperty(this,"message",{configurable:!0,enumerable:!1,writable:!0,value:this._message})}var t=function(){};return t.prototype=Object.create(Error.prototype),["name","message"].forEach((function(n){Object.defineProperty(t.prototype,n,{enumerable:!0,get:function(){if(!(this instanceof e||this instanceof t||this instanceof Error))throw new TypeError("Illegal invocation");return this["_"+n]}})})),Object.defineProperty(t.prototype,"code",{configurable:!0,enumerable:!0,get:function(){throw new TypeError("Illegal invocation")}}),e.prototype=new t,e.prototype[Symbol.toStringTag]="DOMExceptionPrototype",Object.defineProperty(e,"prototype",{writable:!1}),Object.keys(De).forEach((function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:De[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:De[t]})})),Object.keys(_e).forEach((function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:_e[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:_e[t]})})),Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e}),e}();function pe(e,t,n){if(P.DEBUG){n&&n.message&&(n=n.message);var r="function"==typeof console.error?"error":"log";console[r](e+": "+t+". "+(n||"")),console.trace&&console.trace()}}function ye(e){return e&&"object"===r(e)&&"string"==typeof e.name}function he(e){var t;if(e){if(1===e.length)return e[0];var n,r=y(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if(ye(u))return u;u&&"string"==typeof u.message&&(t=u)}}catch(t){r.e(t)}finally{r.f()}}return t}function Ee(e){var t,n;switch(e.code){case 4:t="QuotaExceededError",n="The operation failed because there was not enough remaining storage space, or the storage quota was reached and the user declined to give more space to the database.";break;default:t="UnknownError",n="The operation failed for reasons unrelated to the database itself and not covered by any other errors."}n+=" ("+e.message+")--("+e.code+")";var r=ge(t,n);return r.sqlError=e,r}var ve,be=!1;try{ye(ve=fe("test name","test message"))&&"test name"===ve.name&&"test message"===ve.message&&(be=!0)}catch(Mt){}var ge=be?function(e,t,n){return pe(e,t,n),fe(e,t)}:function(e,t,n){return pe(e,t,n),function(e,t){return new de(t,e)}(e,t)},Fe=be?DOMException:de,Ae=["onsuccess","onerror"],Ce=["source","transaction","readyState"],me=["result","error"];function Be(){throw new TypeError("Illegal constructor")}Be.__super=function(){var e=this;this[Symbol.toStringTag]="IDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0}),me.forEach((function(t){Object.defineProperty(e,"__"+t,{enumerable:!1,configurable:!1,writable:!0}),Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){if(!this.__done)throw ge("InvalidStateError","Can't get "+t+"; the request is still pending.");return this["__"+t]}})})),ee(this,Ce,{readyState:{get readyState(){return this.__done?"done":"pending"}}}),Z(this,Ae),this.__result=void 0,this.__error=this.__source=this.__transaction=null,this.__done=!1},Be.__createInstance=function(){return new Be.__super},Be.prototype=x.createInstance({extraProperties:["debug"]}),Be.prototype[Symbol.toStringTag]="IDBRequestPrototype",Be.prototype.__getParent=function(){return"[object IDBOpenDBRequest]"===this.toString()?null:this.__transaction},z(Be.prototype,Ce),z(Be.prototype,me),J(Be.prototype,Ae),Object.defineProperty(Be.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:Be}),Be.__super.prototype=Be.prototype,Object.defineProperty(Be,"prototype",{writable:!1});var we=["onblocked","onupgradeneeded"];function Ie(){throw new TypeError("Illegal constructor")}Ie.prototype=Object.create(Be.prototype),Object.defineProperty(Ie.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:Ie});var Se=Ie;function Oe(e){return e&&"function"==typeof e.then}function Te(e,t){e.then(null,t)}Ie.__createInstance=function(){function e(){Be.__super.call(this),this[Symbol.toStringTag]="IDBOpenDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0,extraProperties:["oldVersion","newVersion","debug"]}),Z(this,we)}return e.prototype=Se.prototype,new e},J(Ie.prototype,we),Ie.prototype[Symbol.toStringTag]="IDBOpenDBRequestPrototype",Object.defineProperty(Ie,"prototype",{writable:!1});function Ne(e){var t=this;function n(e,n){t.v=e,t.s=n,t.c[n].forEach((function(t){t(e)})),t.c[n].length&&(t.c=null)}function r(e){t.c&&(Oe(e)?Te(e.then(r),r):n(e,1))}t.v=0,t.s=2,t.c=[[],[]];try{e((function e(u){t.c&&(Oe(u)?Te(u.then(e),r):n(u,0))}),r)}catch(e){r(e)}}var xe=Ne.prototype;xe.then=function(e,t){var n=this;return new Ne((function(r,u){var o="function"==typeof t?t:u;function i(){try{r(e?e(n.v):n.v)}catch(e){o(e)}}0===n.s?i():1===n.s?o(n.v):(n.c[0].push(i),n.c[1].push(o))}))},xe.catch=function(e){var t=this;return new Ne((function(n,r){function u(){try{n(e(t.v))}catch(e){r(e)}}1===t.s?u():0===t.s?n(t.v):(t.c[1].push(u),t.c[0].push(n))}))},Ne.all=function(e){return new Ne((function(t,n,r){r=e.length;var u=[];r?e.forEach((function(o,i){Oe(o)?Te(o.then((function(e){u[i]=e,--r||t(u)})),n):(u[i]=o,--r||t(e))})):t(u)}))},Ne.race=function(e){var t=!1;return new Ne((function(n,r){e.some((function(e,u){if(!Oe(e))return n(e),t=!0,!0;Te(e.then((function(e){t||(n(e),t=!0)})),r)}))}))},Ne.resolve=function(e){return new Ne((function(t,n){t(e)}))},Ne.reject=function(e){return new Ne((function(t,n){n(e)}))};var je=Ne;function Pe(e,t){var n=at(e),u=at(t),o=n>u?1:n===u?0:-1;if(P.DEBUG){var i=ct(n),a=ct(u);"object"===r(e)&&(e=JSON.stringify(e),i=JSON.stringify(i)),"object"===r(t)&&(t=JSON.stringify(t),a=JSON.stringify(a)),i!==e&&console.warn(e+" was incorrectly encoded as "+i),a!==t&&console.warn(t+" was incorrectly encoded as "+a)}return o}var ke={invalid:100,number:200,date:300,string:400,binary:500,array:600},Re=Object.keys(ke);Re.forEach((function(e){ke[e]=String.fromCodePoint(ke[e])}));var Le=Re.reduce((function(e,t){return e[ke[t]]=t,e}),{}),qe=["negativeInfinity","bigNegative","smallNegative","smallPositive","bigPositive","positiveInfinity"],Ue={invalid:{encode:function(e){return ke.invalid+"-"},decode:function(e){}},number:{encode:function(e){var t,n,r,u=e===Number.MIN_VALUE?"0."+"0".repeat(214)+"2":Math.abs(e).toString(32),o=u.indexOf("."),i=(u=-1!==o?u.replace(".",""):u).search(/(?:(?!0)[\s\S])/);return u=u.slice(i),Number.isFinite(Number(e))?e<0?e>-1?(t=qe.indexOf("smallNegative"),n=Me(i),r=Ke(Ve(u))):(t=qe.indexOf("bigNegative"),n=Ke(Me(-1!==o?o:u.length)),r=Ke(Ve(u))):e<1?(t=qe.indexOf("smallPositive"),n=Ke(Me(i)),r=Ve(u)):(t=qe.indexOf("bigPositive"),n=Me(-1!==o?o:u.length),r=Ve(u)):(n=We(2),r=We(11),t=qe.indexOf(e>0?"positiveInfinity":"negativeInfinity")),ke.number+"-"+t+n+r},decode:function(e){var t=Number(e.slice(2,3)),n=e.slice(3,5),r=e.slice(5,16);switch(qe[t]){case"negativeInfinity":return Number.NEGATIVE_INFINITY;case"positiveInfinity":return Number.POSITIVE_INFINITY;case"bigPositive":return Ge(r,n);case"smallPositive":return Ge(r,n=Qe(Ke(n)));case"smallNegative":return n=Qe(n),-Ge(r=Ke(r),n);case"bigNegative":return n=Ke(n),-Ge(r=Ke(r),n);default:throw new Error("Invalid number.")}}},string:{encode:function(e,t){return t&&(e=e.replace(/((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,"-$1")+" "),ke.string+"-"+e},decode:function(e,t){return e=e.slice(2),t&&(e=e.slice(0,-1).replace(/\x2D((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,"$1")),e}},array:{encode:function(e){var t,n=[],r=y(e.entries());try{for(r.s();!(t=r.n()).done;){var u=D(t.value,2),o=u[0],i=at(u[1],!0);n[o]=i}}catch(e){r.e(e)}finally{r.f()}return n.push(ke.invalid+"-"),ke.array+"-"+JSON.stringify(n)},decode:function(e){var t=JSON.parse(e.slice(2));t.pop();for(var n=0;n<t.length;n++){var r=ct(t[n],!0);t[n]=r}return t}},date:{encode:function(e){return ke.date+"-"+e.toJSON()},decode:function(e){return new Date(e.slice(2))}},binary:{encode:function(e){return ke.binary+"-"+(e.byteLength?_(Xe(e)).map((function(e){return String(e).padStart(3,"0")})):"")},decode:function(e){var t=e.slice(2),n=t.length?t.split(",").map((function(e){return Number.parseInt(e)})):[],r=new ArrayBuffer(n.length);return new Uint8Array(r).set(n),r}}};function Me(e){return 1===(e=e.toString(32)).length?"0"+e:e}function Ve(e){return(e+We(11)).slice(0,11)}function Ke(e){var t,n="",r=y(e);try{for(r.s();!(t=r.n()).done;){var u=t.value;n+=(31-Number.parseInt(u,32)).toString(32)}}catch(e){r.e(e)}finally{r.f()}return n}function Ge(e,t){if((t=Number.parseInt(t,32))<0)return He(Number.parseInt(e,32)*Math.pow(32,t-10));if(t<11){var n=e.slice(0,t);n=Number.parseInt(n,32);var r=e.slice(t);return He(n+(r=Number.parseInt(r,32)*Math.pow(32,t-11)))}var u=e+We(t-11);return Number.parseInt(u,32)}function He(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;return Number.parseFloat(e.toPrecision(t))}function We(e){return"0".repeat(e)}function Qe(e){return"-"+e}function Ye(e){if(Array.isArray(e))return"array";if($(t=e)&&"function"==typeof t.getDate)return"date";var t;if(function(e){return $(e)&&"number"==typeof e.byteLength&&("function"==typeof e.slice||"function"==typeof e.getFloat64)}(e))return"binary";var n=r(e);return["string","number"].includes(n)?n:"invalid"}function $e(e,t){return Je(e,t,!1,!0)}function Xe(e){var t=0,n=0;if(ArrayBuffer.isView(e)){if(void 0===e.buffer)throw new TypeError("Could not copy the bytes held by a buffer source as the buffer was undefined.");t=e.byteOffset,n=e.byteLength}else n=e.byteLength;return new Uint8Array(e.buffer||e,t,n)}function Je(e,t,n,u){if((t=t||[]).includes(e))return{type:"array",invalid:!0,message:"An array key cannot be circular"};var o=Ye(e),i={type:o,value:e};switch(o){case"number":return Number.isNaN(e)?{type:"NaN",invalid:!0}:i;case"string":return i;case"binary":return{type:"binary",value:Xe(e)};case"array":var a=e.length;t.push(e);for(var c=[],s=0;s<a;s++){if(!n&&!Object.prototype.hasOwnProperty.call(e,s))return{type:o,invalid:!0,message:"Does not have own index property"};try{var l=function(){var r=Je(e[s],t,!1,u);if(r.invalid)return n?"continue":{v:{type:o,invalid:!0,message:"Bad array entry value-to-key conversion"}};(!n||!u&&c.every((function(e){return 0!==Pe(e,r.value)}))||u&&c.every((function(e){return 0!==Pe(e,r)})))&&c.push(u?r:r.value)}();if("continue"===l)continue;if("object"===r(l))return l.v}catch(e){if(!n)throw e}}return{type:o,value:c};case"date":return Number.isNaN(e.getTime())?{type:o,invalid:!0,message:"Not a valid date"}:u?{type:o,value:e.getTime()}:{type:o,value:new Date(e.getTime())};case"invalid":default:var f=null===e?"null":r(e);return{type:f,invalid:!0,message:"Not a valid key; type "+f}}}function ze(e,t){return Je(e,null,!0,t)}function Ze(e,t){var n=$e(e,t);if(n.invalid)throw ge("DataError",n.message||"Not a valid key; type: "+n.type);return n}function et(e,t,n,r){var u=tt(e,t);return u.failure?u:n?ze(u.value,r):Je(u.value,null,!1,r)}function tt(e,t,n,r){if(Array.isArray(t)){var u=[];return t.some((function(t){var n=tt(e,t);return!!n.failure||(u.push(n.value),!1)}))?{failure:!0}:{value:u}}return""===t?{value:e}:t.split(".").some((function(t,n){if("length"!==t||"string"!=typeof e&&!Array.isArray(e))if($(r=e)&&"number"==typeof r.size&&"function"==typeof r.slice&&!("lastModified"in r))switch(t){case"size":case"type":e=e[t]}else{if(!function(e){return $(e)&&"string"==typeof e.name&&"function"==typeof e.slice&&"lastModified"in e}(e))return!$(e)||!Object.prototype.hasOwnProperty.call(e,t)||void 0===(e=e[t]);switch(t){case"name":case"lastModified":e=e[t];break;case"lastModifiedDate":e=new Date(e.lastModified)}}else e=e.length;var r;return!1}))?{failure:!0}:{value:e}}function nt(e,t,n){var r=n.split("."),u=r.pop();r.forEach((function(t){Object.prototype.hasOwnProperty.call(e,t)||(e[t]={}),e=e[t]})),e[u]=t}function rt(e,t){var n=t.split(".");n.pop();var r,u=y(n);try{for(u.s();!(r=u.n()).done;){var o=r.value;if(!$(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,o))return!0;e=e[o]}}catch(e){u.e(e)}finally{u.f()}return $(e)}function ut(e,t,n){var r=void 0===t.lower,u=void 0===t.upper,o=at(e,!0),i=n?t.__lowerCached:at(t.lower,!0),a=n?t.__upperCached:at(t.upper,!0);return void 0!==t.lower&&(t.lowerOpen&&o>i&&(r=!0),!t.lowerOpen&&o>=i&&(r=!0)),void 0!==t.upper&&(t.upperOpen&&o<a&&(u=!0),!t.upperOpen&&o<=a&&(u=!0)),r&&u}function ot(e,t){return"array"===Le[t.slice(0,1)]?t.indexOf(e)>1:t===e}function it(e,t){var n=[];if(Array.isArray(e)){var r,u=y(e);try{for(u.s();!(r=u.n()).done;){var o=r.value;if(Array.isArray(o)){if(t&&t.lower===t.upper)continue;if(1!==o.length){it(o,t).length>0&&n.push(o);continue}o=o[0]}(ce(t)||ut(o,t,!0))&&n.push(o)}}catch(e){u.e(e)}finally{u.f()}}else(ce(t)||ut(e,t,!0))&&n.push(e);return n}function at(e,t){return void 0===e?null:Ue[Ye(e)].encode(e,t)}function ct(e,t){if("string"==typeof e)return Ue[Le[e.slice(0,1)]].decode(e,t)}function st(e,t){return ct(at(e,t),t)}var lt=9007199254740992;function ft(e,t,n,r){e.executeSql('SELECT "currNum" FROM __sys__ WHERE "name" = ?',[q(t.__currentName)],(function(e,t){1!==t.rows.length?n(1):n(t.rows.item(0).currNum)}),(function(e,t){r(ge("DataError","Could not get the auto increment value for key",t))}))}function Dt(e,t,n,r,u){var o='UPDATE __sys__ SET "currNum" = ? WHERE "name" = ?',i=[n,q(t.__currentName)];P.DEBUG&&console.log(o,i),e.executeSql(o,i,(function(e,t){r(n)}),(function(e,t){u(ge("UnknownError","Could not set the auto increment value for key",t))}))}function _t(e,t,n,r,u){return Dt(e,t,n=n===lt?n+2:n+1,r,u)}function dt(e,t,n,r){ft(e,t,(function(u){u>lt?n("failure"):_t(e,t,u,(function(){n(null,u,u)}),r)}),r)}function pt(e,t,n,r,u){"number"!=typeof n||n<1?r():ft(e,t,(function(o){var i=Math.floor(Math.min(n,lt));i>=o?_t(e,t,i,(function(){r(o)}),u):r()}),u)}var yt=Object.freeze({__proto__:null,encode:at,decode:ct,roundTrip:st,convertKeyToValue:function e(t){var n=t.type,r=t.value;switch(n){case"number":case"string":return r;case"array":for(var u=[],o=r.length,i=0;i<o;){var a=e(r[i]);u[i]=a,i++}return u;case"date":return new Date(r);case"binary":var c=r.length,s=new ArrayBuffer(c);return new Uint8Array(s,r.byteOffset||0,r.byteLength).set(r),s;case"invalid":default:throw new Error("Bad key")}},convertValueToKeyValueDecoded:Je,convertValueToMultiEntryKeyDecoded:ze,convertValueToKey:$e,convertValueToMultiEntryKey:function(e){return Je(e,null,!0,!0)},convertValueToKeyRethrowingAndIfInvalid:Ze,extractKeyFromValueUsingKeyPath:function(e,t,n){return et(e,t,n,!0)},evaluateKeyPathOnValue:function(e,t,n){return tt(e,t)},extractKeyValueDecodedFromValueUsingKeyPath:et,injectKeyIntoValueUsingKeyPath:nt,checkKeyCouldBeInjectedIntoValue:rt,isMultiEntryMatch:ot,isKeyInRange:ut,findMultiEntryMatches:it,assignCurrentNumber:Dt,generateKeyForStore:dt,possiblyUpdateKeyGenerator:pt});function ht(){throw new TypeError("Illegal constructor")}var Et,vt=ht;function bt(e,t,n,r,u,o){if(e&&(void 0!==e.lower||void 0!==e.upper)){var i,a;u&&n.push("AND");var c=void 0!==e.lower,s=void 0!==e.upper;if(c&&(i=o?e.__lowerCached:at(e.lower)),s&&(a=o?e.__upperCached:at(e.upper)),c){if(r.push(q(i)),s&&i===a&&!e.lowerOpen&&!e.upperOpen)return void n.push(t,"=","?");n.push(t,e.lowerOpen?">":">=","?")}c&&s&&n.push("AND"),s&&(n.push(t,e.upperOpen?"<":"<=","?"),r.push(q(a)))}}function gt(e,t){if(Y(e,ht))return"[object IDBKeyRange]"!==e.toString()?ht.__createInstance(e.lower,e.upper,e.lowerOpen,e.upperOpen):e;if(!ce(e))return Ze(e),ht.only(e);if(t)throw ge("DataError","No key or range was specified")}ht.__createInstance=function(e,t,n,r){function u(){if(this[Symbol.toStringTag]="IDBKeyRange",void 0===e&&void 0===t)throw ge("DataError","Both arguments to the key range method cannot be undefined");var u,o;if(void 0!==e&&(u=st(e),Ze(e)),void 0!==t&&(o=st(t),Ze(t)),void 0!==e&&void 0!==t&&e!==t&&at(e)>at(t))throw ge("DataError","`lower` must not be greater than `upper` argument in `bound()` call.");this.__lower=u,this.__upper=o,this.__lowerOpen=Boolean(n),this.__upperOpen=Boolean(r)}return u.prototype=vt.prototype,new u},ht.prototype.includes=function(e){if(!$(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");if(!arguments.length)throw new TypeError("IDBKeyRange.includes requires a key argument");return Ze(e),ut(e,this)},ht.only=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.only requires a value argument");return ht.__createInstance(e,e,!1,!1)},ht.lowerBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.lowerBound requires a value argument");return ht.__createInstance(e,void 0,arguments[1],!0)},ht.upperBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.upperBound requires a value argument");return ht.__createInstance(void 0,e,!0,arguments[1])},ht.bound=function(e,t){if(arguments.length<=1)throw new TypeError("IDBKeyRange.bound requires lower and upper arguments");return ht.__createInstance(e,t,arguments[2],arguments[3])},ht.prototype[Symbol.toStringTag]="IDBKeyRangePrototype",["lower","upper","lowerOpen","upperOpen"].forEach((function(e){var t,n;Object.defineProperty(ht.prototype,"__"+e,{enumerable:!1,configurable:!1,writable:!0});var r=(t={},(n={})[e]=n[e]||{},n[e].get=function(){if(!$(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");return this["__"+e]},a(t,n),t),u=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(ht.prototype,e,u)})),Object.defineProperty(ht,Symbol.hasInstance,{value:function(e){return $(e)&&"upper"in e&&"boolean"==typeof e.lowerOpen}}),Object.defineProperty(ht,"prototype",{writable:!1});var Ft=!1,At={test:!0};if(Object.defineProperty)try{Object.defineProperty(At,"test",{enumerable:!1}),At.test&&(Ft=!0)}catch(Mt){}var Ct=function(){throw new TypeError("Illegal constructor")};Ct.prototype=(c(Et={constructor:Ct,contains:function(e){if(!arguments.length)throw new TypeError("DOMStringList.contains must be supplied a value");return this._items.includes(e)},item:function(e){if(!arguments.length)throw new TypeError("DOMStringList.item must be supplied a value");return e<0||e>=this.length||!Number.isInteger(e)?null:this._items[e]},clone:function(){var e=Ct.__createInstance();return e._items=this._items.slice(),e._length=this.length,e.addIndexes(),e},addIndexes:function(){for(var e=0;e<this._items.length;e++)this[e]=this._items[e]},sortList:function(){return this._items.sort(),this.addIndexes(),this._items},forEach:function(e,t){this._items.forEach(e,t)},map:function(e,t){return this._items.map(e,t)},indexOf:function(e){return this._items.indexOf(e)},push:function(e){this._items.push(e),this._length++,this.sortList()},splice:function(){var e;for(var t in(e=this._items).splice.apply(e,arguments),this._length=this._items.length,this)t===String(Number.parseInt(t))&&delete this[t];this.sortList()}},Symbol.toStringTag,"DOMStringListPrototype"),c(Et,Symbol.iterator,regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t<this._items.length)){e.next=6;break}return e.next=4,this._items[t++];case 4:e.next=1;break;case 6:case"end":return e.stop()}}),e,this)}))),Et),Object.defineProperty(Ct,Symbol.hasInstance,{value:function(e){return"DOMStringListPrototype"===Object.prototype.toString.call(e)}});var mt=Ct;if(Object.defineProperty(Ct,"__createInstance",{value:function(){var e=function(){this.toString=function(){return"[object DOMStringList]"},Object.defineProperty(this,"length",{enumerable:!0,get:function(){return this._length}}),this._items=[],this._length=0};return e.prototype=mt.prototype,new e}}),Ft){Object.defineProperty(Ct,"prototype",{writable:!1});["addIndexes","sortList","forEach","map","indexOf","push","splice","constructor","__createInstance"].forEach((function(e){Object.defineProperty(Ct.prototype,e,{enumerable:!1})})),Object.defineProperty(Ct.prototype,"length",{configurable:!0,enumerable:!0,get:function(){throw new TypeError("Illegal invocation")}});["_items","_length"].forEach((function(e){Object.defineProperty(Ct.prototype,e,{enumerable:!1,writable:!0})}))}var Bt=0,wt=["onabort","oncomplete","onerror"],It=["objectStoreNames","mode","db","error"];function St(){throw new TypeError("Illegal constructor")}var Ot=St;function Tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(n),!0).forEach((function(t){Rt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xt(e){return(xt="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}function jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kt(e,t,n){return t&&Pt(e.prototype,t),n&&Pt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,o=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){a=!0,u=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw u}}return o}}(e,t)||qt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qt(e,t){if(e){if("string"==typeof e)return Ut(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ut(e,t):void 0}}function Ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}St.__createInstance=function(e,t,n){function r(){var r=this,u=this;u[Symbol.toStringTag]="IDBTransaction",ee(u,It),u.__id=++Bt,u.__active=!0,u.__running=!1,u.__errored=!1,u.__requests=[],u.__objectStoreNames=t,u.__mode=n,u.__db=e,u.__error=null,u.__setOptions({legacyOutputDidListenersThrowFlag:!0}),It.forEach((function(e){Object.defineProperty(r,e,{configurable:!0})})),Z(this,wt),u.__storeHandles={},setTimeout((function(){u.__executeRequests()}),0)}return r.prototype=Ot.prototype,new r},St.prototype=x.createInstance({defaultSync:!0,extraProperties:["complete"]}),St.prototype.__transFinishedCb=function(e,t){t(Boolean(e))},St.prototype.__executeRequests=function(){var e=this;e.__running?P.DEBUG&&console.log("Looks like the request set is already running",e.mode):(e.__running=!0,e.db.__db["readonly"===e.mode?"readTransaction":"transaction"]((function(t){e.__tx=t;var n=null,r=-1;function u(t,r){if(!e.__errored&&!e.__requestsFinished&&(r&&(n.req=r),!n.req.__done)){n.req.__done=!0,n.req.__result=t,n.req.__error=null,e.__active=!0;var u=se("success");if(n.req.dispatchEvent(u),u.__legacyOutputDidListenersThrowError)return pe("Error","An error occurred in a success handler attached to request chain",u.__legacyOutputDidListenersThrowError),void e.__abortTransaction(ge("AbortError","A request was aborted (in user handler after success)."));i()}}function o(){if(!(e.__errored||e.__requestsFinished||n.req&&n.req.__done)){for(var t=arguments.length,r=new Array(t),u=0;u<t;u++)r[u]=arguments[u];var o=he(r);if(n.req){n.req.__done=!0,n.req.__error=o,n.req.__result=void 0,n.req.addLateEventListener("error",(function(e){e.cancelable&&e.defaultPrevented&&!e.__legacyOutputDidListenersThrowError&&i()})),n.req.addDefaultEventListener("error",(function(){e.__abortTransaction(n.req.__error)})),e.__active=!0;var a=se("error",o,{bubbles:!0,cancelable:!0});n.req.dispatchEvent(a),a.__legacyOutputDidListenersThrowError&&(pe("Error","An error occurred in an error handler attached to request chain",a.__legacyOutputDidListenersThrowError),a.preventDefault(),e.__abortTransaction(ge("AbortError","A request was aborted (in user handler after error).")))}else e.__abortTransaction(o)}}function i(){if(!e.__errored&&!e.__requestsFinished)if(++r>=e.__requests.length)e.__requests=[],e.__active&&function(){function t(){e.__completed=!0,P.DEBUG&&console.log("Transaction completed");var t=se("complete");try{e.__internal=!0,e.dispatchEvent(t),e.__internal=!1,e.dispatchEvent(se("__complete"))}catch(t){throw e.__internal=!1,e.__errored=!0,t}finally{e.__storeHandles={}}}if(e.__active=!1,e.__requestsFinished=!0,"readwrite"===e.mode)return e.__transactionFinished?void t():void(e.__transactionEndCallback=t);if("readonly"===e.mode)return void t();var n=se("__beforecomplete");n.complete=t,e.dispatchEvent(n)}();else try{if(!(n=e.__requests[r]).req)return void n.op(t,n.args,i,o);if(n.req.__done)return;n.op(t,n.args,u,o,i)}catch(e){o(e)}}i()}),(function(t){if(!0!==t){var n=Ee(t);e.__abortTransaction(n)}}),(function(){e.__transFinishedCb===St.prototype.__transFinishedCb&&(e.__transactionEndCallback||e.__requestsFinished?e.__transactionEndCallback&&!e.__completed&&e.__transFinishedCb(e.__errored,e.__transactionEndCallback):e.__transactionFinished=!0)}),(function(t,n,r,u,o){return!(!t.readOnly&&!n)||(e.__transFinishedCb=function(e,t){e?u(e,t):o(t)},e.__transactionEndCallback&&!e.__completed&&e.__transFinishedCb(e.__errored,e.__transactionEndCallback),!1)})))},St.prototype.__createRequest=function(e){var t=Be.__createInstance();return t.__source=void 0!==e?e:this.db,t.__transaction=this,t},St.prototype.__addToTransactionQueue=function(e,t,n){var r=this.__createRequest(n);return this.__pushToQueue(r,e,t),r},St.prototype.__addNonRequestToTransactionQueue=function(e,t,n){this.__pushToQueue(null,e,t)},St.prototype.__pushToQueue=function(e,t,n){this.__assertActive(),this.__requests.push({op:t,args:n,req:e})},St.prototype.__assertActive=function(){if(!this.__active)throw ge("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},St.prototype.__assertWritable=function(){if("readonly"===this.mode)throw ge("ReadOnlyError","The transaction is read only")},St.prototype.__assertVersionChange=function(){St.__assertVersionChange(this)},St.prototype.objectStore=function(e){var t=this;if(!(t instanceof St))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No object store name was specified");if(St.__assertNotFinished(t),-1===t.__objectStoreNames.indexOf(e))throw ge("NotFoundError",e+" is not participating in this transaction");var n=t.db.__objectStores[e];if(!n)throw ge("NotFoundError",e+" does not exist in "+t.db.name);return(!t.__storeHandles[e]||t.__storeHandles[e].__pendingDelete||t.__storeHandles[e].__deleted)&&(t.__storeHandles[e]=ur.__clone(n,t)),t.__storeHandles[e]},St.prototype.__abortTransaction=function(e){var t=this;function n(n,r){n?r&&"number"==typeof r.code?P.DEBUG&&console.log("Rollback erred; feature is probably not supported as per WebSQL",t):P.DEBUG&&console.log("Rollback succeeded",t):P.DEBUG&&console.log("Rollback not possible due to missing transaction",t),t.dispatchEvent(se("__preabort")),t.__requests.filter((function(e,t,n){return e.req&&!e.req.__done&&[t,-1].includes(n.map((function(e){return e.req})).lastIndexOf(e.req))})).reduce((function(e,t){return e.then((function(){t.req.__done=!0,t.req.__result=void 0,t.req.__error=ge("AbortError","A request was aborted (an unfinished request).");var e=se("error",t.req.__error,{bubbles:!0,cancelable:!0});return new je((function(n){setTimeout((function(){t.req.dispatchEvent(e),n()}))}))}))}),je.resolve()).then((function(){var n=se("abort",e,{bubbles:!0,cancelable:!1});setTimeout((function(){t.__abortFinished=!0,t.dispatchEvent(n),t.__storeHandles={},t.dispatchEvent(se("__abort"))}))})).catch((function(e){throw console.log("Abort error"),e}))}pe("Error","An error occurred in a transaction",e),t.__errored||(t.__errored=!0,"versionchange"===t.mode&&(t.db.__version=t.db.__oldVersion,t.db.__objectStoreNames=t.db.__oldObjectStoreNames,t.__objectStoreNames=t.db.__oldObjectStoreNames,Object.values(t.db.__objectStores).concat(Object.values(t.__storeHandles)).forEach((function(e){"__pendingName"in e&&t.db.__oldObjectStoreNames.indexOf(e.__pendingName)>-1&&(e.__name=e.__originalName),e.__indexNames=e.__oldIndexNames,delete e.__pendingDelete,Object.values(e.__indexes).concat(Object.values(e.__indexHandles)).forEach((function(t){"__pendingName"in t&&e.__oldIndexNames.indexOf(t.__pendingName)>-1&&(t.__name=t.__originalName),delete t.__pendingDelete}))}))),t.__active=!1,null!==e&&(t.__error=e),t.__requestsFinished&&setTimeout((function(){throw e}),0),t.__transFinishedCb(!0,(function(e){if(e&&t.__tx){if("readwrite"===t.mode)return t.__transactionFinished?void n():void(t.__transactionEndCallback=n);try{t.__tx.executeSql("ROLLBACK",[],n,n)}catch(e){n()}}else n(null,{code:0})})))},St.prototype.abort=function(){var e=this;if(!(e instanceof St))throw new TypeError("Illegal invocation");P.DEBUG&&console.log("The transaction was aborted",e),St.__assertNotFinished(e),e.__abortTransaction(null)},St.prototype[Symbol.toStringTag]="IDBTransactionPrototype",St.__assertVersionChange=function(e){if(!e||"versionchange"!==e.mode)throw ge("InvalidStateError","Not a version transaction")},St.__assertNotVersionChange=function(e){if(e&&"versionchange"===e.mode)throw ge("InvalidStateError","Cannot be called during a version transaction")},St.__assertNotFinished=function(e){if(!e||e.__completed||e.__abortFinished||e.__errored)throw ge("InvalidStateError","Transaction finished by commit or abort")},St.__assertNotFinishedObjectStoreMethod=function(e){try{St.__assertNotFinished(e)}catch(t){if(e&&!e.__completed&&!e.__abortFinished)throw ge("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished");throw t}},St.__assertActive=function(e){if(!e||!e.__active)throw ge("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},St.prototype.__getParent=function(){return this.db},J(St.prototype,wt),z(St.prototype,It),Object.defineProperty(St.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:St}),Object.defineProperty(St,"prototype",{writable:!1});var Mt=kt((function e(t){jt(this,e),this.p=new Promise(t)}));Mt.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&(Mt.prototype[Symbol.toStringTag]="TypesonPromise"),Mt.prototype.then=function(e,t){var n=this;return new Mt((function(r,u){n.p.then((function(t){r(e?e(t):t)})).catch((function(e){return t?t(e):Promise.reject(e)})).then(r,u)}))},Mt.prototype.catch=function(e){return this.then(null,e)},Mt.resolve=function(e){return new Mt((function(t){t(e)}))},Mt.reject=function(e){return new Mt((function(t,n){n(e)}))},["all","race","allSettled"].forEach((function(e){Mt[e]=function(t){return new Mt((function(n,r){Promise[e](t.map((function(e){return e&&e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e}))).then(n,r)}))}}));var Vt={}.toString,Kt={}.hasOwnProperty,Gt=Object.getPrototypeOf,Ht=Kt.toString;function Wt(e,t){return Jt(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function Qt(e){return Vt.call(e).slice(8,-1)}function Yt(e,t){if(!e||"object"!==xt(e))return!1;var n=Gt(e);if(!n)return null===t;var r=Kt.call(n,"constructor")&&n.constructor;return"function"!=typeof r?null===t:t===r||null!==t&&Ht.call(r)===Ht.call(t)||"function"==typeof t&&"string"==typeof r.__typeson__type__&&r.__typeson__type__===t.__typeson__type__}function $t(e){return!(!e||"Object"!==Qt(e))&&(!Gt(e)||Yt(e,Object))}function Xt(e){if(!e||"Object"!==Qt(e))return!1;var t=Gt(e);return!t||Yt(e,Object)||Xt(t)}function Jt(e){return e&&"object"===xt(e)}function zt(e){return e.replace(/~/g,"~0").replace(/\./g,"~1")}function Zt(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function en(e,t){if(""===t)return e;var n=t.indexOf(".");if(n>-1){var r=e[Zt(t.slice(0,n))];return void 0===r?void 0:en(r,t.slice(n+1))}return e[Zt(t)]}function tn(e,t,n){if(""===t)return n;var r=t.indexOf(".");return r>-1?tn(e[Zt(t.slice(0,r))],t.slice(r+1),n):(e[Zt(t)]=n,e)}function nn(e){return null===e?"null":Array.isArray(e)?"array":xt(e)}function rn(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var un=Object.keys,on=Array.isArray,an={}.hasOwnProperty,cn=["type","replaced","iterateIn","iterateUnsetNumeric"];function sn(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function ln(e,t){if(""===e.keypath)return-1;var n=e.keypath.match(/\./g)||0,r=t.keypath.match(/\./g)||0;return n&&(n=n.length),r&&(r=r.length),n>r?-1:n<r?1:e.keypath<t.keypath?-1:e.keypath>t.keypath}var fn=function(){function e(t){jt(this,e),this.options=t,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return kt(e,[{key:"stringify",value:function(e,t,n,r){r=Nt(Nt(Nt({},this.options),r),{},{stringification:!0});var u=this.encapsulate(e,null,r);return on(u)?JSON.stringify(u[0],t,n):u.then((function(e){return JSON.stringify(e,t,n)}))}},{key:"stringifySync",value:function(e,t,n,r){return this.stringify(e,t,n,Nt(Nt({throwOnBadSyncType:!0},r),{},{sync:!0}))}},{key:"stringifyAsync",value:function(e,t,n,r){return this.stringify(e,t,n,Nt(Nt({throwOnBadSyncType:!0},r),{},{sync:!1}))}},{key:"parse",value:function(e,t,n){return n=Nt(Nt(Nt({},this.options),n),{},{parse:!0}),this.revive(JSON.parse(e,t),n)}},{key:"parseSync",value:function(e,t,n){return this.parse(e,t,Nt(Nt({throwOnBadSyncType:!0},n),{},{sync:!0}))}},{key:"parseAsync",value:function(e,t,n){return this.parse(e,t,Nt(Nt({throwOnBadSyncType:!0},n),{},{sync:!1}))}},{key:"specialTypeNames",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.returnTypeNames=!0,this.encapsulate(e,t,n)}},{key:"rootTypeName",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.iterateNone=!0,this.encapsulate(e,t,n)}},{key:"encapsulate",value:function(e,t,n){var r=sn((function(e,t){return rn(Promise.all(t.map((function(e){return e[1].p}))),(function(n){return rn(Promise.all(n.map(sn((function(n){var u=!1,o=[],i=Lt(t.splice(0,1),1),a=Lt(i[0],7),c=a[0],s=a[2],l=a[3],f=a[4],D=a[5],_=a[6],d=p(c,n,s,l,o,!0,_),y=Yt(d,Mt);return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(c&&y)return rn(d.p,(function(t){f[D]=t;var n=r(e,o);return u=!0,n}))}),(function(t){return u?t:(c?f[D]=d:e=y?d.p:d,r(e,o))}))})))),(function(){return e}))}))})),u=(n=Nt(Nt({sync:!0},this.options),n)).sync,o=this,i={},a=[],c=[],s=[],l=!("cyclic"in n)||n.cyclic,f=n.encapsulateObserver,D=p("",e,l,t||{},s);function _(e){var t=Object.values(i);if(n.iterateNone)return t.length?t[0]:nn(e);if(t.length){if(n.returnTypeNames)return function(e){return function(e){if(Array.isArray(e))return Ut(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||qt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(new Set(t));e&&$t(e)&&!an.call(e,"$types")?e.$types=i:e={$:e,$types:{$:i}}}else Jt(e)&&an.call(e,"$types")&&(e={$:e,$types:!0});return!n.returnTypeNames&&e}function d(e,t,n){Object.assign(e,t);var r=cn.map((function(t){var n=e[t];return delete e[t],n}));n(),cn.forEach((function(t,n){e[t]=r[n]}))}function p(e,t,r,u,s,l,D){var _,h={},E=xt(t),v=f?function(n){var o=D||u.type||nn(t);f(Object.assign(n||h,{keypath:e,value:t,cyclic:r,stateObj:u,promisesData:s,resolvingTypesonPromise:l,awaitingTypesonPromise:Yt(t,Mt)},{type:o}))}:null;if(["string","boolean","number","undefined"].includes(E))return void 0===t||Number.isNaN(t)||t===Number.NEGATIVE_INFINITY||t===Number.POSITIVE_INFINITY?(_=u.replaced?t:y(e,t,u,s,!1,l,v))!==t&&(h={replaced:_}):_=t,v&&v(),_;if(null===t)return v&&v(),t;if(r&&!u.iterateIn&&!u.iterateUnsetNumeric&&t&&"object"===xt(t)){var b=a.indexOf(t);if(!(b<0))return i[e]="#",v&&v({cyclicKeypath:c[b]}),"#"+c[b];!0===r&&(a.push(t),c.push(e))}var g,F=$t(t),A=on(t),C=(F||A)&&(!o.plainObjectReplacers.length||u.replaced)||u.iterateIn?t:y(e,t,u,s,F||A,null,v);if(C!==t?(_=C,h={replaced:C}):""===e&&Yt(t,Mt)?(s.push([e,t,r,u,void 0,void 0,u.type]),_=t):A&&"object"!==u.iterateIn||"array"===u.iterateIn?(g=new Array(t.length),h={clone:g}):(["function","symbol"].includes(xt(t))||"toJSON"in t||Yt(t,Mt)||Yt(t,Promise)||Yt(t,ArrayBuffer))&&!F&&"object"!==u.iterateIn?_=t:(g={},u.addLength&&(g.length=t.length),h={clone:g}),v&&v(),n.iterateNone)return g||_;if(!g)return _;if(u.iterateIn){var m=function(n){var o={ownKeys:an.call(t,n)};d(u,o,(function(){var o=e+(e?".":"")+zt(n),i=p(o,t[n],Boolean(r),u,s,l);Yt(i,Mt)?s.push([o,i,Boolean(r),u,g,n,u.type]):void 0!==i&&(g[n]=i)}))};for(var B in t)m(B);v&&v({endIterateIn:!0,end:!0})}else un(t).forEach((function(n){var o=e+(e?".":"")+zt(n);d(u,{ownKeys:!0},(function(){var e=p(o,t[n],Boolean(r),u,s,l);Yt(e,Mt)?s.push([o,e,Boolean(r),u,g,n,u.type]):void 0!==e&&(g[n]=e)}))})),v&&v({endIterateOwn:!0,end:!0});if(u.iterateUnsetNumeric){for(var w=t.length,I=function(n){if(!(n in t)){var o=e+(e?".":"")+n;d(u,{ownKeys:!1},(function(){var e=p(o,void 0,Boolean(r),u,s,l);Yt(e,Mt)?s.push([o,e,Boolean(r),u,g,n,u.type]):void 0!==e&&(g[n]=e)}))}},S=0;S<w;S++)I(S);v&&v({endIterateUnsetNumeric:!0,end:!0})}return g}function y(e,t,n,r,a,c,s){for(var f=a?o.plainObjectReplacers:o.nonplainObjectReplacers,D=f.length;D--;){var _=f[D];if(_.test(t,n)){var d=_.type;if(o.revivers[d]){var y=i[e];i[e]=y?[d].concat(y):d}return Object.assign(n,{type:d,replaced:!0}),!u&&_.replaceAsync||_.replace?(s&&s({replacing:!0}),p(e,_[u||!_.replaceAsync?"replace":"replaceAsync"](t,n),l&&"readonly",n,r,c,d)):(s&&s({typeDetected:!0}),p(e,t,l&&"readonly",n,r,c,d))}}return t}return s.length?u&&n.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(r(D,s)).then(_):!u&&n.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():n.stringification&&u?[_(D)]:u?_(D):Promise.resolve(_(D))}},{key:"encapsulateSync",value:function(e,t,n){return this.encapsulate(e,t,Nt(Nt({throwOnBadSyncType:!0},n),{},{sync:!0}))}},{key:"encapsulateAsync",value:function(e,t,n){return this.encapsulate(e,t,Nt(Nt({throwOnBadSyncType:!0},n),{},{sync:!1}))}},{key:"revive",value:function(e,t){var n=e&&e.$types;if(!n)return e;if(!0===n)return e.$;var r=(t=Nt(Nt({sync:!0},this.options),t)).sync,u=[],o={},i=!0;n.$&&$t(n.$)&&(e=e.$,n=n.$,i=!1);var a=this;function c(e,t){var n=Lt(a.revivers[e]||[],1)[0];if(!n)throw new Error("Unregistered type: "+e);return r&&!("revive"in n)?t:n[r&&n.revive?"revive":!r&&n.reviveAsync?"reviveAsync":"revive"](t,o)}var s=[];function l(e){return Yt(e,Dn)?void 0:e}var f,D=function(){var t=[];if(Object.entries(n).forEach((function(e){var r=Lt(e,2),u=r[0],o=r[1];"#"!==o&&[].concat(o).forEach((function(e){Lt(a.revivers[e]||[null,{}],2)[1].plain&&(t.push({keypath:u,type:e}),delete n[u])}))})),t.length)return t.sort(ln).reduce((function t(n,r){var u=r.keypath,o=r.type;if(Wt(n))return n.then((function(e){return t(e,{keypath:u,type:o})}));var i=en(e,u);if(Yt(i=c(o,i),Mt))return i.then((function(t){var n=tn(e,u,t);n===t&&(e=n)}));var a=tn(e,u,i);a===i&&(e=a)}),void 0)}();return Yt(D,Mt)?f=D.then((function(){return e})):(f=function e(t,r,o,a,l){if(!i||"$types"!==t){var f=n[t],D=on(r);if(D||$t(r)){var _=D?new Array(r.length):{};for(un(r).forEach((function(n){var u=e(t+(t?".":"")+zt(n),r[n],o||_,_,n),i=function(e){return Yt(e,Dn)?_[n]=void 0:void 0!==e&&(_[n]=e),e};Yt(u,Mt)?s.push(u.then((function(e){return i(e)}))):i(u)})),r=_;u.length;){var d=Lt(u[0],4),p=d[0],y=d[1],h=d[2],E=d[3],v=en(p,y);if(void 0===v)break;h[E]=v,u.splice(0,1)}}if(!f)return r;if("#"===f){var b=en(o,r.slice(1));return void 0===b&&u.push([o,r.slice(1),a,l]),b}return[].concat(f).reduce((function e(t,n){return Yt(t,Mt)?t.then((function(t){return e(t,n)})):c(n,t)}),r)}}("",e,null),s.length&&(f=Mt.resolve(f).then((function(e){return Mt.all([e].concat(s))})).then((function(e){return Lt(e,1)[0]})))),Wt(f)?r&&t.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Yt(f,Mt)?f.p.then(l):f:!r&&t.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():r?l(f):Promise.resolve(l(f))}},{key:"reviveSync",value:function(e,t){return this.revive(e,Nt(Nt({throwOnBadSyncType:!0},t),{},{sync:!0}))}},{key:"reviveAsync",value:function(e,t){return this.revive(e,Nt(Nt({throwOnBadSyncType:!0},t),{},{sync:!1}))}},{key:"register",value:function(e,t){var n=this;t=t||{};var r=function e(r){on(r)?r.forEach((function(t){return e(t)})):r&&un(r).forEach((function(e){if("#"===e)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(_n.includes(e))throw new TypeError("Plain JSON object types are reserved as type names");var u=r[e],o=u&&u.testPlainObjects?n.plainObjectReplacers:n.nonplainObjectReplacers,i=o.filter((function(t){return t.type===e}));if(i.length&&(o.splice(o.indexOf(i[0]),1),delete n.revivers[e],delete n.types[e]),"function"==typeof u){var a=u;u={test:function(e){return e&&e.constructor===a},replace:function(e){return Nt({},e)},revive:function(e){return Object.assign(Object.create(a.prototype),e)}}}else if(on(u)){var c=Lt(u,3);u={test:c[0],replace:c[1],revive:c[2]}}if(u&&u.test){var s={type:e,test:u.test.bind(u)};u.replace&&(s.replace=u.replace.bind(u)),u.replaceAsync&&(s.replaceAsync=u.replaceAsync.bind(u));var l="number"==typeof t.fallback?t.fallback:t.fallback?0:Number.POSITIVE_INFINITY;if(u.testPlainObjects?n.plainObjectReplacers.splice(l,0,s):n.nonplainObjectReplacers.splice(l,0,s),u.revive||u.reviveAsync){var f={};u.revive&&(f.revive=u.revive.bind(u)),u.reviveAsync&&(f.reviveAsync=u.reviveAsync.bind(u)),n.revivers[e]=[f,{plain:u.testPlainObjects}]}n.types[e]=u}}))};return[].concat(e).forEach((function(e){return r(e)})),this}}]),e}(),Dn=kt((function e(){jt(this,e)}));Dn.__typeson__type__="TypesonUndefined";for(var _n=["null","boolean","number","string","array","object"],dn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pn=new Uint8Array(256),yn=0;yn<dn.length;yn++)pn[dn.codePointAt(yn)]=yn;var hn=function(e,t,n){null==n&&(n=e.byteLength);for(var r=new Uint8Array(e,t||0,n),u=r.length,o="",i=0;i<u;i+=3)o+=dn[r[i]>>2],o+=dn[(3&r[i])<<4|r[i+1]>>4],o+=dn[(15&r[i+1])<<2|r[i+2]>>6],o+=dn[63&r[i+2]];return u%3==2?o=o.slice(0,-1)+"=":u%3==1&&(o=o.slice(0,-2)+"=="),o},En=function(e){var t,n,r,u,o=e.length,i=.75*e.length,a=0;"="===e[e.length-1]&&(i--,"="===e[e.length-2]&&i--);for(var c=new ArrayBuffer(i),s=new Uint8Array(c),l=0;l<o;l+=4)t=pn[e.codePointAt(l)],n=pn[e.codePointAt(l+1)],r=pn[e.codePointAt(l+2)],u=pn[e.codePointAt(l+3)],s[a++]=t<<2|n>>4,s[a++]=(15&n)<<4|r>>2,s[a++]=(3&r)<<6|63&u;return c},vn={arraybuffer:{test:function(e){return"ArrayBuffer"===Qt(e)},replace:function(e,t){t.buffers||(t.buffers=[]);var n=t.buffers.indexOf(e);return n>-1?{index:n}:(t.buffers.push(e),hn(e))},revive:function(e,t){if(t.buffers||(t.buffers=[]),"object"==r(e))return t.buffers[e.index];var n=En(e);return t.buffers.push(n),n}}},bn={bigintObject:{test:function(e){return"object"==r(e)&&Yt(e,BigInt)},replace:function(e){return String(e)},revive:function(e){return new Object(BigInt(e))}}},gn={bigint:{test:function(e){return"bigint"==typeof e},replace:function(e){return String(e)},revive:function(e){return BigInt(e)}}};function Fn(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}var An={blob:{test:function(e){return"Blob"===Qt(e)},replace:function(e){var t=new XMLHttpRequest;if(t.overrideMimeType("text/plain; charset=x-user-defined"),t.open("GET",URL.createObjectURL(e),!1),t.send(),200!==t.status&&0!==t.status)throw new Error("Bad Blob access: "+t.status);return{type:e.type,stringContents:t.responseText}},revive:function(e){var t=e.type,n=e.stringContents;return new Blob([Fn(n)],{type:t})},replaceAsync:function(e){return new Mt((function(t,n){var r=new FileReader;r.addEventListener("load",(function(){t({type:e.type,stringContents:r.result})})),r.addEventListener("error",(function(){n(r.error)})),r.readAsBinaryString(e)}))}}},Cn={cryptokey:{test:function(e){return"CryptoKey"===Qt(e)&&e.extractable},replaceAsync:function(e){return new Mt(function(){var t,n=(t=regeneratorRuntime.mark((function t(n,r){var u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,crypto.subtle.exportKey("jwk",e);case 3:u=t.sent,t.next=9;break;case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",void r(t.t0));case 9:n({jwk:u,algorithm:e.algorithm,usages:e.usages});case 10:case"end":return t.stop()}}),t,null,[[0,6]])})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){u(i,r,o,a,c,"next",e)}function c(e){u(i,r,o,a,c,"throw",e)}a(void 0)}))});return function(e,t){return n.apply(this,arguments)}}())},revive:function(e){var t=e.jwk,n=e.algorithm,r=e.usages;return crypto.subtle.importKey("jwk",t,n,!0,r)}}},mn={dataview:{test:function(e){return"DataView"===Qt(e)},replace:function(e,t){var n=e.buffer,r=e.byteOffset,u=e.byteLength;t.buffers||(t.buffers=[]);var o=t.buffers.indexOf(n);return o>-1?{index:o,byteOffset:r,byteLength:u}:(t.buffers.push(n),{encoded:hn(n),byteOffset:r,byteLength:u})},revive:function(e,t){t.buffers||(t.buffers=[]);var n,r=e.byteOffset,u=e.byteLength,o=e.encoded,i=e.index;return"index"in e?n=t.buffers[i]:(n=En(o),t.buffers.push(n)),new DataView(n,r,u)}}},Bn={date:{test:function(e){return"Date"===Qt(e)},replace:function(e){var t=e.getTime();return Number.isNaN(t)?"NaN":t},revive:function(e){return"NaN"===e?new Date(Number.NaN):new Date(e)}}},wn="undefined"==typeof self?E:self,In={};["TypeError","RangeError","SyntaxError","ReferenceError","EvalError","URIError","InternalError"].forEach((function(e){var t=wn[e];t&&(In[e.toLowerCase()]={test:function(e){return Yt(e,t)},replace:function(e){return e.message},revive:function(e){return new t(e)}})}));var Sn={file:{test:function(e){return"File"===Qt(e)},replace:function(e){var t=new XMLHttpRequest;if(t.overrideMimeType("text/plain; charset=x-user-defined"),t.open("GET",URL.createObjectURL(e),!1),t.send(),200!==t.status&&0!==t.status)throw new Error("Bad File access: "+t.status);return{type:e.type,stringContents:t.responseText,name:e.name,lastModified:e.lastModified}},revive:function(e){var t=e.name,n=e.type,r=e.stringContents,u=e.lastModified;return new File([Fn(r)],t,{type:n,lastModified:u})},replaceAsync:function(e){return new Mt((function(t,n){var r=new FileReader;r.addEventListener("load",(function(){t({type:e.type,stringContents:r.result,name:e.name,lastModified:e.lastModified})})),r.addEventListener("error",(function(){n(r.error)})),r.readAsBinaryString(e)}))}}},On={file:Sn.file,filelist:{test:function(e){return"FileList"===Qt(e)},replace:function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e.item(n);return t},revive:function(e){return new(function(e){function t(){o(this,t),this._files=arguments[0],this.length=this._files.length}var n,r,u;return n=t,(r=[{key:"item",value:function(e){return this._files[e]}},{key:e,get:function(){return"FileList"}}])&&i(n.prototype,r),u&&i(n,u),Object.defineProperty(n,"prototype",{writable:!1}),t}(Symbol.toStringTag))(e)}}},Tn={imagebitmap:{test:function(e){return"ImageBitmap"===Qt(e)||e&&e.dataset&&"ImageBitmap"===e.dataset.toStringTag},replace:function(e){var t=document.createElement("canvas");return t.getContext("2d").drawImage(e,0,0),t.toDataURL()},revive:function(e){var t=document.createElement("canvas"),n=t.getContext("2d"),r=document.createElement("img");return r.addEventListener("load",(function(){n.drawImage(r,0,0)})),r.src=e,t},reviveAsync:function(e){var t=document.createElement("canvas"),n=t.getContext("2d"),r=document.createElement("img");return r.addEventListener("load",(function(){n.drawImage(r,0,0)})),r.src=e,createImageBitmap(t)}}},Nn={imagedata:{test:function(e){return"ImageData"===Qt(e)},replace:function(e){return{array:_(e.data),width:e.width,height:e.height}},revive:function(e){return new ImageData(new Uint8ClampedArray(e.array),e.width,e.height)}}},xn={infinity:{test:function(e){return e===Number.POSITIVE_INFINITY},replace:function(e){return"Infinity"},revive:function(e){return Number.POSITIVE_INFINITY}}},jn={IntlCollator:{test:function(e){return Yt(e,Intl.Collator)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.Collator(e.locale,e)}},IntlDateTimeFormat:{test:function(e){return Yt(e,Intl.DateTimeFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.DateTimeFormat(e.locale,e)}},IntlNumberFormat:{test:function(e){return Yt(e,Intl.NumberFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.NumberFormat(e.locale,e)}}},Pn={map:{test:function(e){return"Map"===Qt(e)},replace:function(e){return _(e.entries())},revive:function(e){return new Map(e)}}},kn={nan:{test:function(e){return Number.isNaN(e)},replace:function(e){return"NaN"},revive:function(e){return Number.NaN}}},Rn={negativeInfinity:{test:function(e){return e===Number.NEGATIVE_INFINITY},replace:function(e){return"-Infinity"},revive:function(e){return Number.NEGATIVE_INFINITY}}},Ln={StringObject:{test:function(e){return"String"===Qt(e)&&"object"==r(e)},replace:function(e){return String(e)},revive:function(e){return new String(e)}},BooleanObject:{test:function(e){return"Boolean"===Qt(e)&&"object"==r(e)},replace:function(e){return Boolean(e)},revive:function(e){return new Boolean(e)}},NumberObject:{test:function(e){return"Number"===Qt(e)&&"object"==r(e)},replace:function(e){return Number(e)},revive:function(e){return new Number(e)}}},qn={regexp:{test:function(e){return"RegExp"===Qt(e)},replace:function(e){return{source:e.source,flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")}},revive:function(e){var t=e.source,n=e.flags;return new RegExp(t,n)}}},Un={set:{test:function(e){return"Set"===Qt(e)},replace:function(e){return _(e.values())},revive:function(e){return new Set(e)}}},Mn="undefined"==typeof self?E:self,Vn={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach((function(e){var t=e,n=Mn[e];n&&(Vn[e.toLowerCase()]={test:function(e){return Qt(e)===t},replace:function(e){return(0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e:e.slice(0)).buffer},revive:function(e){return"ArrayBuffer"===Qt(e)?new n(e):e}})}));var Kn="undefined"==typeof self?E:self,Gn={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach((function(e){var t=e,n=Kn[t];n&&(Gn[e.toLowerCase()]={test:function(e){return Qt(e)===t},replace:function(e,t){var n=e.buffer,r=e.byteOffset,u=e.length;t.buffers||(t.buffers=[]);var o=t.buffers.indexOf(n);return o>-1?{index:o,byteOffset:r,length:u}:(t.buffers.push(n),{encoded:hn(n),byteOffset:r,length:u})},revive:function(e,t){t.buffers||(t.buffers=[]);var r,u=e.byteOffset,o=e.length,i=e.encoded,a=e.index;return"index"in e?r=t.buffers[a]:(r=En(i),t.buffers.push(r)),new n(r,u,o)}})}));var Hn=[{userObject:{test:function(e,t){return Xt(e)},replace:function(e){return n({},e)},revive:function(e){return e}}},{undef:{test:function(e,t){return void 0===e&&(t.ownKeys||!("ownKeys"in t))},replace:function(e){return 0},revive:function(e){return new Dn}}},[{arrayNonindexKeys:{testPlainObjects:!0,test:function(e,t){return!!Array.isArray(e)&&(Object.keys(e).some((function(e){return String(Number.parseInt(e))!==e}))&&(t.iterateIn="object",t.addLength=!0),!0)},replace:function(e,t){return t.iterateUnsetNumeric=!0,e},revive:function(e){if(Array.isArray(e))return e;var t=[];return Object.keys(e).forEach((function(n){var r=e[n];t[n]=r})),t}}},{sparseUndefined:{test:function(e,t){return void 0===e&&!1===t.ownKeys},replace:function(e){return 0},revive:function(e){}}}],Ln,[kn,xn,Rn],Bn,qn,Nn,Tn,Sn,On,An].concat("function"==typeof Map?Pn:[],"function"==typeof Set?Un:[],"function"==typeof ArrayBuffer?vn:[],"function"==typeof Uint8Array?Gn:[],"function"==typeof DataView?mn:[],"undefined"!=typeof Intl?jn:[],"undefined"!=typeof crypto?Cn:[],"undefined"!=typeof BigInt?[gn,bn]:[]).concat({checkDataCloneException:{test:function(e){var t={}.toString.call(e).slice(8,-1);if(["symbol","function"].includes(r(e))||["Arguments","Module","Error","Promise","WeakMap","WeakSet","Event","MessageChannel"].includes(t)||e&&"object"==r(e)&&"number"==typeof e.nodeType&&"function"==typeof e.insertBefore)throw new DOMException("The object cannot be cloned.","DataCloneError");return!1}}}),Wn=(new fn).register(Hn);function Qn(e){Wn=(new fn).register(e(Hn))}function Yn(e,t){var n;try{n=Wn.stringifySync(e)}catch(e){if(Yt(e,ReferenceError)||Yt(e,Fe))throw ge("DataCloneError","The object cannot be cloned.");throw e}return t&&t(n),n}function $n(e){return Wn.parse(e)}function Xn(e){return $n(Yn(e))}var Jn=Object.freeze({__proto__:null,encode:Yn,decode:$n,clone:Xn,register:Qn}),zn=["objectStore","keyPath","multiEntry","unique"];function Zn(){throw new TypeError("Illegal constructor")}var er=Zn;function tr(e,t,n,r,u,o,i,a,c,s,l,f,D){t&&(e=1),e&&a.push("LIMIT",e);var _="count"===o;P.DEBUG&&console.log("Trying to fetch data for Index",a.join(" "),c),s.executeSql(a.join(" "),c,(function(e,a){var c=[],s=0,l=_?function(){}:"key"===o?function(e){return ct(U(e.key))}:function(e){return $n(U(e.value))};if(n.multiEntry)for(var D=W(n.name),d=at(u,n.multiEntry),p=function(e){var n=a.rows.item(e),o=ct(n[D]),f=void 0;if(r&&(i&&u.some((function(e){return o.includes(e)}))||ot(d,n[D]))?(s++,f=n):r||i||void 0!==o&&(s+=Array.isArray(o)?o.length:1,f=n),f&&(c.push(l(f)),t))return"break"},y=0;y<a.rows.length;y++){if("break"===p(y))break}else{for(var h=0;h<a.rows.length;h++){var E=a.rows.item(h);E&&c.push(l(E))}s=c.length}f(_?s:0===s?t?void 0:[]:t?c[0]:c)}),D)}function nr(e,t,n,r,u){var o=e||!ce(n),i=["SELECT",V("count"===r?"key":r)+(t.multiEntry?", "+H(t.name):""),"FROM",G(t.objectStore.__currentName),"WHERE",H(t.name),"NOT NULL"],a=[];if(o)if(u)i.push("AND ("),n.forEach((function(e,n){n>0&&i.push("OR"),i.push(H(t.name),"LIKE ? ESCAPE '^' "),a.push("%"+Q(at(e,t.multiEntry))+"%")})),i.push(")");else if(t.multiEntry)i.push("AND",H(t.name),"LIKE ? ESCAPE '^'"),a.push("%"+Q(at(n,t.multiEntry))+"%");else{bt(gt(n,e),H(t.name),i,a,!0,!1)}return[e,t,o,n,r,u,i,a]}Zn.__createInstance=function(e,t){function n(){var n=this;n[Symbol.toStringTag]="IDBIndex",ee(n,zn),n.__objectStore=e,n.__name=n.__originalName=t.columnName,n.__keyPath=Array.isArray(t.keyPath)?t.keyPath.slice():t.keyPath;var r=t.optionalParams;n.__multiEntry=Boolean(r&&r.multiEntry),n.__unique=Boolean(r&&r.unique),n.__deleted=Boolean(t.__deleted),n.__objectStore.__cursors=t.cursors||[],Object.defineProperty(n,"__currentName",{get:function(){return"__pendingName"in n?n.__pendingName:n.name}}),Object.defineProperty(n,"name",{enumerable:!1,configurable:!1,get:function(){return this.__name},set:function(t){var n=this;t=oe(t);var r=n.name;if(St.__assertVersionChange(n.objectStore.transaction),St.__assertActive(n.objectStore.transaction),er.__invalidStateIfDeleted(n),ur.__invalidStateIfDeleted(n),t!==r){if(n.objectStore.__indexes[t]&&!n.objectStore.__indexes[t].__deleted&&!n.objectStore.__indexes[t].__pendingDelete)throw ge("ConstraintError",'Index "'+t+'" already exists on '+n.objectStore.__currentName);n.__name=t;var u=n.objectStore;delete u.__indexes[r],u.__indexes[t]=n,u.indexNames.splice(u.indexNames.indexOf(r),1,t);var o=u.transaction.__storeHandles[u.name],i=o.__indexHandles[r];i.__name=t,o.__indexHandles[t]=i,n.__pendingName=r;var a=[["key","BLOB "+(u.autoIncrement?"UNIQUE, inc INTEGER PRIMARY KEY AUTOINCREMENT":"PRIMARY KEY")],["value","BLOB"]].concat(_(u.indexNames).filter((function(e){return e!==t})).map((function(e){return[H(e),"BLOB"]})));n.__renameIndex(u,r,t,a,(function(t,n){er.__updateIndexList(e,t,(function(e){delete o.__pendingName,n(e)}))}))}}})}return n.prototype=er.prototype,new n},Zn.__invalidStateIfDeleted=function(e,t){if(e.__deleted||e.__pendingDelete||e.__pendingCreate&&e.objectStore.transaction&&e.objectStore.transaction.__errored)throw ge("InvalidStateError",t||"This index has been deleted")},Zn.__clone=function(e,t){var n=Zn.__createInstance(t,{columnName:e.name,keyPath:e.keyPath,optionalParams:{multiEntry:e.multiEntry,unique:e.unique}});return["__pendingCreate","__pendingDelete","__deleted","__originalName","__recreated"].forEach((function(t){n[t]=e[t]})),n},Zn.__createIndex=function(e,t){var n=t.name,r=e.__currentName,u=e.__indexes[n];t.__pendingCreate=!0,e.indexNames.push(n),e.__indexes[n]=t;var o=e.__indexHandles[n];(!o||t.__pendingDelete||t.__deleted||o.__pendingDelete||o.__deleted)&&(o=e.__indexHandles[n]=Zn.__clone(t,e)),e.transaction.__addNonRequestToTransactionQueue((function(i,a,c,s){var l=u&&(u.__deleted||u.__recreated),f={};function D(e,t){s(ge("UnknownError",'Could not create index "'+n+'"'+t.code+"::"+t.message,t))}function _(u){Zn.__updateIndexList(e,u,(function(){u.executeSql('SELECT "key", "value" FROM '+G(r),[],(function(u,i){P.DEBUG&&console.log("Adding existing "+r+" records to the "+n+" index"),function a(l){if(l<i.rows.length)try{var _=et($n(U(i.rows.item(l).value)),t.keyPath,t.multiEntry);if(_.invalid||_.failure)throw new Error("Go to catch; ignore bad indexKey");if(_=at(_.value,t.multiEntry),t.unique){if(f[_])return f={},void s(ge("ConstraintError","Duplicate values already exist within the store"));f[_]=!0}u.executeSql("UPDATE "+G(r)+" SET "+H(n)+' = ? WHERE "key" = ?',[q(_),i.rows.item(l).key],(function(e,t){a(l+1)}),D)}catch(e){a(l+1)}else delete t.__pendingCreate,delete o.__pendingCreate,t.__deleted&&(delete t.__deleted,delete o.__deleted,t.__recreated=!0,o.__recreated=!0),f={},c(e)}(0)}),D)}),D)}var d=G(r),p=H(t.name);if(l)_(i);else{var y=["ALTER TABLE",d,"ADD",p,"BLOB"].join(" ");P.DEBUG&&console.log(y),i.executeSql(y,[],(function(e){P.useSQLiteIndexes?e.executeSql('CREATE INDEX IF NOT EXISTS "'+d.slice(1,-1)+"^5"+p.slice(1,-1)+'" ON '+d+"("+p+")",[],_,D):_(e)}),D)}}),void 0,e)},Zn.__deleteIndex=function(e,t){t.__pendingDelete=!0;var n=e.__indexHandles[t.name];n&&(n.__pendingDelete=!0),e.indexNames.splice(e.indexNames.indexOf(t.name),1),e.transaction.__addNonRequestToTransactionQueue((function(r,u,o,i){function a(e,n){i(ge("UnknownError",'Could not delete index "'+t.name+'"',n))}function c(){Zn.__updateIndexList(e,r,(function(e){delete t.__pendingDelete,delete t.__recreated,t.__deleted=!0,n&&(n.__deleted=!0,delete n.__pendingDelete),o(e)}),a)}P.useSQLiteIndexes?r.executeSql("DROP INDEX IF EXISTS "+V(G(e.name).slice(1,-1)+"^5"+H(t.name).slice(1,-1)),[],c,a):c()}),void 0,e)},Zn.__updateIndexList=function(e,t,n,r){for(var u={},o=0;o<e.indexNames.length;o++){var i=e.__indexes[e.indexNames[o]];u[i.name]={columnName:i.name,keyPath:i.keyPath,optionalParams:{unique:i.unique,multiEntry:i.multiEntry},deleted:Boolean(i.deleted)}}P.DEBUG&&console.log("Updating the index list for "+e.__currentName,u),t.executeSql('UPDATE __sys__ SET "indexList" = ? WHERE "name" = ?',[JSON.stringify(u),q(e.__currentName)],(function(){n(e)}),r)},Zn.prototype.__fetchIndexData=function(e,t,n,r){var u=this;if(void 0!==r&&(r=ue(r,"unsigned long")),Zn.__invalidStateIfDeleted(u),ur.__invalidStateIfDeleted(u.objectStore),u.objectStore.__deleted)throw ge("InvalidStateError","This index's object store has been deleted");if(St.__assertActive(u.objectStore.transaction),n&&ce(e))throw ge("DataError","No key or range was specified");var o=nr(n,u,e,t,!1);return u.objectStore.transaction.__addToTransactionQueue((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];tr.apply(void 0,[r].concat(_(o),t))}),void 0,u)},Zn.prototype.openCursor=function(){var e=this,t=Array.prototype.slice.call(arguments),n=t[0],r=t[1],u=Lr.__createInstance(n,r,e.objectStore,e,W(e.name),"value");return e.__objectStore.__cursors.push(u),u.__request},Zn.prototype.openKeyCursor=function(){var e=this,t=Array.prototype.slice.call(arguments),n=t[0],r=t[1],u=Pr.__createInstance(n,r,e.objectStore,e,W(e.name),"key");return e.__objectStore.__cursors.push(u),u.__request},Zn.prototype.get=function(e){if(!arguments.length)throw new TypeError("A parameter was missing for `IDBIndex.get`.");return this.__fetchIndexData(e,"value",!0)},Zn.prototype.getKey=function(e){if(!arguments.length)throw new TypeError("A parameter was missing for `IDBIndex.getKey`.");return this.__fetchIndexData(e,"key",!0)},Zn.prototype.getAll=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1];return this.__fetchIndexData(t,"value",!1,n)},Zn.prototype.getAllKeys=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1];return this.__fetchIndexData(t,"key",!1,n)},Zn.prototype.count=function(){var e=this,t=arguments[0];return Y(t,ht)?Lr.__createInstance(t,"next",e.objectStore,e,W(e.name),"value",!0).__request:e.__fetchIndexData(t,"count",!1)},Zn.prototype.__renameIndex=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o="BLOB",i=e.__currentName,a=G(i),c=H(n),s=V("tmp_"+G(i).slice(1,-1)),l=r.map((function(e){return e[0]})),f=r.map((function(e){return e.join(" ")})),D=f.length?f.join(", ")+", ":"",_=l.length?l.join(", ")+", ":"";e.transaction.__addNonRequestToTransactionQueue((function(e,n,r,i){function f(e,t){i(t)}function d(){u?u(e,r):r()}var p="CREATE TABLE "+s+"("+D+c+" "+o+")";P.DEBUG&&console.log(p),e.executeSql(p,[],(function(){var n="INSERT INTO "+s+"("+_+c+") SELECT "+_+H(t)+" FROM "+a;P.DEBUG&&console.log(n),e.executeSql(n,[],(function(){var t="DROP TABLE "+a;P.DEBUG&&console.log(t),e.executeSql(t,[],(function(){var t="ALTER TABLE "+s+" RENAME TO "+a;P.DEBUG&&console.log(t),e.executeSql(t,[],(function(e,t){if(P.useSQLiteIndexes){var n=l.slice(2).map((function(t){return new je((function(n,r){var u="CREATE INDEX "+V(a.slice(1,-1)+"^5"+t.slice(1,-1))+" ON "+a+"("+t+")";P.DEBUG&&console.log(u),e.executeSql(u,[],n,(function(e,t){r(t)}))}))}));n.push(new je((function(t,n){var r=V("sk_"+a.slice(1,-1)),u="DROP INDEX IF EXISTS "+r;P.DEBUG&&console.log(u),e.executeSql(u,[],(function(){var u="CREATE INDEX "+r+" ON "+a+'("key")';P.DEBUG&&console.log(u),e.executeSql(u,[],t,(function(e,t){n(t)}))}),(function(e,t){n(t)}))}))),je.all(n).then(d,i).catch((function(e){throw console.log("Index rename error"),e}))}else d()}),f)}),f)}),f)}),f)}))},Object.defineProperty(Zn,Symbol.hasInstance,{value:function(e){return $(e)&&"function"==typeof e.openCursor&&"boolean"==typeof e.multiEntry}}),z(Zn.prototype,zn),J(Zn.prototype,["name"]),Zn.prototype[Symbol.toStringTag]="IDBIndexPrototype",Object.defineProperty(Zn,"prototype",{writable:!1});var rr=["keyPath","indexNames","transaction","autoIncrement"];function ur(){throw new TypeError("Illegal constructor")}var or=ur;function ir(e,t){for(var n=0,r=e.length-1;r>=0;r--){var u=e[r];"."===u?e.splice(r,1):".."===u?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}ur.__createInstance=function(e,t){function n(){var n=this;n[Symbol.toStringTag]="IDBObjectStore",ee(this,rr),n.__name=n.__originalName=e.name,n.__keyPath=Array.isArray(e.keyPath)?e.keyPath.slice():e.keyPath,n.__transaction=t,n.__idbdb=e.idbdb,n.__cursors=e.cursors||[],n.__autoIncrement=Boolean(e.autoInc),n.__indexes={},n.__indexHandles={},n.__indexNames=Ct.__createInstance();var r,u,o=e.indexList;for(var i in o)if(r=o,u=i,Object.prototype.hasOwnProperty.call(r,u)){var a=Zn.__createInstance(n,o[i]);n.__indexes[a.name]=a,a.__deleted||n.indexNames.push(a.name)}n.__oldIndexNames=n.indexNames.clone(),Object.defineProperty(this,"__currentName",{get:function(){return"__pendingName"in this?this.__pendingName:this.name}}),Object.defineProperty(this,"name",{enumerable:!1,configurable:!1,get:function(){return this.__name},set:function(e){var t=this;e=oe(e);var n=t.name;if(or.__invalidStateIfDeleted(t),St.__assertVersionChange(t.transaction),St.__assertActive(t.transaction),n!==e){if(t.__idbdb.__objectStores[e]&&!t.__idbdb.__objectStores[e].__pendingDelete)throw ge("ConstraintError",'Object store "'+e+'" already exists in '+t.__idbdb.name);t.__name=e;var r=t.__idbdb.__objectStores[n];r.__name=e,t.__idbdb.__objectStores[e]=r,delete t.__idbdb.__objectStores[n],t.__idbdb.objectStoreNames.splice(t.__idbdb.objectStoreNames.indexOf(n),1,e);var u=t.transaction.__storeHandles[n];u.__name=e,t.transaction.__storeHandles[e]=u,t.__pendingName=n;var o='UPDATE __sys__ SET "name" = ? WHERE "name" = ?',i=[q(e),q(n)];P.DEBUG&&console.log(o,i),t.transaction.__addNonRequestToTransactionQueue((function(r,u,a,c){r.executeSql(o,i,(function(r,u){var o="ALTER TABLE "+G(n)+" RENAME TO "+G(e);P.DEBUG&&console.log(o),r.executeSql(o,[],(function(e,n){delete t.__pendingName,a()}))}),(function(e,t){c(t)}))}))}}})}return n.prototype=or.prototype,new n},ur.__clone=function(e,t){var n=ur.__createInstance({name:e.__currentName,keyPath:Array.isArray(e.keyPath)?e.keyPath.slice():e.keyPath,autoInc:e.autoIncrement,indexList:{},idbdb:e.__idbdb,cursors:e.__cursors},t);return["__indexes","__indexNames","__oldIndexNames","__deleted","__pendingDelete","__pendingCreate","__originalName"].forEach((function(t){n[t]=e[t]})),n},ur.__invalidStateIfDeleted=function(e,t){if(e.__deleted||e.__pendingDelete||e.__pendingCreate&&e.transaction&&e.transaction.__errored)throw ge("InvalidStateError",t||"This store has been deleted")},ur.__createObjectStore=function(e,t){var n=t.__currentName;t.__pendingCreate=!0,e.__objectStores[n]=t,e.objectStoreNames.push(n);var r=e.__versionTransaction,u=r.__storeHandles;return(!u[n]||u[n].__pendingDelete||u[n].__deleted)&&(u[n]=ur.__clone(t,r)),r.__addNonRequestToTransactionQueue((function(e,r,u,o){function i(e,t){P.DEBUG&&console.log(t),o(ge("UnknownError",'Could not create object store "'+n+'"',t))}var a=G(n),c=["CREATE TABLE",a,"(key BLOB",t.autoIncrement?"UNIQUE, inc INTEGER PRIMARY KEY AUTOINCREMENT":"PRIMARY KEY",", value BLOB)"].join(" ");P.DEBUG&&console.log(c),e.executeSql(c,[],(function(e,r){function o(){var r=JSON.stringify(t.keyPath);e.executeSql("INSERT INTO __sys__ VALUES (?,?,?,?,?)",[q(n),r,Number(t.autoIncrement),"{}",1],(function(){delete t.__pendingCreate,delete t.__deleted,u(t)}),i)}P.useSQLiteIndexes?e.executeSql("CREATE INDEX IF NOT EXISTS "+V("sk_"+a.slice(1,-1))+" ON "+a+'("key")',[],o,i):o()}),i)})),u[n]},ur.__deleteObjectStore=function(e,t){t.__pendingDelete=!0,t.__indexNames=Ct.__createInstance(),e.objectStoreNames.splice(e.objectStoreNames.indexOf(t.__currentName),1);var n=e.__versionTransaction.__storeHandles[t.__currentName];n&&(n.__indexNames=Ct.__createInstance(),n.__pendingDelete=!0),e.__versionTransaction.__addNonRequestToTransactionQueue((function(e,r,u,o){function i(e,t){P.DEBUG&&console.log(t),o(ge("UnknownError","Could not delete ObjectStore",t))}e.executeSql('SELECT "name" FROM __sys__ WHERE "name" = ?',[q(t.__currentName)],(function(e,r){r.rows.length>0&&e.executeSql("DROP TABLE "+G(t.__currentName),[],(function(){e.executeSql('DELETE FROM __sys__ WHERE "name" = ?',[q(t.__currentName)],(function(){delete t.__pendingDelete,t.__deleted=!0,n&&(delete n.__pendingDelete,n.__deleted=!0),u()}),i)}),i)}))}))},ur.prototype.__validateKeyAndValueAndCloneValue=function(e,t,n){var r=this;if(null!==r.keyPath){if(void 0!==t)throw ge("DataError","The object store uses in-line keys and the key parameter was provided",r);var u=Xn(e);if((t=et(u,r.keyPath)).invalid)throw ge("DataError","KeyPath was specified, but key was invalid.");if(t.failure){if(!n){if(!r.autoIncrement)throw ge("DataError","Could not evaluate a key from keyPath and there is no key generator");if(!rt(u,r.keyPath))throw ge("DataError","A key could not be injected into a value");return[void 0,u]}throw ge("DataError","Could not evaluate a key from keyPath")}return[t.value,u]}if(void 0===t){if(!r.autoIncrement)throw ge("DataError","The object store uses out-of-line keys and has no key generator and the key parameter was not provided.",r);t=void 0}else Ze(t);return[t,Xn(e)]},ur.prototype.__deriveKey=function(e,t,n,r,u){var o=this;function i(e){Yn(n,(function(t){t=$n(t),r(t,e)}))}o.autoIncrement?void 0===n?dt(e,o,(function(e,n,i){e?u(ge("ConstraintError","The key generator's current number has reached the maximum safe integer limit")):(null!==o.keyPath&&nt(t,n,o.keyPath),r(n,i))}),u):pt(e,o,n,i,u):i()},ur.prototype.__insertData=function(e,t,n,r,u,o,i){var a=this,c={},s=Object.keys(a.__indexes).map((function(t){return new je((function(r,u){var o=a.__indexes[t];if(o.__pendingCreate||o.__deleted)r();else{var i;try{if((i=et(n,o.keyPath,o.multiEntry)).invalid||i.failure)throw new Error("Go to catch")}catch(e){return void r()}if(i=i.value,o.unique){var s=o.multiEntry&&Array.isArray(i),l=nr(!0,o,i,"key",s);tr.apply(void 0,[null].concat(_(l),[e,null,function(e){if(void 0===e)return f(o),void r();u(ge("ConstraintError","Index already contains a record equal to "+(s?"one of the subkeys of":"")+"`indexKey`"))},u]))}else f(o),r()}function f(e){void 0!==i&&(c[e.__currentName]=at(i,e.multiEntry))}}))}));return je.all(s).then((function(){var n=["INSERT INTO",G(a.__currentName),"("],u=[" VALUES ("],s=[];void 0!==r&&(n.push(V("key"),","),u.push("?,"),s.push(q(at(r)))),Object.entries(c).forEach((function(e){var t=D(e,2),r=t[0],o=t[1];n.push(H(r)+","),u.push("?,"),s.push(q(o))})),n.push(V("value")+" )"),u.push("?)"),s.push(q(t));var l=n.join(" ")+u.join(" ");P.DEBUG&&console.log("SQL for adding",l,s),e.executeSql(l,s,(function(e,t){o(r)}),(function(e,t){i(ge("ConstraintError",t.message,t))}))})).catch((function(t){function n(){i(t)}"number"!=typeof u?n():Dt(e,a,u,n,n)}))},ur.prototype.add=function(e){var t=this,n=arguments[1];if(!(t instanceof ur))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No value was specified");ur.__invalidStateIfDeleted(t),St.__assertActive(t.transaction),t.transaction.__assertWritable();var r=t.transaction.__createRequest(t),u=t.__validateKeyAndValueAndCloneValue(e,n,!1),o=D(u,2),i=o[0],a=o[1];return ur.__storingRecordObjectStore(r,t,!0,a,!0,i),r},ur.prototype.put=function(e){var t=this,n=arguments[1];if(!(t instanceof ur))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No value was specified");ur.__invalidStateIfDeleted(t),St.__assertActive(t.transaction),t.transaction.__assertWritable();var r=t.transaction.__createRequest(t),u=t.__validateKeyAndValueAndCloneValue(e,n,!1),o=D(u,2),i=o[0],a=o[1];return ur.__storingRecordObjectStore(r,t,!0,a,!1,i),r},ur.prototype.__overwrite=function(e,t,n,r){var u="DELETE FROM "+G(this.__currentName)+' WHERE "key" = ?',o=at(t);e.executeSql(u,[q(o)],(function(e,r){P.DEBUG&&console.log("Did the row with the",t,"exist?",r.rowsAffected),n(e)}),(function(e,t){r(t)}))},ur.__storingRecordObjectStore=function(e,t,n,r,u){var o=arguments[5];t.transaction.__pushToQueue(e,(function(e,i,a,c){t.__deriveKey(e,r,o,(function(o,i){Yn(r,(function(s){function l(e){t.__insertData(e,s,r,o,i,(function(){n&&t.__cursors.forEach((function(e){e.__invalidateCache()})),a.apply(void 0,arguments)}),c)}u?l(e):t.__overwrite(e,o,l,c)}))}),c)}))},ur.prototype.__get=function(e,t,n,r){var u=this;void 0!==r&&(r=ue(r,"unsigned long")),ur.__invalidStateIfDeleted(u),St.__assertActive(u.transaction);var o=gt(e,!n),i=["SELECT",V(t?"key":"value"),"FROM",G(u.__currentName)],a=[];if(void 0!==o&&(i.push("WHERE"),bt(o,V("key"),i,a)),n||(r=1),r){if(!Number.isFinite(r))throw new TypeError("The count parameter must be a finite number");i.push("LIMIT",r)}return i=i.join(" "),u.transaction.__addToTransactionQueue((function(e,r,o,c){P.DEBUG&&console.log("Fetching",u.__currentName,a),e.executeSql(i,a,(function(e,r){var u;P.DEBUG&&console.log("Fetched data",r);try{if(0===r.rows.length)return void(n?o([]):o());if(u=[],t)for(var i=0;i<r.rows.length;i++)u.push(ct(U(r.rows.item(i).key),!1));else for(var a=0;a<r.rows.length;a++)u.push($n(U(r.rows.item(a).value)));n||(u=u[0])}catch(e){P.DEBUG&&console.log(e)}o(u)}),(function(e,t){c(t)}))}),void 0,u)},ur.prototype.get=function(e){if(!arguments.length)throw new TypeError("A parameter was missing for `IDBObjectStore.get`.");return this.__get(e)},ur.prototype.getKey=function(e){if(!arguments.length)throw new TypeError("A parameter was missing for `IDBObjectStore.getKey`.");return this.__get(e,!0)},ur.prototype.getAll=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1];return this.__get(t,!1,!0,n)},ur.prototype.getAllKeys=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1];return this.__get(t,!0,!0,n)},ur.prototype.delete=function(e){var t=this;if(!(this instanceof ur))throw new TypeError("Illegal invocation");if(!arguments.length)throw new TypeError("A parameter was missing for `IDBObjectStore.delete`.");ur.__invalidStateIfDeleted(t),St.__assertActive(t.transaction),t.transaction.__assertWritable();var n=gt(e,!0),r=["DELETE FROM",G(t.__currentName),"WHERE"],u=[];bt(n,V("key"),r,u);var o=r.join(" ");return t.transaction.__addToTransactionQueue((function(e,n,r,i){P.DEBUG&&console.log("Deleting",t.__currentName,u),e.executeSql(o,u,(function(e,n){P.DEBUG&&console.log("Deleted from database",n.rowsAffected),t.__cursors.forEach((function(e){e.__invalidateCache()})),r()}),(function(e,t){i(t)}))}),void 0,t)},ur.prototype.clear=function(){var e=this;if(!(this instanceof ur))throw new TypeError("Illegal invocation");return ur.__invalidStateIfDeleted(e),St.__assertActive(e.transaction),e.transaction.__assertWritable(),e.transaction.__addToTransactionQueue((function(t,n,r,u){t.executeSql("DELETE FROM "+G(e.__currentName),[],(function(t,n){P.DEBUG&&console.log("Cleared all records from database",n.rowsAffected),e.__cursors.forEach((function(e){e.__invalidateCache()})),r()}),(function(e,t){u(t)}))}),void 0,e)},ur.prototype.count=function(){var e=this,t=arguments[0];if(!(e instanceof ur))throw new TypeError("Illegal invocation");return ur.__invalidStateIfDeleted(e),St.__assertActive(e.transaction),Lr.__createInstance(t,"next",e,e,"key","value",!0).__request},ur.prototype.openCursor=function(){var e=this,t=Array.prototype.slice.call(arguments),n=t[0],r=t[1];if(!(e instanceof ur))throw new TypeError("Illegal invocation");ur.__invalidStateIfDeleted(e);var u=Lr.__createInstance(n,r,e,e,"key","value");return e.__cursors.push(u),u.__request},ur.prototype.openKeyCursor=function(){var e=this;if(!(e instanceof ur))throw new TypeError("Illegal invocation");ur.__invalidStateIfDeleted(e);var t=Array.prototype.slice.call(arguments),n=t[0],r=t[1],u=Pr.__createInstance(n,r,e,e,"key","key");return e.__cursors.push(u),u.__request},ur.prototype.index=function(e){var t=this;if(!(t instanceof ur))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No index name was specified");ur.__invalidStateIfDeleted(t),St.__assertNotFinished(t.transaction);var n=t.__indexes[e];if(!n||n.__deleted)throw ge("NotFoundError",'Index "'+e+'" does not exist on '+t.__currentName);return(!t.__indexHandles[e]||t.__indexes[e].__pendingDelete||t.__indexes[e].__deleted)&&(t.__indexHandles[e]=Zn.__clone(n,t)),t.__indexHandles[e]},ur.prototype.createIndex=function(e,t){var n=this,r=arguments[2];if(!(n instanceof ur))throw new TypeError("Illegal invocation");if(e=String(e),0===arguments.length)throw new TypeError("No index name was specified");if(1===arguments.length)throw new TypeError("No key path was specified");if(St.__assertVersionChange(n.transaction),ur.__invalidStateIfDeleted(n),St.__assertActive(n.transaction),n.__indexes[e]&&!n.__indexes[e].__deleted&&!n.__indexes[e].__pendingDelete)throw ge("ConstraintError",'Index "'+e+'" already exists on '+n.__currentName);if(!re(t=ae(t)))throw ge("SyntaxError","A valid keyPath must be supplied");if(Array.isArray(t)&&r&&r.multiEntry)throw ge("InvalidAccessError","The keyPath argument was an array and the multiEntry option is true.");r=r||{};var u={columnName:e,keyPath:t,optionalParams:{unique:Boolean(r.unique),multiEntry:Boolean(r.multiEntry)}},o=Zn.__createInstance(n,u);return Zn.__createIndex(n,o),o},ur.prototype.deleteIndex=function(e){var t=this;if(!(t instanceof ur))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No index name was specified");St.__assertVersionChange(t.transaction),ur.__invalidStateIfDeleted(t),St.__assertActive(t.transaction);var n=t.__indexes[e];if(!n)throw ge("NotFoundError",'Index "'+e+'" does not exist on '+t.__currentName);Zn.__deleteIndex(t,n)},z(ur.prototype,rr),J(ur.prototype,["name"]),ur.prototype[Symbol.toStringTag]="IDBObjectStorePrototype",Object.defineProperty(ur,"prototype",{writable:!1});var ar=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,cr=function(e){return ar.exec(e).slice(1)};function sr(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:"/";if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,t="/"===r.charAt(0))}return(t?"/":"")+(e=ir(_r(e.split("/"),(function(e){return!!e})),!t).join("/"))||"."}function lr(e){var t=fr(e),n="/"===dr(e,-1);return(e=ir(_r(e.split("/"),(function(e){return!!e})),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e}function fr(e){return"/"===e.charAt(0)}var Dr={extname:function(e){return cr(e)[3]},basename:function(e,t){var n=cr(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},dirname:function(e){var t=cr(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},sep:"/",delimiter:":",relative:function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=sr(e).substr(1),t=sr(t).substr(1);for(var r=n(e.split("/")),u=n(t.split("/")),o=Math.min(r.length,u.length),i=o,a=0;a<o;a++)if(r[a]!==u[a]){i=a;break}var c=[];for(a=i;a<r.length;a++)c.push("..");return(c=c.concat(u.slice(i))).join("/")},join:function(){var e=Array.prototype.slice.call(arguments,0);return lr(_r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},isAbsolute:fr,normalize:lr,resolve:sr};function _r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var dr="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)},pr=["onabort","onclose","onerror","onversionchange"],yr=["name","version","objectStoreNames"];function hr(){throw new TypeError("Illegal constructor")}var Er,vr=hr;hr.__createInstance=function(e,t,n,r,u){function o(){var o=this;this[Symbol.toStringTag]="IDBDatabase",ee(this,yr),this.__db=e,this.__closePending=!1,this.__oldVersion=n,this.__version=r,this.__name=t,this.__upgradeTransaction=null,Z(this,pr),this.__setOptions({legacyOutputDidListenersThrowFlag:!0}),this.__transactions=[],this.__objectStores={},this.__objectStoreNames=Ct.__createInstance();for(var i={},a=function(e){var t=u.rows.item(e);i.name=t.name,i.keyPath=JSON.parse(t.keyPath),["autoInc","indexList"].forEach((function(e){i[e]=JSON.parse(t[e])})),i.idbdb=o;var n=ur.__createInstance(i);o.__objectStores[n.name]=n,o.objectStoreNames.push(n.name)},c=0;c<u.rows.length;c++)a(c);this.__oldObjectStoreNames=this.objectStoreNames.clone()}return o.prototype=vr.prototype,new o},hr.prototype=x.createInstance(),hr.prototype[Symbol.toStringTag]="IDBDatabasePrototype",hr.prototype.createObjectStore=function(e){var t=arguments[1];if(e=String(e),!(this instanceof hr))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No object store name was specified");St.__assertVersionChange(this.__versionTransaction),this.throwIfUpgradeTransactionNull(),St.__assertActive(this.__versionTransaction);var r=t=n({},t),u=r.keyPath;if(null!==(u=void 0===u?null:ae(u))&&!re(u))throw ge("SyntaxError","The keyPath argument contains an invalid key path.");if(this.__objectStores[e]&&!this.__objectStores[e].__pendingDelete)throw ge("ConstraintError",'Object store "'+e+'" already exists in '+this.name);var o=t.autoIncrement;if(o&&(""===u||Array.isArray(u)))throw ge("InvalidAccessError","With autoIncrement set, the keyPath argument must not be an array or empty string.");var i={name:e,keyPath:u,autoInc:o,indexList:{},idbdb:this},a=ur.__createInstance(i,this.__versionTransaction);return ur.__createObjectStore(this,a)},hr.prototype.deleteObjectStore=function(e){if(!(this instanceof hr))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No object store name was specified");St.__assertVersionChange(this.__versionTransaction),this.throwIfUpgradeTransactionNull(),St.__assertActive(this.__versionTransaction);var t=this.__objectStores[e];if(!t)throw ge("NotFoundError",'Object store "'+e+'" does not exist in '+this.name);ur.__deleteObjectStore(this,t)},hr.prototype.close=function(){if(!(this instanceof hr))throw new TypeError("Illegal invocation");this.__closePending=!0,this.__unblocking&&this.__unblocking.check()},hr.prototype.transaction=function(e){var t=this;if(0===arguments.length)throw new TypeError("You must supply a valid `storeNames` to `IDBDatabase.transaction`");var n=arguments[1];if(e=X(e)?_(new Set(ae(e))).sort():[oe(e)],n=n||"readonly",St.__assertNotVersionChange(this.__versionTransaction),this.__closePending)throw ge("InvalidStateError","An attempt was made to start a new transaction on a database connection that is not open");var r=Ct.__createInstance();if(e.forEach((function(e){if(!t.objectStoreNames.contains(e))throw ge("NotFoundError",'The "'+e+'" object store does not exist');r.push(e)})),0===e.length)throw ge("InvalidAccessError","No valid object store names were specified");if("readonly"!==n&&"readwrite"!==n)throw new TypeError("Invalid transaction mode: "+n);var u=St.__createInstance(this,r,n);return this.__transactions.push(u),u},hr.prototype.throwIfUpgradeTransactionNull=function(){if(null===this.__upgradeTransaction)throw ge("InvalidStateError","No upgrade transaction associated with database.")},hr.prototype.__forceClose=function(e){var t=this;t.close();var n=0;t.__transactions.forEach((function(r){r.on__abort=function(){if(++n===t.__transactions.length){var e=se("close");setTimeout((function(){t.dispatchEvent(e)}))}},r.__abortTransaction(ge("AbortError","The connection was force-closed: "+(e||"")))}))},J(hr.prototype,pr),z(hr.prototype,yr),Object.defineProperty(hr.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:hr}),Object.defineProperty(hr,"prototype",{writable:!1});var br=function(){return"object"===("undefined"==typeof location?"undefined":r(location))&&location?location.origin:"null"},gr=function(){return!1!==P.checkOrigin&&"null"===br()},Fr={};function Ar(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:br(),n=Fr[t][e];if(n[0]){var r=n[0],u=r.req,o=r.cb;u.addEventListener("success",i),u.addEventListener("error",i),o(u)}function i(){n.shift(),Ar(e,t)}}function Cr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:br(),r=arguments.length>3?arguments[3]:void 0;Fr[n][t]||(Fr[n][t]=[]),Fr[n][t].push({req:e,cb:r}),1===Fr[n][t].length&&Ar(t,n)}function mr(e,t,n,r){var u=function(e){return e.__closePending},o=function(){return e.every((function(e){return u(e)}))};return e.reduce((function(e,t){return u(t)?e:e.then((function(){if(!u(t)){var e=new le("versionchange",{oldVersion:n,newVersion:r});return new je((function(n){setTimeout((function(){t.dispatchEvent(e),n()}))}))}}))}),je.resolve()).then((function(){if(!o())return new je((function(i){var a={check:function(){o()&&i()}},c=new le("blocked",{oldVersion:n,newVersion:r});setTimeout((function(){t.dispatchEvent(c),o()?i():e.forEach((function(e){u(e)||(e.__unblocking=a)}))}))}))}))}var Br,wr={},Ir=0;function Sr(e){return Object.keys(wr[e]).map((function(e){return Number(e)})).reduce((function(e,t){return t>e?t:e}),0)}function Or(e,t,n,r,u){if("string"==typeof P.memoryDatabase){var o=wr[t]?function(e){return wr[e]&&wr[e][Sr(e)]}(t):null;if(!o)return console.warn("Could not find a memory database instance to delete."),void r();var i=o._db&&o._db._db;return i&&i.close?void i.close((function(e){e?console.warn("Error closing (destroying) memory database"):r()})):void console.error("The `openDatabase` implementation does not have the expected `._db._db.close` method for closing the database")}Er&&!1!==P.deleteDatabaseFiles?Er.unlink(Dr.join(P.databaseBasePath||"",n),(function(e){e&&"ENOENT"!==e.code?u({code:0,message:"Error removing database file: "+n+" "+e}):r()})):e(Dr.join(P.databaseBasePath||"",n),1,t,P.DEFAULT_DB_SIZE).transaction((function(e){e.executeSql('SELECT "name" FROM __sys__',[],(function(e,t){var n=t.rows;!function t(o){o>=n.length?e.executeSql("DROP TABLE IF EXISTS __sys__",[],(function(){r()}),u):e.executeSql("DROP TABLE "+G(U(n.item(o).name)),[],(function(){t(o+1)}),(function(){t(o+1)}))}(0)}),(function(e){r()}))}))}function Tr(e,t,n){function r(e,t){t=Ee(t||e),P.DEBUG&&console.log("Error in sysdb transaction - when creating dbVersions",t),n(t)}Br?t():(Br=e("string"==typeof P.memoryDatabase?P.memoryDatabase:Dr.join("string"==typeof P.sysDatabaseBasePath?P.sysDatabaseBasePath:P.databaseBasePath||"","__sysdb__"+(!1!==P.addSQLiteExtension?".sqlite":"")),1,"System Database",P.DEFAULT_DB_SIZE)).transaction((function(e){e.executeSql("CREATE TABLE IF NOT EXISTS dbVersions (name BLOB, version INT);",[],(function(e){P.useSQLiteIndexes?e.executeSql("CREATE INDEX IF NOT EXISTS dbvname ON dbVersions(name)",[],t,r):t()}),r)}),r)}function Nr(){throw new TypeError("Illegal constructor")}var xr=Nr;Nr.__createInstance=function(){function e(){this[Symbol.toStringTag]="IDBFactory",this.__connections={}}return e.prototype=xr.prototype,new e},Nr.prototype.open=function(e){var t=this;if(!(t instanceof Nr))throw new TypeError("Illegal invocation");var n=arguments[1];if(0===arguments.length)throw new TypeError("Database name is required");if(void 0!==n&&0===(n=ue(n,"unsigned long long")))throw new TypeError("Version cannot be 0");if(gr())throw ge("SecurityError","Cannot open an IndexedDB database from an opaque origin.");var r=Ie.__createInstance(),u=!1;P.autoName&&""===e&&(e="autoNamedDatabase_"+Ir++);var o,i=q(e=String(e)),a="string"==typeof P.memoryDatabase,c=!1!==P.cacheDatabaseInstances||a;try{o=K(e)}catch(e){throw e}function s(e,t){if(!u){t=t?Ee(t):e,u=!0;var n=se("error",t,{bubbles:!0,cancelable:!0});r.__done=!0,r.__error=t,r.__result=void 0,r.dispatchEvent(n)}}function l(u,a,l){u.executeSql('SELECT "name", "keyPath", "autoInc", "indexList" FROM __sys__',[],(function(u,f){function D(){r.__result=_,r.__done=!0}var _=hr.__createInstance(a,e,l,n,f);if(t.__connections[e]||(t.__connections[e]=[]),t.__connections[e].push(_),l<n){mr(t.__connections[e].slice(0,-1),r,l,n).then((function(){var u=function(e,t,n){if(t)try{e.executeSql("ROLLBACK",[],n,n)}catch(e){Br.transaction((function(e){function t(e){throw new Error("Unable to roll back upgrade transaction!"+(e||""))}0===l?e.executeSql('DELETE FROM dbVersions WHERE "name" = ?',[i],(function(){n(t)}),t):e.executeSql('UPDATE dbVersions SET "version" = ? WHERE "name" = ?',[l,i],n,t)}))}else n()};Br.transaction((function(a){function f(){var i=new le("upgradeneeded",{oldVersion:l,newVersion:n});r.__result=_,_.__upgradeTransaction=r.__transaction=r.__result.__versionTransaction=St.__createInstance(r.__result,r.__result.objectStoreNames,"versionchange"),r.__done=!0,r.transaction.__addNonRequestToTransactionQueue((function(e,t,n,u){if(r.dispatchEvent(i),i.__legacyOutputDidListenersThrowError)return pe("Error","An error occurred in an upgradeneeded handler attached to request chain",i.__legacyOutputDidListenersThrowError),void r.transaction.__abortTransaction(ge("AbortError","A request was aborted."));n()})),r.transaction.on__beforecomplete=function(e){_.__upgradeTransaction=null,r.__result.__versionTransaction=null,u(a,!1,(function(){r.transaction.__transFinishedCb(!1,(function(){e.complete(),r.__transaction=null}))}))},r.transaction.on__preabort=function(){_.__upgradeTransaction=null,c&&e in wr&&delete wr[e][n]},r.transaction.on__abort=function(){r.__transaction=null,r.__result=void 0,r.__done=!1,_.close(),setTimeout((function(){var n=ge("AbortError","The upgrade transaction was aborted.");u(a,n,(function(r){0!==l?s(n):Or(t.__openDatabase,e,o,s.bind(null,n),r||s)}))}))},r.transaction.on__complete=function(){if(r.__result.__closePending)return r.__transaction=null,void s(ge("AbortError","The connection has been closed."));D(),r.__transaction=null;var e=se("success");r.dispatchEvent(e)}}0===l?a.executeSql("INSERT INTO dbVersions VALUES (?,?)",[i,n],f,s):a.executeSql('UPDATE dbVersions SET "version" = ? WHERE "name" = ?',[n,i],f,s)}),s,null,(function(e,t,n,r,o){return!(!e.readOnly&&!t)||(u=function(e,t,n){t?r(t,n):o(n)},!1)}))})).catch((function(e){throw console.log("Error within `triggerAnyVersionChangeAndBlockedEvents`"),e}))}else{D();var d=se("success");r.dispatchEvent(d)}}),s)}function f(r){var u;if((a||c)&&e in wr&&wr[e][n]?u=wr[e][n]:(u=t.__openDatabase(a?P.memoryDatabase:Dr.join(P.databaseBasePath||"",o),1,e,P.DEFAULT_DB_SIZE),c&&(e in wr||(wr[e]={}),wr[e][n]=u)),void 0===n&&(n=r||1),r>n){var i=ge("VersionError","An attempt was made to open a database using a lower version than the existing version.",n);c?setTimeout((function(){s(i)})):s(i)}else u.transaction((function(e){e.executeSql("CREATE TABLE IF NOT EXISTS __sys__ (name BLOB, keyPath BLOB, autoInc BOOLEAN, indexList BLOB, currNum INTEGER)",[],(function(){function t(){l(e,u,r)}P.createIndexes?e.executeSql("CREATE INDEX IF NOT EXISTS sysname ON __sys__(name)",[],t,s):t()}),s)}),s)}return Cr(r,e,void 0,(function(n){var r;c&&(e in wr||(wr[e]={}),r=Sr(e)),r?f(r):Tr(t.__openDatabase,(function(){Br.readTransaction((function(e){e.executeSql('SELECT "version" FROM dbVersions WHERE "name" = ?',[i],(function(e,t){0===t.rows.length?f(0):f(t.rows.item(0).version)}),s)}),s)}),s)})),r},Nr.prototype.deleteDatabase=function(e){var t=this;if(!(t instanceof Nr))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("Database name is required");if(gr())throw ge("SecurityError","Cannot delete an IndexedDB database from an opaque origin.");var n,r=q(e=String(e));try{n=K(e)}catch(e){throw e}var u="string"==typeof P.memoryDatabase,o=!1!==P.cacheDatabaseInstances||u,i=Ie.__createInstance(),a=!1,c=0,s=function(e,t){t(e)};function l(e,t){a||!0===t||(t=Ee(t||e),s(!0,(function(){i.__done=!0,i.__error=t,i.__result=void 0;var e=se("error",t,{bubbles:!0,cancelable:!0});i.dispatchEvent(e),a=!0})))}return Cr(i,e,void 0,(function(u){Tr(t.__openDatabase,(function(){function i(){u.__result=void 0,u.__done=!0;var e=new le("success",{oldVersion:c,newVersion:null});u.dispatchEvent(e)}function a(){s(!1,(function(){o&&e in wr&&delete wr[e],delete t.__connections[e],i()}))}Br.readTransaction((function(o){o.executeSql('SELECT "version" FROM dbVersions WHERE "name" = ?',[r],(function(o,f){if(0!==f.rows.length){var D=f.rows.item(0);c=D.version,mr(t.__connections[e]||[],u,c,null).then((function(){Br.transaction((function(u){u.executeSql('DELETE FROM dbVersions WHERE "name" = ? ',[r],(function(){Or(t.__openDatabase,e,n,a,l)}),l)}),l,null,(function(e,t,n,r,u){return!(!e.readOnly&&!t)||(s=function(e,t){e?r(e,t):u(t)},!1)}))}),l)}else i()}),l)}))}),l)})),i},Nr.prototype.cmp=function(e,t){if(!(this instanceof Nr))throw new TypeError("Illegal invocation");if(arguments.length<2)throw new TypeError("You must provide two keys to be compared");return Ze(e),Ze(t),Pe(e,t)},Nr.prototype.databases=function(){var e=this,t=!1;return new Promise((function(n,r){if(!(e instanceof Nr))throw new TypeError("Illegal invocation");if(gr())throw ge("SecurityError","Cannot get IndexedDB database names from an opaque origin.");function u(e,n){t||(n=n?Ee(n):e,t=!0,r(n))}Tr(e.__openDatabase,(function(){Br.readTransaction((function(e){e.executeSql('SELECT "name", "version" FROM dbVersions',[],(function(e,t){for(var r=[],u=0;u<t.rows.length;u++){var o=t.rows.item(u),i=o.name,a=o.version;r.push({name:U(i),version:a})}n(r)}),u)}),u)}),u)}))},Nr.prototype.__forceClose=function(e,t,n){var r=this;function u(e){e.__forceClose(n)}if(ce(e))Object.values(r.__connections).forEach((function(e){u(e)}));else if(r.__connections[e])if(ce(t))r.__connections[e].forEach((function(e){u(e)}));else{if(!Number.isInteger(t)||t<0||t>r.__connections[e].length-1)throw new TypeError("If providing an argument, __forceClose must be called with a numeric index to indicate a specific connection to lose");u(r.__connections[e][t])}else console.log("No database connections with that name to force close")},Nr.prototype.__setConnectionQueueOrigin=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:br();Fr[e]={}},Nr.prototype[Symbol.toStringTag]="IDBFactoryPrototype",Object.defineProperty(Nr,"prototype",{writable:!1});var jr=Nr.__createInstance();function Pr(){throw new TypeError("Illegal constructor")}var kr=Pr;Pr.__super=function(e,t,n,r,u,o,i){this[Symbol.toStringTag]="IDBCursor",ee(this,["key","primaryKey","request"]),ur.__invalidStateIfDeleted(n),this.__indexSource=Y(r,Zn),this.__indexSource&&Zn.__invalidStateIfDeleted(r),St.__assertActive(n.transaction);var a=gt(e);if(void 0!==t&&!["next","prev","nextunique","prevunique"].includes(t))throw new TypeError(t+"is not a valid cursor direction");Object.defineProperties(this,{source:{writable:!1,value:r},direction:{writable:!1,value:t||"next"}}),this.__key=void 0,this.__primaryKey=void 0,this.__store=n,this.__range=a,this.__request=Be.__createInstance(),this.__request.__source=r,this.__request.__transaction=this.__store.transaction,this.__keyColumnName=u,this.__valueColumnName=o,this.__keyOnly="key"===o,this.__valueDecoder=this.__keyOnly?yt:Jn,this.__count=i,this.__prefetchedIndex=-1,this.__multiEntryIndex=!!this.__indexSource&&r.multiEntry,this.__unique=this.direction.includes("unique"),this.__sqlDirection=["prev","prevunique"].includes(this.direction)?"DESC":"ASC",void 0!==a&&(a.__lowerCached=void 0!==a.lower&&at(a.lower,this.__multiEntryIndex),a.__upperCached=void 0!==a.upper&&at(a.upper,this.__multiEntryIndex)),this.__gotValue=!0,this.continue()},Pr.__createInstance=function(){var e=kr.__super;e.prototype=kr.prototype;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return f(e,n)},Pr.prototype.__find=function(){this.__multiEntryIndex?this.__findMultiEntry.apply(this,arguments):this.__findBasic.apply(this,arguments)},Pr.prototype.__findBasic=function(e,t,n,r,u,o){var i=void 0!==o;o=o||1;var a=this,c=V(a.__keyColumnName),s=V("key"),l=["SELECT * FROM",G(a.__store.__currentName)],f=[];l.push("WHERE",c,"NOT NULL"),bt(a.__range,c,l,f,!0,!0);var D=a.__sqlDirection,_="ASC"===D?">":"<";void 0!==t&&(l.push("AND",s,_+"= ?"),f.push(at(t))),void 0!==e?(l.push("AND",c,_+"= ?"),f.push(at(e))):i&&void 0!==a.__key&&(l.push("AND",c,_+" ?"),f.push(at(a.__key))),a.__count||(l.push("ORDER BY",c,D),"key"!==a.__keyColumnName&&(a.__unique?"prevunique"===a.direction&&l.push(",",s,"ASC"):l.push(",",s,D)),!a.__unique&&a.__indexSource&&l.push(",",V(a.__valueColumnName),D),l.push("LIMIT",o)),l=l.join(" "),P.DEBUG&&console.log(l,f),n.executeSql(l,f,(function(e,t){a.__count?r(void 0,t.rows.length,void 0):t.rows.length>1?(a.__prefetchedIndex=0,a.__prefetchedData=t.rows,P.DEBUG&&console.log("Preloaded "+a.__prefetchedData.length+" records for cursor"),a.__decode(t.rows.item(0),r)):1===t.rows.length?a.__decode(t.rows.item(0),r):(P.DEBUG&&console.log("Reached end of cursors"),r(void 0,void 0,void 0))}),(function(e,t){P.DEBUG&&console.log("Could not execute Cursor.continue",l,f),u(t)}))};var Rr=/\[/g;function Lr(){throw new TypeError("Illegal constructor")}Pr.prototype.__findMultiEntry=function(e,t,n,r,u){var o=this;if(o.__prefetchedData&&o.__prefetchedData.length===o.__prefetchedIndex)return P.DEBUG&&console.log("Reached end of multiEntry cursor"),void r(void 0,void 0,void 0);var i=V(o.__keyColumnName),a=["SELECT * FROM",G(o.__store.__currentName)],c=[];a.push("WHERE",i,"NOT NULL"),o.__range&&void 0!==o.__range.lower&&Array.isArray(o.__range.upper)&&0===o.__range.upper.indexOf(o.__range.lower)&&(a.push("AND",i,"LIKE ? ESCAPE '^'"),c.push("%"+Q(o.__range.__lowerCached.slice(0,-1))+"%"));var s=o.__sqlDirection,l="ASC"===s?">":"<",f=V("key");void 0!==t&&(a.push("AND",f,l+"= ?"),c.push(at(t))),void 0!==e?(a.push("AND",i,l+"= ?"),c.push(at(e))):void 0!==o.__key&&(a.push("AND",i,l+" ?"),c.push(at(o.__key))),o.__count||(a.push("ORDER BY",i,s),o.__unique||"key"===o.__keyColumnName||a.push(",",V("key"),s),!o.__unique&&o.__indexSource&&a.push(",",V(o.__valueColumnName),s)),a=a.join(" "),P.DEBUG&&console.log(a,c),n.executeSql(a,c,(function(e,t){if(t.rows.length>0){if(o.__count){for(var n=0,u=0;u<t.rows.length;u++){n+=it(ct(t.rows.item(u)[o.__keyColumnName],!0),o.__range).length}return void r(void 0,n,void 0)}for(var i=[],a=0;a<t.rows.length;a++){var c,s=t.rows.item(a),l=y(it(ct(s[o.__keyColumnName],!0),o.__range));try{for(l.s();!(c=l.n()).done;){var f={matchingKey:at(c.value,!0),key:s.key};f[o.__keyColumnName]=s[o.__keyColumnName],f[o.__valueColumnName]=s[o.__valueColumnName],i.push(f)}}catch(e){l.e(e)}finally{l.f()}}var D=0===o.direction.indexOf("prev");i.sort((function(e,t){return e.matchingKey.replace(Rr,"z")<t.matchingKey.replace(Rr,"z")?D?1:-1:e.matchingKey.replace(Rr,"z")>t.matchingKey.replace(Rr,"z")?D?-1:1:e.key<t.key?"prev"===o.direction?1:-1:e.key>t.key?"prev"===o.direction?-1:1:0})),i.length>1?(o.__prefetchedIndex=0,o.__prefetchedData={data:i,length:i.length,item:function(e){return this.data[e]}},P.DEBUG&&console.log("Preloaded "+o.__prefetchedData.length+" records for multiEntry cursor"),o.__decode(i[0],r)):1===i.length?(P.DEBUG&&console.log("Reached end of multiEntry cursor"),o.__decode(i[0],r)):(P.DEBUG&&console.log("Reached end of multiEntry cursor"),r(void 0,void 0,void 0))}else P.DEBUG&&console.log("Reached end of multiEntry cursor"),r(void 0,void 0,void 0)}),(function(e,t){P.DEBUG&&console.log("Could not execute Cursor.continue",a,c),u(t)}))},Pr.prototype.__onsuccess=function(e){var t=this;return function(n,r,u){t.__count?e(r,t.__request):(void 0!==n&&(t.__gotValue=!0),t.__key=void 0===n?null:n,t.__primaryKey=void 0===u?null:u,t.__value=void 0===r?null:r,e(void 0===n?null:t,t.__request))}},Pr.prototype.__decode=function(e,t){var n=this;if(n.__multiEntryIndex&&n.__unique){if(n.__matchedKeys||(n.__matchedKeys={}),n.__matchedKeys[e.matchingKey])return void t(void 0,void 0,void 0);n.__matchedKeys[e.matchingKey]=!0}var r=U(n.__multiEntryIndex?e.matchingKey:e[n.__keyColumnName]),u=U(e[n.__valueColumnName]),o=U(e.key);t(ct(r,n.__multiEntryIndex),n.__valueDecoder.decode(u),ct(o),r)},Pr.prototype.__sourceOrEffectiveObjStoreDeleted=function(){ur.__invalidStateIfDeleted(this.__store,"The cursor's effective object store has been deleted"),this.__indexSource&&Zn.__invalidStateIfDeleted(this.source,"The cursor's index source has been deleted")},Pr.prototype.__invalidateCache=function(){this.__prefetchedData=null},Pr.prototype.__continue=function(e,t){var n=this,r=void 0!==n.__advanceCount;if(St.__assertActive(n.__store.transaction),n.__sourceOrEffectiveObjStoreDeleted(),!n.__gotValue&&!t)throw ge("InvalidStateError","The cursor is being iterated or has iterated past its end.");if(void 0!==e){Ze(e);var u=Pe(e,n.key);if(0===u||n.direction.includes("next")&&-1===u||n.direction.includes("prev")&&1===u)throw ge("DataError","Cannot "+(r?"advance":"continue")+" the cursor in an unexpected direction")}this.__continueFinish(e,void 0,r)},Pr.prototype.__continueFinish=function(e,t,n){var r=this,u=r.__advanceCount||P.cursorPreloadPackSize||100;r.__gotValue=!1,r.__request.__done=!1,r.__store.transaction.__pushToQueue(r.__request,(function o(i,a,c,s,l){function f(e,t,u){if(n){if(r.__advanceCount>=2&&void 0!==e)return r.__advanceCount--,r.__key=e,r.__continue(void 0,!0),void l();r.__advanceCount=void 0}r.__onsuccess(c)(e,t,u)}r.__prefetchedData&&(r.__prefetchedIndex++,r.__prefetchedIndex<r.__prefetchedData.length)?r.__decode(r.__prefetchedData.item(r.__prefetchedIndex),(function(n,u,l,D){var _;!r.__unique||r.__multiEntryIndex||D!==at(r.key,r.__multiEntryIndex)?(_=void 0===e||Pe(n,e))>0||0===_&&(r.__unique||void 0===t||Pe(l,t)>=0)?f(n,u,l):o(i,a,c,s):o(i,a,c,s)})):r.__find(e,t,i,f,(function(){r.__advanceCount=void 0,s.apply(void 0,arguments)}),u)}))},Pr.prototype.continue=function(){this.__continue(arguments[0])},Pr.prototype.continuePrimaryKey=function(e,t){var n=this;if(St.__assertActive(n.__store.transaction),n.__sourceOrEffectiveObjStoreDeleted(),!n.__indexSource)throw ge("InvalidAccessError","`continuePrimaryKey` may only be called on an index source.");if(!["next","prev"].includes(n.direction))throw ge("InvalidAccessError","`continuePrimaryKey` may not be called with unique cursors.");if(!n.__gotValue)throw ge("InvalidStateError","The cursor is being iterated or has iterated past its end.");Ze(e),Ze(t);var r=Pe(e,n.key);if("next"===n.direction&&-1===r||"prev"===n.direction&&1===r)throw ge("DataError","Cannot continue the cursor in an unexpected direction");function u(){n.__continueFinish(e,t,!1)}0===r?Yn(t,(function(e){Yn(n.primaryKey,(function(t){if(e===t||"next"===n.direction&&e<t||"prev"===n.direction&&e>t)throw ge("DataError","Cannot continue the cursor in an unexpected direction");u()}))})):u()},Pr.prototype.advance=function(e){var t=this;if(0===(e=ue(e,"unsigned long")))throw new TypeError("Calling advance() with count argument 0");t.__gotValue&&(t.__advanceCount=e),t.__continue()},Pr.prototype.update=function(e){var t=this;if(!arguments.length)throw new TypeError("A value must be passed to update()");if(St.__assertActive(t.__store.transaction),t.__store.transaction.__assertWritable(),t.__sourceOrEffectiveObjStoreDeleted(),!t.__gotValue)throw ge("InvalidStateError","The cursor is being iterated or has iterated past its end.");if(t.__keyOnly)throw ge("InvalidStateError","This cursor method cannot be called when the key only flag has been set.");var n=t.__store.transaction.__createRequest(t),r=t.primaryKey;function u(e){ur.__storingRecordObjectStore(n,t.__store,!1,e,!1,r)}if(null!==t.__store.keyPath){var o=t.__store.__validateKeyAndValueAndCloneValue(e,void 0,!0),i=D(o,2),a=i[0],c=i[1];if(0!==Pe(t.primaryKey,a))throw ge("DataError","The key of the supplied value to `update` is not equal to the cursor's effective key");u(c)}else{var s=Xn(e);u(s)}return n},Pr.prototype.delete=function(){var e=this;if(St.__assertActive(e.__store.transaction),e.__store.transaction.__assertWritable(),e.__sourceOrEffectiveObjStoreDeleted(),!e.__gotValue)throw ge("InvalidStateError","The cursor is being iterated or has iterated past its end.");if(e.__keyOnly)throw ge("InvalidStateError","This cursor method cannot be called when the key only flag has been set.");return this.__store.transaction.__addToTransactionQueue((function(t,n,r,u){e.__find(void 0,void 0,t,(function(n,o,i){var a="DELETE FROM  "+G(e.__store.__currentName)+' WHERE "key" = ?';P.DEBUG&&console.log(a,n,i),t.executeSql(a,[q(at(i))],(function(e,t){1===t.rowsAffected?r(void 0):u("No rows with key found"+n)}),(function(e,t){u(t)}))}),u)}),void 0,e)},Pr.prototype[Symbol.toStringTag]="IDBCursorPrototype",z(Pr.prototype,["source","direction","key","primaryKey","request"]),Object.defineProperty(Pr,"prototype",{writable:!1}),Lr.prototype=Object.create(Pr.prototype),Object.defineProperty(Lr.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:Lr});var qr=Lr;function Ur(e,t){if(e&&"object"===r(e))Object.entries(e).forEach((function(e){var t=D(e,2);Ur(t[0],t[1])}));else{if(!(e in P))throw new Error(e+" is not a valid configuration property");P[e]=t,"registerSCA"===e&&"function"==typeof t&&Qn(t)}}Lr.__createInstance=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];function r(){var e;(e=Pr.__super).call.apply(e,[this].concat(t)),this[Symbol.toStringTag]="IDBCursorWithValue",ee(this,"value")}return r.prototype=qr.prototype,new r},z(Lr.prototype,["value"]),Lr.prototype[Symbol.toStringTag]="IDBCursorWithValuePrototype",Object.defineProperty(Lr,"prototype",{writable:!1}),P.win="undefined"!=typeof window?window:self,function(e,t){t&&Ur(t);var n=e||("undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==E?E:{});function r(e,t,r){if(!r||!Object.defineProperty)try{n[e]=t}catch(e){console.log(e)}if(n[e]!==t&&Object.defineProperty)try{var u=r||{};if("get"in u){var o,i,c=(o={},(i={})[e]=i[e]||{},i[e].get=function(){return r.get.call(this)},a(o,i),o);u=Object.getOwnPropertyDescriptor(c,e)}else"value"in u||(u.value=t),"writable"in u||(u.writable=!0);Object.defineProperty(n,e,u)}catch(e){}n[e]!==t&&"undefined"!=typeof console&&console.warn&&console.warn("Unable to shim "+e)}void 0!==P.win.openDatabase&&r("shimIndexedDB",jr,{enumerable:!1,configurable:!0}),n.shimIndexedDB?(n.shimIndexedDB.__useShim=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";r(e+"DOMException",Fe),r(e+"DOMStringList",Ct,{enumerable:!1,configurable:!0,writable:!0,value:Ct}),r(e+"Event",w,{configurable:!0,writable:!0,value:w,enumerable:!1}),r(e+"CustomEvent",I,{configurable:!0,writable:!0,value:I,enumerable:!1}),r(e+"EventTarget",T,{configurable:!0,writable:!0,value:T,enumerable:!1})}var t,u=Nr;void 0!==P.win.openDatabase&&(jr.__openDatabase=P.win.openDatabase.bind(P.win),r("indexedDB",jr,{enumerable:!0,configurable:!0,get:function(){if(this!==n&&!ce(this)&&!this.shimNS)throw new TypeError("Illegal invocation");return jr}}),[["IDBFactory",u],["IDBDatabase",hr],["IDBObjectStore",ur],["IDBIndex",Zn],["IDBTransaction",St],["IDBCursor",Pr],["IDBCursorWithValue",Lr],["IDBKeyRange",ht],["IDBRequest",Be],["IDBOpenDBRequest",Ie],["IDBVersionChangeEvent",le]].forEach((function(e){var t=D(e,2);r(t[0],t[1],{enumerable:!1,configurable:!0})})),P.fs&&(t=P.fs,Er=t),P.fullIDLSupport&&(
  // Slow per MDN so off by default! Though apparently needed for WebIDL: http://stackoverflow.com/questions/41927589/rationales-consequences-of-webidl-class-inheritance-requirements
  Object.setPrototypeOf(n.IDBOpenDBRequest,n.IDBRequest),Object.setPrototypeOf(n.IDBCursorWithValue,n.IDBCursor),Object.setPrototypeOf(hr,T),Object.setPrototypeOf(Be,T),Object.setPrototypeOf(St,T),Object.setPrototypeOf(le,w),Object.setPrototypeOf(Fe,Error),Object.setPrototypeOf(Fe.prototype,Error.prototype),
  // TODO: IDL needs but reported as slow!
  Object.setPrototypeOf(I,w),Object.setPrototypeOf(I.prototype,w.prototype)),n.indexedDB&&!n.indexedDB.toString().includes("[native code]")&&(P.addNonIDBGlobals&&e("Shim"),P.replaceNonIDBGlobals&&e()),n.shimIndexedDB.__setConnectionQueueOrigin())},n.shimIndexedDB.__debug=function(e){P.DEBUG=e},n.shimIndexedDB.__setConfig=Ur,n.shimIndexedDB.__getConfig=function(e){if(!(e in P))throw new Error(e+" is not a valid configuration property");return P[e]},n.shimIndexedDB.__setUnicodeIdentifiers=function(e){Ur({UnicodeIDStart:e.UnicodeIDStart,UnicodeIDContinue:e.UnicodeIDContinue})}):(n.shimIndexedDB={},["__useShim","__debug","__setConfig","__getConfig","__setUnicodeIdentifiers"].forEach((function(e){n.shimIndexedDB[e]=function(){console.warn("This browser does not have WebSQL to shim.")}}))),"indexedDB"in n||"undefined"==typeof window||(n.indexedDB=n.indexedDB||n.webkitIndexedDB||n.mozIndexedDB||n.oIndexedDB||n.msIndexedDB);var u=!1;"undefined"!=typeof navigator&&navigator.userAgent&&(/Android (?:2|3|4\.[0-3])/.test(navigator.userAgent)&&!navigator.userAgent.includes("Chrome")||(!navigator.userAgent.includes("Safari")||navigator.userAgent.includes("Chrome"))&&/(iPad|iPhone|iPod)(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])* o[s\u017F] 9_/i.test(navigator.userAgent)&&!window.MSStream)&&(u=!0),P.DEFAULT_DB_SIZE||(P.DEFAULT_DB_SIZE=1024*("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")?25:4)*1024),P.avoidAutoShim||n.indexedDB&&!u||void 0===P.win.openDatabase?(n.IDBDatabase=n.IDBDatabase||n.webkitIDBDatabase,n.IDBTransaction=n.IDBTransaction||n.webkitIDBTransaction||{},n.IDBCursor=n.IDBCursor||n.webkitIDBCursor,n.IDBKeyRange=n.IDBKeyRange||n.webkitIDBKeyRange):n.shimIndexedDB.__useShim()}();var Mr=shimIndexedDB.__setUnicodeIdentifiers.bind(shimIndexedDB);shimIndexedDB.__setUnicodeIdentifiers=function(){Mr(e)},shimIndexedDB.__setUnicodeIdentifiers()}));
  //# sourceMappingURL=indexeddbshim-UnicodeIdentifiers.min.js.map
  