PageSourceSearch

https://lobe-chat-eight-virid-32.vercel.app/_next/static/chunks/37437-9c0589ce91c921ce.js

js lobe-chat-eight-virid-32.vercel.app collected 2026-10-03 07:15:17 UTC 83,125 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37437],{1272:e=>{function t(e,t,n,r){return Math.round(e/n)+" "+r+(t>=1.5*n?"s":"")}e.exports=function(e,n){n=n||{};var r,i,s,a,o=typeof e;if("string"===o&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return 864e5*n;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*n;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*n;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===o&&isFinite(e)){return n.long?(i=Math.abs(r=e))>=864e5?t(r,i,864e5,"day"):i>=36e5?t(r,i,36e5,"hour"):i>=6e4?t(r,i,6e4,"minute"):i>=1e3?t(r,i,1e3,"second"):r+" ms":(a=Math.abs(s=e))>=864e5?Math.round(s/864e5)+"d":a>=36e5?Math.round(s/36e5)+"h":a>=6e4?Math.round(s/6e4)+"m":a>=1e3?Math.round(s/1e3)+"s":s+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},27138:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(30633),i=n(88506),s=n(37691),a=n(95195),o=n(26329),l=n(75111),u=n(10560),c=n(51390),h=n(68765),d=n(26035);let f=function(e,t,n){var f=(0,l.A)(e),p=f||(0,u.A)(e)||(0,d.A)(e);if(t=(0,a.A)(t,4),null==n){var y=e&&e.constructor;n=p?f?new y:[]:(0,h.A)(e)&&(0,c.A)(y)?(0,i.A)((0,o.A)(e)):{}}return(p?r.A:s.A)(e,function(e,r,i){return t(n,e,r,i)}),n}},28944:(e,t,n)=>{var r=n(87358);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e},t.useColors=function(){let e;return"undefined"!=typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(80849)(t);let{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}
1,30633:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},33210:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(61705),i=n(68765);let s=function(e,t,n){var s=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return(0,i.A)(n)&&(s="leading"in n?!!n.leading:s,a="trailing"in n?!!n.trailing:a),(0,r.A)(e,t,{leading:s,maxWait:t,trailing:a})}},37691:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(29658),i=n(69178);let s=function(e,t){return e&&(0,r.A)(e,t,i.A)}},60262:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(25423);let i=function(){return r.A.Date.now()}},61705:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(68765),i=n(60262),s=n(62366),a=Math.max,o=Math.min;let l=function(e,t,n){var l,u,c,h,d,f,p=0,y=!1,m=!1,g=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(t){var n=l,r=u;return l=u=void 0,p=t,h=e.apply(r,n)}function b(e){var n=e-f,r=e-p;return void 0===f||n>=t||n<0||m&&r>=c}function _(){var e,n,r,s=(0,i.A)();if(b(s))return w(s);d=setTimeout(_,(e=s-f,n=s-p,r=t-e,m?o(r,c-n):r))}function w(e){return(d=void 0,g&&l)?v(e):(l=u=void 0,h)}function C(){var e,n=(0,i.A)(),r=b(n);if(l=arguments,u=this,f=n,r){if(void 0===d)return p=e=f,d=setTimeout(_,t),y?v(e):h;if(m)return clearTimeout(d),d=setTimeout(_,t),v(f)}return void 0===d&&(d=setTimeout(_,t)),h}return t=(0,s.A)(t)||0,(0,r.A)(n)&&(y=!!n.leading,c=(m="maxWait"in n)?a((0,s.A)(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),C.cancel=function(){void 0!==d&&clearTimeout(d),p=0,l=f=u=d=void 0},C.flush=function(){return void 0===d?h:w((0,i.A)())},C}},62366:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=/\s/;let i=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t};var s=/^\s+/,a=n(68765),o=n(85234),l=0/0,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt;let f=function(e){if("number"==typeof e)return e;if((0,o.A)(e))return l;if((0,a.A)(e)){var t,n="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=(t=e)?t.slice(0,i(t)+1).replace(s,""):t;var r=c.test(e);return r||h.test(e)?d(e.slice(2),r?2:8):u.test(e)?l:+e}},73366:(e,t,n)=>{"use strict";let r;n.d(t,{Ay:()=>ng});let i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,s=Object.keys,a=Array.isArray;function o(e,t){return"object"!=typeof t||s(t).forEach(function(n){e[n]=t[n]}),e}"undefined"==typeof Promise||i.Promise||(i.Promise=Promise);let l=Object.getPrototypeOf,u={}.hasOwnProperty;function c(e,t){return u.call(e,t)}function h(e,t){"function"==typeof t&&(t=t(l(e))),("undefined"==typeof Reflect?s:Reflect.ownKeys)(t).forEach(n=>{f(e,n,t[n])})}let d=Object.defineProperty;function f(e,t,n,r){d(e,t,o(n&&c(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function p(e){return{from:function(t){return e.prototype=Object.create(t.prototype),f(e.prototype,"constructor",e),{extend:h.bind(null,e.prototype)}}}}let y=Object.getOwnPropertyDescriptor;function m(e,t){let n;return y(e,t)||(n=l(e))&&m(n,t)}let g=[].slice;function v(e,t,n){return g.call(e,t,n)}function b(e,t){return t(e)}function _(e){if(!e)throw Error("Assertion Failed")}function w(e){i.setImmediate?setImmediate(e):setTimeout(e,0)}function C(e,t){return e.reduce((e,n,r)=>{var i=t(n,r);return i&&(e[i[0]]=i[1]),e},{})}function x(e,t){if("string"==typeof t&&c(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,i=t.length;r<i;++r){var s=x(e,t[r]);n.push(s)}return n}var a=t.indexOf(".");if(-1!==a){var o=e[t.substr(0,a)];return null==o?void 0:x(o,t.substr(a+1))}}function k(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e))){if("string"!=typeof t&&"length"in t){_("string"!=typeof n&&"length"in n);for(var r=0,i=t.length;r<i;++r)k(e,t[r],n[r])}else{var s=t.indexOf(".");if(-1!==s){var o=t.substr(0,s),l=t.substr(s+1);if(""===l)void 0===n?a(e)&&!isNaN(parseInt(o))?e.splice(o,1):delete e[o]:e[o]=n;else{var u=e[o];u&&c(e,o)||(u=e[o]={}),k(u,l,n)}}else void 0===n?a(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}}function E(e){var t={};for(var n in e)c(e,n)&&(t[n]=e[n]);return t}let A=[].concat;function P(e){return A.apply([],e)}let F="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(P([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>i[e]),K=F.map(e=>i[e]);C(F,e=>[e,!0]);let O=null;function S(e){O="undefined"!=typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let n=O&&O.get(t);if(n)return n;if(a(t)){n=[],O&&O.set(t,n);for(var r=0,i=t.length;r<i;++r)n.push(e(t[r]))}else if(K.indexOf(t.constructor)>=0)n=t;else{let r=l(t);for(var s in n=r===Object.prototype?{}:Object.create(r),O&&O.set(t,n),t)c(t,s)&&(n[s]=e(t[s]))}return n}(e);return O=null,t}let{toString:j}={};function I(e){return j.call(e).slice(8,-1)}let D="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",T="symbol"==typeof D?function(e){var t;return null!=e&&(t=e[D])&&t.apply(e)}:function(){return null},B={};function R(e){var t,n,r,i;if(1==arguments.length){if(a(e))return e.slice();if(this===B&&"string"==typeof e)return[e];if(i=T(e)){for(n=[];!(r=i.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=Array(t);t--;)n[t]=arguments[t];return n}let M="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var N="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),q=()=>!0;let U=!Error("").stack;function $(){if(U)try{throw $.arguments,Error()}catch(e){return e}return Error()}function L(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(q).map(e=>"\n"+e).join("")):""}var V=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],W=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(V),z={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Y(e,t){this._e=$(),this.name=e,this.message=t}function G(e,t){return e+". Errors: "+Object.keys(t).map(e=>
1t[e].toString()).filter((e,t,n)=>n.indexOf(e)===t).join("\n")}function H(e,t,n,r){this._e=$(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=G(e,t)}function Q(e,t){this._e=$(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=G(e,t)}p(Y).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+L(this._e,2))}},toString:function(){return this.name+": "+this.message}}),p(H).from(Y),p(Q).from(Y);var X=W.reduce((e,t)=>(e[t]=t+"Error",e),{}),J=W.reduce((e,t)=>{var n=t+"Error";function r(e,r){this._e=$(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=z[t]||n,this.inner=null)}return p(r).from(Y),e[t]=r,e},{});J.Syntax=SyntaxError,J.Type=TypeError,J.Range=RangeError;var Z=V.reduce((e,t)=>(e[t+"Error"]=J[t],e),{}),ee=W.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=J[t]),e),{});function et(){}function en(e){return e}function er(e,t){return null==e||e===en?t:function(n){return t(e(n))}}function ei(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function es(e,t){return e===et?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var s=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?ei(r,this.onsuccess):r),i&&(this.onerror=this.onerror?ei(i,this.onerror):i),void 0!==s?s:n}}function ea(e,t){return e===et?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?ei(n,this.onsuccess):n),r&&(this.onerror=this.onerror?ei(r,this.onerror):r)}}function eo(e,t){return e===et?t:function(n){var r=e.apply(this,arguments);o(n,r);var i=this.onsuccess,s=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?ei(i,this.onsuccess):i),s&&(this.onerror=this.onerror?ei(s,this.onerror):s),void 0===r?void 0===a?void 0:a:o(r,a)}}function el(e,t){return e===et?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function eu(e,t){return e===et?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,i=arguments.length,s=Array(i);i--;)s[i]=arguments[i];return n.then(function(){return t.apply(r,s)})}return t.apply(this,arguments)}}ee.ModifyError=H,ee.DexieError=Y,ee.BulkError=Q;var ec={};let[eh,ed,ef]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,l(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,l(t),e]})(),ep=ed&&ed.then,ey=eh&&eh.constructor,em=!!ef;var eg=!1,ev=ef?()=>{ef.then(eN)}:i.setImmediate?setImmediate.bind(null,eN):i.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{eN(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(eN,0)},eb=function(e,t){eF.push([e,t]),ew&&(ev(),ew=!1)},e_=!0,ew=!0,eC=[],ex=[],ek=null,eE=en,eA={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:e7,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{e7(e[0],e[1])}catch(e){}})}},eP=eA,eF=[],eK=0,eO=[];function eS(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=et,this._lib=!1;var t=this._PSD=eP;if(N&&(this._stackHolder=$(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ec)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&eD(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,n){try{n(n=>{if(null===t._state){if(n===t)throw TypeError("A promise cannot be resolved with itself.");var r=t._lib&&eq();n&&"function"==typeof n.then?e(t,(e,t)=>{n instanceof eS?n._then(e,t):n.then(e,t)}):(t._state=!0,t._value=n,eT(t)),r&&eU()}},eD.bind(null,t))}catch(e){eD(t,e)}}(this,e)}let ej={get:function(){var e=eP,t=eH;function n(n,r){var i=!e.global&&(e!==eP||t!==eH);let s=i&&!eZ();var a=new eS((t,a)=>{eB(this,new eI(e5(n,e,i,s),e5(r,e,i,s),t,a,e))});return N&&eM(a,this),a}return n.prototype=ec,n},set:function(e){f(this,"then",e&&e.prototype===ec?ej:{get:function(){return e},set:ej.set})}};function eI(e,t,n,r,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=i}function eD(e,t){if(ex.push(t),null===e._state){var n=e._lib&&eq();t=eE(t),e._state=!1,e._value=t,N&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}(()=>{var n=m(t,"stack");t._promise=e,f(t,"stack",{get:()=>eg?n&&(n.get?n.get.apply(t):n.value):e.stack})}),eC.some(t=>t._value===e._value)||eC.push(e),eT(e),n&&eU()}}function eT(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)eB(e,t[n]);var i=e._PSD;--i.ref||i.finalize(),0===eK&&(++eK,eb(()=>{0==--eK&&e$()},[]))}function eB(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++eK,eb(eR,[n,e,t])}else e._listeners.push(t)}function eR(e,t,n){try{ek=t;var r,i=t._value;t._state?r=e(i):(ex.length&&(ex=[]),r=e(i),-1===ex.indexOf(i)&&function(e){for(var t=eC.length;t;)if(eC[--t]._value===e._value)return void eC.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{ek=null,0==--eK&&e$(),--n.psd.ref||n.psd.finalize()}}function eM(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function eN(){eq()&&eU()}function eq(){var e=e_;return e_=!1,ew=!1,e}function eU(){var e,t,n;do for(;eF.length>0;)for(e=eF,eF=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}while(eF.length>0);e_=!0,ew=!0}function e$(){var e=eC;
1eC=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=eO.slice(0),n=t.length;n;)t[--n]()}function eL(e){return new eS(ec,!1,e)}function eV(e,t){var n=eP;return function(){var r=eq(),i=eP;try{return e6(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{e6(i,!1),r&&eU()}}}h(eS.prototype,{then:ej,_then:function(e,t){eB(this,new eI(null,null,e,t,eP))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?n(e):eL(e)):this.then(null,e=>e&&e.name===t?n(e):eL(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),eL(t)))},stack:{get:function(){if(this._stack)return this._stack;try{eg=!0;var e=(function e(t,n,r){if(n.length===r)return n;var i="";if(!1===t._state){var s,a,o=t._value;null!=o?(s=o.name||"Error",a=o.message||o,i=L(o,0)):(s=o,a=""),n.push(s+(a?": "+a:"")+i)}return N&&((i=L(t._stackHolder,2))&&-1===n.indexOf(i)&&n.push(i),t._prev&&e(t._prev,n,r)),n})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{eg=!1}}},timeout:function(e,t){return e<1/0?new eS((n,r)=>{var i=setTimeout(()=>r(new J.Timeout(t)),e);this.then(n,r).finally(clearTimeout.bind(null,i))}):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&f(eS.prototype,Symbol.toStringTag,"Dexie.Promise"),eA.env=e9(),h(eS,{all:function(){var e=R.apply(null,arguments).map(e0);return new eS(function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((i,s)=>eS.resolve(i).then(n=>{e[s]=n,--r||t(e)},n))})},resolve:e=>{if(e instanceof eS)return e;if(e&&"function"==typeof e.then)return new eS((t,n)=>{e.then(t,n)});var t=new eS(ec,!0,e);return eM(t,ek),t},reject:eL,race:function(){var e=R.apply(null,arguments).map(e0);return new eS((t,n)=>{e.map(e=>eS.resolve(e).then(t,n))})},PSD:{get:()=>eP,set:e=>eP=e},totalEchoes:{get:()=>eH},newPSD:eX,usePSD:e2,scheduler:{get:()=>eb,set:e=>{eb=e}},rejectionMapper:{get:()=>eE,set:e=>{eE=e}},follow:(e,t)=>new eS((n,r)=>eX((t,n)=>{var r=eP;r.unhandleds=[],r.onunhandled=n,r.finalize=ei(function(){var e;e=()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])},eO.push(function t(){e(),eO.splice(eO.indexOf(t),1)}),++eK,eb(()=>{0==--eK&&e$()},[])},r.finalize),e()},t,n,r))}),ey&&(ey.allSettled&&f(eS,"allSettled",function(){let e=R.apply(null,arguments).map(e0);return new eS(t=>{0===e.length&&t([]);let n=e.length,r=Array(n);e.forEach((e,i)=>eS.resolve(e).then(e=>r[i]={status:"fulfilled",value:e},e=>r[i]={status:"rejected",reason:e}).then(()=>--n||t(r)))})}),ey.any&&"undefined"!=typeof AggregateError&&f(eS,"any",function(){let e=R.apply(null,arguments).map(e0);return new eS((t,n)=>{0===e.length&&n(AggregateError([]));let r=e.length,i=Array(r);e.forEach((e,s)=>eS.resolve(e).then(e=>t(e),e=>{i[s]=e,--r||n(AggregateError(i))}))})}));let eW={awaits:0,echoes:0,id:0};var ez=0,eY=[],eG=0,eH=0,eQ=0;function eX(e,t,n,r){var i=eP,s=Object.create(i);s.parent=i,s.ref=0,s.global=!1,s.id=++eQ;var a=eA.env;s.env=em?{Promise:eS,PromiseProp:{value:eS,configurable:!0,writable:!0},all:eS.all,race:eS.race,allSettled:eS.allSettled,any:eS.any,resolve:eS.resolve,reject:eS.reject,nthen:e8(a.nthen,s),gthen:e8(a.gthen,s)}:{},t&&o(s,t),++i.ref,s.finalize=function(){--this.parent.ref||this.parent.finalize()};var l=e2(s,e,n,r);return 0===s.ref&&s.finalize(),l}function eJ(){return eW.id||(eW.id=++ez),++eW.awaits,eW.echoes+=100,eW.id}function eZ(){return!!eW.awaits&&(0==--eW.awaits&&(eW.id=0),eW.echoes=100*eW.awaits,!0)}function e0(e){return eW.echoes&&e&&e.constructor===ey?(eJ(),e.then(e=>(eZ(),e),e=>(eZ(),te(e)))):e}function e1(e){++eH,eW.echoes&&0!=--eW.echoes||(eW.echoes=eW.id=0),eY.push(eP),e6(e,!0)}function e3(){var e=eY[eY.length-1];eY.pop(),e6(e,!1)}function e6(e,t){var n,r=eP;if((t?!eW.echoes||eG++&&e===eP:!eG||--eG&&e===eP)||(n=t?e1.bind(null,e):e3,ep.call(eh,n)),e!==eP&&(eP=e,r===eA&&(eA.env=e9()),em)){var s=eA.env.Promise,a=e.env;ed.then=a.nthen,s.prototype.then=a.gthen,(r.global||e.global)&&(Object.defineProperty(i,"Promise",a.PromiseProp),s.all=a.all,s.race=a.race,s.resolve=a.resolve,s.reject=a.reject,a.allSettled&&(s.allSettled=a.allSettled),a.any&&(s.any=a.any))}}function e9(){var e=i.Promise;return em?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(i,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:ed.then,gthen:e.prototype.then}:{}}function e2(e,t,n,r,i){var s=eP;try{return e6(e,!0),t(n,r,i)}finally{e6(s,!1)}}function e5(e,t,n,r){return"function"!=typeof e?e:function(){var i,s=eP;n&&eJ(),e6(t,!0);try{return e.apply(this,arguments)}finally{e6(s,!1),r&&(i=eZ,ep.call(eh,i))}}}function e8(e,t){return function(n,r){return e.call(this,e5(n,t),e5(r,t))}}-1===(""+ep).indexOf("[native code]")&&(eJ=eZ=et);let e4="unhandledrejection";function e7(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,s={promise:t,reason:e};if(i.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(e4,!0,!0),o(r,s)):i.CustomEvent&&o(r=new CustomEvent(e4,{detail:s}
1),s),r&&i.dispatchEvent&&(dispatchEvent(r),!i.PromiseRejectionEvent&&i.onunhandledrejection))try{i.onunhandledrejection(r)}catch(e){}N&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var te=eS.reject;let tt="3.2.7",tn=String.fromCharCode(65535),tr=-1/0,ti="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",ts="String expected.",ta=[],to="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),tl=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),tu="__dbnames",tc="readonly",th="readwrite";function td(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let tf={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function tp(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=S(t))[e],t)}class ty{_trans(e,t,n){let r=this._tx||eP.trans,i=this.name;function s(e,n,r){if(!r.schema[i])throw new J.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)}let a=eq();try{return r&&r.db===this.db?r===eP.trans?r._promise(e,s,n):eX(()=>r._promise(e,s,n),{trans:r,transless:eP.transless||eP}):function e(t,n,r,i){if(t.idbdb&&(t._state.openComplete||eP.letThrough||t._vip)){var s=t._createTransaction(n,r,t._dbSchema);try{s.create(),t._state.PR1398_maxLoop=3}catch(s){return s.name===X.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,n,r,i))):te(s)}return s._promise(n,(e,t)=>eX(()=>(eP.trans=s,i(e,t,s)))).then(e=>s._completion.then(()=>e))}if(t._state.openComplete)return te(new J.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return te(new J.DatabaseClosed);t.open().catch(et)}return t._state.dbReadyPromise.then(()=>e(t,n,r,i))}(this.db,e,[this.name],s)}finally{a&&eU()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(a(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=s(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let n=this.schema.indexes.concat(this.schema.primKey).filter(e=>{if(e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)){for(let n=0;n<t.length;++n)if(-1===t.indexOf(e.keyPath[n]))return!1;return!0}return!1}).sort((e,t)=>e.keyPath.length-t.keyPath.length)[0];if(n&&this.db._maxKey!==tn){let r=n.keyPath.slice(0,t.length);return this.where(r).equals(r.map(t=>e[t]))}!n&&N&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:r}=this.schema,i=this.db._deps.indexedDB;function o(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}}let[l,u]=t.reduce(([t,n],i)=>{let s=r[i],l=e[i];return[t||s,t||!s?td(n,s&&s.multi?e=>{let t=x(e,i);return a(t)&&t.some(e=>o(l,e))}:e=>o(l,x(e,i))):n]},[null,null]);return l?this.where(l.name).equals(e[l.keyPath]).filter(u):n?this.filter(u):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,a(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let n=Object.create(e.prototype);for(var r in t)if(c(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){o(this,e)})}add(e,t){let{auto:n,keyPath:r}=this.schema.primKey,i=e;return r&&n&&(i=tp(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[i]})).then(e=>e.numFailures?eS.reject(e.failures[0]):e.lastResult).then(t=>{if(r)try{k(e,r,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||a(e))return this.where(":id").equals(e).modify(t);{let n=x(e,this.schema.primKey.keyPath);if(void 0===n)return te(new J.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?s(t).forEach(n=>
1{k(e,n,t[n])}):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){let{auto:n,keyPath:r}=this.schema.primKey,i=e;return r&&n&&(i=tp(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[i],keys:null!=t?[t]:null})).then(e=>e.numFailures?eS.reject(e.failures[0]):e.lastResult).then(t=>{if(r)try{k(e,r,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?eS.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:tf})).then(e=>e.numFailures?eS.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,n){let r=Array.isArray(t)?t:void 0,i=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:n,keyPath:s}=this.schema.primKey;if(s&&r)throw new J.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new J.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,o=s&&n?e.map(tp(s)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:o,wantResults:i}).then(({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return i?t:n;throw new Q(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)})})}bulkPut(e,t,n){let r=Array.isArray(t)?t:void 0,i=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:n,keyPath:s}=this.schema.primKey;if(s&&r)throw new J.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new J.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,o=s&&n?e.map(tp(s)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:o,wantResults:i}).then(({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return i?t:n;throw new Q(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new Q(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)})}}function tm(e){var t={},n=function(n,r){if(r){for(var i=arguments.length,s=Array(i-1);--i;)s[i-1]=arguments[i];return t[n].subscribe.apply(null,s),e}if("string"==typeof n)return t[n]};
1n.addEventType=o;for(var r=1,i=arguments.length;r<i;++r)o(arguments[r]);return n;function o(e,r,i){if("object"!=typeof e){r||(r=el),i||(i=et);var l={subscribers:[],fire:i,subscribe:function(e){-1===l.subscribers.indexOf(e)&&(l.subscribers.push(e),l.fire=r(l.fire,e))},unsubscribe:function(e){l.subscribers=l.subscribers.filter(function(t){return t!==e}),l.fire=l.subscribers.reduce(r,i)}};return t[e]=n[e]=l,l}s(e).forEach(function(t){var n=e[t];if(a(n))o(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new J.InvalidArgument("Invalid event config");var r=o(t,en,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach(function(e){w(function(){e.apply(null,t)})})})}})}}function tg(e,t){return p(t).from({prototype:e}),t}function tv(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function tb(e,t){e.filter=td(e.filter,t)}function t_(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>td(r(),t()):t,e.justLimit=n&&!r}function tw(e,t){if(e.isPrimKey)return t.primaryKey;let n=t.getIndexByKeyPath(e.index);if(!n)throw new J.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function tC(e,t,n){let r=tw(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function tx(e,t,n,r){let i=e.replayFilter?td(e.filter,e.replayFilter()):e.filter;if(e.or){let s={},a=(e,n,r)=>{if(!i||i(n,r,e=>n.stop(e),e=>n.fail(e))){var a=n.primaryKey,o=""+a;"[object ArrayBuffer]"===o&&(o=""+new Uint8Array(a)),c(s,o)||(s[o]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),tk(tC(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return tk(tC(e,r,n),td(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function tk(e,t,n,r){var i=eV(r?(e,t,i)=>n(r(e),t,i):n);return e.then(e=>{if(e)return e.start(()=>{var n=()=>e.continue();t&&!t(e,e=>n=e,t=>{e.stop(t),n=et},t=>{e.fail(t),n=et})||i(e.value,e,e=>n=e),n()})})}function tE(e,t){try{let n=tA(e),r=tA(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let n=e.length,r=t.length,i=n<r?n:r;for(let n=0;n<i;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(tP(e),tP(t));case"Array":return function(e,t){let n=e.length,r=t.length,i=n<r?n:r;for(let n=0;n<i;++n){let r=tE(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function tA(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let n=I(e);return"ArrayBuffer"===n?"binary":n}function tP(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class tF{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,te.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,te.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=td(t.algorithm,e)}_iterate(e,t){return tx(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&o(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(n=>tx(t,e,n,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,n=t.table.core;if(tv(t,!0))return n.count({trans:e,query:{index:tw(t,n.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var r=0;return tx(t,()=>(++r,!1),e,n).then(()=>r)}).then(e)}sortBy(e,t){let n=e.split(".").reverse(),r=n[0],i=n.length-1;function s(e,t){return t?s(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function o(e,t){var n=s(e,i),r=s(t,i);return n<r?-a:n>r?a:0}return this.toArray(function(e){return e.sort(o)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&tv(t,!0)&&t.limit>0){let{valueMapper:n}=t,r=tw(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then(({result:e})=>n?e.map(n):e)}{let n=[];return tx(t,e=>n.push(e),e,t.table.core).then(()=>n)}},e)}offset(e){var t=this._ctx;
1return e<=0||(t.offset+=e,tv(t)?t_(t,()=>{var t=e;return(e,n)=>0===t||(1===t?--t:n(()=>{e.advance(t),t=0}),!1)}):t_(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),t_(this._ctx,()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}},!0),this}until(e,t){return tb(this._ctx,function(n,r,i){return!e(n.value)||(r(i),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return tb(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=td(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.key,n)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.primaryKey,n)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.key)}).then(function(){return n}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&tv(t,!0)&&t.limit>0)return this._read(e=>{var n=tw(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.primaryKey)}).then(function(){return n}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return tb(this._ctx,function(e){var t=e.primaryKey.toString(),r=c(n,t);return n[t]=!0,!r}),this}modify(e){var t=this._ctx;return this._write(n=>{var r;if("function"==typeof e)r=e;else{var i=s(e),a=i.length;r=function(t){for(var n=!1,r=0;r<a;++r){var s=i[r],o=e[s];x(t,s)!==o&&(k(t,s,o),n=!0)}return n}}let o=t.table.core,{outbound:l,extractKey:u}=o.schema.primaryKey,c=this.db._options.modifyChunkSize||200,h=[],d=0,f=[],p=(e,t)=>{let{failures:n,numFailures:r}=t;for(let t of(d+=e-r,s(n)))h.push(n[t])};return this.clone().primaryKeys().then(i=>{let s=a=>{let h=Math.min(c,i.length-a);return o.getMany({trans:n,keys:i.slice(a,a+h),cache:"immutable"}).then(d=>{let f=[],y=[],m=l?[]:null,g=[];for(let e=0;e<h;++e){let t=d[e],n={value:S(t),primKey:i[a+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(i[a+e]):l||0===tE(u(t),u(n.value))?(y.push(n.value),l&&m.push(i[a+e])):(g.push(i[a+e]),f.push(n.value)))}let v=tv(t)&&t.limit===1/0&&("function"!=typeof e||e===tK)&&{index:t.index,range:t.range};return Promise.resolve(f.length>0&&o.mutate({trans:n,type:"add",values:f}).then(e=>{for(let t in e.failures)g.splice(parseInt(t),1);p(f.length,e)})).then(()=>(y.length>0||v&&"object"==typeof e)&&o.mutate({trans:n,type:"put",keys:m,values:y,criteria:v,changeSpec:"function"!=typeof e&&e}).then(e=>p(y.length,e))).then(()=>(g.length>0||v&&e===tK)&&o.mutate({trans:n,type:"delete",keys:g,criteria:v}).then(e=>p(g.length,e))).then(()=>i.length>a+h&&s(a+c))})};return s(0).then(()=>{if(h.length>0)throw new H("Error modifying one or more objects",h,d,f);return i.length})})})}delete(){var e=this._ctx,t=e.range;return tv(e)&&(e.isPrimKey&&!to||3===t.type)?this._write(n=>{let{primaryKey:r}=e.table.core.schema;return e.table.core.count({trans:n,query:{index:r,range:t}}).then(r=>e.table.core.mutate({trans:n,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:n,numFailures:i})=>{if(i)throw new H("Could not delete some values",Object.keys(e).map(t=>e[t]),r-i);return r-i}))}):this.modify(tK)}}let tK=(e,t)=>t.value=null;function tO(e,t){return e<t?-1:+(e!==t)}function tS(e,t){return e>t?-1:+(e!==t)}function tj(e,t,n){var r=e instanceof tR?new e.Collection(e):e;return r._ctx.error=n?new n(t):TypeError(t),r}function tI(e){return new e.Collection(e,()=>tB("")).limit(0)}function tD(e,t,n,r){var i,s,a,o,l,u,c,h=n.length;if(!n.every(e=>"string"==typeof e))return tj(e,ts);function d(e){i="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),s="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?tO:tS;var t=n.map(function(e){return{lower:s(e),upper:i(e)}}).sort(function(e,t){return a(e.lower,t.lower)});o=t.map(function(e){return e.upper}),l=t.map(function(e){return e.lower}),u=e,c="next"===e?"":r}d("next");var f=new e.Collection(e,()=>tT(o[0],l[h-1]+r));f._ondirectionchange=function(e){d(e)};var p=0;return f._addAlgorithm(function(e,n,r){var i=e.key;if("string"!=typeof i)return!1;var d=s(i);if(t(d,l,p))return!0;for(var f=null,y=p;y<h;++y){var m=function(e,t,n,r,i,s){for(var a=Math.min(e.length,r.length),o=-1,l=0;l<a;++l){var u=t[l];if(u!==r[l])return 0>i(e[l],n[l])?e.substr(0,l)+n[l]+n.substr(l+1):0>i(e[l],r[l])?e.substr(0,l)+r[l]+n.substr(l+1):o>=0?e.substr(0,o)+t[o]+n.substr(o+1):null;0>i(e[l],u)&&(o=l)}return a<r.length&&"next"===s?e+n.substr(e.length):a<e.length&&"prev"===s?e.substr(0,n.length):o<0?null:e.substr(0,o)+r[o]+n.substr(o+1)}(i,d,o[y],l[y],a,u);null===m&&null===f?p=y+1:(null===f||a(f,m)>0)&&(f=m)}return n(null!==f?function(){e.continue(f+c)}:r),!1}),f}function tT(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function tB(e){return{type:1,lower:e,upper:e}}
1class tR{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?tI(this):new this.Collection(this,()=>tT(e,t,!n,!r))}catch(e){return tj(this,ti)}}equals(e){return null==e?tj(this,ti):new this.Collection(this,()=>tB(e))}above(e){return null==e?tj(this,ti):new this.Collection(this,()=>tT(e,void 0,!0))}aboveOrEqual(e){return null==e?tj(this,ti):new this.Collection(this,()=>tT(e,void 0,!1))}below(e){return null==e?tj(this,ti):new this.Collection(this,()=>tT(void 0,e,!1,!0))}belowOrEqual(e){return null==e?tj(this,ti):new this.Collection(this,()=>tT(void 0,e))}startsWith(e){return"string"!=typeof e?tj(this,ts):this.between(e,e+tn,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):tD(this,(e,t)=>0===e.indexOf(t[0]),[e],tn)}equalsIgnoreCase(e){return tD(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=R.apply(B,arguments);return 0===e.length?tI(this):tD(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=R.apply(B,arguments);return 0===e.length?tI(this):tD(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,tn)}anyOf(){let e=R.apply(B,arguments),t=this._cmp;try{e.sort(t)}catch(e){return tj(this,ti)}if(0===e.length)return tI(this);let n=new this.Collection(this,()=>tT(e[0],e[e.length-1]));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm((n,i,s)=>{let a=n.key;for(;t(a,e[r])>0;)if(++r===e.length)return i(s),!1;return 0===t(a,e[r])||(i(()=>{n.continue(e[r])}),!1)}),n}notEqual(e){return this.inAnyRange([[tr,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=R.apply(B,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return tj(this,ti)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[tr,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let n=this._cmp,r=this._ascending,i=this._descending,s=this._min,a=this._max;if(0===e.length)return tI(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=r(e[0],e[1])))return tj(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",J.InvalidArgument);let o=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,u,c=r;function h(e,t){return c(e[0],t[0])}try{(u=e.reduce(function(e,t){let r=0,i=e.length;for(;r<i;++r){let i=e[r];if(0>n(t[0],i[1])&&n(t[1],i[0])>0){i[0]=s(i[0],t[0]),i[1]=a(i[1],t[1]);break}}return r===i&&e.push(t),e},[])).sort(h)}catch(e){return tj(this,ti)}let d=0,f=l?e=>r(e,u[d][1])>0:e=>r(e,u[d][1])>=0,p=o?e=>i(e,u[d][0])>0:e=>i(e,u[d][0])>=0,y=f,m=new this.Collection(this,()=>tT(u[0][0],u[u.length-1][1],!o,!l));return m._ondirectionchange=e=>{"next"===e?(y=f,c=r):(y=p,c=i),u.sort(h)},m._addAlgorithm((e,t,n)=>{for(var i=e.key;y(i);)if(++d===u.length)return t(n),!1;return!!(!f(i)&&!p(i))||(0===this._cmp(i,u[d][1])||0===this._cmp(i,u[d][0])||t(()=>{c===r?e.continue(u[d][0]):e.continue(u[d][1])}),!1)}),m}startsWithAnyOf(){let e=R.apply(B,arguments);return e.every(e=>"string"==typeof e)?0===e.length?tI(this):this.inAnyRange(e.map(e=>[e,e+tn])):tj(this,"startsWithAnyOf() only works with strings")}}function tM(e){return eV(function(t){return tN(t),e(t.target.error),!1})}function tN(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let tq="storagemutated",tU="x-storagemutated-1",t$=tm(null,tq);class tL{_lock(){return _(!eP.global),++this._reculock,1!==this._reculock||eP.global||(eP.lockOwnerFor=this),this}_unlock(){if(_(!eP.global),0==--this._reculock)for(eP.global||(eP.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{e2(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&eP.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,n=this.db._state.dbOpenError;if(_(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new J.DatabaseClosed(n);case"MissingAPIError":throw new J.MissingAPI(n.message,n);default:throw new J.OpenFailed(n)}if(!this.active)throw new J.TransactionInactive;return _(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=eV(t=>{tN(t),this._reject(e.error)}),e.onabort=eV(t=>{tN(t),this.active&&this._reject(new J.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}
1),e.oncomplete=eV(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&t$.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return te(new J.ReadOnly("Transaction is readonly"));if(!this.active)return te(new J.TransactionInactive);if(this._locked())return new eS((r,i)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,i)},eP])});if(n)return eX(()=>{var e=new eS((e,n)=>{this._lock();let r=t(e,n,this);r&&r.then&&r.then(e,n)});return e.finally(()=>this._unlock()),e._lib=!0,e});var r=new eS((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)});return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let n=eS.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>n);else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new eS((e,r)=>{n.then(n=>t._waitingQueue.push(eV(e.bind(null,n))),e=>t._waitingQueue.push(eV(r.bind(null,e)))).finally(()=>{t._waitingFor===i&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new J.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(c(t,e))return t[e];let n=this.schema[e];if(!n)throw new J.NotFound("Table "+e+" not part of transaction");let r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function tV(e,t,n,r,i,s,a){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:s,src:(n&&!a?"&":"")+(r?"*":"")+(i?"++":"")+tW(t)}}function tW(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function tz(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:C(n,e=>[e.name,e])}}let tY=e=>{try{return e.only([[]]),tY=()=>[[]],[[]]}catch(e){return tY=()=>tn,tn}};function tG(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>x(t,e):t=>x(t,e)}function tH(e){return[].slice.call(e)}let tQ=0;function tX(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function tJ({_novip:e},t){let n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},i){var s;return{dbcore:(s=function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:n,upper:r,lowerOpen:i,upperOpen:s}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!s):void 0===r?t.lowerBound(n,!!i):t.bound(n,r,!!i,!!s)}let{schema:i,hasGetAll:s}=function(e,t){let n=tH(e.objectStoreNames);return{schema:{name:e.name,tables:n.map(e=>t.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:n}=e,r=a(t),i=null==t,s={},o={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:tG(t)},indexes:tH(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:n,multiEntry:r,keyPath:i}=e,o={name:t,compound:a(i),keyPath:i,unique:n,multiEntry:r,extractKey:tG(i)};return s[tX(i)]=o,o}),getIndexByKeyPath:e=>s[tX(e)]};return s[":id"]=o.primaryKey,null!=t&&(s[tX(t)]=o.primaryKey),o})},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),o=i.tables.map(e=>(function(e){let t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:i,values:s,range:a}){return new Promise((o,l)=>{let u;o=eV(o);let c=e.objectStore(t),h=null==c.keyPath,d="put"===n||"add"===n;if(!d&&"delete"!==n&&"deleteRange"!==n)throw Error("Invalid operation type: "+n);let{length:f}=i||s||{length:1};if(i&&s&&i.length!==s.length)throw Error("Given keys array must have same length as given values array.");if(0===f)return o({numFailures:0,failures:{},results:[],lastResult:void 0});let p=[],y=[],m=0,g=e=>{++m,tN(e)};if("deleteRange"===n){if(4===a.type)return o({numFailures:m,failures:y,results:[],lastResult:void 0});
13===a.type?p.push(u=c.clear()):p.push(u=c.delete(r(a)))}else{let[e,t]=d?h?[s,i]:[s,null]:[i,null];if(d)for(let r=0;r<f;++r)p.push(u=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),u.onerror=g;else for(let t=0;t<f;++t)p.push(u=c[n](e[t])),u.onerror=g}let v=e=>{let t=e.target.result;p.forEach((e,t)=>null!=e.error&&(y[t]=e.error)),o({numFailures:m,failures:y,results:"delete"===n?i:p.map(e=>e.result),lastResult:t})};u.onerror=e=>{g(e),v(e)},u.onsuccess=v})},getMany:({trans:e,keys:n})=>new Promise((r,i)=>{r=eV(r);let s=e.objectStore(t),a=n.length,o=Array(a),l,u=0,c=0,h=e=>{let t=e.target;o[t._pos]=t.result,++c===u&&r(o)},d=tM(i);for(let e=0;e<a;++e)null!=n[e]&&((l=s.get(n[e]))._pos=e,l.onsuccess=h,l.onerror=d,++u);0===u&&r(o)}),get:({trans:e,key:n})=>new Promise((r,i)=>{r=eV(r);let s=e.objectStore(t).get(n);s.onsuccess=e=>r(e.target.result),s.onerror=tM(i)}),query:e=>new Promise((n,i)=>{n=eV(n);let{trans:a,values:o,limit:l,query:u}=e,c=l===1/0?void 0:l,{index:h,range:d}=u,f=a.objectStore(t),p=h.isPrimaryKey?f:f.index(h.name),y=r(d);if(0===l)return n({result:[]});if(s){let e=o?p.getAll(y,c):p.getAllKeys(y,c);e.onsuccess=e=>n({result:e.target.result}),e.onerror=tM(i)}else{let e=0,t=!o&&"openKeyCursor"in p?p.openKeyCursor(y):p.openCursor(y),r=[];t.onsuccess=i=>{let s=t.result;return s?(r.push(o?s.value:s.primaryKey),++e===l?n({result:r}):void s.continue()):n({result:r})},t.onerror=tM(i)}}),openCursor:function({trans:e,values:n,query:i,reverse:s,unique:a}){return new Promise((o,l)=>{o=eV(o);let{index:u,range:c}=i,h=e.objectStore(t),d=u.isPrimaryKey?h:h.index(u.name),f=s?a?"prevunique":"prev":a?"nextunique":"next",p=!n&&"openKeyCursor"in d?d.openKeyCursor(r(c),f):d.openCursor(r(c),f);p.onerror=tM(l),p.onsuccess=eV(t=>{let n=p.result;if(!n)return void o(null);n.___id=++tQ,n.done=!1;let r=n.continue.bind(n),i=n.continuePrimaryKey;i&&(i=i.bind(n));let s=n.advance.bind(n),a=()=>{throw Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw Error("Cursor not started")},n.fail=eV(l),n.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},n.start=e=>{let t=new Promise((e,t)=>{e=eV(e),p.onerror=tM(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}}),o=()=>{if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw Error("Cursor behind last entry")},n.stop()};return p.onsuccess=eV(e=>{p.onsuccess=o,o()}),n.continue=r,n.continuePrimaryKey=i,n.advance=s,o(),t},o(n)},l)})},count({query:e,trans:n}){let{index:i,range:s}=e;return new Promise((e,a)=>{let o=n.objectStore(t),l=i.isPrimaryKey?o:o.index(i.name),u=r(s),c=u?l.count(u):l.count();c.onsuccess=eV(t=>e(t.target.result)),c.onerror=tM(a)})}}})(e)),l={};return o.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:tY(t),schema:i}}(t,n,i),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),s))}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach(t=>{let n=t.name;e.core.schema.tables.some(e=>e.name===n)&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))})}function tZ({_novip:e},t,n,r){n.forEach(n=>{let i=r[n];t.forEach(t=>{let r=m(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?f(t,n,{get(){return this.table(n)},set(e){d(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,i))})})}function t0({_novip:e},t){t.forEach(t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]})}function t1(e,t){return e._cfg.version-t._cfg.version}function t3(e,t){let n;let r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){let i=e[n],s=t[n];if(i){let e={name:n,def:s,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")==""+(s.primKey.keyPath||"")&&(i.primKey.auto===s.primKey.auto||to)){let t;let n=i.idxByName,a=s.idxByName;for(t in n)a[t]||e.del.push(t);for(t in a){let r=n[t],i=a[t];r?r.src!==i.src&&e.change.push(i):e.add.push(i)}(e.del.length>0||e.add.length>0||e.change.length>0)&&r.change.push(e)}else e.recreate=!0,r.change.push(e)}else r.add.push([n,s])}return r}function t6(e,t,n,r){let i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});
1return r.forEach(e=>t9(i,e)),i}function t9(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function t2(e,t,n){let r={};return v(t.objectStoreNames,0).forEach(e=>{let t=n.objectStore(e),i=t.keyPath,s=tV(tW(i),i||"",!1,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let n=t.index(t.indexNames[e]);i=n.keyPath;var o=tV(n.name,i,!!n.unique,!!n.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(o)}r[e]=tz(e,s,a)}),r}function t5({_novip:e},t,n){let r=n.db.objectStoreNames;for(let i=0;i<r.length;++i){let s=r[i],a=n.objectStore(s);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let n=a.indexNames[e],r=a.index(n).keyPath,i="string"==typeof r?r:"["+v(r).join("+")+"]";if(t[s]){let e=t[s].idxByName[i];e&&(e.name=n,delete t[s].idxByName[i],t[s].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&i.WorkerGlobalScope&&i instanceof i.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class t8{_parseStoresSpec(e,t){s(e).forEach(n=>{if(null!==e[n]){var r=e[n].split(",").map((e,t)=>{let n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return tV(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),a(r),0===t)}),i=r.shift();if(i.multi)throw new J.Schema("Primary key cannot be multi-valued");r.forEach(e=>{if(e.auto)throw new J.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new J.Schema("Index must have a name and cannot be an empty string")}),t[n]=tz(n,i,r)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?o(this._cfg.storesSource,e):e;let n=t._versions,r={},i={};return n.forEach(e=>{o(r,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(r,i)}),t._dbSchema=i,t0(t,[t._allTables,t,t.Transaction.prototype]),tZ(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],s(i),i),t._storeNames=s(i),this}upgrade(e){return this._cfg.contentUpgrade=eu(this._cfg.contentUpgrade||et,e),this}}function t4(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ng(tu,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function t7(e){return e&&"function"==typeof e.databases}function ne(e){return eX(function(){return eP.letThrough=!0,e()})}function nt(e){var t=t=>e.next(t),n=i(t),r=i(t=>e.throw(t));function i(e){return t=>{var i=e(t),s=i.value;return i.done?s:s&&"function"==typeof s.then?s.then(n,r):a(s)?Promise.all(s).then(n,r):n(s)}}return i(t)()}function nn(e,t,n){var r=arguments.length;if(r<2)throw new J.InvalidArgument("Too few arguments");for(var i=Array(r-1);--r;)i[r-1]=arguments[r];return n=i.pop(),[e,P(i),n]}function nr(e,t,n){let r=a(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}let ni={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let n=e.table(t),{schema:r}=n,i={},s=[];function a(e,t,n){let r=tX(e),o=i[r]=i[r]||[],l=null==e?0:"string"==typeof e?1:e.length,u=t>0,c={...n,isVirtual:u,keyTail:t,keyLength:l,extractKey:tG(e),unique:!u&&n.unique};return o.push(c),c.isPrimaryKey||s.push(c),l>1&&a(2===l?e[0]:e.slice(0,l-1),t+1,n),o.sort((e,t)=>e.keyTail-t.keyTail),c}let o=a(r.primaryKey.keyPath,0,r.primaryKey);for(let e of(i[":id"]=[o],r.indexes))a(e.keyPath,0,e);function l(t){var n,r;let i=t.query.index;return i.isVirtual?{...t,query:{index:i,range:(n=t.query.range,r=i.keyTail,{type:1===n.type?2:n.type,lower:nr(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:nr(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}:t}return{...n,schema:{...r,primaryKey:o,indexes:s,getIndexByKeyPath:function(e){let t=i[tX(e)];return t&&t[0]}},count:e=>n.count(l(e)),query:e=>n.query(l(e)),openCursor(t){let{keyTail:r,isVirtual:i,keyLength:s}=t.query.index;return i?n.openCursor(l(t)).then(n=>n&&Object.create(n,{continue:{value:function(i){null!=i?n.continue(nr(i,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,s).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,i){n.continuePrimaryKey(nr(t,e.MAX_KEY,r),i)}},primaryKey:{get:()=>n.primaryKey},key:{get(){let e=n.key;return 1===s?e[0]:e.slice(0,s)}},value:{get:()=>n.value}})):n.openCursor(t)}}}}}};function ns(e,t,n,r){return n=n||{},r=r||"",s(e).forEach(i=>
1{if(c(t,i)){var s=e[i],a=t[i];if("object"==typeof s&&"object"==typeof a&&s&&a){let e=I(s);e!==I(a)?n[r+i]=t[i]:"Object"===e?ns(s,a,n,r+i+"."):s!==a&&(n[r+i]=t[i])}else s!==a&&(n[r+i]=t[i])}else n[r+i]=void 0}),s(t).forEach(i=>{c(e,i)||(n[r+i]=t[i])}),n}let na={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let n=e.table(t),{primaryKey:r}=n.schema;return{...n,mutate(e){let i=eP.trans,{deleting:s,creating:a,updating:o}=i.table(t).hook;switch(e.type){case"add":if(a.fire===et)break;return i._promise("readwrite",()=>l(e),!0);case"put":if(a.fire===et&&o.fire===et)break;return i._promise("readwrite",()=>l(e),!0);case"delete":if(s.fire===et)break;return i._promise("readwrite",()=>l(e),!0);case"deleteRange":if(s.fire===et)break;return i._promise("readwrite",()=>(function e(t,i,s){return n.query({trans:t,values:!1,query:{index:r,range:i},limit:s}).then(({result:n})=>l({type:"delete",keys:n,trans:t}).then(r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<s?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...i,lower:n[n.length-1],lowerOpen:!0},s)))})(e.trans,e.range,1e4),!0)}return n.mutate(e);function l(e){var t,i;let l=eP.trans,u=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(r.extractKey));if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:u}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(i=e).type?Promise.resolve([]):n.getMany({trans:i.trans,keys:u,cache:"immutable"})).then(t=>{let i=u.map((n,i)=>{let u=t[i],h={onerror:null,onsuccess:null};if("delete"===e.type)s.fire.call(h,n,u,l);else if("add"===e.type||void 0===u){let t=a.fire.call(h,n,e.values[i],l);null==n&&null!=t&&(n=t,e.keys[i]=n,r.outbound||k(e.values[i],r.keyPath,n))}else{let t=ns(u,e.values[i]),r=o.fire.call(h,t,n,u,l);if(r){let t=e.values[i];Object.keys(r).forEach(e=>{c(t,e)?t[e]=r[e]:k(t,e,r[e])})}}return h});return n.mutate(e).then(({failures:n,results:r,numFailures:s,lastResult:a})=>{for(let s=0;s<u.length;++s){let a=r?r[s]:u[s],o=i[s];null==a?o.onerror&&o.onerror(n[s]):o.onsuccess&&o.onsuccess("put"===e.type&&t[s]?e.values[s]:a)}return{failures:n,results:r,numFailures:s,lastResult:a}}).catch(e=>(i.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function no(e,t,n){try{if(!t||t.keys.length<e.length)return null;let r=[];for(let i=0,s=0;i<t.keys.length&&s<e.length;++i)0===tE(t.keys[i],e[s])&&(r.push(n?S(t.values[i]):t.values[i]),++s);return r.length===e.length?r:null}catch(e){return null}}let nl={stack:"dbcore",level:-1,create:e=>({table:t=>{let n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);let t=no(e.keys,e.trans._cache,"clone"===e.cache);return t?eS.resolve(t):n.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?S(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function nu(e){return!("from"in e)}let nc=function(e,t){if(!this){let t=new nc;return e&&"d"in e&&o(t,e),t}o(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function nh(e,t,n){let r=tE(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(nu(e))return o(e,{from:t,to:n,d:1});let i=e.l,s=e.r;if(0>tE(n,e.from))return i?nh(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},np(e);if(tE(t,e.to)>0)return s?nh(s,t,n):e.r={from:t,to:n,d:1,l:null,r:null},np(e);0>tE(t,e.from)&&(e.from=t,e.l=null,e.d=s?s.d+1:1),tE(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;i&&!e.l&&nd(e,i),s&&a&&nd(e,s)}function nd(e,t){nu(t)||function e(t,{from:n,to:r,l:i,r:s}){nh(t,n,r),i&&e(t,i),s&&e(t,s)}(e,t)}function nf(e){let t=nu(e)?null:{s:0,n:e};return{next(e){let n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&0>tE(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||0>=tE(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function np(e){var t,n;let r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),i=r>1?"r":r<-1?"l":"";if(i){let t="r"===i?"l":"r",n={...e},r=e[i];e.from=r.from,e.to=r.to,e[i]=r[i],n[i]=r[t],e[t]=n,n.d=ny(n)}e.d=ny(e)}function ny({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}h(nc.prototype,{add(e){return nd(this,e),this},addKey(e){return nh(this,e,e),this}
1,addKeys(e){return e.forEach(e=>nh(this,e,e)),this},[D](){return nf(this)}});let nm={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,n=new nc(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{let i=e.table(r),{schema:o}=i,{primaryKey:l}=o,{extractKey:u,outbound:c}=l,h={...i,mutate:e=>{let s=e.trans,l=s.mutatedParts||(s.mutatedParts={}),u=e=>{let n=`idb://${t}/${r}/${e}`;return l[n]||(l[n]=new nc)},c=u(""),h=u(":dels"),{type:d}=e,[f,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],y=e.trans._cache;return i.mutate(e).then(e=>{if(a(f)){"delete"!==d&&(f=e.results),c.addKeys(f);let t=no(f,y);t||"add"===d||h.addKeys(f),(t||p)&&function(e,t,n,r){t.indexes.forEach(function(t){let i=e(t.name||"");function s(e){return null!=e?t.extractKey(e):null}let o=e=>t.multiEntry&&a(e)?e.forEach(e=>i.addKey(e)):i.addKey(e);(n||r).forEach((e,t)=>{let i=n&&s(n[t]),a=r&&s(r[t]);0!==tE(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}(u,o,t,p)}else if(f){let e={from:f.lower,to:f.upper};h.add(e),c.add(e)}else c.add(n),h.add(n),o.indexes.forEach(e=>u(e.name).add(n));return e})}},d=({query:{index:t,range:n}})=>{var r,i;return[t,new nc(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(i=n.upper)&&void 0!==i?i:e.MAX_KEY)]},f={get:e=>[l,new nc(e.key)],getMany:e=>[l,(new nc).addKeys(e.keys)],count:d,query:d,openCursor:d};return s(f).forEach(e=>{h[e]=function(s){let{subscr:a}=eP;if(a){let o=e=>{let n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new nc)},l=o(""),h=o(":dels"),[d,p]=f[e](s);if(o(d.name||"").add(p),!d.isPrimaryKey){if("count"!==e){let t="query"===e&&c&&s.values&&i.query({...s,values:!1});return i[e].apply(this,arguments).then(n=>{if("query"===e){if(c&&s.values)return t.then(({result:e})=>(l.addKeys(e),n));let e=s.values?n.result.map(u):n.result;s.values?l.addKeys(e):h.addKeys(e)}else if("openCursor"===e){let e=s.values;return n&&Object.create(n,{key:{get:()=>(h.addKey(n.primaryKey),n.key)},primaryKey:{get(){let e=n.primaryKey;return h.addKey(e),e}},value:{get:()=>(e&&l.addKey(n.primaryKey),n.value)}})}return n})}h.add(n)}}return i[e].apply(this,arguments)}}),h}}}};class ng{constructor(e,t){var n,r,i;this._middlewares={},this.verno=0;let s=ng.dependencies;this._options=t={addons:ng.addons,autoOpen:!0,indexedDB:s.indexedDB,IDBKeyRange:s.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};let{addons:a}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;let o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:et,dbReadyPromise:null,cancelOpen:et,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};o.dbReadyPromise=new eS(e=>{o.dbReadyResolve=e}),o.openCanceller=new eS((e,t)=>{o.cancelOpen=t}),this._state=o,this.name=e,this.on=tm(this,"populate","blocked","versionchange","close",{ready:[eu,et]}),this.on.ready.subscribe=b(this.on.ready.subscribe,e=>(t,n)=>{ng.vip(()=>{let r=this._state;if(r.openComplete)r.dbOpenError||eS.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);let r=this;n||e(function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)})}})}),this.Collection=(n=this,tg(tF.prototype,function(e,t){this.db=n;let r=tf,i=null;if(t)try{r=t()}catch(e){i=e}let s=e._ctx,a=s.table,o=a.hook.reading.fire;this._ctx={table:a,index:s.index,isPrimKey:!s.index||a.schema.primKey.keyPath&&s.index===a.schema.primKey.name,range:r,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:s.or,valueMapper:o!==en?o:null}})),this.Table=function(e){return tg(ty.prototype,function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:tm(null,{creating:[es,et],reading:[er,en],updating:[eo,et],deleting:[ea,et]})})}(this),this.Transaction=(r=this,tg(tL.prototype,function(e,t,n,i,s){this.db=r,this.mode=e,this.storeNames=t,this.schema=n,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=tm(this,"complete","error","abort"),this.parent=s||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new eS((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),te(e)})})),this.Version=(i=this,tg(t8.prototype,function(e){this.db=i,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=function(e){return tg(tR.prototype,function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};let i=e._deps.indexedDB;if(!i)throw new J.MissingAPI;this._cmp=this._ascending=i.cmp.bind(i),this._descending=(e,t)=>
1i.cmp(t,e),this._max=(e,t)=>i.cmp(e,t)>0?e:t,this._min=(e,t)=>0>i.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=tY(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),ta.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(ni),this.use(na),this.use(nm),this.use(nl),this.vip=Object.create(this,{_vip:{value:!0}}),a.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new J.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new J.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var n=t.filter(t=>t._cfg.version===e)[0];return n||(n=new this.Version(e),t.push(n),t.sort(t1),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||eP.letThrough||this._vip)?e():new eS((e,t)=>{if(this._state.openComplete)return t(new J.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new J.DatabaseClosed);this.open().catch(et)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});let i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:t,level:null==n?10:n,name:r}),i.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>n?e.create!==n:!!t&&e.name!==t)),this}open(){return function(e){var t;let n=e._state,{indexedDB:r}=e._deps;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then(()=>n.dbOpenError?te(n.dbOpenError):e);N&&(n.openCanceller._stackHolder=$()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;let i=n.openCanceller;function a(){if(n.openCanceller!==i)throw new J.DatabaseClosed("db.open() was cancelled")}let o=n.dbReadyResolve,l=null,u=!1,c=()=>new eS((t,i)=>{if(a(),!r)throw new J.MissingAPI;let o=e.name,c=n.autoSchema?r.open(o):r.open(o,Math.round(10*e.verno));if(!c)throw new J.MissingAPI;c.onerror=tM(i),c.onblocked=eV(e._fireOnBlocked),c.onupgradeneeded=eV(t=>{if(l=c.transaction,n.autoSchema&&!e._options.allowEmptyDB){c.onerror=tN,l.abort(),c.result.close();let e=r.deleteDatabase(o);e.onsuccess=e.onerror=eV(()=>{i(new J.NoSuchDatabase(`Database ${o} doesnt exist`))})}else{l.onerror=tM(i);var a=t.oldVersion>0x4000000000000000?0:t.oldVersion;u=a<1,e._novip.idbdb=c.result,function(e,t,n,r){let i=e._dbSchema,a=e._createTransaction("readwrite",e._storeNames,i);a.create(n),a._completion.catch(r);let o=a._reject.bind(a),l=eP.transless||eP;eX(()=>
1{eP.trans=a,eP.transless=l,0===t?(s(i).forEach(e=>{t6(n,e,i[e].primKey,i[e].indexes)}),tJ(e,n),eS.follow(()=>e.on.populate.fire(a)).catch(o)):(function({_novip:e},t,n,r){let i=[],a=e._versions,o=e._dbSchema=t2(e,e.idbdb,r),l=!1;return a.filter(e=>e._cfg.version>=t).forEach(a=>{i.push(()=>{let i=o,u=a._cfg.dbschema;t5(e,i,r),t5(e,u,r),o=e._dbSchema=u;let c=t3(i,u);c.add.forEach(e=>{t6(r,e[0],e[1].primKey,e[1].indexes)}),c.change.forEach(e=>{if(e.recreate)throw new J.Upgrade("Not yet support for changing primary key");{let t=r.objectStore(e.name);e.add.forEach(e=>t9(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),t9(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let h=a._cfg.contentUpgrade;if(h&&a._cfg.version>t){let t;tJ(e,r),n._memoizedTables={},l=!0;let a=E(u);c.del.forEach(e=>{a[e]=i[e]}),t0(e,[e.Transaction.prototype]),tZ(e,[e.Transaction.prototype],s(a),a),n.schema=a;let o=M(h);o&&eJ();let d=eS.follow(()=>{if((t=h(n))&&o){var e=eZ.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?eS.resolve(t):d.then(()=>t)}}),i.push(t=>{l&&to||function(e,t){[].slice.call(t.db.objectStoreNames).forEach(n=>null==e[n]&&t.db.deleteObjectStore(n))}(a._cfg.dbschema,t),t0(e,[e.Transaction.prototype]),tZ(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema})}),(function e(){return i.length?eS.resolve(i.shift()(n.idbtrans)).then(e):eS.resolve()})().then(()=>{var e;s(e=o).forEach(t=>{r.db.objectStoreNames.contains(t)||t6(r,t,e[t].primKey,e[t].indexes)})})})(e,t,a,n).catch(o)})}(e,a/10,l,i)}},i),c.onsuccess=eV(()=>{l=null;let r=e._novip.idbdb=c.result,i=v(r.objectStoreNames);if(i.length>0)try{let t=r.transaction(1===i.length?i[0]:i,"readonly");n.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;let r=e._dbSchema=t2(0,t,n);e._storeNames=v(t.objectStoreNames,0),tZ(e,[e._allTables],s(r),r)}(e,r,t):(t5(e,e._dbSchema,t),function(e,t){let n=t3(t2(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some(e=>e.add.length||e.change.length))}(e,t)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),tJ(e,t)}catch(e){}ta.push(e),r.onversionchange=eV(t=>{n.vcFired=!0,e.on("versionchange").fire(t)}),r.onclose=eV(t=>{e.on("close").fire(t)}),u&&function({indexedDB:e,IDBKeyRange:t},n){t7(e)||n===tu||t4(e,t).put({name:n}).catch(et)}(e._deps,o),t()},i)}).catch(e=>e&&"UnknownError"===e.name&&n.PR1398_maxLoop>0?(n.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),c()):eS.reject(e));return eS.race([i,("undefined"==typeof navigator?eS.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(c)]).then(()=>(a(),n.onReadyBeingFired=[],eS.resolve(ne(()=>e.on.ready.fire(e.vip))).then(function t(){if(n.onReadyBeingFired.length>0){let r=n.onReadyBeingFired.reduce(eu,et);return n.onReadyBeingFired=[],eS.resolve(ne(()=>r(e.vip))).then(t)}}))).finally(()=>{n.onReadyBeingFired=null,n.isBeingOpened=!1}).then(()=>e).catch(t=>{n.dbOpenError=t;try{l&&l.abort()}catch(e){}return i===n.openCanceller&&e._close(),te(t)}).finally(()=>{n.openComplete=!0,o()})}(this)}_close(){let e=this._state,t=ta.indexOf(this);if(t>=0&&ta.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new eS(t=>{e.dbReadyResolve=t}),e.openCanceller=new eS((t,n)=>{e.cancelOpen=n})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new J.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new eS((n,r)=>{let i=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=eV(()=>{(function({indexedDB:e,IDBKeyRange:t},n){t7(e)||n===tu||t4(e,t).delete(n).catch(et)})(this._deps,this.name),n()}),e.onerror=tM(r),e.onblocked=this._fireOnBlocked};if(e)throw new J.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(i):i()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return s(this._allTables).map(e=>this._allTables[e])}transaction(){let e=nn.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r,i,s=eP.trans;s&&s.db===this&&-1===e.indexOf("!")||(s=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(i=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===tc)r=tc;else{if("rw"!=e&&e!=th)throw new J.InvalidArgument("Invalid transaction mode: "+e);r=th}if(s){if(s.mode===tc&&r===th){if(!a)throw new J.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");s=null}
1s&&i.forEach(e=>{if(s&&-1===s.storeNames.indexOf(e)){if(!a)throw new J.SubTransaction("Table "+e+" not included in parent transaction.");s=null}}),a&&s&&!s.active&&(s=null)}}catch(e){return s?s._promise(null,(t,n)=>{n(e)}):te(e)}let o=(function e(t,n,r,i,s){return eS.resolve().then(()=>{let a;let o=eP.transless||eP,l=t._createTransaction(n,r,t._dbSchema,i);if(i)l.idbtrans=i.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===X.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,n,r,null,s))):te(i)}let u=M(s);u&&eJ();let c=eS.follow(()=>{if(a=s.call(l,l)){if(u){var e=eZ.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=nt(a))}},{trans:l,transless:o});return(a&&"function"==typeof a.then?eS.resolve(a).then(e=>l.active?e:te(new J.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(i&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),te(e)))})}).bind(null,this,r,i,s,n);return s?s._promise(r,o,"lock"):eP.trans?e2(eP.transless,()=>this._whenReady(o)):this._whenReady(o)}table(e){if(!c(this._allTables,e))throw new J.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let nv="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class nb{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[nv](){return this}}function n_(e,t){return s(t).forEach(n=>{nd(e[n]||(e[n]=new nc),t[n])}),e}try{r={indexedDB:i.indexedDB||i.mozIndexedDB||i.webkitIndexedDB||i.msIndexedDB,IDBKeyRange:i.IDBKeyRange||i.webkitIDBKeyRange}}catch(e){r={indexedDB:null,IDBKeyRange:null}}function nw(e){let t=nC;try{nC=!0,t$.storagemutated.fire(e)}finally{nC=t}}h(ng,{...ee,delete:e=>new ng(e,{addons:[]}).delete(),exists:e=>new ng(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return t7(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==tu)):t4(e,t).toCollection().primaryKeys()})(ng.dependencies).then(e)}catch(e){return te(new J.MissingAPI)}},defineClass:()=>function(e){o(this,e)},ignoreTransaction:e=>eP.trans?e2(eP.transless,e):e(),vip:ne,async:function(e){return function(){try{var t=nt(e.apply(this,arguments));return t&&"function"==typeof t.then?t:eS.resolve(t)}catch(e){return te(e)}}},spawn:function(e,t,n){try{var r=nt(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:eS.resolve(r)}catch(e){return te(e)}},currentTransaction:{get:()=>eP.trans||null},waitFor:function(e,t){let n=eS.resolve("function"==typeof e?ng.ignoreTransaction(e):e).timeout(t||6e4);return eP.trans?eP.trans.waitFor(n):n},Promise:eS,debug:{get:()=>N,set:e=>{N=e,q="dexie"===e?()=>!0:tl}},derive:p,extend:o,props:h,override:b,Events:tm,on:t$,liveQuery:function(e){let t,n=!1,r=new nb(r=>{let i=M(e),a=!1,o={},l={},u={get closed(){return a},unsubscribe:()=>{a=!0,t$.storagemutated.unsubscribe(f)}};r.start&&r.start(u);let c=!1,h=!1;function d(){return s(l).some(e=>o[e]&&function(e,t){let n=nf(t),r=n.next();if(r.done)return!1;let i=r.value,s=nf(e),a=s.next(i.from),o=a.value;for(;!r.done&&!a.done;){if(0>=tE(o.from,i.to)&&tE(o.to,i.from)>=0)return!0;0>tE(i.from,o.from)?i=(r=n.next(o.from)).value:o=(a=s.next(i.from)).value}return!1}(o[e],l[e]))}let f=e=>{n_(o,e),d()&&p()},p=()=>{if(c||a)return;o={};let s={},y=function(t){i&&eJ();let n=()=>eX(e,{subscr:t,trans:null}),r=eP.trans?e2(eP.transless,n):n();return i&&r.then(eZ,eZ),r}(s);h||(t$(tq,f),h=!0),c=!0,Promise.resolve(y).then(e=>{n=!0,t=e,c=!1,a||(d()?p():(o={},l=s,r.next&&r.next(e)))},e=>{c=!1,n=!1,r.error&&r.error(e),u.unsubscribe()})};return p(),u});return r.hasValue=()=>n,r.getValue=()=>t,r},extendObservabilitySet:n_,getByKeyPath:x,setByKeyPath:k,delByKeyPath:function(e,t){"string"==typeof t?k(e,t,void 0):"length"in t&&[].map.call(t,function(t){k(e,t,void 0)})},shallowClone:E,deepClone:S,getObjectDiff:ns,cmp:tE,asap:w,minKey:tr,addons:[],connections:ta,errnames:X,dependencies:r,semVer:tt,version:tt.split(".").map(e=>
1parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),ng.maxKey=tY(ng.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(t$(tq,e=>{if(!nC){let t;to?(t=document.createEvent("CustomEvent")).initCustomEvent(tU,!0,!0,e):t=new CustomEvent(tU,{detail:e}),nC=!0,dispatchEvent(t),nC=!1}}),addEventListener(tU,({detail:e})=>{nC||nw(e)}));let nC=!1;if("undefined"!=typeof BroadcastChannel){let e=new BroadcastChannel(tU);"function"==typeof e.unref&&e.unref(),t$(tq,t=>{nC||e.postMessage(t)}),e.onmessage=e=>{e.data&&nw(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){t$(tq,e=>{try{nC||("undefined"!=typeof localStorage&&localStorage.setItem(tU,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:tU,changedParts:e})))}catch(e){}}),"undefined"!=typeof addEventListener&&addEventListener("storage",e=>{if(e.key===tU){let t=JSON.parse(e.newValue);t&&nw(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===tU&&nw(e.changedParts)})}eS.rejectionMapper=function(e,t){if(!e||e instanceof Y||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Z[e.name])return e;var n=new Z[e.name](t||e.message,e);return"stack"in e&&f(n,"stack",{get:function(){return this.inner.stack}}),n},q=tl},79737:(e,t,n)=>{"use strict";let r;n.d(t,{A:()=>o});let i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},s=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));let o=function(e,t,n){if(i.randomUUID&&!t&&!e)return i.randomUUID();let o=(e=e||{}).random??e.rng?.()??function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(s)}();if(o.length<16)throw Error("Random bytes length must be >= 16");if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=o[e];return t}return function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(o)}},80849:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,s;let a=null;function o(...e){if(!o.enabled)return;let r=Number(new Date);o.diff=r-(n||r),o.prev=n,o.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,r)=>{if("%%"===n)return"%";i++;let s=t.formatters[r];if("function"==typeof s){let t=e[i];n=s.call(o,t),e.splice(i,1),i--}return n}),t.formatArgs.call(o,e),(o.log||t.log).apply(o,e)}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=r,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(o),o}function r(e,n){let r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e,t){let n=0,r=0,i=-1,s=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(i=r,s=n):n++,r++;else{if(-1===i)return!1;r=i+1,n=++s}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){for(let n of(t.save(e),t.namespaces=e,t.names=[],t.skips=[],("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean)))"-"===n[0]?t.skips.push(n.slice(1)):t.names.push(n)},t.enabled=function(e){for(let n of t.skips)if(i(e,n))return!1;for(let n of t.names)if(i(e,n))return!0;return!1},t.humanize=n(1272),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t)|0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.