indexeddbshim 19.0.3 → 19.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +1 -6
  2. package/badges/coverage-badge.svg +1 -1
  3. package/badges/tests-badge.svg +1 -1
  4. package/dist/IDBTransaction.d.ts +15 -0
  5. package/dist/IDBTransaction.d.ts.map +1 -1
  6. package/dist/indexeddbshim-Key.js +2 -2
  7. package/dist/indexeddbshim-Key.js.map +1 -1
  8. package/dist/indexeddbshim-Key.min.js +1 -1
  9. package/dist/indexeddbshim-Key.min.js.map +1 -1
  10. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +80 -20
  11. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
  12. package/dist/indexeddbshim-UnicodeIdentifiers.js +78 -19
  13. package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
  14. package/dist/indexeddbshim-UnicodeIdentifiers.min.js +3 -3
  15. package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
  16. package/dist/indexeddbshim-node.cjs +78 -19
  17. package/dist/indexeddbshim-node.cjs.map +1 -1
  18. package/dist/indexeddbshim-noninvasive.js +78 -19
  19. package/dist/indexeddbshim-noninvasive.js.map +1 -1
  20. package/dist/indexeddbshim-noninvasive.min.js +2 -2
  21. package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
  22. package/dist/indexeddbshim.js +78 -19
  23. package/dist/indexeddbshim.js.map +1 -1
  24. package/dist/indexeddbshim.min.js +2 -2
  25. package/dist/indexeddbshim.min.js.map +1 -1
  26. package/dist/node-UnicodeIdentifiers.d.ts.map +1 -1
  27. package/dist/setGlobalVars.d.ts.map +1 -1
  28. package/dist/util.d.ts +0 -6
  29. package/dist/util.d.ts.map +1 -1
  30. package/package.json +22 -18
  31. package/src/CFG.js +1 -1
  32. package/src/IDBTransaction.js +76 -18
  33. package/src/node-UnicodeIdentifiers.js +2 -1
  34. package/src/setGlobalVars.js +2 -1
  35. package/src/util.js +1 -11
