Socket
Socket
Sign inDemoInstall

dexie

Package Overview
Dependencies
Maintainers
2
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dexie - npm Package Compare versions

Comparing version 1.3.5-beta to 1.3.5-beta.2

2

bower.json

@@ -28,3 +28,3 @@ {

],
"version": "1.3.5-beta"
"version": "1.3.5-beta.2"
}

@@ -1,2 +0,2 @@

// Type definitions for Dexie v1.3.5-beta
// Type definitions for Dexie v1.3.5-beta.2
// Project: https://github.com/dfahlander/Dexie.js

@@ -3,0 +3,0 @@ // Definitions by: David Fahlander <http://github.com/dfahlander>

@@ -1,3 +0,3 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Dexie=t()}(this,function(){"use strict";function n(n,t){return"object"!=typeof t&&(t=t()),en(t).forEach(function(e){n[e]=t[e]}),n}function t(t){return{from:function(e){return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,{extend:function(r){n(t.prototype,"object"!=typeof r?r(e.prototype):r)}}}}}function e(n,t,e){return un.call(n,t,e)}function r(n,t){return t(n)}function i(n){var t=setTimeout(n,1e3);clearTimeout(t)}function o(n){if(!n)throw new exceptions.Internal("Assertion failed")}function u(n){on.setImmediate?setImmediate(n):setTimeout(n,0)}function c(n,t){try{n()}catch(e){t&&t(e)}}function a(n){try{throw n}catch(t){return K.reject(n)}}function s(n,t){if(n.hasOwnProperty(t))return n[t];if(!t)return n;if("string"!=typeof t){for(var e=[],r=0,i=t.length;i>r;++r){var o=s(n,t[r]);e.push(o)}return e}var u=t.indexOf(".");if(-1!==u){var c=n[t.substr(0,u)];return void 0===c?void 0:s(c,t.substr(u+1))}}function f(n,t,e){if(n&&void 0!==t&&!("isFrozen"in Object&&Object.isFrozen(n)))if("string"!=typeof t&&"length"in t){o("string"!=typeof e&&"length"in e);for(var r=0,i=t.length;i>r;++r)f(n,t[r],e[r])}else{var u=t.indexOf(".");if(-1!==u){var c=t.substr(0,u),a=t.substr(u+1);if(""===a)void 0===e?delete n[c]:n[c]=e;else{var s=n[c];s||(s=n[c]={}),f(s,a,e)}}else void 0===e?delete n[t]:n[t]=e}}function l(n,t){"string"==typeof t?f(n,t,void 0):"length"in t&&[].map.call(t,function(t){f(n,t,void 0)})}function h(n){var t={};for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}function d(n){if(!n||"object"!=typeof n)return n;var t;if(rn(n)){t=[];for(var e=0,r=n.length;r>e;++e)t.push(d(n[e]))}else if(n instanceof Date)t=new Date,t.setTime(n.getTime());else{t=n.constructor?Object.create(n.constructor.prototype):{};for(var i in n)n.hasOwnProperty(i)&&(t[i]=d(n[i]))}return t}function p(n,t){var e={};for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)?n[r]!==t[r]&&JSON.stringify(n[r])!=JSON.stringify(t[r])&&(e[r]=t[r]):e[r]=void 0);for(var r in t)t.hasOwnProperty(r)&&!n.hasOwnProperty(r)&&(e[r]=t[r]);return e}function v(){}function y(n){return n}function m(n,t){return n===y?t:function(e){return t(n(e))}}function b(n,t){return function(){n.apply(this,arguments),t.apply(this,arguments)}}function g(n,t){return n===v?t:function(){var e=n.apply(this,arguments);void 0!==e&&(arguments[0]=e);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?b(r,this.onsuccess):r),i&&(this.onerror=this.onerror?b(i,this.onerror):i),void 0!==o?o:e}}function w(n,t){return n===v?t:function(){var e=n.apply(this,arguments);void 0!==e&&extend(arguments[0],e);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?b(r,this.onsuccess):r),i&&(this.onerror=this.onerror?b(i,this.onerror):i),void 0===e?void 0===o?void 0:o:void 0===o?e:extend(e,o)}}function _(n,t){return n===v?t:function(){return n.apply(this,arguments)===!1?!1:t.apply(this,arguments)}}function x(n,t){return n===v?t:function(){return t.apply(this,arguments)===!1?!1:n.apply(this,arguments)}}function P(n,t){return n===v?t:function(){n.apply(this,arguments),t.apply(this,arguments)}}function S(n,t){return n===v?t:function(){var e=n.apply(this,arguments);if(e&&"function"==typeof e.then){var r=this,i=arguments;return e.then(function(){return t.apply(r,i)})}return t.apply(this,arguments)}}function D(n,t){this.name=n,this.message=t}function k(n,t){return n+". Errors: "+t.map(function(n){return n.toString()}).filter(function(n,t,e){return e.indexOf(n)===t}).join("\n")}function O(n,t,e,r){this.name="ModifyError",this.failures=t,this.failedKeys=r,this.successCount=e,this.message=k(n,t)}function E(n,t){this.name="BulkError",this.failures=t,this.message=k(n,t)}function C(n,t){var e=n;return n instanceof D||!n.name||!pn[n.name]||(e=new pn[n.name](t||n.message,n),n.stack&&(e.stack=n.stack)),e}function I(n){if(n.stack)return n;try{throw new Error}catch(t){n.stack=t.stack}return n}function T(n,t){function r(n,t,e){if(rn(n))return o(n);if("object"==typeof n)return i(n);t||(t=_),e||(e=v);var r={subscribers:[],fire:e,subscribe:function(n){r.subscribers.push(n),r.fire=t(r.fire,n)},unsubscribe:function(n){r.subscribers=r.subscribers.filter(function(t){return t!==n}),r.fire=r.subscribers.reduce(t,e)}};return a[n]=s[n]=r,r}function i(n){en(n).forEach(function(t){var e=n[t];if(rn(e))r(t,n[t][0],n[t][1]);else{if("asap"!==e)throw new dn.InvalidArgument("Invalid event config");var i=r(t,null,function(){var n=arguments;i.subscribers.forEach(function(t){u(function(){t.apply(on,n)})})});i.subscribe=function(n){-1===i.subscribers.indexOf(n)&&i.subscribers.push(n)},i.unsubscribe=function(n){var t=i.subscribers.indexOf(n);-1!==t&&i.subscribers.splice(t,1)}}})}function o(n){function t(){return e?!1:void(e=!0)}var e=!1;n.forEach(function(n){r(n).subscribe(t)})}var c=arguments,a={},s=function(t,r){if(r){var i=e(arguments,1),o=a[t];return o.subscribe.apply(o,i),n}return"string"==typeof t?a[t]:void 0};s.addEventType=r;for(var f=1,l=c.length;l>f;++f)r(c[f]);return s}function j(n,t){gn.push([n,e(arguments,1)])}function A(){var n=gn;gn=[];for(var t=0,e=n.length;e>t;++t){var r=n[t];r[0].apply(on,r[1])}}function K(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],this._catched=!1;var t=this,e=!0;this._PSD=K.PSD;try{W(this,n,function(n){e?mn(R,t,n):R(t,n)},function(n){return e?(mn(M,t,n),!1):M(t,n)})}finally{e=!1}}function B(n,t){if(null===n._state)return void n._deferreds.push(t);var e=n._state?t.onFulfilled:t.onRejected;if(null===e)return(n._state?t.resolve:t.reject)(n._value);var r,i=bn;bn=!1,mn=j;try{var o=K.PSD;K.PSD=n._PSD,r=e(n._value),n._state||r&&"function"==typeof r.then&&r._state===!1||F(n),t.resolve(r)}catch(u){t.reject(u)}finally{if(K.PSD=o,i){do{for(;gn.length>0;)A();var c=wn.pop();if(c)try{c()}catch(u){}}while(wn.length>0||gn.length>0);mn=yn,bn=!0}}}function N(n){var t=bn;bn=!1,mn=j;try{return n()}finally{if(t){do{for(;gn.length>0;)A();var e=wn.pop();if(e)try{e()}catch(r){}}while(wn.length>0||gn.length>0);mn=yn,bn=!0}}}function F(n){n._catched=!0,n._parent&&!n._parent._catched&&F(n._parent)}function R(n,t){var e=K.PSD;K.PSD=n._PSD;try{if(t===n)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then)return t instanceof K&&null!==t._state?(n._state=t._state,n._value=t._value,void q.call(n)):void W(n,function(n,e){t.then(n,e)},function(t){R(n,t)},function(t){M(n,t)});n._state=!0,n._value=t,q.call(n)}catch(r){M(r)}finally{K.PSD=e}}function M(n,t){var e=K.PSD;if(K.PSD=n._PSD,n._state=!1,n._value=t,q.call(n),!n._catched)try{n.onuncatched?n.onuncatched(n._value):K.on.error.fire(n._value)}catch(r){}return K.PSD=e,n._catched}function q(){for(var n=0,t=this._deferreds.length;t>n;n++)B(this,this._deferreds[n]);this._deferreds=[]}function U(n,t,e,r){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.resolve=e,this.reject=r}function W(n,t,e,r){var i=!1;try{t(function(n){i||(i=!0,e(n))},function(t){return i?n._catched:(i=!0,r(t))})}catch(o){if(i)return;return r(o)}}function V(n){console.error("Uncaught Promise: "+(n.stack||n))}function L(i,o){function l(){Ln.on("versionchange",function(n){Ln.close(),Ln.on("error").fire(new dn.VersionChange)})}function b(n){this._cfg={version:n,storesSource:null,dbschema:{},tables:{},contentUpgrade:null},this.stores({})}function _(n,t,i,o){if(0===n){en(An).forEach(function(n){k(t,n,An[n].primKey,An[n].indexes)});var u=Ln._createTransaction(Vn,Bn,An);u.idbtrans=t,u.idbtrans.onerror=G(i,["populating database"]),u.on("error").subscribe(i),K.newPSD(function(){K.PSD.trans=u;try{Ln.on("populate").fire(u)}catch(n){o.onerror=t.onerror=function(n){n.preventDefault()};try{t.abort()}catch(e){}t.db.close(),i(n)}})}else{var c=[],a=Kn.filter(function(t){return t._cfg.version===n})[0];if(!a)throw new dn.Upgrade("Dexie specification of currently installed DB version is missing");An=Ln._dbSchema=a._cfg.dbschema;var s=!1,f=Kn.filter(function(t){return t._cfg.version>n});f.forEach(function(n){var o=An,u=n._cfg.dbschema;wn(o,t),wn(u,t),An=Ln._dbSchema=u;var a=D(o,u);a.add.forEach(function(n){c.push(function(t,e){k(t,n[0],n[1].primKey,n[1].indexes),e()})}),a.change.forEach(function(n){if(n.recreate)throw new dn.Upgrade("Not yet support for changing primary key");c.push(function(t,e){var r=t.objectStore(n.name);n.add.forEach(function(n){B(r,n)}),n.change.forEach(function(n){r.deleteIndex(n.name),B(r,n)}),n.del.forEach(function(n){r.deleteIndex(n)}),e()})}),n._cfg.contentUpgrade&&c.push(function(t,o){s=!0;var c=Ln._createTransaction(Vn,e(t.db.objectStoreNames),u);c.idbtrans=t;var a=0;c._promise=r(c._promise,function(n){return function(t,e,r){function i(n){return function(){n.apply(this,arguments),0===--a&&o()}}return++a,n.call(this,t,function(n,t,r){arguments[0]=i(n),arguments[1]=i(t),e.apply(this,arguments)},r)}}),t.onerror=G(i,["running upgrader function for version",n._cfg.version]),c.on("error").subscribe(i),n._cfg.contentUpgrade(c),0===a&&o()}),s&&bn()||c.push(function(n,t){A(u,n),t()})});var l=function(){try{c.length?c.shift()(t,l):j(An,t)}catch(n){o.onerror=t.onerror=function(n){n.preventDefault()};try{t.abort()}catch(e){}t.db.close(),i(n)}};l()}}function D(n,t){var e={del:[],add:[],change:[]};for(var r in n)t[r]||e.del.push(r);for(var r in t){var i=n[r],o=t[r];if(i){var u={name:r,def:t[r],recreate:!1,del:[],add:[],change:[]};if(i.primKey.src!==o.primKey.src)u.recreate=!0,e.change.push(u);else{var c=i.indexes.reduce(function(n,t){return n[t.name]=t,n},{}),a=o.indexes.reduce(function(n,t){return n[t.name]=t,n},{});for(var s in c)a[s]||u.del.push(s);for(var s in a){var f=c[s],l=a[s];f?f.src!==l.src&&u.change.push(l):u.add.push(l)}(u.recreate||u.del.length>0||u.add.length>0||u.change.length>0)&&e.change.push(u)}}else e.add.push([r,o])}return e}function k(n,t,e,r){var i=n.db.createObjectStore(t,e.keyPath?{keyPath:e.keyPath,autoIncrement:e.auto}:{autoIncrement:e.auto});return r.forEach(function(n){B(i,n)}),i}function j(n,t){en(n).forEach(function(e){t.db.objectStoreNames.contains(e)||k(t,e,n[e].primKey,n[e].indexes)})}function A(n,t){for(var e=0;e<t.db.objectStoreNames.length;++e){var r=t.db.objectStoreNames[e];null!==n[r]&&void 0!==n[r]||t.db.deleteObjectStore(r)}}function B(n,t){n.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function N(){zn.forEach(function(n){n.resume()})}function F(n,t){throw new dn.InvalidTable("Table "+t[0]+" not part of transaction. Original Scope Function Source: "+L.Promise.PSD.trans.scopeFunc.toString())}function R(n,t,e,r){this.name=n,this.schema=e,this.hook=Nn[n]?Nn[n].hook:T(null,{creating:[g,v],reading:[m,y],updating:[w,v],deleting:[P,v]}),this._tpf=t,this._collClass=r||W}function M(n,t,e,r){R.call(this,n,t,e,r||V)}function q(n,t,e,r){function i(n,t,e,r){return o._promise(n,e,r)}var o=this;this.db=Ln,this.mode=n,this.storeNames=t,this.idbtrans=null,this.on=T(this,["complete","error"],"abort"),this._reculock=0,this._blockedFuncs=[],this._psd=null,this.active=!0,this._dbschema=e,r&&(this.parent=r),this._tpf=i,this.tables=Object.create(Fn);for(var u=t.length-1;-1!==u;--u){var c=t[u],a=Ln._tableFactory(n,e[c],i);this.tables[c]=a,this[c]||(this[c]=a)}}function U(n,t,e){this._ctx={table:n,index:":id"===t?null:t,collClass:n._collClass,or:e}}function W(n,t){var e=null,r=null;if(t)try{e=t()}catch(i){r=I(C(i))}var o=n._ctx;this._ctx={table:o.table,index:o.index,isPrimKey:!o.index||o.table.schema.primKey.keyPath&&o.index===o.table.schema.primKey.name,range:e,op:"openCursor",dir:"next",unique:"",algorithm:null,filter:null,isMatch:null,offset:0,limit:1/0,error:r,or:o.or}}function V(){W.apply(this,arguments)}function J(n,t){return n._cfg.version-t._cfg.version}function on(n,t,e,r,i,o){e.forEach(function(e){var u=Ln._tableFactory(r,i[e],t);n.forEach(function(n){n[e]||(o?Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var n=K.PSD&&K.PSD.trans;return n&&n.db===Ln?n.tables[e]:u}}):n[e]=u)})})}function un(n){n.forEach(function(n){for(var t in n)n[t]instanceof R&&delete n[t]})}function cn(n,t,e,r,i,o){var u=K.PSD;o=o||y,n.onerror||(n.onerror=G(i)),t?n.onsuccess=z(function(u){var c=n.result;if(c){var a=function(){c["continue"]()};t(c,function(n){a=n},r,i)&&e(o(c.value),c,function(n){a=n}),a()}else r()},i,u):n.onsuccess=z(function(t){var i=n.result;if(i){var u=function(){i["continue"]()};e(o(i.value),i,function(n){u=n}),u()}else r()},i,u)}function an(n){var t=[];return n.split(",").forEach(function(n){n=n.trim();var e=n.replace("&","").replace("++","").replace("*",""),r=0!==e.indexOf("[")?e:n.substring(n.indexOf("[")+1,n.indexOf("]")).split("+");t.push(new Z(e,r||null,-1!==n.indexOf("&"),-1!==n.indexOf("*"),-1!==n.indexOf("++"),rn(r),-1!==r.indexOf(".")))}),t}function sn(n,t){return Tn.cmp(n,t)}function fn(n,t){return sn(n,t)<0?n:t}function ln(n,t){return sn(n,t)>0?n:t}function hn(n,t){return Tn.cmp(n,t)}function pn(n,t){return Tn.cmp(t,n)}function vn(n,t){return t>n?-1:n===t?0:1}function yn(n,t){return n>t?-1:n===t?0:1}function mn(n,t){return n?t?function(){return n.apply(this,arguments)&&t.apply(this,arguments)}:n:t}function bn(){return"undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent)}function gn(){if(Ln.verno=Rn.version/10,Ln._dbSchema=An={},Bn=e(Rn.objectStoreNames,0),0!==Bn.length){var n=Rn.transaction(nn(Bn),"readonly");Bn.forEach(function(t){for(var e=n.objectStore(t),r=e.keyPath,i=r&&"string"==typeof r&&-1!==r.indexOf("."),o=new Z(r,r||"",!1,!1,!!e.autoIncrement,r&&"string"!=typeof r,i),u=[],c=0;c<e.indexNames.length;++c){var a=e.index(e.indexNames[c]);r=a.keyPath,i=r&&"string"==typeof r&&-1!==r.indexOf(".");var s=new Z(a.name,r,!!a.unique,!!a.multiEntry,!1,r&&"string"!=typeof r,i);u.push(s)}An[t]=new $(t,o,u,{})}),on([Nn],Ln._transPromiseFactory,en(An),Vn,An)}}function wn(n,t){for(var r=t.db.objectStoreNames,i=0;i<r.length;++i)for(var o=r[i],u=t.objectStore(o),c=0;c<u.indexNames.length;++c){var a=u.indexNames[c],s=u.index(a).keyPath,f="string"==typeof s?s:"["+e(s).join("+")+"]";if(n[o]){var l=n[o].idxByName[f];l&&(l.name=a)}}}var On=L.dependencies,En=n({addons:L.addons,autoOpen:!0,indexedDB:On.indexedDB,IDBKeyRange:On.IDBKeyRange},o||{}),Cn=En.addons,In=En.autoOpen,Tn=En.indexedDB,jn=En.IDBKeyRange,An=this._dbSchema={},Kn=[],Bn=[],Nn={},Fn={},Rn=null,Mn=!0,qn=null,Un=!1,Wn="readonly",Vn="readwrite",Ln=this,zn=[],Jn=!0,Hn=!!tn(Tn);this.version=function(n){if(Rn||Un)throw new dn.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,n);var t=Kn.filter(function(t){return t._cfg.version===n})[0];return t?t:(t=new b(n),Kn.push(t),Kn.sort(J),t)},n(b.prototype,{stores:function(t){this._cfg.storesSource=this._cfg.storesSource?n(this._cfg.storesSource,t):t;var e={};Kn.forEach(function(t){n(e,t._cfg.storesSource)});var r=this._cfg.dbschema={};return this._parseStoresSpec(e,r),An=Ln._dbSchema=r,un([Nn,Ln,Fn]),on([Fn],F,en(r),Vn,r),on([Nn,Ln,this._cfg.tables],Ln._transPromiseFactory,en(r),Vn,r,!0),Bn=en(r),this},upgrade:function(n){var t=this;return Dn(function(){n(Ln._createTransaction(Vn,en(t._cfg.dbschema),t._cfg.dbschema))}),this._cfg.contentUpgrade=n,this},_parseStoresSpec:function(n,t){en(n).forEach(function(e){if(null!==n[e]){var r={},i=an(n[e]),o=i.shift();if(o.multi)throw new dn.Schema("Primary key cannot be multi-valued");o.keyPath&&f(r,o.keyPath,o.auto?0:o.keyPath),i.forEach(function(n){if(n.auto)throw new dn.Schema("Only primary key can be marked as autoIncrement (++)");if(!n.keyPath)throw new dn.Schema("Index must have a name and cannot be an empty string");f(r,n.keyPath,n.compound?n.keyPath.map(function(){return""}):"")}),t[e]=new $(e,o,i,r)}})}}),this._allTables=Nn,this._tableFactory=function(n,t,e){return n===Wn?new R(t.name,e,t,W):new M(t.name,e,t)},this._createTransaction=function(n,t,e,r){return new q(n,t,e,r)},this._transPromiseFactory=function(n,t,e){if(!Mn||K.PSD&&K.PSD.letThrough){var r=Ln._createTransaction(n,t,An);return r._promise(n,function(n,t){r.error(function(n){Ln.on("error").fire(n)}),K.newPSD(function(){K.PSD.trans=r,e(function(t){r.complete(function(){n(t)})},t,r)})})}if(!Un&&!In)return a(new dn.DatabaseClosed);var i=new K(function(r,o){zn.push({resume:function(){var u=Ln._transPromiseFactory(n,t,e);i.onuncatched=u.onuncatched,u.then(r,o)}})});return In&&!Un&&Ln.open()["catch"](v),i},this._whenReady=function(n){if(!kn&&Mn&&(!K.PSD||!K.PSD.letThrough)){if(!Un){if(!In)return a(new dn.DatabaseClosed);Ln.open()["catch"](v)}return new K(function(t,e){zn.push({resume:function(){n(t,e)}})})}return new K(n)},this.verno=0,this.open=function(){return Rn?K.resolve(Ln):Un?new K(function(n,t){return Ln._whenReady(function(){n(Ln)},function(n){t(n)})}):(qn=null,Un=!0,Mn=!0,new K(function(n,t){function e(n){try{r.transaction.abort()}catch(e){}if(Rn)try{Rn.close()}catch(e){}Rn=null,Un=!1,qn=C(n),Mn=!1,t(qn),N()}kn&&n(Ln);var r,o=!1;try{if(Kn.length>0&&(Jn=!1),!Tn)throw new dn.MissingAPI("indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using Safari, make sure to include indexedDB polyfill.");if(r=Jn?Tn.open(i):Tn.open(i,Math.round(10*Ln.verno)),!r)throw new dn.MissingAPI("IndexedDB API not available");r.onerror=G(e,["opening database",i]),r.onblocked=function(n){Ln.on("blocked").fire(n)},r.onupgradeneeded=z(function(n){if(Jn&&!Ln._allowEmptyDB){r.onerror=function(n){n.preventDefault()},r.transaction.abort(),r.result.close();var t=Tn.deleteDatabase(i);t.onsuccess=t.onerror=function(){e(new dn.NoSuchDatabase("Database "+i+" doesnt exist"))}}else{0===n.oldVersion&&(o=!0),r.transaction.onerror=G(e);var u=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;_(u/10,r.transaction,e,r)}},e),r.onsuccess=z(function(t){if(Un=!1,Rn=r.result,Jn)gn();else if(Rn.objectStoreNames.length>0)try{wn(An,Rn.transaction(nn(Rn.objectStoreNames),Wn))}catch(t){}Rn.onversionchange=Ln.on("versionchange").fire,Hn||Q(function(n){return-1===n.indexOf(i)?n.push(i):void 0}),K.newPSD(function(){function t(){Mn=!1,N(),n(Ln)}K.PSD.letThrough=!0;try{var r=Ln.on.ready.fire();r&&"function"==typeof r.then?r.then(t,function(n){Rn.close(),Rn=null,e(n)}):u(t)}catch(i){e(i)}})},e)}catch(c){e(c)}}))},this.close=function(){Rn?(Rn.close(),Rn=null,In=!1,Mn&&N(),Mn=!1,qn=new dn.DatabaseClosed):Un&&Ln.on("ready",function(){return K.reject(new dn.DatabaseClosed)})},this["delete"]=function(){var n=arguments;return new K(function(t,e){function r(){Ln.close();var n=Tn.deleteDatabase(i);n.onsuccess=function(){Hn||Q(function(n){var t=n.indexOf(i);return t>=0?n.splice(t,1):void 0}),t()},n.onerror=G(e,["deleting",i]),n.onblocked=function(){Ln.on("blocked").fire()}}if(n.length>0)throw new dn.InvalidArgument("Arguments not allowed in db.delete()");Un?zn.push({resume:r}):r()})},this.backendDB=function(){return Rn},this.isOpen=function(){return null!==Rn},this.hasFailed=function(){return null!==qn},this.dynamicallyOpened=function(){return Jn},this.name=i,Object.defineProperty(this,"tables",{get:function(){return en(Nn).map(function(n){return Nn[n]})}}),this.on=T(this,"error","populate","blocked",{ready:[S,v],versionchange:[x,v]}),this.on.ready.subscribe=r(this.on.ready.subscribe,function(n){return function(t,e){function r(){return e||Ln.on.ready.unsubscribe(r),t.apply(this,arguments)}n.call(this,r),Ln.isOpen()&&(Mn?zn.push({resume:r}):r())}}),Dn(function(){Ln.on("populate").fire(Ln._createTransaction(Vn,Bn,An)),Ln.on("error").fire(new Error)}),this.transaction=function(n,t,i){function o(t,e){var o=null,a=!0;try{if(f)throw f;o=Ln._createTransaction(n,l,An,c);var s=l.map(function(n){return o.tables[n]});s.push(o);var h,d=0;K.newPSD(function(){K.PSD.trans=o,o.scopeFunc=i,c&&(o.idbtrans=c.idbtrans,o._promise=r(o._promise,function(n){return function(t,e,r){function i(n){return function(t){var e;return K._rootExec(function(){e=n(t),K._tickFinalize(function(){0===--d&&o.active&&(o.active=!1,o.on.complete.fire())})}),e}}return++d,n.call(this,t,function(n,t,r){return e(i(n),i(t),r)},r)}})),o.complete(function(){t(h)}),o.error(function(n){function t(){var t=e(n);c||t||Ln.on.error.fire(n)}o.idbtrans&&(o.idbtrans.onerror=Y);try{o.abort()}catch(r){}c&&(c.active=!1,c.on.error.fire(n)),a?u(t):t()}),K._rootExec(function(){h=i.apply(o,s),h&&"function"==typeof h.next&&"function"==typeof h["throw"]&&(h=X(h))})}),(!o.idbtrans||c&&0===d)&&o._nop()}catch(p){o&&o.idbtrans&&(o.idbtrans.onerror=Y),o&&o.abort(),c&&c.on.error.fire(p),u(function(){e(p)||Ln.on("error").fire(p)})}a=!1}t=e(arguments,1,arguments.length-1),i=arguments[arguments.length-1];var c=K.PSD&&K.PSD.trans;c&&c.db===Ln&&-1===n.indexOf("!")||(c=null);var a=-1!==n.indexOf("?");n=n.replace("!","").replace("?","");var s=rn(t[0])?t.reduce(function(n,t){return n.concat(t)}):t,f=null,l=s.map(function(n){return"string"==typeof n?n:(n instanceof R||(f=f||new TypeError("Invalid type. Arguments following mode must be instances of Table or String")),n.name)});return"r"==n||n==Wn?n=Wn:"rw"==n||n==Vn?n=Vn:f=new dn.InvalidArgument("Invalid transaction mode: "+n),c&&(f||(c&&c.mode===Wn&&n===Vn&&(a?c=null:f=f||new dn.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY")),c&&l.forEach(function(n){c.tables.hasOwnProperty(n)||(a?c=null:f=f||new dn.SubTransaction("Table "+n+" not included in parent transaction. Parent Transaction function: "+c.scopeFunc.toString()))}))),c?c._promise(n,o,"lock"):Ln._whenReady(o)},this.table=function(n){if(kn&&Jn)return new M(n);if(!Nn.hasOwnProperty(n))throw new dn.InvalidTable("Table "+n+" does not exist");return Nn[n]},n(R.prototype,function(){function n(){throw new dn.ReadOnly("Current Transaction is READONLY")}return{_trans:function(n,t,e){return this._tpf(n,[this.name],t,e)},_idbstore:function(n,t,e){if(kn)return new K(t);var r=this;return this._tpf(n,[this.name],function(n,e,i){t(n,e,i.idbtrans.objectStore(r.name),i)},e)},get:function(n,t){var e=this;return this._idbstore(Wn,function(t,r,i){kn&&t(e.schema.instanceTemplate);var o=i.get(n);o.onerror=G(r,["getting",n,"from",e.name]),o.onsuccess=function(){t(e.hook.reading.fire(o.result))}}).then(t)},where:function(n){return new U(this,n)},count:function(n){return this.toCollection().count(n)},offset:function(n){return this.toCollection().offset(n)},limit:function(n){return this.toCollection().limit(n)},reverse:function(){return this.toCollection().reverse()},filter:function(n){return this.toCollection().and(n)},each:function(n){return this.toCollection().each(n)},toArray:function(n){return this.toCollection().toArray(n)},orderBy:function(n){return new this._collClass(new U(this,n))},toCollection:function(){return new this._collClass(new U(this))},mapToClass:function(n,t){this.schema.mappedClass=n;var e=Object.create(n.prototype);t&&H(e,t),this.schema.instanceTemplate=e;var r=function(t){if(!t)return t;var e=Object.create(n.prototype);for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=r,this.hook("reading",r),n},defineClass:function(n){return this.mapToClass(L.defineClass(n),n)},add:n,put:n,"delete":n,clear:n,update:n}}),t(M).from(R).extend(function(){function n(n,t,e,r){return function(i){i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),n.push(i.target.error),e&&e.onerror&&K.newPSD(function(){K.PSD.trans=r,e.onerror(i.target.error)}),t&&t()}}function t(n,t,e){return t?function(r){t.onsuccess&&K.newPSD(function(){K.PSD.trans=e,t.onsuccess(r.target.result)}),n&&n(r.target.result)}:function(t){n(t.target.result)}}return{bulkAdd:function(e){var r=this,i=this.hook.creating.fire;return this._idbstore(Vn,function(o,u,c,a){function l(n){0===m.length?o(n):u(new E(r.name+".bulkAdd(): "+m.length+" of "+b+" operations failed",m))}if(!c.keyPath&&!r.schema.primKey.auto)throw new dn.Unsupported("bulkAdd() only support inbound keys");if(0===e.length)return o();var h,p,y,m=[],b=e.length;if(i!==v){var g=c.keyPath,w={onerror:null,onsuccess:null};p=n(m,null,w,a),y=t(null,w,a);for(var _=0,x=e.length;x>_;++_){var P=e[_],S=s(P,g),D=i.call(w,S,P,a);void 0===S&&void 0!==D&&(P=d(P),f(P,g,D)),h=c.add(P),x-1>_&&(h.onerror=p,w.onsuccess&&(h.onsuccess=y),w.onerror=null,w.onsuccess=null)}h.onerror=n(m,l,w,a),h.onsuccess=t(l,w,a)}else{p=n(m);for(var _=0,x=e.length;x>_;++_)h=c.add(e[_]),h.onerror=p;h.onerror=n(m,l),h.onsuccess=t(l)}})},add:function(n,t){var e=this,r=this.hook.creating.fire;return this._idbstore(Vn,function(i,o,u,c){var a={onsuccess:null,onerror:null};if(r!==v){var l=void 0!==t?t:u.keyPath?s(n,u.keyPath):void 0,h=r.call(a,l,n,c);void 0===l&&void 0!==h&&(u.keyPath?f(n,u.keyPath,h):t=h)}var d=void 0!==t?u.add(n,t):u.add(n);d.onerror=G(function(n){return a.onerror&&K.newPSD(function(){K.PSD.trans=c,a.onerror(n)}),o(n)},["adding",n,"into",e.name]),d.onsuccess=function(t){var e=u.keyPath;e&&f(n,e,t.target.result),a.onsuccess&&K.newPSD(function(){K.PSD.trans=c,a.onsuccess(t.target.result)}),i(d.result)}})},put:function(n,t){var e=this,r=this.hook.creating.fire,i=this.hook.updating.fire;return r!==v||i!==v?this._trans(Vn,function(r,i,o){var u=void 0!==t?t:e.schema.primKey.keyPath&&s(n,e.schema.primKey.keyPath);void 0===u?o.tables[e.name].add(n).then(r,i):(o._lock(),n=d(n),o.tables[e.name].where(":id").equals(u).modify(function(t){this.value=n}).then(function(r){return 0===r?o.tables[e.name].add(n,t):u})["finally"](function(){o._unlock()}).then(r,i))}):this._idbstore(Vn,function(r,i,o){var u=void 0!==t?o.put(n,t):o.put(n);u.onerror=G(i,["putting",n,"into",e.name]),u.onsuccess=function(t){var e=o.keyPath;e&&f(n,e,t.target.result),r(u.result)}})},"delete":function(n){return this.hook.deleting.subscribers.length?this.where(":id").equals(n)["delete"]():this._idbstore(Vn,function(t,e,r){var i=r["delete"](n);i.onerror=G(e,["deleting",n,"from",r.name]),i.onsuccess=function(n){t(i.result)}})},clear:function(){return this.hook.deleting.subscribers.length?this.toCollection()["delete"]():this._idbstore(Vn,function(n,t,e){var r=e.clear();r.onerror=G(t,["clearing",e.name]),r.onsuccess=function(t){n(r.result)}})},update:function(n,t){if("object"!=typeof t||rn(t))throw new dn.InvalidArgument("db.update(keyOrObject, modifications). modifications must be an object.");if("object"!=typeof n||rn(n))return this.where(":id").equals(n).modify(t);en(t).forEach(function(e){f(n,e,t[e])});var e=s(n,this.schema.primKey.keyPath);return void 0===e&&K.reject(new dn.InvalidArgument("Given object does not contain its primary key")),this.where(":id").equals(e).modify(t)}}}),n(q.prototype,{_lock:function(){return++this._reculock,1===this._reculock&&K.PSD&&(K.PSD.lockOwnerFor=this),this},_unlock:function(){if(0===--this._reculock)for(K.PSD&&(K.PSD.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var n=this._blockedFuncs.shift();try{n()}catch(t){}}return this},_locked:function(){return this._reculock&&(!K.PSD||K.PSD.lockOwnerFor!==this)},_nop:function(n){this.tables[this.storeNames[0]].get(0).then(n)},_promise:function(n,t,e){var r=this;return K.newPSD(function(){var i;return r._locked()?i=new K(function(i,o){r._blockedFuncs.push(function(){r._promise(n,t,e).then(i,o)})}):(i=r.active?new K(function(i,o){if(!r.idbtrans&&n){if(!Rn)throw!qn||["DatabaseClosedError","MissingAPIError"].indexOf(qn.name)>=0?qn:new dn.OpenFailed(qn);var c=r.idbtrans=Rn.transaction(nn(r.storeNames),r.mode);c.onerror=function(n){r.on("error").fire(n&&n.target.error),n.preventDefault(),r.abort()},c.onabort=function(n){u(function(){r.on("error").fire(new dn.Abort("Transaction aborted for unknown reason"))}),r.active=!1,r.on("abort").fire(n)},c.oncomplete=function(n){r.active=!1,r.on("complete").fire(n)}}e&&r._lock();try{t(i,o,r)}catch(a){!function(){var n=I(C(a));L.ignoreTransaction(function(){r.on("error").fire(n)}),r.abort(),o(n)}()}}):K.reject(I(new dn.TransactionInactive("Transaction is inactive. Original Scope Function Source: "+r.scopeFunc.toString()))),r.active&&e&&i["finally"](function(){r._unlock()})),i.onuncatched=function(n){L.ignoreTransaction(function(){r.on("error").fire(n)}),r.abort()},i})},complete:function(n){return this.on("complete",n)},error:function(n){return this.on("error",n)},abort:function(){if(this.idbtrans&&this.active)try{this.active=!1,this.idbtrans.abort(),this.on.error.fire(new dn.Abort("Transaction Aborted"))}catch(n){}},table:function(n){if(!this.tables.hasOwnProperty(n))throw new dn.InvalidTable("Table "+n+" not in transaction");return this.tables[n]}}),n(U.prototype,function(){function n(n,t,e){var r=n instanceof U?new n._ctx.collClass(n):n;try{throw e?new e(t):new TypeError(t)}catch(i){r._ctx.error=i}return r}function t(n){return new n._ctx.collClass(n,function(){return jn.only("")}).limit(0)}function r(n){return e(1===n.length&&rn(n[0])?n[0]:n)}function i(n){return"next"===n?function(n){return n.toUpperCase()}:function(n){return n.toLowerCase()}}function o(n){return"next"===n?function(n){return n.toLowerCase()}:function(n){return n.toUpperCase()}}function u(n,t,e,r,i,o){for(var u=Math.min(n.length,r.length),c=-1,a=0;u>a;++a){var s=t[a];if(s!==r[a])return i(n[a],e[a])<0?n.substr(0,a)+e[a]+e.substr(a+1):i(n[a],r[a])<0?n.substr(0,a)+r[a]+e.substr(a+1):c>=0?n.substr(0,c)+t[c]+e.substr(c+1):null;i(n[a],s)<0&&(c=a)}return u<r.length&&"next"===o?n+e.substr(n.length):u<n.length&&"prev"===o?n.substr(0,e.length):0>c?null:n.substr(0,c)+r[c]+e.substr(c+1)}function c(n,t,e,r){function c(n){a=i(n),s=o(n),f="next"===n?vn:yn;var t=e.map(function(n){return{lower:s(n),upper:a(n)}}).sort(function(n,t){return f(n.lower,t.lower)});l=t.map(function(n){return n.upper}),h=t.map(function(n){return n.lower}),d=n,p="next"===n?"":r}var a,s,f,l,h,d,p,v=e.length;c("next");var y=new n._ctx.collClass(n,function(){return jn.bound(l[0],h[v-1]+r)});y._ondirectionchange=function(n){c(n)};var m=0;return y._addAlgorithm(function(n,e,r){var i=n.key;if("string"!=typeof i)return!1;var o=s(i);if(t(o,h,m))return!0;for(var c=null,a=m;v>a;++a){var y=u(i,o,l[a],h[a],f,d);null===y&&null===c?m=a+1:(null===c||f(c,y)>0)&&(c=y)}return e(null!==c?function(){n["continue"](c+p)}:r),!1}),y}return{between:function(e,r,i,o){i=i!==!1,o=o===!0;try{return sn(e,r)>0||0===sn(e,r)&&(i||o)&&(!i||!o)?t(this):new this._ctx.collClass(this,function(){return jn.bound(e,r,!i,!o)})}catch(u){return n(this,Pn)}},equals:function(n){return new this._ctx.collClass(this,function(){return jn.only(n)})},above:function(n){return new this._ctx.collClass(this,function(){return jn.lowerBound(n,!0)})},aboveOrEqual:function(n){return new this._ctx.collClass(this,function(){return jn.lowerBound(n)})},below:function(n){return new this._ctx.collClass(this,function(){return jn.upperBound(n,!0)})},belowOrEqual:function(n){return new this._ctx.collClass(this,function(){return jn.upperBound(n)})},startsWith:function(t){return"string"!=typeof t?n(this,Sn):this.between(t,t+_n,!0,!0)},startsWithIgnoreCase:function(t){return"string"!=typeof t?n(this,Sn):""===t?this.startsWith(t):c(this,function(n,t){return 0===n.indexOf(t[0])},[t],_n)},equalsIgnoreCase:function(t){return"string"!=typeof t?n(this,Sn):c(this,function(n,t){return n===t[0]},[t],"")},anyOfIgnoreCase:function(e){var i=r(arguments);return 0===i.length?t(this):i.every(function(n){return"string"==typeof n})?c(this,function(n,t){return-1!==t.indexOf(n)},i,""):n(this,"anyOfIgnoreCase() only works with strings")},startsWithAnyOfIgnoreCase:function(e){var i=r(arguments);return 0===i.length?t(this):i.every(function(n){return"string"==typeof n})?c(this,function(n,t){return t.some(function(t){return 0===n.indexOf(t)})},i,_n):n(this,"startsWithAnyOfIgnoreCase() only works with strings");
},anyOf:function(e){var i=r(arguments),o=hn;try{i.sort(o)}catch(u){return n(this,Pn)}if(0===i.length)return t(this);var c=new this._ctx.collClass(this,function(){return jn.bound(i[0],i[i.length-1])});c._ondirectionchange=function(n){o="next"===n?hn:pn,i.sort(o)};var a=0;return c._addAlgorithm(function(n,t,e){for(var r=n.key;o(r,i[a])>0;)if(++a,a===i.length)return t(e),!1;return 0===o(r,i[a])?!0:(t(function(){n["continue"](i[a])}),!1)}),c},notEqual:function(n){return this.inAnyRange([[-(1/0),n],[n,xn]],{includeLowers:!1,includeUppers:!1})},noneOf:function(t){var e=r(arguments);if(0===e.length)return new this._ctx.collClass(this);try{e.sort(hn)}catch(i){return n(this,Pn)}var o=e.reduce(function(n,t){return n?n.concat([[n[n.length-1][1],t]]):[[-(1/0),t]]},null);return o.push([e[e.length-1],xn]),this.inAnyRange(o,{includeLowers:!1,includeUppers:!1})},inAnyRange:function(e,r){function i(n,t){for(var e=0,r=n.length;r>e;++e){var i=n[e];if(sn(t[0],i[1])<0&&sn(t[1],i[0])>0){i[0]=fn(i[0],t[0]),i[1]=ln(i[1],t[1]);break}}return e===r&&n.push(t),n}function o(n,t){return l(n[0],t[0])}function u(n){return!p(n)&&!v(n)}var c=this._ctx;if(0===e.length)return t(this);if(!e.every(function(n){return void 0!==n[0]&&void 0!==n[1]&&hn(n[0],n[1])<=0}))return n(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",dn.InvalidArgument);var a,s=!r||r.includeLowers!==!1,f=r&&r.includeUppers===!0,l=hn;try{a=e.reduce(i,[]),a.sort(o)}catch(h){return n(this,Pn)}var d=0,p=f?function(n){return hn(n,a[d][1])>0}:function(n){return hn(n,a[d][1])>=0},v=s?function(n){return pn(n,a[d][0])>0}:function(n){return pn(n,a[d][0])>=0},y=p,m=new c.collClass(this,function(){return jn.bound(a[0][0],a[a.length-1][1],!s,!f)});return m._ondirectionchange=function(n){"next"===n?(y=p,l=hn):(y=v,l=pn),a.sort(o)},m._addAlgorithm(function(n,t,e){for(var r=n.key;y(r);)if(++d,d===a.length)return t(e),!1;return u(r)?!0:0===sn(r,a[d][1])||0===sn(r,a[d][0])?!1:(t(function(){l===hn?n["continue"](a[d][0]):n["continue"](a[d][1])}),!1)}),m},startsWithAnyOf:function(e){var i=r(arguments);return i.every(function(n){return"string"==typeof n})?0===i.length?t(this):this.inAnyRange(i.map(function(n){return[n,n+_n]})):n(this,"startsWithAnyOf() only works with strings")}}}),n(W.prototype,function(){function n(n,t){n.filter=mn(n.filter,t)}function t(n,t){n.isMatch=mn(n.isMatch,t)}function e(n,t){if(n.isPrimKey)return t;var e=n.table.schema.idxByName[n.index];if(!e)throw new dn.Schema("KeyPath "+n.index+" on object store "+t.name+" is not indexed");return n.isPrimKey?t:t.index(e.name)}function r(n,t){return e(n,t)[n.op](n.range||null,n.dir+n.unique)}function i(n,t,e,i,o){n.or?!function(){function u(){2===++f&&e()}function c(n,e,r){if(!a||a(e,r,u,i)){var o=e.primaryKey.toString();s.hasOwnProperty(o)||(s[o]=!0,t(n,e,r))}}var a=n.filter,s={},f=0;n.or._iterate(c,u,i,o),cn(r(n,o),n.algorithm,c,u,i,n.table.hook.reading.fire)}():cn(r(n,o),mn(n.algorithm,n.filter),t,e,i,n.table.hook.reading.fire)}function o(n){return n.table.schema.instanceTemplate}return{_read:function(n,t){var e=this._ctx;return e.error?e.table._trans(null,function(n,t){t(e.error)}):e.table._idbstore(Wn,n).then(t)},_write:function(n){var t=this._ctx;return t.error?t.table._trans(null,function(n,e){e(t.error)}):t.table._idbstore(Vn,n,"locked")},_addAlgorithm:function(n){var t=this._ctx;t.algorithm=mn(t.algorithm,n)},_iterate:function(n,t,e,r){return i(this._ctx,n,t,e,r)},each:function(n){var t=this._ctx;return kn&&n(o(t)),this._read(function(e,r,o){i(t,n,e,r,o)})},count:function(n){if(kn)return K.resolve(0).then(n);var t=this,r=this._ctx;if(r.filter||r.algorithm||r.or){var o=0;return this._read(function(n,t,e){i(r,function(){return++o,!1},function(){n(o)},t,e)},n)}return this._read(function(n,i,o){var u=e(r,o),c=r.range?u.count(r.range):u.count();c.onerror=G(i,["calling","count()","on",t.name]),c.onsuccess=function(t){n(Math.min(t.target.result,Math.max(0,r.limit-r.offset)))}},n)},sortBy:function(n,t){function e(n,t){return t?e(n[i[t]],t-1):n[o]}function r(n,t){var r=e(n,u),i=e(t,u);return i>r?-c:r>i?c:0}var i=n.split(".").reverse(),o=i[0],u=i.length-1,c="next"===this._ctx.dir?1:-1;return this.toArray(function(n){return n.sort(r)}).then(t)},toArray:function(n){var t=this._ctx;return this._read(function(n,e,r){kn&&n([o(t)]);var u=[];i(t,function(n){u.push(n)},function(){n(u)},e,r)},n)},offset:function(t){var e=this._ctx;return 0>=t?this:(e.offset+=t,e.or||e.algorithm||e.filter?n(e,function(n,e,r){return--t<0}):n(e,function(n,e,r){return 0===t?!0:1===t?(--t,!1):(e(function(){n.advance(t),t=0}),!1)}),this)},limit:function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),n(this._ctx,function(n,e,r){return--t<=0&&e(r),t>=0}),this},until:function(t,e){var r=this._ctx;return kn&&t(o(r)),n(this._ctx,function(n,r,i){return t(n.value)?(r(i),e):!0}),this},first:function(n){return this.limit(1).toArray(function(n){return n[0]}).then(n)},last:function(n){return this.reverse().first(n)},and:function(e){return kn&&e(o(this._ctx)),n(this._ctx,function(n){return e(n.value)}),t(this._ctx,e),this},or:function(n){return new U(this._ctx.table,n,this)},reverse:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},desc:function(){return this.reverse()},eachKey:function(n){var t=this._ctx;return kn&&n(s(o(this._ctx),this._ctx.index?this._ctx.table.schema.idxByName[this._ctx.index].keyPath:this._ctx.table.schema.primKey.keyPath)),t.isPrimKey||(t.op="openKeyCursor"),this.each(function(t,e){n(e.key,e)})},eachUniqueKey:function(n){return this._ctx.unique="unique",this.eachKey(n)},keys:function(n){var t=this._ctx;t.isPrimKey||(t.op="openKeyCursor");var e=[];return kn?new K(this.eachKey.bind(this)).then(function(n){return[n]}).then(n):this.each(function(n,t){e.push(t.key)}).then(function(){return e}).then(n)},uniqueKeys:function(n){return this._ctx.unique="unique",this.keys(n)},firstKey:function(n){return this.limit(1).keys(function(n){return n[0]}).then(n)},lastKey:function(n){return this.reverse().firstKey(n)},distinct:function(){var t={};return n(this._ctx,function(n){var e=n.primaryKey.toString(),r=t.hasOwnProperty(e);return t[e]=!0,!r}),this}}}),t(V).from(W).extend({modify:function(t){var e=this,r=this._ctx,i=r.table.hook,o=i.updating.fire,u=i.deleting.fire;return kn&&"function"==typeof t&&t.call({value:r.table.schema.instanceTemplate},r.table.schema.instanceTemplate),this._write(function(i,a,l,y){function m(n,t,e){function i(n){return E.push(n),C.push(o.primKey),o.onerror&&K.newPSD(function(){K.PSD.trans=y,o.onerror(n)}),g(),!0}I=t.primaryKey;var o={primKey:t.primaryKey,value:n,onsuccess:null,onerror:null};if(w.call(o,n,o)!==!1){var u=!o.hasOwnProperty("value");++S,c(function(){var e=u?t["delete"]():t.update(o.value);e.onerror=G(i,u?["deleting",n,"from",r.table.name]:["modifying",n,"on",r.table.name]),e.onsuccess=function(n){o.onsuccess&&K.newPSD(function(){K.PSD.trans=y,o.onsuccess(o.value)}),++D,g()}},i)}else o.onsuccess&&o.onsuccess(o.value)}function b(n){return n&&(E.push(n),C.push(I)),a(new O("Error modifying one or more objects",E,D,C))}function g(){k&&D+E.length===S&&(E.length>0?b():i(D))}var w;if("function"==typeof t)w=o===v&&u===v?t:function(n){var e=d(n);if(t.call(this,n,this)===!1)return!1;if(this.hasOwnProperty("value")){var r=p(e,this.value),i=o.call(this,r,this.primKey,e,y);i&&(n=this.value,en(i).forEach(function(t){f(n,t,i[t])}))}else u.call(this,this.primKey,n,y)};else if(o===v){var _=en(t),x=_.length;w=function(n){for(var e=!1,r=0;x>r;++r){var i=_[r],o=t[i];s(n,i)!==o&&(f(n,i,o),e=!0)}return e}}else{var P=t;t=h(P),w=function(e){var r=!1,i=o.call(this,t,this.primKey,d(e),y);return i&&n(t,i),en(t).forEach(function(n){var i=t[n];s(e,n)!==i&&(f(e,n,i),r=!0)}),i&&(t=h(P)),r}}var S=0,D=0,k=!1,E=[],C=[],I=null;e._iterate(m,function(){k=!0,g()},b,l)})},"delete":function(){return this.modify(function(){delete this.value})}}),n(this,{Collection:W,Table:R,Transaction:q,Version:b,WhereClause:U,WriteableCollection:V,WriteableTable:M}),l(),Cn.forEach(function(n){n(Ln)})}function z(n,t,e){return function(){var r=K.PSD;K.PSD=e;try{n.apply(this,arguments)}catch(i){t(i)}finally{K.PSD=r}}}function J(n){if("function"==typeof n)return new n;if(rn(n))return[J(n[0])];if(n&&"object"==typeof n){var t={};return H(t,n),t}return n}function H(n,t){return en(t).forEach(function(e){var r=J(t[e]);n[e]=r}),n}function G(n,t){return function(e){var r=e&&e.target.error||new Error("");if(t){var i=" occurred when "+t.map(function(n){switch(typeof n){case"function":return n();case"string":return n;default:return JSON.stringify(n)}}).join(" ");r.message&&r.message!=r.name&&(i+=". "+r.message),r.name?r=C(r,r.name+i):r+=i}return n(r),e&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()),!1}}function Y(n){n.preventDefault()}function Q(n){var t,e=L.dependencies.localStorage;if(!e)return n([]);try{t=JSON.parse(e.getItem("Dexie.DatabaseNames")||"[]")}catch(r){t=[]}n(t)&&e.setItem("Dexie.DatabaseNames",JSON.stringify(t))}function X(n){function t(n){return function(t){var r=n(t),i=r.value;return r.done?i:i&&"function"==typeof i.then?i.then(o,u):Array.isArray(i)?e(i,0):o(i)}}function e(n,t){if(t===n.length)return o(n);var r=n[t];return r.constructor&&"function"==typeof r.constructor.all?r.constructor.all(n).then(o,u):e(n,t+1)}var r=function(t){return n.next(t)},i=function(t){return n["throw"](t)},o=t(r),u=t(i);return t(r)()}function Z(n,t,e,r,i,o,u){this.name=n,this.keyPath=t,this.unique=e,this.multi=r,this.auto=i,this.compound=o,this.dotted=u;var c="string"==typeof t?t:t&&"["+[].join.call(t,"+")+"]";this.src=(e?"&":"")+(r?"*":"")+(i?"++":"")+c}function $(n,t,e,r){this.name=n,this.primKey=t||new Z,this.indexes=e||[new Z],this.instanceTemplate=r,this.mappedClass=null,this.idxByName=e.reduce(function(n,t){return n[t.name]=t,n},{})}function nn(n){return 1===n.length?n[0]:n}function tn(n){var t=n&&(n.getDatabaseNames||n.webkitGetDatabaseNames);return t&&t.bind(n)}var en=Object.keys,rn=Array.isArray,on="undefined"!=typeof self?self:"undefined"!=typeof window?window:global,un=[].slice,cn=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed"],an=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],sn=cn.concat(an),fn={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed"};t(D).from(Error),t(O).from(D),t(E).from(D);var ln=sn.reduce(function(n,t){return n[t]=t+"Error",n},{}),hn=D,dn=sn.reduce(function(n,e){function r(n,t){this.name=i,"string"==typeof n?(this.message=n,this.inner=t||null):"object"==typeof n?(this.message=n.name+" "+n.message,this.inner=n):(this.message=fn[e],this.inner=null)}var i=e+"Error";return t(r).from(hn),n[e]=r,n},{});dn.Syntax=SyntaxError,dn.Type=TypeError,dn.Range=RangeError;var pn=an.reduce(function(n,t){return n[t+"Error"]=dn[t],n},{}),vn=sn.reduce(function(n,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(n[t+"Error"]=dn[t]),n},{});vn.ModifyError=O,vn.DexieError=D,vn.BulkError=E;var yn=on.setImmediate||function(n){var t=e(arguments,1);setTimeout(function(){n.apply(on,t)},0)};i(function(){yn=mn=j=function(n){var t=arguments;setTimeout(function(){n.apply(on,e(t,1))},0)}});var mn=yn,bn=!0,gn=[],wn=[];K.all=function(){var n=e(1===arguments.length&&rn(arguments[0])?arguments[0]:arguments);return new K(function(t,e){function r(o,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var c=u.then;if("function"==typeof c)return void c.call(u,function(n){r(o,n)},e)}n[o]=u,0===--i&&t(n)}catch(a){e(a)}}if(0===n.length)return t([]);for(var i=n.length,o=0;o<n.length;o++)r(o,n[o])})},K.prototype.then=function(n,t){var e=this,r=new K(function(r,i){null===e._state?B(e,new U(n,t,r,i)):mn(B,e,new U(n,t,r,i))});return r._PSD=this._PSD,r.onuncatched=this.onuncatched,r._parent=this,r},K.prototype._then=function(n,t){B(this,new U(n,t,v,v))},K.prototype["catch"]=function(n){if(1===arguments.length)return this.then(null,n);var t=arguments[0],e=arguments[1];return"function"==typeof t?this.then(null,function(n){return n instanceof t?e(n):K.reject(n)}):this.then(null,function(n){return n&&n.name===t?e(n):K.reject(n)})},K.prototype["finally"]=function(n){return this.then(function(t){return n(),t},function(t){return n(),K.reject(t)})},K.prototype.onuncatched=null,K.resolve=function(n){if(n&&"function"==typeof n.then)return n;var t=new K(function(){});return t._state=!0,t._value=n,t},K.reject=function(n){var t=new K(function(){});return t._state=!1,t._value=n,t},K.race=function(n){return new K(function(t,e){n.map(function(n){n.then(t,e)})})},K.PSD=null,K.newPSD=function(n){var t=K.PSD;K.PSD=t?Object.create(t):{};try{return n()}finally{K.PSD=t}},K._rootExec=N,K._tickFinalize=function(n){if(bn)throw new Error("Not in a virtual tick");wn.push(n)},K.on=T(null,{error:[function(n,t){return t},V]});var _n=String.fromCharCode(65535),xn=function(){try{return IDBKeyRange.only([[]]),[[]]}catch(n){return _n}}(),Pn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Sn="String expected.",Dn=function(){},kn=!1;L["delete"]=function(n){var t=new L(n),e=t["delete"]();return e.onblocked=function(n){return t.on("blocked",n),this},e},L.exists=function(n){return new L(n).open().then(function(n){return n.close(),!0})["catch"](L.NoSuchDatabaseError,function(){return!1})},L.getDatabaseNames=function(n){return new K(function(n,t){var r=tn(indexedDB);if(r){var i=r();i.onsuccess=function(t){n(e(t.target.result,0))},i.onerror=G(t)}else Q(function(t){return n(t),!1})}).then(n)},L.defineClass=function(t){function e(e){e?n(this,e):kn&&H(this,t)}return e},L.applyStructure=H,L.ignoreTransaction=function(n){return K.newPSD(function(){return K.PSD.trans=null,n()})},L.vip=function(n){return K.newPSD(function(){return K.PSD.letThrough=!0,n()})},L.async=function(n){return function(){try{var t=X(n.apply(this,arguments));return t&&"function"==typeof t.then?t:L.Promise.resolve(t)}catch(e){return L.Promise.reject(e)}}},L.spawn=function(n,t,e){try{var r=X(n.apply(e,t||[]));return r&&"function"==typeof r.then?r:L.Promise.resolve(r)}catch(i){return L.Promise.reject(i)}},Object.defineProperty(L,"currentTransaction",{get:function(){return K.PSD&&K.PSD.trans||null}}),L.Promise=K,L.derive=t,L.extend=n,L.override=r,L.Events=L.events=T,L.getByKeyPath=s,L.setByKeyPath=f,L.delByKeyPath=l,L.shallowClone=h,L.deepClone=d,L.addons=[],L.fakeAutoComplete=Dn,L.asap=u,L.maxKey=xn,n(L,vn),L.MultiModifyError=L.ModifyError,L.errnames=ln,L.IndexSpec=Z,L.TableSchema=$;var On=on.idbModules&&on.idbModules.shimIndexedDB?on.idbModules:{};return L.dependencies={indexedDB:On.shimIndexedDB||on.indexedDB||on.mozIndexedDB||on.webkitIndexedDB||on.msIndexedDB,IDBKeyRange:On.IDBKeyRange||on.IDBKeyRange||on.webkitIDBKeyRange},c(function(){L.dependencies.localStorage=null!=("undefined"!=typeof chrome&&null!==chrome?chrome.storage:void 0)?null:on.localStorage}),L.semVer="1.3.5-beta",L.version=L.semVer.split(".").map(function(n){return parseInt(n)}).reduce(function(n,t,e){return n+t/Math.pow(10,2*e)}),i(function(){L.fakeAutoComplete=Dn=i,L.fake=kn=!0}),L["default"]=L,L});
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Dexie=t()}(this,function(){"use strict";function n(n,t){return"object"!=typeof t&&(t=t()),en(t).forEach(function(e){n[e]=t[e]}),n}function t(t){return{from:function(e){return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,{extend:function(r){n(t.prototype,"object"!=typeof r?r(e.prototype):r)}}}}}function e(n,t,e){return un.call(n,t,e)}function r(n,t){return t(n)}function i(n){var t=setTimeout(n,1e3);clearTimeout(t)}function o(n){if(!n)throw new exceptions.Internal("Assertion failed")}function u(n){on.setImmediate?setImmediate(n):setTimeout(n,0)}function c(n,t){try{n()}catch(e){t&&t(e)}}function a(n){try{throw n}catch(t){return K.reject(n)}}function s(n,t){if(n.hasOwnProperty(t))return n[t];if(!t)return n;if("string"!=typeof t){for(var e=[],r=0,i=t.length;i>r;++r){var o=s(n,t[r]);e.push(o)}return e}var u=t.indexOf(".");if(-1!==u){var c=n[t.substr(0,u)];return void 0===c?void 0:s(c,t.substr(u+1))}}function f(n,t,e){if(n&&void 0!==t&&!("isFrozen"in Object&&Object.isFrozen(n)))if("string"!=typeof t&&"length"in t){o("string"!=typeof e&&"length"in e);for(var r=0,i=t.length;i>r;++r)f(n,t[r],e[r])}else{var u=t.indexOf(".");if(-1!==u){var c=t.substr(0,u),a=t.substr(u+1);if(""===a)void 0===e?delete n[c]:n[c]=e;else{var s=n[c];s||(s=n[c]={}),f(s,a,e)}}else void 0===e?delete n[t]:n[t]=e}}function l(n,t){"string"==typeof t?f(n,t,void 0):"length"in t&&[].map.call(t,function(t){f(n,t,void 0)})}function h(n){var t={};for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}function d(n){if(!n||"object"!=typeof n)return n;var t;if(rn(n)){t=[];for(var e=0,r=n.length;r>e;++e)t.push(d(n[e]))}else if(n instanceof Date)t=new Date,t.setTime(n.getTime());else{t=n.constructor?Object.create(n.constructor.prototype):{};for(var i in n)n.hasOwnProperty(i)&&(t[i]=d(n[i]))}return t}function p(n,t){var e={};for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)?n[r]!==t[r]&&JSON.stringify(n[r])!=JSON.stringify(t[r])&&(e[r]=t[r]):e[r]=void 0);for(var r in t)t.hasOwnProperty(r)&&!n.hasOwnProperty(r)&&(e[r]=t[r]);return e}function v(){}function y(n){return n}function m(n,t){return n===y?t:function(e){return t(n(e))}}function g(n,t){return function(){n.apply(this,arguments),t.apply(this,arguments)}}function b(n,t){return n===v?t:function(){var e=n.apply(this,arguments);void 0!==e&&(arguments[0]=e);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?g(r,this.onsuccess):r),i&&(this.onerror=this.onerror?g(i,this.onerror):i),void 0!==o?o:e}}function w(n,t){return n===v?t:function(){var e=n.apply(this,arguments);void 0!==e&&extend(arguments[0],e);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?g(r,this.onsuccess):r),i&&(this.onerror=this.onerror?g(i,this.onerror):i),void 0===e?void 0===o?void 0:o:void 0===o?e:extend(e,o)}}function _(n,t){return n===v?t:function(){return n.apply(this,arguments)===!1?!1:t.apply(this,arguments)}}function x(n,t){return n===v?t:function(){return t.apply(this,arguments)===!1?!1:n.apply(this,arguments)}}function P(n,t){return n===v?t:function(){n.apply(this,arguments),t.apply(this,arguments)}}function S(n,t){return n===v?t:function(){var e=n.apply(this,arguments);if(e&&"function"==typeof e.then){var r=this,i=arguments;return e.then(function(){return t.apply(r,i)})}return t.apply(this,arguments)}}function D(n,t){this.name=n,this.message=t}function k(n,t){return n+". Errors: "+t.map(function(n){return n.toString()}).filter(function(n,t,e){return e.indexOf(n)===t}).join("\n")}function O(n,t,e,r){this.name="ModifyError",this.failures=t,this.failedKeys=r,this.successCount=e,this.message=k(n,t)}function E(n,t){this.name="BulkError",this.failures=t,this.message=k(n,t)}function C(n,t){var e=n;return n instanceof D||!n.name||!pn[n.name]||(e=new pn[n.name](t||n.message,n),n.stack&&(e.stack=n.stack)),e}function I(n){if(n.stack)return n;try{throw new Error}catch(t){n.stack=t.stack}return n}function T(n,t){function r(n,t,e){if(rn(n))return o(n);if("object"==typeof n)return i(n);t||(t=_),e||(e=v);var r={subscribers:[],fire:e,subscribe:function(n){r.subscribers.push(n),r.fire=t(r.fire,n)},unsubscribe:function(n){r.subscribers=r.subscribers.filter(function(t){return t!==n}),r.fire=r.subscribers.reduce(t,e)}};return a[n]=s[n]=r,r}function i(n){en(n).forEach(function(t){var e=n[t];if(rn(e))r(t,n[t][0],n[t][1]);else{if("asap"!==e)throw new dn.InvalidArgument("Invalid event config");var i=r(t,null,function(){var n=arguments;i.subscribers.forEach(function(t){u(function(){t.apply(on,n)})})});i.subscribe=function(n){-1===i.subscribers.indexOf(n)&&i.subscribers.push(n)},i.unsubscribe=function(n){var t=i.subscribers.indexOf(n);-1!==t&&i.subscribers.splice(t,1)}}})}function o(n){function t(){return e?!1:void(e=!0)}var e=!1;n.forEach(function(n){r(n).subscribe(t)})}var c=arguments,a={},s=function(t,r){if(r){var i=e(arguments,1),o=a[t];return o.subscribe.apply(o,i),n}return"string"==typeof t?a[t]:void 0};s.addEventType=r;for(var f=1,l=c.length;l>f;++f)r(c[f]);return s}function j(n,t){bn.push([n,e(arguments,1)])}function A(){var n=bn;bn=[];for(var t=0,e=n.length;e>t;++t){var r=n[t];r[0].apply(on,r[1])}}function K(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],this._catched=!1;var t=this,e=!0;this._PSD=K.PSD;try{W(this,n,function(n){e?mn(R,t,n):R(t,n)},function(n){return e?(mn(M,t,n),!1):M(t,n)})}finally{e=!1}}function B(n,t){if(null===n._state)return void n._deferreds.push(t);var e=n._state?t.onFulfilled:t.onRejected;if(null===e)return(n._state?t.resolve:t.reject)(n._value);var r,i=gn;gn=!1,mn=j;try{var o=K.PSD;K.PSD=n._PSD,r=e(n._value),n._state||r&&"function"==typeof r.then&&r._state===!1||F(n),t.resolve(r)}catch(u){t.reject(u)}finally{if(K.PSD=o,i){do{for(;bn.length>0;)A();var c=wn.pop();if(c)try{c()}catch(u){}}while(wn.length>0||bn.length>0);mn=yn,gn=!0}}}function N(n){var t=gn;gn=!1,mn=j;try{return n()}finally{if(t){do{for(;bn.length>0;)A();var e=wn.pop();if(e)try{e()}catch(r){}}while(wn.length>0||bn.length>0);mn=yn,gn=!0}}}function F(n){n._catched=!0,n._parent&&!n._parent._catched&&F(n._parent)}function R(n,t){var e=K.PSD;K.PSD=n._PSD;try{if(t===n)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then)return t instanceof K&&null!==t._state?(n._state=t._state,n._value=t._value,void q.call(n)):void W(n,function(n,e){t.then(n,e)},function(t){R(n,t)},function(t){M(n,t)});n._state=!0,n._value=t,q.call(n)}catch(r){M(r)}finally{K.PSD=e}}function M(n,t){var e=K.PSD;if(K.PSD=n._PSD,n._state=!1,n._value=t,q.call(n),!n._catched)try{n.onuncatched?n.onuncatched(n._value):K.on.error.fire(n._value)}catch(r){}return K.PSD=e,n._catched}function q(){for(var n=0,t=this._deferreds.length;t>n;n++)B(this,this._deferreds[n]);this._deferreds=[]}function U(n,t,e,r){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.resolve=e,this.reject=r}function W(n,t,e,r){var i=!1;try{t(function(n){i||(i=!0,e(n))},function(t){return i?n._catched:(i=!0,r(t))})}catch(o){if(i)return;return r(o)}}function V(n){console.error("Uncaught Promise: "+(n.stack||n))}function L(i,o){function l(){Ln.on("versionchange",function(n){Ln.close(),Ln.on("error").fire(new dn.VersionChange)})}function g(n){this._cfg={version:n,storesSource:null,dbschema:{},tables:{},contentUpgrade:null},this.stores({})}function _(n,t,i,o){if(0===n){en(An).forEach(function(n){k(t,n,An[n].primKey,An[n].indexes)});var u=Ln._createTransaction(Vn,Bn,An);u.idbtrans=t,u.idbtrans.onerror=G(i,["populating database"]),u.on("error").subscribe(i),K.newPSD(function(){K.PSD.trans=u;try{Ln.on("populate").fire(u)}catch(n){o.onerror=t.onerror=function(n){n.preventDefault()};try{t.abort()}catch(e){}t.db.close(),i(n)}})}else{var c=[],a=Kn.filter(function(t){return t._cfg.version===n})[0];if(!a)throw new dn.Upgrade("Dexie specification of currently installed DB version is missing");An=Ln._dbSchema=a._cfg.dbschema;var s=!1,f=Kn.filter(function(t){return t._cfg.version>n});f.forEach(function(n){var o=An,u=n._cfg.dbschema;wn(o,t),wn(u,t),An=Ln._dbSchema=u;var a=D(o,u);a.add.forEach(function(n){c.push(function(t,e){k(t,n[0],n[1].primKey,n[1].indexes),e()})}),a.change.forEach(function(n){if(n.recreate)throw new dn.Upgrade("Not yet support for changing primary key");c.push(function(t,e){var r=t.objectStore(n.name);n.add.forEach(function(n){B(r,n)}),n.change.forEach(function(n){r.deleteIndex(n.name),B(r,n)}),n.del.forEach(function(n){r.deleteIndex(n)}),e()})}),n._cfg.contentUpgrade&&c.push(function(t,o){s=!0;var c=Ln._createTransaction(Vn,e(t.db.objectStoreNames),u);c.idbtrans=t;var a=0;c._promise=r(c._promise,function(n){return function(t,e,r){function i(n){return function(){n.apply(this,arguments),0===--a&&o()}}return++a,n.call(this,t,function(n,t,r){arguments[0]=i(n),arguments[1]=i(t),e.apply(this,arguments)},r)}}),t.onerror=G(i,["running upgrader function for version",n._cfg.version]),c.on("error").subscribe(i),n._cfg.contentUpgrade(c),0===a&&o()}),s&&gn()||c.push(function(n,t){A(u,n),t()})});var l=function(){try{c.length?c.shift()(t,l):j(An,t)}catch(n){o.onerror=t.onerror=function(n){n.preventDefault()};try{t.abort()}catch(e){}t.db.close(),i(n)}};l()}}function D(n,t){var e={del:[],add:[],change:[]};for(var r in n)t[r]||e.del.push(r);for(var r in t){var i=n[r],o=t[r];if(i){var u={name:r,def:t[r],recreate:!1,del:[],add:[],change:[]};if(i.primKey.src!==o.primKey.src)u.recreate=!0,e.change.push(u);else{var c=i.indexes.reduce(function(n,t){return n[t.name]=t,n},{}),a=o.indexes.reduce(function(n,t){return n[t.name]=t,n},{});for(var s in c)a[s]||u.del.push(s);for(var s in a){var f=c[s],l=a[s];f?f.src!==l.src&&u.change.push(l):u.add.push(l)}(u.recreate||u.del.length>0||u.add.length>0||u.change.length>0)&&e.change.push(u)}}else e.add.push([r,o])}return e}function k(n,t,e,r){var i=n.db.createObjectStore(t,e.keyPath?{keyPath:e.keyPath,autoIncrement:e.auto}:{autoIncrement:e.auto});return r.forEach(function(n){B(i,n)}),i}function j(n,t){en(n).forEach(function(e){t.db.objectStoreNames.contains(e)||k(t,e,n[e].primKey,n[e].indexes)})}function A(n,t){for(var e=0;e<t.db.objectStoreNames.length;++e){var r=t.db.objectStoreNames[e];null!==n[r]&&void 0!==n[r]||t.db.deleteObjectStore(r)}}function B(n,t){n.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function N(){zn.forEach(function(n){n.resume()})}function F(n,t){throw new dn.InvalidTable("Table "+t[0]+" not part of transaction. Original Scope Function Source: "+L.Promise.PSD.trans.scopeFunc.toString())}function R(n,t,e,r){this.name=n,this.schema=e,this.hook=Nn[n]?Nn[n].hook:T(null,{creating:[b,v],reading:[m,y],updating:[w,v],deleting:[P,v]}),this._tpf=t,this._collClass=r||W}function M(n,t,e,r){R.call(this,n,t,e,r||V)}function q(n,t,e,r){function i(n,t,e,r){return o._promise(n,e,r)}var o=this;this.db=Ln,this.mode=n,this.storeNames=t,this.idbtrans=null,this.on=T(this,["complete","error"],"abort"),this._reculock=0,this._blockedFuncs=[],this._psd=null,this.active=!0,this._dbschema=e,r&&(this.parent=r),this._tpf=i,this.tables=Object.create(Fn);for(var u=t.length-1;-1!==u;--u){var c=t[u],a=Ln._tableFactory(n,e[c],i);this.tables[c]=a,this[c]||(this[c]=a)}}function U(n,t,e){this._ctx={table:n,index:":id"===t?null:t,collClass:n._collClass,or:e}}function W(n,t){var e=null,r=null;if(t)try{e=t()}catch(i){r=I(C(i))}var o=n._ctx;this._ctx={table:o.table,index:o.index,isPrimKey:!o.index||o.table.schema.primKey.keyPath&&o.index===o.table.schema.primKey.name,range:e,op:"openCursor",dir:"next",unique:"",algorithm:null,filter:null,isMatch:null,offset:0,limit:1/0,error:r,or:o.or}}function V(){W.apply(this,arguments)}function J(n,t){return n._cfg.version-t._cfg.version}function on(n,t,e,r,i,o){e.forEach(function(e){var u=Ln._tableFactory(r,i[e],t);n.forEach(function(n){n[e]||(o?Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var n=K.PSD&&K.PSD.trans;return n&&n.db===Ln?n.tables[e]:u}}):n[e]=u)})})}function un(n){n.forEach(function(n){for(var t in n)n[t]instanceof R&&delete n[t]})}function cn(n,t,e,r,i,o){var u=K.PSD;o=o||y,n.onerror||(n.onerror=G(i)),t?n.onsuccess=z(function(u){var c=n.result;if(c){var a=function(){c["continue"]()};t(c,function(n){a=n},r,i)&&e(o(c.value),c,function(n){a=n}),a()}else r()},i,u):n.onsuccess=z(function(t){var i=n.result;if(i){var u=function(){i["continue"]()};e(o(i.value),i,function(n){u=n}),u()}else r()},i,u)}function an(n){var t=[];return n.split(",").forEach(function(n){n=n.trim();var e=n.replace("&","").replace("++","").replace("*",""),r=0!==e.indexOf("[")?e:n.substring(n.indexOf("[")+1,n.indexOf("]")).split("+");t.push(new Z(e,r||null,-1!==n.indexOf("&"),-1!==n.indexOf("*"),-1!==n.indexOf("++"),rn(r),-1!==r.indexOf(".")))}),t}function sn(n,t){return Tn.cmp(n,t)}function fn(n,t){return sn(n,t)<0?n:t}function ln(n,t){return sn(n,t)>0?n:t}function hn(n,t){return Tn.cmp(n,t)}function pn(n,t){return Tn.cmp(t,n)}function vn(n,t){return t>n?-1:n===t?0:1}function yn(n,t){return n>t?-1:n===t?0:1}function mn(n,t){return n?t?function(){return n.apply(this,arguments)&&t.apply(this,arguments)}:n:t}function gn(){return"undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent)}function bn(){if(Ln.verno=Rn.version/10,Ln._dbSchema=An={},Bn=e(Rn.objectStoreNames,0),0!==Bn.length){var n=Rn.transaction(nn(Bn),"readonly");Bn.forEach(function(t){for(var e=n.objectStore(t),r=e.keyPath,i=r&&"string"==typeof r&&-1!==r.indexOf("."),o=new Z(r,r||"",!1,!1,!!e.autoIncrement,r&&"string"!=typeof r,i),u=[],c=0;c<e.indexNames.length;++c){var a=e.index(e.indexNames[c]);r=a.keyPath,i=r&&"string"==typeof r&&-1!==r.indexOf(".");var s=new Z(a.name,r,!!a.unique,!!a.multiEntry,!1,r&&"string"!=typeof r,i);u.push(s)}An[t]=new $(t,o,u,{})}),on([Nn],Ln._transPromiseFactory,en(An),Vn,An)}}function wn(n,t){for(var r=t.db.objectStoreNames,i=0;i<r.length;++i)for(var o=r[i],u=t.objectStore(o),c=0;c<u.indexNames.length;++c){var a=u.indexNames[c],s=u.index(a).keyPath,f="string"==typeof s?s:"["+e(s).join("+")+"]";if(n[o]){var l=n[o].idxByName[f];l&&(l.name=a)}}}var On=L.dependencies,En=n({addons:L.addons,autoOpen:!0,indexedDB:On.indexedDB,IDBKeyRange:On.IDBKeyRange},o||{}),Cn=En.addons,In=En.autoOpen,Tn=En.indexedDB,jn=En.IDBKeyRange,An=this._dbSchema={},Kn=[],Bn=[],Nn={},Fn={},Rn=null,Mn=!0,qn=null,Un=!1,Wn="readonly",Vn="readwrite",Ln=this,zn=[],Jn=!0,Hn=!!tn(Tn);this.version=function(n){if(Rn||Un)throw new dn.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,n);var t=Kn.filter(function(t){return t._cfg.version===n})[0];return t?t:(t=new g(n),Kn.push(t),Kn.sort(J),t)},n(g.prototype,{stores:function(t){this._cfg.storesSource=this._cfg.storesSource?n(this._cfg.storesSource,t):t;var e={};Kn.forEach(function(t){n(e,t._cfg.storesSource)});var r=this._cfg.dbschema={};return this._parseStoresSpec(e,r),An=Ln._dbSchema=r,un([Nn,Ln,Fn]),on([Fn],F,en(r),Vn,r),on([Nn,Ln,this._cfg.tables],Ln._transPromiseFactory,en(r),Vn,r,!0),Bn=en(r),this},upgrade:function(n){var t=this;return Dn(function(){n(Ln._createTransaction(Vn,en(t._cfg.dbschema),t._cfg.dbschema))}),this._cfg.contentUpgrade=n,this},_parseStoresSpec:function(n,t){en(n).forEach(function(e){if(null!==n[e]){var r={},i=an(n[e]),o=i.shift();if(o.multi)throw new dn.Schema("Primary key cannot be multi-valued");o.keyPath&&f(r,o.keyPath,o.auto?0:o.keyPath),i.forEach(function(n){if(n.auto)throw new dn.Schema("Only primary key can be marked as autoIncrement (++)");if(!n.keyPath)throw new dn.Schema("Index must have a name and cannot be an empty string");f(r,n.keyPath,n.compound?n.keyPath.map(function(){return""}):"")}),t[e]=new $(e,o,i,r)}})}}),this._allTables=Nn,this._tableFactory=function(n,t,e){return n===Wn?new R(t.name,e,t,W):new M(t.name,e,t)},this._createTransaction=function(n,t,e,r){return new q(n,t,e,r)},this._transPromiseFactory=function(n,t,e){if(!Mn||K.PSD&&K.PSD.letThrough){var r=Ln._createTransaction(n,t,An);return r._promise(n,function(n,t){r.error(function(n){Ln.on("error").fire(n)}),K.newPSD(function(){K.PSD.trans=r,e(function(t){r.complete(function(){n(t)})},t,r)})})}if(!Un&&!In)return a(new dn.DatabaseClosed);var i=new K(function(r,o){zn.push({resume:function(){var u=Ln._transPromiseFactory(n,t,e);i.onuncatched=u.onuncatched,u.then(r,o)}})});return In&&!Un&&Ln.open()["catch"](v),i},this._whenReady=function(n){if(!kn&&Mn&&(!K.PSD||!K.PSD.letThrough)){if(!Un){if(!In)return a(new dn.DatabaseClosed);Ln.open()["catch"](v)}return new K(function(t,e){zn.push({resume:function(){n(t,e)}})})}return new K(n)},this.verno=0,this.open=function(){return Rn?K.resolve(Ln):Un?new K(function(n,t){return Ln._whenReady(function(){n(Ln)},function(n){t(n)})}):(qn=null,Un=!0,Mn=!0,new K(function(n,t){function e(n){try{r.transaction.abort()}catch(e){}if(Rn)try{Rn.close()}catch(e){}Rn=null,Un=!1,qn=C(n),Mn=!1,t(qn),N()}kn&&n(Ln);var r,o=!1;try{if(Kn.length>0&&(Jn=!1),!Tn)throw new dn.MissingAPI("indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using Safari, make sure to include indexedDB polyfill.");if(r=Jn?Tn.open(i):Tn.open(i,Math.round(10*Ln.verno)),!r)throw new dn.MissingAPI("IndexedDB API not available");r.onerror=G(e,["opening database",i]),r.onblocked=function(n){Ln.on("blocked").fire(n)},r.onupgradeneeded=z(function(n){if(Jn&&!Ln._allowEmptyDB){r.onerror=function(n){n.preventDefault()},r.transaction.abort(),r.result.close();var t=Tn.deleteDatabase(i);t.onsuccess=t.onerror=function(){e(new dn.NoSuchDatabase("Database "+i+" doesnt exist"))}}else{0===n.oldVersion&&(o=!0),r.transaction.onerror=G(e);var u=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;_(u/10,r.transaction,e,r)}},e),r.onsuccess=z(function(t){if(Un=!1,Rn=r.result,Jn)bn();else if(Rn.objectStoreNames.length>0)try{wn(An,Rn.transaction(nn(Rn.objectStoreNames),Wn))}catch(t){}Rn.onversionchange=Ln.on("versionchange").fire,Hn||Q(function(n){return-1===n.indexOf(i)?n.push(i):void 0}),K.newPSD(function(){function t(){Mn=!1,N(),n(Ln)}K.PSD.letThrough=!0;try{var r=Ln.on.ready.fire();r&&"function"==typeof r.then?r.then(t,function(n){Rn.close(),Rn=null,e(n)}):u(t)}catch(i){e(i)}})},e)}catch(c){e(c)}}))},this.close=function(){Rn?(Rn.close(),Rn=null,In=!1,Mn&&N(),Mn=!1,qn=new dn.DatabaseClosed):Un&&Ln.on("ready",function(){return K.reject(new dn.DatabaseClosed)})},this["delete"]=function(){var n=arguments;return new K(function(t,e){function r(){Ln.close();var n=Tn.deleteDatabase(i);n.onsuccess=function(){Hn||Q(function(n){var t=n.indexOf(i);return t>=0?n.splice(t,1):void 0}),t()},n.onerror=G(e,["deleting",i]),n.onblocked=function(){Ln.on("blocked").fire()}}if(n.length>0)throw new dn.InvalidArgument("Arguments not allowed in db.delete()");Un?zn.push({resume:r}):r()})},this.backendDB=function(){return Rn},this.isOpen=function(){return null!==Rn},this.hasFailed=function(){return null!==qn},this.dynamicallyOpened=function(){return Jn},this.name=i,Object.defineProperty(this,"tables",{get:function(){return en(Nn).map(function(n){return Nn[n]})}}),this.on=T(this,"error","populate","blocked",{ready:[S,v],versionchange:[x,v]}),this.on.ready.subscribe=r(this.on.ready.subscribe,function(n){return function(t,e){function r(){return e||Ln.on.ready.unsubscribe(r),t.apply(this,arguments)}n.call(this,r),Ln.isOpen()&&(Mn?zn.push({resume:r}):r())}}),Dn(function(){Ln.on("populate").fire(Ln._createTransaction(Vn,Bn,An)),Ln.on("error").fire(new Error)}),this.transaction=function(n,t,i){function o(t,e){var o=null,a=!0;try{if(f)throw f;o=Ln._createTransaction(n,l,An,c);var s=l.map(function(n){return o.tables[n]});s.push(o);var h,d=0;K.newPSD(function(){K.PSD.trans=o,o.scopeFunc=i,c&&(o.idbtrans=c.idbtrans,o._promise=r(o._promise,function(n){return function(t,e,r){function i(n){return function(t){var e;return K._rootExec(function(){e=n(t),K._tickFinalize(function(){0===--d&&o.active&&(o.active=!1,o.on.complete.fire())})}),e}}return++d,n.call(this,t,function(n,t,r){return e(i(n),i(t),r)},r)}})),o.complete(function(){t(h)}),o.error(function(n){function t(){var t=e(n);c||t||Ln.on.error.fire(n)}o.idbtrans&&(o.idbtrans.onerror=Y);try{o.abort()}catch(r){}c&&(c.active=!1,c.on.error.fire(n)),a?u(t):t()}),K._rootExec(function(){h=i.apply(o,s),h&&"function"==typeof h.next&&"function"==typeof h["throw"]&&(h=X(h))})}),(!o.idbtrans||c&&0===d)&&o._nop()}catch(p){o&&o.idbtrans&&(o.idbtrans.onerror=Y),o&&o.abort(),c&&c.on.error.fire(p),u(function(){e(p)||Ln.on("error").fire(p)})}a=!1}t=e(arguments,1,arguments.length-1),i=arguments[arguments.length-1];var c=K.PSD&&K.PSD.trans;c&&c.db===Ln&&-1===n.indexOf("!")||(c=null);var a=-1!==n.indexOf("?");n=n.replace("!","").replace("?","");var s=rn(t[0])?t.reduce(function(n,t){return n.concat(t)}):t,f=null,l=s.map(function(n){return"string"==typeof n?n:(n instanceof R||(f=f||new TypeError("Invalid type. Arguments following mode must be instances of Table or String")),n.name)});return"r"==n||n==Wn?n=Wn:"rw"==n||n==Vn?n=Vn:f=new dn.InvalidArgument("Invalid transaction mode: "+n),c&&(f||(c&&c.mode===Wn&&n===Vn&&(a?c=null:f=f||new dn.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY")),c&&l.forEach(function(n){c.tables.hasOwnProperty(n)||(a?c=null:f=f||new dn.SubTransaction("Table "+n+" not included in parent transaction. Parent Transaction function: "+c.scopeFunc.toString()))}))),c?c._promise(n,o,"lock"):Ln._whenReady(o)},this.table=function(n){if(kn&&Jn)return new M(n);if(!Nn.hasOwnProperty(n))throw new dn.InvalidTable("Table "+n+" does not exist");return Nn[n]},n(R.prototype,function(){function n(){throw new dn.ReadOnly("Current Transaction is READONLY")}return{_trans:function(n,t,e){return this._tpf(n,[this.name],t,e)},_idbstore:function(n,t,e){if(kn)return new K(t);var r=this;return this._tpf(n,[this.name],function(n,e,i){t(n,e,i.idbtrans.objectStore(r.name),i)},e)},get:function(n,t){var e=this;return this._idbstore(Wn,function(t,r,i){kn&&t(e.schema.instanceTemplate);var o=i.get(n);o.onerror=G(r,["getting",n,"from",e.name]),o.onsuccess=function(){t(e.hook.reading.fire(o.result))}}).then(t)},where:function(n){return new U(this,n)},count:function(n){return this.toCollection().count(n)},offset:function(n){return this.toCollection().offset(n)},limit:function(n){return this.toCollection().limit(n)},reverse:function(){return this.toCollection().reverse()},filter:function(n){return this.toCollection().and(n)},each:function(n){return this.toCollection().each(n)},toArray:function(n){return this.toCollection().toArray(n)},orderBy:function(n){return new this._collClass(new U(this,n))},toCollection:function(){return new this._collClass(new U(this))},mapToClass:function(n,t){this.schema.mappedClass=n;var e=Object.create(n.prototype);t&&H(e,t),this.schema.instanceTemplate=e;var r=function(t){if(!t)return t;var e=Object.create(n.prototype);for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=r,this.hook("reading",r),n},defineClass:function(n){return this.mapToClass(L.defineClass(n),n)},add:n,put:n,"delete":n,clear:n,update:n}}),t(M).from(R).extend(function(){function n(n,t,e,r){return function(i){i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),n.push(i.target.error),e&&e.onerror&&K.newPSD(function(){K.PSD.trans=r,e.onerror(i.target.error)}),t&&t()}}function t(n,t,e){return t?function(r){t.onsuccess&&K.newPSD(function(){K.PSD.trans=e,t.onsuccess(r.target.result)}),n&&n(r.target.result)}:function(t){n(t.target.result)}}return{bulkAdd:function(e){var r=this,i=this.hook.creating.fire;return this._idbstore(Vn,function(o,u,c,a){function l(n){0===m.length?o(n):u(new E(r.name+".bulkAdd(): "+m.length+" of "+g+" operations failed",m))}if(!c.keyPath&&!r.schema.primKey.auto)throw new dn.Unsupported("bulkAdd() only support inbound keys");if(0===e.length)return o();var h,p,y,m=[],g=e.length;if(i!==v){var b=c.keyPath,w={onerror:null,onsuccess:null};p=n(m,null,w,a),y=t(null,w,a);for(var _=0,x=e.length;x>_;++_){var P=e[_],S=s(P,b),D=i.call(w,S,P,a);void 0===S&&void 0!==D&&(P=d(P),f(P,b,D)),h=c.add(P),x-1>_&&(h.onerror=p,w.onsuccess&&(h.onsuccess=y),w.onerror=null,w.onsuccess=null)}h.onerror=n(m,l,w,a),h.onsuccess=t(l,w,a)}else{p=n(m);for(var _=0,x=e.length;x>_;++_)h=c.add(e[_]),h.onerror=p;h.onerror=n(m,l),h.onsuccess=t(l)}})},add:function(n,t){var e=this,r=this.hook.creating.fire;return this._idbstore(Vn,function(i,o,u,c){var a={onsuccess:null,onerror:null};if(r!==v){var l=void 0!==t?t:u.keyPath?s(n,u.keyPath):void 0,h=r.call(a,l,n,c);void 0===l&&void 0!==h&&(u.keyPath?f(n,u.keyPath,h):t=h)}var d=void 0!==t?u.add(n,t):u.add(n);d.onerror=G(function(n){return a.onerror&&K.newPSD(function(){K.PSD.trans=c,a.onerror(n)}),o(n)},["adding",n,"into",e.name]),d.onsuccess=function(t){var e=u.keyPath;e&&f(n,e,t.target.result),a.onsuccess&&K.newPSD(function(){K.PSD.trans=c,a.onsuccess(t.target.result)}),i(d.result)}})},put:function(n,t){var e=this,r=this.hook.creating.fire,i=this.hook.updating.fire;return r!==v||i!==v?this._trans(Vn,function(r,i,o){var u=void 0!==t?t:e.schema.primKey.keyPath&&s(n,e.schema.primKey.keyPath);void 0===u?o.tables[e.name].add(n).then(r,i):(o._lock(),n=d(n),o.tables[e.name].where(":id").equals(u).modify(function(t){this.value=n}).then(function(r){return 0===r?o.tables[e.name].add(n,t):u})["finally"](function(){o._unlock()}).then(r,i))}):this._idbstore(Vn,function(r,i,o){var u=void 0!==t?o.put(n,t):o.put(n);u.onerror=G(i,["putting",n,"into",e.name]),u.onsuccess=function(t){var e=o.keyPath;e&&f(n,e,t.target.result),r(u.result)}})},"delete":function(n){return this.hook.deleting.subscribers.length?this.where(":id").equals(n)["delete"]():this._idbstore(Vn,function(t,e,r){var i=r["delete"](n);i.onerror=G(e,["deleting",n,"from",r.name]),i.onsuccess=function(n){t(i.result)}})},clear:function(){return this.hook.deleting.subscribers.length?this.toCollection()["delete"]():this._idbstore(Vn,function(n,t,e){var r=e.clear();r.onerror=G(t,["clearing",e.name]),r.onsuccess=function(t){n(r.result)}})},update:function(n,t){if("object"!=typeof t||rn(t))throw new dn.InvalidArgument("db.update(keyOrObject, modifications). modifications must be an object.");if("object"!=typeof n||rn(n))return this.where(":id").equals(n).modify(t);en(t).forEach(function(e){f(n,e,t[e])});var e=s(n,this.schema.primKey.keyPath);return void 0===e&&K.reject(new dn.InvalidArgument("Given object does not contain its primary key")),this.where(":id").equals(e).modify(t)}}}),n(q.prototype,{_lock:function(){return++this._reculock,1===this._reculock&&K.PSD&&(K.PSD.lockOwnerFor=this),this},_unlock:function(){if(0===--this._reculock)for(K.PSD&&(K.PSD.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var n=this._blockedFuncs.shift();try{n()}catch(t){}}return this},_locked:function(){return this._reculock&&(!K.PSD||K.PSD.lockOwnerFor!==this)},_nop:function(n){this.tables[this.storeNames[0]].get(0).then(n)},_promise:function(n,t,e){var r=this;return K.newPSD(function(){var i;return r._locked()?i=new K(function(i,o){r._blockedFuncs.push(function(){r._promise(n,t,e).then(i,o)})}):(i=r.active?new K(function(i,o){if(!r.idbtrans&&n){if(!Rn)throw!qn||["DatabaseClosedError","MissingAPIError"].indexOf(qn.name)>=0?qn:new dn.OpenFailed(qn);var c=r.idbtrans=Rn.transaction(nn(r.storeNames),r.mode);c.onerror=function(n){r.on("error").fire(n&&n.target.error),n.preventDefault(),r.abort()},c.onabort=function(n){u(function(){r.on("error").fire(new dn.Abort("Transaction aborted for unknown reason"))}),r.active=!1,r.on("abort").fire(n)},c.oncomplete=function(n){r.active=!1,r.on("complete").fire(n)}}e&&r._lock();try{t(i,o,r)}catch(a){!function(){var n=I(C(a));L.ignoreTransaction(function(){r.on("error").fire(n)}),r.abort(),o(n)}()}}):K.reject(I(new dn.TransactionInactive("Transaction is inactive. Original Scope Function Source: "+r.scopeFunc.toString()))),r.active&&e&&i["finally"](function(){r._unlock()})),i.onuncatched=function(n){L.ignoreTransaction(function(){r.on("error").fire(n)}),r.abort()},i})},complete:function(n){return this.on("complete",n)},error:function(n){return this.on("error",n)},abort:function(){if(this.idbtrans&&this.active)try{this.active=!1,this.idbtrans.abort(),this.on.error.fire(new dn.Abort("Transaction Aborted"))}catch(n){}},table:function(n){if(!this.tables.hasOwnProperty(n))throw new dn.InvalidTable("Table "+n+" not in transaction");return this.tables[n]}}),n(U.prototype,function(){function n(n,t,e){var r=n instanceof U?new n._ctx.collClass(n):n;try{throw e?new e(t):new TypeError(t)}catch(i){r._ctx.error=i}return r}function t(n){return new n._ctx.collClass(n,function(){return jn.only("")}).limit(0)}function r(n){return e(1===n.length&&rn(n[0])?n[0]:n)}function i(n){return"next"===n?function(n){return n.toUpperCase()}:function(n){return n.toLowerCase()}}function o(n){return"next"===n?function(n){return n.toLowerCase()}:function(n){return n.toUpperCase()}}function u(n,t,e,r,i,o){for(var u=Math.min(n.length,r.length),c=-1,a=0;u>a;++a){var s=t[a];if(s!==r[a])return i(n[a],e[a])<0?n.substr(0,a)+e[a]+e.substr(a+1):i(n[a],r[a])<0?n.substr(0,a)+r[a]+e.substr(a+1):c>=0?n.substr(0,c)+t[c]+e.substr(c+1):null;i(n[a],s)<0&&(c=a)}return u<r.length&&"next"===o?n+e.substr(n.length):u<n.length&&"prev"===o?n.substr(0,e.length):0>c?null:n.substr(0,c)+r[c]+e.substr(c+1)}function c(n,t,e,r){function c(n){a=i(n),s=o(n),f="next"===n?vn:yn;var t=e.map(function(n){return{lower:s(n),upper:a(n)}}).sort(function(n,t){return f(n.lower,t.lower)});l=t.map(function(n){return n.upper}),h=t.map(function(n){return n.lower}),d=n,p="next"===n?"":r}var a,s,f,l,h,d,p,v=e.length;c("next");var y=new n._ctx.collClass(n,function(){return jn.bound(l[0],h[v-1]+r)});y._ondirectionchange=function(n){c(n)};var m=0;return y._addAlgorithm(function(n,e,r){var i=n.key;if("string"!=typeof i)return!1;var o=s(i);if(t(o,h,m))return!0;for(var c=null,a=m;v>a;++a){var y=u(i,o,l[a],h[a],f,d);null===y&&null===c?m=a+1:(null===c||f(c,y)>0)&&(c=y)}return e(null!==c?function(){n["continue"](c+p)}:r),!1}),y}return{between:function(e,r,i,o){i=i!==!1,o=o===!0;try{return sn(e,r)>0||0===sn(e,r)&&(i||o)&&(!i||!o)?t(this):new this._ctx.collClass(this,function(){return jn.bound(e,r,!i,!o)})}catch(u){return n(this,Pn)}},equals:function(n){return new this._ctx.collClass(this,function(){return jn.only(n)})},above:function(n){return new this._ctx.collClass(this,function(){return jn.lowerBound(n,!0)})},aboveOrEqual:function(n){return new this._ctx.collClass(this,function(){return jn.lowerBound(n)})},below:function(n){return new this._ctx.collClass(this,function(){return jn.upperBound(n,!0)})},belowOrEqual:function(n){return new this._ctx.collClass(this,function(){return jn.upperBound(n)})},startsWith:function(t){return"string"!=typeof t?n(this,Sn):this.between(t,t+_n,!0,!0)},startsWithIgnoreCase:function(t){return"string"!=typeof t?n(this,Sn):""===t?this.startsWith(t):c(this,function(n,t){return 0===n.indexOf(t[0])},[t],_n)},equalsIgnoreCase:function(t){return"string"!=typeof t?n(this,Sn):c(this,function(n,t){return n===t[0]},[t],"")},anyOfIgnoreCase:function(e){var i=r(arguments);return 0===i.length?t(this):i.every(function(n){return"string"==typeof n})?c(this,function(n,t){return-1!==t.indexOf(n)},i,""):n(this,"anyOfIgnoreCase() only works with strings")},startsWithAnyOfIgnoreCase:function(e){var i=r(arguments);return 0===i.length?t(this):i.every(function(n){return"string"==typeof n})?c(this,function(n,t){return t.some(function(t){return 0===n.indexOf(t)})},i,_n):n(this,"startsWithAnyOfIgnoreCase() only works with strings");
},anyOf:function(e){var i=r(arguments),o=hn;try{i.sort(o)}catch(u){return n(this,Pn)}if(0===i.length)return t(this);var c=new this._ctx.collClass(this,function(){return jn.bound(i[0],i[i.length-1])});c._ondirectionchange=function(n){o="next"===n?hn:pn,i.sort(o)};var a=0;return c._addAlgorithm(function(n,t,e){for(var r=n.key;o(r,i[a])>0;)if(++a,a===i.length)return t(e),!1;return 0===o(r,i[a])?!0:(t(function(){n["continue"](i[a])}),!1)}),c},notEqual:function(n){return this.inAnyRange([[-(1/0),n],[n,xn]],{includeLowers:!1,includeUppers:!1})},noneOf:function(t){var e=r(arguments);if(0===e.length)return new this._ctx.collClass(this);try{e.sort(hn)}catch(i){return n(this,Pn)}var o=e.reduce(function(n,t){return n?n.concat([[n[n.length-1][1],t]]):[[-(1/0),t]]},null);return o.push([e[e.length-1],xn]),this.inAnyRange(o,{includeLowers:!1,includeUppers:!1})},inAnyRange:function(e,r){function i(n,t){for(var e=0,r=n.length;r>e;++e){var i=n[e];if(sn(t[0],i[1])<0&&sn(t[1],i[0])>0){i[0]=fn(i[0],t[0]),i[1]=ln(i[1],t[1]);break}}return e===r&&n.push(t),n}function o(n,t){return l(n[0],t[0])}function u(n){return!p(n)&&!v(n)}var c=this._ctx;if(0===e.length)return t(this);if(!e.every(function(n){return void 0!==n[0]&&void 0!==n[1]&&hn(n[0],n[1])<=0}))return n(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",dn.InvalidArgument);var a,s=!r||r.includeLowers!==!1,f=r&&r.includeUppers===!0,l=hn;try{a=e.reduce(i,[]),a.sort(o)}catch(h){return n(this,Pn)}var d=0,p=f?function(n){return hn(n,a[d][1])>0}:function(n){return hn(n,a[d][1])>=0},v=s?function(n){return pn(n,a[d][0])>0}:function(n){return pn(n,a[d][0])>=0},y=p,m=new c.collClass(this,function(){return jn.bound(a[0][0],a[a.length-1][1],!s,!f)});return m._ondirectionchange=function(n){"next"===n?(y=p,l=hn):(y=v,l=pn),a.sort(o)},m._addAlgorithm(function(n,t,e){for(var r=n.key;y(r);)if(++d,d===a.length)return t(e),!1;return u(r)?!0:0===sn(r,a[d][1])||0===sn(r,a[d][0])?!1:(t(function(){l===hn?n["continue"](a[d][0]):n["continue"](a[d][1])}),!1)}),m},startsWithAnyOf:function(e){var i=r(arguments);return i.every(function(n){return"string"==typeof n})?0===i.length?t(this):this.inAnyRange(i.map(function(n){return[n,n+_n]})):n(this,"startsWithAnyOf() only works with strings")}}}),n(W.prototype,function(){function n(n,t){n.filter=mn(n.filter,t)}function t(n,t){n.isMatch=mn(n.isMatch,t)}function e(n,t){if(n.isPrimKey)return t;var e=n.table.schema.idxByName[n.index];if(!e)throw new dn.Schema("KeyPath "+n.index+" on object store "+t.name+" is not indexed");return t.index(e.name)}function r(n,t){return e(n,t)[n.op](n.range||null,n.dir+n.unique)}function i(n,t,e,i,o){n.or?!function(){function u(){2===++f&&e()}function c(n,e,r){if(!a||a(e,r,u,i)){var o=e.primaryKey.toString();s.hasOwnProperty(o)||(s[o]=!0,t(n,e,r))}}var a=n.filter,s={},f=0;n.or._iterate(c,u,i,o),cn(r(n,o),n.algorithm,c,u,i,n.table.hook.reading.fire)}():cn(r(n,o),mn(n.algorithm,n.filter),t,e,i,n.table.hook.reading.fire)}function o(n){return n.table.schema.instanceTemplate}return{_read:function(n,t){var e=this._ctx;return e.error?e.table._trans(null,function(n,t){t(e.error)}):e.table._idbstore(Wn,n).then(t)},_write:function(n){var t=this._ctx;return t.error?t.table._trans(null,function(n,e){e(t.error)}):t.table._idbstore(Vn,n,"locked")},_addAlgorithm:function(n){var t=this._ctx;t.algorithm=mn(t.algorithm,n)},_iterate:function(n,t,e,r){return i(this._ctx,n,t,e,r)},each:function(n){var t=this._ctx;return kn&&n(o(t)),this._read(function(e,r,o){i(t,n,e,r,o)})},count:function(n){if(kn)return K.resolve(0).then(n);var t=this,r=this._ctx;if(r.filter||r.algorithm||r.or){var o=0;return this._read(function(n,t,e){i(r,function(){return++o,!1},function(){n(o)},t,e)},n)}return this._read(function(n,i,o){var u=e(r,o),c=r.range?u.count(r.range):u.count();c.onerror=G(i,["calling","count()","on",t.name]),c.onsuccess=function(t){n(Math.min(t.target.result,Math.max(0,r.limit-r.offset)))}},n)},sortBy:function(n,t){function e(n,t){return t?e(n[i[t]],t-1):n[o]}function r(n,t){var r=e(n,u),i=e(t,u);return i>r?-c:r>i?c:0}var i=n.split(".").reverse(),o=i[0],u=i.length-1,c="next"===this._ctx.dir?1:-1;return this.toArray(function(n){return n.sort(r)}).then(t)},toArray:function(n){var t=this._ctx;return this._read(function(n,e,r){kn&&n([o(t)]);var u=[];i(t,function(n){u.push(n)},function(){n(u)},e,r)},n)},offset:function(t){var e=this._ctx;return 0>=t?this:(e.offset+=t,e.or||e.algorithm||e.filter?n(e,function(n,e,r){return--t<0}):n(e,function(n,e,r){return 0===t?!0:1===t?(--t,!1):(e(function(){n.advance(t),t=0}),!1)}),this)},limit:function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),n(this._ctx,function(n,e,r){return--t<=0&&e(r),t>=0}),this},until:function(t,e){var r=this._ctx;return kn&&t(o(r)),n(this._ctx,function(n,r,i){return t(n.value)?(r(i),e):!0}),this},first:function(n){return this.limit(1).toArray(function(n){return n[0]}).then(n)},last:function(n){return this.reverse().first(n)},and:function(e){return kn&&e(o(this._ctx)),n(this._ctx,function(n){return e(n.value)}),t(this._ctx,e),this},or:function(n){return new U(this._ctx.table,n,this)},reverse:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},desc:function(){return this.reverse()},eachKey:function(n){var t=this._ctx;return kn&&n(s(o(this._ctx),this._ctx.index?this._ctx.table.schema.idxByName[this._ctx.index].keyPath:this._ctx.table.schema.primKey.keyPath)),t.isPrimKey||(t.op="openKeyCursor"),this.each(function(t,e){n(e.key,e)})},eachUniqueKey:function(n){return this._ctx.unique="unique",this.eachKey(n)},keys:function(n){var t=this._ctx;t.isPrimKey||(t.op="openKeyCursor");var e=[];return kn?new K(this.eachKey.bind(this)).then(function(n){return[n]}).then(n):this.each(function(n,t){e.push(t.key)}).then(function(){return e}).then(n)},uniqueKeys:function(n){return this._ctx.unique="unique",this.keys(n)},firstKey:function(n){return this.limit(1).keys(function(n){return n[0]}).then(n)},lastKey:function(n){return this.reverse().firstKey(n)},distinct:function(){var t={};return n(this._ctx,function(n){var e=n.primaryKey.toString(),r=t.hasOwnProperty(e);return t[e]=!0,!r}),this}}}),t(V).from(W).extend({modify:function(t){var e=this,r=this._ctx,i=r.table.hook,o=i.updating.fire,u=i.deleting.fire;return kn&&"function"==typeof t&&t.call({value:r.table.schema.instanceTemplate},r.table.schema.instanceTemplate),this._write(function(i,a,l,y){function m(n,t,e){function i(n){return E.push(n),C.push(o.primKey),o.onerror&&K.newPSD(function(){K.PSD.trans=y,o.onerror(n)}),b(),!0}I=t.primaryKey;var o={primKey:t.primaryKey,value:n,onsuccess:null,onerror:null};if(w.call(o,n,o)!==!1){var u=!o.hasOwnProperty("value");++S,c(function(){var e=u?t["delete"]():t.update(o.value);e.onerror=G(i,u?["deleting",n,"from",r.table.name]:["modifying",n,"on",r.table.name]),e.onsuccess=function(n){o.onsuccess&&K.newPSD(function(){K.PSD.trans=y,o.onsuccess(o.value)}),++D,b()}},i)}else o.onsuccess&&o.onsuccess(o.value)}function g(n){return n&&(E.push(n),C.push(I)),a(new O("Error modifying one or more objects",E,D,C))}function b(){k&&D+E.length===S&&(E.length>0?g():i(D))}var w;if("function"==typeof t)w=o===v&&u===v?t:function(n){var e=d(n);if(t.call(this,n,this)===!1)return!1;if(this.hasOwnProperty("value")){var r=p(e,this.value),i=o.call(this,r,this.primKey,e,y);i&&(n=this.value,en(i).forEach(function(t){f(n,t,i[t])}))}else u.call(this,this.primKey,n,y)};else if(o===v){var _=en(t),x=_.length;w=function(n){for(var e=!1,r=0;x>r;++r){var i=_[r],o=t[i];s(n,i)!==o&&(f(n,i,o),e=!0)}return e}}else{var P=t;t=h(P),w=function(e){var r=!1,i=o.call(this,t,this.primKey,d(e),y);return i&&n(t,i),en(t).forEach(function(n){var i=t[n];s(e,n)!==i&&(f(e,n,i),r=!0)}),i&&(t=h(P)),r}}var S=0,D=0,k=!1,E=[],C=[],I=null;e._iterate(m,function(){k=!0,b()},g,l)})},"delete":function(){var n=this._ctx,t=n.range;return t&&!n.isPrimKey||n.table.hook.deleting.fire!==v||n.or||n.algorithm||n.filter?this.modify(function(){delete this.value}):this._write(function(e,r,i){var o=G(r,["deleting range from",n.table.name]),u=t?i.count(t):i.count();u.onerror=o,u.onsuccess=function(){var n=u.result;c(function(){var r=t?i["delete"](t):i.clear();r.onerror=o,r.onsuccess=function(){return e(n)}},function(n){return r(C(n))})}})}}),n(this,{Collection:W,Table:R,Transaction:q,Version:g,WhereClause:U,WriteableCollection:V,WriteableTable:M}),l(),Cn.forEach(function(n){n(Ln)})}function z(n,t,e){return function(){var r=K.PSD;K.PSD=e;try{n.apply(this,arguments)}catch(i){t(i)}finally{K.PSD=r}}}function J(n){if("function"==typeof n)return new n;if(rn(n))return[J(n[0])];if(n&&"object"==typeof n){var t={};return H(t,n),t}return n}function H(n,t){return en(t).forEach(function(e){var r=J(t[e]);n[e]=r}),n}function G(n,t){return function(e){var r=e&&e.target.error||new Error("");if(t){var i=" occurred when "+t.map(function(n){switch(typeof n){case"function":return n();case"string":return n;default:return JSON.stringify(n)}}).join(" ");r.message&&r.message!=r.name&&(i+=". "+r.message),r.name?r=C(r,r.name+i):r+=i}return n(r),e&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()),!1}}function Y(n){n.preventDefault()}function Q(n){var t,e=L.dependencies.localStorage;if(!e)return n([]);try{t=JSON.parse(e.getItem("Dexie.DatabaseNames")||"[]")}catch(r){t=[]}n(t)&&e.setItem("Dexie.DatabaseNames",JSON.stringify(t))}function X(n){function t(n){return function(t){var r=n(t),i=r.value;return r.done?i:i&&"function"==typeof i.then?i.then(o,u):Array.isArray(i)?e(i,0):o(i)}}function e(n,t){if(t===n.length)return o(n);var r=n[t];return r.constructor&&"function"==typeof r.constructor.all?r.constructor.all(n).then(o,u):e(n,t+1)}var r=function(t){return n.next(t)},i=function(t){return n["throw"](t)},o=t(r),u=t(i);return t(r)()}function Z(n,t,e,r,i,o,u){this.name=n,this.keyPath=t,this.unique=e,this.multi=r,this.auto=i,this.compound=o,this.dotted=u;var c="string"==typeof t?t:t&&"["+[].join.call(t,"+")+"]";this.src=(e?"&":"")+(r?"*":"")+(i?"++":"")+c}function $(n,t,e,r){this.name=n,this.primKey=t||new Z,this.indexes=e||[new Z],this.instanceTemplate=r,this.mappedClass=null,this.idxByName=e.reduce(function(n,t){return n[t.name]=t,n},{})}function nn(n){return 1===n.length?n[0]:n}function tn(n){var t=n&&(n.getDatabaseNames||n.webkitGetDatabaseNames);return t&&t.bind(n)}var en=Object.keys,rn=Array.isArray,on="undefined"!=typeof self?self:"undefined"!=typeof window?window:global,un=[].slice,cn=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed"],an=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],sn=cn.concat(an),fn={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed"};t(D).from(Error),t(O).from(D),t(E).from(D);var ln=sn.reduce(function(n,t){return n[t]=t+"Error",n},{}),hn=D,dn=sn.reduce(function(n,e){function r(n,t){this.name=i,"string"==typeof n?(this.message=n,this.inner=t||null):"object"==typeof n?(this.message=n.name+" "+n.message,this.inner=n):(this.message=fn[e],this.inner=null)}var i=e+"Error";return t(r).from(hn),n[e]=r,n},{});dn.Syntax=SyntaxError,dn.Type=TypeError,dn.Range=RangeError;var pn=an.reduce(function(n,t){return n[t+"Error"]=dn[t],n},{}),vn=sn.reduce(function(n,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(n[t+"Error"]=dn[t]),n},{});vn.ModifyError=O,vn.DexieError=D,vn.BulkError=E;var yn=on.setImmediate||function(n){var t=e(arguments,1);setTimeout(function(){n.apply(on,t)},0)};i(function(){yn=mn=j=function(n){var t=arguments;setTimeout(function(){n.apply(on,e(t,1))},0)}});var mn=yn,gn=!0,bn=[],wn=[];K.all=function(){var n=e(1===arguments.length&&rn(arguments[0])?arguments[0]:arguments);return new K(function(t,e){function r(o,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var c=u.then;if("function"==typeof c)return void c.call(u,function(n){r(o,n)},e)}n[o]=u,0===--i&&t(n)}catch(a){e(a)}}if(0===n.length)return t([]);for(var i=n.length,o=0;o<n.length;o++)r(o,n[o])})},K.prototype.then=function(n,t){var e=this,r=new K(function(r,i){null===e._state?B(e,new U(n,t,r,i)):mn(B,e,new U(n,t,r,i))});return r._PSD=this._PSD,r.onuncatched=this.onuncatched,r._parent=this,r},K.prototype._then=function(n,t){B(this,new U(n,t,v,v))},K.prototype["catch"]=function(n){if(1===arguments.length)return this.then(null,n);var t=arguments[0],e=arguments[1];return"function"==typeof t?this.then(null,function(n){return n instanceof t?e(n):K.reject(n)}):this.then(null,function(n){return n&&n.name===t?e(n):K.reject(n)})},K.prototype["finally"]=function(n){return this.then(function(t){return n(),t},function(t){return n(),K.reject(t)})},K.prototype.onuncatched=null,K.resolve=function(n){if(n&&"function"==typeof n.then)return n;var t=new K(function(){});return t._state=!0,t._value=n,t},K.reject=function(n){var t=new K(function(){});return t._state=!1,t._value=n,t},K.race=function(n){return new K(function(t,e){n.map(function(n){n.then(t,e)})})},K.PSD=null,K.newPSD=function(n){var t=K.PSD;K.PSD=t?Object.create(t):{};try{return n()}finally{K.PSD=t}},K._rootExec=N,K._tickFinalize=function(n){if(gn)throw new Error("Not in a virtual tick");wn.push(n)},K.on=T(null,{error:[function(n,t){return t},V]});var _n=String.fromCharCode(65535),xn=function(){try{return IDBKeyRange.only([[]]),[[]]}catch(n){return _n}}(),Pn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Sn="String expected.",Dn=function(){},kn=!1;L["delete"]=function(n){var t=new L(n),e=t["delete"]();return e.onblocked=function(n){return t.on("blocked",n),this},e},L.exists=function(n){return new L(n).open().then(function(n){return n.close(),!0})["catch"](L.NoSuchDatabaseError,function(){return!1})},L.getDatabaseNames=function(n){return new K(function(n,t){var r=tn(indexedDB);if(r){var i=r();i.onsuccess=function(t){n(e(t.target.result,0))},i.onerror=G(t)}else Q(function(t){return n(t),!1})}).then(n)},L.defineClass=function(t){function e(e){e?n(this,e):kn&&H(this,t)}return e},L.applyStructure=H,L.ignoreTransaction=function(n){return K.newPSD(function(){return K.PSD.trans=null,n()})},L.vip=function(n){return K.newPSD(function(){return K.PSD.letThrough=!0,n()})},L.async=function(n){return function(){try{var t=X(n.apply(this,arguments));return t&&"function"==typeof t.then?t:L.Promise.resolve(t)}catch(e){return L.Promise.reject(e)}}},L.spawn=function(n,t,e){try{var r=X(n.apply(e,t||[]));return r&&"function"==typeof r.then?r:L.Promise.resolve(r)}catch(i){return L.Promise.reject(i)}},Object.defineProperty(L,"currentTransaction",{get:function(){return K.PSD&&K.PSD.trans||null}}),L.Promise=K,L.derive=t,L.extend=n,L.override=r,L.Events=L.events=T,L.getByKeyPath=s,L.setByKeyPath=f,L.delByKeyPath=l,L.shallowClone=h,L.deepClone=d,L.addons=[],L.fakeAutoComplete=Dn,L.asap=u,L.maxKey=xn,n(L,vn),L.MultiModifyError=L.ModifyError,L.errnames=ln,L.IndexSpec=Z,L.TableSchema=$;var On=on.idbModules&&on.idbModules.shimIndexedDB?on.idbModules:{};return L.dependencies={indexedDB:On.shimIndexedDB||on.indexedDB||on.mozIndexedDB||on.webkitIndexedDB||on.msIndexedDB,IDBKeyRange:On.IDBKeyRange||on.IDBKeyRange||on.webkitIDBKeyRange},c(function(){L.dependencies.localStorage=null!=("undefined"!=typeof chrome&&null!==chrome?chrome.storage:void 0)?null:on.localStorage}),L.semVer="1.3.5-beta.2",L.version=L.semVer.split(".").map(function(n){return parseInt(n)}).reduce(function(n,t,e){return n+t/Math.pow(10,2*e)}),i(function(){L.fakeAutoComplete=Dn=i,L.fake=kn=!0}),L["default"]=L,L});
//# sourceMappingURL=dist/dexie.min.js.map
{
"name": "dexie",
"version": "1.3.5-beta",
"version": "1.3.5-beta.2",
"description": "A Minimalistic Wrapper for IndexedDB",

@@ -5,0 +5,0 @@ "main": "dist/dexie.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc