diff --git a/assets/FileSaver.min-566f6faf.js b/assets/FileSaver.min-f13353ab.js similarity index 95% rename from assets/FileSaver.min-566f6faf.js rename to assets/FileSaver.min-f13353ab.js index 868a62d1c2..39fc1fe130 100644 --- a/assets/FileSaver.min-566f6faf.js +++ b/assets/FileSaver.min-f13353ab.js @@ -1 +1 @@ -import{aA as A,c as d}from"./index-65239185.js";function O(u,v){for(var l=0;lr[c]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(u,v){(function(l,r){r()})(d,function(){function l(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){p(o.response,t,i)},o.onerror=function(){},o.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof d=="object"&&d.global===d?d:void 0,y=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!y?function(e,t,i){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?s(n):c(n.href)?r(e,t,i):s(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){s(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(l(e,i),t);else if(c(e))r(e,t,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){s(o)})}}:function(e,t,i,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var n=e.type==="application/octet-stream",g=/constructor/i.test(a.HTMLElement)||a.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||n&&g||y)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var f=m.result;f=b?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=f:location=f,o=null},m.readAsDataURL(e)}else{var j=a.URL||a.webkitURL,w=j.createObjectURL(e);o?o.location=w:location.href=w,o=null,setTimeout(function(){j.revokeObjectURL(w)},4e4)}});a.saveAs=p.saveAs=p,u.exports=p})})(E);var h=E.exports;const L=A(h),S=O({__proto__:null,default:L},[h]);export{S as F}; +import{aC as O,c as d}from"./index-495d39df.js";function A(u,v){for(var l=0;lr[c]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(u,v){(function(l,r){r()})(d,function(){function l(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){p(o.response,t,i)},o.onerror=function(){},o.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof d=="object"&&d.global===d?d:void 0,y=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!y?function(e,t,i){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?s(n):c(n.href)?r(e,t,i):s(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){s(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(l(e,i),t);else if(c(e))r(e,t,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){s(o)})}}:function(e,t,i,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var n=e.type==="application/octet-stream",g=/constructor/i.test(a.HTMLElement)||a.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||n&&g||y)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var f=m.result;f=b?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=f:location=f,o=null},m.readAsDataURL(e)}else{var j=a.URL||a.webkitURL,w=j.createObjectURL(e);o?o.location=w:location.href=w,o=null,setTimeout(function(){j.revokeObjectURL(w)},4e4)}});a.saveAs=p.saveAs=p,u.exports=p})})(E);var h=E.exports;const L=O(h),S=A({__proto__:null,default:L},[h]);export{S as F}; diff --git a/assets/dexie-export-import-857980f3.js b/assets/dexie-export-import-aa62d1f6.js similarity index 91% rename from assets/dexie-export-import-857980f3.js rename to assets/dexie-export-import-aa62d1f6.js index 36f19bb6f4..b7dcee1403 100644 --- a/assets/dexie-export-import-857980f3.js +++ b/assets/dexie-export-import-aa62d1f6.js @@ -1,4 +1,4 @@ -import{aB as Ce}from"./index-65239185.js";/*! ***************************************************************************** +import{aD as Ce}from"./index-495d39df.js";/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -11,18 +11,18 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */function Qe(b,h,c,v){function w(p){return p instanceof c?p:new c(function(o){o(p)})}return new(c||(c=Promise))(function(p,o){function j(N){try{s(v.next(N))}catch(J){o(J)}}function I(N){try{s(v.throw(N))}catch(J){o(J)}}function s(N){N.done?p(N.value):w(N.value).then(j,I)}s((v=v.apply(b,h||[])).next())})}function Me(b,h){var c={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},v,w,p,o;return o={next:j(0),throw:j(1),return:j(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function j(s){return function(N){return I([s,N])}}function I(s){if(v)throw new TypeError("Generator is already executing.");for(;c;)try{if(v=1,w&&(p=s[0]&2?w.return:s[0]?w.throw||((p=w.return)&&p.call(w),0):w.next)&&!(p=p.call(w,s[1])).done)return p;switch(w=0,p&&(s=[s[0]&2,p.value]),s[0]){case 0:case 1:p=s;break;case 4:return c.label++,{value:s[1],done:!1};case 5:c.label++,w=s[1],s=[0];continue;case 7:s=c.ops.pop(),c.trys.pop();continue;default:if(p=c.trys,!(p=p.length>0&&p[p.length-1])&&(s[0]===6||s[0]===2)){c=0;continue}if(s[0]===3&&(!p||s[1]>p[0]&&s[1]"u")throw new Error("FileReaderSync missing. Reading blobs synchronously requires code to run from within a web worker. Use TSON.encapsulateAsync() to do it from the main thread.");var c=new FileReaderSync,v=h==="binary"?c.readAsArrayBuffer(b):c.readAsText(b);return v}var yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ht(b,h){return h={exports:{}},b(h,h.exports),h.exports}var ct=ht(function(b,h){(function(c,v){b.exports=v()})(yt,function(){function c(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?c=function(y){return typeof y}:c=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},c(f)}function v(f,y,d,m,E,H,Q){try{var Y=f[H](Q),x=Y.value}catch(Ae){d(Ae);return}Y.done?y(x):Promise.resolve(x).then(m,E)}function w(f){return function(){var y=this,d=arguments;return new Promise(function(m,E){var H=f.apply(y,d);function Q(x){v(H,m,E,Q,Y,"next",x)}function Y(x){v(H,m,E,Q,Y,"throw",x)}Q(void 0)})}}function p(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}function o(f,y){for(var d=0;d-1){var m=f[ye(y.slice(0,d))];return m===void 0?void 0:he(m,y.slice(d+1))}return f[ye(y)]}function te(f,y,d){if(y==="")return d;var m=y.indexOf(".");if(m>-1){var E=f[ye(y.slice(0,m))];return te(E,y.slice(m+1),d)}return f[ye(y)]=d,f}function ke(f){return f===null?"null":Array.isArray(f)?"array":c(f)}var Ue=Object.keys,Pe=Array.isArray,$e={}.hasOwnProperty,Ze=["type","replaced","iterateIn","iterateUnsetNumeric"];function U(f,y){if(f.keypath==="")return-1;var d=f.keypath.match(/\./g)||0,m=y.keypath.match(/\./g)||0;return d&&(d=d.length),m&&(m=m.length),d>m?-1:dy.keypath}var re=function(){function f(y){p(this,f),this.options=y,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return j(f,[{key:"stringify",value:function(d,m,E,H){H=N({},this.options,{},H,{stringification:!0});var Q=this.encapsulate(d,null,H);return Pe(Q)?JSON.stringify(Q[0],m,E):Q.then(function(Y){return JSON.stringify(Y,m,E)})}},{key:"stringifySync",value:function(d,m,E,H){return this.stringify(d,m,E,N({throwOnBadSyncType:!0},H,{sync:!0}))}},{key:"stringifyAsync",value:function(d,m,E,H){return this.stringify(d,m,E,N({throwOnBadSyncType:!0},H,{sync:!1}))}},{key:"parse",value:function(d,m,E){return E=N({},this.options,{},E,{parse:!0}),this.revive(JSON.parse(d,m),E)}},{key:"parseSync",value:function(d,m,E){return this.parse(d,m,N({throwOnBadSyncType:!0},E,{sync:!0}))}},{key:"parseAsync",value:function(d,m,E){return this.parse(d,m,N({throwOnBadSyncType:!0},E,{sync:!1}))}},{key:"specialTypeNames",value:function(d,m){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.returnTypeNames=!0,this.encapsulate(d,m,E)}},{key:"rootTypeName",value:function(d,m){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.iterateNone=!0,this.encapsulate(d,m,E)}},{key:"encapsulate",value:function(d,m,E){E=N({sync:!0},this.options,{},E);var H=E,Q=H.sync,Y=this,x={},Ae=[],Ie=[],Le=[],Ge="cyclic"in E?E.cyclic:!0,Ye=E,We=Ye.encapsulateObserver,Re=ae("",d,Ge,m||{},Le);function qe(B){var n=Object.values(x);if(E.iterateNone)return n.length?n[0]:f.getJSONType(B);if(n.length){if(E.returnTypeNames)return je(new Set(n));!B||!l(B)||$e.call(B,"$types")?B={$:B,$types:{$:x}}:B.$types=x}else z(B)&&$e.call(B,"$types")&&(B={$:B,$types:!0});return E.returnTypeNames?!1:B}function be(B,n){return ie.apply(this,arguments)}function ie(){return ie=w(regeneratorRuntime.mark(function B(n,e){var t;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Promise.all(e.map(function(O){return O[1].p}));case 2:return t=a.sent,a.next=5,Promise.all(t.map(function(){var O=w(regeneratorRuntime.mark(function A(C){var _,R,V,M,ne,X,W,ce,fe,$,Te,P,S,L;return regeneratorRuntime.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(_=[],R=e.splice(0,1),V=J(R,1),M=V[0],ne=J(M,7),X=ne[0],W=ne[2],ce=ne[3],fe=ne[4],$=ne[5],Te=ne[6],P=ae(X,C,W,ce,_,!0,Te),S=g(P,T),!(X&&S)){F.next=11;break}return F.next=8,P.p;case 8:return L=F.sent,fe[$]=L,F.abrupt("return",be(n,_));case 11:return X?fe[$]=P:S?n=P.p:n=P,F.abrupt("return",be(n,_));case 13:case"end":return F.stop()}},A)}));return function(A){return O.apply(this,arguments)}}()));case 5:return a.abrupt("return",n);case 6:case"end":return a.stop()}},B)})),ie.apply(this,arguments)}function ee(B,n,e){Object.assign(B,n);var t=Ze.map(function(i){var a=B[i];return delete B[i],a});e(),Ze.forEach(function(i,a){B[i]=t[a]})}function ae(B,n,e,t,i,a,O){var A,C={},_=c(n),R=We?function(S){var L=O||t.type||f.getJSONType(n);We(Object.assign(S||C,{keypath:B,value:n,cyclic:e,stateObj:t,promisesData:i,resolvingTypesonPromise:a,awaitingTypesonPromise:g(n,T)},{type:L}))}:null;if(["string","boolean","number","undefined"].includes(_))return n===void 0||_==="number"&&(isNaN(n)||n===-1/0||n===1/0)?(t.replaced?A=n:A=me(B,n,t,i,!1,a,R),A!==n&&(C={replaced:A})):A=n,R&&R(),A;if(n===null)return R&&R(),n;if(e&&!t.iterateIn&&!t.iterateUnsetNumeric&&n&&c(n)==="object"){var V=Ae.indexOf(n);if(V<0)e===!0&&(Ae.push(n),Ie.push(B));else return x[B]="#",R&&R({cyclicKeypath:Ie[V]}),"#"+Ie[V]}var M=l(n),ne=Pe(n),X=(M||ne)&&(!Y.plainObjectReplacers.length||t.replaced)||t.iterateIn?n:me(B,n,t,i,M||ne,null,R),W;if(X!==n?(A=X,C={replaced:X}):B===""&&g(n,T)?(i.push([B,n,e,t,void 0,void 0,t.type]),A=n):ne&&t.iterateIn!=="object"||t.iterateIn==="array"?(W=new Array(n.length),C={clone:W}):!["function","symbol"].includes(c(n))&&!("toJSON"in n)&&!g(n,T)&&!g(n,Promise)&&!g(n,ArrayBuffer)||M||t.iterateIn==="object"?(W={},t.addLength&&(W.length=n.length),C={clone:W}):A=n,R&&R(),E.iterateNone)return W||A;if(!W)return A;if(t.iterateIn){var ce=function(L){var k={ownKeys:$e.call(n,L)};ee(t,k,function(){var F=B+(B?".":"")+pe(L),G=ae(F,n[L],!!e,t,i,a);g(G,T)?i.push([F,G,!!e,t,W,L,t.type]):G!==void 0&&(W[L]=G)})};for(var fe in n)ce(fe);R&&R({endIterateIn:!0,end:!0})}else Ue(n).forEach(function(S){var L=B+(B?".":"")+pe(S),k={ownKeys:!0};ee(t,k,function(){var F=ae(L,n[S],!!e,t,i,a);g(F,T)?i.push([L,F,!!e,t,W,S,t.type]):F!==void 0&&(W[S]=F)})}),R&&R({endIterateOwn:!0,end:!0});if(t.iterateUnsetNumeric){for(var $=n.length,Te=function(L){if(!(L in n)){var k=B+(B?".":"")+L,F={ownKeys:!1};ee(t,F,function(){var G=ae(k,void 0,!!e,t,i,a);g(G,T)?i.push([k,G,!!e,t,W,L,t.type]):G!==void 0&&(W[L]=G)})}},P=0;P<$;P++)Te(P);R&&R({endIterateUnsetNumeric:!0,end:!0})}return W}function me(B,n,e,t,i,a,O){for(var A=i?Y.plainObjectReplacers:Y.nonplainObjectReplacers,C=A.length;C--;){var _=A[C];if(_.test(n,e)){var R=_.type;if(Y.revivers[R]){var V=x[B];x[B]=V?[R].concat(V):R}if(Object.assign(e,{type:R,replaced:!0}),(Q||!_.replaceAsync)&&!_.replace)return O&&O({typeDetected:!0}),ae(B,n,Ge&&"readonly",e,t,a,R);O&&O({replacing:!0});var M=Q||!_.replaceAsync?"replace":"replaceAsync";return ae(B,_[M](n,e),Ge&&"readonly",e,t,a,R)}}return n}return Le.length?Q&&E.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(be(Re,Le)).then(qe):!Q&&E.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():E.stringification&&Q?[qe(Re)]:Q?qe(Re):Promise.resolve(qe(Re))}},{key:"encapsulateSync",value:function(d,m,E){return this.encapsulate(d,m,N({throwOnBadSyncType:!0},E,{sync:!0}))}},{key:"encapsulateAsync",value:function(d,m,E){return this.encapsulate(d,m,N({throwOnBadSyncType:!0},E,{sync:!1}))}},{key:"revive",value:function(d,m){var E=d&&d.$types;if(!E)return d;if(E===!0)return d.$;m=N({sync:!0},this.options,{},m);var H=m,Q=H.sync,Y=[],x={},Ae=!0;E.$&&l(E.$)&&(d=d.$,E=E.$,Ae=!1);var Ie=this;function Le(ie,ee){var ae=Ie.revivers[ie]||[],me=J(ae,1),B=me[0];if(!B)throw new Error("Unregistered type: "+ie);return Q&&!("revive"in B)?ee:B[Q&&B.revive?"revive":!Q&&B.reviveAsync?"reviveAsync":"revive"](ee,x)}function Ge(){var ie=[];if(Object.entries(E).forEach(function(ee){var ae=J(ee,2),me=ae[0],B=ae[1];B!=="#"&&[].concat(B).forEach(function(n){var e=Ie.revivers[n]||[null,{}],t=J(e,2),i=t[1].plain;i&&(ie.push({keypath:me,type:n}),delete E[me])})}),!!ie.length)return ie.sort(U).reduce(function ee(ae,me){var B=me.keypath,n=me.type;if(u(ae))return ae.then(function(i){return ee(i,{keypath:B,type:n})});var e=he(d,B);if(e=Le(n,e),g(e,T))return e.then(function(i){var a=te(d,B,i);a===i&&(d=a)});var t=te(d,B,e);t===e&&(d=t)},void 0)}var Ye=[];function We(ie,ee,ae,me,B){if(!(Ae&&ie==="$types")){var n=E[ie],e=Pe(ee);if(e||l(ee)){var t=e?new Array(ee.length):{};for(Ue(ee).forEach(function(V){var M=We(ie+(ie?".":"")+pe(V),ee[V],ae||t,t,V),ne=function(W){return g(W,Se)?t[V]=void 0:W!==void 0&&(t[V]=W),W};g(M,T)?Ye.push(M.then(function(X){return ne(X)})):ne(M)}),ee=t;Y.length;){var i=J(Y[0],4),a=i[0],O=i[1],A=i[2],C=i[3],_=he(a,O);if(_!==void 0)A[C]=_;else break;Y.splice(0,1)}}if(!n)return ee;if(n==="#"){var R=he(ae,ee.slice(1));return R===void 0&&Y.push([ae,ee.slice(1),me,B]),R}return[].concat(n).reduce(function V(M,ne){return g(M,T)?M.then(function(X){return V(X,ne)}):Le(ne,M)},ee)}}function Re(ie){return g(ie,Se)?void 0:ie}var qe=Ge(),be;return g(qe,T)?be=qe.then(function(){return d}):(be=We("",d,null),Ye.length&&(be=T.resolve(be).then(function(ie){return T.all([ie].concat(Ye))}).then(function(ie){var ee=J(ie,1),ae=ee[0];return ae}))),u(be)?Q&&m.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():g(be,T)?be.p.then(Re):be:!Q&&m.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():Q?Re(be):Promise.resolve(Re(be))}},{key:"reviveSync",value:function(d,m){return this.revive(d,N({throwOnBadSyncType:!0},m,{sync:!0}))}},{key:"reviveAsync",value:function(d,m){return this.revive(d,N({throwOnBadSyncType:!0},m,{sync:!1}))}},{key:"register",value:function(d,m){return m=m||{},[].concat(d).forEach(function E(H){var Q=this;if(Pe(H))return H.map(function(Y){return E.call(Q,Y)});H&&Ue(H).forEach(function(Y){if(Y==="#")throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(f.JSON_TYPES.includes(Y))throw new TypeError("Plain JSON object types are reserved as type names");var x=H[Y],Ae=x&&x.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,Ie=Ae.filter(function(ae){return ae.type===Y});if(Ie.length&&(Ae.splice(Ae.indexOf(Ie[0]),1),delete this.revivers[Y],delete this.types[Y]),typeof x=="function"){var Le=x;x={test:function(me){return me&&me.constructor===Le},replace:function(me){return N({},me)},revive:function(me){return Object.assign(Object.create(Le.prototype),me)}}}else if(Pe(x)){var Ge=x,Ye=J(Ge,3),We=Ye[0],Re=Ye[1],qe=Ye[2];x={test:We,replace:Re,revive:qe}}if(!(!x||!x.test)){var be={type:Y,test:x.test.bind(x)};x.replace&&(be.replace=x.replace.bind(x)),x.replaceAsync&&(be.replaceAsync=x.replaceAsync.bind(x));var ie=typeof m.fallback=="number"?m.fallback:m.fallback?0:1/0;if(x.testPlainObjects?this.plainObjectReplacers.splice(ie,0,be):this.nonplainObjectReplacers.splice(ie,0,be),x.revive||x.reviveAsync){var ee={};x.revive&&(ee.revive=x.revive.bind(x)),x.reviveAsync&&(ee.reviveAsync=x.reviveAsync.bind(x)),this.revivers[Y]=[ee,{plain:x.testPlainObjects}]}this.types[Y]=x}},this)},this),this}}]),f}(),Se=function f(){p(this,f)};return Se.__typeson__type__="TypesonUndefined",re.Undefined=Se,re.Promise=T,re.isThenable=u,re.toStringTag=r,re.hasConstructorOf=g,re.isObject=z,re.isPlainObject=l,re.isUserObject=Z,re.escapeKeyPathComponent=pe,re.unescapeKeyPathComponent=ye,re.getByKeyPath=he,re.getJSONType=ke,re.JSON_TYPES=["null","boolean","number","string","array","object"],re})}),_t=ht(function(b,h){(function(c,v){b.exports=v()})(yt,function(){function c(n){return(c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(n)}function v(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function w(n,e){for(var t=0;t0&&p[p.length-1])&&(s[0]===6||s[0]===2)){c=0;continue}if(s[0]===3&&(!p||s[1]>p[0]&&s[1]"u")throw new Error("FileReaderSync missing. Reading blobs synchronously requires code to run from within a web worker. Use TSON.encapsulateAsync() to do it from the main thread.");var c=new FileReaderSync,v=h==="binary"?c.readAsArrayBuffer(b):c.readAsText(b);return v}var yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ht(b,h){return h={exports:{}},b(h,h.exports),h.exports}var ct=ht(function(b,h){(function(c,v){b.exports=v()})(yt,function(){function c(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?c=function(y){return typeof y}:c=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},c(f)}function v(f,y,d,m,E,H,Q){try{var Y=f[H](Q),x=Y.value}catch(Ae){d(Ae);return}Y.done?y(x):Promise.resolve(x).then(m,E)}function w(f){return function(){var y=this,d=arguments;return new Promise(function(m,E){var H=f.apply(y,d);function Q(x){v(H,m,E,Q,Y,"next",x)}function Y(x){v(H,m,E,Q,Y,"throw",x)}Q(void 0)})}}function p(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}function o(f,y){for(var d=0;d-1){var m=f[ye(y.slice(0,d))];return m===void 0?void 0:he(m,y.slice(d+1))}return f[ye(y)]}function te(f,y,d){if(y==="")return d;var m=y.indexOf(".");if(m>-1){var E=f[ye(y.slice(0,m))];return te(E,y.slice(m+1),d)}return f[ye(y)]=d,f}function ke(f){return f===null?"null":Array.isArray(f)?"array":c(f)}var Ue=Object.keys,Pe=Array.isArray,De={}.hasOwnProperty,Ze=["type","replaced","iterateIn","iterateUnsetNumeric"];function U(f,y){if(f.keypath==="")return-1;var d=f.keypath.match(/\./g)||0,m=y.keypath.match(/\./g)||0;return d&&(d=d.length),m&&(m=m.length),d>m?-1:dy.keypath}var re=function(){function f(y){p(this,f),this.options=y,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return j(f,[{key:"stringify",value:function(d,m,E,H){H=N({},this.options,{},H,{stringification:!0});var Q=this.encapsulate(d,null,H);return Pe(Q)?JSON.stringify(Q[0],m,E):Q.then(function(Y){return JSON.stringify(Y,m,E)})}},{key:"stringifySync",value:function(d,m,E,H){return this.stringify(d,m,E,N({throwOnBadSyncType:!0},H,{sync:!0}))}},{key:"stringifyAsync",value:function(d,m,E,H){return this.stringify(d,m,E,N({throwOnBadSyncType:!0},H,{sync:!1}))}},{key:"parse",value:function(d,m,E){return E=N({},this.options,{},E,{parse:!0}),this.revive(JSON.parse(d,m),E)}},{key:"parseSync",value:function(d,m,E){return this.parse(d,m,N({throwOnBadSyncType:!0},E,{sync:!0}))}},{key:"parseAsync",value:function(d,m,E){return this.parse(d,m,N({throwOnBadSyncType:!0},E,{sync:!1}))}},{key:"specialTypeNames",value:function(d,m){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.returnTypeNames=!0,this.encapsulate(d,m,E)}},{key:"rootTypeName",value:function(d,m){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.iterateNone=!0,this.encapsulate(d,m,E)}},{key:"encapsulate",value:function(d,m,E){E=N({sync:!0},this.options,{},E);var H=E,Q=H.sync,Y=this,x={},Ae=[],Ie=[],Le=[],Ge="cyclic"in E?E.cyclic:!0,Ye=E,We=Ye.encapsulateObserver,Re=ae("",d,Ge,m||{},Le);function qe(B){var n=Object.values(x);if(E.iterateNone)return n.length?n[0]:f.getJSONType(B);if(n.length){if(E.returnTypeNames)return je(new Set(n));!B||!l(B)||De.call(B,"$types")?B={$:B,$types:{$:x}}:B.$types=x}else z(B)&&De.call(B,"$types")&&(B={$:B,$types:!0});return E.returnTypeNames?!1:B}function be(B,n){return ie.apply(this,arguments)}function ie(){return ie=w(regeneratorRuntime.mark(function B(n,e){var t;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Promise.all(e.map(function(O){return O[1].p}));case 2:return t=a.sent,a.next=5,Promise.all(t.map(function(){var O=w(regeneratorRuntime.mark(function A(C){var _,R,V,M,ne,X,W,ce,fe,D,Te,P,S,L;return regeneratorRuntime.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(_=[],R=e.splice(0,1),V=J(R,1),M=V[0],ne=J(M,7),X=ne[0],W=ne[2],ce=ne[3],fe=ne[4],D=ne[5],Te=ne[6],P=ae(X,C,W,ce,_,!0,Te),S=g(P,T),!(X&&S)){F.next=11;break}return F.next=8,P.p;case 8:return L=F.sent,fe[D]=L,F.abrupt("return",be(n,_));case 11:return X?fe[D]=P:S?n=P.p:n=P,F.abrupt("return",be(n,_));case 13:case"end":return F.stop()}},A)}));return function(A){return O.apply(this,arguments)}}()));case 5:return a.abrupt("return",n);case 6:case"end":return a.stop()}},B)})),ie.apply(this,arguments)}function ee(B,n,e){Object.assign(B,n);var t=Ze.map(function(i){var a=B[i];return delete B[i],a});e(),Ze.forEach(function(i,a){B[i]=t[a]})}function ae(B,n,e,t,i,a,O){var A,C={},_=c(n),R=We?function(S){var L=O||t.type||f.getJSONType(n);We(Object.assign(S||C,{keypath:B,value:n,cyclic:e,stateObj:t,promisesData:i,resolvingTypesonPromise:a,awaitingTypesonPromise:g(n,T)},{type:L}))}:null;if(["string","boolean","number","undefined"].includes(_))return n===void 0||_==="number"&&(isNaN(n)||n===-1/0||n===1/0)?(t.replaced?A=n:A=me(B,n,t,i,!1,a,R),A!==n&&(C={replaced:A})):A=n,R&&R(),A;if(n===null)return R&&R(),n;if(e&&!t.iterateIn&&!t.iterateUnsetNumeric&&n&&c(n)==="object"){var V=Ae.indexOf(n);if(V<0)e===!0&&(Ae.push(n),Ie.push(B));else return x[B]="#",R&&R({cyclicKeypath:Ie[V]}),"#"+Ie[V]}var M=l(n),ne=Pe(n),X=(M||ne)&&(!Y.plainObjectReplacers.length||t.replaced)||t.iterateIn?n:me(B,n,t,i,M||ne,null,R),W;if(X!==n?(A=X,C={replaced:X}):B===""&&g(n,T)?(i.push([B,n,e,t,void 0,void 0,t.type]),A=n):ne&&t.iterateIn!=="object"||t.iterateIn==="array"?(W=new Array(n.length),C={clone:W}):!["function","symbol"].includes(c(n))&&!("toJSON"in n)&&!g(n,T)&&!g(n,Promise)&&!g(n,ArrayBuffer)||M||t.iterateIn==="object"?(W={},t.addLength&&(W.length=n.length),C={clone:W}):A=n,R&&R(),E.iterateNone)return W||A;if(!W)return A;if(t.iterateIn){var ce=function(L){var k={ownKeys:De.call(n,L)};ee(t,k,function(){var F=B+(B?".":"")+pe(L),G=ae(F,n[L],!!e,t,i,a);g(G,T)?i.push([F,G,!!e,t,W,L,t.type]):G!==void 0&&(W[L]=G)})};for(var fe in n)ce(fe);R&&R({endIterateIn:!0,end:!0})}else Ue(n).forEach(function(S){var L=B+(B?".":"")+pe(S),k={ownKeys:!0};ee(t,k,function(){var F=ae(L,n[S],!!e,t,i,a);g(F,T)?i.push([L,F,!!e,t,W,S,t.type]):F!==void 0&&(W[S]=F)})}),R&&R({endIterateOwn:!0,end:!0});if(t.iterateUnsetNumeric){for(var D=n.length,Te=function(L){if(!(L in n)){var k=B+(B?".":"")+L,F={ownKeys:!1};ee(t,F,function(){var G=ae(k,void 0,!!e,t,i,a);g(G,T)?i.push([k,G,!!e,t,W,L,t.type]):G!==void 0&&(W[L]=G)})}},P=0;Pn.length)&&(e=n.length);for(var t=0,i=new Array(e);t"u"||!(Symbol.iterator in Object(i)))){var O=[],A=!0,C=!1,_=void 0;try{for(var R,V=i[Symbol.iterator]();!(A=(R=V.next()).done)&&(O.push(R.value),!a||O.length!==a);A=!0);}catch(M){C=!0,_=M}finally{try{A||V.return==null||V.return()}finally{if(C)throw _}}return O}}(n,e)||xe(n,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function se(n){return function(t){if(Array.isArray(t))return de(t)}(n)||function(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}(n)||xe(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xe(n,e){if(n){if(typeof n=="string")return de(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?de(n,e):void 0}}function de(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);t-1){var i=n[z(e.slice(0,t))];return i===void 0?void 0:pe(i,e.slice(t+1))}return n[z(e)]}function ye(n,e,t){if(e==="")return t;var i=e.indexOf(".");return i>-1?ye(n[z(e.slice(0,i))],e.slice(i+1),t):(n[z(e)]=t,n)}function he(n,e,t){return t?e?e(n):n:(n&&n.then||(n=Promise.resolve(n)),e?n.then(e):n)}var te=Object.keys,ke=Array.isArray,Ue={}.hasOwnProperty,Pe=["type","replaced","iterateIn","iterateUnsetNumeric"];function $e(n){return function(){for(var e=[],t=0;ti?-1:te.keypath}var U=function(){function n(e){N(this,n),this.options=e,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return function(t,i,a){return i&&J(t.prototype,i),a&&J(t,a),t}(n,[{key:"stringify",value:function(t,i,a,O){O=K(K(K({},this.options),O),{},{stringification:!0});var A=this.encapsulate(t,null,O);return ke(A)?JSON.stringify(A[0],i,a):A.then(function(C){return JSON.stringify(C,i,a)})}},{key:"stringifySync",value:function(t,i,a,O){return this.stringify(t,i,a,K(K({throwOnBadSyncType:!0},O),{},{sync:!0}))}},{key:"stringifyAsync",value:function(t,i,a,O){return this.stringify(t,i,a,K(K({throwOnBadSyncType:!0},O),{},{sync:!1}))}},{key:"parse",value:function(t,i,a){return a=K(K(K({},this.options),a),{},{parse:!0}),this.revive(JSON.parse(t,i),a)}},{key:"parseSync",value:function(t,i,a){return this.parse(t,i,K(K({throwOnBadSyncType:!0},a),{},{sync:!0}))}},{key:"parseAsync",value:function(t,i,a){return this.parse(t,i,K(K({throwOnBadSyncType:!0},a),{},{sync:!1}))}},{key:"specialTypeNames",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return a.returnTypeNames=!0,this.encapsulate(t,i,a)}},{key:"rootTypeName",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return a.iterateNone=!0,this.encapsulate(t,i,a)}},{key:"encapsulate",value:function(t,i,a){var O=$e(function(P,S){return he(Promise.all(S.map(function(L){return L[1].p})),function(L){return he(Promise.all(L.map($e(function(k){var F=!1,G=[],Fe=q(S.splice(0,1),1),ge=q(Fe[0],7),Be=ge[0],De=ge[2],oe=ge[3],Je=ge[4],le=ge[5],Ke=ge[6],_e=$(Be,k,De,oe,G,!0,Ke),ze=r(_e,T);return function(ft,at){var nt=ft();return nt&&nt.then?nt.then(at):at(nt)}(function(){if(Be&&ze)return he(_e.p,function(He){return Je[le]=He,F=!0,O(P,G)})},function(He){return F?He:(Be?Je[le]=_e:P=ze?_e.p:_e,O(P,G))})}))),function(){return P})})}),A=(a=K(K({sync:!0},this.options),a)).sync,C=this,_={},R=[],V=[],M=[],ne=!("cyclic"in a)||a.cyclic,X=a.encapsulateObserver,W=$("",t,ne,i||{},M);function ce(P){var S=Object.values(_);if(a.iterateNone)return S.length?S[0]:n.getJSONType(P);if(S.length){if(a.returnTypeNames)return se(new Set(S));P&&g(P)&&!Ue.call(P,"$types")?P.$types=_:P={$:P,$types:{$:_}}}else l(P)&&Ue.call(P,"$types")&&(P={$:P,$types:!0});return!a.returnTypeNames&&P}function fe(P,S,L){Object.assign(P,S);var k=Pe.map(function(F){var G=P[F];return delete P[F],G});L(),Pe.forEach(function(F,G){P[F]=k[G]})}function $(P,S,L,k,F,G,Fe){var ge,Be={},De=s(S),oe=X?function(et){var Ne=Fe||k.type||n.getJSONType(S);X(Object.assign(et||Be,{keypath:P,value:S,cyclic:L,stateObj:k,promisesData:F,resolvingTypesonPromise:G,awaitingTypesonPromise:r(S,T)},{type:Ne}))}:null;if(["string","boolean","number","undefined"].includes(De))return S===void 0||Number.isNaN(S)||S===Number.NEGATIVE_INFINITY||S===Number.POSITIVE_INFINITY?(ge=k.replaced?S:Te(P,S,k,F,!1,G,oe))!==S&&(Be={replaced:ge}):ge=S,oe&&oe(),ge;if(S===null)return oe&&oe(),S;if(L&&!k.iterateIn&&!k.iterateUnsetNumeric&&S&&s(S)==="object"){var Je=R.indexOf(S);if(!(Je<0))return _[P]="#",oe&&oe({cyclicKeypath:V[Je]}),"#"+V[Je];L===!0&&(R.push(S),V.push(P))}var le,Ke=g(S),_e=ke(S),ze=(Ke||_e)&&(!C.plainObjectReplacers.length||k.replaced)||k.iterateIn?S:Te(P,S,k,F,Ke||_e,null,oe);if(ze!==S?(ge=ze,Be={replaced:ze}):P===""&&r(S,T)?(F.push([P,S,L,k,void 0,void 0,k.type]),ge=S):_e&&k.iterateIn!=="object"||k.iterateIn==="array"?(le=new Array(S.length),Be={clone:le}):(["function","symbol"].includes(s(S))||"toJSON"in S||r(S,T)||r(S,Promise)||r(S,ArrayBuffer))&&!Ke&&k.iterateIn!=="object"?ge=S:(le={},k.addLength&&(le.length=S.length),Be={clone:le}),oe&&oe(),a.iterateNone)return le||ge;if(!le)return ge;if(k.iterateIn){var He=function(Ne){var Xe={ownKeys:Ue.call(S,Ne)};fe(k,Xe,function(){var tt=P+(P?".":"")+Z(Ne),ot=$(tt,S[Ne],!!L,k,F,G);r(ot,T)?F.push([tt,ot,!!L,k,le,Ne,k.type]):ot!==void 0&&(le[Ne]=ot)})};for(var ft in S)He(ft);oe&&oe({endIterateIn:!0,end:!0})}else te(S).forEach(function(et){var Ne=P+(P?".":"")+Z(et);fe(k,{ownKeys:!0},function(){var Xe=$(Ne,S[et],!!L,k,F,G);r(Xe,T)?F.push([Ne,Xe,!!L,k,le,et,k.type]):Xe!==void 0&&(le[et]=Xe)})}),oe&&oe({endIterateOwn:!0,end:!0});if(k.iterateUnsetNumeric){for(var at=S.length,nt=function(Ne){if(!(Ne in S)){var Xe=P+(P?".":"")+Ne;fe(k,{ownKeys:!1},function(){var tt=$(Xe,void 0,!!L,k,F,G);r(tt,T)?F.push([Xe,tt,!!L,k,le,Ne,k.type]):tt!==void 0&&(le[Ne]=tt)})}},lt=0;lt>2],A+=x[(3&a[C])<<4|a[C+1]>>4],A+=x[(15&a[C+1])<<2|a[C+2]>>6],A+=x[63&a[C+2]];return O%3==2?A=A.slice(0,-1)+"=":O%3==1&&(A=A.slice(0,-2)+"=="),A},Ge=function(e){var t,i,a,O,A=e.length,C=.75*e.length,_=0;e[e.length-1]==="="&&(C--,e[e.length-2]==="="&&C--);for(var R=new ArrayBuffer(C),V=new Uint8Array(R),M=0;M>4,V[_++]=(15&i)<<4|a>>2,V[_++]=(3&a)<<6|63&O;return R},Ye={arraybuffer:{test:function(e){return U.toStringTag(e)==="ArrayBuffer"},replace:function(e,t){t.buffers||(t.buffers=[]);var i=t.buffers.indexOf(e);return i>-1?{index:i}:(t.buffers.push(e),Le(e))},revive:function(e,t){if(t.buffers||(t.buffers=[]),c(e)==="object")return t.buffers[e.index];var i=Ge(e);return t.buffers.push(i),i}}},We=typeof self>"u"?yt:self,Re={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach(function(n){var e=n,t=We[e];t&&(Re[n.toLowerCase()]={test:function(a){return U.toStringTag(a)===e},replace:function(a,O){var A=a.buffer,C=a.byteOffset,_=a.length;O.buffers||(O.buffers=[]);var R=O.buffers.indexOf(A);return R>-1?{index:R,byteOffset:C,length:_}:(O.buffers.push(A),{encoded:Le(A),byteOffset:C,length:_})},revive:function(a,O){O.buffers||(O.buffers=[]);var A,C=a.byteOffset,_=a.length,R=a.encoded,V=a.index;return"index"in a?A=O.buffers[V]:(A=Ge(R),O.buffers.push(A)),new t(A,C,_)}})});var qe={dataview:{test:function(e){return U.toStringTag(e)==="DataView"},replace:function(e,t){var i=e.buffer,a=e.byteOffset,O=e.byteLength;t.buffers||(t.buffers=[]);var A=t.buffers.indexOf(i);return A>-1?{index:A,byteOffset:a,byteLength:O}:(t.buffers.push(i),{encoded:Le(i),byteOffset:a,byteLength:O})},revive:function(e,t){t.buffers||(t.buffers=[]);var i,a=e.byteOffset,O=e.byteLength,A=e.encoded,C=e.index;return"index"in e?i=t.buffers[C]:(i=Ge(A),t.buffers.push(i)),new DataView(i,a,O)}}},be={IntlCollator:{test:function(e){return U.hasConstructorOf(e,Intl.Collator)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.Collator(e.locale,e)}},IntlDateTimeFormat:{test:function(e){return U.hasConstructorOf(e,Intl.DateTimeFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.DateTimeFormat(e.locale,e)}},IntlNumberFormat:{test:function(e){return U.hasConstructorOf(e,Intl.NumberFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.NumberFormat(e.locale,e)}}};function ie(n){for(var e=new Uint8Array(n.length),t=0;t>2],o+=rt[(w[j]&3)<<4|w[j+1]>>4],o+=rt[(w[j+1]&15)<<2|w[j+2]>>6],o+=rt[w[j+2]&63];return p%3===2?o=o.slice(0,-1)+"=":p%3===1&&(o=o.slice(0,-2)+"=="),o},mt=function(h){var c=h.length,v=h.length*.75,w=0,p,o,j,I;h[h.length-1]==="="&&(v--,h[h.length-2]==="="&&v--);for(var s=new ArrayBuffer(v),N=new Uint8Array(s),J=0;J>4,N[w++]=(o&15)<<4|j>>2,N[w++]=(j&3)<<6|I&63;return s},Nt=typeof self>"u"?global:self,gt={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach(function(b){var h=b,c=Nt[h];c&&(gt[b.toLowerCase()+"2"]={test:function(v){return ct.toStringTag(v)===h},replace:function(v){var w=v.buffer,p=v.byteOffset,o=v.length;return{buffer:w,byteOffset:p,length:o}},revive:function(v){var w=v.buffer,p=v.byteOffset,o=v.length;return new c(w,p,o)}})});var Pt={arraybuffer:{test:function(b){return ct.toStringTag(b)==="ArrayBuffer"},replace:function(b){return dt(b,0,b.byteLength)},revive:function(b){var h=mt(b);return h}}},Ve=new ct().register(_t),It="FileReaderSync"in self,ut=[],pt=0;Ve.register([Pt,gt,{blob2:{test:function(b){return ct.toStringTag(b)==="Blob"},replace:function(b){if(b.isClosed)throw new Error("The Blob is closed");if(It){var h=bt(b,"binary"),c=dt(h,0,h.byteLength);return{type:b.type,data:c}}else{ut.push(b);var v={type:b.type,data:{start:pt,end:pt+b.size}};return pt+=b.size,v}},finalize:function(b,h){b.data=dt(h,0,h.byteLength)},revive:function(b){var h=b.type,c=b.data;return new Blob([mt(c)],{type:h})}}}]);Ve.mustFinalize=function(){return ut.length>0};Ve.finalize=function(b){return Qe(void 0,void 0,void 0,function(){var h,c,v,w,p,o,j,I,s,N;return Me(this,function(J){switch(J.label){case 0:return[4,vt(new Blob(ut),"binary")];case 1:if(h=J.sent(),b){for(c=0,v=b;cn.length)&&(e=n.length);for(var t=0,i=new Array(e);t-1){var i=n[z(e.slice(0,t))];return i===void 0?void 0:pe(i,e.slice(t+1))}return n[z(e)]}function ye(n,e,t){if(e==="")return t;var i=e.indexOf(".");return i>-1?ye(n[z(e.slice(0,i))],e.slice(i+1),t):(n[z(e)]=t,n)}function he(n,e,t){return t?e?e(n):n:(n&&n.then||(n=Promise.resolve(n)),e?n.then(e):n)}var te=Object.keys,ke=Array.isArray,Ue={}.hasOwnProperty,Pe=["type","replaced","iterateIn","iterateUnsetNumeric"];function De(n){return function(){for(var e=[],t=0;ti?-1:te.keypath}var U=function(){function n(e){N(this,n),this.options=e,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return function(t,i,a){return i&&J(t.prototype,i),a&&J(t,a),t}(n,[{key:"stringify",value:function(t,i,a,O){O=K(K(K({},this.options),O),{},{stringification:!0});var A=this.encapsulate(t,null,O);return ke(A)?JSON.stringify(A[0],i,a):A.then(function(C){return JSON.stringify(C,i,a)})}},{key:"stringifySync",value:function(t,i,a,O){return this.stringify(t,i,a,K(K({throwOnBadSyncType:!0},O),{},{sync:!0}))}},{key:"stringifyAsync",value:function(t,i,a,O){return this.stringify(t,i,a,K(K({throwOnBadSyncType:!0},O),{},{sync:!1}))}},{key:"parse",value:function(t,i,a){return a=K(K(K({},this.options),a),{},{parse:!0}),this.revive(JSON.parse(t,i),a)}},{key:"parseSync",value:function(t,i,a){return this.parse(t,i,K(K({throwOnBadSyncType:!0},a),{},{sync:!0}))}},{key:"parseAsync",value:function(t,i,a){return this.parse(t,i,K(K({throwOnBadSyncType:!0},a),{},{sync:!1}))}},{key:"specialTypeNames",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return a.returnTypeNames=!0,this.encapsulate(t,i,a)}},{key:"rootTypeName",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return a.iterateNone=!0,this.encapsulate(t,i,a)}},{key:"encapsulate",value:function(t,i,a){var O=De(function(P,S){return he(Promise.all(S.map(function(L){return L[1].p})),function(L){return he(Promise.all(L.map(De(function(k){var F=!1,G=[],Fe=q(S.splice(0,1),1),ge=q(Fe[0],7),Be=ge[0],$e=ge[2],oe=ge[3],Je=ge[4],le=ge[5],Ke=ge[6],_e=D(Be,k,$e,oe,G,!0,Ke),ze=r(_e,T);return function(ft,at){var nt=ft();return nt&&nt.then?nt.then(at):at(nt)}(function(){if(Be&&ze)return he(_e.p,function(He){return Je[le]=He,F=!0,O(P,G)})},function(He){return F?He:(Be?Je[le]=_e:P=ze?_e.p:_e,O(P,G))})}))),function(){return P})})}),A=(a=K(K({sync:!0},this.options),a)).sync,C=this,_={},R=[],V=[],M=[],ne=!("cyclic"in a)||a.cyclic,X=a.encapsulateObserver,W=D("",t,ne,i||{},M);function ce(P){var S=Object.values(_);if(a.iterateNone)return S.length?S[0]:n.getJSONType(P);if(S.length){if(a.returnTypeNames)return se(new Set(S));P&&g(P)&&!Ue.call(P,"$types")?P.$types=_:P={$:P,$types:{$:_}}}else l(P)&&Ue.call(P,"$types")&&(P={$:P,$types:!0});return!a.returnTypeNames&&P}function fe(P,S,L){Object.assign(P,S);var k=Pe.map(function(F){var G=P[F];return delete P[F],G});L(),Pe.forEach(function(F,G){P[F]=k[G]})}function D(P,S,L,k,F,G,Fe){var ge,Be={},$e=s(S),oe=X?function(et){var Ne=Fe||k.type||n.getJSONType(S);X(Object.assign(et||Be,{keypath:P,value:S,cyclic:L,stateObj:k,promisesData:F,resolvingTypesonPromise:G,awaitingTypesonPromise:r(S,T)},{type:Ne}))}:null;if(["string","boolean","number","undefined"].includes($e))return S===void 0||Number.isNaN(S)||S===Number.NEGATIVE_INFINITY||S===Number.POSITIVE_INFINITY?(ge=k.replaced?S:Te(P,S,k,F,!1,G,oe))!==S&&(Be={replaced:ge}):ge=S,oe&&oe(),ge;if(S===null)return oe&&oe(),S;if(L&&!k.iterateIn&&!k.iterateUnsetNumeric&&S&&s(S)==="object"){var Je=R.indexOf(S);if(!(Je<0))return _[P]="#",oe&&oe({cyclicKeypath:V[Je]}),"#"+V[Je];L===!0&&(R.push(S),V.push(P))}var le,Ke=g(S),_e=ke(S),ze=(Ke||_e)&&(!C.plainObjectReplacers.length||k.replaced)||k.iterateIn?S:Te(P,S,k,F,Ke||_e,null,oe);if(ze!==S?(ge=ze,Be={replaced:ze}):P===""&&r(S,T)?(F.push([P,S,L,k,void 0,void 0,k.type]),ge=S):_e&&k.iterateIn!=="object"||k.iterateIn==="array"?(le=new Array(S.length),Be={clone:le}):(["function","symbol"].includes(s(S))||"toJSON"in S||r(S,T)||r(S,Promise)||r(S,ArrayBuffer))&&!Ke&&k.iterateIn!=="object"?ge=S:(le={},k.addLength&&(le.length=S.length),Be={clone:le}),oe&&oe(),a.iterateNone)return le||ge;if(!le)return ge;if(k.iterateIn){var He=function(Ne){var Xe={ownKeys:Ue.call(S,Ne)};fe(k,Xe,function(){var tt=P+(P?".":"")+Z(Ne),ot=D(tt,S[Ne],!!L,k,F,G);r(ot,T)?F.push([tt,ot,!!L,k,le,Ne,k.type]):ot!==void 0&&(le[Ne]=ot)})};for(var ft in S)He(ft);oe&&oe({endIterateIn:!0,end:!0})}else te(S).forEach(function(et){var Ne=P+(P?".":"")+Z(et);fe(k,{ownKeys:!0},function(){var Xe=D(Ne,S[et],!!L,k,F,G);r(Xe,T)?F.push([Ne,Xe,!!L,k,le,et,k.type]):Xe!==void 0&&(le[et]=Xe)})}),oe&&oe({endIterateOwn:!0,end:!0});if(k.iterateUnsetNumeric){for(var at=S.length,nt=function(Ne){if(!(Ne in S)){var Xe=P+(P?".":"")+Ne;fe(k,{ownKeys:!1},function(){var tt=D(Xe,void 0,!!L,k,F,G);r(tt,T)?F.push([Xe,tt,!!L,k,le,Ne,k.type]):tt!==void 0&&(le[Ne]=tt)})}},lt=0;lt>2],A+=x[(3&a[C])<<4|a[C+1]>>4],A+=x[(15&a[C+1])<<2|a[C+2]>>6],A+=x[63&a[C+2]];return O%3==2?A=A.slice(0,-1)+"=":O%3==1&&(A=A.slice(0,-2)+"=="),A},Ge=function(e){var t,i,a,O,A=e.length,C=.75*e.length,_=0;e[e.length-1]==="="&&(C--,e[e.length-2]==="="&&C--);for(var R=new ArrayBuffer(C),V=new Uint8Array(R),M=0;M>4,V[_++]=(15&i)<<4|a>>2,V[_++]=(3&a)<<6|63&O;return R},Ye={arraybuffer:{test:function(e){return U.toStringTag(e)==="ArrayBuffer"},replace:function(e,t){t.buffers||(t.buffers=[]);var i=t.buffers.indexOf(e);return i>-1?{index:i}:(t.buffers.push(e),Le(e))},revive:function(e,t){if(t.buffers||(t.buffers=[]),c(e)==="object")return t.buffers[e.index];var i=Ge(e);return t.buffers.push(i),i}}},We=typeof self>"u"?yt:self,Re={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach(function(n){var e=n,t=We[e];t&&(Re[n.toLowerCase()]={test:function(a){return U.toStringTag(a)===e},replace:function(a,O){var A=a.buffer,C=a.byteOffset,_=a.length;O.buffers||(O.buffers=[]);var R=O.buffers.indexOf(A);return R>-1?{index:R,byteOffset:C,length:_}:(O.buffers.push(A),{encoded:Le(A),byteOffset:C,length:_})},revive:function(a,O){O.buffers||(O.buffers=[]);var A,C=a.byteOffset,_=a.length,R=a.encoded,V=a.index;return"index"in a?A=O.buffers[V]:(A=Ge(R),O.buffers.push(A)),new t(A,C,_)}})});var qe={dataview:{test:function(e){return U.toStringTag(e)==="DataView"},replace:function(e,t){var i=e.buffer,a=e.byteOffset,O=e.byteLength;t.buffers||(t.buffers=[]);var A=t.buffers.indexOf(i);return A>-1?{index:A,byteOffset:a,byteLength:O}:(t.buffers.push(i),{encoded:Le(i),byteOffset:a,byteLength:O})},revive:function(e,t){t.buffers||(t.buffers=[]);var i,a=e.byteOffset,O=e.byteLength,A=e.encoded,C=e.index;return"index"in e?i=t.buffers[C]:(i=Ge(A),t.buffers.push(i)),new DataView(i,a,O)}}},be={IntlCollator:{test:function(e){return U.hasConstructorOf(e,Intl.Collator)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.Collator(e.locale,e)}},IntlDateTimeFormat:{test:function(e){return U.hasConstructorOf(e,Intl.DateTimeFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.DateTimeFormat(e.locale,e)}},IntlNumberFormat:{test:function(e){return U.hasConstructorOf(e,Intl.NumberFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.NumberFormat(e.locale,e)}}};function ie(n){for(var e=new Uint8Array(n.length),t=0;t>2],o+=rt[(w[j]&3)<<4|w[j+1]>>4],o+=rt[(w[j+1]&15)<<2|w[j+2]>>6],o+=rt[w[j+2]&63];return p%3===2?o=o.slice(0,-1)+"=":p%3===1&&(o=o.slice(0,-2)+"=="),o},mt=function(h){var c=h.length,v=h.length*.75,w=0,p,o,j,I;h[h.length-1]==="="&&(v--,h[h.length-2]==="="&&v--);for(var s=new ArrayBuffer(v),N=new Uint8Array(s),J=0;J>4,N[w++]=(o&15)<<4|j>>2,N[w++]=(j&3)<<6|I&63;return s},Nt=typeof self>"u"?global:self,gt={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach(function(b){var h=b,c=Nt[h];c&&(gt[b.toLowerCase()+"2"]={test:function(v){return ct.toStringTag(v)===h},replace:function(v){var w=v.buffer,p=v.byteOffset,o=v.length;return{buffer:w,byteOffset:p,length:o}},revive:function(v){var w=v.buffer,p=v.byteOffset,o=v.length;return new c(w,p,o)}})});var Pt={arraybuffer:{test:function(b){return ct.toStringTag(b)==="ArrayBuffer"},replace:function(b){return dt(b,0,b.byteLength)},revive:function(b){var h=mt(b);return h}}},Ve=new ct().register(_t),It="FileReaderSync"in self,ut=[],pt=0;Ve.register([Pt,gt,{blob2:{test:function(b){return ct.toStringTag(b)==="Blob"},replace:function(b){if(b.isClosed)throw new Error("The Blob is closed");if(It){var h=bt(b,"binary"),c=dt(h,0,h.byteLength);return{type:b.type,data:c}}else{ut.push(b);var v={type:b.type,data:{start:pt,end:pt+b.size}};return pt+=b.size,v}},finalize:function(b,h){b.data=dt(h,0,h.byteLength)},revive:function(b){var h=b.type,c=b.data;return new Blob([mt(c)],{type:h})}}}]);Ve.mustFinalize=function(){return ut.length>0};Ve.finalize=function(b){return Qe(void 0,void 0,void 0,function(){var h,c,v,w,p,o,j,I,s,N;return Me(this,function(J){switch(J.label){case 0:return[4,vt(new Blob(ut),"binary")];case 1:if(h=J.sent(),b){for(c=0,v=b;c0&&(v.push(","),p&&v.push(` + `)),r=u.lastIndexOf("]"),v.push(u.substring(0,r)),g=null,l=0,Z=!0,z=function(){var he,te,ke,Ue,U,Pe,De,Ze,U;return Me(this,function(re){switch(re.label){case 0:return j&&Ce.ignoreTransaction(function(){return j(I)}),he=g==null?ue.limit(we):ue.where(":id").above(g).limit(we),[4,he.toArray()];case 1:return te=re.sent(),te.length===0?[2,"break"]:(g!=null&&l>0&&(v.push(","),p&&v.push(` `)),Z=te.length===we,Oe?(ke=ve?te.filter(function(Se){return ve(T,Se)}):te,Ue=ke.map(function(Se){return Ve.encapsulate(Se)}),Ve.mustFinalize()?[4,Ce.waitFor(Ve.finalize(Ue))]:[3,3]):[3,4]);case 2:re.sent(),re.label=3;case 3:return U=JSON.stringify(Ue,void 0,p?2:void 0),p&&(U=U.split(` `).join(` - `)),v.push(new Blob([U.substring(1,U.length-1)])),l=ke.length,g=te.length>0?Ce.getByKeyPath(te[te.length-1],D.keyPath):null,[3,8];case 4:return[4,he.primaryKeys()];case 5:return Pe=re.sent(),$e=Pe.map(function(Se,f){return[Se,te[f]]}),ve&&($e=$e.filter(function(Se){var f=Se[0],y=Se[1];return ve(T,y,f)})),Ze=$e.map(function(Se){return Ve.encapsulate(Se)}),Ve.mustFinalize()?[4,Ce.waitFor(Ve.finalize(Ze))]:[3,7];case 6:re.sent(),re.label=7;case 7:U=JSON.stringify(Ze,void 0,p?2:void 0),p&&(U=U.split(` + `)),v.push(new Blob([U.substring(1,U.length-1)])),l=ke.length,g=te.length>0?Ce.getByKeyPath(te[te.length-1],$.keyPath):null,[3,8];case 4:return[4,he.primaryKeys()];case 5:return Pe=re.sent(),De=Pe.map(function(Se,f){return[Se,te[f]]}),ve&&(De=De.filter(function(Se){var f=Se[0],y=Se[1];return ve(T,y,f)})),Ze=De.map(function(Se){return Ve.encapsulate(Se)}),Ve.mustFinalize()?[4,Ce.waitFor(Ve.finalize(Ze))]:[3,7];case 6:re.sent(),re.label=7;case 7:U=JSON.stringify(Ze,void 0,p?2:void 0),p&&(U=U.split(` `).join(` - `)),v.push(new Blob([U.substring(1,U.length-1)])),l=$e.length,g=Pe.length>0?Pe[Pe.length-1]:null,re.label=8;case 8:return I.completedRows+=te.length,[2]}})},ye.label=1;case 1:return Z?[5,z()]:[3,3];case 2:return pe=ye.sent(),pe==="break"?[3,3]:[3,1];case 3:return v.push(u.substr(r)),I.completedTables+=1,I.completedTablesr)switch(l){case"text":closeText(u);break;default:D(u,"Max buffer length exceeded: "+l)}g=Math.max(g,Z)}u.bufferCheckPosition=c.MAX_BUFFER_LENGTH-g+u.position}function J(u){for(var r in w)u[r]=w[r]}var je=/[\\"\n]/g;function ve(u){if(!(this instanceof ve))return new ve(u);var r=this;J(r),r.bufferCheckPosition=c.MAX_BUFFER_LENGTH,r.q=r.c=r.p="",r.opt=u||{},r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.state=o.BEGIN,r.stack=new Array,r.position=r.column=0,r.line=1,r.slashed=!1,r.unicodeI=0,r.unicodeS=null,r.depth=0,se(r,"onready")}ve.prototype={end:function(){Oe(this)},write:Ee,resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{j=xt.Stream}catch{j=function(){}}function K(u){return new q(u)}function q(u){if(!(this instanceof q))return new q(u);this._parser=new ve(u),this.writable=!0,this.readable=!0,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.string="";var r=this;j.apply(r),this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(g){r.emit("error",g),r._parser.error=null},p.forEach(function(g){Object.defineProperty(r,"on"+g,{get:function(){return r._parser["on"+g]},set:function(l){if(!l)return r.removeAllListeners(g),r._parser["on"+g]=l,l;r.on(g,l)},enumerable:!0,configurable:!1})})}q.prototype=Object.create(j.prototype,{constructor:{value:q}}),q.prototype.write=function(u){u=new Buffer(u);for(var r=0;r0){for(var l=0;l=128)if(g>=194&&g<=223&&(this.bytes_in_sequence=2),g>=224&&g<=239&&(this.bytes_in_sequence=3),g>=240&&g<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+r>u.length){for(var Z=0;Z<=u.length-1-r;Z++)this.temp_buffs[this.bytes_in_sequence][Z]=u[r+Z];return this.bytes_remaining=r+this.bytes_in_sequence-u.length,!0}else{this.string=u.slice(r,r+this.bytes_in_sequence).toString(),r=r+this.bytes_in_sequence-1,this._parser.write(this.string),this.emit("data",this.string);continue}for(var z=r;z=128);z++);this.string=u.slice(r,z).toString(),this._parser.write(this.string),this.emit("data",this.string),r=z-1}},q.prototype.end=function(u){return u&&u.length&&this._parser.write(u.toString()),this._parser.end(),!0},q.prototype.on=function(u,r){var g=this;return!g._parser["on"+u]&&p.indexOf(u)!==-1&&(g._parser["on"+u]=function(){var l=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);l.splice(0,0,u),g.emit.apply(g,l)}),j.prototype.on.call(g,u,r)},q.prototype.destroy=function(){J(this._parser),this.emit("close")};function se(u,r,g){c.INFO,u[r]&&u[r](g)}function xe(u,r,g){de(u),se(u,r,g)}function de(u,r){u.textNode=ue(u.opt,u.textNode),u.textNode!==void 0&&se(u,r||"onvalue",u.textNode),u.textNode=void 0}function T(u){u.numberNode&&se(u,"onvalue",parseFloat(u.numberNode)),u.numberNode=""}function ue(u,r){return r===void 0||(u.trim&&(r=r.trim()),u.normalize&&(r=r.replace(/\s+/g," "))),r}function D(u,r){return de(u),r+=` + `)),v.push(new Blob([U.substring(1,U.length-1)])),l=De.length,g=Pe.length>0?Pe[Pe.length-1]:null,re.label=8;case 8:return I.completedRows+=te.length,[2]}})},ye.label=1;case 1:return Z?[5,z()]:[3,3];case 2:return pe=ye.sent(),pe==="break"?[3,3]:[3,1];case 3:return v.push(u.substr(r)),I.completedTables+=1,I.completedTablesr)switch(l){case"text":closeText(u);break;default:$(u,"Max buffer length exceeded: "+l)}g=Math.max(g,Z)}u.bufferCheckPosition=c.MAX_BUFFER_LENGTH-g+u.position}function J(u){for(var r in w)u[r]=w[r]}var je=/[\\"\n]/g;function ve(u){if(!(this instanceof ve))return new ve(u);var r=this;J(r),r.bufferCheckPosition=c.MAX_BUFFER_LENGTH,r.q=r.c=r.p="",r.opt=u||{},r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.state=o.BEGIN,r.stack=new Array,r.position=r.column=0,r.line=1,r.slashed=!1,r.unicodeI=0,r.unicodeS=null,r.depth=0,se(r,"onready")}ve.prototype={end:function(){Oe(this)},write:Ee,resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{j=xt.Stream}catch{j=function(){}}function K(u){return new q(u)}function q(u){if(!(this instanceof q))return new q(u);this._parser=new ve(u),this.writable=!0,this.readable=!0,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.string="";var r=this;j.apply(r),this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(g){r.emit("error",g),r._parser.error=null},p.forEach(function(g){Object.defineProperty(r,"on"+g,{get:function(){return r._parser["on"+g]},set:function(l){if(!l)return r.removeAllListeners(g),r._parser["on"+g]=l,l;r.on(g,l)},enumerable:!0,configurable:!1})})}q.prototype=Object.create(j.prototype,{constructor:{value:q}}),q.prototype.write=function(u){u=new Buffer(u);for(var r=0;r0){for(var l=0;l=128)if(g>=194&&g<=223&&(this.bytes_in_sequence=2),g>=224&&g<=239&&(this.bytes_in_sequence=3),g>=240&&g<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+r>u.length){for(var Z=0;Z<=u.length-1-r;Z++)this.temp_buffs[this.bytes_in_sequence][Z]=u[r+Z];return this.bytes_remaining=r+this.bytes_in_sequence-u.length,!0}else{this.string=u.slice(r,r+this.bytes_in_sequence).toString(),r=r+this.bytes_in_sequence-1,this._parser.write(this.string),this.emit("data",this.string);continue}for(var z=r;z=128);z++);this.string=u.slice(r,z).toString(),this._parser.write(this.string),this.emit("data",this.string),r=z-1}},q.prototype.end=function(u){return u&&u.length&&this._parser.write(u.toString()),this._parser.end(),!0},q.prototype.on=function(u,r){var g=this;return!g._parser["on"+u]&&p.indexOf(u)!==-1&&(g._parser["on"+u]=function(){var l=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);l.splice(0,0,u),g.emit.apply(g,l)}),j.prototype.on.call(g,u,r)},q.prototype.destroy=function(){J(this._parser),this.emit("close")};function se(u,r,g){c.INFO,u[r]&&u[r](g)}function xe(u,r,g){de(u),se(u,r,g)}function de(u,r){u.textNode=ue(u.opt,u.textNode),u.textNode!==void 0&&se(u,r||"onvalue",u.textNode),u.textNode=void 0}function T(u){u.numberNode&&se(u,"onvalue",parseFloat(u.numberNode)),u.numberNode=""}function ue(u,r){return r===void 0||(u.trim&&(r=r.trim()),u.normalize&&(r=r.replace(/\s+/g," "))),r}function $(u,r){return de(u),r+=` Line: `+u.line+` Column: `+u.column+` -Char: `+u.c,r=new Error(r),u.error=r,se(u,"onerror",r),u}function Oe(u){return(u.state!==o.VALUE||u.depth!==0)&&D(u,"Unexpected end"),de(u),u.c="",u.closed=!0,se(u,"onend"),ve.call(u,u.opt),u}function we(u){return u===s.carriageReturn||u===s.lineFeed||u===s.space||u===s.tab}function Ee(u){var r=this;if(this.error)throw this.error;if(r.closed)return D(r,"Cannot write after close. Assign an onready handler.");if(u===null)return Oe(r);var g=0,l=u.charCodeAt(0),Z=r.p;for(c.DEBUG;l&&(Z=l,r.c=l=u.charCodeAt(g++),Z!==l?r.p=Z:Z=r.p,!!l);)switch(c.DEBUG,r.position++,l===s.lineFeed?(r.line++,r.column=0):r.column++,r.state){case o.BEGIN:l===s.openBrace?r.state=o.OPEN_OBJECT:l===s.openBracket?r.state=o.OPEN_ARRAY:we(l)||D(r,"Non-whitespace before {[.");continue;case o.OPEN_KEY:case o.OPEN_OBJECT:if(we(l))continue;if(r.state===o.OPEN_KEY)r.stack.push(o.CLOSE_KEY);else if(l===s.closeBrace){se(r,"onopenobject"),this.depth++,se(r,"oncloseobject"),this.depth--,r.state=r.stack.pop()||o.VALUE;continue}else r.stack.push(o.CLOSE_OBJECT);l===s.doubleQuote?r.state=o.STRING:D(r,'Malformed object key should start with "');continue;case o.CLOSE_KEY:case o.CLOSE_OBJECT:if(we(l))continue;r.state,o.CLOSE_KEY,l===s.colon?(r.state===o.CLOSE_OBJECT?(r.stack.push(o.CLOSE_OBJECT),de(r,"onopenobject"),this.depth++):de(r,"onkey"),r.state=o.VALUE):l===s.closeBrace?(xe(r,"oncloseobject"),this.depth--,r.state=r.stack.pop()||o.VALUE):l===s.comma?(r.state===o.CLOSE_OBJECT&&r.stack.push(o.CLOSE_OBJECT),de(r),r.state=o.OPEN_KEY):D(r,"Bad object");continue;case o.OPEN_ARRAY:case o.VALUE:if(we(l))continue;if(r.state===o.OPEN_ARRAY)if(se(r,"onopenarray"),this.depth++,r.state=o.VALUE,l===s.closeBracket){se(r,"onclosearray"),this.depth--,r.state=r.stack.pop()||o.VALUE;continue}else r.stack.push(o.CLOSE_ARRAY);l===s.doubleQuote?r.state=o.STRING:l===s.openBrace?r.state=o.OPEN_OBJECT:l===s.openBracket?r.state=o.OPEN_ARRAY:l===s.t?r.state=o.TRUE:l===s.f?r.state=o.FALSE:l===s.n?r.state=o.NULL:l===s.minus?r.numberNode+="-":s._0<=l&&l<=s._9?(r.numberNode+=String.fromCharCode(l),r.state=o.NUMBER_DIGIT):D(r,"Bad value");continue;case o.CLOSE_ARRAY:if(l===s.comma)r.stack.push(o.CLOSE_ARRAY),de(r,"onvalue"),r.state=o.VALUE;else if(l===s.closeBracket)xe(r,"onclosearray"),this.depth--,r.state=r.stack.pop()||o.VALUE;else{if(we(l))continue;D(r,"Bad array")}continue;case o.STRING:r.textNode===void 0&&(r.textNode="");var z=g-1,pe=r.slashed,ye=r.unicodeI;e:for(;;){for(c.DEBUG;ye>0;)if(r.unicodeS+=String.fromCharCode(l),l=u.charCodeAt(g++),r.position++,ye===4?(r.textNode+=String.fromCharCode(parseInt(r.unicodeS,16)),ye=0,z=g-1):ye++,!l)break e;if(l===s.doubleQuote&&!pe){r.state=r.stack.pop()||o.VALUE,r.textNode+=u.substring(z,g-1),r.position+=g-1-z;break}if(l===s.backslash&&!pe&&(pe=!0,r.textNode+=u.substring(z,g-1),r.position+=g-1-z,l=u.charCodeAt(g++),r.position++,!l))break;if(pe){if(pe=!1,l===s.n?r.textNode+=` -`:l===s.r?r.textNode+="\r":l===s.t?r.textNode+=" ":l===s.f?r.textNode+="\f":l===s.b?r.textNode+="\b":l===s.u?(ye=1,r.unicodeS=""):r.textNode+=String.fromCharCode(l),l=u.charCodeAt(g++),r.position++,z=g-1,l)continue;break}je.lastIndex=g;var he=je.exec(u);if(he===null){g=u.length+1,r.textNode+=u.substring(z,g-1),r.position+=g-1-z;break}if(g=he.index+1,l=u.charCodeAt(he.index),!l){r.textNode+=u.substring(z,g-1),r.position+=g-1-z;break}}r.slashed=pe,r.unicodeI=ye;continue;case o.TRUE:l===s.r?r.state=o.TRUE2:D(r,"Invalid true started with t"+l);continue;case o.TRUE2:l===s.u?r.state=o.TRUE3:D(r,"Invalid true started with tr"+l);continue;case o.TRUE3:l===s.e?(se(r,"onvalue",!0),r.state=r.stack.pop()||o.VALUE):D(r,"Invalid true started with tru"+l);continue;case o.FALSE:l===s.a?r.state=o.FALSE2:D(r,"Invalid false started with f"+l);continue;case o.FALSE2:l===s.l?r.state=o.FALSE3:D(r,"Invalid false started with fa"+l);continue;case o.FALSE3:l===s.s?r.state=o.FALSE4:D(r,"Invalid false started with fal"+l);continue;case o.FALSE4:l===s.e?(se(r,"onvalue",!1),r.state=r.stack.pop()||o.VALUE):D(r,"Invalid false started with fals"+l);continue;case o.NULL:l===s.u?r.state=o.NULL2:D(r,"Invalid null started with n"+l);continue;case o.NULL2:l===s.l?r.state=o.NULL3:D(r,"Invalid null started with nu"+l);continue;case o.NULL3:l===s.l?(se(r,"onvalue",null),r.state=r.stack.pop()||o.VALUE):D(r,"Invalid null started with nul"+l);continue;case o.NUMBER_DECIMAL_POINT:l===s.period?(r.numberNode+=".",r.state=o.NUMBER_DIGIT):D(r,"Leading zero not followed by .");continue;case o.NUMBER_DIGIT:s._0<=l&&l<=s._9?r.numberNode+=String.fromCharCode(l):l===s.period?(r.numberNode.indexOf(".")!==-1&&D(r,"Invalid number has two dots"),r.numberNode+="."):l===s.e||l===s.E?((r.numberNode.indexOf("e")!==-1||r.numberNode.indexOf("E")!==-1)&&D(r,"Invalid number has two exponential"),r.numberNode+="e"):l===s.plus||l===s.minus?(Z===s.e||Z===s.E||D(r,"Invalid symbol in number"),r.numberNode+=String.fromCharCode(l)):(T(r),g--,r.state=r.stack.pop()||o.VALUE);continue;default:D(r,"Unknown state: "+r.state)}return r.position>=r.bufferCheckPosition&&N(r),r}})(h)});function wt(b){var h=0,c=Ut(!0),v={pullAsync:function(w){return Qe(this,void 0,void 0,function(){var p,o,j;return Me(this,function(I){switch(I.label){case 0:return p=b.slice(h,h+w),h+=w,[4,vt(p,"text")];case 1:return o=I.sent(),j=c.write(o),v.result=j||{},[2,j]}})})},pullSync:function(w){var p=b.slice(h,h+w);h+=w;var o=bt(p,"text"),j=c.write(o);return v.result=j||{},j},done:function(){return c.done()},eof:function(){return h>=b.size},result:{}};return v}function Ut(b){var h=kt.parser(),c=0,v,w=[],p,o,j=!1,I=!1;return h.onopenobject=function(s){var N={};N.incomplete=!0,v||(v=N),p&&(w.push([o,p,I]),b&&(I?p.push(N):p[o]=N)),p=N,o=s,I=!1,++c},h.onkey=function(s){return o=s},h.onvalue=function(s){return I?p.push(s):p[o]=s},h.oncloseobject=function(){var s;if(delete p.incomplete,o=null,--c===0)j=!0;else{var N=p;s=w.pop(),o=s[0],p=s[1],I=s[2],b||(I?p.push(N):p[o]=N)}},h.onopenarray=function(){var s=[];s.incomplete=!0,v||(v=s),p&&(w.push([o,p,I]),b&&(I?p.push(s):p[o]=s)),p=s,I=!0,o=null,++c},h.onclosearray=function(){var s;if(delete p.incomplete,o=null,--c===0)j=!0;else{var N=p;s=w.pop(),o=s[0],p=s[1],I=s[2],b||(I?p.push(N):p[o]=N)}},{write:function(s){return h.write(s),v},done:function(){return j}}}var Ot=1024;function Lt(b,h){return Qe(this,void 0,void 0,function(){var c,v,w,p;return Me(this,function(o){switch(o.label){case 0:return h=h||{},c=h.chunkSizeBytes||Ot*1024,[4,At(b,c)];case 1:return v=o.sent(),w=v.result.data,p=new Ce(w.databaseName),p.version(w.databaseVersion).stores(Et(w)),[4,St(p,v,h)];case 2:return o.sent(),[2,p]}})})}function Ft(b){return Qe(this,void 0,void 0,function(){var h;return Me(this,function(c){switch(c.label){case 0:h=wt(b),c.label=1;case 1:return h.eof()?[3,3]:[4,h.pullAsync(5*1024)];case 2:return c.sent(),h.result.data&&h.result.data.data?(delete h.result.data.data,[3,3]):[3,1];case 3:return[2,h.result]}})})}function St(b,h,c){return Qe(this,void 0,void 0,function(){function v(){return Qe(this,void 0,void 0,function(){var K,q,se,xe,de;return Me(this,function(T){switch(T.label){case 0:K=function(ue){var D,Oe,we,Ee,u,r,g,l,Z,z,pe,ye;return Me(this,function(he){switch(he.label){case 0:if(!ue.rows)return[2,"break"];if(!ue.rows.incomplete&&ue.rows.length===0)return[2,"continue"];if(s&&Ce.ignoreTransaction(function(){return s(N)}),D=ue.tableName,Oe=b.table(D),we=I.tables.filter(function(te){return te.name===D})[0].schema,!Oe){if(c.acceptMissingTables)return[2,"continue"];throw new Error("Exported table ".concat(ue.tableName," is missing in installed database"))}if(!c.acceptChangedPrimaryKey&&we.split(",")[0]!=Oe.schema.primKey.src)throw new Error("Primary key differs for table ".concat(ue.tableName,". "));for(Ee=ue.rows,u=[],r=0;r0&&I.data[0].rows&&!I.data[0].rows.incomplete;)I.data.splice(0,1);return!p.done()&&!p.eof()?j?(p.pullSync(w),[3,7]):[3,5]:[3,8];case 5:return[4,Ce.waitFor(p.pullAsync(w))];case 6:T.sent(),T.label=7;case 7:return[3,9];case 8:return[3,10];case 9:return[3,0];case 10:return[2]}})})}var w,p,o,j,I,s,N,J,je,ve;return Me(this,function(K){switch(K.label){case 0:return c=c||{},w=c.chunkSizeBytes||Ot*1024,[4,At(h,w)];case 1:if(p=K.sent(),o=p.result,j="FileReaderSync"in self,I=o.data,!c.acceptNameDiff&&b.name!==I.databaseName)throw new Error("Name differs. Current database name is ".concat(b.name," but export is ").concat(I.databaseName));if(!c.acceptVersionDiff&&b.verno!==I.databaseVersion)throw new Error("Database version differs. Current database is in version ".concat(b.verno," but export is ").concat(I.databaseVersion));if(s=c.progressCallback,N={done:!1,completedRows:0,completedTables:0,totalRows:I.tables.reduce(function(q,se){return q+se.rowCount},0),totalTables:I.tables.length},s&&Ce.ignoreTransaction(function(){return s(N)}),!c.clearTablesBeforeImport)return[3,5];J=0,je=b.tables,K.label=2;case 2:return Jjt)throw new Error("Format version ".concat(v.formatVersion," not supported"));if(!v.data)throw new Error("No data in export file");if(!v.data.databaseName)throw new Error("Missing databaseName in export file");if(!v.data.databaseVersion)throw new Error("Missing databaseVersion in export file");if(!v.data.tables)throw new Error("Missing tables in export file");return[2,c]}})})}Ce.prototype.export=function(b){return Ct(this,b)};Ce.prototype.import=function(b,h){return St(this,b,h)};Ce.import=function(b,h){return Lt(b,h)};var Kt=function(){throw new Error("This addon extends Dexie.prototype globally and does not have be included in Dexie constructor's addons options.")};export{Kt as default,Ct as exportDB,Lt as importDB,St as importInto,Ft as peakImportFile}; +Char: `+u.c,r=new Error(r),u.error=r,se(u,"onerror",r),u}function Oe(u){return(u.state!==o.VALUE||u.depth!==0)&&$(u,"Unexpected end"),de(u),u.c="",u.closed=!0,se(u,"onend"),ve.call(u,u.opt),u}function we(u){return u===s.carriageReturn||u===s.lineFeed||u===s.space||u===s.tab}function Ee(u){var r=this;if(this.error)throw this.error;if(r.closed)return $(r,"Cannot write after close. Assign an onready handler.");if(u===null)return Oe(r);var g=0,l=u.charCodeAt(0),Z=r.p;for(c.DEBUG;l&&(Z=l,r.c=l=u.charCodeAt(g++),Z!==l?r.p=Z:Z=r.p,!!l);)switch(c.DEBUG,r.position++,l===s.lineFeed?(r.line++,r.column=0):r.column++,r.state){case o.BEGIN:l===s.openBrace?r.state=o.OPEN_OBJECT:l===s.openBracket?r.state=o.OPEN_ARRAY:we(l)||$(r,"Non-whitespace before {[.");continue;case o.OPEN_KEY:case o.OPEN_OBJECT:if(we(l))continue;if(r.state===o.OPEN_KEY)r.stack.push(o.CLOSE_KEY);else if(l===s.closeBrace){se(r,"onopenobject"),this.depth++,se(r,"oncloseobject"),this.depth--,r.state=r.stack.pop()||o.VALUE;continue}else r.stack.push(o.CLOSE_OBJECT);l===s.doubleQuote?r.state=o.STRING:$(r,'Malformed object key should start with "');continue;case o.CLOSE_KEY:case o.CLOSE_OBJECT:if(we(l))continue;r.state,o.CLOSE_KEY,l===s.colon?(r.state===o.CLOSE_OBJECT?(r.stack.push(o.CLOSE_OBJECT),de(r,"onopenobject"),this.depth++):de(r,"onkey"),r.state=o.VALUE):l===s.closeBrace?(xe(r,"oncloseobject"),this.depth--,r.state=r.stack.pop()||o.VALUE):l===s.comma?(r.state===o.CLOSE_OBJECT&&r.stack.push(o.CLOSE_OBJECT),de(r),r.state=o.OPEN_KEY):$(r,"Bad object");continue;case o.OPEN_ARRAY:case o.VALUE:if(we(l))continue;if(r.state===o.OPEN_ARRAY)if(se(r,"onopenarray"),this.depth++,r.state=o.VALUE,l===s.closeBracket){se(r,"onclosearray"),this.depth--,r.state=r.stack.pop()||o.VALUE;continue}else r.stack.push(o.CLOSE_ARRAY);l===s.doubleQuote?r.state=o.STRING:l===s.openBrace?r.state=o.OPEN_OBJECT:l===s.openBracket?r.state=o.OPEN_ARRAY:l===s.t?r.state=o.TRUE:l===s.f?r.state=o.FALSE:l===s.n?r.state=o.NULL:l===s.minus?r.numberNode+="-":s._0<=l&&l<=s._9?(r.numberNode+=String.fromCharCode(l),r.state=o.NUMBER_DIGIT):$(r,"Bad value");continue;case o.CLOSE_ARRAY:if(l===s.comma)r.stack.push(o.CLOSE_ARRAY),de(r,"onvalue"),r.state=o.VALUE;else if(l===s.closeBracket)xe(r,"onclosearray"),this.depth--,r.state=r.stack.pop()||o.VALUE;else{if(we(l))continue;$(r,"Bad array")}continue;case o.STRING:r.textNode===void 0&&(r.textNode="");var z=g-1,pe=r.slashed,ye=r.unicodeI;e:for(;;){for(c.DEBUG;ye>0;)if(r.unicodeS+=String.fromCharCode(l),l=u.charCodeAt(g++),r.position++,ye===4?(r.textNode+=String.fromCharCode(parseInt(r.unicodeS,16)),ye=0,z=g-1):ye++,!l)break e;if(l===s.doubleQuote&&!pe){r.state=r.stack.pop()||o.VALUE,r.textNode+=u.substring(z,g-1),r.position+=g-1-z;break}if(l===s.backslash&&!pe&&(pe=!0,r.textNode+=u.substring(z,g-1),r.position+=g-1-z,l=u.charCodeAt(g++),r.position++,!l))break;if(pe){if(pe=!1,l===s.n?r.textNode+=` +`:l===s.r?r.textNode+="\r":l===s.t?r.textNode+=" ":l===s.f?r.textNode+="\f":l===s.b?r.textNode+="\b":l===s.u?(ye=1,r.unicodeS=""):r.textNode+=String.fromCharCode(l),l=u.charCodeAt(g++),r.position++,z=g-1,l)continue;break}je.lastIndex=g;var he=je.exec(u);if(he===null){g=u.length+1,r.textNode+=u.substring(z,g-1),r.position+=g-1-z;break}if(g=he.index+1,l=u.charCodeAt(he.index),!l){r.textNode+=u.substring(z,g-1),r.position+=g-1-z;break}}r.slashed=pe,r.unicodeI=ye;continue;case o.TRUE:l===s.r?r.state=o.TRUE2:$(r,"Invalid true started with t"+l);continue;case o.TRUE2:l===s.u?r.state=o.TRUE3:$(r,"Invalid true started with tr"+l);continue;case o.TRUE3:l===s.e?(se(r,"onvalue",!0),r.state=r.stack.pop()||o.VALUE):$(r,"Invalid true started with tru"+l);continue;case o.FALSE:l===s.a?r.state=o.FALSE2:$(r,"Invalid false started with f"+l);continue;case o.FALSE2:l===s.l?r.state=o.FALSE3:$(r,"Invalid false started with fa"+l);continue;case o.FALSE3:l===s.s?r.state=o.FALSE4:$(r,"Invalid false started with fal"+l);continue;case o.FALSE4:l===s.e?(se(r,"onvalue",!1),r.state=r.stack.pop()||o.VALUE):$(r,"Invalid false started with fals"+l);continue;case o.NULL:l===s.u?r.state=o.NULL2:$(r,"Invalid null started with n"+l);continue;case o.NULL2:l===s.l?r.state=o.NULL3:$(r,"Invalid null started with nu"+l);continue;case o.NULL3:l===s.l?(se(r,"onvalue",null),r.state=r.stack.pop()||o.VALUE):$(r,"Invalid null started with nul"+l);continue;case o.NUMBER_DECIMAL_POINT:l===s.period?(r.numberNode+=".",r.state=o.NUMBER_DIGIT):$(r,"Leading zero not followed by .");continue;case o.NUMBER_DIGIT:s._0<=l&&l<=s._9?r.numberNode+=String.fromCharCode(l):l===s.period?(r.numberNode.indexOf(".")!==-1&&$(r,"Invalid number has two dots"),r.numberNode+="."):l===s.e||l===s.E?((r.numberNode.indexOf("e")!==-1||r.numberNode.indexOf("E")!==-1)&&$(r,"Invalid number has two exponential"),r.numberNode+="e"):l===s.plus||l===s.minus?(Z===s.e||Z===s.E||$(r,"Invalid symbol in number"),r.numberNode+=String.fromCharCode(l)):(T(r),g--,r.state=r.stack.pop()||o.VALUE);continue;default:$(r,"Unknown state: "+r.state)}return r.position>=r.bufferCheckPosition&&N(r),r}})(h)});function wt(b){var h=0,c=Ut(!0),v={pullAsync:function(w){return Qe(this,void 0,void 0,function(){var p,o,j;return Me(this,function(I){switch(I.label){case 0:return p=b.slice(h,h+w),h+=w,[4,vt(p,"text")];case 1:return o=I.sent(),j=c.write(o),v.result=j||{},[2,j]}})})},pullSync:function(w){var p=b.slice(h,h+w);h+=w;var o=bt(p,"text"),j=c.write(o);return v.result=j||{},j},done:function(){return c.done()},eof:function(){return h>=b.size},result:{}};return v}function Ut(b){var h=kt.parser(),c=0,v,w=[],p,o,j=!1,I=!1;return h.onopenobject=function(s){var N={};N.incomplete=!0,v||(v=N),p&&(w.push([o,p,I]),b&&(I?p.push(N):p[o]=N)),p=N,o=s,I=!1,++c},h.onkey=function(s){return o=s},h.onvalue=function(s){return I?p.push(s):p[o]=s},h.oncloseobject=function(){var s;if(delete p.incomplete,o=null,--c===0)j=!0;else{var N=p;s=w.pop(),o=s[0],p=s[1],I=s[2],b||(I?p.push(N):p[o]=N)}},h.onopenarray=function(){var s=[];s.incomplete=!0,v||(v=s),p&&(w.push([o,p,I]),b&&(I?p.push(s):p[o]=s)),p=s,I=!0,o=null,++c},h.onclosearray=function(){var s;if(delete p.incomplete,o=null,--c===0)j=!0;else{var N=p;s=w.pop(),o=s[0],p=s[1],I=s[2],b||(I?p.push(N):p[o]=N)}},{write:function(s){return h.write(s),v},done:function(){return j}}}var Ot=1024;function Lt(b,h){return Qe(this,void 0,void 0,function(){var c,v,w,p;return Me(this,function(o){switch(o.label){case 0:return h=h||{},c=h.chunkSizeBytes||Ot*1024,[4,At(b,c)];case 1:return v=o.sent(),w=v.result.data,p=new Ce(w.databaseName),p.version(w.databaseVersion).stores(Et(w)),[4,St(p,v,h)];case 2:return o.sent(),[2,p]}})})}function Ft(b){return Qe(this,void 0,void 0,function(){var h;return Me(this,function(c){switch(c.label){case 0:h=wt(b),c.label=1;case 1:return h.eof()?[3,3]:[4,h.pullAsync(5*1024)];case 2:return c.sent(),h.result.data&&h.result.data.data?(delete h.result.data.data,[3,3]):[3,1];case 3:return[2,h.result]}})})}function St(b,h,c){return Qe(this,void 0,void 0,function(){function v(){return Qe(this,void 0,void 0,function(){var K,q,se,xe,de;return Me(this,function(T){switch(T.label){case 0:K=function(ue){var $,Oe,we,Ee,u,r,g,l,Z,z,pe,ye;return Me(this,function(he){switch(he.label){case 0:if(!ue.rows)return[2,"break"];if(!ue.rows.incomplete&&ue.rows.length===0)return[2,"continue"];if(s&&Ce.ignoreTransaction(function(){return s(N)}),$=ue.tableName,Oe=b.table($),we=I.tables.filter(function(te){return te.name===$})[0].schema,!Oe){if(c.acceptMissingTables)return[2,"continue"];throw new Error("Exported table ".concat(ue.tableName," is missing in installed database"))}if(!c.acceptChangedPrimaryKey&&we.split(",")[0]!=Oe.schema.primKey.src)throw new Error("Primary key differs for table ".concat(ue.tableName,". "));for(Ee=ue.rows,u=[],r=0;r0&&I.data[0].rows&&!I.data[0].rows.incomplete;)I.data.splice(0,1);return!p.done()&&!p.eof()?j?(p.pullSync(w),[3,7]):[3,5]:[3,8];case 5:return[4,Ce.waitFor(p.pullAsync(w))];case 6:T.sent(),T.label=7;case 7:return[3,9];case 8:return[3,10];case 9:return[3,0];case 10:return[2]}})})}var w,p,o,j,I,s,N,J,je,ve;return Me(this,function(K){switch(K.label){case 0:return c=c||{},w=c.chunkSizeBytes||Ot*1024,[4,At(h,w)];case 1:if(p=K.sent(),o=p.result,j="FileReaderSync"in self,I=o.data,!c.acceptNameDiff&&b.name!==I.databaseName)throw new Error("Name differs. Current database name is ".concat(b.name," but export is ").concat(I.databaseName));if(!c.acceptVersionDiff&&b.verno!==I.databaseVersion)throw new Error("Database version differs. Current database is in version ".concat(b.verno," but export is ").concat(I.databaseVersion));if(s=c.progressCallback,N={done:!1,completedRows:0,completedTables:0,totalRows:I.tables.reduce(function(q,se){return q+se.rowCount},0),totalTables:I.tables.length},s&&Ce.ignoreTransaction(function(){return s(N)}),!c.clearTablesBeforeImport)return[3,5];J=0,je=b.tables,K.label=2;case 2:return Jjt)throw new Error("Format version ".concat(v.formatVersion," not supported"));if(!v.data)throw new Error("No data in export file");if(!v.data.databaseName)throw new Error("Missing databaseName in export file");if(!v.data.databaseVersion)throw new Error("Missing databaseVersion in export file");if(!v.data.tables)throw new Error("Missing tables in export file");return[2,c]}})})}Ce.prototype.export=function(b){return Ct(this,b)};Ce.prototype.import=function(b,h){return St(this,b,h)};Ce.import=function(b,h){return Lt(b,h)};var Kt=function(){throw new Error("This addon extends Dexie.prototype globally and does not have be included in Dexie constructor's addons options.")};export{Kt as default,Ct as exportDB,Lt as importDB,St as importInto,Ft as peakImportFile}; diff --git a/assets/index-495d39df.js b/assets/index-495d39df.js new file mode 100644 index 0000000000..e53051a5f9 --- /dev/null +++ b/assets/index-495d39df.js @@ -0,0 +1,133 @@ +function L7(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();const dW="modulepreload",fW=function(e,t){return new URL(e,t).href},A5={},Je=function(t,r,n){if(!r||r.length===0)return t();const a=document.getElementsByTagName("link");return Promise.all(r.map(o=>{if(o=fW(o,n),o in A5)return;A5[o]=!0;const i=o.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(!!n)for(let f=a.length-1;f>=0;f--){const c=a[f];if(c.href===o&&(!i||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const u=document.createElement("link");if(u.rel=i?"stylesheet":dW,i||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),i)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())};globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};var qa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fje(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){if(this instanceof n){var a=[null];a.push.apply(a,arguments);var o=Function.bind.apply(t,a);return new o}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var M7={exports:{}},u0={},D7={exports:{}},xe={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var uh=Symbol.for("react.element"),hW=Symbol.for("react.portal"),pW=Symbol.for("react.fragment"),gW=Symbol.for("react.strict_mode"),vW=Symbol.for("react.profiler"),mW=Symbol.for("react.provider"),yW=Symbol.for("react.context"),bW=Symbol.for("react.forward_ref"),wW=Symbol.for("react.suspense"),_W=Symbol.for("react.memo"),$W=Symbol.for("react.lazy"),R5=Symbol.iterator;function xW(e){return e===null||typeof e!="object"?null:(e=R5&&e[R5]||e["@@iterator"],typeof e=="function"?e:null)}var j7={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F7=Object.assign,B7={};function cu(e,t,r){this.props=e,this.context=t,this.refs=B7,this.updater=r||j7}cu.prototype.isReactComponent={};cu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};cu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function U7(){}U7.prototype=cu.prototype;function eS(e,t,r){this.props=e,this.context=t,this.refs=B7,this.updater=r||j7}var tS=eS.prototype=new U7;tS.constructor=eS;F7(tS,cu.prototype);tS.isPureReactComponent=!0;var O5=Array.isArray,z7=Object.prototype.hasOwnProperty,rS={current:null},V7={key:!0,ref:!0,__self:!0,__source:!0};function W7(e,t,r){var n,a={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)z7.call(t,n)&&!V7.hasOwnProperty(n)&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1y("div",{className:`inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-indigo-400 border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${e}`,role:"status"}),NW=()=>y("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[#faf9ff;]",children:y("div",{className:"flex flex-col items-center justify-center ",children:y(G7,{})})}),LW=Y.memo(NW);const MW=e=>y("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...e,children:y("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})});globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const __=({className:e,isLoading:t,hasError:r})=>y("div",{className:`${e}`,children:r?y("div",{className:"tooltip !bg-transparent","data-tip":"数据加载失败",children:y(MW,{className:"text-red-500"})}):t&&y(G7,{})});globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};async function K7(e){return await(await fetch("/qwerty-learner"+e)).json()}var q7={exports:{}},Y7={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Lc=p;function DW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jW=typeof Object.is=="function"?Object.is:DW,FW=Lc.useState,BW=Lc.useEffect,UW=Lc.useLayoutEffect,zW=Lc.useDebugValue;function VW(e,t){var r=t(),n=FW({inst:{value:r,getSnapshot:t}}),a=n[0].inst,o=n[1];return UW(function(){a.value=r,a.getSnapshot=t,a1(a)&&o({inst:a})},[e,r,t]),BW(function(){return a1(a)&&o({inst:a}),e(function(){a1(a)&&o({inst:a})})},[e]),zW(r),r}function a1(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!jW(e,r)}catch{return!0}}function WW(e,t){return t()}var HW=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?WW:VW;Y7.useSyncExternalStore=Lc.useSyncExternalStore!==void 0?Lc.useSyncExternalStore:HW;q7.exports=Y7;var GW=q7.exports;const Ya=new WeakMap,o1={},mp={},ai=()=>{},Qn=ai(),i1=Object,ze=e=>e===Qn,Xa=e=>typeof e=="function",Ai=(e,t)=>({...e,...t}),oS="undefined",d0=typeof window!=oS,$_=typeof document!=oS,KW=()=>d0&&typeof window.requestAnimationFrame!=oS,X7=(e,t)=>{const r=Ya.get(e);return[()=>!ze(t)&&e.get(t)||o1,n=>{if(!ze(t)){const a=e.get(t);t in mp||(mp[t]=a),r[5](t,Ai(a,n),a||o1)}},r[6],()=>!ze(t)&&t in mp?mp[t]:!ze(t)&&e.get(t)||o1]},yp=new WeakMap;let qW=0;const gf=e=>{const t=typeof e,r=e&&e.constructor,n=r==Date;let a,o;if(i1(e)===e&&!n&&r!=RegExp){if(a=yp.get(e),a)return a;if(a=++qW+"~",yp.set(e,a),r==Array){for(a="@",o=0;ox_,[S_,E_]=d0&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ai,ai],XW=()=>{const e=$_&&document.visibilityState;return ze(e)||e!=="hidden"},ZW=e=>($_&&document.addEventListener("visibilitychange",e),S_("focus",e),()=>{$_&&document.removeEventListener("visibilitychange",e),E_("focus",e)}),QW=e=>{const t=()=>{x_=!0,e()},r=()=>{x_=!1};return S_("online",t),S_("offline",r),()=>{E_("online",t),E_("offline",r)}},JW={isOnline:YW,isVisible:XW},eH={initFocus:ZW,initReconnect:QW},P5=!Y.useId,vf=!d0||"Deno"in window,tH=e=>KW()?window.requestAnimationFrame(e):setTimeout(e,1),s1=vf?p.useEffect:p.useLayoutEffect,l1=typeof navigator<"u"&&navigator.connection,I5=!vf&&l1&&(["slow-2g","2g"].includes(l1.effectiveType)||l1.saveData),iS=e=>{if(Xa(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?gf(e):"",[e,t]};let rH=0;const C_=()=>++rH,Z7=0,Q7=1,J7=2,nH=3;var Zu={__proto__:null,ERROR_REVALIDATE_EVENT:nH,FOCUS_EVENT:Z7,MUTATE_EVENT:J7,RECONNECT_EVENT:Q7};async function e8(...e){const[t,r,n,a]=e,o=Ai({populateCache:!0,throwOnError:!0},typeof a=="boolean"?{revalidate:a}:a||{});let i=o.populateCache;const s=o.rollbackOnError;let l=o.optimisticData;const u=o.revalidate!==!1,f=h=>typeof s=="function"?s(h):s!==!1,c=o.throwOnError;if(Xa(r)){const h=r,g=[],m=t.keys();for(let w=m.next();!w.done;w=m.next()){const v=w.value;!/^\$(inf|sub)\$/.test(v)&&h(t.get(v)._k)&&g.push(v)}return Promise.all(g.map(d))}return d(r);async function d(h){const[g]=iS(h);if(!g)return;const[m,w]=X7(t,g),[v,b,_]=Ya.get(t),$=v[g],C=()=>u&&(delete _[g],$&&$[0])?$[0](J7).then(()=>m().data):m().data;if(e.length<3)return C();let O=n,x;const S=C_();b[g]=[S,0];const A=!ze(l),k=m(),N=k.data,P=k._c,I=ze(P)?N:P;if(A&&(l=Xa(l)?l(I):l,w({data:l,_c:I})),Xa(O))try{O=O(I)}catch(R){x=R}if(O&&Xa(O.then))if(O=await O.catch(R=>{x=R}),S!==b[g][0]){if(x)throw x;return O}else x&&A&&f(x)&&(i=!0,O=I,w({data:O,_c:Qn}));i&&(x||(Xa(i)&&(O=i(O,I)),w({data:O,_c:Qn}))),b[g][1]=C_();const E=await C();if(w({_c:Qn}),x){if(c)throw x;return}return i?E:O}}const N5=(e,t)=>{for(const r in e)e[r][0]&&e[r][0](t)},aH=(e,t)=>{if(!Ya.has(e)){const r=Ai(eH,t),n={},a=e8.bind(Qn,e);let o=ai;const i={},s=(f,c)=>{const d=i[f]||[];return i[f]=d,d.push(c),()=>d.splice(d.indexOf(c),1)},l=(f,c,d)=>{e.set(f,c);const h=i[f];if(h)for(const g of h)g(c,d)},u=()=>{if(!Ya.has(e)&&(Ya.set(e,[n,{},{},{},a,l,s]),!vf)){const f=r.initFocus(setTimeout.bind(Qn,N5.bind(Qn,n,Z7))),c=r.initReconnect(setTimeout.bind(Qn,N5.bind(Qn,n,Q7)));o=()=>{f&&f(),c&&c(),Ya.delete(e)}}};return u(),[e,a,u,o]}return[e,Ya.get(e)[4]]},oH=(e,t,r,n,a)=>{const o=r.errorRetryCount,i=a.retryCount,s=~~((Math.random()+.5)*(1<<(i<8?i:8)))*r.errorRetryInterval;!ze(o)&&i>o||setTimeout(n,s,a)},iH=(e,t)=>gf(e)==gf(t),[t8,sH]=aH(new Map),lH=Ai({onLoadingSlow:ai,onSuccess:ai,onError:ai,onErrorRetry:oH,onDiscarded:ai,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:I5?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:I5?5e3:3e3,compare:iH,isPaused:()=>!1,cache:t8,mutate:sH,fallback:{}},JW),cH=(e,t)=>{const r=Ai(e,t);if(t){const{use:n,fallback:a}=e,{use:o,fallback:i}=t;n&&o&&(r.use=n.concat(o)),a&&i&&(r.fallback=Ai(a,i))}return r},uH=p.createContext({}),r8=d0&&window.__SWR_DEVTOOLS_USE__,dH=r8?window.__SWR_DEVTOOLS_USE__:[],fH=()=>{r8&&(window.__SWR_DEVTOOLS_REACT__=Y)},hH=e=>Xa(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],pH=()=>Ai(lH,p.useContext(uH)),gH=e=>(t,r,n)=>e(t,r&&((...o)=>{const[i]=iS(t),[,,,s]=Ya.get(t8),l=s[i];return l?(delete s[i],l):r(...o)}),n),vH=dH.concat(gH),mH=e=>function(...r){const n=pH(),[a,o,i]=hH(r),s=cH(n,i);let l=e;const{use:u}=s,f=(u||[]).concat(vH);for(let c=f.length;c--;)l=f[c](l);return l(a,o||s.fetcher||null,s)},yH=(e,t,r)=>{const n=t[e]||(t[e]=[]);return n.push(r),()=>{const a=n.indexOf(r);a>=0&&(n[a]=n[n.length-1],n.pop())}};fH();const c1={dedupe:!0},bH=(e,t,r)=>{const{cache:n,compare:a,suspense:o,fallbackData:i,revalidateOnMount:s,revalidateIfStale:l,refreshInterval:u,refreshWhenHidden:f,refreshWhenOffline:c,keepPreviousData:d}=r,[h,g,m]=Ya.get(n),[w,v]=iS(e),b=p.useRef(!1),_=p.useRef(!1),$=p.useRef(w),C=p.useRef(t),O=p.useRef(r),x=()=>O.current,S=()=>x().isVisible()&&x().isOnline(),[A,k,N,P]=X7(n,w),I=p.useRef({}).current,E=ze(i)?r.fallback[w]:i,R=(ue,$e)=>{for(const Oe in I){const Le=Oe;if(Le==="data"){if(!a(ue[Le],$e[Le])&&(!ze(ue[Le])||!a(H,$e[Le])))return!1}else if($e[Le]!==ue[Le])return!1}return!0},F=p.useMemo(()=>{const ue=(()=>!w||!t?!1:ze(s)?x().isPaused()||o?!1:ze(l)?!0:l:s)(),$e=Xe=>{const vt=Ai(Xe);return delete vt._k,ue?{isValidating:!0,isLoading:!0,...vt}:vt},Oe=A(),Le=P(),at=$e(Oe),Wt=Oe===Le?at:$e(Le);let Ie=at;return[()=>{const Xe=$e(A());return R(Xe,Ie)?(Ie.data=Xe.data,Ie.isLoading=Xe.isLoading,Ie.isValidating=Xe.isValidating,Ie.error=Xe.error,Ie):(Ie=Xe,Xe)},()=>Wt]},[n,w]),B=GW.useSyncExternalStore(p.useCallback(ue=>N(w,($e,Oe)=>{R(Oe,$e)||ue()}),[n,w]),F[0],F[1]),j=!b.current,M=h[w]&&h[w].length>0,D=B.data,U=ze(D)?E:D,V=B.error,G=p.useRef(U),H=d?ze(D)?G.current:D:U,K=(()=>M&&!ze(V)?!1:j&&!ze(s)?s:x().isPaused()?!1:o?ze(U)?!1:l:ze(U)||l)(),Q=!!(w&&t&&j&&K),J=ze(B.isValidating)?Q:B.isValidating,de=ze(B.isLoading)?Q:B.isLoading,ve=p.useCallback(async ue=>{const $e=C.current;if(!w||!$e||_.current||x().isPaused())return!1;let Oe,Le,at=!0;const Wt=ue||{},Ie=!m[w]||!Wt.dedupe,Xe=()=>P5?!_.current&&w===$.current&&b.current:w===$.current,vt={isValidating:!1,isLoading:!1},Br=()=>{k(vt)},mt=()=>{const $t=m[w];$t&&$t[1]===Le&&delete m[w]},hr={isValidating:!0};ze(A().data)&&(hr.isLoading=!0);try{if(Ie&&(k(hr),r.loadingTimeout&&ze(A().data)&&setTimeout(()=>{at&&Xe()&&x().onLoadingSlow(w,r)},r.loadingTimeout),m[w]=[$e(v),C_()]),[Oe,Le]=m[w],Oe=await Oe,Ie&&setTimeout(mt,r.dedupingInterval),!m[w]||m[w][1]!==Le)return Ie&&Xe()&&x().onDiscarded(w),!1;vt.error=Qn;const $t=g[w];if(!ze($t)&&(Le<=$t[0]||Le<=$t[1]||$t[1]===0))return Br(),Ie&&Xe()&&x().onDiscarded(w),!1;const Ht=A().data;vt.data=a(Ht,Oe)?Ht:Oe,Ie&&Xe()&&x().onSuccess(Oe,w,r)}catch($t){mt();const Ht=x(),{shouldRetryOnError:gn}=Ht;Ht.isPaused()||(vt.error=$t,Ie&&Xe()&&(Ht.onError($t,w,Ht),(gn===!0||Xa(gn)&&gn($t))&&S()&&Ht.onErrorRetry($t,w,Ht,$l=>{const zo=h[w];zo&&zo[0]&&zo[0](Zu.ERROR_REVALIDATE_EVENT,$l)},{retryCount:(Wt.retryCount||0)+1,dedupe:!0})))}return at=!1,Br(),!0},[w,n]),Ne=p.useCallback((...ue)=>e8(n,$.current,...ue),[]);if(s1(()=>{C.current=t,O.current=r,ze(D)||(G.current=D)}),s1(()=>{if(!w)return;const ue=ve.bind(Qn,c1);let $e=0;const Le=yH(w,h,(at,Wt={})=>{if(at==Zu.FOCUS_EVENT){const Ie=Date.now();x().revalidateOnFocus&&Ie>$e&&S()&&($e=Ie+x().focusThrottleInterval,ue())}else if(at==Zu.RECONNECT_EVENT)x().revalidateOnReconnect&&S()&&ue();else{if(at==Zu.MUTATE_EVENT)return ve();if(at==Zu.ERROR_REVALIDATE_EVENT)return ve(Wt)}});return _.current=!1,$.current=w,b.current=!0,k({_k:v}),K&&(ze(U)||vf?ue():tH(ue)),()=>{_.current=!0,Le()}},[w]),s1(()=>{let ue;function $e(){const Le=Xa(u)?u(A().data):u;Le&&ue!==-1&&(ue=setTimeout(Oe,Le))}function Oe(){!A().error&&(f||x().isVisible())&&(c||x().isOnline())?ve(c1).then($e):$e()}return $e(),()=>{ue&&(clearTimeout(ue),ue=-1)}},[u,f,c,w]),p.useDebugValue(H),o&&ze(U)&&w)throw!P5&&vf?new Error("Fallback data is required when using suspense in SSR."):(C.current=t,O.current=r,_.current=!1,ze(V)?ve(c1):V);return{mutate:Ne,get data(){return I.data=!0,H},get error(){return I.error=!0,V},get isValidating(){return I.isValidating=!0,J},get isLoading(){return I.isLoading=!0,de}}},n8=mH(bH);globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function a8(e,t){const{data:r,error:n,isLoading:a}=n8(t==null?void 0:t.url,K7),[o,i]=p.useState(!1),s=p.useMemo(()=>{if(!r)return;const l=r.find(u=>u.name===e);if(l)return l;i(!0)},[r,e]);return p.useEffect(()=>{n&&i(!0)},[n]),{word:s,isLoading:a,hasError:o}}let wH=0;function rn(e,t){const r=`atom${++wH}`,n={toString:()=>r};return typeof e=="function"?n.read=e:(n.init=e,n.read=a=>a(n),n.write=(a,o,i)=>o(n,typeof i=="function"?i(a(n)):i)),t&&(n.write=t),n}const u1=e=>"init"in e,d1=e=>!!e.write,Tv=new WeakMap,_H=(e,t)=>{Tv.set(e,t),e.catch(()=>{}).finally(()=>Tv.delete(e))},L5=(e,t)=>{const r=Tv.get(e);r&&(Tv.delete(e),r(t))},M5=(e,t)=>{e.status="fulfilled",e.value=t},D5=(e,t)=>{e.status="rejected",e.reason=t},bp=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),j5=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),f1=e=>"v"in e&&e.v instanceof Promise,wp=e=>{if("e"in e)throw e.e;return e.v},$H=()=>{const e=new WeakMap,t=new WeakMap,r=new Map;let n,a;({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&(n=new Set,a=new Set);const o=S=>e.get(S),i=(S,A)=>{({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&Object.freeze(A);const k=e.get(S);if(e.set(S,A),r.has(S)||r.set(S,k),k&&f1(k)){const N="v"in A?A.v instanceof Promise?A.v:Promise.resolve(A.v):Promise.reject(A.e);L5(k.v,N)}},s=(S,A,k)=>{const N=new Map;let P=!1;k.forEach((I,E)=>{!I&&E===S&&(I=A),I&&(N.set(E,I),A.d.get(E)!==I&&(P=!0))}),(P||A.d.size!==N.size)&&(A.d=N)},l=(S,A,k)=>{const N=o(S),P={d:(N==null?void 0:N.d)||new Map,v:A};return k&&s(S,P,k),N&&bp(N,P)&&N.d===P.d?N:(i(S,P),P)},u=(S,A,k,N)=>{if(A instanceof Promise){let P;const I=new Promise((E,R)=>{let F=!1;A.then(B=>{if(!F){F=!0;const j=o(S),M=l(S,I,k);M5(I,B),E(B),(j==null?void 0:j.d)!==M.d&&C(S,M,j==null?void 0:j.d)}},B=>{if(!F){F=!0;const j=o(S),M=l(S,I,k);D5(I,B),R(B),(j==null?void 0:j.d)!==M.d&&C(S,M,j==null?void 0:j.d)}}),P=B=>{F||(F=!0,B.then(j=>M5(I,j),j=>D5(I,j)),E(B))}});return I.status="pending",_H(I,E=>{E&&P(E),N==null||N()}),l(S,I,k)}return l(S,A,k)},f=(S,A,k)=>{const N=o(S),P={d:(N==null?void 0:N.d)||new Map,e:A};return k&&s(S,P,k),N&&j5(N,P)&&N.d===P.d?N:(i(S,P),P)},c=S=>{const A=o(S);if(A&&(A.d.forEach((F,B)=>{B!==S&&!t.has(B)&&c(B)}),Array.from(A.d).every(([F,B])=>F===S||o(F)===B)))return A;const k=new Map;let N=!0;const P=F=>{if(F===S){const j=o(F);if(j)return k.set(F,j),wp(j);if(u1(F))return k.set(F,void 0),F.init;throw new Error("no atom init")}const B=c(F);return k.set(F,B),wp(B)};let I,E;const R={get signal(){return I||(I=new AbortController),I.signal},get setSelf(){return({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&d1(S),!E&&d1(S)&&(E=(...F)=>{if(!N)return b(S,...F)}),E}};try{const F=S.read(P,R);return u(S,F,k,()=>I==null?void 0:I.abort())}catch(F){return f(S,F,k)}finally{N=!1}},d=S=>wp(c(S)),h=S=>{let A=t.get(S);return A||(A=_(S)),A},g=(S,A)=>!A.l.size&&(!A.t.size||A.t.size===1&&A.t.has(S)),m=S=>{const A=t.get(S);A&&g(S,A)&&$(S)},w=S=>{const A=t.get(S);A==null||A.t.forEach(k=>{if(k!==S){const N=o(k),P=c(k);(!N||!bp(N,P))&&w(k)}})},v=(S,...A)=>{let k=!0;const N=E=>wp(c(E)),P=(E,...R)=>{let F;if(E===S){if(!u1(E))throw new Error("atom not writable");const B=o(E),j=u(E,R[0]);(!B||!bp(B,j))&&w(E)}else F=v(E,...R);return k||O(),F},I=S.write(N,P,...A);return k=!1,I},b=(S,...A)=>{const k=v(S,...A);return O(),k},_=(S,A)=>{const k={t:new Set(A&&[A]),l:new Set};if(t.set(S,k),({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&a.add(S),c(S).d.forEach((N,P)=>{const I=t.get(P);I?I.t.add(S):P!==S&&_(P,S)}),c(S),d1(S)&&S.onMount){const N=S.onMount((...P)=>b(S,...P));N&&(k.u=N)}return k},$=S=>{var A;const k=(A=t.get(S))==null?void 0:A.u;k&&k(),t.delete(S),({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&a.delete(S);const N=o(S);N&&(f1(N)&&L5(N.v),N.d.forEach((P,I)=>{if(I!==S){const E=t.get(I);E&&(E.t.delete(S),g(I,E)&&$(I))}}))},C=(S,A,k)=>{const N=new Set(A.d.keys());k==null||k.forEach((P,I)=>{if(N.has(I)){N.delete(I);return}const E=t.get(I);E&&(E.t.delete(S),g(I,E)&&$(I))}),N.forEach(P=>{const I=t.get(P);I?I.t.add(S):t.has(S)&&_(P,S)})},O=()=>{for(;r.size;){const S=Array.from(r);r.clear(),S.forEach(([A,k])=>{const N=o(A);if(N){N.d!==(k==null?void 0:k.d)&&C(A,N,k==null?void 0:k.d);const P=t.get(A);P&&!(k&&!f1(k)&&(bp(k,N)||j5(k,N)))&&P.l.forEach(I=>I())}})}({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&n.forEach(S=>S("state"))},x=(S,A)=>{const k=h(S);O();const N=k.l;return N.add(A),({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&n.forEach(P=>P("sub")),()=>{N.delete(A),m(S),({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&n.forEach(P=>P("unsub"))}};return({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"?{get:d,set:b,sub:x,dev_subscribe_store:S=>(n.add(S),()=>{n.delete(S)}),dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:S=>e.get(S),dev_get_mounted:S=>t.get(S),dev_restore_atoms:S=>{for(const[A,k]of S)u1(A)&&(u(A,k),w(A));O()}}:{get:d,set:b,sub:x}};let h1;const xH=()=>(h1||(h1=$H()),h1),SH=p.createContext(void 0),o8=e=>{const t=p.useContext(SH);return(e==null?void 0:e.store)||t||xH()},EH=e=>e instanceof Promise,CH=Y.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function oe(e,t){const r=o8(t),[[n,a,o],i]=p.useReducer(u=>{const f=r.get(e);return Object.is(u[0],f)&&u[1]===r&&u[2]===e?u:[f,r,e]},void 0,()=>[r.get(e),r,e]);let s=n;(a!==r||o!==e)&&(i(),s=r.get(e));const l=t==null?void 0:t.delay;return p.useEffect(()=>{const u=r.sub(e,()=>{if(typeof l=="number"){setTimeout(i,l);return}i()});return i(),u},[r,e,l]),p.useDebugValue(s),EH(s)?CH(s):s}function wa(e,t){const r=o8(t);return p.useCallback((...a)=>{if(({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&!("write"in e))throw new Error("not writable atom");return r.set(e,...a)},[r,e])}function wt(e,t){return[oe(e,t),wa(e,t)]}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const dh=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/pages/ErrorBook/store/index.ts/currentRowDetailAtom",rn(null));dh.debugLabel="currentRowDetailAtom";function i8(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ts(o)))==null?void 0:i.classGroupId}const F5=/^\[(.+)\]$/;function AH(e){if(F5.test(e)){const t=F5.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function RH(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return kH(Object.entries(e.classGroups),r).forEach(([o,i])=>{T_(i,n,o,t)}),n}function T_(e,t,r,n){e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:B5(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(OH(a)){T_(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,i])=>{T_(i,B5(t,o),r,n)})})}function B5(e,t){let r=e;return t.split(sS).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function OH(e){return e.isThemeGetter}function kH(e,t){return t?e.map(([r,n])=>{const a=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,s])=>[t+i,s])):o);return[r,a]}):e}function PH(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function a(o,i){r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)}return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return a(o,i),i},set(o,i){r.has(o)?r.set(o,i):a(o,i)}}}const c8="!";function IH(e){const t=e.separator,r=t.length===1,n=t[0],a=t.length;return function(i){const s=[];let l=0,u=0,f;for(let m=0;mu?f-u:void 0;return{modifiers:s,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:g}}}function NH(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function LH(e){return{cache:PH(e.cacheSize),splitModifiers:IH(e),...TH(e)}}const MH=/\s+/;function DH(e,t){const{splitModifiers:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=new Set;return e.trim().split(MH).map(i=>{const{modifiers:s,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:f}=r(i);let c=n(f?u.substring(0,f):u),d=!!f;if(!c){if(!f)return{isTailwindClass:!1,originalClassName:i};if(c=n(u),!c)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=NH(s).join(":");return{isTailwindClass:!0,modifierId:l?h+c8:h,classGroupId:c,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:s,classGroupId:l,hasPostfixModifier:u}=i,f=s+l;return o.has(f)?!1:(o.add(f),a(l,u).forEach(c=>o.add(s+c)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function jH(){let e=0,t,r,n="";for(;ec(f),e());return r=LH(u),n=r.cache.get,a=r.cache.set,o=s,s(l)}function s(l){const u=n(l);if(u)return u;const f=DH(l,r);return a(l,f),f}return function(){return o(jH.apply(null,arguments))}}function Ze(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const d8=/^\[(?:([a-z-]+):)?(.+)\]$/i,BH=/^\d+\/\d+$/,UH=new Set(["px","full","screen"]),zH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,WH=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Vn(e){return As(e)||UH.has(e)||BH.test(e)}function Vo(e){return uu(e,"length",JH)}function As(e){return!!e&&!Number.isNaN(Number(e))}function _p(e){return uu(e,"number",As)}function Qu(e){return!!e&&Number.isInteger(Number(e))}function GH(e){return e.endsWith("%")&&As(e.slice(0,-1))}function ge(e){return d8.test(e)}function Wo(e){return zH.test(e)}const KH=new Set(["length","size","percentage"]);function qH(e){return uu(e,KH,f8)}function YH(e){return uu(e,"position",f8)}const XH=new Set(["image","url"]);function ZH(e){return uu(e,XH,tG)}function QH(e){return uu(e,"",eG)}function Ju(){return!0}function uu(e,t,r){const n=d8.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function JH(e){return VH.test(e)}function f8(){return!1}function eG(e){return WH.test(e)}function tG(e){return HH.test(e)}function rG(){const e=Ze("colors"),t=Ze("spacing"),r=Ze("blur"),n=Ze("brightness"),a=Ze("borderColor"),o=Ze("borderRadius"),i=Ze("borderSpacing"),s=Ze("borderWidth"),l=Ze("contrast"),u=Ze("grayscale"),f=Ze("hueRotate"),c=Ze("invert"),d=Ze("gap"),h=Ze("gradientColorStops"),g=Ze("gradientColorStopPositions"),m=Ze("inset"),w=Ze("margin"),v=Ze("opacity"),b=Ze("padding"),_=Ze("saturate"),$=Ze("scale"),C=Ze("sepia"),O=Ze("skew"),x=Ze("space"),S=Ze("translate"),A=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",ge,t],P=()=>[ge,t],I=()=>["",Vn,Vo],E=()=>["auto",As,ge],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],j=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",ge],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[As,_p],V=()=>[As,ge];return{cacheSize:500,separator:":",theme:{colors:[Ju],spacing:[Vn,Vo],blur:["none","",Wo,ge],brightness:U(),borderColor:[e],borderRadius:["none","","full",Wo,ge],borderSpacing:P(),borderWidth:I(),contrast:U(),grayscale:M(),hueRotate:V(),invert:M(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[GH,Vo],inset:N(),margin:N(),opacity:U(),padding:P(),saturate:U(),scale:U(),sepia:M(),skew:V(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[Wo]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...R(),ge]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qu,ge]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",Qu,ge]}],"grid-cols":[{"grid-cols":[Ju]}],"col-start-end":[{col:["auto",{span:["full",Qu,ge]},ge]}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":[Ju]}],"row-start-end":[{row:["auto",{span:[Qu,ge]},ge]}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[x]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[x]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",ge,t]}],"min-w":[{"min-w":["min","max","fit",ge,Vn]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Wo]},Wo,ge]}],h:[{h:[ge,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Vn,ge]}],"max-h":[{"max-h":[ge,t,"min","max","fit"]}],"font-size":[{text:["base",Wo,Vo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_p]}],"font-family":[{font:[Ju]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ge]}],"line-clamp":[{"line-clamp":["none",As,_p]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vn,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vn,Vo]}],"underline-offset":[{"underline-offset":["auto",Vn,ge]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),YH]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qH]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ZH]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[Vn,ge]}],"outline-w":[{outline:[Vn,Vo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Vn,Vo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wo,QH]}],"shadow-color":[{shadow:[Ju]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":B()}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Wo,ge]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[c]}],saturate:[{saturate:[_]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ge]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[$]}],"scale-x":[{"scale-x":[$]}],"scale-y":[{"scale-y":[$]}],rotate:[{rotate:[Qu,ge]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vn,Vo,_p]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const nG=FH(rG);globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function ul(...e){return nG(s8(e))}function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(r=>aG(r,t))}function In(...e){return p.useCallback(h8(...e),e)}function f0(e,t=[]){let r=[];function n(o,i){const s=p.createContext(i),l=r.length;r=[...r,i];function u(c){const{scope:d,children:h,...g}=c,m=(d==null?void 0:d[e][l])||s,w=p.useMemo(()=>g,Object.values(g));return p.createElement(m.Provider,{value:w},h)}function f(c,d){const h=(d==null?void 0:d[e][l])||s,g=p.useContext(h);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${c}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,f]}const a=()=>{const o=r.map(i=>p.createContext(i));return function(s){const l=(s==null?void 0:s[e])||o;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return a.scopeName=e,[n,oG(a,...t)]}function oG(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const i=n.reduce((s,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...s,...c}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var p8={exports:{}},ln={},g8={exports:{}},v8={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function t(j,M){var D=j.length;j.push(M);e:for(;0>>1,V=j[U];if(0>>1;Ua(K,D))Qa(J,K)?(j[U]=J,j[Q]=D,U=Q):(j[U]=K,j[H]=D,U=H);else if(Qa(J,D))j[U]=J,j[Q]=D,U=Q;else break e}}return M}function a(j,M){var D=j.sortIndex-M.sortIndex;return D!==0?D:j.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var l=[],u=[],f=1,c=null,d=3,h=!1,g=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(j){for(var M=r(u);M!==null;){if(M.callback===null)n(u);else if(M.startTime<=j)n(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=r(u)}}function $(j){if(m=!1,_(j),!g)if(r(l)!==null)g=!0,F(C);else{var M=r(u);M!==null&&B($,M.startTime-j)}}function C(j,M){g=!1,m&&(m=!1,v(S),S=-1),h=!0;var D=d;try{for(_(M),c=r(l);c!==null&&(!(c.expirationTime>M)||j&&!N());){var U=c.callback;if(typeof U=="function"){c.callback=null,d=c.priorityLevel;var V=U(c.expirationTime<=M);M=e.unstable_now(),typeof V=="function"?c.callback=V:c===r(l)&&n(l),_(M)}else n(l);c=r(l)}if(c!==null)var G=!0;else{var H=r(u);H!==null&&B($,H.startTime-M),G=!1}return G}finally{c=null,d=D,h=!1}}var O=!1,x=null,S=-1,A=5,k=-1;function N(){return!(e.unstable_now()-kj||125U?(j.sortIndex=D,t(u,j),r(l)===null&&j===r(u)&&(m?(v(S),S=-1):m=!0,B($,D-U))):(j.sortIndex=V,t(l,j),g||h||(g=!0,F(C))),j},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(j){var M=d;return function(){var D=d;d=M;try{return j.apply(this,arguments)}finally{d=D}}}})(v8);g8.exports=v8;var iG=g8.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var m8=p,nn=iG;function X(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),A_=Object.prototype.hasOwnProperty,sG=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,U5={},z5={};function lG(e){return A_.call(z5,e)?!0:A_.call(U5,e)?!1:sG.test(e)?z5[e]=!0:(U5[e]=!0,!1)}function cG(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function uG(e,t,r,n){if(t===null||typeof t>"u"||cG(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function xr(e,t,r,n,a,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Zt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Zt[e]=new xr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Zt[t]=new xr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Zt[e]=new xr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Zt[e]=new xr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Zt[e]=new xr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Zt[e]=new xr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Zt[e]=new xr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Zt[e]=new xr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Zt[e]=new xr(e,5,!1,e.toLowerCase(),null,!1,!1)});var lS=/[\-:]([a-z])/g;function cS(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(lS,cS);Zt[t]=new xr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(lS,cS);Zt[t]=new xr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(lS,cS);Zt[t]=new xr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Zt[e]=new xr(e,1,!1,e.toLowerCase(),null,!1,!1)});Zt.xlinkHref=new xr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Zt[e]=new xr(e,1,!1,e.toLowerCase(),null,!0,!0)});function uS(e,t,r,n){var a=Zt.hasOwnProperty(t)?Zt[t]:null;(a!==null?a.type!==0:n||!(2s||a[i]!==o[s]){var l=` +`+a[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{g1=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ad(e):""}function dG(e){switch(e.tag){case 5:return Ad(e.type);case 16:return Ad("Lazy");case 13:return Ad("Suspense");case 19:return Ad("SuspenseList");case 0:case 2:case 15:return e=v1(e.type,!1),e;case 11:return e=v1(e.type.render,!1),e;case 1:return e=v1(e.type,!0),e;default:return""}}function P_(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gl:return"Fragment";case Hl:return"Portal";case R_:return"Profiler";case dS:return"StrictMode";case O_:return"Suspense";case k_:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case w8:return(e.displayName||"Context")+".Consumer";case b8:return(e._context.displayName||"Context")+".Provider";case fS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hS:return t=e.displayName||null,t!==null?t:P_(e.type)||"Memo";case Zo:t=e._payload,e=e._init;try{return P_(e(t))}catch{}}return null}function fG(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return P_(t);case 8:return t===dS?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ri(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $8(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hG(e){var t=$8(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xp(e){e._valueTracker||(e._valueTracker=hG(e))}function x8(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=$8(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Av(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function I_(e,t){var r=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function W5(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ri(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function S8(e,t){t=t.checked,t!=null&&uS(e,"checked",t,!1)}function N_(e,t){S8(e,t);var r=Ri(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?L_(e,t.type,r):t.hasOwnProperty("defaultValue")&&L_(e,t.type,Ri(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function H5(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function L_(e,t,r){(t!=="number"||Av(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Rd=Array.isArray;function fc(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=Sp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yf(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var zd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pG=["Webkit","ms","Moz","O"];Object.keys(zd).forEach(function(e){pG.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zd[t]=zd[e]})});function A8(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||zd.hasOwnProperty(e)&&zd[e]?(""+t).trim():t+"px"}function R8(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=A8(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var gG=pt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function j_(e,t){if(t){if(gG[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(X(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(X(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(X(61))}if(t.style!=null&&typeof t.style!="object")throw Error(X(62))}}function F_(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var B_=null;function pS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var U_=null,hc=null,pc=null;function q5(e){if(e=ph(e)){if(typeof U_!="function")throw Error(X(280));var t=e.stateNode;t&&(t=m0(t),U_(e.stateNode,e.type,t))}}function O8(e){hc?pc?pc.push(e):pc=[e]:hc=e}function k8(){if(hc){var e=hc,t=pc;if(pc=hc=null,q5(e),t)for(e=0;e>>=0,e===0?32:31-(CG(e)/TG|0)|0}var Ep=64,Cp=4194304;function Od(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var s=i&~a;s!==0?n=Od(s):(o&=i,o!==0&&(n=Od(o)))}else i=r&~a,i!==0?n=Od(i):o!==0&&(n=Od(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,o=t&-t,a>=o||a===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function fh(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ra(t),e[t]=r}function kG(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Wd),n3=String.fromCharCode(32),a3=!1;function Z8(e,t){switch(e){case"keyup":return oK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Q8(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kl=!1;function sK(e,t){switch(e){case"compositionend":return Q8(t);case"keypress":return t.which!==32?null:(a3=!0,n3);case"textInput":return e=t.data,e===n3&&a3?null:e;default:return null}}function lK(e,t){if(Kl)return e==="compositionend"||!$S&&Z8(e,t)?(e=Y8(),Hg=bS=oi=null,Kl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=l3(r)}}function rN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?rN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nN(){for(var e=window,t=Av();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Av(e.document)}return t}function xS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function mK(e){var t=nN(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&rN(r.ownerDocument.documentElement,r)){if(n!==null&&xS(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,o=Math.min(n.start,a);n=n.end===void 0?o:Math.min(n.end,a),!e.extend&&o>n&&(a=n,n=o,o=a),a=c3(r,o);var i=c3(r,n);a&&i&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ql=null,K_=null,Gd=null,q_=!1;function u3(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;q_||ql==null||ql!==Av(n)||(n=ql,"selectionStart"in n&&xS(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Gd&&Sf(Gd,n)||(Gd=n,n=Lv(K_,"onSelect"),0Zl||(e.current=e$[Zl],e$[Zl]=null,Zl--)}function Ye(e,t){Zl++,e$[Zl]=e.current,e.current=t}var Oi={},fr=Gi(Oi),Nr=Gi(!1),qs=Oi;function Dc(e,t){var r=e.type.contextTypes;if(!r)return Oi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},o;for(o in r)a[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Lr(e){return e=e.childContextTypes,e!=null}function Dv(){rt(Nr),rt(fr)}function m3(e,t,r){if(fr.current!==Oi)throw Error(X(168));Ye(fr,t),Ye(Nr,r)}function fN(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(X(108,fG(e)||"Unknown",a));return pt({},r,n)}function jv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Oi,qs=fr.current,Ye(fr,e),Ye(Nr,Nr.current),!0}function y3(e,t,r){var n=e.stateNode;if(!n)throw Error(X(169));r?(e=fN(e,t,qs),n.__reactInternalMemoizedMergedChildContext=e,rt(Nr),rt(fr),Ye(fr,e)):rt(Nr),Ye(Nr,r)}var Ga=null,y0=!1,O1=!1;function hN(e){Ga===null?Ga=[e]:Ga.push(e)}function RK(e){y0=!0,hN(e)}function Ki(){if(!O1&&Ga!==null){O1=!0;var e=0,t=Ve;try{var r=Ga;for(Ve=1;e>=i,a-=i,Qa=1<<32-ra(t)+a|r<S?(A=x,x=null):A=x.sibling;var k=d(v,x,_[S],$);if(k===null){x===null&&(x=A);break}e&&x&&k.alternate===null&&t(v,x),b=o(k,b,S),O===null?C=k:O.sibling=k,O=k,x=A}if(S===_.length)return r(v,x),it&&ys(v,S),C;if(x===null){for(;S<_.length;S++)x=c(v,_[S],$),x!==null&&(b=o(x,b,S),O===null?C=x:O.sibling=x,O=x);return it&&ys(v,S),C}for(x=n(v,x);S<_.length;S++)A=h(x,v,S,_[S],$),A!==null&&(e&&A.alternate!==null&&x.delete(A.key===null?S:A.key),b=o(A,b,S),O===null?C=A:O.sibling=A,O=A);return e&&x.forEach(function(N){return t(v,N)}),it&&ys(v,S),C}function m(v,b,_,$){var C=ed(_);if(typeof C!="function")throw Error(X(150));if(_=C.call(_),_==null)throw Error(X(151));for(var O=C=null,x=b,S=b=0,A=null,k=_.next();x!==null&&!k.done;S++,k=_.next()){x.index>S?(A=x,x=null):A=x.sibling;var N=d(v,x,k.value,$);if(N===null){x===null&&(x=A);break}e&&x&&N.alternate===null&&t(v,x),b=o(N,b,S),O===null?C=N:O.sibling=N,O=N,x=A}if(k.done)return r(v,x),it&&ys(v,S),C;if(x===null){for(;!k.done;S++,k=_.next())k=c(v,k.value,$),k!==null&&(b=o(k,b,S),O===null?C=k:O.sibling=k,O=k);return it&&ys(v,S),C}for(x=n(v,x);!k.done;S++,k=_.next())k=h(x,v,S,k.value,$),k!==null&&(e&&k.alternate!==null&&x.delete(k.key===null?S:k.key),b=o(k,b,S),O===null?C=k:O.sibling=k,O=k);return e&&x.forEach(function(P){return t(v,P)}),it&&ys(v,S),C}function w(v,b,_,$){if(typeof _=="object"&&_!==null&&_.type===Gl&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case $p:e:{for(var C=_.key,O=b;O!==null;){if(O.key===C){if(C=_.type,C===Gl){if(O.tag===7){r(v,O.sibling),b=a(O,_.props.children),b.return=v,v=b;break e}}else if(O.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Zo&&E3(C)===O.type){r(v,O.sibling),b=a(O,_.props),b.ref=od(v,O,_),b.return=v,v=b;break e}r(v,O);break}else t(v,O);O=O.sibling}_.type===Gl?(b=Ds(_.props.children,v.mode,$,_.key),b.return=v,v=b):($=Jg(_.type,_.key,_.props,null,v.mode,$),$.ref=od(v,b,_),$.return=v,v=$)}return i(v);case Hl:e:{for(O=_.key;b!==null;){if(b.key===O)if(b.tag===4&&b.stateNode.containerInfo===_.containerInfo&&b.stateNode.implementation===_.implementation){r(v,b.sibling),b=a(b,_.children||[]),b.return=v,v=b;break e}else{r(v,b);break}else t(v,b);b=b.sibling}b=j1(_,v.mode,$),b.return=v,v=b}return i(v);case Zo:return O=_._init,w(v,b,O(_._payload),$)}if(Rd(_))return g(v,b,_,$);if(ed(_))return m(v,b,_,$);Ip(v,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,b!==null&&b.tag===6?(r(v,b.sibling),b=a(b,_),b.return=v,v=b):(r(v,b),b=D1(_,v.mode,$),b.return=v,v=b),i(v)):r(v,b)}return w}var Fc=_N(!0),$N=_N(!1),gh={},$a=Gi(gh),Af=Gi(gh),Rf=Gi(gh);function ks(e){if(e===gh)throw Error(X(174));return e}function PS(e,t){switch(Ye(Rf,t),Ye(Af,e),Ye($a,gh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:D_(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=D_(t,e)}rt($a),Ye($a,t)}function Bc(){rt($a),rt(Af),rt(Rf)}function xN(e){ks(Rf.current);var t=ks($a.current),r=D_(t,e.type);t!==r&&(Ye(Af,e),Ye($a,r))}function IS(e){Af.current===e&&(rt($a),rt(Af))}var ct=Gi(0);function Wv(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var k1=[];function NS(){for(var e=0;er?r:4,e(!0);var n=P1.transition;P1.transition={};try{e(!1),t()}finally{Ve=r,P1.transition=n}}function FN(){return On().memoizedState}function IK(e,t,r){var n=_i(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},BN(e))UN(t,r);else if(r=mN(e,t,r,n),r!==null){var a=mr();na(r,e,n,a),zN(r,t,n)}}function NK(e,t,r){var n=_i(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(BN(e))UN(t,a);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,s=o(i,r);if(a.hasEagerState=!0,a.eagerState=s,ia(s,i)){var l=t.interleaved;l===null?(a.next=a,OS(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}r=mN(e,t,a,n),r!==null&&(a=mr(),na(r,e,n,a),zN(r,t,n))}}function BN(e){var t=e.alternate;return e===ht||t!==null&&t===ht}function UN(e,t){Kd=Hv=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function zN(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,vS(e,r)}}var Gv={readContext:Rn,useCallback:tr,useContext:tr,useEffect:tr,useImperativeHandle:tr,useInsertionEffect:tr,useLayoutEffect:tr,useMemo:tr,useReducer:tr,useRef:tr,useState:tr,useDebugValue:tr,useDeferredValue:tr,useTransition:tr,useMutableSource:tr,useSyncExternalStore:tr,useId:tr,unstable_isNewReconciler:!1},LK={readContext:Rn,useCallback:function(e,t){return ha().memoizedState=[e,t===void 0?null:t],e},useContext:Rn,useEffect:T3,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Yg(4194308,4,NN.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Yg(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yg(4,2,e,t)},useMemo:function(e,t){var r=ha();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ha();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=IK.bind(null,ht,e),[n.memoizedState,e]},useRef:function(e){var t=ha();return e={current:e},t.memoizedState=e},useState:C3,useDebugValue:FS,useDeferredValue:function(e){return ha().memoizedState=e},useTransition:function(){var e=C3(!1),t=e[0];return e=PK.bind(null,e[1]),ha().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ht,a=ha();if(it){if(r===void 0)throw Error(X(407));r=r()}else{if(r=t(),zt===null)throw Error(X(349));Xs&30||CN(n,t,r)}a.memoizedState=r;var o={value:r,getSnapshot:t};return a.queue=o,T3(AN.bind(null,n,o,e),[e]),n.flags|=2048,Pf(9,TN.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=ha(),t=zt.identifierPrefix;if(it){var r=Ja,n=Qa;r=(n&~(1<<32-ra(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Of++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[ma]=t,e[Tf]=n,ZN(e,t,!1,!1),t.stateNode=e;e:{switch(i=F_(r,n),r){case"dialog":Qe("cancel",e),Qe("close",e),a=n;break;case"iframe":case"object":case"embed":Qe("load",e),a=n;break;case"video":case"audio":for(a=0;azc&&(t.flags|=128,n=!0,id(o,!1),t.lanes=4194304)}else{if(!n)if(e=Wv(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),id(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!it)return rr(t),null}else 2*xt()-o.renderingStartTime>zc&&r!==1073741824&&(t.flags|=128,n=!0,id(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=xt(),t.sibling=null,r=ct.current,Ye(ct,n?r&1|2:r&1),t):(rr(t),null);case 22:case 23:return HS(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Wr&1073741824&&(rr(t),t.subtreeFlags&6&&(t.flags|=8192)):rr(t),null;case 24:return null;case 25:return null}throw Error(X(156,t.tag))}function VK(e,t){switch(ES(t),t.tag){case 1:return Lr(t.type)&&Dv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bc(),rt(Nr),rt(fr),NS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return IS(t),null;case 13:if(rt(ct),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(X(340));jc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(ct),null;case 4:return Bc(),null;case 10:return RS(t.type._context),null;case 22:case 23:return HS(),null;case 24:return null;default:return null}}var Lp=!1,ir=!1,WK=typeof WeakSet=="function"?WeakSet:Set,ne=null;function tc(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){yt(e,t,n)}else r.current=null}function f$(e,t,r){try{r()}catch(n){yt(e,t,n)}}var M3=!1;function HK(e,t){if(Y_=Iv,e=nN(),xS(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,s=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==r||a!==0&&c.nodeType!==3||(s=i+a),c!==o||n!==0&&c.nodeType!==3||(l=i+n),c.nodeType===3&&(i+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===r&&++u===a&&(s=i),d===o&&++f===n&&(l=i),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(X_={focusedElem:e,selectionRange:r},Iv=!1,ne=t;ne!==null;)if(t=ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ne=e;else for(;ne!==null;){t=ne;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,w=g.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Kn(t.type,m),w);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(X(163))}}catch($){yt(t,t.return,$)}if(e=t.sibling,e!==null){e.return=t.return,ne=e;break}ne=t.return}return g=M3,M3=!1,g}function qd(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,o!==void 0&&f$(t,r,o)}a=a.next}while(a!==n)}}function _0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function h$(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function eL(e){var t=e.alternate;t!==null&&(e.alternate=null,eL(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ma],delete t[Tf],delete t[J_],delete t[TK],delete t[AK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function tL(e){return e.tag===5||e.tag===3||e.tag===4}function D3(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tL(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function p$(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Mv));else if(n!==4&&(e=e.child,e!==null))for(p$(e,t,r),e=e.sibling;e!==null;)p$(e,t,r),e=e.sibling}function g$(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(g$(e,t,r),e=e.sibling;e!==null;)g$(e,t,r),e=e.sibling}var Kt=null,qn=!1;function Ho(e,t,r){for(r=r.child;r!==null;)rL(e,t,r),r=r.sibling}function rL(e,t,r){if(_a&&typeof _a.onCommitFiberUnmount=="function")try{_a.onCommitFiberUnmount(h0,r)}catch{}switch(r.tag){case 5:ir||tc(r,t);case 6:var n=Kt,a=qn;Kt=null,Ho(e,t,r),Kt=n,qn=a,Kt!==null&&(qn?(e=Kt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Kt.removeChild(r.stateNode));break;case 18:Kt!==null&&(qn?(e=Kt,r=r.stateNode,e.nodeType===8?R1(e.parentNode,r):e.nodeType===1&&R1(e,r),$f(e)):R1(Kt,r.stateNode));break;case 4:n=Kt,a=qn,Kt=r.stateNode.containerInfo,qn=!0,Ho(e,t,r),Kt=n,qn=a;break;case 0:case 11:case 14:case 15:if(!ir&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var o=a,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&f$(r,t,i),a=a.next}while(a!==n)}Ho(e,t,r);break;case 1:if(!ir&&(tc(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){yt(r,t,s)}Ho(e,t,r);break;case 21:Ho(e,t,r);break;case 22:r.mode&1?(ir=(n=ir)||r.memoizedState!==null,Ho(e,t,r),ir=n):Ho(e,t,r);break;default:Ho(e,t,r)}}function j3(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new WK),t.forEach(function(n){var a=eq.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function Wn(e,t){var r=t.deletions;if(r!==null)for(var n=0;na&&(a=i),n&=~o}if(n=a,n=xt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*KK(n/1960))-n,10e?16:e,ii===null)var n=!1;else{if(e=ii,ii=null,Yv=0,ke&6)throw Error(X(331));var a=ke;for(ke|=4,ne=e.current;ne!==null;){var o=ne,i=o.child;if(ne.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lxt()-VS?Ms(e,0):zS|=r),Mr(e,t)}function uL(e,t){t===0&&(e.mode&1?(t=Cp,Cp<<=1,!(Cp&130023424)&&(Cp=4194304)):t=1);var r=mr();e=ho(e,t),e!==null&&(fh(e,t,r),Mr(e,r))}function JK(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),uL(e,r)}function eq(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(X(314))}n!==null&&n.delete(t),uL(e,r)}var dL;dL=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Nr.current)kr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return kr=!1,UK(e,t,r);kr=!!(e.flags&131072)}else kr=!1,it&&t.flags&1048576&&pN(t,Bv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Xg(e,t),e=t.pendingProps;var a=Dc(t,fr.current);vc(t,r),a=MS(null,t,n,e,a,r);var o=DS();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lr(n)?(o=!0,jv(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,kS(t),a.updater=b0,t.stateNode=a,a._reactInternals=t,o$(t,n,e,r),t=l$(null,t,n,!0,o,r)):(t.tag=0,it&&o&&SS(t),gr(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Xg(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=rq(n),e=Kn(n,e),a){case 0:t=s$(null,t,n,e,r);break e;case 1:t=I3(null,t,n,e,r);break e;case 11:t=k3(null,t,n,e,r);break e;case 14:t=P3(null,t,n,Kn(n.type,e),r);break e}throw Error(X(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Kn(n,a),s$(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Kn(n,a),I3(e,t,n,a,r);case 3:e:{if(qN(t),e===null)throw Error(X(387));n=t.pendingProps,o=t.memoizedState,a=o.element,yN(e,t),Vv(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Uc(Error(X(423)),t),t=N3(e,t,n,r,a);break e}else if(n!==a){a=Uc(Error(X(424)),t),t=N3(e,t,n,r,a);break e}else for(Kr=yi(t.stateNode.containerInfo.firstChild),en=t,it=!0,Yn=null,r=$N(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(jc(),n===a){t=po(e,t,r);break e}gr(e,t,n,r)}t=t.child}return t;case 5:return xN(t),e===null&&r$(t),n=t.type,a=t.pendingProps,o=e!==null?e.memoizedProps:null,i=a.children,Z_(n,a)?i=null:o!==null&&Z_(n,o)&&(t.flags|=32),KN(e,t),gr(e,t,i,r),t.child;case 6:return e===null&&r$(t),null;case 13:return YN(e,t,r);case 4:return PS(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Fc(t,null,n,r):gr(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Kn(n,a),k3(e,t,n,a,r);case 7:return gr(e,t,t.pendingProps,r),t.child;case 8:return gr(e,t,t.pendingProps.children,r),t.child;case 12:return gr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,o=t.memoizedProps,i=a.value,Ye(Uv,n._currentValue),n._currentValue=i,o!==null)if(ia(o.value,i)){if(o.children===a.children&&!Nr.current){t=po(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=no(-1,r&-r),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),n$(o.return,r,t),s.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(X(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),n$(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}gr(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,vc(t,r),a=Rn(a),n=n(a),t.flags|=1,gr(e,t,n,r),t.child;case 14:return n=t.type,a=Kn(n,t.pendingProps),a=Kn(n.type,a),P3(e,t,n,a,r);case 15:return HN(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Kn(n,a),Xg(e,t),t.tag=1,Lr(n)?(e=!0,jv(t)):e=!1,vc(t,r),wN(t,n,a),o$(t,n,a,r),l$(null,t,n,!0,e,r);case 19:return XN(e,t,r);case 22:return GN(e,t,r)}throw Error(X(156,t.tag))};function fL(e,t){return j8(e,t)}function tq(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(e,t,r,n){return new tq(e,t,r,n)}function KS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rq(e){if(typeof e=="function")return KS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===fS)return 11;if(e===hS)return 14}return 2}function $i(e,t){var r=e.alternate;return r===null?(r=En(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Jg(e,t,r,n,a,o){var i=2;if(n=e,typeof e=="function")KS(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Gl:return Ds(r.children,a,o,t);case dS:i=8,a|=8;break;case R_:return e=En(12,r,t,a|2),e.elementType=R_,e.lanes=o,e;case O_:return e=En(13,r,t,a),e.elementType=O_,e.lanes=o,e;case k_:return e=En(19,r,t,a),e.elementType=k_,e.lanes=o,e;case _8:return x0(r,a,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case b8:i=10;break e;case w8:i=9;break e;case fS:i=11;break e;case hS:i=14;break e;case Zo:i=16,n=null;break e}throw Error(X(130,e==null?e:typeof e,""))}return t=En(i,r,t,a),t.elementType=e,t.type=n,t.lanes=o,t}function Ds(e,t,r,n){return e=En(7,e,n,t),e.lanes=r,e}function x0(e,t,r,n){return e=En(22,e,n,t),e.elementType=_8,e.lanes=r,e.stateNode={isHidden:!1},e}function D1(e,t,r){return e=En(6,e,null,t),e.lanes=r,e}function j1(e,t,r){return t=En(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nq(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=y1(0),this.expirationTimes=y1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=y1(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function qS(e,t,r,n,a,o,i,s,l){return e=new nq(e,t,r,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=En(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},kS(o),e}function aq(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vL)}catch{}}vL(),p8.exports=ln;var qi=p8.exports;const hje=lu(qi),mL=p.forwardRef((e,t)=>{const{children:r,...n}=e,a=p.Children.toArray(r),o=a.find(cq);if(o){const i=o.props.children,s=a.map(l=>l===o?p.Children.count(i)>1?p.Children.only(null):p.isValidElement(i)?i.props.children:null:l);return p.createElement(w$,te({},n,{ref:t}),p.isValidElement(i)?p.cloneElement(i,void 0,s):null)}return p.createElement(w$,te({},n,{ref:t}),r)});mL.displayName="Slot";const w$=p.forwardRef((e,t)=>{const{children:r,...n}=e;return p.isValidElement(r)?p.cloneElement(r,{...uq(n,r.props),ref:t?h8(t,r.ref):r.ref}):p.Children.count(r)>1?p.Children.only(null):null});w$.displayName="SlotClone";const yL=({children:e})=>p.createElement(p.Fragment,null,e);function cq(e){return p.isValidElement(e)&&e.type===yL}function uq(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...s)=>{o(...s),a(...s)}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}const dq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],un=dq.reduce((e,t)=>{const r=p.forwardRef((n,a)=>{const{asChild:o,...i}=n,s=o?mL:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(s,te({},i,{ref:a}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function fq(e,t){e&&qi.flushSync(()=>e.dispatchEvent(t))}function Or(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function hq(e,t=globalThis==null?void 0:globalThis.document){const r=Or(e);p.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const _$="dismissableLayer.update",pq="dismissableLayer.pointerDownOutside",gq="dismissableLayer.focusOutside";let G3;const vq=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mq=p.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...u}=e,f=p.useContext(vq),[c,d]=p.useState(null),h=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=p.useState({}),m=In(t,S=>d(S)),w=Array.from(f.layers),[v]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(v),_=c?w.indexOf(c):-1,$=f.layersWithOutsidePointerEventsDisabled.size>0,C=_>=b,O=yq(S=>{const A=S.target,k=[...f.branches].some(N=>N.contains(A));!C||k||(o==null||o(S),s==null||s(S),S.defaultPrevented||l==null||l())},h),x=bq(S=>{const A=S.target;[...f.branches].some(N=>N.contains(A))||(i==null||i(S),s==null||s(S),S.defaultPrevented||l==null||l())},h);return hq(S=>{_===f.layers.size-1&&(a==null||a(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))},h),p.useEffect(()=>{if(c)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(G3=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(c)),f.layers.add(c),K3(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=G3)}},[c,h,n,f]),p.useEffect(()=>()=>{c&&(f.layers.delete(c),f.layersWithOutsidePointerEventsDisabled.delete(c),K3())},[c,f]),p.useEffect(()=>{const S=()=>g({});return document.addEventListener(_$,S),()=>document.removeEventListener(_$,S)},[]),p.createElement(un.div,te({},u,{ref:m,style:{pointerEvents:$?C?"auto":"none":void 0,...e.style},onFocusCapture:or(e.onFocusCapture,x.onFocusCapture),onBlurCapture:or(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:or(e.onPointerDownCapture,O.onPointerDownCapture)}))});function yq(e,t=globalThis==null?void 0:globalThis.document){const r=Or(e),n=p.useRef(!1),a=p.useRef(()=>{});return p.useEffect(()=>{const o=s=>{if(s.target&&!n.current){let u=function(){bL(pq,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function bq(e,t=globalThis==null?void 0:globalThis.document){const r=Or(e),n=p.useRef(!1);return p.useEffect(()=>{const a=o=>{o.target&&!n.current&&bL(gq,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function K3(){const e=new CustomEvent(_$);document.dispatchEvent(e)}function bL(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?fq(a,o):a.dispatchEvent(o)}const go=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},wq=Ks["useId".toString()]||(()=>{});let _q=0;function $q(e){const[t,r]=p.useState(wq());return go(()=>{e||r(n=>n??String(_q++))},[e]),e||(t?`radix-${t}`:"")}const xq=["top","right","bottom","left"],ki=Math.min,Gr=Math.max,Qv=Math.round,jp=Math.floor,Pi=e=>({x:e,y:e}),Sq={left:"right",right:"left",bottom:"top",top:"bottom"},Eq={start:"end",end:"start"};function $$(e,t,r){return Gr(e,ki(t,r))}function vo(e,t){return typeof e=="function"?e(t):e}function mo(e){return e.split("-")[0]}function hu(e){return e.split("-")[1]}function QS(e){return e==="x"?"y":"x"}function JS(e){return e==="y"?"height":"width"}function pu(e){return["top","bottom"].includes(mo(e))?"y":"x"}function eE(e){return QS(pu(e))}function Cq(e,t,r){r===void 0&&(r=!1);const n=hu(e),a=eE(e),o=JS(a);let i=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Jv(i)),[i,Jv(i)]}function Tq(e){const t=Jv(e);return[x$(e),t,x$(t)]}function x$(e){return e.replace(/start|end/g,t=>Eq[t])}function Aq(e,t,r){const n=["left","right"],a=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?o:i;default:return[]}}function Rq(e,t,r,n){const a=hu(e);let o=Aq(mo(e),r==="start",n);return a&&(o=o.map(i=>i+"-"+a),t&&(o=o.concat(o.map(x$)))),o}function Jv(e){return e.replace(/left|right|bottom|top/g,t=>Sq[t])}function Oq(e){return{top:0,right:0,bottom:0,left:0,...e}}function wL(e){return typeof e!="number"?Oq(e):{top:e,right:e,bottom:e,left:e}}function em(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function q3(e,t,r){let{reference:n,floating:a}=e;const o=pu(t),i=eE(t),s=JS(i),l=mo(t),u=o==="y",f=n.x+n.width/2-a.width/2,c=n.y+n.height/2-a.height/2,d=n[s]/2-a[s]/2;let h;switch(l){case"top":h={x:f,y:n.y-a.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:c};break;case"left":h={x:n.x-a.width,y:c};break;default:h={x:n.x,y:n.y}}switch(hu(t)){case"start":h[i]-=d*(r&&u?-1:1);break;case"end":h[i]+=d*(r&&u?-1:1);break}return h}const kq=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:i}=r,s=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:f,y:c}=q3(u,n,l),d=n,h={},g=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:f=0}=vo(e,t)||{};if(u==null)return{};const c=wL(f),d={x:r,y:n},h=eE(a),g=JS(h),m=await i.getDimensions(u),w=h==="y",v=w?"top":"left",b=w?"bottom":"right",_=w?"clientHeight":"clientWidth",$=o.reference[g]+o.reference[h]-d[h]-o.floating[g],C=d[h]-o.reference[h],O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let x=O?O[_]:0;(!x||!await(i.isElement==null?void 0:i.isElement(O)))&&(x=s.floating[_]||o.floating[g]);const S=$/2-C/2,A=x/2-m[g]/2-1,k=ki(c[v],A),N=ki(c[b],A),P=k,I=x-m[g]-N,E=x/2-m[g]/2+S,R=$$(P,E,I),F=!l.arrow&&hu(a)!=null&&E!=R&&o.reference[g]/2-(EP<=0)){var A,k;const P=(((A=o.flip)==null?void 0:A.index)||0)+1,I=C[P];if(I)return{data:{index:P,overflows:S},reset:{placement:I}};let E=(k=S.filter(R=>R.overflows[0]<=0).sort((R,F)=>R.overflows[1]-F.overflows[1])[0])==null?void 0:k.placement;if(!E)switch(h){case"bestFit":{var N;const R=(N=S.map(F=>[F.placement,F.overflows.filter(B=>B>0).reduce((B,j)=>B+j,0)]).sort((F,B)=>F[1]-B[1])[0])==null?void 0:N[0];R&&(E=R);break}case"initialPlacement":E=s;break}if(a!==E)return{reset:{placement:E}}}return{}}}};function X3(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Z3(e){return xq.some(t=>e[t]>=0)}const Iq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=vo(e,t);switch(n){case"referenceHidden":{const o=await Nf(t,{...a,elementContext:"reference"}),i=X3(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Z3(i)}}}case"escaped":{const o=await Nf(t,{...a,altBoundary:!0}),i=X3(o,r.floating);return{data:{escapedOffsets:i,escaped:Z3(i)}}}default:return{}}}}};async function Nq(e,t){const{placement:r,platform:n,elements:a}=e,o=await(n.isRTL==null?void 0:n.isRTL(a.floating)),i=mo(r),s=hu(r),l=pu(r)==="y",u=["left","top"].includes(i)?-1:1,f=o&&l?-1:1,c=vo(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:g}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return s&&typeof g=="number"&&(h=s==="end"?g*-1:g),l?{x:h*f,y:d*u}:{x:d*u,y:h*f}}const Lq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await Nq(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},Mq=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:w=>{let{x:v,y:b}=w;return{x:v,y:b}}},...l}=vo(e,t),u={x:r,y:n},f=await Nf(t,l),c=pu(mo(a)),d=QS(c);let h=u[d],g=u[c];if(o){const w=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=h+f[w],_=h-f[v];h=$$(b,h,_)}if(i){const w=c==="y"?"top":"left",v=c==="y"?"bottom":"right",b=g+f[w],_=g-f[v];g=$$(b,g,_)}const m=s.fn({...t,[d]:h,[c]:g});return{...m,data:{x:m.x-r,y:m.y-n}}}}},Dq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=vo(e,t),f={x:r,y:n},c=pu(a),d=QS(c);let h=f[d],g=f[c];const m=vo(s,t),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const _=d==="y"?"height":"width",$=o.reference[d]-o.floating[_]+w.mainAxis,C=o.reference[d]+o.reference[_]-w.mainAxis;h<$?h=$:h>C&&(h=C)}if(u){var v,b;const _=d==="y"?"width":"height",$=["top","left"].includes(mo(a)),C=o.reference[c]-o.floating[_]+($&&((v=i.offset)==null?void 0:v[c])||0)+($?0:w.crossAxis),O=o.reference[c]+o.reference[_]+($?0:((b=i.offset)==null?void 0:b[c])||0)-($?w.crossAxis:0);gO&&(g=O)}return{[d]:h,[c]:g}}}},jq=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:a,elements:o}=t,{apply:i=()=>{},...s}=vo(e,t),l=await Nf(t,s),u=mo(r),f=hu(r),c=pu(r)==="y",{width:d,height:h}=n.floating;let g,m;u==="top"||u==="bottom"?(g=u,m=f===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(m=u,g=f==="end"?"top":"bottom");const w=h-l[g],v=d-l[m],b=!t.middlewareData.shift;let _=w,$=v;if(c){const O=d-l.left-l.right;$=f||b?ki(v,O):O}else{const O=h-l.top-l.bottom;_=f||b?ki(w,O):O}if(b&&!f){const O=Gr(l.left,0),x=Gr(l.right,0),S=Gr(l.top,0),A=Gr(l.bottom,0);c?$=d-2*(O!==0||x!==0?O+x:Gr(l.left,l.right)):_=h-2*(S!==0||A!==0?S+A:Gr(l.top,l.bottom))}await i({...t,availableWidth:$,availableHeight:_});const C=await a.getDimensions(o.floating);return d!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function Ii(e){return _L(e)?(e.nodeName||"").toLowerCase():"#document"}function tn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ao(e){var t;return(t=(_L(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _L(e){return e instanceof Node||e instanceof tn(e).Node}function yo(e){return e instanceof Element||e instanceof tn(e).Element}function Sa(e){return e instanceof HTMLElement||e instanceof tn(e).HTMLElement}function Q3(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tn(e).ShadowRoot}function vh(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=kn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function Fq(e){return["table","td","th"].includes(Ii(e))}function tE(e){const t=rE(),r=kn(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Bq(e){let t=Vc(e);for(;Sa(t)&&!A0(t);){if(tE(t))return t;t=Vc(t)}return null}function rE(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function A0(e){return["html","body","#document"].includes(Ii(e))}function kn(e){return tn(e).getComputedStyle(e)}function R0(e){return yo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Vc(e){if(Ii(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Q3(e)&&e.host||Ao(e);return Q3(t)?t.host:t}function $L(e){const t=Vc(e);return A0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Sa(t)&&vh(t)?t:$L(t)}function Lf(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=$L(e),o=a===((n=e.ownerDocument)==null?void 0:n.body),i=tn(a);return o?t.concat(i,i.visualViewport||[],vh(a)?a:[],i.frameElement&&r?Lf(i.frameElement):[]):t.concat(a,Lf(a,[],r))}function xL(e){const t=kn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Sa(e),o=a?e.offsetWidth:r,i=a?e.offsetHeight:n,s=Qv(r)!==o||Qv(n)!==i;return s&&(r=o,n=i),{width:r,height:n,$:s}}function nE(e){return yo(e)?e:e.contextElement}function yc(e){const t=nE(e);if(!Sa(t))return Pi(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:o}=xL(t);let i=(o?Qv(r.width):r.width)/n,s=(o?Qv(r.height):r.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Uq=Pi(0);function SL(e){const t=tn(e);return!rE()||!t.visualViewport?Uq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zq(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==tn(e)?!1:t}function Js(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),o=nE(e);let i=Pi(1);t&&(n?yo(n)&&(i=yc(n)):i=yc(e));const s=zq(o,r,n)?SL(o):Pi(0);let l=(a.left+s.x)/i.x,u=(a.top+s.y)/i.y,f=a.width/i.x,c=a.height/i.y;if(o){const d=tn(o),h=n&&yo(n)?tn(n):n;let g=d.frameElement;for(;g&&n&&h!==d;){const m=yc(g),w=g.getBoundingClientRect(),v=kn(g),b=w.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,_=w.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,u*=m.y,f*=m.x,c*=m.y,l+=b,u+=_,g=tn(g).frameElement}}return em({width:f,height:c,x:l,y:u})}function Vq(e){let{rect:t,offsetParent:r,strategy:n}=e;const a=Sa(r),o=Ao(r);if(r===o)return t;let i={scrollLeft:0,scrollTop:0},s=Pi(1);const l=Pi(0);if((a||!a&&n!=="fixed")&&((Ii(r)!=="body"||vh(o))&&(i=R0(r)),Sa(r))){const u=Js(r);s=yc(r),l.x=u.x+r.clientLeft,l.y=u.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-i.scrollLeft*s.x+l.x,y:t.y*s.y-i.scrollTop*s.y+l.y}}function Wq(e){return Array.from(e.getClientRects())}function EL(e){return Js(Ao(e)).left+R0(e).scrollLeft}function Hq(e){const t=Ao(e),r=R0(e),n=e.ownerDocument.body,a=Gr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Gr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+EL(e);const s=-r.scrollTop;return kn(n).direction==="rtl"&&(i+=Gr(t.clientWidth,n.clientWidth)-a),{width:a,height:o,x:i,y:s}}function Gq(e,t){const r=tn(e),n=Ao(e),a=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const u=rE();(!u||u&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}return{width:o,height:i,x:s,y:l}}function Kq(e,t){const r=Js(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,o=Sa(e)?yc(e):Pi(1),i=e.clientWidth*o.x,s=e.clientHeight*o.y,l=a*o.x,u=n*o.y;return{width:i,height:s,x:l,y:u}}function J3(e,t,r){let n;if(t==="viewport")n=Gq(e,r);else if(t==="document")n=Hq(Ao(e));else if(yo(t))n=Kq(t,r);else{const a=SL(e);n={...t,x:t.x-a.x,y:t.y-a.y}}return em(n)}function CL(e,t){const r=Vc(e);return r===t||!yo(r)||A0(r)?!1:kn(r).position==="fixed"||CL(r,t)}function qq(e,t){const r=t.get(e);if(r)return r;let n=Lf(e,[],!1).filter(s=>yo(s)&&Ii(s)!=="body"),a=null;const o=kn(e).position==="fixed";let i=o?Vc(e):e;for(;yo(i)&&!A0(i);){const s=kn(i),l=tE(i);!l&&s.position==="fixed"&&(a=null),(o?!l&&!a:!l&&s.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||vh(i)&&!l&&CL(e,i))?n=n.filter(f=>f!==i):a=s,i=Vc(i)}return t.set(e,n),n}function Yq(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const i=[...r==="clippingAncestors"?qq(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((u,f)=>{const c=J3(t,f,a);return u.top=Gr(c.top,u.top),u.right=ki(c.right,u.right),u.bottom=ki(c.bottom,u.bottom),u.left=Gr(c.left,u.left),u},J3(t,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Xq(e){return xL(e)}function Zq(e,t,r){const n=Sa(t),a=Ao(t),o=r==="fixed",i=Js(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Pi(0);if(n||!n&&!o)if((Ii(t)!=="body"||vh(a))&&(s=R0(t)),n){const u=Js(t,!0,o,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else a&&(l.x=EL(a));return{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function e4(e,t){return!Sa(e)||kn(e).position==="fixed"?null:t?t(e):e.offsetParent}function TL(e,t){const r=tn(e);if(!Sa(e))return r;let n=e4(e,t);for(;n&&Fq(n)&&kn(n).position==="static";)n=e4(n,t);return n&&(Ii(n)==="html"||Ii(n)==="body"&&kn(n).position==="static"&&!tE(n))?r:n||Bq(e)||r}const Qq=async function(e){let{reference:t,floating:r,strategy:n}=e;const a=this.getOffsetParent||TL,o=this.getDimensions;return{reference:Zq(t,await a(r),n),floating:{x:0,y:0,...await o(r)}}};function Jq(e){return kn(e).direction==="rtl"}const eY={convertOffsetParentRelativeRectToViewportRelativeRect:Vq,getDocumentElement:Ao,getClippingRect:Yq,getOffsetParent:TL,getElementRects:Qq,getClientRects:Wq,getDimensions:Xq,getScale:yc,isElement:yo,isRTL:Jq};function tY(e,t){let r=null,n;const a=Ao(e);function o(){clearTimeout(n),r&&r.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:u,top:f,width:c,height:d}=e.getBoundingClientRect();if(s||t(),!c||!d)return;const h=jp(f),g=jp(a.clientWidth-(u+c)),m=jp(a.clientHeight-(f+d)),w=jp(u),b={rootMargin:-h+"px "+-g+"px "+-m+"px "+-w+"px",threshold:Gr(0,ki(1,l))||1};let _=!0;function $(C){const O=C[0].intersectionRatio;if(O!==l){if(!_)return i();O?i(!1,O):n=setTimeout(()=>{i(!1,1e-7)},100)}_=!1}try{r=new IntersectionObserver($,{...b,root:a.ownerDocument})}catch{r=new IntersectionObserver($,b)}r.observe(e)}return i(!0),o}function rY(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=nE(e),f=a||o?[...u?Lf(u):[],...Lf(t)]:[];f.forEach(v=>{a&&v.addEventListener("scroll",r,{passive:!0}),o&&v.addEventListener("resize",r)});const c=u&&s?tY(u,r):null;let d=-1,h=null;i&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(t)})),r()}),u&&!l&&h.observe(u),h.observe(t));let g,m=l?Js(e):null;l&&w();function w(){const v=Js(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&r(),m=v,g=requestAnimationFrame(w)}return r(),()=>{f.forEach(v=>{a&&v.removeEventListener("scroll",r),o&&v.removeEventListener("resize",r)}),c&&c(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const nY=(e,t,r)=>{const n=new Map,a={platform:eY,...r},o={...a.platform,_c:n};return kq(e,t,{...a,platform:o})},aY=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Y3({element:n.current,padding:a}).fn(r):{}:n?Y3({element:n,padding:a}).fn(r):{}}}};var ev=typeof document<"u"?p.useLayoutEffect:p.useEffect;function tm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!tm(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const o=a[n];if(!(o==="_owner"&&e.$$typeof)&&!tm(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function AL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function t4(e,t){const r=AL(e);return Math.round(t*r)/r}function r4(e){const t=p.useRef(e);return ev(()=>{t.current=e}),t}function oY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,c]=p.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=p.useState(n);tm(d,n)||h(n);const[g,m]=p.useState(null),[w,v]=p.useState(null),b=p.useCallback(F=>{F!=O.current&&(O.current=F,m(F))},[m]),_=p.useCallback(F=>{F!==x.current&&(x.current=F,v(F))},[v]),$=o||g,C=i||w,O=p.useRef(null),x=p.useRef(null),S=p.useRef(f),A=r4(l),k=r4(a),N=p.useCallback(()=>{if(!O.current||!x.current)return;const F={placement:t,strategy:r,middleware:d};k.current&&(F.platform=k.current),nY(O.current,x.current,F).then(B=>{const j={...B,isPositioned:!0};P.current&&!tm(S.current,j)&&(S.current=j,qi.flushSync(()=>{c(j)}))})},[d,t,r,k]);ev(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,c(F=>({...F,isPositioned:!1})))},[u]);const P=p.useRef(!1);ev(()=>(P.current=!0,()=>{P.current=!1}),[]),ev(()=>{if($&&(O.current=$),C&&(x.current=C),$&&C){if(A.current)return A.current($,C,N);N()}},[$,C,N,A]);const I=p.useMemo(()=>({reference:O,floating:x,setReference:b,setFloating:_}),[b,_]),E=p.useMemo(()=>({reference:$,floating:C}),[$,C]),R=p.useMemo(()=>{const F={position:r,left:0,top:0};if(!E.floating)return F;const B=t4(E.floating,f.x),j=t4(E.floating,f.y);return s?{...F,transform:"translate("+B+"px, "+j+"px)",...AL(E.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:B,top:j}},[r,s,E.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:N,refs:I,elements:E,floatingStyles:R}),[f,N,I,E,R])}function iY(e){const[t,r]=p.useState(void 0);return go(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let i,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}const RL="Popper",[OL,kL]=f0(RL),[sY,PL]=OL(RL),lY=e=>{const{__scopePopper:t,children:r}=e,[n,a]=p.useState(null);return p.createElement(sY,{scope:t,anchor:n,onAnchorChange:a},r)},cY="PopperAnchor",uY=p.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,o=PL(cY,r),i=p.useRef(null),s=In(t,i);return p.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:p.createElement(un.div,te({},a,{ref:s}))}),IL="PopperContent",[dY,pje]=OL(IL),fY=p.forwardRef((e,t)=>{var r,n,a,o,i,s,l,u;const{__scopePopper:f,side:c="bottom",sideOffset:d=0,align:h="center",alignOffset:g=0,arrowPadding:m=0,avoidCollisions:w=!0,collisionBoundary:v=[],collisionPadding:b=0,sticky:_="partial",hideWhenDetached:$=!1,updatePositionStrategy:C="optimized",onPlaced:O,...x}=e,S=PL(IL,f),[A,k]=p.useState(null),N=In(t,at=>k(at)),[P,I]=p.useState(null),E=iY(P),R=(r=E==null?void 0:E.width)!==null&&r!==void 0?r:0,F=(n=E==null?void 0:E.height)!==null&&n!==void 0?n:0,B=c+(h!=="center"?"-"+h:""),j=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},M=Array.isArray(v)?v:[v],D=M.length>0,U={padding:j,boundary:M.filter(hY),altBoundary:D},{refs:V,floatingStyles:G,placement:H,isPositioned:K,middlewareData:Q}=oY({strategy:"fixed",placement:B,whileElementsMounted:(...at)=>rY(...at,{animationFrame:C==="always"}),elements:{reference:S.anchor},middleware:[Lq({mainAxis:d+F,alignmentAxis:g}),w&&Mq({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?Dq():void 0,...U}),w&&Pq({...U}),jq({...U,apply:({elements:at,rects:Wt,availableWidth:Ie,availableHeight:Xe})=>{const{width:vt,height:Br}=Wt.reference,mt=at.floating.style;mt.setProperty("--radix-popper-available-width",`${Ie}px`),mt.setProperty("--radix-popper-available-height",`${Xe}px`),mt.setProperty("--radix-popper-anchor-width",`${vt}px`),mt.setProperty("--radix-popper-anchor-height",`${Br}px`)}}),P&&aY({element:P,padding:m}),pY({arrowWidth:R,arrowHeight:F}),$&&Iq({strategy:"referenceHidden",...U})]}),[J,de]=NL(H),ve=Or(O);go(()=>{K&&(ve==null||ve())},[K,ve]);const Ne=(a=Q.arrow)===null||a===void 0?void 0:a.x,ue=(o=Q.arrow)===null||o===void 0?void 0:o.y,$e=((i=Q.arrow)===null||i===void 0?void 0:i.centerOffset)!==0,[Oe,Le]=p.useState();return go(()=>{A&&Le(window.getComputedStyle(A).zIndex)},[A]),p.createElement("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:K?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Oe,["--radix-popper-transform-origin"]:[(s=Q.transformOrigin)===null||s===void 0?void 0:s.x,(l=Q.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},p.createElement(dY,{scope:f,placedSide:J,onArrowChange:I,arrowX:Ne,arrowY:ue,shouldHideArrow:$e},p.createElement(un.div,te({"data-side":J,"data-align":de},x,{ref:N,style:{...x.style,animation:K?void 0:"none",opacity:(u=Q.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function hY(e){return e!==null}const pY=e=>({name:"transformOrigin",options:e,fn(t){var r,n,a,o,i;const{placement:s,rects:l,middlewareData:u}=t,c=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[g,m]=NL(s),w={start:"0%",center:"50%",end:"100%"}[m],v=((n=(a=u.arrow)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)+d/2,b=((o=(i=u.arrow)===null||i===void 0?void 0:i.y)!==null&&o!==void 0?o:0)+h/2;let _="",$="";return g==="bottom"?(_=c?w:`${v}px`,$=`${-h}px`):g==="top"?(_=c?w:`${v}px`,$=`${l.floating.height+h}px`):g==="right"?(_=`${-h}px`,$=c?w:`${b}px`):g==="left"&&(_=`${l.floating.width+h}px`,$=c?w:`${b}px`),{data:{x:_,y:$}}}});function NL(e){const[t,r="center"]=e.split("-");return[t,r]}const gY=lY,vY=uY,mY=fY;function yY(e,t){return p.useReducer((r,n)=>{const a=t[r][n];return a??r},e)}const gu=e=>{const{present:t,children:r}=e,n=bY(t),a=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),o=In(n.ref,a.ref);return typeof r=="function"||n.isPresent?p.cloneElement(a,{ref:o}):null};gu.displayName="Presence";function bY(e){const[t,r]=p.useState(),n=p.useRef({}),a=p.useRef(e),o=p.useRef("none"),i=e?"mounted":"unmounted",[s,l]=yY(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Fp(n.current);o.current=s==="mounted"?u:"none"},[s]),go(()=>{const u=n.current,f=a.current;if(f!==e){const d=o.current,h=Fp(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),go(()=>{if(t){const u=c=>{const h=Fp(n.current).includes(c.animationName);c.target===t&&h&&qi.flushSync(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(o.current=Fp(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Fp(e){return(e==null?void 0:e.animationName)||"none"}function wY({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,a]=_Y({defaultProp:t,onChange:r}),o=e!==void 0,i=o?e:n,s=Or(r),l=p.useCallback(u=>{if(o){const c=typeof u=="function"?u(e):u;c!==e&&s(c)}else a(u)},[o,e,a,s]);return[i,l]}function _Y({defaultProp:e,onChange:t}){const r=p.useState(e),[n]=r,a=p.useRef(n),o=Or(t);return p.useEffect(()=>{a.current!==n&&(o(n),a.current=n)},[n,a,o]),r}const $Y=p.forwardRef((e,t)=>p.createElement(un.span,te({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),xY=$Y,[O0,gje]=f0("Tooltip",[kL]),aE=kL(),SY="TooltipProvider",EY=700,S$="tooltip.open",[CY,oE]=O0(SY),TY=e=>{const{__scopeTooltip:t,delayDuration:r=EY,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:o}=e,[i,s]=p.useState(!0),l=p.useRef(!1),u=p.useRef(0);return p.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),p.createElement(CY,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(f=>{l.current=f},[]),disableHoverableContent:a},o)},iE="Tooltip",[AY,k0]=O0(iE),RY=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,l=oE(iE,e.__scopeTooltip),u=aE(t),[f,c]=p.useState(null),d=$q(),h=p.useRef(0),g=i??l.disableHoverableContent,m=s??l.delayDuration,w=p.useRef(!1),[v=!1,b]=wY({prop:n,defaultProp:a,onChange:x=>{x?(l.onOpen(),document.dispatchEvent(new CustomEvent(S$))):l.onClose(),o==null||o(x)}}),_=p.useMemo(()=>v?w.current?"delayed-open":"instant-open":"closed",[v]),$=p.useCallback(()=>{window.clearTimeout(h.current),w.current=!1,b(!0)},[b]),C=p.useCallback(()=>{window.clearTimeout(h.current),b(!1)},[b]),O=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{w.current=!0,b(!0)},m)},[m,b]);return p.useEffect(()=>()=>window.clearTimeout(h.current),[]),p.createElement(gY,u,p.createElement(AY,{scope:t,contentId:d,open:v,stateAttribute:_,trigger:f,onTriggerChange:c,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayed?O():$()},[l.isOpenDelayed,O,$]),onTriggerLeave:p.useCallback(()=>{g?C():window.clearTimeout(h.current)},[C,g]),onOpen:$,onClose:C,disableHoverableContent:g},r))},n4="TooltipTrigger",OY=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=k0(n4,r),o=oE(n4,r),i=aE(r),s=p.useRef(null),l=In(t,s,a.onTriggerChange),u=p.useRef(!1),f=p.useRef(!1),c=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),p.createElement(vY,te({asChild:!0},i),p.createElement(un.button,te({"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute},n,{ref:l,onPointerMove:or(e.onPointerMove,d=>{d.pointerType!=="touch"&&!f.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),f.current=!0)}),onPointerLeave:or(e.onPointerLeave,()=>{a.onTriggerLeave(),f.current=!1}),onPointerDown:or(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:or(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:or(e.onBlur,a.onClose),onClick:or(e.onClick,a.onClose)})))}),kY="TooltipPortal",[vje,PY]=O0(kY,{forceMount:void 0}),Mf="TooltipContent",IY=p.forwardRef((e,t)=>{const r=PY(Mf,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...o}=e,i=k0(Mf,e.__scopeTooltip);return p.createElement(gu,{present:n||i.open},i.disableHoverableContent?p.createElement(LL,te({side:a},o,{ref:t})):p.createElement(NY,te({side:a},o,{ref:t})))}),NY=p.forwardRef((e,t)=>{const r=k0(Mf,e.__scopeTooltip),n=oE(Mf,e.__scopeTooltip),a=p.useRef(null),o=In(t,a),[i,s]=p.useState(null),{trigger:l,onClose:u}=r,f=a.current,{onPointerInTransitChange:c}=n,d=p.useCallback(()=>{s(null),c(!1)},[c]),h=p.useCallback((g,m)=>{const w=g.currentTarget,v={x:g.clientX,y:g.clientY},b=MY(v,w.getBoundingClientRect()),_=DY(v,b),$=jY(m.getBoundingClientRect()),C=BY([..._,...$]);s(C),c(!0)},[c]);return p.useEffect(()=>()=>d(),[d]),p.useEffect(()=>{if(l&&f){const g=w=>h(w,f),m=w=>h(w,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",m)}}},[l,f,h,d]),p.useEffect(()=>{if(i){const g=m=>{const w=m.target,v={x:m.clientX,y:m.clientY},b=(l==null?void 0:l.contains(w))||(f==null?void 0:f.contains(w)),_=!FY(v,i);b?d():_&&(d(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,i,u,d]),p.createElement(LL,te({},e,{ref:o}))}),[LY,mje]=O0(iE,{isInside:!1}),LL=p.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,l=k0(Mf,r),u=aE(r),{onClose:f}=l;return p.useEffect(()=>(document.addEventListener(S$,f),()=>document.removeEventListener(S$,f)),[f]),p.useEffect(()=>{if(l.trigger){const c=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,f]),p.createElement(mq,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:c=>c.preventDefault(),onDismiss:f},p.createElement(mY,te({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),p.createElement(yL,null,n),p.createElement(LY,{scope:r,isInside:!0},p.createElement(xY,{id:l.contentId,role:"tooltip"},a||n))))});function MY(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,a,o)){case o:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function DY(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function jY(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function FY(e,t){const{x:r,y:n}=e;let a=!1;for(let o=0,i=t.length-1;on!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(a=!a)}return a}function BY(e){const t=e.slice();return t.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),UY(t)}function UY(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(a.y-i.y)>=(o.y-i.y)*(a.x-i.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(a.y-i.y)>=(o.y-i.y)*(a.x-i.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}const zY=TY,VY=RY,WY=OY,ML=IY;globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const DL=zY,jL=VY,FL=WY,sE=p.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y(ML,{ref:n,sideOffset:t,className:ul("z-50 overflow-hidden rounded-md border border-slate-100 bg-white px-2 py-[4px] text-sm text-slate-700 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-100",e),...r}));sE.displayName=ML.displayName;globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const E$="␣",C$=20,BL="dismissStartCardDate",a4="donateDate",o4={colors:["#5D8C7B","#F2D091","#F2A679","#D9695F","#8C4646"],shapes:["square"],ticks:500},UL={foreignFont:48,translateFont:18},HY=Symbol();function GY(e){let t,r;const n={getItem:(a,o)=>{var i,s;const l=f=>{if(f=f||"",t!==f){try{r=JSON.parse(f)}catch{return o}t=f}return r},u=(s=(i=e())==null?void 0:i.getItem(a))!=null?s:null;return u instanceof Promise?u.then(l):l(u)},setItem:(a,o)=>{var i;return(i=e())==null?void 0:i.setItem(a,JSON.stringify(o))},removeItem:a=>{var o;return(o=e())==null?void 0:o.removeItem(a)}};return typeof window<"u"&&typeof window.addEventListener=="function"&&(n.subscribe=(a,o,i)=>{if(!(e()instanceof window.Storage))return()=>{};const s=l=>{if(l.storageArea===e()&&l.key===a){let u;try{u=JSON.parse(l.newValue||"")}catch{u=i}o(u)}};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}}),n}const KY=GY(()=>typeof window<"u"?window.localStorage:void 0);function Ra(e,t,r=KY){const n=rn(t);return({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&(n.debugPrivate=!0),n.onMount=o=>{const i=r.getItem(e,t);i instanceof Promise?i.then(l=>o(l)):o(i);let s;return r.subscribe&&(s=r.subscribe(e,o,t)),s},rn(o=>o(n),(o,i,s)=>{const l=typeof s=="function"?s(o(n)):s;return l===HY?(i(n,t),r.removeItem(e)):(i(n,l),r.setItem(e,l))})}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function Yi(e,t){const r=Ra(e,t);return r.debugLabel="storageAtom",rn(n=>{const a=n(r);let o;if(typeof a!=typeof t)o=t;else{let s=!1;for(const l in t)if(!(l in a)){s=!0;break}o=s?{...t,...a}:a}if(o!==a){const s=JSON.stringify(o);localStorage.setItem(e,s)}return o},r.write)}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};class zL{constructor(t,r,n,a,o,i){this.word=t,this.timeStamp=UE(),this.dict=r,this.chapter=n,this.timing=a,this.wrongCount=o,this.mistakes=i}get totalTime(){return this.timing.reduce((t,r)=>t+r,0)}}class VL{constructor(t,r,n,a,o,i,s,l,u){this.dict=t,this.chapter=r,this.timeStamp=UE(),this.time=n,this.correctCount=a,this.wrongCount=o,this.wordCount=i,this.correctWordIndexes=s,this.wordNumber=l,this.wordRecordIds=u}get wpm(){return Math.round(this.wordCount/this.time*60)}get inputAccuracy(){return Math.round((this.correctCount/this.correctCount+this.wrongCount)*100)}get wordAccuracy(){return Math.round(this.correctWordIndexes.length/this.wordNumber*100)}}class WL{constructor(t,r){this.dict=t,this.index=0,this.createTime=UE(),this.words=r,this.isFinished=!1}}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function qY(e,t){const r={};for(const n of[e,t])for(const a in n)r[a]?r[a].push(...n[a]):r[a]=[...n[a]];return r}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function i4(e){const t=e==null?0:e.length;if(!t)return[];let r=-1;const n=t-1,a=Array.from(e);for(;++r(e.SETUP_CHAPTER="SETUP_CHAPTER",e.SET_IS_SKIP="SET_IS_SKIP",e.SET_IS_TYPING="SET_IS_TYPING",e.TOGGLE_IS_TYPING="TOGGLE_IS_TYPING",e.REPORT_WRONG_WORD="REPORT_WRONG_WORD",e.REPORT_CORRECT_WORD="REPORT_CORRECT_WORD",e.NEXT_WORD="NEXT_WORD",e.LOOP_CURRENT_WORD="LOOP_CURRENT_WORD",e.FINISH_CHAPTER="FINISH_CHAPTER",e.INCREASE_WRONG_WORD="INCREASE_WRONG_WORD",e.SKIP_WORD="SKIP_WORD",e.SKIP_2_WORD_INDEX="SKIP_2_WORD_INDEX",e.REPEAT_CHAPTER="REPEAT_CHAPTER",e.NEXT_CHAPTER="NEXT_CHAPTER",e.TOGGLE_WORD_VISIBLE="TOGGLE_WORD_VISIBLE",e.TOGGLE_TRANS_VISIBLE="TOGGLE_TRANS_VISIBLE",e.TICK_TIMER="TICK_TIMER",e.ADD_WORD_RECORD_ID="ADD_WORD_RECORD_ID",e.SET_IS_SAVING_RECORD="SET_IS_SAVING_RECORD",e.SET_IS_LOOP_SINGLE_WORD="SET_IS_LOOP_SINGLE_WORD",e.TOGGLE_IS_LOOP_SINGLE_WORD="TOGGLE_IS_LOOP_SINGLE_WORD",e.SET_REVISION_INDEX="SET_REVISION_INDEX",e))(Me||{});const YY=(e,t)=>{var r;switch(t.type){case"SETUP_CHAPTER":{const n=structuredClone(tv),a=t.payload.shouldShuffle?i4(t.payload.words):t.payload.words;let o=t.payload.initialIndex??0;return o>=a.length&&(o=0),n.chapterData.index=o,n.chapterData.words=a,n.chapterData.userInputLogs=a.map((i,s)=>({...structuredClone(F1),index:s})),n}case"SET_IS_SKIP":e.isShowSkip=t.payload;break;case"SET_IS_TYPING":e.isTyping=t.payload;break;case"TOGGLE_IS_TYPING":e.isTyping=!e.isTyping;break;case"REPORT_CORRECT_WORD":{e.chapterData.correctCount+=1;const n=e.chapterData.userInputLogs[e.chapterData.index];n.correctCount+=1;break}case"REPORT_WRONG_WORD":{e.chapterData.wrongCount+=1;const n=t.payload.letterMistake,a=e.chapterData.userInputLogs[e.chapterData.index];a.wrongCount+=1,a.LetterMistakes=qY(a.LetterMistakes,n);break}case"NEXT_WORD":{e.chapterData.index+=1,e.chapterData.wordCount+=1,e.isShowSkip=!1,(r=t==null?void 0:t.payload)!=null&&r.updateReviewRecord&&t.payload.updateReviewRecord(e);break}case"LOOP_CURRENT_WORD":e.isShowSkip=!1,e.chapterData.wordCount+=1;break;case"FINISH_CHAPTER":e.chapterData.wordCount+=1,e.isTyping=!1,e.isFinished=!0,e.isShowSkip=!1;break;case"SKIP_WORD":{const n=e.chapterData.index+1;n>=e.chapterData.words.length?(e.isTyping=!1,e.isFinished=!0):e.chapterData.index=n,e.isShowSkip=!1;break}case"SKIP_2_WORD_INDEX":{const n=t.newIndex;n>=e.chapterData.words.length&&(e.isTyping=!1,e.isFinished=!0),e.chapterData.index=n;break}case"REPEAT_CHAPTER":{const n=structuredClone(tv);return n.chapterData.userInputLogs=e.chapterData.words.map((a,o)=>({...structuredClone(F1),index:o})),n.isTyping=!0,n.chapterData.words=t.shouldShuffle?i4(e.chapterData.words):e.chapterData.words,n.isTransVisible=e.isTransVisible,n}case"NEXT_CHAPTER":{const n=structuredClone(tv);return n.chapterData.userInputLogs=e.chapterData.words.map((a,o)=>({...structuredClone(F1),index:o})),n.isTyping=!0,n.isTransVisible=e.isTransVisible,n}case"TOGGLE_TRANS_VISIBLE":e.isTransVisible=!e.isTransVisible;break;case"TICK_TIMER":{const n=t.addTime===void 0?1:t.addTime,a=e.timerData.time+n,o=e.chapterData.correctCount+e.chapterData.wrongCount===0?1:e.chapterData.correctCount+e.chapterData.wrongCount;e.timerData.time=a,e.timerData.accuracy=Math.round(e.chapterData.correctCount/o*100),e.timerData.wpm=Math.round(e.chapterData.wordCount/a*60);break}case"ADD_WORD_RECORD_ID":{e.chapterData.wordRecordIds.push(t.payload);break}case"SET_IS_SAVING_RECORD":{e.isSavingRecord=t.payload;break}case"SET_IS_LOOP_SINGLE_WORD":{e.isLoopSingleWord=t.payload;break}case"TOGGLE_IS_LOOP_SINGLE_WORD":{e.isLoopSingleWord=!e.isLoopSingleWord;break}default:return e}},Sr=p.createContext(null),tt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ot=Object.keys,cr=Array.isArray;function br(e,t){return typeof t!="object"||Ot(t).forEach(function(r){e[r]=t[r]}),e}typeof Promise>"u"||tt.Promise||(tt.Promise=Promise);const Df=Object.getPrototypeOf,XY={}.hasOwnProperty;function an(e,t){return XY.call(e,t)}function Wc(e,t){typeof t=="function"&&(t=t(Df(e))),(typeof Reflect>"u"?Ot:Reflect.ownKeys)(t).forEach(r=>{ao(e,r,t[r])})}const HL=Object.defineProperty;function ao(e,t,r,n){HL(e,t,br(r&&an(r,"get")&&typeof r.get=="function"?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function bc(e){return{from:function(t){return e.prototype=Object.create(t.prototype),ao(e.prototype,"constructor",e),{extend:Wc.bind(null,e.prototype)}}}}const ZY=Object.getOwnPropertyDescriptor;function lE(e,t){let r;return ZY(e,t)||(r=Df(e))&&lE(r,t)}const QY=[].slice;function rm(e,t,r){return QY.call(e,t,r)}function GL(e,t){return t(e)}function Pd(e){if(!e)throw new Error("Assertion Failed")}function KL(e){tt.setImmediate?setImmediate(e):setTimeout(e,0)}function qL(e,t){return e.reduce((r,n,a)=>{var o=t(n,a);return o&&(r[o[0]]=o[1]),r},{})}function oo(e,t){if(an(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var r=[],n=0,a=t.length;n["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>tt[e]),eX=ZL.map(e=>tt[e]);qL(ZL,e=>[e,!0]);let Jo=null;function mh(e){Jo=typeof WeakMap<"u"&&new WeakMap;const t=T$(e);return Jo=null,t}function T$(e){if(!e||typeof e!="object")return e;let t=Jo&&Jo.get(e);if(t)return t;if(cr(e)){t=[],Jo&&Jo.set(e,t);for(var r=0,n=e.length;r=0)t=e;else{const o=Df(e);for(var a in t=o===Object.prototype?{}:Object.create(o),Jo&&Jo.set(e,t),e)an(e,a)&&(t[a]=T$(e[a]))}return t}const{toString:tX}={};function A$(e){return tX.call(e).slice(8,-1)}const R$=typeof Symbol<"u"?Symbol.iterator:"@@iterator",rX=typeof R$=="symbol"?function(e){var t;return e!=null&&(t=e[R$])&&t.apply(e)}:function(){return null},jl={};function Za(e){var t,r,n,a;if(arguments.length===1){if(cr(e))return e.slice();if(this===jl&&typeof e=="string")return[e];if(a=rX(e)){for(r=[];!(n=a.next()).done;)r.push(n.value);return r}if(e==null)return[e];if(typeof(t=e.length)=="number"){for(r=new Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}const cE=typeof Symbol<"u"?e=>e[Symbol.toStringTag]==="AsyncFunction":()=>!1;var Oa=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function QL(e,t){Oa=e,JL=t}var JL=()=>!0;const nX=!new Error("").stack;function hl(){if(nX)try{throw hl.arguments,new Error}catch(e){return e}return new Error}function O$(e,t){var r=e.stack;return r?(t=t||0,r.indexOf(e.name)===0&&(t+=(e.name+e.message).split(` +`).length),r.split(` +`).slice(t).filter(JL).map(n=>` +`+n).join("")):""}var eM=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],uE=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(eM),aX={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 wc(e,t){this._e=hl(),this.name=e,this.message=t}function tM(e,t){return e+". Errors: "+Object.keys(t).map(r=>t[r].toString()).filter((r,n,a)=>a.indexOf(r)===n).join(` +`)}function nm(e,t,r,n){this._e=hl(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=tM(e,t)}function Zd(e,t){this._e=hl(),this.name="BulkError",this.failures=Object.keys(t).map(r=>t[r]),this.failuresByPos=t,this.message=tM(e,t)}bc(wc).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+O$(this._e,2))}},toString:function(){return this.name+": "+this.message}}),bc(nm).from(wc),bc(Zd).from(wc);var dE=uE.reduce((e,t)=>(e[t]=t+"Error",e),{});const oX=wc;var fe=uE.reduce((e,t)=>{var r=t+"Error";function n(a,o){this._e=hl(),this.name=r,a?typeof a=="string"?(this.message=`${a}${o?` + `+o:""}`,this.inner=o||null):typeof a=="object"&&(this.message=`${a.name} ${a.message}`,this.inner=a):(this.message=aX[t]||r,this.inner=null)}return bc(n).from(oX),e[t]=n,e},{});fe.Syntax=SyntaxError,fe.Type=TypeError,fe.Range=RangeError;var s4=eM.reduce((e,t)=>(e[t+"Error"]=fe[t],e),{}),rv=uE.reduce((e,t)=>(["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=fe[t]),e),{});function Ke(){}function jf(e){return e}function iX(e,t){return e==null||e===jf?t:function(r){return t(e(r))}}function el(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function sX(e,t){return e===Ke?t:function(){var r=e.apply(this,arguments);r!==void 0&&(arguments[0]=r);var n=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?el(n,this.onsuccess):n),a&&(this.onerror=this.onerror?el(a,this.onerror):a),o!==void 0?o:r}}function lX(e,t){return e===Ke?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?el(r,this.onsuccess):r),n&&(this.onerror=this.onerror?el(n,this.onerror):n)}}function cX(e,t){return e===Ke?t:function(r){var n=e.apply(this,arguments);br(r,n);var a=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return a&&(this.onsuccess=this.onsuccess?el(a,this.onsuccess):a),o&&(this.onerror=this.onerror?el(o,this.onerror):o),n===void 0?i===void 0?void 0:i:br(n,i)}}function uX(e,t){return e===Ke?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function fE(e,t){return e===Ke?t:function(){var r=e.apply(this,arguments);if(r&&typeof r.then=="function"){for(var n=this,a=arguments.length,o=new Array(a);a--;)o[a]=arguments[a];return r.then(function(){return t.apply(n,o)})}return t.apply(this,arguments)}}rv.ModifyError=nm,rv.DexieError=wc,rv.BulkError=Zd;var Ff={};const[k$,am,P$]=typeof Promise>"u"?[]:(()=>{let e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,Df(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Df(t),e]})(),rM=am&&am.then,nv=k$&&k$.constructor,hE=!!P$;var I$=!1,dX=P$?()=>{P$.then(Bp)}:tt.setImmediate?setImmediate.bind(null,Bp):tt.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{Bp(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Bp,0)},Qd=function(e,t){Id.push([e,t]),om&&(dX(),om=!1)},N$=!0,om=!0,js=[],av=[],L$=null,M$=jf,_c={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:c4,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{c4(e[0],e[1])}catch{}})}},ce=_c,Id=[],Fs=0,ov=[];function ae(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Ke,this._lib=!1;var t=this._PSD=ce;if(Oa&&(this._stackHolder=hl(),this._prev=null,this._numPrev=0),typeof e!="function"){if(e!==Ff)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&j$(this,this._value))}this._state=null,this._value=null,++t.ref,aM(this,e)}const D$={get:function(){var e=ce,t=im;function r(n,a){var o=!e.global&&(e!==ce||t!==im);const i=o&&!bo();var s=new ae((l,u)=>{pE(this,new nM(sm(n,e,o,i),sm(a,e,o,i),l,u,e))});return Oa&&sM(s,this),s}return r.prototype=Ff,r},set:function(e){ao(this,"then",e&&e.prototype===Ff?D$:{get:function(){return e},set:D$.set})}};function nM(e,t,r,n,a){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=r,this.reject=n,this.psd=a}function aM(e,t){try{t(r=>{if(e._state===null){if(r===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&yh();r&&typeof r.then=="function"?aM(e,(a,o)=>{r instanceof ae?r._then(a,o):r.then(a,o)}):(e._state=!0,e._value=r,oM(e)),n&&bh()}},j$.bind(null,e))}catch(r){j$(e,r)}}function j$(e,t){if(av.push(t),e._state===null){var r=e._lib&&yh();t=M$(t),e._state=!1,e._value=t,Oa&&t!==null&&typeof t=="object"&&!t._promise&&function(n,a,o){try{n.apply(null,o)}catch(i){a&&a(i)}}(()=>{var n=lE(t,"stack");t._promise=e,ao(t,"stack",{get:()=>I$?n&&(n.get?n.get.apply(t):n.value):e.stack})}),function(n){js.some(a=>a._value===n._value)||js.push(n)}(e),oM(e),r&&bh()}}function oM(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r{--Fs==0&&gE()},[]))}function pE(e,t){if(e._state!==null){var r=e._state?t.onFulfilled:t.onRejected;if(r===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Fs,Qd(fX,[r,e,t])}else e._listeners.push(t)}function fX(e,t,r){try{L$=t;var n,a=t._value;t._state?n=e(a):(av.length&&(av=[]),n=e(a),av.indexOf(a)===-1&&function(o){for(var i=js.length;i;)if(js[--i]._value===o._value)return void js.splice(i,1)}(t)),r.resolve(n)}catch(o){r.reject(o)}finally{L$=null,--Fs==0&&gE(),--r.psd.ref||r.psd.finalize()}}function iM(e,t,r){if(t.length===r)return t;var n="";if(e._state===!1){var a,o,i=e._value;i!=null?(a=i.name||"Error",o=i.message||i,n=O$(i,0)):(a=i,o=""),t.push(a+(o?": "+o:"")+n)}return Oa&&((n=O$(e._stackHolder,2))&&t.indexOf(n)===-1&&t.push(n),e._prev&&iM(e._prev,t,r)),t}function sM(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function Bp(){yh()&&bh()}function yh(){var e=N$;return N$=!1,om=!1,e}function bh(){var e,t,r;do for(;Id.length>0;)for(e=Id,Id=[],r=e.length,t=0;t0);N$=!0,om=!0}function gE(){var e=js;js=[],e.forEach(n=>{n._PSD.onunhandled.call(null,n._value,n)});for(var t=ov.slice(0),r=t.length;r;)t[--r]()}function Up(e){return new ae(Ff,!1,e)}function ot(e,t){var r=ce;return function(){var n=yh(),a=ce;try{return Li(r,!0),e.apply(this,arguments)}catch(o){t&&t(o)}finally{Li(a,!1),n&&bh()}}}Wc(ae.prototype,{then:D$,_then:function(e,t){pE(this,new nM(null,null,e,t,ce))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],r=arguments[1];return typeof t=="function"?this.then(null,n=>n instanceof t?r(n):Up(n)):this.then(null,n=>n&&n.name===t?r(n):Up(n))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),Up(t)))},stack:{get:function(){if(this._stack)return this._stack;try{I$=!0;var e=iM(this,[],20).join(` +From previous: `);return this._state!==null&&(this._stack=e),e}finally{I$=!1}}},timeout:function(e,t){return e<1/0?new ae((r,n)=>{var a=setTimeout(()=>n(new fe.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,a))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&ao(ae.prototype,Symbol.toStringTag,"Dexie.Promise"),_c.env=lM(),Wc(ae,{all:function(){var e=Za.apply(null,arguments).map(zp);return new ae(function(t,r){e.length===0&&t([]);var n=e.length;e.forEach((a,o)=>ae.resolve(a).then(i=>{e[o]=i,--n||t(e)},r))})},resolve:e=>{if(e instanceof ae)return e;if(e&&typeof e.then=="function")return new ae((r,n)=>{e.then(r,n)});var t=new ae(Ff,!0,e);return sM(t,L$),t},reject:Up,race:function(){var e=Za.apply(null,arguments).map(zp);return new ae((t,r)=>{e.map(n=>ae.resolve(n).then(t,r))})},PSD:{get:()=>ce,set:e=>ce=e},totalEchoes:{get:()=>im},newPSD:Ni,usePSD:mu,scheduler:{get:()=>Qd,set:e=>{Qd=e}},rejectionMapper:{get:()=>M$,set:e=>{M$=e}},follow:(e,t)=>new ae((r,n)=>Ni((a,o)=>{var i=ce;i.unhandleds=[],i.onunhandled=o,i.finalize=el(function(){(function(s){function l(){s(),ov.splice(ov.indexOf(l),1)}ov.push(l),++Fs,Qd(()=>{--Fs==0&&gE()},[])})(()=>{this.unhandleds.length===0?a():o(this.unhandleds[0])})},i.finalize),e()},t,r,n))}),nv&&(nv.allSettled&&ao(ae,"allSettled",function(){const e=Za.apply(null,arguments).map(zp);return new ae(t=>{e.length===0&&t([]);let r=e.length;const n=new Array(r);e.forEach((a,o)=>ae.resolve(a).then(i=>n[o]={status:"fulfilled",value:i},i=>n[o]={status:"rejected",reason:i}).then(()=>--r||t(n)))})}),nv.any&&typeof AggregateError<"u"&&ao(ae,"any",function(){const e=Za.apply(null,arguments).map(zp);return new ae((t,r)=>{e.length===0&&r(new AggregateError([]));let n=e.length;const a=new Array(n);e.forEach((o,i)=>ae.resolve(o).then(s=>t(s),s=>{a[i]=s,--n||r(new AggregateError(a))}))})}));const sr={awaits:0,echoes:0,id:0};var hX=0,iv=[],B1=0,im=0,pX=0;function Ni(e,t,r,n){var a=ce,o=Object.create(a);o.parent=a,o.ref=0,o.global=!1,o.id=++pX;var i=_c.env;o.env=hE?{Promise:ae,PromiseProp:{value:ae,configurable:!0,writable:!0},all:ae.all,race:ae.race,allSettled:ae.allSettled,any:ae.any,resolve:ae.resolve,reject:ae.reject,nthen:l4(i.nthen,o),gthen:l4(i.gthen,o)}:{},t&&br(o,t),++a.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=mu(o,e,r,n);return o.ref===0&&o.finalize(),s}function vu(){return sr.id||(sr.id=++hX),++sr.awaits,sr.echoes+=100,sr.id}function bo(){return!!sr.awaits&&(--sr.awaits==0&&(sr.id=0),sr.echoes=100*sr.awaits,!0)}function zp(e){return sr.echoes&&e&&e.constructor===nv?(vu(),e.then(t=>(bo(),t),t=>(bo(),Mt(t)))):e}function gX(e){++im,sr.echoes&&--sr.echoes!=0||(sr.echoes=sr.id=0),iv.push(ce),Li(e,!0)}function vX(){var e=iv[iv.length-1];iv.pop(),Li(e,!1)}function Li(e,t){var r=ce;if((t?!sr.echoes||B1++&&e===ce:!B1||--B1&&e===ce)||cM(t?gX.bind(null,e):vX),e!==ce&&(ce=e,r===_c&&(_c.env=lM()),hE)){var n=_c.env.Promise,a=e.env;am.then=a.nthen,n.prototype.then=a.gthen,(r.global||e.global)&&(Object.defineProperty(tt,"Promise",a.PromiseProp),n.all=a.all,n.race=a.race,n.resolve=a.resolve,n.reject=a.reject,a.allSettled&&(n.allSettled=a.allSettled),a.any&&(n.any=a.any))}}function lM(){var e=tt.Promise;return hE?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(tt,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:am.then,gthen:e.prototype.then}:{}}function mu(e,t,r,n,a){var o=ce;try{return Li(e,!0),t(r,n,a)}finally{Li(o,!1)}}function cM(e){rM.call(k$,e)}function sm(e,t,r,n){return typeof e!="function"?e:function(){var a=ce;r&&vu(),Li(t,!0);try{return e.apply(this,arguments)}finally{Li(a,!1),n&&cM(bo)}}}function l4(e,t){return function(r,n){return e.call(this,sm(r,t),sm(n,t))}}(""+rM).indexOf("[native code]")===-1&&(vu=bo=Ke);function c4(e,t){var r;try{r=t.onuncatched(e)}catch{}if(r!==!1)try{var n,a={promise:t,reason:e};if(tt.document&&document.createEvent?((n=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),br(n,a)):tt.CustomEvent&&br(n=new CustomEvent("unhandledrejection",{detail:a}),a),n&&tt.dispatchEvent&&(dispatchEvent(n),!tt.PromiseRejectionEvent&&tt.onunhandledrejection))try{tt.onunhandledrejection(n)}catch{}Oa&&n&&n.defaultPrevented}catch{}}var Mt=ae.reject;function F$(e,t,r,n){if(e.idbdb&&(e._state.openComplete||ce.letThrough||e._vip)){var a=e._createTransaction(t,r,e._dbSchema);try{a.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===dE.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(e._close(),e.open().then(()=>F$(e,t,r,n))):Mt(o)}return a._promise(t,(o,i)=>Ni(()=>(ce.trans=a,n(o,i,a)))).then(o=>a._completion.then(()=>o))}if(e._state.openComplete)return Mt(new fe.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return Mt(new fe.DatabaseClosed);e.open().catch(Ke)}return e._state.dbReadyPromise.then(()=>F$(e,t,r,n))}const Ps=String.fromCharCode(65535),Ba="Invalid key provided. Keys must be of type string, number, Date or Array.",Jd=[],P0=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),mX=P0,yX=P0,uM=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function tl(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const dM={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Vp(e){return typeof e!="string"||/\./.test(e)?t=>t:t=>(t[e]===void 0&&e in t&&delete(t=mh(t))[e],t)}class bX{_trans(t,r,n){const a=this._tx||ce.trans,o=this.name;function i(l,u,f){if(!f.schema[o])throw new fe.NotFound("Table "+o+" not part of transaction");return r(f.idbtrans,f)}const s=yh();try{return a&&a.db===this.db?a===ce.trans?a._promise(t,i,n):Ni(()=>a._promise(t,i,n),{trans:a,transless:ce.transless||ce}):F$(this.db,t,[this.name],i)}finally{s&&bh()}}get(t,r){return t&&t.constructor===Object?this.where(t).first(r):this._trans("readonly",n=>this.core.get({trans:n,key:t}).then(a=>this.hook.reading.fire(a))).then(r)}where(t){if(typeof t=="string")return new this.db.WhereClause(this,t);if(cr(t))return new this.db.WhereClause(this,`[${t.join("+")}]`);const r=Ot(t);if(r.length===1)return this.where(r[0]).equals(t[r[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter(u=>u.compound&&r.every(f=>u.keyPath.indexOf(f)>=0)&&u.keyPath.every(f=>r.indexOf(f)>=0))[0];if(n&&this.db._maxKey!==Ps)return this.where(n.name).equals(n.keyPath.map(u=>t[u]));const{idxByName:a}=this.schema,o=this.db._deps.indexedDB;function i(u,f){try{return o.cmp(u,f)===0}catch{return!1}}const[s,l]=r.reduce(([u,f],c)=>{const d=a[c],h=t[c];return[u||d,u||!d?tl(f,d&&d.multi?g=>{const m=oo(g,c);return cr(m)&&m.some(w=>i(h,w))}:g=>i(h,oo(g,c))):f]},[null,null]);return s?this.where(s.name).equals(t[s.keyPath]).filter(l):n?this.filter(l):this.where(r).equals("")}filter(t){return this.toCollection().and(t)}count(t){return this.toCollection().count(t)}offset(t){return this.toCollection().offset(t)}limit(t){return this.toCollection().limit(t)}each(t){return this.toCollection().each(t)}toArray(t){return this.toCollection().toArray(t)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(t){return new this.db.Collection(new this.db.WhereClause(this,cr(t)?`[${t.join("+")}]`:t))}reverse(){return this.toCollection().reverse()}mapToClass(t){this.schema.mappedClass=t;const r=n=>{if(!n)return n;const a=Object.create(t.prototype);for(var o in n)if(an(n,o))try{a[o]=n[o]}catch{}return a};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=r,this.hook("reading",r),t}defineClass(){return this.mapToClass(function(t){br(this,t)})}add(t,r){const{auto:n,keyPath:a}=this.schema.primKey;let o=t;return a&&n&&(o=Vp(a)(t)),this._trans("readwrite",i=>this.core.mutate({trans:i,type:"add",keys:r!=null?[r]:null,values:[o]})).then(i=>i.numFailures?ae.reject(i.failures[0]):i.lastResult).then(i=>{if(a)try{aa(t,a,i)}catch{}return i})}update(t,r){if(typeof t!="object"||cr(t))return this.where(":id").equals(t).modify(r);{const n=oo(t,this.schema.primKey.keyPath);if(n===void 0)return Mt(new fe.InvalidArgument("Given object does not contain its primary key"));try{typeof r!="function"?Ot(r).forEach(a=>{aa(t,a,r[a])}):r(t,{value:t,primKey:n})}catch{}return this.where(":id").equals(n).modify(r)}}put(t,r){const{auto:n,keyPath:a}=this.schema.primKey;let o=t;return a&&n&&(o=Vp(a)(t)),this._trans("readwrite",i=>this.core.mutate({trans:i,type:"put",values:[o],keys:r!=null?[r]:null})).then(i=>i.numFailures?ae.reject(i.failures[0]):i.lastResult).then(i=>{if(a)try{aa(t,a,i)}catch{}return i})}delete(t){return this._trans("readwrite",r=>this.core.mutate({trans:r,type:"delete",keys:[t]})).then(r=>r.numFailures?ae.reject(r.failures[0]):void 0)}clear(){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"deleteRange",range:dM})).then(t=>t.numFailures?ae.reject(t.failures[0]):void 0)}bulkGet(t){return this._trans("readonly",r=>this.core.getMany({keys:t,trans:r}).then(n=>n.map(a=>this.hook.reading.fire(a))))}bulkAdd(t,r,n){const a=Array.isArray(r)?r:void 0,o=(n=n||(a?void 0:r))?n.allKeys:void 0;return this._trans("readwrite",i=>{const{auto:s,keyPath:l}=this.schema.primKey;if(l&&a)throw new fe.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(a&&a.length!==t.length)throw new fe.InvalidArgument("Arguments objects and keys must have the same length");const u=t.length;let f=l&&s?t.map(Vp(l)):t;return this.core.mutate({trans:i,type:"add",keys:a,values:f,wantResults:o}).then(({numFailures:c,results:d,lastResult:h,failures:g})=>{if(c===0)return o?d:h;throw new Zd(`${this.name}.bulkAdd(): ${c} of ${u} operations failed`,g)})})}bulkPut(t,r,n){const a=Array.isArray(r)?r:void 0,o=(n=n||(a?void 0:r))?n.allKeys:void 0;return this._trans("readwrite",i=>{const{auto:s,keyPath:l}=this.schema.primKey;if(l&&a)throw new fe.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(a&&a.length!==t.length)throw new fe.InvalidArgument("Arguments objects and keys must have the same length");const u=t.length;let f=l&&s?t.map(Vp(l)):t;return this.core.mutate({trans:i,type:"put",keys:a,values:f,wantResults:o}).then(({numFailures:c,results:d,lastResult:h,failures:g})=>{if(c===0)return o?d:h;throw new Zd(`${this.name}.bulkPut(): ${c} of ${u} operations failed`,g)})})}bulkDelete(t){const r=t.length;return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:t})).then(({numFailures:n,lastResult:a,failures:o})=>{if(n===0)return a;throw new Zd(`${this.name}.bulkDelete(): ${n} of ${r} operations failed`,o)})}}function ef(e){var t={},r=function(s,l){if(l){for(var u=arguments.length,f=new Array(u-1);--u;)f[u-1]=arguments[u];return t[s].subscribe.apply(null,f),e}if(typeof s=="string")return t[s]};r.addEventType=o;for(var n=1,a=arguments.length;ntl(n(),t()):t,e.justLimit=r&&!n}function sv(e,t){if(e.isPrimKey)return t.primaryKey;const r=t.getIndexByKeyPath(e.index);if(!r)throw new fe.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function u4(e,t,r){const n=sv(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:n,range:e.range}})}function Wp(e,t,r,n){const a=e.replayFilter?tl(e.filter,e.replayFilter()):e.filter;if(e.or){const o={},i=(s,l,u)=>{if(!a||a(l,u,d=>l.stop(d),d=>l.fail(d))){var f=l.primaryKey,c=""+f;c==="[object ArrayBuffer]"&&(c=""+new Uint8Array(f)),an(o,c)||(o[c]=!0,t(s,l,u))}};return Promise.all([e.or._iterate(i,r),d4(u4(e,n,r),e.algorithm,i,!e.keysOnly&&e.valueMapper)])}return d4(u4(e,n,r),tl(e.algorithm,a),t,!e.keysOnly&&e.valueMapper)}function d4(e,t,r,n){var a=ot(n?(o,i,s)=>r(n(o),i,s):r);return e.then(o=>{if(o)return o.start(()=>{var i=()=>o.continue();t&&!t(o,s=>i=s,s=>{o.stop(s),i=Ke},s=>{o.fail(s),i=Ke})||a(o.value,o,s=>i=s),i()})})}function vr(e,t){try{const r=f4(e),n=f4(t);if(r!==n)return r==="Array"?1:n==="Array"?-1:r==="binary"?1:n==="binary"?-1:r==="string"?1:n==="string"?-1:r==="Date"?1:n!=="Date"?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:eWp(r,t,n,r.table.core))}count(t){return this._read(r=>{const n=this._ctx,a=n.table.core;if(El(n,!0))return a.count({trans:r,query:{index:sv(n,a.schema),range:n.range}}).then(i=>Math.min(i,n.limit));var o=0;return Wp(n,()=>(++o,!1),r,a).then(()=>o)}).then(t)}sortBy(t,r){const n=t.split(".").reverse(),a=n[0],o=n.length-1;function i(u,f){return f?i(u[n[f]],f-1):u[a]}var s=this._ctx.dir==="next"?1:-1;function l(u,f){var c=i(u,o),d=i(f,o);return cd?s:0}return this.toArray(function(u){return u.sort(l)}).then(r)}toArray(t){return this._read(r=>{var n=this._ctx;if(n.dir==="next"&&El(n,!0)&&n.limit>0){const{valueMapper:a}=n,o=sv(n,n.table.core.schema);return n.table.core.query({trans:r,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then(({result:i})=>a?i.map(a):i)}{const a=[];return Wp(n,o=>a.push(o),r,n.table.core).then(()=>a)}},t)}offset(t){var r=this._ctx;return t<=0||(r.offset+=t,El(r)?z1(r,()=>{var n=t;return(a,o)=>n===0||(n===1?(--n,!1):(o(()=>{a.advance(n),n=0}),!1))}):z1(r,()=>{var n=t;return()=>--n<0})),this}limit(t){return this._ctx.limit=Math.min(this._ctx.limit,t),z1(this._ctx,()=>{var r=t;return function(n,a,o){return--r<=0&&a(o),r>=0}},!0),this}until(t,r){return U1(this._ctx,function(n,a,o){return!t(n.value)||(a(o),r)}),this}first(t){return this.limit(1).toArray(function(r){return r[0]}).then(t)}last(t){return this.reverse().first(t)}filter(t){var r,n;return U1(this._ctx,function(a){return t(a.value)}),r=this._ctx,n=t,r.isMatch=tl(r.isMatch,n),this}and(t){return this.filter(t)}or(t){return new this.db.WhereClause(this._ctx.table,t,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(t){var r=this._ctx;return r.keysOnly=!r.isMatch,this.each(function(n,a){t(a.key,a)})}eachUniqueKey(t){return this._ctx.unique="unique",this.eachKey(t)}eachPrimaryKey(t){var r=this._ctx;return r.keysOnly=!r.isMatch,this.each(function(n,a){t(a.primaryKey,a)})}keys(t){var r=this._ctx;r.keysOnly=!r.isMatch;var n=[];return this.each(function(a,o){n.push(o.key)}).then(function(){return n}).then(t)}primaryKeys(t){var r=this._ctx;if(r.dir==="next"&&El(r,!0)&&r.limit>0)return this._read(a=>{var o=sv(r,r.table.core.schema);return r.table.core.query({trans:a,values:!1,limit:r.limit,query:{index:o,range:r.range}})}).then(({result:a})=>a).then(t);r.keysOnly=!r.isMatch;var n=[];return this.each(function(a,o){n.push(o.primaryKey)}).then(function(){return n}).then(t)}uniqueKeys(t){return this._ctx.unique="unique",this.keys(t)}firstKey(t){return this.limit(1).keys(function(r){return r[0]}).then(t)}lastKey(t){return this.reverse().firstKey(t)}distinct(){var t=this._ctx,r=t.index&&t.table.schema.idxByName[t.index];if(!r||!r.multi)return this;var n={};return U1(this._ctx,function(a){var o=a.primaryKey.toString(),i=an(n,o);return n[o]=!0,!i}),this}modify(t){var r=this._ctx;return this._write(n=>{var a;if(typeof t=="function")a=t;else{var o=Ot(t),i=o.length;a=function(m){for(var w=!1,v=0;v{const{failures:v,numFailures:b}=w;d+=m-b;for(let _ of Ot(v))c.push(v[_])};return this.clone().primaryKeys().then(m=>{const w=v=>{const b=Math.min(f,m.length-v);return s.getMany({trans:n,keys:m.slice(v,v+b),cache:"immutable"}).then(_=>{const $=[],C=[],O=l?[]:null,x=[];for(let A=0;A0&&s.mutate({trans:n,type:"add",values:$}).then(A=>{for(let k in A.failures)x.splice(parseInt(k),1);g($.length,A)})).then(()=>(C.length>0||S&&typeof t=="object")&&s.mutate({trans:n,type:"put",keys:O,values:C,criteria:S,changeSpec:typeof t!="function"&&t}).then(A=>g(C.length,A))).then(()=>(x.length>0||S&&t===V1)&&s.mutate({trans:n,type:"delete",keys:x,criteria:S}).then(A=>g(x.length,A))).then(()=>m.length>v+b&&w(v+f))})};return w(0).then(()=>{if(c.length>0)throw new nm("Error modifying one or more objects",c,d,h);return m.length})})})}delete(){var t=this._ctx,r=t.range;return El(t)&&(t.isPrimKey&&!yX||r.type===3)?this._write(n=>{const{primaryKey:a}=t.table.core.schema,o=r;return t.table.core.count({trans:n,query:{index:a,range:o}}).then(i=>t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then(({failures:s,lastResult:l,results:u,numFailures:f})=>{if(f)throw new nm("Could not delete some values",Object.keys(s).map(c=>s[c]),i-f);return i-f}))}):this.modify(V1)}}const V1=(e,t)=>t.value=null;function _X(e,t){return et?-1:e===t?0:1}function zr(e,t,r){var n=e instanceof hM?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function Cl(e){return new e.Collection(e,()=>fM("")).limit(0)}function xX(e,t,r,n,a,o){for(var i=Math.min(e.length,n.length),s=-1,l=0;l=0?e.substr(0,s)+t[s]+r.substr(s+1):null;a(e[l],u)<0&&(s=l)}return itypeof m=="string"))return zr(e,"String expected.");function d(m){a=function(v){return v==="next"?b=>b.toUpperCase():b=>b.toLowerCase()}(m),o=function(v){return v==="next"?b=>b.toLowerCase():b=>b.toUpperCase()}(m),i=m==="next"?_X:$X;var w=r.map(function(v){return{lower:o(v),upper:a(v)}}).sort(function(v,b){return i(v.lower,b.lower)});s=w.map(function(v){return v.upper}),l=w.map(function(v){return v.lower}),u=m,f=m==="next"?"":n}d("next");var h=new e.Collection(e,()=>Xo(s[0],l[c-1]+n));h._ondirectionchange=function(m){d(m)};var g=0;return h._addAlgorithm(function(m,w,v){var b=m.key;if(typeof b!="string")return!1;var _=o(b);if(t(_,l,g))return!0;for(var $=null,C=g;C0)&&($=O)}return w($!==null?function(){m.continue($+f)}:v),!1}),h}function Xo(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function fM(e){return{type:1,lower:e,upper:e}}class hM{get Collection(){return this._ctx.table.db.Collection}between(t,r,n,a){n=n!==!1,a=a===!0;try{return this._cmp(t,r)>0||this._cmp(t,r)===0&&(n||a)&&(!n||!a)?Cl(this):new this.Collection(this,()=>Xo(t,r,!n,!a))}catch{return zr(this,Ba)}}equals(t){return t==null?zr(this,Ba):new this.Collection(this,()=>fM(t))}above(t){return t==null?zr(this,Ba):new this.Collection(this,()=>Xo(t,void 0,!0))}aboveOrEqual(t){return t==null?zr(this,Ba):new this.Collection(this,()=>Xo(t,void 0,!1))}below(t){return t==null?zr(this,Ba):new this.Collection(this,()=>Xo(void 0,t,!1,!0))}belowOrEqual(t){return t==null?zr(this,Ba):new this.Collection(this,()=>Xo(void 0,t))}startsWith(t){return typeof t!="string"?zr(this,"String expected."):this.between(t,t+Ps,!0,!0)}startsWithIgnoreCase(t){return t===""?this.startsWith(t):Hp(this,(r,n)=>r.indexOf(n[0])===0,[t],Ps)}equalsIgnoreCase(t){return Hp(this,(r,n)=>r===n[0],[t],"")}anyOfIgnoreCase(){var t=Za.apply(jl,arguments);return t.length===0?Cl(this):Hp(this,(r,n)=>n.indexOf(r)!==-1,t,"")}startsWithAnyOfIgnoreCase(){var t=Za.apply(jl,arguments);return t.length===0?Cl(this):Hp(this,(r,n)=>n.some(a=>r.indexOf(a)===0),t,Ps)}anyOf(){const t=Za.apply(jl,arguments);let r=this._cmp;try{t.sort(r)}catch{return zr(this,Ba)}if(t.length===0)return Cl(this);const n=new this.Collection(this,()=>Xo(t[0],t[t.length-1]));n._ondirectionchange=o=>{r=o==="next"?this._ascending:this._descending,t.sort(r)};let a=0;return n._addAlgorithm((o,i,s)=>{const l=o.key;for(;r(l,t[a])>0;)if(++a,a===t.length)return i(s),!1;return r(l,t[a])===0||(i(()=>{o.continue(t[a])}),!1)}),n}notEqual(t){return this.inAnyRange([[-(1/0),t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const t=Za.apply(jl,arguments);if(t.length===0)return new this.Collection(this);try{t.sort(this._ascending)}catch{return zr(this,Ba)}const r=t.reduce((n,a)=>n?n.concat([[n[n.length-1][1],a]]):[[-(1/0),a]],null);return r.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(r,{includeLowers:!1,includeUppers:!1})}inAnyRange(t,r){const n=this._cmp,a=this._ascending,o=this._descending,i=this._min,s=this._max;if(t.length===0)return Cl(this);if(!t.every(b=>b[0]!==void 0&&b[1]!==void 0&&a(b[0],b[1])<=0))return zr(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",fe.InvalidArgument);const l=!r||r.includeLowers!==!1,u=r&&r.includeUppers===!0;let f,c=a;function d(b,_){return c(b[0],_[0])}try{f=t.reduce(function(b,_){let $=0,C=b.length;for(;$0){O[0]=i(O[0],_[0]),O[1]=s(O[1],_[1]);break}}return $===C&&b.push(_),b},[]),f.sort(d)}catch{return zr(this,Ba)}let h=0;const g=u?b=>a(b,f[h][1])>0:b=>a(b,f[h][1])>=0,m=l?b=>o(b,f[h][0])>0:b=>o(b,f[h][0])>=0;let w=g;const v=new this.Collection(this,()=>Xo(f[0][0],f[f.length-1][1],!l,!u));return v._ondirectionchange=b=>{b==="next"?(w=g,c=a):(w=m,c=o),f.sort(d)},v._addAlgorithm((b,_,$)=>{for(var C=b.key;w(C);)if(++h,h===f.length)return _($),!1;return!!function(O){return!g(O)&&!m(O)}(C)||(this._cmp(C,f[h][1])===0||this._cmp(C,f[h][0])===0||_(()=>{c===a?b.continue(f[h][0]):b.continue(f[h][1])}),!1)}),v}startsWithAnyOf(){const t=Za.apply(jl,arguments);return t.every(r=>typeof r=="string")?t.length===0?Cl(this):this.inAnyRange(t.map(r=>[r,r+Ps])):zr(this,"startsWithAnyOf() only works with strings")}}function pa(e){return ot(function(t){return Bf(t),e(t.target.error),!1})}function Bf(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Mi=ef(null,"storagemutated");class SX{_lock(){return Pd(!ce.global),++this._reculock,this._reculock!==1||ce.global||(ce.lockOwnerFor=this),this}_unlock(){if(Pd(!ce.global),--this._reculock==0)for(ce.global||(ce.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{mu(t[1],t[0])}catch{}}return this}_locked(){return this._reculock&&ce.lockOwnerFor!==this}create(t){if(!this.mode)return this;const r=this.db.idbdb,n=this.db._state.dbOpenError;if(Pd(!this.idbtrans),!t&&!r)switch(n&&n.name){case"DatabaseClosedError":throw new fe.DatabaseClosed(n);case"MissingAPIError":throw new fe.MissingAPI(n.message,n);default:throw new fe.OpenFailed(n)}if(!this.active)throw new fe.TransactionInactive;return Pd(this._completion._state===null),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):r.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=ot(a=>{Bf(a),this._reject(t.error)}),t.onabort=ot(a=>{Bf(a),this.active&&this._reject(new fe.Abort(t.error)),this.active=!1,this.on("abort").fire(a)}),t.oncomplete=ot(()=>{this.active=!1,this._resolve(),"mutatedParts"in t&&Mi.storagemutated.fire(t.mutatedParts)}),this}_promise(t,r,n){if(t==="readwrite"&&this.mode!=="readwrite")return Mt(new fe.ReadOnly("Transaction is readonly"));if(!this.active)return Mt(new fe.TransactionInactive);if(this._locked())return new ae((o,i)=>{this._blockedFuncs.push([()=>{this._promise(t,r,n).then(o,i)},ce])});if(n)return Ni(()=>{var o=new ae((i,s)=>{this._lock();const l=r(i,s,this);l&&l.then&&l.then(i,s)});return o.finally(()=>this._unlock()),o._lib=!0,o});var a=new ae((o,i)=>{var s=r(o,i,this);s&&s.then&&s.then(o,i)});return a._lib=!0,a}_root(){return this.parent?this.parent._root():this}waitFor(t){var r=this._root();const n=ae.resolve(t);if(r._waitingFor)r._waitingFor=r._waitingFor.then(()=>n);else{r._waitingFor=n,r._waitingQueue=[];var a=r.idbtrans.objectStore(r.storeNames[0]);(function i(){for(++r._spinCount;r._waitingQueue.length;)r._waitingQueue.shift()();r._waitingFor&&(a.get(-1/0).onsuccess=i)})()}var o=r._waitingFor;return new ae((i,s)=>{n.then(l=>r._waitingQueue.push(ot(i.bind(null,l))),l=>r._waitingQueue.push(ot(s.bind(null,l)))).finally(()=>{r._waitingFor===o&&(r._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new fe.Abort))}table(t){const r=this._memoizedTables||(this._memoizedTables={});if(an(r,t))return r[t];const n=this.schema[t];if(!n)throw new fe.NotFound("Table "+t+" not part of transaction");const a=new this.db.Table(t,n,this);return a.core=this.db.core.table(t),r[t]=a,a}}function B$(e,t,r,n,a,o,i){return{name:e,keyPath:t,unique:r,multi:n,auto:a,compound:o,src:(r&&!i?"&":"")+(n?"*":"")+(a?"++":"")+pM(t)}}function pM(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function gM(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:qL(r,n=>[n.name,n])}}let Uf=e=>{try{return e.only([[]]),Uf=()=>[[]],[[]]}catch{return Uf=()=>Ps,Ps}};function U$(e){return e==null?()=>{}:typeof e=="string"?function(t){return t.split(".").length===1?r=>r[t]:r=>oo(r,t)}(e):t=>oo(t,e)}function p4(e){return[].slice.call(e)}let EX=0;function tf(e){return e==null?":id":typeof e=="string"?e:`[${e.join("+")}]`}function CX(e,t,r){function n(l){if(l.type===3)return null;if(l.type===4)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:u,upper:f,lowerOpen:c,upperOpen:d}=l;return u===void 0?f===void 0?null:t.upperBound(f,!!d):f===void 0?t.lowerBound(u,!!c):t.bound(u,f,!!c,!!d)}const{schema:a,hasGetAll:o}=function(l,u){const f=p4(l.objectStoreNames);return{schema:{name:l.name,tables:f.map(c=>u.objectStore(c)).map(c=>{const{keyPath:d,autoIncrement:h}=c,g=cr(d),m=d==null,w={},v={name:c.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:m,compound:g,keyPath:d,autoIncrement:h,unique:!0,extractKey:U$(d)},indexes:p4(c.indexNames).map(b=>c.index(b)).map(b=>{const{name:_,unique:$,multiEntry:C,keyPath:O}=b,x={name:_,compound:cr(O),keyPath:O,unique:$,multiEntry:C,extractKey:U$(O)};return w[tf(O)]=x,x}),getIndexByKeyPath:b=>w[tf(b)]};return w[":id"]=v.primaryKey,d!=null&&(w[tf(d)]=v.primaryKey),v})},hasGetAll:f.length>0&&"getAll"in u.objectStore(f[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,r),i=a.tables.map(l=>function(u){const f=u.name;return{name:f,schema:u,mutate:function({trans:c,type:d,keys:h,values:g,range:m}){return new Promise((w,v)=>{w=ot(w);const b=c.objectStore(f),_=b.keyPath==null,$=d==="put"||d==="add";if(!$&&d!=="delete"&&d!=="deleteRange")throw new Error("Invalid operation type: "+d);const{length:C}=h||g||{length:1};if(h&&g&&h.length!==g.length)throw new Error("Given keys array must have same length as given values array.");if(C===0)return w({numFailures:0,failures:{},results:[],lastResult:void 0});let O;const x=[],S=[];let A=0;const k=P=>{++A,Bf(P)};if(d==="deleteRange"){if(m.type===4)return w({numFailures:A,failures:S,results:[],lastResult:void 0});m.type===3?x.push(O=b.clear()):x.push(O=b.delete(n(m)))}else{const[P,I]=$?_?[g,h]:[g,null]:[h,null];if($)for(let E=0;E{const I=P.target.result;x.forEach((E,R)=>E.error!=null&&(S[R]=E.error)),w({numFailures:A,failures:S,results:d==="delete"?h:x.map(E=>E.result),lastResult:I})};O.onerror=P=>{k(P),N(P)},O.onsuccess=N})},getMany:({trans:c,keys:d})=>new Promise((h,g)=>{h=ot(h);const m=c.objectStore(f),w=d.length,v=new Array(w);let b,_=0,$=0;const C=x=>{const S=x.target;v[S._pos]=S.result,++$===_&&h(v)},O=pa(g);for(let x=0;xnew Promise((h,g)=>{h=ot(h);const m=c.objectStore(f).get(d);m.onsuccess=w=>h(w.target.result),m.onerror=pa(g)}),query:function(c){return d=>new Promise((h,g)=>{h=ot(h);const{trans:m,values:w,limit:v,query:b}=d,_=v===1/0?void 0:v,{index:$,range:C}=b,O=m.objectStore(f),x=$.isPrimaryKey?O:O.index($.name),S=n(C);if(v===0)return h({result:[]});if(c){const A=w?x.getAll(S,_):x.getAllKeys(S,_);A.onsuccess=k=>h({result:k.target.result}),A.onerror=pa(g)}else{let A=0;const k=w||!("openKeyCursor"in x)?x.openCursor(S):x.openKeyCursor(S),N=[];k.onsuccess=P=>{const I=k.result;return I?(N.push(w?I.value:I.primaryKey),++A===v?h({result:N}):void I.continue()):h({result:N})},k.onerror=pa(g)}})}(o),openCursor:function({trans:c,values:d,query:h,reverse:g,unique:m}){return new Promise((w,v)=>{w=ot(w);const{index:b,range:_}=h,$=c.objectStore(f),C=b.isPrimaryKey?$:$.index(b.name),O=g?m?"prevunique":"prev":m?"nextunique":"next",x=d||!("openKeyCursor"in C)?C.openCursor(n(_),O):C.openKeyCursor(n(_),O);x.onerror=pa(v),x.onsuccess=ot(S=>{const A=x.result;if(!A)return void w(null);A.___id=++EX,A.done=!1;const k=A.continue.bind(A);let N=A.continuePrimaryKey;N&&(N=N.bind(A));const P=A.advance.bind(A),I=()=>{throw new Error("Cursor not stopped")};A.trans=c,A.stop=A.continue=A.continuePrimaryKey=A.advance=()=>{throw new Error("Cursor not started")},A.fail=ot(v),A.next=function(){let E=1;return this.start(()=>E--?this.continue():this.stop()).then(()=>this)},A.start=E=>{const R=new Promise((B,j)=>{B=ot(B),x.onerror=pa(j),A.fail=j,A.stop=M=>{A.stop=A.continue=A.continuePrimaryKey=A.advance=I,B(M)}}),F=()=>{if(x.result)try{E()}catch(B){A.fail(B)}else A.done=!0,A.start=()=>{throw new Error("Cursor behind last entry")},A.stop()};return x.onsuccess=ot(B=>{x.onsuccess=F,F()}),A.continue=k,A.continuePrimaryKey=N,A.advance=P,F(),R},w(A)},v)})},count({query:c,trans:d}){const{index:h,range:g}=c;return new Promise((m,w)=>{const v=d.objectStore(f),b=h.isPrimaryKey?v:v.index(h.name),_=n(g),$=_?b.count(_):b.count();$.onsuccess=ot(C=>m(C.target.result)),$.onerror=pa(w)})}}}(l)),s={};return i.forEach(l=>s[l.name]=l),{stack:"dbcore",transaction:e.transaction.bind(e),table(l){if(!s[l])throw new Error(`Table '${l}' not found`);return s[l]},MIN_KEY:-1/0,MAX_KEY:Uf(t),schema:a}}function z$({_novip:e},t){const r=t.db,n=function(a,o,{IDBKeyRange:i,indexedDB:s},l){return{dbcore:function(f,c){return c.reduce((d,{create:h})=>({...d,...h(d)}),f)}(CX(o,i,l),a.dbcore)}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(a=>{const o=a.name;e.core.schema.tables.some(i=>i.name===o)&&(a.core=e.core.table(o),e[o]instanceof e.Table&&(e[o].core=a.core))})}function lm({_novip:e},t,r,n){r.forEach(a=>{const o=n[a];t.forEach(i=>{const s=lE(i,a);(!s||"value"in s&&s.value===void 0)&&(i===e.Transaction.prototype||i instanceof e.Transaction?ao(i,a,{get(){return this.table(a)},set(l){HL(this,a,{value:l,writable:!0,configurable:!0,enumerable:!0})}}):i[a]=new e.Table(a,o))})})}function V$({_novip:e},t){t.forEach(r=>{for(let n in r)r[n]instanceof e.Table&&delete r[n]})}function TX(e,t){return e._cfg.version-t._cfg.version}function AX(e,t,r,n){const a=e._dbSchema,o=e._createTransaction("readwrite",e._storeNames,a);o.create(r),o._completion.catch(n);const i=o._reject.bind(o),s=ce.transless||ce;Ni(()=>{ce.trans=o,ce.transless=s,t===0?(Ot(a).forEach(l=>{W1(r,l,a[l].primKey,a[l].indexes)}),z$(e,r),ae.follow(()=>e.on.populate.fire(o)).catch(i)):function({_novip:l},u,f,c){const d=[],h=l._versions;let g=l._dbSchema=H$(l,l.idbdb,c),m=!1;function w(){return d.length?ae.resolve(d.shift()(f.idbtrans)).then(w):ae.resolve()}return h.filter(v=>v._cfg.version>=u).forEach(v=>{d.push(()=>{const b=g,_=v._cfg.dbschema;G$(l,b,c),G$(l,_,c),g=l._dbSchema=_;const $=vM(b,_);$.add.forEach(O=>{W1(c,O[0],O[1].primKey,O[1].indexes)}),$.change.forEach(O=>{if(O.recreate)throw new fe.Upgrade("Not yet support for changing primary key");{const x=c.objectStore(O.name);O.add.forEach(S=>W$(x,S)),O.change.forEach(S=>{x.deleteIndex(S.name),W$(x,S)}),O.del.forEach(S=>x.deleteIndex(S))}});const C=v._cfg.contentUpgrade;if(C&&v._cfg.version>u){z$(l,c),f._memoizedTables={},m=!0;let O=YL(_);$.del.forEach(k=>{O[k]=b[k]}),V$(l,[l.Transaction.prototype]),lm(l,[l.Transaction.prototype],Ot(O),O),f.schema=O;const x=cE(C);let S;x&&vu();const A=ae.follow(()=>{if(S=C(f),S&&x){var k=bo.bind(null,null);S.then(k,k)}});return S&&typeof S.then=="function"?ae.resolve(S):A.then(()=>S)}}),d.push(b=>{(!m||!mX)&&function(_,$){[].slice.call($.db.objectStoreNames).forEach(C=>_[C]==null&&$.db.deleteObjectStore(C))}(v._cfg.dbschema,b),V$(l,[l.Transaction.prototype]),lm(l,[l.Transaction.prototype],l._storeNames,l._dbSchema),f.schema=l._dbSchema})}),w().then(()=>{var v,b;b=c,Ot(v=g).forEach(_=>{b.db.objectStoreNames.contains(_)||W1(b,_,v[_].primKey,v[_].indexes)})})}(e,t,o,r).catch(i)})}function vM(e,t){const r={del:[],add:[],change:[]};let n;for(n in e)t[n]||r.del.push(n);for(n in t){const a=e[n],o=t[n];if(a){const i={name:n,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(a.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||a.primKey.auto!==o.primKey.auto&&!P0)i.recreate=!0,r.change.push(i);else{const s=a.idxByName,l=o.idxByName;let u;for(u in s)l[u]||i.del.push(u);for(u in l){const f=s[u],c=l[u];f?f.src!==c.src&&i.change.push(c):i.add.push(c)}(i.del.length>0||i.add.length>0||i.change.length>0)&&r.change.push(i)}}else r.add.push([n,o])}return r}function W1(e,t,r,n){const a=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(o=>W$(a,o)),a}function W$(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function H$(e,t,r){const n={};return rm(t.objectStoreNames,0).forEach(a=>{const o=r.objectStore(a);let i=o.keyPath;const s=B$(pM(i),i||"",!1,!1,!!o.autoIncrement,i&&typeof i!="string",!0),l=[];for(let f=0;f{if(t[n]!==null){var a=t[n].split(",").map((i,s)=>{const l=(i=i.trim()).replace(/([&*]|\+\+)/g,""),u=/^\[/.test(l)?l.match(/^\[(.*)\]$/)[1].split("+"):l;return B$(l,u||null,/\&/.test(i),/\*/.test(i),/\+\+/.test(i),cr(u),s===0)}),o=a.shift();if(o.multi)throw new fe.Schema("Primary key cannot be multi-valued");a.forEach(i=>{if(i.auto)throw new fe.Schema("Only primary key can be marked as autoIncrement (++)");if(!i.keyPath)throw new fe.Schema("Index must have a name and cannot be an empty string")}),r[n]=gM(n,o,a)}})}stores(t){const r=this.db;this._cfg.storesSource=this._cfg.storesSource?br(this._cfg.storesSource,t):t;const n=r._versions,a={};let o={};return n.forEach(i=>{br(a,i._cfg.storesSource),o=i._cfg.dbschema={},i._parseStoresSpec(a,o)}),r._dbSchema=o,V$(r,[r._allTables,r,r.Transaction.prototype]),lm(r,[r._allTables,r,r.Transaction.prototype,this._cfg.tables],Ot(o),o),r._storeNames=Ot(o),this}upgrade(t){return this._cfg.contentUpgrade=fE(this._cfg.contentUpgrade||Ke,t),this}}function vE(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new Bs("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),r.version(1).stores({dbnames:"name"})),r.table("dbnames")}function mE(e){return e&&typeof e.databases=="function"}function K$(e){return Ni(function(){return ce.letThrough=!0,e()})}function OX(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(t){var r=function(){return indexedDB.databases().finally(t)};e=setInterval(r,100),r()}).finally(function(){return clearInterval(e)}):Promise.resolve()}function kX(e){const t=e._state,{indexedDB:r}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?Mt(t.dbOpenError):e);Oa&&(t.openCanceller._stackHolder=hl()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const n=t.openCanceller;function a(){if(t.openCanceller!==n)throw new fe.DatabaseClosed("db.open() was cancelled")}let o=t.dbReadyResolve,i=null,s=!1;return ae.race([n,(typeof navigator>"u"?ae.resolve():OX()).then(()=>new ae((l,u)=>{if(a(),!r)throw new fe.MissingAPI;const f=e.name,c=t.autoSchema?r.open(f):r.open(f,Math.round(10*e.verno));if(!c)throw new fe.MissingAPI;c.onerror=pa(u),c.onblocked=ot(e._fireOnBlocked),c.onupgradeneeded=ot(d=>{if(i=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=Bf,i.abort(),c.result.close();const g=r.deleteDatabase(f);g.onsuccess=g.onerror=ot(()=>{u(new fe.NoSuchDatabase(`Database ${f} doesnt exist`))})}else{i.onerror=pa(u);var h=d.oldVersion>Math.pow(2,62)?0:d.oldVersion;s=h<1,e._novip.idbdb=c.result,AX(e,h/10,i,u)}},u),c.onsuccess=ot(()=>{i=null;const d=e._novip.idbdb=c.result,h=rm(d.objectStoreNames);if(h.length>0)try{const m=d.transaction((g=h).length===1?g[0]:g,"readonly");t.autoSchema?function({_novip:w},v,b){w.verno=v.version/10;const _=w._dbSchema=H$(0,v,b);w._storeNames=rm(v.objectStoreNames,0),lm(w,[w._allTables],Ot(_),_)}(e,d,m):(G$(e,e._dbSchema,m),function(w,v){const b=vM(H$(0,w.idbdb,v),w._dbSchema);return!(b.add.length||b.change.some(_=>_.add.length||_.change.length))}(e,m)),z$(e,m)}catch{}var g;Jd.push(e),d.onversionchange=ot(m=>{t.vcFired=!0,e.on("versionchange").fire(m)}),d.onclose=ot(m=>{e.on("close").fire(m)}),s&&function({indexedDB:m,IDBKeyRange:w},v){!mE(m)&&v!=="__dbnames"&&vE(m,w).put({name:v}).catch(Ke)}(e._deps,f),l()},u)}))]).then(()=>(a(),t.onReadyBeingFired=[],ae.resolve(K$(()=>e.on.ready.fire(e.vip))).then(function l(){if(t.onReadyBeingFired.length>0){let u=t.onReadyBeingFired.reduce(fE,Ke);return t.onReadyBeingFired=[],ae.resolve(K$(()=>u(e.vip))).then(l)}}))).finally(()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(()=>e).catch(l=>{t.dbOpenError=l;try{i&&i.abort()}catch{}return n===t.openCanceller&&e._close(),Mt(l)}).finally(()=>{t.openComplete=!0,o()})}function q$(e){var t=o=>e.next(o),r=a(t),n=a(o=>e.throw(o));function a(o){return i=>{var s=o(i),l=s.value;return s.done?l:l&&typeof l.then=="function"?l.then(r,n):cr(l)?Promise.all(l).then(r,n):r(l)}}return a(t)()}function PX(e,t,r){var n=arguments.length;if(n<2)throw new fe.InvalidArgument("Too few arguments");for(var a=new Array(n-1);--n;)a[n-1]=arguments[n];r=a.pop();var o=XL(a);return[e,o,r]}function mM(e,t,r,n,a){return ae.resolve().then(()=>{const o=ce.transless||ce,i=e._createTransaction(t,r,e._dbSchema,n),s={trans:i,transless:o};if(n)i.idbtrans=n.idbtrans;else try{i.create(),e._state.PR1398_maxLoop=3}catch(c){return c.name===dE.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(e._close(),e.open().then(()=>mM(e,t,r,null,a))):Mt(c)}const l=cE(a);let u;l&&vu();const f=ae.follow(()=>{if(u=a.call(i,i),u)if(l){var c=bo.bind(null,null);u.then(c,c)}else typeof u.next=="function"&&typeof u.throw=="function"&&(u=q$(u))},s);return(u&&typeof u.then=="function"?ae.resolve(u).then(c=>i.active?c:Mt(new fe.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):f.then(()=>u)).then(c=>(n&&i._resolve(),i._completion.then(()=>c))).catch(c=>(i._reject(c),Mt(c)))})}function Gp(e,t,r){const n=cr(e)?e.slice():[e];for(let a=0;a0,v={...d,isVirtual:w,keyTail:c,keyLength:m,extractKey:U$(f),unique:!w&&d.unique};return g.push(v),v.isPrimaryKey||o.push(v),m>1&&i(m===2?f[0]:f.slice(0,m-1),c+1,d),g.sort((b,_)=>b.keyTail-_.keyTail),v}const s=i(n.primaryKey.keyPath,0,n.primaryKey);a[":id"]=[s];for(const f of n.indexes)i(f.keyPath,0,f);function l(f){const c=f.query.index;return c.isVirtual?{...f,query:{index:c,range:(d=f.query.range,h=c.keyTail,{type:d.type===1?2:d.type,lower:Gp(d.lower,d.lowerOpen?e.MAX_KEY:e.MIN_KEY,h),lowerOpen:!0,upper:Gp(d.upper,d.upperOpen?e.MIN_KEY:e.MAX_KEY,h),upperOpen:!0})}}:f;var d,h}return{...r,schema:{...n,primaryKey:s,indexes:o,getIndexByKeyPath:function(f){const c=a[tf(f)];return c&&c[0]}},count:f=>r.count(l(f)),query:f=>r.query(l(f)),openCursor(f){const{keyTail:c,isVirtual:d,keyLength:h}=f.query.index;return d?r.openCursor(l(f)).then(g=>g&&function(m){return Object.create(m,{continue:{value:function(v){v!=null?m.continue(Gp(v,f.reverse?e.MAX_KEY:e.MIN_KEY,c)):f.unique?m.continue(m.key.slice(0,h).concat(f.reverse?e.MIN_KEY:e.MAX_KEY,c)):m.continue()}},continuePrimaryKey:{value(v,b){m.continuePrimaryKey(Gp(v,e.MAX_KEY,c),b)}},primaryKey:{get:()=>m.primaryKey},key:{get(){const v=m.key;return h===1?v[0]:v.slice(0,h)}},value:{get:()=>m.value}})}(g)):r.openCursor(f)}}}}}};function yE(e,t,r,n){return r=r||{},n=n||"",Ot(e).forEach(a=>{if(an(t,a)){var o=e[a],i=t[a];if(typeof o=="object"&&typeof i=="object"&&o&&i){const s=A$(o);s!==A$(i)?r[n+a]=t[a]:s==="Object"?yE(o,i,r,n+a+"."):o!==i&&(r[n+a]=t[a])}else o!==i&&(r[n+a]=t[a])}else r[n+a]=void 0}),Ot(t).forEach(a=>{an(e,a)||(r[n+a]=t[a])}),r}const NX={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(o){const i=ce.trans,{deleting:s,creating:l,updating:u}=i.table(t).hook;switch(o.type){case"add":if(l.fire===Ke)break;return i._promise("readwrite",()=>f(o),!0);case"put":if(l.fire===Ke&&u.fire===Ke)break;return i._promise("readwrite",()=>f(o),!0);case"delete":if(s.fire===Ke)break;return i._promise("readwrite",()=>f(o),!0);case"deleteRange":if(s.fire===Ke)break;return i._promise("readwrite",()=>function(d){return c(d.trans,d.range,1e4)}(o),!0)}return r.mutate(o);function f(d){const h=ce.trans,g=d.keys||function(m,w){return w.type==="delete"?w.keys:w.keys||w.values.map(m.extractKey)}(n,d);if(!g)throw new Error("Keys missing");return(d=d.type==="add"||d.type==="put"?{...d,keys:g}:{...d}).type!=="delete"&&(d.values=[...d.values]),d.keys&&(d.keys=[...d.keys]),function(m,w,v){return w.type==="add"?Promise.resolve([]):m.getMany({trans:w.trans,keys:v,cache:"immutable"})}(r,d,g).then(m=>{const w=g.map((v,b)=>{const _=m[b],$={onerror:null,onsuccess:null};if(d.type==="delete")s.fire.call($,v,_,h);else if(d.type==="add"||_===void 0){const C=l.fire.call($,v,d.values[b],h);v==null&&C!=null&&(v=C,d.keys[b]=v,n.outbound||aa(d.values[b],n.keyPath,v))}else{const C=yE(_,d.values[b]),O=u.fire.call($,C,v,_,h);if(O){const x=d.values[b];Object.keys(O).forEach(S=>{an(x,S)?x[S]=O[S]:aa(x,S,O[S])})}}return $});return r.mutate(d).then(({failures:v,results:b,numFailures:_,lastResult:$})=>{for(let C=0;C(w.forEach(b=>b.onerror&&b.onerror(v)),Promise.reject(v)))})}function c(d,h,g){return r.query({trans:d,values:!1,query:{index:n,range:h},limit:g}).then(({result:m})=>f({type:"delete",keys:m,trans:d}).then(w=>w.numFailures>0?Promise.reject(w.failures[0]):m.length({table:t=>{const r=e.table(t);return{...r,getMany:n=>{if(!n.cache)return r.getMany(n);const a=yM(n.keys,n.trans._cache,n.cache==="clone");return a?ae.resolve(a):r.getMany(n).then(o=>(n.trans._cache={keys:n.keys,values:n.cache==="clone"?mh(o):o},o))},mutate:n=>(n.type!=="add"&&(n.trans._cache=null),r.mutate(n))}}})};function bE(e){return!("from"in e)}const Ka=function(e,t){if(!this){const r=new Ka;return e&&"d"in e&&br(r,e),r}br(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function zf(e,t,r){const n=vr(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(bE(e))return br(e,{from:t,to:r,d:1});const a=e.l,o=e.r;if(vr(r,e.from)<0)return a?zf(a,t,r):e.l={from:t,to:r,d:1,l:null,r:null},g4(e);if(vr(t,e.to)>0)return o?zf(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},g4(e);vr(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),vr(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);const i=!e.r;a&&!e.l&&cm(e,a),o&&i&&cm(e,o)}function cm(e,t){bE(t)||function r(n,{from:a,to:o,l:i,r:s}){zf(n,a,o),i&&r(n,i),s&&r(n,s)}(e,t)}function MX(e,t){const r=Y$(t);let n=r.next();if(n.done)return!1;let a=n.value;const o=Y$(e);let i=o.next(a.from),s=i.value;for(;!n.done&&!i.done;){if(vr(s.from,a.to)<=0&&vr(s.to,a.from)>=0)return!0;vr(a.from,s.from)<0?a=(n=r.next(s.from)).value:s=(i=o.next(a.from)).value}return!1}function Y$(e){let t=bE(e)?null:{s:0,n:e};return{next(r){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&vr(r,t.n.from)<0;)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||vr(r,t.n.to)<=0)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 g4(e){var t,r;const n=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((r=e.l)===null||r===void 0?void 0:r.d)||0),a=n>1?"r":n<-1?"l":"";if(a){const o=a==="r"?"l":"r",i={...e},s=e[a];e.from=s.from,e.to=s.to,e[a]=s[a],i[a]=s[o],e[o]=i,i.d=v4(i)}e.d=v4(e)}function v4({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}Wc(Ka.prototype,{add(e){return cm(this,e),this},addKey(e){return zf(this,e,e),this},addKeys(e){return e.forEach(t=>zf(this,t,t)),this},[R$](){return Y$(this)}});const DX={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,r=new Ka(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{const a=e.table(n),{schema:o}=a,{primaryKey:i}=o,{extractKey:s,outbound:l}=i,u={...a,mutate:d=>{const h=d.trans,g=h.mutatedParts||(h.mutatedParts={}),m=O=>{const x=`idb://${t}/${n}/${O}`;return g[x]||(g[x]=new Ka)},w=m(""),v=m(":dels"),{type:b}=d;let[_,$]=d.type==="deleteRange"?[d.range]:d.type==="delete"?[d.keys]:d.values.length<50?[[],d.values]:[];const C=d.trans._cache;return a.mutate(d).then(O=>{if(cr(_)){b!=="delete"&&(_=O.results),w.addKeys(_);const x=yM(_,C);x||b==="add"||v.addKeys(_),(x||$)&&function(S,A,k,N){function P(I){const E=S(I.name||"");function R(B){return B!=null?I.extractKey(B):null}const F=B=>I.multiEntry&&cr(B)?B.forEach(j=>E.addKey(j)):E.addKey(B);(k||N).forEach((B,j)=>{const M=k&&R(k[j]),D=N&&R(N[j]);vr(M,D)!==0&&(M!=null&&F(M),D!=null&&F(D))})}A.indexes.forEach(P)}(m,o,x,$)}else if(_){const x={from:_.lower,to:_.upper};v.add(x),w.add(x)}else w.add(r),v.add(r),o.indexes.forEach(x=>m(x.name).add(r));return O})}},f=({query:{index:d,range:h}})=>{var g,m;return[d,new Ka((g=h.lower)!==null&&g!==void 0?g:e.MIN_KEY,(m=h.upper)!==null&&m!==void 0?m:e.MAX_KEY)]},c={get:d=>[i,new Ka(d.key)],getMany:d=>[i,new Ka().addKeys(d.keys)],count:f,query:f,openCursor:f};return Ot(c).forEach(d=>{u[d]=function(h){const{subscr:g}=ce;if(g){const m=$=>{const C=`idb://${t}/${n}/${$}`;return g[C]||(g[C]=new Ka)},w=m(""),v=m(":dels"),[b,_]=c[d](h);if(m(b.name||"").add(_),!b.isPrimaryKey){if(d!=="count"){const $=d==="query"&&l&&h.values&&a.query({...h,values:!1});return a[d].apply(this,arguments).then(C=>{if(d==="query"){if(l&&h.values)return $.then(({result:x})=>(w.addKeys(x),C));const O=h.values?C.result.map(s):C.result;h.values?w.addKeys(O):v.addKeys(O)}else if(d==="openCursor"){const O=C,x=h.values;return O&&Object.create(O,{key:{get:()=>(v.addKey(O.primaryKey),O.key)},primaryKey:{get(){const S=O.primaryKey;return v.addKey(S),S}},value:{get:()=>(x&&w.addKey(O.primaryKey),O.value)}})}return C})}v.add(r)}}return a[d].apply(this,arguments)}}),u}}}};class Bs{constructor(t,r){this._middlewares={},this.verno=0;const n=Bs.dependencies;this._options=r={addons:Bs.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...r},this._deps={indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange};const{addons:a}=r;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ke,dbReadyPromise:null,cancelOpen:Ke,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new ae(s=>{o.dbReadyResolve=s}),o.openCanceller=new ae((s,l)=>{o.cancelOpen=l}),this._state=o,this.name=t,this.on=ef(this,"populate","blocked","versionchange","close",{ready:[fE,Ke]}),this.on.ready.subscribe=GL(this.on.ready.subscribe,s=>(l,u)=>{Bs.vip(()=>{const f=this._state;if(f.openComplete)f.dbOpenError||ae.resolve().then(l),u&&s(l);else if(f.onReadyBeingFired)f.onReadyBeingFired.push(l),u&&s(l);else{s(l);const c=this;u||s(function d(){c.on.ready.unsubscribe(l),c.on.ready.unsubscribe(d)})}})}),this.Collection=(i=this,ld(wX.prototype,function(s,l){this.db=i;let u=dM,f=null;if(l)try{u=l()}catch(g){f=g}const c=s._ctx,d=c.table,h=d.hook.reading.fire;this._ctx={table:d,index:c.index,isPrimKey:!c.index||d.schema.primKey.keyPath&&c.index===d.schema.primKey.name,range:u,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:f,or:c.or,valueMapper:h!==jf?h:null}})),this.Table=function(s){return ld(bX.prototype,function(l,u,f){this.db=s,this._tx=f,this.name=l,this.schema=u,this.hook=s._allTables[l]?s._allTables[l].hook:ef(null,{creating:[sX,Ke],reading:[iX,jf],updating:[cX,Ke],deleting:[lX,Ke]})})}(this),this.Transaction=function(s){return ld(SX.prototype,function(l,u,f,c,d){this.db=s,this.mode=l,this.storeNames=u,this.schema=f,this.chromeTransactionDurability=c,this.idbtrans=null,this.on=ef(this,"complete","error","abort"),this.parent=d||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 ae((h,g)=>{this._resolve=h,this._reject=g}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},h=>{var g=this.active;return this.active=!1,this.on.error.fire(h),this.parent?this.parent._reject(h):g&&this.idbtrans&&this.idbtrans.abort(),Mt(h)})})}(this),this.Version=function(s){return ld(RX.prototype,function(l){this.db=s,this._cfg={version:l,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(s){return ld(hM.prototype,function(l,u,f){this.db=s,this._ctx={table:l,index:u===":id"?null:u,or:f};const c=s._deps.indexedDB;if(!c)throw new fe.MissingAPI;this._cmp=this._ascending=c.cmp.bind(c),this._descending=(d,h)=>c.cmp(h,d),this._max=(d,h)=>c.cmp(d,h)>0?d:h,this._min=(d,h)=>c.cmp(d,h)<0?d:h,this._IDBKeyRange=s._deps.IDBKeyRange})}(this),this.on("versionchange",s=>{s.newVersion>0,this.close()}),this.on("blocked",s=>{!s.newVersion||s.newVersionnew this.Transaction(s,l,u,this._options.chromeTransactionDurability,f),this._fireOnBlocked=s=>{this.on("blocked").fire(s),Jd.filter(l=>l.name===this.name&&l!==this&&!l._state.vcFired).map(l=>l.on("versionchange").fire(s))},this.use(IX),this.use(NX),this.use(DX),this.use(LX),this.vip=Object.create(this,{_vip:{value:!0}}),a.forEach(s=>s(this))}version(t){if(isNaN(t)||t<.1)throw new fe.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new fe.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);const r=this._versions;var n=r.filter(a=>a._cfg.version===t)[0];return n||(n=new this.Version(t),r.push(n),r.sort(TX),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(t){return this.idbdb&&(this._state.openComplete||ce.letThrough||this._vip)?t():new ae((r,n)=>{if(this._state.openComplete)return n(new fe.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void n(new fe.DatabaseClosed);this.open().catch(Ke)}this._state.dbReadyPromise.then(r,n)}).then(t)}use({stack:t,create:r,level:n,name:a}){a&&this.unuse({stack:t,name:a});const o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:r,level:n??10,name:a}),o.sort((i,s)=>i.level-s.level),this}unuse({stack:t,name:r,create:n}){return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(a=>n?a.create!==n:!!r&&a.name!==r)),this}open(){return kX(this)}_close(){const t=this._state,r=Jd.indexOf(this);if(r>=0&&Jd.splice(r,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}t.dbReadyPromise=new ae(n=>{t.dbReadyResolve=n}),t.openCanceller=new ae((n,a)=>{t.cancelOpen=a})}close(){this._close();const t=this._state;this._options.autoOpen=!1,t.dbOpenError=new fe.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}delete(){const t=arguments.length>0,r=this._state;return new ae((n,a)=>{const o=()=>{this.close();var i=this._deps.indexedDB.deleteDatabase(this.name);i.onsuccess=ot(()=>{(function({indexedDB:s,IDBKeyRange:l},u){!mE(s)&&u!=="__dbnames"&&vE(s,l).delete(u).catch(Ke)})(this._deps,this.name),n()}),i.onerror=pa(a),i.onblocked=this._fireOnBlocked};if(t)throw new fe.InvalidArgument("Arguments not allowed in db.delete()");r.isBeingOpened?r.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){const t=this._state.dbOpenError;return t&&t.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return Ot(this._allTables).map(t=>this._allTables[t])}transaction(){const t=PX.apply(this,arguments);return this._transaction.apply(this,t)}_transaction(t,r,n){let a=ce.trans;a&&a.db===this&&t.indexOf("!")===-1||(a=null);const o=t.indexOf("?")!==-1;let i,s;t=t.replace("!","").replace("?","");try{if(s=r.map(u=>{var f=u instanceof this.Table?u.name:u;if(typeof f!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return f}),t=="r"||t==="readonly")i="readonly";else{if(t!="rw"&&t!="readwrite")throw new fe.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(a){if(a.mode==="readonly"&&i==="readwrite"){if(!o)throw new fe.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");a=null}a&&s.forEach(u=>{if(a&&a.storeNames.indexOf(u)===-1){if(!o)throw new fe.SubTransaction("Table "+u+" not included in parent transaction.");a=null}}),o&&a&&!a.active&&(a=null)}}catch(u){return a?a._promise(null,(f,c)=>{c(u)}):Mt(u)}const l=mM.bind(null,this,i,s,a,n);return a?a._promise(i,l,"lock"):ce.trans?mu(ce.transless,()=>this._whenReady(l)):this._whenReady(l)}table(t){if(!an(this._allTables,t))throw new fe.InvalidTable(`Table ${t} does not exist`);return this._allTables[t]}}const jX=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable";class FX{constructor(t){this._subscribe=t}subscribe(t,r,n){return this._subscribe(t&&typeof t!="function"?t:{next:t,error:r,complete:n})}[jX](){return this}}function bM(e,t){return Ot(t).forEach(r=>{cm(e[r]||(e[r]=new Ka),t[r])}),e}function BX(e){return new FX(t=>{const r=cE(e);let n=!1,a={},o={};const i={get closed(){return n},unsubscribe:()=>{n=!0,Mi.storagemutated.unsubscribe(f)}};t.start&&t.start(i);let s=!1,l=!1;function u(){return Ot(o).some(d=>a[d]&&MX(a[d],o[d]))}const f=d=>{bM(a,d),u()&&c()},c=()=>{if(s||n)return;a={};const d={},h=function(g){r&&vu();const m=()=>Ni(e,{subscr:g,trans:null}),w=ce.trans?mu(ce.transless,m):m();return r&&w.then(bo,bo),w}(d);l||(Mi("storagemutated",f),l=!0),s=!0,Promise.resolve(h).then(g=>{s=!1,n||(u()?c():(a={},o=d,t.next&&t.next(g)))},g=>{s=!1,t.error&&t.error(g),i.unsubscribe()})};return c(),i})}let X$;try{X$={indexedDB:tt.indexedDB||tt.mozIndexedDB||tt.webkitIndexedDB||tt.msIndexedDB,IDBKeyRange:tt.IDBKeyRange||tt.webkitIDBKeyRange}}catch{X$={indexedDB:null,IDBKeyRange:null}}const ss=Bs;function lv(e){let t=eo;try{eo=!0,Mi.storagemutated.fire(e)}finally{eo=t}}Wc(ss,{...rv,delete:e=>new ss(e,{addons:[]}).delete(),exists:e=>new ss(e,{addons:[]}).open().then(t=>(t.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return function({indexedDB:t,IDBKeyRange:r}){return mE(t)?Promise.resolve(t.databases()).then(n=>n.map(a=>a.name).filter(a=>a!=="__dbnames")):vE(t,r).toCollection().primaryKeys()}(ss.dependencies).then(e)}catch{return Mt(new fe.MissingAPI)}},defineClass:()=>function(e){br(this,e)},ignoreTransaction:e=>ce.trans?mu(ce.transless,e):e(),vip:K$,async:function(e){return function(){try{var t=q$(e.apply(this,arguments));return t&&typeof t.then=="function"?t:ae.resolve(t)}catch(r){return Mt(r)}}},spawn:function(e,t,r){try{var n=q$(e.apply(r,t||[]));return n&&typeof n.then=="function"?n:ae.resolve(n)}catch(a){return Mt(a)}},currentTransaction:{get:()=>ce.trans||null},waitFor:function(e,t){const r=ae.resolve(typeof e=="function"?ss.ignoreTransaction(e):e).timeout(t||6e4);return ce.trans?ce.trans.waitFor(r):r},Promise:ae,debug:{get:()=>Oa,set:e=>{QL(e,e==="dexie"?()=>!0:uM)}},derive:bc,extend:br,props:Wc,override:GL,Events:ef,on:Mi,liveQuery:BX,extendObservabilitySet:bM,getByKeyPath:oo,setByKeyPath:aa,delByKeyPath:function(e,t){typeof t=="string"?aa(e,t,void 0):"length"in t&&[].map.call(t,function(r){aa(e,r,void 0)})},shallowClone:YL,deepClone:mh,getObjectDiff:yE,cmp:vr,asap:KL,minKey:-(1/0),addons:[],connections:Jd,errnames:dE,dependencies:X$,semVer:"3.2.3",version:"3.2.3".split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),ss.maxKey=Uf(ss.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Mi("storagemutated",e=>{if(!eo){let t;P0?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),eo=!0,dispatchEvent(t),eo=!1}}),addEventListener("x-storagemutated-1",({detail:e})=>{eo||lv(e)}));let eo=!1;if(typeof BroadcastChannel<"u"){const e=new BroadcastChannel("x-storagemutated-1");typeof e.unref=="function"&&e.unref(),Mi("storagemutated",t=>{eo||e.postMessage(t)}),e.onmessage=t=>{t.data&&lv(t.data)}}else if(typeof self<"u"&&typeof navigator<"u"){Mi("storagemutated",t=>{try{eo||(typeof localStorage<"u"&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(r=>r.postMessage({type:"x-storagemutated-1",changedParts:t})))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",t=>{if(t.key==="x-storagemutated-1"){const r=JSON.parse(t.newValue);r&&lv(r.changedParts)}});const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:t}){t&&t.type==="x-storagemutated-1"&&lv(t.changedParts)})}ae.rejectionMapper=function(e,t){if(!e||e instanceof wc||e instanceof TypeError||e instanceof SyntaxError||!e.name||!s4[e.name])return e;var r=new s4[e.name](t||e.message,e);return"stack"in e&&ao(r,"stack",{get:function(){return this.inner.stack}}),r},QL(Oa,uM);globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};class UX extends Bs{constructor(){super("RecordDB"),this.version(1).stores({wordRecords:"++id,word,timeStamp,dict,chapter,errorCount,[dict+chapter]",chapterRecords:"++id,timeStamp,dict,chapter,time,[dict+chapter]"}),this.version(2).stores({wordRecords:"++id,word,timeStamp,dict,chapter,wrongCount,[dict+chapter]",chapterRecords:"++id,timeStamp,dict,chapter,time,[dict+chapter]"}),this.version(3).stores({wordRecords:"++id,word,timeStamp,dict,chapter,wrongCount,[dict+chapter]",chapterRecords:"++id,timeStamp,dict,chapter,time,[dict+chapter]",reviewRecords:"++id,dict,createTime,isFinished"})}}const kt=new UX;kt.wordRecords.mapToClass(zL);kt.chapterRecords.mapToClass(VL);kt.reviewRecords.mapToClass(WL);function zX(){const e=oe(Nn),t=oe(Xi),r=oe(wh);return p.useCallback(a=>{const{chapterData:{correctCount:o,wrongCount:i,userInputLogs:s,wordCount:l,words:u,wordRecordIds:f},timerData:{time:c}}=a,d=s.filter(g=>g.correctCount>0&&g.wrongCount===0).map(g=>g.index),h=new VL(r,t?-1:e,c,o,i,l,d,u.length,f??[]);kt.chapterRecords.add(h)},[e,r,t])}function VX(){const e=oe(Xi),t=oe(Nn),r=oe(wh),{dispatch:n}=p.useContext(Sr)??{};return p.useCallback(async({word:o,wrongCount:i,letterTimeArray:s,letterMistake:l})=>{const u=[];for(let d=1;d0&&n({type:Me.ADD_WORD_RECORD_ID,payload:c}),n({type:Me.SET_IS_SAVING_RECORD,payload:!1}))},[t,r,n,e])}function WX(){return{deleteWordRecord:p.useCallback(async(t,r)=>{try{return await kt.wordRecords.where({word:t,dict:r}).delete()}catch{}},[])}}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function yje(e){const[t,r]=p.useState(void 0);return p.useEffect(()=>{e&&(async()=>{const a=await HX(e);r(a)})()},[e]),t}async function HX(e){const r=(await kt.reviewRecords.where("dict").equals(e).toArray()).sort((n,a)=>n.createTime-a.createTime).pop();return r&&(r.isFinished?void 0:r)}async function bje(e,t){const r=[...t].sort((u,f)=>u.errorCount-f.errorCount),n=[...t].sort((u,f)=>u.latestErrorTime-f.latestErrorTime),a=t.map(u=>({...u,errorCountScore:r.indexOf(u)+1,latestErrorTimeScore:n.indexOf(u)+1})),o=.6,i=.4,s=a.sort((u,f)=>{const c=u.errorCountScore*o+u.latestErrorTimeScore*i,d=f.errorCountScore*o+f.latestErrorTimeScore*i;return c-d}).map(u=>u.originData),l=new WL(e,s);return await kt.reviewRecords.put(l),l}async function GX(e){kt.reviewRecords.put(e)}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function KX(e){const t=Ra("reviewModeInfo",e);return t.debugLabel="storageAtom",rn(r=>r(t),(r,n,a)=>{var i;const o=typeof a=="function"?a(r(t)):a;(i=o.reviewRecord)!=null&&i.id&&GX(o.reviewRecord),n(t,o)})}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const Z$="/qwerty-learner/sounds/",Q$=Z$+"key-sound/",qX=Object.assign({"../../public/sounds/key-sound/Alpacas.mp3":()=>Je(()=>import("./Alpacas-22644f47.js"),[],import.meta.url),"../../public/sounds/key-sound/Buckling Spring.mp3":()=>Je(()=>import("./Buckling Spring-2ef27aab.js"),[],import.meta.url),"../../public/sounds/key-sound/Cherry MX Blacks.mp3":()=>Je(()=>import("./Cherry MX Blacks-346ecd94.js"),[],import.meta.url),"../../public/sounds/key-sound/Cherry MX Blues.mp3":()=>Je(()=>import("./Cherry MX Blues-40d28f11.js"),[],import.meta.url),"../../public/sounds/key-sound/Cherry MX Browns.mp3":()=>Je(()=>import("./Cherry MX Browns-d5c758bb.js"),[],import.meta.url),"../../public/sounds/key-sound/Default.wav":()=>Je(()=>import("./Default-9121092f.js"),[],import.meta.url),"../../public/sounds/key-sound/Gateron Black Inks.mp3":()=>Je(()=>import("./Gateron Black Inks-60ade530.js"),[],import.meta.url),"../../public/sounds/key-sound/Gateron Red Inks.mp3":()=>Je(()=>import("./Gateron Red Inks-d0547f26.js"),[],import.meta.url),"../../public/sounds/key-sound/Holy Pandas.mp3":()=>Je(()=>import("./Holy Pandas-b28a824f.js"),[],import.meta.url),"../../public/sounds/key-sound/Kailh Box Navies.mp3":()=>Je(()=>import("./Kailh Box Navies-f6855634.js"),[],import.meta.url),"../../public/sounds/key-sound/NovelKeys Creams.mp3":()=>Je(()=>import("./NovelKeys Creams-f19f71f3.js"),[],import.meta.url),"../../public/sounds/key-sound/SKCM Blue Alps.mp3":()=>Je(()=>import("./SKCM Blue Alps-db6e3fb5.js"),[],import.meta.url),"../../public/sounds/key-sound/Topre.mp3":()=>Je(()=>import("./Topre-b391b916.js"),[],import.meta.url),"../../public/sounds/key-sound/Turquoise Tealios.mp3":()=>Je(()=>import("./Turquoise Tealios-0503a45d.js"),[],import.meta.url)}),$c=Object.keys(qX).map(e=>{const t=e.replace(/(.*\/)*([^.]+).*/gi,"$2"),r=e.substring(e.lastIndexOf("."));return{key:t,name:`${t}`,filename:`${t}${r}`}}).sort((e,t)=>e.key==="Default"?-1:t.key==="Default"?1:e.key.localeCompare(t.key)),YX=[{key:"1",name:"声音1",filename:"beep.wav"}],XX=[{key:"1",name:"声音1",filename:"correct.wav"}],m4={en:{defaultPronIndex:0,pronunciation:[{name:"美音",pron:"us"},{name:"英音",pron:"uk"}]},code:{defaultPronIndex:0,pronunciation:[{name:"美音",pron:"us"},{name:"英音",pron:"uk"}]},de:{defaultPronIndex:0,pronunciation:[{name:"德语",pron:"de"}]},romaji:{defaultPronIndex:0,pronunciation:[{name:"罗马音",pron:"romaji"}]},hapin:{defaultPronIndex:0,pronunciation:[{name:"哈拼",pron:"hapin"}]},zh:{defaultPronIndex:0,pronunciation:[{name:"普通话",pron:"zh"}]},ja:{defaultPronIndex:0,pronunciation:[{name:"日语",pron:"ja"}]},kk:{defaultPronIndex:0,pronunciation:[{name:"哈萨克语",pron:"kk"}]}};globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const wh=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/currentDictIdAtom",Ra("currentDict","cet4"));wh.debugLabel="currentDictIdAtom";const wr=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/currentDictInfoAtom",rn(e=>{const t=e(wh);let r=Hf[t];return r||(r=Hf.cet4),r}));wr.debugLabel="currentDictInfoAtom";const Nn=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/currentChapterAtom",Ra("currentChapter",0));Nn.debugLabel="currentChapterAtom";const wM=Yi("loopWordConfig",{times:1}),Hc=Yi("keySoundsConfig",{isOpen:!0,isOpenClickSound:!0,volume:1,resource:$c[0]}),wE=Yi("hintSoundsConfig",{isOpen:!0,volume:1,isOpenWrongSound:!0,isOpenCorrectSound:!0,wrongResource:YX[0],correctResource:XX[0]}),Ro=Yi("pronunciation",{isOpen:!0,volume:1,type:"us",name:"美音",isLoop:!1,isTransRead:!1,transVolume:1,rate:1}),_E=Yi("fontsize",UL),_M=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/pronunciationIsOpenAtom",rn(e=>e(Ro).isOpen));_M.debugLabel="pronunciationIsOpenAtom";const ZX=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/pronunciationIsTransReadAtom",rn(e=>e(Ro).isTransRead));ZX.debugLabel="pronunciationIsTransReadAtom";const yu=Yi("randomConfig",{isOpen:!1}),$E=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/isShowPrevAndNextWordAtom",Ra("isShowPrevAndNextWord",!0));$E.debugLabel="isShowPrevAndNextWordAtom";const xE=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/isIgnoreCaseAtom",Ra("isIgnoreCase",!0));xE.debugLabel="isIgnoreCaseAtom";const SE=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/isShowAnswerOnHoverAtom",Ra("isShowAnswerOnHover",!0));SE.debugLabel="isShowAnswerOnHoverAtom";const _h=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/isTextSelectableAtom",Ra("isTextSelectable",!1));_h.debugLabel="isTextSelectableAtom";const $h=KX({isReviewMode:!1,reviewRecord:void 0}),Xi=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/isReviewModeAtom",rn(e=>e($h).isReviewMode));Xi.debugLabel="isReviewModeAtom";const xh=Yi("phoneticConfig",{isOpen:!0,type:"us"}),Sh=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/isOpenDarkModeAtom",Ra("isOpenDarkModeAtom",window.matchMedia("(prefers-color-scheme: dark)").matches));Sh.debugLabel="isOpenDarkModeAtom";const QX=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/isShowSkipAtom",rn(!1));QX.debugLabel="isShowSkipAtom";const JX=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/isInDevModeAtom",rn(!1));JX.debugLabel="isInDevModeAtom";const EE=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/infoPanelStateAtom",rn({donate:!1,vsc:!1,community:!1,redBook:!1}));EE.debugLabel="infoPanelStateAtom";const I0=Yi("wordDictationConfig",{isOpen:!1,type:"hideAll",openBy:"auto"}),$M=globalThis.jotaiAtomCache.get("/home/runner/work/qwerty-learner/qwerty-learner/src/store/index.ts/dismissStartCardDateAtom",Ra(BL,null));$M.debugLabel="dismissStartCardDateAtom";var io={DEBUG:!1,LIB_VERSION:"2.47.0"},dt;if(typeof window>"u"){var y4={hostname:""};dt={navigator:{userAgent:""},document:{location:y4,referrer:""},screen:{width:0,height:0},location:y4}}else dt=window;var N0=Array.prototype,eZ=Function.prototype,xM=Object.prototype,si=N0.slice,Eh=xM.toString,L0=xM.hasOwnProperty,At=dt.console,li=dt.navigator,qe=dt.document,Kp=dt.opera,um=dt.screen,ga=li.userAgent,H1=eZ.bind,b4=N0.forEach,w4=N0.indexOf,_4=N0.map,tZ=Array.isArray,J$={},T={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},Ge={log:function(){if(io.DEBUG&&!T.isUndefined(At)&&At)try{At.log.apply(At,arguments)}catch{T.each(arguments,function(t){At.log(t)})}},warn:function(){if(io.DEBUG&&!T.isUndefined(At)&&At){var e=["Mixpanel warning:"].concat(T.toArray(arguments));try{At.warn.apply(At,e)}catch{T.each(e,function(r){At.warn(r)})}}},error:function(){if(io.DEBUG&&!T.isUndefined(At)&&At){var e=["Mixpanel error:"].concat(T.toArray(arguments));try{At.error.apply(At,e)}catch{T.each(e,function(r){At.error(r)})}}},critical:function(){if(!T.isUndefined(At)&&At){var e=["Mixpanel error:"].concat(T.toArray(arguments));try{At.error.apply(At,e)}catch{T.each(e,function(r){At.error(r)})}}}},G1=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(Ge,arguments)}},CE=function(e){return{log:G1(Ge.log,e),error:G1(Ge.error,e),critical:G1(Ge.critical,e)}};T.bind=function(e,t){var r,n;if(H1&&e.bind===H1)return H1.apply(e,si.call(arguments,1));if(!T.isFunction(e))throw new TypeError;return r=si.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,r.concat(si.call(arguments)));var a={};a.prototype=e.prototype;var o=new a;a.prototype=null;var i=e.apply(o,r.concat(si.call(arguments)));return Object(i)===i?i:o},n};T.each=function(e,t,r){if(e!=null){if(b4&&e.forEach===b4)e.forEach(t,r);else if(e.length===+e.length){for(var n=0,a=e.length;n0&&(t[n]=r)}),t};T.truncate=function(e,t){var r;return typeof e=="string"?r=e.slice(0,t):T.isArray(e)?(r=[],T.each(e,function(n){r.push(T.truncate(n,t))})):T.isObject(e)?(r={},T.each(e,function(n,a){r[a]=T.truncate(n,t)})):r=e,r};T.JSONEncode=function(){return function(e){var t=e,r=function(a){var o=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return o.lastIndex=0,o.test(a)?'"'+a.replace(o,function(s){var l=i[s];return typeof l=="string"?l:"\\u"+("0000"+s.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'},n=function(a,o){var i="",s=" ",l=0,u="",f="",c=0,d=i,h=[],g=o[a];switch(g&&typeof g=="object"&&typeof g.toJSON=="function"&&(g=g.toJSON(a)),typeof g){case"string":return r(g);case"number":return isFinite(g)?String(g):"null";case"boolean":case"null":return String(g);case"object":if(!g)return"null";if(i+=s,h=[],Eh.apply(g)==="[object Array]"){for(c=g.length,l=0;l="0"&&t<="9";)g+=t,o();if(t===".")for(g+=".";o()&&t>="0"&&t<="9";)g+=t;if(t==="e"||t==="E")for(g+=t,o(),(t==="-"||t==="+")&&(g+=t,o());t>="0"&&t<="9";)g+=t,o();if(h=+g,!isFinite(h))a("Bad number");else return h},s=function(){var h,g,m="",w;if(t==='"')for(;o();){if(t==='"')return o(),m;if(t==="\\")if(o(),t==="u"){for(w=0,g=0;g<4&&(h=parseInt(o(),16),!!isFinite(h));g+=1)w=w*16+h;m+=String.fromCharCode(w)}else if(typeof r[t]=="string")m+=r[t];else break;else m+=t}a("Bad string")},l=function(){for(;t&&t<=" ";)o()},u=function(){switch(t){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}a('Unexpected "'+t+'"')},f,c=function(){var h=[];if(t==="["){if(o("["),l(),t==="]")return o("]"),h;for(;t;){if(h.push(f()),l(),t==="]")return o("]"),h;o(","),l()}}a("Bad array")},d=function(){var h,g={};if(t==="{"){if(o("{"),l(),t==="}")return o("}"),g;for(;t;){if(h=s(),l(),o(":"),Object.hasOwnProperty.call(g,h)&&a('Duplicate key "'+h+'"'),g[h]=f(),l(),t==="}")return o("}"),g;o(","),l()}}a("Bad object")};return f=function(){switch(l(),t){case"{":return d();case"[":return c();case'"':return s();case"-":return i();default:return t>="0"&&t<="9"?i():u()}},function(h){var g;return n=h,e=0,t=" ",g=f(),l(),t&&a("Syntax error"),g}}();T.base64Encode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,n,a,o,i,s,l,u,f=0,c=0,d="",h=[];if(!e)return e;e=T.utf8Encode(e);do r=e.charCodeAt(f++),n=e.charCodeAt(f++),a=e.charCodeAt(f++),u=r<<16|n<<8|a,o=u>>18&63,i=u>>12&63,s=u>>6&63,l=u&63,h[c++]=t.charAt(o)+t.charAt(i)+t.charAt(s)+t.charAt(l);while(f127&&i<2048?s=String.fromCharCode(i>>6|192,i&63|128):s=String.fromCharCode(i>>12|224,i>>6&63|128,i&63|128),s!==null&&(n>r&&(t+=e.substring(r,n)),t+=s,r=n=o+1)}return n>r&&(t+=e.substring(r,e.length)),t};T.UUID=function(){var e=function(){var n=1*new Date,a;if(dt.performance&&dt.performance.now)a=dt.performance.now();else for(a=0;n==1*new Date;)a++;return n.toString(16)+Math.floor(a).toString(16)},t=function(){return Math.random().toString(16).replace(".","")},r=function(){var n=ga,a,o,i=[],s=0;function l(u,f){var c,d=0;for(c=0;c=4&&(s=l(s,i),i=[]);return i.length>0&&(s=l(s,i)),s.toString(16)};return function(){var n=(um.height*um.width).toString(16);return e()+"-"+t()+"-"+r()+"-"+n+"-"+e()}}();var $4=["ahrefsbot","baiduspider","bingbot","bingpreview","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];T.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<$4.length;t++)if(e.indexOf($4[t])!==-1)return!0;return!1};T.HTTPBuildQuery=function(e,t){var r,n,a=[];return T.isUndefined(t)&&(t="&"),T.each(e,function(o,i){r=encodeURIComponent(o.toString()),n=encodeURIComponent(i),a[a.length]=n+"="+r}),a.join(t)};T.getQueryParam=function(e,t){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var r="[\\?&]"+t+"=([^&#]*)",n=new RegExp(r),a=n.exec(e);if(a===null||a&&typeof a[1]!="string"&&a[1].length)return"";var o=a[1];try{o=decodeURIComponent(o)}catch{Ge.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")};T.cookie={get:function(e){for(var t=e+"=",r=qe.cookie.split(";"),n=0;n=0}function n(a){if(!qe.getElementsByTagName)return[];var o=a.split(" "),i,s,l,u,f,c,d,h,g,m,w=[qe];for(c=0;c-1){s=i.split("#"),l=s[0];var v=s[1],b=qe.getElementById(v);if(!b||l&&b.nodeName.toLowerCase()!=l)return[];w=[b];continue}if(i.indexOf(".")>-1){s=i.split("."),l=s[0];var _=s[1];for(l||(l="*"),u=[],f=0,d=0;d-1};break;default:S=function(A){return A.getAttribute(C)}}for(w=[],m=0,d=0;d=3?t[2]:""},properties:function(){return T.extend(T.strip_empty_properties({$os:T.info.os(),$browser:T.info.browser(ga,li.vendor,Kp),$referrer:qe.referrer,$referring_domain:T.info.referringDomain(qe.referrer),$device:T.info.device(ga)}),{$current_url:dt.location.href,$browser_version:T.info.browserVersion(ga,li.vendor,Kp),$screen_height:um.height,$screen_width:um.width,mp_lib:"web",$lib_version:io.LIB_VERSION,$insert_id:TE(),time:T.timestamp()/1e3})},people_properties:function(){return T.extend(T.strip_empty_properties({$os:T.info.os(),$browser:T.info.browser(ga,li.vendor,Kp)}),{$browser_version:T.info.browserVersion(ga,li.vendor,Kp)})},mpPageViewProperties:function(){return T.strip_empty_properties({current_page_title:qe.title,current_domain:dt.location.hostname,current_url_path:dt.location.pathname,current_url_protocol:dt.location.protocol,current_url_search:dt.location.search})}};var TE=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},oZ=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,iZ=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,x4=function(e){var t=iZ,r=e.split("."),n=r[r.length-1];(n.length>4||n==="com"||n==="org")&&(t=oZ);var a=e.match(t);return a?a[0]:""},fm=null,hm=null;typeof JSON<"u"&&(fm=JSON.stringify,hm=JSON.parse);fm=fm||T.JSONEncode;hm=hm||T.JSONDecode;T.toArray=T.toArray;T.isObject=T.isObject;T.JSONEncode=T.JSONEncode;T.JSONDecode=T.JSONDecode;T.isBlockedUA=T.isBlockedUA;T.isEmptyObject=T.isEmptyObject;T.info=T.info;T.info.device=T.info.device;T.info.browser=T.info.browser;T.info.browserVersion=T.info.browserVersion;T.info.properties=T.info.properties;var Oo=function(){};Oo.prototype.create_properties=function(){};Oo.prototype.event_handler=function(){};Oo.prototype.after_track_handler=function(){};Oo.prototype.init=function(e){return this.mp=e,this};Oo.prototype.track=function(e,t,r,n){var a=this,o=T.dom_query(e);if(o.length===0){Ge.error("The DOM query ("+e+") returned 0 elements");return}return T.each(o,function(i){T.register_event(i,this.override_event,function(s){var l={},u=a.create_properties(r,this),f=a.mp.get_config("track_links_timeout");a.event_handler(s,this,l),window.setTimeout(a.track_callback(n,u,l,!0),f),a.mp.track(t,u,a.track_callback(n,u,l))})},this),!0};Oo.prototype.track_callback=function(e,t,r,n){n=n||!1;var a=this;return function(){r.callback_fired||(r.callback_fired=!0,!(e&&e(n,t)===!1)&&a.after_track_handler(t,r,n))}};Oo.prototype.create_properties=function(e,t){var r;return typeof e=="function"?r=e(t):r=T.extend({},e),r};var Gc=function(){this.override_event="click"};T.inherit(Gc,Oo);Gc.prototype.create_properties=function(e,t){var r=Gc.superclass.create_properties.apply(this,arguments);return t.href&&(r.url=t.href),r};Gc.prototype.event_handler=function(e,t,r){r.new_tab=e.which===2||e.metaKey||e.ctrlKey||t.target==="_blank",r.href=t.href,r.new_tab||e.preventDefault()};Gc.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var M0=function(){this.override_event="submit"};T.inherit(M0,Oo);M0.prototype.event_handler=function(e,t,r){r.element=t,e.preventDefault()};M0.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var sZ=CE("lock"),SM=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};SM.prototype.withLock=function(e,t,r){!r&&typeof t!="function"&&(r=t,t=null);var n=r||new Date().getTime()+"|"+Math.random(),a=new Date().getTime(),o=this.storageKey,i=this.pollIntervalMS,s=this.timeoutMS,l=this.storage,u=o+":X",f=o+":Y",c=o+":Z",d=function(b){t&&t(b)},h=function(b){if(new Date().getTime()-a>s){sZ.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+n+"]"),l.removeItem(c),l.removeItem(f),w();return}setTimeout(function(){try{b()}catch(_){d(_)}},i*(Math.random()+.1))},g=function(b,_){b()?_():h(function(){g(b,_)})},m=function(){var b=l.getItem(f);if(b&&b!==n)return!1;if(l.setItem(f,n),l.getItem(f)===n)return!0;if(!dm(l,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},w=function(){l.setItem(u,n),g(m,function(){if(l.getItem(u)===n){v();return}h(function(){if(l.getItem(f)!==n){w();return}g(function(){return!l.getItem(c)},v)})})},v=function(){l.setItem(c,"1");try{e()}finally{l.removeItem(c),l.getItem(f)===n&&l.removeItem(f),l.getItem(u)===n&&l.removeItem(u)}};try{if(dm(l,!0))w();else throw new Error("localStorage support check failed")}catch(b){d(b)}};var S4=CE("batch"),Zi=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||T.bind(S4.error,S4),this.lock=new SM(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};Zi.prototype.enqueue=function(e,t,r){var n={id:TE(),flushAfter:new Date().getTime()+t*2,payload:e};this.lock.withLock(T.bind(function(){var o;try{var i=this.readFromStorage();i.push(n),o=this.saveToStorage(i),o&&this.memQueue.push(n)}catch{this.reportError("Error enqueueing item",e),o=!1}r&&r(o)},this),T.bind(function(o){this.reportError("Error acquiring storage lock",o),r&&r(!1)},this),this.pid)};Zi.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.lengtho.flushAfter&&!n[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}}return t};var E4=function(e,t){var r=[];return T.each(e,function(n){n.id&&!t[n.id]&&r.push(n)}),r};Zi.prototype.removeItemsByID=function(e,t){var r={};T.each(e,function(a){r[a]=!0}),this.memQueue=E4(this.memQueue,r);var n=T.bind(function(){var a;try{var o=this.readFromStorage();if(o=E4(o,r),a=this.saveToStorage(o),a){o=this.readFromStorage();for(var i=0;i5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:u,batchSize:a.length,timesSent:this.itemIdsSentSuccessfully[d]}),c=!1):this.reportError("[dupe] found item with no ID",{item:u}),c&&o.push(f)}i[u.id]=f},this),o.length<1){this.resetFlush();return}this.requestInProgress=!0;var s=T.bind(function(u){this.requestInProgress=!1;try{var f=!1;if(e.unloading)this.queue.updatePayloads(i);else if(T.isObject(u)&&u.error==="timeout"&&new Date().getTime()-r>=t)this.reportError("Network timeout; retrying"),this.flush();else if(T.isObject(u)&&u.xhr_req&&(u.xhr_req.status>=500||u.xhr_req.status===429||u.error==="timeout")){var c=this.flushInterval*2,d=u.xhr_req.responseHeaders;if(d){var h=d["Retry-After"];h&&(c=parseInt(h,10)*1e3||c)}c=Math.min(lZ,c),this.reportError("Error; retry in "+c+" ms"),this.scheduleFlush(c)}else if(T.isObject(u)&&u.xhr_req&&u.xhr_req.status===413)if(a.length>1){var g=Math.max(1,Math.floor(n/2));this.batchSize=Math.min(this.batchSize,g,a.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",a),this.resetBatchSize(),f=!0;else f=!0;f&&(this.queue.removeItemsByID(T.map(a,function(m){return m.id}),T.bind(function(m){m?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())},this)),T.each(a,T.bind(function(m){var w=m.id;w?(this.itemIdsSentSuccessfully[w]=this.itemIdsSentSuccessfully[w]||0,this.itemIdsSentSuccessfully[w]++,this.itemIdsSentSuccessfully[w]>5&&this.reportError("[dupe] item ID sent too many times",{item:m,batchSize:a.length,timesSent:this.itemIdsSentSuccessfully[w]})):this.reportError("[dupe] found item with no ID while removing",{item:m})},this)))}catch(m){this.reportError("Error handling API response",m),this.resetFlush()}},this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(l.transport="sendBeacon"),rf.log("MIXPANEL REQUEST:",o),this.sendRequest(o,l,s)}catch(u){this.reportError("Error flushing request queue",u),this.resetFlush()}};ka.prototype.reportError=function(e,t){if(rf.error.apply(rf.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(r){rf.error(r)}};var cZ="__mp_opt_in_out_";function uZ(e,t){TM(!0,e,t)}function dZ(e,t){TM(!1,e,t)}function fZ(e,t){return CM(e,t)==="1"}function EM(e,t){if(pZ(t))return Ge.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r=CM(e,t)==="0";return r&&Ge.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function bu(e){return OE(e,function(t){return this.get_config(t)})}function Qi(e){return OE(e,function(t){return this._get_config(t)})}function wu(e){return OE(e,function(t){return this._get_config(t)})}function hZ(e,t){t=t||{},AE(t).remove(RE(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function AE(e){return e=e||{},e.persistenceType==="localStorage"?T.localStorage:T.cookie}function RE(e,t){return t=t||{},(t.persistencePrefix||cZ)+e}function CM(e,t){return AE(t).get(RE(e,t))}function pZ(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||dt,r=t.navigator||{},n=!1;return T.each([r.doNotTrack,r.msDoNotTrack,t.doNotTrack],function(a){T.includes([!0,1,"1","yes"],a)&&(n=!0)}),n}function TM(e,t,r){if(!T.isString(t)||!t.length){Ge.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}r=r||{},AE(r).set(RE(t,r),e?1:0,T.isNumber(r.cookieExpiration)?r.cookieExpiration:null,!!r.crossSubdomainCookie,!!r.secureCookie,!!r.crossSiteCookie,r.cookieDomain),r.track&&e&&r.track(r.trackEventName||"$opt_in",r.trackProperties,{send_immediately:!0})}function OE(e,t){return function(){var r=!1;try{var n=t.call(this,"token"),a=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),i=t.call(this,"opt_out_tracking_cookie_prefix"),s=t.call(this,"window");n&&(r=EM(n,{ignoreDnt:a,persistenceType:o,persistencePrefix:i,window:s}))}catch(u){Ge.error("Unexpected error when checking tracking opt-out status: "+u)}if(!r)return e.apply(this,arguments);var l=arguments[arguments.length-1];typeof l=="function"&&l(0)}}var Di="$set",Kc="$set_once",Xn="$unset",rl="$add",wo="$append",nl="$union",ji="$remove",gZ="$delete",AM={set_action:function(e,t){var r={},n={};return T.isObject(e)?T.each(e,function(a,o){this._is_reserved_property(o)||(n[o]=a)},this):n[e]=t,r[Di]=n,r},unset_action:function(e){var t={},r=[];return T.isArray(e)||(e=[e]),T.each(e,function(n){this._is_reserved_property(n)||r.push(n)},this),t[Xn]=r,t},set_once_action:function(e,t){var r={},n={};return T.isObject(e)?T.each(e,function(a,o){this._is_reserved_property(o)||(n[o]=a)},this):n[e]=t,r[Kc]=n,r},union_action:function(e,t){var r={},n={};return T.isObject(e)?T.each(e,function(a,o){this._is_reserved_property(o)||(n[o]=T.isArray(a)?a:[a])},this):n[e]=T.isArray(t)?t:[t],r[nl]=n,r},append_action:function(e,t){var r={},n={};return T.isObject(e)?T.each(e,function(a,o){this._is_reserved_property(o)||(n[o]=a)},this):n[e]=t,r[wo]=n,r},remove_action:function(e,t){var r={},n={};return T.isObject(e)?T.each(e,function(a,o){this._is_reserved_property(o)||(n[o]=a)},this):n[e]=t,r[ji]=n,r},delete_action:function(){var e={};return e[gZ]="",e}},nt=function(){};T.extend(nt.prototype,AM);nt.prototype._init=function(e,t,r){this._mixpanel=e,this._group_key=t,this._group_id=r};nt.prototype.set=wu(function(e,t,r){var n=this.set_action(e,t);return T.isObject(e)&&(r=t),this._send_request(n,r)});nt.prototype.set_once=wu(function(e,t,r){var n=this.set_once_action(e,t);return T.isObject(e)&&(r=t),this._send_request(n,r)});nt.prototype.unset=wu(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)});nt.prototype.union=wu(function(e,t,r){T.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)});nt.prototype.delete=wu(function(e){var t=this.delete_action();return this._send_request(t,e)});nt.prototype.remove=wu(function(e,t,r){var n=this.remove_action(e,t);return this._send_request(n,r)});nt.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var r=T.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:r,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},t)};nt.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"};nt.prototype._get_config=function(e){return this._mixpanel.get_config(e)};nt.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};nt.prototype.remove=nt.prototype.remove;nt.prototype.set=nt.prototype.set;nt.prototype.set_once=nt.prototype.set_once;nt.prototype.union=nt.prototype.union;nt.prototype.unset=nt.prototype.unset;nt.prototype.toString=nt.prototype.toString;var pe=function(){};T.extend(pe.prototype,AM);pe.prototype._init=function(e){this._mixpanel=e};pe.prototype.set=Qi(function(e,t,r){var n=this.set_action(e,t);return T.isObject(e)&&(r=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),n[Di]=T.extend({},T.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),n[Di]),this._send_request(n,r)});pe.prototype.set_once=Qi(function(e,t,r){var n=this.set_once_action(e,t);return T.isObject(e)&&(r=t),this._send_request(n,r)});pe.prototype.unset=Qi(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)});pe.prototype.increment=Qi(function(e,t,r){var n={},a={};return T.isObject(e)?(T.each(e,function(o,i){if(!this._is_reserved_property(i))if(isNaN(parseFloat(o))){Ge.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else a[i]=o},this),r=t):(T.isUndefined(t)&&(t=1),a[e]=t),n[rl]=a,this._send_request(n,r)});pe.prototype.append=Qi(function(e,t,r){T.isObject(e)&&(r=t);var n=this.append_action(e,t);return this._send_request(n,r)});pe.prototype.remove=Qi(function(e,t,r){T.isObject(e)&&(r=t);var n=this.remove_action(e,t);return this._send_request(n,r)});pe.prototype.union=Qi(function(e,t,r){T.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)});pe.prototype.track_charge=Qi(function(e,t,r){if(!T.isNumber(e)&&(e=parseFloat(e),isNaN(e))){Ge.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",T.extend({$amount:e},t),r)});pe.prototype.clear_charges=function(e){return this.set("$transactions",[],e)};pe.prototype.delete_user=function(){if(!this._identify_called()){Ge.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)};pe.prototype.toString=function(){return this._mixpanel.toString()+".people"};pe.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var r=this._mixpanel.get_property("$device_id"),n=this._mixpanel.get_property("$user_id"),a=this._mixpanel.get_property("$had_persisted_distinct_id");r&&(e.$device_id=r),n&&(e.$user_id=n),a&&(e.$had_persisted_distinct_id=a);var o=T.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),T.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),T.truncate(o,255))};pe.prototype._get_config=function(e){return this._mixpanel.get_config(e)};pe.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};pe.prototype._enqueue=function(e){Di in e?this._mixpanel.persistence._add_to_people_queue(Di,e):Kc in e?this._mixpanel.persistence._add_to_people_queue(Kc,e):Xn in e?this._mixpanel.persistence._add_to_people_queue(Xn,e):rl in e?this._mixpanel.persistence._add_to_people_queue(rl,e):wo in e?this._mixpanel.persistence._add_to_people_queue(wo,e):ji in e?this._mixpanel.persistence._add_to_people_queue(ji,e):nl in e?this._mixpanel.persistence._add_to_people_queue(nl,e):Ge.error("Invalid call to _enqueue():",e)};pe.prototype._flush_one_queue=function(e,t,r,n){var a=this,o=T.extend({},this._mixpanel.persistence._get_queue(e)),i=o;!T.isUndefined(o)&&T.isObject(o)&&!T.isEmptyObject(o)&&(a._mixpanel.persistence._pop_from_people_queue(e,o),n&&(i=n(o)),t.call(a,i,function(s,l){s===0&&a._mixpanel.persistence._add_to_people_queue(e,o),T.isUndefined(r)||r(s,l)}))};pe.prototype._flush=function(e,t,r,n,a,o,i){var s=this,l=this._mixpanel.persistence._get_queue(wo),u=this._mixpanel.persistence._get_queue(ji);if(this._flush_one_queue(Di,this.set,e),this._flush_one_queue(Kc,this.set_once,n),this._flush_one_queue(Xn,this.unset,o,function(w){return T.keys(w)}),this._flush_one_queue(rl,this.increment,t),this._flush_one_queue(nl,this.union,a),!T.isUndefined(l)&&T.isArray(l)&&l.length){for(var f,c=function(w,v){w===0&&s._mixpanel.persistence._add_to_people_queue(wo,f),T.isUndefined(r)||r(w,v)},d=l.length-1;d>=0;d--)f=l.pop(),T.isEmptyObject(f)||s.append(f,c);s._mixpanel.persistence.save()}if(!T.isUndefined(u)&&T.isArray(u)&&u.length){for(var h,g=function(w,v){w===0&&s._mixpanel.persistence._add_to_people_queue(ji,h),T.isUndefined(i)||i(w,v)},m=u.length-1;m>=0;m--)h=u.pop(),T.isEmptyObject(h)||s.remove(h,g);s._mixpanel.persistence.save()}};pe.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"};pe.prototype.set=pe.prototype.set;pe.prototype.set_once=pe.prototype.set_once;pe.prototype.unset=pe.prototype.unset;pe.prototype.increment=pe.prototype.increment;pe.prototype.append=pe.prototype.append;pe.prototype.remove=pe.prototype.remove;pe.prototype.union=pe.prototype.union;pe.prototype.track_charge=pe.prototype.track_charge;pe.prototype.clear_charges=pe.prototype.clear_charges;pe.prototype.delete_user=pe.prototype.delete_user;pe.prototype.toString=pe.prototype.toString;var kE="__mps",PE="__mpso",IE="__mpus",NE="__mpa",LE="__mpap",ME="__mpr",DE="__mpu",RM="$people_distinct_id",pm="__alias",Vf="__timers",vZ=[kE,PE,IE,NE,LE,ME,DE,RM,pm,Vf],be=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;t!=="cookie"&&t!=="localStorage"&&(Ge.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),t==="localStorage"&&T.localStorage.is_supported()?this.storage=T.localStorage:this.storage=T.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};be.prototype.properties=function(){var e={};return T.each(this.props,function(t,r){T.include(vZ,r)||(e[r]=t)}),e};be.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=T.extend({},e))}};be.prototype.upgrade=function(e){var t=e.upgrade,r,n;t&&(r="mp_super_properties",typeof t=="string"&&(r=t),n=this.storage.parse(r),this.storage.remove(r),this.storage.remove(r,!0),n&&(this.props=T.extend(this.props,n.all,n.events))),!e.cookie_name&&e.name!=="mixpanel"&&(r="mp_"+e.token+"_"+e.name,n=this.storage.parse(r),n&&(this.storage.remove(r),this.storage.remove(r,!0),this.register_once(n))),this.storage===T.localStorage&&(n=T.cookie.parse(this.name),T.cookie.remove(this.name),T.cookie.remove(this.name,!0),n&&this.register_once(n))};be.prototype.save=function(){this.disabled||this.storage.set(this.name,T.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};be.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};be.prototype.clear=function(){this.remove(),this.props={}};be.prototype.register_once=function(e,t,r){return T.isObject(e)?(typeof t>"u"&&(t="None"),this.expire_days=typeof r>"u"?this.default_expiry:r,T.each(e,function(n,a){(!this.props.hasOwnProperty(a)||this.props[a]===t)&&(this.props[a]=n)},this),this.save(),!0):!1};be.prototype.register=function(e,t){return T.isObject(e)?(this.expire_days=typeof t>"u"?this.default_expiry:t,T.extend(this.props,e),this.save(),!0):!1};be.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())};be.prototype.update_search_keyword=function(e){this.register(T.info.searchInfo(e))};be.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:T.info.referringDomain(e)||"$direct"},"")};be.prototype.get_referrer_info=function(){return T.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};be.prototype.safe_merge=function(e){return T.each(this.props,function(t,r){r in e||(e[r]=t)}),e};be.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)};be.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()};be.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())};be.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())};be.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())};be.prototype.get_cross_subdomain=function(){return this.cross_subdomain};be.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())};be.prototype._add_to_people_queue=function(e,t){var r=this._get_queue_key(e),n=t[e],a=this._get_or_create_queue(Di),o=this._get_or_create_queue(Kc),i=this._get_or_create_queue(Xn),s=this._get_or_create_queue(rl),l=this._get_or_create_queue(nl),u=this._get_or_create_queue(ji,[]),f=this._get_or_create_queue(wo,[]);r===kE?(T.extend(a,n),this._pop_from_people_queue(rl,n),this._pop_from_people_queue(nl,n),this._pop_from_people_queue(Xn,n)):r===PE?(T.each(n,function(c,d){d in o||(o[d]=c)}),this._pop_from_people_queue(Xn,n)):r===IE?T.each(n,function(c){T.each([a,o,s,l],function(d){c in d&&delete d[c]}),T.each(f,function(d){c in d&&delete d[c]}),i[c]=!0}):r===NE?(T.each(n,function(c,d){d in a?a[d]+=c:(d in s||(s[d]=0),s[d]+=c)},this),this._pop_from_people_queue(Xn,n)):r===DE?(T.each(n,function(c,d){T.isArray(c)&&(d in l||(l[d]=[]),l[d]=l[d].concat(c))}),this._pop_from_people_queue(Xn,n)):r===ME?(u.push(n),this._pop_from_people_queue(wo,n)):r===LE&&(f.push(n),this._pop_from_people_queue(Xn,n)),Ge.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),Ge.log(t),this.save()};be.prototype._pop_from_people_queue=function(e,t){var r=this._get_queue(e);T.isUndefined(r)||(T.each(t,function(n,a){e===wo||e===ji?T.each(r,function(o){o[a]===n&&delete o[a]}):delete r[a]},this),this.save())};be.prototype._get_queue_key=function(e){if(e===Di)return kE;if(e===Kc)return PE;if(e===Xn)return IE;if(e===rl)return NE;if(e===wo)return LE;if(e===ji)return ME;if(e===nl)return DE;Ge.error("Invalid queue:",e)};be.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]};be.prototype._get_or_create_queue=function(e,t){var r=this._get_queue_key(e);return t=T.isUndefined(t)?{}:t,this.props[r]||(this.props[r]=t)};be.prototype.set_event_timer=function(e,t){var r=this.props[Vf]||{};r[e]=t,this.props[Vf]=r,this.save()};be.prototype.remove_event_timer=function(e){var t=this.props[Vf]||{},r=t[e];return T.isUndefined(r)||(delete this.props[Vf][e],this.save()),r};var jE,ar,OM=0,mZ=1,yZ=function(e){return e},Wf=function(){},Sn="mixpanel",kM="base64",bZ="json",FE="$device:",xc=dt.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,PM=!xc&&ga.indexOf("MSIE")===-1&&ga.indexOf("Mozilla")===-1,gm=null;li.sendBeacon&&(gm=function(){return li.sendBeacon.apply(li,arguments)});var T4={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",api_payload_format:kM,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Wf,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Wf,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},IM=!1,W=function(){},e2=function(e,t,r){var n,a=r===Sn?ar:ar[r];if(a&&jE===OM)n=a;else{if(a&&!T.isArray(a)){Ge.error("You have already initialized "+r);return}n=new W}if(n._cached_groups={},n._init(e,t,r),n.people=new pe,n.people._init(n),!n.get_config("skip_first_touch_marketing")){var o=T.info.campaignParams(null),i={},s=!1;T.each(o,function(l,u){i["initial_"+u]=l,l&&(s=!0)}),s&&n.people.set_once(i)}return io.DEBUG=io.DEBUG||n.get_config("debug"),!T.isUndefined(a)&&T.isArray(a)&&(n._execute_array.call(n.people,a.people),n._execute_array(a)),n};W.prototype.init=function(e,t,r){if(T.isUndefined(r)){this.report_error("You must name your new library: init(token, config, name)");return}if(r===Sn){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var n=e2(e,t,r);return ar[r]=n,n._loaded(),n};W.prototype._init=function(e,t,r){t=t||{},this.__loaded=!0,this.config={};var n={};if(!("api_payload_format"in t)){var a=t.api_host||T4.api_host;a.match(/\.mixpanel\.com/)&&(n.api_payload_format=bZ)}if(this.set_config(T.extend({},T4,n,t,{name:r,token:e,callback_fn:(r===Sn?r:Sn+"."+r)+"._jsc"})),this._jsc=Wf,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!T.localStorage.is_supported(!0)||!xc)this._batch_requests=!1,Ge.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support");else if(this.init_batchers(),gm&&dt.addEventListener){var o=T.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);dt.addEventListener("pagehide",function(s){s.persisted&&o()}),dt.addEventListener("visibilitychange",function(){qe.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new be(this.config),this.unpersisted_superprops={},this._gdpr_init();var i=T.UUID();this.get_distinct_id()||this.register_once({distinct_id:FE+i,$device_id:i},""),this.get_config("track_pageview")&&this.track_pageview()};W.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()};W.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(qe.referrer),this.get_config("store_google")&&this.register(T.info.campaignParams(),{persistent:!1}),this.get_config("save_referrer")&&this.persistence.update_referrer_info(qe.referrer)};W.prototype._dom_loaded=function(){T.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||T.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue};W.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!IM)return this.__dom_loaded_queue.push([e,t]),!1;var r=new e().init(this);return r.track.apply(r,t)};W.prototype._prepare_callback=function(e,t){if(T.isUndefined(e))return null;if(xc){var r=function(i){e(i,t)};return r}else{var n=this._jsc,a=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+a+"]";return n[a]=function(i){delete n[a],e(i,t)},o}};W.prototype._send_request=function(e,t,r,n){var a=!0;if(PM)return this.__request_queue.push(arguments),a;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},i=null;!n&&(T.isFunction(r)||typeof r=="string")&&(n=r,r=null),r=T.extend(o,r||{}),xc||(r.method="GET");var s=r.method==="POST",l=gm&&s&&r.transport.toLowerCase()==="sendbeacon",u=r.verbose;t.verbose&&(u=!0),this.get_config("test")&&(t.test=1),u&&(t.verbose=1),this.get_config("img")&&(t.img=1),xc||(n?t.callback=n:(u||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),s&&(i="data="+encodeURIComponent(t.data),delete t.data),e+="?"+T.HTTPBuildQuery(t);var f=this;if("img"in t){var c=qe.createElement("img");c.src=e,qe.body.appendChild(c)}else if(l){try{a=gm(e,i)}catch(v){f.report_error(v),a=!1}try{n&&n(a?1:0)}catch(v){f.report_error(v)}}else if(xc)try{var d=new XMLHttpRequest;d.open(r.method,e,!0);var h=this.get_config("xhr_headers");if(s&&(h["Content-Type"]="application/x-www-form-urlencoded"),T.each(h,function(v,b){d.setRequestHeader(b,v)}),r.timeout_ms&&typeof d.timeout<"u"){d.timeout=r.timeout_ms;var g=new Date().getTime()}d.withCredentials=!0,d.onreadystatechange=function(){if(d.readyState===4)if(d.status===200){if(n)if(u){var v;try{v=T.JSONDecode(d.responseText)}catch(_){if(f.report_error(_),r.ignore_json_errors)v=d.responseText;else return}n(v)}else n(Number(d.responseText))}else{var b;d.timeout&&!d.status&&new Date().getTime()-g>=d.timeout?b="timeout":b="Bad HTTP status: "+d.status+" "+d.statusText,f.report_error(b),n&&n(u?{status:0,error:b,xhr_req:d}:0)}},d.send(i)}catch(v){f.report_error(v),a=!1}else{var m=qe.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=e;var w=qe.getElementsByTagName("script")[0];w.parentNode.insertBefore(m,w)}return a};W.prototype._execute_array=function(e){var t,r=[],n=[],a=[];T.each(e,function(i){i&&(t=i[0],T.isArray(t)?a.push(i):typeof i=="function"?i.call(this):T.isArray(i)&&t==="alias"?r.push(i):T.isArray(i)&&t.indexOf("track")!==-1&&typeof this[t]=="function"?a.push(i):n.push(i))},this);var o=function(i,s){T.each(i,function(l){if(T.isArray(l[0])){var u=s;T.each(l,function(f){u=u[f[0]].apply(u,f.slice(1))})}else this[l[0]].apply(this,l.slice(1))},s)};o(r,this),o(n,this),o(a,this)};W.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};W.prototype.init_batchers=function(){var e=this.get_config("token");if(!this.are_batchers_initialized()){var t=T.bind(function(r){return new ka("__mpq_"+e+r.queue_suffix,{libConfig:this.config,sendRequestFunc:T.bind(function(n,a,o){this._send_request(this.get_config("api_host")+r.endpoint,this._encode_data_for_request(n),a,this._prepare_callback(o,n))},this),beforeSendHook:T.bind(function(n){return this._run_hook("before_send_"+r.type,n)},this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:T.bind(this.stop_batch_senders,this)})},this);this.request_batchers={events:t({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:t({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:t({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()};W.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,T.each(this.request_batchers,function(e){e.start()}))};W.prototype.stop_batch_senders=function(){this._batch_requests=!1,T.each(this.request_batchers,function(e){e.stop(),e.clear()})};W.prototype.push=function(e){this._execute_array([e])};W.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)};W.prototype._encode_data_for_request=function(e){var t=T.JSONEncode(e);return this.get_config("api_payload_format")===kM&&(t=T.base64Encode(t)),{data:t}};W.prototype._track_or_batch=function(e,t){var r=T.truncate(e.data,255),n=e.endpoint,a=e.batcher,o=e.should_send_immediately,i=e.send_request_options||{};t=t||Wf;var s=!0,l=T.bind(function(){return i.skip_hooks||(r=this._run_hook("before_send_"+e.type,r)),r?(Ge.log("MIXPANEL REQUEST:"),Ge.log(r),this._send_request(n,this._encode_data_for_request(r),i,this._prepare_callback(t,r))):null},this);return this._batch_requests&&!o?a.enqueue(r,function(u){u?t(1,r):l()}):s=l(),s&&r};W.prototype.track=bu(function(e,t,r,n){!n&&typeof r=="function"&&(n=r,r=null),r=r||{};var a=r.transport;a&&(r.transport=a);var o=r.send_immediately;if(typeof n!="function"&&(n=Wf),T.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){n(0);return}t=t||{},t.token=this.get_config("token");var i=this.persistence.remove_event_timer(e);if(!T.isUndefined(i)){var s=new Date().getTime()-i;t.$duration=parseFloat((s/1e3).toFixed(3))}this._set_default_superprops();var l=this.get_config("track_marketing")?T.info.marketingParams():{};t=T.extend({},T.info.properties(),l,this.persistence.properties(),this.unpersisted_superprops,t);var u=this.get_config("property_blacklist");T.isArray(u)?T.each(u,function(d){delete t[d]}):this.report_error("Invalid value for property_blacklist config: "+u);var f={event:e,properties:t},c=this._track_or_batch({type:"events",data:f,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:r},n);return c});W.prototype.set_group=bu(function(e,t,r){T.isArray(t)||(t=[t]);var n={};return n[e]=t,this.register(n),this.people.set(e,t,r)});W.prototype.add_group=bu(function(e,t,r){var n=this.get_property(e);if(n===void 0){var a={};a[e]=[t],this.register(a)}else n.indexOf(t)===-1&&(n.push(t),this.register(a));return this.people.union(e,t,r)});W.prototype.remove_group=bu(function(e,t,r){var n=this.get_property(e);if(n!==void 0){var a=n.indexOf(t);a>-1&&(n.splice(a,1),this.register({group_key:n})),n.length===0&&this.unregister(e)}return this.people.remove(e,t,r)});W.prototype.track_with_groups=bu(function(e,t,r,n){var a=T.extend({},t||{});return T.each(r,function(o,i){o!=null&&(a[i]=o)}),this.track(e,a,n)});W.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)};W.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]};W.prototype.get_group=function(e,t){var r=this._create_map_key(e,t),n=this._cached_groups[r];return(n===void 0||n._group_key!==e||n._group_id!==t)&&(n=new nt,n._init(this,e,t),this._cached_groups[r]=n),n};W.prototype.track_pageview=bu(function(e,t){typeof e!="object"&&(e={}),t=t||{};var r=t.event_name||"$mp_web_page_view",n=T.extend(T.info.mpPageViewProperties(),T.info.campaignParams(),T.info.clickParams()),a=T.extend({},n,e);return this.track(r,a)});W.prototype.track_links=function(){return this._track_dom.call(this,Gc,arguments)};W.prototype.track_forms=function(){return this._track_dom.call(this,M0,arguments)};W.prototype.time_event=function(e){if(T.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var wZ={persistent:!0},BE=function(e){var t;return T.isObject(e)?t=e:T.isUndefined(e)?t={}:t={days:e},T.extend({},wZ,t)};W.prototype.register=function(e,t){var r=BE(t);r.persistent?this.persistence.register(e,r.days):T.extend(this.unpersisted_superprops,e)};W.prototype.register_once=function(e,t,r){var n=BE(r);n.persistent?this.persistence.register_once(e,t,n.days):(typeof t>"u"&&(t="None"),T.each(e,function(a,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===t)&&(this.unpersisted_superprops[o]=a)},this))};W.prototype.unregister=function(e,t){t=BE(t),t.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]};W.prototype._register_single=function(e,t){var r={};r[e]=t,this.register(r)};W.prototype.identify=function(e,t,r,n,a,o,i,s){var l=this.get_distinct_id();if(e&&l!==e){if(typeof e=="string"&&e.indexOf(FE)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var u=l;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}e!==l&&e!==this.get_property(pm)&&(this.unregister(pm),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,r,n,a,o,i,s),e!==l&&this.track("$identify",{distinct_id:e,$anon_distinct_id:l},{skip_hooks:!0})};W.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=T.UUID();this.register_once({distinct_id:FE+e,$device_id:e},"")};W.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};W.prototype.alias=function(e,t){if(e===this.get_property(RM))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var r=this;return T.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(pm,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){r.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)};W.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)};W.prototype.set_config=function(e){if(T.isObject(e)){T.extend(this.config,e);var t=e.batch_size;t&&T.each(this.request_batchers,function(r){r.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),io.DEBUG=io.DEBUG||this.get_config("debug")}};W.prototype.get_config=function(e){return this.config[e]};W.prototype._run_hook=function(e){var t=(this.config.hooks[e]||yZ).apply(this,si.call(arguments,1));return typeof t>"u"&&(this.report_error(e+" hook did not return a value"),t=null),t};W.prototype.get_property=function(e){return this.persistence.props[e]};W.prototype.toString=function(){var e=this.get_config("name");return e!==Sn&&(e=Sn+"."+e),e};W.prototype._event_is_disabled=function(e){return T.isBlockedUA(ga)||this._flags.disable_all_events||T.include(this.__disabled_events,e)};W.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&T.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||T.cookie.get("mp_optout"))&&(T.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};W.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else if(e&&e.enable_persistence)t=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t&&T.each(this.request_batchers,function(r){r.clear()})};W.prototype._gdpr_call_func=function(e,t){return t=T.extend({track:T.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),T.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})};W.prototype.opt_in_tracking=function(e){e=T.extend({enable_persistence:!0},e),this._gdpr_call_func(uZ,e),this._gdpr_update_persistence(e)};W.prototype.opt_out_tracking=function(e){e=T.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(dZ,e),this._gdpr_update_persistence(e)};W.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(fZ,e)};W.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(EM,e)};W.prototype.clear_opt_in_out_tracking=function(e){e=T.extend({enable_persistence:!0},e),this._gdpr_call_func(hZ,e),this._gdpr_update_persistence(e)};W.prototype.report_error=function(e,t){Ge.error.apply(Ge.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(r){Ge.error(r)}};W.prototype.init=W.prototype.init;W.prototype.reset=W.prototype.reset;W.prototype.disable=W.prototype.disable;W.prototype.time_event=W.prototype.time_event;W.prototype.track=W.prototype.track;W.prototype.track_links=W.prototype.track_links;W.prototype.track_forms=W.prototype.track_forms;W.prototype.track_pageview=W.prototype.track_pageview;W.prototype.register=W.prototype.register;W.prototype.register_once=W.prototype.register_once;W.prototype.unregister=W.prototype.unregister;W.prototype.identify=W.prototype.identify;W.prototype.alias=W.prototype.alias;W.prototype.name_tag=W.prototype.name_tag;W.prototype.set_config=W.prototype.set_config;W.prototype.get_config=W.prototype.get_config;W.prototype.get_property=W.prototype.get_property;W.prototype.get_distinct_id=W.prototype.get_distinct_id;W.prototype.toString=W.prototype.toString;W.prototype.opt_out_tracking=W.prototype.opt_out_tracking;W.prototype.opt_in_tracking=W.prototype.opt_in_tracking;W.prototype.has_opted_out_tracking=W.prototype.has_opted_out_tracking;W.prototype.has_opted_in_tracking=W.prototype.has_opted_in_tracking;W.prototype.clear_opt_in_out_tracking=W.prototype.clear_opt_in_out_tracking;W.prototype.get_group=W.prototype.get_group;W.prototype.set_group=W.prototype.set_group;W.prototype.add_group=W.prototype.add_group;W.prototype.remove_group=W.prototype.remove_group;W.prototype.track_with_groups=W.prototype.track_with_groups;W.prototype.start_batch_senders=W.prototype.start_batch_senders;W.prototype.stop_batch_senders=W.prototype.stop_batch_senders;be.prototype.properties=be.prototype.properties;be.prototype.update_search_keyword=be.prototype.update_search_keyword;be.prototype.update_referrer_info=be.prototype.update_referrer_info;be.prototype.get_cross_subdomain=be.prototype.get_cross_subdomain;be.prototype.clear=be.prototype.clear;var nc={},_Z=function(){T.each(nc,function(e,t){t!==Sn&&(ar[t]=e)}),ar._=T},$Z=function(){ar.init=function(e,t,r){if(r)return ar[r]||(ar[r]=nc[r]=e2(e,t,r),ar[r]._loaded()),ar[r];var n=ar;nc[Sn]?n=nc[Sn]:e&&(n=e2(e,t,Sn),n._loaded(),nc[Sn]=n),ar=n,jE===mZ&&(dt[Sn]=ar),_Z()}},xZ=function(){function e(){e.done||(e.done=!0,IM=!0,PM=!1,T.each(nc,function(n){n._dom_loaded()}))}function t(){try{qe.documentElement.doScroll("left")}catch{setTimeout(t,1);return}e()}if(qe.addEventListener)qe.readyState==="complete"?e():qe.addEventListener("DOMContentLoaded",e,!1);else if(qe.attachEvent){qe.attachEvent("onreadystatechange",e);var r=!1;try{r=dt.frameElement===null}catch{}qe.documentElement.doScroll&&r&&t()}T.register_event(dt,"load",e,!0)};function SZ(){return jE=OM,ar=new W,$Z(),ar.init(),xZ(),ar}var EZ=SZ(),CZ=EZ;const Pa=lu(CZ);globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function A4(e){const t={action:e};Pa.track("star",t)}function NM(e,t){const r={type:e,location:t};Pa.track("openInfoPanel",r)}function LM(e){Pa.track("share",{type:e})}function TZ(e){const t={type:e};Pa.track("analysis",t)}function MM(e){const t={type:e};Pa.track("error-book",t)}function R4(e){const t={...e};Pa.track("donate-card",t)}function AZ(e){const t=oe(Nn),{name:r}=oe(wr),n=oe(Sh),a=oe(Hc),o=oe(xh),i=oe(Ro),s=oe(yu);return p.useCallback(u=>{const f={...u,order:e.chapterData.index+1,chapter:(t+1).toString(),wordlist:r,modeDictation:!e.isWordVisible,modeDark:n,modeShuffle:s.isOpen,enabledKeyboardSound:a.isOpen,enabledPhotonicsSymbol:o.isOpen,enabledSingleWordLoop:e.isLoopSingleWord,pronunciationAuto:i.isOpen,pronunciationOption:i.isOpen===!1?"none":i.type};Pa.track("Word",f)},[e,t,r,n,a.isOpen,o.isOpen,i.isOpen,i.type,s.isOpen])}function RZ(e){const t=oe(Nn),{name:r}=oe(wr),n=oe(Sh),a=oe(Hc),o=oe(xh),i=oe(Ro),s=oe(yu);return p.useCallback(()=>{const u={timeEnd:t2(),duration:e.timerData.time,countInput:e.chapterData.correctCount+e.chapterData.wrongCount,countTypo:e.chapterData.wrongCount,countCorrect:e.chapterData.correctCount,chapter:(t+1).toString(),wordlist:r,modeDictation:!e.isWordVisible,modeDark:n,modeShuffle:s.isOpen,enabledKeyboardSound:a.isOpen,enabledPhotonicsSymbol:o.isOpen,enabledSingleWordLoop:e.isLoopSingleWord,pronunciationAuto:i.isOpen,pronunciationOption:i.isOpen===!1?"none":i.type};Pa.track("Chapter",u)},[e,t,r,n,a.isOpen,o.isOpen,i.isOpen,i.type,s.isOpen])}function DM({type:e,size:t,wordCount:r,chapterCount:n}){const a={type:e,size:t,wordCount:r,chapterCount:n};Pa.track("dataAction",a)}function t2(){return new Date().toISOString().substring(0,19).replace("T"," ")}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const OZ=["Enter","Backspace","Delete","Tab","CapsLock","Shift","Control","Alt","Meta","Escape","Fn","FnLock","Hyper","Super","OS","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","AudioVolumeUp","AudioVolumeDown","AudioVolumeMute","End","PageDown","PageUp","Clear","Home"],jM=e=>!OZ.includes(e),kZ=e=>/[\u3002|\uff1f|\uff01|\uff0c|\u3001|\uff1b|\uff1a|\u201c|\u201d|\u2018|\u2019|\uff08|\uff09|\u300a|\u300b|\u3008|\u3009|\u3010|\u3011|\u300e|\u300f|\u300c|\u300d|\ufe43|\ufe44|\u3014|\u3015|\u2026|\u2014|\uff5e|\ufe4f|\uffe5]/.test(e),PZ=()=>{const e=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"];let r=!0;for(let n=0;n0){r=!1;break}return r},FM=navigator.userAgent.indexOf("Macintosh")!==-1,Us=FM?"Control":"Ctrl";function qp(e,...t){return e.on(...t),()=>e.off(...t)}function IZ(...e){const t=[];for(const r of e)r&&t.push(r.trim());return t.join(" ")}function NZ(){const e=new Date,t=e.getFullYear(),r=("0"+(e.getMonth()+1)).slice(-2),n=("0"+e.getDate()).slice(-2);return`${t}${r}${n}`}function LZ(e){return Math.ceil(e/C$)}function wje(e,t){const r=new Set(t);return e.filter(n=>r.has(n))}function MZ(e,t){return Number((e??0).toFixed(t))}function UE(){const e=new Date;return Math.floor(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())/1e3)}function _je(e){const t=new Date(e*1e3),r=t.toLocaleDateString("zh-CN",{month:"2-digit",day:"2-digit"}),n=t.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r} ${n}`}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const DZ=[{id:"cet4",name:"CET-4",description:"大学英语四级词库",category:"中国考试",tags:["大学英语"],url:"/dicts/CET4_T.json",length:2607,language:"en",languageCategory:"en"},{id:"cet6",name:"CET-6",description:"大学英语六级词库",category:"中国考试",tags:["大学英语"],url:"/dicts/CET6_T.json",length:2345,language:"en",languageCategory:"en"},{id:"xinghuoqiaoji_4",name:"四级巧记速记",description:"四级巧记速记",category:"中国考试",tags:["大学英语"],url:"/dicts/xinghuoqiaoji_4.json",length:2522,language:"en",languageCategory:"en"},{id:"xinghuoqiaoji_6",name:"六级巧记速记",description:"六级巧记速记",category:"中国考试",tags:["大学英语"],url:"/dicts/xinghuoqiaoji_6.json",length:7520,language:"en",languageCategory:"en"},{id:"cet4-sub",name:"CET-4-Sub",description:"单词的减法-四级",category:"中国考试",tags:["大学英语"],url:"/dicts/DanCiDeJianFa_4.json",length:1957,language:"en",languageCategory:"en"},{id:"cet6-sub",name:"CET-6-Sub",description:"单词的减法-六级",category:"中国考试",tags:["大学英语"],url:"/dicts/DanCiDeJianFa_6.json",length:1949,language:"en",languageCategory:"en"},{id:"kaoyan",name:"考研",description:"研究生英语入学考试词库",category:"中国考试",tags:["考研"],url:"/dicts/KaoYan_3_T.json",length:3728,language:"en",languageCategory:"en"},{id:"kaoyan_2024",name:"考研 2024",description:"研究生英语入学考试词库 2024",category:"中国考试",tags:["考研"],url:"/dicts/KaoYan_2024.json",length:3731,language:"en",languageCategory:"en"},{id:"kaoyanshanguo_2023",name:"考研闪过 2023",description:"高中低频词2023",category:"中国考试",tags:["考研"],url:"/dicts/KaoYanShanGuo_2023.json",length:1771,language:"en",languageCategory:"en"},{id:"dancimimi_1",name:"单词的秘密-英语一",description:"单词的秘密英语(一)",category:"中国考试",tags:["考研"],url:"/dicts/DanCiDeMimi_1.json",length:5657,language:"en",languageCategory:"en"},{id:"dancimimi_2",name:"单词的秘密-英语二",description:"单词的秘密英语(二)",category:"中国考试",tags:["考研"],url:"/dicts/DanCiDeMimi_2.json",length:3827,language:"en",languageCategory:"en"},{id:"2024HongBao T1",name:"2024考研英语hongbaoshu(上)",description:"2024考研英语hongbaoshu必考词(上)",category:"中国考试",tags:["考研"],url:"/dicts/2024HongBao_T1.json",length:997,language:"en",languageCategory:"en"},{id:"2024HongBao T2",name:"2024考研英语hongbaoshu(下)",description:"2024考研英语hongbaoshu必考词(下)",category:"中国考试",tags:["考研"],url:"/dicts/2024HongBao_T2.json",length:854,language:"en",languageCategory:"en"},{id:"English_II",name:"英语二单词书",description:"考研英语二单词书",category:"中国考试",tags:["考研"],url:"/dicts/English_II.json",length:4559,language:"en",languageCategory:"en"},{id:"level4",name:"专四",description:"英语专业四级词库",category:"中国考试",tags:["大学英语"],url:"/dicts/Level4luan_2_T.json",length:4025,language:"en",languageCategory:"en"},{id:"level8",name:"专八",description:"英语专业八级词库",category:"中国考试",tags:["大学英语"],url:"/dicts/Level8luan_2_T.json",length:12197,language:"en",languageCategory:"en"},{id:"archVocabulary",name:"建筑专业英语",description:"大学建筑专业英语词汇",category:"中国考试",tags:["专业英语"],url:"/dicts/archVocabulary.json",length:630,language:"en",languageCategory:"en"},{id:"itVocabulary",name:"计算机专用英语",description:"大学计算机专业英语词汇",category:"中国考试",tags:["专业英语"],url:"/dicts/itVocabulary.json",length:1665,language:"en",languageCategory:"en"},{id:"pets3",name:"PETS",description:"全国英语等级考试常考词汇",category:"中国考试",tags:["PET"],url:"/dicts/PETS_3.json",length:1942,language:"en",languageCategory:"en"},{id:"pets3-2023",name:"PETS-2023",description:"全国英语等级考试常考词汇",category:"中国考试",tags:["PET"],url:"/dicts/PETS3-2023.json",length:4449,language:"en",languageCategory:"en"},{id:"self-study_English1",name:"自考1800高频单词",description:"自考1800高频单词",category:"中国考试",tags:["自考英语二"],url:"/dicts/self-study_English1.json",length:1800,language:"en",languageCategory:"en"},{id:"self-study_English2",name:"自考英语二高频悠悠单词",description:"自考英语二高频悠悠单词",category:"中国考试",tags:["自考英语二"],url:"/dicts/self-study_English2.json",length:2181,language:"en",languageCategory:"en"},{id:"self-study_English3",name:"自考英语二完整单词",description:"00015自考英语二完整单词书",category:"中国考试",tags:["自考英语二"],url:"/dicts/self-study_English3.json",length:4603,language:"en",languageCategory:"en"},{id:"coca_20000",name:"COCA20000词",description:"COCA20000词",category:"中国考试",tags:["其他"],url:"/dicts/coca20000.json",length:20199,language:"en",languageCategory:"en"},{id:"4000_Essential_English_Words1",name:"Essential Words",description:"4000 Essential English Words meaning",category:"中国考试",tags:["其他"],url:"/dicts/4000_Essential_English_Words-meaning.json",length:3600,language:"en",languageCategory:"en"},{id:"4000_Essential_English_Words2",name:"Essential Words",description:"4000 Essential English Words sentence",category:"中国考试",tags:["其他"],url:"/dicts/4000_Essential_English_Words-sentence.json",length:3600,language:"en",languageCategory:"en"},{id:"longman_communication_3000_words",name:"Longman Communication 3000",description:"Most frequent words in both spoken and written English",category:"中国考试",tags:["其他"],url:"/dicts/Longman_Communication_3000.json",length:3168,language:"en",languageCategory:"en"},{id:"top_2000_English_Words",name:"Top 2000 words",description:"with highest frequency",category:"中国考试",tags:["其他"],url:"/dicts/top2000words.json",length:1867,language:"en",languageCategory:"en"},{id:"top_1500_nouns_Words",name:"Top 1500 Nouns",description:"with highest frequency",category:"中国考试",tags:["其他"],url:"/dicts/Top1500NounWords.json",length:1525,language:"en",languageCategory:"en"},{id:"top_1000_verb_Words",name:"Top 1000 Verbs",description:"with highest frequency",category:"中国考试",tags:["其他"],url:"/dicts/Top1000VerbWords.json",length:1011,language:"en",languageCategory:"en"},{id:"top_500_Adj_Words",name:"Top 500 adj.",description:"with highest frequency",category:"中国考试",tags:["其他"],url:"/dicts/Top500AdjectiveWords.json",length:527,language:"en",languageCategory:"en"},{id:"top_250_Adv_Words",name:"Top 250 adv.",description:"with highest frequency",category:"中国考试",tags:["其他"],url:"/dicts/Top250AdverbWords.json",length:255,language:"en",languageCategory:"en"},{id:"top_60_Pronouns",name:"Top 60 pron.",description:"with highest frequency",category:"中国考试",tags:["其他"],url:"/dicts/Top60Pronouns.json",length:59,language:"en",languageCategory:"en"},{id:"top_50_Prepositions",name:"Top 50 prep.",description:"with highest frequency",category:"中国考试",tags:["其他"],url:"/dicts/Top50Prepositions.json",length:46,language:"en",languageCategory:"en"},{id:"suffix word",name:"suffix word",description:"common suffix",category:"中国考试",tags:["其他"],url:"/dicts/suffix_word.json",length:126,language:"en",languageCategory:"en"},{id:"word roots1",name:"word roots1",description:"common roots",category:"中国考试",tags:["其他"],url:"/dicts/word_roots1.json",length:369,language:"en",languageCategory:"en"},{id:"adult self-study examination",name:"专升本词汇",description:"专升本词汇",category:"中国考试",tags:["其他"],url:"/dicts/adult-self-study-examination.json",length:3692,language:"en",languageCategory:"en"},{id:"zhuan-cha-ben-ying-yu",name:"专插本英语词汇",description:"专插本英语词汇",category:"中国考试",tags:["其他"],url:"/dicts/zhuan-cha-ben.json",length:3217,language:"en",languageCategory:"en"},{id:"zhuan-sheng-ben-xue-shi",name:"专升本学士学位的英语",description:"专升本学士学位的英语",category:"中国考试",tags:["其他"],url:"/dicts/xueshiyingyu.json",length:897,language:"en",languageCategory:"en"},{id:"Oxford5000",name:"牛津5000词",description:"牛津5000词",category:"中国考试",tags:["其他"],url:"/dicts/Oxford5000.json",length:5836,language:"en",languageCategory:"en"},{id:"Merriam_Webster_sVocabularyBuilder",name:"韦氏词根词典",description:"韦氏词根词典",category:"中国考试",tags:["其他"],url:"/dicts/Merriam_Webster_sVocabularyBuilder.json",length:1191,language:"en",languageCategory:"en"},{id:"tingshuokaoshi",name:"听说考试常见词汇",description:"听说考试16个场景常见词汇量",category:"中国考试",tags:["其他"],url:"/dicts/tingshuokaoshi.json",length:557,language:"en",languageCategory:"en"},{id:"TOEFL_ZhangHongYan",name:"ZhangHongYan的TOEFL词汇书",description:"ZhangHongYan的TOEFL词汇书-词以类记",category:"国际考试",tags:["TOEFL"],url:"/dicts/TOEFL_ZhangHongYan.json",length:4032,language:"en",languageCategory:"en"}],jZ=[{id:"gmat",name:"GMAT",description:"GMAT 词库",category:"国际考试",tags:["GMAT"],url:"/dicts/GMAT_3_T.json",length:3047,language:"en",languageCategory:"en"},{id:"gre",name:"GRE",description:"GRE 词库",category:"国际考试",tags:["GRE"],url:"/dicts/GRE_3_T.json",length:6515,language:"en",languageCategory:"en"},{id:"gre1500",name:"GRE重点1500词-fen哥",description:"GRE & TEM8 重叠高频词汇",category:"国际考试",tags:["GRE"],url:"/dicts/GRE_1500.json",length:1533,language:"en",languageCategory:"en"},{id:"gre3000",name:"GRE3000",description:"GRE3000 词库",category:"国际考试",tags:["GRE"],url:"/dicts/GRE3000_3_T.json",length:3041,language:"en",languageCategory:"en"},{id:"GRE-computer-based-test",name:"GRE机经词汇",description:"GRE机经词汇",category:"国际考试",tags:["GRE"],url:"/dicts/GRE-computer-based-test.json",length:1451,language:"en",languageCategory:"en"},{id:"ZaiYaoNiMing_GRE3000",name:"再要你命GRE3000",description:"再要你命GRE3000词库-有词性新版",category:"国际考试",tags:["GRE"],url:"/dicts/ZaiYaoNiMing_GRE3000.json",length:3041,language:"en",languageCategory:"en"},{id:"GRE_equivalent",name:"GRE等价词",description:"GRE等价词",category:"国际考试",tags:["GRE"],url:"/dicts/GRE_equivalent.json",length:827,language:"en",languageCategory:"en"},{id:"GRE_ciyileiji",name:"GRE词以类记",description:"GRE词以类记",category:"国际考试",tags:["GRE"],url:"/dicts/gre-ciyileiji.json",length:8785,language:"en",languageCategory:"en"},{id:"IELTS_tinglichangjing",name:"雅思听力场景词汇",description:"雅思听力场景词汇",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS_tinglichangjing.json",length:1204,language:"en",languageCategory:"en"},{id:"ielts_disorder",name:"IELTS乱序完整版",description:"IELTS乱序完整版",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS_disorder.json",length:9389,language:"en",languageCategory:"en"},{id:"ielts_order",name:"IELTS顺序完整版",description:"IELTS顺序完整版",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS_order.json",length:9389,language:"en",languageCategory:"en"},{id:"ielts",name:"IELTS",description:"雅思词库",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS_3_T.json",length:3575,language:"en",languageCategory:"en"},{id:"heqiong",name:"heQiong雅思听力必考词汇",description:"综合测试",category:"国际考试",tags:["IELTS"],url:"/dicts/HeQiong_IELTS.json",length:2529,language:"en",languageCategory:"en"},{id:"ieltsWang3",name:"雅思wang C3",description:"雅思听力特别名词语料库",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS_WANG_3.json",length:1135,language:"en",languageCategory:"en"},{id:"ieltsWang4",name:"雅思wang C4",description:"雅思听力形容词副词语料库",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS_WANG_4.json",length:346,language:"en",languageCategory:"en"},{id:"ieltsWang5",name:"雅思wang C5",description:"吞音连读混合训练语料库",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS_WANG_5.json",length:1569,language:"en",languageCategory:"en"},{id:"ieltsWang11",name:"雅思wang C11",description:"综合测试",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS_WANG_11.json",length:1738,language:"en",languageCategory:"en"},{id:"DuckCircle_IELTS",name:"鸭圈雅思核心词",description:"鸭圈雅思核心词",category:"国际考试",tags:["IELTS"],url:"/dicts/DuckCircle_IELTS.json",length:2644,language:"en",languageCategory:"en"},{id:"IELTSVocabularyBible",name:"雅思词汇真经",description:"雅思词汇真经",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTSVocabularyBible.json",length:3673,language:"en",languageCategory:"en"},{id:"IELTS-807",name:"雅思 wanglu 807",description:"雅思 wanglu 807",category:"国际考试",tags:["IELTS"],url:"/dicts/ielts-807.json",length:4340,language:"en",languageCategory:"en"},{id:"ielts-real-high",name:"雅思 real 词汇 高频",description:"雅思 real 词汇(高频词汇)",category:"国际考试",tags:["IELTS"],url:"/dicts/ielts-real-high.json",length:524,language:"en",languageCategory:"en"},{id:"ielts-real-5",name:"雅思 real 词汇 5",description:"雅思 real 词汇 (5频词汇及变频)",category:"国际考试",tags:["IELTS"],url:"/dicts/ielts-real-5.json",length:183,language:"en",languageCategory:"en"},{id:"ielts-real-4",name:"雅思 real 词汇 4",description:"雅思 real 词汇 (4频词汇及变频)",category:"国际考试",tags:["IELTS"],url:"/dicts/ielts-real-4.json",length:201,language:"en",languageCategory:"en"},{id:"ielts-real-3",name:"雅思 real 词汇 3",description:"雅思 real 词汇 (3频词汇及变频)",category:"国际考试",tags:["IELTS"],url:"/dicts/ielts-real-3.json",length:256,language:"en",languageCategory:"en"},{id:"ielts-real-2",name:"雅思 real 词汇 2",description:"雅思 real 词汇 (2频词汇及变频)",category:"国际考试",tags:["IELTS"],url:"/dicts/ielts-real-2.json",length:402,language:"en",languageCategory:"en"},{id:"ielts-real-1",name:"雅思 real 词汇 1",description:"雅思 real 词汇 (1频词汇及变频)",category:"国际考试",tags:["IELTS"],url:"/dicts/ielts-real-1.json",length:737,language:"en",languageCategory:"en"},{id:"IELTS9988wangyong",name:"雅思9988wangyong",description:"雅思9988wangyong",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS9988wangyong.json",length:3663,language:"en",languageCategory:"en"},{id:"IELTSLiuHongbo538",name:"雅思阅读 liuhongbo 538考点词",description:"雅思阅读 liuhongbo 538考点词",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTSLiuHongbo538.json",length:376,language:"en",languageCategory:"en"},{id:"IELTSKingLu807",name:"wanglu807雅思词汇听力第2版",description:"wanglu807雅思词汇听力第2版",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTSKingLu807.json",length:1916,language:"en",languageCategory:"en"},{id:"IELTSXDF7000",name:"100个句子记完7000个雅思单词",description:"新东方 100个句子记完7000个雅思单词 词汇表",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS_XDF_7000.json",length:5567,language:"en",languageCategory:"en"},{id:"IELTS-oral-900",name:"雅思口语 900 beta版",description:"雅思口语 900 句, 需在 qwerty 设置中调小英语字体",category:"国际考试",tags:["IELTS"],url:"/dicts/IELTS-oral-900.json",length:900,language:"en",languageCategory:"en"},{id:"ket",name:"KET",description:"KET 2021单词",category:"国际考试",tags:["KET"],url:"./dicts/ket2021.json",length:1147,language:"en",languageCategory:"en"},{id:"sat",name:"SAT",description:"美国 SAT 考试词库",category:"国际考试",tags:["SAT"],url:"/dicts/SAT_3_T.json",length:4464,language:"en",languageCategory:"en"},{id:"SATen",name:"SAT en-en",description:"SAT英英",category:"国际考试",tags:["SAT"],url:"/dicts/SATen.json",length:2681,language:"en",languageCategory:"en"},{id:"toefl",name:"TOEFL",description:"托福考试常见词",category:"国际考试",tags:["TOEFL"],url:"/dicts/TOEFL_3_T.json",length:4264,language:"en",languageCategory:"en"},{id:"bec2",name:"商务英语",description:"商务英语常见词",category:"国际考试",tags:["BEC"],url:"/dicts/BEC_2_T.json",length:2753,language:"en",languageCategory:"en"},{id:"bec3",name:"BEC",description:"BEC考试常见词",category:"国际考试",tags:["BEC"],url:"/dicts/BEC_3_T.json",length:2825,language:"en",languageCategory:"en"},{id:"PTE_junior",name:"PTE 基础词汇",description:"",category:"国际考试",tags:["PTE"],url:"/dicts/PTE_junior.json",length:2651,language:"en",languageCategory:"en"},{id:"PTE_senior",name:"PTE 高阶词汇",description:"",category:"国际考试",tags:["PTE"],url:"/dicts/PTE_senior.json",length:3170,language:"en",languageCategory:"en"},{id:"PTE_FIB_R_junior",name:"阅读 FIB 基础机经词汇",description:"",category:"国际考试",tags:["PTE"],url:"/dicts/PTE_FIB_R_junior.json",length:941,language:"en",languageCategory:"en"},{id:"PTE_FIB_R_senior",name:"阅读 FIB 高阶机经词汇",description:"",category:"国际考试",tags:["PTE"],url:"/dicts/PTE_FIB_R_senior.json",length:1272,language:"en",languageCategory:"en"},{id:"PTE_WFD",name:"WFD 机经词汇",description:"",category:"国际考试",tags:["PTE"],url:"/dicts/PTE_WFD.json",length:1212,language:"en",languageCategory:"en"},{id:"PTE_FIB_L",name:"听力 FIB 机经词汇",description:"",category:"国际考试",tags:["PTE"],url:"/dicts/PTE_FIB_L.json",length:646,language:"en",languageCategory:"en"},{id:"PTE_Basic_apeuni",name:"PTE 基础词汇 xingji",description:"",category:"国际考试",tags:["PTE"],url:"/dicts/PTE_Basic_apeuni.json",length:2652,language:"en",languageCategory:"en"},{id:"PTE_Advanced_apeuni.json",name:"PTE 高阶词汇 xingji",description:"",category:"国际考试",tags:["PTE"],url:"/dicts/PTE_Advanced_apeuni.json",length:3169,language:"en",languageCategory:"en"},{id:"PTE_Read_apeuni.json",name:"PTE 阅读FIB机经词汇 xingji",description:"",category:"国际考试",tags:["PTE"],url:"/dicts/PTE_Read_apeuni.json",length:630,language:"en",languageCategory:"en"},{id:"PTE_Listening_apeuni.json",name:"PTE 听力FIB机经词汇 xingji",description:"",category:"国际考试",tags:["PTE"],url:"/dicts/PTE_Listening_apeuni.json",length:674,language:"en",languageCategory:"en"},{id:"TOEIC",name:"TOEIC 词汇",description:"",category:"国际考试",tags:["TOEIC"],url:"/dicts/TOEIC.json",length:1694,language:"en",languageCategory:"en"},{id:"Duolingo_Vocabulary_B1",name:"多邻国分级词汇B1",description:"多邻国分级词汇B1",category:"国际考试",tags:["CEFR"],url:"/dicts/Duolingo_Vocabulary_B1.json",length:801,language:"en",languageCategory:"en"},{id:"Duolingo_Vocabulary_B2",name:"多邻国分级词汇B2",description:"多邻国分级词汇B2",category:"国际考试",tags:["CEFR"],url:"/dicts/Duolingo_Vocabulary_B2.json",length:1423,language:"en",languageCategory:"en"},{id:"Duolingo_Vocabulary_C1",name:"多邻国分级词汇C1",description:"多邻国分级词汇C1",category:"国际考试",tags:["CEFR"],url:"/dicts/Duolingo_Vocabulary_C1.json",length:1314,language:"en",languageCategory:"en"},{id:"Oxford3000",name:"牛津3000词",description:"牛津3000词",category:"国际考试",tags:["牛津版"],url:"/dicts/Oxford3000.json",length:1342,language:"en",languageCategory:"en"},{id:"Oxford5000",name:"牛津5000词",description:"牛津5000词",category:"国际考试",tags:["牛津版"],url:"/dicts/Oxford5000.json",length:5836,language:"en",languageCategory:"en"},{id:"voa",name:"VOA 基础词库",description:"VOA 基础词库",category:"国际考试",tags:["其他"],url:"/dicts/voa.json",length:1505,language:"en",languageCategory:"en"}],FZ=[{id:"gaokao3500",name:"高考 3500 词",description:"高考常见词 3500",category:"青少年英语",tags:["通用"],url:"/dicts/GaoKao_3500.json",length:3893,language:"en",languageCategory:"en"},{id:"gaokaozhentihexin",name:"高考历年真题核心高频",description:"高考历年真题核心高频",category:"青少年英语",tags:["通用"],url:"/dicts/GaoKaoZhenTiHeXinGaoPin.json",length:799,language:"en",languageCategory:"en"},{id:"gaokao-yuedu-gaopin",name:"高考英语阅读高频词汇",description:"高考英语阅读高频词汇",category:"青少年英语",tags:["通用"],url:"/dicts/gaokao-yuedu-gaopin.json",length:688,language:"en",languageCategory:"en"},{id:"zhongkaohexin",name:"中考核心词",description:"中考核心词",category:"青少年英语",tags:["通用"],url:"/dicts/ZhongKaoHeXin.json",length:2140,language:"en",languageCategory:"en"},{id:"nce1",name:"新概念英语-1",description:"新概念英语第一册",category:"青少年英语",tags:["新概念英语"],url:"/dicts/NCE_1.json",length:900,language:"en",languageCategory:"en"},{id:"nce2",name:"新概念英语-2",description:"新概念英语第二册",category:"青少年英语",tags:["新概念英语"],url:"/dicts/NCE_2.json",length:858,language:"en",languageCategory:"en"},{id:"nce3",name:"新概念英语-3",description:"新概念英语第三册",category:"青少年英语",tags:["新概念英语"],url:"/dicts/NCE_3.json",length:1052,language:"en",languageCategory:"en"},{id:"nce4",name:"新概念英语-4",description:"新概念英语第四册",category:"青少年英语",tags:["新概念英语"],url:"/dicts/NCE_4.json",length:784,language:"en",languageCategory:"en"},{id:"nce-new-1",name:"新概念英语(新版)-1",description:"新概念英语新版第一册",category:"青少年英语",tags:["新概念英语"],url:"/dicts/nce-new-1.json",length:908,language:"en",languageCategory:"en"},{id:"nce-new-2",name:"新概念英语(新版)-2",description:"新概念英语新版第二册",category:"青少年英语",tags:["新概念英语"],url:"/dicts/nce-new-2.json",length:862,language:"en",languageCategory:"en"},{id:"nce-new-3",name:"新概念英语(新版)-3",description:"新概念英语新版第三册",category:"青少年英语",tags:["新概念英语"],url:"/dicts/nce-new-3.json",length:1062,language:"en",languageCategory:"en"},{id:"nce-new-4",name:"新概念英语(新版)-4",description:"新概念英语新版第四册",category:"青少年英语",tags:["新概念英语"],url:"/dicts/nce-new-4.json",length:793,language:"en",languageCategory:"en"},{id:"SHjuniormiddleOxford",name:"上海初中牛津词汇",description:"上海初中牛津词汇",category:"青少年英语",tags:["牛津版"],url:"/dicts/OxfordVocabulary_juniorMiddleSH.json",length:1270,language:"en",languageCategory:"en"},{id:"san1",name:"三年级上",description:"人教版三年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPXiaoXue3_1_T.json",length:64,language:"en",languageCategory:"en"},{id:"san2",name:"三年级下",description:"人教版三年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPXiaoXue3_2_T.json",length:72,language:"en",languageCategory:"en"},{id:"si1",name:"四年级上",description:"人教版四年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPXiaoXue4_1_T.json",length:84,language:"en",languageCategory:"en"},{id:"si2",name:"四年级下",description:"人教版四年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPXiaoXue4_2_T.json",length:104,language:"en",languageCategory:"en"},{id:"wu1",name:"五年级上",description:"人教版五年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPXiaoXue5_1_T.json",length:131,language:"en",languageCategory:"en"},{id:"wu2",name:"五年级下",description:"人教版五年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPXiaoXue5_2_T.json",length:156,language:"en",languageCategory:"en"},{id:"liu1",name:"六年级上",description:"人教版六年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPXiaoXue6_1_T.json",length:130,language:"en",languageCategory:"en"},{id:"liu2",name:"六年级下",description:"人教版六年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPXiaoXue6_2_T.json",length:108,language:"en",languageCategory:"en"},{id:"pep-sl-yi1",name:"人教版(新起点)一年级上",description:"人教版一年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue1_1_t.json",length:52,language:"en",languageCategory:"en"},{id:"pep-sl-yi2",name:"人教版(新起点)一年级下",description:"人教版一年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue1_2_t.json",length:45,language:"en",languageCategory:"en"},{id:"pep-sl-er1",name:"人教版(新起点)二年级上",description:"人教版二年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue2_1_t.json",length:54,language:"en",languageCategory:"en"},{id:"pep-sl-er2",name:"人教版(新起点)二年级下",description:"人教版二年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue2_2_t.json",length:55,language:"en",languageCategory:"en"},{id:"pep-sl-san1",name:"人教版(新起点)三年级上",description:"人教版三年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue3_1_t.json",length:103,language:"en",languageCategory:"en"},{id:"pep-sl-san2",name:"人教版(新起点)三年级下",description:"人教版三年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue3_2_t.json",length:84,language:"en",languageCategory:"en"},{id:"pep-sl-si1",name:"人教版(新起点)四年级上",description:"人教版四年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue4_1_t.json",length:116,language:"en",languageCategory:"en"},{id:"pep-sl-si2",name:"人教版(新起点)四年级下",description:"人教版四年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue4_2_t.json",length:87,language:"en",languageCategory:"en"},{id:"pep-sl-wu1",name:"人教版(新起点)五年级上",description:"人教版五年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue5_1_t.json",length:66,language:"en",languageCategory:"en"},{id:"pep-sl-wu2",name:"人教版(新起点)五年级下",description:"人教版五年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue5_2_t.json",length:96,language:"en",languageCategory:"en"},{id:"pep-sl-liu1",name:"人教版(新起点)六年级上",description:"人教版六年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue6_1_t.json",length:102,language:"en",languageCategory:"en"},{id:"pep-sl-liu2",name:"人教版(新起点)六年级下",description:"人教版六年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEP_SL_XiaoXue6_2_t.json",length:41,language:"en",languageCategory:"en"},{id:"qi1",name:"七年级上",description:"人教版七年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPChuZhong7_1_T.json",length:392,language:"en",languageCategory:"en"},{id:"qi2",name:"七年级下",description:"人教版七年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPChuZhong7_2_T.json",length:492,language:"en",languageCategory:"en"},{id:"ba1",name:"八年级上",description:"人教版八年级上册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPChuZhong8_1_T.json",length:419,language:"en",languageCategory:"en"},{id:"ba2",name:"八年级下",description:"人教版八年级下册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPChuZhong8_2_T.json",length:466,language:"en",languageCategory:"en"},{id:"jiu",name:"九年级",description:"人教版九年级全册",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPChuZhong9_1_T.json",length:551,language:"en",languageCategory:"en"},{id:"renjiaogaozhong1",name:"高中必修1",description:"人教版高中必修1",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_1_T.json",length:311,language:"en",languageCategory:"en"},{id:"renjiaogaozhong2",name:"高中必修2",description:"人教版高中必修2",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_2_T.json",length:319,language:"en",languageCategory:"en"},{id:"renjiaogaozhong3",name:"高中必修3",description:"人教版高中必修3",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_3_T.json",length:366,language:"en",languageCategory:"en"},{id:"renjiaogaozhong4",name:"高中必修4",description:"人教版高中必修4",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_4_T.json",length:307,language:"en",languageCategory:"en"},{id:"renjiaogaozhong5",name:"高中必修5",description:"人教版高中必修5",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_5_T.json",length:357,language:"en",languageCategory:"en"},{id:"renjiaogaozhong6",name:"高中选修6",description:"人教版高中选修6",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_6_T.json",length:391,language:"en",languageCategory:"en"},{id:"renjiaogaozhong7",name:"高中选修7",description:"人教版高中选修7",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_7_T.json",length:384,language:"en",languageCategory:"en"},{id:"renjiaogaozhong8",name:"高中选修8",description:"人教版高中选修8",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_8_T.json",length:420,language:"en",languageCategory:"en"},{id:"renjiaogaozhong9",name:"高中选修9",description:"人教版高中选修9",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_9_T.json",length:352,language:"en",languageCategory:"en"},{id:"renjiaogaozhong10",name:"高中选修10",description:"人教版高中选修10",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_10_T.json",length:361,language:"en",languageCategory:"en"},{id:"renjiaogaozhong11",name:"高中选修11",description:"人教版高中选修11",category:"青少年英语",tags:["人教版"],url:"/dicts/PEPGaoZhong_11_T.json",length:309,language:"en",languageCategory:"en"},{id:"waiyan1",name:"外研七年级上册",description:"外研版七年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_1_T.json",length:629,language:"en",languageCategory:"en"},{id:"waiyan2",name:"外研七年级下册",description:"外研版七年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_2_T.json",length:438,language:"en",languageCategory:"en"},{id:"waiyan3",name:"外研八年级上册",description:"外研版八年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_3_T.json",length:320,language:"en",languageCategory:"en"},{id:"waiyan4",name:"外研八年级下册",description:"外研版八年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_4_T.json",length:266,language:"en",languageCategory:"en"},{id:"waiyan5",name:"外研九年级上册",description:"外研版九年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_5_T.json",length:381,language:"en",languageCategory:"en"},{id:"waiyan6",name:"外研九年级下册",description:"外研版九年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_6_T.json",length:128,language:"en",languageCategory:"en"},{id:"waiyan7",name:"外研高中必修1",description:"外研高中必修1",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheGaoZhong_1_T.json",length:411,language:"en",languageCategory:"en"},{id:"waiyan8",name:"外研高中必修2",description:"外研高中必修2",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheGaoZhong_2_T.json",length:272,language:"en",languageCategory:"en"},{id:"waiyan9",name:"外研一年级上册",description:"外研一年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_1-Volume-up.json",length:138,language:"en",languageCategory:"en"},{id:"waiyan10",name:"外研一年级下册",description:"外研一年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_1-Volume-down.json",length:118,language:"en",languageCategory:"en"},{id:"waiyan11",name:"外研二年级上册",description:"外研二年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_2-Volume-top.json",length:118,language:"en",languageCategory:"en"},{id:"waiyan12",name:"外研二年级下册",description:"外研二年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_2-Volume-down.json",length:110,language:"en",languageCategory:"en"},{id:"waiyan13",name:"外研三年级上册",description:"外研三年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_3-Volume-top.json",length:82,language:"en",languageCategory:"en"},{id:"waiyan14",name:"外研三年级下册",description:"外研三年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_3-Volume-down.json",length:106,language:"en",languageCategory:"en"},{id:"waiyan15",name:"外研四年级上册",description:"外研四年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_4-Volume-top.json",length:116,language:"en",languageCategory:"en"},{id:"waiyan16",name:"外研四年级下册",description:"外研四年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_4-Volume-down.json",length:78,language:"en",languageCategory:"en"},{id:"waiyan17",name:"外研五年级上册",description:"外研五年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_5-Volume-top.json",length:80,language:"en",languageCategory:"en"},{id:"waiyan18",name:"外研五年级下册",description:"外研五年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_5-Volume-down.json",length:72,language:"en",languageCategory:"en"},{id:"waiyan19",name:"外研六年级上册",description:"外研六年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_6-Volume-top.json",length:61,language:"en",languageCategory:"en"},{id:"waiyan20",name:"外研六年级下册",description:"外研六年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/WaiYanSheChuZhong_6-Volume-down.json",length:91,language:"en",languageCategory:"en"},{id:"waiyan3-1",name:"外研新起点三年级上册",description:"外研新起点三年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/waiyan-xin-3-1.json",length:134,language:"en",languageCategory:"en"},{id:"waiyan3-2",name:"外研新起点三年级下册",description:"外研新起点三年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/waiyan-xin-3-2.json",length:156,language:"en",languageCategory:"en"},{id:"waiyan4-1",name:"外研新起点四年级上册",description:"外研新起点四年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/waiyan-xin-4-1.json",length:144,language:"en",languageCategory:"en"},{id:"waiyan4-2",name:"外研新起点四年级下册",description:"外研新起点四年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/waiyan-xin-4-2.json",length:134,language:"en",languageCategory:"en"},{id:"waiyan5-1",name:"外研新起点五年级上册",description:"外研新起点五年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/waiyan-xin-5-1.json",length:152,language:"en",languageCategory:"en"},{id:"waiyan5-2",name:"外研新起点五年级下册",description:"外研新起点五年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/waiyan-xin-5-2.json",length:147,language:"en",languageCategory:"en"},{id:"waiyan6-1",name:"外研新起点六年级上册",description:"外研新起点六年级上册",category:"青少年英语",tags:["外研版"],url:"/dicts/waiyan-xin-6-1.json",length:83,language:"en",languageCategory:"en"},{id:"waiyan6-2",name:"外研新起点六年级下册",description:"外研新起点六年级下册",category:"青少年英语",tags:["外研版"],url:"/dicts/waiyan-xin-6-2.json",length:105,language:"en",languageCategory:"en"},{id:"Yilin1",name:"高中必修1",description:"译林版高中必修1",category:"青少年英语",tags:["译林版"],url:"./dicts/YiLin_1.json",length:276,language:"en",languageCategory:"en"},{id:"Yilin2",name:"高中必修2",description:"译林版高中必修2",category:"青少年英语",tags:["译林版"],url:"./dicts/YiLin_2.json",length:297,language:"en",languageCategory:"en"},{id:"Yilin3",name:"高中必修3",description:"译林版高中必修3",category:"青少年英语",tags:["译林版"],url:"./dicts/YiLin_3.json",length:295,language:"en",languageCategory:"en"},{id:"beishi1",name:"高中必修1",description:"北师大版高中必修1",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_1_T.json",length:226,language:"en",languageCategory:"en"},{id:"beishi2",name:"高中必修2",description:"北师大版高中必修2",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_2_T.json",length:244,language:"en",languageCategory:"en"},{id:"beishi3",name:"高中必修3",description:"北师大版高中必修3",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_3_T.json",length:295,language:"en",languageCategory:"en"},{id:"beishi4",name:"高中必修4",description:"北师大版高中必修4",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_4_T.json",length:336,language:"en",languageCategory:"en"},{id:"beishi5",name:"高中必修5",description:"北师大版高中必修5",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_5_T.json",length:327,language:"en",languageCategory:"en"},{id:"beishi6",name:"高中选修6",description:"北师大版高中选修6",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_6_T.json",length:271,language:"en",languageCategory:"en"},{id:"beishi7",name:"高中选修7",description:"北师大版高中选修7",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_7_T.json",length:334,language:"en",languageCategory:"en"},{id:"beishi8",name:"高中选修8",description:"北师大版高中选修8",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_8_T.json",length:364,language:"en",languageCategory:"en"},{id:"beishi9",name:"高中选修9",description:"北师大版高中选修9",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_9_T.json",length:299,language:"en",languageCategory:"en"},{id:"beishi10",name:"高中选修10",description:"北师大版高中选修10",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_10_T.json",length:267,language:"en",languageCategory:"en"},{id:"beishi11",name:"高中选修11",description:"北师大版高中选修11",category:"青少年英语",tags:["北师大"],url:"/dicts/BeiShiGaoZhong_11_T.json",length:330,language:"en",languageCategory:"en"},{id:"jijiao1",name:"冀教 3 上",description:"冀教版三年级起点三年级上",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao3-1.json",length:75,language:"en",languageCategory:"en"},{id:"jijiao2",name:"冀教 3 下",description:"冀教版三年级起点三年级下",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao3-2.json",length:76,language:"en",languageCategory:"en"},{id:"jijiao3",name:"冀教 4 上",description:"冀教版三年级起点四年级上",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao4-1.json",length:78,language:"en",languageCategory:"en"},{id:"jijiao4",name:"冀教 4 下",description:"冀教版三年级起点四年级下",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao4-2.json",length:84,language:"en",languageCategory:"en"},{id:"jijiao5",name:"冀教 5 上",description:"冀教版三年级起点五年级上",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao5-1.json",length:79,language:"en",languageCategory:"en"},{id:"jijiao6",name:"冀教 5 下",description:"冀教版三年级起点五年级下",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao5-2.json",length:96,language:"en",languageCategory:"en"},{id:"jijiao7",name:"冀教 6 上",description:"冀教版三年级起点六年级上",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao6-1.json",length:66,language:"en",languageCategory:"en"},{id:"jijiao8",name:"冀教 6 下",description:"冀教版三年级起点六年级下",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao6-2.json",length:51,language:"en",languageCategory:"en"},{id:"jijiao9",name:"冀教 7 上",description:"冀教版三年级起点七年级上",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao7-1.json",length:561,language:"en",languageCategory:"en"},{id:"jijiao10",name:"冀教 7 下",description:"冀教版三年级起点七年级下",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao7-2.json",length:514,language:"en",languageCategory:"en"},{id:"jijiao11",name:"冀教 8 上",description:"冀教版三年级起点八年级上",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao8-1.json",length:420,language:"en",languageCategory:"en"},{id:"jijiao12",name:"冀教 8 下",description:"冀教版三年级起点八年级下",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao8-2.json",length:487,language:"en",languageCategory:"en"},{id:"jijiao13",name:"冀教 9 上",description:"冀教版三年级起点九年级全册",category:"青少年英语",tags:["冀教版"],url:"/dicts/jiJiao9.json",length:636,language:"en",languageCategory:"en"},{id:"BJJuniorHigh",name:"北京初中",description:"北京初中",category:"青少年英语",tags:["其他"],url:"/dicts/beijing_junior_high_school.json",length:1844,language:"en",languageCategory:"en"},{id:"eflevel1",name:"EF-LEVEL-1",description:"EF等级1",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_1.json",length:297,language:"en",languageCategory:"en"},{id:"eflevel2",name:"EF-LEVEL-2",description:"EF等级2",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_2.json",length:353,language:"en",languageCategory:"en"},{id:"eflevel3",name:"EF-LEVEL-3",description:"EF等级3",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_3.json",length:172,language:"en",languageCategory:"en"},{id:"eflevel4",name:"EF-LEVEL-4",description:"EF等级4",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_4.json",length:178,language:"en",languageCategory:"en"},{id:"eflevel5",name:"EF-LEVEL-5",description:"EF等级5",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_5.json",length:172,language:"en",languageCategory:"en"},{id:"eflevel6",name:"EF-LEVEL-6",description:"EF等级6",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_6.json",length:172,language:"en",languageCategory:"en"},{id:"eflevel7",name:"EF-LEVEL-7",description:"EF等级7",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_7.json",length:171,language:"en",languageCategory:"en"},{id:"eflevel8",name:"EF-LEVEL-8",description:"EF等级8",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_8.json",length:172,language:"en",languageCategory:"en"},{id:"eflevel9",name:"EF-LEVEL-9",description:"EF等级9",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_9.json",length:165,language:"en",languageCategory:"en"},{id:"eflevel10",name:"EF-LEVEL-10",description:"EF等级10",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_10.json",length:174,language:"en",languageCategory:"en"},{id:"eflevel11",name:"EF-LEVEL-11",description:"EF等级11",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_11.json",length:176,language:"en",languageCategory:"en"},{id:"eflevel12",name:"EF-LEVEL-12",description:"EF等级12",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_12.json",length:170,language:"en",languageCategory:"en"},{id:"eflevel13",name:"EF-LEVEL-13",description:"EF等级13",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_13.json",length:172,language:"en",languageCategory:"en"},{id:"eflevel14",name:"EF-LEVEL-14",description:"EF等级14",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_14.json",length:171,language:"en",languageCategory:"en"},{id:"eflevel15",name:"EF-LEVEL-15",description:"EF等级15",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_15.json",length:168,language:"en",languageCategory:"en"},{id:"eflevel16",name:"EF-LEVEL-16",description:"EF等级16",category:"青少年英语",tags:["EF"],url:"/dicts/EF_LEVEL_16.json",length:170,language:"en",languageCategory:"en"},{id:"ReadingExplorer3",name:"Reading Explorer 3",description:"词汇表来自Reading Explorer 3, Third Edition",category:"青少年英语",tags:["其他"],url:"/dicts/ReadingExplorer3.json",length:239,language:"en",languageCategory:"en"},{id:"Macmillan7000",name:"麦克米伦7000",description:"麦克米伦7000",category:"中国考试",tags:["其他"],url:"/dicts/Macmillan7000.json",length:6268,language:"en",languageCategory:"en"},{id:"raz-AA",name:"RAZ 分级阅读 AA",description:"RAZ 分级阅读 AA",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-AA.json",length:422,language:"en",languageCategory:"en"},{id:"raz-A",name:"RAZ 分级阅读 A",description:"RAZ 分级阅读 A",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-A.json",length:487,language:"en",languageCategory:"en"},{id:"raz-B",name:"RAZ 分级阅读 B",description:"RAZ 分级阅读 B",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-B.json",length:465,language:"en",languageCategory:"en"},{id:"raz-C",name:"RAZ 分级阅读 C",description:"RAZ 分级阅读 C",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-C.json",length:480,language:"en",languageCategory:"en"},{id:"raz-D",name:"RAZ 分级阅读 D",description:"RAZ 分级阅读 D",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-D.json",length:436,language:"en",languageCategory:"en"},{id:"raz-E",name:"RAZ 分级阅读 E",description:"RAZ 分级阅读 E",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-E.json",length:427,language:"en",languageCategory:"en"},{id:"raz-F",name:"RAZ 分级阅读 F",description:"RAZ 分级阅读 F",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-F.json",length:437,language:"en",languageCategory:"en"},{id:"raz-G",name:"RAZ 分级阅读 G",description:"RAZ 分级阅读 G",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-G.json",length:435,language:"en",languageCategory:"en"},{id:"raz-H",name:"RAZ 分级阅读 H",description:"RAZ 分级阅读 H",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-H.json",length:385,language:"en",languageCategory:"en"},{id:"raz-I",name:"RAZ 分级阅读 I",description:"RAZ 分级阅读 I",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-I.json",length:408,language:"en",languageCategory:"en"},{id:"raz-J",name:"RAZ 分级阅读 J",description:"RAZ 分级阅读 J",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-J.json",length:434,language:"en",languageCategory:"en"},{id:"raz-K",name:"RAZ 分级阅读 K",description:"RAZ 分级阅读 K",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-K.json",length:397,language:"en",languageCategory:"en"},{id:"raz-L",name:"RAZ 分级阅读 L",description:"RAZ 分级阅读 L",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-L.json",length:402,language:"en",languageCategory:"en"},{id:"raz-M",name:"RAZ 分级阅读 M",description:"RAZ 分级阅读 M",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-M.json",length:403,language:"en",languageCategory:"en"},{id:"raz-N",name:"RAZ 分级阅读 N",description:"RAZ 分级阅读 N",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-N.json",length:376,language:"en",languageCategory:"en"},{id:"raz-O",name:"RAZ 分级阅读 O",description:"RAZ 分级阅读 O",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-O.json",length:429,language:"en",languageCategory:"en"},{id:"raz-P",name:"RAZ 分级阅读 P",description:"RAZ 分级阅读 P",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-P.json",length:379,language:"en",languageCategory:"en"},{id:"raz-Q",name:"RAZ 分级阅读 Q",description:"RAZ 分级阅读 Q",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-Q.json",length:442,language:"en",languageCategory:"en"},{id:"raz-R",name:"RAZ 分级阅读 R",description:"RAZ 分级阅读 R",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-R.json",length:422,language:"en",languageCategory:"en"},{id:"raz-S",name:"RAZ 分级阅读 S",description:"RAZ 分级阅读 S",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-S.json",length:434,language:"en",languageCategory:"en"},{id:"raz-T",name:"RAZ 分级阅读 T",description:"RAZ 分级阅读 T",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-T.json",length:427,language:"en",languageCategory:"en"},{id:"raz-U",name:"RAZ 分级阅读 U",description:"RAZ 分级阅读 U",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-U.json",length:418,language:"en",languageCategory:"en"},{id:"raz-V",name:"RAZ 分级阅读 V",description:"RAZ 分级阅读 V",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-V.json",length:409,language:"en",languageCategory:"en"},{id:"raz-W",name:"RAZ 分级阅读 W",description:"RAZ 分级阅读 W",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-W.json",length:392,language:"en",languageCategory:"en"},{id:"raz-X",name:"RAZ 分级阅读 X",description:"RAZ 分级阅读 X",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-X.json",length:546,language:"en",languageCategory:"en"},{id:"raz-Y",name:"RAZ 分级阅读 Y",description:"RAZ 分级阅读 Y",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-Y.json",length:461,language:"en",languageCategory:"en"},{id:"raz-Z",name:"RAZ 分级阅读 Z",description:"RAZ 分级阅读 Z",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-Z.json",length:414,language:"en",languageCategory:"en"},{id:"raz-Z1",name:"RAZ 分级阅读 Z1",description:"RAZ 分级阅读 Z1",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-Z1.json",length:467,language:"en",languageCategory:"en"},{id:"raz-Z2",name:"RAZ 分级阅读 Z2",description:"RAZ 分级阅读 Z2",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-Z2.json",length:492,language:"en",languageCategory:"en"},{id:"raz-all",name:"RAZ 分级阅读 所有词汇",description:"RAZ 分级阅读 所有词汇",category:"青少年英语",tags:["RAZ"],url:"/dicts/raz-all.json",length:5831,language:"en",languageCategory:"en"}],BZ=[{id:"coder",name:"Coder Dict",description:"程序员常见单词词库",category:"代码练习",tags:["通用"],url:"/dicts/it-words.json",length:1700,language:"code",languageCategory:"code"},{id:"childCode",name:"少儿 Python",description:"少儿 Python 常见词",category:"代码练习",tags:["少儿编程","Python"],url:"/dicts/Child_python_code.json",length:19,language:"en",languageCategory:"code"},{id:"childCode002",name:"少儿 Python Turtle",description:"少儿 Python Turtle 常见词",category:"代码练习",tags:["少儿编程","Python"],url:"/dicts/Child_python_turtle_code.json",length:27,language:"en",languageCategory:"code"},{id:"childCode003",name:"少儿 C++",description:"少儿 C++ 常见词",category:"代码练习",tags:["少儿编程","C++"],url:"/dicts/Child_cpp.json",length:39,language:"en",languageCategory:"code"},{id:"childCode004",name:"Arduino",description:"Arduino常见词",category:"代码练习",tags:["少儿编程","Arduino"],url:"/dicts/arduino_keywords.json",length:78,language:"en",languageCategory:"code"},{id:"jsArray",name:"JS: Array",description:"JavaScript API 词典",category:"代码练习",tags:["JavaScript"],url:"/dicts/js-array.json",length:36,language:"code",languageCategory:"code"},{id:"jsDate",name:"JS: Date",description:"JavaScript API 词典",category:"代码练习",tags:["JavaScript"],url:"/dicts/js-date.json",length:34,language:"code",languageCategory:"code"},{id:"jsGlobal",name:"JS: Global",description:"JavaScript API 词典",category:"代码练习",tags:["JavaScript"],url:"/dicts/js-global.json",length:9,language:"code",languageCategory:"code"},{id:"jsMapSet",name:"JS: Map & Set",description:"JavaScript API 词典",category:"代码练习",tags:["JavaScript"],url:"/dicts/js-map-set.json",length:16,language:"code",languageCategory:"code"},{id:"jsMath",name:"JS: Math",description:"JavaScript API 词典",category:"代码练习",tags:["JavaScript"],url:"/dicts/js-math.json",length:38,language:"code",languageCategory:"code"},{id:"jsNumber",name:"JS: Number",description:"JavaScript API 词典",category:"代码练习",tags:["JavaScript"],url:"/dicts/js-number.json",length:22,language:"code",languageCategory:"code"},{id:"jsObject",name:"JS: Object",description:"JavaScript API 词典",category:"代码练习",tags:["JavaScript"],url:"/dicts/js-object.json",length:37,language:"code",languageCategory:"code"},{id:"jsPromise",name:"JS: Promise",description:"JavaScript API 词典",category:"代码练习",tags:["JavaScript"],url:"/dicts/js-promise.json",length:9,language:"code",languageCategory:"code"},{id:"jsString",name:"JS: String",description:"JavaScript API 词典",category:"代码练习",tags:["JavaScript"],url:"/dicts/js-string.json",length:32,language:"code",languageCategory:"code"},{id:"python-builtin",name:"Python: Built-in",description:"Python Built-in API",category:"代码练习",tags:["Python"],url:"/dicts/python-builtin.json",length:65,language:"code",languageCategory:"code"},{id:"python-array",name:"Python: array",description:"Python array API ",category:"代码练习",tags:["Python"],url:"/dicts/python-array.json",length:11,language:"code",languageCategory:"code"},{id:"python-date",name:"Python: date",description:"Python date API ",category:"代码练习",tags:["Python"],url:"/dicts/python-date.json",length:39,language:"code",languageCategory:"code"},{id:"python-file",name:"Python: file",description:"Python file API ",category:"代码练习",tags:["Python"],url:"/dicts/python-file.json",length:21,language:"code",languageCategory:"code"},{id:"python-class",name:"Python: class",description:"Python class API ",category:"代码练习",tags:["Python"],url:"/dicts/python-class.json",length:13,language:"code",languageCategory:"code"},{id:"python-set",name:"Python: set",description:"Python set API ",category:"代码练习",tags:["Python"],url:"/dicts/python-set.json",length:29,language:"code",languageCategory:"code"},{id:"python-math",name:"Python: math",description:"Python math API ",category:"代码练习",tags:["Python"],url:"/dicts/python-math.json",length:37,language:"code",languageCategory:"code"},{id:"python-string",name:"Python: string",description:"Python string API ",category:"代码练习",tags:["Python"],url:"/dicts/python-string.json",length:40,language:"code",languageCategory:"code"},{id:"python-system",name:"Python: system",description:"Python system API ",category:"代码练习",tags:["Python"],url:"/dicts/python-sys.json",length:24,language:"code",languageCategory:"code"},{id:"javeArrayList",name:"Java: ArrayList",description:"JavaScript API 词典",category:"代码练习",tags:["Java"],url:"/dicts/java-arraylist.json",length:25,language:"code",languageCategory:"code"},{id:"javaCharacter",name:"Java: Character",description:"JavaScript API 词典",category:"代码练习",tags:["Java"],url:"/dicts/java-character.json",length:8,language:"code",languageCategory:"code"},{id:"javaHashmap",name:"Java: Hashmap",description:"JavaScript API 词典",category:"代码练习",tags:["Java"],url:"/dicts/java-hashmap.json",length:22,language:"code",languageCategory:"code"},{id:"javaLinkedList",name:"Java: LinkedList",description:"JavaScript API 词典",category:"代码练习",tags:["Java"],url:"/dicts/java-linkedlist.json",length:25,language:"code",languageCategory:"code"},{id:"javaString",name:"Java: String",description:"JavaScript API 词典",category:"代码练习",tags:["Java"],url:"/dicts/java-string.json",length:48,language:"code",languageCategory:"code"},{id:"javaStringBuffer",name:"Java: StringBuffer",description:"JavaScript API 词典",category:"代码练习",tags:["Java"],url:"/dicts/java-stringBuffer.json",length:20,language:"code",languageCategory:"code"},{id:"linuxCommand",name:"Linux",description:"Linux Command",category:"代码练习",tags:["Linux"],url:"/dicts/linux-command.json",length:575,language:"code",languageCategory:"code"},{id:"csharpKeywords",name:"C#关键字",description:"C#关键字以及用途",category:"代码练习",tags:["C#"],url:"/dicts/csharp-keywords.json",length:78,language:"code",languageCategory:"code"},{id:"csharpString",name:"C#: String API",description:"C# String API",category:"代码练习",tags:["C#"],url:"/dicts/csharp-string.json",length:79,language:"code",languageCategory:"code"},{id:"csharpList",name:"C#: List API",description:"C# List API",category:"代码练习",tags:["C#"],url:"/dicts/csharp-list.json",length:36,language:"code",languageCategory:"code"},{id:"sql-lower-case",name:"SQL: 常用语句 lower case",description:"SQL 常用语句 小写",category:"代码练习",tags:["SQL"],url:"/dicts/SQL_statement_lower-case.json",length:12,language:"code",languageCategory:"code"},{id:"sql-upper-case",name:"SQL: 常用语句 upper case",description:"SQL 常用语句 大写",category:"代码练习",tags:["SQL"],url:"/dicts/SQL_statement_upper-case.json",length:12,language:"code",languageCategory:"code"},{id:"ai-machine-learning",name:"人工智能: 机器学习",description:"AI机器学习 常用英语词汇",category:"代码练习",tags:["AI"],url:"/dicts/ai_machine_learning.json",length:726,language:"code",languageCategory:"code"},{id:"ai-ai-for-science",name:"人工智能: AI for Science",description:"AI for Science 常用英语词汇",category:"代码练习",tags:["AI"],url:"/dicts/ai_for_science.json",length:491,language:"code",languageCategory:"code"},{id:"go_keyword",name:"golang-keyword",description:"go语言关键字,",category:"代码练习",tags:["golang"],url:"/dicts/go_keyword.json",length:25,language:"code",languageCategory:"code"},{id:"go_builtin",name:"golang-builtin",description:"go语言内建函数和类型",category:"代码练习",tags:["golang"],url:"/dicts/go_builtin.json",length:46,language:"code",languageCategory:"code"}],UZ=[{id:"japanese001",name:"日语常见词",description:"英语翻译",category:"日语学习",tags:["基础"],url:"/dicts/Japanesebasicword.json",length:100,language:"romaji",languageCategory:"ja"},{id:"japanese001-zh",name:"日语常见词",description:"中文翻译",category:"日语学习",tags:["基础"],url:"/dicts/Japanesebasicword_zh.json",length:100,language:"romaji",languageCategory:"ja"},{id:"japanese002",name:"N5",description:"英语翻译",category:"日语学习",tags:["基础"],url:"/dicts/JapVocabList.N5.json",length:670,language:"romaji",languageCategory:"ja"},{id:"japanese002-zh",name:"N5",description:"中文翻译",category:"日语学习",tags:["基础"],url:"/dicts/JapVocabList.N5_zh.json",length:670,language:"romaji",languageCategory:"ja"},{id:"japanese003",name:"N4",description:"英语翻译",category:"日语学习",tags:["基础"],url:"/dicts/JapVocabList.N4.json",length:635,language:"romaji",languageCategory:"ja"},{id:"japanese003-zh",name:"N4",description:"中文翻译",category:"日语学习",tags:["基础"],url:"/dicts/JapVocabList.N4_zh.json",length:635,language:"romaji",languageCategory:"ja"},{id:"japanese004",name:"N3",description:"英语翻译",category:"日语学习",tags:["基础"],url:"/dicts/JapVocabList.N3.json",length:1830,language:"romaji",languageCategory:"ja"},{id:"japanese004-zh",name:"N3",description:"中文翻译",category:"日语学习",tags:["基础"],url:"/dicts/JapVocabList.N3_zh.json",length:1830,language:"romaji",languageCategory:"ja"},{id:"japanese005",name:"N2",description:"英语翻译",category:"日语学习",tags:["基础"],url:"/dicts/JapVocabList.N2.json",length:1836,language:"romaji",languageCategory:"ja"},{id:"japanese005-zh",name:"N2",description:"中文翻译",category:"日语学习",tags:["基础"],url:"/dicts/JapVocabList.N2_zh.json",length:1836,language:"romaji",languageCategory:"ja"},{id:"japanese006",name:"N1",description:"英语翻译",category:"日语学习",tags:["基础"],url:"/dicts/JapVocabList.N1.json",length:3477,language:"romaji",languageCategory:"ja"},{id:"japanese006-zh",name:"N1",description:"中文翻译",category:"日语学习",tags:["基础"],url:"/dicts/JapVocabList.N1_zh.json",length:3477,language:"romaji",languageCategory:"ja"},{id:"japanese007",name:"高频单词_N1",description:"高频单词_日语N1",category:"日语学习",tags:["基础"],url:"/dicts/Jap_High-Frequency_N1.json",length:3e3,language:"romaji",languageCategory:"ja"},{id:"japanese008",name:"高频单词_N2",description:"高频单词_日语N2",category:"日语学习",tags:["基础"],url:"/dicts/Jap_High-Frequency_N2.json",length:2500,language:"romaji",languageCategory:"ja"},{id:"japanese009",name:"高频单词_N3",description:"高频单词_日语N3",category:"日语学习",tags:["基础"],url:"/dicts/Jap_High-Frequency_N3.json",length:1999,language:"romaji",languageCategory:"ja"},{id:"japanese0010",name:"高频单词_N4N5",description:"高频单词_日语N4N5",category:"日语学习",tags:["基础"],url:"/dicts/Jap_High-Frequency_N4N5.json",length:2e3,language:"romaji",languageCategory:"ja"}],zZ=[{id:"german2en",name:"德语 英译",description:"德语词汇, 英语翻译",category:"德语学习",tags:["基础"],url:"/dicts/german2en.json",length:5892,language:"de",languageCategory:"de"},{id:"en2german",name:"英语 德译",description:"英语词汇,德语翻译",category:"德语学习",tags:["基础"],url:"/dicts/en2german.json",length:5025,language:"en",languageCategory:"de"}],VZ=[{id:"kazakh_basic_3000_arabic_hapin",name:"基础3000词(老文字版)",description:"哈萨克语基础3000词(哈拼老文字版)",category:"哈萨克语",tags:["老文字","哈拼"],url:"/dicts/kazakh_basic_3000_arabic_hapin.json",length:3002,language:"hapin",languageCategory:"kk"},{id:"kazakh_basic_3000_cyrillic_hapin",name:"基础3000词(西里尔字母版)",description:"哈萨克语基础3000词(哈拼西里尔字母版)",category:"哈萨克语",tags:["西里尔字母","哈拼"],url:"/dicts/kazakh_basic_3000_cyrillic_hapin.json",length:3002,language:"hapin",languageCategory:"kk"}],WZ=[...DZ,...jZ,...FZ,...BZ,...UZ,...zZ,...VZ],HZ=WZ.map(e=>({...e,chapterCount:LZ(e.length)})),Hf=Object.fromEntries(HZ.map(e=>[e.id,e])),GZ=e=>y("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...e,children:y("path",{fill:"currentColor",fillRule:"evenodd",d:"m18.412 6.5l-.801 13.617A2 2 0 0 1 15.614 22H8.386a2 2 0 0 1-1.997-1.883L5.59 6.5H3.5v-1A.5.5 0 0 1 4 5h16a.5.5 0 0 1 .5.5v1zM10 2.5h4a.5.5 0 0 1 .5.5v1h-5V3a.5.5 0 0 1 .5-.5M9 9l.5 9H11l-.4-9zm4.5 0l-.5 9h1.5l.5-9z"})});globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const KZ=({record:e,onDelete:t})=>{const r=wa(dh),n=Hf[e.dict],{word:a,isLoading:o,hasError:i}=a8(e.word,n),s=p.useCallback(()=>{r(e),MM("detail")},[e,r]);return L("li",{className:"opacity-85 flex w-full cursor-pointer items-center justify-between rounded-lg bg-white px-6 py-3 text-black shadow-md dark:bg-gray-800 dark:text-white",onClick:s,children:[y("span",{className:"basis-2/12 break-normal",children:e.word}),y("span",{className:"basis-6/12 break-normal",children:a?a.trans.join(";"):y(__,{isLoading:o,hasError:i})}),y("span",{className:"basis-1/12 break-normal ",children:e.wrongCount}),y("span",{className:"basis-1/12 break-normal",children:n==null?void 0:n.name}),y("span",{className:"basis-1/12 break-normal",onClick:l=>{l.stopPropagation(),t()},children:y(DL,{children:L(jL,{children:[y(FL,{asChild:!0,children:y(GZ,{})}),y(sE,{children:y("p",{children:"Delete Records"})})]})})})]})};var BM={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;ay("svg",{viewBox:"0 0 1024 1344",width:"1.2em",height:"1.2em",...e,children:y("g",{transform:"translate(0 1344) scale(1 -1)",children:y("path",{fill:"currentColor",d:"M1024 512q0 26-19 45t-45 19H64q-26 0-45-19T0 512t19-45L467 19q19-19 45-19t45 19l448 448q19 19 19 45"})})}),XZ=e=>y("svg",{viewBox:"0 0 1024 1344",width:"1.2em",height:"1.2em",...e,children:y("path",{fill:"currentColor",d:"M1024 512q0 26-19 45t-45 19H64q-26 0-45-19T0 512t19-45L467 19q19-19 45-19t45 19l448 448q19 19 19 45"})});globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const ZZ=({className:e,sortType:t,setSortType:r})=>{const n=p.useCallback(()=>{r({asc:"desc",desc:"none",none:"asc"}[t])},[r,t]);return L("span",{className:`relative cursor-pointer ${e}`,onClick:n,children:["错误次数",L("div",{className:"absolute -right-2 bottom-0 top-0 flex flex-col items-center justify-center text-[12px]",children:[y(XZ,{className:qr("-mb-2 ",{"text-indigo-500":t==="asc","text-gray-400":t!=="asc"})}),y(YZ,{className:qr({"text-indigo-500":t==="desc","text-gray-400":t!=="desc"})})]})]})},UM=e=>y("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...e,children:y("path",{fill:"currentColor",d:"M7 1L5.6 2.5L13 10l-7.4 7.5L7 19l9-9z"})}),zM=e=>y("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...e,children:y("path",{fill:"currentColor",d:"m4 10l9 9l1.4-1.5L7 10l7.4-7.5L13 1z"})});globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const q1=20,QZ=({className:e,page:t,setPage:r,totalPages:n})=>{const a=p.useCallback(()=>{r(t+1)},[t,r]),o=p.useCallback(()=>{r(t-1)},[t,r]);return L("div",{className:`flex items-center gap-2 ${e}`,children:[y("button",{className:"cursor-pointer rounded-full bg-white p-2 text-indigo-500 shadow-md dark:bg-gray-800 dark:text-indigo-300",onClick:o,children:y(zM,{})}),y("span",{className:"text-black dark:text-white",children:`${t} / ${n}`}),y("button",{className:"cursor-pointer rounded-full bg-white p-2 text-indigo-500 shadow-md dark:bg-gray-800 dark:text-indigo-300",onClick:a,children:y(UM,{})})]})};globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const Yp=({icon:e,name:t,data:r})=>L("div",{className:"g flex h-10 w-40 flex-1 select-none items-center justify-between rounded-md border-gray-400 bg-gray-100 px-3 py-5 shadow dark:border-gray-600 dark:bg-gray-800",children:[L("div",{className:"flex items-center space-x-1 ",children:[y(e,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"}),y("span",{className:"break-keep text-base font-normal text-gray-500 dark:text-gray-300",children:t})]}),y("div",{className:"flex items-center space-x-2",children:y("span",{className:"text-base font-normal text-gray-800 dark:text-gray-200",children:r})})]});function r2(){return r2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[r,n]=wt(dh),a=p.useMemo(()=>r?t.findIndex(s=>s.word===r.word&&s.dict===r.dict):-1,[r,t]),o=p.useCallback(()=>{if(!r)return;const s=a;if(s===-1)return;const l=s+1;l>=t.length||n(t[l])},[r,a,t,n]),i=p.useCallback(()=>{if(!r)return;const s=a;if(s===-1)return;const l=s-1;l<0||n(t[l])},[r,a,n,t]);return Yt("left",s=>{i(),s.stopPropagation()},{preventDefault:!0}),Yt("right",s=>{o(),s.stopPropagation()},{preventDefault:!0}),L("div",{className:`-gap-1 flex select-none items-center ${e}`,children:[y("button",{className:"d cursor-pointer rounded-full p-1 text-indigo-500 focus:outline-none dark:text-indigo-300",onClick:i,children:y(zM,{})}),y("span",{className:"text-sm text-black dark:text-white",children:`${a+1} / ${t.length}`}),y("button",{className:"cursor-pointer rounded-full p-1 text-indigo-500 focus:outline-none dark:text-indigo-300",onClick:o,children:y(UM,{})})]})};globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const pQ=({className:e})=>L("svg",{className:`prefix__icon ${e}`,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:[y("path",{d:"M699.034 761.907a25.6 25.6 0 01-16.18-45.414C736.973 672.512 768 607.283 768 537.65s-31.027-134.81-85.094-178.841a25.549 25.549 0 1132.307-39.68C781.312 372.89 819.2 452.557 819.2 537.702s-37.888 164.762-103.987 218.573a25.6 25.6 0 01-16.128 5.735z"}),y("path",{d:"M795.904 881.1a25.6 25.6 0 01-16.18-45.414C869.889 762.368 921.6 653.722 921.6 537.651s-51.712-224.717-141.875-298.035a25.549 25.549 0 1132.307-39.68C914.176 283.034 972.8 406.17 972.8 537.702s-58.573 254.67-160.768 337.767a25.6 25.6 0 01-16.128 5.734zm-193.69-238.438a25.6 25.6 0 01-16.179-45.414c18.023-14.694 28.365-36.403 28.365-59.597s-10.342-44.953-28.365-59.597a25.549 25.549 0 1132.307-39.68c30.055 24.423 47.258 60.621 47.258 99.328s-17.254 74.906-47.258 99.328a25.6 25.6 0 01-16.128 5.735zM417.28 164.198c-12.646 0-25.293 5.325-37.683 15.821L169.779 358.35H76.8c-42.342 0-76.8 34.457-76.8 76.8v204.8c0 42.342 34.458 76.8 76.8 76.8h92.98l209.817 178.33c12.339 10.495 25.037 15.82 37.683 15.82a40.755 40.755 0 0034.304-18.534c6.093-9.165 9.216-20.89 9.216-34.816v-640c0-36.864-21.862-53.402-43.52-53.402zM51.2 640V435.2a25.6 25.6 0 0125.6-25.6h76.8v256H76.8A25.6 25.6 0 0151.2 640zm358.4 213.453l-204.8-174.08V395.827l204.8-174.08v631.706z"})]}),gQ=({className:e})=>y("svg",{className:`prefix__icon ${e}`,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:y("path",{d:"M417.28 164.198c-12.646 0-25.293 5.325-37.683 15.821L169.779 358.35H76.8c-42.342 0-76.8 34.457-76.8 76.8v204.8c0 42.342 34.458 76.8 76.8 76.8h92.98l209.817 178.33c12.339 10.495 25.037 15.82 37.683 15.82a40.755 40.755 0 0034.304-18.534c6.093-9.165 9.216-20.89 9.216-34.816v-640c0-36.864-21.862-53.402-43.52-53.402zM51.2 640V435.2a25.6 25.6 0 0125.6-25.6h76.8v256H76.8A25.6 25.6 0 0151.2 640zm358.4 213.453l-204.8-174.08V395.827l204.8-174.08v631.706z"})}),vQ=({className:e})=>y("svg",{className:`prefix__icon ${e}`,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:y("path",{d:"M602.214 642.662a25.6 25.6 0 01-16.179-45.414c18.023-14.694 28.365-36.403 28.365-59.597s-10.342-44.953-28.365-59.597a25.549 25.549 0 1132.307-39.68c30.055 24.423 47.258 60.621 47.258 99.328s-17.254 74.906-47.258 99.328a25.6 25.6 0 01-16.128 5.735zM417.28 164.198c-12.646 0-25.293 5.325-37.683 15.821L169.779 358.35H76.8c-42.342 0-76.8 34.457-76.8 76.8v204.8c0 42.342 34.458 76.8 76.8 76.8h92.98l209.817 178.33c12.339 10.495 25.037 15.82 37.683 15.82a40.755 40.755 0 0034.304-18.534c6.093-9.165 9.216-20.89 9.216-34.816v-640c0-36.864-21.862-53.402-43.52-53.402zM51.2 640V435.2a25.6 25.6 0 0125.6-25.6h76.8v256H76.8A25.6 25.6 0 0151.2 640zm358.4 213.453l-204.8-174.08V395.827l204.8-174.08v631.706z"})}),mQ=({className:e})=>y("svg",{className:`prefix__icon ${e}`,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:y("path",{d:"M699.034 761.907a25.6 25.6 0 01-16.18-45.414C736.973 672.512 768 607.283 768 537.65s-31.027-134.81-85.094-178.841a25.549 25.549 0 1132.307-39.68C781.312 372.89 819.2 452.557 819.2 537.702s-37.888 164.762-103.987 218.573a25.6 25.6 0 01-16.128 5.735zm-96.82-119.245a25.6 25.6 0 01-16.179-45.414c18.023-14.694 28.365-36.403 28.365-59.597s-10.342-44.953-28.365-59.597a25.549 25.549 0 1132.307-39.68c30.055 24.423 47.258 60.621 47.258 99.328s-17.254 74.906-47.258 99.328a25.6 25.6 0 01-16.128 5.735zM417.28 164.198c-12.646 0-25.293 5.325-37.683 15.821L169.779 358.35H76.8c-42.342 0-76.8 34.457-76.8 76.8v204.8c0 42.342 34.458 76.8 76.8 76.8h92.98l209.817 178.33c12.339 10.495 25.037 15.82 37.683 15.82a40.755 40.755 0 0034.304-18.534c6.093-9.165 9.216-20.89 9.216-34.816v-640c0-36.864-21.862-53.402-43.52-53.402zM51.2 640V435.2a25.6 25.6 0 0125.6-25.6h76.8v256H76.8A25.6 25.6 0 0151.2 640zm358.4 213.453l-204.8-174.08V395.827l204.8-174.08v631.706z"})});globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const k4=[gQ,vQ,mQ,pQ],qM=({duration:e=500,animated:t=!1,onClick:r,iconClassName:n,className:a})=>{const[o,i]=p.useState(0);p.useEffect(()=>{const l=window.setTimeout(()=>{const u=t&&o{clearTimeout(l)}},[t,o]);const s=k4[o];return y("button",{type:"button",className:`focus:outline-none dark:fill-gray-400 dark:opacity-80 ${a}`,onClick:r,children:y(s,{className:n})})};globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function yQ(e){return e=e[0],e>="一"&&e<="鿏"||e>="豈"&&e<="﫿"||e>="㐀"&&e<="䶿"}function bQ(e){const t=e.toLowerCase(),r=t.split("");for(let o=0;o0;i--){const s=r.slice(a,a+i),l=$Q[s.join("")];if(l!=null){n+=l,a+=s.length;break}if(i==1){n+=s,a+=1;break}}}return n}function wQ(e){return e>="a"&&e<="z"&&!_Q(e)}function _Q(e){return e=="a"||e=="i"||e=="u"||e=="e"||e=="o"}const $Q={a:"あ",i:"い",u:"う",e:"え",o:"お","-":"ー",xa:"ぁ",xi:"ぃ",xu:"ぅ",xe:"ぇ",xo:"ぉ",ka:"か",ki:"き",ku:"く",ke:"け",ko:"こ",ca:"か",cu:"く",co:"こ",ga:"が",gi:"ぎ",gu:"ぐ",ge:"げ",go:"ご",sa:"さ",si:"し",su:"す",se:"せ",so:"そ",za:"ざ",zi:"じ",zu:"ず",ze:"ぜ",zo:"ぞ",ja:"じゃ",ji:"じ",ju:"じゅ",je:"じぇ",jo:"じょ",ta:"た",ti:"ち",tu:"つ",te:"て",to:"と",da:"だ",di:"ぢ",du:"づ",de:"で",do:"ど",na:"な",ni:"に",nu:"ぬ",ne:"ね",no:"の",ha:"は",hi:"ひ",hu:"ふ",he:"へ",ho:"ほ",ba:"ば",bi:"び",bu:"ぶ",be:"べ",bo:"ぼ",pa:"ぱ",pi:"ぴ",pu:"ぷ",pe:"ぺ",po:"ぽ",va:"ヴぁ",vi:"ヴぃ",vu:"ヴ",ve:"ヴぇ",vo:"ヴぉ",fa:"ふぁ",fi:"ふぃ",fu:"ふ",fe:"ふぇ",fo:"ふぉ",ma:"ま",mi:"み",mu:"む",me:"め",mo:"も",ya:"や",yi:"い",yu:"ゆ",ye:"いぇ",yo:"よ",ra:"ら",ri:"り",ru:"る",re:"れ",ro:"ろ",la:"ら",li:"り",lu:"る",le:"れ",lo:"ろ",wa:"わ",wi:"ゐ",wu:"う",we:"ゑ",wo:"を",tsu:"つ",xka:"ヵ",xke:"ヶ",xwa:"ゎ",xtsu:"っ",xya:"ゃ",xyu:"ゅ",xyo:"ょ",kya:"きゃ",kyi:"きぃ",kyu:"きゅ",kye:"きぇ",kyo:"きょ",gya:"ぎゃ",gyi:"ぎぃ",gyu:"ぎゅ",gye:"ぎぇ",gyo:"ぎょ",sya:"しゃ",syi:"しぃ",syu:"しゅ",sye:"しぇ",syo:"しょ",sha:"しゃ",shi:"し",shu:"しゅ",she:"しぇ",sho:"しょ",zya:"じゃ",zyi:"じぃ",zyu:"じゅ",zye:"じぇ",zyo:"じょ",jya:"じゃ",jyi:"じぃ",jyu:"じゅ",jye:"じぇ",jyo:"じょ",tya:"ちゃ",tyi:"ちぃ",tyu:"ちゅ",tye:"ちぇ",tyo:"ちょ",cya:"ちゃ",cyi:"ちぃ",cyu:"ちゅ",cye:"ちぇ",cyo:"ちょ",cha:"ちゃ",chi:"ち",chu:"ちゅ",che:"ちぇ",cho:"ちょ",tha:"てゃ",thi:"てぃ",thu:"てゅ",the:"てぇ",tho:"てょ",dya:"ぢゃ",dyi:"ぢぃ",dyu:"ぢゅ",dye:"ぢぇ",dyo:"ぢょ",dha:"でゃ",dhi:"でぃ",dhu:"でゅ",dhe:"でぇ",dho:"でょ",nya:"にゃ",nyi:"にぃ",nyu:"にゅ",nye:"にぇ",nyo:"にょ",hya:"ひゃ",hyi:"ひぃ",hyu:"ひゅ",hye:"ひぇ",hyo:"ひょ",bya:"びゃ",byi:"びぃ",byu:"びゅ",bye:"びぇ",byo:"びょ",pya:"ぴゃ",pyi:"ぴぃ",pyu:"ぴゅ",pye:"ぴぇ",pyo:"ぴょ",mya:"みゃ",myi:"みぃ",myu:"みゅ",mye:"みぇ",myo:"みょ",rya:"りゃ",ryi:"りぃ",ryu:"りゅ",rye:"りぇ",ryo:"りょ",lya:"りゃ",lyi:"りぃ",lyu:"りゅ",lye:"りぇ",lyo:"りょ",n:"ん",m:"ん","n'":"ん",dzu:"づ"};globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function cv(){}function vm(){return vm=Object.assign||function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}function SQ(e){p.useEffect(e,[])}function uv(e,t){t===void 0&&(t={});var r=t,n=r.volume,a=n===void 0?1:n,o=r.playbackRate,i=o===void 0?1:o,s=r.soundEnabled,l=s===void 0?!0:s,u=r.interrupt,f=u===void 0?!1:u,c=r.onload,d=xQ(r,["id","volume","playbackRate","soundEnabled","interrupt","onload"]),h=Y.useRef(null),g=Y.useRef(!1),m=Y.useState(null),w=m[0],v=m[1],b=Y.useState(null),_=b[0],$=b[1],C=function(){typeof c=="function"&&c.call(this),g.current&&v(this.duration()*1e3),$(this)};SQ(function(){return Je(()=>Promise.resolve().then(()=>wse),void 0,import.meta.url).then(function(k){if(!g.current){var N;h.current=(N=k.Howl)!==null&&N!==void 0?N:k.default.Howl,g.current=!0,new h.current(vm({src:Array.isArray(e)?e:[e],volume:a,rate:i,onload:C},d))}}),function(){g.current=!1}}),Y.useEffect(function(){h.current&&_&&$(new h.current(vm({src:Array.isArray(e)?e:[e],volume:a,onload:C},d)))},[JSON.stringify(e)]),Y.useEffect(function(){_&&(_.volume(a),_.rate(i))},[a,i]);var O=Y.useCallback(function(k){typeof k>"u"&&(k={}),!(!_||!l&&!k.forceSoundEnabled)&&(f&&_.stop(),k.playbackRate&&_.rate(k.playbackRate),_.play(k.id))},[_,l,f]),x=Y.useCallback(function(k){_&&_.stop(k)},[_]),S=Y.useCallback(function(k){_&&_.pause(k)},[_]),A=[O,{sound:_,stop:x,pause:S,duration:w}];return A}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const ls="https://dict.youdao.com/dictvoice?audio=";function YM(e,t){switch(t){case"uk":return`${ls}${e}&type=1`;case"us":return`${ls}${e}&type=2`;case"romaji":return`${ls}${bQ(e)}&le=jap`;case"zh":return`${ls}${e}&le=zh`;case"ja":return`${ls}${e}&le=jap`;case"de":return`${ls}${e}&le=de`;case"hapin":case"kk":return`${ls}${e}&le=ru`}}function XM(e,t){const r=oe(Ro),n=p.useMemo(()=>typeof t=="boolean"?t:r.isLoop,[t,r.isLoop]),[a,o]=p.useState(!1),[i,{stop:s,sound:l}]=uv(YM(e,r.type),{html5:!0,format:["mp3"],loop:n,volume:r.volume,rate:r.rate});return p.useEffect(()=>{if(l)return l.loop(n),cv},[n,l]),p.useEffect(()=>{if(!l)return;const u=[];return u.push(qp(l,"play",()=>o(!0))),u.push(qp(l,"end",()=>o(!1))),u.push(qp(l,"pause",()=>o(!1))),u.push(qp(l,"playerror",()=>o(!1))),()=>{o(!1),u.forEach(f=>f()),l.unload()}},[l]),{play:i,stop:s,isPlaying:a}}function EQ(e){const t=oe(Ro);p.useEffect(()=>{if(!e)return;const r=YM(e,t.type),n=document.head;if(!Array.from(n.querySelectorAll("link[href]")).some(o=>o.href===r)){const o=new Audio;return o.src=r,o.preload="auto",o.crossOrigin="anonymous",o.style.display="none",n.appendChild(o),()=>{n.removeChild(o)}}},[t.type,e])}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const D0=Y.forwardRef(({word:e,lang:t,className:r,iconClassName:n},a)=>{const o=()=>t==="hapin"?/[\u0400-\u04FF]/.test(e.notation||"")?e.notation||"":e.trans[2]:e.name,{play:i,stop:s,isPlaying:l}=XM(o()),u=p.useCallback(()=>{s(),i()},[i,s]);return p.useEffect(()=>s,[e,s]),p.useImperativeHandle(a,()=>({play:u}),[u]),y(qM,{animated:l,onClick:u,className:`cursor-pointer text-gray-600 ${r}`,iconClassName:n})});D0.displayName="WordPronunciationIcon";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function ZM({word:e}){const t=oe(xh),r=oe(_h);return L("div",{className:`space-x-5 text-center text-sm font-normal text-gray-600 transition-colors duration-300 dark:text-gray-400 ${r&&"select-text"}`,children:[t.type==="us"&&e.usphone&&e.usphone.length>1&&y("span",{children:`AmE: [${e.usphone}]`}),t.type==="uk"&&e.ukphone&&e.ukphone.length>1&&y("span",{children:`BrE: [${e.ukphone}]`})]})}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const CQ={true:{normal:"text-gray-400",correct:"text-green-400 dark:text-green-700",wrong:"text-red-400 dark:text-red-600"},false:{normal:"text-gray-600 dark:text-gray-50",correct:"text-green-600 dark:text-green-400",wrong:"text-red-600 dark:text-red-400"}},TQ=({letter:e,state:t="normal",visible:r=!0})=>{const n=oe(_E);return y("span",{className:`m-0 p-0 font-mono font-normal ${CQ[e===E$][t]} pr-0.8 duration-0 dark:text-opacity-80`,style:{fontSize:n.foreignFont.toString()+"px"},children:r?e:"_"})},QM=Y.memo(TQ),AQ=e=>y("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...e,children:L("g",{fill:"currentColor",children:[y("path",{d:"M12 9a1 1 0 0 1-1-1V3c0-.552.45-1.007.997-.93a7 7 0 0 1 5.933 5.933c.078.547-.378.997-.93.997z"}),y("path",{d:"M8.003 4.07C8.55 3.994 9 4.449 9 5v5a1 1 0 0 0 1 1h5c.552 0 1.008.45.93.997A7.001 7.001 0 0 1 2 11a7 7 0 0 1 6.003-6.93"})]})}),RQ=e=>y("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...e,children:y("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16a8 8 0 0 0 0 16m3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79l-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089z",clipRule:"evenodd"})}),OQ=e=>y("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...e,children:y("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16a8 8 0 0 0 0 16m.75-13a.75.75 0 0 0-1.5 0v5c0 .414.336.75.75.75h4a.75.75 0 0 0 0-1.5h-3.25z",clipRule:"evenodd"})}),kQ=e=>y("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...e,children:y("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16a8 8 0 0 0 0 16M8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94z",clipRule:"evenodd"})}),_u=e=>y("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...e,children:y("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 6L6 18M6 6l12 12"})});globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const PQ=({currentRowDetail:e,allRecords:t})=>{const r=wa(dh),n=Hf[e.dict],{word:a,isLoading:o,hasError:i}=a8(e.word,n),s=p.useRef(null),l=p.useMemo(()=>{const c=((e.records.length>0?e.records.reduce((m,w)=>m+w.totalTime,0)/e.records.length:0)/1e3).toFixed(2),d=e.records.length,h=e.wrongCount,g=d+h;return{time:c,sumCount:g,correctCount:d,wrongCount:h}},[e.records,e.wrongCount]),u=p.useCallback(()=>{r(null)},[r]);return Yt("esc",f=>{u(),f.stopPropagation()},{preventDefault:!0}),Yt("ctrl+j",()=>{var f;(f=s.current)==null||f.play()},[],{enableOnFormTags:!0,preventDefault:!0}),L("div",{className:"absolute inset-0 flex flex-col items-center justify-center ",children:[L("div",{className:"my-card relative z-10 flex h-[32rem] min-w-[26rem] select-text flex-col items-center justify-around rounded-2xl bg-white px-3 py-10 dark:bg-gray-900",children:[y(_u,{className:"absolute right-3 top-3 h-6 w-6 cursor-pointer text-gray-400",onClick:u}),L("div",{className:"flex flex-col items-center justify-start",children:[y("div",{children:e.word.split("").map((f,c)=>y(QM,{letter:f,visible:!0,state:"normal"},`${c}-${f}`))}),L("div",{className:"relative flex h-8 items-center",children:[a?y(ZM,{word:a}):y(__,{isLoading:o,hasError:i}),a&&y(D0,{lang:n.language,word:a,className:"absolute -right-7 top-1/2 h-5 w-5 -translate-y-1/2 transform ",ref:s})]}),y("div",{className:"flex max-w-[24rem] items-center",children:y("span",{className:"max-w-4xl text-center font-sans transition-colors duration-300 dark:text-white dark:text-opacity-80",children:a?a.trans.join(";"):y(__,{isLoading:o,hasError:i})})})]}),L("div",{className:"item flex flex-col gap-4",children:[L("div",{className:"flex gap-6",children:[y(Yp,{icon:OQ,name:"平均用时",data:l.time}),y(Yp,{icon:AQ,name:"练习次数",data:l.sumCount})]}),L("div",{className:"flex gap-6",children:[y(Yp,{icon:RQ,name:"正确次数",data:l.correctCount}),y(Yp,{icon:kQ,name:"错误次数",data:l.wrongCount})]})]}),y(hQ,{className:"absolute bottom-6 mt-10",allRecords:t})]}),y("div",{className:"absolute inset-0 z-0 cursor-pointer bg-transparent",onClick:u})]})},IQ=p.createContext(void 0);function NQ(e){const t=p.useContext(IQ);return e||t||"ltr"}function LQ(e,[t,r]){return Math.min(r,Math.max(t,e))}function MQ(e,t){return p.useReducer((r,n)=>{const a=t[r][n];return a??r},e)}const JM="ScrollArea",[eD,$je]=f0(JM),[DQ,Ln]=eD(JM),jQ=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:a,scrollHideDelay:o=600,...i}=e,[s,l]=p.useState(null),[u,f]=p.useState(null),[c,d]=p.useState(null),[h,g]=p.useState(null),[m,w]=p.useState(null),[v,b]=p.useState(0),[_,$]=p.useState(0),[C,O]=p.useState(!1),[x,S]=p.useState(!1),A=In(t,N=>l(N)),k=NQ(a);return p.createElement(DQ,{scope:r,type:n,dir:k,scrollHideDelay:o,scrollArea:s,viewport:u,onViewportChange:f,content:c,onContentChange:d,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:O,scrollbarY:m,onScrollbarYChange:w,scrollbarYEnabled:x,onScrollbarYEnabledChange:S,onCornerWidthChange:b,onCornerHeightChange:$},p.createElement(un.div,te({dir:k},i,{ref:A,style:{position:"relative",["--radix-scroll-area-corner-width"]:v+"px",["--radix-scroll-area-corner-height"]:_+"px",...e.style}})))}),FQ="ScrollAreaViewport",BQ=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...a}=e,o=Ln(FQ,r),i=p.useRef(null),s=In(t,i,o.onViewportChange);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(un.div,te({"data-radix-scroll-area-viewport":""},a,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),p.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),ko="ScrollAreaScrollbar",UQ=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Ln(ko,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=a,s=e.orientation==="horizontal";return p.useEffect(()=>(s?o(!0):i(!0),()=>{s?o(!1):i(!1)}),[s,o,i]),a.type==="hover"?p.createElement(zQ,te({},n,{ref:t,forceMount:r})):a.type==="scroll"?p.createElement(VQ,te({},n,{ref:t,forceMount:r})):a.type==="auto"?p.createElement(tD,te({},n,{ref:t,forceMount:r})):a.type==="always"?p.createElement(zE,te({},n,{ref:t})):null}),zQ=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Ln(ko,e.__scopeScrollArea),[o,i]=p.useState(!1);return p.useEffect(()=>{const s=a.scrollArea;let l=0;if(s){const u=()=>{window.clearTimeout(l),i(!0)},f=()=>{l=window.setTimeout(()=>i(!1),a.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",f)}}},[a.scrollArea,a.scrollHideDelay]),p.createElement(gu,{present:r||o},p.createElement(tD,te({"data-state":o?"visible":"hidden"},n,{ref:t})))}),VQ=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Ln(ko,e.__scopeScrollArea),o=e.orientation==="horizontal",i=F0(()=>l("SCROLL_END"),100),[s,l]=MQ("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>l("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,a.scrollHideDelay,l]),p.useEffect(()=>{const u=a.viewport,f=o?"scrollLeft":"scrollTop";if(u){let c=u[f];const d=()=>{const h=u[f];c!==h&&(l("SCROLL"),i()),c=h};return u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[a.viewport,o,l,i]),p.createElement(gu,{present:r||s!=="hidden"},p.createElement(zE,te({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:or(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:or(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),tD=p.forwardRef((e,t)=>{const r=Ln(ko,e.__scopeScrollArea),{forceMount:n,...a}=e,[o,i]=p.useState(!1),s=e.orientation==="horizontal",l=F0(()=>{if(r.viewport){const u=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,a=Ln(ko,e.__scopeScrollArea),o=p.useRef(null),i=p.useRef(0),[s,l]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=oD(s.viewport,s.content),f={...n,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:d=>o.current=d,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:d=>i.current=d};function c(d,h){return XQ(d,i.current,s,h)}return r==="horizontal"?p.createElement(WQ,te({},f,{ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const d=a.viewport.scrollLeft,h=P4(d,s,a.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:d=>{a.viewport&&(a.viewport.scrollLeft=d)},onDragScroll:d=>{a.viewport&&(a.viewport.scrollLeft=c(d,a.dir))}})):r==="vertical"?p.createElement(HQ,te({},f,{ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const d=a.viewport.scrollTop,h=P4(d,s);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:d=>{a.viewport&&(a.viewport.scrollTop=d)},onDragScroll:d=>{a.viewport&&(a.viewport.scrollTop=c(d))}})):null}),WQ=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,o=Ln(ko,e.__scopeScrollArea),[i,s]=p.useState(),l=p.useRef(null),u=In(t,l,o.onScrollbarXChange);return p.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),p.createElement(nD,te({"data-orientation":"horizontal"},a,{ref:u,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,["--radix-scroll-area-thumb-width"]:j0(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,c)=>{if(o.viewport){const d=o.viewport.scrollLeft+f.deltaX;e.onWheelScroll(d),sD(d,c)&&f.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:mm(i.paddingLeft),paddingEnd:mm(i.paddingRight)}})}}))}),HQ=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,o=Ln(ko,e.__scopeScrollArea),[i,s]=p.useState(),l=p.useRef(null),u=In(t,l,o.onScrollbarYChange);return p.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),p.createElement(nD,te({"data-orientation":"vertical"},a,{ref:u,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)",["--radix-scroll-area-thumb-height"]:j0(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,c)=>{if(o.viewport){const d=o.viewport.scrollTop+f.deltaY;e.onWheelScroll(d),sD(d,c)&&f.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:mm(i.paddingTop),paddingEnd:mm(i.paddingBottom)}})}}))}),[GQ,rD]=eD(ko),nD=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:a,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:c,...d}=e,h=Ln(ko,r),[g,m]=p.useState(null),w=In(t,A=>m(A)),v=p.useRef(null),b=p.useRef(""),_=h.viewport,$=n.content-n.viewport,C=Or(f),O=Or(l),x=F0(c,10);function S(A){if(v.current){const k=A.clientX-v.current.left,N=A.clientY-v.current.top;u({x:k,y:N})}}return p.useEffect(()=>{const A=k=>{const N=k.target;(g==null?void 0:g.contains(N))&&C(k,$)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[_,g,$,C]),p.useEffect(O,[n,O]),qc(g,x),qc(h.content,x),p.createElement(GQ,{scope:r,scrollbar:g,hasThumb:a,onThumbChange:Or(o),onThumbPointerUp:Or(i),onThumbPositionChange:O,onThumbPointerDown:Or(s)},p.createElement(un.div,te({},d,{ref:w,style:{position:"absolute",...d.style},onPointerDown:or(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),v.current=g.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),S(A))}),onPointerMove:or(e.onPointerMove,S),onPointerUp:or(e.onPointerUp,A=>{const k=A.target;k.hasPointerCapture(A.pointerId)&&k.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})))}),n2="ScrollAreaThumb",xje=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=rD(n2,e.__scopeScrollArea);return p.createElement(gu,{present:r||a.hasThumb},p.createElement(KQ,te({ref:t},n)))}),KQ=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...a}=e,o=Ln(n2,r),i=rD(n2,r),{onThumbPositionChange:s}=i,l=In(t,c=>i.onThumbChange(c)),u=p.useRef(),f=F0(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const c=o.viewport;if(c){const d=()=>{if(f(),!u.current){const h=ZQ(c,s);u.current=h,s()}};return s(),c.addEventListener("scroll",d),()=>c.removeEventListener("scroll",d)}},[o.viewport,f,s]),p.createElement(un.div,te({"data-state":i.hasThumb?"visible":"hidden"},a,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:or(e.onPointerDownCapture,c=>{const h=c.target.getBoundingClientRect(),g=c.clientX-h.left,m=c.clientY-h.top;i.onThumbPointerDown({x:g,y:m})}),onPointerUp:or(e.onPointerUp,i.onThumbPointerUp)}))}),aD="ScrollAreaCorner",qQ=p.forwardRef((e,t)=>{const r=Ln(aD,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?p.createElement(YQ,te({},e,{ref:t})):null}),YQ=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,a=Ln(aD,r),[o,i]=p.useState(0),[s,l]=p.useState(0),u=!!(o&&s);return qc(a.scrollbarX,()=>{var f;const c=((f=a.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;a.onCornerHeightChange(c),l(c)}),qc(a.scrollbarY,()=>{var f;const c=((f=a.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;a.onCornerWidthChange(c),i(c)}),u?p.createElement(un.div,te({},n,{ref:t,style:{width:o,height:s,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function mm(e){return e?parseInt(e,10):0}function oD(e,t){const r=e/t;return isNaN(r)?0:r}function j0(e){const t=oD(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function XQ(e,t,r,n="ltr"){const a=j0(r),o=a/2,i=t||o,s=a-i,l=r.scrollbar.paddingStart+i,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,f=r.content-r.viewport,c=n==="ltr"?[0,f]:[f*-1,0];return iD([l,u],c)(e)}function P4(e,t,r="ltr"){const n=j0(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,i=t.content-t.viewport,s=o-n,l=r==="ltr"?[0,i]:[i*-1,0],u=LQ(e,l);return iD([0,i],[0,s])(u)}function iD(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function sD(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},i=r.left!==o.left,s=r.top!==o.top;(i||s)&&t(),r=o,n=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(n)};function F0(e,t){const r=Or(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function qc(e,t){const r=Or(t);go(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}const $u=jQ,xu=BQ,Su=UQ,Sje=qQ;/** + * @remix-run/router v1.6.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function VE(e,t){if(!e)try{throw new Error(t)}catch{}}function JQ(){return Math.random().toString(36).substr(2,8)}function N4(e,t){return{usr:e.state,key:e.key,idx:t}}function a2(e,t,r,n){return r===void 0&&(r=null),Gf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Eu(t):t,{state:r,key:t&&t.key||n||JQ()})}function ym(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Eu(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function eJ(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s=di.Pop,l=null,u=f();u==null&&(u=0,i.replaceState(Gf({},i.state,{idx:u}),""));function f(){return(i.state||{idx:null}).idx}function c(){s=di.Pop;let w=f(),v=w==null?null:w-u;u=w,l&&l({action:s,location:m.location,delta:v})}function d(w,v){s=di.Push;let b=a2(m.location,w,v);r&&r(b,w),u=f()+1;let _=N4(b,u),$=m.createHref(b);try{i.pushState(_,"",$)}catch{a.location.assign($)}o&&l&&l({action:s,location:m.location,delta:1})}function h(w,v){s=di.Replace;let b=a2(m.location,w,v);r&&r(b,w),u=f();let _=N4(b,u),$=m.createHref(b);i.replaceState(_,"",$),o&&l&&l({action:s,location:m.location,delta:0})}function g(w){let v=a.location.origin!=="null"?a.location.origin:a.location.href,b=typeof w=="string"?w:ym(w);return St(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let m={get action(){return s},get location(){return e(a,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(I4,c),l=w,()=>{a.removeEventListener(I4,c),l=null}},createHref(w){return t(a,w)},createURL:g,encodeLocation(w){let v=g(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:d,replace:h,go(w){return i.go(w)}};return m}var L4;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(L4||(L4={}));function tJ(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Eu(t):t,a=WE(n.pathname||"/",r);if(a==null)return null;let o=lD(e);rJ(o);let i=null;for(let s=0;i==null&&s{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(St(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=xi([n,l.relativePath]),f=r.concat(l);o.children&&o.children.length>0&&(St(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),lD(o.children,t,f,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:cJ(u,o.index),routesMeta:f})};return e.forEach((o,i)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))a(o,i);else for(let l of cD(o.path))a(o,i,l)}),t}function cD(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=cD(n.join("/")),s=[];return s.push(...i.map(l=>l===""?o:[o,l].join("/"))),a&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function rJ(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:uJ(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const nJ=/^:\w+$/,aJ=3,oJ=2,iJ=1,sJ=10,lJ=-2,M4=e=>e==="*";function cJ(e,t){let r=e.split("/"),n=r.length;return r.some(M4)&&(n+=lJ),t&&(n+=oJ),r.filter(a=>!M4(a)).reduce((a,o)=>a+(nJ.test(o)?aJ:o===""?iJ:sJ),n)}function uJ(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function dJ(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let i=0;i{if(f==="*"){let d=s[c]||"";i=o.slice(0,o.length-d.length).replace(/(.)\/+$/,"$1")}return u[f]=gJ(s[c]||"",f),u},{}),pathname:o,pathnameBase:i,pattern:e}}function hJ(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),VE(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(i,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function pJ(e){try{return decodeURI(e)}catch(t){return VE(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function gJ(e,t){try{return decodeURIComponent(e)}catch(r){return VE(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function WE(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function vJ(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Eu(e):e;return{pathname:r?r.startsWith("/")?r:mJ(r,t):t,search:bJ(n),hash:wJ(a)}}function mJ(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Z1(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function HE(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function GE(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Eu(e):(a=Gf({},e),St(!a.pathname||!a.pathname.includes("?"),Z1("?","pathname","search",a)),St(!a.pathname||!a.pathname.includes("#"),Z1("#","pathname","hash",a)),St(!a.search||!a.search.includes("#"),Z1("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,s;if(n||i==null)s=r;else{let c=t.length-1;if(i.startsWith("..")){let d=i.split("/");for(;d[0]==="..";)d.shift(),c-=1;a.pathname=d.join("/")}s=c>=0?t[c]:"/"}let l=vJ(a,s),u=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const xi=e=>e.join("/").replace(/\/\/+/g,"/"),yJ=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bJ=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wJ=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function _J(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const uD=["post","put","patch","delete"];new Set(uD);const $J=["get",...uD];new Set($J);/** + * React Router v6.11.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),i=p.useRef(!1);return hD(()=>{i.current=!0}),p.useCallback(function(l,u){if(u===void 0&&(u={}),!i.current)return;if(typeof l=="number"){r.go(l);return}let f=GE(l,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:xi([t,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[t,r,o,a,e])}function qE(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=p.useContext(Ji),{pathname:a}=Tu(),o=JSON.stringify(HE(n).map(i=>i.pathnameBase));return p.useMemo(()=>GE(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function EJ(e,t){return CJ(e,t)}function CJ(e,t,r){Cu()||St(!1);let{navigator:n}=p.useContext(pl),{matches:a}=p.useContext(Ji),o=a[a.length-1],i=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let l=Tu(),u;if(t){var f;let m=typeof t=="string"?Eu(t):t;s==="/"||(f=m.pathname)!=null&&f.startsWith(s)||St(!1),u=m}else u=l;let c=u.pathname||"/",d=s==="/"?c:c.slice(s.length)||"/",h=tJ(e,{pathname:d}),g=kJ(h&&h.map(m=>Object.assign({},m,{params:Object.assign({},i,m.params),pathname:xi([s,n.encodeLocation?n.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:xi([s,n.encodeLocation?n.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r);return t&&g?p.createElement(B0.Provider,{value:{location:bm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:di.Pop}},g):g}function TJ(){let e=LJ(),t=_J(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:a},r):null,o)}const AJ=p.createElement(TJ,null);class RJ extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){}render(){return this.state.error?p.createElement(Ji.Provider,{value:this.props.routeContext},p.createElement(fD.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function OJ(e){let{routeContext:t,match:r,children:n}=e,a=p.useContext(KE);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(Ji.Provider,{value:t},n)}function kJ(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var a;if((a=r)!=null&&a.errors)e=r.matches;else return null}let o=e,i=(n=r)==null?void 0:n.errors;if(i!=null){let s=o.findIndex(l=>l.route.id&&(i==null?void 0:i[l.route.id]));s>=0||St(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((s,l,u)=>{let f=l.route.id?i==null?void 0:i[l.route.id]:null,c=null;r&&(c=l.route.errorElement||AJ);let d=t.concat(o.slice(0,u+1)),h=()=>{let g;return f?g=c:l.route.Component?g=p.createElement(l.route.Component,null):l.route.element?g=l.route.element:g=s,p.createElement(OJ,{match:l,routeContext:{outlet:s,matches:d,isDataRoute:r!=null},children:g})};return r&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?p.createElement(RJ,{location:r.location,revalidation:r.revalidation,component:c,error:f,children:h(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):h()},null)}var o2;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(o2||(o2={}));var Kf;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(Kf||(Kf={}));function PJ(e){let t=p.useContext(KE);return t||St(!1),t}function IJ(e){let t=p.useContext(dD);return t||St(!1),t}function NJ(e){let t=p.useContext(Ji);return t||St(!1),t}function pD(e){let t=NJ(),r=t.matches[t.matches.length-1];return r.route.id||St(!1),r.route.id}function LJ(){var e;let t=p.useContext(fD),r=IJ(Kf.UseRouteError),n=pD(Kf.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function MJ(){let{router:e}=PJ(o2.UseNavigateStable),t=pD(Kf.UseNavigateStable),r=p.useRef(!1);return hD(()=>{r.current=!0}),p.useCallback(function(a,o){o===void 0&&(o={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,bm({fromRouteId:t},o)))},[e,t])}function DJ(e){let{to:t,replace:r,state:n,relative:a}=e;Cu()||St(!1);let{matches:o}=p.useContext(Ji),{pathname:i}=Tu(),s=Au(),l=GE(t,HE(o).map(f=>f.pathnameBase),i,a==="path"),u=JSON.stringify(l);return p.useEffect(()=>s(JSON.parse(u),{replace:r,state:n,relative:a}),[s,u,a,r,n]),null}function Fl(e){St(!1)}function jJ(e){let{basename:t="/",children:r=null,location:n,navigationType:a=di.Pop,navigator:o,static:i=!1}=e;Cu()&&St(!1);let s=t.replace(/^\/*/,"/"),l=p.useMemo(()=>({basename:s,navigator:o,static:i}),[s,o,i]);typeof n=="string"&&(n=Eu(n));let{pathname:u="/",search:f="",hash:c="",state:d=null,key:h="default"}=n,g=p.useMemo(()=>{let m=WE(u,s);return m==null?null:{location:{pathname:m,search:f,hash:c,state:d,key:h},navigationType:a}},[s,u,f,c,d,h,a]);return g==null?null:p.createElement(pl.Provider,{value:l},p.createElement(B0.Provider,{children:r,value:g}))}function FJ(e){let{children:t,location:r}=e;return EJ(i2(t),r)}var D4;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(D4||(D4={}));new Promise(()=>{});function i2(e,t){t===void 0&&(t=[]);let r=[];return p.Children.forEach(e,(n,a)=>{if(!p.isValidElement(n))return;let o=[...t,a];if(n.type===p.Fragment){r.push.apply(r,i2(n.props.children,o));return}n.type!==Fl&&St(!1),!n.props.index||!n.props.children||St(!1);let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=i2(n.props.children,o)),r.push(i)}),r}/** + * React Router DOM v6.11.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function wm(){return wm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}function BJ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function UJ(e,t){return e.button===0&&(!t||t==="_self")&&!BJ(e)}const zJ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],VJ=["aria-current","caseSensitive","className","end","style","to","children"];function WJ(e){let{basename:t,children:r,window:n}=e,a=p.useRef();a.current==null&&(a.current=QQ({window:n,v5Compat:!0}));let o=a.current,[i,s]=p.useState({action:o.action,location:o.location});return p.useLayoutEffect(()=>o.listen(s),[o]),p.createElement(jJ,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:o})}const HJ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",GJ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,KJ=p.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:o,replace:i,state:s,target:l,to:u,preventScrollReset:f}=t,c=gD(t,zJ),{basename:d}=p.useContext(pl),h,g=!1;if(typeof u=="string"&&GJ.test(u)&&(h=u,HJ))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),$=WE(_.pathname,d);_.origin===b.origin&&$!=null?u=$+_.search+_.hash:g=!0}catch{}let m=xJ(u,{relative:a}),w=qJ(u,{replace:i,state:s,target:l,preventScrollReset:f,relative:a});function v(b){n&&n(b),b.defaultPrevented||w(b)}return p.createElement("a",wm({},c,{href:h||m,onClick:g||o?n:v,ref:r,target:l}))}),vD=p.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:s,to:l,children:u}=t,f=gD(t,VJ),c=qE(l,{relative:f.relative}),d=Tu(),h=p.useContext(dD),{navigator:g}=p.useContext(pl),m=g.encodeLocation?g.encodeLocation(c).pathname:c.pathname,w=d.pathname,v=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;a||(w=w.toLowerCase(),v=v?v.toLowerCase():null,m=m.toLowerCase());let b=w===m||!i&&w.startsWith(m)&&w.charAt(m.length)==="/",_=v!=null&&(v===m||!i&&v.startsWith(m)&&v.charAt(m.length)==="/"),$=b?n:void 0,C;typeof o=="function"?C=o({isActive:b,isPending:_}):C=[o,b?"active":null,_?"pending":null].filter(Boolean).join(" ");let O=typeof s=="function"?s({isActive:b,isPending:_}):s;return p.createElement(KJ,wm({},f,{"aria-current":$,className:C,ref:r,style:O,to:l}),typeof u=="function"?u({isActive:b,isPending:_}):u)});var j4;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(j4||(j4={}));var F4;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(F4||(F4={}));function qJ(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i}=t===void 0?{}:t,s=Au(),l=Tu(),u=qE(e,{relative:i});return p.useCallback(f=>{if(UJ(f,r)){f.preventDefault();let c=n!==void 0?n:ym(l)===ym(u);s(e,{replace:c,state:a,preventScrollReset:o,relative:i})}},[l,s,u,n,a,r,e,o,i])}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function YJ(){const[e,t]=p.useState([]),[r,n]=p.useState(1),a=p.useMemo(()=>Math.ceil(e.length/q1),[e.length]),[o,i]=p.useState("asc"),s=Au(),l=oe(dh),{deleteWordRecord:u}=WX(),[f,c]=p.useState(!1),d=p.useCallback(()=>{s("/")},[s]),h=p.useCallback(b=>{b<1||b>a||n(b)},[a]),g=p.useCallback(b=>{i(b),h(1)},[h]),m=p.useMemo(()=>o==="none"?e:[...e].sort((b,_)=>o==="asc"?b.wrongCount-_.wrongCount:_.wrongCount-b.wrongCount),[e,o]),w=p.useMemo(()=>{const b=(r-1)*q1,_=b+q1;return m.slice(b,_)},[r,m]);p.useEffect(()=>{kt.wordRecords.where("wrongCount").above(0).toArray().then(b=>{const _=[];b.forEach($=>{let C=_.find(O=>O.word===$.word&&O.dict===$.dict);C||(C={word:$.word,dict:$.dict,records:[],wrongCount:0},_.push(C)),C.records.push($)}),_.forEach($=>{$.wrongCount=$.records.reduce((C,O)=>(C+=O.wrongCount,C),0)}),t(_)})},[f]);const v=async(b,_)=>{await u(b,_),c($=>!$)};return L(De,{children:[L("div",{className:`relative flex h-screen w-full flex-col items-center pb-4 ease-in ${l&&"blur-sm"}`,children:[L("div",{className:"mr-8 mt-4 flex w-auto items-center justify-center self-end",children:[y("h1",{className:"font-lighter mr-4 w-auto self-end text-gray-500 opacity-70",children:"Tip: 点击错误单词查看详细信息 "}),y(_u,{className:"h-7 w-7 cursor-pointer text-gray-400",onClick:d})]}),y("div",{className:"flex w-full flex-1 select-text items-start justify-center overflow-hidden",children:L("div",{className:"flex h-full w-5/6 flex-col pt-10",children:[L("div",{className:"flex w-full justify-between rounded-lg bg-white px-6 py-5 text-lg text-black shadow-lg dark:bg-gray-800 dark:text-white",children:[y("span",{className:"basis-2/12",children:"单词"}),y("span",{className:"basis-6/12",children:"释义"}),y(ZZ,{className:"basis-1/12",sortType:o,setSortType:g}),y("span",{className:"basis-1/12",children:"词典"}),y("span",{className:"basis-1/12",children:" "})]}),L($u,{className:"flex-1 overflow-y-auto pt-5",children:[y(xu,{className:"h-full ",children:y("div",{className:"flex flex-col gap-3",children:w.map(b=>y(KZ,{record:b,onDelete:()=>v(b.word,b.dict)},`${b.dict}-${b.word}`))})}),y(Su,{className:"flex touch-none select-none bg-transparent",orientation:"vertical"})]})]})}),y(QZ,{className:"pt-3",page:r,setPage:h,totalPages:a})]}),l&&y(PQ,{currentRowDetail:l,allRecords:m})]})}const XJ=""+new URL("alipay-6edac0a1.jpg",import.meta.url).href,ZJ=""+new URL("a6-f7b26a87.png",import.meta.url).href,QJ=""+new URL("a12-e12a62a3.png",import.meta.url).href,JJ=""+new URL("a36-9c34d6a0.png",import.meta.url).href,eee=""+new URL("a50-ca9f5f26.png",import.meta.url).href,tee=""+new URL("a66-1212e70a.png",import.meta.url).href,ree=""+new URL("w6-e721614e.png",import.meta.url).href,nee=""+new URL("w12-9b95b886.png",import.meta.url).href,aee=""+new URL("w36-f63d42dd.png",import.meta.url).href,oee=""+new URL("w50-beca9735.png",import.meta.url).href,iee=""+new URL("w66-8ec39348.png",import.meta.url).href,see=""+new URL("weChat-b0bf1d67.jpg",import.meta.url).href;globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const B4={"-1":[XJ,see],6:[ZJ,ree],12:[QJ,nee],36:[JJ,aee],50:[eee,oee],66:[tee,iee]};globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const lee=({amount:e,onClick:t,active:r=!0})=>y("button",{className:` focus: h-10 rounded border-gray-100 font-bold text-gray-700 shadow-md shadow-gray-300 + outline-none hover:bg-gray-100 dark:bg-gray-700 dark:text-gray-300 dark:text-opacity-80 dark:opacity-80 + dark:shadow-gray-700 hover:dark:bg-gray-600 + ${e===-1?"w-18":"w-10"} ${r?"bg-stone-100 dark:bg-gray-500":""}`,onClick:()=>t&&t(e),children:e===-1?"自定义":e});globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const cee=[6,12,36,50,66,-1],mD=({className:e,onAmountChange:t})=>{const[r,n]=p.useState(void 0),a=o=>{n(o)};return p.useEffect(()=>{t&&r&&t(r)},[r,t]),L("div",{className:`flex w-full flex-col items-center justify-center gap-3 ${e&&e}`,children:[y("h2",{className:"self-start pl-10 font-bold text-gray-800 dark:text-gray-300",children:"选择您的捐赠金额:"}),y("div",{className:"mt-2 flex gap-3",children:cee.map(o=>y(lee,{active:o===r,amount:o,onClick:a},o))}),y("div",{className:`mt-3 flex w-full flex-col overflow-hidden px-11 transition-[height] duration-500 ${r?"h-44":"h-0"}`,children:r&&L("div",{className:"flex w-full justify-between",children:[y("img",{src:B4[r][0],alt:"alipay",className:" h-44"}),y("img",{src:B4[r][1],alt:"weChat",className:" h-44"})]})}),r&&(r>=50||r===-1)&&y("span",{children:y("a",{className:"text-sm font-bold text-gray-500 underline-offset-4 hover:underline dark:text-gray-400",href:"https://wj.qq.com/s2/13329666/380d/",target:"_blank",rel:"noreferrer",children:"贴纸寄送地址问卷"})})]})},uee=""+new URL("sticker2-c633614c.jpg",import.meta.url).href,dee=""+new URL("sticker-adf57ed1.jpg",import.meta.url).href;function Ch(e){return e.split("-")[1]}function YE(e){return e==="y"?"height":"width"}function zs(e){return e.split("-")[0]}function Th(e){return["top","bottom"].includes(zs(e))?"x":"y"}function U4(e,t,r){let{reference:n,floating:a}=e;const o=n.x+n.width/2-a.width/2,i=n.y+n.height/2-a.height/2,s=Th(t),l=YE(s),u=n[l]/2-a[l]/2,f=s==="x";let c;switch(zs(t)){case"top":c={x:o,y:n.y-a.height};break;case"bottom":c={x:o,y:n.y+n.height};break;case"right":c={x:n.x+n.width,y:i};break;case"left":c={x:n.x-a.width,y:i};break;default:c={x:n.x,y:n.y}}switch(Ch(t)){case"start":c[s]-=u*(r&&f?-1:1);break;case"end":c[s]+=u*(r&&f?-1:1)}return c}const fee=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:i}=r,s=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:f,y:c}=U4(u,n,l),d=n,h={},g=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:o,platform:i,elements:s}=t,{element:l,padding:u=0}=Ah(e,t)||{};if(l==null)return{};const f=yD(u),c={x:r,y:n},d=Th(a),h=YE(d),g=await i.getDimensions(l),m=d==="y",w=m?"top":"left",v=m?"bottom":"right",b=m?"clientHeight":"clientWidth",_=o.reference[h]+o.reference[d]-c[d]-o.floating[h],$=c[d]-o.reference[d],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let O=C?C[b]:0;O&&await(i.isElement==null?void 0:i.isElement(C))||(O=s.floating[b]||o.floating[h]);const x=_/2-$/2,S=O/2-g[h]/2-1,A=s2(f[w],S),k=s2(f[v],S),N=A,P=O-g[h]-k,I=O/2-g[h]/2+x,E=l2(N,I,P),R=Ch(a)!=null&&I!=E&&o.reference[h]/2-(Ie.concat(t,t+"-start",t+"-end"),[]);const vee={left:"right",right:"left",bottom:"top",top:"bottom"};function $m(e){return e.replace(/left|right|bottom|top/g,t=>vee[t])}function mee(e,t,r){r===void 0&&(r=!1);const n=Ch(e),a=Th(e),o=YE(a);let i=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=$m(i)),{main:i,cross:$m(i)}}const yee={start:"end",end:"start"};function Q1(e){return e.replace(/start|end/g,t=>yee[t])}const bee=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:a,rects:o,initialPlacement:i,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:c,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=Ah(e,t),w=zs(n),v=zs(i)===i,b=await(s.isRTL==null?void 0:s.isRTL(l.floating)),_=c||(v||!g?[$m(i)]:function(N){const P=$m(N);return[Q1(N),P,Q1(P)]}(i));c||h==="none"||_.push(...function(N,P,I,E){const R=Ch(N);let F=function(B,j,M){const D=["left","right"],U=["right","left"],V=["top","bottom"],G=["bottom","top"];switch(B){case"top":case"bottom":return M?j?U:D:j?D:U;case"left":case"right":return j?V:G;default:return[]}}(zs(N),I==="start",E);return R&&(F=F.map(B=>B+"-"+R),P&&(F=F.concat(F.map(Q1)))),F}(i,g,h,b));const $=[i,..._],C=await bD(t,m),O=[];let x=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&O.push(C[w]),f){const{main:N,cross:P}=mee(n,o,b);O.push(C[N],C[P])}if(x=[...x,{placement:n,overflows:O}],!O.every(N=>N<=0)){var S,A;const N=(((S=a.flip)==null?void 0:S.index)||0)+1,P=$[N];if(P)return{data:{index:N,overflows:x},reset:{placement:P}};let I=(A=x.filter(E=>E.overflows[0]<=0).sort((E,R)=>E.overflows[1]-R.overflows[1])[0])==null?void 0:A.placement;if(!I)switch(d){case"bestFit":{var k;const E=(k=x.map(R=>[R.placement,R.overflows.filter(F=>F>0).reduce((F,B)=>F+B,0)]).sort((R,F)=>R[1]-F[1])[0])==null?void 0:k[0];E&&(I=E);break}case"initialPlacement":I=i}if(n!==I)return{reset:{placement:I}}}return{}}}},wee=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,a=await async function(o,i){const{placement:s,platform:l,elements:u}=o,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),c=zs(s),d=Ch(s),h=Th(s)==="x",g=["left","top"].includes(c)?-1:1,m=f&&h?-1:1,w=Ah(i,o);let{mainAxis:v,crossAxis:b,alignmentAxis:_}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...w};return d&&typeof _=="number"&&(b=d==="end"?-1*_:_),h?{x:b*m,y:v*g}:{x:v*g,y:b*m}}(t,e);return{x:r+a.x,y:n+a.y,data:a}}}};function _ee(e){return e==="x"?"y":"x"}const $ee=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:w=>{let{x:v,y:b}=w;return{x:v,y:b}}},...l}=Ah(e,t),u={x:r,y:n},f=await bD(t,l),c=Th(zs(a)),d=_ee(c);let h=u[c],g=u[d];if(o){const w=c==="y"?"bottom":"right";h=l2(h+f[c==="y"?"top":"left"],h,h-f[w])}if(i){const w=d==="y"?"bottom":"right";g=l2(g+f[d==="y"?"top":"left"],g,g-f[w])}const m=s.fn({...t,[c]:h,[d]:g});return{...m,data:{x:m.x-r,y:m.y-n}}}}};function Yr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ea(e){return Yr(e).getComputedStyle(e)}function wD(e){return e instanceof Yr(e).Node}function Fi(e){return wD(e)?(e.nodeName||"").toLowerCase():"#document"}function sa(e){return e instanceof HTMLElement||e instanceof Yr(e).HTMLElement}function z4(e){return typeof ShadowRoot<"u"&&(e instanceof Yr(e).ShadowRoot||e instanceof ShadowRoot)}function qf(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Ea(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function xee(e){return["table","td","th"].includes(Fi(e))}function c2(e){const t=XE(),r=Ea(e);return r.transform!=="none"||r.perspective!=="none"||!!r.containerType&&r.containerType!=="normal"||!t&&!!r.backdropFilter&&r.backdropFilter!=="none"||!t&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function XE(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function U0(e){return["html","body","#document"].includes(Fi(e))}const V4=Math.min,nf=Math.max,xm=Math.round,Bi=e=>({x:e,y:e});function _D(e){const t=Ea(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=sa(e),o=a?e.offsetWidth:r,i=a?e.offsetHeight:n,s=xm(r)!==o||xm(n)!==i;return s&&(r=o,n=i),{width:r,height:n,$:s}}function so(e){return e instanceof Element||e instanceof Yr(e).Element}function $D(e){return so(e)?e:e.contextElement}function Sc(e){const t=$D(e);if(!sa(t))return Bi(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:o}=_D(t);let i=(o?xm(r.width):r.width)/n,s=(o?xm(r.height):r.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const See=Bi(0);function xD(e){const t=Yr(e);return XE()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:See}function Yf(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),o=$D(e);let i=Bi(1);t&&(n?so(n)&&(i=Sc(n)):i=Sc(e));const s=function(d,h,g){return h===void 0&&(h=!1),!(!g||h&&g!==Yr(d))&&h}(o,r,n)?xD(o):Bi(0);let l=(a.left+s.x)/i.x,u=(a.top+s.y)/i.y,f=a.width/i.x,c=a.height/i.y;if(o){const d=Yr(o),h=n&&so(n)?Yr(n):n;let g=d.frameElement;for(;g&&n&&h!==d;){const m=Sc(g),w=g.getBoundingClientRect(),v=getComputedStyle(g),b=w.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,_=w.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,u*=m.y,f*=m.x,c*=m.y,l+=b,u+=_,g=Yr(g).frameElement}}return _m({width:f,height:c,x:l,y:u})}function z0(e){return so(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Si(e){var t;return(t=(wD(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function SD(e){return Yf(Si(e)).left+z0(e).scrollLeft}function Yc(e){if(Fi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||z4(e)&&e.host||Si(e);return z4(t)?t.host:t}function ED(e){const t=Yc(e);return U0(t)?e.ownerDocument?e.ownerDocument.body:e.body:sa(t)&&qf(t)?t:ED(t)}function CD(e,t){var r;t===void 0&&(t=[]);const n=ED(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),o=Yr(n);return a?t.concat(o,o.visualViewport||[],qf(n)?n:[]):t.concat(n,CD(n))}function W4(e,t,r){let n;if(t==="viewport")n=function(a,o){const i=Yr(a),s=Si(a),l=i.visualViewport;let u=s.clientWidth,f=s.clientHeight,c=0,d=0;if(l){u=l.width,f=l.height;const h=XE();(!h||h&&o==="fixed")&&(c=l.offsetLeft,d=l.offsetTop)}return{width:u,height:f,x:c,y:d}}(e,r);else if(t==="document")n=function(a){const o=Si(a),i=z0(a),s=a.ownerDocument.body,l=nf(o.scrollWidth,o.clientWidth,s.scrollWidth,s.clientWidth),u=nf(o.scrollHeight,o.clientHeight,s.scrollHeight,s.clientHeight);let f=-i.scrollLeft+SD(a);const c=-i.scrollTop;return Ea(s).direction==="rtl"&&(f+=nf(o.clientWidth,s.clientWidth)-l),{width:l,height:u,x:f,y:c}}(Si(e));else if(so(t))n=function(a,o){const i=Yf(a,!0,o==="fixed"),s=i.top+a.clientTop,l=i.left+a.clientLeft,u=sa(a)?Sc(a):Bi(1);return{width:a.clientWidth*u.x,height:a.clientHeight*u.y,x:l*u.x,y:s*u.y}}(t,r);else{const a=xD(e);n={...t,x:t.x-a.x,y:t.y-a.y}}return _m(n)}function TD(e,t){const r=Yc(e);return!(r===t||!so(r)||U0(r))&&(Ea(r).position==="fixed"||TD(r,t))}function Eee(e,t,r){const n=sa(t),a=Si(t),o=r==="fixed",i=Yf(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Bi(0);if(n||!n&&!o)if((Fi(t)!=="body"||qf(a))&&(s=z0(t)),sa(t)){const u=Yf(t,!0,o,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else a&&(l.x=SD(a));return{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function H4(e,t){return sa(e)&&Ea(e).position!=="fixed"?t?t(e):e.offsetParent:null}function G4(e,t){const r=Yr(e);if(!sa(e))return r;let n=H4(e,t);for(;n&&xee(n)&&Ea(n).position==="static";)n=H4(n,t);return n&&(Fi(n)==="html"||Fi(n)==="body"&&Ea(n).position==="static"&&!c2(n))?r:n||function(a){let o=Yc(a);for(;sa(o)&&!U0(o);){if(c2(o))return o;o=Yc(o)}return null}(e)||r}const Cee={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const a=sa(r),o=Si(r);if(r===o)return t;let i={scrollLeft:0,scrollTop:0},s=Bi(1);const l=Bi(0);if((a||!a&&n!=="fixed")&&((Fi(r)!=="body"||qf(o))&&(i=z0(r)),sa(r))){const u=Yf(r);s=Sc(r),l.x=u.x+r.clientLeft,l.y=u.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-i.scrollLeft*s.x+l.x,y:t.y*s.y-i.scrollTop*s.y+l.y}},getDocumentElement:Si,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const o=[...r==="clippingAncestors"?function(l,u){const f=u.get(l);if(f)return f;let c=CD(l).filter(m=>so(m)&&Fi(m)!=="body"),d=null;const h=Ea(l).position==="fixed";let g=h?Yc(l):l;for(;so(g)&&!U0(g);){const m=Ea(g),w=c2(g);w||m.position!=="fixed"||(d=null),(h?!w&&!d:!w&&m.position==="static"&&d&&["absolute","fixed"].includes(d.position)||qf(g)&&!w&&TD(l,g))?c=c.filter(v=>v!==g):d=m,g=Yc(g)}return u.set(l,c),c}(t,this._c):[].concat(r),n],i=o[0],s=o.reduce((l,u)=>{const f=W4(t,u,a);return l.top=nf(f.top,l.top),l.right=V4(f.right,l.right),l.bottom=V4(f.bottom,l.bottom),l.left=nf(f.left,l.left),l},W4(t,i,a));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:G4,getElementRects:async function(e){let{reference:t,floating:r,strategy:n}=e;const a=this.getOffsetParent||G4,o=this.getDimensions;return{reference:Eee(t,await a(r),n),floating:{x:0,y:0,...await o(r)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return _D(e)},getScale:Sc,isElement:so,isRTL:function(e){return getComputedStyle(e).direction==="rtl"}},K4=(e,t,r)=>{const n=new Map,a={platform:Cee,...r},o={...a.platform,_c:n};return fee(e,t,{...a,platform:o})};/* +* React Tooltip +* {@link https://github.com/ReactTooltip/react-tooltip} +* @copyright ReactTooltip Team +* @license MIT +*/const Tee="react-tooltip-core-styles",Aee="react-tooltip-base-styles";function q4({css:e,id:t=Aee,type:r="base",ref:n}){var a,o;if(r==="core"&&typeof process<"u"&&(!((a=process==null?void 0:process.env)===null||a===void 0)&&a.REACT_TOOLTIP_DISABLE_CORE_STYLES)||r!=="core"&&typeof process<"u"&&(!((o=process==null?void 0:process.env)===null||o===void 0)&&o.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;r==="core"&&(t=Tee),n||(n={});const{insertAt:i}=n;if(!e||typeof document>"u"||document.getElementById(t))return;const s=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=t,l.type="text/css",i==="top"&&s.firstChild?s.insertBefore(l,s.firstChild):s.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}const Y4=(e,t,r)=>{let n=null;return function(...a){const o=()=>{n=null,r||e.apply(this,a)};r&&!n&&(e.apply(this,a),n=setTimeout(o,t)),r||(n&&clearTimeout(n),n=setTimeout(o,t))}},Ree="DEFAULT_TOOLTIP_ID",Oee={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},kee=p.createContext({getTooltipData:()=>Oee});function AD(e=Ree){return p.useContext(kee).getTooltipData(e)}const Pee=typeof window<"u"?p.useLayoutEffect:p.useEffect,Iee=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some(r=>{const n=t.getPropertyValue(r);return n==="auto"||n==="scroll"})},X4=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Iee(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Z4=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:r=null,place:n="top",offset:a=10,strategy:o="absolute",middlewares:i=[wee(Number(a)),bee(),$ee({padding:5})],border:s})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:n};if(t===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:n};const l=i;return r?(l.push(pee({element:r,padding:5})),K4(e,t,{placement:n,strategy:o,middleware:l}).then(({x:u,y:f,placement:c,middlewareData:d})=>{var h,g;const m={left:`${u}px`,top:`${f}px`,border:s},{x:w,y:v}=(h=d.arrow)!==null&&h!==void 0?h:{x:0,y:0},b=(g={top:"bottom",right:"left",bottom:"top",left:"right"}[c.split("-")[0]])!==null&&g!==void 0?g:"bottom",_=s&&{top:{borderBottom:s,borderRight:s},right:{borderBottom:s,borderLeft:s},bottom:{borderTop:s,borderLeft:s},left:{borderTop:s,borderRight:s}}[c.split("-")[0]];let $=0;if(s){const C=`${s}`.match(/(\d+)px/);$=C!=null&&C[1]?Number(C[1]):1}return{tooltipStyles:m,tooltipArrowStyles:{left:w!=null?`${w}px`:"",top:v!=null?`${v}px`:"",right:"",bottom:"",..._,[b]:`-${4+$}px`},place:c}})):K4(e,t,{placement:"bottom",strategy:o,middleware:l}).then(({x:u,y:f,placement:c})=>({tooltipStyles:{left:`${u}px`,top:`${f}px`},tooltipArrowStyles:{},place:c}))};var Nee="core-styles-module_tooltip__3vRRp",Lee="core-styles-module_fixed__pcSol",Mee="core-styles-module_arrow__cvMwQ",Dee="core-styles-module_noArrow__xock6",jee="core-styles-module_clickable__ZuTTB",Fee="core-styles-module_show__Nt9eE",J1={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Bee=({id:e,className:t,classNameArrow:r,variant:n="dark",anchorId:a,anchorSelect:o,place:i="top",offset:s=10,events:l=["hover"],openOnClick:u=!1,positionStrategy:f="absolute",middlewares:c,wrapper:d,delayShow:h=0,delayHide:g=0,float:m=!1,hidden:w=!1,noArrow:v=!1,clickable:b=!1,closeOnEsc:_=!1,closeOnScroll:$=!1,closeOnResize:C=!1,style:O,position:x,afterShow:S,afterHide:A,content:k,contentWrapperRef:N,isOpen:P,setIsOpen:I,activeAnchor:E,setActiveAnchor:R,border:F,opacity:B})=>{const j=p.useRef(null),M=p.useRef(null),D=p.useRef(null),U=p.useRef(null),[V,G]=p.useState(i),[H,K]=p.useState({}),[Q,J]=p.useState({}),[de,ve]=p.useState(!1),[Ne,ue]=p.useState(!1),$e=p.useRef(!1),Oe=p.useRef(null),{anchorRefs:Le,setActiveAnchor:at}=AD(e),Wt=p.useRef(!1),[Ie,Xe]=p.useState([]),vt=p.useRef(!1),Br=u||l.includes("click");Pee(()=>(vt.current=!0,()=>{vt.current=!1}),[]),p.useEffect(()=>{if(!de){const q=setTimeout(()=>{ue(!1)},150);return()=>{clearTimeout(q)}}return()=>null},[de]);const mt=q=>{vt.current&&(q&&ue(!0),setTimeout(()=>{vt.current&&(I==null||I(q),P===void 0&&ve(q))},10))};p.useEffect(()=>{if(P===void 0)return()=>null;P&&ue(!0);const q=setTimeout(()=>{ve(P)},10);return()=>{clearTimeout(q)}},[P]),p.useEffect(()=>{de!==$e.current&&($e.current=de,de?S==null||S():A==null||A())},[de]);const hr=(q=g)=>{U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{Wt.current||mt(!1)},q)},$t=q=>{var le;if(!q)return;const Ee=(le=q.currentTarget)!==null&&le!==void 0?le:q.target;if(!(Ee!=null&&Ee.isConnected))return R(null),void at({current:null});h?(D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{mt(!0)},h)):mt(!0),R(Ee),at({current:Ee}),U.current&&clearTimeout(U.current)},Ht=()=>{b?hr(g||100):g?hr():mt(!1),D.current&&clearTimeout(D.current)},gn=({x:q,y:le})=>{Z4({place:i,offset:s,elementReference:{getBoundingClientRect:()=>({x:q,y:le,width:0,height:0,top:le,left:q,right:q,bottom:le})},tooltipReference:j.current,tooltipArrowReference:M.current,strategy:f,middlewares:c,border:F}).then(Ee=>{Object.keys(Ee.tooltipStyles).length&&K(Ee.tooltipStyles),Object.keys(Ee.tooltipArrowStyles).length&&J(Ee.tooltipArrowStyles),G(Ee.place)})},$l=q=>{if(!q)return;const le=q,Ee={x:le.clientX,y:le.clientY};gn(Ee),Oe.current=Ee},zo=q=>{$t(q),g&&hr()},os=q=>{var le;[document.querySelector(`[id='${a}']`),...Ie].some(Ee=>Ee==null?void 0:Ee.contains(q.target))||!((le=j.current)===null||le===void 0)&&le.contains(q.target)||(mt(!1),D.current&&clearTimeout(D.current))},qu=Y4($t,50,!0),gp=Y4(Ht,50,!0);p.useEffect(()=>{var q,le;const Ee=new Set(Le);Ie.forEach(Fa=>{Ee.add({current:Fa})});const zn=document.querySelector(`[id='${a}']`);zn&&Ee.add({current:zn});const Tt=()=>{mt(!1)},It=X4(E),Gt=X4(j.current);$&&(window.addEventListener("scroll",Tt),It==null||It.addEventListener("scroll",Tt),Gt==null||Gt.addEventListener("scroll",Tt)),C&&window.addEventListener("resize",Tt);const xl=Fa=>{Fa.key==="Escape"&&mt(!1)};_&&window.addEventListener("keydown",xl);const is=[];Br?(window.addEventListener("click",os),is.push({event:"click",listener:zo})):(is.push({event:"mouseenter",listener:qu},{event:"mouseleave",listener:gp},{event:"focus",listener:qu},{event:"blur",listener:gp}),m&&is.push({event:"mousemove",listener:$l}));const C5=()=>{Wt.current=!0},T5=()=>{Wt.current=!1,Ht()};return b&&!Br&&((q=j.current)===null||q===void 0||q.addEventListener("mouseenter",C5),(le=j.current)===null||le===void 0||le.addEventListener("mouseleave",T5)),is.forEach(({event:Fa,listener:Yu})=>{Ee.forEach(t1=>{var Xu;(Xu=t1.current)===null||Xu===void 0||Xu.addEventListener(Fa,Yu)})}),()=>{var Fa,Yu;$&&(window.removeEventListener("scroll",Tt),It==null||It.removeEventListener("scroll",Tt),Gt==null||Gt.removeEventListener("scroll",Tt)),C&&window.removeEventListener("resize",Tt),Br&&window.removeEventListener("click",os),_&&window.removeEventListener("keydown",xl),b&&!Br&&((Fa=j.current)===null||Fa===void 0||Fa.removeEventListener("mouseenter",C5),(Yu=j.current)===null||Yu===void 0||Yu.removeEventListener("mouseleave",T5)),is.forEach(({event:t1,listener:Xu})=>{Ee.forEach(uW=>{var r1;(r1=uW.current)===null||r1===void 0||r1.removeEventListener(t1,Xu)})})}},[Ne,Le,Ie,_,l]),p.useEffect(()=>{let q=o??"";!q&&e&&(q=`[data-tooltip-id='${e}']`);const le=new MutationObserver(Ee=>{const zn=[];Ee.forEach(Tt=>{if(Tt.type==="attributes"&&Tt.attributeName==="data-tooltip-id"&&Tt.target.getAttribute("data-tooltip-id")===e&&zn.push(Tt.target),Tt.type==="childList"&&(E&&[...Tt.removedNodes].some(It=>{var Gt;return!!(!((Gt=It==null?void 0:It.contains)===null||Gt===void 0)&&Gt.call(It,E))&&(ue(!1),mt(!1),R(null),D.current&&clearTimeout(D.current),U.current&&clearTimeout(U.current),!0)}),q))try{const It=[...Tt.addedNodes].filter(Gt=>Gt.nodeType===1);zn.push(...It.filter(Gt=>Gt.matches(q))),zn.push(...It.flatMap(Gt=>[...Gt.querySelectorAll(q)]))}catch{}}),zn.length&&Xe(Tt=>[...Tt,...zn])});return le.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{le.disconnect()}},[e,o,E]);const Ft=()=>{x?gn(x):m?Oe.current&&gn(Oe.current):Z4({place:i,offset:s,elementReference:E,tooltipReference:j.current,tooltipArrowReference:M.current,strategy:f,middlewares:c,border:F}).then(q=>{vt.current&&(Object.keys(q.tooltipStyles).length&&K(q.tooltipStyles),Object.keys(q.tooltipArrowStyles).length&&J(q.tooltipArrowStyles),G(q.place))})};p.useEffect(()=>{Ft()},[de,E,k,O,i,s,f,x]),p.useEffect(()=>{if(!(N!=null&&N.current))return()=>null;const q=new ResizeObserver(()=>{Ft()});return q.observe(N.current),()=>{q.disconnect()}},[k,N==null?void 0:N.current]),p.useEffect(()=>{var q;const le=document.querySelector(`[id='${a}']`),Ee=[...Ie,le];E&&Ee.includes(E)||R((q=Ie[0])!==null&&q!==void 0?q:le)},[a,Ie,E]),p.useEffect(()=>()=>{D.current&&clearTimeout(D.current),U.current&&clearTimeout(U.current)},[]),p.useEffect(()=>{let q=o;if(!q&&e&&(q=`[data-tooltip-id='${e}']`),q)try{const le=Array.from(document.querySelectorAll(q));Xe(le)}catch{Xe([])}},[e,o]);const Ur=!w&&k&&de&&Object.keys(H).length>0;return Ne?Y.createElement(d,{id:e,role:"tooltip",className:qr("react-tooltip",Nee,J1.tooltip,J1[n],t,`react-tooltip__place-${V}`,{[Fee]:Ur,[Lee]:f==="fixed",[jee]:b}),style:{...O,...H,opacity:B!==void 0&&Ur?B:void 0},ref:j},k,Y.createElement(d,{className:qr("react-tooltip-arrow",Mee,J1.arrow,r,{[Dee]:v}),style:Q,ref:M})):null},Uee=({content:e})=>Y.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),zee=({id:e,anchorId:t,anchorSelect:r,content:n,html:a,render:o,className:i,classNameArrow:s,variant:l="dark",place:u="top",offset:f=10,wrapper:c="div",children:d=null,events:h=["hover"],openOnClick:g=!1,positionStrategy:m="absolute",middlewares:w,delayShow:v=0,delayHide:b=0,float:_=!1,hidden:$=!1,noArrow:C=!1,clickable:O=!1,closeOnEsc:x=!1,closeOnScroll:S=!1,closeOnResize:A=!1,style:k,position:N,isOpen:P,border:I,opacity:E,setIsOpen:R,afterShow:F,afterHide:B})=>{const[j,M]=p.useState(n),[D,U]=p.useState(a),[V,G]=p.useState(u),[H,K]=p.useState(l),[Q,J]=p.useState(f),[de,ve]=p.useState(v),[Ne,ue]=p.useState(b),[$e,Oe]=p.useState(_),[Le,at]=p.useState($),[Wt,Ie]=p.useState(c),[Xe,vt]=p.useState(h),[Br,mt]=p.useState(m),[hr,$t]=p.useState(null),{anchorRefs:Ht,activeAnchor:gn}=AD(e),$l=Ft=>Ft==null?void 0:Ft.getAttributeNames().reduce((Ur,q)=>{var le;return q.startsWith("data-tooltip-")&&(Ur[q.replace(/^data-tooltip-/,"")]=(le=Ft==null?void 0:Ft.getAttribute(q))!==null&&le!==void 0?le:null),Ur},{}),zo=Ft=>{const Ur={place:q=>{var le;G((le=q)!==null&&le!==void 0?le:u)},content:q=>{M(q??n)},html:q=>{U(q??a)},variant:q=>{var le;K((le=q)!==null&&le!==void 0?le:l)},offset:q=>{J(q===null?f:Number(q))},wrapper:q=>{var le;Ie((le=q)!==null&&le!==void 0?le:c)},events:q=>{const le=q==null?void 0:q.split(" ");vt(le??h)},"position-strategy":q=>{var le;mt((le=q)!==null&&le!==void 0?le:m)},"delay-show":q=>{ve(q===null?v:Number(q))},"delay-hide":q=>{ue(q===null?b:Number(q))},float:q=>{Oe(q===null?_:q==="true")},hidden:q=>{at(q===null?$:q==="true")}};Object.values(Ur).forEach(q=>q(null)),Object.entries(Ft).forEach(([q,le])=>{var Ee;(Ee=Ur[q])===null||Ee===void 0||Ee.call(Ur,le)})};p.useEffect(()=>{M(n)},[n]),p.useEffect(()=>{U(a)},[a]),p.useEffect(()=>{G(u)},[u]),p.useEffect(()=>{K(l)},[l]),p.useEffect(()=>{J(f)},[f]),p.useEffect(()=>{ve(v)},[v]),p.useEffect(()=>{ue(b)},[b]),p.useEffect(()=>{Oe(_)},[_]),p.useEffect(()=>{at($)},[$]),p.useEffect(()=>{mt(m)},[m]),p.useEffect(()=>{var Ft;const Ur=new Set(Ht);let q=r;if(!q&&e&&(q=`[data-tooltip-id='${e}']`),q)try{document.querySelectorAll(q).forEach(It=>{Ur.add({current:It})})}catch{}const le=document.querySelector(`[id='${t}']`);if(le&&Ur.add({current:le}),!Ur.size)return()=>null;const Ee=(Ft=hr??le)!==null&&Ft!==void 0?Ft:gn.current,zn=new MutationObserver(It=>{It.forEach(Gt=>{var xl;if(!Ee||Gt.type!=="attributes"||!(!((xl=Gt.attributeName)===null||xl===void 0)&&xl.startsWith("data-tooltip-")))return;const is=$l(Ee);zo(is)})}),Tt={attributes:!0,childList:!1,subtree:!1};if(Ee){const It=$l(Ee);zo(It),zn.observe(Ee,Tt)}return()=>{zn.disconnect()}},[Ht,gn,hr,t,r]),p.useEffect(()=>{k!=null&&k.border,I&&CSS.supports("border",`${I}`),k!=null&&k.opacity,E&&CSS.supports("opacity",`${E}`)},[]);let os=d;const qu=p.useRef(null);if(o){const Ft=o({content:j??null,activeAnchor:hr});os=Ft?Y.createElement("div",{ref:qu,className:"react-tooltip-content-wrapper"},Ft):null}else j&&(os=j);D&&(os=Y.createElement(Uee,{content:D}));const gp={id:e,anchorId:t,anchorSelect:r,className:i,classNameArrow:s,content:os,contentWrapperRef:qu,place:V,variant:H,offset:Q,wrapper:Wt,events:Xe,openOnClick:g,positionStrategy:Br,middlewares:w,delayShow:de,delayHide:Ne,float:$e,hidden:Le,noArrow:C,clickable:O,closeOnEsc:x,closeOnScroll:S,closeOnResize:A,style:k,position:N,isOpen:P,border:I,opacity:E,setIsOpen:R,afterShow:F,afterHide:B,activeAnchor:hr,setActiveAnchor:Ft=>$t(Ft)};return Y.createElement(Bee,{...gp})};q4({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9}.core-styles-module_tooltip__3vRRp{visibility:hidden;position:absolute;top:0;left:0;pointer-events:none;opacity:0;transition:opacity 0.3s ease-out;will-change:opacity,visibility}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{visibility:visible;opacity:var(--rt-opacity)}",type:"core"}),q4({css:` +.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px;transform:rotate(45deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`});const Vee=e=>y("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...e,children:y("path",{fill:"currentColor",d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8"})}),Wee=e=>L("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...e,children:[y("path",{fill:"currentColor",d:"M16 10.5c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5s.448-1.5 1-1.5s1 .672 1 1.5m-6 0c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5S8.448 9 9 9s1 .672 1 1.5"}),y("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.943 1.25h.114c2.309 0 4.118 0 5.53.19c1.444.194 2.584.6 3.479 1.494c.895.895 1.3 2.035 1.494 3.48c.19 1.411.19 3.22.19 5.529V15A7.75 7.75 0 0 1 15 22.75h-3.057c-2.309 0-4.118 0-5.53-.19c-1.444-.194-2.584-.6-3.479-1.494c-.895-.895-1.3-2.035-1.494-3.48c-.19-1.411-.19-3.22-.19-5.529v-.114c0-2.309 0-4.118.19-5.53c.194-1.444.6-2.584 1.494-3.479c.895-.895 2.035-1.3 3.48-1.494c1.411-.19 3.22-.19 5.529-.19m-5.33 1.676c-1.278.172-2.049.5-2.618 1.069c-.57.57-.897 1.34-1.069 2.619c-.174 1.3-.176 3.008-.176 5.386s.002 4.086.176 5.386c.172 1.279.5 2.05 1.069 2.62c.57.569 1.34.896 2.619 1.068c1.3.174 3.008.176 5.386.176h2.25c.004-1.366.034-2.264.281-3.027a5.8 5.8 0 0 1 .741-1.496A5.76 5.76 0 0 1 12 17.75a5.77 5.77 0 0 1-3.447-1.148a.75.75 0 1 1 .894-1.204c.728.54 1.607.852 2.553.852s1.825-.313 2.553-.852a.75.75 0 0 1 1.183.744a5.75 5.75 0 0 1 2.487-1.61c.763-.248 1.66-.278 3.027-.282V12c0-2.378-.002-4.086-.176-5.386c-.172-1.279-.5-2.05-1.069-2.62c-.57-.569-1.34-.896-2.619-1.068c-1.3-.174-3.008-.176-5.386-.176s-4.086.002-5.386.176m14.592 12.825c-1.357.006-1.999.038-2.518.207a4.25 4.25 0 0 0-2.729 2.729c-.169.52-.2 1.161-.207 2.518a6.25 6.25 0 0 0 5.454-5.454",clipRule:"evenodd"})]});globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const RD=({className:e})=>L(De,{children:[L("div",{"data-tooltip-id":"sticker-btn",className:`w-max cursor-pointer rounded border-2 border-dashed border-gray-300 p-1.5 indent-0 text-sm font-bold text-gray-500 transition-all hover:border-indigo-500 hover:text-indigo-500 + dark:text-gray-300 + ${e}`,children:[y(Wee,{className:"mb-[2px] mr-2 inline-block text-sm "}),"查看贴纸"]}),L(zee,{id:"sticker-btn",opacity:1,className:`flex flex-col items-center justify-center gap-2 rounded-lg !bg-gray-100 !p-4 shadow-lg shadow-gray-300 + dark:!bg-gray-800 dark:text-gray-300 dark:shadow-lg dark:shadow-gray-700`,children:[L("div",{className:"flex gap-2",children:[y("img",{src:dee,alt:"alipay",className:" h-44 rounded shadow-lg shadow-gray-300 dark:shadow-gray-700"}),y("img",{src:uee,alt:"alipay",className:" h-44 rounded shadow-lg shadow-gray-300 dark:shadow-gray-700"})]}),L("span",{className:"mt-3 text-xs font-bold text-gray-500",children:[y(Vee,{className:"mb-[3px] mr-1 inline-block"}),"此贴纸非商品,仅用于感谢您的捐赠,不可用于任何商业用途"]})]})]}),Hee=""+new URL("redBook-code-376dffeb.jpg",import.meta.url).href;var Gee=Object.defineProperty,Kee=(e,t,r)=>t in e?Gee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eb=(e,t,r)=>(Kee(e,typeof t!="symbol"?t+"":t,r),r);let qee=class{constructor(){eb(this,"current",this.detect()),eb(this,"handoffState","pending"),eb(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},lo=new qee,gt=(e,t)=>{lo.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function dr(e){let t=p.useRef(e);return gt(()=>{t.current=e},[e]),t}function OD(e,t){let[r,n]=p.useState(e),a=dr(e);return gt(()=>n(a.current),[a,n,...t]),r}function Ru(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function _o(){let e=[],t={addEventListener(r,n,a,o){return r.addEventListener(n,a,o),t.add(()=>r.removeEventListener(n,a,o))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Ru(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,a){let o=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:a}),this.add(()=>{Object.assign(r.style,{[n]:o})})},group(r){let n=_o();return r(n),this.add(()=>n.dispose())},add(r){return e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let a of e.splice(n,1))a()}},dispose(){for(let r of e.splice(0))r()}};return t}function Ui(){let[e]=p.useState(_o);return p.useEffect(()=>()=>e.dispose(),[e]),e}let re=function(e){let t=dr(e);return Y.useCallback((...r)=>t.current(...r),[t])};function Ou(){let[e,t]=p.useState(lo.isHandoffComplete);return e&&lo.isHandoffComplete===!1&&t(!1),p.useEffect(()=>{e!==!0&&t(!0)},[e]),p.useEffect(()=>lo.handoff(),[]),e}var Q4;let Pt=(Q4=Y.useId)!=null?Q4:function(){let e=Ou(),[t,r]=Y.useState(e?()=>lo.nextId():null);return gt(()=>{t===null&&r(lo.nextId())},[t]),t!=null?""+t:void 0};function Re(e,t,...r){if(e in t){let a=t[e];return typeof a=="function"?a(...r):a}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(a=>`"${a}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Re),n}function Rh(e){return lo.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let u2=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var et=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(et||{}),to=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(to||{}),Yee=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Yee||{});function V0(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(u2)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var W0=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(W0||{});function ZE(e,t=0){var r;return e===((r=Rh(e))==null?void 0:r.body)?!1:Re(t,{[0](){return e.matches(u2)},[1](){let n=e;for(;n!==null;){if(n.matches(u2))return!0;n=n.parentElement}return!1}})}var Xee=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Xee||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Vs(e){e==null||e.focus({preventScroll:!0})}let Zee=["textarea","input"].join(",");function Qee(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Zee))!=null?r:!1}function Is(e,t=r=>r){return e.slice().sort((r,n)=>{let a=t(r),o=t(n);if(a===null||o===null)return 0;let i=a.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function qt(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:a=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?r?Is(e):e:V0(e);a.length>0&&i.length>1&&(i=i.filter(h=>!a.includes(h))),n=n??o.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(n))-1;if(t&4)return Math.max(0,i.indexOf(n))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},f=0,c=i.length,d;do{if(f>=c||f+c<=0)return 0;let h=l+f;if(t&16)h=(h+c)%c;else{if(h<0)return 3;if(h>=c)return 1}d=i[h],d==null||d.focus(u),f+=s}while(d!==o.activeElement);return t&6&&Qee(d)&&d.select(),2}function tb(e,t,r){let n=dr(t);p.useEffect(()=>{function a(o){n.current(o)}return document.addEventListener(e,a,r),()=>document.removeEventListener(e,a,r)},[e,r])}function QE(e,t,r=!0){let n=p.useRef(!1);p.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function a(i,s){if(!n.current||i.defaultPrevented)return;let l=function f(c){return typeof c=="function"?f(c()):Array.isArray(c)||c instanceof Set?c:[c]}(e),u=s(i);if(u!==null&&u.getRootNode().contains(u)){for(let f of l){if(f===null)continue;let c=f instanceof HTMLElement?f:f.current;if(c!=null&&c.contains(u)||i.composed&&i.composedPath().includes(c))return}return!ZE(u,W0.Loose)&&u.tabIndex!==-1&&i.preventDefault(),t(i,u)}}let o=p.useRef(null);tb("mousedown",i=>{var s,l;n.current&&(o.current=((l=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:l[0])||i.target)},!0),tb("click",i=>{o.current&&(a(i,()=>o.current),o.current=null)},!0),tb("blur",i=>a(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function J4(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function H0(e,t){let[r,n]=p.useState(()=>J4(e));return gt(()=>{n(J4(e))},[e.type,e.as]),gt(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[r,t]),r}let kD=Symbol();function PD(e,t=!0){return Object.assign(e,{[kD]:t})}function We(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let r=re(n=>{for(let a of t.current)a!=null&&(typeof a=="function"?a(n):a.current=n)});return e.every(n=>n==null||(n==null?void 0:n[kD]))?void 0:r}function Jee(e){throw new Error("Unexpected object: "+e)}var Pr=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Pr||{});function ete(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),a=n??-1,o=(()=>{switch(e.focus){case 0:return r.findIndex(i=>!t.resolveDisabled(i));case 1:{let i=r.slice().reverse().findIndex((s,l,u)=>a!==-1&&u.length-l-1>=a?!1:!t.resolveDisabled(s));return i===-1?i:r.length-1-i}case 2:return r.findIndex((i,s)=>s<=a?!1:!t.resolveDisabled(i));case 3:{let i=r.slice().reverse().findIndex(s=>!t.resolveDisabled(s));return i===-1?i:r.length-1-i}case 4:return r.findIndex(i=>t.resolveId(i)===e.id);case 5:return null;default:Jee(e)}})();return o===-1?n:o}function d2(...e){return e.filter(Boolean).join(" ")}var Pn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Pn||{}),ro=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ro||{});function Fe({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:a,visible:o=!0,name:i}){let s=ID(t,e);if(o)return Xp(s,r,n,i);let l=a??0;if(l&2){let{static:u=!1,...f}=s;if(u)return Xp(f,r,n,i)}if(l&1){let{unmount:u=!0,...f}=s;return Re(u?0:1,{[0](){return null},[1](){return Xp({...f,hidden:!0,style:{display:"none"}},r,n,i)}})}return Xp(s,r,n,i)}function Xp(e,t={},r,n){let{as:a=r,children:o,refName:i="ref",...s}=rb(e,["unmount","static"]),l=e.ref!==void 0?{[i]:e.ref}:{},u=typeof o=="function"?o(t):o;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t));let f={};if(t){let c=!1,d=[];for(let[h,g]of Object.entries(t))typeof g=="boolean"&&(c=!0),g===!0&&d.push(h);c&&(f["data-headlessui-state"]=d.join(" "))}if(a===p.Fragment&&Object.keys(Sm(s)).length>0){if(!p.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(g=>` - ${g}`).join(` +`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(` +`)].join(` +`));let c=u.props,d=typeof(c==null?void 0:c.className)=="function"?(...g)=>d2(c==null?void 0:c.className(...g),s.className):d2(c==null?void 0:c.className,s.className),h=d?{className:d}:{};return p.cloneElement(u,Object.assign({},ID(u.props,Sm(rb(s,["ref"]))),f,l,tte(u.ref,l.ref),h))}return p.createElement(a,Object.assign({},rb(s,["ref"]),a!==p.Fragment&&l,a!==p.Fragment&&f),u)}function tte(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}}function ID(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let a in n)a.startsWith("on")&&typeof n[a]=="function"?(r[a]!=null||(r[a]=[]),r[a].push(n[a])):t[a]=n[a];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(t,{[n](a,...o){let i=r[n];for(let s of i){if((a instanceof Event||(a==null?void 0:a.nativeEvent)instanceof Event)&&a.defaultPrevented)return;s(a,...o)}}});return t}function Be(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Sm(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function rb(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function Oh(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&rte(r)?!1:n}function rte(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function ND(e={},t=null,r=[]){for(let[n,a]of Object.entries(e))MD(r,LD(t,n),a);return r}function LD(e,t){return e?e+"["+t+"]":t}function MD(e,t,r){if(Array.isArray(r))for(let[n,a]of r.entries())MD(e,LD(t,n.toString()),a);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):ND(r,t,e)}function nte(e){var t;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let n of r.elements)if(n.tagName==="INPUT"&&n.type==="submit"||n.tagName==="BUTTON"&&n.type==="submit"||n.nodeName==="INPUT"&&n.type==="image"){n.click();return}}}let ate="div";var Ca=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ca||{});function ote(e,t){let{features:r=1,...n}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Fe({ourProps:a,theirProps:n,slot:{},defaultTag:ate,name:"Hidden"})}let Ta=Be(ote),JE=p.createContext(null);JE.displayName="OpenClosedContext";var ut=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ut||{});function ku(){return p.useContext(JE)}function eC({value:e,children:t}){return Y.createElement(JE.Provider,{value:e},t)}var ye=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ye||{});function DD(e,t,r){let[n,a]=p.useState(r),o=e!==void 0,i=p.useRef(o),s=p.useRef(!1),l=p.useRef(!1);return o&&!i.current&&!s.current?(s.current=!0,i.current=o):!o&&i.current&&!l.current&&(l.current=!0,i.current=o),[o?e:n,re(u=>(o||a(u),t==null?void 0:t(u)))]}function tC(e,t){let r=p.useRef([]),n=re(e);p.useEffect(()=>{let a=[...r.current];for(let[o,i]of t.entries())if(r.current[o]!==i){let s=n(t,a);return r.current=t,s}},[n,...t])}function eA(e){return[e.screenX,e.screenY]}function ite(){let e=p.useRef([-1,-1]);return{wasMoved(t){let r=eA(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=eA(t)}}}function ste(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function lte(e,t,r){let n=dr(t);p.useEffect(()=>{function a(o){n.current(o)}return window.addEventListener(e,a,r),()=>window.removeEventListener(e,a,r)},[e,r])}var Xr=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Xr||{});function rC(){let e=p.useRef(0);return lte("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function kh(){let e=p.useRef(!1);return gt(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function gl(...e){return p.useMemo(()=>Rh(...e),[...e])}function nC(e,t,r,n){let a=dr(r);p.useEffect(()=>{e=e??window;function o(i){a.current(i)}return e.addEventListener(t,o,n),()=>e.removeEventListener(t,o,n)},[e,t,n])}function cte(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function jD(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let r of e.current)r.current instanceof HTMLElement&&t.add(r.current);return t}let ute="div";var FD=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(FD||{});function dte(e,t){let r=p.useRef(null),n=We(r,t),{initialFocus:a,containers:o,features:i=30,...s}=e;Ou()||(i=1);let l=gl(r);pte({ownerDocument:l},!!(i&16));let u=gte({ownerDocument:l,container:r,initialFocus:a},!!(i&2));vte({ownerDocument:l,container:r,containers:o,previousActiveElement:u},!!(i&8));let f=rC(),c=re(m=>{let w=r.current;w&&(v=>v())(()=>{Re(f.current,{[Xr.Forwards]:()=>{qt(w,et.First,{skipElements:[m.relatedTarget]})},[Xr.Backwards]:()=>{qt(w,et.Last,{skipElements:[m.relatedTarget]})}})})}),d=Ui(),h=p.useRef(!1),g={ref:n,onKeyDown(m){m.key=="Tab"&&(h.current=!0,d.requestAnimationFrame(()=>{h.current=!1}))},onBlur(m){let w=jD(o);r.current instanceof HTMLElement&&w.add(r.current);let v=m.relatedTarget;v instanceof HTMLElement&&v.dataset.headlessuiFocusGuard!=="true"&&(BD(w,v)||(h.current?qt(r.current,Re(f.current,{[Xr.Forwards]:()=>et.Next,[Xr.Backwards]:()=>et.Previous})|et.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&Vs(m.target)))}};return Y.createElement(Y.Fragment,null,!!(i&4)&&Y.createElement(Ta,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:c,features:Ca.Focusable}),Fe({ourProps:g,theirProps:s,defaultTag:ute,name:"FocusTrap"}),!!(i&4)&&Y.createElement(Ta,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:c,features:Ca.Focusable}))}let fte=Be(dte),cd=Object.assign(fte,{features:FD}),ni=[];cte(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&ni[0]!==t.target&&(ni.unshift(t.target),ni=ni.filter(r=>r!=null&&r.isConnected),ni.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function hte(e=!0){let t=p.useRef(ni.slice());return tC(([r],[n])=>{n===!0&&r===!1&&Ru(()=>{t.current.splice(0)}),n===!1&&r===!0&&(t.current=ni.slice())},[e,ni,t]),re(()=>{var r;return(r=t.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function pte({ownerDocument:e},t){let r=hte(t);tC(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Vs(r())},[t]);let n=p.useRef(!1);p.useEffect(()=>(n.current=!1,()=>{n.current=!0,Ru(()=>{n.current&&Vs(r())})}),[])}function gte({ownerDocument:e,container:t,initialFocus:r},n){let a=p.useRef(null),o=kh();return tC(()=>{if(!n)return;let i=t.current;i&&Ru(()=>{if(!o.current)return;let s=e==null?void 0:e.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===s){a.current=s;return}}else if(i.contains(s)){a.current=s;return}r!=null&&r.current?Vs(r.current):(qt(i,et.First),to.Error),a.current=e==null?void 0:e.activeElement})},[n]),a}function vte({ownerDocument:e,container:t,containers:r,previousActiveElement:n},a){let o=kh();nC(e==null?void 0:e.defaultView,"focus",i=>{if(!a||!o.current)return;let s=jD(r);t.current instanceof HTMLElement&&s.add(t.current);let l=n.current;if(!l)return;let u=i.target;u&&u instanceof HTMLElement?BD(s,u)?(n.current=u,Vs(u)):(i.preventDefault(),i.stopPropagation(),Vs(l)):Vs(n.current)},!0)}function BD(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let UD=p.createContext(!1);function mte(){return p.useContext(UD)}function f2(e){return Y.createElement(UD.Provider,{value:e.force},e.children)}function yte(e){let t=mte(),r=p.useContext(zD),n=gl(e),[a,o]=p.useState(()=>{if(!t&&r!==null||lo.isServer)return null;let i=n==null?void 0:n.getElementById("headlessui-portal-root");if(i)return i;if(n===null)return null;let s=n.createElement("div");return s.setAttribute("id","headlessui-portal-root"),n.body.appendChild(s)});return p.useEffect(()=>{a!==null&&(n!=null&&n.body.contains(a)||n==null||n.body.appendChild(a))},[a,n]),p.useEffect(()=>{t||r!==null&&o(r.current)},[r,o,t]),a}let bte=p.Fragment;function wte(e,t){let r=e,n=p.useRef(null),a=We(PD(f=>{n.current=f}),t),o=gl(n),i=yte(n),[s]=p.useState(()=>{var f;return lo.isServer?null:(f=o==null?void 0:o.createElement("div"))!=null?f:null}),l=Ou(),u=p.useRef(!1);return gt(()=>{if(u.current=!1,!(!i||!s))return i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s)),()=>{u.current=!0,Ru(()=>{var f;u.current&&(!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((f=i.parentElement)==null||f.removeChild(i))))})}},[i,s]),l?!i||!s?null:qi.createPortal(Fe({ourProps:{ref:a},theirProps:r,defaultTag:bte,name:"Portal"}),s):null}let _te=p.Fragment,zD=p.createContext(null);function $te(e,t){let{target:r,...n}=e,a={ref:We(t)};return Y.createElement(zD.Provider,{value:r},Fe({ourProps:a,theirProps:n,defaultTag:_te,name:"Popover.Group"}))}let xte=Be(wte),Ste=Be($te),h2=Object.assign(xte,{Group:Ste}),VD=p.createContext(null);function WD(){let e=p.useContext(VD);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,WD),t}return e}function HD(){let[e,t]=p.useState([]);return[e.length>0?e.join(" "):void 0,p.useMemo(()=>function(r){let n=re(o=>(t(i=>[...i,o]),()=>t(i=>{let s=i.slice(),l=s.indexOf(o);return l!==-1&&s.splice(l,1),s}))),a=p.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return Y.createElement(VD.Provider,{value:a},r.children)},[t])]}let Ete="p";function Cte(e,t){let r=Pt(),{id:n=`headlessui-description-${r}`,...a}=e,o=WD(),i=We(t);gt(()=>o.register(n),[n,o.register]);let s={ref:i,...o.props,id:n};return Fe({ourProps:s,theirProps:a,slot:o.slot||{},defaultTag:Ete,name:o.name||"Description"})}let Tte=Be(Cte),GD=Object.assign(Tte,{}),aC=p.createContext(()=>{});aC.displayName="StackContext";var p2=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(p2||{});function Ate(){return p.useContext(aC)}function Rte({children:e,onUpdate:t,type:r,element:n,enabled:a}){let o=Ate(),i=re((...s)=>{t==null||t(...s),o(...s)});return gt(()=>{let s=a===void 0||a===!0;return s&&i(0,r,n),()=>{s&&i(1,r,n)}},[i,r,n,a]),Y.createElement(aC.Provider,{value:i},e)}function Ote(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const kte=typeof Object.is=="function"?Object.is:Ote,{useState:Pte,useEffect:Ite,useLayoutEffect:Nte,useDebugValue:Lte}=Ks;function Mte(e,t,r){const n=t(),[{inst:a},o]=Pte({inst:{value:n,getSnapshot:t}});return Nte(()=>{a.value=n,a.getSnapshot=t,nb(a)&&o({inst:a})},[e,n,t]),Ite(()=>(nb(a)&&o({inst:a}),e(()=>{nb(a)&&o({inst:a})})),[e]),Lte(n),n}function nb(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!kte(r,n)}catch{return!0}}function Dte(e,t,r){return t()}const jte=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fte=!jte,Bte=Fte?Dte:Mte,Ute="useSyncExternalStore"in Ks?(e=>e.useSyncExternalStore)(Ks):Bte;function zte(e){return Ute(e.subscribe,e.getSnapshot,e.getSnapshot)}function Vte(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(a){return n.add(a),()=>n.delete(a)},dispatch(a,...o){let i=t[a].call(r,...o);i&&(r=i,n.forEach(s=>s()))}}}function Wte(){let e;return{before({doc:t}){var r;let n=t.documentElement;e=((r=t.defaultView)!=null?r:window).innerWidth-n.clientWidth},after({doc:t,d:r}){let n=t.documentElement,a=n.clientWidth-n.offsetWidth,o=e-a;r.style(n,"paddingRight",`${o}px`)}}}function Hte(){if(!ste())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:r,meta:n}){function a(i){return n.containers.flatMap(s=>s()).some(s=>s.contains(i))}r.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let o=null;r.addEventListener(t,"click",i=>{if(i.target instanceof HTMLElement)try{let s=i.target.closest("a");if(!s)return;let{hash:l}=new URL(s.href),u=t.querySelector(l);u&&!a(u)&&(o=u)}catch{}},!0),r.addEventListener(t,"touchmove",i=>{i.target instanceof HTMLElement&&!a(i.target)&&i.preventDefault()},{passive:!1}),r.add(()=>{window.scrollTo(0,window.pageYOffset+e),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})}}}function Gte(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Kte(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Ns=Vte(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:_o(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:Kte(r)},a=[Hte(),Wte(),Gte()];a.forEach(({before:o})=>o==null?void 0:o(n)),a.forEach(({after:o})=>o==null?void 0:o(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Ns.subscribe(()=>{let e=Ns.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",a=r.count!==0;(a&&!n||!a&&n)&&Ns.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Ns.dispatch("TEARDOWN",r)}});function qte(e,t,r){let n=zte(Ns),a=e?n.get(e):void 0,o=a?a.count>0:!1;return gt(()=>{if(!(!e||!t))return Ns.dispatch("PUSH",e,r),()=>Ns.dispatch("POP",e,r)},[t,e]),o}let ab=new Map,ud=new Map;function tA(e,t=!0){gt(()=>{var r;if(!t)return;let n=typeof e=="function"?e():e.current;if(!n)return;function a(){var i;if(!n)return;let s=(i=ud.get(n))!=null?i:1;if(s===1?ud.delete(n):ud.set(n,s-1),s!==1)return;let l=ab.get(n);l&&(l["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",l["aria-hidden"]),n.inert=l.inert,ab.delete(n))}let o=(r=ud.get(n))!=null?r:0;return ud.set(n,o+1),o!==0||(ab.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),a},[e,t])}var Yte=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Yte||{}),Xte=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Xte||{});let Zte={[0](e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Em=p.createContext(null);Em.displayName="DialogContext";function Ph(e){let t=p.useContext(Em);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ph),r}return t}function Qte(e,t,r=()=>[document.body]){qte(e,t,n=>{var a;return{containers:[...(a=n.containers)!=null?a:[],r]}})}function Jte(e,t){return Re(t.type,Zte,e,t)}let ere="div",tre=Pn.RenderStrategy|Pn.Static;function rre(e,t){let r=Pt(),{id:n=`headlessui-dialog-${r}`,open:a,onClose:o,initialFocus:i,__demoMode:s=!1,...l}=e,[u,f]=p.useState(0),c=ku();a===void 0&&c!==null&&(a=(c&ut.Open)===ut.Open);let d=p.useRef(null),h=We(d,t),g=p.useRef(null),m=gl(d),w=e.hasOwnProperty("open")||c!==null,v=e.hasOwnProperty("onClose");if(!w&&!v)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!w)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!v)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof a!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${a}`);if(typeof o!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${o}`);let b=a?0:1,[_,$]=p.useReducer(Jte,{titleId:null,descriptionId:null,panelRef:p.createRef()}),C=re(()=>o(!1)),O=re(K=>$({type:0,id:K})),x=Ou()?s?!1:b===0:!1,S=u>1,A=p.useContext(Em)!==null,k=S?"parent":"leaf",N=c!==null?(c&ut.Closing)===ut.Closing:!1,P=(()=>A||N?!1:x)(),I=p.useCallback(()=>{var K,Q;return(Q=Array.from((K=m==null?void 0:m.querySelectorAll("body > *"))!=null?K:[]).find(J=>J.id==="headlessui-portal-root"?!1:J.contains(g.current)&&J instanceof HTMLElement))!=null?Q:null},[g]);tA(I,P);let E=(()=>S?!0:x)(),R=p.useCallback(()=>{var K,Q;return(Q=Array.from((K=m==null?void 0:m.querySelectorAll("[data-headlessui-portal]"))!=null?K:[]).find(J=>J.contains(g.current)&&J instanceof HTMLElement))!=null?Q:null},[g]);tA(R,E);let F=re(()=>{var K,Q;return[...Array.from((K=m==null?void 0:m.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))!=null?K:[]).filter(J=>!(J===document.body||J===document.head||!(J instanceof HTMLElement)||J.contains(g.current)||_.panelRef.current&&J.contains(_.panelRef.current))),(Q=_.panelRef.current)!=null?Q:d.current]}),B=(()=>!(!x||S))();QE(()=>F(),C,B);let j=(()=>!(S||b!==0))();nC(m==null?void 0:m.defaultView,"keydown",K=>{j&&(K.defaultPrevented||K.key===ye.Escape&&(K.preventDefault(),K.stopPropagation(),C()))});let M=(()=>!(N||b!==0||A))();Qte(m,M,F),p.useEffect(()=>{if(b!==0||!d.current)return;let K=new ResizeObserver(Q=>{for(let J of Q){let de=J.target.getBoundingClientRect();de.x===0&&de.y===0&&de.width===0&&de.height===0&&C()}});return K.observe(d.current),()=>K.disconnect()},[b,d,C]);let[D,U]=HD(),V=p.useMemo(()=>[{dialogState:b,close:C,setTitleId:O},_],[b,_,C,O]),G=p.useMemo(()=>({open:b===0}),[b]),H={ref:h,id:n,role:"dialog","aria-modal":b===0?!0:void 0,"aria-labelledby":_.titleId,"aria-describedby":D};return Y.createElement(Rte,{type:"Dialog",enabled:b===0,element:d,onUpdate:re((K,Q)=>{Q==="Dialog"&&Re(K,{[p2.Add]:()=>f(J=>J+1),[p2.Remove]:()=>f(J=>J-1)})})},Y.createElement(f2,{force:!0},Y.createElement(h2,null,Y.createElement(Em.Provider,{value:V},Y.createElement(h2.Group,{target:d},Y.createElement(f2,{force:!1},Y.createElement(U,{slot:G,name:"Dialog.Description"},Y.createElement(cd,{initialFocus:i,containers:F,features:x?Re(k,{parent:cd.features.RestoreFocus,leaf:cd.features.All&~cd.features.FocusLock}):cd.features.None},Fe({ourProps:H,theirProps:l,slot:G,defaultTag:ere,features:tre,visible:b===0,name:"Dialog"})))))))),Y.createElement(Ta,{features:Ca.Hidden,ref:g}))}let nre="div";function are(e,t){let r=Pt(),{id:n=`headlessui-dialog-overlay-${r}`,...a}=e,[{dialogState:o,close:i}]=Ph("Dialog.Overlay"),s=We(t),l=re(f=>{if(f.target===f.currentTarget){if(Oh(f.currentTarget))return f.preventDefault();f.preventDefault(),f.stopPropagation(),i()}}),u=p.useMemo(()=>({open:o===0}),[o]);return Fe({ourProps:{ref:s,id:n,"aria-hidden":!0,onClick:l},theirProps:a,slot:u,defaultTag:nre,name:"Dialog.Overlay"})}let ore="div";function ire(e,t){let r=Pt(),{id:n=`headlessui-dialog-backdrop-${r}`,...a}=e,[{dialogState:o},i]=Ph("Dialog.Backdrop"),s=We(t);p.useEffect(()=>{if(i.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[i.panelRef]);let l=p.useMemo(()=>({open:o===0}),[o]);return Y.createElement(f2,{force:!0},Y.createElement(h2,null,Fe({ourProps:{ref:s,id:n,"aria-hidden":!0},theirProps:a,slot:l,defaultTag:ore,name:"Dialog.Backdrop"})))}let sre="div";function lre(e,t){let r=Pt(),{id:n=`headlessui-dialog-panel-${r}`,...a}=e,[{dialogState:o},i]=Ph("Dialog.Panel"),s=We(t,i.panelRef),l=p.useMemo(()=>({open:o===0}),[o]),u=re(f=>{f.stopPropagation()});return Fe({ourProps:{ref:s,id:n,onClick:u},theirProps:a,slot:l,defaultTag:sre,name:"Dialog.Panel"})}let cre="h2";function ure(e,t){let r=Pt(),{id:n=`headlessui-dialog-title-${r}`,...a}=e,[{dialogState:o,setTitleId:i}]=Ph("Dialog.Title"),s=We(t);p.useEffect(()=>(i(n),()=>i(null)),[n,i]);let l=p.useMemo(()=>({open:o===0}),[o]);return Fe({ourProps:{ref:s,id:n},theirProps:a,slot:l,defaultTag:cre,name:"Dialog.Title"})}let dre=Be(rre),fre=Be(ire),hre=Be(lre),pre=Be(are),gre=Be(ure),yr=Object.assign(dre,{Backdrop:fre,Panel:hre,Overlay:pre,Title:gre,Description:GD});var vre=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(vre||{}),mre=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(mre||{}),yre=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(yre||{}),bre=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(bre||{});function ob(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=Is(t(e.options.slice()),o=>o.dataRef.current.domRef.current),a=r?n.indexOf(r):null;return a===-1&&(a=null),{options:n,activeOptionIndex:a}}let wre={[1](e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},[0](e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,n=e.options.findIndex(a=>r(a.dataRef.current.value));return n!==-1&&(t=n),{...e,listboxState:0,activeOptionIndex:t}},[2](e,t){var r;if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=ob(e),a=ete(t,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeOptionIndex:a,activationTrigger:(r=t.trigger)!=null?r:1}},[3]:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(i=>{var s;return!i.dataRef.current.disabled&&((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(n))}),o=a?e.options.indexOf(a):-1;return o===-1||o===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:o,activationTrigger:1}},[4](e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},[5]:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},n=ob(e,a=>[...a,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(r)),{...e,...n}},[6]:(e,t)=>{let r=ob(e,n=>{let a=n.findIndex(o=>o.id===t.id);return a!==-1&&n.splice(a,1),n});return{...e,...r,activationTrigger:1}},[7]:(e,t)=>({...e,labelId:t.id})},oC=p.createContext(null);oC.displayName="ListboxActionsContext";function Ih(e){let t=p.useContext(oC);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ih),r}return t}let iC=p.createContext(null);iC.displayName="ListboxDataContext";function Nh(e){let t=p.useContext(iC);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Nh),r}return t}function _re(e,t){return Re(t.type,wre,e,t)}let $re=p.Fragment;function xre(e,t){let{value:r,defaultValue:n,form:a,name:o,onChange:i,by:s=(H,K)=>H===K,disabled:l=!1,horizontal:u=!1,multiple:f=!1,...c}=e;const d=u?"horizontal":"vertical";let h=We(t),[g=f?[]:void 0,m]=DD(r,i,n),[w,v]=p.useReducer(_re,{dataRef:p.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),b=p.useRef({static:!1,hold:!1}),_=p.useRef(null),$=p.useRef(null),C=p.useRef(null),O=re(typeof s=="string"?(H,K)=>{let Q=s;return(H==null?void 0:H[Q])===(K==null?void 0:K[Q])}:s),x=p.useCallback(H=>Re(S.mode,{[1]:()=>g.some(K=>O(K,H)),[0]:()=>O(g,H)}),[g]),S=p.useMemo(()=>({...w,value:g,disabled:l,mode:f?1:0,orientation:d,compare:O,isSelected:x,optionsPropsRef:b,labelRef:_,buttonRef:$,optionsRef:C}),[g,l,f,w]);gt(()=>{w.dataRef.current=S},[S]),QE([S.buttonRef,S.optionsRef],(H,K)=>{var Q;v({type:1}),ZE(K,W0.Loose)||(H.preventDefault(),(Q=S.buttonRef.current)==null||Q.focus())},S.listboxState===0);let A=p.useMemo(()=>({open:S.listboxState===0,disabled:l,value:g}),[S,l,g]),k=re(H=>{let K=S.options.find(Q=>Q.id===H);K&&B(K.dataRef.current.value)}),N=re(()=>{if(S.activeOptionIndex!==null){let{dataRef:H,id:K}=S.options[S.activeOptionIndex];B(H.current.value),v({type:2,focus:Pr.Specific,id:K})}}),P=re(()=>v({type:0})),I=re(()=>v({type:1})),E=re((H,K,Q)=>H===Pr.Specific?v({type:2,focus:Pr.Specific,id:K,trigger:Q}):v({type:2,focus:H,trigger:Q})),R=re((H,K)=>(v({type:5,id:H,dataRef:K}),()=>v({type:6,id:H}))),F=re(H=>(v({type:7,id:H}),()=>v({type:7,id:null}))),B=re(H=>Re(S.mode,{[0](){return m==null?void 0:m(H)},[1](){let K=S.value.slice(),Q=K.findIndex(J=>O(J,H));return Q===-1?K.push(H):K.splice(Q,1),m==null?void 0:m(K)}})),j=re(H=>v({type:3,value:H})),M=re(()=>v({type:4})),D=p.useMemo(()=>({onChange:B,registerOption:R,registerLabel:F,goToOption:E,closeListbox:I,openListbox:P,selectActiveOption:N,selectOption:k,search:j,clearSearch:M}),[]),U={ref:h},V=p.useRef(null),G=Ui();return p.useEffect(()=>{V.current&&n!==void 0&&G.addEventListener(V.current,"reset",()=>{B(n)})},[V,B]),Y.createElement(oC.Provider,{value:D},Y.createElement(iC.Provider,{value:S},Y.createElement(eC,{value:Re(S.listboxState,{[0]:ut.Open,[1]:ut.Closed})},o!=null&&g!=null&&ND({[o]:g}).map(([H,K],Q)=>Y.createElement(Ta,{features:Ca.Hidden,ref:Q===0?J=>{var de;V.current=(de=J==null?void 0:J.closest("form"))!=null?de:null}:void 0,...Sm({key:H,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,name:H,value:K})})),Fe({ourProps:U,theirProps:c,slot:A,defaultTag:$re,name:"Listbox"}))))}let Sre="button";function Ere(e,t){var r;let n=Pt(),{id:a=`headlessui-listbox-button-${n}`,...o}=e,i=Nh("Listbox.Button"),s=Ih("Listbox.Button"),l=We(i.buttonRef,t),u=Ui(),f=re(w=>{switch(w.key){case ye.Space:case ye.Enter:case ye.ArrowDown:w.preventDefault(),s.openListbox(),u.nextFrame(()=>{i.value||s.goToOption(Pr.First)});break;case ye.ArrowUp:w.preventDefault(),s.openListbox(),u.nextFrame(()=>{i.value||s.goToOption(Pr.Last)});break}}),c=re(w=>{switch(w.key){case ye.Space:w.preventDefault();break}}),d=re(w=>{if(Oh(w.currentTarget))return w.preventDefault();i.listboxState===0?(s.closeListbox(),u.nextFrame(()=>{var v;return(v=i.buttonRef.current)==null?void 0:v.focus({preventScroll:!0})})):(w.preventDefault(),s.openListbox())}),h=OD(()=>{if(i.labelId)return[i.labelId,a].join(" ")},[i.labelId,a]),g=p.useMemo(()=>({open:i.listboxState===0,disabled:i.disabled,value:i.value}),[i]),m={ref:l,id:a,type:H0(e,i.buttonRef),"aria-haspopup":"listbox","aria-controls":(r=i.optionsRef.current)==null?void 0:r.id,"aria-expanded":i.disabled?void 0:i.listboxState===0,"aria-labelledby":h,disabled:i.disabled,onKeyDown:f,onKeyUp:c,onClick:d};return Fe({ourProps:m,theirProps:o,slot:g,defaultTag:Sre,name:"Listbox.Button"})}let Cre="label";function Tre(e,t){let r=Pt(),{id:n=`headlessui-listbox-label-${r}`,...a}=e,o=Nh("Listbox.Label"),i=Ih("Listbox.Label"),s=We(o.labelRef,t);gt(()=>i.registerLabel(n),[n]);let l=re(()=>{var f;return(f=o.buttonRef.current)==null?void 0:f.focus({preventScroll:!0})}),u=p.useMemo(()=>({open:o.listboxState===0,disabled:o.disabled}),[o]);return Fe({ourProps:{ref:s,id:n,onClick:l},theirProps:a,slot:u,defaultTag:Cre,name:"Listbox.Label"})}let Are="ul",Rre=Pn.RenderStrategy|Pn.Static;function Ore(e,t){var r;let n=Pt(),{id:a=`headlessui-listbox-options-${n}`,...o}=e,i=Nh("Listbox.Options"),s=Ih("Listbox.Options"),l=We(i.optionsRef,t),u=Ui(),f=Ui(),c=ku(),d=(()=>c!==null?(c&ut.Open)===ut.Open:i.listboxState===0)();p.useEffect(()=>{var v;let b=i.optionsRef.current;b&&i.listboxState===0&&b!==((v=Rh(b))==null?void 0:v.activeElement)&&b.focus({preventScroll:!0})},[i.listboxState,i.optionsRef]);let h=re(v=>{switch(f.dispose(),v.key){case ye.Space:if(i.searchQuery!=="")return v.preventDefault(),v.stopPropagation(),s.search(v.key);case ye.Enter:if(v.preventDefault(),v.stopPropagation(),i.activeOptionIndex!==null){let{dataRef:b}=i.options[i.activeOptionIndex];s.onChange(b.current.value)}i.mode===0&&(s.closeListbox(),_o().nextFrame(()=>{var b;return(b=i.buttonRef.current)==null?void 0:b.focus({preventScroll:!0})}));break;case Re(i.orientation,{vertical:ye.ArrowDown,horizontal:ye.ArrowRight}):return v.preventDefault(),v.stopPropagation(),s.goToOption(Pr.Next);case Re(i.orientation,{vertical:ye.ArrowUp,horizontal:ye.ArrowLeft}):return v.preventDefault(),v.stopPropagation(),s.goToOption(Pr.Previous);case ye.Home:case ye.PageUp:return v.preventDefault(),v.stopPropagation(),s.goToOption(Pr.First);case ye.End:case ye.PageDown:return v.preventDefault(),v.stopPropagation(),s.goToOption(Pr.Last);case ye.Escape:return v.preventDefault(),v.stopPropagation(),s.closeListbox(),u.nextFrame(()=>{var b;return(b=i.buttonRef.current)==null?void 0:b.focus({preventScroll:!0})});case ye.Tab:v.preventDefault(),v.stopPropagation();break;default:v.key.length===1&&(s.search(v.key),f.setTimeout(()=>s.clearSearch(),350));break}}),g=OD(()=>{var v,b,_;return(_=(v=i.labelRef.current)==null?void 0:v.id)!=null?_:(b=i.buttonRef.current)==null?void 0:b.id},[i.labelRef.current,i.buttonRef.current]),m=p.useMemo(()=>({open:i.listboxState===0}),[i]),w={"aria-activedescendant":i.activeOptionIndex===null||(r=i.options[i.activeOptionIndex])==null?void 0:r.id,"aria-multiselectable":i.mode===1?!0:void 0,"aria-labelledby":g,"aria-orientation":i.orientation,id:a,onKeyDown:h,role:"listbox",tabIndex:0,ref:l};return Fe({ourProps:w,theirProps:o,slot:m,defaultTag:Are,features:Rre,visible:d,name:"Listbox.Options"})}let kre="li";function Pre(e,t){let r=Pt(),{id:n=`headlessui-listbox-option-${r}`,disabled:a=!1,value:o,...i}=e,s=Nh("Listbox.Option"),l=Ih("Listbox.Option"),u=s.activeOptionIndex!==null?s.options[s.activeOptionIndex].id===n:!1,f=s.isSelected(o),c=p.useRef(null),d=dr({disabled:a,value:o,domRef:c,get textValue(){var C,O;return(O=(C=c.current)==null?void 0:C.textContent)==null?void 0:O.toLowerCase()}}),h=We(t,c);gt(()=>{if(s.listboxState!==0||!u||s.activationTrigger===0)return;let C=_o();return C.requestAnimationFrame(()=>{var O,x;(x=(O=c.current)==null?void 0:O.scrollIntoView)==null||x.call(O,{block:"nearest"})}),C.dispose},[c,u,s.listboxState,s.activationTrigger,s.activeOptionIndex]),gt(()=>l.registerOption(n,d),[d,n]);let g=re(C=>{if(a)return C.preventDefault();l.onChange(o),s.mode===0&&(l.closeListbox(),_o().nextFrame(()=>{var O;return(O=s.buttonRef.current)==null?void 0:O.focus({preventScroll:!0})}))}),m=re(()=>{if(a)return l.goToOption(Pr.Nothing);l.goToOption(Pr.Specific,n)}),w=ite(),v=re(C=>w.update(C)),b=re(C=>{w.wasMoved(C)&&(a||u||l.goToOption(Pr.Specific,n,0))}),_=re(C=>{w.wasMoved(C)&&(a||u&&l.goToOption(Pr.Nothing))}),$=p.useMemo(()=>({active:u,selected:f,disabled:a}),[u,f,a]);return Fe({ourProps:{id:n,ref:h,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:g,onFocus:m,onPointerEnter:v,onMouseEnter:v,onPointerMove:b,onMouseMove:b,onPointerLeave:_,onMouseLeave:_},theirProps:i,slot:$,defaultTag:kre,name:"Listbox.Option"})}let Ire=Be(xre),Nre=Be(Ere),Lre=Be(Tre),Mre=Be(Ore),Dre=Be(Pre),ur=Object.assign(Ire,{Button:Nre,Label:Lre,Options:Mre,Option:Dre});var jre=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(jre||{}),Fre=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(Fre||{});let Bre={[0]:e=>({...e,popoverState:Re(e.popoverState,{[0]:1,[1]:0})}),[1](e){return e.popoverState===1?e:{...e,popoverState:1}},[2](e,t){return e.button===t.button?e:{...e,button:t.button}},[3](e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},[4](e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},[5](e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},sC=p.createContext(null);sC.displayName="PopoverContext";function G0(e){let t=p.useContext(sC);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,G0),r}return t}let lC=p.createContext(null);lC.displayName="PopoverAPIContext";function cC(e){let t=p.useContext(lC);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,cC),r}return t}let uC=p.createContext(null);uC.displayName="PopoverGroupContext";function KD(){return p.useContext(uC)}let K0=p.createContext(null);K0.displayName="PopoverPanelContext";function Ure(){return p.useContext(K0)}function zre(e,t){return Re(t.type,Bre,e,t)}let Vre="div";function Wre(e,t){var r;let n=p.useRef(null),a=We(t,PD(P=>{n.current=P})),o=p.useRef([]),i=p.useReducer(zre,{popoverState:1,buttons:o,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:p.createRef(),afterPanelSentinel:p.createRef()}),[{popoverState:s,button:l,buttonId:u,panel:f,panelId:c,beforePanelSentinel:d,afterPanelSentinel:h},g]=i,m=gl((r=n.current)!=null?r:l),w=p.useMemo(()=>{if(!l||!f)return!1;for(let j of document.querySelectorAll("body > *"))if(Number(j==null?void 0:j.contains(l))^Number(j==null?void 0:j.contains(f)))return!0;let P=V0(),I=P.indexOf(l),E=(I+P.length-1)%P.length,R=(I+1)%P.length,F=P[E],B=P[R];return!f.contains(F)&&!f.contains(B)},[l,f]),v=dr(u),b=dr(c),_=p.useMemo(()=>({buttonId:v,panelId:b,close:()=>g({type:1})}),[v,b,g]),$=KD(),C=$==null?void 0:$.registerPopover,O=re(()=>{var P;return(P=$==null?void 0:$.isFocusWithinPopoverGroup())!=null?P:(m==null?void 0:m.activeElement)&&((l==null?void 0:l.contains(m.activeElement))||(f==null?void 0:f.contains(m.activeElement)))});p.useEffect(()=>C==null?void 0:C(_),[C,_]),nC(m==null?void 0:m.defaultView,"focus",P=>{var I,E,R,F;s===0&&(O()||l&&f&&P.target!==window&&((E=(I=d.current)==null?void 0:I.contains)!=null&&E.call(I,P.target)||(F=(R=h.current)==null?void 0:R.contains)!=null&&F.call(R,P.target)||g({type:1})))},!0),QE([l,f],(P,I)=>{g({type:1}),ZE(I,W0.Loose)||(P.preventDefault(),l==null||l.focus())},s===0);let x=re(P=>{g({type:1});let I=(()=>P?P instanceof HTMLElement?P:"current"in P&&P.current instanceof HTMLElement?P.current:l:l)();I==null||I.focus()}),S=p.useMemo(()=>({close:x,isPortalled:w}),[x,w]),A=p.useMemo(()=>({open:s===0,close:x}),[s,x]),k=e,N={ref:a};return Y.createElement(K0.Provider,{value:null},Y.createElement(sC.Provider,{value:i},Y.createElement(lC.Provider,{value:S},Y.createElement(eC,{value:Re(s,{[0]:ut.Open,[1]:ut.Closed})},Fe({ourProps:N,theirProps:k,slot:A,defaultTag:Vre,name:"Popover"})))))}let Hre="button";function Gre(e,t){let r=Pt(),{id:n=`headlessui-popover-button-${r}`,...a}=e,[o,i]=G0("Popover.Button"),{isPortalled:s}=cC("Popover.Button"),l=p.useRef(null),u=`headlessui-focus-sentinel-${Pt()}`,f=KD(),c=f==null?void 0:f.closeOthers,d=Ure()!==null;p.useEffect(()=>{if(!d)return i({type:3,buttonId:n}),()=>{i({type:3,buttonId:null})}},[d,n,i]);let[h]=p.useState(()=>Symbol()),g=We(l,t,d?null:N=>{if(N)o.buttons.current.push(h);else{let P=o.buttons.current.indexOf(h);P!==-1&&o.buttons.current.splice(P,1)}o.buttons.current.length>1,N&&i({type:2,button:N})}),m=We(l,t),w=gl(l),v=re(N=>{var P,I,E;if(d){if(o.popoverState===1)return;switch(N.key){case ye.Space:case ye.Enter:N.preventDefault(),(I=(P=N.target).click)==null||I.call(P),i({type:1}),(E=o.button)==null||E.focus();break}}else switch(N.key){case ye.Space:case ye.Enter:N.preventDefault(),N.stopPropagation(),o.popoverState===1&&(c==null||c(o.buttonId)),i({type:0});break;case ye.Escape:if(o.popoverState!==0)return c==null?void 0:c(o.buttonId);if(!l.current||w!=null&&w.activeElement&&!l.current.contains(w.activeElement))return;N.preventDefault(),N.stopPropagation(),i({type:1});break}}),b=re(N=>{d||N.key===ye.Space&&N.preventDefault()}),_=re(N=>{var P,I;Oh(N.currentTarget)||e.disabled||(d?(i({type:1}),(P=o.button)==null||P.focus()):(N.preventDefault(),N.stopPropagation(),o.popoverState===1&&(c==null||c(o.buttonId)),i({type:0}),(I=o.button)==null||I.focus()))}),$=re(N=>{N.preventDefault(),N.stopPropagation()}),C=o.popoverState===0,O=p.useMemo(()=>({open:C}),[C]),x=H0(e,l),S=d?{ref:m,type:x,onKeyDown:v,onClick:_}:{ref:g,id:o.buttonId,type:x,"aria-expanded":e.disabled?void 0:o.popoverState===0,"aria-controls":o.panel?o.panelId:void 0,onKeyDown:v,onKeyUp:b,onClick:_,onMouseDown:$},A=rC(),k=re(()=>{let N=o.panel;if(!N)return;function P(){Re(A.current,{[Xr.Forwards]:()=>qt(N,et.First),[Xr.Backwards]:()=>qt(N,et.Last)})===to.Error&&qt(V0().filter(I=>I.dataset.headlessuiFocusGuard!=="true"),Re(A.current,{[Xr.Forwards]:et.Next,[Xr.Backwards]:et.Previous}),{relativeTo:o.button})}P()});return Y.createElement(Y.Fragment,null,Fe({ourProps:S,theirProps:a,slot:O,defaultTag:Hre,name:"Popover.Button"}),C&&!d&&s&&Y.createElement(Ta,{id:u,features:Ca.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:k}))}let Kre="div",qre=Pn.RenderStrategy|Pn.Static;function Yre(e,t){let r=Pt(),{id:n=`headlessui-popover-overlay-${r}`,...a}=e,[{popoverState:o},i]=G0("Popover.Overlay"),s=We(t),l=ku(),u=(()=>l!==null?(l&ut.Open)===ut.Open:o===0)(),f=re(d=>{if(Oh(d.currentTarget))return d.preventDefault();i({type:1})}),c=p.useMemo(()=>({open:o===0}),[o]);return Fe({ourProps:{ref:s,id:n,"aria-hidden":!0,onClick:f},theirProps:a,slot:c,defaultTag:Kre,features:qre,visible:u,name:"Popover.Overlay"})}let Xre="div",Zre=Pn.RenderStrategy|Pn.Static;function Qre(e,t){let r=Pt(),{id:n=`headlessui-popover-panel-${r}`,focus:a=!1,...o}=e,[i,s]=G0("Popover.Panel"),{close:l,isPortalled:u}=cC("Popover.Panel"),f=`headlessui-focus-sentinel-before-${Pt()}`,c=`headlessui-focus-sentinel-after-${Pt()}`,d=p.useRef(null),h=We(d,t,x=>{s({type:4,panel:x})}),g=gl(d);gt(()=>(s({type:5,panelId:n}),()=>{s({type:5,panelId:null})}),[n,s]);let m=ku(),w=(()=>m!==null?(m&ut.Open)===ut.Open:i.popoverState===0)(),v=re(x=>{var S;switch(x.key){case ye.Escape:if(i.popoverState!==0||!d.current||g!=null&&g.activeElement&&!d.current.contains(g.activeElement))return;x.preventDefault(),x.stopPropagation(),s({type:1}),(S=i.button)==null||S.focus();break}});p.useEffect(()=>{var x;e.static||i.popoverState===1&&((x=e.unmount)==null||x)&&s({type:4,panel:null})},[i.popoverState,e.unmount,e.static,s]),p.useEffect(()=>{if(!a||i.popoverState!==0||!d.current)return;let x=g==null?void 0:g.activeElement;d.current.contains(x)||qt(d.current,et.First)},[a,d,i.popoverState]);let b=p.useMemo(()=>({open:i.popoverState===0,close:l}),[i,l]),_={ref:h,id:n,onKeyDown:v,onBlur:a&&i.popoverState===0?x=>{var S,A,k,N,P;let I=x.relatedTarget;I&&d.current&&((S=d.current)!=null&&S.contains(I)||(s({type:1}),((k=(A=i.beforePanelSentinel.current)==null?void 0:A.contains)!=null&&k.call(A,I)||(P=(N=i.afterPanelSentinel.current)==null?void 0:N.contains)!=null&&P.call(N,I))&&I.focus({preventScroll:!0})))}:void 0,tabIndex:-1},$=rC(),C=re(()=>{let x=d.current;if(!x)return;function S(){Re($.current,{[Xr.Forwards]:()=>{var A;qt(x,et.First)===to.Error&&((A=i.afterPanelSentinel.current)==null||A.focus())},[Xr.Backwards]:()=>{var A;(A=i.button)==null||A.focus({preventScroll:!0})}})}S()}),O=re(()=>{let x=d.current;if(!x)return;function S(){Re($.current,{[Xr.Forwards]:()=>{var A;if(!i.button)return;let k=V0(),N=k.indexOf(i.button),P=k.slice(0,N+1),I=[...k.slice(N+1),...P];for(let E of I.slice())if(E.dataset.headlessuiFocusGuard==="true"||(A=i.panel)!=null&&A.contains(E)){let R=I.indexOf(E);R!==-1&&I.splice(R,1)}qt(I,et.First,{sorted:!1})},[Xr.Backwards]:()=>{var A;qt(x,et.Previous)===to.Error&&((A=i.button)==null||A.focus())}})}S()});return Y.createElement(K0.Provider,{value:n},w&&u&&Y.createElement(Ta,{id:f,ref:i.beforePanelSentinel,features:Ca.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:C}),Fe({ourProps:_,theirProps:o,slot:b,defaultTag:Xre,features:Zre,visible:w,name:"Popover.Panel"}),w&&u&&Y.createElement(Ta,{id:c,ref:i.afterPanelSentinel,features:Ca.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:O}))}let Jre="div";function ene(e,t){let r=p.useRef(null),n=We(r,t),[a,o]=p.useState([]),i=re(g=>{o(m=>{let w=m.indexOf(g);if(w!==-1){let v=m.slice();return v.splice(w,1),v}return m})}),s=re(g=>(o(m=>[...m,g]),()=>i(g))),l=re(()=>{var g;let m=Rh(r);if(!m)return!1;let w=m.activeElement;return(g=r.current)!=null&&g.contains(w)?!0:a.some(v=>{var b,_;return((b=m.getElementById(v.buttonId.current))==null?void 0:b.contains(w))||((_=m.getElementById(v.panelId.current))==null?void 0:_.contains(w))})}),u=re(g=>{for(let m of a)m.buttonId.current!==g&&m.close()}),f=p.useMemo(()=>({registerPopover:s,unregisterPopover:i,isFocusWithinPopoverGroup:l,closeOthers:u}),[s,i,l,u]),c=p.useMemo(()=>({}),[]),d=e,h={ref:n};return Y.createElement(uC.Provider,{value:f},Fe({ourProps:h,theirProps:d,slot:c,defaultTag:Jre,name:"Popover.Group"}))}let tne=Be(Wre),rne=Be(Gre),nne=Be(Yre),ane=Be(Qre),one=Be(ene),An=Object.assign(tne,{Button:rne,Overlay:nne,Panel:ane,Group:one});function ine(e=0){let[t,r]=p.useState(e),n=kh(),a=p.useCallback(l=>{n.current&&r(u=>u|l)},[t,n]),o=p.useCallback(l=>!!(t&l),[t]),i=p.useCallback(l=>{n.current&&r(u=>u&~l)},[r,n]),s=p.useCallback(l=>{n.current&&r(u=>u^l)},[r]);return{flags:t,addFlag:a,hasFlag:o,removeFlag:i,toggleFlag:s}}let qD=p.createContext(null);function YD(){let e=p.useContext(qD);if(e===null){let t=new Error("You used a