@@ -1,7 +1,7 @@
1
- /*! indexeddbshim - v19.0.3 - 9/15/2026 */
1
+ /*! indexeddbshim - v19.0.4 - 9/17/2026 */
2
2
  !function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function n(e){return function(){var n=this,r=arguments;return new Promise(function(o,i){var a=e.apply(n,r);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)})}}function r(e,t,n){return t=l(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n))}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,E(r.key),r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=D(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function c(e,t,n,r){var o={configurable:!0,enumerable:!0};return o[e]=r,Object.defineProperty(t,n,o)}function s(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function _(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y(){
3
3
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
4
- var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,s=Object.create(c.prototype);return h(s,"_invoke",function(n,r,o){var i,u,c,s=0,l=o||[],f=!1,d={p:0,n:0,v:e,a:_,f:_.bind(e,4),d:function(t,n){return i=t,u=0,c=e,d.n=n,a}};function _(n,r){for(u=n,c=r,t=0;!f&&s&&!o&&t<l.length;t++){var o,i=l[t],_=d.p,p=i[2];n>3?(o=p===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=_&&((o=n<2&&_<i[1])?(u=0,d.v=r,d.n=i[1]):_<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,d.n=p,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,l,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&_(l,p),u=l,c=p;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(d.n=-1),_(u,c)):d.n=c:d.v=c);try{if(s=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=d.n<0)?c:n.call(r,d))!==a)break}catch(t){i=e,u=1,c=t}finally{s=1}}return{value:t,done:f}}}(n,o,i),!0),s}var a={};function u(){}function c(){}function s(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(h(t={},r,function(){return this}),t),f=s.prototype=u.prototype=Object.create(l);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,h(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=s,h(f,"constructor",s),h(s,"constructor",c),c.displayName="GeneratorFunction",h(s,o,"GeneratorFunction"),h(f),h(f,o,"Generator"),h(f,r,function(){return this}),h(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:i,m:d}})()}function h(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}h=function(e,t,n,r){function i(t,n){h(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},h(e,t,n,r)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function m(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,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(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 b(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function g(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||D(t)||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 E(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function w(e){return w="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},w(e)}function D(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}var O=0,S=1,I=2,T=3,A="undefined"==typeof DOMException?function(e,t){var n=new Error(e);return Object.defineProperty(n,"name",{value:t,writable:!0,configurable:!0}),n}:DOMException,x=new WeakMap,F=new WeakMap;function N(e){return F.get(e)}function B(e,t,n,r){Object.defineProperties(e,t.reduce(function(e,t){var o=t;return e[o]={configurable:!0,get:function(){return Object.hasOwn(n,o)?n[o]:Reflect.has(r,o)?r[o]:!["bubbles","cancelable","composed"].includes(o)&&void 0}},e},{}))}function C(){if(!(this instanceof k))throw new TypeError("Illegal invocation");var e=N(this),t=x.get(this);return Boolean(Object.hasOwn(e,"isTrusted")?e.isTrusted:Reflect.has(t,"isTrusted")&&t.isTrusted)}function j(e,t,n,r){n||(n={}),r||(r={});var o={};"composed"in n&&(o.composed=n.composed),o.timeStamp="undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now(),x.set(e,r),F.set(e,o),e.initEvent(t,n.bubbles,n.cancelable),["target","currentTarget","eventPhase","defaultPrevented"].forEach(function(t){var n=t;Object.defineProperty(e,n,{configurable:!0,get:function(){return void 0!==o[n]?o[n]:Reflect.has(r,n)?r[n]:"eventPhase"===n?0:"defaultPrevented"!==n&&null}})}),Object.defineProperties(e,{isTrusted:{enumerable:!0,configurable:!1,get:C},srcElement:{configurable:!0,get:function(){return e.target}},returnValue:{enumerable:!0,configurable:!0,get:function(){return!e.defaultPrevented},set:function(t){!1===t&&e.preventDefault()}}}),B(e,["type","bubbles","cancelable","timeStamp","composed"],o,r)}var P=a(function e(t){o(this,e);var n=this;n[Symbol.toStringTag]="Event",n.toString=function(){return"[object Event]"};var r=Array.prototype.slice.call(arguments),i=r[1],a=r[2];if(!arguments.length)throw new TypeError("Failed to construct 'Event': 1 argument required, but only 0 present.");j(n,t=String(t),i,a)}),k=P,R=k.prototype;R.preventDefault=function(){if(!(this instanceof k))throw new TypeError("Illegal invocation");var e=x.get(this),t=N(this);this.cancelable&&!t._passive&&(t.defaultPrevented=!0,"function"==typeof e.preventDefault&&e.preventDefault())},R.composedPath=function(){if(!(this instanceof k))throw new TypeError("Illegal invocation");var e=N(this);return e._dispatchFlag&&e._path?g(e._path):[]},R.stopImmediatePropagation=function(){N(this)._stopImmediatePropagation=!0},R.stopPropagation=function(){N(this)._stopPropagation=!0},R.initEvent=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=N(this);r._dispatched||(Object.defineProperties(this,{type:{enumerable:!0,configurable:!0,get:function(){return e}},bubbles:{enumerable:!0,configurable:!0,get:function(){return t}},cancelable:{enumerable:!0,configurable:!0,get:function(){return n}}}),r.type=e,void 0!==t&&(r.bubbles=t),void 0!==n&&(r.cancelable=n))},["type","target","currentTarget","eventPhase","defaultPrevented","bubbles","cancelable","timeStamp","composed"].forEach(function(e){var t=function(){throw new TypeError("Illegal invocation")};Object.defineProperty(t,"name",{value:"get "+e,configurable:!0}),Object.defineProperty(k.prototype,e,{enumerable:!0,configurable:!0,get:t})});var q=function(){throw new TypeError("Illegal invocation")},L=function(e){throw new TypeError("Illegal invocation")};Object.defineProperty(q,"name",{value:"get returnValue",configurable:!0}),Object.defineProperty(L,"name",{value:"set returnValue",configurable:!0}),Object.defineProperty(k.prototype,"returnValue",{enumerable:!0,configurable:!0,get:q,set:L}),["NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE"].forEach(function(e,t){Object.defineProperty(k,e,{enumerable:!0,writable:!1,value:t}),Object.defineProperty(k.prototype,e,{writable:!1,value:t})}),k[Symbol.toStringTag]="Function",R[Symbol.toStringTag]="EventPrototype";var U=function(e){function t(e){var n;o(this,t);var i=Array.prototype.slice.call(arguments),a=i[1],u=n=r(this,t,[e,a,i[2]]);return u[Symbol.toStringTag]="CustomEvent",u.toString=function(){return"[object CustomEvent]"},a||(a={}),u.initCustomEvent(e,a.bubbles,a.cancelable,"detail"in a?a.detail:null),n}return f(t,e),a(t)}(P),M=U,K=M.prototype;K.initCustomEvent=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!(this instanceof M))throw new TypeError("Illegal invocation");var o=N(this);j(this,e,{bubbles:t,cancelable:n,detail:r},arguments[4]),o._dispatched||(void 0!==r&&(o.detail=r),B(this,["detail"],o,x.get(this)))},M[Symbol.toStringTag]="Function",K[Symbol.toStringTag]="CustomEventPrototype";var V=function(){throw new TypeError("Illegal invocation")};function G(e,t,n){return n?Boolean(e.capture)===Boolean(t.capture):JSON.stringify(e)===JSON.stringify(t)}function H(e,t,n,r){var o=e[t];void 0===o&&(e[t]=o=[]);var i="boolean"==typeof n?{capture:n}:n||{};return{listenersByTypeOptions:o.filter(function(e){return G(i,e.options,r)}),options:i,listenersByType:o}}Object.defineProperty(V,"name",{value:"get detail",configurable:!0}),Object.defineProperty(M.prototype,"detail",{enumerable:!0,configurable:!0,get:V});var W={addListener:function(e,t,n,r,o){var i=H(e,n,r,o),a=i.listenersByTypeOptions;r=i.options;var u=i.listenersByType;a.some(function(e){return e.listener===t})||u.push({listener:t,options:r})},removeListener:function(e,t,n,r,o){var i=H(e,n,r,o),a=i.listenersByType;a.some(function(r,u){return!(r.listener!==t||!G(i.options,r.options,o))&&(a.splice(u,1),a.length||delete e[n],!0)})},hasListener:function(e,t,n,r,o){return H(e,n,r,o).listenersByTypeOptions.some(function(e){return e.listener===t})}},Q=a(function e(){o(this,e);this.__setOptions()});Object.assign(Q.prototype,["Early","","Late","Default"].reduce(function(e,t){return["add","remove","has"].forEach(function(n){var r=n+t+"EventListener";e[r]=function(e,r){var o=this;if(!(this instanceof Q))throw new TypeError("Illegal invocation");if(arguments.length<2)throw new TypeError("2 or more arguments required");if("string"!=typeof e)throw new A("UNSPECIFIED_EVENT_TYPE_ERR","UNSPECIFIED_EVENT_TYPE_ERR");var i=arguments[2];try{r&&"object"===w(r)&&"handleEvent"in r&&r.handleEvent.bind&&(r=r.handleEvent.bind(r))}catch(e){console.log("Uncaught `handleEvent` error",e)}var a="_"+t.toLowerCase()+(""===t?"l":"L")+"isteners";Object.hasOwn(this,a)||Object.defineProperty(this,a,{value:{}});var u=n+"Listener",c=""===t,s=i;if(c&&"add"===n){var l="boolean"==typeof i?{capture:i}:i||{};s={capture:Boolean(l.capture),once:Boolean(l.once),passive:Boolean(l.passive)},"signal"in l&&(s.signal=l.signal)}if("add"===n&&s&&"object"===w(s)&&"signal"in s){var f=s.signal;if(!f||"object"!==w(f)||"boolean"!=typeof f.aborted||"function"!=typeof f.addEventListener)throw new TypeError("Failed to convert value to 'AbortSignal'.");if(f.aborted)return;var d="remove"+t+"EventListener";f.addEventListener("abort",function(){o[d](e,r,s)},{once:!0})}return W[u](this[a],r,e,s,c)},Object.defineProperty(e[r],"name",{value:r,configurable:!0})}),e},{})),Object.assign(Q.prototype,{_legacyOutputDidListenersThrowCheck:void 0,__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";Object.hasOwn(n,t)||Object.defineProperty(n,t,{value:{}})});var r,o=F.get(e);if(o&&t&&o._dispatched)throw new A("The object is in an invalid state.","InvalidStateError");o?r=e:(r=function(e){var t=e.bubbles,n=e.cancelable,r=e.detail,o=e.type;return"detail"in e?new M(o,{bubbles:t,cancelable:n,detail:r},e):new k(o,{bubbles:t,cancelable:n},e)}(e),(o=N(r))._dispatched=!0,this._extraProperties.forEach(function(t){Reflect.has(e,t)&&(r[t]=e[t])}));var i=r.type,a=N(r);function u(){return r.target}function c(){a.eventPhase=O,a.currentTarget=null,a._dispatchFlag=!1,delete a._children}function s(){a._stopImmediatePropagation=void 0,a._stopPropagation=void 0,r.defaultPrevented&&a.cancelable||(a.eventPhase=I,u().invokeCurrentListeners(u()._defaultListeners,r,i)),c()}var l=function(){return a._stopImmediatePropagation=void 0,a._stopPropagation=void 0,n._defaultSync?s():setTimeout(s,0),a.eventPhase=I,a._stopPropagation||(a._stopImmediatePropagation=void 0,a._stopPropagation=void 0,u().invokeCurrentListeners(u()._lateListeners,r,i)),c(),!r.defaultPrevented};switch(t&&(a.target=this),"eventPhase"in r&&r.eventPhase){case S:if(a._stopPropagation)return l();this.invokeCurrentListeners(this._listeners,r,i);var f=a._children&&a._children.length&&a._children.pop();return f&&f!==r.target||(a.eventPhase=I),f&&(f._defaultSync=this._defaultSync),(f||this)._dispatchEvent(r,!1);case I:return a._stopPropagation?l():(this.invokeCurrentListeners(this._listeners,r,i,!0),a.bubbles?(a.eventPhase=T,this._dispatchEvent(r,!1)):l());case T:if(a._stopPropagation)return l();var d=this.__getParent&&this.__getParent();return d?(d.invokeCurrentListeners(d._listeners,r,i,!0),d._defaultSync=this._defaultSync,d._dispatchEvent(r,!1)):l();default:for(var _=[this],p=this;p.__getParent&&null!==(p=p.__getParent());)_.push(p);if(a._path=_,a._dispatchFlag=!0,a.eventPhase=I,this.invokeCurrentListeners(this._earlyListeners,r,i),!("__getParent"in this))return a.eventPhase=I,this._dispatchEvent(r,!1);for(var y=this,h=this;y.__getParent&&null!==(y=y.__getParent());)a._children||(a._children=[]),a._children.push(h),h=y;return h._defaultSync=this._defaultSync,a.eventPhase=S,h._dispatchEvent(r,!1)}},invokeCurrentListeners:function(e,t,n,r){var o=this,i=N(t);i.currentTarget=this;var a=H(e,n,{},!1).listenersByType,u=a.concat(),c=u.length?1:0;return u.some(function(e,u){if(i._stopImmediatePropagation)return!0;if(!a.includes(e))return!1;var s=r?o["on"+n]:null;u===c&&"function"==typeof s&&o.tryCatch(t,function(){!1===s.call(t.currentTarget,t)&&t.preventDefault()});var l=e.options,f=l.once,d=l.passive,_=l.capture;if(i._passive=d,_&&t.target!==t.currentTarget&&t.eventPhase===S||t.eventPhase===I||!_&&t.target!==t.currentTarget&&t.eventPhase===T){var p=e.listener;f&&o.removeEventListener(n,p,l),o.tryCatch(t,function(){p.call(t.currentTarget,t)})}return!1}),this.tryCatch(t,function(){var e=r?o["on"+n]:null;"function"==typeof e&&u.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="string"==typeof e?new Error("Uncaught exception: "+e):e,o=!1;"undefined"==typeof window||"undefined"==typeof ErrorEvent||window&&"object"===("undefined"==typeof window?"undefined":w(window))&&!window.dispatchEvent?(o=!0,n=function(){setTimeout(function(){throw r},0)}):n=function(){var t=new ErrorEvent("error",{error:e,message:r.message||"",filename:r.fileName||"",lineno:r.lineNumber||0,colno:r.columnNumber||0});window.dispatchEvent(t)},o&&this._legacyOutputDidListenersThrowCheck||n(),this._legacyOutputDidListenersThrowCheck&&(t.__legacyOutputDidListenersThrowError=r)}}),Q.prototype[Symbol.toStringTag]="EventTargetPrototype";var z=Q,$={createInstance:function(e){var t=function(){this.__setOptions(e)};return t.prototype=z.prototype,new t}};Q.ShimEvent=k,Q.ShimCustomEvent=M,Q.ShimDOMException=A,Q.ShimEventTarget=Q,Q.EventTargetFactory=$;var X={},J={};["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:(\?(?:[\0-"\$-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?(#(?:[\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","escapeNULForSQLiteStatements","sqlMemoryQuota","createIndexes"].forEach(function(e){var t;if(Array.isArray(e)){var n=m(e,2);e=n[0],t=n[1]}Object.defineProperty(J,e,{get:function(){return X[e]},set:function(n){t&&t(n),X[e]=n}})});var Y=/[\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]|\uD801[\uDDC9\uDDE4]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C\uDF83\uDF85\uDF8E\uDF91\uDFC5\uDFC7\uDFC8]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD818[\uDD21-\uDD28]|\uD81B[\uDD68-\uDD6A]|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;function Z(e){return e.replaceAll(/((?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])))(?!(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))|(^|(?:[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))((?:(?:[^\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 ee(e){return"_"+Z(e.replaceAll("^","^^").replaceAll("\0","^0").replaceAll(/([A-Z])/g,"^$1"))}function te(e){var t=e.replaceAll("^","^^");return Z(!1===J.escapeNULForSQLiteStatements?t:t.replaceAll("\0","^0"))}function ne(e){var t=function(e){return e.replaceAll(/(\^+)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}).replaceAll(/(\^+)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);return!1===J.escapeNULForSQLiteStatements?t.replaceAll("^^","^"):t.replaceAll(/(\^+)0/g,function(e,t){return t.length%2?t.slice(1)+"\0":e}).replaceAll("^^","^")}function re(e){return'"'+function(e){return e.replaceAll('"','""')}(e)+'"'}function oe(e){if(J.escapeDatabaseName)return J.escapeDatabaseName(te(e));if(e="D"+ee(e),!1!==J.escapeNFDForDatabaseNames&&(e=e.replaceAll(new RegExp(Y,"gu"),function(e){return"^4"+e.codePointAt(0).toString(16).padStart(6,"0")})),!1!==J.databaseCharacterEscapeList&&(e=e.replace(J.databaseCharacterEscapeList?new RegExp(J.databaseCharacterEscapeList,"gu"):/[\0-\x1F"\*\/:<>\?\\\|\x7F]/g,function(e){return"^1"+e.charCodeAt(0).toString(16).padStart(2,"0")})),!1!==J.databaseNameLengthLimit&&e.length>=(J.databaseNameLengthLimit||254)-(!1!==J.addSQLiteExtension?7:0))throw new Error("Unexpectedly long database name supplied; length limit required for Node compatibility; passed length: "+e.length+"; length limit setting: "+(J.databaseNameLengthLimit||254)+".");return e+(!1!==J.addSQLiteExtension?".sqlite":"")}function ie(e){return re("S"+ee(e))}function ae(e){return re("I"+ee(e))}function ue(e){return"I"+ee(e)}function ce(e){return e.replaceAll("^","^^")}function se(e,t){if(!e)return t;var n=e.includes("\\")&&!e.includes("/")?"\\":"/";return e.replace(/[\/\\]+$/,"")+n+t}function le(e,t){return t[Symbol.hasInstance](e)}function fe(e){return null!==e&&"object"===w(e)}function de(e){return fe(e)&&"getDate"in e&&"function"==typeof e.getDate}function _e(e){return fe(e)&&"byteLength"in e&&"number"==typeof e.byteLength&&("slice"in e&&"function"==typeof e.slice||"getFloat64"in e&&"function"==typeof e.getFloat64)}function pe(e){return fe(e)&&Symbol.iterator in e&&"function"==typeof e[Symbol.iterator]}function ye(e,t){t.forEach(function(t){var n=c("set",c("get",{},t,function(){throw new TypeError("Illegal invocation")}),t,function(e){throw new TypeError("Illegal invocation")}),r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r)})}function he(e,t){t.forEach(function(t){var n=c("get",{},t,function(){throw new TypeError("Illegal invocation")}),r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r)})}function ve(e,t){(t="string"==typeof t?[t]:t).forEach(function(t){var n=c("set",c("get",{},t,function(){return Reflect.get(e,"__"+t)}),t,function(n){Reflect.set(e,"__"+t,n)}),r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r)}),t.forEach(function(t){Reflect.set(e,t,null)})}function me(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;n&&Object.hasOwn(n,t)?r=n[t]:(Object.defineProperty(e,"__"+t,{enumerable:!1,configurable:!1,writable:!0}),r=c("get",{},t,function(){return this["__"+t]}));var o=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,o)})}function be(e){Object.getOwnPropertyNames(e).forEach(function(t){if("constructor"!==t){var n=Object.getOwnPropertyDescriptor(e,t);"function"==typeof n.value&&""===n.value.name&&Object.defineProperty(n.value,"name",{value:t,configurable:!0})}})}function ge(e){var t=J.UnicodeIDStart||"[$A-Z_a-z]",n=J.UnicodeIDContinue||"[$0-9A-Z_a-z]";return new RegExp("^"+("(?:"+t+"|[$_])")+("(?:"+n+"|[$_‌‍])")+"*$","u").test(e)}function Ee(e){return"string"==typeof e&&(""===e||ge(e)||e.split(".").every(function(e){return ge(e)}))}function we(e){return Ee(e)||Array.isArray(e)&&Boolean(e.length)&&g(e).every(function(e){return Ee(e)})}function De(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?"":Se(e)}function Se(e){return""+e}function Ie(e){return pe(e)?g(e).map(function(e){return Se(e)}):Se(e)}function Te(e){return null==e}var Ae={queue:null};function xe(e){if(Ae.queue)Ae.queue.push(e);else{var t=[e];Ae.queue=t;try{for(;t.length;){t.shift()()}}finally{Ae.queue=null}}}function Fe(e,t,n){var r=new k(e,n);return r.debug=t,r}Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return fe(e)&&"target"in e&&"bubbles"in e&&"boolean"==typeof e.bubbles}});var Ne=function(e){function t(e){var n;o(this,t);var i=n=r(this,t,[e]);return i[Symbol.toStringTag]="IDBVersionChangeEvent",i.toString=function(){return"[object IDBVersionChangeEvent]"},i.__eventInitDict=arguments[1]||{},n}return f(t,e),a(t)}(k);function Be(e,t){return new DOMException.prototype.constructor(t,e||"DOMException")}Ne.prototype[Symbol.toStringTag]="IDBVersionChangeEventPrototype",["oldVersion","newVersion"].forEach(function(e){var t=c("get",{},e,function(){if(!(this instanceof Ne))throw new TypeError("Illegal invocation");return this.__eventInitDict&&this.__eventInitDict[e]||("oldVersion"===e?0:null)}),n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(Ne.prototype,e,n)}),Object.defineProperty(Ne,Symbol.hasInstance,{value:function(e){return fe(e)&&"oldVersion"in e&&"defaultPrevented"in e&&"boolean"==typeof e.defaultPrevented}});var Ce={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},je={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 Pe=function(){function e(e,t){this[Symbol.toStringTag]="DOMException",this._code=Object.hasOwn(Ce,t)?Ce[t]:je[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["name"===n?"_name":"_message"]}})}),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(Ce).forEach(function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:Ce[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:Ce[t]})}),Object.keys(je).forEach(function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:je[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:je[t]})}),Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e}),e}();function ke(e,t,n){if(J.DEBUG){var r=n&&"object"===w(n)&&n.message?n.message:n,o="function"==typeof console.error?"error":"log";console[o](e+": "+t+". "+(r||"")),console.trace&&console.trace()}}function Re(e){return"object"===w(e)&&null!==e&&"name"in e&&"string"==typeof e.name}function qe(e){var t,n,r=!1;if(4===e.code||"SQLITE_FULL"===e.code?(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.","undefined"!=typeof QuotaExceededError&&(r=!0)):(e.code,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+")",r)return new QuotaExceededError(n);var o=Me(t,n);return o.sqlError=e,o}var Le,Ue=!1;try{Re(Le=Be("test name","test message"))&&"test name"===Le.name&&"test message"===Le.message&&(Ue=!0)}catch(e){}var Me=Ue?function(e,t,n){return ke(e,t,n),Be(e,t)}:function(e,t,n){return ke(e,t,n),function(e,t){return new Pe(t,e)}(e,t)},Ke=Ue?DOMException:Pe,Ve=["onsuccess","onerror"],Ge=["source","transaction","readyState"],He=["result","error"];function We(){throw new TypeError("Illegal constructor")}We.__super=function(){var e=this;this[Symbol.toStringTag]="IDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0}),He.forEach(function(t){Object.defineProperties(e,s(s({},"__"+t,{enumerable:!1,configurable:!1,writable:!0}),t,{enumerable:!0,configurable:!0,get:function(){if(!this.__done)throw Me("InvalidStateError","Can't get "+t+"; the request is still pending.");return this["__"+t]}}))}),me(this,Ge,{readyState:{get readyState(){return this.__done?"done":"pending"}}}),ve(this,Ve),this.__result=void 0,this.__error=this.__source=this.__transaction=null,this.__done=!1},We.__createInstance=function(){return new We.__super},We.prototype=$.createInstance({extraProperties:["debug"]}),We.prototype[Symbol.toStringTag]="IDBRequestPrototype",We.prototype.__getParent=function(){return"[object IDBOpenDBRequest]"===this.toString()?null:this.__transaction},he(We.prototype,Ge),he(We.prototype,He),ye(We.prototype,Ve),Object.defineProperty(We.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:We}),We.__super.prototype=We.prototype,Object.defineProperty(We,"prototype",{writable:!1});var Qe=["onblocked","onupgradeneeded"];function ze(){throw new TypeError("Illegal constructor")}ze.prototype=Object.create(We.prototype),Object.defineProperty(ze.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:ze});var $e=ze;function Xe(e){return e&&"function"==typeof e.then}function Je(e,t){e.then(null,t)}ze.__createInstance=function(){function e(){We.__super.call(this),this[Symbol.toStringTag]="IDBOpenDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0,extraProperties:["oldVersion","newVersion","debug"]}),ve(this,Qe)}return e.prototype=$e.prototype,new e},ye(ze.prototype,Qe),ze.prototype[Symbol.toStringTag]="IDBOpenDBRequestPrototype",Object.defineProperty(ze,"prototype",{writable:!1});var Ye,Ze,et=function(){function e(t){var n=this;o(this,e),s(this,"v",0),this.s=2,this.c=[[],[]];var r=function(e,t){n.v=e,n.s=t,n.c[t].forEach(function(t){t(e)}),n.c[t].length&&(n.c=null)},i=function(e){n.c&&(Xe(e)?Je(e.then(i),a):r(e,0))},a=function(e){n.c&&(Xe(e)?Je(e.then(a),a):r(e,1))};try{t(i,a)}catch(e){a(e)}}return a(e,[{key:"then",value:function(t,n){var r=this;return new e(function(e,o){var i="function"==typeof n?n:o,a=function(){try{e(t?t(r.v):r.v)}catch(e){i(e)}};0===r.s?a():1===r.s?i(r.v):(r.c[0].push(a),r.c[1].push(i))})}},{key:"catch",value:function(t){var n=this;return new e(function(e,r){var o=function(){try{e(t(n.v))}catch(e){r(e)}};1===n.s?o():0===n.s?e(n.v):(n.c[1].push(o),n.c[0].push(e))})}}],[{key:"all",value:function(t){return new e(function(e,n){var r=t.length,o=[];r?t.forEach(function(i,a){Xe(i)?Je(i.then(function(t){o[a]=t,--r||e(o)}),n):(o[a]=i,--r||e(t))}):e(o)})}},{key:"race",value:function(t){var n=!1;return new e(function(e,r){t.some(function(t){return Xe(t)?(Je(t.then(function(t){n||(e(t),n=!0)}),r),!1):(e(t),n=!0,!0)})})}},{key:"resolve",value:function(t){return new e(function(e){e(t)})}},{key:"reject",value:function(t){return new e(function(e,n){n(t)})}}])}();function tt(e,t){var n=xt(e),r=xt(t),o=n>r?1:n===r?0:-1;if(J.DEBUG){var i=Ft(n),a=Ft(r);"object"===w(e)&&(e=JSON.stringify(e),i=JSON.stringify(i)),"object"===w(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 nt=function(e,t,n){Reflect.has(Array.prototype,t)?Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0,configurable:!0}):e[t]=n},rt=function(e,t){return nt(e,e.length,t)},ot={invalid:100,number:200,date:300,string:400,binary:500,array:600},it=Object.keys(ot);it.forEach(function(e){ot[e]=String.fromCodePoint(ot[e])});var at=it.reduce(function(e,t){return e[ot[t]]=t,e},{}),ut=["negativeInfinity","bigNegative","smallNegative","smallPositive","bigPositive","positiveInfinity"],ct={invalid:{encode:function(){return ot.invalid+"-"},decode:function(){}},number:{encode:function(e){var t,n,r,o=e===Number.MIN_VALUE?"0."+"0".repeat(214)+"2":Math.abs(e).toString(32),i=o.indexOf("."),a=(o=-1!==i?o.replace(".",""):o).search(/(?:[\0-\/1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/);return o=o.slice(a),Number.isFinite(Number(e))?e<0?(e>-1?(t=ut.indexOf("smallNegative"),n=st(a)):(t=ut.indexOf("bigNegative"),n=ft(st(-1!==i?i:o.length))),r=ft(lt(o))):e<1?(t=ut.indexOf("smallPositive"),n=ft(st(a)),r=lt(o)):(t=ut.indexOf("bigPositive"),n=st(-1!==i?i:o.length),r=lt(o)):(n=pt(2),r=pt(11),t=ut.indexOf(e>0?"positiveInfinity":"negativeInfinity")),ot.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(ut[t]){case"negativeInfinity":return-1/0;case"positiveInfinity":return 1/0;case"bigPositive":return dt(r,n);case"smallPositive":return dt(r,n=yt(ft(n)));case"smallNegative":return n=yt(n),-dt(r=ft(r),n);case"bigNegative":return n=ft(n),-dt(r=ft(r),n);default:throw new Error("Invalid number.")}}},string:{encode:function(e,t){return t&&(e=e.replaceAll(/((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,"-$1")+" "),ot.string+"-"+e},decode:function(e,t){return e=e.slice(2),t&&(e=e.slice(0,-1).replaceAll(/-((?:[\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=u(e.entries());try{for(r.s();!(t=r.n()).done;){var o=m(t.value,2),i=o[0],a=xt(o[1],!0);nt(n,i,a)}}catch(e){r.e(e)}finally{r.f()}rt(n,ot.invalid+"-");var c=JSON.stringify(n);return!1===J.escapeNULForSQLiteStatements&&(c=c.replaceAll(String.raw(Ye||(Ye=b(["\0"],["\\u0000"]))),"\0")),ot.array+"-"+c},decode:function(e){var t=e.slice(2);!1===J.escapeNULForSQLiteStatements&&(t=t.replaceAll("\0",String.raw(Ze||(Ze=b(["\0"],["\\u0000"])))));var n=JSON.parse(t);n.pop();for(var r=0;r<n.length;r++){var o=Ft(n[r],!0);nt(n,r,o)}return n}},date:{encode:function(e){return ot.date+"-"+e.toJSON()},decode:function(e){return new Date(e.slice(2))}},binary:{encode:function(e){return ot.binary+"-"+(e.byteLength?g(mt(e)).map(function(e){return String(e).padStart(3,"0")}):"")},decode:function(e){var t=e.slice(2),n=t.length?t.split(",").map(Number):[],r=new ArrayBuffer(n.length);return new Uint8Array(r).set(n),r}}};function st(e){var t=e.toString(32);return 1===t.length?"0"+t:t}function lt(e){return(e+pt(11)).slice(0,11)}function ft(e){var t,n="",r=u(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;n+=(31-Number.parseInt(o,32)).toString(32)}}catch(e){r.e(e)}finally{r.f()}return n}function dt(e,t){var n=Number.parseInt(t,32);if(n<0)return _t(Number.parseInt(e,32)*Math.pow(32,n-10));if(n<11){var r=e.slice(0,n),o=Number.parseInt(r,32),i=e.slice(n);return _t(o+Number.parseInt(i,32)*Math.pow(32,n-11))}var a=e+pt(n-11);return Number.parseInt(a,32)}function _t(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;return Number(e.toPrecision(t))}function pt(e){return"0".repeat(e)}function yt(e){return"-"+e}function ht(e){if(Array.isArray(e))return"array";if(de(e))return"date";if(_e(e))return"binary";var t=w(e);return["string","number"].includes(t)?t:"invalid"}function vt(e,t){return bt(e,t,!1,!0)}function mt(e){var t,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.");n=e.byteOffset,t=e.byteLength}else t=e.byteLength;return new Uint8Array("buffer"in e&&e.buffer||e,n,t)}function bt(e,t,n,r){if(t||(t=[]),t.includes(e))return{type:"array",invalid:!0,message:"An array key cannot be circular"};var o=ht(e),i={type:o,value:e};switch(o){case"number":return Number.isNaN(e)?{type:"NaN",invalid:!0}:Object.is(e,-0)?{type:o,value:0}:i;case"string":return i;case"binary":var a;try{a=mt(e)}catch(e){return{type:o,invalid:!0,message:"Could not read the buffer source (it may be detached)"}}return{type:"binary",value:a};case"array":var u=e,c=u.length;rt(t,e);for(var s,l=[],f=function(){if(!n&&!Object.hasOwn(u,d))return{v:{type:o,invalid:!0,message:"Does not have own index property"}};try{var e=bt(u[d],t,!1,r);if(e.invalid)return n?0:{v:{type:o,invalid:!0,message:"Bad array entry value-to-key conversion"}};(!n||!r&&l.every(function(t){return 0!==tt(t,e.value)})||r&&l.every(function(t){return 0!==tt(t,e)}))&&rt(l,r?e:e.value)}catch(e){if(!n)throw e}},d=0;d<c;d++)if(0!==(s=f())&&s)return s.v;return{type:o,value:l};case"date":var _=e;return Number.isNaN(_.getTime())?{type:o,invalid:!0,message:"Not a valid date"}:r?{type:o,value:_.getTime()}:{type:o,value:new Date(_)};default:var p=null===e?"null":w(e);return{type:p,invalid:!0,message:"Not a valid key; type "+p}}}function gt(e,t){return bt(e,null,!0,t)}function Et(e,t){var n=vt(e,t);if(n.invalid)throw Me("DataError",n.message||"Not a valid key; type: "+n.type);return n}function wt(e,t,n,r){var o=Dt(e,t);return o.failure?o:n?gt(o.value,r):bt(o.value,null,!1,r)}function Dt(e,t,n,r){if(Array.isArray(t)){var o=[];return t.some(function(t){var n=Dt(e,t);return!!n.failure||(rt(o,n.value),!1)})?{failure:!0}:{value:o}}return""===t?{value:e}:t.split(".").some(function(t){if("length"!==t||"string"!=typeof e&&!Array.isArray(e))if(fe(n=e)&&"size"in n&&"number"==typeof n.size&&"slice"in n&&"function"==typeof n.slice&&!("lastModified"in n))switch(t){case"size":case"type":e=e[t]}else{if(!function(e){return fe(e)&&"name"in e&&"string"==typeof e.name&&"slice"in e&&"function"==typeof e.slice&&"lastModified"in e}(e))return!fe(e)||!Object.hasOwn(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 n;return!1})?{failure:!0}:{value:e}}function Ot(e,t,n){var r=n.split("."),o=r.pop();r.forEach(function(t){Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:{},enumerable:!0,writable:!0,configurable:!0}),e=e[t]}),Object.defineProperty(e,o,{value:t,enumerable:!0,writable:!0,configurable:!0})}function St(e,t){var n=t.split(".");n.pop();var r,o=u(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(!fe(e))return!1;if(!Object.hasOwn(e,i))return!0;e=e[i]}}catch(e){o.e(e)}finally{o.f()}return fe(e)}function It(e,t,n){var r=void 0===t.lower,o=void 0===t.upper,i=xt(e,!0),a=n?t.__lowerCached:xt(t.lower,!0),u=n?t.__upperCached:xt(t.upper,!0);return!r&&(t.lowerOpen&&null!==i&&null!==a&&i>a||!t.lowerOpen&&(!i&&!a||null!==i&&null!==a&&i>=a))&&(r=!0),!o&&(t.upperOpen&&null!==i&&null!==u&&i<u||!t.upperOpen&&(!i&&!u||null!==i&&null!==u&&i<=u))&&(o=!0),r&&o}function Tt(e,t){return"array"===at[t.slice(0,1)]?t.indexOf(e)>1:t===e}function At(e,t){var n=[];if(Array.isArray(e)){var r,o=u(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(Array.isArray(i)){if(t&&t.lower===t.upper)continue;if(1!==i.length){At(i,t).length>0&&rt(n,i);continue}i=i[0]}(Te(t)||It(i,t,!0))&&rt(n,i)}}catch(e){o.e(e)}finally{o.f()}}else(Te(t)||It(e,t,!0))&&rt(n,e);return n}function xt(e,t){return void 0===e?null:ct[ht(e)].encode(e,t)}function Ft(e,t){if("string"==typeof e)return ct[at[e.slice(0,1)]].decode(e,t)}function Nt(e,t){return Ft(xt(e,t),t)}var Bt=9007199254740992;function Ct(e,t,n,r){e.executeSql('SELECT "currNum" FROM __sys__ WHERE "name" = ?',[te(t.__currentName)],function(e,t){1!==t.rows.length?n(1):n(t.rows.item(0).currNum)},function(e,t){return r(Me("DataError","Could not get the auto increment value for key",t)),!1})}function jt(e,t,n,r,o){var i='UPDATE __sys__ SET "currNum" = ? WHERE "name" = ?',a=[n,te(t.__currentName)];J.DEBUG&&console.log(i,a),e.executeSql(i,a,function(){r(n)},function(e,t){return o(Me("UnknownError","Could not set the auto increment value for key",t)),!1})}function Pt(e,t,n,r,o){return jt(e,t,n+=n===Bt?2:1,r,o)}function kt(e,t,n,r){Ct(e,t,function(o){o>Bt?n("failure"):Pt(e,t,o,function(){n(null,o,o)},r)},r)}function Rt(e,t,n,r,o){"number"!=typeof n||n<1?r():Ct(e,t,function(i){var a=Math.floor(Math.min(n,Bt));a>=i?Pt(e,t,a,function(){r(i)},o):r()},o)}var qt=Object.freeze({__proto__:null,assignCurrentNumber:jt,checkKeyCouldBeInjectedIntoValue:St,convertKeyToValue:function e(t){var n=t.type,r=t.value;switch(n){case"number":case"string":return r;case"array":for(var o=[],i=r,a=i.length,u=0;u<a;){var c=e(i[u]);nt(o,u,c),u++}return o;case"date":return new Date(r);case"binary":var s=r,l=s.length,f=new ArrayBuffer(l);return new Uint8Array(f,s.byteOffset||0,s.byteLength).set(s),f;default:throw new Error("Bad key")}},convertValueToKey:vt,convertValueToKeyRethrowingAndIfInvalid:Et,convertValueToKeyValueDecoded:bt,convertValueToMultiEntryKey:function(e){return bt(e,null,!0,!0)},convertValueToMultiEntryKeyDecoded:gt,decode:Ft,encode:xt,evaluateKeyPathOnValue:function(e,t,n){return Dt(e,t)},extractKeyFromValueUsingKeyPath:function(e,t,n){return wt(e,t,n,!0)},extractKeyValueDecodedFromValueUsingKeyPath:wt,findMultiEntryMatches:At,generateKeyForStore:kt,injectKeyIntoValueUsingKeyPath:Ot,isKeyInRange:It,isMultiEntryMatch:Tt,possiblyUpdateKeyGenerator:Rt,roundTrip:Nt});function Lt(){throw new TypeError("Illegal constructor")}var Ut=Lt;function Mt(e,t,n,r,o,i){if(e&&(void 0!==e.lower||void 0!==e.upper)){var a,u;o&&n.push("AND");var c=void 0!==e.lower,s=void 0!==e.upper;if(c&&(a=i?e.__lowerCached:xt(e.lower)),s&&(u=i?e.__upperCached:xt(e.upper)),c){if(r.push(te(a)),s&&a===u&&!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(te(u)))}}function Kt(e,t){if(le(e,Lt)){var n=e;return"[object IDBKeyRange]"!==n.toString()?Lt.__createInstance(n.lower,n.upper,n.lowerOpen,n.upperOpen):n}if(!Te(e))return Et(e),Lt.only(e);if(t)throw Me("DataError","No key or range was specified")}Lt.__createInstance=function(e,t,n,r){function o(){if(this[Symbol.toStringTag]="IDBKeyRange",void 0===e&&void 0===t)throw Me("DataError","Both arguments to the key range method cannot be undefined");var o,i;if(void 0!==e&&(o=Nt(e),Et(e)),void 0!==t&&(i=Nt(t),Et(t)),void 0!==e&&void 0!==t&&e!==t&&xt(e)>xt(t))throw Me("DataError","`lower` must not be greater than `upper` argument in `bound()` call.");this.__lower=o,this.__upper=i,this.__lowerOpen=Boolean(n),this.__upperOpen=Boolean(r)}return o.prototype=Ut.prototype,new o},Lt.prototype.includes=function(e){if(!fe(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");if(!arguments.length)throw new TypeError("IDBKeyRange.includes requires a key argument");return Et(e),It(e,this)},Lt.only=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.only requires a value argument");return Lt.__createInstance(e,e,!1,!1)},Lt.lowerBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.lowerBound requires a value argument");return Lt.__createInstance(e,void 0,arguments[1],!0)},Lt.upperBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.upperBound requires a value argument");return Lt.__createInstance(void 0,e,!0,arguments[1])},Lt.bound=function(e,t){if(arguments.length<=1)throw new TypeError("IDBKeyRange.bound requires lower and upper arguments");return Lt.__createInstance(e,t,arguments[2],arguments[3])},Lt.prototype[Symbol.toStringTag]="IDBKeyRangePrototype",be(Lt.prototype),be(Lt),["lower","upper","lowerOpen","upperOpen"].forEach(function(e){Object.defineProperty(Lt.prototype,"__"+e,{enumerable:!1,configurable:!1,writable:!0});var t=c("get",{},e,function(){if(!fe(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");return this["__"+e]}),n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(Lt.prototype,e,n)}),Object.defineProperties(Lt,s(s({},Symbol.hasInstance,{value:function(e){return fe(e)&&"upper"in e&&"lowerOpen"in e&&"boolean"==typeof e.lowerOpen}}),"prototype",{writable:!1}));var Vt=!1,Gt={test:!0};if(Object.defineProperty)try{Object.defineProperty(Gt,"test",{enumerable:!1}),Gt.test&&(Vt=!0)}catch(e){}var Ht=function(){throw this._items=[],this._length=0,new TypeError("Illegal constructor")};Ht.prototype=s(s({constructor:Ht,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=Ht.__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(Math.trunc(Number(t)))&&delete this[t];this.sortList()}},Symbol.toStringTag,"DOMStringListPrototype"),Symbol.iterator,y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:t=0;case 1:if(!(t<this._items.length)){e.n=3;break}return e.n=2,this._items[t++];case 2:e.n=1;break;case 3:return e.a(2)}},e,this)})),Object.defineProperty(Ht,Symbol.hasInstance,{value:function(e){return"DOMStringListPrototype"===Object.prototype.toString.call(e)}});var Wt=Ht;if(Object.defineProperty(Ht,"__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=Wt.prototype,new e}}),Vt){Object.defineProperty(Ht,"prototype",{writable:!1});["addIndexes","sortList","forEach","map","indexOf","push","splice","constructor","__createInstance"].forEach(function(e){Object.defineProperty(Ht.prototype,e,{enumerable:!1})}),Object.defineProperty(Ht.prototype,"length",{configurable:!0,enumerable:!0,get:function(){throw new TypeError("Illegal invocation")}});["_items","_length"].forEach(function(e){Object.defineProperty(Ht.prototype,e,{enumerable:!1,writable:!0})})}var Qt=0,zt=new Set,$t=["onabort","oncomplete","onerror"],Xt=["objectStoreNames","mode","durability","db","error"];function Jt(e){var t=e.db.__transactions.indexOf(e);-1!==t&&e.db.__transactions.splice(t,1),e.__transactionEndCallback=void 0,e.__requests=[]}function Yt(){throw new TypeError("Illegal constructor")}var Zt=Yt;Yt.__createInstance=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"default";function o(){var o=this,i=this;i[Symbol.toStringTag]="IDBTransaction",me(i,Xt),i.__id=++Qt,i.__active=!0,i.__handlerActive=!0,i.__running=!1,i.__errored=!1,i.__committed=!1,i.__requests=[],i.__objectStoreNames=t,i.__mode=n,i.__durability=r,i.__db=e,zt.add(i),i.__error=null,i.__setOptions({legacyOutputDidListenersThrowFlag:!0}),Xt.forEach(function(e){Object.defineProperty(o,e,{configurable:!0})}),ve(this,$t),i.__storeHandles={},setTimeout(function(){i.__executeRequests()},0)}return o.prototype=Zt.prototype,new o},Yt.prototype=$.createInstance({defaultSync:!0,extraProperties:["complete"]}),Yt.prototype.__transFinishedCb=function(e,t){t(Boolean(e))},Yt.prototype.__callTransFinishedCb=function(e,t){var n=this;if(!n.__completed&&!n.__transFinishedCbFired){if(n.__transFinishedCb===Yt.prototype.__transFinishedCb){var r=n.db&&n.db.__db,o="readonly"===n.mode?"readTransaction":"transaction";return Boolean(r&&"function"==typeof r[o]&&r[o].length>=4)?void setTimeout(function(){n.__callTransFinishedCb(e,t)},0):(n.__transFinishedCbFired=!0,void n.__transFinishedCb(e,t))}n.__transFinishedCbFired=!0,n.__transFinishedCb(e,t)}},Yt.prototype.__executeRequests=function(){var e=this;e.__running?J.DEBUG&&console.log("Looks like the request set is already running",e.mode):(e.__handlerActive=!1,e.__running=!0,e.db.__db["readonly"===e.mode?"readTransaction":"transaction"](function(t){e.__tx=t;var n,r=-1;function o(t,r){if(!e.__errored&&!e.__requestsFinished&&(r&&(n.req=r),n.req&&!n.req.__done)){n.req.__done=!0,n.req.__result=t,n.req.__error=null,e.__active=!0,e.__handlerActive=!0;var o=Fe("success");n.req.dispatchEvent(o),!o.__legacyOutputDidListenersThrowError||(ke("Error","An error occurred in a success handler attached to request chain",o.__legacyOutputDidListenersThrowError),e.__committed)?xe(d):e.__abortTransaction(Me("AbortError","A request was aborted (in user handler after success)."))}}function i(){if(!(e.__errored||e.__requestsFinished||n.req&&n.req.__done)){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var i=function(e){var t;if(e){if(1===e.length)return e[0];var n,r=u(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(Re(o))return o;"object"===w(o)&&null!==o&&"message"in o&&"string"==typeof o.message&&(t=o)}}catch(t){r.e(t)}finally{r.f()}}return t}(r);if(n.req){n.req.__done=!0,n.req.__error=i,n.req.__result=void 0,n.req.addLateEventListener("error",function(e){e.cancelable&&e.defaultPrevented&&!e.__legacyOutputDidListenersThrowError&&d()}),n.req.addDefaultEventListener("error",function(){n.req&&e.__abortTransaction(n.req.__error)}),e.__active=!0,e.__handlerActive=!0;var a=Fe("error",i,{bubbles:!0,cancelable:!0});if(n.req.dispatchEvent(a),a.__legacyOutputDidListenersThrowError){if(ke("Error","An error occurred in an error handler attached to request chain",a.__legacyOutputDidListenersThrowError),a.preventDefault(),e.__committed)return void xe(d);e.__abortTransaction(Me("AbortError","A request was aborted (in user handler after error)."))}}else e.__abortTransaction(i)}}function a(){return!(n=e.__requests[r]).req||!n.req.__done&&(e.__active=!1,e.__handlerActive=!1,!0)}function c(){try{if(!n.req)return void n.op(t,n.args,function(){return xe(f)},i);n.op(t,n.args,o,i,f)}catch(e){i(e)}}function s(){a()&&c()}function l(t){if(!e.__errored&&!e.__requestsFinished){if(!(r<e.__requests.length))return t<=0?(e.__requests=[],void(e.__active&&function(){function t(){e.__completed=!0,J.DEBUG&&console.log("Transaction completed");var t=Fe("complete");try{e.__internal=!0,e.dispatchEvent(t),e.__internal=!1,e.dispatchEvent(Fe("__complete"))}catch(t){throw e.__internal=!1,e.__errored=!0,t}finally{zt.delete(e),e.__storeHandles={},Jt(e)}}if(e.__active=!1,e.__handlerActive=!1,e.__requestsFinished=!0,"readwrite"===e.mode||"readonly"===e.mode)return e.__transactionFinished?void t():(e.__transactionEndCallback=t,void e.__callTransFinishedCb(e.__errored,t));var n=Fe("__beforecomplete");n.complete=t,e.dispatchEvent(n)}())):void queueMicrotask(function(){l(t-1)});s()}}function f(){e.__errored||e.__requestsFinished||(++r>=e.__requests.length?l(10):s())}function d(){e.__errored||e.__requestsFinished||(++r>=e.__requests.length?l(10):queueMicrotask(function(){e.__errored||e.__requestsFinished||a()&&c()}))}f()},function(t){if(!0!==t){var n=qe(t);e.__abortTransaction(n)}},function(){e.__transFinishedCb===Yt.prototype.__transFinishedCb&&(e.__transactionEndCallback||e.__requestsFinished?!e.__transactionEndCallback||e.__completed||e.__transFinishedCbFired||(e.__transFinishedCbFired=!0,e.__transFinishedCb(e.__errored,e.__transactionEndCallback)):e.__transactionFinished=!0)},function(t,n,r,o,i){return!!n||(e.__transFinishedCb=t.readOnly?function(e,t){r(e),t&&t()}:function(e,t){e?o(e,t):i(t)},!e.__transactionEndCallback||e.__completed||e.__transFinishedCbFired||(e.__transFinishedCbFired=!0,e.__transFinishedCb(e.__errored,e.__transactionEndCallback)),!1)}))},Yt.prototype.__createRequest=function(e){var t=We.__createInstance();return t.__source=void 0!==e?e:this.db,t.__transaction=this,t},Yt.prototype.__addToTransactionQueue=function(e,t,n){var r=this.__createRequest(n);return this.__pushToQueue(r,e,t),r},Yt.prototype.__addNonRequestToTransactionQueue=function(e,t){this.__pushToQueue(null,e,t)},Yt.prototype.__pushToQueue=function(e,t,n){this.__assertActive(),this.__requests.push({op:t,args:n,req:e})},Yt.prototype.__assertActive=function(){if(!this.__active||!this.__handlerActive||this.__committed)throw Me("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},Yt.prototype.__assertWritable=function(){if("readonly"===this.mode)throw Me("ReadOnlyError","The transaction is read only")},Yt.prototype.__assertVersionChange=function(){Yt.__assertVersionChange(this)},Yt.prototype.objectStore=function(e){var t=this;if(!(t instanceof Yt))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No object store name was specified");if(Yt.__assertNotFinished(t),-1===t.__objectStoreNames.indexOf(e))throw Me("NotFoundError",e+" is not participating in this transaction");var n=t.db.__objectStores[e];if(!n)throw Me("NotFoundError",e+" does not exist in "+t.db.name);return(!Object.hasOwn(t.__storeHandles,e)||t.__storeHandles[e].__pendingDelete||t.__storeHandles[e].__deleted)&&(t.__storeHandles[e]=qr.__clone(n,t)),t.__storeHandles[e]},Yt.prototype.__abortTransaction=function(e){var t=this;function n(n,r){n?r&&"code"in r&&"number"==typeof r.code?J.DEBUG&&console.log("Rollback erred; feature is probably not supported as per WebSQL",t):J.DEBUG&&console.log("Rollback succeeded",t):J.DEBUG&&console.log("Rollback not possible due to missing transaction",t),t.dispatchEvent(Fe("__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(){if(!t.req)throw new Error("Missing request");t.req.__done=!0,t.req.__result=void 0,t.req.__error=Me("AbortError","A request was aborted (an unfinished request).");var e=Fe("error",t.req.__error,{bubbles:!0,cancelable:!0});return new et(function(n){setTimeout(function(){if(!t.req)throw new Error("Missing request");t.req.dispatchEvent(e),n()},0)})})},et.resolve(void 0)).then(function(){var n=Fe("abort",e,{bubbles:!0,cancelable:!1});setTimeout(function(){t.__abortFinished=!0,t.dispatchEvent(n),t.__storeHandles={},t.dispatchEvent(Fe("__abort")),Jt(t)},0)}).catch(function(e){throw console.log("Abort error"),e})}ke("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,zt.delete(t),null!==e&&(t.__error=e),t.__requestsFinished&&null!==e&&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})}))},Yt.prototype.abort=function(){var e=this;if(!(e instanceof Yt))throw new TypeError("Illegal invocation");if(J.DEBUG&&console.log("The transaction was aborted",e),Yt.__assertNotFinished(e),e.__committed)throw Me("InvalidStateError","The transaction has already been committed");if(e.__requestsFinished)throw Me("InvalidStateError","The transaction is already committing");e.__abortTransaction(null)},Yt.prototype.commit=function(){var e=this;if(!(e instanceof Yt))throw new TypeError("Illegal invocation");if(!e.__active||!e.__handlerActive||e.__committed)throw Me("InvalidStateError","Failed to execute 'commit' on 'IDBTransaction': The transaction is not active.");J.DEBUG&&console.log("The transaction was explicitly committed",e),e.__committed=!0},Yt.prototype[Symbol.toStringTag]="IDBTransactionPrototype",Yt.__assertVersionChange=function(e){if(!e||"versionchange"!==e.mode)throw Me("InvalidStateError","Not a version transaction")},Yt.__assertNotVersionChange=function(e){if(e&&"versionchange"===e.mode)throw Me("InvalidStateError","Cannot be called during a version transaction")},Yt.__assertNotFinished=function(e){if(!e||e.__completed||e.__abortFinished||e.__errored)throw Me("InvalidStateError","Transaction finished by commit or abort")},Yt.__assertNotFinishedObjectStoreMethod=function(e){try{Yt.__assertNotFinished(e)}catch(t){if(e&&!e.__completed&&!e.__abortFinished)throw Me("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished");throw t}},Yt.__assertActive=function(e){if(!e||!e.__active||!e.__handlerActive||e.__committed)throw Me("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},Yt.prototype.__getParent=function(){return this.db},ye(Yt.prototype,$t),he(Yt.prototype,Xt),be(Yt.prototype),Object.defineProperty(Yt.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:Yt}),Object.defineProperty(Yt,"prototype",{writable:!1}),Yt.activeTransactions=zt;var en=a(function e(t){o(this,e),this.p=new Promise(t)});en.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&Object.defineProperty(en.prototype,Symbol.toStringTag,{get:function(){return"TypesonPromise"}}),en.prototype.then=function(e,t){var n=this;return new en(function(r,o){n.p.then(function(t){r(e?e(t):t)}).catch(function(e){return t?t(e):Promise.reject(e)}).then(r,o)})},en.prototype.catch=function(e){return this.then(void 0,e)},en.resolve=function(e){return new en(function(t){t(e)})},en.reject=function(e){return new en(function(t,n){n(e)})},en.all=function(e){return new en(function(t,n){Promise.all(e.map(function(e){return null!=e&&e.constructor&&"__typeson__type__"in e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e})).then(t,n)})},en.race=function(e){return new en(function(t,n){Promise.race(e.map(function(e){return null!=e&&e.constructor&&"__typeson__type__"in e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e})).then(t,n)})},en.allSettled=function(e){return new en(function(t,n){Promise.allSettled(e.map(function(e){return null!=e&&e.constructor&&"__typeson__type__"in e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e})).then(t,n)})};var tn=Object.hasOwn,nn=Object.getPrototypeOf;function rn(e,t){return sn(e)&&"function"==typeof e.then&&!0}function on(e){return Object.prototype.toString.call(e).slice(8,-1)}function an(e,t){if(!e||"object"!=w(e))return!1;var n=nn(e);if(!n)return null===t;var r=tn(n,"constructor")&&n.constructor;return"function"!=typeof r?null===t:t===r||null!==t&&Function.prototype.toString.call(r)===Function.prototype.toString.call(t)||"function"==typeof t&&"string"==typeof r.__typeson__type__&&r.__typeson__type__===t.__typeson__type__}function un(e){return!(!e||"Object"!==on(e))&&(!nn(e)||an(e,Object))}function cn(e){if(!e||"Object"!==on(e))return!1;var t=nn(e);return!t||an(e,Object)||cn(t)}function sn(e){return null!==e&&"object"==w(e)}function ln(e){return e.replaceAll("''","''''").replace(/^$/,"''").replaceAll("~","~0").replaceAll(".","~1")}function fn(e){return e.replaceAll("~1",".").replaceAll("~0","~").replace(/^''$/,"").replaceAll("''''","''")}function dn(e,t,n){if(""===t)return e;if(null===e||"object"!=w(e))throw new TypeError("Unexpected non-object type");var r=t.indexOf("."),o=fn(-1===r?t:t.slice(0,r));if(tn(e,o)){if(-1!==r){var i=e[o];return void 0===i?void 0:dn(i,t.slice(r+1))}return e[o]}}function _n(e,t,n,r){if(""===t)return n;for(var o=e,i=t;;){if(!o||"object"!=w(o))throw new TypeError("Unexpected non-object type");var a=i.indexOf("."),u=fn(-1===a?i:i.slice(0,a));if("__proto__"===u)throw new TypeError("Invalid property");if(-1===a)return o[u]=n,e;if(!tn(o,u))throw new TypeError("Invalid property");o=o[u],i=i.slice(a+1)}}function pn(e){return null===e?"null":Array.isArray(e)?"array":w(e)}
4
+ var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,s=Object.create(c.prototype);return h(s,"_invoke",function(n,r,o){var i,u,c,s=0,l=o||[],f=!1,d={p:0,n:0,v:e,a:_,f:_.bind(e,4),d:function(t,n){return i=t,u=0,c=e,d.n=n,a}};function _(n,r){for(u=n,c=r,t=0;!f&&s&&!o&&t<l.length;t++){var o,i=l[t],_=d.p,p=i[2];n>3?(o=p===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=_&&((o=n<2&&_<i[1])?(u=0,d.v=r,d.n=i[1]):_<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,d.n=p,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,l,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&_(l,p),u=l,c=p;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(d.n=-1),_(u,c)):d.n=c:d.v=c);try{if(s=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=d.n<0)?c:n.call(r,d))!==a)break}catch(t){i=e,u=1,c=t}finally{s=1}}return{value:t,done:f}}}(n,o,i),!0),s}var a={};function u(){}function c(){}function s(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(h(t={},r,function(){return this}),t),f=s.prototype=u.prototype=Object.create(l);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,h(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=s,h(f,"constructor",s),h(s,"constructor",c),c.displayName="GeneratorFunction",h(s,o,"GeneratorFunction"),h(f),h(f,o,"Generator"),h(f,r,function(){return this}),h(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:i,m:d}})()}function h(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}h=function(e,t,n,r){function i(t,n){h(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},h(e,t,n,r)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function m(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,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(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 b(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function g(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||D(t)||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 E(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function w(e){return w="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},w(e)}function D(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}var O=0,S=1,I=2,T=3,A="undefined"==typeof DOMException?function(e,t){var n=new Error(e);return Object.defineProperty(n,"name",{value:t,writable:!0,configurable:!0}),n}:DOMException,x=new WeakMap,F=new WeakMap;function N(e){return F.get(e)}function B(e,t,n,r){Object.defineProperties(e,t.reduce(function(e,t){var o=t;return e[o]={configurable:!0,get:function(){return Object.hasOwn(n,o)?n[o]:Reflect.has(r,o)?r[o]:!["bubbles","cancelable","composed"].includes(o)&&void 0}},e},{}))}function C(){if(!(this instanceof k))throw new TypeError("Illegal invocation");var e=N(this),t=x.get(this);return Boolean(Object.hasOwn(e,"isTrusted")?e.isTrusted:Reflect.has(t,"isTrusted")&&t.isTrusted)}function j(e,t,n,r){n||(n={}),r||(r={});var o={};"composed"in n&&(o.composed=n.composed),o.timeStamp="undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now(),x.set(e,r),F.set(e,o),e.initEvent(t,n.bubbles,n.cancelable),["target","currentTarget","eventPhase","defaultPrevented"].forEach(function(t){var n=t;Object.defineProperty(e,n,{configurable:!0,get:function(){return void 0!==o[n]?o[n]:Reflect.has(r,n)?r[n]:"eventPhase"===n?0:"defaultPrevented"!==n&&null}})}),Object.defineProperties(e,{isTrusted:{enumerable:!0,configurable:!1,get:C},srcElement:{configurable:!0,get:function(){return e.target}},returnValue:{enumerable:!0,configurable:!0,get:function(){return!e.defaultPrevented},set:function(t){!1===t&&e.preventDefault()}}}),B(e,["type","bubbles","cancelable","timeStamp","composed"],o,r)}var P=a(function e(t){o(this,e);var n=this;n[Symbol.toStringTag]="Event",n.toString=function(){return"[object Event]"};var r=Array.prototype.slice.call(arguments),i=r[1],a=r[2];if(!arguments.length)throw new TypeError("Failed to construct 'Event': 1 argument required, but only 0 present.");j(n,t=String(t),i,a)}),k=P,R=k.prototype;R.preventDefault=function(){if(!(this instanceof k))throw new TypeError("Illegal invocation");var e=x.get(this),t=N(this);this.cancelable&&!t._passive&&(t.defaultPrevented=!0,"function"==typeof e.preventDefault&&e.preventDefault())},R.composedPath=function(){if(!(this instanceof k))throw new TypeError("Illegal invocation");var e=N(this);return e._dispatchFlag&&e._path?g(e._path):[]},R.stopImmediatePropagation=function(){N(this)._stopImmediatePropagation=!0},R.stopPropagation=function(){N(this)._stopPropagation=!0},R.initEvent=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=N(this);r._dispatched||(Object.defineProperties(this,{type:{enumerable:!0,configurable:!0,get:function(){return e}},bubbles:{enumerable:!0,configurable:!0,get:function(){return t}},cancelable:{enumerable:!0,configurable:!0,get:function(){return n}}}),r.type=e,void 0!==t&&(r.bubbles=t),void 0!==n&&(r.cancelable=n))},["type","target","currentTarget","eventPhase","defaultPrevented","bubbles","cancelable","timeStamp","composed"].forEach(function(e){var t=function(){throw new TypeError("Illegal invocation")};Object.defineProperty(t,"name",{value:"get "+e,configurable:!0}),Object.defineProperty(k.prototype,e,{enumerable:!0,configurable:!0,get:t})});var q=function(){throw new TypeError("Illegal invocation")},L=function(e){throw new TypeError("Illegal invocation")};Object.defineProperty(q,"name",{value:"get returnValue",configurable:!0}),Object.defineProperty(L,"name",{value:"set returnValue",configurable:!0}),Object.defineProperty(k.prototype,"returnValue",{enumerable:!0,configurable:!0,get:q,set:L}),["NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE"].forEach(function(e,t){Object.defineProperty(k,e,{enumerable:!0,writable:!1,value:t}),Object.defineProperty(k.prototype,e,{writable:!1,value:t})}),k[Symbol.toStringTag]="Function",R[Symbol.toStringTag]="EventPrototype";var U=function(e){function t(e){var n;o(this,t);var i=Array.prototype.slice.call(arguments),a=i[1],u=n=r(this,t,[e,a,i[2]]);return u[Symbol.toStringTag]="CustomEvent",u.toString=function(){return"[object CustomEvent]"},a||(a={}),u.initCustomEvent(e,a.bubbles,a.cancelable,"detail"in a?a.detail:null),n}return f(t,e),a(t)}(P),M=U,K=M.prototype;K.initCustomEvent=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!(this instanceof M))throw new TypeError("Illegal invocation");var o=N(this);j(this,e,{bubbles:t,cancelable:n,detail:r},arguments[4]),o._dispatched||(void 0!==r&&(o.detail=r),B(this,["detail"],o,x.get(this)))},M[Symbol.toStringTag]="Function",K[Symbol.toStringTag]="CustomEventPrototype";var V=function(){throw new TypeError("Illegal invocation")};function G(e,t,n){return n?Boolean(e.capture)===Boolean(t.capture):JSON.stringify(e)===JSON.stringify(t)}function H(e,t,n,r){var o=e[t];void 0===o&&(e[t]=o=[]);var i="boolean"==typeof n?{capture:n}:n||{};return{listenersByTypeOptions:o.filter(function(e){return G(i,e.options,r)}),options:i,listenersByType:o}}Object.defineProperty(V,"name",{value:"get detail",configurable:!0}),Object.defineProperty(M.prototype,"detail",{enumerable:!0,configurable:!0,get:V});var W={addListener:function(e,t,n,r,o){var i=H(e,n,r,o),a=i.listenersByTypeOptions;r=i.options;var u=i.listenersByType;a.some(function(e){return e.listener===t})||u.push({listener:t,options:r})},removeListener:function(e,t,n,r,o){var i=H(e,n,r,o),a=i.listenersByType;a.some(function(r,u){return!(r.listener!==t||!G(i.options,r.options,o))&&(a.splice(u,1),a.length||delete e[n],!0)})},hasListener:function(e,t,n,r,o){return H(e,n,r,o).listenersByTypeOptions.some(function(e){return e.listener===t})}},Q=a(function e(){o(this,e);this.__setOptions()});Object.assign(Q.prototype,["Early","","Late","Default"].reduce(function(e,t){return["add","remove","has"].forEach(function(n){var r=n+t+"EventListener";e[r]=function(e,r){var o=this;if(!(this instanceof Q))throw new TypeError("Illegal invocation");if(arguments.length<2)throw new TypeError("2 or more arguments required");if("string"!=typeof e)throw new A("UNSPECIFIED_EVENT_TYPE_ERR","UNSPECIFIED_EVENT_TYPE_ERR");var i=arguments[2];try{r&&"object"===w(r)&&"handleEvent"in r&&r.handleEvent.bind&&(r=r.handleEvent.bind(r))}catch(e){console.log("Uncaught `handleEvent` error",e)}var a="_"+t.toLowerCase()+(""===t?"l":"L")+"isteners";Object.hasOwn(this,a)||Object.defineProperty(this,a,{value:{}});var u=n+"Listener",c=""===t,s=i;if(c&&"add"===n){var l="boolean"==typeof i?{capture:i}:i||{};s={capture:Boolean(l.capture),once:Boolean(l.once),passive:Boolean(l.passive)},"signal"in l&&(s.signal=l.signal)}if("add"===n&&s&&"object"===w(s)&&"signal"in s){var f=s.signal;if(!f||"object"!==w(f)||"boolean"!=typeof f.aborted||"function"!=typeof f.addEventListener)throw new TypeError("Failed to convert value to 'AbortSignal'.");if(f.aborted)return;var d="remove"+t+"EventListener";f.addEventListener("abort",function(){o[d](e,r,s)},{once:!0})}return W[u](this[a],r,e,s,c)},Object.defineProperty(e[r],"name",{value:r,configurable:!0})}),e},{})),Object.assign(Q.prototype,{_legacyOutputDidListenersThrowCheck:void 0,__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";Object.hasOwn(n,t)||Object.defineProperty(n,t,{value:{}})});var r,o=F.get(e);if(o&&t&&o._dispatched)throw new A("The object is in an invalid state.","InvalidStateError");o?r=e:(r=function(e){var t=e.bubbles,n=e.cancelable,r=e.detail,o=e.type;return"detail"in e?new M(o,{bubbles:t,cancelable:n,detail:r},e):new k(o,{bubbles:t,cancelable:n},e)}(e),(o=N(r))._dispatched=!0,this._extraProperties.forEach(function(t){Reflect.has(e,t)&&(r[t]=e[t])}));var i=r.type,a=N(r);function u(){return r.target}function c(){a.eventPhase=O,a.currentTarget=null,a._dispatchFlag=!1,delete a._children}function s(){a._stopImmediatePropagation=void 0,a._stopPropagation=void 0,r.defaultPrevented&&a.cancelable||(a.eventPhase=I,u().invokeCurrentListeners(u()._defaultListeners,r,i)),c()}var l=function(){return a._stopImmediatePropagation=void 0,a._stopPropagation=void 0,n._defaultSync?s():setTimeout(s,0),a.eventPhase=I,a._stopPropagation||(a._stopImmediatePropagation=void 0,a._stopPropagation=void 0,u().invokeCurrentListeners(u()._lateListeners,r,i)),c(),!r.defaultPrevented};switch(t&&(a.target=this),"eventPhase"in r&&r.eventPhase){case S:if(a._stopPropagation)return l();this.invokeCurrentListeners(this._listeners,r,i);var f=a._children&&a._children.length&&a._children.pop();return f&&f!==r.target||(a.eventPhase=I),f&&(f._defaultSync=this._defaultSync),(f||this)._dispatchEvent(r,!1);case I:return a._stopPropagation?l():(this.invokeCurrentListeners(this._listeners,r,i,!0),a.bubbles?(a.eventPhase=T,this._dispatchEvent(r,!1)):l());case T:if(a._stopPropagation)return l();var d=this.__getParent&&this.__getParent();return d?(d.invokeCurrentListeners(d._listeners,r,i,!0),d._defaultSync=this._defaultSync,d._dispatchEvent(r,!1)):l();default:for(var _=[this],p=this;p.__getParent&&null!==(p=p.__getParent());)_.push(p);if(a._path=_,a._dispatchFlag=!0,a.eventPhase=I,this.invokeCurrentListeners(this._earlyListeners,r,i),!("__getParent"in this))return a.eventPhase=I,this._dispatchEvent(r,!1);for(var y=this,h=this;y.__getParent&&null!==(y=y.__getParent());)a._children||(a._children=[]),a._children.push(h),h=y;return h._defaultSync=this._defaultSync,a.eventPhase=S,h._dispatchEvent(r,!1)}},invokeCurrentListeners:function(e,t,n,r){var o=this,i=N(t);i.currentTarget=this;var a=H(e,n,{},!1).listenersByType,u=a.concat(),c=u.length?1:0;return u.some(function(e,u){if(i._stopImmediatePropagation)return!0;if(!a.includes(e))return!1;var s=r?o["on"+n]:null;u===c&&"function"==typeof s&&o.tryCatch(t,function(){!1===s.call(t.currentTarget,t)&&t.preventDefault()});var l=e.options,f=l.once,d=l.passive,_=l.capture;if(i._passive=d,_&&t.target!==t.currentTarget&&t.eventPhase===S||t.eventPhase===I||!_&&t.target!==t.currentTarget&&t.eventPhase===T){var p=e.listener;f&&o.removeEventListener(n,p,l),o.tryCatch(t,function(){p.call(t.currentTarget,t)})}return!1}),this.tryCatch(t,function(){var e=r?o["on"+n]:null;"function"==typeof e&&u.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="string"==typeof e?new Error("Uncaught exception: "+e):e,o=!1;"undefined"==typeof window||"undefined"==typeof ErrorEvent||window&&"object"===("undefined"==typeof window?"undefined":w(window))&&!window.dispatchEvent?(o=!0,n=function(){setTimeout(function(){throw r},0)}):n=function(){var t=new ErrorEvent("error",{error:e,message:r.message||"",filename:r.fileName||"",lineno:r.lineNumber||0,colno:r.columnNumber||0});window.dispatchEvent(t)},o&&this._legacyOutputDidListenersThrowCheck||n(),this._legacyOutputDidListenersThrowCheck&&(t.__legacyOutputDidListenersThrowError=r)}}),Q.prototype[Symbol.toStringTag]="EventTargetPrototype";var z=Q,$={createInstance:function(e){var t=function(){this.__setOptions(e)};return t.prototype=z.prototype,new t}};Q.ShimEvent=k,Q.ShimCustomEvent=M,Q.ShimDOMException=A,Q.ShimEventTarget=Q,Q.EventTargetFactory=$;var X={},J={};["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:(\?(?:[\0-"\$-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?(#(?:[\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","escapeNULForSQLiteStatements","sqlMemoryQuota","createIndexes"].forEach(function(e){var t;if(Array.isArray(e)){var n=m(e,2);e=n[0],t=n[1]}Object.defineProperty(J,e,{get:function(){return X[e]},set:function(n){t&&t(n),X[e]=n}})});var Y=/[\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]|\uD801[\uDDC9\uDDE4]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C\uDF83\uDF85\uDF8E\uDF91\uDFC5\uDFC7\uDFC8]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD818[\uDD21-\uDD28]|\uD81B[\uDD68-\uDD6A]|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;function Z(e){return e.replaceAll(/((?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])))(?!(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))|(^|(?:[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))((?:(?:[^\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 ee(e){return"_"+Z(e.replaceAll("^","^^").replaceAll("\0","^0").replaceAll(/([A-Z])/g,"^$1"))}function te(e){var t=e.replaceAll("^","^^");return Z(!1===J.escapeNULForSQLiteStatements?t:t.replaceAll("\0","^0"))}function ne(e){var t=function(e){return e.replaceAll(/(\^+)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}).replaceAll(/(\^+)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);return!1===J.escapeNULForSQLiteStatements?t.replaceAll("^^","^"):t.replaceAll(/(\^+)0/g,function(e,t){return t.length%2?t.slice(1)+"\0":e}).replaceAll("^^","^")}function re(e){return'"'+function(e){return e.replaceAll('"','""')}(e)+'"'}function oe(e){if(J.escapeDatabaseName)return J.escapeDatabaseName(te(e));if(e="D"+ee(e),!1!==J.escapeNFDForDatabaseNames&&(e=e.replaceAll(new RegExp(Y,"gu"),function(e){return"^4"+e.codePointAt(0).toString(16).padStart(6,"0")})),!1!==J.databaseCharacterEscapeList&&(e=e.replace(J.databaseCharacterEscapeList?new RegExp(J.databaseCharacterEscapeList,"gu"):/[\0-\x1F"\*\/:<>\?\\\|\x7F]/g,function(e){return"^1"+e.charCodeAt(0).toString(16).padStart(2,"0")})),!1!==J.databaseNameLengthLimit&&e.length>=(J.databaseNameLengthLimit||254)-(!1!==J.addSQLiteExtension?7:0))throw new Error("Unexpectedly long database name supplied; length limit required for Node compatibility; passed length: "+e.length+"; length limit setting: "+(J.databaseNameLengthLimit||254)+".");return e+(!1!==J.addSQLiteExtension?".sqlite":"")}function ie(e){return re("S"+ee(e))}function ae(e){return re("I"+ee(e))}function ue(e){return"I"+ee(e)}function ce(e){return e.replaceAll("^","^^")}function se(e,t){if(!e)return t;var n=e.includes("\\")&&!e.includes("/")?"\\":"/";return e.replace(/[\/\\]+$/,"")+n+t}function le(e,t){return t[Symbol.hasInstance](e)}function fe(e){return null!==e&&"object"===w(e)}function de(e){return fe(e)&&"getDate"in e&&"function"==typeof e.getDate}function _e(e){return fe(e)&&"byteLength"in e&&"number"==typeof e.byteLength&&("slice"in e&&"function"==typeof e.slice||"getFloat64"in e&&"function"==typeof e.getFloat64)}function pe(e){return fe(e)&&Symbol.iterator in e&&"function"==typeof e[Symbol.iterator]}function ye(e,t){t.forEach(function(t){var n=c("set",c("get",{},t,function(){throw new TypeError("Illegal invocation")}),t,function(e){throw new TypeError("Illegal invocation")}),r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r)})}function he(e,t){t.forEach(function(t){var n=c("get",{},t,function(){throw new TypeError("Illegal invocation")}),r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r)})}function ve(e,t){(t="string"==typeof t?[t]:t).forEach(function(t){var n=c("set",c("get",{},t,function(){return Reflect.get(e,"__"+t)}),t,function(n){Reflect.set(e,"__"+t,n)}),r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r)}),t.forEach(function(t){Reflect.set(e,t,null)})}function me(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;n&&Object.hasOwn(n,t)?r=n[t]:(Object.defineProperty(e,"__"+t,{enumerable:!1,configurable:!1,writable:!0}),r=c("get",{},t,function(){return this["__"+t]}));var o=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,o)})}function be(e){Object.getOwnPropertyNames(e).forEach(function(t){if("constructor"!==t){var n=Object.getOwnPropertyDescriptor(e,t);"function"==typeof n.value&&""===n.value.name&&Object.defineProperty(n.value,"name",{value:t,configurable:!0})}})}function ge(e){var t=J.UnicodeIDStart||"[$A-Z_a-z]",n=J.UnicodeIDContinue||"[$0-9A-Z_a-z]";return new RegExp("^"+("(?:"+t+"|[$_])")+("(?:"+n+"|[$_‌‍])")+"*$","u").test(e)}function Ee(e){return"string"==typeof e&&(""===e||ge(e)||e.split(".").every(function(e){return ge(e)}))}function we(e){return Ee(e)||Array.isArray(e)&&Boolean(e.length)&&g(e).every(function(e){return Ee(e)})}function De(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?"":Se(e)}function Se(e){return""+e}function Ie(e){return pe(e)?g(e).map(function(e){return Se(e)}):Se(e)}function Te(e){return null==e}var Ae={queue:null};function xe(e){if(Ae.queue)Ae.queue.push(e);else{var t=[e];Ae.queue=t;try{for(;t.length;){t.shift()()}}finally{Ae.queue=null}}}function Fe(e,t,n){var r=new k(e,n);return r.debug=t,r}Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return fe(e)&&"target"in e&&"bubbles"in e&&"boolean"==typeof e.bubbles}});var Ne=function(e){function t(e){var n;o(this,t);var i=n=r(this,t,[e]);return i[Symbol.toStringTag]="IDBVersionChangeEvent",i.toString=function(){return"[object IDBVersionChangeEvent]"},i.__eventInitDict=arguments[1]||{},n}return f(t,e),a(t)}(k);function Be(e,t){return new DOMException.prototype.constructor(t,e||"DOMException")}Ne.prototype[Symbol.toStringTag]="IDBVersionChangeEventPrototype",["oldVersion","newVersion"].forEach(function(e){var t=c("get",{},e,function(){if(!(this instanceof Ne))throw new TypeError("Illegal invocation");return this.__eventInitDict&&this.__eventInitDict[e]||("oldVersion"===e?0:null)}),n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(Ne.prototype,e,n)}),Object.defineProperty(Ne,Symbol.hasInstance,{value:function(e){return fe(e)&&"oldVersion"in e&&"defaultPrevented"in e&&"boolean"==typeof e.defaultPrevented}});var Ce={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},je={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 Pe=function(){function e(e,t){this[Symbol.toStringTag]="DOMException",this._code=Object.hasOwn(Ce,t)?Ce[t]:je[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["name"===n?"_name":"_message"]}})}),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(Ce).forEach(function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:Ce[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:Ce[t]})}),Object.keys(je).forEach(function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:je[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:je[t]})}),Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e}),e}();function ke(e,t,n){if(J.DEBUG){var r=n&&"object"===w(n)&&n.message?n.message:n,o="function"==typeof console.error?"error":"log";console[o](e+": "+t+". "+(r||"")),console.trace&&console.trace()}}function Re(e){return"object"===w(e)&&null!==e&&"name"in e&&"string"==typeof e.name}function qe(e){var t,n,r=!1;if(4===e.code||"SQLITE_FULL"===e.code?(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.","undefined"!=typeof QuotaExceededError&&(r=!0)):(e.code,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+")",r)return new QuotaExceededError(n);var o=Me(t,n);return o.sqlError=e,o}var Le,Ue=!1;try{Re(Le=Be("test name","test message"))&&"test name"===Le.name&&"test message"===Le.message&&(Ue=!0)}catch(e){}var Me=Ue?function(e,t,n){return ke(e,t,n),Be(e,t)}:function(e,t,n){return ke(e,t,n),function(e,t){return new Pe(t,e)}(e,t)},Ke=Ue?DOMException:Pe,Ve=["onsuccess","onerror"],Ge=["source","transaction","readyState"],He=["result","error"];function We(){throw new TypeError("Illegal constructor")}We.__super=function(){var e=this;this[Symbol.toStringTag]="IDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0}),He.forEach(function(t){Object.defineProperties(e,s(s({},"__"+t,{enumerable:!1,configurable:!1,writable:!0}),t,{enumerable:!0,configurable:!0,get:function(){if(!this.__done)throw Me("InvalidStateError","Can't get "+t+"; the request is still pending.");return this["__"+t]}}))}),me(this,Ge,{readyState:{get readyState(){return this.__done?"done":"pending"}}}),ve(this,Ve),this.__result=void 0,this.__error=this.__source=this.__transaction=null,this.__done=!1},We.__createInstance=function(){return new We.__super},We.prototype=$.createInstance({extraProperties:["debug"]}),We.prototype[Symbol.toStringTag]="IDBRequestPrototype",We.prototype.__getParent=function(){return"[object IDBOpenDBRequest]"===this.toString()?null:this.__transaction},he(We.prototype,Ge),he(We.prototype,He),ye(We.prototype,Ve),Object.defineProperty(We.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:We}),We.__super.prototype=We.prototype,Object.defineProperty(We,"prototype",{writable:!1});var Qe=["onblocked","onupgradeneeded"];function ze(){throw new TypeError("Illegal constructor")}ze.prototype=Object.create(We.prototype),Object.defineProperty(ze.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:ze});var $e=ze;function Xe(e){return e&&"function"==typeof e.then}function Je(e,t){e.then(null,t)}ze.__createInstance=function(){function e(){We.__super.call(this),this[Symbol.toStringTag]="IDBOpenDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0,extraProperties:["oldVersion","newVersion","debug"]}),ve(this,Qe)}return e.prototype=$e.prototype,new e},ye(ze.prototype,Qe),ze.prototype[Symbol.toStringTag]="IDBOpenDBRequestPrototype",Object.defineProperty(ze,"prototype",{writable:!1});var Ye,Ze,et=function(){function e(t){var n=this;o(this,e),s(this,"v",0),this.s=2,this.c=[[],[]];var r=function(e,t){n.v=e,n.s=t,n.c[t].forEach(function(t){t(e)}),n.c[t].length&&(n.c=null)},i=function(e){n.c&&(Xe(e)?Je(e.then(i),a):r(e,0))},a=function(e){n.c&&(Xe(e)?Je(e.then(a),a):r(e,1))};try{t(i,a)}catch(e){a(e)}}return a(e,[{key:"then",value:function(t,n){var r=this;return new e(function(e,o){var i="function"==typeof n?n:o,a=function(){try{e(t?t(r.v):r.v)}catch(e){i(e)}};0===r.s?a():1===r.s?i(r.v):(r.c[0].push(a),r.c[1].push(i))})}},{key:"catch",value:function(t){var n=this;return new e(function(e,r){var o=function(){try{e(t(n.v))}catch(e){r(e)}};1===n.s?o():0===n.s?e(n.v):(n.c[1].push(o),n.c[0].push(e))})}}],[{key:"all",value:function(t){return new e(function(e,n){var r=t.length,o=[];r?t.forEach(function(i,a){Xe(i)?Je(i.then(function(t){o[a]=t,--r||e(o)}),n):(o[a]=i,--r||e(t))}):e(o)})}},{key:"race",value:function(t){var n=!1;return new e(function(e,r){t.some(function(t){return Xe(t)?(Je(t.then(function(t){n||(e(t),n=!0)}),r),!1):(e(t),n=!0,!0)})})}},{key:"resolve",value:function(t){return new e(function(e){e(t)})}},{key:"reject",value:function(t){return new e(function(e,n){n(t)})}}])}();function tt(e,t){var n=xt(e),r=xt(t),o=n>r?1:n===r?0:-1;if(J.DEBUG){var i=Ft(n),a=Ft(r);"object"===w(e)&&(e=JSON.stringify(e),i=JSON.stringify(i)),"object"===w(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 nt=function(e,t,n){Reflect.has(Array.prototype,t)?Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0,configurable:!0}):e[t]=n},rt=function(e,t){return nt(e,e.length,t)},ot={invalid:100,number:200,date:300,string:400,binary:500,array:600},it=Object.keys(ot);it.forEach(function(e){ot[e]=String.fromCodePoint(ot[e])});var at=it.reduce(function(e,t){return e[ot[t]]=t,e},{}),ut=["negativeInfinity","bigNegative","smallNegative","smallPositive","bigPositive","positiveInfinity"],ct={invalid:{encode:function(){return ot.invalid+"-"},decode:function(){}},number:{encode:function(e){var t,n,r,o=e===Number.MIN_VALUE?"0."+"0".repeat(214)+"2":Math.abs(e).toString(32),i=o.indexOf("."),a=(o=-1!==i?o.replace(".",""):o).search(/(?:[\0-\/1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/);return o=o.slice(a),Number.isFinite(Number(e))?e<0?(e>-1?(t=ut.indexOf("smallNegative"),n=st(a)):(t=ut.indexOf("bigNegative"),n=ft(st(-1!==i?i:o.length))),r=ft(lt(o))):e<1?(t=ut.indexOf("smallPositive"),n=ft(st(a)),r=lt(o)):(t=ut.indexOf("bigPositive"),n=st(-1!==i?i:o.length),r=lt(o)):(n=pt(2),r=pt(11),t=ut.indexOf(e>0?"positiveInfinity":"negativeInfinity")),ot.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(ut[t]){case"negativeInfinity":return-1/0;case"positiveInfinity":return 1/0;case"bigPositive":return dt(r,n);case"smallPositive":return dt(r,n=yt(ft(n)));case"smallNegative":return n=yt(n),-dt(r=ft(r),n);case"bigNegative":return n=ft(n),-dt(r=ft(r),n);default:throw new Error("Invalid number.")}}},string:{encode:function(e,t){return t&&(e=e.replaceAll(/((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,"-$1")+" "),ot.string+"-"+e},decode:function(e,t){return e=e.slice(2),t&&(e=e.slice(0,-1).replaceAll(/-((?:[\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=u(e.entries());try{for(r.s();!(t=r.n()).done;){var o=m(t.value,2),i=o[0],a=xt(o[1],!0);nt(n,i,a)}}catch(e){r.e(e)}finally{r.f()}rt(n,ot.invalid+"-");var c=JSON.stringify(n);return!1===J.escapeNULForSQLiteStatements&&(c=c.replaceAll(String.raw(Ye||(Ye=b(["\0"],["\\u0000"]))),"\0")),ot.array+"-"+c},decode:function(e){var t=e.slice(2);!1===J.escapeNULForSQLiteStatements&&(t=t.replaceAll("\0",String.raw(Ze||(Ze=b(["\0"],["\\u0000"])))));var n=JSON.parse(t);n.pop();for(var r=0;r<n.length;r++){var o=Ft(n[r],!0);nt(n,r,o)}return n}},date:{encode:function(e){return ot.date+"-"+e.toJSON()},decode:function(e){return new Date(e.slice(2))}},binary:{encode:function(e){return ot.binary+"-"+(e.byteLength?g(mt(e)).map(function(e){return String(e).padStart(3,"0")}):"")},decode:function(e){var t=e.slice(2),n=t.length?t.split(",").map(Number):[],r=new ArrayBuffer(n.length);return new Uint8Array(r).set(n),r}}};function st(e){var t=e.toString(32);return 1===t.length?"0"+t:t}function lt(e){return(e+pt(11)).slice(0,11)}function ft(e){var t,n="",r=u(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;n+=(31-Number.parseInt(o,32)).toString(32)}}catch(e){r.e(e)}finally{r.f()}return n}function dt(e,t){var n=Number.parseInt(t,32);if(n<0)return _t(Number.parseInt(e,32)*Math.pow(32,n-10));if(n<11){var r=e.slice(0,n),o=Number.parseInt(r,32),i=e.slice(n);return _t(o+Number.parseInt(i,32)*Math.pow(32,n-11))}var a=e+pt(n-11);return Number.parseInt(a,32)}function _t(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;return Number(e.toPrecision(t))}function pt(e){return"0".repeat(e)}function yt(e){return"-"+e}function ht(e){if(Array.isArray(e))return"array";if(de(e))return"date";if(_e(e))return"binary";var t=w(e);return["string","number"].includes(t)?t:"invalid"}function vt(e,t){return bt(e,t,!1,!0)}function mt(e){var t,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.");n=e.byteOffset,t=e.byteLength}else t=e.byteLength;return new Uint8Array("buffer"in e&&e.buffer||e,n,t)}function bt(e,t,n,r){if(t||(t=[]),t.includes(e))return{type:"array",invalid:!0,message:"An array key cannot be circular"};var o=ht(e),i={type:o,value:e};switch(o){case"number":return Number.isNaN(e)?{type:"NaN",invalid:!0}:Object.is(e,-0)?{type:o,value:0}:i;case"string":return i;case"binary":var a;try{a=mt(e)}catch(e){return{type:o,invalid:!0,message:"Could not read the buffer source (it may be detached)"}}return{type:"binary",value:a};case"array":var u=e,c=u.length;rt(t,e);for(var s,l=[],f=function(){if(!n&&!Object.hasOwn(u,d))return{v:{type:o,invalid:!0,message:"Does not have own index property"}};try{var e=bt(u[d],t,!1,r);if(e.invalid)return n?0:{v:{type:o,invalid:!0,message:"Bad array entry value-to-key conversion"}};(!n||!r&&l.every(function(t){return 0!==tt(t,e.value)})||r&&l.every(function(t){return 0!==tt(t,e)}))&&rt(l,r?e:e.value)}catch(e){if(!n)throw e}},d=0;d<c;d++)if(0!==(s=f())&&s)return s.v;return{type:o,value:l};case"date":var _=e;return Number.isNaN(_.getTime())?{type:o,invalid:!0,message:"Not a valid date"}:r?{type:o,value:_.getTime()}:{type:o,value:new Date(_)};default:var p=null===e?"null":w(e);return{type:p,invalid:!0,message:"Not a valid key; type "+p}}}function gt(e,t){return bt(e,null,!0,t)}function Et(e,t){var n=vt(e,t);if(n.invalid)throw Me("DataError",n.message||"Not a valid key; type: "+n.type);return n}function wt(e,t,n,r){var o=Dt(e,t);return o.failure?o:n?gt(o.value,r):bt(o.value,null,!1,r)}function Dt(e,t,n,r){if(Array.isArray(t)){var o=[];return t.some(function(t){var n=Dt(e,t);return!!n.failure||(rt(o,n.value),!1)})?{failure:!0}:{value:o}}return""===t?{value:e}:t.split(".").some(function(t){if("length"!==t||"string"!=typeof e&&!Array.isArray(e))if(fe(n=e)&&"size"in n&&"number"==typeof n.size&&"slice"in n&&"function"==typeof n.slice&&!("lastModified"in n))switch(t){case"size":case"type":e=e[t]}else{if(!function(e){return fe(e)&&"name"in e&&"string"==typeof e.name&&"slice"in e&&"function"==typeof e.slice&&"lastModified"in e}(e))return!fe(e)||!Object.hasOwn(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 n;return!1})?{failure:!0}:{value:e}}function Ot(e,t,n){var r=n.split("."),o=r.pop();r.forEach(function(t){Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:{},enumerable:!0,writable:!0,configurable:!0}),e=e[t]}),Object.defineProperty(e,o,{value:t,enumerable:!0,writable:!0,configurable:!0})}function St(e,t){var n=t.split(".");n.pop();var r,o=u(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(!fe(e))return!1;if(!Object.hasOwn(e,i))return!0;e=e[i]}}catch(e){o.e(e)}finally{o.f()}return fe(e)}function It(e,t,n){var r=void 0===t.lower,o=void 0===t.upper,i=xt(e,!0),a=n?t.__lowerCached:xt(t.lower,!0),u=n?t.__upperCached:xt(t.upper,!0);return!r&&(t.lowerOpen&&null!==i&&null!==a&&i>a||!t.lowerOpen&&(!i&&!a||null!==i&&null!==a&&i>=a))&&(r=!0),!o&&(t.upperOpen&&null!==i&&null!==u&&i<u||!t.upperOpen&&(!i&&!u||null!==i&&null!==u&&i<=u))&&(o=!0),r&&o}function Tt(e,t){return"array"===at[t.slice(0,1)]?t.indexOf(e)>1:t===e}function At(e,t){var n=[];if(Array.isArray(e)){var r,o=u(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(Array.isArray(i)){if(t&&t.lower===t.upper)continue;if(1!==i.length){At(i,t).length>0&&rt(n,i);continue}i=i[0]}(Te(t)||It(i,t,!0))&&rt(n,i)}}catch(e){o.e(e)}finally{o.f()}}else(Te(t)||It(e,t,!0))&&rt(n,e);return n}function xt(e,t){return void 0===e?null:ct[ht(e)].encode(e,t)}function Ft(e,t){if("string"==typeof e)return ct[at[e.slice(0,1)]].decode(e,t)}function Nt(e,t){return Ft(xt(e,t),t)}var Bt=9007199254740992;function Ct(e,t,n,r){e.executeSql('SELECT "currNum" FROM __sys__ WHERE "name" = ?',[te(t.__currentName)],function(e,t){1!==t.rows.length?n(1):n(t.rows.item(0).currNum)},function(e,t){return r(Me("DataError","Could not get the auto increment value for key",t)),!1})}function jt(e,t,n,r,o){var i='UPDATE __sys__ SET "currNum" = ? WHERE "name" = ?',a=[n,te(t.__currentName)];J.DEBUG&&console.log(i,a),e.executeSql(i,a,function(){r(n)},function(e,t){return o(Me("UnknownError","Could not set the auto increment value for key",t)),!1})}function Pt(e,t,n,r,o){return jt(e,t,n+=n===Bt?2:1,r,o)}function kt(e,t,n,r){Ct(e,t,function(o){o>Bt?n("failure"):Pt(e,t,o,function(){n(null,o,o)},r)},r)}function Rt(e,t,n,r,o){"number"!=typeof n||n<1?r():Ct(e,t,function(i){var a=Math.floor(Math.min(n,Bt));a>=i?Pt(e,t,a,function(){r(i)},o):r()},o)}var qt=Object.freeze({__proto__:null,assignCurrentNumber:jt,checkKeyCouldBeInjectedIntoValue:St,convertKeyToValue:function e(t){var n=t.type,r=t.value;switch(n){case"number":case"string":return r;case"array":for(var o=[],i=r,a=i.length,u=0;u<a;){var c=e(i[u]);nt(o,u,c),u++}return o;case"date":return new Date(r);case"binary":var s=r,l=s.length,f=new ArrayBuffer(l);return new Uint8Array(f,s.byteOffset||0,s.byteLength).set(s),f;default:throw new Error("Bad key")}},convertValueToKey:vt,convertValueToKeyRethrowingAndIfInvalid:Et,convertValueToKeyValueDecoded:bt,convertValueToMultiEntryKey:function(e){return bt(e,null,!0,!0)},convertValueToMultiEntryKeyDecoded:gt,decode:Ft,encode:xt,evaluateKeyPathOnValue:function(e,t,n){return Dt(e,t)},extractKeyFromValueUsingKeyPath:function(e,t,n){return wt(e,t,n,!0)},extractKeyValueDecodedFromValueUsingKeyPath:wt,findMultiEntryMatches:At,generateKeyForStore:kt,injectKeyIntoValueUsingKeyPath:Ot,isKeyInRange:It,isMultiEntryMatch:Tt,possiblyUpdateKeyGenerator:Rt,roundTrip:Nt});function Lt(){throw new TypeError("Illegal constructor")}var Ut=Lt;function Mt(e,t,n,r,o,i){if(e&&(void 0!==e.lower||void 0!==e.upper)){var a,u;o&&n.push("AND");var c=void 0!==e.lower,s=void 0!==e.upper;if(c&&(a=i?e.__lowerCached:xt(e.lower)),s&&(u=i?e.__upperCached:xt(e.upper)),c){if(r.push(te(a)),s&&a===u&&!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(te(u)))}}function Kt(e,t){if(le(e,Lt)){var n=e;return"[object IDBKeyRange]"!==n.toString()?Lt.__createInstance(n.lower,n.upper,n.lowerOpen,n.upperOpen):n}if(!Te(e))return Et(e),Lt.only(e);if(t)throw Me("DataError","No key or range was specified")}Lt.__createInstance=function(e,t,n,r){function o(){if(this[Symbol.toStringTag]="IDBKeyRange",void 0===e&&void 0===t)throw Me("DataError","Both arguments to the key range method cannot be undefined");var o,i;if(void 0!==e&&(o=Nt(e),Et(e)),void 0!==t&&(i=Nt(t),Et(t)),void 0!==e&&void 0!==t&&e!==t&&xt(e)>xt(t))throw Me("DataError","`lower` must not be greater than `upper` argument in `bound()` call.");this.__lower=o,this.__upper=i,this.__lowerOpen=Boolean(n),this.__upperOpen=Boolean(r)}return o.prototype=Ut.prototype,new o},Lt.prototype.includes=function(e){if(!fe(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");if(!arguments.length)throw new TypeError("IDBKeyRange.includes requires a key argument");return Et(e),It(e,this)},Lt.only=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.only requires a value argument");return Lt.__createInstance(e,e,!1,!1)},Lt.lowerBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.lowerBound requires a value argument");return Lt.__createInstance(e,void 0,arguments[1],!0)},Lt.upperBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.upperBound requires a value argument");return Lt.__createInstance(void 0,e,!0,arguments[1])},Lt.bound=function(e,t){if(arguments.length<=1)throw new TypeError("IDBKeyRange.bound requires lower and upper arguments");return Lt.__createInstance(e,t,arguments[2],arguments[3])},Lt.prototype[Symbol.toStringTag]="IDBKeyRangePrototype",be(Lt.prototype),be(Lt),["lower","upper","lowerOpen","upperOpen"].forEach(function(e){Object.defineProperty(Lt.prototype,"__"+e,{enumerable:!1,configurable:!1,writable:!0});var t=c("get",{},e,function(){if(!fe(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");return this["__"+e]}),n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(Lt.prototype,e,n)}),Object.defineProperties(Lt,s(s({},Symbol.hasInstance,{value:function(e){return fe(e)&&"upper"in e&&"lowerOpen"in e&&"boolean"==typeof e.lowerOpen}}),"prototype",{writable:!1}));var Vt=!1,Gt={test:!0};if(Object.defineProperty)try{Object.defineProperty(Gt,"test",{enumerable:!1}),Gt.test&&(Vt=!0)}catch(e){}var Ht=function(){throw this._items=[],this._length=0,new TypeError("Illegal constructor")};Ht.prototype=s(s({constructor:Ht,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=Ht.__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(Math.trunc(Number(t)))&&delete this[t];this.sortList()}},Symbol.toStringTag,"DOMStringListPrototype"),Symbol.iterator,y().m(function e(){var t;return y().w(function(e){for(;;)switch(e.n){case 0:t=0;case 1:if(!(t<this._items.length)){e.n=3;break}return e.n=2,this._items[t++];case 2:e.n=1;break;case 3:return e.a(2)}},e,this)})),Object.defineProperty(Ht,Symbol.hasInstance,{value:function(e){return"DOMStringListPrototype"===Object.prototype.toString.call(e)}});var Wt=Ht;if(Object.defineProperty(Ht,"__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=Wt.prototype,new e}}),Vt){Object.defineProperty(Ht,"prototype",{writable:!1});["addIndexes","sortList","forEach","map","indexOf","push","splice","constructor","__createInstance"].forEach(function(e){Object.defineProperty(Ht.prototype,e,{enumerable:!1})}),Object.defineProperty(Ht.prototype,"length",{configurable:!0,enumerable:!0,get:function(){throw new TypeError("Illegal invocation")}});["_items","_length"].forEach(function(e){Object.defineProperty(Ht.prototype,e,{enumerable:!1,writable:!0})})}var Qt=0,zt=new Set,$t=["onabort","oncomplete","onerror"],Xt=["objectStoreNames","mode","durability","db","error"];function Jt(e){var t=e.db.__transactions.indexOf(e);-1!==t&&e.db.__transactions.splice(t,1),e.__transactionEndCallback=void 0,e.__requests=[]}function Yt(){throw new TypeError("Illegal constructor")}var Zt=Yt;Yt.__createInstance=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"default";function o(){var o=this,i=this;i[Symbol.toStringTag]="IDBTransaction",me(i,Xt),i.__id=++Qt,i.__active=!0,i.__handlerActive=!0,i.__running=!1,i.__errored=!1,i.__committed=!1,i.__requests=[],i.__objectStoreNames=t,i.__mode=n,i.__durability=r,i.__db=e,zt.add(i),i.__error=null,i.__setOptions({legacyOutputDidListenersThrowFlag:!0}),Xt.forEach(function(e){Object.defineProperty(o,e,{configurable:!0})}),ve(this,$t),i.__storeHandles={},setTimeout(function(){i.__executeRequests()},0)}return o.prototype=Zt.prototype,new o},Yt.prototype=$.createInstance({defaultSync:!0,extraProperties:["complete"]}),Yt.prototype.__transFinishedCb=function(e,t){t(Boolean(e))},Yt.prototype.__usesStandardDriver=function(){var e=this,t=e.db&&e.db.__db,n="readonly"===e.mode?"readTransaction":"transaction";return!Boolean(t&&"function"==typeof t[n]&&t[n].length>=4)},Yt.prototype.__callTransFinishedCb=function(e,t){var n=this;if(!n.__completed&&!n.__transFinishedCbFired){if(n.__transFinishedCb===Yt.prototype.__transFinishedCb)return n.__usesStandardDriver()?(n.__transFinishedCbFired=!0,void n.__transFinishedCb(e,t)):void setTimeout(function(){n.__callTransFinishedCb(e,t)},0);n.__transFinishedCbFired=!0,n.__transFinishedCb(e,t)}},Yt.prototype.__executeRequests=function(){var e=this;e.__running?J.DEBUG&&console.log("Looks like the request set is already running",e.mode):(e.__handlerActive=!1,e.__running=!0,e.db.__db["readonly"===e.mode?"readTransaction":"transaction"](function(t){e.__tx=t;var n,r=e.__usesStandardDriver(),o=-1;function i(e){if(r)try{t.executeSql("SELECT 1",[],function(){e()},function(){return e(),!1})}catch(t){queueMicrotask(e)}else queueMicrotask(e)}function a(t,r){if(!e.__errored&&!e.__requestsFinished&&(r&&(n.req=r),n.req&&!n.req.__done)){n.req.__done=!0,n.req.__result=t,n.req.__error=null,e.__active=!0,e.__handlerActive=!0;var o=Fe("success");n.req.dispatchEvent(o),!o.__legacyOutputDidListenersThrowError||(ke("Error","An error occurred in a success handler attached to request chain",o.__legacyOutputDidListenersThrowError),e.__committed)?xe(p):e.__abortTransaction(Me("AbortError","A request was aborted (in user handler after success)."))}}function c(){if(!(e.__errored||e.__requestsFinished||n.req&&n.req.__done)){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var i=function(e){var t;if(e){if(1===e.length)return e[0];var n,r=u(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(Re(o))return o;"object"===w(o)&&null!==o&&"message"in o&&"string"==typeof o.message&&(t=o)}}catch(t){r.e(t)}finally{r.f()}}return t}(r);if(n.req){n.req.__done=!0,n.req.__error=i,n.req.__result=void 0,n.req.addLateEventListener("error",function(e){e.cancelable&&e.defaultPrevented&&!e.__legacyOutputDidListenersThrowError&&p()}),n.req.addDefaultEventListener("error",function(){n.req&&e.__abortTransaction(n.req.__error)}),e.__active=!0,e.__handlerActive=!0;var a=Fe("error",i,{bubbles:!0,cancelable:!0});if(n.req.dispatchEvent(a),a.__legacyOutputDidListenersThrowError){if(ke("Error","An error occurred in an error handler attached to request chain",a.__legacyOutputDidListenersThrowError),a.preventDefault(),e.__committed)return void xe(p);e.__abortTransaction(Me("AbortError","A request was aborted (in user handler after error)."))}}else e.__abortTransaction(i)}}function s(){return!(n=e.__requests[o]).req||!n.req.__done&&(e.__active=!1,e.__handlerActive=!1,!0)}function l(){try{if(!n.req)return void n.op(t,n.args,function(){return xe(_)},c);n.op(t,n.args,a,c,_)}catch(e){c(e)}}function f(){s()&&l()}function d(t){if(!e.__errored&&!e.__requestsFinished){if(!(o<e.__requests.length))return t<=0?(e.__requests=[],void(e.__active&&function(){function t(){e.__completed=!0,J.DEBUG&&console.log("Transaction completed");var t=Fe("complete");try{e.__internal=!0,e.dispatchEvent(t),e.__internal=!1,e.dispatchEvent(Fe("__complete"))}catch(t){throw e.__internal=!1,e.__errored=!0,t}finally{zt.delete(e),e.__storeHandles={},Jt(e)}}if(e.__active=!1,e.__handlerActive=!1,e.__requestsFinished=!0,"readwrite"===e.mode||"readonly"===e.mode)return e.__transactionFinished?void t():(e.__transactionEndCallback=t,void e.__callTransFinishedCb(e.__errored,t));var n=Fe("__beforecomplete");n.complete=t,e.dispatchEvent(n)}())):void i(function(){d(t-1)});f()}}function _(){e.__errored||e.__requestsFinished||(++o>=e.__requests.length?d(10):f())}function p(){e.__errored||e.__requestsFinished||(++o>=e.__requests.length?d(10):i(function(){e.__errored||e.__requestsFinished||s()&&l()}))}_()},function(t){if(!0!==t){var n=qe(t);e.__abortTransaction(n)}},function(){e.__transFinishedCb===Yt.prototype.__transFinishedCb&&(e.__transactionEndCallback||e.__requestsFinished?!e.__transactionEndCallback||e.__completed||e.__transFinishedCbFired||(e.__transFinishedCbFired=!0,e.__transFinishedCb(e.__errored,e.__transactionEndCallback)):e.__transactionFinished=!0)},function(t,n,r,o,i){return!!n||(e.__transFinishedCb=t.readOnly?function(e,t){r(e),t&&t()}:function(e,t){e?o(e,t):i(t)},!e.__transactionEndCallback||e.__completed||e.__transFinishedCbFired||(e.__transFinishedCbFired=!0,e.__transFinishedCb(e.__errored,e.__transactionEndCallback)),!1)}))},Yt.prototype.__createRequest=function(e){var t=We.__createInstance();return t.__source=void 0!==e?e:this.db,t.__transaction=this,t},Yt.prototype.__addToTransactionQueue=function(e,t,n){var r=this.__createRequest(n);return this.__pushToQueue(r,e,t),r},Yt.prototype.__addNonRequestToTransactionQueue=function(e,t){this.__pushToQueue(null,e,t)},Yt.prototype.__pushToQueue=function(e,t,n){this.__assertActive(),this.__requests.push({op:t,args:n,req:e})},Yt.prototype.__assertActive=function(){if(!this.__active||!this.__handlerActive||this.__committed)throw Me("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},Yt.prototype.__assertWritable=function(){if("readonly"===this.mode)throw Me("ReadOnlyError","The transaction is read only")},Yt.prototype.__assertVersionChange=function(){Yt.__assertVersionChange(this)},Yt.prototype.objectStore=function(e){var t=this;if(!(t instanceof Yt))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No object store name was specified");if(Yt.__assertNotFinished(t),-1===t.__objectStoreNames.indexOf(e))throw Me("NotFoundError",e+" is not participating in this transaction");var n=t.db.__objectStores[e];if(!n)throw Me("NotFoundError",e+" does not exist in "+t.db.name);return(!Object.hasOwn(t.__storeHandles,e)||t.__storeHandles[e].__pendingDelete||t.__storeHandles[e].__deleted)&&(t.__storeHandles[e]=qr.__clone(n,t)),t.__storeHandles[e]},Yt.prototype.__abortTransaction=function(e){var t=this;function n(n,r){n?r&&"code"in r&&"number"==typeof r.code?J.DEBUG&&console.log("Rollback erred; feature is probably not supported as per WebSQL",t):J.DEBUG&&console.log("Rollback succeeded",t):J.DEBUG&&console.log("Rollback not possible due to missing transaction",t),t.dispatchEvent(Fe("__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(){if(!t.req)throw new Error("Missing request");t.req.__done=!0,t.req.__result=void 0,t.req.__error=Me("AbortError","A request was aborted (an unfinished request).");var e=Fe("error",t.req.__error,{bubbles:!0,cancelable:!0});return new et(function(n){setTimeout(function(){if(!t.req)throw new Error("Missing request");t.req.dispatchEvent(e),n()},0)})})},et.resolve(void 0)).then(function(){var n=Fe("abort",e,{bubbles:!0,cancelable:!1});setTimeout(function(){t.__abortFinished=!0,t.dispatchEvent(n),t.__storeHandles={},t.dispatchEvent(Fe("__abort")),Jt(t)},0)}).catch(function(e){throw console.log("Abort error"),e})}ke("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,zt.delete(t),null!==e&&(t.__error=e),t.__requestsFinished&&null!==e&&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})}))},Yt.prototype.abort=function(){var e=this;if(!(e instanceof Yt))throw new TypeError("Illegal invocation");if(J.DEBUG&&console.log("The transaction was aborted",e),Yt.__assertNotFinished(e),e.__committed)throw Me("InvalidStateError","The transaction has already been committed");if(e.__requestsFinished)throw Me("InvalidStateError","The transaction is already committing");e.__abortTransaction(null)},Yt.prototype.commit=function(){var e=this;if(!(e instanceof Yt))throw new TypeError("Illegal invocation");if(!e.__active||!e.__handlerActive||e.__committed)throw Me("InvalidStateError","Failed to execute 'commit' on 'IDBTransaction': The transaction is not active.");J.DEBUG&&console.log("The transaction was explicitly committed",e),e.__committed=!0},Yt.prototype[Symbol.toStringTag]="IDBTransactionPrototype",Yt.__assertVersionChange=function(e){if(!e||"versionchange"!==e.mode)throw Me("InvalidStateError","Not a version transaction")},Yt.__assertNotVersionChange=function(e){if(e&&"versionchange"===e.mode)throw Me("InvalidStateError","Cannot be called during a version transaction")},Yt.__assertNotFinished=function(e){if(!e||e.__completed||e.__abortFinished||e.__errored)throw Me("InvalidStateError","Transaction finished by commit or abort")},Yt.__assertNotFinishedObjectStoreMethod=function(e){try{Yt.__assertNotFinished(e)}catch(t){if(e&&!e.__completed&&!e.__abortFinished)throw Me("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished");throw t}},Yt.__assertActive=function(e){if(!e||!e.__active||!e.__handlerActive||e.__committed)throw Me("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},Yt.prototype.__getParent=function(){return this.db},ye(Yt.prototype,$t),he(Yt.prototype,Xt),be(Yt.prototype),Object.defineProperty(Yt.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:Yt}),Object.defineProperty(Yt,"prototype",{writable:!1}),Yt.activeTransactions=zt;var en=a(function e(t){o(this,e),this.p=new Promise(t)});en.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&Object.defineProperty(en.prototype,Symbol.toStringTag,{get:function(){return"TypesonPromise"}}),en.prototype.then=function(e,t){var n=this;return new en(function(r,o){n.p.then(function(t){r(e?e(t):t)}).catch(function(e){return t?t(e):Promise.reject(e)}).then(r,o)})},en.prototype.catch=function(e){return this.then(void 0,e)},en.resolve=function(e){return new en(function(t){t(e)})},en.reject=function(e){return new en(function(t,n){n(e)})},en.all=function(e){return new en(function(t,n){Promise.all(e.map(function(e){return null!=e&&e.constructor&&"__typeson__type__"in e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e})).then(t,n)})},en.race=function(e){return new en(function(t,n){Promise.race(e.map(function(e){return null!=e&&e.constructor&&"__typeson__type__"in e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e})).then(t,n)})},en.allSettled=function(e){return new en(function(t,n){Promise.allSettled(e.map(function(e){return null!=e&&e.constructor&&"__typeson__type__"in e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e})).then(t,n)})};var tn=Object.hasOwn,nn=Object.getPrototypeOf;function rn(e,t){return sn(e)&&"function"==typeof e.then&&!0}function on(e){return Object.prototype.toString.call(e).slice(8,-1)}function an(e,t){if(!e||"object"!=w(e))return!1;var n=nn(e);if(!n)return null===t;var r=tn(n,"constructor")&&n.constructor;return"function"!=typeof r?null===t:t===r||null!==t&&Function.prototype.toString.call(r)===Function.prototype.toString.call(t)||"function"==typeof t&&"string"==typeof r.__typeson__type__&&r.__typeson__type__===t.__typeson__type__}function un(e){return!(!e||"Object"!==on(e))&&(!nn(e)||an(e,Object))}function cn(e){if(!e||"Object"!==on(e))return!1;var t=nn(e);return!t||an(e,Object)||cn(t)}function sn(e){return null!==e&&"object"==w(e)}function ln(e){return e.replaceAll("''","''''").replace(/^$/,"''").replaceAll("~","~0").replaceAll(".","~1")}function fn(e){return e.replaceAll("~1",".").replaceAll("~0","~").replace(/^''$/,"").replaceAll("''''","''")}function dn(e,t,n){if(""===t)return e;if(null===e||"object"!=w(e))throw new TypeError("Unexpected non-object type");var r=t.indexOf("."),o=fn(-1===r?t:t.slice(0,r));if(tn(e,o)){if(-1!==r){var i=e[o];return void 0===i?void 0:dn(i,t.slice(r+1))}return e[o]}}function _n(e,t,n,r){if(""===t)return n;for(var o=e,i=t;;){if(!o||"object"!=w(o))throw new TypeError("Unexpected non-object type");var a=i.indexOf("."),u=fn(-1===a?i:i.slice(0,a));if("__proto__"===u)throw new TypeError("Invalid property");if(-1===a)return o[u]=n,e;if(!tn(o,u))throw new TypeError("Invalid property");o=o[u],i=i.slice(a+1)}}function pn(e){return null===e?"null":Array.isArray(e)?"array":w(e)}
5
5
  /**
6
6
  * @file Typeson - JSON with types.
7
7
  * @license The MIT License (MIT)