@zh-keyboard/react 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,37 @@
1
- (function(de,K){typeof exports=="object"&&typeof module<"u"?K(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],K):(de=typeof globalThis<"u"?globalThis:de||self,K(de.ZhKeyboardReact={},de.React,de.ReactDOM))})(this,function(de,K,_n){"use strict";var dm=Object.defineProperty;var vm=(de,K,_n)=>K in de?dm(de,K,{enumerable:!0,configurable:!0,writable:!0,value:_n}):de[K]=_n;var Oe=(de,K,_n)=>vm(de,typeof K!="symbol"?K+"":K,_n);var Ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yr(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var at={exports:{}},In={};/**
1
+ (function(xe,U){typeof exports=="object"&&typeof module<"u"?U(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],U):(xe=typeof globalThis<"u"?globalThis:xe||self,U(xe.ZhKeyboardReact={},xe.React,xe.ReactDOM))})(this,function(xe,U,zn){"use strict";var dm=Object.defineProperty;var vm=(xe,U,zn)=>U in xe?dm(xe,U,{enumerable:!0,configurable:!0,writable:!0,value:zn}):xe[U]=zn;var Ke=(xe,U,zn)=>vm(xe,typeof U!="symbol"?U+"":U,zn);var Mi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ca(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var jt={exports:{}},st={};/**
2
2
  * @license React
3
- * react-jsx-runtime.production.js
3
+ * react-jsx-runtime.production.min.js
4
4
  *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Gr;function Oi(){if(Gr)return In;Gr=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(f,E,w){var _=null;if(w!==void 0&&(_=""+w),E.key!==void 0&&(_=""+E.key),"key"in E){w={};for(var C in E)C!=="key"&&(w[C]=E[C])}else w=E;return E=w.ref,{$$typeof:a,type:f,key:_,ref:E!==void 0?E:null,props:w}}return In.Fragment=s,In.jsx=l,In.jsxs=l,In}var Nn={};/**
9
+ */var la;function zi(){if(la)return st;la=1;var a=U,s=Symbol.for("react.element"),l=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,C=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,k={key:!0,ref:!0,__self:!0,__source:!0};function w(O,j,M){var G,q={},J=null,F=null;M!==void 0&&(J=""+M),j.key!==void 0&&(J=""+j.key),j.ref!==void 0&&(F=j.ref);for(G in j)f.call(j,G)&&!k.hasOwnProperty(G)&&(q[G]=j[G]);if(O&&O.defaultProps)for(G in j=O.defaultProps,j)q[G]===void 0&&(q[G]=j[G]);return{$$typeof:s,type:O,key:J,ref:F,props:q,_owner:C.current}}return st.Fragment=l,st.jsx=w,st.jsxs=w,st}var ut={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Wr;function ji(){return Wr||(Wr=1,process.env.NODE_ENV!=="production"&&function(){function a(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===xe?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case X:return"Fragment";case J:return"Profiler";case Q:return"StrictMode";case ee:return"Suspense";case ue:return"SuspenseList";case oe:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case R:return"Portal";case Ee:return(T.displayName||"Context")+".Provider";case Z:return(T._context.displayName||"Context")+".Consumer";case fe:var te=T.render;return T=T.displayName,T||(T=te.displayName||te.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case $:return te=T.displayName||null,te!==null?te:a(T.type)||"Memo";case ge:te=T._payload,T=T._init;try{return a(T(te))}catch{}}return null}function s(T){return""+T}function l(T){try{s(T);var te=!1}catch{te=!0}if(te){te=console;var pe=te.error,be=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return pe.call(te,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",be),s(T)}}function f(T){if(T===X)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===ge)return"<...>";try{var te=a(T);return te?"<"+te+">":"<...>"}catch{return"<...>"}}function E(){var T=ke.A;return T===null?null:T.getOwner()}function w(){return Error("react-stack-top-frame")}function _(T){if(le.call(T,"key")){var te=Object.getOwnPropertyDescriptor(T,"key").get;if(te&&te.isReactWarning)return!1}return T.key!==void 0}function C(T,te){function pe(){kn||(kn=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",te))}pe.isReactWarning=!0,Object.defineProperty(T,"key",{get:pe,configurable:!0})}function j(){var T=a(this.type);return En[T]||(En[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function L(T,te,pe,be,Ke,Re,Be,un){return pe=Re.ref,T={$$typeof:B,type:T,key:te,props:Re,_owner:Ke},(pe!==void 0?pe:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:j}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Be}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:un}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function W(T,te,pe,be,Ke,Re,Be,un){var Se=te.children;if(Se!==void 0)if(be)if(Me(Se)){for(be=0;be<Se.length;be++)q(Se[be]);Object.freeze&&Object.freeze(Se)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else q(Se);if(le.call(te,"key")){Se=a(T);var H=Object.keys(te).filter(function(Pn){return Pn!=="key"});be=0<H.length?"{key: someKey, "+H.join(": ..., ")+": ...}":"{key: someKey}",Ye[Se+be]||(H=0<H.length?"{"+H.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var fa;function Li(){return fa||(fa=1,process.env.NODE_ENV!=="production"&&function(){var a=U,s=Symbol.for("react.element"),l=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),O=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),D=Symbol.iterator,ee="@@iterator";function ne(d){if(d===null||typeof d!="object")return null;var R=D&&d[D]||d[ee];return typeof R=="function"?R:null}var $=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(d){{for(var R=arguments.length,V=new Array(R>1?R-1:0),Q=1;Q<R;Q++)V[Q-1]=arguments[Q];Re("error",d,V)}}function Re(d,R,V){{var Q=$.ReactDebugCurrentFrame,se=Q.getStackAddendum();se!==""&&(R+="%s",V=V.concat([se]));var ve=V.map(function(fe){return String(fe)});ve.unshift("Warning: "+R),Function.prototype.apply.call(console[d],console,ve)}}var be=!1,ae=!1,de=!1,te=!1,Ce=!1,le;le=Symbol.for("react.module.reference");function je(d){return!!(typeof d=="string"||typeof d=="function"||d===f||d===k||Ce||d===C||d===M||d===G||te||d===F||be||ae||de||typeof d=="object"&&d!==null&&(d.$$typeof===J||d.$$typeof===q||d.$$typeof===w||d.$$typeof===O||d.$$typeof===j||d.$$typeof===le||d.getModuleId!==void 0))}function Ae(d,R,V){var Q=d.displayName;if(Q)return Q;var se=R.displayName||R.name||"";return se!==""?V+"("+se+")":V}function ye(d){return d.displayName||"Context"}function De(d){if(d==null)return null;if(typeof d.tag=="number"&&Y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case f:return"Fragment";case l:return"Portal";case k:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case G:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case O:var R=d;return ye(R)+".Consumer";case w:var V=d;return ye(V._context)+".Provider";case j:return Ae(d,d.render,"ForwardRef");case q:var Q=d.displayName||null;return Q!==null?Q:De(d.type)||"Memo";case J:{var se=d,ve=se._payload,fe=se._init;try{return De(fe(ve))}catch{return null}}}return null}var on=Object.assign,sn=0,Bn,qt,Je,un,He,Un,Vt;function cn(){}cn.__reactDisabledLog=!0;function Ht(){{if(sn===0){Bn=console.log,qt=console.info,Je=console.warn,un=console.error,He=console.group,Un=console.groupCollapsed,Vt=console.groupEnd;var d={configurable:!0,enumerable:!0,value:cn,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}sn++}}function qn(){{if(sn--,sn===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:on({},d,{value:Bn}),info:on({},d,{value:qt}),warn:on({},d,{value:Je}),error:on({},d,{value:un}),group:on({},d,{value:He}),groupCollapsed:on({},d,{value:Un}),groupEnd:on({},d,{value:Vt})})}sn<0&&Y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ze=$.ReactCurrentDispatcher,Sn;function Vn(d,R,V){{if(Sn===void 0)try{throw Error()}catch(se){var Q=se.stack.trim().match(/\n( *(at )?)/);Sn=Q&&Q[1]||""}return`
18
+ `+Sn+d}}var Z=!1,Pn;{var Hn=typeof WeakMap=="function"?WeakMap:Map;Pn=new Hn}function me(d,R){if(!d||Z)return"";{var V=Pn.get(d);if(V!==void 0)return V}var Q;Z=!0;var se=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ve;ve=Ze.current,Ze.current=null,Ht();try{if(R){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(Se){Q=Se}Reflect.construct(d,[],fe)}else{try{fe.call()}catch(Se){Q=Se}d.call(fe.prototype)}}else{try{throw Error()}catch(Se){Q=Se}d()}}catch(Se){if(Se&&Q&&typeof Se.stack=="string"){for(var re=Se.stack.split(`
19
+ `),Ie=Q.stack.split(`
20
+ `),ge=re.length-1,Pe=Ie.length-1;ge>=1&&Pe>=0&&re[ge]!==Ie[Pe];)Pe--;for(;ge>=1&&Pe>=0;ge--,Pe--)if(re[ge]!==Ie[Pe]){if(ge!==1||Pe!==1)do if(ge--,Pe--,Pe<0||re[ge]!==Ie[Pe]){var Me=`
21
+ `+re[ge].replace(" at new "," at ");return d.displayName&&Me.includes("<anonymous>")&&(Me=Me.replace("<anonymous>",d.displayName)),typeof d=="function"&&Pn.set(d,Me),Me}while(ge>=1&&Pe>=0);break}}}finally{Z=!1,Ze.current=ve,qn(),Error.prepareStackTrace=se}var _e=d?d.displayName||d.name:"",Be=_e?Vn(_e):"";return typeof d=="function"&&Pn.set(d,Be),Be}function Cn(d,R,V){return me(d,!1)}function Dr(d){var R=d.prototype;return!!(R&&R.isReactComponent)}function We(d,R,V){if(d==null)return"";if(typeof d=="function")return me(d,Dr(d));if(typeof d=="string")return Vn(d);switch(d){case M:return Vn("Suspense");case G:return Vn("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case j:return Cn(d.render);case q:return We(d.type,R,V);case J:{var Q=d,se=Q._payload,ve=Q._init;try{return We(ve(se),R,V)}catch{}}}return""}var On=Object.prototype.hasOwnProperty,Wt={},Yt=$.ReactDebugCurrentFrame;function Wn(d){if(d){var R=d._owner,V=We(d.type,d._source,R?R.type:null);Yt.setExtraStackFrame(V)}else Yt.setExtraStackFrame(null)}function yt(d,R,V,Q,se){{var ve=Function.call.bind(On);for(var fe in d)if(ve(d,fe)){var re=void 0;try{if(typeof d[fe]!="function"){var Ie=Error((Q||"React class")+": "+V+" type `"+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[fe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ie.name="Invariant Violation",Ie}re=d[fe](R,fe,Q,V,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ge){re=ge}re&&!(re instanceof Error)&&(Wn(se),Y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Q||"React class",V,fe,typeof re),Wn(null)),re instanceof Error&&!(re.message in Wt)&&(Wt[re.message]=!0,Wn(se),Y("Failed %s type: %s",V,re.message),Wn(null))}}}var Ye=Array.isArray;function Yn(d){return Ye(d)}function jn(d){{var R=typeof Symbol=="function"&&Symbol.toStringTag,V=R&&d[Symbol.toStringTag]||d.constructor.name||"Object";return V}}function Gt(d){try{return pn(d),!1}catch{return!0}}function pn(d){return""+d}function Qe(d){if(Gt(d))return Y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",jn(d)),pn(d)}var $e=$.ReactCurrentOwner,mt={key:!0,ref:!0,__self:!0,__source:!0},yn,Gn;function Xn(d){if(On.call(d,"ref")){var R=Object.getOwnPropertyDescriptor(d,"ref").get;if(R&&R.isReactWarning)return!1}return d.ref!==void 0}function ln(d){if(On.call(d,"key")){var R=Object.getOwnPropertyDescriptor(d,"key").get;if(R&&R.isReactWarning)return!1}return d.key!==void 0}function Jn(d,R){typeof d.ref=="string"&&$e.current}function gt(d,R){{var V=function(){yn||(yn=!0,Y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",R))};V.isReactWarning=!0,Object.defineProperty(d,"key",{get:V,configurable:!0})}}function en(d,R){{var V=function(){Gn||(Gn=!0,Y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",R))};V.isReactWarning=!0,Object.defineProperty(d,"ref",{get:V,configurable:!0})}}var X=function(d,R,V,Q,se,ve,fe){var re={$$typeof:s,type:d,key:R,ref:V,props:fe,_owner:ve};return re._store={},Object.defineProperty(re._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(re,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Q}),Object.defineProperty(re,"_source",{configurable:!1,enumerable:!1,writable:!1,value:se}),Object.freeze&&(Object.freeze(re.props),Object.freeze(re)),re};function Tn(d,R,V,Q,se){{var ve,fe={},re=null,Ie=null;V!==void 0&&(Qe(V),re=""+V),ln(R)&&(Qe(R.key),re=""+R.key),Xn(R)&&(Ie=R.ref,Jn(R,se));for(ve in R)On.call(R,ve)&&!mt.hasOwnProperty(ve)&&(fe[ve]=R[ve]);if(d&&d.defaultProps){var ge=d.defaultProps;for(ve in ge)fe[ve]===void 0&&(fe[ve]=ge[ve])}if(re||Ie){var Pe=typeof d=="function"?d.displayName||d.name||"Unknown":d;re&&gt(fe,Pe),Ie&&en(fe,Pe)}return X(d,re,Ie,se,Q,$e.current,fe)}}var Xe=$.ReactCurrentOwner,Rn=$.ReactDebugCurrentFrame;function B(d){if(d){var R=d._owner,V=We(d.type,d._source,R?R.type:null);Rn.setExtraStackFrame(V)}else Rn.setExtraStackFrame(null)}var An;An=!1;function Zn(d){return typeof d=="object"&&d!==null&&d.$$typeof===s}function Qn(){{if(Xe.current){var d=De(Xe.current.type);if(d)return`
22
+
23
+ Check the render method of \``+d+"`."}return""}}function Xt(d){return""}var $n={};function Ir(d){{var R=Qn();if(!R){var V=typeof d=="string"?d:d.displayName||d.name;V&&(R=`
24
+
25
+ Check the top-level render call using <`+V+">.")}return R}}function Jt(d,R){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var V=Ir(R);if($n[V])return;$n[V]=!0;var Q="";d&&d._owner&&d._owner!==Xe.current&&(Q=" It was passed a child from "+De(d._owner.type)+"."),B(d),Y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',V,Q),B(null)}}function fn(d,R){{if(typeof d!="object")return;if(Yn(d))for(var V=0;V<d.length;V++){var Q=d[V];Zn(Q)&&Jt(Q,R)}else if(Zn(d))d._store&&(d._store.validated=!0);else if(d){var se=ne(d);if(typeof se=="function"&&se!==d.entries)for(var ve=se.call(d),fe;!(fe=ve.next()).done;)Zn(fe.value)&&Jt(fe.value,R)}}}function mn(d){{var R=d.type;if(R==null||typeof R=="string")return;var V;if(typeof R=="function")V=R.propTypes;else if(typeof R=="object"&&(R.$$typeof===j||R.$$typeof===q))V=R.propTypes;else return;if(V){var Q=De(R);yt(V,d.props,"prop",Q,d)}else if(R.PropTypes!==void 0&&!An){An=!0;var se=De(R);Y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",se||"Unknown")}typeof R.getDefaultProps=="function"&&!R.getDefaultProps.isReactClassApproved&&Y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function bt(d){{for(var R=Object.keys(d.props),V=0;V<R.length;V++){var Q=R[V];if(Q!=="children"&&Q!=="key"){B(d),Y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Q),B(null);break}}d.ref!==null&&(B(d),Y("Invalid attribute `ref` supplied to `React.Fragment`."),B(null))}}var Dn={};function we(d,R,V,Q,se,ve){{var fe=je(d);if(!fe){var re="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(re+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ie=Xt();Ie?re+=Ie:re+=Qn();var ge;d===null?ge="null":Yn(d)?ge="array":d!==void 0&&d.$$typeof===s?(ge="<"+(De(d.type)||"Unknown")+" />",re=" Did you accidentally export a JSX literal instead of a component?"):ge=typeof d,Y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ge,re)}var Pe=Tn(d,R,V,se,ve);if(Pe==null)return Pe;if(fe){var Me=R.children;if(Me!==void 0)if(Q)if(Yn(Me)){for(var _e=0;_e<Me.length;_e++)fn(Me[_e],d);Object.freeze&&Object.freeze(Me)}else Y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else fn(Me,d)}if(On.call(R,"key")){var Be=De(d),Se=Object.keys(R).filter(function(rt){return rt!=="key"}),tt=Se.length>0?"{key: someKey, "+Se.join(": ..., ")+": ...}":"{key: someKey}";if(!Dn[Be+tt]){var gn=Se.length>0?"{"+Se.join(": ..., ")+": ...}":"{}";Y(`A props object containing a "key" prop is being spread into JSX:
18
26
  let props = %s;
19
27
  <%s {...props} />
20
28
  React keys must be passed directly to JSX without using spread:
21
29
  let props = %s;
22
- <%s key={someKey} {...props} />`,be,Se,H,Se),Ye[Se+be]=!0)}if(Se=null,pe!==void 0&&(l(pe),Se=""+pe),_(te)&&(l(te.key),Se=""+te.key),"key"in te){pe={};for(var Sn in te)Sn!=="key"&&(pe[Sn]=te[Sn])}else pe=te;return Se&&C(pe,typeof T=="function"?T.displayName||T.name||"Unknown":T),L(T,Se,Re,Ke,E(),pe,Be,un)}function q(T){typeof T=="object"&&T!==null&&T.$$typeof===B&&T._store&&(T._store.validated=1)}var G=K,B=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),Ee=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),xe=Symbol.for("react.client.reference"),ke=G.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=Object.prototype.hasOwnProperty,Me=Array.isArray,qn=console.createTask?console.createTask:function(){return null};G={"react-stack-bottom-frame":function(T){return T()}};var kn,En={},gt=G["react-stack-bottom-frame"].bind(G,w)(),Le=qn(f(w)),Ye={};Nn.Fragment=X,Nn.jsx=function(T,te,pe,be,Ke){var Re=1e4>ke.recentlyCreatedOwnerStacks++;return W(T,te,pe,!1,be,Ke,Re?Error("react-stack-top-frame"):gt,Re?qn(f(T)):Le)},Nn.jsxs=function(T,te,pe,be,Ke){var Re=1e4>ke.recentlyCreatedOwnerStacks++;return W(T,te,pe,!0,be,Ke,Re?Error("react-stack-top-frame"):gt,Re?qn(f(T)):Le)}}()),Nn}var Xr;function Ti(){return Xr||(Xr=1,process.env.NODE_ENV==="production"?at.exports=Oi():at.exports=ji()),at.exports}var A=Ti(),Zr=typeof global=="object"&&global&&global.Object===Object&&global,Ai=typeof self=="object"&&self&&self.Object===Object&&self,Ve=Zr||Ai||Function("return this")(),wn=Ve.Symbol,Qr=Object.prototype,Ri=Qr.hasOwnProperty,Di=Qr.toString,zn=wn?wn.toStringTag:void 0;function Ii(a){var s=Ri.call(a,zn),l=a[zn];try{a[zn]=void 0;var f=!0}catch{}var E=Di.call(a);return f&&(s?a[zn]=l:delete a[zn]),E}var Ni=Object.prototype,zi=Ni.toString;function Mi(a){return zi.call(a)}var Ki="[object Null]",Li="[object Undefined]",Jr=wn?wn.toStringTag:void 0;function Mn(a){return a==null?a===void 0?Li:Ki:Jr&&Jr in Object(a)?Ii(a):Mi(a)}function Kn(a){return a!=null&&typeof a=="object"}var it=Array.isArray;function $r(a){var s=typeof a;return a!=null&&(s=="object"||s=="function")}var Bi="[object AsyncFunction]",Fi="[object Function]",Ui="[object GeneratorFunction]",qi="[object Proxy]";function ea(a){if(!$r(a))return!1;var s=Mn(a);return s==Fi||s==Ui||s==Bi||s==qi}var Ht=Ve["__core-js_shared__"],na=function(){var a=/[^.]+$/.exec(Ht&&Ht.keys&&Ht.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function Vi(a){return!!na&&na in a}var Hi=Function.prototype,Yi=Hi.toString;function an(a){if(a!=null){try{return Yi.call(a)}catch{}try{return a+""}catch{}}return""}var Gi=/[\\^$.*+?()[\]{}|]/g,Wi=/^\[object .+?Constructor\]$/,Xi=Function.prototype,Zi=Object.prototype,Qi=Xi.toString,Ji=Zi.hasOwnProperty,$i=RegExp("^"+Qi.call(Ji).replace(Gi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eo(a){if(!$r(a)||Vi(a))return!1;var s=ea(a)?$i:Wi;return s.test(an(a))}function no(a,s){return a==null?void 0:a[s]}function xn(a,s){var l=no(a,s);return eo(l)?l:void 0}var Yt=xn(Ve,"WeakMap"),to=9007199254740991,ro=/^(?:0|[1-9]\d*)$/;function ao(a,s){var l=typeof a;return s=s??to,!!s&&(l=="number"||l!="symbol"&&ro.test(a))&&a>-1&&a%1==0&&a<s}function ta(a,s){return a===s||a!==a&&s!==s}var io=9007199254740991;function ra(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=io}function oo(a){return a!=null&&ra(a.length)&&!ea(a)}var so=Object.prototype;function uo(a){var s=a&&a.constructor,l=typeof s=="function"&&s.prototype||so;return a===l}function co(a,s){for(var l=-1,f=Array(a);++l<a;)f[l]=s(l);return f}var lo="[object Arguments]";function aa(a){return Kn(a)&&Mn(a)==lo}var ia=Object.prototype,fo=ia.hasOwnProperty,ho=ia.propertyIsEnumerable,vo=aa(function(){return arguments}())?aa:function(a){return Kn(a)&&fo.call(a,"callee")&&!ho.call(a,"callee")};function po(){return!1}var oa=typeof de=="object"&&de&&!de.nodeType&&de,sa=oa&&typeof module=="object"&&module&&!module.nodeType&&module,yo=sa&&sa.exports===oa,ua=yo?Ve.Buffer:void 0,mo=ua?ua.isBuffer:void 0,Gt=mo||po,go="[object Arguments]",bo="[object Array]",_o="[object Boolean]",wo="[object Date]",xo="[object Error]",ko="[object Function]",Eo="[object Map]",So="[object Number]",Po="[object Object]",Co="[object RegExp]",Oo="[object Set]",jo="[object String]",To="[object WeakMap]",Ao="[object ArrayBuffer]",Ro="[object DataView]",Do="[object Float32Array]",Io="[object Float64Array]",No="[object Int8Array]",zo="[object Int16Array]",Mo="[object Int32Array]",Ko="[object Uint8Array]",Lo="[object Uint8ClampedArray]",Bo="[object Uint16Array]",Fo="[object Uint32Array]",ve={};ve[Do]=ve[Io]=ve[No]=ve[zo]=ve[Mo]=ve[Ko]=ve[Lo]=ve[Bo]=ve[Fo]=!0,ve[go]=ve[bo]=ve[Ao]=ve[_o]=ve[Ro]=ve[wo]=ve[xo]=ve[ko]=ve[Eo]=ve[So]=ve[Po]=ve[Co]=ve[Oo]=ve[jo]=ve[To]=!1;function Uo(a){return Kn(a)&&ra(a.length)&&!!ve[Mn(a)]}function qo(a){return function(s){return a(s)}}var ca=typeof de=="object"&&de&&!de.nodeType&&de,Ln=ca&&typeof module=="object"&&module&&!module.nodeType&&module,Vo=Ln&&Ln.exports===ca,Wt=Vo&&Zr.process,la=function(){try{var a=Ln&&Ln.require&&Ln.require("util").types;return a||Wt&&Wt.binding&&Wt.binding("util")}catch{}}(),fa=la&&la.isTypedArray,ha=fa?qo(fa):Uo,Ho=Object.prototype,Yo=Ho.hasOwnProperty;function Go(a,s){var l=it(a),f=!l&&vo(a),E=!l&&!f&&Gt(a),w=!l&&!f&&!E&&ha(a),_=l||f||E||w,C=_?co(a.length,String):[],j=C.length;for(var L in a)Yo.call(a,L)&&!(_&&(L=="length"||E&&(L=="offset"||L=="parent")||w&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||ao(L,j)))&&C.push(L);return C}function Wo(a,s){return function(l){return a(s(l))}}var Xo=Wo(Object.keys,Object),Zo=Object.prototype,Qo=Zo.hasOwnProperty;function Jo(a){if(!uo(a))return Xo(a);var s=[];for(var l in Object(a))Qo.call(a,l)&&l!="constructor"&&s.push(l);return s}function $o(a){return oo(a)?Go(a):Jo(a)}var Bn=xn(Object,"create");function es(){this.__data__=Bn?Bn(null):{},this.size=0}function ns(a){var s=this.has(a)&&delete this.__data__[a];return this.size-=s?1:0,s}var ts="__lodash_hash_undefined__",rs=Object.prototype,as=rs.hasOwnProperty;function is(a){var s=this.__data__;if(Bn){var l=s[a];return l===ts?void 0:l}return as.call(s,a)?s[a]:void 0}var os=Object.prototype,ss=os.hasOwnProperty;function us(a){var s=this.__data__;return Bn?s[a]!==void 0:ss.call(s,a)}var cs="__lodash_hash_undefined__";function ls(a,s){var l=this.__data__;return this.size+=this.has(a)?0:1,l[a]=Bn&&s===void 0?cs:s,this}function on(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var f=a[s];this.set(f[0],f[1])}}on.prototype.clear=es,on.prototype.delete=ns,on.prototype.get=is,on.prototype.has=us,on.prototype.set=ls;function fs(){this.__data__=[],this.size=0}function ot(a,s){for(var l=a.length;l--;)if(ta(a[l][0],s))return l;return-1}var hs=Array.prototype,ds=hs.splice;function vs(a){var s=this.__data__,l=ot(s,a);if(l<0)return!1;var f=s.length-1;return l==f?s.pop():ds.call(s,l,1),--this.size,!0}function ps(a){var s=this.__data__,l=ot(s,a);return l<0?void 0:s[l][1]}function ys(a){return ot(this.__data__,a)>-1}function ms(a,s){var l=this.__data__,f=ot(l,a);return f<0?(++this.size,l.push([a,s])):l[f][1]=s,this}function He(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var f=a[s];this.set(f[0],f[1])}}He.prototype.clear=fs,He.prototype.delete=vs,He.prototype.get=ps,He.prototype.has=ys,He.prototype.set=ms;var Fn=xn(Ve,"Map");function gs(){this.size=0,this.__data__={hash:new on,map:new(Fn||He),string:new on}}function bs(a){var s=typeof a;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?a!=="__proto__":a===null}function st(a,s){var l=a.__data__;return bs(s)?l[typeof s=="string"?"string":"hash"]:l.map}function _s(a){var s=st(this,a).delete(a);return this.size-=s?1:0,s}function ws(a){return st(this,a).get(a)}function xs(a){return st(this,a).has(a)}function ks(a,s){var l=st(this,a),f=l.size;return l.set(a,s),this.size+=l.size==f?0:1,this}function sn(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var f=a[s];this.set(f[0],f[1])}}sn.prototype.clear=gs,sn.prototype.delete=_s,sn.prototype.get=ws,sn.prototype.has=xs,sn.prototype.set=ks;function Es(a,s){for(var l=-1,f=s.length,E=a.length;++l<f;)a[E+l]=s[l];return a}function Ss(){this.__data__=new He,this.size=0}function Ps(a){var s=this.__data__,l=s.delete(a);return this.size=s.size,l}function Cs(a){return this.__data__.get(a)}function Os(a){return this.__data__.has(a)}var js=200;function Ts(a,s){var l=this.__data__;if(l instanceof He){var f=l.__data__;if(!Fn||f.length<js-1)return f.push([a,s]),this.size=++l.size,this;l=this.__data__=new sn(f)}return l.set(a,s),this.size=l.size,this}function Xe(a){var s=this.__data__=new He(a);this.size=s.size}Xe.prototype.clear=Ss,Xe.prototype.delete=Ps,Xe.prototype.get=Cs,Xe.prototype.has=Os,Xe.prototype.set=Ts;function As(a,s){for(var l=-1,f=a==null?0:a.length,E=0,w=[];++l<f;){var _=a[l];s(_,l,a)&&(w[E++]=_)}return w}function Rs(){return[]}var Ds=Object.prototype,Is=Ds.propertyIsEnumerable,da=Object.getOwnPropertySymbols,Ns=da?function(a){return a==null?[]:(a=Object(a),As(da(a),function(s){return Is.call(a,s)}))}:Rs;function zs(a,s,l){var f=s(a);return it(a)?f:Es(f,l(a))}function va(a){return zs(a,$o,Ns)}var Xt=xn(Ve,"DataView"),Zt=xn(Ve,"Promise"),Qt=xn(Ve,"Set"),pa="[object Map]",Ms="[object Object]",ya="[object Promise]",ma="[object Set]",ga="[object WeakMap]",ba="[object DataView]",Ks=an(Xt),Ls=an(Fn),Bs=an(Zt),Fs=an(Qt),Us=an(Yt),Ze=Mn;(Xt&&Ze(new Xt(new ArrayBuffer(1)))!=ba||Fn&&Ze(new Fn)!=pa||Zt&&Ze(Zt.resolve())!=ya||Qt&&Ze(new Qt)!=ma||Yt&&Ze(new Yt)!=ga)&&(Ze=function(a){var s=Mn(a),l=s==Ms?a.constructor:void 0,f=l?an(l):"";if(f)switch(f){case Ks:return ba;case Ls:return pa;case Bs:return ya;case Fs:return ma;case Us:return ga}return s});var _a=Ve.Uint8Array,qs="__lodash_hash_undefined__";function Vs(a){return this.__data__.set(a,qs),this}function Hs(a){return this.__data__.has(a)}function ut(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new sn;++s<l;)this.add(a[s])}ut.prototype.add=ut.prototype.push=Vs,ut.prototype.has=Hs;function Ys(a,s){for(var l=-1,f=a==null?0:a.length;++l<f;)if(s(a[l],l,a))return!0;return!1}function Gs(a,s){return a.has(s)}var Ws=1,Xs=2;function wa(a,s,l,f,E,w){var _=l&Ws,C=a.length,j=s.length;if(C!=j&&!(_&&j>C))return!1;var L=w.get(a),W=w.get(s);if(L&&W)return L==s&&W==a;var q=-1,G=!0,B=l&Xs?new ut:void 0;for(w.set(a,s),w.set(s,a);++q<C;){var R=a[q],X=s[q];if(f)var Q=_?f(X,R,q,s,a,w):f(R,X,q,a,s,w);if(Q!==void 0){if(Q)continue;G=!1;break}if(B){if(!Ys(s,function(J,Z){if(!Gs(B,Z)&&(R===J||E(R,J,l,f,w)))return B.push(Z)})){G=!1;break}}else if(!(R===X||E(R,X,l,f,w))){G=!1;break}}return w.delete(a),w.delete(s),G}function Zs(a){var s=-1,l=Array(a.size);return a.forEach(function(f,E){l[++s]=[E,f]}),l}function Qs(a){var s=-1,l=Array(a.size);return a.forEach(function(f){l[++s]=f}),l}var Js=1,$s=2,eu="[object Boolean]",nu="[object Date]",tu="[object Error]",ru="[object Map]",au="[object Number]",iu="[object RegExp]",ou="[object Set]",su="[object String]",uu="[object Symbol]",cu="[object ArrayBuffer]",lu="[object DataView]",xa=wn?wn.prototype:void 0,Jt=xa?xa.valueOf:void 0;function fu(a,s,l,f,E,w,_){switch(l){case lu:if(a.byteLength!=s.byteLength||a.byteOffset!=s.byteOffset)return!1;a=a.buffer,s=s.buffer;case cu:return!(a.byteLength!=s.byteLength||!w(new _a(a),new _a(s)));case eu:case nu:case au:return ta(+a,+s);case tu:return a.name==s.name&&a.message==s.message;case iu:case su:return a==s+"";case ru:var C=Zs;case ou:var j=f&Js;if(C||(C=Qs),a.size!=s.size&&!j)return!1;var L=_.get(a);if(L)return L==s;f|=$s,_.set(a,s);var W=wa(C(a),C(s),f,E,w,_);return _.delete(a),W;case uu:if(Jt)return Jt.call(a)==Jt.call(s)}return!1}var hu=1,du=Object.prototype,vu=du.hasOwnProperty;function pu(a,s,l,f,E,w){var _=l&hu,C=va(a),j=C.length,L=va(s),W=L.length;if(j!=W&&!_)return!1;for(var q=j;q--;){var G=C[q];if(!(_?G in s:vu.call(s,G)))return!1}var B=w.get(a),R=w.get(s);if(B&&R)return B==s&&R==a;var X=!0;w.set(a,s),w.set(s,a);for(var Q=_;++q<j;){G=C[q];var J=a[G],Z=s[G];if(f)var Ee=_?f(Z,J,G,s,a,w):f(J,Z,G,a,s,w);if(!(Ee===void 0?J===Z||E(J,Z,l,f,w):Ee)){X=!1;break}Q||(Q=G=="constructor")}if(X&&!Q){var fe=a.constructor,ee=s.constructor;fe!=ee&&"constructor"in a&&"constructor"in s&&!(typeof fe=="function"&&fe instanceof fe&&typeof ee=="function"&&ee instanceof ee)&&(X=!1)}return w.delete(a),w.delete(s),X}var yu=1,ka="[object Arguments]",Ea="[object Array]",ct="[object Object]",mu=Object.prototype,Sa=mu.hasOwnProperty;function gu(a,s,l,f,E,w){var _=it(a),C=it(s),j=_?Ea:Ze(a),L=C?Ea:Ze(s);j=j==ka?ct:j,L=L==ka?ct:L;var W=j==ct,q=L==ct,G=j==L;if(G&&Gt(a)){if(!Gt(s))return!1;_=!0,W=!1}if(G&&!W)return w||(w=new Xe),_||ha(a)?wa(a,s,l,f,E,w):fu(a,s,j,l,f,E,w);if(!(l&yu)){var B=W&&Sa.call(a,"__wrapped__"),R=q&&Sa.call(s,"__wrapped__");if(B||R){var X=B?a.value():a,Q=R?s.value():s;return w||(w=new Xe),E(X,Q,l,f,w)}}return G?(w||(w=new Xe),pu(a,s,l,f,E,w)):!1}function Pa(a,s,l,f,E){return a===s?!0:a==null||s==null||!Kn(a)&&!Kn(s)?a!==a&&s!==s:gu(a,s,l,f,Pa,E)}function bu(a,s){return Pa(a,s)}/*! js-cookie v3.0.5 | MIT */function lt(a){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var f in l)a[f]=l[f]}return a}var _u={read:function(a){return a[0]==='"'&&(a=a.slice(1,-1)),a.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(a){return encodeURIComponent(a).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function $t(a,s){function l(E,w,_){if(!(typeof document>"u")){_=lt({},s,_),typeof _.expires=="number"&&(_.expires=new Date(Date.now()+_.expires*864e5)),_.expires&&(_.expires=_.expires.toUTCString()),E=encodeURIComponent(E).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var C="";for(var j in _)_[j]&&(C+="; "+j,_[j]!==!0&&(C+="="+_[j].split(";")[0]));return document.cookie=E+"="+a.write(w,E)+C}}function f(E){if(!(typeof document>"u"||arguments.length&&!E)){for(var w=document.cookie?document.cookie.split("; "):[],_={},C=0;C<w.length;C++){var j=w[C].split("="),L=j.slice(1).join("=");try{var W=decodeURIComponent(j[0]);if(_[W]=a.read(L,W),E===W)break}catch{}}return E?_[E]:_}}return Object.create({set:l,get:f,remove:function(E,w){l(E,"",lt({},w,{expires:-1}))},withAttributes:function(E){return $t(this.converter,lt({},this.attributes,E))},withConverter:function(E){return $t(lt({},this.converter,E),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(a)}})}$t(_u,{path:"/"});var er={exports:{}};/*!
30
+ <%s key={someKey} {...props} />`,tt,Be,gn,Be),Dn[Be+tt]=!0}}return d===f?bt(Pe):mn(Pe),Pe}}function Te(d,R,V){return we(d,R,V,!0)}function Nr(d,R,V){return we(d,R,V,!1)}var et=Nr,nt=Te;ut.Fragment=f,ut.jsx=et,ut.jsxs=nt}()),ut}var ha;function Fi(){return ha||(ha=1,process.env.NODE_ENV==="production"?jt.exports=zi():jt.exports=Li()),jt.exports}var A=Fi(),da=typeof global=="object"&&global&&global.Object===Object&&global,Bi=typeof self=="object"&&self&&self.Object===Object&&self,rn=da||Bi||Function("return this")(),Ln=rn.Symbol,va=Object.prototype,Ui=va.hasOwnProperty,qi=va.toString,ct=Ln?Ln.toStringTag:void 0;function Vi(a){var s=Ui.call(a,ct),l=a[ct];try{a[ct]=void 0;var f=!0}catch{}var C=qi.call(a);return f&&(s?a[ct]=l:delete a[ct]),C}var Hi=Object.prototype,Wi=Hi.toString;function Yi(a){return Wi.call(a)}var Gi="[object Null]",Xi="[object Undefined]",pa=Ln?Ln.toStringTag:void 0;function lt(a){return a==null?a===void 0?Xi:Gi:pa&&pa in Object(a)?Vi(a):Yi(a)}function ft(a){return a!=null&&typeof a=="object"}var Tt=Array.isArray;function ya(a){var s=typeof a;return a!=null&&(s=="object"||s=="function")}var Ji="[object AsyncFunction]",Zi="[object Function]",Qi="[object GeneratorFunction]",$i="[object Proxy]";function ma(a){if(!ya(a))return!1;var s=lt(a);return s==Zi||s==Qi||s==Ji||s==$i}var vr=rn["__core-js_shared__"],ga=function(){var a=/[^.]+$/.exec(vr&&vr.keys&&vr.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function eo(a){return!!ga&&ga in a}var no=Function.prototype,to=no.toString;function xn(a){if(a!=null){try{return to.call(a)}catch{}try{return a+""}catch{}}return""}var ro=/[\\^$.*+?()[\]{}|]/g,ao=/^\[object .+?Constructor\]$/,io=Function.prototype,oo=Object.prototype,so=io.toString,uo=oo.hasOwnProperty,co=RegExp("^"+so.call(uo).replace(ro,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lo(a){if(!ya(a)||eo(a))return!1;var s=ma(a)?co:ao;return s.test(xn(a))}function fo(a,s){return a==null?void 0:a[s]}function Fn(a,s){var l=fo(a,s);return lo(l)?l:void 0}var pr=Fn(rn,"WeakMap"),ho=9007199254740991,vo=/^(?:0|[1-9]\d*)$/;function po(a,s){var l=typeof a;return s=s??ho,!!s&&(l=="number"||l!="symbol"&&vo.test(a))&&a>-1&&a%1==0&&a<s}function ba(a,s){return a===s||a!==a&&s!==s}var yo=9007199254740991;function _a(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=yo}function mo(a){return a!=null&&_a(a.length)&&!ma(a)}var go=Object.prototype;function bo(a){var s=a&&a.constructor,l=typeof s=="function"&&s.prototype||go;return a===l}function _o(a,s){for(var l=-1,f=Array(a);++l<a;)f[l]=s(l);return f}var wo="[object Arguments]";function wa(a){return ft(a)&&lt(a)==wo}var xa=Object.prototype,xo=xa.hasOwnProperty,ko=xa.propertyIsEnumerable,Eo=wa(function(){return arguments}())?wa:function(a){return ft(a)&&xo.call(a,"callee")&&!ko.call(a,"callee")};function So(){return!1}var ka=typeof xe=="object"&&xe&&!xe.nodeType&&xe,Ea=ka&&typeof module=="object"&&module&&!module.nodeType&&module,Po=Ea&&Ea.exports===ka,Sa=Po?rn.Buffer:void 0,Co=Sa?Sa.isBuffer:void 0,yr=Co||So,Oo="[object Arguments]",jo="[object Array]",To="[object Boolean]",Ro="[object Date]",Ao="[object Error]",Do="[object Function]",Io="[object Map]",No="[object Number]",Ko="[object Object]",Mo="[object RegExp]",zo="[object Set]",Lo="[object String]",Fo="[object WeakMap]",Bo="[object ArrayBuffer]",Uo="[object DataView]",qo="[object Float32Array]",Vo="[object Float64Array]",Ho="[object Int8Array]",Wo="[object Int16Array]",Yo="[object Int32Array]",Go="[object Uint8Array]",Xo="[object Uint8ClampedArray]",Jo="[object Uint16Array]",Zo="[object Uint32Array]",ke={};ke[qo]=ke[Vo]=ke[Ho]=ke[Wo]=ke[Yo]=ke[Go]=ke[Xo]=ke[Jo]=ke[Zo]=!0,ke[Oo]=ke[jo]=ke[Bo]=ke[To]=ke[Uo]=ke[Ro]=ke[Ao]=ke[Do]=ke[Io]=ke[No]=ke[Ko]=ke[Mo]=ke[zo]=ke[Lo]=ke[Fo]=!1;function Qo(a){return ft(a)&&_a(a.length)&&!!ke[lt(a)]}function $o(a){return function(s){return a(s)}}var Pa=typeof xe=="object"&&xe&&!xe.nodeType&&xe,ht=Pa&&typeof module=="object"&&module&&!module.nodeType&&module,es=ht&&ht.exports===Pa,mr=es&&da.process,Ca=function(){try{var a=ht&&ht.require&&ht.require("util").types;return a||mr&&mr.binding&&mr.binding("util")}catch{}}(),Oa=Ca&&Ca.isTypedArray,ja=Oa?$o(Oa):Qo,ns=Object.prototype,ts=ns.hasOwnProperty;function rs(a,s){var l=Tt(a),f=!l&&Eo(a),C=!l&&!f&&yr(a),k=!l&&!f&&!C&&ja(a),w=l||f||C||k,O=w?_o(a.length,String):[],j=O.length;for(var M in a)ts.call(a,M)&&!(w&&(M=="length"||C&&(M=="offset"||M=="parent")||k&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||po(M,j)))&&O.push(M);return O}function as(a,s){return function(l){return a(s(l))}}var is=as(Object.keys,Object),os=Object.prototype,ss=os.hasOwnProperty;function us(a){if(!bo(a))return is(a);var s=[];for(var l in Object(a))ss.call(a,l)&&l!="constructor"&&s.push(l);return s}function cs(a){return mo(a)?rs(a):us(a)}var dt=Fn(Object,"create");function ls(){this.__data__=dt?dt(null):{},this.size=0}function fs(a){var s=this.has(a)&&delete this.__data__[a];return this.size-=s?1:0,s}var hs="__lodash_hash_undefined__",ds=Object.prototype,vs=ds.hasOwnProperty;function ps(a){var s=this.__data__;if(dt){var l=s[a];return l===hs?void 0:l}return vs.call(s,a)?s[a]:void 0}var ys=Object.prototype,ms=ys.hasOwnProperty;function gs(a){var s=this.__data__;return dt?s[a]!==void 0:ms.call(s,a)}var bs="__lodash_hash_undefined__";function _s(a,s){var l=this.__data__;return this.size+=this.has(a)?0:1,l[a]=dt&&s===void 0?bs:s,this}function kn(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var f=a[s];this.set(f[0],f[1])}}kn.prototype.clear=ls,kn.prototype.delete=fs,kn.prototype.get=ps,kn.prototype.has=gs,kn.prototype.set=_s;function ws(){this.__data__=[],this.size=0}function Rt(a,s){for(var l=a.length;l--;)if(ba(a[l][0],s))return l;return-1}var xs=Array.prototype,ks=xs.splice;function Es(a){var s=this.__data__,l=Rt(s,a);if(l<0)return!1;var f=s.length-1;return l==f?s.pop():ks.call(s,l,1),--this.size,!0}function Ss(a){var s=this.__data__,l=Rt(s,a);return l<0?void 0:s[l][1]}function Ps(a){return Rt(this.__data__,a)>-1}function Cs(a,s){var l=this.__data__,f=Rt(l,a);return f<0?(++this.size,l.push([a,s])):l[f][1]=s,this}function an(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var f=a[s];this.set(f[0],f[1])}}an.prototype.clear=ws,an.prototype.delete=Es,an.prototype.get=Ss,an.prototype.has=Ps,an.prototype.set=Cs;var vt=Fn(rn,"Map");function Os(){this.size=0,this.__data__={hash:new kn,map:new(vt||an),string:new kn}}function js(a){var s=typeof a;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?a!=="__proto__":a===null}function At(a,s){var l=a.__data__;return js(s)?l[typeof s=="string"?"string":"hash"]:l.map}function Ts(a){var s=At(this,a).delete(a);return this.size-=s?1:0,s}function Rs(a){return At(this,a).get(a)}function As(a){return At(this,a).has(a)}function Ds(a,s){var l=At(this,a),f=l.size;return l.set(a,s),this.size+=l.size==f?0:1,this}function En(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var f=a[s];this.set(f[0],f[1])}}En.prototype.clear=Os,En.prototype.delete=Ts,En.prototype.get=Rs,En.prototype.has=As,En.prototype.set=Ds;function Is(a,s){for(var l=-1,f=s.length,C=a.length;++l<f;)a[C+l]=s[l];return a}function Ns(){this.__data__=new an,this.size=0}function Ks(a){var s=this.__data__,l=s.delete(a);return this.size=s.size,l}function Ms(a){return this.__data__.get(a)}function zs(a){return this.__data__.has(a)}var Ls=200;function Fs(a,s){var l=this.__data__;if(l instanceof an){var f=l.__data__;if(!vt||f.length<Ls-1)return f.push([a,s]),this.size=++l.size,this;l=this.__data__=new En(f)}return l.set(a,s),this.size=l.size,this}function dn(a){var s=this.__data__=new an(a);this.size=s.size}dn.prototype.clear=Ns,dn.prototype.delete=Ks,dn.prototype.get=Ms,dn.prototype.has=zs,dn.prototype.set=Fs;function Bs(a,s){for(var l=-1,f=a==null?0:a.length,C=0,k=[];++l<f;){var w=a[l];s(w,l,a)&&(k[C++]=w)}return k}function Us(){return[]}var qs=Object.prototype,Vs=qs.propertyIsEnumerable,Ta=Object.getOwnPropertySymbols,Hs=Ta?function(a){return a==null?[]:(a=Object(a),Bs(Ta(a),function(s){return Vs.call(a,s)}))}:Us;function Ws(a,s,l){var f=s(a);return Tt(a)?f:Is(f,l(a))}function Ra(a){return Ws(a,cs,Hs)}var gr=Fn(rn,"DataView"),br=Fn(rn,"Promise"),_r=Fn(rn,"Set"),Aa="[object Map]",Ys="[object Object]",Da="[object Promise]",Ia="[object Set]",Na="[object WeakMap]",Ka="[object DataView]",Gs=xn(gr),Xs=xn(vt),Js=xn(br),Zs=xn(_r),Qs=xn(pr),vn=lt;(gr&&vn(new gr(new ArrayBuffer(1)))!=Ka||vt&&vn(new vt)!=Aa||br&&vn(br.resolve())!=Da||_r&&vn(new _r)!=Ia||pr&&vn(new pr)!=Na)&&(vn=function(a){var s=lt(a),l=s==Ys?a.constructor:void 0,f=l?xn(l):"";if(f)switch(f){case Gs:return Ka;case Xs:return Aa;case Js:return Da;case Zs:return Ia;case Qs:return Na}return s});var Ma=rn.Uint8Array,$s="__lodash_hash_undefined__";function eu(a){return this.__data__.set(a,$s),this}function nu(a){return this.__data__.has(a)}function Dt(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new En;++s<l;)this.add(a[s])}Dt.prototype.add=Dt.prototype.push=eu,Dt.prototype.has=nu;function tu(a,s){for(var l=-1,f=a==null?0:a.length;++l<f;)if(s(a[l],l,a))return!0;return!1}function ru(a,s){return a.has(s)}var au=1,iu=2;function za(a,s,l,f,C,k){var w=l&au,O=a.length,j=s.length;if(O!=j&&!(w&&j>O))return!1;var M=k.get(a),G=k.get(s);if(M&&G)return M==s&&G==a;var q=-1,J=!0,F=l&iu?new Dt:void 0;for(k.set(a,s),k.set(s,a);++q<O;){var D=a[q],ee=s[q];if(f)var ne=w?f(ee,D,q,s,a,k):f(D,ee,q,a,s,k);if(ne!==void 0){if(ne)continue;J=!1;break}if(F){if(!tu(s,function($,Y){if(!ru(F,Y)&&(D===$||C(D,$,l,f,k)))return F.push(Y)})){J=!1;break}}else if(!(D===ee||C(D,ee,l,f,k))){J=!1;break}}return k.delete(a),k.delete(s),J}function ou(a){var s=-1,l=Array(a.size);return a.forEach(function(f,C){l[++s]=[C,f]}),l}function su(a){var s=-1,l=Array(a.size);return a.forEach(function(f){l[++s]=f}),l}var uu=1,cu=2,lu="[object Boolean]",fu="[object Date]",hu="[object Error]",du="[object Map]",vu="[object Number]",pu="[object RegExp]",yu="[object Set]",mu="[object String]",gu="[object Symbol]",bu="[object ArrayBuffer]",_u="[object DataView]",La=Ln?Ln.prototype:void 0,wr=La?La.valueOf:void 0;function wu(a,s,l,f,C,k,w){switch(l){case _u:if(a.byteLength!=s.byteLength||a.byteOffset!=s.byteOffset)return!1;a=a.buffer,s=s.buffer;case bu:return!(a.byteLength!=s.byteLength||!k(new Ma(a),new Ma(s)));case lu:case fu:case vu:return ba(+a,+s);case hu:return a.name==s.name&&a.message==s.message;case pu:case mu:return a==s+"";case du:var O=ou;case yu:var j=f&uu;if(O||(O=su),a.size!=s.size&&!j)return!1;var M=w.get(a);if(M)return M==s;f|=cu,w.set(a,s);var G=za(O(a),O(s),f,C,k,w);return w.delete(a),G;case gu:if(wr)return wr.call(a)==wr.call(s)}return!1}var xu=1,ku=Object.prototype,Eu=ku.hasOwnProperty;function Su(a,s,l,f,C,k){var w=l&xu,O=Ra(a),j=O.length,M=Ra(s),G=M.length;if(j!=G&&!w)return!1;for(var q=j;q--;){var J=O[q];if(!(w?J in s:Eu.call(s,J)))return!1}var F=k.get(a),D=k.get(s);if(F&&D)return F==s&&D==a;var ee=!0;k.set(a,s),k.set(s,a);for(var ne=w;++q<j;){J=O[q];var $=a[J],Y=s[J];if(f)var Re=w?f(Y,$,J,s,a,k):f($,Y,J,a,s,k);if(!(Re===void 0?$===Y||C($,Y,l,f,k):Re)){ee=!1;break}ne||(ne=J=="constructor")}if(ee&&!ne){var be=a.constructor,ae=s.constructor;be!=ae&&"constructor"in a&&"constructor"in s&&!(typeof be=="function"&&be instanceof be&&typeof ae=="function"&&ae instanceof ae)&&(ee=!1)}return k.delete(a),k.delete(s),ee}var Pu=1,Fa="[object Arguments]",Ba="[object Array]",It="[object Object]",Cu=Object.prototype,Ua=Cu.hasOwnProperty;function Ou(a,s,l,f,C,k){var w=Tt(a),O=Tt(s),j=w?Ba:vn(a),M=O?Ba:vn(s);j=j==Fa?It:j,M=M==Fa?It:M;var G=j==It,q=M==It,J=j==M;if(J&&yr(a)){if(!yr(s))return!1;w=!0,G=!1}if(J&&!G)return k||(k=new dn),w||ja(a)?za(a,s,l,f,C,k):wu(a,s,j,l,f,C,k);if(!(l&Pu)){var F=G&&Ua.call(a,"__wrapped__"),D=q&&Ua.call(s,"__wrapped__");if(F||D){var ee=F?a.value():a,ne=D?s.value():s;return k||(k=new dn),C(ee,ne,l,f,k)}}return J?(k||(k=new dn),Su(a,s,l,f,C,k)):!1}function qa(a,s,l,f,C){return a===s?!0:a==null||s==null||!ft(a)&&!ft(s)?a!==a&&s!==s:Ou(a,s,l,f,qa,C)}function ju(a,s){return qa(a,s)}/*! js-cookie v3.0.5 | MIT */function Nt(a){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var f in l)a[f]=l[f]}return a}var Tu={read:function(a){return a[0]==='"'&&(a=a.slice(1,-1)),a.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(a){return encodeURIComponent(a).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function xr(a,s){function l(C,k,w){if(!(typeof document>"u")){w=Nt({},s,w),typeof w.expires=="number"&&(w.expires=new Date(Date.now()+w.expires*864e5)),w.expires&&(w.expires=w.expires.toUTCString()),C=encodeURIComponent(C).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var O="";for(var j in w)w[j]&&(O+="; "+j,w[j]!==!0&&(O+="="+w[j].split(";")[0]));return document.cookie=C+"="+a.write(k,C)+O}}function f(C){if(!(typeof document>"u"||arguments.length&&!C)){for(var k=document.cookie?document.cookie.split("; "):[],w={},O=0;O<k.length;O++){var j=k[O].split("="),M=j.slice(1).join("=");try{var G=decodeURIComponent(j[0]);if(w[G]=a.read(M,G),C===G)break}catch{}}return C?w[C]:w}}return Object.create({set:l,get:f,remove:function(C,k){l(C,"",Nt({},k,{expires:-1}))},withAttributes:function(C){return xr(this.converter,Nt({},this.attributes,C))},withConverter:function(C){return xr(Nt({},this.converter,C),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(a)}})}xr(Tu,{path:"/"});var kr={exports:{}};/*!
23
31
  * screenfull
24
32
  * v5.2.0 - 2021-11-03
25
33
  * (c) Sindre Sorhus; MIT License
26
- */var Ca;function wu(){return Ca||(Ca=1,function(a){(function(){var s=typeof window<"u"&&typeof window.document<"u"?window.document:{},l=a.exports,f=function(){for(var _,C=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],j=0,L=C.length,W={};j<L;j++)if(_=C[j],_&&_[1]in s){for(j=0;j<_.length;j++)W[C[0][j]]=_[j];return W}return!1}(),E={change:f.fullscreenchange,error:f.fullscreenerror},w={request:function(_,C){return new Promise((function(j,L){var W=(function(){this.off("change",W),j()}).bind(this);this.on("change",W),_=_||s.documentElement;var q=_[f.requestFullscreen](C);q instanceof Promise&&q.then(W).catch(L)}).bind(this))},exit:function(){return new Promise((function(_,C){if(!this.isFullscreen){_();return}var j=(function(){this.off("change",j),_()}).bind(this);this.on("change",j);var L=s[f.exitFullscreen]();L instanceof Promise&&L.then(j).catch(C)}).bind(this))},toggle:function(_,C){return this.isFullscreen?this.exit():this.request(_,C)},onchange:function(_){this.on("change",_)},onerror:function(_){this.on("error",_)},on:function(_,C){var j=E[_];j&&s.addEventListener(j,C,!1)},off:function(_,C){var j=E[_];j&&s.removeEventListener(j,C,!1)},raw:f};if(!f){l?a.exports={isEnabled:!1}:window.screenfull={isEnabled:!1};return}Object.defineProperties(w,{isFullscreen:{get:function(){return!!s[f.fullscreenElement]}},element:{enumerable:!0,get:function(){return s[f.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!s[f.fullscreenEnabled]}}}),l?a.exports=w:window.screenfull=w})()}(er)),er.exports}wu();var ft={exports:{}},nr={};/**
34
+ */var Va;function Ru(){return Va||(Va=1,function(a){(function(){var s=typeof window<"u"&&typeof window.document<"u"?window.document:{},l=a.exports,f=function(){for(var w,O=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],j=0,M=O.length,G={};j<M;j++)if(w=O[j],w&&w[1]in s){for(j=0;j<w.length;j++)G[O[0][j]]=w[j];return G}return!1}(),C={change:f.fullscreenchange,error:f.fullscreenerror},k={request:function(w,O){return new Promise((function(j,M){var G=(function(){this.off("change",G),j()}).bind(this);this.on("change",G),w=w||s.documentElement;var q=w[f.requestFullscreen](O);q instanceof Promise&&q.then(G).catch(M)}).bind(this))},exit:function(){return new Promise((function(w,O){if(!this.isFullscreen){w();return}var j=(function(){this.off("change",j),w()}).bind(this);this.on("change",j);var M=s[f.exitFullscreen]();M instanceof Promise&&M.then(j).catch(O)}).bind(this))},toggle:function(w,O){return this.isFullscreen?this.exit():this.request(w,O)},onchange:function(w){this.on("change",w)},onerror:function(w){this.on("error",w)},on:function(w,O){var j=C[w];j&&s.addEventListener(j,O,!1)},off:function(w,O){var j=C[w];j&&s.removeEventListener(j,O,!1)},raw:f};if(!f){l?a.exports={isEnabled:!1}:window.screenfull={isEnabled:!1};return}Object.defineProperties(k,{isFullscreen:{get:function(){return!!s[f.fullscreenElement]}},element:{enumerable:!0,get:function(){return s[f.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!s[f.fullscreenEnabled]}}}),l?a.exports=k:window.screenfull=k})()}(kr)),kr.exports}Ru();var Kt={exports:{}},Er={};/**
27
35
  * @license React
28
36
  * use-sync-external-store-shim.production.js
29
37
  *
@@ -31,7 +39,7 @@ React keys must be passed directly to JSX without using spread:
31
39
  *
32
40
  * This source code is licensed under the MIT license found in the
33
41
  * LICENSE file in the root directory of this source tree.
34
- */var Oa;function xu(){if(Oa)return nr;Oa=1;var a=K;function s(q,G){return q===G&&(q!==0||1/q===1/G)||q!==q&&G!==G}var l=typeof Object.is=="function"?Object.is:s,f=a.useState,E=a.useEffect,w=a.useLayoutEffect,_=a.useDebugValue;function C(q,G){var B=G(),R=f({inst:{value:B,getSnapshot:G}}),X=R[0].inst,Q=R[1];return w(function(){X.value=B,X.getSnapshot=G,j(X)&&Q({inst:X})},[q,B,G]),E(function(){return j(X)&&Q({inst:X}),q(function(){j(X)&&Q({inst:X})})},[q]),_(B),B}function j(q){var G=q.getSnapshot;q=q.value;try{var B=G();return!l(q,B)}catch{return!0}}function L(q,G){return G()}var W=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?L:C;return nr.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:W,nr}var tr={};/**
42
+ */var Ha;function Au(){if(Ha)return Er;Ha=1;var a=U;function s(q,J){return q===J&&(q!==0||1/q===1/J)||q!==q&&J!==J}var l=typeof Object.is=="function"?Object.is:s,f=a.useState,C=a.useEffect,k=a.useLayoutEffect,w=a.useDebugValue;function O(q,J){var F=J(),D=f({inst:{value:F,getSnapshot:J}}),ee=D[0].inst,ne=D[1];return k(function(){ee.value=F,ee.getSnapshot=J,j(ee)&&ne({inst:ee})},[q,F,J]),C(function(){return j(ee)&&ne({inst:ee}),q(function(){j(ee)&&ne({inst:ee})})},[q]),w(F),F}function j(q){var J=q.getSnapshot;q=q.value;try{var F=J();return!l(q,F)}catch{return!0}}function M(q,J){return J()}var G=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?M:O;return Er.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:G,Er}var Sr={};/**
35
43
  * @license React
36
44
  * use-sync-external-store-shim.development.js
37
45
  *
@@ -39,11 +47,11 @@ React keys must be passed directly to JSX without using spread:
39
47
  *
40
48
  * This source code is licensed under the MIT license found in the
41
49
  * LICENSE file in the root directory of this source tree.
42
- */var ja;function ku(){return ja||(ja=1,process.env.NODE_ENV!=="production"&&function(){function a(B,R){return B===R&&(B!==0||1/B===1/R)||B!==B&&R!==R}function s(B,R){W||E.startTransition===void 0||(W=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var X=R();if(!q){var Q=R();w(X,Q)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),q=!0)}Q=_({inst:{value:X,getSnapshot:R}});var J=Q[0].inst,Z=Q[1];return j(function(){J.value=X,J.getSnapshot=R,l(J)&&Z({inst:J})},[B,X,R]),C(function(){return l(J)&&Z({inst:J}),B(function(){l(J)&&Z({inst:J})})},[B]),L(X),X}function l(B){var R=B.getSnapshot;B=B.value;try{var X=R();return!w(B,X)}catch{return!0}}function f(B,R){return R()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var E=K,w=typeof Object.is=="function"?Object.is:a,_=E.useState,C=E.useEffect,j=E.useLayoutEffect,L=E.useDebugValue,W=!1,q=!1,G=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:s;tr.useSyncExternalStore=E.useSyncExternalStore!==void 0?E.useSyncExternalStore:G,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),tr}var Ta;function Eu(){return Ta||(Ta=1,process.env.NODE_ENV==="production"?ft.exports=xu():ft.exports=ku()),ft.exports}Eu();var Aa,Ra;function Da(a){return typeof a=="function"}const Su=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test",rr=typeof window<"u",Pu=typeof navigator<"u";rr&&(!((Ra=window)==null||(Aa=Ra.navigator)==null)&&Aa.userAgent)&&/iP(?:ad|hone|od)/.test(window.navigator.userAgent);const Ia=rr?K.useLayoutEffect:K.useEffect,Na=a=>{const s=K.useRef(a);return Ia(()=>{s.current=a},[a]),s};function Cu(a,...s){a&&a.addEventListener&&a.addEventListener(...s)}function Ou(a,...s){a&&a.removeEventListener&&a.removeEventListener(...s)}const ar=typeof window<"u"?window:void 0,ir={};function za(a,s){if(!rr)return;if(!a)return s;let l;return Da(a)?l=a():"current"in a?l=a.current:l=a,l}const ju=a=>(a+1)%1e6;function Tu(){const[,a]=K.useReducer(ju,0);return a}const Au=(a,s,l)=>{process.env.NODE_ENV!=="production"&&((!Array.isArray(s)||!s.length)&&console.warn("`useCustomCompareEffect` should not be used with no dependencies. Use React.useEffect instead."),typeof l!="function"&&console.warn("`useCustomCompareEffect` should be used with depsEqual callback for comparing deps list"));const f=K.useRef(void 0),E=Tu();f.current||(f.current=s),Ia(()=>{l(s,f.current)||(f.current=s,E())}),K.useEffect(a,f.current)},Ma=(a,s)=>{process.env.NODE_ENV!=="production"&&(!Array.isArray(s)||!s.length)&&console.warn("`useDeepCompareEffect` should not be used with no dependencies. Use React.useEffect instead."),Au(a,s,bu)};function ht(a,s,l,f=ir){const E=Na(s);Ma(()=>{const w=za(l,ar);if(!(w&&w.addEventListener))return;const _=C=>E.current(C);return Cu(w,a,_,f),()=>{w&&w.removeEventListener&&Ou(w,a,_)}},[a,l,f])}const Ru=a=>{Su&&(Da(a)||console.error(`useMount: parameter \`fn\` expected to be a function, but got "${typeof a}".`)),K.useEffect(()=>{a==null||a()},[])},Du=()=>{const[a,s]=K.useState(null),l=K.useCallback(()=>{var f;s((f=window)==null?void 0:f.document.activeElement)},[]);return ht("blur",l,ar,!0),ht("focus",l,ar,!0),Ru(()=>{var f;s((f=window)==null?void 0:f.document.activeElement)}),a},Iu=(a,s,l=ir)=>{const f=Na(s),E=K.useRef(),w=K.useCallback(()=>{E.current&&E.current.disconnect()},[]);return Ma(()=>{const _=za(a);if(_)return E.current=new ResizeObserver(f.current),E.current.observe(_,l),w},[f,w,a,l]),w},Ka=(a,s=ir)=>{const{box:l="content-box"}=s,[f,E]=K.useState(0),[w,_]=K.useState(0);return Iu(a,([C])=>{const j=l==="border-box"?C.borderBoxSize:l==="content-box"?C.contentBoxSize:C.devicePixelContentBoxSize;j?(E(j.reduce((L,{inlineSize:W})=>L+W,0)),_(j.reduce((L,{blockSize:W})=>L+W,0))):(E(C.contentRect.width),_(C.contentRect.height))},s),[f,w]},dt=Pu?navigator:void 0;dt&&(dt.connection||dt.mozConnection||dt.webkitConnection),K.use;var vt={exports:{}},Nu=vt.exports,La;function zu(){return La||(La=1,function(a,s){(function(l,f){a.exports=f()})(Nu,function(){var l=function(e,n){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])})(e,n)},f=function(){return(f=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)};function E(e,n,t){for(var r,i=0,o=n.length;i<o;i++)!r&&i in n||((r=r||Array.prototype.slice.call(n,0,i))[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))}var w=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Ci,_=Object.keys,C=Array.isArray;function j(e,n){return typeof n!="object"||_(n).forEach(function(t){e[t]=n[t]}),e}typeof Promise>"u"||w.Promise||(w.Promise=Promise);var L=Object.getPrototypeOf,W={}.hasOwnProperty;function q(e,n){return W.call(e,n)}function G(e,n){typeof n=="function"&&(n=n(L(e))),(typeof Reflect>"u"?_:Reflect.ownKeys)(n).forEach(function(t){R(e,t,n[t])})}var B=Object.defineProperty;function R(e,n,t,r){B(e,n,j(t&&q(t,"get")&&typeof t.get=="function"?{get:t.get,set:t.set,configurable:!0}:{value:t,configurable:!0,writable:!0},r))}function X(e){return{from:function(n){return e.prototype=Object.create(n.prototype),R(e.prototype,"constructor",e),{extend:G.bind(null,e.prototype)}}}}var Q=Object.getOwnPropertyDescriptor,J=[].slice;function Z(e,n,t){return J.call(e,n,t)}function Ee(e,n){return n(e)}function fe(e){if(!e)throw new Error("Assertion Failed")}function ee(e){w.setImmediate?setImmediate(e):setTimeout(e,0)}function ue(e,n){if(typeof n=="string"&&q(e,n))return e[n];if(!n)return e;if(typeof n!="string"){for(var t=[],r=0,i=n.length;r<i;++r){var o=ue(e,n[r]);t.push(o)}return t}var u=n.indexOf(".");if(u!==-1){var c=e[n.substr(0,u)];return c==null?void 0:ue(c,n.substr(u+1))}}function $(e,n,t){if(e&&n!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e)))if(typeof n!="string"&&"length"in n){fe(typeof t!="string"&&"length"in t);for(var r=0,i=n.length;r<i;++r)$(e,n[r],t[r])}else{var o,u,c=n.indexOf(".");c!==-1?(o=n.substr(0,c),(u=n.substr(c+1))===""?t===void 0?C(e)&&!isNaN(parseInt(o))?e.splice(o,1):delete e[o]:e[o]=t:$(c=!(c=e[o])||!q(e,o)?e[o]={}:c,u,t)):t===void 0?C(e)&&!isNaN(parseInt(n))?e.splice(n,1):delete e[n]:e[n]=t}}function ge(e){var n,t={};for(n in e)q(e,n)&&(t[n]=e[n]);return t}var oe=[].concat;function xe(e){return oe.apply([],e)}var ln="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(xe([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(n){return n+e+"Array"})}))).filter(function(e){return w[e]}),ke=new Set(ln.map(function(e){return w[e]})),le=null;function Me(e){return le=new WeakMap,e=function n(t){if(!t||typeof t!="object")return t;var r=le.get(t);if(r)return r;if(C(t)){r=[],le.set(t,r);for(var i=0,o=t.length;i<o;++i)r.push(n(t[i]))}else if(ke.has(t.constructor))r=t;else{var u,c=L(t);for(u in r=c===Object.prototype?{}:Object.create(c),le.set(t,r),t)q(t,u)&&(r[u]=n(t[u]))}return r}(e),le=null,e}var qn={}.toString;function kn(e){return qn.call(e).slice(8,-1)}var En=typeof Symbol<"u"?Symbol.iterator:"@@iterator",gt=typeof En=="symbol"?function(e){var n;return e!=null&&(n=e[En])&&n.apply(e)}:function(){return null};function Le(e,n){return n=e.indexOf(n),0<=n&&e.splice(n,1),0<=n}var Ye={};function T(e){var n,t,r,i;if(arguments.length===1){if(C(e))return e.slice();if(this===Ye&&typeof e=="string")return[e];if(i=gt(e)){for(t=[];!(r=i.next()).done;)t.push(r.value);return t}if(e==null)return[e];if(typeof(n=e.length)!="number")return[e];for(t=new Array(n);n--;)t[n]=e[n];return t}for(n=arguments.length,t=new Array(n);n--;)t[n]=arguments[n];return t}var te=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Yn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ze=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Yn),pe={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 be(e,n){this.name=e,this.message=n}function Ke(e,n){return e+". Errors: "+Object.keys(n).map(function(t){return n[t].toString()}).filter(function(t,r,i){return i.indexOf(t)===r}).join(`
43
- `)}function Re(e,n,t,r){this.failures=n,this.failedKeys=r,this.successCount=t,this.message=Ke(e,n)}function Be(e,n){this.name="BulkError",this.failures=Object.keys(n).map(function(t){return n[t]}),this.failuresByPos=n,this.message=Ke(e,this.failures)}X(be).from(Error).extend({toString:function(){return this.name+": "+this.message}}),X(Re).from(be),X(Be).from(be);var un=ze.reduce(function(e,n){return e[n]=n+"Error",e},{}),Se=be,H=ze.reduce(function(e,n){var t=n+"Error";function r(i,o){this.name=t,i?typeof i=="string"?(this.message="".concat(i).concat(o?`
44
- `+o:""),this.inner=o||null):typeof i=="object"&&(this.message="".concat(i.name," ").concat(i.message),this.inner=i):(this.message=pe[n]||t,this.inner=null)}return X(r).from(Se),e[n]=r,e},{});H.Syntax=SyntaxError,H.Type=TypeError,H.Range=RangeError;var Sn=Yn.reduce(function(e,n){return e[n+"Error"]=H[n],e},{}),Pn=ze.reduce(function(e,n){return["Syntax","Type","Range"].indexOf(n)===-1&&(e[n+"Error"]=H[n]),e},{});function he(){}function Vn(e){return e}function My(e,n){return e==null||e===Vn?n:function(t){return n(e(t))}}function cn(e,n){return function(){e.apply(this,arguments),n.apply(this,arguments)}}function Ky(e,n){return e===he?n:function(){var t=e.apply(this,arguments);t!==void 0&&(arguments[0]=t);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=n.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?cn(r,this.onsuccess):r),i&&(this.onerror=this.onerror?cn(i,this.onerror):i),o!==void 0?o:t}}function Ly(e,n){return e===he?n:function(){e.apply(this,arguments);var t=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,n.apply(this,arguments),t&&(this.onsuccess=this.onsuccess?cn(t,this.onsuccess):t),r&&(this.onerror=this.onerror?cn(r,this.onerror):r)}}function By(e,n){return e===he?n:function(t){var r=e.apply(this,arguments);j(t,r);var i=this.onsuccess,o=this.onerror;return this.onsuccess=null,this.onerror=null,t=n.apply(this,arguments),i&&(this.onsuccess=this.onsuccess?cn(i,this.onsuccess):i),o&&(this.onerror=this.onerror?cn(o,this.onerror):o),r===void 0?t===void 0?void 0:t:j(r,t)}}function Fy(e,n){return e===he?n:function(){return n.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function lr(e,n){return e===he?n:function(){var t=e.apply(this,arguments);if(t&&typeof t.then=="function"){for(var r=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return t.then(function(){return n.apply(r,o)})}return n.apply(this,arguments)}}Pn.ModifyError=Re,Pn.DexieError=be,Pn.BulkError=Be;var Fe=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Wa(e){Fe=e}var Hn={},Xa=100,ln=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,L(e),e];var n=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[n,L(n),e]}(),Yn=ln[0],ze=ln[1],ln=ln[2],ze=ze&&ze.then,fn=Yn&&Yn.constructor,fr=!!ln,Gn=function(e,n){Wn.push([e,n]),bt&&(queueMicrotask(qy),bt=!1)},hr=!0,bt=!0,hn=[],_t=[],dr=Vn,Qe={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:he,pgp:!1,env:{},finalize:he},Y=Qe,Wn=[],dn=0,wt=[];function U(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var n=this._PSD=Y;if(typeof e!="function"){if(e!==Hn)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&pr(this,this._value))}this._state=null,this._value=null,++n.ref,function t(r,i){try{i(function(o){if(r._state===null){if(o===r)throw new TypeError("A promise cannot be resolved with itself.");var u=r._lib&&Cn();o&&typeof o.then=="function"?t(r,function(c,d){o instanceof U?o._then(c,d):o.then(c,d)}):(r._state=!0,r._value=o,Qa(r)),u&&On()}},pr.bind(null,r))}catch(o){pr(r,o)}}(this,e)}var vr={get:function(){var e=Y,n=St;function t(r,i){var o=this,u=!e.global&&(e!==Y||n!==St),c=u&&!$e(),d=new U(function(p,g){yr(o,new Za($a(r,e,u,c),$a(i,e,u,c),p,g,e))});return this._consoleTask&&(d._consoleTask=this._consoleTask),d}return t.prototype=Hn,t},set:function(e){R(this,"then",e&&e.prototype===Hn?vr:{get:function(){return e},set:vr.set})}};function Za(e,n,t,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof n=="function"?n:null,this.resolve=t,this.reject=r,this.psd=i}function pr(e,n){var t,r;_t.push(n),e._state===null&&(t=e._lib&&Cn(),n=dr(n),e._state=!1,e._value=n,r=e,hn.some(function(i){return i._value===r._value})||hn.push(r),Qa(e),t&&On())}function Qa(e){var n=e._listeners;e._listeners=[];for(var t=0,r=n.length;t<r;++t)yr(e,n[t]);var i=e._PSD;--i.ref||i.finalize(),dn===0&&(++dn,Gn(function(){--dn==0&&mr()},[]))}function yr(e,n){if(e._state!==null){var t=e._state?n.onFulfilled:n.onRejected;if(t===null)return(e._state?n.resolve:n.reject)(e._value);++n.psd.ref,++dn,Gn(Uy,[t,e,n])}else e._listeners.push(n)}function Uy(e,n,t){try{var r,i=n._value;!n._state&&_t.length&&(_t=[]),r=Fe&&n._consoleTask?n._consoleTask.run(function(){return e(i)}):e(i),n._state||_t.indexOf(i)!==-1||function(o){for(var u=hn.length;u;)if(hn[--u]._value===o._value)return hn.splice(u,1)}(n),t.resolve(r)}catch(o){t.reject(o)}finally{--dn==0&&mr(),--t.psd.ref||t.psd.finalize()}}function qy(){vn(Qe,function(){Cn()&&On()})}function Cn(){var e=hr;return bt=hr=!1,e}function On(){var e,n,t;do for(;0<Wn.length;)for(e=Wn,Wn=[],t=e.length,n=0;n<t;++n){var r=e[n];r[0].apply(null,r[1])}while(0<Wn.length);bt=hr=!0}function mr(){var e=hn;hn=[],e.forEach(function(r){r._PSD.onunhandled.call(null,r._value,r)});for(var n=wt.slice(0),t=n.length;t;)n[--t]()}function xt(e){return new U(Hn,!1,e)}function me(e,n){var t=Y;return function(){var r=Cn(),i=Y;try{return en(t,!0),e.apply(this,arguments)}catch(o){n&&n(o)}finally{en(i,!1),r&&On()}}}G(U.prototype,{then:vr,_then:function(e,n){yr(this,new Za(null,null,e,n,Y))},catch:function(e){if(arguments.length===1)return this.then(null,e);var n=e,t=arguments[1];return typeof n=="function"?this.then(null,function(r){return(r instanceof n?t:xt)(r)}):this.then(null,function(r){return(r&&r.name===n?t:xt)(r)})},finally:function(e){return this.then(function(n){return U.resolve(e()).then(function(){return n})},function(n){return U.resolve(e()).then(function(){return xt(n)})})},timeout:function(e,n){var t=this;return e<1/0?new U(function(r,i){var o=setTimeout(function(){return i(new H.Timeout(n))},e);t.then(r,i).finally(clearTimeout.bind(null,o))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&R(U.prototype,Symbol.toStringTag,"Dexie.Promise"),Qe.env=Ja(),G(U,{all:function(){var e=T.apply(null,arguments).map(Pt);return new U(function(n,t){e.length===0&&n([]);var r=e.length;e.forEach(function(i,o){return U.resolve(i).then(function(u){e[o]=u,--r||n(e)},t)})})},resolve:function(e){return e instanceof U?e:e&&typeof e.then=="function"?new U(function(n,t){e.then(n,t)}):new U(Hn,!0,e)},reject:xt,race:function(){var e=T.apply(null,arguments).map(Pt);return new U(function(n,t){e.map(function(r){return U.resolve(r).then(n,t)})})},PSD:{get:function(){return Y},set:function(e){return Y=e}},totalEchoes:{get:function(){return St}},newPSD:Je,usePSD:vn,scheduler:{get:function(){return Gn},set:function(e){Gn=e}},rejectionMapper:{get:function(){return dr},set:function(e){dr=e}},follow:function(e,n){return new U(function(t,r){return Je(function(i,o){var u=Y;u.unhandleds=[],u.onunhandled=o,u.finalize=cn(function(){var c,d=this;c=function(){d.unhandleds.length===0?i():o(d.unhandleds[0])},wt.push(function p(){c(),wt.splice(wt.indexOf(p),1)}),++dn,Gn(function(){--dn==0&&mr()},[])},u.finalize),e()},n,t,r)})}}),fn&&(fn.allSettled&&R(U,"allSettled",function(){var e=T.apply(null,arguments).map(Pt);return new U(function(n){e.length===0&&n([]);var t=e.length,r=new Array(t);e.forEach(function(i,o){return U.resolve(i).then(function(u){return r[o]={status:"fulfilled",value:u}},function(u){return r[o]={status:"rejected",reason:u}}).then(function(){return--t||n(r)})})})}),fn.any&&typeof AggregateError<"u"&&R(U,"any",function(){var e=T.apply(null,arguments).map(Pt);return new U(function(n,t){e.length===0&&t(new AggregateError([]));var r=e.length,i=new Array(r);e.forEach(function(o,u){return U.resolve(o).then(function(c){return n(c)},function(c){i[u]=c,--r||t(new AggregateError(i))})})})}),fn.withResolvers&&(U.withResolvers=fn.withResolvers));var Pe={awaits:0,echoes:0,id:0},Vy=0,kt=[],Et=0,St=0,Hy=0;function Je(e,n,t,r){var i=Y,o=Object.create(i);return o.parent=i,o.ref=0,o.global=!1,o.id=++Hy,Qe.env,o.env=fr?{Promise:U,PromiseProp:{value:U,configurable:!0,writable:!0},all:U.all,race:U.race,allSettled:U.allSettled,any:U.any,resolve:U.resolve,reject:U.reject}:{},n&&j(o,n),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()},r=vn(o,e,t,r),o.ref===0&&o.finalize(),r}function jn(){return Pe.id||(Pe.id=++Vy),++Pe.awaits,Pe.echoes+=Xa,Pe.id}function $e(){return!!Pe.awaits&&(--Pe.awaits==0&&(Pe.id=0),Pe.echoes=Pe.awaits*Xa,!0)}function Pt(e){return Pe.echoes&&e&&e.constructor===fn?(jn(),e.then(function(n){return $e(),n},function(n){return $e(),_e(n)})):e}function Yy(){var e=kt[kt.length-1];kt.pop(),en(e,!1)}function en(e,n){var t,r=Y;(n?!Pe.echoes||Et++&&e===Y:!Et||--Et&&e===Y)||queueMicrotask(n?(function(i){++St,Pe.echoes&&--Pe.echoes!=0||(Pe.echoes=Pe.awaits=Pe.id=0),kt.push(Y),en(i,!0)}).bind(null,e):Yy),e!==Y&&(Y=e,r===Qe&&(Qe.env=Ja()),fr&&(t=Qe.env.Promise,n=e.env,(r.global||e.global)&&(Object.defineProperty(w,"Promise",n.PromiseProp),t.all=n.all,t.race=n.race,t.resolve=n.resolve,t.reject=n.reject,n.allSettled&&(t.allSettled=n.allSettled),n.any&&(t.any=n.any))))}function Ja(){var e=w.Promise;return fr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(w,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function vn(e,n,t,r,i){var o=Y;try{return en(e,!0),n(t,r,i)}finally{en(o,!1)}}function $a(e,n,t,r){return typeof e!="function"?e:function(){var i=Y;t&&jn(),en(n,!0);try{return e.apply(this,arguments)}finally{en(i,!1),r&&queueMicrotask($e)}}}function gr(e){Promise===fn&&Pe.echoes===0?Et===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}(""+ze).indexOf("[native code]")===-1&&(jn=$e=he);var _e=U.reject,pn="￿",Ge="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",ei="String expected.",Tn=[],Ct="__dbnames",br="readonly",_r="readwrite";function yn(e,n){return e?n?function(){return e.apply(this,arguments)&&n.apply(this,arguments)}:e:n}var ni={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ot(e){return typeof e!="string"||/\./.test(e)?function(n){return n}:function(n){return n[e]===void 0&&e in n&&delete(n=Me(n))[e],n}}function ti(){throw H.Type()}function se(e,n){try{var t=ri(e),r=ri(n);if(t!==r)return t==="Array"?1:r==="Array"?-1:t==="binary"?1:r==="binary"?-1:t==="string"?1:r==="string"?-1:t==="Date"?1:r!=="Date"?NaN:-1;switch(t){case"number":case"Date":case"string":return n<e?1:e<n?-1:0;case"binary":return function(i,o){for(var u=i.length,c=o.length,d=u<c?u:c,p=0;p<d;++p)if(i[p]!==o[p])return i[p]<o[p]?-1:1;return u===c?0:u<c?-1:1}(ai(e),ai(n));case"Array":return function(i,o){for(var u=i.length,c=o.length,d=u<c?u:c,p=0;p<d;++p){var g=se(i[p],o[p]);if(g!==0)return g}return u===c?0:u<c?-1:1}(e,n)}}catch{}return NaN}function ri(e){var n=typeof e;return n!="object"?n:ArrayBuffer.isView(e)?"binary":(e=kn(e),e==="ArrayBuffer"?"binary":e)}function ai(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var ii=(ye.prototype._trans=function(e,n,t){var r=this._tx||Y.trans,i=this.name,o=Fe&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(e==="readonly"?"read":"write"," ").concat(this.name));function u(p,g,h){if(!h.schema[i])throw new H.NotFound("Table "+i+" not part of transaction");return n(h.idbtrans,h)}var c=Cn();try{var d=r&&r.db._novip===this.db._novip?r===Y.trans?r._promise(e,u,t):Je(function(){return r._promise(e,u,t)},{trans:r,transless:Y.transless||Y}):function p(g,h,x,v){if(g.idbdb&&(g._state.openComplete||Y.letThrough||g._vip)){var m=g._createTransaction(h,x,g._dbSchema);try{m.create(),g._state.PR1398_maxLoop=3}catch(b){return b.name===un.InvalidState&&g.isOpen()&&0<--g._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),g.close({disableAutoOpen:!1}),g.open().then(function(){return p(g,h,x,v)})):_e(b)}return m._promise(h,function(b,y){return Je(function(){return Y.trans=m,v(b,y,m)})}).then(function(b){if(h==="readwrite")try{m.idbtrans.commit()}catch{}return h==="readonly"?b:m._completion.then(function(){return b})})}if(g._state.openComplete)return _e(new H.DatabaseClosed(g._state.dbOpenError));if(!g._state.isBeingOpened){if(!g._state.autoOpen)return _e(new H.DatabaseClosed);g.open().catch(he)}return g._state.dbReadyPromise.then(function(){return p(g,h,x,v)})}(this.db,e,[this.name],u);return o&&(d._consoleTask=o,d=d.catch(function(p){return console.trace(p),_e(p)})),d}finally{c&&On()}},ye.prototype.get=function(e,n){var t=this;return e&&e.constructor===Object?this.where(e).first(n):e==null?_e(new H.Type("Invalid argument to Table.get()")):this._trans("readonly",function(r){return t.core.get({trans:r,key:e}).then(function(i){return t.hook.reading.fire(i)})}).then(n)},ye.prototype.where=function(e){if(typeof e=="string")return new this.db.WhereClause(this,e);if(C(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=_(e);if(n.length===1)return this.where(n[0]).equals(e[n[0]]);var t=this.schema.indexes.concat(this.schema.primKey).filter(function(c){if(c.compound&&n.every(function(p){return 0<=c.keyPath.indexOf(p)})){for(var d=0;d<n.length;++d)if(n.indexOf(c.keyPath[d])===-1)return!1;return!0}return!1}).sort(function(c,d){return c.keyPath.length-d.keyPath.length})[0];if(t&&this.db._maxKey!==pn){var o=t.keyPath.slice(0,n.length);return this.where(o).equals(o.map(function(d){return e[d]}))}!t&&Fe&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(n.join("+"),"]"));var r=this.schema.idxByName;function i(c,d){return se(c,d)===0}var u=n.reduce(function(h,d){var p=h[0],g=h[1],h=r[d],x=e[d];return[p||h,p||!h?yn(g,h&&h.multi?function(v){return v=ue(v,d),C(v)&&v.some(function(m){return i(x,m)})}:function(v){return i(x,ue(v,d))}):g]},[null,null]),o=u[0],u=u[1];return o?this.where(o.name).equals(e[o.keyPath]).filter(u):t?this.filter(u):this.where(n).equals("")},ye.prototype.filter=function(e){return this.toCollection().and(e)},ye.prototype.count=function(e){return this.toCollection().count(e)},ye.prototype.offset=function(e){return this.toCollection().offset(e)},ye.prototype.limit=function(e){return this.toCollection().limit(e)},ye.prototype.each=function(e){return this.toCollection().each(e)},ye.prototype.toArray=function(e){return this.toCollection().toArray(e)},ye.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ye.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,C(e)?"[".concat(e.join("+"),"]"):e))},ye.prototype.reverse=function(){return this.toCollection().reverse()},ye.prototype.mapToClass=function(e){var n,t=this.db,r=this.name;function i(){return n!==null&&n.apply(this,arguments)||this}(this.schema.mappedClass=e).prototype instanceof ti&&(function(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=d}l(d,p),d.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}(i,n=e),Object.defineProperty(i.prototype,"db",{get:function(){return t},enumerable:!1,configurable:!0}),i.prototype.table=function(){return r},e=i);for(var o=new Set,u=e.prototype;u;u=L(u))Object.getOwnPropertyNames(u).forEach(function(d){return o.add(d)});function c(d){if(!d)return d;var p,g=Object.create(e.prototype);for(p in d)if(!o.has(p))try{g[p]=d[p]}catch{}return g}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=c,this.hook("reading",c),e},ye.prototype.defineClass=function(){return this.mapToClass(function(e){j(this,e)})},ye.prototype.add=function(e,n){var t=this,r=this.schema.primKey,i=r.auto,o=r.keyPath,u=e;return o&&i&&(u=Ot(o)(e)),this._trans("readwrite",function(c){return t.core.mutate({trans:c,type:"add",keys:n!=null?[n]:null,values:[u]})}).then(function(c){return c.numFailures?U.reject(c.failures[0]):c.lastResult}).then(function(c){if(o)try{$(e,o,c)}catch{}return c})},ye.prototype.update=function(e,n){return typeof e!="object"||C(e)?this.where(":id").equals(e).modify(n):(e=ue(e,this.schema.primKey.keyPath),e===void 0?_e(new H.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e).modify(n))},ye.prototype.put=function(e,n){var t=this,r=this.schema.primKey,i=r.auto,o=r.keyPath,u=e;return o&&i&&(u=Ot(o)(e)),this._trans("readwrite",function(c){return t.core.mutate({trans:c,type:"put",values:[u],keys:n!=null?[n]:null})}).then(function(c){return c.numFailures?U.reject(c.failures[0]):c.lastResult}).then(function(c){if(o)try{$(e,o,c)}catch{}return c})},ye.prototype.delete=function(e){var n=this;return this._trans("readwrite",function(t){return n.core.mutate({trans:t,type:"delete",keys:[e]})}).then(function(t){return t.numFailures?U.reject(t.failures[0]):void 0})},ye.prototype.clear=function(){var e=this;return this._trans("readwrite",function(n){return e.core.mutate({trans:n,type:"deleteRange",range:ni})}).then(function(n){return n.numFailures?U.reject(n.failures[0]):void 0})},ye.prototype.bulkGet=function(e){var n=this;return this._trans("readonly",function(t){return n.core.getMany({keys:e,trans:t}).then(function(r){return r.map(function(i){return n.hook.reading.fire(i)})})})},ye.prototype.bulkAdd=function(e,n,t){var r=this,i=Array.isArray(n)?n:void 0,o=(t=t||(i?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",function(u){var p=r.schema.primKey,c=p.auto,p=p.keyPath;if(p&&i)throw new H.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new H.InvalidArgument("Arguments objects and keys must have the same length");var d=e.length,p=p&&c?e.map(Ot(p)):e;return r.core.mutate({trans:u,type:"add",keys:i,values:p,wantResults:o}).then(function(m){var h=m.numFailures,x=m.results,v=m.lastResult,m=m.failures;if(h===0)return o?x:v;throw new Be("".concat(r.name,".bulkAdd(): ").concat(h," of ").concat(d," operations failed"),m)})})},ye.prototype.bulkPut=function(e,n,t){var r=this,i=Array.isArray(n)?n:void 0,o=(t=t||(i?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",function(u){var p=r.schema.primKey,c=p.auto,p=p.keyPath;if(p&&i)throw new H.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new H.InvalidArgument("Arguments objects and keys must have the same length");var d=e.length,p=p&&c?e.map(Ot(p)):e;return r.core.mutate({trans:u,type:"put",keys:i,values:p,wantResults:o}).then(function(m){var h=m.numFailures,x=m.results,v=m.lastResult,m=m.failures;if(h===0)return o?x:v;throw new Be("".concat(r.name,".bulkPut(): ").concat(h," of ").concat(d," operations failed"),m)})})},ye.prototype.bulkUpdate=function(e){var n=this,t=this.core,r=e.map(function(u){return u.key}),i=e.map(function(u){return u.changes}),o=[];return this._trans("readwrite",function(u){return t.getMany({trans:u,keys:r,cache:"clone"}).then(function(c){var d=[],p=[];e.forEach(function(h,x){var v=h.key,m=h.changes,b=c[x];if(b){for(var y=0,k=Object.keys(m);y<k.length;y++){var S=k[y],P=m[S];if(S===n.schema.primKey.keyPath){if(se(P,v)!==0)throw new H.Constraint("Cannot update primary key in bulkUpdate()")}else $(b,S,P)}o.push(x),d.push(v),p.push(b)}});var g=d.length;return t.mutate({trans:u,type:"put",keys:d,values:p,updates:{keys:r,changeSpecs:i}}).then(function(h){var x=h.numFailures,v=h.failures;if(x===0)return g;for(var m=0,b=Object.keys(v);m<b.length;m++){var y,k=b[m],S=o[Number(k)];S!=null&&(y=v[k],delete v[k],v[S]=y)}throw new Be("".concat(n.name,".bulkUpdate(): ").concat(x," of ").concat(g," operations failed"),v)})})})},ye.prototype.bulkDelete=function(e){var n=this,t=e.length;return this._trans("readwrite",function(r){return n.core.mutate({trans:r,type:"delete",keys:e})}).then(function(u){var i=u.numFailures,o=u.lastResult,u=u.failures;if(i===0)return o;throw new Be("".concat(n.name,".bulkDelete(): ").concat(i," of ").concat(t," operations failed"),u)})},ye);function ye(){}function Xn(e){function n(u,c){if(c){for(var d=arguments.length,p=new Array(d-1);--d;)p[d-1]=arguments[d];return t[u].subscribe.apply(null,p),e}if(typeof u=="string")return t[u]}var t={};n.addEventType=o;for(var r=1,i=arguments.length;r<i;++r)o(arguments[r]);return n;function o(u,c,d){if(typeof u!="object"){var p;c=c||Fy;var g={subscribers:[],fire:d=d||he,subscribe:function(h){g.subscribers.indexOf(h)===-1&&(g.subscribers.push(h),g.fire=c(g.fire,h))},unsubscribe:function(h){g.subscribers=g.subscribers.filter(function(x){return x!==h}),g.fire=g.subscribers.reduce(c,d)}};return t[u]=n[u]=g}_(p=u).forEach(function(h){var x=p[h];if(C(x))o(h,p[h][0],p[h][1]);else{if(x!=="asap")throw new H.InvalidArgument("Invalid event config");var v=o(h,Vn,function(){for(var m=arguments.length,b=new Array(m);m--;)b[m]=arguments[m];v.subscribers.forEach(function(y){ee(function(){y.apply(null,b)})})})}})}}function Zn(e,n){return X(n).from({prototype:e}),n}function An(e,n){return!(e.filter||e.algorithm||e.or)&&(n?e.justLimit:!e.replayFilter)}function wr(e,n){e.filter=yn(e.filter,n)}function xr(e,n,t){var r=e.replayFilter;e.replayFilter=r?function(){return yn(r(),n())}:n,e.justLimit=t&&!r}function jt(e,n){if(e.isPrimKey)return n.primaryKey;var t=n.getIndexByKeyPath(e.index);if(!t)throw new H.Schema("KeyPath "+e.index+" on object store "+n.name+" is not indexed");return t}function oi(e,n,t){var r=jt(e,n.schema);return n.openCursor({trans:t,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:r,range:e.range}})}function Tt(e,n,t,r){var i=e.replayFilter?yn(e.filter,e.replayFilter()):e.filter;if(e.or){var o={},u=function(c,d,p){var g,h;i&&!i(d,p,function(x){return d.stop(x)},function(x){return d.fail(x)})||((h=""+(g=d.primaryKey))=="[object ArrayBuffer]"&&(h=""+new Uint8Array(g)),q(o,h)||(o[h]=!0,n(c,d,p)))};return Promise.all([e.or._iterate(u,t),si(oi(e,r,t),e.algorithm,u,!e.keysOnly&&e.valueMapper)])}return si(oi(e,r,t),yn(e.algorithm,i),n,!e.keysOnly&&e.valueMapper)}function si(e,n,t,r){var i=me(r?function(o,u,c){return t(r(o),u,c)}:t);return e.then(function(o){if(o)return o.start(function(){var u=function(){return o.continue()};n&&!n(o,function(c){return u=c},function(c){o.stop(c),u=he},function(c){o.fail(c),u=he})||i(o.value,o,function(c){return u=c}),u()})})}var Qn=(ui.prototype.execute=function(e){var n=this["@@propmod"];if(n.add!==void 0){var t=n.add;if(C(t))return E(E([],C(e)?e:[],!0),t).sort();if(typeof t=="number")return(Number(e)||0)+t;if(typeof t=="bigint")try{return BigInt(e)+t}catch{return BigInt(0)+t}throw new TypeError("Invalid term ".concat(t))}if(n.remove!==void 0){var r=n.remove;if(C(r))return C(e)?e.filter(function(i){return!r.includes(i)}).sort():[];if(typeof r=="number")return Number(e)-r;if(typeof r=="bigint")try{return BigInt(e)-r}catch{return BigInt(0)-r}throw new TypeError("Invalid subtrahend ".concat(r))}return t=(t=n.replacePrefix)===null||t===void 0?void 0:t[0],t&&typeof e=="string"&&e.startsWith(t)?n.replacePrefix[1]+e.substring(t.length):e},ui);function ui(e){this["@@propmod"]=e}var Gy=(ce.prototype._read=function(e,n){var t=this._ctx;return t.error?t.table._trans(null,_e.bind(null,t.error)):t.table._trans("readonly",e).then(n)},ce.prototype._write=function(e){var n=this._ctx;return n.error?n.table._trans(null,_e.bind(null,n.error)):n.table._trans("readwrite",e,"locked")},ce.prototype._addAlgorithm=function(e){var n=this._ctx;n.algorithm=yn(n.algorithm,e)},ce.prototype._iterate=function(e,n){return Tt(this._ctx,e,n,this._ctx.table.core)},ce.prototype.clone=function(e){var n=Object.create(this.constructor.prototype),t=Object.create(this._ctx);return e&&j(t,e),n._ctx=t,n},ce.prototype.raw=function(){return this._ctx.valueMapper=null,this},ce.prototype.each=function(e){var n=this._ctx;return this._read(function(t){return Tt(n,e,t,n.table.core)})},ce.prototype.count=function(e){var n=this;return this._read(function(t){var r=n._ctx,i=r.table.core;if(An(r,!0))return i.count({trans:t,query:{index:jt(r,i.schema),range:r.range}}).then(function(u){return Math.min(u,r.limit)});var o=0;return Tt(r,function(){return++o,!1},t,i).then(function(){return o})}).then(e)},ce.prototype.sortBy=function(e,n){var t=e.split(".").reverse(),r=t[0],i=t.length-1;function o(d,p){return p?o(d[t[p]],p-1):d[r]}var u=this._ctx.dir==="next"?1:-1;function c(d,p){return se(o(d,i),o(p,i))*u}return this.toArray(function(d){return d.sort(c)}).then(n)},ce.prototype.toArray=function(e){var n=this;return this._read(function(t){var r=n._ctx;if(r.dir==="next"&&An(r,!0)&&0<r.limit){var i=r.valueMapper,o=jt(r,r.table.core.schema);return r.table.core.query({trans:t,limit:r.limit,values:!0,query:{index:o,range:r.range}}).then(function(c){return c=c.result,i?c.map(i):c})}var u=[];return Tt(r,function(c){return u.push(c)},t,r.table.core).then(function(){return u})},e)},ce.prototype.offset=function(e){var n=this._ctx;return e<=0||(n.offset+=e,An(n)?xr(n,function(){var t=e;return function(r,i){return t===0||(t===1?--t:i(function(){r.advance(t),t=0}),!1)}}):xr(n,function(){var t=e;return function(){return--t<0}})),this},ce.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),xr(this._ctx,function(){var n=e;return function(t,r,i){return--n<=0&&r(i),0<=n}},!0),this},ce.prototype.until=function(e,n){return wr(this._ctx,function(t,r,i){return!e(t.value)||(r(i),n)}),this},ce.prototype.first=function(e){return this.limit(1).toArray(function(n){return n[0]}).then(e)},ce.prototype.last=function(e){return this.reverse().first(e)},ce.prototype.filter=function(e){var n;return wr(this._ctx,function(t){return e(t.value)}),(n=this._ctx).isMatch=yn(n.isMatch,e),this},ce.prototype.and=function(e){return this.filter(e)},ce.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},ce.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},ce.prototype.desc=function(){return this.reverse()},ce.prototype.eachKey=function(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(t,r){e(r.key,r)})},ce.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},ce.prototype.eachPrimaryKey=function(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(t,r){e(r.primaryKey,r)})},ce.prototype.keys=function(e){var n=this._ctx;n.keysOnly=!n.isMatch;var t=[];return this.each(function(r,i){t.push(i.key)}).then(function(){return t}).then(e)},ce.prototype.primaryKeys=function(e){var n=this._ctx;if(n.dir==="next"&&An(n,!0)&&0<n.limit)return this._read(function(r){var i=jt(n,n.table.core.schema);return n.table.core.query({trans:r,values:!1,limit:n.limit,query:{index:i,range:n.range}})}).then(function(r){return r.result}).then(e);n.keysOnly=!n.isMatch;var t=[];return this.each(function(r,i){t.push(i.primaryKey)}).then(function(){return t}).then(e)},ce.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},ce.prototype.firstKey=function(e){return this.limit(1).keys(function(n){return n[0]}).then(e)},ce.prototype.lastKey=function(e){return this.reverse().firstKey(e)},ce.prototype.distinct=function(){var e=this._ctx,e=e.index&&e.table.schema.idxByName[e.index];if(!e||!e.multi)return this;var n={};return wr(this._ctx,function(i){var r=i.primaryKey.toString(),i=q(n,r);return n[r]=!0,!i}),this},ce.prototype.modify=function(e){var n=this,t=this._ctx;return this._write(function(r){var i,o,u;u=typeof e=="function"?e:(i=_(e),o=i.length,function(y){for(var k=!1,S=0;S<o;++S){var P=i[S],O=e[P],D=ue(y,P);O instanceof Qn?($(y,P,O.execute(D)),k=!0):D!==O&&($(y,P,O),k=!0)}return k});var c=t.table.core,h=c.schema.primaryKey,d=h.outbound,p=h.extractKey,g=200,h=n.db._options.modifyChunkSize;h&&(g=typeof h=="object"?h[c.name]||h["*"]||200:h);function x(y,P){var S=P.failures,P=P.numFailures;m+=y-P;for(var O=0,D=_(S);O<D.length;O++){var M=D[O];v.push(S[M])}}var v=[],m=0,b=[];return n.clone().primaryKeys().then(function(y){function k(P){var O=Math.min(g,y.length-P);return c.getMany({trans:r,keys:y.slice(P,P+O),cache:"immutable"}).then(function(D){for(var M=[],I=[],N=d?[]:null,F=[],z=0;z<O;++z){var V=D[z],re={value:Me(V),primKey:y[P+z]};u.call(re,re.value,re)!==!1&&(re.value==null?F.push(y[P+z]):d||se(p(V),p(re.value))===0?(I.push(re.value),d&&N.push(y[P+z])):(F.push(y[P+z]),M.push(re.value)))}return Promise.resolve(0<M.length&&c.mutate({trans:r,type:"add",values:M}).then(function(ae){for(var ie in ae.failures)F.splice(parseInt(ie),1);x(M.length,ae)})).then(function(){return(0<I.length||S&&typeof e=="object")&&c.mutate({trans:r,type:"put",keys:N,values:I,criteria:S,changeSpec:typeof e!="function"&&e,isAdditionalChunk:0<P}).then(function(ae){return x(I.length,ae)})}).then(function(){return(0<F.length||S&&e===kr)&&c.mutate({trans:r,type:"delete",keys:F,criteria:S,isAdditionalChunk:0<P}).then(function(ae){return x(F.length,ae)})}).then(function(){return y.length>P+O&&k(P+g)})})}var S=An(t)&&t.limit===1/0&&(typeof e!="function"||e===kr)&&{index:t.index,range:t.range};return k(0).then(function(){if(0<v.length)throw new Re("Error modifying one or more objects",v,m,b);return y.length})})})},ce.prototype.delete=function(){var e=this._ctx,n=e.range;return An(e)&&(e.isPrimKey||n.type===3)?this._write(function(t){var r=e.table.core.schema.primaryKey,i=n;return e.table.core.count({trans:t,query:{index:r,range:i}}).then(function(o){return e.table.core.mutate({trans:t,type:"deleteRange",range:i}).then(function(u){var c=u.failures;if(u.lastResult,u.results,u=u.numFailures,u)throw new Re("Could not delete some values",Object.keys(c).map(function(d){return c[d]}),o-u);return o-u})})}):this.modify(kr)},ce);function ce(){}var kr=function(e,n){return n.value=null};function Wy(e,n){return e<n?-1:e===n?0:1}function Xy(e,n){return n<e?-1:e===n?0:1}function Ie(e,n,t){return e=e instanceof li?new e.Collection(e):e,e._ctx.error=new(t||TypeError)(n),e}function Rn(e){return new e.Collection(e,function(){return ci("")}).limit(0)}function At(e,n,t,r){var i,o,u,c,d,p,g,h=t.length;if(!t.every(function(m){return typeof m=="string"}))return Ie(e,ei);function x(m){i=m==="next"?function(y){return y.toUpperCase()}:function(y){return y.toLowerCase()},o=m==="next"?function(y){return y.toLowerCase()}:function(y){return y.toUpperCase()},u=m==="next"?Wy:Xy;var b=t.map(function(y){return{lower:o(y),upper:i(y)}}).sort(function(y,k){return u(y.lower,k.lower)});c=b.map(function(y){return y.upper}),d=b.map(function(y){return y.lower}),g=(p=m)==="next"?"":r}x("next"),e=new e.Collection(e,function(){return nn(c[0],d[h-1]+r)}),e._ondirectionchange=function(m){x(m)};var v=0;return e._addAlgorithm(function(m,b,y){var k=m.key;if(typeof k!="string")return!1;var S=o(k);if(n(S,d,v))return!0;for(var P=null,O=v;O<h;++O){var D=function(M,I,N,F,z,V){for(var re=Math.min(M.length,F.length),ae=-1,ie=0;ie<re;++ie){var Ne=I[ie];if(Ne!==F[ie])return z(M[ie],N[ie])<0?M.substr(0,ie)+N[ie]+N.substr(ie+1):z(M[ie],F[ie])<0?M.substr(0,ie)+F[ie]+N.substr(ie+1):0<=ae?M.substr(0,ae)+I[ae]+N.substr(ae+1):null;z(M[ie],Ne)<0&&(ae=ie)}return re<F.length&&V==="next"?M+N.substr(M.length):re<M.length&&V==="prev"?M.substr(0,N.length):ae<0?null:M.substr(0,ae)+F[ae]+N.substr(ae+1)}(k,S,c[O],d[O],u,p);D===null&&P===null?v=O+1:(P===null||0<u(P,D))&&(P=D)}return b(P!==null?function(){m.continue(P+g)}:y),!1}),e}function nn(e,n,t,r){return{type:2,lower:e,upper:n,lowerOpen:t,upperOpen:r}}function ci(e){return{type:1,lower:e,upper:e}}var li=(Object.defineProperty(Ce.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Ce.prototype.between=function(e,n,t,r){t=t!==!1,r=r===!0;try{return 0<this._cmp(e,n)||this._cmp(e,n)===0&&(t||r)&&(!t||!r)?Rn(this):new this.Collection(this,function(){return nn(e,n,!t,!r)})}catch{return Ie(this,Ge)}},Ce.prototype.equals=function(e){return e==null?Ie(this,Ge):new this.Collection(this,function(){return ci(e)})},Ce.prototype.above=function(e){return e==null?Ie(this,Ge):new this.Collection(this,function(){return nn(e,void 0,!0)})},Ce.prototype.aboveOrEqual=function(e){return e==null?Ie(this,Ge):new this.Collection(this,function(){return nn(e,void 0,!1)})},Ce.prototype.below=function(e){return e==null?Ie(this,Ge):new this.Collection(this,function(){return nn(void 0,e,!1,!0)})},Ce.prototype.belowOrEqual=function(e){return e==null?Ie(this,Ge):new this.Collection(this,function(){return nn(void 0,e)})},Ce.prototype.startsWith=function(e){return typeof e!="string"?Ie(this,ei):this.between(e,e+pn,!0,!0)},Ce.prototype.startsWithIgnoreCase=function(e){return e===""?this.startsWith(e):At(this,function(n,t){return n.indexOf(t[0])===0},[e],pn)},Ce.prototype.equalsIgnoreCase=function(e){return At(this,function(n,t){return n===t[0]},[e],"")},Ce.prototype.anyOfIgnoreCase=function(){var e=T.apply(Ye,arguments);return e.length===0?Rn(this):At(this,function(n,t){return t.indexOf(n)!==-1},e,"")},Ce.prototype.startsWithAnyOfIgnoreCase=function(){var e=T.apply(Ye,arguments);return e.length===0?Rn(this):At(this,function(n,t){return t.some(function(r){return n.indexOf(r)===0})},e,pn)},Ce.prototype.anyOf=function(){var e=this,n=T.apply(Ye,arguments),t=this._cmp;try{n.sort(t)}catch{return Ie(this,Ge)}if(n.length===0)return Rn(this);var r=new this.Collection(this,function(){return nn(n[0],n[n.length-1])});r._ondirectionchange=function(o){t=o==="next"?e._ascending:e._descending,n.sort(t)};var i=0;return r._addAlgorithm(function(o,u,c){for(var d=o.key;0<t(d,n[i]);)if(++i===n.length)return u(c),!1;return t(d,n[i])===0||(u(function(){o.continue(n[i])}),!1)}),r},Ce.prototype.notEqual=function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Ce.prototype.noneOf=function(){var e=T.apply(Ye,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return Ie(this,Ge)}var n=e.reduce(function(t,r){return t?t.concat([[t[t.length-1][1],r]]):[[-1/0,r]]},null);return n.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})},Ce.prototype.inAnyRange=function(k,n){var t=this,r=this._cmp,i=this._ascending,o=this._descending,u=this._min,c=this._max;if(k.length===0)return Rn(this);if(!k.every(function(S){return S[0]!==void 0&&S[1]!==void 0&&i(S[0],S[1])<=0}))return Ie(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",H.InvalidArgument);var d=!n||n.includeLowers!==!1,p=n&&n.includeUppers===!0,g,h=i;function x(S,P){return h(S[0],P[0])}try{(g=k.reduce(function(S,P){for(var O=0,D=S.length;O<D;++O){var M=S[O];if(r(P[0],M[1])<0&&0<r(P[1],M[0])){M[0]=u(M[0],P[0]),M[1]=c(M[1],P[1]);break}}return O===D&&S.push(P),S},[])).sort(x)}catch{return Ie(this,Ge)}var v=0,m=p?function(S){return 0<i(S,g[v][1])}:function(S){return 0<=i(S,g[v][1])},b=d?function(S){return 0<o(S,g[v][0])}:function(S){return 0<=o(S,g[v][0])},y=m,k=new this.Collection(this,function(){return nn(g[0][0],g[g.length-1][1],!d,!p)});return k._ondirectionchange=function(S){h=S==="next"?(y=m,i):(y=b,o),g.sort(x)},k._addAlgorithm(function(S,P,O){for(var D,M=S.key;y(M);)if(++v===g.length)return P(O),!1;return!m(D=M)&&!b(D)||(t._cmp(M,g[v][1])===0||t._cmp(M,g[v][0])===0||P(function(){h===i?S.continue(g[v][0]):S.continue(g[v][1])}),!1)}),k},Ce.prototype.startsWithAnyOf=function(){var e=T.apply(Ye,arguments);return e.every(function(n){return typeof n=="string"})?e.length===0?Rn(this):this.inAnyRange(e.map(function(n){return[n,n+pn]})):Ie(this,"startsWithAnyOf() only works with strings")},Ce);function Ce(){}function Ue(e){return me(function(n){return Jn(n),e(n.target.error),!1})}function Jn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var $n="storagemutated",Er="x-storagemutated-1",tn=Xn(null,$n),Zy=(qe.prototype._lock=function(){return fe(!Y.global),++this._reculock,this._reculock!==1||Y.global||(Y.lockOwnerFor=this),this},qe.prototype._unlock=function(){if(fe(!Y.global),--this._reculock==0)for(Y.global||(Y.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e=this._blockedFuncs.shift();try{vn(e[1],e[0])}catch{}}return this},qe.prototype._locked=function(){return this._reculock&&Y.lockOwnerFor!==this},qe.prototype.create=function(e){var n=this;if(!this.mode)return this;var t=this.db.idbdb,r=this.db._state.dbOpenError;if(fe(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new H.DatabaseClosed(r);case"MissingAPIError":throw new H.MissingAPI(r.message,r);default:throw new H.OpenFailed(r)}if(!this.active)throw new H.TransactionInactive;return fe(this._completion._state===null),(e=this.idbtrans=e||(this.db.core||t).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=me(function(i){Jn(i),n._reject(e.error)}),e.onabort=me(function(i){Jn(i),n.active&&n._reject(new H.Abort(e.error)),n.active=!1,n.on("abort").fire(i)}),e.oncomplete=me(function(){n.active=!1,n._resolve(),"mutatedParts"in e&&tn.storagemutated.fire(e.mutatedParts)}),this},qe.prototype._promise=function(e,n,t){var r=this;if(e==="readwrite"&&this.mode!=="readwrite")return _e(new H.ReadOnly("Transaction is readonly"));if(!this.active)return _e(new H.TransactionInactive);if(this._locked())return new U(function(o,u){r._blockedFuncs.push([function(){r._promise(e,n,t).then(o,u)},Y])});if(t)return Je(function(){var o=new U(function(u,c){r._lock();var d=n(u,c,r);d&&d.then&&d.then(u,c)});return o.finally(function(){return r._unlock()}),o._lib=!0,o});var i=new U(function(o,u){var c=n(o,u,r);c&&c.then&&c.then(o,u)});return i._lib=!0,i},qe.prototype._root=function(){return this.parent?this.parent._root():this},qe.prototype.waitFor=function(e){var n,t=this._root(),r=U.resolve(e);t._waitingFor?t._waitingFor=t._waitingFor.then(function(){return r}):(t._waitingFor=r,t._waitingQueue=[],n=t.idbtrans.objectStore(t.storeNames[0]),function o(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=o)}());var i=t._waitingFor;return new U(function(o,u){r.then(function(c){return t._waitingQueue.push(me(o.bind(null,c)))},function(c){return t._waitingQueue.push(me(u.bind(null,c)))}).finally(function(){t._waitingFor===i&&(t._waitingFor=null)})})},qe.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new H.Abort))},qe.prototype.table=function(e){var n=this._memoizedTables||(this._memoizedTables={});if(q(n,e))return n[e];var t=this.schema[e];if(!t)throw new H.NotFound("Table "+e+" not part of transaction");return t=new this.db.Table(e,t,this),t.core=this.db.core.table(e),n[e]=t},qe);function qe(){}function Sr(e,n,t,r,i,o,u){return{name:e,keyPath:n,unique:t,multi:r,auto:i,compound:o,src:(t&&!u?"&":"")+(r?"*":"")+(i?"++":"")+fi(n)}}function fi(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Pr(e,n,t){return{name:e,primKey:n,indexes:t,mappedClass:null,idxByName:(r=function(i){return[i.name,i]},t.reduce(function(i,o,u){return u=r(o,u),u&&(i[u[0]]=u[1]),i},{}))};var r}var et=function(e){try{return e.only([[]]),et=function(){return[[]]},[[]]}catch{return et=function(){return pn},pn}};function Cr(e){return e==null?function(){}:typeof e=="string"?(n=e).split(".").length===1?function(t){return t[n]}:function(t){return ue(t,n)}:function(t){return ue(t,e)};var n}function hi(e){return[].slice.call(e)}var Qy=0;function nt(e){return e==null?":id":typeof e=="string"?e:"[".concat(e.join("+"),"]")}function Jy(e,n,d){function r(y){if(y.type===3)return null;if(y.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var v=y.lower,m=y.upper,b=y.lowerOpen,y=y.upperOpen;return v===void 0?m===void 0?null:n.upperBound(m,!!y):m===void 0?n.lowerBound(v,!!b):n.bound(v,m,!!b,!!y)}function i(x){var v,m=x.name;return{name:m,schema:x,mutate:function(b){var y=b.trans,k=b.type,S=b.keys,P=b.values,O=b.range;return new Promise(function(D,M){D=me(D);var I=y.objectStore(m),N=I.keyPath==null,F=k==="put"||k==="add";if(!F&&k!=="delete"&&k!=="deleteRange")throw new Error("Invalid operation type: "+k);var z,V=(S||P||{length:1}).length;if(S&&P&&S.length!==P.length)throw new Error("Given keys array must have same length as given values array.");if(V===0)return D({numFailures:0,failures:{},results:[],lastResult:void 0});function re(De){++Ne,Jn(De)}var ae=[],ie=[],Ne=0;if(k==="deleteRange"){if(O.type===4)return D({numFailures:Ne,failures:ie,results:[],lastResult:void 0});O.type===3?ae.push(z=I.clear()):ae.push(z=I.delete(r(O)))}else{var N=F?N?[P,S]:[P,null]:[S,null],ne=N[0],Te=N[1];if(F)for(var Ae=0;Ae<V;++Ae)ae.push(z=Te&&Te[Ae]!==void 0?I[k](ne[Ae],Te[Ae]):I[k](ne[Ae])),z.onerror=re;else for(Ae=0;Ae<V;++Ae)ae.push(z=I[k](ne[Ae])),z.onerror=re}function Vt(De){De=De.target.result,ae.forEach(function(bn,Hr){return bn.error!=null&&(ie[Hr]=bn.error)}),D({numFailures:Ne,failures:ie,results:k==="delete"?S:ae.map(function(bn){return bn.result}),lastResult:De})}z.onerror=function(De){re(De),Vt(De)},z.onsuccess=Vt})},getMany:function(b){var y=b.trans,k=b.keys;return new Promise(function(S,P){S=me(S);for(var O,D=y.objectStore(m),M=k.length,I=new Array(M),N=0,F=0,z=function(ae){ae=ae.target,I[ae._pos]=ae.result,++F===N&&S(I)},V=Ue(P),re=0;re<M;++re)k[re]!=null&&((O=D.get(k[re]))._pos=re,O.onsuccess=z,O.onerror=V,++N);N===0&&S(I)})},get:function(b){var y=b.trans,k=b.key;return new Promise(function(S,P){S=me(S);var O=y.objectStore(m).get(k);O.onsuccess=function(D){return S(D.target.result)},O.onerror=Ue(P)})},query:(v=p,function(b){return new Promise(function(y,k){y=me(y);var S,P,O,N=b.trans,D=b.values,M=b.limit,z=b.query,I=M===1/0?void 0:M,F=z.index,z=z.range,N=N.objectStore(m),F=F.isPrimaryKey?N:N.index(F.name),z=r(z);if(M===0)return y({result:[]});v?((I=D?F.getAll(z,I):F.getAllKeys(z,I)).onsuccess=function(V){return y({result:V.target.result})},I.onerror=Ue(k)):(S=0,P=!D&&"openKeyCursor"in F?F.openKeyCursor(z):F.openCursor(z),O=[],P.onsuccess=function(V){var re=P.result;return re?(O.push(D?re.value:re.primaryKey),++S===M?y({result:O}):void re.continue()):y({result:O})},P.onerror=Ue(k))})}),openCursor:function(b){var y=b.trans,k=b.values,S=b.query,P=b.reverse,O=b.unique;return new Promise(function(D,M){D=me(D);var F=S.index,I=S.range,N=y.objectStore(m),N=F.isPrimaryKey?N:N.index(F.name),F=P?O?"prevunique":"prev":O?"nextunique":"next",z=!k&&"openKeyCursor"in N?N.openKeyCursor(r(I),F):N.openCursor(r(I),F);z.onerror=Ue(M),z.onsuccess=me(function(V){var re,ae,ie,Ne,ne=z.result;ne?(ne.___id=++Qy,ne.done=!1,re=ne.continue.bind(ne),ae=(ae=ne.continuePrimaryKey)&&ae.bind(ne),ie=ne.advance.bind(ne),Ne=function(){throw new Error("Cursor not stopped")},ne.trans=y,ne.stop=ne.continue=ne.continuePrimaryKey=ne.advance=function(){throw new Error("Cursor not started")},ne.fail=me(M),ne.next=function(){var Te=this,Ae=1;return this.start(function(){return Ae--?Te.continue():Te.stop()}).then(function(){return Te})},ne.start=function(Te){function Ae(){if(z.result)try{Te()}catch(De){ne.fail(De)}else ne.done=!0,ne.start=function(){throw new Error("Cursor behind last entry")},ne.stop()}var Vt=new Promise(function(De,bn){De=me(De),z.onerror=Ue(bn),ne.fail=bn,ne.stop=function(Hr){ne.stop=ne.continue=ne.continuePrimaryKey=ne.advance=Ne,De(Hr)}});return z.onsuccess=me(function(De){z.onsuccess=Ae,Ae()}),ne.continue=re,ne.continuePrimaryKey=ae,ne.advance=ie,Ae(),Vt},D(ne)):D(null)},M)})},count:function(b){var y=b.query,k=b.trans,S=y.index,P=y.range;return new Promise(function(O,D){var M=k.objectStore(m),I=S.isPrimaryKey?M:M.index(S.name),M=r(P),I=M?I.count(M):I.count();I.onsuccess=me(function(N){return O(N.target.result)}),I.onerror=Ue(D)})}}}var o,u,c,g=(u=d,c=hi((o=e).objectStoreNames),{schema:{name:o.name,tables:c.map(function(x){return u.objectStore(x)}).map(function(x){var v=x.keyPath,y=x.autoIncrement,m=C(v),b={},y={name:x.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:v==null,compound:m,keyPath:v,autoIncrement:y,unique:!0,extractKey:Cr(v)},indexes:hi(x.indexNames).map(function(k){return x.index(k)}).map(function(O){var S=O.name,P=O.unique,D=O.multiEntry,O=O.keyPath,D={name:S,compound:C(O),keyPath:O,unique:P,multiEntry:D,extractKey:Cr(O)};return b[nt(O)]=D}),getIndexByKeyPath:function(k){return b[nt(k)]}};return b[":id"]=y.primaryKey,v!=null&&(b[nt(v)]=y.primaryKey),y})},hasGetAll:0<c.length&&"getAll"in u.objectStore(c[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),d=g.schema,p=g.hasGetAll,g=d.tables.map(i),h={};return g.forEach(function(x){return h[x.name]=x}),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(x){if(!h[x])throw new Error("Table '".concat(x,"' not found"));return h[x]},MIN_KEY:-1/0,MAX_KEY:et(n),schema:d}}function $y(e,n,t,r){var i=t.IDBKeyRange;return t.indexedDB,{dbcore:(r=Jy(n,i,r),e.dbcore.reduce(function(o,u){return u=u.create,f(f({},o),u(o))},r))}}function Rt(e,r){var t=r.db,r=$y(e._middlewares,t,e._deps,r);e.core=r.dbcore,e.tables.forEach(function(i){var o=i.name;e.core.schema.tables.some(function(u){return u.name===o})&&(i.core=e.core.table(o),e[o]instanceof e.Table&&(e[o].core=i.core))})}function Dt(e,n,t,r){t.forEach(function(i){var o=r[i];n.forEach(function(u){var c=function d(p,g){return Q(p,g)||(p=L(p))&&d(p,g)}(u,i);(!c||"value"in c&&c.value===void 0)&&(u===e.Transaction.prototype||u instanceof e.Transaction?R(u,i,{get:function(){return this.table(i)},set:function(d){B(this,i,{value:d,writable:!0,configurable:!0,enumerable:!0})}}):u[i]=new e.Table(i,o))})})}function Or(e,n){n.forEach(function(t){for(var r in t)t[r]instanceof e.Table&&delete t[r]})}function em(e,n){return e._cfg.version-n._cfg.version}function nm(e,n,t,r){var i=e._dbSchema;t.objectStoreNames.contains("$meta")&&!i.$meta&&(i.$meta=Pr("$meta",vi("")[0],[]),e._storeNames.push("$meta"));var o=e._createTransaction("readwrite",e._storeNames,i);o.create(t),o._completion.catch(r);var u=o._reject.bind(o),c=Y.transless||Y;Je(function(){return Y.trans=o,Y.transless=c,n!==0?(Rt(e,t),p=n,((d=o).storeNames.includes("$meta")?d.table("$meta").get("version").then(function(g){return g??p}):U.resolve(p)).then(function(g){return x=g,v=o,m=t,b=[],g=(h=e)._versions,y=h._dbSchema=Nt(0,h.idbdb,m),(g=g.filter(function(k){return k._cfg.version>=x})).length!==0?(g.forEach(function(k){b.push(function(){var S=y,P=k._cfg.dbschema;zt(h,S,m),zt(h,P,m),y=h._dbSchema=P;var O=jr(S,P);O.add.forEach(function(F){Tr(m,F[0],F[1].primKey,F[1].indexes)}),O.change.forEach(function(F){if(F.recreate)throw new H.Upgrade("Not yet support for changing primary key");var z=m.objectStore(F.name);F.add.forEach(function(V){return It(z,V)}),F.change.forEach(function(V){z.deleteIndex(V.name),It(z,V)}),F.del.forEach(function(V){return z.deleteIndex(V)})});var D=k._cfg.contentUpgrade;if(D&&k._cfg.version>x){Rt(h,m),v._memoizedTables={};var M=ge(P);O.del.forEach(function(F){M[F]=S[F]}),Or(h,[h.Transaction.prototype]),Dt(h,[h.Transaction.prototype],_(M),M),v.schema=M;var I,N=te(D);return N&&jn(),O=U.follow(function(){var F;(I=D(v))&&N&&(F=$e.bind(null,null),I.then(F,F))}),I&&typeof I.then=="function"?U.resolve(I):O.then(function(){return I})}}),b.push(function(S){var P,O,D=k._cfg.dbschema;P=D,O=S,[].slice.call(O.db.objectStoreNames).forEach(function(M){return P[M]==null&&O.db.deleteObjectStore(M)}),Or(h,[h.Transaction.prototype]),Dt(h,[h.Transaction.prototype],h._storeNames,h._dbSchema),v.schema=h._dbSchema}),b.push(function(S){h.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(h.idbdb.version/10)===k._cfg.version?(h.idbdb.deleteObjectStore("$meta"),delete h._dbSchema.$meta,h._storeNames=h._storeNames.filter(function(P){return P!=="$meta"})):S.objectStore("$meta").put(k._cfg.version,"version"))})}),function k(){return b.length?U.resolve(b.shift()(v.idbtrans)).then(k):U.resolve()}().then(function(){di(y,m)})):U.resolve();var h,x,v,m,b,y}).catch(u)):(_(i).forEach(function(g){Tr(t,g,i[g].primKey,i[g].indexes)}),Rt(e,t),void U.follow(function(){return e.on.populate.fire(o)}).catch(u));var d,p})}function tm(e,n){di(e._dbSchema,n),n.db.version%10!=0||n.objectStoreNames.contains("$meta")||n.db.createObjectStore("$meta").add(Math.ceil(n.db.version/10-1),"version");var t=Nt(0,e.idbdb,n);zt(e,e._dbSchema,n);for(var r=0,i=jr(t,e._dbSchema).change;r<i.length;r++){var o=function(u){if(u.change.length||u.recreate)return console.warn("Unable to patch indexes of table ".concat(u.name," because it has changes on the type of index or primary key.")),{value:void 0};var c=n.objectStore(u.name);u.add.forEach(function(d){Fe&&console.debug("Dexie upgrade patch: Creating missing index ".concat(u.name,".").concat(d.src)),It(c,d)})}(i[r]);if(typeof o=="object")return o.value}}function jr(e,n){var t,r={del:[],add:[],change:[]};for(t in e)n[t]||r.del.push(t);for(t in n){var i=e[t],o=n[t];if(i){var u={name:t,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto)u.recreate=!0,r.change.push(u);else{var c=i.idxByName,d=o.idxByName,p=void 0;for(p in c)d[p]||u.del.push(p);for(p in d){var g=c[p],h=d[p];g?g.src!==h.src&&u.change.push(h):u.add.push(h)}(0<u.del.length||0<u.add.length||0<u.change.length)&&r.change.push(u)}}else r.add.push([t,o])}return r}function Tr(e,n,t,r){var i=e.db.createObjectStore(n,t.keyPath?{keyPath:t.keyPath,autoIncrement:t.auto}:{autoIncrement:t.auto});return r.forEach(function(o){return It(i,o)}),i}function di(e,n){_(e).forEach(function(t){n.db.objectStoreNames.contains(t)||(Fe&&console.debug("Dexie: Creating missing table",t),Tr(n,t,e[t].primKey,e[t].indexes))})}function It(e,n){e.createIndex(n.name,n.keyPath,{unique:n.unique,multiEntry:n.multi})}function Nt(e,n,t){var r={};return Z(n.objectStoreNames,0).forEach(function(i){for(var o=t.objectStore(i),u=Sr(fi(p=o.keyPath),p||"",!0,!1,!!o.autoIncrement,p&&typeof p!="string",!0),c=[],d=0;d<o.indexNames.length;++d){var g=o.index(o.indexNames[d]),p=g.keyPath,g=Sr(g.name,p,!!g.unique,!!g.multiEntry,!1,p&&typeof p!="string",!1);c.push(g)}r[i]=Pr(i,u,c)}),r}function zt(e,n,t){for(var r=t.db.objectStoreNames,i=0;i<r.length;++i){var o=r[i],u=t.objectStore(o);e._hasGetAll="getAll"in u;for(var c=0;c<u.indexNames.length;++c){var d=u.indexNames[c],p=u.index(d).keyPath,g=typeof p=="string"?p:"["+Z(p).join("+")+"]";!n[o]||(p=n[o].idxByName[g])&&(p.name=d,delete n[o].idxByName[g],n[o].idxByName[d]=p)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&w.WorkerGlobalScope&&w instanceof w.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function vi(e){return e.split(",").map(function(n,t){var r=(n=n.trim()).replace(/([&*]|\+\+)/g,""),i=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return Sr(r,i||null,/\&/.test(n),/\*/.test(n),/\+\+/.test(n),C(i),t===0)})}var rm=(Mt.prototype._parseStoresSpec=function(e,n){_(e).forEach(function(t){if(e[t]!==null){var r=vi(e[t]),i=r.shift();if(i.unique=!0,i.multi)throw new H.Schema("Primary key cannot be multi-valued");r.forEach(function(o){if(o.auto)throw new H.Schema("Only primary key can be marked as autoIncrement (++)");if(!o.keyPath)throw new H.Schema("Index must have a name and cannot be an empty string")}),n[t]=Pr(t,i,r)}})},Mt.prototype.stores=function(t){var n=this.db;this._cfg.storesSource=this._cfg.storesSource?j(this._cfg.storesSource,t):t;var t=n._versions,r={},i={};return t.forEach(function(o){j(r,o._cfg.storesSource),i=o._cfg.dbschema={},o._parseStoresSpec(r,i)}),n._dbSchema=i,Or(n,[n._allTables,n,n.Transaction.prototype]),Dt(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],_(i),i),n._storeNames=_(i),this},Mt.prototype.upgrade=function(e){return this._cfg.contentUpgrade=lr(this._cfg.contentUpgrade||he,e),this},Mt);function Mt(){}function Ar(e,n){var t=e._dbNamesDB;return t||(t=e._dbNamesDB=new We(Ct,{addons:[],indexedDB:e,IDBKeyRange:n})).version(1).stores({dbnames:"name"}),t.table("dbnames")}function Rr(e){return e&&typeof e.databases=="function"}function Dr(e){return Je(function(){return Y.letThrough=!0,e()})}function Ir(e){return!("from"in e)}var je=function(e,n){if(!this){var t=new je;return e&&"d"in e&&j(t,e),t}j(this,arguments.length?{d:1,from:e,to:1<arguments.length?n:e}:{d:0})};function tt(e,n,t){var r=se(n,t);if(!isNaN(r)){if(0<r)throw RangeError();if(Ir(e))return j(e,{from:n,to:t,d:1});var i=e.l,r=e.r;if(se(t,e.from)<0)return i?tt(i,n,t):e.l={from:n,to:t,d:1,l:null,r:null},yi(e);if(0<se(n,e.to))return r?tt(r,n,t):e.r={from:n,to:t,d:1,l:null,r:null},yi(e);se(n,e.from)<0&&(e.from=n,e.l=null,e.d=r?r.d+1:1),0<se(t,e.to)&&(e.to=t,e.r=null,e.d=e.l?e.l.d+1:1),t=!e.r,i&&!e.l&&rt(e,i),r&&t&&rt(e,r)}}function rt(e,n){Ir(n)||function t(r,d){var o=d.from,u=d.to,c=d.l,d=d.r;tt(r,o,u),c&&t(r,c),d&&t(r,d)}(e,n)}function pi(e,n){var t=Kt(n),r=t.next();if(r.done)return!1;for(var i=r.value,o=Kt(e),u=o.next(i.from),c=u.value;!r.done&&!u.done;){if(se(c.from,i.to)<=0&&0<=se(c.to,i.from))return!0;se(i.from,c.from)<0?i=(r=t.next(c.from)).value:c=(u=o.next(i.from)).value}return!1}function Kt(e){var n=Ir(e)?null:{s:0,n:e};return{next:function(t){for(var r=0<arguments.length;n;)switch(n.s){case 0:if(n.s=1,r)for(;n.n.l&&se(t,n.n.from)<0;)n={up:n,n:n.n.l,s:1};else for(;n.n.l;)n={up:n,n:n.n.l,s:1};case 1:if(n.s=2,!r||se(t,n.n.to)<=0)return{value:n.n,done:!1};case 2:if(n.n.r){n.s=3,n={up:n,n:n.n.r,s:0};continue}case 3:n=n.up}return{done:!0}}}}function yi(e){var n,t,r=(((n=e.r)===null||n===void 0?void 0:n.d)||0)-(((t=e.l)===null||t===void 0?void 0:t.d)||0),i=1<r?"r":r<-1?"l":"";i&&(n=i=="r"?"l":"r",t=f({},e),r=e[i],e.from=r.from,e.to=r.to,e[i]=r[i],t[i]=r[n],(e[n]=t).d=mi(t)),e.d=mi(e)}function mi(t){var n=t.r,t=t.l;return(n?t?Math.max(n.d,t.d):n.d:t?t.d:0)+1}function Lt(e,n){return _(n).forEach(function(t){e[t]?rt(e[t],n[t]):e[t]=function r(i){var o,u,c={};for(o in i)q(i,o)&&(u=i[o],c[o]=!u||typeof u!="object"||ke.has(u.constructor)?u:r(u));return c}(n[t])}),e}function Nr(e,n){return e.all||n.all||Object.keys(e).some(function(t){return n[t]&&pi(n[t],e[t])})}G(je.prototype,((ze={add:function(e){return rt(this,e),this},addKey:function(e){return tt(this,e,e),this},addKeys:function(e){var n=this;return e.forEach(function(t){return tt(n,t,t)}),this},hasKey:function(e){var n=Kt(this).next(e).value;return n&&se(n.from,e)<=0&&0<=se(n.to,e)}})[En]=function(){return Kt(this)},ze));var mn={},zr={},Mr=!1;function Bt(e){Lt(zr,e),Mr||(Mr=!0,setTimeout(function(){Mr=!1,Kr(zr,!(zr={}))},0))}function Kr(e,n){n===void 0&&(n=!1);var t=new Set;if(e.all)for(var r=0,i=Object.values(mn);r<i.length;r++)gi(u=i[r],e,t,n);else for(var o in e){var u,c=/^idb\:\/\/(.*)\/(.*)\//.exec(o);c&&(o=c[1],c=c[2],(u=mn["idb://".concat(o,"/").concat(c)])&&gi(u,e,t,n))}t.forEach(function(d){return d()})}function gi(e,n,t,r){for(var i=[],o=0,u=Object.entries(e.queries.query);o<u.length;o++){for(var c=u[o],d=c[0],p=[],g=0,h=c[1];g<h.length;g++){var x=h[g];Nr(n,x.obsSet)?x.subscribers.forEach(function(y){return t.add(y)}):r&&p.push(x)}r&&i.push([d,p])}if(r)for(var v=0,m=i;v<m.length;v++){var b=m[v],d=b[0],p=b[1];e.queries.query[d]=p}}function am(e){var n=e._state,t=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then(function(){return n.dbOpenError?_e(n.dbOpenError):e});n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var r=n.openCanceller,i=Math.round(10*e.verno),o=!1;function u(){if(n.openCanceller!==r)throw new H.DatabaseClosed("db.open() was cancelled")}function c(){return new U(function(x,v){if(u(),!t)throw new H.MissingAPI;var m=e.name,b=n.autoSchema||!i?t.open(m):t.open(m,i);if(!b)throw new H.MissingAPI;b.onerror=Ue(v),b.onblocked=me(e._fireOnBlocked),b.onupgradeneeded=me(function(y){var k;g=b.transaction,n.autoSchema&&!e._options.allowEmptyDB?(b.onerror=Jn,g.abort(),b.result.close(),(k=t.deleteDatabase(m)).onsuccess=k.onerror=me(function(){v(new H.NoSuchDatabase("Database ".concat(m," doesnt exist")))})):(g.onerror=Ue(v),y=y.oldVersion>Math.pow(2,62)?0:y.oldVersion,h=y<1,e.idbdb=b.result,o&&tm(e,g),nm(e,y/10,g,v))},v),b.onsuccess=me(function(){g=null;var y,k,S,P,O,D=e.idbdb=b.result,M=Z(D.objectStoreNames);if(0<M.length)try{var I=D.transaction((P=M).length===1?P[0]:P,"readonly");if(n.autoSchema)k=D,S=I,(y=e).verno=k.version/10,S=y._dbSchema=Nt(0,k,S),y._storeNames=Z(k.objectStoreNames,0),Dt(y,[y._allTables],_(S),S);else if(zt(e,e._dbSchema,I),((O=jr(Nt(0,(O=e).idbdb,I),O._dbSchema)).add.length||O.change.some(function(N){return N.add.length||N.change.length}))&&!o)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),D.close(),i=D.version+1,o=!0,x(c());Rt(e,I)}catch{}Tn.push(e),D.onversionchange=me(function(N){n.vcFired=!0,e.on("versionchange").fire(N)}),D.onclose=me(function(N){e.on("close").fire(N)}),h&&(O=e._deps,I=m,D=O.indexedDB,O=O.IDBKeyRange,Rr(D)||I===Ct||Ar(D,O).put({name:I}).catch(he)),x()},v)}).catch(function(x){switch(x==null?void 0:x.name){case"UnknownError":if(0<n.PR1398_maxLoop)return n.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),c();break;case"VersionError":if(0<i)return i=0,c()}return U.reject(x)})}var d,p=n.dbReadyResolve,g=null,h=!1;return U.race([r,(typeof navigator>"u"?U.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(x){function v(){return indexedDB.databases().finally(x)}d=setInterval(v,100),v()}).finally(function(){return clearInterval(d)}):Promise.resolve()).then(c)]).then(function(){return u(),n.onReadyBeingFired=[],U.resolve(Dr(function(){return e.on.ready.fire(e.vip)})).then(function x(){if(0<n.onReadyBeingFired.length){var v=n.onReadyBeingFired.reduce(lr,he);return n.onReadyBeingFired=[],U.resolve(Dr(function(){return v(e.vip)})).then(x)}})}).finally(function(){n.openCanceller===r&&(n.onReadyBeingFired=null,n.isBeingOpened=!1)}).catch(function(x){n.dbOpenError=x;try{g&&g.abort()}catch{}return r===n.openCanceller&&e._close(),_e(x)}).finally(function(){n.openComplete=!0,p()}).then(function(){var x;return h&&(x={},e.tables.forEach(function(v){v.schema.indexes.forEach(function(m){m.name&&(x["idb://".concat(e.name,"/").concat(v.name,"/").concat(m.name)]=new je(-1/0,[[[]]]))}),x["idb://".concat(e.name,"/").concat(v.name,"/")]=x["idb://".concat(e.name,"/").concat(v.name,"/:dels")]=new je(-1/0,[[[]]])}),tn($n).fire(x),Kr(x,!0)),e})}function Lr(e){function n(o){return e.next(o)}var t=i(n),r=i(function(o){return e.throw(o)});function i(o){return function(d){var c=o(d),d=c.value;return c.done?d:d&&typeof d.then=="function"?d.then(t,r):C(d)?Promise.all(d).then(t,r):t(d)}}return i(n)()}function Ft(e,n,t){for(var r=C(e)?e.slice():[e],i=0;i<t;++i)r.push(n);return r}var im={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return f(f({},e),{table:function(n){var t=e.table(n),r=t.schema,i={},o=[];function u(h,x,v){var m=nt(h),b=i[m]=i[m]||[],y=h==null?0:typeof h=="string"?1:h.length,k=0<x,k=f(f({},v),{name:k?"".concat(m,"(virtual-from:").concat(v.name,")"):v.name,lowLevelIndex:v,isVirtual:k,keyTail:x,keyLength:y,extractKey:Cr(h),unique:!k&&v.unique});return b.push(k),k.isPrimaryKey||o.push(k),1<y&&u(y===2?h[0]:h.slice(0,y-1),x+1,v),b.sort(function(S,P){return S.keyTail-P.keyTail}),k}n=u(r.primaryKey.keyPath,0,r.primaryKey),i[":id"]=[n];for(var c=0,d=r.indexes;c<d.length;c++){var p=d[c];u(p.keyPath,0,p)}function g(h){var x,v=h.query.index;return v.isVirtual?f(f({},h),{query:{index:v.lowLevelIndex,range:(x=h.query.range,v=v.keyTail,{type:x.type===1?2:x.type,lower:Ft(x.lower,x.lowerOpen?e.MAX_KEY:e.MIN_KEY,v),lowerOpen:!0,upper:Ft(x.upper,x.upperOpen?e.MIN_KEY:e.MAX_KEY,v),upperOpen:!0})}}):h}return f(f({},t),{schema:f(f({},r),{primaryKey:n,indexes:o,getIndexByKeyPath:function(h){return(h=i[nt(h)])&&h[0]}}),count:function(h){return t.count(g(h))},query:function(h){return t.query(g(h))},openCursor:function(h){var x=h.query.index,v=x.keyTail,m=x.isVirtual,b=x.keyLength;return m?t.openCursor(g(h)).then(function(k){return k&&y(k)}):t.openCursor(h);function y(k){return Object.create(k,{continue:{value:function(S){S!=null?k.continue(Ft(S,h.reverse?e.MAX_KEY:e.MIN_KEY,v)):h.unique?k.continue(k.key.slice(0,b).concat(h.reverse?e.MIN_KEY:e.MAX_KEY,v)):k.continue()}},continuePrimaryKey:{value:function(S,P){k.continuePrimaryKey(Ft(S,e.MAX_KEY,v),P)}},primaryKey:{get:function(){return k.primaryKey}},key:{get:function(){var S=k.key;return b===1?S[0]:S.slice(0,b)}},value:{get:function(){return k.value}}})}}})}})}};function Br(e,n,t,r){return t=t||{},r=r||"",_(e).forEach(function(i){var o,u,c;q(n,i)?(o=e[i],u=n[i],typeof o=="object"&&typeof u=="object"&&o&&u?(c=kn(o))!==kn(u)?t[r+i]=n[i]:c==="Object"?Br(o,u,t,r+i+"."):o!==u&&(t[r+i]=n[i]):o!==u&&(t[r+i]=n[i])):t[r+i]=void 0}),_(n).forEach(function(i){q(e,i)||(t[r+i]=n[i])}),t}function Fr(e,n){return n.type==="delete"?n.keys:n.keys||n.values.map(e.extractKey)}var om={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return f(f({},e),{table:function(n){var t=e.table(n),r=t.schema.primaryKey;return f(f({},t),{mutate:function(i){var o=Y.trans,u=o.table(n).hook,c=u.deleting,d=u.creating,p=u.updating;switch(i.type){case"add":if(d.fire===he)break;return o._promise("readwrite",function(){return g(i)},!0);case"put":if(d.fire===he&&p.fire===he)break;return o._promise("readwrite",function(){return g(i)},!0);case"delete":if(c.fire===he)break;return o._promise("readwrite",function(){return g(i)},!0);case"deleteRange":if(c.fire===he)break;return o._promise("readwrite",function(){return function h(x,v,m){return t.query({trans:x,values:!1,query:{index:r,range:v},limit:m}).then(function(b){var y=b.result;return g({type:"delete",keys:y,trans:x}).then(function(k){return 0<k.numFailures?Promise.reject(k.failures[0]):y.length<m?{failures:[],numFailures:0,lastResult:void 0}:h(x,f(f({},v),{lower:y[y.length-1],lowerOpen:!0}),m)})})}(i.trans,i.range,1e4)},!0)}return t.mutate(i);function g(h){var x,v,m,b=Y.trans,y=h.keys||Fr(r,h);if(!y)throw new Error("Keys missing");return(h=h.type==="add"||h.type==="put"?f(f({},h),{keys:y}):f({},h)).type!=="delete"&&(h.values=E([],h.values)),h.keys&&(h.keys=E([],h.keys)),x=t,m=y,((v=h).type==="add"?Promise.resolve([]):x.getMany({trans:v.trans,keys:m,cache:"immutable"})).then(function(k){var S=y.map(function(P,O){var D,M,I,N=k[O],F={onerror:null,onsuccess:null};return h.type==="delete"?c.fire.call(F,P,N,b):h.type==="add"||N===void 0?(D=d.fire.call(F,P,h.values[O],b),P==null&&D!=null&&(h.keys[O]=P=D,r.outbound||$(h.values[O],r.keyPath,P))):(D=Br(N,h.values[O]),(M=p.fire.call(F,D,P,N,b))&&(I=h.values[O],Object.keys(M).forEach(function(z){q(I,z)?I[z]=M[z]:$(I,z,M[z])}))),F});return t.mutate(h).then(function(P){for(var O=P.failures,D=P.results,M=P.numFailures,P=P.lastResult,I=0;I<y.length;++I){var N=(D||y)[I],F=S[I];N==null?F.onerror&&F.onerror(O[I]):F.onsuccess&&F.onsuccess(h.type==="put"&&k[I]?h.values[I]:N)}return{failures:O,results:D,numFailures:M,lastResult:P}}).catch(function(P){return S.forEach(function(O){return O.onerror&&O.onerror(P)}),Promise.reject(P)})})}}})}})}};function bi(e,n,t){try{if(!n||n.keys.length<e.length)return null;for(var r=[],i=0,o=0;i<n.keys.length&&o<e.length;++i)se(n.keys[i],e[o])===0&&(r.push(t?Me(n.values[i]):n.values[i]),++o);return r.length===e.length?r:null}catch{return null}}var sm={stack:"dbcore",level:-1,create:function(e){return{table:function(n){var t=e.table(n);return f(f({},t),{getMany:function(r){if(!r.cache)return t.getMany(r);var i=bi(r.keys,r.trans._cache,r.cache==="clone");return i?U.resolve(i):t.getMany(r).then(function(o){return r.trans._cache={keys:r.keys,values:r.cache==="clone"?Me(o):o},o})},mutate:function(r){return r.type!=="add"&&(r.trans._cache=null),t.mutate(r)}})}}}};function _i(e,n){return e.trans.mode==="readonly"&&!!e.subscr&&!e.trans.explicit&&e.trans.db._options.cache!=="disabled"&&!n.schema.primaryKey.outbound}function wi(e,n){switch(e){case"query":return n.values&&!n.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var um={stack:"dbcore",level:0,name:"Observability",create:function(e){var n=e.schema.name,t=new je(e.MIN_KEY,e.MAX_KEY);return f(f({},e),{transaction:function(r,i,o){if(Y.subscr&&i!=="readonly")throw new H.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Y.querier));return e.transaction(r,i,o)},table:function(r){var i=e.table(r),o=i.schema,u=o.primaryKey,h=o.indexes,c=u.extractKey,d=u.outbound,p=u.autoIncrement&&h.filter(function(v){return v.compound&&v.keyPath.includes(u.keyPath)}),g=f(f({},i),{mutate:function(v){function m(z){return z="idb://".concat(n,"/").concat(r,"/").concat(z),P[z]||(P[z]=new je)}var b,y,k,S=v.trans,P=v.mutatedParts||(v.mutatedParts={}),O=m(""),D=m(":dels"),M=v.type,F=v.type==="deleteRange"?[v.range]:v.type==="delete"?[v.keys]:v.values.length<50?[Fr(u,v).filter(function(z){return z}),v.values]:[],I=F[0],N=F[1],F=v.trans._cache;return C(I)?(O.addKeys(I),(F=M==="delete"||I.length===N.length?bi(I,F):null)||D.addKeys(I),(F||N)&&(b=m,y=F,k=N,o.indexes.forEach(function(z){var V=b(z.name||"");function re(ie){return ie!=null?z.extractKey(ie):null}function ae(ie){return z.multiEntry&&C(ie)?ie.forEach(function(Ne){return V.addKey(Ne)}):V.addKey(ie)}(y||k).forEach(function(ie,Te){var ne=y&&re(y[Te]),Te=k&&re(k[Te]);se(ne,Te)!==0&&(ne!=null&&ae(ne),Te!=null&&ae(Te))})}))):I?(N={from:(N=I.lower)!==null&&N!==void 0?N:e.MIN_KEY,to:(N=I.upper)!==null&&N!==void 0?N:e.MAX_KEY},D.add(N),O.add(N)):(O.add(t),D.add(t),o.indexes.forEach(function(z){return m(z.name).add(t)})),i.mutate(v).then(function(z){return!I||v.type!=="add"&&v.type!=="put"||(O.addKeys(z.results),p&&p.forEach(function(V){for(var re=v.values.map(function(ne){return V.extractKey(ne)}),ae=V.keyPath.findIndex(function(ne){return ne===u.keyPath}),ie=0,Ne=z.results.length;ie<Ne;++ie)re[ie][ae]=z.results[ie];m(V.name).addKeys(re)})),S.mutatedParts=Lt(S.mutatedParts||{},P),z})}}),h=function(m){var b=m.query,m=b.index,b=b.range;return[m,new je((m=b.lower)!==null&&m!==void 0?m:e.MIN_KEY,(b=b.upper)!==null&&b!==void 0?b:e.MAX_KEY)]},x={get:function(v){return[u,new je(v.key)]},getMany:function(v){return[u,new je().addKeys(v.keys)]},count:h,query:h,openCursor:h};return _(x).forEach(function(v){g[v]=function(m){var b=Y.subscr,y=!!b,k=_i(Y,i)&&wi(v,m)?m.obsSet={}:b;if(y){var S=function(N){return N="idb://".concat(n,"/").concat(r,"/").concat(N),k[N]||(k[N]=new je)},P=S(""),O=S(":dels"),b=x[v](m),y=b[0],b=b[1];if((v==="query"&&y.isPrimaryKey&&!m.values?O:S(y.name||"")).add(b),!y.isPrimaryKey){if(v!=="count"){var D=v==="query"&&d&&m.values&&i.query(f(f({},m),{values:!1}));return i[v].apply(this,arguments).then(function(N){if(v==="query"){if(d&&m.values)return D.then(function(re){return re=re.result,P.addKeys(re),N});var F=m.values?N.result.map(c):N.result;(m.values?P:O).addKeys(F)}else if(v==="openCursor"){var z=N,V=m.values;return z&&Object.create(z,{key:{get:function(){return O.addKey(z.primaryKey),z.key}},primaryKey:{get:function(){var re=z.primaryKey;return O.addKey(re),re}},value:{get:function(){return V&&P.addKey(z.primaryKey),z.value}}})}return N})}O.add(t)}}return i[v].apply(this,arguments)}}),g}})}};function xi(e,n,t){if(t.numFailures===0)return n;if(n.type==="deleteRange")return null;var r=n.keys?n.keys.length:"values"in n&&n.values?n.values.length:1;return t.numFailures===r?null:(n=f({},n),C(n.keys)&&(n.keys=n.keys.filter(function(i,o){return!(o in t.failures)})),"values"in n&&C(n.values)&&(n.values=n.values.filter(function(i,o){return!(o in t.failures)})),n)}function Ur(e,n){return t=e,((r=n).lower===void 0||(r.lowerOpen?0<se(t,r.lower):0<=se(t,r.lower)))&&(e=e,(n=n).upper===void 0||(n.upperOpen?se(e,n.upper)<0:se(e,n.upper)<=0));var t,r}function ki(e,n,x,r,i,o){if(!x||x.length===0)return e;var u=n.query.index,c=u.multiEntry,d=n.query.range,p=r.schema.primaryKey.extractKey,g=u.extractKey,h=(u.lowLevelIndex||u).extractKey,x=x.reduce(function(v,m){var b=v,y=[];if(m.type==="add"||m.type==="put")for(var k=new je,S=m.values.length-1;0<=S;--S){var P,O=m.values[S],D=p(O);k.hasKey(D)||(P=g(O),(c&&C(P)?P.some(function(z){return Ur(z,d)}):Ur(P,d))&&(k.addKey(D),y.push(O)))}switch(m.type){case"add":var M=new je().addKeys(n.values?v.map(function(V){return p(V)}):v),b=v.concat(n.values?y.filter(function(V){return V=p(V),!M.hasKey(V)&&(M.addKey(V),!0)}):y.map(function(V){return p(V)}).filter(function(V){return!M.hasKey(V)&&(M.addKey(V),!0)}));break;case"put":var I=new je().addKeys(m.values.map(function(V){return p(V)}));b=v.filter(function(V){return!I.hasKey(n.values?p(V):V)}).concat(n.values?y:y.map(function(V){return p(V)}));break;case"delete":var N=new je().addKeys(m.keys);b=v.filter(function(V){return!N.hasKey(n.values?p(V):V)});break;case"deleteRange":var F=m.range;b=v.filter(function(V){return!Ur(p(V),F)})}return b},e);return x===e?e:(x.sort(function(v,m){return se(h(v),h(m))||se(p(v),p(m))}),n.limit&&n.limit<1/0&&(x.length>n.limit?x.length=n.limit:e.length===n.limit&&x.length<n.limit&&(i.dirty=!0)),o?Object.freeze(x):x)}function Ei(e,n){return se(e.lower,n.lower)===0&&se(e.upper,n.upper)===0&&!!e.lowerOpen==!!n.lowerOpen&&!!e.upperOpen==!!n.upperOpen}function cm(e,n){return function(t,r,i,o){if(t===void 0)return r!==void 0?-1:0;if(r===void 0)return 1;if((r=se(t,r))===0){if(i&&o)return 0;if(i)return 1;if(o)return-1}return r}(e.lower,n.lower,e.lowerOpen,n.lowerOpen)<=0&&0<=function(t,r,i,o){if(t===void 0)return r!==void 0?1:0;if(r===void 0)return-1;if((r=se(t,r))===0){if(i&&o)return 0;if(i)return-1;if(o)return 1}return r}(e.upper,n.upper,e.upperOpen,n.upperOpen)}function lm(e,n,t,r){e.subscribers.add(t),r.addEventListener("abort",function(){var i,o;e.subscribers.delete(t),e.subscribers.size===0&&(i=e,o=n,setTimeout(function(){i.subscribers.size===0&&Le(o,i)},3e3))})}var fm={stack:"dbcore",level:0,name:"Cache",create:function(e){var n=e.schema.name;return f(f({},e),{transaction:function(t,r,i){var o,u,c=e.transaction(t,r,i);return r==="readwrite"&&(u=(o=new AbortController).signal,i=function(d){return function(){if(o.abort(),r==="readwrite"){for(var p=new Set,g=0,h=t;g<h.length;g++){var x=h[g],v=mn["idb://".concat(n,"/").concat(x)];if(v){var m=e.table(x),b=v.optimisticOps.filter(function(V){return V.trans===c});if(c._explicit&&d&&c.mutatedParts)for(var y=0,k=Object.values(v.queries.query);y<k.length;y++)for(var S=0,P=(M=k[y]).slice();S<P.length;S++)Nr((I=P[S]).obsSet,c.mutatedParts)&&(Le(M,I),I.subscribers.forEach(function(V){return p.add(V)}));else if(0<b.length){v.optimisticOps=v.optimisticOps.filter(function(V){return V.trans!==c});for(var O=0,D=Object.values(v.queries.query);O<D.length;O++)for(var M,I,N,F=0,z=(M=D[O]).slice();F<z.length;F++)(I=z[F]).res!=null&&c.mutatedParts&&(d&&!I.dirty?(N=Object.isFrozen(I.res),N=ki(I.res,I.req,b,m,I,N),I.dirty?(Le(M,I),I.subscribers.forEach(function(V){return p.add(V)})):N!==I.res&&(I.res=N,I.promise=U.resolve({result:N}))):(I.dirty&&Le(M,I),I.subscribers.forEach(function(V){return p.add(V)})))}}}p.forEach(function(V){return V()})}}},c.addEventListener("abort",i(!1),{signal:u}),c.addEventListener("error",i(!1),{signal:u}),c.addEventListener("complete",i(!0),{signal:u})),c},table:function(t){var r=e.table(t),i=r.schema.primaryKey;return f(f({},r),{mutate:function(o){var u=Y.trans;if(i.outbound||u.db._options.cache==="disabled"||u.explicit||u.idbtrans.mode!=="readwrite")return r.mutate(o);var c=mn["idb://".concat(n,"/").concat(t)];return c?(u=r.mutate(o),o.type!=="add"&&o.type!=="put"||!(50<=o.values.length||Fr(i,o).some(function(d){return d==null}))?(c.optimisticOps.push(o),o.mutatedParts&&Bt(o.mutatedParts),u.then(function(d){0<d.numFailures&&(Le(c.optimisticOps,o),(d=xi(0,o,d))&&c.optimisticOps.push(d),o.mutatedParts&&Bt(o.mutatedParts))}),u.catch(function(){Le(c.optimisticOps,o),o.mutatedParts&&Bt(o.mutatedParts)})):u.then(function(d){var p=xi(0,f(f({},o),{values:o.values.map(function(g,h){var x;return d.failures[h]?g:(g=(x=i.keyPath)!==null&&x!==void 0&&x.includes(".")?Me(g):f({},g),$(g,i.keyPath,d.results[h]),g)})}),d);c.optimisticOps.push(p),queueMicrotask(function(){return o.mutatedParts&&Bt(o.mutatedParts)})}),u):r.mutate(o)},query:function(o){if(!_i(Y,r)||!wi("query",o))return r.query(o);var u=((p=Y.trans)===null||p===void 0?void 0:p.db._options.cache)==="immutable",h=Y,c=h.requery,d=h.signal,p=function(m,b,y,k){var S=mn["idb://".concat(m,"/").concat(b)];if(!S)return[];if(!(b=S.queries[y]))return[null,!1,S,null];var P=b[(k.query?k.query.index.name:null)||""];if(!P)return[null,!1,S,null];switch(y){case"query":var O=P.find(function(D){return D.req.limit===k.limit&&D.req.values===k.values&&Ei(D.req.query.range,k.query.range)});return O?[O,!0,S,P]:[P.find(function(D){return("limit"in D.req?D.req.limit:1/0)>=k.limit&&(!k.values||D.req.values)&&cm(D.req.query.range,k.query.range)}),!1,S,P];case"count":return O=P.find(function(D){return Ei(D.req.query.range,k.query.range)}),[O,!!O,S,P]}}(n,t,"query",o),g=p[0],h=p[1],x=p[2],v=p[3];return g&&h?g.obsSet=o.obsSet:(h=r.query(o).then(function(m){var b=m.result;if(g&&(g.res=b),u){for(var y=0,k=b.length;y<k;++y)Object.freeze(b[y]);Object.freeze(b)}else m.result=Me(b);return m}).catch(function(m){return v&&g&&Le(v,g),Promise.reject(m)}),g={obsSet:o.obsSet,promise:h,subscribers:new Set,type:"query",req:o,dirty:!1},v?v.push(g):(v=[g],(x=x||(mn["idb://".concat(n,"/").concat(t)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[o.query.index.name||""]=v)),lm(g,v,c,d),g.promise.then(function(m){return{result:ki(m.result,o,x==null?void 0:x.optimisticOps,r,g,u)}})}})}})}};function Ut(e,n){return new Proxy(e,{get:function(t,r,i){return r==="db"?n:Reflect.get(t,r,i)}})}var We=(we.prototype.version=function(e){if(isNaN(e)||e<.1)throw new H.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new H.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var n=this._versions,t=n.filter(function(r){return r._cfg.version===e})[0];return t||(t=new this.Version(e),n.push(t),n.sort(em),t.stores({}),this._state.autoSchema=!1,t)},we.prototype._whenReady=function(e){var n=this;return this.idbdb&&(this._state.openComplete||Y.letThrough||this._vip)?e():new U(function(t,r){if(n._state.openComplete)return r(new H.DatabaseClosed(n._state.dbOpenError));if(!n._state.isBeingOpened){if(!n._state.autoOpen)return void r(new H.DatabaseClosed);n.open().catch(he)}n._state.dbReadyPromise.then(t,r)}).then(e)},we.prototype.use=function(e){var n=e.stack,t=e.create,r=e.level,i=e.name;return i&&this.unuse({stack:n,name:i}),e=this._middlewares[n]||(this._middlewares[n]=[]),e.push({stack:n,create:t,level:r??10,name:i}),e.sort(function(o,u){return o.level-u.level}),this},we.prototype.unuse=function(e){var n=e.stack,t=e.name,r=e.create;return n&&this._middlewares[n]&&(this._middlewares[n]=this._middlewares[n].filter(function(i){return r?i.create!==r:!!t&&i.name!==t})),this},we.prototype.open=function(){var e=this;return vn(Qe,function(){return am(e)})},we.prototype._close=function(){var e=this._state,n=Tn.indexOf(this);if(0<=n&&Tn.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new U(function(t){e.dbReadyResolve=t}),e.openCanceller=new U(function(t,r){e.cancelOpen=r}))},we.prototype.close=function(t){var n=(t===void 0?{disableAutoOpen:!0}:t).disableAutoOpen,t=this._state;n?(t.isBeingOpened&&t.cancelOpen(new H.DatabaseClosed),this._close(),t.autoOpen=!1,t.dbOpenError=new H.DatabaseClosed):(this._close(),t.autoOpen=this._options.autoOpen||t.isBeingOpened,t.openComplete=!1,t.dbOpenError=null)},we.prototype.delete=function(e){var n=this;e===void 0&&(e={disableAutoOpen:!0});var t=0<arguments.length&&typeof arguments[0]!="object",r=this._state;return new U(function(i,o){function u(){n.close(e);var c=n._deps.indexedDB.deleteDatabase(n.name);c.onsuccess=me(function(){var d,p,g;d=n._deps,p=n.name,g=d.indexedDB,d=d.IDBKeyRange,Rr(g)||p===Ct||Ar(g,d).delete(p).catch(he),i()}),c.onerror=Ue(o),c.onblocked=n._fireOnBlocked}if(t)throw new H.InvalidArgument("Invalid closeOptions argument to db.delete()");r.isBeingOpened?r.dbReadyPromise.then(u):u()})},we.prototype.backendDB=function(){return this.idbdb},we.prototype.isOpen=function(){return this.idbdb!==null},we.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&e.name==="DatabaseClosed"},we.prototype.hasFailed=function(){return this._state.dbOpenError!==null},we.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(we.prototype,"tables",{get:function(){var e=this;return _(this._allTables).map(function(n){return e._allTables[n]})},enumerable:!1,configurable:!0}),we.prototype.transaction=function(){var e=(function(n,t,r){var i=arguments.length;if(i<2)throw new H.InvalidArgument("Too few arguments");for(var o=new Array(i-1);--i;)o[i-1]=arguments[i];return r=o.pop(),[n,xe(o),r]}).apply(this,arguments);return this._transaction.apply(this,e)},we.prototype._transaction=function(e,n,t){var r=this,i=Y.trans;i&&i.db===this&&e.indexOf("!")===-1||(i=null);var o,u,c=e.indexOf("?")!==-1;e=e.replace("!","").replace("?","");try{if(u=n.map(function(p){if(p=p instanceof r.Table?p.name:p,typeof p!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return p}),e=="r"||e===br)o=br;else{if(e!="rw"&&e!=_r)throw new H.InvalidArgument("Invalid transaction mode: "+e);o=_r}if(i){if(i.mode===br&&o===_r){if(!c)throw new H.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&u.forEach(function(p){if(i&&i.storeNames.indexOf(p)===-1){if(!c)throw new H.SubTransaction("Table "+p+" not included in parent transaction.");i=null}}),c&&i&&!i.active&&(i=null)}}catch(p){return i?i._promise(null,function(g,h){h(p)}):_e(p)}var d=(function p(g,h,x,v,m){return U.resolve().then(function(){var b=Y.transless||Y,y=g._createTransaction(h,x,g._dbSchema,v);if(y.explicit=!0,b={trans:y,transless:b},v)y.idbtrans=v.idbtrans;else try{y.create(),y.idbtrans._explicit=!0,g._state.PR1398_maxLoop=3}catch(P){return P.name===un.InvalidState&&g.isOpen()&&0<--g._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),g.close({disableAutoOpen:!1}),g.open().then(function(){return p(g,h,x,null,m)})):_e(P)}var k,S=te(m);return S&&jn(),b=U.follow(function(){var P;(k=m.call(y,y))&&(S?(P=$e.bind(null,null),k.then(P,P)):typeof k.next=="function"&&typeof k.throw=="function"&&(k=Lr(k)))},b),(k&&typeof k.then=="function"?U.resolve(k).then(function(P){return y.active?P:_e(new H.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):b.then(function(){return k})).then(function(P){return v&&y._resolve(),y._completion.then(function(){return P})}).catch(function(P){return y._reject(P),_e(P)})})}).bind(null,this,o,u,i,t);return i?i._promise(o,d,"lock"):Y.trans?vn(Y.transless,function(){return r._whenReady(d)}):this._whenReady(d)},we.prototype.table=function(e){if(!q(this._allTables,e))throw new H.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},we);function we(e,n){var t=this;this._middlewares={},this.verno=0;var r=we.dependencies;this._options=n=f({addons:we.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,cache:"cloned"},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange},r=n.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var i,o,u,c,d,p={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:he,dbReadyPromise:null,cancelOpen:he,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:n.autoOpen};p.dbReadyPromise=new U(function(h){p.dbReadyResolve=h}),p.openCanceller=new U(function(h,x){p.cancelOpen=x}),this._state=p,this.name=e,this.on=Xn(this,"populate","blocked","versionchange","close",{ready:[lr,he]}),this.on.ready.subscribe=Ee(this.on.ready.subscribe,function(h){return function(x,v){we.vip(function(){var m,b=t._state;b.openComplete?(b.dbOpenError||U.resolve().then(x),v&&h(x)):b.onReadyBeingFired?(b.onReadyBeingFired.push(x),v&&h(x)):(h(x),m=t,v||h(function y(){m.on.ready.unsubscribe(x),m.on.ready.unsubscribe(y)}))})}}),this.Collection=(i=this,Zn(Gy.prototype,function(k,y){this.db=i;var v=ni,m=null;if(y)try{v=y()}catch(S){m=S}var b=k._ctx,y=b.table,k=y.hook.reading.fire;this._ctx={table:y,index:b.index,isPrimKey:!b.index||y.schema.primKey.keyPath&&b.index===y.schema.primKey.name,range:v,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:m,or:b.or,valueMapper:k!==Vn?k:null}})),this.Table=(o=this,Zn(ii.prototype,function(h,x,v){this.db=o,this._tx=v,this.name=h,this.schema=x,this.hook=o._allTables[h]?o._allTables[h].hook:Xn(null,{creating:[Ky,he],reading:[My,Vn],updating:[By,he],deleting:[Ly,he]})})),this.Transaction=(u=this,Zn(Zy.prototype,function(h,x,v,m,b){var y=this;this.db=u,this.mode=h,this.storeNames=x,this.schema=v,this.chromeTransactionDurability=m,this.idbtrans=null,this.on=Xn(this,"complete","error","abort"),this.parent=b||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 U(function(k,S){y._resolve=k,y._reject=S}),this._completion.then(function(){y.active=!1,y.on.complete.fire()},function(k){var S=y.active;return y.active=!1,y.on.error.fire(k),y.parent?y.parent._reject(k):S&&y.idbtrans&&y.idbtrans.abort(),_e(k)})})),this.Version=(c=this,Zn(rm.prototype,function(h){this.db=c,this._cfg={version:h,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(d=this,Zn(li.prototype,function(h,x,v){if(this.db=d,this._ctx={table:h,index:x===":id"?null:x,or:v},this._cmp=this._ascending=se,this._descending=function(m,b){return se(b,m)},this._max=function(m,b){return 0<se(m,b)?m:b},this._min=function(m,b){return se(m,b)<0?m:b},this._IDBKeyRange=d._deps.IDBKeyRange,!this._IDBKeyRange)throw new H.MissingAPI})),this.on("versionchange",function(h){0<h.newVersion?console.warn("Another connection wants to upgrade database '".concat(t.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(t.name,"'. Closing db now to resume the delete request.")),t.close({disableAutoOpen:!1})}),this.on("blocked",function(h){!h.newVersion||h.newVersion<h.oldVersion?console.warn("Dexie.delete('".concat(t.name,"') was blocked")):console.warn("Upgrade '".concat(t.name,"' blocked by other connection holding version ").concat(h.oldVersion/10))}),this._maxKey=et(n.IDBKeyRange),this._createTransaction=function(h,x,v,m){return new t.Transaction(h,x,v,t._options.chromeTransactionDurability,m)},this._fireOnBlocked=function(h){t.on("blocked").fire(h),Tn.filter(function(x){return x.name===t.name&&x!==t&&!x._state.vcFired}).map(function(x){return x.on("versionchange").fire(h)})},this.use(sm),this.use(fm),this.use(um),this.use(im),this.use(om);var g=new Proxy(this,{get:function(h,x,v){if(x==="_vip")return!0;if(x==="table")return function(b){return Ut(t.table(b),g)};var m=Reflect.get(h,x,v);return m instanceof ii?Ut(m,g):x==="tables"?m.map(function(b){return Ut(b,g)}):x==="_createTransaction"?function(){return Ut(m.apply(this,arguments),g)}:m}});this.vip=g,r.forEach(function(h){return h(t)})}var qt,ze=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",hm=(qr.prototype.subscribe=function(e,n,t){return this._subscribe(e&&typeof e!="function"?e:{next:e,error:n,complete:t})},qr.prototype[ze]=function(){return this},qr);function qr(e){this._subscribe=e}try{qt={indexedDB:w.indexedDB||w.mozIndexedDB||w.webkitIndexedDB||w.msIndexedDB,IDBKeyRange:w.IDBKeyRange||w.webkitIDBKeyRange}}catch{qt={indexedDB:null,IDBKeyRange:null}}function Si(e){var n,t=!1,r=new hm(function(i){var o=te(e),u,c=!1,d={},p={},g={get closed(){return c},unsubscribe:function(){c||(c=!0,u&&u.abort(),h&&tn.storagemutated.unsubscribe(v))}};i.start&&i.start(g);var h=!1,x=function(){return gr(m)},v=function(b){Lt(d,b),Nr(p,d)&&x()},m=function(){var b,y,k;!c&&qt.indexedDB&&(d={},b={},u&&u.abort(),u=new AbortController,k=function(S){var P=Cn();try{o&&jn();var O=Je(e,S);return O=o?O.finally($e):O}finally{P&&On()}}(y={subscr:b,signal:u.signal,requery:x,querier:e,trans:null}),Promise.resolve(k).then(function(S){t=!0,n=S,c||y.signal.aborted||(d={},function(P){for(var O in P)if(q(P,O))return;return 1}(p=b)||h||(tn($n,v),h=!0),gr(function(){return!c&&i.next&&i.next(S)}))},function(S){t=!1,["DatabaseClosedError","AbortError"].includes(S==null?void 0:S.name)||c||gr(function(){c||i.error&&i.error(S)})}))};return setTimeout(x,0),g});return r.hasValue=function(){return t},r.getValue=function(){return n},r}var gn=We;function Vr(e){var n=rn;try{rn=!0,tn.storagemutated.fire(e),Kr(e,!0)}finally{rn=n}}G(gn,f(f({},Pn),{delete:function(e){return new gn(e,{addons:[]}).delete()},exists:function(e){return new gn(e,{addons:[]}).open().then(function(n){return n.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return n=gn.dependencies,t=n.indexedDB,n=n.IDBKeyRange,(Rr(t)?Promise.resolve(t.databases()).then(function(r){return r.map(function(i){return i.name}).filter(function(i){return i!==Ct})}):Ar(t,n).toCollection().primaryKeys()).then(e)}catch{return _e(new H.MissingAPI)}var n,t},defineClass:function(){return function(e){j(this,e)}},ignoreTransaction:function(e){return Y.trans?vn(Y.transless,e):e()},vip:Dr,async:function(e){return function(){try{var n=Lr(e.apply(this,arguments));return n&&typeof n.then=="function"?n:U.resolve(n)}catch(t){return _e(t)}}},spawn:function(e,n,t){try{var r=Lr(e.apply(t,n||[]));return r&&typeof r.then=="function"?r:U.resolve(r)}catch(i){return _e(i)}},currentTransaction:{get:function(){return Y.trans||null}},waitFor:function(e,n){return n=U.resolve(typeof e=="function"?gn.ignoreTransaction(e):e).timeout(n||6e4),Y.trans?Y.trans.waitFor(n):n},Promise:U,debug:{get:function(){return Fe},set:function(e){Wa(e)}},derive:X,extend:j,props:G,override:Ee,Events:Xn,on:tn,liveQuery:Si,extendObservabilitySet:Lt,getByKeyPath:ue,setByKeyPath:$,delByKeyPath:function(e,n){typeof n=="string"?$(e,n,void 0):"length"in n&&[].map.call(n,function(t){$(e,t,void 0)})},shallowClone:ge,deepClone:Me,getObjectDiff:Br,cmp:se,asap:ee,minKey:-1/0,addons:[],connections:Tn,errnames:un,dependencies:qt,cache:mn,semVer:"4.0.11",version:"4.0.11".split(".").map(function(e){return parseInt(e)}).reduce(function(e,n,t){return e+n/Math.pow(10,2*t)})})),gn.maxKey=et(gn.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(tn($n,function(e){rn||(e=new CustomEvent(Er,{detail:e}),rn=!0,dispatchEvent(e),rn=!1)}),addEventListener(Er,function(e){e=e.detail,rn||Vr(e)}));var Dn,rn=!1,Pi=function(){};return typeof BroadcastChannel<"u"&&((Pi=function(){(Dn=new BroadcastChannel(Er)).onmessage=function(e){return e.data&&Vr(e.data)}})(),typeof Dn.unref=="function"&&Dn.unref(),tn($n,function(e){rn||Dn.postMessage(e)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(e){if(!We.disableBfCache&&e.persisted){Fe&&console.debug("Dexie: handling persisted pagehide"),Dn!=null&&Dn.close();for(var n=0,t=Tn;n<t.length;n++)t[n].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(e){!We.disableBfCache&&e.persisted&&(Fe&&console.debug("Dexie: handling persisted pageshow"),Pi(),Vr({all:new je(-1/0,[[]])}))})),U.rejectionMapper=function(e,n){return!e||e instanceof be||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Sn[e.name]?e:(n=new Sn[e.name](n||e.message,e),"stack"in e&&R(n,"stack",{get:function(){return this.inner.stack}}),n)},Wa(Fe),f(We,Object.freeze({__proto__:null,Dexie:We,liveQuery:Si,Entity:ti,cmp:se,PropModification:Qn,replacePrefix:function(e,n){return new Qn({replacePrefix:[e,n]})},add:function(e){return new Qn({add:e})},remove:function(e){return new Qn({remove:e})},default:We,RangeSet:je,mergeRanges:rt,rangesOverlap:pi}),{default:We}),We})}(vt)),vt.exports}var Mu=zu();const or=Yr(Mu),Ba=Symbol.for("Dexie"),pt=globalThis[Ba]||(globalThis[Ba]=or);if(or.semVer!==pt.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${or.semVer} and ${pt.semVer}`);const{liveQuery:pm,mergeRanges:ym,rangesOverlap:mm,RangeSet:gm,cmp:bm,Entity:_m,PropModification:wm,replacePrefix:xm,add:km,remove:Em}=pt;var Ku="阿啊呵腌嗄吖锕",Lu="额阿俄恶鹅遏鄂厄饿峨扼娥鳄哦蛾噩愕讹锷垩婀鹗萼谔莪腭锇颚呃阏屙苊轭",Bu="爱埃艾碍癌哀挨矮隘蔼唉皑哎霭捱暧嫒嗳瑷嗌锿砹",Fu="诶",Uu="系西席息希习吸喜细析戏洗悉锡溪惜稀袭夕洒晰昔牺腊烯熙媳栖膝隙犀蹊硒兮熄曦禧嬉玺奚汐徙羲铣淅嘻歙熹矽蟋郗唏皙隰樨浠忾蜥檄郄翕阋鳃舾屣葸螅咭粞觋欷僖醯鼷裼穸饩舄禊诶菥蓰",qu="一以已意议义益亿易医艺食依移衣异伊仪宜射遗疑毅谊亦疫役忆抑尾乙译翼蛇溢椅沂泄逸蚁夷邑怡绎彝裔姨熠贻矣屹颐倚诣胰奕翌疙弈轶蛾驿壹猗臆弋铱旖漪迤佚翊诒怿痍懿饴峄揖眙镒仡黟肄咿翳挹缢呓刈咦嶷羿钇殪荑薏蜴镱噫癔苡悒嗌瘗衤佾埸圯舣酏劓",Vu="安案按岸暗鞍氨俺胺铵谙庵黯鹌桉埯犴揞厂广",Hu="厂汉韩含旱寒汗涵函喊憾罕焊翰邯撼瀚憨捍酣悍鼾邗颔蚶晗菡旰顸犴焓撖",Yu="昂仰盎肮",Gu="奥澳傲熬凹鳌敖遨鏖袄坳翱嗷拗懊岙螯骜獒鏊艹媪廒聱",Wu="瓦挖娃洼袜蛙凹哇佤娲呙腽",Xu="于与育余预域予遇奥语誉玉鱼雨渔裕愈娱欲吁舆宇羽逾豫郁寓吾狱喻御浴愉禹俞邪榆愚渝尉淤虞屿峪粥驭瑜禺毓钰隅芋熨瘀迂煜昱汩於臾盂聿竽萸妪腴圄谕觎揄龉谀俣馀庾妤瘐鬻欤鹬阈嵛雩鹆圉蜮伛纡窬窳饫蓣狳肀舁蝓燠",Zu="牛纽扭钮拗妞忸狃",Qu="哦噢喔",Ju="把八巴拔伯吧坝爸霸罢芭跋扒叭靶疤笆耙鲅粑岜灞钯捌菝魃茇",$u="怕帕爬扒趴琶啪葩耙杷钯筢",ec="被批副否皮坏辟啤匹披疲罢僻毗坯脾譬劈媲屁琵邳裨痞癖陂丕枇噼霹吡纰砒铍淠郫埤濞睥芘蚍圮鼙罴蜱疋貔仳庀擗甓陴",nc="比必币笔毕秘避闭佛辟壁弊彼逼碧鼻臂蔽拂泌璧庇痹毙弼匕鄙陛裨贲敝蓖吡篦纰俾铋毖筚荸薜婢哔跸濞秕荜愎睥妣芘箅髀畀滗狴萆嬖襞舭",tc="百白败摆伯拜柏佰掰呗擘捭稗",rc="波博播勃拨薄佛伯玻搏柏泊舶剥渤卜驳簿脖膊簸菠礴箔铂亳钵帛擘饽跛钹趵檗啵鹁擗踣",ac="北被备倍背杯勃贝辈悲碑臂卑悖惫蓓陂钡狈呗焙碚褙庳鞴孛鹎邶鐾",ic="办版半班般板颁伴搬斑扮拌扳瓣坂阪绊钣瘢舨癍",oc="判盘番潘攀盼拚畔胖叛拌蹒磐爿蟠泮袢襻丬",sc="份宾频滨斌彬濒殡缤鬓槟摈膑玢镔豳髌傧",uc="帮邦彭旁榜棒膀镑绑傍磅蚌谤梆浜蒡",cc="旁庞乓磅螃彷滂逄耪",lc="泵崩蚌蹦迸绷甭嘣甏堋",fc="报保包宝暴胞薄爆炮饱抱堡剥鲍曝葆瀑豹刨褒雹孢苞煲褓趵鸨龅勹",hc="不部步布补捕堡埔卜埠簿哺怖钚卟瓿逋晡醭钸",dc="普暴铺浦朴堡葡谱埔扑仆蒲曝瀑溥莆圃璞濮菩蹼匍噗氆攵镨攴镤",vc="面棉免绵缅勉眠冕娩腼渑湎沔黾宀眄",pc="破繁坡迫颇朴泊婆泼魄粕鄱珀陂叵笸泺皤钋钷",yc="反范犯繁饭泛翻凡返番贩烦拚帆樊藩矾梵蕃钒幡畈蘩蹯燔",mc="府服副负富复福夫妇幅付扶父符附腐赴佛浮覆辅傅伏抚赋辐腹弗肤阜袱缚甫氟斧孚敷俯拂俘咐腑孵芙涪釜脯茯馥宓绂讣呋罘麸蝠匐芾蜉跗凫滏蝮驸绋蚨砩桴赙菔呒趺苻拊阝鲋怫稃郛莩幞祓艴黻黼鳆",gc="本体奔苯笨夯贲锛畚坌",bc="风丰封峰奉凤锋冯逢缝蜂枫疯讽烽俸沣酆砜葑唪",_c="变便边编遍辩鞭辨贬匾扁卞汴辫砭苄蝙鳊弁窆笾煸褊碥忭缏",wc="便片篇偏骗翩扁骈胼蹁谝犏缏",xc="镇真针圳振震珍阵诊填侦臻贞枕桢赈祯帧甄斟缜箴疹砧榛鸩轸稹溱蓁胗椹朕畛浈",kc="表标彪镖裱飚膘飙镳婊骠飑杓髟鳔灬瘭",Ec="票朴漂飘嫖瓢剽缥殍瞟骠嘌莩螵",Sc="和活或货获火伙惑霍祸豁嚯藿锪蠖钬耠镬夥灬劐攉",Pc="别鳖憋瘪蹩",Cc="民敏闽闵皿泯岷悯珉抿黾缗玟愍苠鳘",Oc="分份纷奋粉氛芬愤粪坟汾焚酚吩忿棼玢鼢瀵偾鲼",jc="并病兵冰屏饼炳秉丙摒柄槟禀枋邴冫",Tc="更耕颈庚耿梗埂羹哽赓绠鲠",Ac="方放房防访纺芳仿坊妨肪邡舫彷枋鲂匚钫",Rc="现先县见线限显险献鲜洗宪纤陷闲贤仙衔掀咸嫌掺羡弦腺痫娴舷馅酰铣冼涎暹籼锨苋蚬跹岘藓燹鹇氙莶霰跣猃彡祆筅",Dc="不否缶",Ic="拆擦嚓礤",Nc="查察差茶插叉刹茬楂岔诧碴嚓喳姹杈汊衩搽槎镲苴檫馇锸猹",zc="才采财材菜彩裁蔡猜踩睬",Mc="参残餐灿惨蚕掺璨惭粲孱骖黪",Kc="信深参身神什审申甚沈伸慎渗肾绅莘呻婶娠砷蜃哂椹葚吲糁渖诜谂矧胂",Lc="参岑涔",Bc="三参散伞叁糁馓毵",Fc="藏仓苍沧舱臧伧",Uc="藏脏葬赃臧奘驵",qc="称陈沈沉晨琛臣尘辰衬趁忱郴宸谌碜嗔抻榇伧谶龀肜",Vc="草操曹槽糙嘈漕螬艚屮",Hc="策测册侧厕栅恻",Yc="责则泽择侧咋啧仄箦赜笮舴昃迮帻",Gc="债择齐宅寨侧摘窄斋祭翟砦瘵哜",Wc="到道导岛倒刀盗稻蹈悼捣叨祷焘氘纛刂帱忉",Xc="层曾蹭噌",Zc="查扎炸诈闸渣咋乍榨楂札栅眨咤柞喳喋铡蚱吒怍砟揸痄哳齄",Qc="差拆柴钗豺侪虿瘥",Jc="次此差词辞刺瓷磁兹慈茨赐祠伺雌疵鹚糍呲粢",$c="资自子字齐咨滋仔姿紫兹孜淄籽梓鲻渍姊吱秭恣甾孳訾滓锱辎趑龇赀眦缁呲笫谘嵫髭茈粢觜耔",el="措错磋挫搓撮蹉锉厝嵯痤矬瘥脞鹾",nl="产单阐崭缠掺禅颤铲蝉搀潺蟾馋忏婵孱觇廛谄谗澶骣羼躔蒇冁",tl="山单善陕闪衫擅汕扇掺珊禅删膳缮赡鄯栅煽姗跚鳝嬗潸讪舢苫疝掸膻钐剡蟮芟埏彡骟",rl="展战占站崭粘湛沾瞻颤詹斩盏辗绽毡栈蘸旃谵搌",al="新心信辛欣薪馨鑫芯锌忻莘昕衅歆囟忄镡",il="联连练廉炼脸莲恋链帘怜涟敛琏镰濂楝鲢殓潋裢裣臁奁莶蠊蔹",ol="场长厂常偿昌唱畅倡尝肠敞倘猖娼淌裳徜昶怅嫦菖鲳阊伥苌氅惝鬯",sl="长张章障涨掌帐胀彰丈仗漳樟账杖璋嶂仉瘴蟑獐幛鄣嫜",ul="超朝潮炒钞抄巢吵剿绰嘲晁焯耖怊",cl="着照招找召朝赵兆昭肇罩钊沼嘲爪诏濯啁棹笊",ll="调州周洲舟骤轴昼宙粥皱肘咒帚胄绉纣妯啁诌繇碡籀酎荮",fl="车彻撤尺扯澈掣坼砗屮",hl="车局据具举且居剧巨聚渠距句拒俱柜菊拘炬桔惧矩鞠驹锯踞咀瞿枸掬沮莒橘飓疽钜趄踽遽琚龃椐苣裾榘狙倨榉苴讵雎锔窭鞫犋屦醵",dl="成程城承称盛抢乘诚呈净惩撑澄秤橙骋逞瞠丞晟铛埕塍蛏柽铖酲裎枨",vl="容荣融绒溶蓉熔戎榕茸冗嵘肜狨蝾",pl="生声升胜盛乘圣剩牲甸省绳笙甥嵊晟渑眚",yl="等登邓灯澄凳瞪蹬噔磴嶝镫簦戥",ml="制之治质职只志至指织支值知识直致执置止植纸拓智殖秩旨址滞氏枝芝脂帜汁肢挚稚酯掷峙炙栉侄芷窒咫吱趾痔蜘郅桎雉祉郦陟痣蛭帙枳踯徵胝栀贽祗豸鸷摭轵卮轾彘觯絷跖埴夂黹忮骘膣踬",gl="政正证争整征郑丁症挣蒸睁铮筝拯峥怔诤狰徵钲",bl="堂唐糖汤塘躺趟倘棠烫淌膛搪镗傥螳溏帑羰樘醣螗耥铴瑭",_l="持吃池迟赤驰尺斥齿翅匙痴耻炽侈弛叱啻坻眙嗤墀哧茌豉敕笞饬踟蚩柢媸魑篪褫彳鸱螭瘛眵傺",wl="是时实事市十使世施式势视识师史示石食始士失适试什泽室似诗饰殖释驶氏硕逝湿蚀狮誓拾尸匙仕柿矢峙侍噬嗜栅拭嘘屎恃轼虱耆舐莳铈谥炻豕鲥饣螫酾筮埘弑礻蓍鲺贳",xl="企其起期气七器汽奇齐启旗棋妻弃揭枝歧欺骑契迄亟漆戚岂稽岐琦栖缉琪泣乞砌祁崎绮祺祈凄淇杞脐麒圻憩芪伎俟畦耆葺沏萋骐鳍綦讫蕲屺颀亓碛柒啐汔綮萁嘁蛴槭欹芑桤丌蜞",kl="揣踹啜搋膪",El="托脱拓拖妥驼陀沱鸵驮唾椭坨佗砣跎庹柁橐乇铊沲酡鼍箨柝",Sl="多度夺朵躲铎隋咄堕舵垛惰哆踱跺掇剁柁缍沲裰哚隳",Pl="学血雪削薛穴靴谑噱鳕踅泶彐",Cl="重种充冲涌崇虫宠忡憧舂茺铳艟",Ol="筹抽绸酬愁丑臭仇畴稠瞅踌惆俦瘳雠帱",jl="求球秋丘邱仇酋裘龟囚遒鳅虬蚯泅楸湫犰逑巯艽俅蝤赇鼽糗",Tl="修秀休宿袖绣臭朽锈羞嗅岫溴庥馐咻髹鸺貅",Al="出处础初助除储畜触楚厨雏矗橱锄滁躇怵绌搐刍蜍黜杵蹰亍樗憷楮",Rl="团揣湍疃抟彖",Dl="追坠缀揣椎锥赘惴隹骓缒",Il="传川船穿串喘椽舛钏遄氚巛舡",Nl="专转传赚砖撰篆馔啭颛",zl="元员院原源远愿园援圆缘袁怨渊苑宛冤媛猿垣沅塬垸鸳辕鸢瑗圜爰芫鼋橼螈眢箢掾",Ml="窜攒篡蹿撺爨汆镩",Kl="创床窗闯幢疮怆",Ll="装状庄壮撞妆幢桩奘僮戆",Bl="吹垂锤炊椎陲槌捶棰",Fl="春纯醇淳唇椿蠢鹑朐莼肫蝽",Ul="准屯淳谆肫窀",ql="促趋趣粗簇醋卒蹴猝蹙蔟殂徂",Vl="吨顿盾敦蹲墩囤沌钝炖盹遁趸砘礅",Hl="区去取曲趋渠趣驱屈躯衢娶祛瞿岖龋觑朐蛐癯蛆苣阒诎劬蕖蘧氍黢蠼璩麴鸲磲",Yl="需许续须序徐休蓄畜虚吁绪叙旭邪恤墟栩絮圩婿戌胥嘘浒煦酗诩朐盱蓿溆洫顼勖糈砉醑",Gl="辍绰戳淖啜龊踔辶",Wl="组族足祖租阻卒俎诅镞菹",Xl="济机其技基记计系期际及集级几给积极己纪即继击既激绩急奇吉季齐疾迹鸡剂辑籍寄挤圾冀亟寂暨脊跻肌稽忌饥祭缉棘矶汲畸姬藉瘠骥羁妓讥稷蓟悸嫉岌叽伎鲫诘楫荠戟箕霁嵇觊麂畿玑笈犄芨唧屐髻戢佶偈笄跽蒺乩咭赍嵴虮掎齑殛鲚剞洎丌墼蕺彐芰哜",Zl="从丛匆聪葱囱琮淙枞骢苁璁",Ql="总从综宗纵踪棕粽鬃偬枞腙",Jl="凑辏腠楱",$l="衰催崔脆翠萃粹摧璀瘁悴淬啐隹毳榱",ef="为位委未维卫围违威伟危味微唯谓伪慰尾魏韦胃畏帷喂巍萎蔚纬潍尉渭惟薇苇炜圩娓诿玮崴桅偎逶倭猥囗葳隗痿猬涠嵬韪煨艉隹帏闱洧沩隈鲔軎",nf="村存寸忖皴",tf="作做座左坐昨佐琢撮祚柞唑嘬酢怍笮阼胙",rf="钻纂攥缵躜",af="大达打答搭沓瘩惮嗒哒耷鞑靼褡笪怛妲",of="大代带待贷毒戴袋歹呆隶逮岱傣棣怠殆黛甙埭诒绐玳呔迨",sf="大台太态泰抬胎汰钛苔薹肽跆邰鲐酞骀炱",uf="他它她拓塔踏塌榻沓漯獭嗒挞蹋趿遢铊鳎溻闼",cf="但单石担丹胆旦弹蛋淡诞氮郸耽殚惮儋眈疸澹掸膻啖箪聃萏瘅赕",lf="路六陆录绿露鲁卢炉鹿禄赂芦庐碌麓颅泸卤潞鹭辘虏璐漉噜戮鲈掳橹轳逯渌蓼撸鸬栌氇胪镥簏舻辂垆",ff="谈探坦摊弹炭坛滩贪叹谭潭碳毯瘫檀痰袒坍覃忐昙郯澹钽锬",hf="人任认仁忍韧刃纫饪妊荏稔壬仞轫亻衽",df="家结解价界接节她届介阶街借杰洁截姐揭捷劫戒皆竭桔诫楷秸睫藉拮芥诘碣嗟颉蚧孑婕疖桀讦疥偈羯袷哜喈卩鲒骱",vf="研严验演言眼烟沿延盐炎燕岩宴艳颜殷彦掩淹阎衍铅雁咽厌焰堰砚唁焉晏檐蜒奄俨腌妍谚兖筵焱偃闫嫣鄢湮赝胭琰滟阉魇酽郾恹崦芫剡鼹菸餍埏谳讠厣罨",pf="当党档荡挡宕砀铛裆凼菪谠",yf="套讨跳陶涛逃桃萄淘掏滔韬叨洮啕绦饕鼗",mf="条调挑跳迢眺苕窕笤佻啁粜髫铫祧龆蜩鲦",gf="特忑忒铽慝",bf="的地得德底锝",_f="得",wf="的地第提低底抵弟迪递帝敌堤蒂缔滴涤翟娣笛棣荻谛狄邸嘀砥坻诋嫡镝碲骶氐柢籴羝睇觌",xf="体提题弟替梯踢惕剔蹄棣啼屉剃涕锑倜悌逖嚏荑醍绨鹈缇裼",kf="推退弟腿褪颓蜕忒煺",Ef="有由又优游油友右邮尤忧幼犹诱悠幽佑釉柚铀鱿囿酉攸黝莠猷蝣疣呦蚴莸莜铕宥繇卣牖鼬尢蚰侑",Sf="电点店典奠甸碘淀殿垫颠滇癫巅惦掂癜玷佃踮靛钿簟坫阽",Pf="天田添填甜甸恬腆佃舔钿阗忝殄畋栝掭",Cf="主术住注助属逐宁著筑驻朱珠祝猪诸柱竹铸株瞩嘱贮煮烛苎褚蛛拄铢洙竺蛀渚伫杼侏澍诛茱箸炷躅翥潴邾槠舳橥丶瘃麈疰",Of="年念酿辗碾廿捻撵拈蔫鲶埝鲇辇黏",jf="调掉雕吊钓刁貂凋碉鲷叼铫铞",Tf="要么约药邀摇耀腰遥姚窑瑶咬尧钥谣肴夭侥吆疟妖幺杳舀窕窈曜鹞爻繇徭轺铫鳐崾珧",Af="跌叠蝶迭碟爹谍牒耋佚喋堞瓞鲽垤揲蹀",Rf="设社摄涉射折舍蛇拾舌奢慑赦赊佘麝歙畲厍猞揲滠",Df="业也夜叶射野液冶喝页爷耶邪咽椰烨掖拽曳晔谒腋噎揶靥邺铘揲",If="些解协写血叶谢械鞋胁斜携懈契卸谐泄蟹邪歇泻屑挟燮榭蝎撷偕亵楔颉缬邂鲑瀣勰榍薤绁渫廨獬躞",Nf="这者着著浙折哲蔗遮辙辄柘锗褶蜇蛰鹧谪赭摺乇磔螫",zf="定订顶丁鼎盯钉锭叮仃铤町酊啶碇腚疔玎耵",Mf="丢铥",Kf="听庭停厅廷挺亭艇婷汀铤烃霆町蜓葶梃莛",Lf="动东董冬洞懂冻栋侗咚峒氡恫胴硐垌鸫岽胨",Bf="同通统童痛铜桶桐筒彤侗佟潼捅酮砼瞳恸峒仝嗵僮垌茼",Ff="中重种众终钟忠仲衷肿踵冢盅蚣忪锺舯螽夂",Uf="都斗读豆抖兜陡逗窦渎蚪痘蔸钭篼",qf="度都独督读毒渡杜堵赌睹肚镀渎笃竺嘟犊妒牍蠹椟黩芏髑",Vf="断段短端锻缎煅椴簖",Hf="对队追敦兑堆碓镦怼憝",Yf="瑞兑锐睿芮蕊蕤蚋枘",Gf="月说约越乐跃兑阅岳粤悦曰钥栎钺樾瀹龠哕刖",Wf="吞屯囤褪豚臀饨暾氽",Xf="会回挥汇惠辉恢徽绘毁慧灰贿卉悔秽溃荟晖彗讳诲珲堕诙蕙晦睢麾烩茴喙桧蛔洄浍虺恚蟪咴隳缋哕",Zf="务物无五武午吴舞伍污乌误亡恶屋晤悟吾雾芜梧勿巫侮坞毋诬呜钨邬捂鹜兀婺妩於戊鹉浯蜈唔骛仵焐芴鋈庑鼯牾怃圬忤痦迕杌寤阢",Qf="亚压雅牙押鸭呀轧涯崖邪芽哑讶鸦娅衙丫蚜碣垭伢氩桠琊揠吖睚痖疋迓岈砑",Jf="和合河何核盖贺喝赫荷盒鹤吓呵苛禾菏壑褐涸阂阖劾诃颌嗬貉曷翮纥盍",$f="我握窝沃卧挝涡斡渥幄蜗喔倭莴龌肟硪",eh="恩摁蒽",nh="嗯唔",th="而二尔儿耳迩饵洱贰铒珥佴鸸鲕",rh="发法罚乏伐阀筏砝垡珐",ah="全权券泉圈拳劝犬铨痊诠荃醛蜷颧绻犭筌鬈悛辁畎",ih="费非飞肥废菲肺啡沸匪斐蜚妃诽扉翡霏吠绯腓痱芾淝悱狒榧砩鲱篚镄",oh="配培坏赔佩陪沛裴胚妃霈淠旆帔呸醅辔锫",sh="平评凭瓶冯屏萍苹乒坪枰娉俜鲆",uh="佛",ch="和护许户核湖互乎呼胡戏忽虎沪糊壶葫狐蝴弧瑚浒鹄琥扈唬滹惚祜囫斛笏芴醐猢怙唿戽槲觳煳鹕冱瓠虍岵鹱烀轷",lh="夹咖嘎尬噶旮伽尕钆尜",fh="个合各革格歌哥盖隔割阁戈葛鸽搁胳舸疙铬骼蛤咯圪镉颌仡硌嗝鬲膈纥袼搿塥哿虼",hh="哈蛤铪",dh="下夏峡厦辖霞夹虾狭吓侠暇遐瞎匣瑕唬呷黠硖罅狎瘕柙",vh="改该盖概溉钙丐芥赅垓陔戤",ph="海还害孩亥咳骸骇氦嗨胲醢",yh="干感赶敢甘肝杆赣乾柑尴竿秆橄矸淦苷擀酐绀泔坩旰疳澉",mh="港钢刚岗纲冈杠缸扛肛罡戆筻",gh="将强江港奖讲降疆蒋姜浆匠酱僵桨绛缰犟豇礓洚茳糨耩",bh="行航杭巷夯吭桁沆绗颃",_h="工公共供功红贡攻宫巩龚恭拱躬弓汞蚣珙觥肱廾",wh="红宏洪轰虹鸿弘哄烘泓訇蕻闳讧荭黉薨",xh="广光逛潢犷胱咣桄",kh="穷琼穹邛茕筇跫蛩銎",Eh="高告搞稿膏糕镐皋羔锆杲郜睾诰藁篙缟槁槔",Sh="好号毫豪耗浩郝皓昊皋蒿壕灏嚎濠蚝貉颢嗥薅嚆",Ph="理力利立里李历例离励礼丽黎璃厉厘粒莉梨隶栗荔沥犁漓哩狸藜罹篱鲤砺吏澧俐骊溧砾莅锂笠蠡蛎痢雳俪傈醴栎郦俚枥喱逦娌鹂戾砬唳坜疠蜊黧猁鬲粝蓠呖跞疬缡鲡鳢嫠詈悝苈篥轹",Ch="家加价假佳架甲嘉贾驾嫁夹稼钾挟拮迦伽颊浃枷戛荚痂颉镓笳珈岬胛袈郏葭袷瘕铗跏蛱恝哿",Oh="落罗络洛逻螺锣骆萝裸漯烙摞骡咯箩珞捋荦硌雒椤镙跞瘰泺脶猡倮蠃",jh="可科克客刻课颗渴壳柯棵呵坷恪苛咳磕珂稞瞌溘轲窠嗑疴蝌岢铪颏髁蚵缂氪骒钶锞",Th="卡恰洽掐髂袷咭葜",Ah="给",Rh="根跟亘艮哏茛",Dh="很狠恨痕哏",Ih="构购够句沟狗钩拘勾苟垢枸篝佝媾诟岣彀缑笱鞲觏遘",Nh="口扣寇叩抠佝蔻芤眍筘",zh="股古顾故固鼓骨估谷贾姑孤雇辜菇沽咕呱锢钴箍汩梏痼崮轱鸪牯蛊诂毂鹘菰罟嘏臌觚瞽蛄酤牿鲴",Mh="牌排派拍迫徘湃俳哌蒎",Kh="括挂瓜刮寡卦呱褂剐胍诖鸹栝呙",Lh="投头透偷愉骰亠",Bh="怪拐乖",Fh="会快块筷脍蒯侩浍郐蒉狯哙",Uh="关管观馆官贯冠惯灌罐莞纶棺斡矜倌鹳鳏盥掼涫",qh="万完晚湾玩碗顽挽弯蔓丸莞皖宛婉腕蜿惋烷琬畹豌剜纨绾脘菀芄箢",Vh="呢哪呐讷疒",Hh="规贵归轨桂柜圭鬼硅瑰跪龟匮闺诡癸鳜桧皈鲑刽晷傀眭妫炅庋簋刿宄匦",Yh="军均俊君峻菌竣钧骏龟浚隽郡筠皲麇捃",Gh="窘炯迥炅冂扃",Wh="决绝角觉掘崛诀獗抉爵嚼倔厥蕨攫珏矍蹶谲镢鳜噱桷噘撅橛孓觖劂爝",Xh="滚棍辊衮磙鲧绲丨",Zh="婚混魂浑昏棍珲荤馄诨溷阍",Qh="国过果郭锅裹帼涡椁囗蝈虢聒埚掴猓崞蜾呙馘",Jh="黑嘿嗨",$h="看刊勘堪坎砍侃嵌槛瞰阚龛戡凵莰",ed="衡横恒亨哼珩桁蘅",nd="万没么模末冒莫摩墨默磨摸漠脉膜魔沫陌抹寞蘑摹蓦馍茉嘿谟秣蟆貉嫫镆殁耱嬷麽瘼貊貘",td="鹏朋彭膨蓬碰苹棚捧亨烹篷澎抨硼怦砰嘭蟛堋",rd="后候厚侯猴喉吼逅篌糇骺後鲎瘊堠",ad="化华划话花画滑哗豁骅桦猾铧砉",id="怀坏淮徊槐踝",od="还环换欢患缓唤焕幻痪桓寰涣宦垸洹浣豢奂郇圜獾鲩鬟萑逭漶锾缳擐",sd="讯训迅孙寻询循旬巡汛勋逊熏徇浚殉驯鲟薰荀浔洵峋埙巽郇醺恂荨窨蕈曛獯",ud="黄荒煌皇凰慌晃潢谎惶簧璜恍幌湟蝗磺隍徨遑肓篁鳇蟥癀",cd="能乃奶耐奈鼐萘氖柰佴艿",ld="乱卵滦峦鸾栾銮挛孪脔娈",fd="切且契窃茄砌锲怯伽惬妾趄挈郄箧慊",hd="建间件见坚检健监减简艰践兼鉴键渐柬剑尖肩舰荐箭浅剪俭碱茧奸歼拣捡煎贱溅槛涧堑笺谏饯锏缄睑謇蹇腱菅翦戬毽笕犍硷鞯牮枧湔鲣囝裥踺搛缣鹣蒹谫僭戋趼楗",dd="南难男楠喃囡赧腩囝蝻",vd="前千钱签潜迁欠纤牵浅遣谦乾铅歉黔谴嵌倩钳茜虔堑钎骞阡掮钤扦芊犍荨仟芡悭缱佥愆褰凵肷岍搴箝慊椠",pd="强抢疆墙枪腔锵呛羌蔷襁羟跄樯戕嫱戗炝镪锖蜣",yd="向项相想乡象响香降像享箱羊祥湘详橡巷翔襄厢镶飨饷缃骧芗庠鲞葙蟓",md="教交较校角觉叫脚缴胶轿郊焦骄浇椒礁佼蕉娇矫搅绞酵剿嚼饺窖跤蛟侥狡姣皎茭峤铰醮鲛湫徼鹪僬噍艽挢敫",gd="着著缴桌卓捉琢灼浊酌拙茁涿镯淖啄濯焯倬擢斫棹诼浞禚",bd="桥乔侨巧悄敲俏壳雀瞧翘窍峭锹撬荞跷樵憔鞘橇峤诮谯愀鞒硗劁缲",_d="小效销消校晓笑肖削孝萧俏潇硝宵啸嚣霄淆哮筱逍姣箫骁枭哓绡蛸崤枵魈",wd="司四思斯食私死似丝饲寺肆撕泗伺嗣祀厮驷嘶锶俟巳蛳咝耜笥纟糸鸶缌澌姒汜厶兕",xd="开凯慨岂楷恺揩锴铠忾垲剀锎蒈",kd="进金今近仅紧尽津斤禁锦劲晋谨筋巾浸襟靳瑾烬缙钅矜觐堇馑荩噤廑妗槿赆衿卺",Ed="亲勤侵秦钦琴禽芹沁寝擒覃噙矜嗪揿溱芩衾廑锓吣檎螓",Sd="经京精境竞景警竟井惊径静劲敬净镜睛晶颈荆兢靖泾憬鲸茎腈菁胫阱旌粳靓痉箐儆迳婧肼刭弪獍",Pd="应营影英景迎映硬盈赢颖婴鹰荧莹樱瑛蝇萦莺颍膺缨瀛楹罂荥萤鹦滢蓥郢茔嘤璎嬴瘿媵撄潆",Cd="就究九酒久救旧纠舅灸疚揪咎韭玖臼柩赳鸠鹫厩啾阄桕僦鬏",Od="最罪嘴醉咀蕞觜",jd="卷捐圈眷娟倦绢隽镌涓鹃鄄蠲狷锩桊",Td="算酸蒜狻",Ad="员运云允孕蕴韵酝耘晕匀芸陨纭郧筠恽韫郓氲殒愠昀菀狁",Rd="群裙逡麇",Dd="卡喀咖咔咯佧胩",Id="康抗扛慷炕亢糠伉钪闶",Nd="坑铿吭",zd="考靠烤拷铐栲尻犒",Md="肯垦恳啃龈裉",Kd="因引银印音饮阴隐姻殷淫尹荫吟瘾寅茵圻垠鄞湮蚓氤胤龈窨喑铟洇狺夤廴吲霪茚堙",Ld="空控孔恐倥崆箜",Bd="苦库哭酷裤枯窟挎骷堀绔刳喾",Fd="跨夸垮挎胯侉",Ud="亏奎愧魁馈溃匮葵窥盔逵睽馗聩喟夔篑岿喹揆隗傀暌跬蒉愦悝蝰",qd="款宽髋",Vd="况矿框狂旷眶匡筐邝圹哐贶夼诳诓纩",Hd="确却缺雀鹊阙瘸榷炔阕悫",Yd="困昆坤捆琨锟鲲醌髡悃阃",Gd="扩括阔廓蛞",Wd="拉落垃腊啦辣蜡喇剌旯砬邋瘌",Xd="来莱赖睐徕籁涞赉濑癞崃疠铼",Zd="兰览蓝篮栏岚烂滥缆揽澜拦懒榄斓婪阑褴罱啉谰镧漤",Qd="林临邻赁琳磷淋麟霖鳞凛拎遴蔺吝粼嶙躏廪檩啉辚膦瞵懔",Jd="浪朗郎廊狼琅榔螂阆锒莨啷蒗稂",$d="量两粮良辆亮梁凉谅粱晾靓踉莨椋魉墚",ev="老劳落络牢捞涝烙姥佬崂唠酪潦痨醪铑铹栳耢",nv="目模木亩幕母牧莫穆姆墓慕牟牡募睦缪沐暮拇姥钼苜仫毪坶",tv="了乐勒肋叻鳓嘞仂泐",rv="类累雷勒泪蕾垒磊擂镭肋羸耒儡嫘缧酹嘞诔檑",av="随岁虽碎尿隧遂髓穗绥隋邃睢祟濉燧谇眭荽",iv="列烈劣裂猎冽咧趔洌鬣埒捩躐",ov="冷愣棱楞塄",sv="领令另零灵龄陵岭凌玲铃菱棱伶羚苓聆翎泠瓴囹绫呤棂蛉酃鲮柃",uv="俩",cv="了料疗辽廖聊寥缪僚燎缭撂撩嘹潦镣寮蓼獠钌尥鹩",lv="流刘六留柳瘤硫溜碌浏榴琉馏遛鎏骝绺镏旒熘鹨锍",fv="论轮伦仑纶沦抡囵",hv="率律旅绿虑履吕铝屡氯缕滤侣驴榈闾偻褛捋膂稆",dv="楼露漏陋娄搂篓喽镂偻瘘髅耧蝼嵝蒌",vv="贸毛矛冒貌茂茅帽猫髦锚懋袤牦卯铆耄峁瑁蟊茆蝥旄泖昴瞀",pv="龙隆弄垄笼拢聋陇胧珑窿茏咙砻垅泷栊癃",yv="农浓弄脓侬哝",mv="双爽霜孀泷",gv="术书数属树输束述署朱熟殊蔬舒疏鼠淑叔暑枢墅俞曙抒竖蜀薯梳戍恕孰沭赎庶漱塾倏澍纾姝菽黍腧秫毹殳疋摅",bv="率衰帅摔甩蟀",_v="略掠锊",wv="么马吗摩麻码妈玛嘛骂抹蚂唛蟆犸杩",xv="么麽",kv="买卖麦迈脉埋霾荬劢",Ev="满慢曼漫埋蔓瞒蛮鳗馒幔谩螨熳缦镘颟墁鞔",Sv="米密秘迷弥蜜谜觅靡泌眯麋猕谧咪糜宓汨醚嘧弭脒冖幂祢縻蘼芈糸敉",Pv="们门闷瞒汶扪焖懑鞔钔",Cv="忙盲茫芒氓莽蟒邙硭漭",Ov="蒙盟梦猛孟萌氓朦锰檬勐懵蟒蜢虻黾蠓艨甍艋瞢礞",jv="苗秒妙描庙瞄缪渺淼藐缈邈鹋杪眇喵",Tv="某谋牟缪眸哞鍪蛑侔厶",Av="缪谬",Rv="美没每煤梅媒枚妹眉魅霉昧媚玫酶镁湄寐莓袂楣糜嵋镅浼猸鹛",Dv="文问闻稳温纹吻蚊雯紊瘟汶韫刎璺玟阌",Iv="灭蔑篾乜咩蠛",Nv="明名命鸣铭冥茗溟酩瞑螟暝",zv="内南那纳拿哪娜钠呐捺衲镎肭",Mv="内那哪馁",Kv="难诺挪娜糯懦傩喏搦锘",Lv="若弱偌箬",Bv="囊馕囔曩攮",Fv="脑闹恼挠瑙淖孬垴铙桡呶硇猱蛲",Uv="你尼呢泥疑拟逆倪妮腻匿霓溺旎昵坭铌鲵伲怩睨猊",qv="嫩恁",Vv="能",Hv="您恁",Yv="鸟尿溺袅脲茑嬲",Gv="摄聂捏涅镍孽捻蘖啮蹑嗫臬镊颞乜陧",Wv="娘酿",Xv="宁凝拧泞柠咛狞佞聍甯",Zv="努怒奴弩驽帑孥胬",Qv="女钕衄恧",Jv="入如女乳儒辱汝茹褥孺濡蠕嚅缛溽铷洳薷襦颥蓐",$v="暖",ep="虐疟",np="热若惹喏",tp="区欧偶殴呕禺藕讴鸥瓯沤耦怄",rp="跑炮泡抛刨袍咆疱庖狍匏脬",ap="剖掊裒",ip="喷盆湓",op="瞥撇苤氕丿",sp="品贫聘频拼拚颦姘嫔榀牝",up="色塞瑟涩啬穑铯槭",cp="情青清请亲轻庆倾顷卿晴氢擎氰罄磬蜻箐鲭綮苘黥圊檠謦",lp="赞暂攒堑昝簪糌瓒錾趱拶",fp="少绍召烧稍邵哨韶捎勺梢鞘芍苕劭艄筲杓潲",hp="扫骚嫂梢缫搔瘙臊埽缲鳋",dp="沙厦杀纱砂啥莎刹杉傻煞鲨霎嗄痧裟挲铩唼歃",vp="县选宣券旋悬轩喧玄绚渲璇炫萱癣漩眩暄煊铉楦泫谖痃碹揎镟儇",pp="然染燃冉苒髯蚺",yp="让壤攘嚷瓤穰禳",mp="绕扰饶娆桡荛",gp="仍扔",bp="日",_p="肉柔揉糅鞣蹂",wp="软阮朊",xp="润闰",kp="萨洒撒飒卅仨脎",Ep="所些索缩锁莎梭琐嗦唆唢娑蓑羧挲桫嗍睃",Sp="思赛塞腮噻鳃",Pp="说水税谁睡氵",Cp="桑丧嗓搡颡磉",Op="森",jp="僧",Tp="筛晒",Ap="上商尚伤赏汤裳墒晌垧觞殇熵绱",Rp="行省星腥猩惺兴刑型形邢饧醒幸杏性姓陉荇荥擤悻硎",Dp="收手受首售授守寿瘦兽狩绶艏扌",Ip="说数硕烁朔铄妁槊蒴搠",Np="速素苏诉缩塑肃俗宿粟溯酥夙愫簌稣僳谡涑蔌嗉觫",zp="刷耍唰",Mp="栓拴涮闩",Kp="顺瞬舜吮",Lp="送松宋讼颂耸诵嵩淞怂悚崧凇忪竦菘",Bp="艘搜擞嗽嗖叟馊薮飕嗾溲锼螋瞍",Fp="损孙笋荪榫隼狲飧",Up="腾疼藤滕誊",qp="铁贴帖餮萜",Vp="土突图途徒涂吐屠兔秃凸荼钍菟堍酴",Hp="外歪崴",Yp="王望往网忘亡旺汪枉妄惘罔辋魍",Gp="翁嗡瓮蓊蕹",Wp="抓挝爪",Xp="样养央阳洋扬杨羊详氧仰秧痒漾疡泱殃恙鸯徉佯怏炀烊鞅蛘",Zp="雄兄熊胸凶匈汹芎",Qp="哟唷",Jp="用永拥勇涌泳庸俑踊佣咏雍甬镛臃邕蛹恿慵壅痈鳙墉饔喁",$p="杂扎咱砸咋匝咂拶",ey="在再灾载栽仔宰哉崽甾",ny="造早遭枣噪灶燥糟凿躁藻皂澡蚤唣",ty="贼",ry="怎谮",ay="增曾综赠憎锃甑罾缯",iy="这",oy="走邹奏揍诹驺陬楱鄹鲰",sy="转拽",uy="尊遵鳟樽撙",cy="嗲",ly="耨",fy={a:Ku,e:Lu,ai:Bu,ei:Fu,xi:Uu,yi:qu,an:Vu,han:Hu,ang:Yu,ao:Gu,wa:Wu,yu:Xu,niu:Zu,o:Qu,ba:Ju,pa:$u,pi:ec,bi:nc,bai:tc,bo:rc,bei:ac,ban:ic,pan:oc,bin:sc,bang:uc,pang:cc,beng:lc,bao:fc,bu:hc,pu:dc,mian:vc,po:pc,fan:yc,fu:mc,ben:gc,feng:bc,bian:_c,pian:wc,zhen:xc,biao:kc,piao:Ec,huo:Sc,bie:Pc,min:Cc,fen:Oc,bing:jc,geng:Tc,fang:Ac,xian:Rc,fou:Dc,ca:Ic,cha:Nc,cai:zc,can:Mc,shen:Kc,cen:Lc,san:Bc,cang:Fc,zang:Uc,chen:qc,cao:Vc,ce:Hc,ze:Yc,zhai:Gc,dao:Wc,ceng:Xc,zha:Zc,chai:Qc,ci:Jc,zi:$c,cuo:el,chan:nl,shan:tl,zhan:rl,xin:al,lian:il,chang:ol,zhang:sl,chao:ul,zhao:cl,zhou:ll,che:fl,ju:hl,cheng:dl,rong:vl,sheng:pl,deng:yl,zhi:ml,zheng:gl,tang:bl,chi:_l,shi:wl,qi:xl,chuai:kl,tuo:El,duo:Sl,xue:Pl,chong:Cl,chou:Ol,qiu:jl,xiu:Tl,chu:Al,tuan:Rl,zhui:Dl,chuan:Il,zhuan:Nl,yuan:zl,cuan:Ml,chuang:Kl,zhuang:Ll,chui:Bl,chun:Fl,zhun:Ul,cu:ql,dun:Vl,qu:Hl,xu:Yl,chuo:Gl,zu:Wl,ji:Xl,cong:Zl,zong:Ql,cou:Jl,cui:$l,wei:ef,cun:nf,zuo:tf,zuan:rf,da:af,dai:of,tai:sf,ta:uf,dan:cf,lu:lf,tan:ff,ren:hf,jie:df,yan:vf,dang:pf,tao:yf,tiao:mf,te:gf,de:bf,dei:_f,di:wf,ti:xf,tui:kf,you:Ef,dian:Sf,tian:Pf,zhu:Cf,nian:Of,diao:jf,yao:Tf,die:Af,she:Rf,ye:Df,xie:If,zhe:Nf,ding:zf,diu:Mf,ting:Kf,dong:Lf,tong:Bf,zhong:Ff,dou:Uf,du:qf,duan:Vf,dui:Hf,rui:Yf,yue:Gf,tun:Wf,hui:Xf,wu:Zf,ya:Qf,he:Jf,wo:$f,en:eh,n:nh,er:th,fa:rh,quan:ah,fei:ih,pei:oh,ping:sh,fo:uh,hu:ch,ga:lh,ge:fh,ha:hh,xia:dh,gai:vh,hai:ph,gan:yh,gang:mh,jiang:gh,hang:bh,gong:_h,hong:wh,guang:xh,qiong:kh,gao:Eh,hao:Sh,li:Ph,jia:Ch,luo:Oh,ke:jh,qia:Th,gei:Ah,gen:Rh,hen:Dh,gou:Ih,kou:Nh,gu:zh,pai:Mh,gua:Kh,tou:Lh,guai:Bh,kuai:Fh,guan:Uh,wan:qh,ne:Vh,gui:Hh,jun:Yh,jiong:Gh,jue:Wh,gun:Xh,hun:Zh,guo:Qh,hei:Jh,kan:$h,heng:ed,mo:nd,peng:td,hou:rd,hua:ad,huai:id,huan:od,xun:sd,huang:ud,nai:cd,luan:ld,qie:fd,jian:hd,nan:dd,qian:vd,qiang:pd,xiang:yd,jiao:md,zhuo:gd,qiao:bd,xiao:_d,si:wd,kai:xd,jin:kd,qin:Ed,jing:Sd,ying:Pd,jiu:Cd,zui:Od,juan:jd,suan:Td,yun:Ad,qun:Rd,ka:Dd,kang:Id,keng:Nd,kao:zd,ken:Md,yin:Kd,kong:Ld,ku:Bd,kua:Fd,kui:Ud,kuan:qd,kuang:Vd,que:Hd,kun:Yd,kuo:Gd,la:Wd,lai:Xd,lan:Zd,lin:Qd,lang:Jd,liang:$d,lao:ev,mu:nv,le:tv,lei:rv,sui:av,lie:iv,leng:ov,ling:sv,lia:uv,liao:cv,liu:lv,lun:fv,lv:hv,lou:dv,mao:vv,long:pv,nong:yv,shuang:mv,shu:gv,shuai:bv,lve:_v,ma:wv,me:xv,mai:kv,man:Ev,mi:Sv,men:Pv,mang:Cv,meng:Ov,miao:jv,mou:Tv,miu:Av,mei:Rv,wen:Dv,mie:Iv,ming:Nv,na:zv,nei:Mv,nuo:Kv,ruo:Lv,nang:Bv,nao:Fv,ni:Uv,nen:qv,neng:Vv,nin:Hv,niao:Yv,nie:Gv,niang:Wv,ning:Xv,nu:Zv,nv:Qv,ru:Jv,nuan:$v,nve:ep,re:np,ou:tp,pao:rp,pou:ap,pen:ip,pie:op,pin:sp,se:up,qing:cp,zan:lp,shao:fp,sao:hp,sha:dp,xuan:vp,ran:pp,rang:yp,rao:mp,reng:gp,ri:bp,rou:_p,ruan:wp,run:xp,sa:kp,suo:Ep,sai:Sp,shui:Pp,sang:Cp,sen:Op,seng:jp,shai:Tp,shang:Ap,xing:Rp,shou:Dp,shuo:Ip,su:Np,shua:zp,shuan:Mp,shun:Kp,song:Lp,sou:Bp,sun:Fp,teng:Up,tie:qp,tu:Vp,wai:Hp,wang:Yp,weng:Gp,zhua:Wp,yang:Xp,xiong:Zp,yo:Qp,yong:Jp,za:$p,zai:ey,zao:ny,zei:ty,zen:ry,zeng:ay,zhei:iy,zou:oy,zhuai:sy,zun:uy,dia:cy,nou:ly};const hy=5;var dy=class{constructor(){Oe(this,"currentInput","");Oe(this,"candidates",[]);Oe(this,"db");Oe(this,"pinyinDict",fy);Oe(this,"pinyinCharTable");Oe(this,"initializationPromise");this.db=new pt("PinyinCharDB"),this.db.version(1).stores({pinyinCharEntries:"++id, &[pinyin+char], pinyin, char, weight"}),this.pinyinCharTable=this.db.table("pinyinCharEntries"),this.initializationPromise=this.initializeDatabase()}async initializeDatabase(){try{if(await this.pinyinCharTable.count()===0){const s=[];for(const[l,f]of Object.entries(this.pinyinDict))for(const E of f.split(""))s.push({pinyin:l,char:E,weight:1});await this.pinyinCharTable.bulkAdd(s)}}catch(a){throw console.error("初始化 PinyinCharDB 失败:",a),a}}async processInput(a){if(await this.initializationPromise,this.currentInput=a.toLowerCase(),this.candidates=[],!this.currentInput)return[];const s=await this.pinyinCharTable.where("pinyin").startsWith(this.currentInput).toArray(),l=(f,E)=>{const w=f.pinyin===E,_=f.weight>1;return w&&_?1:!w&&_?2:w&&!_?3:!w&&!_?4:5};return s.sort((f,E)=>{const w=l(f,this.currentInput),_=l(E,this.currentInput);return w!==_?w-_:E.weight!==f.weight?E.weight-f.weight:f.id-E.id}),this.candidates=s.map(f=>f.char),this.candidates=[...new Set(this.candidates)],this.candidates}async selectCandidate(a){var f,E,w;if(await this.initializationPromise,!this.currentInput)return;let s=this.currentInput;for(const _ of Object.keys(this.pinyinDict))if(_.startsWith(this.currentInput)&&this.pinyinDict[_].includes(a))if(_.length>s.length||_===this.currentInput){if(s=_,(f=this.pinyinDict[this.currentInput])!=null&&f.includes(a)&&this.currentInput===_)break}else s===this.currentInput&&((E=this.pinyinDict[_])!=null&&E.includes(a))&&(s=_);if(!((w=this.pinyinDict[s])!=null&&w.includes(a))){for(const _ of Object.keys(this.pinyinDict))if(this.pinyinDict[_].includes(a)){if(_.startsWith(this.currentInput)){s=_;break}s===this.currentInput&&(s=_)}}const l=await this.pinyinCharTable.where({pinyin:s,char:a}).first();if(l&&l.id!==void 0){const _=Math.min((l.weight||0)+1,hy);await this.pinyinCharTable.update(l.id,{weight:_})}else this.pinyinDict[s]?await this.pinyinCharTable.add({pinyin:s,char:a,weight:1}):console.warn(`无法为 ${a} 添加条目,拼音 ${s} 不在字典中。`);this.clear()}clear(){this.currentInput="",this.candidates=[]}getCurrentInput(){return this.currentInput}getCandidates(){return this.candidates}},vy=class{constructor(a,s={}){Oe(this,"canvas");Oe(this,"ctx");Oe(this,"lastX",0);Oe(this,"lastY",0);Oe(this,"strokeData",[]);Oe(this,"clearTimerId",null);Oe(this,"isDrawing",!1);Oe(this,"options");Oe(this,"handleStart",a=>{a.preventDefault(),this.isDrawing=!0;const{offsetX:s,offsetY:l}=this.getEventCoordinates(a);this.startDrawing(s,l),this.resetClearTimer()});Oe(this,"handleMove",a=>{if(!this.isDrawing)return;a.preventDefault();const{offsetX:s,offsetY:l}=this.getEventCoordinates(a);this.draw(s,l),this.resetClearTimer()});Oe(this,"handleEnd",a=>{this.isDrawing&&(a.preventDefault(),this.isDrawing=!1,this.endStroke(),this.startClearTimer(),this.options.onDrawEnd&&this.options.onDrawEnd())});this.canvas=a,this.options={clearDelay:1e3,...s};const l=this.canvas.getContext("2d");if(!l)throw new Error("Failed to get 2D rendering context");this.ctx=l,this.setupCanvas(),this.attachEvents()}setupCanvas(){this.ctx.lineJoin="round",this.ctx.lineCap="round",this.ctx.lineWidth=3,this.ctx.strokeStyle="#000",this.clearCanvas(),this.drawGrid()}drawGrid(){const a=this.canvas.width,s=this.canvas.height;this.ctx.save(),this.ctx.strokeStyle="#ddd",this.ctx.lineWidth=1,this.ctx.setLineDash([3,3]),this.ctx.beginPath(),this.ctx.moveTo(0,s/2),this.ctx.lineTo(a,s/2),this.ctx.moveTo(a/2,0),this.ctx.lineTo(a/2,s),this.ctx.stroke(),this.ctx.setLineDash([]),this.ctx.beginPath(),this.ctx.rect(0,0,a,s),this.ctx.stroke(),this.ctx.restore()}clearCanvas(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.drawGrid(),this.strokeData=[],this.resetClearTimer()}startDrawing(a,s){this.lastX=a,this.lastY=s,this.ctx.strokeStyle="#000",this.ctx.lineWidth=3,this.ctx.setLineDash([]),this.strokeData.push(a,s,0)}draw(a,s){this.ctx.beginPath(),this.ctx.moveTo(this.lastX,this.lastY),this.ctx.lineTo(a,s),this.ctx.stroke(),this.lastX=a,this.lastY=s,this.strokeData.push(a,s,0)}endStroke(){this.strokeData.length>=3&&(this.strokeData[this.strokeData.length-1]=1)}getStrokeData(){return this.strokeData}resetClearTimer(){this.clearTimerId&&(window.clearTimeout(this.clearTimerId),this.clearTimerId=null)}startClearTimer(){this.resetClearTimer(),this.clearTimerId=window.setTimeout(()=>{this.clearCanvas(),this.clearTimerId=null},this.options.clearDelay)}getEventCoordinates(a){if(a instanceof MouseEvent)return{offsetX:a.offsetX,offsetY:a.offsetY};{const s=a.touches[0]||a.changedTouches[0],l=a.target.getBoundingClientRect();return{offsetX:s.clientX-l.left,offsetY:s.clientY-l.top}}}attachEvents(){this.canvas.addEventListener("mousedown",this.handleStart),this.canvas.addEventListener("mousemove",this.handleMove),this.canvas.addEventListener("mouseup",this.handleEnd),this.canvas.addEventListener("mouseleave",this.handleEnd),this.canvas.addEventListener("touchstart",this.handleStart,{passive:!1}),this.canvas.addEventListener("touchmove",this.handleMove,{passive:!1}),this.canvas.addEventListener("touchend",this.handleEnd),this.canvas.addEventListener("touchcancel",this.handleEnd)}detachEvents(){this.canvas.removeEventListener("mousedown",this.handleStart),this.canvas.removeEventListener("mousemove",this.handleMove),this.canvas.removeEventListener("mouseup",this.handleEnd),this.canvas.removeEventListener("mouseleave",this.handleEnd),this.canvas.removeEventListener("touchstart",this.handleStart),this.canvas.removeEventListener("touchmove",this.handleMove),this.canvas.removeEventListener("touchend",this.handleEnd),this.canvas.removeEventListener("touchcancel",this.handleEnd)}destroy(){this.detachEvents(),this.resetClearTimer()}getCanvas(){return this.canvas}getContext(){return this.ctx}};function py(a,s,l){if(!a||!s||l==="static")return null;let f,E;if(l==="bottom")f=window.innerHeight-s.offsetHeight,E=0;else{const w=a.getBoundingClientRect(),_=s.offsetWidth;f=w.bottom+window.scrollY,E=w.left+window.scrollX+w.width/2-_/2;const C=window.innerWidth;E+_>C&&(E=C-_-10),E<10&&(E=10)}return{top:`${f}px`,left:`${E}px`}}function Un(a){if(!a)return!1;if(a.tagName==="TEXTAREA")return!0;if(a.tagName==="INPUT"){const l=(a.type||"text").toLowerCase();return!["checkbox","radio","button","submit","reset","file","image","range","color","hidden","date","datetime-local","month","week","time"].includes(l)}return!1}function yy(a,s,l){a.value=s,_y(a,l),a.dispatchEvent(new Event("input",{bubbles:!0}))}function my(a,s,l,f=""){return a.slice(0,s)+f+a.slice(s+l)}function Fa(a,s=""){const l=Number(a.getAttribute("maxlength"));let f=a.selectionStart??0;const E=a.selectionEnd??f;let w;if(s.length>0)w=E-f;else{const j=E-f;if(j>0)w=j;else if(f>0)w=1,f--;else return}if(s.length>0&&l&&a.value.length-w+s.length>l)return;const _=my(a.value,f,w,s),C=f+s.length;yy(a,_,C)}function gy(a,s){Fa(a,s)}function by(a){Fa(a)}function _y(a,s){a.selectionStart=s,a.selectionEnd=s}function yt(a={}){const s=a.delay??400,l=a.interval??60;let f,E;function w(){f&&(clearTimeout(f),f=void 0),E&&(clearInterval(E),E=void 0)}function _(C){w(),C(),f=setTimeout(()=>{E=setInterval(()=>{C()},l)},s)}return{start:_,stop:w}}var sr={exports:{}};/*!
50
+ */var Wa;function Du(){return Wa||(Wa=1,process.env.NODE_ENV!=="production"&&function(){function a(F,D){return F===D&&(F!==0||1/F===1/D)||F!==F&&D!==D}function s(F,D){G||C.startTransition===void 0||(G=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var ee=D();if(!q){var ne=D();k(ee,ne)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),q=!0)}ne=w({inst:{value:ee,getSnapshot:D}});var $=ne[0].inst,Y=ne[1];return j(function(){$.value=ee,$.getSnapshot=D,l($)&&Y({inst:$})},[F,ee,D]),O(function(){return l($)&&Y({inst:$}),F(function(){l($)&&Y({inst:$})})},[F]),M(ee),ee}function l(F){var D=F.getSnapshot;F=F.value;try{var ee=D();return!k(F,ee)}catch{return!0}}function f(F,D){return D()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var C=U,k=typeof Object.is=="function"?Object.is:a,w=C.useState,O=C.useEffect,j=C.useLayoutEffect,M=C.useDebugValue,G=!1,q=!1,J=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:s;Sr.useSyncExternalStore=C.useSyncExternalStore!==void 0?C.useSyncExternalStore:J,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Sr}var Ya;function Iu(){return Ya||(Ya=1,process.env.NODE_ENV==="production"?Kt.exports=Au():Kt.exports=Du()),Kt.exports}Iu();var Ga,Xa;function Ja(a){return typeof a=="function"}const Nu=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test",Pr=typeof window<"u",Ku=typeof navigator<"u";Pr&&(!((Xa=window)==null||(Ga=Xa.navigator)==null)&&Ga.userAgent)&&/iP(?:ad|hone|od)/.test(window.navigator.userAgent);const Za=Pr?U.useLayoutEffect:U.useEffect,Qa=a=>{const s=U.useRef(a);return Za(()=>{s.current=a},[a]),s};function Mu(a,...s){a&&a.addEventListener&&a.addEventListener(...s)}function zu(a,...s){a&&a.removeEventListener&&a.removeEventListener(...s)}const Cr=typeof window<"u"?window:void 0,Or={};function $a(a,s){if(!Pr)return;if(!a)return s;let l;return Ja(a)?l=a():"current"in a?l=a.current:l=a,l}const Lu=a=>(a+1)%1e6;function Fu(){const[,a]=U.useReducer(Lu,0);return a}const Bu=(a,s,l)=>{process.env.NODE_ENV!=="production"&&((!Array.isArray(s)||!s.length)&&console.warn("`useCustomCompareEffect` should not be used with no dependencies. Use React.useEffect instead."),typeof l!="function"&&console.warn("`useCustomCompareEffect` should be used with depsEqual callback for comparing deps list"));const f=U.useRef(void 0),C=Fu();f.current||(f.current=s),Za(()=>{l(s,f.current)||(f.current=s,C())}),U.useEffect(a,f.current)},ei=(a,s)=>{process.env.NODE_ENV!=="production"&&(!Array.isArray(s)||!s.length)&&console.warn("`useDeepCompareEffect` should not be used with no dependencies. Use React.useEffect instead."),Bu(a,s,ju)};function Mt(a,s,l,f=Or){const C=Qa(s);ei(()=>{const k=$a(l,Cr);if(!(k&&k.addEventListener))return;const w=O=>C.current(O);return Mu(k,a,w,f),()=>{k&&k.removeEventListener&&zu(k,a,w)}},[a,l,f])}const Uu=a=>{Nu&&(Ja(a)||console.error(`useMount: parameter \`fn\` expected to be a function, but got "${typeof a}".`)),U.useEffect(()=>{a==null||a()},[])},qu=()=>{const[a,s]=U.useState(null),l=U.useCallback(()=>{var f;s((f=window)==null?void 0:f.document.activeElement)},[]);return Mt("blur",l,Cr,!0),Mt("focus",l,Cr,!0),Uu(()=>{var f;s((f=window)==null?void 0:f.document.activeElement)}),a},Vu=(a,s,l=Or)=>{const f=Qa(s),C=U.useRef(),k=U.useCallback(()=>{C.current&&C.current.disconnect()},[]);return ei(()=>{const w=$a(a);if(w)return C.current=new ResizeObserver(f.current),C.current.observe(w,l),k},[f,k,a,l]),k},ni=(a,s=Or)=>{const{box:l="content-box"}=s,[f,C]=U.useState(0),[k,w]=U.useState(0);return Vu(a,([O])=>{const j=l==="border-box"?O.borderBoxSize:l==="content-box"?O.contentBoxSize:O.devicePixelContentBoxSize;j?(C(j.reduce((M,{inlineSize:G})=>M+G,0)),w(j.reduce((M,{blockSize:G})=>M+G,0))):(C(O.contentRect.width),w(O.contentRect.height))},s),[f,k]},zt=Ku?navigator:void 0;zt&&(zt.connection||zt.mozConnection||zt.webkitConnection),U.use;var Lt={exports:{}},Hu=Lt.exports,ti;function Wu(){return ti||(ti=1,function(a,s){(function(l,f){a.exports=f()})(Hu,function(){var l=function(e,n){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])})(e,n)},f=function(){return(f=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)};function C(e,n,t){for(var r,i=0,o=n.length;i<o;i++)!r&&i in n||((r=r||Array.prototype.slice.call(n,0,i))[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))}var k=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Mi,w=Object.keys,O=Array.isArray;function j(e,n){return typeof n!="object"||w(n).forEach(function(t){e[t]=n[t]}),e}typeof Promise>"u"||k.Promise||(k.Promise=Promise);var M=Object.getPrototypeOf,G={}.hasOwnProperty;function q(e,n){return G.call(e,n)}function J(e,n){typeof n=="function"&&(n=n(M(e))),(typeof Reflect>"u"?w:Reflect.ownKeys)(n).forEach(function(t){D(e,t,n[t])})}var F=Object.defineProperty;function D(e,n,t,r){F(e,n,j(t&&q(t,"get")&&typeof t.get=="function"?{get:t.get,set:t.set,configurable:!0}:{value:t,configurable:!0,writable:!0},r))}function ee(e){return{from:function(n){return e.prototype=Object.create(n.prototype),D(e.prototype,"constructor",e),{extend:J.bind(null,e.prototype)}}}}var ne=Object.getOwnPropertyDescriptor,$=[].slice;function Y(e,n,t){return $.call(e,n,t)}function Re(e,n){return n(e)}function be(e){if(!e)throw new Error("Assertion Failed")}function ae(e){k.setImmediate?setImmediate(e):setTimeout(e,0)}function de(e,n){if(typeof n=="string"&&q(e,n))return e[n];if(!n)return e;if(typeof n!="string"){for(var t=[],r=0,i=n.length;r<i;++r){var o=de(e,n[r]);t.push(o)}return t}var u=n.indexOf(".");if(u!==-1){var c=e[n.substr(0,u)];return c==null?void 0:de(c,n.substr(u+1))}}function te(e,n,t){if(e&&n!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e)))if(typeof n!="string"&&"length"in n){be(typeof t!="string"&&"length"in t);for(var r=0,i=n.length;r<i;++r)te(e,n[r],t[r])}else{var o,u,c=n.indexOf(".");c!==-1?(o=n.substr(0,c),(u=n.substr(c+1))===""?t===void 0?O(e)&&!isNaN(parseInt(o))?e.splice(o,1):delete e[o]:e[o]=t:te(c=!(c=e[o])||!q(e,o)?e[o]={}:c,u,t)):t===void 0?O(e)&&!isNaN(parseInt(n))?e.splice(n,1):delete e[n]:e[n]=t}}function Ce(e){var n,t={};for(n in e)q(e,n)&&(t[n]=e[n]);return t}var le=[].concat;function je(e){return le.apply([],e)}var Qe="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(je([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(n){return n+e+"Array"})}))).filter(function(e){return k[e]}),Ae=new Set(Qe.map(function(e){return k[e]})),ye=null;function De(e){return ye=new WeakMap,e=function n(t){if(!t||typeof t!="object")return t;var r=ye.get(t);if(r)return r;if(O(t)){r=[],ye.set(t,r);for(var i=0,o=t.length;i<o;++i)r.push(n(t[i]))}else if(Ae.has(t.constructor))r=t;else{var u,c=M(t);for(u in r=c===Object.prototype?{}:Object.create(c),ye.set(t,r),t)q(t,u)&&(r[u]=n(t[u]))}return r}(e),ye=null,e}var on={}.toString;function sn(e){return on.call(e).slice(8,-1)}var Bn=typeof Symbol<"u"?Symbol.iterator:"@@iterator",qt=typeof Bn=="symbol"?function(e){var n;return e!=null&&(n=e[Bn])&&n.apply(e)}:function(){return null};function Je(e,n){return n=e.indexOf(n),0<=n&&e.splice(n,1),0<=n}var un={};function He(e){var n,t,r,i;if(arguments.length===1){if(O(e))return e.slice();if(this===un&&typeof e=="string")return[e];if(i=qt(e)){for(t=[];!(r=i.next()).done;)t.push(r.value);return t}if(e==null)return[e];if(typeof(n=e.length)!="number")return[e];for(t=new Array(n);n--;)t[n]=e[n];return t}for(n=arguments.length,t=new Array(n);n--;)t[n]=arguments[n];return t}var Un=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},pn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Ge=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(pn),Vt={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 cn(e,n){this.name=e,this.message=n}function Ht(e,n){return e+". Errors: "+Object.keys(n).map(function(t){return n[t].toString()}).filter(function(t,r,i){return i.indexOf(t)===r}).join(`
51
+ `)}function qn(e,n,t,r){this.failures=n,this.failedKeys=r,this.successCount=t,this.message=Ht(e,n)}function Ze(e,n){this.name="BulkError",this.failures=Object.keys(n).map(function(t){return n[t]}),this.failuresByPos=n,this.message=Ht(e,this.failures)}ee(cn).from(Error).extend({toString:function(){return this.name+": "+this.message}}),ee(qn).from(cn),ee(Ze).from(cn);var Sn=Ge.reduce(function(e,n){return e[n]=n+"Error",e},{}),Vn=cn,Z=Ge.reduce(function(e,n){var t=n+"Error";function r(i,o){this.name=t,i?typeof i=="string"?(this.message="".concat(i).concat(o?`
52
+ `+o:""),this.inner=o||null):typeof i=="object"&&(this.message="".concat(i.name," ").concat(i.message),this.inner=i):(this.message=Vt[n]||t,this.inner=null)}return ee(r).from(Vn),e[n]=r,e},{});Z.Syntax=SyntaxError,Z.Type=TypeError,Z.Range=RangeError;var Pn=pn.reduce(function(e,n){return e[n+"Error"]=Z[n],e},{}),Hn=Ge.reduce(function(e,n){return["Syntax","Type","Range"].indexOf(n)===-1&&(e[n+"Error"]=Z[n]),e},{});function me(){}function Cn(e){return e}function Dr(e,n){return e==null||e===Cn?n:function(t){return n(e(t))}}function We(e,n){return function(){e.apply(this,arguments),n.apply(this,arguments)}}function On(e,n){return e===me?n:function(){var t=e.apply(this,arguments);t!==void 0&&(arguments[0]=t);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=n.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?We(r,this.onsuccess):r),i&&(this.onerror=this.onerror?We(i,this.onerror):i),o!==void 0?o:t}}function Wt(e,n){return e===me?n:function(){e.apply(this,arguments);var t=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,n.apply(this,arguments),t&&(this.onsuccess=this.onsuccess?We(t,this.onsuccess):t),r&&(this.onerror=this.onerror?We(r,this.onerror):r)}}function Yt(e,n){return e===me?n:function(t){var r=e.apply(this,arguments);j(t,r);var i=this.onsuccess,o=this.onerror;return this.onsuccess=null,this.onerror=null,t=n.apply(this,arguments),i&&(this.onsuccess=this.onsuccess?We(i,this.onsuccess):i),o&&(this.onerror=this.onerror?We(o,this.onerror):o),r===void 0?t===void 0?void 0:t:j(r,t)}}function Wn(e,n){return e===me?n:function(){return n.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function yt(e,n){return e===me?n:function(){var t=e.apply(this,arguments);if(t&&typeof t.then=="function"){for(var r=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return t.then(function(){return n.apply(r,o)})}return n.apply(this,arguments)}}Hn.ModifyError=qn,Hn.DexieError=cn,Hn.BulkError=Ze;var Ye=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Yn(e){Ye=e}var jn={},Gt=100,Qe=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,M(e),e];var n=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[n,M(n),e]}(),pn=Qe[0],Ge=Qe[1],Qe=Qe[2],Ge=Ge&&Ge.then,$e=pn&&pn.constructor,mt=!!Qe,yn=function(e,n){Tn.push([e,n]),Xn&&(queueMicrotask(Jt),Xn=!1)},Gn=!0,Xn=!0,ln=[],Jn=[],gt=Cn,en={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:me,pgp:!1,env:{},finalize:me},X=en,Tn=[],Xe=0,Rn=[];function B(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var n=this._PSD=X;if(typeof e!="function"){if(e!==jn)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Qn(this,this._value))}this._state=null,this._value=null,++n.ref,function t(r,i){try{i(function(o){if(r._state===null){if(o===r)throw new TypeError("A promise cannot be resolved with itself.");var u=r._lib&&fn();o&&typeof o.then=="function"?t(r,function(c,v){o instanceof B?o._then(c,v):o.then(c,v)}):(r._state=!0,r._value=o,Xt(r)),u&&mn()}},Qn.bind(null,r))}catch(o){Qn(r,o)}}(this,e)}var An={get:function(){var e=X,n=d;function t(r,i){var o=this,u=!e.global&&(e!==X||n!==d),c=u&&!se(),v=new B(function(y,b){$n(o,new Zn(Pe(r,e,u,c),Pe(i,e,u,c),y,b,e))});return this._consoleTask&&(v._consoleTask=this._consoleTask),v}return t.prototype=jn,t},set:function(e){D(this,"then",e&&e.prototype===jn?An:{get:function(){return e},set:An.set})}};function Zn(e,n,t,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof n=="function"?n:null,this.resolve=t,this.reject=r,this.psd=i}function Qn(e,n){var t,r;Jn.push(n),e._state===null&&(t=e._lib&&fn(),n=gt(n),e._state=!1,e._value=n,r=e,ln.some(function(i){return i._value===r._value})||ln.push(r),Xt(e),t&&mn())}function Xt(e){var n=e._listeners;e._listeners=[];for(var t=0,r=n.length;t<r;++t)$n(e,n[t]);var i=e._PSD;--i.ref||i.finalize(),Xe===0&&(++Xe,yn(function(){--Xe==0&&bt()},[]))}function $n(e,n){if(e._state!==null){var t=e._state?n.onFulfilled:n.onRejected;if(t===null)return(e._state?n.resolve:n.reject)(e._value);++n.psd.ref,++Xe,yn(Ir,[t,e,n])}else e._listeners.push(n)}function Ir(e,n,t){try{var r,i=n._value;!n._state&&Jn.length&&(Jn=[]),r=Ye&&n._consoleTask?n._consoleTask.run(function(){return e(i)}):e(i),n._state||Jn.indexOf(i)!==-1||function(o){for(var u=ln.length;u;)if(ln[--u]._value===o._value)return ln.splice(u,1)}(n),t.resolve(r)}catch(o){t.reject(o)}finally{--Xe==0&&bt(),--t.psd.ref||t.psd.finalize()}}function Jt(){ge(en,function(){fn()&&mn()})}function fn(){var e=Gn;return Xn=Gn=!1,e}function mn(){var e,n,t;do for(;0<Tn.length;)for(e=Tn,Tn=[],t=e.length,n=0;n<t;++n){var r=e[n];r[0].apply(null,r[1])}while(0<Tn.length);Xn=Gn=!0}function bt(){var e=ln;ln=[],e.forEach(function(r){r._PSD.onunhandled.call(null,r._value,r)});for(var n=Rn.slice(0),t=n.length;t;)n[--t]()}function Dn(e){return new B(jn,!1,e)}function we(e,n){var t=X;return function(){var r=fn(),i=X;try{return re(t,!0),e.apply(this,arguments)}catch(o){n&&n(o)}finally{re(i,!1),r&&mn()}}}J(B.prototype,{then:An,_then:function(e,n){$n(this,new Zn(null,null,e,n,X))},catch:function(e){if(arguments.length===1)return this.then(null,e);var n=e,t=arguments[1];return typeof n=="function"?this.then(null,function(r){return(r instanceof n?t:Dn)(r)}):this.then(null,function(r){return(r&&r.name===n?t:Dn)(r)})},finally:function(e){return this.then(function(n){return B.resolve(e()).then(function(){return n})},function(n){return B.resolve(e()).then(function(){return Dn(n)})})},timeout:function(e,n){var t=this;return e<1/0?new B(function(r,i){var o=setTimeout(function(){return i(new Z.Timeout(n))},e);t.then(r,i).finally(clearTimeout.bind(null,o))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&D(B.prototype,Symbol.toStringTag,"Dexie.Promise"),en.env=Ie(),J(B,{all:function(){var e=He.apply(null,arguments).map(ve);return new B(function(n,t){e.length===0&&n([]);var r=e.length;e.forEach(function(i,o){return B.resolve(i).then(function(u){e[o]=u,--r||n(e)},t)})})},resolve:function(e){return e instanceof B?e:e&&typeof e.then=="function"?new B(function(n,t){e.then(n,t)}):new B(jn,!0,e)},reject:Dn,race:function(){var e=He.apply(null,arguments).map(ve);return new B(function(n,t){e.map(function(r){return B.resolve(r).then(n,t)})})},PSD:{get:function(){return X},set:function(e){return X=e}},totalEchoes:{get:function(){return d}},newPSD:V,usePSD:ge,scheduler:{get:function(){return yn},set:function(e){yn=e}},rejectionMapper:{get:function(){return gt},set:function(e){gt=e}},follow:function(e,n){return new B(function(t,r){return V(function(i,o){var u=X;u.unhandleds=[],u.onunhandled=o,u.finalize=We(function(){var c,v=this;c=function(){v.unhandleds.length===0?i():o(v.unhandleds[0])},Rn.push(function y(){c(),Rn.splice(Rn.indexOf(y),1)}),++Xe,yn(function(){--Xe==0&&bt()},[])},u.finalize),e()},n,t,r)})}}),$e&&($e.allSettled&&D(B,"allSettled",function(){var e=He.apply(null,arguments).map(ve);return new B(function(n){e.length===0&&n([]);var t=e.length,r=new Array(t);e.forEach(function(i,o){return B.resolve(i).then(function(u){return r[o]={status:"fulfilled",value:u}},function(u){return r[o]={status:"rejected",reason:u}}).then(function(){return--t||n(r)})})})}),$e.any&&typeof AggregateError<"u"&&D(B,"any",function(){var e=He.apply(null,arguments).map(ve);return new B(function(n,t){e.length===0&&t(new AggregateError([]));var r=e.length,i=new Array(r);e.forEach(function(o,u){return B.resolve(o).then(function(c){return n(c)},function(c){i[u]=c,--r||t(new AggregateError(i))})})})}),$e.withResolvers&&(B.withResolvers=$e.withResolvers));var Te={awaits:0,echoes:0,id:0},Nr=0,et=[],nt=0,d=0,R=0;function V(e,n,t,r){var i=X,o=Object.create(i);return o.parent=i,o.ref=0,o.global=!1,o.id=++R,en.env,o.env=mt?{Promise:B,PromiseProp:{value:B,configurable:!0,writable:!0},all:B.all,race:B.race,allSettled:B.allSettled,any:B.any,resolve:B.resolve,reject:B.reject}:{},n&&j(o,n),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()},r=ge(o,e,t,r),o.ref===0&&o.finalize(),r}function Q(){return Te.id||(Te.id=++Nr),++Te.awaits,Te.echoes+=Gt,Te.id}function se(){return!!Te.awaits&&(--Te.awaits==0&&(Te.id=0),Te.echoes=Te.awaits*Gt,!0)}function ve(e){return Te.echoes&&e&&e.constructor===$e?(Q(),e.then(function(n){return se(),n},function(n){return se(),_e(n)})):e}function fe(){var e=et[et.length-1];et.pop(),re(e,!1)}function re(e,n){var t,r=X;(n?!Te.echoes||nt++&&e===X:!nt||--nt&&e===X)||queueMicrotask(n?(function(i){++d,Te.echoes&&--Te.echoes!=0||(Te.echoes=Te.awaits=Te.id=0),et.push(X),re(i,!0)}).bind(null,e):fe),e!==X&&(X=e,r===en&&(en.env=Ie()),mt&&(t=en.env.Promise,n=e.env,(r.global||e.global)&&(Object.defineProperty(k,"Promise",n.PromiseProp),t.all=n.all,t.race=n.race,t.resolve=n.resolve,t.reject=n.reject,n.allSettled&&(t.allSettled=n.allSettled),n.any&&(t.any=n.any))))}function Ie(){var e=k.Promise;return mt?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(k,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function ge(e,n,t,r,i){var o=X;try{return re(e,!0),n(t,r,i)}finally{re(o,!1)}}function Pe(e,n,t,r){return typeof e!="function"?e:function(){var i=X;t&&Q(),re(n,!0);try{return e.apply(this,arguments)}finally{re(i,!1),r&&queueMicrotask(se)}}}function Me(e){Promise===$e&&Te.echoes===0?nt===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}(""+Ge).indexOf("[native code]")===-1&&(Q=se=me);var _e=B.reject,Be="￿",Se="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",tt="String expected.",gn=[],rt="__dbnames",Kr="readonly",Mr="readwrite";function In(e,n){return e?n?function(){return e.apply(this,arguments)&&n.apply(this,arguments)}:e:n}var fi={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Zt(e){return typeof e!="string"||/\./.test(e)?function(n){return n}:function(n){return n[e]===void 0&&e in n&&delete(n=De(n))[e],n}}function hi(){throw Z.Type()}function he(e,n){try{var t=di(e),r=di(n);if(t!==r)return t==="Array"?1:r==="Array"?-1:t==="binary"?1:r==="binary"?-1:t==="string"?1:r==="string"?-1:t==="Date"?1:r!=="Date"?NaN:-1;switch(t){case"number":case"Date":case"string":return n<e?1:e<n?-1:0;case"binary":return function(i,o){for(var u=i.length,c=o.length,v=u<c?u:c,y=0;y<v;++y)if(i[y]!==o[y])return i[y]<o[y]?-1:1;return u===c?0:u<c?-1:1}(vi(e),vi(n));case"Array":return function(i,o){for(var u=i.length,c=o.length,v=u<c?u:c,y=0;y<v;++y){var b=he(i[y],o[y]);if(b!==0)return b}return u===c?0:u<c?-1:1}(e,n)}}catch{}return NaN}function di(e){var n=typeof e;return n!="object"?n:ArrayBuffer.isView(e)?"binary":(e=sn(e),e==="ArrayBuffer"?"binary":e)}function vi(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var pi=(Ee.prototype._trans=function(e,n,t){var r=this._tx||X.trans,i=this.name,o=Ye&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(e==="readonly"?"read":"write"," ").concat(this.name));function u(y,b,h){if(!h.schema[i])throw new Z.NotFound("Table "+i+" not part of transaction");return n(h.idbtrans,h)}var c=fn();try{var v=r&&r.db._novip===this.db._novip?r===X.trans?r._promise(e,u,t):V(function(){return r._promise(e,u,t)},{trans:r,transless:X.transless||X}):function y(b,h,x,p){if(b.idbdb&&(b._state.openComplete||X.letThrough||b._vip)){var g=b._createTransaction(h,x,b._dbSchema);try{g.create(),b._state.PR1398_maxLoop=3}catch(_){return _.name===Sn.InvalidState&&b.isOpen()&&0<--b._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),b.close({disableAutoOpen:!1}),b.open().then(function(){return y(b,h,x,p)})):_e(_)}return g._promise(h,function(_,m){return V(function(){return X.trans=g,p(_,m,g)})}).then(function(_){if(h==="readwrite")try{g.idbtrans.commit()}catch{}return h==="readonly"?_:g._completion.then(function(){return _})})}if(b._state.openComplete)return _e(new Z.DatabaseClosed(b._state.dbOpenError));if(!b._state.isBeingOpened){if(!b._state.autoOpen)return _e(new Z.DatabaseClosed);b.open().catch(me)}return b._state.dbReadyPromise.then(function(){return y(b,h,x,p)})}(this.db,e,[this.name],u);return o&&(v._consoleTask=o,v=v.catch(function(y){return console.trace(y),_e(y)})),v}finally{c&&mn()}},Ee.prototype.get=function(e,n){var t=this;return e&&e.constructor===Object?this.where(e).first(n):e==null?_e(new Z.Type("Invalid argument to Table.get()")):this._trans("readonly",function(r){return t.core.get({trans:r,key:e}).then(function(i){return t.hook.reading.fire(i)})}).then(n)},Ee.prototype.where=function(e){if(typeof e=="string")return new this.db.WhereClause(this,e);if(O(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=w(e);if(n.length===1)return this.where(n[0]).equals(e[n[0]]);var t=this.schema.indexes.concat(this.schema.primKey).filter(function(c){if(c.compound&&n.every(function(y){return 0<=c.keyPath.indexOf(y)})){for(var v=0;v<n.length;++v)if(n.indexOf(c.keyPath[v])===-1)return!1;return!0}return!1}).sort(function(c,v){return c.keyPath.length-v.keyPath.length})[0];if(t&&this.db._maxKey!==Be){var o=t.keyPath.slice(0,n.length);return this.where(o).equals(o.map(function(v){return e[v]}))}!t&&Ye&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(n.join("+"),"]"));var r=this.schema.idxByName;function i(c,v){return he(c,v)===0}var u=n.reduce(function(h,v){var y=h[0],b=h[1],h=r[v],x=e[v];return[y||h,y||!h?In(b,h&&h.multi?function(p){return p=de(p,v),O(p)&&p.some(function(g){return i(x,g)})}:function(p){return i(x,de(p,v))}):b]},[null,null]),o=u[0],u=u[1];return o?this.where(o.name).equals(e[o.keyPath]).filter(u):t?this.filter(u):this.where(n).equals("")},Ee.prototype.filter=function(e){return this.toCollection().and(e)},Ee.prototype.count=function(e){return this.toCollection().count(e)},Ee.prototype.offset=function(e){return this.toCollection().offset(e)},Ee.prototype.limit=function(e){return this.toCollection().limit(e)},Ee.prototype.each=function(e){return this.toCollection().each(e)},Ee.prototype.toArray=function(e){return this.toCollection().toArray(e)},Ee.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},Ee.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,O(e)?"[".concat(e.join("+"),"]"):e))},Ee.prototype.reverse=function(){return this.toCollection().reverse()},Ee.prototype.mapToClass=function(e){var n,t=this.db,r=this.name;function i(){return n!==null&&n.apply(this,arguments)||this}(this.schema.mappedClass=e).prototype instanceof hi&&(function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=v}l(v,y),v.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}(i,n=e),Object.defineProperty(i.prototype,"db",{get:function(){return t},enumerable:!1,configurable:!0}),i.prototype.table=function(){return r},e=i);for(var o=new Set,u=e.prototype;u;u=M(u))Object.getOwnPropertyNames(u).forEach(function(v){return o.add(v)});function c(v){if(!v)return v;var y,b=Object.create(e.prototype);for(y in v)if(!o.has(y))try{b[y]=v[y]}catch{}return b}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=c,this.hook("reading",c),e},Ee.prototype.defineClass=function(){return this.mapToClass(function(e){j(this,e)})},Ee.prototype.add=function(e,n){var t=this,r=this.schema.primKey,i=r.auto,o=r.keyPath,u=e;return o&&i&&(u=Zt(o)(e)),this._trans("readwrite",function(c){return t.core.mutate({trans:c,type:"add",keys:n!=null?[n]:null,values:[u]})}).then(function(c){return c.numFailures?B.reject(c.failures[0]):c.lastResult}).then(function(c){if(o)try{te(e,o,c)}catch{}return c})},Ee.prototype.update=function(e,n){return typeof e!="object"||O(e)?this.where(":id").equals(e).modify(n):(e=de(e,this.schema.primKey.keyPath),e===void 0?_e(new Z.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e).modify(n))},Ee.prototype.put=function(e,n){var t=this,r=this.schema.primKey,i=r.auto,o=r.keyPath,u=e;return o&&i&&(u=Zt(o)(e)),this._trans("readwrite",function(c){return t.core.mutate({trans:c,type:"put",values:[u],keys:n!=null?[n]:null})}).then(function(c){return c.numFailures?B.reject(c.failures[0]):c.lastResult}).then(function(c){if(o)try{te(e,o,c)}catch{}return c})},Ee.prototype.delete=function(e){var n=this;return this._trans("readwrite",function(t){return n.core.mutate({trans:t,type:"delete",keys:[e]})}).then(function(t){return t.numFailures?B.reject(t.failures[0]):void 0})},Ee.prototype.clear=function(){var e=this;return this._trans("readwrite",function(n){return e.core.mutate({trans:n,type:"deleteRange",range:fi})}).then(function(n){return n.numFailures?B.reject(n.failures[0]):void 0})},Ee.prototype.bulkGet=function(e){var n=this;return this._trans("readonly",function(t){return n.core.getMany({keys:e,trans:t}).then(function(r){return r.map(function(i){return n.hook.reading.fire(i)})})})},Ee.prototype.bulkAdd=function(e,n,t){var r=this,i=Array.isArray(n)?n:void 0,o=(t=t||(i?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",function(u){var y=r.schema.primKey,c=y.auto,y=y.keyPath;if(y&&i)throw new Z.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new Z.InvalidArgument("Arguments objects and keys must have the same length");var v=e.length,y=y&&c?e.map(Zt(y)):e;return r.core.mutate({trans:u,type:"add",keys:i,values:y,wantResults:o}).then(function(g){var h=g.numFailures,x=g.results,p=g.lastResult,g=g.failures;if(h===0)return o?x:p;throw new Ze("".concat(r.name,".bulkAdd(): ").concat(h," of ").concat(v," operations failed"),g)})})},Ee.prototype.bulkPut=function(e,n,t){var r=this,i=Array.isArray(n)?n:void 0,o=(t=t||(i?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",function(u){var y=r.schema.primKey,c=y.auto,y=y.keyPath;if(y&&i)throw new Z.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new Z.InvalidArgument("Arguments objects and keys must have the same length");var v=e.length,y=y&&c?e.map(Zt(y)):e;return r.core.mutate({trans:u,type:"put",keys:i,values:y,wantResults:o}).then(function(g){var h=g.numFailures,x=g.results,p=g.lastResult,g=g.failures;if(h===0)return o?x:p;throw new Ze("".concat(r.name,".bulkPut(): ").concat(h," of ").concat(v," operations failed"),g)})})},Ee.prototype.bulkUpdate=function(e){var n=this,t=this.core,r=e.map(function(u){return u.key}),i=e.map(function(u){return u.changes}),o=[];return this._trans("readwrite",function(u){return t.getMany({trans:u,keys:r,cache:"clone"}).then(function(c){var v=[],y=[];e.forEach(function(h,x){var p=h.key,g=h.changes,_=c[x];if(_){for(var m=0,E=Object.keys(g);m<E.length;m++){var S=E[m],P=g[S];if(S===n.schema.primKey.keyPath){if(he(P,p)!==0)throw new Z.Constraint("Cannot update primary key in bulkUpdate()")}else te(_,S,P)}o.push(x),v.push(p),y.push(_)}});var b=v.length;return t.mutate({trans:u,type:"put",keys:v,values:y,updates:{keys:r,changeSpecs:i}}).then(function(h){var x=h.numFailures,p=h.failures;if(x===0)return b;for(var g=0,_=Object.keys(p);g<_.length;g++){var m,E=_[g],S=o[Number(E)];S!=null&&(m=p[E],delete p[E],p[S]=m)}throw new Ze("".concat(n.name,".bulkUpdate(): ").concat(x," of ").concat(b," operations failed"),p)})})})},Ee.prototype.bulkDelete=function(e){var n=this,t=e.length;return this._trans("readwrite",function(r){return n.core.mutate({trans:r,type:"delete",keys:e})}).then(function(u){var i=u.numFailures,o=u.lastResult,u=u.failures;if(i===0)return o;throw new Ze("".concat(n.name,".bulkDelete(): ").concat(i," of ").concat(t," operations failed"),u)})},Ee);function Ee(){}function _t(e){function n(u,c){if(c){for(var v=arguments.length,y=new Array(v-1);--v;)y[v-1]=arguments[v];return t[u].subscribe.apply(null,y),e}if(typeof u=="string")return t[u]}var t={};n.addEventType=o;for(var r=1,i=arguments.length;r<i;++r)o(arguments[r]);return n;function o(u,c,v){if(typeof u!="object"){var y;c=c||Wn;var b={subscribers:[],fire:v=v||me,subscribe:function(h){b.subscribers.indexOf(h)===-1&&(b.subscribers.push(h),b.fire=c(b.fire,h))},unsubscribe:function(h){b.subscribers=b.subscribers.filter(function(x){return x!==h}),b.fire=b.subscribers.reduce(c,v)}};return t[u]=n[u]=b}w(y=u).forEach(function(h){var x=y[h];if(O(x))o(h,y[h][0],y[h][1]);else{if(x!=="asap")throw new Z.InvalidArgument("Invalid event config");var p=o(h,Cn,function(){for(var g=arguments.length,_=new Array(g);g--;)_[g]=arguments[g];p.subscribers.forEach(function(m){ae(function(){m.apply(null,_)})})})}})}}function wt(e,n){return ee(n).from({prototype:e}),n}function at(e,n){return!(e.filter||e.algorithm||e.or)&&(n?e.justLimit:!e.replayFilter)}function zr(e,n){e.filter=In(e.filter,n)}function Lr(e,n,t){var r=e.replayFilter;e.replayFilter=r?function(){return In(r(),n())}:n,e.justLimit=t&&!r}function Qt(e,n){if(e.isPrimKey)return n.primaryKey;var t=n.getIndexByKeyPath(e.index);if(!t)throw new Z.Schema("KeyPath "+e.index+" on object store "+n.name+" is not indexed");return t}function yi(e,n,t){var r=Qt(e,n.schema);return n.openCursor({trans:t,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:r,range:e.range}})}function $t(e,n,t,r){var i=e.replayFilter?In(e.filter,e.replayFilter()):e.filter;if(e.or){var o={},u=function(c,v,y){var b,h;i&&!i(v,y,function(x){return v.stop(x)},function(x){return v.fail(x)})||((h=""+(b=v.primaryKey))=="[object ArrayBuffer]"&&(h=""+new Uint8Array(b)),q(o,h)||(o[h]=!0,n(c,v,y)))};return Promise.all([e.or._iterate(u,t),mi(yi(e,r,t),e.algorithm,u,!e.keysOnly&&e.valueMapper)])}return mi(yi(e,r,t),In(e.algorithm,i),n,!e.keysOnly&&e.valueMapper)}function mi(e,n,t,r){var i=we(r?function(o,u,c){return t(r(o),u,c)}:t);return e.then(function(o){if(o)return o.start(function(){var u=function(){return o.continue()};n&&!n(o,function(c){return u=c},function(c){o.stop(c),u=me},function(c){o.fail(c),u=me})||i(o.value,o,function(c){return u=c}),u()})})}var xt=(gi.prototype.execute=function(e){var n=this["@@propmod"];if(n.add!==void 0){var t=n.add;if(O(t))return C(C([],O(e)?e:[],!0),t).sort();if(typeof t=="number")return(Number(e)||0)+t;if(typeof t=="bigint")try{return BigInt(e)+t}catch{return BigInt(0)+t}throw new TypeError("Invalid term ".concat(t))}if(n.remove!==void 0){var r=n.remove;if(O(r))return O(e)?e.filter(function(i){return!r.includes(i)}).sort():[];if(typeof r=="number")return Number(e)-r;if(typeof r=="bigint")try{return BigInt(e)-r}catch{return BigInt(0)-r}throw new TypeError("Invalid subtrahend ".concat(r))}return t=(t=n.replacePrefix)===null||t===void 0?void 0:t[0],t&&typeof e=="string"&&e.startsWith(t)?n.replacePrefix[1]+e.substring(t.length):e},gi);function gi(e){this["@@propmod"]=e}var Yy=(pe.prototype._read=function(e,n){var t=this._ctx;return t.error?t.table._trans(null,_e.bind(null,t.error)):t.table._trans("readonly",e).then(n)},pe.prototype._write=function(e){var n=this._ctx;return n.error?n.table._trans(null,_e.bind(null,n.error)):n.table._trans("readwrite",e,"locked")},pe.prototype._addAlgorithm=function(e){var n=this._ctx;n.algorithm=In(n.algorithm,e)},pe.prototype._iterate=function(e,n){return $t(this._ctx,e,n,this._ctx.table.core)},pe.prototype.clone=function(e){var n=Object.create(this.constructor.prototype),t=Object.create(this._ctx);return e&&j(t,e),n._ctx=t,n},pe.prototype.raw=function(){return this._ctx.valueMapper=null,this},pe.prototype.each=function(e){var n=this._ctx;return this._read(function(t){return $t(n,e,t,n.table.core)})},pe.prototype.count=function(e){var n=this;return this._read(function(t){var r=n._ctx,i=r.table.core;if(at(r,!0))return i.count({trans:t,query:{index:Qt(r,i.schema),range:r.range}}).then(function(u){return Math.min(u,r.limit)});var o=0;return $t(r,function(){return++o,!1},t,i).then(function(){return o})}).then(e)},pe.prototype.sortBy=function(e,n){var t=e.split(".").reverse(),r=t[0],i=t.length-1;function o(v,y){return y?o(v[t[y]],y-1):v[r]}var u=this._ctx.dir==="next"?1:-1;function c(v,y){return he(o(v,i),o(y,i))*u}return this.toArray(function(v){return v.sort(c)}).then(n)},pe.prototype.toArray=function(e){var n=this;return this._read(function(t){var r=n._ctx;if(r.dir==="next"&&at(r,!0)&&0<r.limit){var i=r.valueMapper,o=Qt(r,r.table.core.schema);return r.table.core.query({trans:t,limit:r.limit,values:!0,query:{index:o,range:r.range}}).then(function(c){return c=c.result,i?c.map(i):c})}var u=[];return $t(r,function(c){return u.push(c)},t,r.table.core).then(function(){return u})},e)},pe.prototype.offset=function(e){var n=this._ctx;return e<=0||(n.offset+=e,at(n)?Lr(n,function(){var t=e;return function(r,i){return t===0||(t===1?--t:i(function(){r.advance(t),t=0}),!1)}}):Lr(n,function(){var t=e;return function(){return--t<0}})),this},pe.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Lr(this._ctx,function(){var n=e;return function(t,r,i){return--n<=0&&r(i),0<=n}},!0),this},pe.prototype.until=function(e,n){return zr(this._ctx,function(t,r,i){return!e(t.value)||(r(i),n)}),this},pe.prototype.first=function(e){return this.limit(1).toArray(function(n){return n[0]}).then(e)},pe.prototype.last=function(e){return this.reverse().first(e)},pe.prototype.filter=function(e){var n;return zr(this._ctx,function(t){return e(t.value)}),(n=this._ctx).isMatch=In(n.isMatch,e),this},pe.prototype.and=function(e){return this.filter(e)},pe.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},pe.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},pe.prototype.desc=function(){return this.reverse()},pe.prototype.eachKey=function(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(t,r){e(r.key,r)})},pe.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},pe.prototype.eachPrimaryKey=function(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(t,r){e(r.primaryKey,r)})},pe.prototype.keys=function(e){var n=this._ctx;n.keysOnly=!n.isMatch;var t=[];return this.each(function(r,i){t.push(i.key)}).then(function(){return t}).then(e)},pe.prototype.primaryKeys=function(e){var n=this._ctx;if(n.dir==="next"&&at(n,!0)&&0<n.limit)return this._read(function(r){var i=Qt(n,n.table.core.schema);return n.table.core.query({trans:r,values:!1,limit:n.limit,query:{index:i,range:n.range}})}).then(function(r){return r.result}).then(e);n.keysOnly=!n.isMatch;var t=[];return this.each(function(r,i){t.push(i.primaryKey)}).then(function(){return t}).then(e)},pe.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},pe.prototype.firstKey=function(e){return this.limit(1).keys(function(n){return n[0]}).then(e)},pe.prototype.lastKey=function(e){return this.reverse().firstKey(e)},pe.prototype.distinct=function(){var e=this._ctx,e=e.index&&e.table.schema.idxByName[e.index];if(!e||!e.multi)return this;var n={};return zr(this._ctx,function(i){var r=i.primaryKey.toString(),i=q(n,r);return n[r]=!0,!i}),this},pe.prototype.modify=function(e){var n=this,t=this._ctx;return this._write(function(r){var i,o,u;u=typeof e=="function"?e:(i=w(e),o=i.length,function(m){for(var E=!1,S=0;S<o;++S){var P=i[S],T=e[P],I=de(m,P);T instanceof xt?(te(m,P,T.execute(I)),E=!0):I!==T&&(te(m,P,T),E=!0)}return E});var c=t.table.core,h=c.schema.primaryKey,v=h.outbound,y=h.extractKey,b=200,h=n.db._options.modifyChunkSize;h&&(b=typeof h=="object"?h[c.name]||h["*"]||200:h);function x(m,P){var S=P.failures,P=P.numFailures;g+=m-P;for(var T=0,I=w(S);T<I.length;T++){var L=I[T];p.push(S[L])}}var p=[],g=0,_=[];return n.clone().primaryKeys().then(function(m){function E(P){var T=Math.min(b,m.length-P);return c.getMany({trans:r,keys:m.slice(P,P+T),cache:"immutable"}).then(function(I){for(var L=[],N=[],K=v?[]:null,H=[],z=0;z<T;++z){var W=I[z],oe={value:De(W),primKey:m[P+z]};u.call(oe,oe.value,oe)!==!1&&(oe.value==null?H.push(m[P+z]):v||he(y(W),y(oe.value))===0?(N.push(oe.value),v&&K.push(m[P+z])):(H.push(m[P+z]),L.push(oe.value)))}return Promise.resolve(0<L.length&&c.mutate({trans:r,type:"add",values:L}).then(function(ue){for(var ce in ue.failures)H.splice(parseInt(ce),1);x(L.length,ue)})).then(function(){return(0<N.length||S&&typeof e=="object")&&c.mutate({trans:r,type:"put",keys:K,values:N,criteria:S,changeSpec:typeof e!="function"&&e,isAdditionalChunk:0<P}).then(function(ue){return x(N.length,ue)})}).then(function(){return(0<H.length||S&&e===Fr)&&c.mutate({trans:r,type:"delete",keys:H,criteria:S,isAdditionalChunk:0<P}).then(function(ue){return x(H.length,ue)})}).then(function(){return m.length>P+T&&E(P+b)})})}var S=at(t)&&t.limit===1/0&&(typeof e!="function"||e===Fr)&&{index:t.index,range:t.range};return E(0).then(function(){if(0<p.length)throw new qn("Error modifying one or more objects",p,g,_);return m.length})})})},pe.prototype.delete=function(){var e=this._ctx,n=e.range;return at(e)&&(e.isPrimKey||n.type===3)?this._write(function(t){var r=e.table.core.schema.primaryKey,i=n;return e.table.core.count({trans:t,query:{index:r,range:i}}).then(function(o){return e.table.core.mutate({trans:t,type:"deleteRange",range:i}).then(function(u){var c=u.failures;if(u.lastResult,u.results,u=u.numFailures,u)throw new qn("Could not delete some values",Object.keys(c).map(function(v){return c[v]}),o-u);return o-u})})}):this.modify(Fr)},pe);function pe(){}var Fr=function(e,n){return n.value=null};function Gy(e,n){return e<n?-1:e===n?0:1}function Xy(e,n){return n<e?-1:e===n?0:1}function qe(e,n,t){return e=e instanceof _i?new e.Collection(e):e,e._ctx.error=new(t||TypeError)(n),e}function it(e){return new e.Collection(e,function(){return bi("")}).limit(0)}function er(e,n,t,r){var i,o,u,c,v,y,b,h=t.length;if(!t.every(function(g){return typeof g=="string"}))return qe(e,tt);function x(g){i=g==="next"?function(m){return m.toUpperCase()}:function(m){return m.toLowerCase()},o=g==="next"?function(m){return m.toLowerCase()}:function(m){return m.toUpperCase()},u=g==="next"?Gy:Xy;var _=t.map(function(m){return{lower:o(m),upper:i(m)}}).sort(function(m,E){return u(m.lower,E.lower)});c=_.map(function(m){return m.upper}),v=_.map(function(m){return m.lower}),b=(y=g)==="next"?"":r}x("next"),e=new e.Collection(e,function(){return bn(c[0],v[h-1]+r)}),e._ondirectionchange=function(g){x(g)};var p=0;return e._addAlgorithm(function(g,_,m){var E=g.key;if(typeof E!="string")return!1;var S=o(E);if(n(S,v,p))return!0;for(var P=null,T=p;T<h;++T){var I=function(L,N,K,H,z,W){for(var oe=Math.min(L.length,H.length),ue=-1,ce=0;ce<oe;++ce){var Ve=N[ce];if(Ve!==H[ce])return z(L[ce],K[ce])<0?L.substr(0,ce)+K[ce]+K.substr(ce+1):z(L[ce],H[ce])<0?L.substr(0,ce)+H[ce]+K.substr(ce+1):0<=ue?L.substr(0,ue)+N[ue]+K.substr(ue+1):null;z(L[ce],Ve)<0&&(ue=ce)}return oe<H.length&&W==="next"?L+K.substr(L.length):oe<L.length&&W==="prev"?L.substr(0,K.length):ue<0?null:L.substr(0,ue)+H[ue]+K.substr(ue+1)}(E,S,c[T],v[T],u,y);I===null&&P===null?p=T+1:(P===null||0<u(P,I))&&(P=I)}return _(P!==null?function(){g.continue(P+b)}:m),!1}),e}function bn(e,n,t,r){return{type:2,lower:e,upper:n,lowerOpen:t,upperOpen:r}}function bi(e){return{type:1,lower:e,upper:e}}var _i=(Object.defineProperty(Ne.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Ne.prototype.between=function(e,n,t,r){t=t!==!1,r=r===!0;try{return 0<this._cmp(e,n)||this._cmp(e,n)===0&&(t||r)&&(!t||!r)?it(this):new this.Collection(this,function(){return bn(e,n,!t,!r)})}catch{return qe(this,Se)}},Ne.prototype.equals=function(e){return e==null?qe(this,Se):new this.Collection(this,function(){return bi(e)})},Ne.prototype.above=function(e){return e==null?qe(this,Se):new this.Collection(this,function(){return bn(e,void 0,!0)})},Ne.prototype.aboveOrEqual=function(e){return e==null?qe(this,Se):new this.Collection(this,function(){return bn(e,void 0,!1)})},Ne.prototype.below=function(e){return e==null?qe(this,Se):new this.Collection(this,function(){return bn(void 0,e,!1,!0)})},Ne.prototype.belowOrEqual=function(e){return e==null?qe(this,Se):new this.Collection(this,function(){return bn(void 0,e)})},Ne.prototype.startsWith=function(e){return typeof e!="string"?qe(this,tt):this.between(e,e+Be,!0,!0)},Ne.prototype.startsWithIgnoreCase=function(e){return e===""?this.startsWith(e):er(this,function(n,t){return n.indexOf(t[0])===0},[e],Be)},Ne.prototype.equalsIgnoreCase=function(e){return er(this,function(n,t){return n===t[0]},[e],"")},Ne.prototype.anyOfIgnoreCase=function(){var e=He.apply(un,arguments);return e.length===0?it(this):er(this,function(n,t){return t.indexOf(n)!==-1},e,"")},Ne.prototype.startsWithAnyOfIgnoreCase=function(){var e=He.apply(un,arguments);return e.length===0?it(this):er(this,function(n,t){return t.some(function(r){return n.indexOf(r)===0})},e,Be)},Ne.prototype.anyOf=function(){var e=this,n=He.apply(un,arguments),t=this._cmp;try{n.sort(t)}catch{return qe(this,Se)}if(n.length===0)return it(this);var r=new this.Collection(this,function(){return bn(n[0],n[n.length-1])});r._ondirectionchange=function(o){t=o==="next"?e._ascending:e._descending,n.sort(t)};var i=0;return r._addAlgorithm(function(o,u,c){for(var v=o.key;0<t(v,n[i]);)if(++i===n.length)return u(c),!1;return t(v,n[i])===0||(u(function(){o.continue(n[i])}),!1)}),r},Ne.prototype.notEqual=function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Ne.prototype.noneOf=function(){var e=He.apply(un,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return qe(this,Se)}var n=e.reduce(function(t,r){return t?t.concat([[t[t.length-1][1],r]]):[[-1/0,r]]},null);return n.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})},Ne.prototype.inAnyRange=function(E,n){var t=this,r=this._cmp,i=this._ascending,o=this._descending,u=this._min,c=this._max;if(E.length===0)return it(this);if(!E.every(function(S){return S[0]!==void 0&&S[1]!==void 0&&i(S[0],S[1])<=0}))return qe(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Z.InvalidArgument);var v=!n||n.includeLowers!==!1,y=n&&n.includeUppers===!0,b,h=i;function x(S,P){return h(S[0],P[0])}try{(b=E.reduce(function(S,P){for(var T=0,I=S.length;T<I;++T){var L=S[T];if(r(P[0],L[1])<0&&0<r(P[1],L[0])){L[0]=u(L[0],P[0]),L[1]=c(L[1],P[1]);break}}return T===I&&S.push(P),S},[])).sort(x)}catch{return qe(this,Se)}var p=0,g=y?function(S){return 0<i(S,b[p][1])}:function(S){return 0<=i(S,b[p][1])},_=v?function(S){return 0<o(S,b[p][0])}:function(S){return 0<=o(S,b[p][0])},m=g,E=new this.Collection(this,function(){return bn(b[0][0],b[b.length-1][1],!v,!y)});return E._ondirectionchange=function(S){h=S==="next"?(m=g,i):(m=_,o),b.sort(x)},E._addAlgorithm(function(S,P,T){for(var I,L=S.key;m(L);)if(++p===b.length)return P(T),!1;return!g(I=L)&&!_(I)||(t._cmp(L,b[p][1])===0||t._cmp(L,b[p][0])===0||P(function(){h===i?S.continue(b[p][0]):S.continue(b[p][1])}),!1)}),E},Ne.prototype.startsWithAnyOf=function(){var e=He.apply(un,arguments);return e.every(function(n){return typeof n=="string"})?e.length===0?it(this):this.inAnyRange(e.map(function(n){return[n,n+Be]})):qe(this,"startsWithAnyOf() only works with strings")},Ne);function Ne(){}function nn(e){return we(function(n){return kt(n),e(n.target.error),!1})}function kt(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var Et="storagemutated",Br="x-storagemutated-1",_n=_t(null,Et),Jy=(tn.prototype._lock=function(){return be(!X.global),++this._reculock,this._reculock!==1||X.global||(X.lockOwnerFor=this),this},tn.prototype._unlock=function(){if(be(!X.global),--this._reculock==0)for(X.global||(X.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e=this._blockedFuncs.shift();try{ge(e[1],e[0])}catch{}}return this},tn.prototype._locked=function(){return this._reculock&&X.lockOwnerFor!==this},tn.prototype.create=function(e){var n=this;if(!this.mode)return this;var t=this.db.idbdb,r=this.db._state.dbOpenError;if(be(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new Z.DatabaseClosed(r);case"MissingAPIError":throw new Z.MissingAPI(r.message,r);default:throw new Z.OpenFailed(r)}if(!this.active)throw new Z.TransactionInactive;return be(this._completion._state===null),(e=this.idbtrans=e||(this.db.core||t).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=we(function(i){kt(i),n._reject(e.error)}),e.onabort=we(function(i){kt(i),n.active&&n._reject(new Z.Abort(e.error)),n.active=!1,n.on("abort").fire(i)}),e.oncomplete=we(function(){n.active=!1,n._resolve(),"mutatedParts"in e&&_n.storagemutated.fire(e.mutatedParts)}),this},tn.prototype._promise=function(e,n,t){var r=this;if(e==="readwrite"&&this.mode!=="readwrite")return _e(new Z.ReadOnly("Transaction is readonly"));if(!this.active)return _e(new Z.TransactionInactive);if(this._locked())return new B(function(o,u){r._blockedFuncs.push([function(){r._promise(e,n,t).then(o,u)},X])});if(t)return V(function(){var o=new B(function(u,c){r._lock();var v=n(u,c,r);v&&v.then&&v.then(u,c)});return o.finally(function(){return r._unlock()}),o._lib=!0,o});var i=new B(function(o,u){var c=n(o,u,r);c&&c.then&&c.then(o,u)});return i._lib=!0,i},tn.prototype._root=function(){return this.parent?this.parent._root():this},tn.prototype.waitFor=function(e){var n,t=this._root(),r=B.resolve(e);t._waitingFor?t._waitingFor=t._waitingFor.then(function(){return r}):(t._waitingFor=r,t._waitingQueue=[],n=t.idbtrans.objectStore(t.storeNames[0]),function o(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=o)}());var i=t._waitingFor;return new B(function(o,u){r.then(function(c){return t._waitingQueue.push(we(o.bind(null,c)))},function(c){return t._waitingQueue.push(we(u.bind(null,c)))}).finally(function(){t._waitingFor===i&&(t._waitingFor=null)})})},tn.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Z.Abort))},tn.prototype.table=function(e){var n=this._memoizedTables||(this._memoizedTables={});if(q(n,e))return n[e];var t=this.schema[e];if(!t)throw new Z.NotFound("Table "+e+" not part of transaction");return t=new this.db.Table(e,t,this),t.core=this.db.core.table(e),n[e]=t},tn);function tn(){}function Ur(e,n,t,r,i,o,u){return{name:e,keyPath:n,unique:t,multi:r,auto:i,compound:o,src:(t&&!u?"&":"")+(r?"*":"")+(i?"++":"")+wi(n)}}function wi(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function qr(e,n,t){return{name:e,primKey:n,indexes:t,mappedClass:null,idxByName:(r=function(i){return[i.name,i]},t.reduce(function(i,o,u){return u=r(o,u),u&&(i[u[0]]=u[1]),i},{}))};var r}var St=function(e){try{return e.only([[]]),St=function(){return[[]]},[[]]}catch{return St=function(){return Be},Be}};function Vr(e){return e==null?function(){}:typeof e=="string"?(n=e).split(".").length===1?function(t){return t[n]}:function(t){return de(t,n)}:function(t){return de(t,e)};var n}function xi(e){return[].slice.call(e)}var Zy=0;function Pt(e){return e==null?":id":typeof e=="string"?e:"[".concat(e.join("+"),"]")}function Qy(e,n,v){function r(m){if(m.type===3)return null;if(m.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var p=m.lower,g=m.upper,_=m.lowerOpen,m=m.upperOpen;return p===void 0?g===void 0?null:n.upperBound(g,!!m):g===void 0?n.lowerBound(p,!!_):n.bound(p,g,!!_,!!m)}function i(x){var p,g=x.name;return{name:g,schema:x,mutate:function(_){var m=_.trans,E=_.type,S=_.keys,P=_.values,T=_.range;return new Promise(function(I,L){I=we(I);var N=m.objectStore(g),K=N.keyPath==null,H=E==="put"||E==="add";if(!H&&E!=="delete"&&E!=="deleteRange")throw new Error("Invalid operation type: "+E);var z,W=(S||P||{length:1}).length;if(S&&P&&S.length!==P.length)throw new Error("Given keys array must have same length as given values array.");if(W===0)return I({numFailures:0,failures:{},results:[],lastResult:void 0});function oe(Ue){++Ve,kt(Ue)}var ue=[],ce=[],Ve=0;if(E==="deleteRange"){if(T.type===4)return I({numFailures:Ve,failures:ce,results:[],lastResult:void 0});T.type===3?ue.push(z=N.clear()):ue.push(z=N.delete(r(T)))}else{var K=H?K?[P,S]:[P,null]:[S,null],ie=K[0],Le=K[1];if(H)for(var Fe=0;Fe<W;++Fe)ue.push(z=Le&&Le[Fe]!==void 0?N[E](ie[Fe],Le[Fe]):N[E](ie[Fe])),z.onerror=oe;else for(Fe=0;Fe<W;++Fe)ue.push(z=N[E](ie[Fe])),z.onerror=oe}function dr(Ue){Ue=Ue.target.result,ue.forEach(function(Mn,ua){return Mn.error!=null&&(ce[ua]=Mn.error)}),I({numFailures:Ve,failures:ce,results:E==="delete"?S:ue.map(function(Mn){return Mn.result}),lastResult:Ue})}z.onerror=function(Ue){oe(Ue),dr(Ue)},z.onsuccess=dr})},getMany:function(_){var m=_.trans,E=_.keys;return new Promise(function(S,P){S=we(S);for(var T,I=m.objectStore(g),L=E.length,N=new Array(L),K=0,H=0,z=function(ue){ue=ue.target,N[ue._pos]=ue.result,++H===K&&S(N)},W=nn(P),oe=0;oe<L;++oe)E[oe]!=null&&((T=I.get(E[oe]))._pos=oe,T.onsuccess=z,T.onerror=W,++K);K===0&&S(N)})},get:function(_){var m=_.trans,E=_.key;return new Promise(function(S,P){S=we(S);var T=m.objectStore(g).get(E);T.onsuccess=function(I){return S(I.target.result)},T.onerror=nn(P)})},query:(p=y,function(_){return new Promise(function(m,E){m=we(m);var S,P,T,K=_.trans,I=_.values,L=_.limit,z=_.query,N=L===1/0?void 0:L,H=z.index,z=z.range,K=K.objectStore(g),H=H.isPrimaryKey?K:K.index(H.name),z=r(z);if(L===0)return m({result:[]});p?((N=I?H.getAll(z,N):H.getAllKeys(z,N)).onsuccess=function(W){return m({result:W.target.result})},N.onerror=nn(E)):(S=0,P=!I&&"openKeyCursor"in H?H.openKeyCursor(z):H.openCursor(z),T=[],P.onsuccess=function(W){var oe=P.result;return oe?(T.push(I?oe.value:oe.primaryKey),++S===L?m({result:T}):void oe.continue()):m({result:T})},P.onerror=nn(E))})}),openCursor:function(_){var m=_.trans,E=_.values,S=_.query,P=_.reverse,T=_.unique;return new Promise(function(I,L){I=we(I);var H=S.index,N=S.range,K=m.objectStore(g),K=H.isPrimaryKey?K:K.index(H.name),H=P?T?"prevunique":"prev":T?"nextunique":"next",z=!E&&"openKeyCursor"in K?K.openKeyCursor(r(N),H):K.openCursor(r(N),H);z.onerror=nn(L),z.onsuccess=we(function(W){var oe,ue,ce,Ve,ie=z.result;ie?(ie.___id=++Zy,ie.done=!1,oe=ie.continue.bind(ie),ue=(ue=ie.continuePrimaryKey)&&ue.bind(ie),ce=ie.advance.bind(ie),Ve=function(){throw new Error("Cursor not stopped")},ie.trans=m,ie.stop=ie.continue=ie.continuePrimaryKey=ie.advance=function(){throw new Error("Cursor not started")},ie.fail=we(L),ie.next=function(){var Le=this,Fe=1;return this.start(function(){return Fe--?Le.continue():Le.stop()}).then(function(){return Le})},ie.start=function(Le){function Fe(){if(z.result)try{Le()}catch(Ue){ie.fail(Ue)}else ie.done=!0,ie.start=function(){throw new Error("Cursor behind last entry")},ie.stop()}var dr=new Promise(function(Ue,Mn){Ue=we(Ue),z.onerror=nn(Mn),ie.fail=Mn,ie.stop=function(ua){ie.stop=ie.continue=ie.continuePrimaryKey=ie.advance=Ve,Ue(ua)}});return z.onsuccess=we(function(Ue){z.onsuccess=Fe,Fe()}),ie.continue=oe,ie.continuePrimaryKey=ue,ie.advance=ce,Fe(),dr},I(ie)):I(null)},L)})},count:function(_){var m=_.query,E=_.trans,S=m.index,P=m.range;return new Promise(function(T,I){var L=E.objectStore(g),N=S.isPrimaryKey?L:L.index(S.name),L=r(P),N=L?N.count(L):N.count();N.onsuccess=we(function(K){return T(K.target.result)}),N.onerror=nn(I)})}}}var o,u,c,b=(u=v,c=xi((o=e).objectStoreNames),{schema:{name:o.name,tables:c.map(function(x){return u.objectStore(x)}).map(function(x){var p=x.keyPath,m=x.autoIncrement,g=O(p),_={},m={name:x.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:p==null,compound:g,keyPath:p,autoIncrement:m,unique:!0,extractKey:Vr(p)},indexes:xi(x.indexNames).map(function(E){return x.index(E)}).map(function(T){var S=T.name,P=T.unique,I=T.multiEntry,T=T.keyPath,I={name:S,compound:O(T),keyPath:T,unique:P,multiEntry:I,extractKey:Vr(T)};return _[Pt(T)]=I}),getIndexByKeyPath:function(E){return _[Pt(E)]}};return _[":id"]=m.primaryKey,p!=null&&(_[Pt(p)]=m.primaryKey),m})},hasGetAll:0<c.length&&"getAll"in u.objectStore(c[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),v=b.schema,y=b.hasGetAll,b=v.tables.map(i),h={};return b.forEach(function(x){return h[x.name]=x}),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(x){if(!h[x])throw new Error("Table '".concat(x,"' not found"));return h[x]},MIN_KEY:-1/0,MAX_KEY:St(n),schema:v}}function $y(e,n,t,r){var i=t.IDBKeyRange;return t.indexedDB,{dbcore:(r=Qy(n,i,r),e.dbcore.reduce(function(o,u){return u=u.create,f(f({},o),u(o))},r))}}function nr(e,r){var t=r.db,r=$y(e._middlewares,t,e._deps,r);e.core=r.dbcore,e.tables.forEach(function(i){var o=i.name;e.core.schema.tables.some(function(u){return u.name===o})&&(i.core=e.core.table(o),e[o]instanceof e.Table&&(e[o].core=i.core))})}function tr(e,n,t,r){t.forEach(function(i){var o=r[i];n.forEach(function(u){var c=function v(y,b){return ne(y,b)||(y=M(y))&&v(y,b)}(u,i);(!c||"value"in c&&c.value===void 0)&&(u===e.Transaction.prototype||u instanceof e.Transaction?D(u,i,{get:function(){return this.table(i)},set:function(v){F(this,i,{value:v,writable:!0,configurable:!0,enumerable:!0})}}):u[i]=new e.Table(i,o))})})}function Hr(e,n){n.forEach(function(t){for(var r in t)t[r]instanceof e.Table&&delete t[r]})}function em(e,n){return e._cfg.version-n._cfg.version}function nm(e,n,t,r){var i=e._dbSchema;t.objectStoreNames.contains("$meta")&&!i.$meta&&(i.$meta=qr("$meta",Ei("")[0],[]),e._storeNames.push("$meta"));var o=e._createTransaction("readwrite",e._storeNames,i);o.create(t),o._completion.catch(r);var u=o._reject.bind(o),c=X.transless||X;V(function(){return X.trans=o,X.transless=c,n!==0?(nr(e,t),y=n,((v=o).storeNames.includes("$meta")?v.table("$meta").get("version").then(function(b){return b??y}):B.resolve(y)).then(function(b){return x=b,p=o,g=t,_=[],b=(h=e)._versions,m=h._dbSchema=ar(0,h.idbdb,g),(b=b.filter(function(E){return E._cfg.version>=x})).length!==0?(b.forEach(function(E){_.push(function(){var S=m,P=E._cfg.dbschema;ir(h,S,g),ir(h,P,g),m=h._dbSchema=P;var T=Wr(S,P);T.add.forEach(function(H){Yr(g,H[0],H[1].primKey,H[1].indexes)}),T.change.forEach(function(H){if(H.recreate)throw new Z.Upgrade("Not yet support for changing primary key");var z=g.objectStore(H.name);H.add.forEach(function(W){return rr(z,W)}),H.change.forEach(function(W){z.deleteIndex(W.name),rr(z,W)}),H.del.forEach(function(W){return z.deleteIndex(W)})});var I=E._cfg.contentUpgrade;if(I&&E._cfg.version>x){nr(h,g),p._memoizedTables={};var L=Ce(P);T.del.forEach(function(H){L[H]=S[H]}),Hr(h,[h.Transaction.prototype]),tr(h,[h.Transaction.prototype],w(L),L),p.schema=L;var N,K=Un(I);return K&&Q(),T=B.follow(function(){var H;(N=I(p))&&K&&(H=se.bind(null,null),N.then(H,H))}),N&&typeof N.then=="function"?B.resolve(N):T.then(function(){return N})}}),_.push(function(S){var P,T,I=E._cfg.dbschema;P=I,T=S,[].slice.call(T.db.objectStoreNames).forEach(function(L){return P[L]==null&&T.db.deleteObjectStore(L)}),Hr(h,[h.Transaction.prototype]),tr(h,[h.Transaction.prototype],h._storeNames,h._dbSchema),p.schema=h._dbSchema}),_.push(function(S){h.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(h.idbdb.version/10)===E._cfg.version?(h.idbdb.deleteObjectStore("$meta"),delete h._dbSchema.$meta,h._storeNames=h._storeNames.filter(function(P){return P!=="$meta"})):S.objectStore("$meta").put(E._cfg.version,"version"))})}),function E(){return _.length?B.resolve(_.shift()(p.idbtrans)).then(E):B.resolve()}().then(function(){ki(m,g)})):B.resolve();var h,x,p,g,_,m}).catch(u)):(w(i).forEach(function(b){Yr(t,b,i[b].primKey,i[b].indexes)}),nr(e,t),void B.follow(function(){return e.on.populate.fire(o)}).catch(u));var v,y})}function tm(e,n){ki(e._dbSchema,n),n.db.version%10!=0||n.objectStoreNames.contains("$meta")||n.db.createObjectStore("$meta").add(Math.ceil(n.db.version/10-1),"version");var t=ar(0,e.idbdb,n);ir(e,e._dbSchema,n);for(var r=0,i=Wr(t,e._dbSchema).change;r<i.length;r++){var o=function(u){if(u.change.length||u.recreate)return console.warn("Unable to patch indexes of table ".concat(u.name," because it has changes on the type of index or primary key.")),{value:void 0};var c=n.objectStore(u.name);u.add.forEach(function(v){Ye&&console.debug("Dexie upgrade patch: Creating missing index ".concat(u.name,".").concat(v.src)),rr(c,v)})}(i[r]);if(typeof o=="object")return o.value}}function Wr(e,n){var t,r={del:[],add:[],change:[]};for(t in e)n[t]||r.del.push(t);for(t in n){var i=e[t],o=n[t];if(i){var u={name:t,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto)u.recreate=!0,r.change.push(u);else{var c=i.idxByName,v=o.idxByName,y=void 0;for(y in c)v[y]||u.del.push(y);for(y in v){var b=c[y],h=v[y];b?b.src!==h.src&&u.change.push(h):u.add.push(h)}(0<u.del.length||0<u.add.length||0<u.change.length)&&r.change.push(u)}}else r.add.push([t,o])}return r}function Yr(e,n,t,r){var i=e.db.createObjectStore(n,t.keyPath?{keyPath:t.keyPath,autoIncrement:t.auto}:{autoIncrement:t.auto});return r.forEach(function(o){return rr(i,o)}),i}function ki(e,n){w(e).forEach(function(t){n.db.objectStoreNames.contains(t)||(Ye&&console.debug("Dexie: Creating missing table",t),Yr(n,t,e[t].primKey,e[t].indexes))})}function rr(e,n){e.createIndex(n.name,n.keyPath,{unique:n.unique,multiEntry:n.multi})}function ar(e,n,t){var r={};return Y(n.objectStoreNames,0).forEach(function(i){for(var o=t.objectStore(i),u=Ur(wi(y=o.keyPath),y||"",!0,!1,!!o.autoIncrement,y&&typeof y!="string",!0),c=[],v=0;v<o.indexNames.length;++v){var b=o.index(o.indexNames[v]),y=b.keyPath,b=Ur(b.name,y,!!b.unique,!!b.multiEntry,!1,y&&typeof y!="string",!1);c.push(b)}r[i]=qr(i,u,c)}),r}function ir(e,n,t){for(var r=t.db.objectStoreNames,i=0;i<r.length;++i){var o=r[i],u=t.objectStore(o);e._hasGetAll="getAll"in u;for(var c=0;c<u.indexNames.length;++c){var v=u.indexNames[c],y=u.index(v).keyPath,b=typeof y=="string"?y:"["+Y(y).join("+")+"]";!n[o]||(y=n[o].idxByName[b])&&(y.name=v,delete n[o].idxByName[b],n[o].idxByName[v]=y)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&k.WorkerGlobalScope&&k instanceof k.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function Ei(e){return e.split(",").map(function(n,t){var r=(n=n.trim()).replace(/([&*]|\+\+)/g,""),i=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return Ur(r,i||null,/\&/.test(n),/\*/.test(n),/\+\+/.test(n),O(i),t===0)})}var rm=(or.prototype._parseStoresSpec=function(e,n){w(e).forEach(function(t){if(e[t]!==null){var r=Ei(e[t]),i=r.shift();if(i.unique=!0,i.multi)throw new Z.Schema("Primary key cannot be multi-valued");r.forEach(function(o){if(o.auto)throw new Z.Schema("Only primary key can be marked as autoIncrement (++)");if(!o.keyPath)throw new Z.Schema("Index must have a name and cannot be an empty string")}),n[t]=qr(t,i,r)}})},or.prototype.stores=function(t){var n=this.db;this._cfg.storesSource=this._cfg.storesSource?j(this._cfg.storesSource,t):t;var t=n._versions,r={},i={};return t.forEach(function(o){j(r,o._cfg.storesSource),i=o._cfg.dbschema={},o._parseStoresSpec(r,i)}),n._dbSchema=i,Hr(n,[n._allTables,n,n.Transaction.prototype]),tr(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],w(i),i),n._storeNames=w(i),this},or.prototype.upgrade=function(e){return this._cfg.contentUpgrade=yt(this._cfg.contentUpgrade||me,e),this},or);function or(){}function Gr(e,n){var t=e._dbNamesDB;return t||(t=e._dbNamesDB=new hn(rt,{addons:[],indexedDB:e,IDBKeyRange:n})).version(1).stores({dbnames:"name"}),t.table("dbnames")}function Xr(e){return e&&typeof e.databases=="function"}function Jr(e){return V(function(){return X.letThrough=!0,e()})}function Zr(e){return!("from"in e)}var ze=function(e,n){if(!this){var t=new ze;return e&&"d"in e&&j(t,e),t}j(this,arguments.length?{d:1,from:e,to:1<arguments.length?n:e}:{d:0})};function Ct(e,n,t){var r=he(n,t);if(!isNaN(r)){if(0<r)throw RangeError();if(Zr(e))return j(e,{from:n,to:t,d:1});var i=e.l,r=e.r;if(he(t,e.from)<0)return i?Ct(i,n,t):e.l={from:n,to:t,d:1,l:null,r:null},Pi(e);if(0<he(n,e.to))return r?Ct(r,n,t):e.r={from:n,to:t,d:1,l:null,r:null},Pi(e);he(n,e.from)<0&&(e.from=n,e.l=null,e.d=r?r.d+1:1),0<he(t,e.to)&&(e.to=t,e.r=null,e.d=e.l?e.l.d+1:1),t=!e.r,i&&!e.l&&Ot(e,i),r&&t&&Ot(e,r)}}function Ot(e,n){Zr(n)||function t(r,v){var o=v.from,u=v.to,c=v.l,v=v.r;Ct(r,o,u),c&&t(r,c),v&&t(r,v)}(e,n)}function Si(e,n){var t=sr(n),r=t.next();if(r.done)return!1;for(var i=r.value,o=sr(e),u=o.next(i.from),c=u.value;!r.done&&!u.done;){if(he(c.from,i.to)<=0&&0<=he(c.to,i.from))return!0;he(i.from,c.from)<0?i=(r=t.next(c.from)).value:c=(u=o.next(i.from)).value}return!1}function sr(e){var n=Zr(e)?null:{s:0,n:e};return{next:function(t){for(var r=0<arguments.length;n;)switch(n.s){case 0:if(n.s=1,r)for(;n.n.l&&he(t,n.n.from)<0;)n={up:n,n:n.n.l,s:1};else for(;n.n.l;)n={up:n,n:n.n.l,s:1};case 1:if(n.s=2,!r||he(t,n.n.to)<=0)return{value:n.n,done:!1};case 2:if(n.n.r){n.s=3,n={up:n,n:n.n.r,s:0};continue}case 3:n=n.up}return{done:!0}}}}function Pi(e){var n,t,r=(((n=e.r)===null||n===void 0?void 0:n.d)||0)-(((t=e.l)===null||t===void 0?void 0:t.d)||0),i=1<r?"r":r<-1?"l":"";i&&(n=i=="r"?"l":"r",t=f({},e),r=e[i],e.from=r.from,e.to=r.to,e[i]=r[i],t[i]=r[n],(e[n]=t).d=Ci(t)),e.d=Ci(e)}function Ci(t){var n=t.r,t=t.l;return(n?t?Math.max(n.d,t.d):n.d:t?t.d:0)+1}function ur(e,n){return w(n).forEach(function(t){e[t]?Ot(e[t],n[t]):e[t]=function r(i){var o,u,c={};for(o in i)q(i,o)&&(u=i[o],c[o]=!u||typeof u!="object"||Ae.has(u.constructor)?u:r(u));return c}(n[t])}),e}function Qr(e,n){return e.all||n.all||Object.keys(e).some(function(t){return n[t]&&Si(n[t],e[t])})}J(ze.prototype,((Ge={add:function(e){return Ot(this,e),this},addKey:function(e){return Ct(this,e,e),this},addKeys:function(e){var n=this;return e.forEach(function(t){return Ct(n,t,t)}),this},hasKey:function(e){var n=sr(this).next(e).value;return n&&he(n.from,e)<=0&&0<=he(n.to,e)}})[Bn]=function(){return sr(this)},Ge));var Nn={},$r={},ea=!1;function cr(e){ur($r,e),ea||(ea=!0,setTimeout(function(){ea=!1,na($r,!($r={}))},0))}function na(e,n){n===void 0&&(n=!1);var t=new Set;if(e.all)for(var r=0,i=Object.values(Nn);r<i.length;r++)Oi(u=i[r],e,t,n);else for(var o in e){var u,c=/^idb\:\/\/(.*)\/(.*)\//.exec(o);c&&(o=c[1],c=c[2],(u=Nn["idb://".concat(o,"/").concat(c)])&&Oi(u,e,t,n))}t.forEach(function(v){return v()})}function Oi(e,n,t,r){for(var i=[],o=0,u=Object.entries(e.queries.query);o<u.length;o++){for(var c=u[o],v=c[0],y=[],b=0,h=c[1];b<h.length;b++){var x=h[b];Qr(n,x.obsSet)?x.subscribers.forEach(function(m){return t.add(m)}):r&&y.push(x)}r&&i.push([v,y])}if(r)for(var p=0,g=i;p<g.length;p++){var _=g[p],v=_[0],y=_[1];e.queries.query[v]=y}}function am(e){var n=e._state,t=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then(function(){return n.dbOpenError?_e(n.dbOpenError):e});n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var r=n.openCanceller,i=Math.round(10*e.verno),o=!1;function u(){if(n.openCanceller!==r)throw new Z.DatabaseClosed("db.open() was cancelled")}function c(){return new B(function(x,p){if(u(),!t)throw new Z.MissingAPI;var g=e.name,_=n.autoSchema||!i?t.open(g):t.open(g,i);if(!_)throw new Z.MissingAPI;_.onerror=nn(p),_.onblocked=we(e._fireOnBlocked),_.onupgradeneeded=we(function(m){var E;b=_.transaction,n.autoSchema&&!e._options.allowEmptyDB?(_.onerror=kt,b.abort(),_.result.close(),(E=t.deleteDatabase(g)).onsuccess=E.onerror=we(function(){p(new Z.NoSuchDatabase("Database ".concat(g," doesnt exist")))})):(b.onerror=nn(p),m=m.oldVersion>Math.pow(2,62)?0:m.oldVersion,h=m<1,e.idbdb=_.result,o&&tm(e,b),nm(e,m/10,b,p))},p),_.onsuccess=we(function(){b=null;var m,E,S,P,T,I=e.idbdb=_.result,L=Y(I.objectStoreNames);if(0<L.length)try{var N=I.transaction((P=L).length===1?P[0]:P,"readonly");if(n.autoSchema)E=I,S=N,(m=e).verno=E.version/10,S=m._dbSchema=ar(0,E,S),m._storeNames=Y(E.objectStoreNames,0),tr(m,[m._allTables],w(S),S);else if(ir(e,e._dbSchema,N),((T=Wr(ar(0,(T=e).idbdb,N),T._dbSchema)).add.length||T.change.some(function(K){return K.add.length||K.change.length}))&&!o)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),I.close(),i=I.version+1,o=!0,x(c());nr(e,N)}catch{}gn.push(e),I.onversionchange=we(function(K){n.vcFired=!0,e.on("versionchange").fire(K)}),I.onclose=we(function(K){e.on("close").fire(K)}),h&&(T=e._deps,N=g,I=T.indexedDB,T=T.IDBKeyRange,Xr(I)||N===rt||Gr(I,T).put({name:N}).catch(me)),x()},p)}).catch(function(x){switch(x==null?void 0:x.name){case"UnknownError":if(0<n.PR1398_maxLoop)return n.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),c();break;case"VersionError":if(0<i)return i=0,c()}return B.reject(x)})}var v,y=n.dbReadyResolve,b=null,h=!1;return B.race([r,(typeof navigator>"u"?B.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(x){function p(){return indexedDB.databases().finally(x)}v=setInterval(p,100),p()}).finally(function(){return clearInterval(v)}):Promise.resolve()).then(c)]).then(function(){return u(),n.onReadyBeingFired=[],B.resolve(Jr(function(){return e.on.ready.fire(e.vip)})).then(function x(){if(0<n.onReadyBeingFired.length){var p=n.onReadyBeingFired.reduce(yt,me);return n.onReadyBeingFired=[],B.resolve(Jr(function(){return p(e.vip)})).then(x)}})}).finally(function(){n.openCanceller===r&&(n.onReadyBeingFired=null,n.isBeingOpened=!1)}).catch(function(x){n.dbOpenError=x;try{b&&b.abort()}catch{}return r===n.openCanceller&&e._close(),_e(x)}).finally(function(){n.openComplete=!0,y()}).then(function(){var x;return h&&(x={},e.tables.forEach(function(p){p.schema.indexes.forEach(function(g){g.name&&(x["idb://".concat(e.name,"/").concat(p.name,"/").concat(g.name)]=new ze(-1/0,[[[]]]))}),x["idb://".concat(e.name,"/").concat(p.name,"/")]=x["idb://".concat(e.name,"/").concat(p.name,"/:dels")]=new ze(-1/0,[[[]]])}),_n(Et).fire(x),na(x,!0)),e})}function ta(e){function n(o){return e.next(o)}var t=i(n),r=i(function(o){return e.throw(o)});function i(o){return function(v){var c=o(v),v=c.value;return c.done?v:v&&typeof v.then=="function"?v.then(t,r):O(v)?Promise.all(v).then(t,r):t(v)}}return i(n)()}function lr(e,n,t){for(var r=O(e)?e.slice():[e],i=0;i<t;++i)r.push(n);return r}var im={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return f(f({},e),{table:function(n){var t=e.table(n),r=t.schema,i={},o=[];function u(h,x,p){var g=Pt(h),_=i[g]=i[g]||[],m=h==null?0:typeof h=="string"?1:h.length,E=0<x,E=f(f({},p),{name:E?"".concat(g,"(virtual-from:").concat(p.name,")"):p.name,lowLevelIndex:p,isVirtual:E,keyTail:x,keyLength:m,extractKey:Vr(h),unique:!E&&p.unique});return _.push(E),E.isPrimaryKey||o.push(E),1<m&&u(m===2?h[0]:h.slice(0,m-1),x+1,p),_.sort(function(S,P){return S.keyTail-P.keyTail}),E}n=u(r.primaryKey.keyPath,0,r.primaryKey),i[":id"]=[n];for(var c=0,v=r.indexes;c<v.length;c++){var y=v[c];u(y.keyPath,0,y)}function b(h){var x,p=h.query.index;return p.isVirtual?f(f({},h),{query:{index:p.lowLevelIndex,range:(x=h.query.range,p=p.keyTail,{type:x.type===1?2:x.type,lower:lr(x.lower,x.lowerOpen?e.MAX_KEY:e.MIN_KEY,p),lowerOpen:!0,upper:lr(x.upper,x.upperOpen?e.MIN_KEY:e.MAX_KEY,p),upperOpen:!0})}}):h}return f(f({},t),{schema:f(f({},r),{primaryKey:n,indexes:o,getIndexByKeyPath:function(h){return(h=i[Pt(h)])&&h[0]}}),count:function(h){return t.count(b(h))},query:function(h){return t.query(b(h))},openCursor:function(h){var x=h.query.index,p=x.keyTail,g=x.isVirtual,_=x.keyLength;return g?t.openCursor(b(h)).then(function(E){return E&&m(E)}):t.openCursor(h);function m(E){return Object.create(E,{continue:{value:function(S){S!=null?E.continue(lr(S,h.reverse?e.MAX_KEY:e.MIN_KEY,p)):h.unique?E.continue(E.key.slice(0,_).concat(h.reverse?e.MIN_KEY:e.MAX_KEY,p)):E.continue()}},continuePrimaryKey:{value:function(S,P){E.continuePrimaryKey(lr(S,e.MAX_KEY,p),P)}},primaryKey:{get:function(){return E.primaryKey}},key:{get:function(){var S=E.key;return _===1?S[0]:S.slice(0,_)}},value:{get:function(){return E.value}}})}}})}})}};function ra(e,n,t,r){return t=t||{},r=r||"",w(e).forEach(function(i){var o,u,c;q(n,i)?(o=e[i],u=n[i],typeof o=="object"&&typeof u=="object"&&o&&u?(c=sn(o))!==sn(u)?t[r+i]=n[i]:c==="Object"?ra(o,u,t,r+i+"."):o!==u&&(t[r+i]=n[i]):o!==u&&(t[r+i]=n[i])):t[r+i]=void 0}),w(n).forEach(function(i){q(e,i)||(t[r+i]=n[i])}),t}function aa(e,n){return n.type==="delete"?n.keys:n.keys||n.values.map(e.extractKey)}var om={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return f(f({},e),{table:function(n){var t=e.table(n),r=t.schema.primaryKey;return f(f({},t),{mutate:function(i){var o=X.trans,u=o.table(n).hook,c=u.deleting,v=u.creating,y=u.updating;switch(i.type){case"add":if(v.fire===me)break;return o._promise("readwrite",function(){return b(i)},!0);case"put":if(v.fire===me&&y.fire===me)break;return o._promise("readwrite",function(){return b(i)},!0);case"delete":if(c.fire===me)break;return o._promise("readwrite",function(){return b(i)},!0);case"deleteRange":if(c.fire===me)break;return o._promise("readwrite",function(){return function h(x,p,g){return t.query({trans:x,values:!1,query:{index:r,range:p},limit:g}).then(function(_){var m=_.result;return b({type:"delete",keys:m,trans:x}).then(function(E){return 0<E.numFailures?Promise.reject(E.failures[0]):m.length<g?{failures:[],numFailures:0,lastResult:void 0}:h(x,f(f({},p),{lower:m[m.length-1],lowerOpen:!0}),g)})})}(i.trans,i.range,1e4)},!0)}return t.mutate(i);function b(h){var x,p,g,_=X.trans,m=h.keys||aa(r,h);if(!m)throw new Error("Keys missing");return(h=h.type==="add"||h.type==="put"?f(f({},h),{keys:m}):f({},h)).type!=="delete"&&(h.values=C([],h.values)),h.keys&&(h.keys=C([],h.keys)),x=t,g=m,((p=h).type==="add"?Promise.resolve([]):x.getMany({trans:p.trans,keys:g,cache:"immutable"})).then(function(E){var S=m.map(function(P,T){var I,L,N,K=E[T],H={onerror:null,onsuccess:null};return h.type==="delete"?c.fire.call(H,P,K,_):h.type==="add"||K===void 0?(I=v.fire.call(H,P,h.values[T],_),P==null&&I!=null&&(h.keys[T]=P=I,r.outbound||te(h.values[T],r.keyPath,P))):(I=ra(K,h.values[T]),(L=y.fire.call(H,I,P,K,_))&&(N=h.values[T],Object.keys(L).forEach(function(z){q(N,z)?N[z]=L[z]:te(N,z,L[z])}))),H});return t.mutate(h).then(function(P){for(var T=P.failures,I=P.results,L=P.numFailures,P=P.lastResult,N=0;N<m.length;++N){var K=(I||m)[N],H=S[N];K==null?H.onerror&&H.onerror(T[N]):H.onsuccess&&H.onsuccess(h.type==="put"&&E[N]?h.values[N]:K)}return{failures:T,results:I,numFailures:L,lastResult:P}}).catch(function(P){return S.forEach(function(T){return T.onerror&&T.onerror(P)}),Promise.reject(P)})})}}})}})}};function ji(e,n,t){try{if(!n||n.keys.length<e.length)return null;for(var r=[],i=0,o=0;i<n.keys.length&&o<e.length;++i)he(n.keys[i],e[o])===0&&(r.push(t?De(n.values[i]):n.values[i]),++o);return r.length===e.length?r:null}catch{return null}}var sm={stack:"dbcore",level:-1,create:function(e){return{table:function(n){var t=e.table(n);return f(f({},t),{getMany:function(r){if(!r.cache)return t.getMany(r);var i=ji(r.keys,r.trans._cache,r.cache==="clone");return i?B.resolve(i):t.getMany(r).then(function(o){return r.trans._cache={keys:r.keys,values:r.cache==="clone"?De(o):o},o})},mutate:function(r){return r.type!=="add"&&(r.trans._cache=null),t.mutate(r)}})}}}};function Ti(e,n){return e.trans.mode==="readonly"&&!!e.subscr&&!e.trans.explicit&&e.trans.db._options.cache!=="disabled"&&!n.schema.primaryKey.outbound}function Ri(e,n){switch(e){case"query":return n.values&&!n.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var um={stack:"dbcore",level:0,name:"Observability",create:function(e){var n=e.schema.name,t=new ze(e.MIN_KEY,e.MAX_KEY);return f(f({},e),{transaction:function(r,i,o){if(X.subscr&&i!=="readonly")throw new Z.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(X.querier));return e.transaction(r,i,o)},table:function(r){var i=e.table(r),o=i.schema,u=o.primaryKey,h=o.indexes,c=u.extractKey,v=u.outbound,y=u.autoIncrement&&h.filter(function(p){return p.compound&&p.keyPath.includes(u.keyPath)}),b=f(f({},i),{mutate:function(p){function g(z){return z="idb://".concat(n,"/").concat(r,"/").concat(z),P[z]||(P[z]=new ze)}var _,m,E,S=p.trans,P=p.mutatedParts||(p.mutatedParts={}),T=g(""),I=g(":dels"),L=p.type,H=p.type==="deleteRange"?[p.range]:p.type==="delete"?[p.keys]:p.values.length<50?[aa(u,p).filter(function(z){return z}),p.values]:[],N=H[0],K=H[1],H=p.trans._cache;return O(N)?(T.addKeys(N),(H=L==="delete"||N.length===K.length?ji(N,H):null)||I.addKeys(N),(H||K)&&(_=g,m=H,E=K,o.indexes.forEach(function(z){var W=_(z.name||"");function oe(ce){return ce!=null?z.extractKey(ce):null}function ue(ce){return z.multiEntry&&O(ce)?ce.forEach(function(Ve){return W.addKey(Ve)}):W.addKey(ce)}(m||E).forEach(function(ce,Le){var ie=m&&oe(m[Le]),Le=E&&oe(E[Le]);he(ie,Le)!==0&&(ie!=null&&ue(ie),Le!=null&&ue(Le))})}))):N?(K={from:(K=N.lower)!==null&&K!==void 0?K:e.MIN_KEY,to:(K=N.upper)!==null&&K!==void 0?K:e.MAX_KEY},I.add(K),T.add(K)):(T.add(t),I.add(t),o.indexes.forEach(function(z){return g(z.name).add(t)})),i.mutate(p).then(function(z){return!N||p.type!=="add"&&p.type!=="put"||(T.addKeys(z.results),y&&y.forEach(function(W){for(var oe=p.values.map(function(ie){return W.extractKey(ie)}),ue=W.keyPath.findIndex(function(ie){return ie===u.keyPath}),ce=0,Ve=z.results.length;ce<Ve;++ce)oe[ce][ue]=z.results[ce];g(W.name).addKeys(oe)})),S.mutatedParts=ur(S.mutatedParts||{},P),z})}}),h=function(g){var _=g.query,g=_.index,_=_.range;return[g,new ze((g=_.lower)!==null&&g!==void 0?g:e.MIN_KEY,(_=_.upper)!==null&&_!==void 0?_:e.MAX_KEY)]},x={get:function(p){return[u,new ze(p.key)]},getMany:function(p){return[u,new ze().addKeys(p.keys)]},count:h,query:h,openCursor:h};return w(x).forEach(function(p){b[p]=function(g){var _=X.subscr,m=!!_,E=Ti(X,i)&&Ri(p,g)?g.obsSet={}:_;if(m){var S=function(K){return K="idb://".concat(n,"/").concat(r,"/").concat(K),E[K]||(E[K]=new ze)},P=S(""),T=S(":dels"),_=x[p](g),m=_[0],_=_[1];if((p==="query"&&m.isPrimaryKey&&!g.values?T:S(m.name||"")).add(_),!m.isPrimaryKey){if(p!=="count"){var I=p==="query"&&v&&g.values&&i.query(f(f({},g),{values:!1}));return i[p].apply(this,arguments).then(function(K){if(p==="query"){if(v&&g.values)return I.then(function(oe){return oe=oe.result,P.addKeys(oe),K});var H=g.values?K.result.map(c):K.result;(g.values?P:T).addKeys(H)}else if(p==="openCursor"){var z=K,W=g.values;return z&&Object.create(z,{key:{get:function(){return T.addKey(z.primaryKey),z.key}},primaryKey:{get:function(){var oe=z.primaryKey;return T.addKey(oe),oe}},value:{get:function(){return W&&P.addKey(z.primaryKey),z.value}}})}return K})}T.add(t)}}return i[p].apply(this,arguments)}}),b}})}};function Ai(e,n,t){if(t.numFailures===0)return n;if(n.type==="deleteRange")return null;var r=n.keys?n.keys.length:"values"in n&&n.values?n.values.length:1;return t.numFailures===r?null:(n=f({},n),O(n.keys)&&(n.keys=n.keys.filter(function(i,o){return!(o in t.failures)})),"values"in n&&O(n.values)&&(n.values=n.values.filter(function(i,o){return!(o in t.failures)})),n)}function ia(e,n){return t=e,((r=n).lower===void 0||(r.lowerOpen?0<he(t,r.lower):0<=he(t,r.lower)))&&(e=e,(n=n).upper===void 0||(n.upperOpen?he(e,n.upper)<0:he(e,n.upper)<=0));var t,r}function Di(e,n,x,r,i,o){if(!x||x.length===0)return e;var u=n.query.index,c=u.multiEntry,v=n.query.range,y=r.schema.primaryKey.extractKey,b=u.extractKey,h=(u.lowLevelIndex||u).extractKey,x=x.reduce(function(p,g){var _=p,m=[];if(g.type==="add"||g.type==="put")for(var E=new ze,S=g.values.length-1;0<=S;--S){var P,T=g.values[S],I=y(T);E.hasKey(I)||(P=b(T),(c&&O(P)?P.some(function(z){return ia(z,v)}):ia(P,v))&&(E.addKey(I),m.push(T)))}switch(g.type){case"add":var L=new ze().addKeys(n.values?p.map(function(W){return y(W)}):p),_=p.concat(n.values?m.filter(function(W){return W=y(W),!L.hasKey(W)&&(L.addKey(W),!0)}):m.map(function(W){return y(W)}).filter(function(W){return!L.hasKey(W)&&(L.addKey(W),!0)}));break;case"put":var N=new ze().addKeys(g.values.map(function(W){return y(W)}));_=p.filter(function(W){return!N.hasKey(n.values?y(W):W)}).concat(n.values?m:m.map(function(W){return y(W)}));break;case"delete":var K=new ze().addKeys(g.keys);_=p.filter(function(W){return!K.hasKey(n.values?y(W):W)});break;case"deleteRange":var H=g.range;_=p.filter(function(W){return!ia(y(W),H)})}return _},e);return x===e?e:(x.sort(function(p,g){return he(h(p),h(g))||he(y(p),y(g))}),n.limit&&n.limit<1/0&&(x.length>n.limit?x.length=n.limit:e.length===n.limit&&x.length<n.limit&&(i.dirty=!0)),o?Object.freeze(x):x)}function Ii(e,n){return he(e.lower,n.lower)===0&&he(e.upper,n.upper)===0&&!!e.lowerOpen==!!n.lowerOpen&&!!e.upperOpen==!!n.upperOpen}function cm(e,n){return function(t,r,i,o){if(t===void 0)return r!==void 0?-1:0;if(r===void 0)return 1;if((r=he(t,r))===0){if(i&&o)return 0;if(i)return 1;if(o)return-1}return r}(e.lower,n.lower,e.lowerOpen,n.lowerOpen)<=0&&0<=function(t,r,i,o){if(t===void 0)return r!==void 0?1:0;if(r===void 0)return-1;if((r=he(t,r))===0){if(i&&o)return 0;if(i)return-1;if(o)return 1}return r}(e.upper,n.upper,e.upperOpen,n.upperOpen)}function lm(e,n,t,r){e.subscribers.add(t),r.addEventListener("abort",function(){var i,o;e.subscribers.delete(t),e.subscribers.size===0&&(i=e,o=n,setTimeout(function(){i.subscribers.size===0&&Je(o,i)},3e3))})}var fm={stack:"dbcore",level:0,name:"Cache",create:function(e){var n=e.schema.name;return f(f({},e),{transaction:function(t,r,i){var o,u,c=e.transaction(t,r,i);return r==="readwrite"&&(u=(o=new AbortController).signal,i=function(v){return function(){if(o.abort(),r==="readwrite"){for(var y=new Set,b=0,h=t;b<h.length;b++){var x=h[b],p=Nn["idb://".concat(n,"/").concat(x)];if(p){var g=e.table(x),_=p.optimisticOps.filter(function(W){return W.trans===c});if(c._explicit&&v&&c.mutatedParts)for(var m=0,E=Object.values(p.queries.query);m<E.length;m++)for(var S=0,P=(L=E[m]).slice();S<P.length;S++)Qr((N=P[S]).obsSet,c.mutatedParts)&&(Je(L,N),N.subscribers.forEach(function(W){return y.add(W)}));else if(0<_.length){p.optimisticOps=p.optimisticOps.filter(function(W){return W.trans!==c});for(var T=0,I=Object.values(p.queries.query);T<I.length;T++)for(var L,N,K,H=0,z=(L=I[T]).slice();H<z.length;H++)(N=z[H]).res!=null&&c.mutatedParts&&(v&&!N.dirty?(K=Object.isFrozen(N.res),K=Di(N.res,N.req,_,g,N,K),N.dirty?(Je(L,N),N.subscribers.forEach(function(W){return y.add(W)})):K!==N.res&&(N.res=K,N.promise=B.resolve({result:K}))):(N.dirty&&Je(L,N),N.subscribers.forEach(function(W){return y.add(W)})))}}}y.forEach(function(W){return W()})}}},c.addEventListener("abort",i(!1),{signal:u}),c.addEventListener("error",i(!1),{signal:u}),c.addEventListener("complete",i(!0),{signal:u})),c},table:function(t){var r=e.table(t),i=r.schema.primaryKey;return f(f({},r),{mutate:function(o){var u=X.trans;if(i.outbound||u.db._options.cache==="disabled"||u.explicit||u.idbtrans.mode!=="readwrite")return r.mutate(o);var c=Nn["idb://".concat(n,"/").concat(t)];return c?(u=r.mutate(o),o.type!=="add"&&o.type!=="put"||!(50<=o.values.length||aa(i,o).some(function(v){return v==null}))?(c.optimisticOps.push(o),o.mutatedParts&&cr(o.mutatedParts),u.then(function(v){0<v.numFailures&&(Je(c.optimisticOps,o),(v=Ai(0,o,v))&&c.optimisticOps.push(v),o.mutatedParts&&cr(o.mutatedParts))}),u.catch(function(){Je(c.optimisticOps,o),o.mutatedParts&&cr(o.mutatedParts)})):u.then(function(v){var y=Ai(0,f(f({},o),{values:o.values.map(function(b,h){var x;return v.failures[h]?b:(b=(x=i.keyPath)!==null&&x!==void 0&&x.includes(".")?De(b):f({},b),te(b,i.keyPath,v.results[h]),b)})}),v);c.optimisticOps.push(y),queueMicrotask(function(){return o.mutatedParts&&cr(o.mutatedParts)})}),u):r.mutate(o)},query:function(o){if(!Ti(X,r)||!Ri("query",o))return r.query(o);var u=((y=X.trans)===null||y===void 0?void 0:y.db._options.cache)==="immutable",h=X,c=h.requery,v=h.signal,y=function(g,_,m,E){var S=Nn["idb://".concat(g,"/").concat(_)];if(!S)return[];if(!(_=S.queries[m]))return[null,!1,S,null];var P=_[(E.query?E.query.index.name:null)||""];if(!P)return[null,!1,S,null];switch(m){case"query":var T=P.find(function(I){return I.req.limit===E.limit&&I.req.values===E.values&&Ii(I.req.query.range,E.query.range)});return T?[T,!0,S,P]:[P.find(function(I){return("limit"in I.req?I.req.limit:1/0)>=E.limit&&(!E.values||I.req.values)&&cm(I.req.query.range,E.query.range)}),!1,S,P];case"count":return T=P.find(function(I){return Ii(I.req.query.range,E.query.range)}),[T,!!T,S,P]}}(n,t,"query",o),b=y[0],h=y[1],x=y[2],p=y[3];return b&&h?b.obsSet=o.obsSet:(h=r.query(o).then(function(g){var _=g.result;if(b&&(b.res=_),u){for(var m=0,E=_.length;m<E;++m)Object.freeze(_[m]);Object.freeze(_)}else g.result=De(_);return g}).catch(function(g){return p&&b&&Je(p,b),Promise.reject(g)}),b={obsSet:o.obsSet,promise:h,subscribers:new Set,type:"query",req:o,dirty:!1},p?p.push(b):(p=[b],(x=x||(Nn["idb://".concat(n,"/").concat(t)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[o.query.index.name||""]=p)),lm(b,p,c,v),b.promise.then(function(g){return{result:Di(g.result,o,x==null?void 0:x.optimisticOps,r,b,u)}})}})}})}};function fr(e,n){return new Proxy(e,{get:function(t,r,i){return r==="db"?n:Reflect.get(t,r,i)}})}var hn=(Oe.prototype.version=function(e){if(isNaN(e)||e<.1)throw new Z.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Z.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var n=this._versions,t=n.filter(function(r){return r._cfg.version===e})[0];return t||(t=new this.Version(e),n.push(t),n.sort(em),t.stores({}),this._state.autoSchema=!1,t)},Oe.prototype._whenReady=function(e){var n=this;return this.idbdb&&(this._state.openComplete||X.letThrough||this._vip)?e():new B(function(t,r){if(n._state.openComplete)return r(new Z.DatabaseClosed(n._state.dbOpenError));if(!n._state.isBeingOpened){if(!n._state.autoOpen)return void r(new Z.DatabaseClosed);n.open().catch(me)}n._state.dbReadyPromise.then(t,r)}).then(e)},Oe.prototype.use=function(e){var n=e.stack,t=e.create,r=e.level,i=e.name;return i&&this.unuse({stack:n,name:i}),e=this._middlewares[n]||(this._middlewares[n]=[]),e.push({stack:n,create:t,level:r??10,name:i}),e.sort(function(o,u){return o.level-u.level}),this},Oe.prototype.unuse=function(e){var n=e.stack,t=e.name,r=e.create;return n&&this._middlewares[n]&&(this._middlewares[n]=this._middlewares[n].filter(function(i){return r?i.create!==r:!!t&&i.name!==t})),this},Oe.prototype.open=function(){var e=this;return ge(en,function(){return am(e)})},Oe.prototype._close=function(){var e=this._state,n=gn.indexOf(this);if(0<=n&&gn.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new B(function(t){e.dbReadyResolve=t}),e.openCanceller=new B(function(t,r){e.cancelOpen=r}))},Oe.prototype.close=function(t){var n=(t===void 0?{disableAutoOpen:!0}:t).disableAutoOpen,t=this._state;n?(t.isBeingOpened&&t.cancelOpen(new Z.DatabaseClosed),this._close(),t.autoOpen=!1,t.dbOpenError=new Z.DatabaseClosed):(this._close(),t.autoOpen=this._options.autoOpen||t.isBeingOpened,t.openComplete=!1,t.dbOpenError=null)},Oe.prototype.delete=function(e){var n=this;e===void 0&&(e={disableAutoOpen:!0});var t=0<arguments.length&&typeof arguments[0]!="object",r=this._state;return new B(function(i,o){function u(){n.close(e);var c=n._deps.indexedDB.deleteDatabase(n.name);c.onsuccess=we(function(){var v,y,b;v=n._deps,y=n.name,b=v.indexedDB,v=v.IDBKeyRange,Xr(b)||y===rt||Gr(b,v).delete(y).catch(me),i()}),c.onerror=nn(o),c.onblocked=n._fireOnBlocked}if(t)throw new Z.InvalidArgument("Invalid closeOptions argument to db.delete()");r.isBeingOpened?r.dbReadyPromise.then(u):u()})},Oe.prototype.backendDB=function(){return this.idbdb},Oe.prototype.isOpen=function(){return this.idbdb!==null},Oe.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&e.name==="DatabaseClosed"},Oe.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Oe.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Oe.prototype,"tables",{get:function(){var e=this;return w(this._allTables).map(function(n){return e._allTables[n]})},enumerable:!1,configurable:!0}),Oe.prototype.transaction=function(){var e=(function(n,t,r){var i=arguments.length;if(i<2)throw new Z.InvalidArgument("Too few arguments");for(var o=new Array(i-1);--i;)o[i-1]=arguments[i];return r=o.pop(),[n,je(o),r]}).apply(this,arguments);return this._transaction.apply(this,e)},Oe.prototype._transaction=function(e,n,t){var r=this,i=X.trans;i&&i.db===this&&e.indexOf("!")===-1||(i=null);var o,u,c=e.indexOf("?")!==-1;e=e.replace("!","").replace("?","");try{if(u=n.map(function(y){if(y=y instanceof r.Table?y.name:y,typeof y!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return y}),e=="r"||e===Kr)o=Kr;else{if(e!="rw"&&e!=Mr)throw new Z.InvalidArgument("Invalid transaction mode: "+e);o=Mr}if(i){if(i.mode===Kr&&o===Mr){if(!c)throw new Z.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&u.forEach(function(y){if(i&&i.storeNames.indexOf(y)===-1){if(!c)throw new Z.SubTransaction("Table "+y+" not included in parent transaction.");i=null}}),c&&i&&!i.active&&(i=null)}}catch(y){return i?i._promise(null,function(b,h){h(y)}):_e(y)}var v=(function y(b,h,x,p,g){return B.resolve().then(function(){var _=X.transless||X,m=b._createTransaction(h,x,b._dbSchema,p);if(m.explicit=!0,_={trans:m,transless:_},p)m.idbtrans=p.idbtrans;else try{m.create(),m.idbtrans._explicit=!0,b._state.PR1398_maxLoop=3}catch(P){return P.name===Sn.InvalidState&&b.isOpen()&&0<--b._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),b.close({disableAutoOpen:!1}),b.open().then(function(){return y(b,h,x,null,g)})):_e(P)}var E,S=Un(g);return S&&Q(),_=B.follow(function(){var P;(E=g.call(m,m))&&(S?(P=se.bind(null,null),E.then(P,P)):typeof E.next=="function"&&typeof E.throw=="function"&&(E=ta(E)))},_),(E&&typeof E.then=="function"?B.resolve(E).then(function(P){return m.active?P:_e(new Z.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):_.then(function(){return E})).then(function(P){return p&&m._resolve(),m._completion.then(function(){return P})}).catch(function(P){return m._reject(P),_e(P)})})}).bind(null,this,o,u,i,t);return i?i._promise(o,v,"lock"):X.trans?ge(X.transless,function(){return r._whenReady(v)}):this._whenReady(v)},Oe.prototype.table=function(e){if(!q(this._allTables,e))throw new Z.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},Oe);function Oe(e,n){var t=this;this._middlewares={},this.verno=0;var r=Oe.dependencies;this._options=n=f({addons:Oe.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,cache:"cloned"},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange},r=n.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var i,o,u,c,v,y={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:me,dbReadyPromise:null,cancelOpen:me,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:n.autoOpen};y.dbReadyPromise=new B(function(h){y.dbReadyResolve=h}),y.openCanceller=new B(function(h,x){y.cancelOpen=x}),this._state=y,this.name=e,this.on=_t(this,"populate","blocked","versionchange","close",{ready:[yt,me]}),this.on.ready.subscribe=Re(this.on.ready.subscribe,function(h){return function(x,p){Oe.vip(function(){var g,_=t._state;_.openComplete?(_.dbOpenError||B.resolve().then(x),p&&h(x)):_.onReadyBeingFired?(_.onReadyBeingFired.push(x),p&&h(x)):(h(x),g=t,p||h(function m(){g.on.ready.unsubscribe(x),g.on.ready.unsubscribe(m)}))})}}),this.Collection=(i=this,wt(Yy.prototype,function(E,m){this.db=i;var p=fi,g=null;if(m)try{p=m()}catch(S){g=S}var _=E._ctx,m=_.table,E=m.hook.reading.fire;this._ctx={table:m,index:_.index,isPrimKey:!_.index||m.schema.primKey.keyPath&&_.index===m.schema.primKey.name,range:p,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:g,or:_.or,valueMapper:E!==Cn?E:null}})),this.Table=(o=this,wt(pi.prototype,function(h,x,p){this.db=o,this._tx=p,this.name=h,this.schema=x,this.hook=o._allTables[h]?o._allTables[h].hook:_t(null,{creating:[On,me],reading:[Dr,Cn],updating:[Yt,me],deleting:[Wt,me]})})),this.Transaction=(u=this,wt(Jy.prototype,function(h,x,p,g,_){var m=this;this.db=u,this.mode=h,this.storeNames=x,this.schema=p,this.chromeTransactionDurability=g,this.idbtrans=null,this.on=_t(this,"complete","error","abort"),this.parent=_||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 B(function(E,S){m._resolve=E,m._reject=S}),this._completion.then(function(){m.active=!1,m.on.complete.fire()},function(E){var S=m.active;return m.active=!1,m.on.error.fire(E),m.parent?m.parent._reject(E):S&&m.idbtrans&&m.idbtrans.abort(),_e(E)})})),this.Version=(c=this,wt(rm.prototype,function(h){this.db=c,this._cfg={version:h,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(v=this,wt(_i.prototype,function(h,x,p){if(this.db=v,this._ctx={table:h,index:x===":id"?null:x,or:p},this._cmp=this._ascending=he,this._descending=function(g,_){return he(_,g)},this._max=function(g,_){return 0<he(g,_)?g:_},this._min=function(g,_){return he(g,_)<0?g:_},this._IDBKeyRange=v._deps.IDBKeyRange,!this._IDBKeyRange)throw new Z.MissingAPI})),this.on("versionchange",function(h){0<h.newVersion?console.warn("Another connection wants to upgrade database '".concat(t.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(t.name,"'. Closing db now to resume the delete request.")),t.close({disableAutoOpen:!1})}),this.on("blocked",function(h){!h.newVersion||h.newVersion<h.oldVersion?console.warn("Dexie.delete('".concat(t.name,"') was blocked")):console.warn("Upgrade '".concat(t.name,"' blocked by other connection holding version ").concat(h.oldVersion/10))}),this._maxKey=St(n.IDBKeyRange),this._createTransaction=function(h,x,p,g){return new t.Transaction(h,x,p,t._options.chromeTransactionDurability,g)},this._fireOnBlocked=function(h){t.on("blocked").fire(h),gn.filter(function(x){return x.name===t.name&&x!==t&&!x._state.vcFired}).map(function(x){return x.on("versionchange").fire(h)})},this.use(sm),this.use(fm),this.use(um),this.use(im),this.use(om);var b=new Proxy(this,{get:function(h,x,p){if(x==="_vip")return!0;if(x==="table")return function(_){return fr(t.table(_),b)};var g=Reflect.get(h,x,p);return g instanceof pi?fr(g,b):x==="tables"?g.map(function(_){return fr(_,b)}):x==="_createTransaction"?function(){return fr(g.apply(this,arguments),b)}:g}});this.vip=b,r.forEach(function(h){return h(t)})}var hr,Ge=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",hm=(oa.prototype.subscribe=function(e,n,t){return this._subscribe(e&&typeof e!="function"?e:{next:e,error:n,complete:t})},oa.prototype[Ge]=function(){return this},oa);function oa(e){this._subscribe=e}try{hr={indexedDB:k.indexedDB||k.mozIndexedDB||k.webkitIndexedDB||k.msIndexedDB,IDBKeyRange:k.IDBKeyRange||k.webkitIDBKeyRange}}catch{hr={indexedDB:null,IDBKeyRange:null}}function Ni(e){var n,t=!1,r=new hm(function(i){var o=Un(e),u,c=!1,v={},y={},b={get closed(){return c},unsubscribe:function(){c||(c=!0,u&&u.abort(),h&&_n.storagemutated.unsubscribe(p))}};i.start&&i.start(b);var h=!1,x=function(){return Me(g)},p=function(_){ur(v,_),Qr(y,v)&&x()},g=function(){var _,m,E;!c&&hr.indexedDB&&(v={},_={},u&&u.abort(),u=new AbortController,E=function(S){var P=fn();try{o&&Q();var T=V(e,S);return T=o?T.finally(se):T}finally{P&&mn()}}(m={subscr:_,signal:u.signal,requery:x,querier:e,trans:null}),Promise.resolve(E).then(function(S){t=!0,n=S,c||m.signal.aborted||(v={},function(P){for(var T in P)if(q(P,T))return;return 1}(y=_)||h||(_n(Et,p),h=!0),Me(function(){return!c&&i.next&&i.next(S)}))},function(S){t=!1,["DatabaseClosedError","AbortError"].includes(S==null?void 0:S.name)||c||Me(function(){c||i.error&&i.error(S)})}))};return setTimeout(x,0),b});return r.hasValue=function(){return t},r.getValue=function(){return n},r}var Kn=hn;function sa(e){var n=wn;try{wn=!0,_n.storagemutated.fire(e),na(e,!0)}finally{wn=n}}J(Kn,f(f({},Hn),{delete:function(e){return new Kn(e,{addons:[]}).delete()},exists:function(e){return new Kn(e,{addons:[]}).open().then(function(n){return n.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return n=Kn.dependencies,t=n.indexedDB,n=n.IDBKeyRange,(Xr(t)?Promise.resolve(t.databases()).then(function(r){return r.map(function(i){return i.name}).filter(function(i){return i!==rt})}):Gr(t,n).toCollection().primaryKeys()).then(e)}catch{return _e(new Z.MissingAPI)}var n,t},defineClass:function(){return function(e){j(this,e)}},ignoreTransaction:function(e){return X.trans?ge(X.transless,e):e()},vip:Jr,async:function(e){return function(){try{var n=ta(e.apply(this,arguments));return n&&typeof n.then=="function"?n:B.resolve(n)}catch(t){return _e(t)}}},spawn:function(e,n,t){try{var r=ta(e.apply(t,n||[]));return r&&typeof r.then=="function"?r:B.resolve(r)}catch(i){return _e(i)}},currentTransaction:{get:function(){return X.trans||null}},waitFor:function(e,n){return n=B.resolve(typeof e=="function"?Kn.ignoreTransaction(e):e).timeout(n||6e4),X.trans?X.trans.waitFor(n):n},Promise:B,debug:{get:function(){return Ye},set:function(e){Yn(e)}},derive:ee,extend:j,props:J,override:Re,Events:_t,on:_n,liveQuery:Ni,extendObservabilitySet:ur,getByKeyPath:de,setByKeyPath:te,delByKeyPath:function(e,n){typeof n=="string"?te(e,n,void 0):"length"in n&&[].map.call(n,function(t){te(e,t,void 0)})},shallowClone:Ce,deepClone:De,getObjectDiff:ra,cmp:he,asap:ae,minKey:-1/0,addons:[],connections:gn,errnames:Sn,dependencies:hr,cache:Nn,semVer:"4.0.11",version:"4.0.11".split(".").map(function(e){return parseInt(e)}).reduce(function(e,n,t){return e+n/Math.pow(10,2*t)})})),Kn.maxKey=St(Kn.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(_n(Et,function(e){wn||(e=new CustomEvent(Br,{detail:e}),wn=!0,dispatchEvent(e),wn=!1)}),addEventListener(Br,function(e){e=e.detail,wn||sa(e)}));var ot,wn=!1,Ki=function(){};return typeof BroadcastChannel<"u"&&((Ki=function(){(ot=new BroadcastChannel(Br)).onmessage=function(e){return e.data&&sa(e.data)}})(),typeof ot.unref=="function"&&ot.unref(),_n(Et,function(e){wn||ot.postMessage(e)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(e){if(!hn.disableBfCache&&e.persisted){Ye&&console.debug("Dexie: handling persisted pagehide"),ot!=null&&ot.close();for(var n=0,t=gn;n<t.length;n++)t[n].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(e){!hn.disableBfCache&&e.persisted&&(Ye&&console.debug("Dexie: handling persisted pageshow"),Ki(),sa({all:new ze(-1/0,[[]])}))})),B.rejectionMapper=function(e,n){return!e||e instanceof cn||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Pn[e.name]?e:(n=new Pn[e.name](n||e.message,e),"stack"in e&&D(n,"stack",{get:function(){return this.inner.stack}}),n)},Yn(Ye),f(hn,Object.freeze({__proto__:null,Dexie:hn,liveQuery:Ni,Entity:hi,cmp:he,PropModification:xt,replacePrefix:function(e,n){return new xt({replacePrefix:[e,n]})},add:function(e){return new xt({add:e})},remove:function(e){return new xt({remove:e})},default:hn,RangeSet:ze,mergeRanges:Ot,rangesOverlap:Si}),{default:hn}),hn})}(Lt)),Lt.exports}var Yu=Wu();const jr=ca(Yu),ri=Symbol.for("Dexie"),Ft=globalThis[ri]||(globalThis[ri]=jr);if(jr.semVer!==Ft.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${jr.semVer} and ${Ft.semVer}`);const{liveQuery:pm,mergeRanges:ym,rangesOverlap:mm,RangeSet:gm,cmp:bm,Entity:_m,PropModification:wm,replacePrefix:xm,add:km,remove:Em}=Ft;var Gu="阿啊呵腌嗄吖锕",Xu="额阿俄恶鹅遏鄂厄饿峨扼娥鳄哦蛾噩愕讹锷垩婀鹗萼谔莪腭锇颚呃阏屙苊轭",Ju="爱埃艾碍癌哀挨矮隘蔼唉皑哎霭捱暧嫒嗳瑷嗌锿砹",Zu="诶",Qu="系西席息希习吸喜细析戏洗悉锡溪惜稀袭夕洒晰昔牺腊烯熙媳栖膝隙犀蹊硒兮熄曦禧嬉玺奚汐徙羲铣淅嘻歙熹矽蟋郗唏皙隰樨浠忾蜥檄郄翕阋鳃舾屣葸螅咭粞觋欷僖醯鼷裼穸饩舄禊诶菥蓰",$u="一以已意议义益亿易医艺食依移衣异伊仪宜射遗疑毅谊亦疫役忆抑尾乙译翼蛇溢椅沂泄逸蚁夷邑怡绎彝裔姨熠贻矣屹颐倚诣胰奕翌疙弈轶蛾驿壹猗臆弋铱旖漪迤佚翊诒怿痍懿饴峄揖眙镒仡黟肄咿翳挹缢呓刈咦嶷羿钇殪荑薏蜴镱噫癔苡悒嗌瘗衤佾埸圯舣酏劓",ec="安案按岸暗鞍氨俺胺铵谙庵黯鹌桉埯犴揞厂广",nc="厂汉韩含旱寒汗涵函喊憾罕焊翰邯撼瀚憨捍酣悍鼾邗颔蚶晗菡旰顸犴焓撖",tc="昂仰盎肮",rc="奥澳傲熬凹鳌敖遨鏖袄坳翱嗷拗懊岙螯骜獒鏊艹媪廒聱",ac="瓦挖娃洼袜蛙凹哇佤娲呙腽",ic="于与育余预域予遇奥语誉玉鱼雨渔裕愈娱欲吁舆宇羽逾豫郁寓吾狱喻御浴愉禹俞邪榆愚渝尉淤虞屿峪粥驭瑜禺毓钰隅芋熨瘀迂煜昱汩於臾盂聿竽萸妪腴圄谕觎揄龉谀俣馀庾妤瘐鬻欤鹬阈嵛雩鹆圉蜮伛纡窬窳饫蓣狳肀舁蝓燠",oc="牛纽扭钮拗妞忸狃",sc="哦噢喔",uc="把八巴拔伯吧坝爸霸罢芭跋扒叭靶疤笆耙鲅粑岜灞钯捌菝魃茇",cc="怕帕爬扒趴琶啪葩耙杷钯筢",lc="被批副否皮坏辟啤匹披疲罢僻毗坯脾譬劈媲屁琵邳裨痞癖陂丕枇噼霹吡纰砒铍淠郫埤濞睥芘蚍圮鼙罴蜱疋貔仳庀擗甓陴",fc="比必币笔毕秘避闭佛辟壁弊彼逼碧鼻臂蔽拂泌璧庇痹毙弼匕鄙陛裨贲敝蓖吡篦纰俾铋毖筚荸薜婢哔跸濞秕荜愎睥妣芘箅髀畀滗狴萆嬖襞舭",hc="百白败摆伯拜柏佰掰呗擘捭稗",dc="波博播勃拨薄佛伯玻搏柏泊舶剥渤卜驳簿脖膊簸菠礴箔铂亳钵帛擘饽跛钹趵檗啵鹁擗踣",vc="北被备倍背杯勃贝辈悲碑臂卑悖惫蓓陂钡狈呗焙碚褙庳鞴孛鹎邶鐾",pc="办版半班般板颁伴搬斑扮拌扳瓣坂阪绊钣瘢舨癍",yc="判盘番潘攀盼拚畔胖叛拌蹒磐爿蟠泮袢襻丬",mc="份宾频滨斌彬濒殡缤鬓槟摈膑玢镔豳髌傧",gc="帮邦彭旁榜棒膀镑绑傍磅蚌谤梆浜蒡",bc="旁庞乓磅螃彷滂逄耪",_c="泵崩蚌蹦迸绷甭嘣甏堋",wc="报保包宝暴胞薄爆炮饱抱堡剥鲍曝葆瀑豹刨褒雹孢苞煲褓趵鸨龅勹",xc="不部步布补捕堡埔卜埠簿哺怖钚卟瓿逋晡醭钸",kc="普暴铺浦朴堡葡谱埔扑仆蒲曝瀑溥莆圃璞濮菩蹼匍噗氆攵镨攴镤",Ec="面棉免绵缅勉眠冕娩腼渑湎沔黾宀眄",Sc="破繁坡迫颇朴泊婆泼魄粕鄱珀陂叵笸泺皤钋钷",Pc="反范犯繁饭泛翻凡返番贩烦拚帆樊藩矾梵蕃钒幡畈蘩蹯燔",Cc="府服副负富复福夫妇幅付扶父符附腐赴佛浮覆辅傅伏抚赋辐腹弗肤阜袱缚甫氟斧孚敷俯拂俘咐腑孵芙涪釜脯茯馥宓绂讣呋罘麸蝠匐芾蜉跗凫滏蝮驸绋蚨砩桴赙菔呒趺苻拊阝鲋怫稃郛莩幞祓艴黻黼鳆",Oc="本体奔苯笨夯贲锛畚坌",jc="风丰封峰奉凤锋冯逢缝蜂枫疯讽烽俸沣酆砜葑唪",Tc="变便边编遍辩鞭辨贬匾扁卞汴辫砭苄蝙鳊弁窆笾煸褊碥忭缏",Rc="便片篇偏骗翩扁骈胼蹁谝犏缏",Ac="镇真针圳振震珍阵诊填侦臻贞枕桢赈祯帧甄斟缜箴疹砧榛鸩轸稹溱蓁胗椹朕畛浈",Dc="表标彪镖裱飚膘飙镳婊骠飑杓髟鳔灬瘭",Ic="票朴漂飘嫖瓢剽缥殍瞟骠嘌莩螵",Nc="和活或货获火伙惑霍祸豁嚯藿锪蠖钬耠镬夥灬劐攉",Kc="别鳖憋瘪蹩",Mc="民敏闽闵皿泯岷悯珉抿黾缗玟愍苠鳘",zc="分份纷奋粉氛芬愤粪坟汾焚酚吩忿棼玢鼢瀵偾鲼",Lc="并病兵冰屏饼炳秉丙摒柄槟禀枋邴冫",Fc="更耕颈庚耿梗埂羹哽赓绠鲠",Bc="方放房防访纺芳仿坊妨肪邡舫彷枋鲂匚钫",Uc="现先县见线限显险献鲜洗宪纤陷闲贤仙衔掀咸嫌掺羡弦腺痫娴舷馅酰铣冼涎暹籼锨苋蚬跹岘藓燹鹇氙莶霰跣猃彡祆筅",qc="不否缶",Vc="拆擦嚓礤",Hc="查察差茶插叉刹茬楂岔诧碴嚓喳姹杈汊衩搽槎镲苴檫馇锸猹",Wc="才采财材菜彩裁蔡猜踩睬",Yc="参残餐灿惨蚕掺璨惭粲孱骖黪",Gc="信深参身神什审申甚沈伸慎渗肾绅莘呻婶娠砷蜃哂椹葚吲糁渖诜谂矧胂",Xc="参岑涔",Jc="三参散伞叁糁馓毵",Zc="藏仓苍沧舱臧伧",Qc="藏脏葬赃臧奘驵",$c="称陈沈沉晨琛臣尘辰衬趁忱郴宸谌碜嗔抻榇伧谶龀肜",el="草操曹槽糙嘈漕螬艚屮",nl="策测册侧厕栅恻",tl="责则泽择侧咋啧仄箦赜笮舴昃迮帻",rl="债择齐宅寨侧摘窄斋祭翟砦瘵哜",al="到道导岛倒刀盗稻蹈悼捣叨祷焘氘纛刂帱忉",il="层曾蹭噌",ol="查扎炸诈闸渣咋乍榨楂札栅眨咤柞喳喋铡蚱吒怍砟揸痄哳齄",sl="差拆柴钗豺侪虿瘥",ul="次此差词辞刺瓷磁兹慈茨赐祠伺雌疵鹚糍呲粢",cl="资自子字齐咨滋仔姿紫兹孜淄籽梓鲻渍姊吱秭恣甾孳訾滓锱辎趑龇赀眦缁呲笫谘嵫髭茈粢觜耔",ll="措错磋挫搓撮蹉锉厝嵯痤矬瘥脞鹾",fl="产单阐崭缠掺禅颤铲蝉搀潺蟾馋忏婵孱觇廛谄谗澶骣羼躔蒇冁",hl="山单善陕闪衫擅汕扇掺珊禅删膳缮赡鄯栅煽姗跚鳝嬗潸讪舢苫疝掸膻钐剡蟮芟埏彡骟",dl="展战占站崭粘湛沾瞻颤詹斩盏辗绽毡栈蘸旃谵搌",vl="新心信辛欣薪馨鑫芯锌忻莘昕衅歆囟忄镡",pl="联连练廉炼脸莲恋链帘怜涟敛琏镰濂楝鲢殓潋裢裣臁奁莶蠊蔹",yl="场长厂常偿昌唱畅倡尝肠敞倘猖娼淌裳徜昶怅嫦菖鲳阊伥苌氅惝鬯",ml="长张章障涨掌帐胀彰丈仗漳樟账杖璋嶂仉瘴蟑獐幛鄣嫜",gl="超朝潮炒钞抄巢吵剿绰嘲晁焯耖怊",bl="着照招找召朝赵兆昭肇罩钊沼嘲爪诏濯啁棹笊",_l="调州周洲舟骤轴昼宙粥皱肘咒帚胄绉纣妯啁诌繇碡籀酎荮",wl="车彻撤尺扯澈掣坼砗屮",xl="车局据具举且居剧巨聚渠距句拒俱柜菊拘炬桔惧矩鞠驹锯踞咀瞿枸掬沮莒橘飓疽钜趄踽遽琚龃椐苣裾榘狙倨榉苴讵雎锔窭鞫犋屦醵",kl="成程城承称盛抢乘诚呈净惩撑澄秤橙骋逞瞠丞晟铛埕塍蛏柽铖酲裎枨",El="容荣融绒溶蓉熔戎榕茸冗嵘肜狨蝾",Sl="生声升胜盛乘圣剩牲甸省绳笙甥嵊晟渑眚",Pl="等登邓灯澄凳瞪蹬噔磴嶝镫簦戥",Cl="制之治质职只志至指织支值知识直致执置止植纸拓智殖秩旨址滞氏枝芝脂帜汁肢挚稚酯掷峙炙栉侄芷窒咫吱趾痔蜘郅桎雉祉郦陟痣蛭帙枳踯徵胝栀贽祗豸鸷摭轵卮轾彘觯絷跖埴夂黹忮骘膣踬",Ol="政正证争整征郑丁症挣蒸睁铮筝拯峥怔诤狰徵钲",jl="堂唐糖汤塘躺趟倘棠烫淌膛搪镗傥螳溏帑羰樘醣螗耥铴瑭",Tl="持吃池迟赤驰尺斥齿翅匙痴耻炽侈弛叱啻坻眙嗤墀哧茌豉敕笞饬踟蚩柢媸魑篪褫彳鸱螭瘛眵傺",Rl="是时实事市十使世施式势视识师史示石食始士失适试什泽室似诗饰殖释驶氏硕逝湿蚀狮誓拾尸匙仕柿矢峙侍噬嗜栅拭嘘屎恃轼虱耆舐莳铈谥炻豕鲥饣螫酾筮埘弑礻蓍鲺贳",Al="企其起期气七器汽奇齐启旗棋妻弃揭枝歧欺骑契迄亟漆戚岂稽岐琦栖缉琪泣乞砌祁崎绮祺祈凄淇杞脐麒圻憩芪伎俟畦耆葺沏萋骐鳍綦讫蕲屺颀亓碛柒啐汔綮萁嘁蛴槭欹芑桤丌蜞",Dl="揣踹啜搋膪",Il="托脱拓拖妥驼陀沱鸵驮唾椭坨佗砣跎庹柁橐乇铊沲酡鼍箨柝",Nl="多度夺朵躲铎隋咄堕舵垛惰哆踱跺掇剁柁缍沲裰哚隳",Kl="学血雪削薛穴靴谑噱鳕踅泶彐",Ml="重种充冲涌崇虫宠忡憧舂茺铳艟",zl="筹抽绸酬愁丑臭仇畴稠瞅踌惆俦瘳雠帱",Ll="求球秋丘邱仇酋裘龟囚遒鳅虬蚯泅楸湫犰逑巯艽俅蝤赇鼽糗",Fl="修秀休宿袖绣臭朽锈羞嗅岫溴庥馐咻髹鸺貅",Bl="出处础初助除储畜触楚厨雏矗橱锄滁躇怵绌搐刍蜍黜杵蹰亍樗憷楮",Ul="团揣湍疃抟彖",ql="追坠缀揣椎锥赘惴隹骓缒",Vl="传川船穿串喘椽舛钏遄氚巛舡",Hl="专转传赚砖撰篆馔啭颛",Wl="元员院原源远愿园援圆缘袁怨渊苑宛冤媛猿垣沅塬垸鸳辕鸢瑗圜爰芫鼋橼螈眢箢掾",Yl="窜攒篡蹿撺爨汆镩",Gl="创床窗闯幢疮怆",Xl="装状庄壮撞妆幢桩奘僮戆",Jl="吹垂锤炊椎陲槌捶棰",Zl="春纯醇淳唇椿蠢鹑朐莼肫蝽",Ql="准屯淳谆肫窀",$l="促趋趣粗簇醋卒蹴猝蹙蔟殂徂",ef="吨顿盾敦蹲墩囤沌钝炖盹遁趸砘礅",nf="区去取曲趋渠趣驱屈躯衢娶祛瞿岖龋觑朐蛐癯蛆苣阒诎劬蕖蘧氍黢蠼璩麴鸲磲",tf="需许续须序徐休蓄畜虚吁绪叙旭邪恤墟栩絮圩婿戌胥嘘浒煦酗诩朐盱蓿溆洫顼勖糈砉醑",rf="辍绰戳淖啜龊踔辶",af="组族足祖租阻卒俎诅镞菹",of="济机其技基记计系期际及集级几给积极己纪即继击既激绩急奇吉季齐疾迹鸡剂辑籍寄挤圾冀亟寂暨脊跻肌稽忌饥祭缉棘矶汲畸姬藉瘠骥羁妓讥稷蓟悸嫉岌叽伎鲫诘楫荠戟箕霁嵇觊麂畿玑笈犄芨唧屐髻戢佶偈笄跽蒺乩咭赍嵴虮掎齑殛鲚剞洎丌墼蕺彐芰哜",sf="从丛匆聪葱囱琮淙枞骢苁璁",uf="总从综宗纵踪棕粽鬃偬枞腙",cf="凑辏腠楱",lf="衰催崔脆翠萃粹摧璀瘁悴淬啐隹毳榱",ff="为位委未维卫围违威伟危味微唯谓伪慰尾魏韦胃畏帷喂巍萎蔚纬潍尉渭惟薇苇炜圩娓诿玮崴桅偎逶倭猥囗葳隗痿猬涠嵬韪煨艉隹帏闱洧沩隈鲔軎",hf="村存寸忖皴",df="作做座左坐昨佐琢撮祚柞唑嘬酢怍笮阼胙",vf="钻纂攥缵躜",pf="大达打答搭沓瘩惮嗒哒耷鞑靼褡笪怛妲",yf="大代带待贷毒戴袋歹呆隶逮岱傣棣怠殆黛甙埭诒绐玳呔迨",mf="大台太态泰抬胎汰钛苔薹肽跆邰鲐酞骀炱",gf="他它她拓塔踏塌榻沓漯獭嗒挞蹋趿遢铊鳎溻闼",bf="但单石担丹胆旦弹蛋淡诞氮郸耽殚惮儋眈疸澹掸膻啖箪聃萏瘅赕",_f="路六陆录绿露鲁卢炉鹿禄赂芦庐碌麓颅泸卤潞鹭辘虏璐漉噜戮鲈掳橹轳逯渌蓼撸鸬栌氇胪镥簏舻辂垆",wf="谈探坦摊弹炭坛滩贪叹谭潭碳毯瘫檀痰袒坍覃忐昙郯澹钽锬",xf="人任认仁忍韧刃纫饪妊荏稔壬仞轫亻衽",kf="家结解价界接节她届介阶街借杰洁截姐揭捷劫戒皆竭桔诫楷秸睫藉拮芥诘碣嗟颉蚧孑婕疖桀讦疥偈羯袷哜喈卩鲒骱",Ef="研严验演言眼烟沿延盐炎燕岩宴艳颜殷彦掩淹阎衍铅雁咽厌焰堰砚唁焉晏檐蜒奄俨腌妍谚兖筵焱偃闫嫣鄢湮赝胭琰滟阉魇酽郾恹崦芫剡鼹菸餍埏谳讠厣罨",Sf="当党档荡挡宕砀铛裆凼菪谠",Pf="套讨跳陶涛逃桃萄淘掏滔韬叨洮啕绦饕鼗",Cf="条调挑跳迢眺苕窕笤佻啁粜髫铫祧龆蜩鲦",Of="特忑忒铽慝",jf="的地得德底锝",Tf="得",Rf="的地第提低底抵弟迪递帝敌堤蒂缔滴涤翟娣笛棣荻谛狄邸嘀砥坻诋嫡镝碲骶氐柢籴羝睇觌",Af="体提题弟替梯踢惕剔蹄棣啼屉剃涕锑倜悌逖嚏荑醍绨鹈缇裼",Df="推退弟腿褪颓蜕忒煺",If="有由又优游油友右邮尤忧幼犹诱悠幽佑釉柚铀鱿囿酉攸黝莠猷蝣疣呦蚴莸莜铕宥繇卣牖鼬尢蚰侑",Nf="电点店典奠甸碘淀殿垫颠滇癫巅惦掂癜玷佃踮靛钿簟坫阽",Kf="天田添填甜甸恬腆佃舔钿阗忝殄畋栝掭",Mf="主术住注助属逐宁著筑驻朱珠祝猪诸柱竹铸株瞩嘱贮煮烛苎褚蛛拄铢洙竺蛀渚伫杼侏澍诛茱箸炷躅翥潴邾槠舳橥丶瘃麈疰",zf="年念酿辗碾廿捻撵拈蔫鲶埝鲇辇黏",Lf="调掉雕吊钓刁貂凋碉鲷叼铫铞",Ff="要么约药邀摇耀腰遥姚窑瑶咬尧钥谣肴夭侥吆疟妖幺杳舀窕窈曜鹞爻繇徭轺铫鳐崾珧",Bf="跌叠蝶迭碟爹谍牒耋佚喋堞瓞鲽垤揲蹀",Uf="设社摄涉射折舍蛇拾舌奢慑赦赊佘麝歙畲厍猞揲滠",qf="业也夜叶射野液冶喝页爷耶邪咽椰烨掖拽曳晔谒腋噎揶靥邺铘揲",Vf="些解协写血叶谢械鞋胁斜携懈契卸谐泄蟹邪歇泻屑挟燮榭蝎撷偕亵楔颉缬邂鲑瀣勰榍薤绁渫廨獬躞",Hf="这者着著浙折哲蔗遮辙辄柘锗褶蜇蛰鹧谪赭摺乇磔螫",Wf="定订顶丁鼎盯钉锭叮仃铤町酊啶碇腚疔玎耵",Yf="丢铥",Gf="听庭停厅廷挺亭艇婷汀铤烃霆町蜓葶梃莛",Xf="动东董冬洞懂冻栋侗咚峒氡恫胴硐垌鸫岽胨",Jf="同通统童痛铜桶桐筒彤侗佟潼捅酮砼瞳恸峒仝嗵僮垌茼",Zf="中重种众终钟忠仲衷肿踵冢盅蚣忪锺舯螽夂",Qf="都斗读豆抖兜陡逗窦渎蚪痘蔸钭篼",$f="度都独督读毒渡杜堵赌睹肚镀渎笃竺嘟犊妒牍蠹椟黩芏髑",eh="断段短端锻缎煅椴簖",nh="对队追敦兑堆碓镦怼憝",th="瑞兑锐睿芮蕊蕤蚋枘",rh="月说约越乐跃兑阅岳粤悦曰钥栎钺樾瀹龠哕刖",ah="吞屯囤褪豚臀饨暾氽",ih="会回挥汇惠辉恢徽绘毁慧灰贿卉悔秽溃荟晖彗讳诲珲堕诙蕙晦睢麾烩茴喙桧蛔洄浍虺恚蟪咴隳缋哕",oh="务物无五武午吴舞伍污乌误亡恶屋晤悟吾雾芜梧勿巫侮坞毋诬呜钨邬捂鹜兀婺妩於戊鹉浯蜈唔骛仵焐芴鋈庑鼯牾怃圬忤痦迕杌寤阢",sh="亚压雅牙押鸭呀轧涯崖邪芽哑讶鸦娅衙丫蚜碣垭伢氩桠琊揠吖睚痖疋迓岈砑",uh="和合河何核盖贺喝赫荷盒鹤吓呵苛禾菏壑褐涸阂阖劾诃颌嗬貉曷翮纥盍",ch="我握窝沃卧挝涡斡渥幄蜗喔倭莴龌肟硪",lh="恩摁蒽",fh="嗯唔",hh="而二尔儿耳迩饵洱贰铒珥佴鸸鲕",dh="发法罚乏伐阀筏砝垡珐",vh="全权券泉圈拳劝犬铨痊诠荃醛蜷颧绻犭筌鬈悛辁畎",ph="费非飞肥废菲肺啡沸匪斐蜚妃诽扉翡霏吠绯腓痱芾淝悱狒榧砩鲱篚镄",yh="配培坏赔佩陪沛裴胚妃霈淠旆帔呸醅辔锫",mh="平评凭瓶冯屏萍苹乒坪枰娉俜鲆",gh="佛",bh="和护许户核湖互乎呼胡戏忽虎沪糊壶葫狐蝴弧瑚浒鹄琥扈唬滹惚祜囫斛笏芴醐猢怙唿戽槲觳煳鹕冱瓠虍岵鹱烀轷",_h="夹咖嘎尬噶旮伽尕钆尜",wh="个合各革格歌哥盖隔割阁戈葛鸽搁胳舸疙铬骼蛤咯圪镉颌仡硌嗝鬲膈纥袼搿塥哿虼",xh="哈蛤铪",kh="下夏峡厦辖霞夹虾狭吓侠暇遐瞎匣瑕唬呷黠硖罅狎瘕柙",Eh="改该盖概溉钙丐芥赅垓陔戤",Sh="海还害孩亥咳骸骇氦嗨胲醢",Ph="干感赶敢甘肝杆赣乾柑尴竿秆橄矸淦苷擀酐绀泔坩旰疳澉",Ch="港钢刚岗纲冈杠缸扛肛罡戆筻",Oh="将强江港奖讲降疆蒋姜浆匠酱僵桨绛缰犟豇礓洚茳糨耩",jh="行航杭巷夯吭桁沆绗颃",Th="工公共供功红贡攻宫巩龚恭拱躬弓汞蚣珙觥肱廾",Rh="红宏洪轰虹鸿弘哄烘泓訇蕻闳讧荭黉薨",Ah="广光逛潢犷胱咣桄",Dh="穷琼穹邛茕筇跫蛩銎",Ih="高告搞稿膏糕镐皋羔锆杲郜睾诰藁篙缟槁槔",Nh="好号毫豪耗浩郝皓昊皋蒿壕灏嚎濠蚝貉颢嗥薅嚆",Kh="理力利立里李历例离励礼丽黎璃厉厘粒莉梨隶栗荔沥犁漓哩狸藜罹篱鲤砺吏澧俐骊溧砾莅锂笠蠡蛎痢雳俪傈醴栎郦俚枥喱逦娌鹂戾砬唳坜疠蜊黧猁鬲粝蓠呖跞疬缡鲡鳢嫠詈悝苈篥轹",Mh="家加价假佳架甲嘉贾驾嫁夹稼钾挟拮迦伽颊浃枷戛荚痂颉镓笳珈岬胛袈郏葭袷瘕铗跏蛱恝哿",zh="落罗络洛逻螺锣骆萝裸漯烙摞骡咯箩珞捋荦硌雒椤镙跞瘰泺脶猡倮蠃",Lh="可科克客刻课颗渴壳柯棵呵坷恪苛咳磕珂稞瞌溘轲窠嗑疴蝌岢铪颏髁蚵缂氪骒钶锞",Fh="卡恰洽掐髂袷咭葜",Bh="给",Uh="根跟亘艮哏茛",qh="很狠恨痕哏",Vh="构购够句沟狗钩拘勾苟垢枸篝佝媾诟岣彀缑笱鞲觏遘",Hh="口扣寇叩抠佝蔻芤眍筘",Wh="股古顾故固鼓骨估谷贾姑孤雇辜菇沽咕呱锢钴箍汩梏痼崮轱鸪牯蛊诂毂鹘菰罟嘏臌觚瞽蛄酤牿鲴",Yh="牌排派拍迫徘湃俳哌蒎",Gh="括挂瓜刮寡卦呱褂剐胍诖鸹栝呙",Xh="投头透偷愉骰亠",Jh="怪拐乖",Zh="会快块筷脍蒯侩浍郐蒉狯哙",Qh="关管观馆官贯冠惯灌罐莞纶棺斡矜倌鹳鳏盥掼涫",$h="万完晚湾玩碗顽挽弯蔓丸莞皖宛婉腕蜿惋烷琬畹豌剜纨绾脘菀芄箢",ed="呢哪呐讷疒",nd="规贵归轨桂柜圭鬼硅瑰跪龟匮闺诡癸鳜桧皈鲑刽晷傀眭妫炅庋簋刿宄匦",td="军均俊君峻菌竣钧骏龟浚隽郡筠皲麇捃",rd="窘炯迥炅冂扃",ad="决绝角觉掘崛诀獗抉爵嚼倔厥蕨攫珏矍蹶谲镢鳜噱桷噘撅橛孓觖劂爝",id="滚棍辊衮磙鲧绲丨",od="婚混魂浑昏棍珲荤馄诨溷阍",sd="国过果郭锅裹帼涡椁囗蝈虢聒埚掴猓崞蜾呙馘",ud="黑嘿嗨",cd="看刊勘堪坎砍侃嵌槛瞰阚龛戡凵莰",ld="衡横恒亨哼珩桁蘅",fd="万没么模末冒莫摩墨默磨摸漠脉膜魔沫陌抹寞蘑摹蓦馍茉嘿谟秣蟆貉嫫镆殁耱嬷麽瘼貊貘",hd="鹏朋彭膨蓬碰苹棚捧亨烹篷澎抨硼怦砰嘭蟛堋",dd="后候厚侯猴喉吼逅篌糇骺後鲎瘊堠",vd="化华划话花画滑哗豁骅桦猾铧砉",pd="怀坏淮徊槐踝",yd="还环换欢患缓唤焕幻痪桓寰涣宦垸洹浣豢奂郇圜獾鲩鬟萑逭漶锾缳擐",md="讯训迅孙寻询循旬巡汛勋逊熏徇浚殉驯鲟薰荀浔洵峋埙巽郇醺恂荨窨蕈曛獯",gd="黄荒煌皇凰慌晃潢谎惶簧璜恍幌湟蝗磺隍徨遑肓篁鳇蟥癀",bd="能乃奶耐奈鼐萘氖柰佴艿",_d="乱卵滦峦鸾栾銮挛孪脔娈",wd="切且契窃茄砌锲怯伽惬妾趄挈郄箧慊",xd="建间件见坚检健监减简艰践兼鉴键渐柬剑尖肩舰荐箭浅剪俭碱茧奸歼拣捡煎贱溅槛涧堑笺谏饯锏缄睑謇蹇腱菅翦戬毽笕犍硷鞯牮枧湔鲣囝裥踺搛缣鹣蒹谫僭戋趼楗",kd="南难男楠喃囡赧腩囝蝻",Ed="前千钱签潜迁欠纤牵浅遣谦乾铅歉黔谴嵌倩钳茜虔堑钎骞阡掮钤扦芊犍荨仟芡悭缱佥愆褰凵肷岍搴箝慊椠",Sd="强抢疆墙枪腔锵呛羌蔷襁羟跄樯戕嫱戗炝镪锖蜣",Pd="向项相想乡象响香降像享箱羊祥湘详橡巷翔襄厢镶飨饷缃骧芗庠鲞葙蟓",Cd="教交较校角觉叫脚缴胶轿郊焦骄浇椒礁佼蕉娇矫搅绞酵剿嚼饺窖跤蛟侥狡姣皎茭峤铰醮鲛湫徼鹪僬噍艽挢敫",Od="着著缴桌卓捉琢灼浊酌拙茁涿镯淖啄濯焯倬擢斫棹诼浞禚",jd="桥乔侨巧悄敲俏壳雀瞧翘窍峭锹撬荞跷樵憔鞘橇峤诮谯愀鞒硗劁缲",Td="小效销消校晓笑肖削孝萧俏潇硝宵啸嚣霄淆哮筱逍姣箫骁枭哓绡蛸崤枵魈",Rd="司四思斯食私死似丝饲寺肆撕泗伺嗣祀厮驷嘶锶俟巳蛳咝耜笥纟糸鸶缌澌姒汜厶兕",Ad="开凯慨岂楷恺揩锴铠忾垲剀锎蒈",Dd="进金今近仅紧尽津斤禁锦劲晋谨筋巾浸襟靳瑾烬缙钅矜觐堇馑荩噤廑妗槿赆衿卺",Id="亲勤侵秦钦琴禽芹沁寝擒覃噙矜嗪揿溱芩衾廑锓吣檎螓",Nd="经京精境竞景警竟井惊径静劲敬净镜睛晶颈荆兢靖泾憬鲸茎腈菁胫阱旌粳靓痉箐儆迳婧肼刭弪獍",Kd="应营影英景迎映硬盈赢颖婴鹰荧莹樱瑛蝇萦莺颍膺缨瀛楹罂荥萤鹦滢蓥郢茔嘤璎嬴瘿媵撄潆",Md="就究九酒久救旧纠舅灸疚揪咎韭玖臼柩赳鸠鹫厩啾阄桕僦鬏",zd="最罪嘴醉咀蕞觜",Ld="卷捐圈眷娟倦绢隽镌涓鹃鄄蠲狷锩桊",Fd="算酸蒜狻",Bd="员运云允孕蕴韵酝耘晕匀芸陨纭郧筠恽韫郓氲殒愠昀菀狁",Ud="群裙逡麇",qd="卡喀咖咔咯佧胩",Vd="康抗扛慷炕亢糠伉钪闶",Hd="坑铿吭",Wd="考靠烤拷铐栲尻犒",Yd="肯垦恳啃龈裉",Gd="因引银印音饮阴隐姻殷淫尹荫吟瘾寅茵圻垠鄞湮蚓氤胤龈窨喑铟洇狺夤廴吲霪茚堙",Xd="空控孔恐倥崆箜",Jd="苦库哭酷裤枯窟挎骷堀绔刳喾",Zd="跨夸垮挎胯侉",Qd="亏奎愧魁馈溃匮葵窥盔逵睽馗聩喟夔篑岿喹揆隗傀暌跬蒉愦悝蝰",$d="款宽髋",ev="况矿框狂旷眶匡筐邝圹哐贶夼诳诓纩",nv="确却缺雀鹊阙瘸榷炔阕悫",tv="困昆坤捆琨锟鲲醌髡悃阃",rv="扩括阔廓蛞",av="拉落垃腊啦辣蜡喇剌旯砬邋瘌",iv="来莱赖睐徕籁涞赉濑癞崃疠铼",ov="兰览蓝篮栏岚烂滥缆揽澜拦懒榄斓婪阑褴罱啉谰镧漤",sv="林临邻赁琳磷淋麟霖鳞凛拎遴蔺吝粼嶙躏廪檩啉辚膦瞵懔",uv="浪朗郎廊狼琅榔螂阆锒莨啷蒗稂",cv="量两粮良辆亮梁凉谅粱晾靓踉莨椋魉墚",lv="老劳落络牢捞涝烙姥佬崂唠酪潦痨醪铑铹栳耢",fv="目模木亩幕母牧莫穆姆墓慕牟牡募睦缪沐暮拇姥钼苜仫毪坶",hv="了乐勒肋叻鳓嘞仂泐",dv="类累雷勒泪蕾垒磊擂镭肋羸耒儡嫘缧酹嘞诔檑",vv="随岁虽碎尿隧遂髓穗绥隋邃睢祟濉燧谇眭荽",pv="列烈劣裂猎冽咧趔洌鬣埒捩躐",yv="冷愣棱楞塄",mv="领令另零灵龄陵岭凌玲铃菱棱伶羚苓聆翎泠瓴囹绫呤棂蛉酃鲮柃",gv="俩",bv="了料疗辽廖聊寥缪僚燎缭撂撩嘹潦镣寮蓼獠钌尥鹩",_v="流刘六留柳瘤硫溜碌浏榴琉馏遛鎏骝绺镏旒熘鹨锍",wv="论轮伦仑纶沦抡囵",xv="率律旅绿虑履吕铝屡氯缕滤侣驴榈闾偻褛捋膂稆",kv="楼露漏陋娄搂篓喽镂偻瘘髅耧蝼嵝蒌",Ev="贸毛矛冒貌茂茅帽猫髦锚懋袤牦卯铆耄峁瑁蟊茆蝥旄泖昴瞀",Sv="龙隆弄垄笼拢聋陇胧珑窿茏咙砻垅泷栊癃",Pv="农浓弄脓侬哝",Cv="双爽霜孀泷",Ov="术书数属树输束述署朱熟殊蔬舒疏鼠淑叔暑枢墅俞曙抒竖蜀薯梳戍恕孰沭赎庶漱塾倏澍纾姝菽黍腧秫毹殳疋摅",jv="率衰帅摔甩蟀",Tv="略掠锊",Rv="么马吗摩麻码妈玛嘛骂抹蚂唛蟆犸杩",Av="么麽",Dv="买卖麦迈脉埋霾荬劢",Iv="满慢曼漫埋蔓瞒蛮鳗馒幔谩螨熳缦镘颟墁鞔",Nv="米密秘迷弥蜜谜觅靡泌眯麋猕谧咪糜宓汨醚嘧弭脒冖幂祢縻蘼芈糸敉",Kv="们门闷瞒汶扪焖懑鞔钔",Mv="忙盲茫芒氓莽蟒邙硭漭",zv="蒙盟梦猛孟萌氓朦锰檬勐懵蟒蜢虻黾蠓艨甍艋瞢礞",Lv="苗秒妙描庙瞄缪渺淼藐缈邈鹋杪眇喵",Fv="某谋牟缪眸哞鍪蛑侔厶",Bv="缪谬",Uv="美没每煤梅媒枚妹眉魅霉昧媚玫酶镁湄寐莓袂楣糜嵋镅浼猸鹛",qv="文问闻稳温纹吻蚊雯紊瘟汶韫刎璺玟阌",Vv="灭蔑篾乜咩蠛",Hv="明名命鸣铭冥茗溟酩瞑螟暝",Wv="内南那纳拿哪娜钠呐捺衲镎肭",Yv="内那哪馁",Gv="难诺挪娜糯懦傩喏搦锘",Xv="若弱偌箬",Jv="囊馕囔曩攮",Zv="脑闹恼挠瑙淖孬垴铙桡呶硇猱蛲",Qv="你尼呢泥疑拟逆倪妮腻匿霓溺旎昵坭铌鲵伲怩睨猊",$v="嫩恁",ep="能",np="您恁",tp="鸟尿溺袅脲茑嬲",rp="摄聂捏涅镍孽捻蘖啮蹑嗫臬镊颞乜陧",ap="娘酿",ip="宁凝拧泞柠咛狞佞聍甯",op="努怒奴弩驽帑孥胬",sp="女钕衄恧",up="入如女乳儒辱汝茹褥孺濡蠕嚅缛溽铷洳薷襦颥蓐",cp="暖",lp="虐疟",fp="热若惹喏",hp="区欧偶殴呕禺藕讴鸥瓯沤耦怄",dp="跑炮泡抛刨袍咆疱庖狍匏脬",vp="剖掊裒",pp="喷盆湓",yp="瞥撇苤氕丿",mp="品贫聘频拼拚颦姘嫔榀牝",gp="色塞瑟涩啬穑铯槭",bp="情青清请亲轻庆倾顷卿晴氢擎氰罄磬蜻箐鲭綮苘黥圊檠謦",_p="赞暂攒堑昝簪糌瓒錾趱拶",wp="少绍召烧稍邵哨韶捎勺梢鞘芍苕劭艄筲杓潲",xp="扫骚嫂梢缫搔瘙臊埽缲鳋",kp="沙厦杀纱砂啥莎刹杉傻煞鲨霎嗄痧裟挲铩唼歃",Ep="县选宣券旋悬轩喧玄绚渲璇炫萱癣漩眩暄煊铉楦泫谖痃碹揎镟儇",Sp="然染燃冉苒髯蚺",Pp="让壤攘嚷瓤穰禳",Cp="绕扰饶娆桡荛",Op="仍扔",jp="日",Tp="肉柔揉糅鞣蹂",Rp="软阮朊",Ap="润闰",Dp="萨洒撒飒卅仨脎",Ip="所些索缩锁莎梭琐嗦唆唢娑蓑羧挲桫嗍睃",Np="思赛塞腮噻鳃",Kp="说水税谁睡氵",Mp="桑丧嗓搡颡磉",zp="森",Lp="僧",Fp="筛晒",Bp="上商尚伤赏汤裳墒晌垧觞殇熵绱",Up="行省星腥猩惺兴刑型形邢饧醒幸杏性姓陉荇荥擤悻硎",qp="收手受首售授守寿瘦兽狩绶艏扌",Vp="说数硕烁朔铄妁槊蒴搠",Hp="速素苏诉缩塑肃俗宿粟溯酥夙愫簌稣僳谡涑蔌嗉觫",Wp="刷耍唰",Yp="栓拴涮闩",Gp="顺瞬舜吮",Xp="送松宋讼颂耸诵嵩淞怂悚崧凇忪竦菘",Jp="艘搜擞嗽嗖叟馊薮飕嗾溲锼螋瞍",Zp="损孙笋荪榫隼狲飧",Qp="腾疼藤滕誊",$p="铁贴帖餮萜",ey="土突图途徒涂吐屠兔秃凸荼钍菟堍酴",ny="外歪崴",ty="王望往网忘亡旺汪枉妄惘罔辋魍",ry="翁嗡瓮蓊蕹",ay="抓挝爪",iy="样养央阳洋扬杨羊详氧仰秧痒漾疡泱殃恙鸯徉佯怏炀烊鞅蛘",oy="雄兄熊胸凶匈汹芎",sy="哟唷",uy="用永拥勇涌泳庸俑踊佣咏雍甬镛臃邕蛹恿慵壅痈鳙墉饔喁",cy="杂扎咱砸咋匝咂拶",ly="在再灾载栽仔宰哉崽甾",fy="造早遭枣噪灶燥糟凿躁藻皂澡蚤唣",hy="贼",dy="怎谮",vy="增曾综赠憎锃甑罾缯",py="这",yy="走邹奏揍诹驺陬楱鄹鲰",my="转拽",gy="尊遵鳟樽撙",by="嗲",_y="耨",wy={a:Gu,e:Xu,ai:Ju,ei:Zu,xi:Qu,yi:$u,an:ec,han:nc,ang:tc,ao:rc,wa:ac,yu:ic,niu:oc,o:sc,ba:uc,pa:cc,pi:lc,bi:fc,bai:hc,bo:dc,bei:vc,ban:pc,pan:yc,bin:mc,bang:gc,pang:bc,beng:_c,bao:wc,bu:xc,pu:kc,mian:Ec,po:Sc,fan:Pc,fu:Cc,ben:Oc,feng:jc,bian:Tc,pian:Rc,zhen:Ac,biao:Dc,piao:Ic,huo:Nc,bie:Kc,min:Mc,fen:zc,bing:Lc,geng:Fc,fang:Bc,xian:Uc,fou:qc,ca:Vc,cha:Hc,cai:Wc,can:Yc,shen:Gc,cen:Xc,san:Jc,cang:Zc,zang:Qc,chen:$c,cao:el,ce:nl,ze:tl,zhai:rl,dao:al,ceng:il,zha:ol,chai:sl,ci:ul,zi:cl,cuo:ll,chan:fl,shan:hl,zhan:dl,xin:vl,lian:pl,chang:yl,zhang:ml,chao:gl,zhao:bl,zhou:_l,che:wl,ju:xl,cheng:kl,rong:El,sheng:Sl,deng:Pl,zhi:Cl,zheng:Ol,tang:jl,chi:Tl,shi:Rl,qi:Al,chuai:Dl,tuo:Il,duo:Nl,xue:Kl,chong:Ml,chou:zl,qiu:Ll,xiu:Fl,chu:Bl,tuan:Ul,zhui:ql,chuan:Vl,zhuan:Hl,yuan:Wl,cuan:Yl,chuang:Gl,zhuang:Xl,chui:Jl,chun:Zl,zhun:Ql,cu:$l,dun:ef,qu:nf,xu:tf,chuo:rf,zu:af,ji:of,cong:sf,zong:uf,cou:cf,cui:lf,wei:ff,cun:hf,zuo:df,zuan:vf,da:pf,dai:yf,tai:mf,ta:gf,dan:bf,lu:_f,tan:wf,ren:xf,jie:kf,yan:Ef,dang:Sf,tao:Pf,tiao:Cf,te:Of,de:jf,dei:Tf,di:Rf,ti:Af,tui:Df,you:If,dian:Nf,tian:Kf,zhu:Mf,nian:zf,diao:Lf,yao:Ff,die:Bf,she:Uf,ye:qf,xie:Vf,zhe:Hf,ding:Wf,diu:Yf,ting:Gf,dong:Xf,tong:Jf,zhong:Zf,dou:Qf,du:$f,duan:eh,dui:nh,rui:th,yue:rh,tun:ah,hui:ih,wu:oh,ya:sh,he:uh,wo:ch,en:lh,n:fh,er:hh,fa:dh,quan:vh,fei:ph,pei:yh,ping:mh,fo:gh,hu:bh,ga:_h,ge:wh,ha:xh,xia:kh,gai:Eh,hai:Sh,gan:Ph,gang:Ch,jiang:Oh,hang:jh,gong:Th,hong:Rh,guang:Ah,qiong:Dh,gao:Ih,hao:Nh,li:Kh,jia:Mh,luo:zh,ke:Lh,qia:Fh,gei:Bh,gen:Uh,hen:qh,gou:Vh,kou:Hh,gu:Wh,pai:Yh,gua:Gh,tou:Xh,guai:Jh,kuai:Zh,guan:Qh,wan:$h,ne:ed,gui:nd,jun:td,jiong:rd,jue:ad,gun:id,hun:od,guo:sd,hei:ud,kan:cd,heng:ld,mo:fd,peng:hd,hou:dd,hua:vd,huai:pd,huan:yd,xun:md,huang:gd,nai:bd,luan:_d,qie:wd,jian:xd,nan:kd,qian:Ed,qiang:Sd,xiang:Pd,jiao:Cd,zhuo:Od,qiao:jd,xiao:Td,si:Rd,kai:Ad,jin:Dd,qin:Id,jing:Nd,ying:Kd,jiu:Md,zui:zd,juan:Ld,suan:Fd,yun:Bd,qun:Ud,ka:qd,kang:Vd,keng:Hd,kao:Wd,ken:Yd,yin:Gd,kong:Xd,ku:Jd,kua:Zd,kui:Qd,kuan:$d,kuang:ev,que:nv,kun:tv,kuo:rv,la:av,lai:iv,lan:ov,lin:sv,lang:uv,liang:cv,lao:lv,mu:fv,le:hv,lei:dv,sui:vv,lie:pv,leng:yv,ling:mv,lia:gv,liao:bv,liu:_v,lun:wv,lv:xv,lou:kv,mao:Ev,long:Sv,nong:Pv,shuang:Cv,shu:Ov,shuai:jv,lve:Tv,ma:Rv,me:Av,mai:Dv,man:Iv,mi:Nv,men:Kv,mang:Mv,meng:zv,miao:Lv,mou:Fv,miu:Bv,mei:Uv,wen:qv,mie:Vv,ming:Hv,na:Wv,nei:Yv,nuo:Gv,ruo:Xv,nang:Jv,nao:Zv,ni:Qv,nen:$v,neng:ep,nin:np,niao:tp,nie:rp,niang:ap,ning:ip,nu:op,nv:sp,ru:up,nuan:cp,nve:lp,re:fp,ou:hp,pao:dp,pou:vp,pen:pp,pie:yp,pin:mp,se:gp,qing:bp,zan:_p,shao:wp,sao:xp,sha:kp,xuan:Ep,ran:Sp,rang:Pp,rao:Cp,reng:Op,ri:jp,rou:Tp,ruan:Rp,run:Ap,sa:Dp,suo:Ip,sai:Np,shui:Kp,sang:Mp,sen:zp,seng:Lp,shai:Fp,shang:Bp,xing:Up,shou:qp,shuo:Vp,su:Hp,shua:Wp,shuan:Yp,shun:Gp,song:Xp,sou:Jp,sun:Zp,teng:Qp,tie:$p,tu:ey,wai:ny,wang:ty,weng:ry,zhua:ay,yang:iy,xiong:oy,yo:sy,yong:uy,za:cy,zai:ly,zao:fy,zei:hy,zen:dy,zeng:vy,zhei:py,zou:yy,zhuai:my,zun:gy,dia:by,nou:_y};const xy=5;var ky=class{constructor(){Ke(this,"currentInput","");Ke(this,"candidates",[]);Ke(this,"db");Ke(this,"pinyinDict",wy);Ke(this,"pinyinCharTable");Ke(this,"initializationPromise");this.db=new Ft("PinyinCharDB"),this.db.version(1).stores({pinyinCharEntries:"++id, &[pinyin+char], pinyin, char, weight"}),this.pinyinCharTable=this.db.table("pinyinCharEntries"),this.initializationPromise=this.initializeDatabase()}async initializeDatabase(){try{if(await this.pinyinCharTable.count()===0){const s=[];for(const[l,f]of Object.entries(this.pinyinDict))for(const C of f.split(""))s.push({pinyin:l,char:C,weight:1});await this.pinyinCharTable.bulkAdd(s)}}catch(a){throw console.error("初始化 PinyinCharDB 失败:",a),a}}async processInput(a){if(await this.initializationPromise,this.currentInput=a.toLowerCase(),this.candidates=[],!this.currentInput)return[];const s=await this.pinyinCharTable.where("pinyin").startsWith(this.currentInput).toArray(),l=(f,C)=>{const k=f.pinyin===C,w=f.weight>1;return k&&w?1:!k&&w?2:k&&!w?3:!k&&!w?4:5};return s.sort((f,C)=>{const k=l(f,this.currentInput),w=l(C,this.currentInput);return k!==w?k-w:C.weight!==f.weight?C.weight-f.weight:f.id-C.id}),this.candidates=s.map(f=>f.char),this.candidates=[...new Set(this.candidates)],this.candidates}async selectCandidate(a){var f,C,k;if(await this.initializationPromise,!this.currentInput)return;let s=this.currentInput;for(const w of Object.keys(this.pinyinDict))if(w.startsWith(this.currentInput)&&this.pinyinDict[w].includes(a))if(w.length>s.length||w===this.currentInput){if(s=w,(f=this.pinyinDict[this.currentInput])!=null&&f.includes(a)&&this.currentInput===w)break}else s===this.currentInput&&((C=this.pinyinDict[w])!=null&&C.includes(a))&&(s=w);if(!((k=this.pinyinDict[s])!=null&&k.includes(a))){for(const w of Object.keys(this.pinyinDict))if(this.pinyinDict[w].includes(a)){if(w.startsWith(this.currentInput)){s=w;break}s===this.currentInput&&(s=w)}}const l=await this.pinyinCharTable.where({pinyin:s,char:a}).first();if(l&&l.id!==void 0){const w=Math.min((l.weight||0)+1,xy);await this.pinyinCharTable.update(l.id,{weight:w})}else this.pinyinDict[s]?await this.pinyinCharTable.add({pinyin:s,char:a,weight:1}):console.warn(`无法为 ${a} 添加条目,拼音 ${s} 不在字典中。`);this.clear()}clear(){this.currentInput="",this.candidates=[]}getCurrentInput(){return this.currentInput}getCandidates(){return this.candidates}},Ey=class{constructor(a,s={}){Ke(this,"canvas");Ke(this,"ctx");Ke(this,"lastX",0);Ke(this,"lastY",0);Ke(this,"strokeData",[]);Ke(this,"clearTimerId",null);Ke(this,"isDrawing",!1);Ke(this,"options");Ke(this,"handleStart",a=>{a.preventDefault(),this.isDrawing=!0;const{offsetX:s,offsetY:l}=this.getEventCoordinates(a);this.startDrawing(s,l),this.resetClearTimer()});Ke(this,"handleMove",a=>{if(!this.isDrawing)return;a.preventDefault();const{offsetX:s,offsetY:l}=this.getEventCoordinates(a);this.draw(s,l),this.resetClearTimer()});Ke(this,"handleEnd",a=>{this.isDrawing&&(a.preventDefault(),this.isDrawing=!1,this.endStroke(),this.startClearTimer(),this.options.onDrawEnd&&this.options.onDrawEnd())});this.canvas=a,this.options={clearDelay:1e3,...s};const l=this.canvas.getContext("2d");if(!l)throw new Error("Failed to get 2D rendering context");this.ctx=l,this.setupCanvas(),this.attachEvents()}setupCanvas(){this.ctx.lineJoin="round",this.ctx.lineCap="round",this.ctx.lineWidth=3,this.ctx.strokeStyle="#000",this.clearCanvas(),this.drawGrid()}drawGrid(){const a=this.canvas.width,s=this.canvas.height;this.ctx.save(),this.ctx.strokeStyle="#ddd",this.ctx.lineWidth=1,this.ctx.setLineDash([3,3]),this.ctx.beginPath(),this.ctx.moveTo(0,s/2),this.ctx.lineTo(a,s/2),this.ctx.moveTo(a/2,0),this.ctx.lineTo(a/2,s),this.ctx.stroke(),this.ctx.setLineDash([]),this.ctx.beginPath(),this.ctx.rect(0,0,a,s),this.ctx.stroke(),this.ctx.restore()}clearCanvas(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.drawGrid(),this.strokeData=[],this.resetClearTimer()}startDrawing(a,s){this.lastX=a,this.lastY=s,this.ctx.strokeStyle="#000",this.ctx.lineWidth=3,this.ctx.setLineDash([]),this.strokeData.push(a,s,0)}draw(a,s){this.ctx.beginPath(),this.ctx.moveTo(this.lastX,this.lastY),this.ctx.lineTo(a,s),this.ctx.stroke(),this.lastX=a,this.lastY=s,this.strokeData.push(a,s,0)}endStroke(){this.strokeData.length>=3&&(this.strokeData[this.strokeData.length-1]=1)}getStrokeData(){return this.strokeData}resetClearTimer(){this.clearTimerId&&(window.clearTimeout(this.clearTimerId),this.clearTimerId=null)}startClearTimer(){this.resetClearTimer(),this.clearTimerId=window.setTimeout(()=>{this.clearCanvas(),this.clearTimerId=null},this.options.clearDelay)}getEventCoordinates(a){if(a instanceof MouseEvent)return{offsetX:a.offsetX,offsetY:a.offsetY};{const s=a.touches[0]||a.changedTouches[0],l=a.target.getBoundingClientRect();return{offsetX:s.clientX-l.left,offsetY:s.clientY-l.top}}}attachEvents(){this.canvas.addEventListener("mousedown",this.handleStart),this.canvas.addEventListener("mousemove",this.handleMove),this.canvas.addEventListener("mouseup",this.handleEnd),this.canvas.addEventListener("mouseleave",this.handleEnd),this.canvas.addEventListener("touchstart",this.handleStart,{passive:!1}),this.canvas.addEventListener("touchmove",this.handleMove,{passive:!1}),this.canvas.addEventListener("touchend",this.handleEnd),this.canvas.addEventListener("touchcancel",this.handleEnd)}detachEvents(){this.canvas.removeEventListener("mousedown",this.handleStart),this.canvas.removeEventListener("mousemove",this.handleMove),this.canvas.removeEventListener("mouseup",this.handleEnd),this.canvas.removeEventListener("mouseleave",this.handleEnd),this.canvas.removeEventListener("touchstart",this.handleStart),this.canvas.removeEventListener("touchmove",this.handleMove),this.canvas.removeEventListener("touchend",this.handleEnd),this.canvas.removeEventListener("touchcancel",this.handleEnd)}destroy(){this.detachEvents(),this.resetClearTimer()}getCanvas(){return this.canvas}getContext(){return this.ctx}};function Sy(a,s,l){if(!a||!s||l==="static")return null;let f,C;if(l==="bottom")f=window.innerHeight-s.offsetHeight,C=0;else{const k=a.getBoundingClientRect(),w=s.offsetWidth;f=k.bottom+window.scrollY,C=k.left+window.scrollX+k.width/2-w/2;const O=window.innerWidth;C+w>O&&(C=O-w-10),C<10&&(C=10)}return{top:`${f}px`,left:`${C}px`}}function pt(a){if(!a)return!1;if(a.tagName==="TEXTAREA")return!0;if(a.tagName==="INPUT"){const l=(a.type||"text").toLowerCase();return!["checkbox","radio","button","submit","reset","file","image","range","color","hidden","date","datetime-local","month","week","time"].includes(l)}return!1}function Py(a,s,l){a.value=s,Ty(a,l),a.dispatchEvent(new Event("input",{bubbles:!0}))}function Cy(a,s,l,f=""){return a.slice(0,s)+f+a.slice(s+l)}function ai(a,s=""){const l=Number(a.getAttribute("maxlength"));let f=a.selectionStart??0;const C=a.selectionEnd??f;let k;if(s.length>0)k=C-f;else{const j=C-f;if(j>0)k=j;else if(f>0)k=1,f--;else return}if(s.length>0&&l&&a.value.length-k+s.length>l)return;const w=Cy(a.value,f,k,s),O=f+s.length;Py(a,w,O)}function Oy(a,s){ai(a,s)}function jy(a){ai(a)}function Ty(a,s){a.selectionStart=s,a.selectionEnd=s}function Bt(a={}){const s=a.delay??400,l=a.interval??60;let f,C;function k(){f&&(clearTimeout(f),f=void 0),C&&(clearInterval(C),C=void 0)}function w(O){k(),O(),f=setTimeout(()=>{C=setInterval(()=>{O()},l)},s)}return{start:w,stop:k}}var Tr={exports:{}};/*!
45
53
  Copyright (c) 2018 Jed Watson.
46
54
  Licensed under the MIT License (MIT), see
47
55
  http://jedwatson.github.io/classnames
48
- */var Ua;function wy(){return Ua||(Ua=1,function(a){(function(){var s={}.hasOwnProperty;function l(){for(var w="",_=0;_<arguments.length;_++){var C=arguments[_];C&&(w=E(w,f(C)))}return w}function f(w){if(typeof w=="string"||typeof w=="number")return w;if(typeof w!="object")return"";if(Array.isArray(w))return l.apply(null,w);if(w.toString!==Object.prototype.toString&&!w.toString.toString().includes("[native code]"))return w.toString();var _="";for(var C in w)s.call(w,C)&&w[C]&&(_=E(_,C));return _}function E(w,_){return _?w?w+" "+_:w+_:w}a.exports?(l.default=l,a.exports=l):window.classNames=l})()}(sr)),sr.exports}var xy=wy();const qa=Yr(xy);let Va=null;function ky(a){Va=a}function mt(){return Va}function Ey(a=!1){const[s,l]=K.useState(!1),[f,E]=K.useState(0);return K.useEffect(()=>{async function w(){const C=mt();if(C)try{l(await C.initialize({onProgress:j=>{E(j)}}))}catch(j){console.error("初始化手写识别服务失败:",j),l(!1)}else console.warn("未注册手写识别服务"),l(!1)}async function _(){const C=mt();if(C&&s)try{await C.close(),l(!1)}catch(j){console.error("关闭手写识别服务失败:",j)}}return a&&w(),()=>{_()}},[a,s]),{recognizerInitialized:s,recognizerProgress:f}}const ur="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M21,11H6.83L10.41,7.41L9,6L3,12L9,18L10.41,16.58L6.83,13H21V11Z'%20/%3e%3c/svg%3e",cr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M19,7V11H5.83L9.41,7.41L8,6L2,12L8,18L9.41,16.58L5.83,13H21V7H19Z'%20/%3e%3c/svg%3e",Ha=({candidates:a,onSelect:s})=>{function l(f){s(f)}return A.jsx("div",{className:"zhk-candidate-list",children:a.map(f=>A.jsx("button",{className:"zhk-candidate-list__item",onClick:()=>l(f),children:f},`candidate-${f}`))})},Sy=({recognizerInitialized:a,recognizerProgress:s,onKey:l,onExit:f})=>{const E=K.useRef(null),w=K.useRef(null),_=K.useRef(null),C=K.useRef(!1),[j,L]=K.useState([]),W=K.useRef(yt());K.useEffect(()=>()=>{W.current.stop()},[]);const q=K.useCallback(async()=>{if(!_.current||_.current.getStrokeData().length===0||C.current)return;const ee=mt();if(ee){C.current=!0;try{const ue=[..._.current.getStrokeData()],$=await ee.recognize(ue);L($)}catch(ue){console.error("识别笔迹失败:",ue)}finally{C.current=!1}}else console.warn("手写识别服务不可用")},[]),G=K.useCallback(()=>{E.current&&(_.current&&_.current.destroy(),_.current=new vy(E.current,{onDrawEnd:q}))},[q]),[B,R]=Ka(w);K.useLayoutEffect(()=>{if(R&&a)return G(),()=>{_.current&&_.current.destroy()}},[R,a,G]);function X(){_.current&&_.current.clearCanvas()}function Q(ee){l({key:ee}),L([]),X()}function J(ee,ue){var $,ge;ee.preventDefault(),(ge=($=ee.currentTarget).setPointerCapture)==null||ge.call($,ee.pointerId),W.current.start(ue)}function Z(){W.current.stop()}function Ee(ee,ue){ee.preventDefault(),ue()}function fe(ee){ee.preventDefault()}return A.jsxs("div",{className:"handwriting-input",children:[A.jsx(Ha,{candidates:j,onSelect:Q}),A.jsx("div",{ref:w,className:"handwriting-content",children:R?A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"handwriting-buttons",children:[A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ee=>J(ee,()=>l({key:"。"})),onPointerUp:Z,onPointerLeave:Z,onPointerCancel:Z,onContextMenu:fe,children:"。"}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ee=>J(ee,()=>l({key:"?"})),onPointerUp:Z,onPointerLeave:Z,onPointerCancel:Z,onContextMenu:fe,children:"?"}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ee=>J(ee,()=>l({key:"!"})),onPointerUp:Z,onPointerLeave:Z,onPointerCancel:Z,onContextMenu:fe,children:"!"}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ee=>J(ee,()=>l({key:"、"})),onPointerUp:Z,onPointerLeave:Z,onPointerCancel:Z,onContextMenu:fe,children:"、"})]}),A.jsx("div",{className:"handwriting-canvas-container",children:a?A.jsx("canvas",{ref:E,className:"handwriting-canvas",width:R,height:R}):A.jsxs("div",{className:"handwriting-loading",style:{width:`${R}px`,height:`${R}px`},children:[A.jsx("div",{className:"loading-text",children:"正在加载手写识别..."}),A.jsx("div",{className:"progress-bar",children:A.jsx("div",{className:"progress-fill",style:{width:`${s*100}%`}})}),A.jsxs("div",{className:"progress-text",children:[Math.round(s*100),"%"]})]})}),A.jsxs("div",{className:"handwriting-buttons",children:[A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ee=>J(ee,()=>l({key:"delete",isControl:!0})),onPointerUp:Z,onPointerLeave:Z,onPointerCancel:Z,onContextMenu:fe,children:A.jsx("img",{src:ur,alt:"删除"})}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ee=>Ee(ee,f),onContextMenu:fe,children:"返回"}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ee=>J(ee,()=>l({key:","})),onPointerUp:Z,onPointerLeave:Z,onPointerCancel:Z,onContextMenu:fe,children:","}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ee=>J(ee,()=>l({key:"enter",isControl:!0})),onPointerUp:Z,onPointerLeave:Z,onPointerCancel:Z,onContextMenu:fe,children:A.jsx("img",{src:cr,alt:"回车"})})]})]}):null})]})},Py="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M6,18H18V16H6M12,8.41L16.59,13L18,11.58L12,5.58L6,11.58L7.41,13L12,8.41Z'%20/%3e%3c/svg%3e",Ya="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M3%2015H5V19H19V15H21V19C21%2020.1%2020.1%2021%2019%2021H5C3.9%2021%203%2020.1%203%2019V15Z'%20/%3e%3c/svg%3e",Cy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z'%20/%3e%3c/svg%3e",Oy=({candidates:a,onSelect:s,onClose:l})=>{function f(w){s(w)}function E(){l()}return A.jsxs("div",{className:"zhk-selection",children:[A.jsx("div",{className:"zhk-selection__list",children:a.map(w=>A.jsx("div",{className:"zhk-selection__text",onClick:()=>f(w),children:w},w))}),A.jsx("div",{className:"zhk-selection__func",children:A.jsx("button",{className:"zhk-selection__func-btn",onClick:E,children:"返回"})})]})},jy=({currentPinyin:a,onInput:s,setCurrentPinyin:l})=>{const f=K.useMemo(()=>new dy,[]),[E,w]=K.useState([]),[_,C]=K.useState(!1);K.useEffect(()=>{async function W(){w(await f.processInput(a))}W()},[a,f]);const j=K.useMemo(()=>E.slice(0,30),[E]);function L(W){f.selectCandidate(W),s(W),l(""),C(!1)}return A.jsxs("div",{className:"zhk-candidate",children:[A.jsxs("div",{className:"zhk-candidate__container",children:[a&&A.jsx("div",{className:"zhk-candidate__pinyin",children:a}),A.jsxs("div",{className:"zhk-candidate__bottom-container",children:[E.length>0&&A.jsx(Ha,{candidates:j,onSelect:L}),E.length>0&&A.jsx("button",{className:"zhk-candidate__more",onClick:()=>C(!0),children:A.jsx("img",{src:Cy,alt:"更多"})})]})]}),_&&A.jsx(Oy,{candidates:E,onSelect:L,onClose:()=>C(!1)})]})},Ty=({enableHandwriting:a,mode:s,onKey:l,setMode:f})=>{const[E,w]=K.useState(!1),[_,C]=K.useState(""),j=K.useRef(yt());K.useEffect(()=>()=>{j.current.stop()},[]);const L=K.useMemo(()=>s==="zh",[s]),W=K.useMemo(()=>L?!0:E,[L,E]);function q(oe,xe=!1){l({key:oe,isControl:xe})}function G(){L?f("hand"):w(!E)}function B(){f("num")}function R(){f("symbol")}const X=["1","2","3","4","5","6","7","8","9","0"],Q=[["q","w","e","r","t","y","u","i","o","p"],["a","s","d","f","g","h","j","k","l"],["z","x","c","v","b","n","m"]];function J(){if(s==="zh"&&_){C(_.slice(0,-1));return}q("delete",!0)}function Z(oe){if(s==="zh"){C(_+oe);return}const xe=E?oe.toUpperCase():oe;q(xe)}function Ee(){f(s==="zh"?"en":"zh")}const fe=K.useMemo(()=>a?"手写":"-",[a]),ee=K.useMemo(()=>!a,[a]);function ue(oe,xe){var ke,le;oe.preventDefault(),(le=(ke=oe.currentTarget).setPointerCapture)==null||le.call(ke,oe.pointerId),j.current.start(xe)}function $(){j.current.stop()}function ge(oe){oe.preventDefault()}return A.jsxs("div",{className:"zhk-base",children:[A.jsx("div",{className:"zhk-base__row",children:s==="zh"?A.jsx(jy,{currentPinyin:_,onInput:oe=>q(oe,!1),onKey:l,setCurrentPinyin:C}):X.map(oe=>A.jsx("button",{className:"zhk-base__key zhk-base__key--letter",onPointerDown:xe=>ue(xe,()=>Z(oe)),onPointerUp:$,onPointerLeave:$,onPointerCancel:$,onContextMenu:ge,children:oe},`number-${oe}`))}),Q.map((oe,xe)=>A.jsxs("div",{className:"zhk-base__row",children:[xe===2&&A.jsx("button",{className:`zhk-base__key zhk-base__key--function zhk-base__key--shift ${!L&&E?"zhk-base__key--active":""} ${L&&ee?"zhk-base__key--disabled":""}`,disabled:L&&ee,onClick:G,onContextMenu:ge,children:L?fe:A.jsx("img",{src:Py,className:"zhk-base__key-icon",alt:"Shift"})}),oe.map(ke=>A.jsx("button",{className:"zhk-base__key zhk-base__key--letter",onPointerDown:le=>ue(le,()=>Z(ke)),onPointerUp:$,onPointerLeave:$,onPointerCancel:$,onContextMenu:ge,children:W?ke.toUpperCase():ke},ke)),xe===2&&A.jsx("button",{className:"zhk-base__key zhk-base__key--function zhk-base__key--delete",onPointerDown:ke=>ue(ke,()=>J()),onPointerUp:$,onPointerLeave:$,onPointerCancel:$,onContextMenu:ge,children:A.jsx("img",{src:ur,className:"zhk-base__key-icon",alt:"Delete"})})]},`row-${oe.join("")}`)),A.jsxs("div",{className:"zhk-base__row",children:[A.jsx("button",{className:"zhk-base__key zhk-base__key--function",onClick:R,onContextMenu:ge,children:"符"}),A.jsx("button",{className:"zhk-base__key zhk-base__key--function",onClick:B,onContextMenu:ge,children:"123"}),A.jsx("button",{className:"zhk-base__key",onPointerDown:oe=>ue(oe,()=>q(",")),onPointerUp:$,onPointerLeave:$,onPointerCancel:$,onContextMenu:ge,children:","}),A.jsx("button",{className:"zhk-base__key zhk-base__key--space",onPointerDown:oe=>ue(oe,()=>q(" ")),onPointerUp:$,onPointerLeave:$,onPointerCancel:$,onContextMenu:ge,children:A.jsx("img",{src:Ya,className:"zhk-base__key-icon",alt:"Space"})}),A.jsx("button",{className:"zhk-base__key",onPointerDown:oe=>ue(oe,()=>q("。")),onPointerUp:$,onPointerLeave:$,onPointerCancel:$,onContextMenu:ge,children:"。"}),A.jsxs("button",{className:"zhk-base__key zhk-base__key--function",onClick:Ee,onContextMenu:ge,children:[A.jsx("span",{className:"zhk-base__toggle-main",children:s==="zh"?"中":"英"}),A.jsxs("span",{className:"zhk-base__toggle-sub",children:["/",s==="zh"?"英":"中"]})]}),A.jsx("button",{className:"zhk-base__key zhk-base__key--function",onPointerDown:oe=>ue(oe,()=>q("enter",!0)),onPointerUp:$,onPointerLeave:$,onPointerCancel:$,onContextMenu:ge,children:A.jsx("img",{src:cr,className:"zhk-base__key-icon",alt:"Enter"})})]})]})},Ay=[["1","2","3"],["4","5","6"],["7","8","9"],["back","0","space"]],Ry=({onKey:a,onExit:s,keyboardRows:l=Ay})=>{const f=K.useRef(yt());K.useEffect(()=>()=>{f.current.stop()},[]);const E=[{key:"delete",icon:ur,text:"",alt:"Delete"},{key:".",icon:"",text:".",alt:"."},{key:"@",icon:"",text:"@",alt:"@"},{key:"enter",icon:cr,text:"",alt:"Enter"}];function w(B){a({key:B})}function _(B,R=!0){a({key:B,isControl:R})}function C(){s()}function j(B,R){var X,Q;B.preventDefault(),(Q=(X=B.currentTarget).setPointerCapture)==null||Q.call(X,B.pointerId),f.current.start(R)}function L(){f.current.stop()}function W(B,R){B.preventDefault(),R()}function q(B){B.preventDefault()}function G(B){return B==="back"?C:B==="space"?()=>w(" "):()=>w(B)}return A.jsx("div",{className:"num-keyboard",children:A.jsxs("div",{className:"num-keyboard__container",children:[A.jsx("div",{className:"num-keyboard__left",children:A.jsx("div",{className:"num-keyboard__rows",children:l.map(B=>A.jsx("div",{className:"num-keyboard__row",children:B.map(R=>A.jsx("button",{className:`num-keyboard__key ${R==="back"?"num-keyboard__key--back":""} ${R==="space"?"num-keyboard__key--space":""}`,onPointerDown:X=>{const Q=G(R);if(R==="back"){W(X,Q);return}j(X,Q)},onPointerUp:L,onPointerLeave:L,onPointerCancel:L,onContextMenu:q,children:R==="back"?"返回":R==="space"?A.jsx("img",{src:Ya,className:"zhk-base__key-icon",alt:"Space"}):R},`key-${B.join("")}-${R}`))},`row-${B.join("")}`))})}),A.jsx("div",{className:"num-keyboard__right",children:E.map(B=>A.jsx("button",{className:"num-keyboard__key num-keyboard__key--function",onPointerDown:R=>{if(B.key==="."||B.key==="@"){j(R,()=>w(B.key));return}j(R,()=>_(B.key))},onPointerUp:L,onPointerLeave:L,onPointerCancel:L,onContextMenu:q,children:B.icon?A.jsx("img",{src:B.icon,className:"num-keyboard__key-icon",alt:B.alt}):A.jsx("span",{children:B.text})},`func-${B.key}`))})]})})},Dy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M18,20V10H6V20H18M18,8A2,2%200%200,1%2020,10V20A2,2%200%200,1%2018,22H6C4.89,22%204,21.1%204,20V10A2,2%200%200,1%206,8H15V6A3,3%200%200,0%2012,3A3,3%200%200,0%209,6H7A5,5%200%200,1%2012,1A5,5%200%200,1%2017,6V8H18M12,17A2,2%200%200,1%2010,15A2,2%200%200,1%2012,13A2,2%200%200,1%2014,15A2,2%200%200,1%2012,17Z'%20/%3e%3c/svg%3e",Iy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M12,17C10.89,17%2010,16.1%2010,15C10,13.89%2010.89,13%2012,13A2,2%200%200,1%2014,15A2,2%200%200,1%2012,17M18,20V10H6V20H18M18,8A2,2%200%200,1%2020,10V20A2,2%200%200,1%2018,22H6C4.89,22%204,21.1%204,20V10C4,8.89%204.89,8%206,8H7V6A5,5%200%200,1%2012,1A5,5%200%200,1%2017,6V8H18M12,3A3,3%200%200,0%209,6V8H15V6A3,3%200%200,0%2012,3Z'%20/%3e%3c/svg%3e",Ny=({onKey:a,onExit:s})=>{const l="!@#$%^&*(){}[]<>/\\|:;\"',.?+-=_~`€£¥₹©®™°",f="!@#¥%…&*(){}[]<>/\|:;"',。?+-=_~·€£¥₹©®™°",[E,w]=K.useState("en"),_=K.useMemo(()=>E==="zh"?f:l,[E]),[C,j]=K.useState(!1),L=K.useRef(yt());K.useEffect(()=>()=>{L.current.stop()},[]);function W(J){a({key:J}),C||s()}function q(){s()}function G(){j(!C)}function B(J,Z){var Ee,fe;J.preventDefault(),(fe=(Ee=J.currentTarget).setPointerCapture)==null||fe.call(Ee,J.pointerId),L.current.start(Z)}function R(){L.current.stop()}function X(J,Z){J.preventDefault(),Z()}function Q(J){J.preventDefault()}return A.jsx("div",{className:"symbol-keyboard",children:A.jsxs("div",{className:"symbol-keyboard__content",children:[A.jsxs("div",{className:"symbol-keyboard__functions",children:[A.jsxs("div",{className:"symbol-keyboard__lang-selector",children:[A.jsx("button",{type:"button",className:`symbol-keyboard__lang-btn ${E==="zh"?"symbol-keyboard__lang-btn--active":""}`,onClick:()=>w("zh"),onContextMenu:Q,children:"中文"}),A.jsx("button",{className:`symbol-keyboard__lang-btn ${E==="en"?"symbol-keyboard__lang-btn--active":""}`,onClick:()=>w("en"),onContextMenu:Q,children:"英文"})]}),A.jsxs("div",{className:"symbol-keyboard__control-group",children:[A.jsx("button",{className:`symbol-keyboard__key symbol-keyboard__key--function symbol-keyboard__key--lock ${C?"symbol-keyboard__key--locked":""}`,onClick:G,onContextMenu:Q,children:C?A.jsx("img",{src:Iy,alt:"Lock closed"}):A.jsx("img",{src:Dy,alt:"Lock open"})}),A.jsx("button",{className:"symbol-keyboard__key symbol-keyboard__key--function symbol-keyboard__key--back",onClick:q,onContextMenu:Q,children:"返回"})]})]}),A.jsx("div",{className:"symbol-keyboard__symbols-container",children:A.jsx("div",{className:"symbol-keyboard__symbols-grid",children:_.split("").map(J=>A.jsx("button",{className:"symbol-keyboard__key",onPointerDown:Z=>{if(!C){X(Z,()=>W(J));return}B(Z,()=>W(J))},onPointerUp:R,onPointerLeave:R,onPointerCancel:R,onContextMenu:Q,children:J},`key-${J}`))})})]})})},zy=({defaultMode:a="en",enableHandwriting:s=!1,position:l="static",disableWhenNoFocus:f=!0,onKey:E,className:w,style:_,numKeys:C})=>{const[j,L]=K.useState(a),W=K.useRef(a),[q,G]=K.useState(null),B=K.useRef(null),R=Du(),[X,Q]=Ka(B),{recognizerInitialized:J,recognizerProgress:Z}=Ey(s);K.useEffect(()=>{(j==="en"||j==="zh")&&(W.current=j)},[j]);const[Ee,fe]=K.useState(!1),ee=K.useRef(null),ue=K.useCallback(()=>{if(!Q)return;const le=py(R,B.current,l);G(le)},[R,l,Q]),$=K.useMemo(()=>l==="static"||Un(R),[R,l]);K.useLayoutEffect(()=>{const le=ee.current!==R;$&&Q&&le&&(ee.current=R,ue())},[$,R,ue,Q]),K.useLayoutEffect(()=>{if(Q&&!Ee){ue();const le=setTimeout(()=>{fe(!0)},0);return()=>clearTimeout(le)}},[Q,Ee,ue]),K.useLayoutEffect(()=>{if(R&&Un(R)){const le=R.dataset.inputmode;L(Me=>le||Me)}},[R]);const ge=K.useMemo(()=>f===!1?!1:!Un(R),[f,R]),oe=K.useMemo(()=>{let le;return()=>{clearTimeout(le),le=setTimeout(ue,100)}},[ue]);ht("scroll",oe,window,{passive:!0}),ht("resize",oe,window,{passive:!0});const xe=K.useCallback(le=>{if(le.isControl)switch(le.key){case"delete":Un(R)&&by(R);break}else R&&Un(R)&&gy(R,le.key);E&&E(le)},[E,R]),ke=K.useCallback(()=>{L(W.current)},[]);return A.jsx("div",{ref:B,className:qa("zhk",{"zhk--floating":l==="float","zhk--bottom":l==="bottom","zhk--disabled":ge},w),style:{"--keyboard-height":`${Q}px`,...q,..._,display:$?void 0:"none",opacity:Ee?1:0},onMouseDown:le=>le.preventDefault(),children:ge||!$||!Q?A.jsx("div",{className:qa("zhk__disabled-overlay"),children:A.jsx("span",{children:"请选择输入框以启用键盘"})}):A.jsxs(A.Fragment,{children:[j==="hand"&&A.jsx(Sy,{recognizerInitialized:J,recognizerProgress:Z,onKey:xe,onExit:ke}),j==="num"&&A.jsx(Ry,{onKey:xe,onExit:ke,keyboardRows:C}),j==="symbol"&&A.jsx(Ny,{onKey:xe,onExit:ke}),(j==="en"||j==="zh")&&A.jsx(Ty,{mode:j,setMode:L,enableHandwriting:s,onKey:xe})]})})},Ga=a=>{const{position:s="static"}=a,l=A.jsx(zy,{...a});return s==="static"?l:_n.createPortal(l,document.body)};de.ZhKeyboard=Ga,de.default=Ga,de.getHandwritingRecognizer=mt,de.registerHandwritingRecognizer=ky,Object.defineProperties(de,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
56
+ */var ii;function Ry(){return ii||(ii=1,function(a){(function(){var s={}.hasOwnProperty;function l(){for(var k="",w=0;w<arguments.length;w++){var O=arguments[w];O&&(k=C(k,f(O)))}return k}function f(k){if(typeof k=="string"||typeof k=="number")return k;if(typeof k!="object")return"";if(Array.isArray(k))return l.apply(null,k);if(k.toString!==Object.prototype.toString&&!k.toString.toString().includes("[native code]"))return k.toString();var w="";for(var O in k)s.call(k,O)&&k[O]&&(w=C(w,O));return w}function C(k,w){return w?k?k+" "+w:k+w:k}a.exports?(l.default=l,a.exports=l):window.classNames=l})()}(Tr)),Tr.exports}var Ay=Ry();const oi=ca(Ay);let si=null;function Dy(a){si=a}function Ut(){return si}function Iy(a=!1){const[s,l]=U.useState(!1),[f,C]=U.useState(0);return U.useEffect(()=>{async function k(){const O=Ut();if(O)try{l(await O.initialize({onProgress:j=>{C(j)}}))}catch(j){console.error("初始化手写识别服务失败:",j),l(!1)}else console.warn("未注册手写识别服务"),l(!1)}async function w(){const O=Ut();if(O&&s)try{await O.close(),l(!1)}catch(j){console.error("关闭手写识别服务失败:",j)}}return a&&k(),()=>{w()}},[a,s]),{recognizerInitialized:s,recognizerProgress:f}}const Rr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M21,11H6.83L10.41,7.41L9,6L3,12L9,18L10.41,16.58L6.83,13H21V11Z'%20/%3e%3c/svg%3e",Ar="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M19,7V11H5.83L9.41,7.41L8,6L2,12L8,18L9.41,16.58L5.83,13H21V7H19Z'%20/%3e%3c/svg%3e",ui=({candidates:a,onSelect:s})=>{function l(f){s(f)}return A.jsx("div",{className:"zhk-candidate-list",children:a.map(f=>A.jsx("button",{className:"zhk-candidate-list__item",onClick:()=>l(f),children:f},`candidate-${f}`))})},Ny=({recognizerInitialized:a,recognizerProgress:s,onKey:l,onExit:f})=>{const C=U.useRef(null),k=U.useRef(null),w=U.useRef(null),O=U.useRef(!1),[j,M]=U.useState([]),G=U.useRef(Bt());U.useEffect(()=>()=>{G.current.stop()},[]);const q=U.useCallback(async()=>{if(!w.current||w.current.getStrokeData().length===0||O.current)return;const ae=Ut();if(ae){O.current=!0;try{const de=[...w.current.getStrokeData()],te=await ae.recognize(de);M(te)}catch(de){console.error("识别笔迹失败:",de)}finally{O.current=!1}}else console.warn("手写识别服务不可用")},[]),J=U.useCallback(()=>{C.current&&(w.current&&w.current.destroy(),w.current=new Ey(C.current,{onDrawEnd:q}))},[q]),[F,D]=ni(k);U.useLayoutEffect(()=>{if(D&&a)return J(),()=>{w.current&&w.current.destroy()}},[D,a,J]);function ee(){w.current&&w.current.clearCanvas()}function ne(ae){l({key:ae}),M([]),ee()}function $(ae,de){var te,Ce;ae.preventDefault(),(Ce=(te=ae.currentTarget).setPointerCapture)==null||Ce.call(te,ae.pointerId),G.current.start(de)}function Y(){G.current.stop()}function Re(ae,de){ae.preventDefault(),de()}function be(ae){ae.preventDefault()}return A.jsxs("div",{className:"handwriting-input",children:[A.jsx(ui,{candidates:j,onSelect:ne}),A.jsx("div",{ref:k,className:"handwriting-content",children:D?A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"handwriting-buttons",children:[A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ae=>$(ae,()=>l({key:"。"})),onPointerUp:Y,onPointerLeave:Y,onPointerCancel:Y,onContextMenu:be,children:"。"}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ae=>$(ae,()=>l({key:"?"})),onPointerUp:Y,onPointerLeave:Y,onPointerCancel:Y,onContextMenu:be,children:"?"}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ae=>$(ae,()=>l({key:"!"})),onPointerUp:Y,onPointerLeave:Y,onPointerCancel:Y,onContextMenu:be,children:"!"}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ae=>$(ae,()=>l({key:"、"})),onPointerUp:Y,onPointerLeave:Y,onPointerCancel:Y,onContextMenu:be,children:"、"})]}),A.jsx("div",{className:"handwriting-canvas-container",children:a?A.jsx("canvas",{ref:C,className:"handwriting-canvas",width:D,height:D}):A.jsxs("div",{className:"handwriting-loading",style:{width:`${D}px`,height:`${D}px`},children:[A.jsx("div",{className:"loading-text",children:"正在加载手写识别..."}),A.jsx("div",{className:"progress-bar",children:A.jsx("div",{className:"progress-fill",style:{width:`${s*100}%`}})}),A.jsxs("div",{className:"progress-text",children:[Math.round(s*100),"%"]})]})}),A.jsxs("div",{className:"handwriting-buttons",children:[A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ae=>$(ae,()=>l({key:"delete",isControl:!0})),onPointerUp:Y,onPointerLeave:Y,onPointerCancel:Y,onContextMenu:be,children:A.jsx("img",{src:Rr,alt:"删除"})}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ae=>Re(ae,f),onContextMenu:be,children:"返回"}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ae=>$(ae,()=>l({key:","})),onPointerUp:Y,onPointerLeave:Y,onPointerCancel:Y,onContextMenu:be,children:","}),A.jsx("button",{className:"handwriting-btn handwriting-btn--function",onPointerDown:ae=>$(ae,()=>l({key:"enter",isControl:!0})),onPointerUp:Y,onPointerLeave:Y,onPointerCancel:Y,onContextMenu:be,children:A.jsx("img",{src:Ar,alt:"回车"})})]})]}):null})]})},Ky="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M6,18H18V16H6M12,8.41L16.59,13L18,11.58L12,5.58L6,11.58L7.41,13L12,8.41Z'%20/%3e%3c/svg%3e",ci="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M3%2015H5V19H19V15H21V19C21%2020.1%2020.1%2021%2019%2021H5C3.9%2021%203%2020.1%203%2019V15Z'%20/%3e%3c/svg%3e",My="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z'%20/%3e%3c/svg%3e",zy=({candidates:a,onSelect:s,onClose:l})=>{function f(k){s(k)}function C(){l()}return A.jsxs("div",{className:"zhk-selection",children:[A.jsx("div",{className:"zhk-selection__list",children:a.map(k=>A.jsx("div",{className:"zhk-selection__text",onClick:()=>f(k),children:k},k))}),A.jsx("div",{className:"zhk-selection__func",children:A.jsx("button",{className:"zhk-selection__func-btn",onClick:C,children:"返回"})})]})},Ly=({currentPinyin:a,onInput:s,setCurrentPinyin:l})=>{const f=U.useMemo(()=>new ky,[]),[C,k]=U.useState([]),[w,O]=U.useState(!1);U.useEffect(()=>{async function G(){k(await f.processInput(a))}G()},[a,f]);const j=U.useMemo(()=>C.slice(0,30),[C]);function M(G){f.selectCandidate(G),s(G),l(""),O(!1)}return A.jsxs("div",{className:"zhk-candidate",children:[A.jsxs("div",{className:"zhk-candidate__container",children:[a&&A.jsx("div",{className:"zhk-candidate__pinyin",children:a}),A.jsxs("div",{className:"zhk-candidate__bottom-container",children:[C.length>0&&A.jsx(ui,{candidates:j,onSelect:M}),C.length>0&&A.jsx("button",{className:"zhk-candidate__more",onClick:()=>O(!0),children:A.jsx("img",{src:My,alt:"更多"})})]})]}),w&&A.jsx(zy,{candidates:C,onSelect:M,onClose:()=>O(!1)})]})},Fy=({enableHandwriting:a,mode:s,onKey:l,setMode:f})=>{const[C,k]=U.useState(!1),[w,O]=U.useState(""),j=U.useRef(Bt());U.useEffect(()=>()=>{j.current.stop()},[]);const M=U.useMemo(()=>s==="zh",[s]),G=U.useMemo(()=>M?!0:C,[M,C]);function q(le,je=!1){l({key:le,isControl:je})}function J(){M?f("hand"):k(!C)}function F(){f("num")}function D(){f("symbol")}const ee=["1","2","3","4","5","6","7","8","9","0"],ne=[["q","w","e","r","t","y","u","i","o","p"],["a","s","d","f","g","h","j","k","l"],["z","x","c","v","b","n","m"]];function $(){if(s==="zh"&&w){O(w.slice(0,-1));return}q("delete",!0)}function Y(le){if(s==="zh"){O(w+le);return}const je=C?le.toUpperCase():le;q(je)}function Re(){f(s==="zh"?"en":"zh")}const be=U.useMemo(()=>a?"手写":"-",[a]),ae=U.useMemo(()=>!a,[a]);function de(le,je){var Ae,ye;le.preventDefault(),(ye=(Ae=le.currentTarget).setPointerCapture)==null||ye.call(Ae,le.pointerId),j.current.start(je)}function te(){j.current.stop()}function Ce(le){le.preventDefault()}return A.jsxs("div",{className:"zhk-base",children:[A.jsx("div",{className:"zhk-base__row",children:s==="zh"?A.jsx(Ly,{currentPinyin:w,onInput:le=>q(le,!1),onKey:l,setCurrentPinyin:O}):ee.map(le=>A.jsx("button",{className:"zhk-base__key zhk-base__key--letter",onPointerDown:je=>de(je,()=>Y(le)),onPointerUp:te,onPointerLeave:te,onPointerCancel:te,onContextMenu:Ce,children:le},`number-${le}`))}),ne.map((le,je)=>A.jsxs("div",{className:"zhk-base__row",children:[je===2&&A.jsx("button",{className:`zhk-base__key zhk-base__key--function zhk-base__key--shift ${!M&&C?"zhk-base__key--active":""} ${M&&ae?"zhk-base__key--disabled":""}`,disabled:M&&ae,onClick:J,onContextMenu:Ce,children:M?be:A.jsx("img",{src:Ky,className:"zhk-base__key-icon",alt:"Shift"})}),le.map(Ae=>A.jsx("button",{className:"zhk-base__key zhk-base__key--letter",onPointerDown:ye=>de(ye,()=>Y(Ae)),onPointerUp:te,onPointerLeave:te,onPointerCancel:te,onContextMenu:Ce,children:G?Ae.toUpperCase():Ae},Ae)),je===2&&A.jsx("button",{className:"zhk-base__key zhk-base__key--function zhk-base__key--delete",onPointerDown:Ae=>de(Ae,()=>$()),onPointerUp:te,onPointerLeave:te,onPointerCancel:te,onContextMenu:Ce,children:A.jsx("img",{src:Rr,className:"zhk-base__key-icon",alt:"Delete"})})]},`row-${le.join("")}`)),A.jsxs("div",{className:"zhk-base__row",children:[A.jsx("button",{className:"zhk-base__key zhk-base__key--function",onClick:D,onContextMenu:Ce,children:"符"}),A.jsx("button",{className:"zhk-base__key zhk-base__key--function",onClick:F,onContextMenu:Ce,children:"123"}),A.jsx("button",{className:"zhk-base__key",onPointerDown:le=>de(le,()=>q(",")),onPointerUp:te,onPointerLeave:te,onPointerCancel:te,onContextMenu:Ce,children:","}),A.jsx("button",{className:"zhk-base__key zhk-base__key--space",onPointerDown:le=>de(le,()=>q(" ")),onPointerUp:te,onPointerLeave:te,onPointerCancel:te,onContextMenu:Ce,children:A.jsx("img",{src:ci,className:"zhk-base__key-icon",alt:"Space"})}),A.jsx("button",{className:"zhk-base__key",onPointerDown:le=>de(le,()=>q("。")),onPointerUp:te,onPointerLeave:te,onPointerCancel:te,onContextMenu:Ce,children:"。"}),A.jsxs("button",{className:"zhk-base__key zhk-base__key--function",onClick:Re,onContextMenu:Ce,children:[A.jsx("span",{className:"zhk-base__toggle-main",children:s==="zh"?"中":"英"}),A.jsxs("span",{className:"zhk-base__toggle-sub",children:["/",s==="zh"?"英":"中"]})]}),A.jsx("button",{className:"zhk-base__key zhk-base__key--function",onPointerDown:le=>de(le,()=>q("enter",!0)),onPointerUp:te,onPointerLeave:te,onPointerCancel:te,onContextMenu:Ce,children:A.jsx("img",{src:Ar,className:"zhk-base__key-icon",alt:"Enter"})})]})]})},By=[["1","2","3"],["4","5","6"],["7","8","9"],["back","0","space"]],Uy=({onKey:a,onExit:s,keyboardRows:l=By})=>{const f=U.useRef(Bt());U.useEffect(()=>()=>{f.current.stop()},[]);const C=[{key:"delete",icon:Rr,text:"",alt:"Delete"},{key:".",icon:"",text:".",alt:"."},{key:"@",icon:"",text:"@",alt:"@"},{key:"enter",icon:Ar,text:"",alt:"Enter"}];function k(F){a({key:F})}function w(F,D=!0){a({key:F,isControl:D})}function O(){s()}function j(F,D){var ee,ne;F.preventDefault(),(ne=(ee=F.currentTarget).setPointerCapture)==null||ne.call(ee,F.pointerId),f.current.start(D)}function M(){f.current.stop()}function G(F,D){F.preventDefault(),D()}function q(F){F.preventDefault()}function J(F){return F==="back"?O:F==="space"?()=>k(" "):()=>k(F)}return A.jsx("div",{className:"num-keyboard",children:A.jsxs("div",{className:"num-keyboard__container",children:[A.jsx("div",{className:"num-keyboard__left",children:A.jsx("div",{className:"num-keyboard__rows",children:l.map(F=>A.jsx("div",{className:"num-keyboard__row",children:F.map(D=>A.jsx("button",{className:`num-keyboard__key ${D==="back"?"num-keyboard__key--back":""} ${D==="space"?"num-keyboard__key--space":""}`,onPointerDown:ee=>{const ne=J(D);if(D==="back"){G(ee,ne);return}j(ee,ne)},onPointerUp:M,onPointerLeave:M,onPointerCancel:M,onContextMenu:q,children:D==="back"?"返回":D==="space"?A.jsx("img",{src:ci,className:"zhk-base__key-icon",alt:"Space"}):D},`key-${F.join("")}-${D}`))},`row-${F.join("")}`))})}),A.jsx("div",{className:"num-keyboard__right",children:C.map(F=>A.jsx("button",{className:"num-keyboard__key num-keyboard__key--function",onPointerDown:D=>{if(F.key==="."||F.key==="@"){j(D,()=>k(F.key));return}j(D,()=>w(F.key))},onPointerUp:M,onPointerLeave:M,onPointerCancel:M,onContextMenu:q,children:F.icon?A.jsx("img",{src:F.icon,className:"num-keyboard__key-icon",alt:F.alt}):A.jsx("span",{children:F.text})},`func-${F.key}`))})]})})},qy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M18,20V10H6V20H18M18,8A2,2%200%200,1%2020,10V20A2,2%200%200,1%2018,22H6C4.89,22%204,21.1%204,20V10A2,2%200%200,1%206,8H15V6A3,3%200%200,0%2012,3A3,3%200%200,0%209,6H7A5,5%200%200,1%2012,1A5,5%200%200,1%2017,6V8H18M12,17A2,2%200%200,1%2010,15A2,2%200%200,1%2012,13A2,2%200%200,1%2014,15A2,2%200%200,1%2012,17Z'%20/%3e%3c/svg%3e",Vy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M12,17C10.89,17%2010,16.1%2010,15C10,13.89%2010.89,13%2012,13A2,2%200%200,1%2014,15A2,2%200%200,1%2012,17M18,20V10H6V20H18M18,8A2,2%200%200,1%2020,10V20A2,2%200%200,1%2018,22H6C4.89,22%204,21.1%204,20V10C4,8.89%204.89,8%206,8H7V6A5,5%200%200,1%2012,1A5,5%200%200,1%2017,6V8H18M12,3A3,3%200%200,0%209,6V8H15V6A3,3%200%200,0%2012,3Z'%20/%3e%3c/svg%3e",Hy=({onKey:a,onExit:s})=>{const l="!@#$%^&*(){}[]<>/\\|:;\"',.?+-=_~`€£¥₹©®™°",f="!@#¥%…&*(){}[]<>/\|:;"',。?+-=_~·€£¥₹©®™°",[C,k]=U.useState("en"),w=U.useMemo(()=>C==="zh"?f:l,[C]),[O,j]=U.useState(!1),M=U.useRef(Bt());U.useEffect(()=>()=>{M.current.stop()},[]);function G($){a({key:$}),O||s()}function q(){s()}function J(){j(!O)}function F($,Y){var Re,be;$.preventDefault(),(be=(Re=$.currentTarget).setPointerCapture)==null||be.call(Re,$.pointerId),M.current.start(Y)}function D(){M.current.stop()}function ee($,Y){$.preventDefault(),Y()}function ne($){$.preventDefault()}return A.jsx("div",{className:"symbol-keyboard",children:A.jsxs("div",{className:"symbol-keyboard__content",children:[A.jsxs("div",{className:"symbol-keyboard__functions",children:[A.jsxs("div",{className:"symbol-keyboard__lang-selector",children:[A.jsx("button",{type:"button",className:`symbol-keyboard__lang-btn ${C==="zh"?"symbol-keyboard__lang-btn--active":""}`,onClick:()=>k("zh"),onContextMenu:ne,children:"中文"}),A.jsx("button",{className:`symbol-keyboard__lang-btn ${C==="en"?"symbol-keyboard__lang-btn--active":""}`,onClick:()=>k("en"),onContextMenu:ne,children:"英文"})]}),A.jsxs("div",{className:"symbol-keyboard__control-group",children:[A.jsx("button",{className:`symbol-keyboard__key symbol-keyboard__key--function symbol-keyboard__key--lock ${O?"symbol-keyboard__key--locked":""}`,onClick:J,onContextMenu:ne,children:O?A.jsx("img",{src:Vy,alt:"Lock closed"}):A.jsx("img",{src:qy,alt:"Lock open"})}),A.jsx("button",{className:"symbol-keyboard__key symbol-keyboard__key--function symbol-keyboard__key--back",onClick:q,onContextMenu:ne,children:"返回"})]})]}),A.jsx("div",{className:"symbol-keyboard__symbols-container",children:A.jsx("div",{className:"symbol-keyboard__symbols-grid",children:w.split("").map($=>A.jsx("button",{className:"symbol-keyboard__key",onPointerDown:Y=>{if(!O){ee(Y,()=>G($));return}F(Y,()=>G($))},onPointerUp:D,onPointerLeave:D,onPointerCancel:D,onContextMenu:ne,children:$},`key-${$}`))})})]})})},Wy=({defaultMode:a="en",enableHandwriting:s=!1,position:l="static",disableWhenNoFocus:f=!0,onKey:C,className:k,style:w,numKeys:O})=>{const[j,M]=U.useState(a),G=U.useRef(a),[q,J]=U.useState(null),F=U.useRef(null),D=qu(),[ee,ne]=ni(F),{recognizerInitialized:$,recognizerProgress:Y}=Iy(s);U.useEffect(()=>{(j==="en"||j==="zh")&&(G.current=j)},[j]);const[Re,be]=U.useState(!1),ae=U.useRef(null),de=U.useCallback(()=>{if(!ne)return;const ye=Sy(D,F.current,l);J(ye)},[D,l,ne]),te=U.useMemo(()=>l==="static"||pt(D),[D,l]);U.useLayoutEffect(()=>{const ye=ae.current!==D;te&&ne&&ye&&(ae.current=D,de())},[te,D,de,ne]),U.useLayoutEffect(()=>{if(ne&&!Re){de();const ye=setTimeout(()=>{be(!0)},0);return()=>clearTimeout(ye)}},[ne,Re,de]),U.useLayoutEffect(()=>{if(D&&pt(D)){const ye=D.dataset.inputmode;M(De=>ye||De)}},[D]);const Ce=U.useMemo(()=>f===!1?!1:!pt(D),[f,D]),le=U.useMemo(()=>{let ye;return()=>{clearTimeout(ye),ye=setTimeout(de,100)}},[de]);Mt("scroll",le,window,{passive:!0}),Mt("resize",le,window,{passive:!0});const je=U.useCallback(ye=>{if(ye.isControl)switch(ye.key){case"delete":pt(D)&&jy(D);break}else D&&pt(D)&&Oy(D,ye.key);C&&C(ye)},[C,D]),Ae=U.useCallback(()=>{M(G.current)},[]);return A.jsx("div",{ref:F,className:oi("zhk",{"zhk--floating":l==="float","zhk--bottom":l==="bottom","zhk--disabled":Ce},k),style:{"--keyboard-height":`${ne}px`,...q,...w,display:te?void 0:"none",opacity:Re?1:0},onMouseDown:ye=>ye.preventDefault(),children:Ce||!te||!ne?A.jsx("div",{className:oi("zhk__disabled-overlay"),children:A.jsx("span",{children:"请选择输入框以启用键盘"})}):A.jsxs(A.Fragment,{children:[j==="hand"&&A.jsx(Ny,{recognizerInitialized:$,recognizerProgress:Y,onKey:je,onExit:Ae}),j==="num"&&A.jsx(Uy,{onKey:je,onExit:Ae,keyboardRows:O}),j==="symbol"&&A.jsx(Hy,{onKey:je,onExit:Ae}),(j==="en"||j==="zh")&&A.jsx(Fy,{mode:j,setMode:M,enableHandwriting:s,onKey:je})]})})},li=a=>{const{position:s="static"}=a,l=A.jsx(Wy,{...a});return s==="static"?l:zn.createPortal(l,document.body)};xe.ZhKeyboard=li,xe.default=li,xe.getHandwritingRecognizer=Ut,xe.registerHandwritingRecognizer=Dy,Object.defineProperties(xe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
49
57
  //# sourceMappingURL=zh-keyboard-react.umd.cjs.map