import{c as si,g as ci}from"./react-vendor-CqRd3GwO.js";import{R as zn}from"./router-vendor-D4by-_6Z.js";var Yn={exports:{}},li=Yn.exports,_r;function fi(){return _r||(_r=1,(function(Y,X){(function(re,A){Y.exports=A()})(li,function(){var re=function(e,n){return(re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])})(e,n)},A=function(){return(A=Object.assign||function(e){for(var n,t=1,r=arguments.length;t"u"||$.Promise||($.Promise=Promise);var ie=Object.getPrototypeOf,dn={}.hasOwnProperty;function z(e,n){return dn.call(e,n)}function ye(e,n){typeof n=="function"&&(n=n(ie(e))),(typeof Reflect>"u"?W:Reflect.ownKeys)(n).forEach(function(t){ve(e,t,n[t])})}var pn=Object.defineProperty;function ve(e,n,t,r){pn(e,n,ee(t&&z(t,"get")&&typeof t.get=="function"?{get:t.get,set:t.set,configurable:!0}:{value:t,configurable:!0,writable:!0},r))}function Fe(e){return{from:function(n){return e.prototype=Object.create(n.prototype),ve(e.prototype,"constructor",e),{extend:ye.bind(null,e.prototype)}}}}var Pr=Object.getOwnPropertyDescriptor,Er=[].slice;function yn(e,n,t){return Er.call(e,n,t)}function It(e,n){return n(e)}function Xe(e){if(!e)throw new Error("Assertion Failed")}function Tt(e){$.setImmediate?setImmediate(e):setTimeout(e,0)}function fe(e,n){if(typeof n=="string"&&z(e,n))return e[n];if(!n)return e;if(typeof n!="string"){for(var t=[],r=0,i=n.length;r"u"?[]:(function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,ie(e),e];var n=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[n,ie(n),e]})(),en=Ke[0],ue=Ke[1],Ke=Ke[2],ue=ue&&ue.then,je=en&&en.constructor,Hn=!!Ke,nn=function(e,n){tn.push([e,n]),gn&&(queueMicrotask(Fr),gn=!1)},Jn=!0,gn=!0,Ce=[],bn=[],Zn=Je,me={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:F,pgp:!1,env:{},finalize:F},j=me,tn=[],Ae=0,wn=[];function S(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var n=this._PSD=j;if(typeof e!="function"){if(e!==Ze)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&nt(this,this._value))}this._state=null,this._value=null,++n.ref,(function t(r,i){try{i(function(o){if(r._state===null){if(o===r)throw new TypeError("A promise cannot be resolved with itself.");var a=r._lib&&Ue();o&&typeof o.then=="function"?t(r,function(u,c){o instanceof S?o._then(u,c):o.then(u,c)}):(r._state=!0,r._value=o,Vt(r)),a&&Ve()}},nt.bind(null,r))}catch(o){nt(r,o)}})(this,e)}var et={get:function(){var e=j,n=On;function t(r,i){var o=this,a=!e.global&&(e!==j||n!==On),u=a&&!be(),c=new S(function(l,p){tt(o,new Ut(Yt(r,e,a,u),Yt(i,e,a,u),l,p,e))});return this._consoleTask&&(c._consoleTask=this._consoleTask),c}return t.prototype=Ze,t},set:function(e){ve(this,"then",e&&e.prototype===Ze?et:{get:function(){return e},set:et.set})}};function Ut(e,n,t,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof n=="function"?n:null,this.resolve=t,this.reject=r,this.psd=i}function nt(e,n){var t,r;bn.push(n),e._state===null&&(t=e._lib&&Ue(),n=Zn(n),e._state=!1,e._value=n,r=e,Ce.some(function(i){return i._value===r._value})||Ce.push(r),Vt(e),t&&Ve())}function Vt(e){var n=e._listeners;e._listeners=[];for(var t=0,r=n.length;t.",Wt="String expected.",Ye=[],En="__dbnames",ot="readonly",at="readwrite";function Te(e,n){return e?n?function(){return e.apply(this,arguments)&&n.apply(this,arguments)}:e:n}var $t={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Sn(e){return typeof e!="string"||/\./.test(e)?function(n){return n}:function(n){return n[e]===void 0&&e in n&&delete(n=Pe(n))[e],n}}function Qt(){throw C.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function B(e,n){try{var t=Gt(e),r=Gt(n);if(t!==r)return t==="Array"?1:r==="Array"?-1:t==="binary"?1:r==="binary"?-1:t==="string"?1:r==="string"?-1:t==="Date"?1:r!=="Date"?NaN:-1;switch(t){case"number":case"Date":case"string":return ng+b&&y(g+c)})})}var m=We(t)&&t.limit===1/0&&(typeof e!="function"||h)&&{index:t.index,range:t.range};return y(0).then(function(){if(0=v})).length!==0?(p.forEach(function(m){d.push(function(){var g=y,b=m._cfg.dbschema;Bn(s,g,h),Bn(s,b,h),y=s._dbSchema=b;var w=pt(g,b);w.add.forEach(function(E){yt(h,E[0],E[1].primKey,E[1].indexes)}),w.change.forEach(function(E){if(E.recreate)throw new C.Upgrade("Not yet support for changing primary key");var O=h.objectStore(E.name);E.add.forEach(function(K){return Tn(O,K)}),E.change.forEach(function(K){O.deleteIndex(K.name),Tn(O,K)}),E.del.forEach(function(K){return O.deleteIndex(K)})});var x=m._cfg.contentUpgrade;if(x&&m._cfg.version>v){Dn(s,h),f._memoizedTables={};var P=qt(b);w.del.forEach(function(E){P[E]=g[E]}),dt(s,[s.Transaction.prototype]),In(s,[s.Transaction.prototype],W(P),P),f.schema=P;var _,k=Qn(x);return k&&ze(),w=S.follow(function(){var E;(_=x(f))&&k&&(E=be.bind(null,null),_.then(E,E))}),_&&typeof _.then=="function"?S.resolve(_):w.then(function(){return _})}}),d.push(function(g){var b,w,x=m._cfg.dbschema;b=x,w=g,[].slice.call(w.db.objectStoreNames).forEach(function(P){return b[P]==null&&w.db.deleteObjectStore(P)}),dt(s,[s.Transaction.prototype]),In(s,[s.Transaction.prototype],s._storeNames,s._dbSchema),f.schema=s._dbSchema}),d.push(function(g){s.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(s.idbdb.version/10)===m._cfg.version?(s.idbdb.deleteObjectStore("$meta"),delete s._dbSchema.$meta,s._storeNames=s._storeNames.filter(function(b){return b!=="$meta"})):g.objectStore("$meta").put(m._cfg.version,"version"))})}),(function m(){return d.length?S.resolve(d.shift()(f.idbtrans)).then(m):S.resolve()})().then(function(){ur(y,h)})):S.resolve();var s,v,f,h,d,y}).catch(a)):(W(i).forEach(function(p){yt(t,p,i[p].primKey,i[p].indexes)}),Dn(e,t),void S.follow(function(){return e.on.populate.fire(o)}).catch(a));var c,l})}function Hr(e,n){ur(e._dbSchema,n),n.db.version%10!=0||n.objectStoreNames.contains("$meta")||n.db.createObjectStore("$meta").add(Math.ceil(n.db.version/10-1),"version");var t=qn(0,e.idbdb,n);Bn(e,e._dbSchema,n);for(var r=0,i=pt(t,e._dbSchema).change;rMath.pow(2,62)?0:y.oldVersion,s=y<1,e.idbdb=d.result,o&&Hr(e,p),Xr(e,y/10,p,f))},f),d.onsuccess=L(function(){p=null;var y,m,g,b,w,x=e.idbdb=d.result,P=yn(x.objectStoreNames);if(0"u"?S.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(v){function f(){return indexedDB.databases().finally(v)}c=setInterval(f,100),f()}).finally(function(){return clearInterval(c)}):Promise.resolve()).then(u)]).then(function(){return a(),n.onReadyBeingFired=[],S.resolve(gt(function(){return e.on.ready.fire(e.vip)})).then(function v(){if(0n.limit?v.length=n.limit:e.length===n.limit&&v.length=m.limit&&(!m.values||x.req.values)&&ii(x.req.query.range,m.query.range)}),!1,g,b];case"count":return w=b.find(function(x){return gr(x.req.query.range,m.query.range)}),[w,!!w,g,b]}})(n,t,"query",o),p=l[0],s=l[1],v=l[2],f=l[3];return p&&s?p.obsSet=o.obsSet:(s=r.query(o).then(function(h){var d=h.result;if(p&&(p.res=d),a){for(var y=0,m=d.length;y{let X;const re=new Set,A=(ie,dn)=>{const z=typeof ie=="function"?ie(X):ie;if(!Object.is(z,X)){const ye=X;X=dn??(typeof z!="object"||z===null)?z:Object.assign({},X,z),re.forEach(pn=>pn(X,ye))}},Oe=()=>X,M={setState:A,getState:Oe,getInitialState:()=>ee,subscribe:ie=>(re.add(ie),()=>re.delete(ie))},ee=X=Y(A,Oe,M);return M},di=(Y=>Y?kr(Y):kr),pi=Y=>Y;function yi(Y,X=pi){const re=zn.useSyncExternalStore(Y.subscribe,zn.useCallback(()=>X(Y.getState()),[Y,X]),zn.useCallback(()=>X(Y.getInitialState()),[Y,X]));return zn.useDebugValue(re),re}const Or=Y=>{const X=di(Y),re=A=>yi(X,A);return Object.assign(re,X),re},ji=(Y=>Y?Or(Y):Or);export{Dt as D,ji as c};