@rainte/ant 0.0.32 → 0.0.33

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,86 +1,87 @@
1
- (function(it,mt){typeof exports=="object"&&typeof module<"u"?mt(exports,require("react"),require("@ant-design/pro-components"),require("antd")):typeof define=="function"&&define.amd?define(["exports","react","@ant-design/pro-components","antd"],mt):(it=typeof globalThis<"u"?globalThis:it||self,mt(it["@rainte/react"]={},it.React,it.ProComponents,it.antd))})(this,function(it,mt,qr,wi){"use strict";var Ew=Object.defineProperty;var Ow=(it,mt,qr)=>mt in it?Ew(it,mt,{enumerable:!0,configurable:!0,writable:!0,value:qr}):it[mt]=qr;var Ae=(it,mt,qr)=>Ow(it,typeof mt!="symbol"?mt+"":mt,qr);function Kh(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var nr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Do(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ps={exports:{}},Xi={};/**
1
+ (function(tt,dt){typeof exports=="object"&&typeof module<"u"?dt(exports,require("react"),require("@ant-design/pro-components"),require("antd")):typeof define=="function"&&define.amd?define(["exports","react","@ant-design/pro-components","antd"],dt):(tt=typeof globalThis<"u"?globalThis:tt||self,dt(tt["@rainte/react"]={},tt.React,tt.ProComponents,tt.antd))})(this,function(tt,dt,Or,pi){"use strict";var Iw=Object.defineProperty;var $w=(tt,dt,Or)=>dt in tt?Iw(tt,dt,{enumerable:!0,configurable:!0,writable:!0,value:Or}):tt[dt]=Or;var Te=(tt,dt,Or)=>$w(tt,typeof dt!="symbol"?dt+"":dt,Or);function Bh(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var zn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $o(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ps={exports:{}},Ji={};/**
2
2
  * @license React
3
- * react-jsx-runtime.production.min.js
3
+ * react-jsx-runtime.production.js
4
4
  *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
5
+ * Copyright (c) Meta Platforms, Inc. and 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 Tl;function Hh(){if(Tl)return Xi;Tl=1;var r=mt,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(u,f,d){var m,v={},y=null,x=null;d!==void 0&&(y=""+d),f.key!==void 0&&(y=""+f.key),f.ref!==void 0&&(x=f.ref);for(m in f)n.call(f,m)&&!s.hasOwnProperty(m)&&(v[m]=f[m]);if(u&&u.defaultProps)for(m in f=u.defaultProps,f)v[m]===void 0&&(v[m]=f[m]);return{$$typeof:e,type:u,key:y,ref:x,props:v,_owner:i.current}}return Xi.Fragment=t,Xi.jsx=a,Xi.jsxs=a,Xi}var Qi={},_l;function zh(){if(_l)return Qi;_l=1;var r={};/**
9
+ */var Tl;function Uh(){if(Tl)return Ji;Tl=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,i,s){var a=null;if(s!==void 0&&(a=""+s),i.key!==void 0&&(a=""+i.key),"key"in i){s={};for(var u in i)u!=="key"&&(s[u]=i[u])}else s=i;return i=s.ref,{$$typeof:r,type:n,key:a,ref:i!==void 0?i:null,props:s}}return Ji.Fragment=e,Ji.jsx=t,Ji.jsxs=t,Ji}var Zi={},_l;function Fh(){if(_l)return Zi;_l=1;var r={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
13
+ * Copyright (c) Meta Platforms, Inc. and 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
- */return r.NODE_ENV!=="production"&&function(){var e=mt,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),O=Symbol.iterator,N="@@iterator";function M(L){if(L===null||typeof L!="object")return null;var oe=O&&L[O]||L[N];return typeof oe=="function"?oe:null}var W=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Z(L){{for(var oe=arguments.length,we=new Array(oe>1?oe-1:0),qe=1;qe<oe;qe++)we[qe-1]=arguments[qe];de("error",L,we)}}function de(L,oe,we){{var qe=W.ReactDebugCurrentFrame,$e=qe.getStackAddendum();$e!==""&&(oe+="%s",we=we.concat([$e]));var rt=we.map(function(Be){return String(Be)});rt.unshift("Warning: "+oe),Function.prototype.apply.call(console[L],console,rt)}}var ue=!1,ce=!1,ne=!1,re=!1,xe=!1,Se;Se=Symbol.for("react.module.reference");function S(L){return!!(typeof L=="string"||typeof L=="function"||L===i||L===a||xe||L===s||L===m||L===v||re||L===A||ue||ce||ne||typeof L=="object"&&L!==null&&(L.$$typeof===x||L.$$typeof===y||L.$$typeof===u||L.$$typeof===f||L.$$typeof===d||L.$$typeof===Se||L.getModuleId!==void 0))}function G(L,oe,we){var qe=L.displayName;if(qe)return qe;var $e=oe.displayName||oe.name||"";return $e!==""?we+"("+$e+")":we}function P(L){return L.displayName||"Context"}function V(L){if(L==null)return null;if(typeof L.tag=="number"&&Z("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof L=="function")return L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case i:return"Fragment";case n:return"Portal";case a:return"Profiler";case s:return"StrictMode";case m:return"Suspense";case v:return"SuspenseList"}if(typeof L=="object")switch(L.$$typeof){case f:var oe=L;return P(oe)+".Consumer";case u:var we=L;return P(we._context)+".Provider";case d:return G(L,L.render,"ForwardRef");case y:var qe=L.displayName||null;return qe!==null?qe:V(L.type)||"Memo";case x:{var $e=L,rt=$e._payload,Be=$e._init;try{return V(Be(rt))}catch{return null}}}return null}var E=Object.assign,T=0,D,U,J,z,le,ve,pe;function Ne(){}Ne.__reactDisabledLog=!0;function Oe(){{if(T===0){D=console.log,U=console.info,J=console.warn,z=console.error,le=console.group,ve=console.groupCollapsed,pe=console.groupEnd;var L={configurable:!0,enumerable:!0,value:Ne,writable:!0};Object.defineProperties(console,{info:L,log:L,warn:L,error:L,group:L,groupCollapsed:L,groupEnd:L})}T++}}function Ke(){{if(T--,T===0){var L={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:E({},L,{value:D}),info:E({},L,{value:U}),warn:E({},L,{value:J}),error:E({},L,{value:z}),group:E({},L,{value:le}),groupCollapsed:E({},L,{value:ve}),groupEnd:E({},L,{value:pe})})}T<0&&Z("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var We=W.ReactCurrentDispatcher,je;function ae(L,oe,we){{if(je===void 0)try{throw Error()}catch($e){var qe=$e.stack.trim().match(/\n( *(at )?)/);je=qe&&qe[1]||""}return`
18
- `+je+L}}var Ie=!1,De;{var Te=typeof WeakMap=="function"?WeakMap:Map;De=new Te}function Ue(L,oe){if(!L||Ie)return"";{var we=De.get(L);if(we!==void 0)return we}var qe;Ie=!0;var $e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var rt;rt=We.current,We.current=null,Oe();try{if(oe){var Be=function(){throw Error()};if(Object.defineProperty(Be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Be,[])}catch(Ot){qe=Ot}Reflect.construct(L,[],Be)}else{try{Be.call()}catch(Ot){qe=Ot}L.call(Be.prototype)}}else{try{throw Error()}catch(Ot){qe=Ot}L()}}catch(Ot){if(Ot&&qe&&typeof Ot.stack=="string"){for(var He=Ot.stack.split(`
19
- `),ft=qe.stack.split(`
20
- `),ct=He.length-1,Je=ft.length-1;ct>=1&&Je>=0&&He[ct]!==ft[Je];)Je--;for(;ct>=1&&Je>=0;ct--,Je--)if(He[ct]!==ft[Je]){if(ct!==1||Je!==1)do if(ct--,Je--,Je<0||He[ct]!==ft[Je]){var Xe=`
21
- `+He[ct].replace(" at new "," at ");return L.displayName&&Xe.includes("<anonymous>")&&(Xe=Xe.replace("<anonymous>",L.displayName)),typeof L=="function"&&De.set(L,Xe),Xe}while(ct>=1&&Je>=0);break}}}finally{Ie=!1,We.current=rt,Ke(),Error.prepareStackTrace=$e}var kt=L?L.displayName||L.name:"",Et=kt?ae(kt):"";return typeof L=="function"&&De.set(L,Et),Et}function ut(L,oe,we){return Ue(L,!1)}function ot(L){var oe=L.prototype;return!!(oe&&oe.isReactComponent)}function Ht(L,oe,we){if(L==null)return"";if(typeof L=="function")return Ue(L,ot(L));if(typeof L=="string")return ae(L);switch(L){case m:return ae("Suspense");case v:return ae("SuspenseList")}if(typeof L=="object")switch(L.$$typeof){case d:return ut(L.render);case y:return Ht(L.type,oe,we);case x:{var qe=L,$e=qe._payload,rt=qe._init;try{return Ht(rt($e),oe,we)}catch{}}}return""}var zt=Object.prototype.hasOwnProperty,Rn={},kn=W.ReactDebugCurrentFrame;function Xt(L){if(L){var oe=L._owner,we=Ht(L.type,L._source,oe?oe.type:null);kn.setExtraStackFrame(we)}else kn.setExtraStackFrame(null)}function Ct(L,oe,we,qe,$e){{var rt=Function.call.bind(zt);for(var Be in L)if(rt(L,Be)){var He=void 0;try{if(typeof L[Be]!="function"){var ft=Error((qe||"React class")+": "+we+" type `"+Be+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof L[Be]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ft.name="Invariant Violation",ft}He=L[Be](oe,Be,qe,we,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ct){He=ct}He&&!(He instanceof Error)&&(Xt($e),Z("%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).",qe||"React class",we,Be,typeof He),Xt(null)),He instanceof Error&&!(He.message in Rn)&&(Rn[He.message]=!0,Xt($e),Z("Failed %s type: %s",we,He.message),Xt(null))}}}var Nr=Array.isArray;function sn(L){return Nr(L)}function Qt(L){{var oe=typeof Symbol=="function"&&Symbol.toStringTag,we=oe&&L[Symbol.toStringTag]||L.constructor.name||"Object";return we}}function on(L){try{return an(L),!1}catch{return!0}}function an(L){return""+L}function Lt(L){if(on(L))return Z("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qt(L)),an(L)}var gn=W.ReactCurrentOwner,mn={key:!0,ref:!0,__self:!0,__source:!0},Nt,Pn;function ln(L){if(zt.call(L,"ref")){var oe=Object.getOwnPropertyDescriptor(L,"ref").get;if(oe&&oe.isReactWarning)return!1}return L.ref!==void 0}function fr(L){if(zt.call(L,"key")){var oe=Object.getOwnPropertyDescriptor(L,"key").get;if(oe&&oe.isReactWarning)return!1}return L.key!==void 0}function Zn(L,oe){typeof L.ref=="string"&&gn.current}function $t(L,oe){{var we=function(){Nt||(Nt=!0,Z("%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)",oe))};we.isReactWarning=!0,Object.defineProperty(L,"key",{get:we,configurable:!0})}}function Le(L,oe){{var we=function(){Pn||(Pn=!0,Z("%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)",oe))};we.isReactWarning=!0,Object.defineProperty(L,"ref",{get:we,configurable:!0})}}var un=function(L,oe,we,qe,$e,rt,Be){var He={$$typeof:t,type:L,key:oe,ref:we,props:Be,_owner:rt};return He._store={},Object.defineProperty(He._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(He,"_self",{configurable:!1,enumerable:!1,writable:!1,value:qe}),Object.defineProperty(He,"_source",{configurable:!1,enumerable:!1,writable:!1,value:$e}),Object.freeze&&(Object.freeze(He.props),Object.freeze(He)),He};function Mt(L,oe,we,qe,$e){{var rt,Be={},He=null,ft=null;we!==void 0&&(Lt(we),He=""+we),fr(oe)&&(Lt(oe.key),He=""+oe.key),ln(oe)&&(ft=oe.ref,Zn(oe,$e));for(rt in oe)zt.call(oe,rt)&&!mn.hasOwnProperty(rt)&&(Be[rt]=oe[rt]);if(L&&L.defaultProps){var ct=L.defaultProps;for(rt in ct)Be[rt]===void 0&&(Be[rt]=ct[rt])}if(He||ft){var Je=typeof L=="function"?L.displayName||L.name||"Unknown":L;He&&$t(Be,Je),ft&&Le(Be,Je)}return un(L,He,ft,$e,qe,gn.current,Be)}}var Tt=W.ReactCurrentOwner,me=W.ReactDebugCurrentFrame;function Vt(L){if(L){var oe=L._owner,we=Ht(L.type,L._source,oe?oe.type:null);me.setExtraStackFrame(we)}else me.setExtraStackFrame(null)}var cn;cn=!1;function yn(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function bn(){{if(Tt.current){var L=V(Tt.current.type);if(L)return`
22
-
23
- Check the render method of \``+L+"`."}return""}}function Xn(L){return""}var hr={};function Cr(L){{var oe=bn();if(!oe){var we=typeof L=="string"?L:L.displayName||L.name;we&&(oe=`
24
-
25
- Check the top-level render call using <`+we+">.")}return oe}}function Rt(L,oe){{if(!L._store||L._store.validated||L.key!=null)return;L._store.validated=!0;var we=Cr(oe);if(hr[we])return;hr[we]=!0;var qe="";L&&L._owner&&L._owner!==Tt.current&&(qe=" It was passed a child from "+V(L._owner.type)+"."),Vt(L),Z('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',we,qe),Vt(null)}}function fn(L,oe){{if(typeof L!="object")return;if(sn(L))for(var we=0;we<L.length;we++){var qe=L[we];yn(qe)&&Rt(qe,oe)}else if(yn(L))L._store&&(L._store.validated=!0);else if(L){var $e=M(L);if(typeof $e=="function"&&$e!==L.entries)for(var rt=$e.call(L),Be;!(Be=rt.next()).done;)yn(Be.value)&&Rt(Be.value,oe)}}}function en(L){{var oe=L.type;if(oe==null||typeof oe=="string")return;var we;if(typeof oe=="function")we=oe.propTypes;else if(typeof oe=="object"&&(oe.$$typeof===d||oe.$$typeof===y))we=oe.propTypes;else return;if(we){var qe=V(oe);Ct(we,L.props,"prop",qe,L)}else if(oe.PropTypes!==void 0&&!cn){cn=!0;var $e=V(oe);Z("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",$e||"Unknown")}typeof oe.getDefaultProps=="function"&&!oe.getDefaultProps.isReactClassApproved&&Z("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dr(L){{for(var oe=Object.keys(L.props),we=0;we<oe.length;we++){var qe=oe[we];if(qe!=="children"&&qe!=="key"){Vt(L),Z("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",qe),Vt(null);break}}L.ref!==null&&(Vt(L),Z("Invalid attribute `ref` supplied to `React.Fragment`."),Vt(null))}}var at={};function pt(L,oe,we,qe,$e,rt){{var Be=S(L);if(!Be){var He="";(L===void 0||typeof L=="object"&&L!==null&&Object.keys(L).length===0)&&(He+=" 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 ft=Xn();ft?He+=ft:He+=bn();var ct;L===null?ct="null":sn(L)?ct="array":L!==void 0&&L.$$typeof===t?(ct="<"+(V(L.type)||"Unknown")+" />",He=" Did you accidentally export a JSX literal instead of a component?"):ct=typeof L,Z("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ct,He)}var Je=Mt(L,oe,we,$e,rt);if(Je==null)return Je;if(Be){var Xe=oe.children;if(Xe!==void 0)if(qe)if(sn(Xe)){for(var kt=0;kt<Xe.length;kt++)fn(Xe[kt],L);Object.freeze&&Object.freeze(Xe)}else Z("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(Xe,L)}if(zt.call(oe,"key")){var Et=V(L),Ot=Object.keys(oe).filter(function(gr){return gr!=="key"}),hn=Ot.length>0?"{key: someKey, "+Ot.join(": ..., ")+": ...}":"{key: someKey}";if(!at[Et+hn]){var vn=Ot.length>0?"{"+Ot.join(": ..., ")+": ...}":"{}";Z(`A props object containing a "key" prop is being spread into JSX:
17
+ */return r.NODE_ENV!=="production"&&function(){function e(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===J?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case ne:return"Fragment";case ue:return"Portal";case ve:return"Profiler";case re:return"StrictMode";case R:return"Suspense";case V:return"SuspenseList"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case O:return(P.displayName||"Context")+".Provider";case Ee:return(P._context.displayName||"Context")+".Consumer";case W:var _e=P.render;return P=P.displayName,P||(P=_e.displayName||_e.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case S:return _e=P.displayName||null,_e!==null?_e:e(P.type)||"Memo";case T:_e=P._payload,P=P._init;try{return e(P(_e))}catch{}}return null}function t(P){return""+P}function n(P){try{t(P);var _e=!1}catch{_e=!0}if(_e){_e=console;var Se=_e.error,Fe=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return Se.call(_e,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Fe),t(P)}}function i(){}function s(){if(we===0){Ue=console.log,We=console.info,je=console.warn,le=console.error,qe=console.group,Ie=console.groupCollapsed,Ae=console.groupEnd;var P={configurable:!0,enumerable:!0,value:i,writable:!0};Object.defineProperties(console,{info:P,log:P,warn:P,error:P,group:P,groupCollapsed:P,groupEnd:P})}we++}function a(){if(we--,we===0){var P={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:pe({},P,{value:Ue}),info:pe({},P,{value:We}),warn:pe({},P,{value:je}),error:pe({},P,{value:le}),group:pe({},P,{value:qe}),groupCollapsed:pe({},P,{value:Ie}),groupEnd:pe({},P,{value:Ae})})}0>we&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function u(P){if(De===void 0)try{throw Error()}catch(Se){var _e=Se.stack.trim().match(/\n( *(at )?)/);De=_e&&_e[1]||"",it=-1<Se.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<Se.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+De+P+it}function f(P,_e){if(!P||et)return"";var Se=zt.get(P);if(Se!==void 0)return Se;et=!0,Se=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var Fe=null;Fe=K.H,K.H=null,s();try{var st={DetermineComponentFrameRoot:function(){try{if(_e){var Nt=function(){throw Error()};if(Object.defineProperty(Nt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Nt,[])}catch(Oe){var At=Oe}Reflect.construct(P,[],Nt)}else{try{Nt.call()}catch(Oe){At=Oe}P.call(Nt.prototype)}}else{try{throw Error()}catch(Oe){At=Oe}(Nt=P())&&typeof Nt.catch=="function"&&Nt.catch(function(){})}}catch(Oe){if(Oe&&At&&typeof Oe.stack=="string")return[Oe.stack,At.stack]}return[null,null]}};st.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Ge=Object.getOwnPropertyDescriptor(st.DetermineComponentFrameRoot,"name");Ge&&Ge.configurable&&Object.defineProperty(st.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var $e=st.DetermineComponentFrameRoot(),wt=$e[0],ft=$e[1];if(wt&&ft){var ut=wt.split(`
20
+ `),Ot=ft.split(`
21
+ `);for($e=Ge=0;Ge<ut.length&&!ut[Ge].includes("DetermineComponentFrameRoot");)Ge++;for(;$e<Ot.length&&!Ot[$e].includes("DetermineComponentFrameRoot");)$e++;if(Ge===ut.length||$e===Ot.length)for(Ge=ut.length-1,$e=Ot.length-1;1<=Ge&&0<=$e&&ut[Ge]!==Ot[$e];)$e--;for(;1<=Ge&&0<=$e;Ge--,$e--)if(ut[Ge]!==Ot[$e]){if(Ge!==1||$e!==1)do if(Ge--,$e--,0>$e||ut[Ge]!==Ot[$e]){var Zt=`
22
+ `+ut[Ge].replace(" at new "," at ");return P.displayName&&Zt.includes("<anonymous>")&&(Zt=Zt.replace("<anonymous>",P.displayName)),typeof P=="function"&&zt.set(P,Zt),Zt}while(1<=Ge&&0<=$e);break}}}finally{et=!1,K.H=Fe,a(),Error.prepareStackTrace=Se}return ut=(ut=P?P.displayName||P.name:"")?u(ut):"",typeof P=="function"&&zt.set(P,ut),ut}function d(P){if(P==null)return"";if(typeof P=="function"){var _e=P.prototype;return f(P,!(!_e||!_e.isReactComponent))}if(typeof P=="string")return u(P);switch(P){case R:return u("Suspense");case V:return u("SuspenseList")}if(typeof P=="object")switch(P.$$typeof){case W:return P=f(P.render,!1),P;case S:return d(P.type);case T:_e=P._payload,P=P._init;try{return d(P(_e))}catch{}}return""}function m(){var P=K.A;return P===null?null:P.getOwner()}function w(P){if(ae.call(P,"key")){var _e=Object.getOwnPropertyDescriptor(P,"key").get;if(_e&&_e.isReactWarning)return!1}return P.key!==void 0}function y(P,_e){function Se(){mn||(mn=!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)",_e))}Se.isReactWarning=!0,Object.defineProperty(P,"key",{get:Se,configurable:!0})}function x(){var P=e(this.type);return yn[P]||(yn[P]=!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.")),P=this.props.ref,P!==void 0?P:null}function A(P,_e,Se,Fe,st,Ge){return Se=Ge.ref,P={$$typeof:oe,type:P,key:_e,props:Ge,_owner:st},(Se!==void 0?Se:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:x}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function E(P,_e,Se,Fe,st,Ge){if(typeof P=="string"||typeof P=="function"||P===ne||P===ve||P===re||P===R||P===V||P===$||typeof P=="object"&&P!==null&&(P.$$typeof===T||P.$$typeof===S||P.$$typeof===O||P.$$typeof===Ee||P.$$typeof===W||P.$$typeof===de||P.getModuleId!==void 0)){var $e=_e.children;if($e!==void 0)if(Fe)if(Ne($e)){for(Fe=0;Fe<$e.length;Fe++)N($e[Fe],P);Object.freeze&&Object.freeze($e)}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 N($e,P)}else $e="",(P===void 0||typeof P=="object"&&P!==null&&Object.keys(P).length===0)&&($e+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),P===null?Fe="null":Ne(P)?Fe="array":P!==void 0&&P.$$typeof===oe?(Fe="<"+(e(P.type)||"Unknown")+" />",$e=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof P,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,$e);if(ae.call(_e,"key")){$e=e(P);var wt=Object.keys(_e).filter(function(ut){return ut!=="key"});Fe=0<wt.length?"{key: someKey, "+wt.join(": ..., ")+": ...}":"{key: someKey}",en[$e+Fe]||(wt=0<wt.length?"{"+wt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
26
23
  let props = %s;
27
24
  <%s {...props} />
28
25
  React keys must be passed directly to JSX without using spread:
29
26
  let props = %s;
30
- <%s key={someKey} {...props} />`,hn,Et,vn,Et),at[Et+hn]=!0}}return L===i?dr(Je):en(Je),Je}}function Fr(L,oe,we){return pt(L,oe,we,!0)}function qn(L,oe,we){return pt(L,oe,we,!1)}var gt=qn,pr=Fr;Qi.Fragment=i,Qi.jsx=gt,Qi.jsxs=pr}(),Qi}var Nl;function Vh(){if(Nl)return Ps.exports;Nl=1;var r={};return r.NODE_ENV==="production"?Ps.exports=Hh():Ps.exports=zh(),Ps.exports}var Zt=Vh(),Cl=typeof global=="object"&&global&&global.Object===Object&&global,Wh=typeof self=="object"&&self&&self.Object===Object&&self,rr=Cl||Wh||Function("return this")(),Ir=rr.Symbol,Ll=Object.prototype,Gh=Ll.hasOwnProperty,Yh=Ll.toString,es=Ir?Ir.toStringTag:void 0;function Jh(r){var e=Gh.call(r,es),t=r[es];try{r[es]=void 0;var n=!0}catch{}var i=Yh.call(r);return n&&(e?r[es]=t:delete r[es]),i}var Zh=Object.prototype,Xh=Zh.toString;function Qh(r){return Xh.call(r)}var ed="[object Null]",td="[object Undefined]",Rl=Ir?Ir.toStringTag:void 0;function xi(r){return r==null?r===void 0?td:ed:Rl&&Rl in Object(r)?Jh(r):Qh(r)}function Er(r){return r!=null&&typeof r=="object"}var Qr=Array.isArray;function jr(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function kl(r){return r}var nd="[object AsyncFunction]",rd="[object Function]",id="[object GeneratorFunction]",sd="[object Proxy]";function $o(r){if(!jr(r))return!1;var e=xi(r);return e==rd||e==id||e==nd||e==sd}var Mo=rr["__core-js_shared__"],Pl=function(){var r=/[^.]+$/.exec(Mo&&Mo.keys&&Mo.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function od(r){return!!Pl&&Pl in r}var ad=Function.prototype,ld=ad.toString;function ei(r){if(r!=null){try{return ld.call(r)}catch{}try{return r+""}catch{}}return""}var ud=/[\\^$.*+?()[\]{}|]/g,cd=/^\[object .+?Constructor\]$/,fd=Function.prototype,hd=Object.prototype,dd=fd.toString,pd=hd.hasOwnProperty,gd=RegExp("^"+dd.call(pd).replace(ud,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function md(r){if(!jr(r)||od(r))return!1;var e=$o(r)?gd:cd;return e.test(ei(r))}function yd(r,e){return r==null?void 0:r[e]}function ti(r,e){var t=yd(r,e);return md(t)?t:void 0}var Bo=ti(rr,"WeakMap"),ql=Object.create,bd=function(){function r(){}return function(e){if(!jr(e))return{};if(ql)return ql(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();function vd(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function wd(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var xd=800,Ed=16,Od=Date.now;function Sd(r){var e=0,t=0;return function(){var n=Od(),i=Ed-(n-t);if(t=n,i>0){if(++e>=xd)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function Ad(r){return function(){return r}}var qs=function(){try{var r=ti(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Td=qs?function(r,e){return qs(r,"toString",{configurable:!0,enumerable:!1,value:Ad(e),writable:!0})}:kl,_d=Sd(Td);function Nd(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var Cd=9007199254740991,Ld=/^(?:0|[1-9]\d*)$/;function Il(r,e){var t=typeof r;return e=e??Cd,!!e&&(t=="number"||t!="symbol"&&Ld.test(r))&&r>-1&&r%1==0&&r<e}function Uo(r,e,t){e=="__proto__"&&qs?qs(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}function ts(r,e){return r===e||r!==r&&e!==e}var Rd=Object.prototype,kd=Rd.hasOwnProperty;function jl(r,e,t){var n=r[e];(!(kd.call(r,e)&&ts(n,t))||t===void 0&&!(e in r))&&Uo(r,e,t)}function Pd(r,e,t,n){var i=!t;t||(t={});for(var s=-1,a=e.length;++s<a;){var u=e[s],f=void 0;f===void 0&&(f=r[u]),i?Uo(t,u,f):jl(t,u,f)}return t}var Dl=Math.max;function qd(r,e,t){return e=Dl(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,s=Dl(n.length-e,0),a=Array(s);++i<s;)a[i]=n[e+i];i=-1;for(var u=Array(e+1);++i<e;)u[i]=n[i];return u[e]=t(a),vd(r,this,u)}}function Id(r,e){return _d(qd(r,e,kl),r+"")}var jd=9007199254740991;function $l(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=jd}function Is(r){return r!=null&&$l(r.length)&&!$o(r)}function Dd(r,e,t){if(!jr(t))return!1;var n=typeof e;return(n=="number"?Is(t)&&Il(e,t.length):n=="string"&&e in t)?ts(t[e],r):!1}function $d(r){return Id(function(e,t){var n=-1,i=t.length,s=i>1?t[i-1]:void 0,a=i>2?t[2]:void 0;for(s=r.length>3&&typeof s=="function"?(i--,s):void 0,a&&Dd(t[0],t[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++n<i;){var u=t[n];u&&r(e,u,n,s)}return e})}var Md=Object.prototype;function Fo(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Md;return r===t}function Bd(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Ud="[object Arguments]";function Ml(r){return Er(r)&&xi(r)==Ud}var Bl=Object.prototype,Fd=Bl.hasOwnProperty,Kd=Bl.propertyIsEnumerable,Ko=Ml(function(){return arguments}())?Ml:function(r){return Er(r)&&Fd.call(r,"callee")&&!Kd.call(r,"callee")};function Hd(){return!1}var Ul=typeof it=="object"&&it&&!it.nodeType&&it,Fl=Ul&&typeof module=="object"&&module&&!module.nodeType&&module,zd=Fl&&Fl.exports===Ul,Kl=zd?rr.Buffer:void 0,Vd=Kl?Kl.isBuffer:void 0,ns=Vd||Hd,Wd="[object Arguments]",Gd="[object Array]",Yd="[object Boolean]",Jd="[object Date]",Zd="[object Error]",Xd="[object Function]",Qd="[object Map]",ep="[object Number]",tp="[object Object]",np="[object RegExp]",rp="[object Set]",ip="[object String]",sp="[object WeakMap]",op="[object ArrayBuffer]",ap="[object DataView]",lp="[object Float32Array]",up="[object Float64Array]",cp="[object Int8Array]",fp="[object Int16Array]",hp="[object Int32Array]",dp="[object Uint8Array]",pp="[object Uint8ClampedArray]",gp="[object Uint16Array]",mp="[object Uint32Array]",dt={};dt[lp]=dt[up]=dt[cp]=dt[fp]=dt[hp]=dt[dp]=dt[pp]=dt[gp]=dt[mp]=!0,dt[Wd]=dt[Gd]=dt[op]=dt[Yd]=dt[ap]=dt[Jd]=dt[Zd]=dt[Xd]=dt[Qd]=dt[ep]=dt[tp]=dt[np]=dt[rp]=dt[ip]=dt[sp]=!1;function yp(r){return Er(r)&&$l(r.length)&&!!dt[xi(r)]}function Ho(r){return function(e){return r(e)}}var Hl=typeof it=="object"&&it&&!it.nodeType&&it,rs=Hl&&typeof module=="object"&&module&&!module.nodeType&&module,bp=rs&&rs.exports===Hl,zo=bp&&Cl.process,Ei=function(){try{var r=rs&&rs.require&&rs.require("util").types;return r||zo&&zo.binding&&zo.binding("util")}catch{}}(),zl=Ei&&Ei.isTypedArray,Vo=zl?Ho(zl):yp,vp=Object.prototype,wp=vp.hasOwnProperty;function Vl(r,e){var t=Qr(r),n=!t&&Ko(r),i=!t&&!n&&ns(r),s=!t&&!n&&!i&&Vo(r),a=t||n||i||s,u=a?Bd(r.length,String):[],f=u.length;for(var d in r)(e||wp.call(r,d))&&!(a&&(d=="length"||i&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Il(d,f)))&&u.push(d);return u}function Wl(r,e){return function(t){return r(e(t))}}var xp=Wl(Object.keys,Object),Ep=Object.prototype,Op=Ep.hasOwnProperty;function Sp(r){if(!Fo(r))return xp(r);var e=[];for(var t in Object(r))Op.call(r,t)&&t!="constructor"&&e.push(t);return e}function Ap(r){return Is(r)?Vl(r):Sp(r)}function Tp(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var _p=Object.prototype,Np=_p.hasOwnProperty;function Cp(r){if(!jr(r))return Tp(r);var e=Fo(r),t=[];for(var n in r)n=="constructor"&&(e||!Np.call(r,n))||t.push(n);return t}function Gl(r){return Is(r)?Vl(r,!0):Cp(r)}var is=ti(Object,"create");function Lp(){this.__data__=is?is(null):{},this.size=0}function Rp(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var kp="__lodash_hash_undefined__",Pp=Object.prototype,qp=Pp.hasOwnProperty;function Ip(r){var e=this.__data__;if(is){var t=e[r];return t===kp?void 0:t}return qp.call(e,r)?e[r]:void 0}var jp=Object.prototype,Dp=jp.hasOwnProperty;function $p(r){var e=this.__data__;return is?e[r]!==void 0:Dp.call(e,r)}var Mp="__lodash_hash_undefined__";function Bp(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=is&&e===void 0?Mp:e,this}function ni(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}ni.prototype.clear=Lp,ni.prototype.delete=Rp,ni.prototype.get=Ip,ni.prototype.has=$p,ni.prototype.set=Bp;function Up(){this.__data__=[],this.size=0}function js(r,e){for(var t=r.length;t--;)if(ts(r[t][0],e))return t;return-1}var Fp=Array.prototype,Kp=Fp.splice;function Hp(r){var e=this.__data__,t=js(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Kp.call(e,t,1),--this.size,!0}function zp(r){var e=this.__data__,t=js(e,r);return t<0?void 0:e[t][1]}function Vp(r){return js(this.__data__,r)>-1}function Wp(r,e){var t=this.__data__,n=js(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}function Or(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Or.prototype.clear=Up,Or.prototype.delete=Hp,Or.prototype.get=zp,Or.prototype.has=Vp,Or.prototype.set=Wp;var ss=ti(rr,"Map");function Gp(){this.size=0,this.__data__={hash:new ni,map:new(ss||Or),string:new ni}}function Yp(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function Ds(r,e){var t=r.__data__;return Yp(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Jp(r){var e=Ds(this,r).delete(r);return this.size-=e?1:0,e}function Zp(r){return Ds(this,r).get(r)}function Xp(r){return Ds(this,r).has(r)}function Qp(r,e){var t=Ds(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}function ri(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}ri.prototype.clear=Gp,ri.prototype.delete=Jp,ri.prototype.get=Zp,ri.prototype.has=Xp,ri.prototype.set=Qp;function eg(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var Yl=Wl(Object.getPrototypeOf,Object),tg="[object Object]",ng=Function.prototype,rg=Object.prototype,Jl=ng.toString,ig=rg.hasOwnProperty,sg=Jl.call(Object);function og(r){if(!Er(r)||xi(r)!=tg)return!1;var e=Yl(r);if(e===null)return!0;var t=ig.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Jl.call(t)==sg}function ag(){this.__data__=new Or,this.size=0}function lg(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}function ug(r){return this.__data__.get(r)}function cg(r){return this.__data__.has(r)}var fg=200;function hg(r,e){var t=this.__data__;if(t instanceof Or){var n=t.__data__;if(!ss||n.length<fg-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new ri(n)}return t.set(r,e),this.size=t.size,this}function ir(r){var e=this.__data__=new Or(r);this.size=e.size}ir.prototype.clear=ag,ir.prototype.delete=lg,ir.prototype.get=ug,ir.prototype.has=cg,ir.prototype.set=hg;var Zl=typeof it=="object"&&it&&!it.nodeType&&it,Xl=Zl&&typeof module=="object"&&module&&!module.nodeType&&module,dg=Xl&&Xl.exports===Zl,Ql=dg?rr.Buffer:void 0,eu=Ql?Ql.allocUnsafe:void 0;function tu(r,e){if(e)return r.slice();var t=r.length,n=eu?eu(t):new r.constructor(t);return r.copy(n),n}function pg(r,e){for(var t=-1,n=r==null?0:r.length,i=0,s=[];++t<n;){var a=r[t];e(a,t,r)&&(s[i++]=a)}return s}function gg(){return[]}var mg=Object.prototype,yg=mg.propertyIsEnumerable,nu=Object.getOwnPropertySymbols,bg=nu?function(r){return r==null?[]:(r=Object(r),pg(nu(r),function(e){return yg.call(r,e)}))}:gg;function vg(r,e,t){var n=e(r);return Qr(r)?n:eg(n,t(r))}function Wo(r){return vg(r,Ap,bg)}var Go=ti(rr,"DataView"),Yo=ti(rr,"Promise"),Jo=ti(rr,"Set"),ru="[object Map]",wg="[object Object]",iu="[object Promise]",su="[object Set]",ou="[object WeakMap]",au="[object DataView]",xg=ei(Go),Eg=ei(ss),Og=ei(Yo),Sg=ei(Jo),Ag=ei(Bo),Un=xi;(Go&&Un(new Go(new ArrayBuffer(1)))!=au||ss&&Un(new ss)!=ru||Yo&&Un(Yo.resolve())!=iu||Jo&&Un(new Jo)!=su||Bo&&Un(new Bo)!=ou)&&(Un=function(r){var e=xi(r),t=e==wg?r.constructor:void 0,n=t?ei(t):"";if(n)switch(n){case xg:return au;case Eg:return ru;case Og:return iu;case Sg:return su;case Ag:return ou}return e});var Tg=Object.prototype,_g=Tg.hasOwnProperty;function Ng(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&_g.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var $s=rr.Uint8Array;function Zo(r){var e=new r.constructor(r.byteLength);return new $s(e).set(new $s(r)),e}function Cg(r,e){var t=Zo(r.buffer);return new r.constructor(t,r.byteOffset,r.byteLength)}var Lg=/\w*$/;function Rg(r){var e=new r.constructor(r.source,Lg.exec(r));return e.lastIndex=r.lastIndex,e}var lu=Ir?Ir.prototype:void 0,uu=lu?lu.valueOf:void 0;function kg(r){return uu?Object(uu.call(r)):{}}function cu(r,e){var t=e?Zo(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var Pg="[object Boolean]",qg="[object Date]",Ig="[object Map]",jg="[object Number]",Dg="[object RegExp]",$g="[object Set]",Mg="[object String]",Bg="[object Symbol]",Ug="[object ArrayBuffer]",Fg="[object DataView]",Kg="[object Float32Array]",Hg="[object Float64Array]",zg="[object Int8Array]",Vg="[object Int16Array]",Wg="[object Int32Array]",Gg="[object Uint8Array]",Yg="[object Uint8ClampedArray]",Jg="[object Uint16Array]",Zg="[object Uint32Array]";function Xg(r,e,t){var n=r.constructor;switch(e){case Ug:return Zo(r);case Pg:case qg:return new n(+r);case Fg:return Cg(r);case Kg:case Hg:case zg:case Vg:case Wg:case Gg:case Yg:case Jg:case Zg:return cu(r,t);case Ig:return new n;case jg:case Mg:return new n(r);case Dg:return Rg(r);case $g:return new n;case Bg:return kg(r)}}function fu(r){return typeof r.constructor=="function"&&!Fo(r)?bd(Yl(r)):{}}var Qg="[object Map]";function em(r){return Er(r)&&Un(r)==Qg}var hu=Ei&&Ei.isMap,tm=hu?Ho(hu):em,nm="[object Set]";function rm(r){return Er(r)&&Un(r)==nm}var du=Ei&&Ei.isSet,im=du?Ho(du):rm,sm=1,pu="[object Arguments]",om="[object Array]",am="[object Boolean]",lm="[object Date]",um="[object Error]",gu="[object Function]",cm="[object GeneratorFunction]",fm="[object Map]",hm="[object Number]",mu="[object Object]",dm="[object RegExp]",pm="[object Set]",gm="[object String]",mm="[object Symbol]",ym="[object WeakMap]",bm="[object ArrayBuffer]",vm="[object DataView]",wm="[object Float32Array]",xm="[object Float64Array]",Em="[object Int8Array]",Om="[object Int16Array]",Sm="[object Int32Array]",Am="[object Uint8Array]",Tm="[object Uint8ClampedArray]",_m="[object Uint16Array]",Nm="[object Uint32Array]",ht={};ht[pu]=ht[om]=ht[bm]=ht[vm]=ht[am]=ht[lm]=ht[wm]=ht[xm]=ht[Em]=ht[Om]=ht[Sm]=ht[fm]=ht[hm]=ht[mu]=ht[dm]=ht[pm]=ht[gm]=ht[mm]=ht[Am]=ht[Tm]=ht[_m]=ht[Nm]=!0,ht[um]=ht[gu]=ht[ym]=!1;function Ms(r,e,t,n,i,s){var a,u=e&sm;if(a!==void 0)return a;if(!jr(r))return r;var f=Qr(r);if(f)a=Ng(r);else{var d=Un(r),m=d==gu||d==cm;if(ns(r))return tu(r,u);if(d==mu||d==pu||m&&!i)a=m?{}:fu(r);else{if(!ht[d])return i?r:{};a=Xg(r,d,u)}}s||(s=new ir);var v=s.get(r);if(v)return v;s.set(r,a),im(r)?r.forEach(function(A){a.add(Ms(A,e,t,A,r,s))}):tm(r)&&r.forEach(function(A,O){a.set(O,Ms(A,e,t,O,r,s))});var y=Wo,x=f?void 0:y(r);return Nd(x||r,function(A,O){x&&(O=A,A=r[O]),jl(a,O,Ms(A,e,t,O,r,s))}),a}var Cm=1,Lm=4;function Oi(r){return Ms(r,Cm|Lm)}var Rm="__lodash_hash_undefined__";function km(r){return this.__data__.set(r,Rm),this}function Pm(r){return this.__data__.has(r)}function Bs(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new ri;++e<t;)this.add(r[e])}Bs.prototype.add=Bs.prototype.push=km,Bs.prototype.has=Pm;function qm(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}function Im(r,e){return r.has(e)}var jm=1,Dm=2;function yu(r,e,t,n,i,s){var a=t&jm,u=r.length,f=e.length;if(u!=f&&!(a&&f>u))return!1;var d=s.get(r),m=s.get(e);if(d&&m)return d==e&&m==r;var v=-1,y=!0,x=t&Dm?new Bs:void 0;for(s.set(r,e),s.set(e,r);++v<u;){var A=r[v],O=e[v];if(n)var N=a?n(O,A,v,e,r,s):n(A,O,v,r,e,s);if(N!==void 0){if(N)continue;y=!1;break}if(x){if(!qm(e,function(M,W){if(!Im(x,W)&&(A===M||i(A,M,t,n,s)))return x.push(W)})){y=!1;break}}else if(!(A===O||i(A,O,t,n,s))){y=!1;break}}return s.delete(r),s.delete(e),y}function $m(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}function Mm(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var Bm=1,Um=2,Fm="[object Boolean]",Km="[object Date]",Hm="[object Error]",zm="[object Map]",Vm="[object Number]",Wm="[object RegExp]",Gm="[object Set]",Ym="[object String]",Jm="[object Symbol]",Zm="[object ArrayBuffer]",Xm="[object DataView]",bu=Ir?Ir.prototype:void 0,Xo=bu?bu.valueOf:void 0;function Qm(r,e,t,n,i,s,a){switch(t){case Xm:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case Zm:return!(r.byteLength!=e.byteLength||!s(new $s(r),new $s(e)));case Fm:case Km:case Vm:return ts(+r,+e);case Hm:return r.name==e.name&&r.message==e.message;case Wm:case Ym:return r==e+"";case zm:var u=$m;case Gm:var f=n&Bm;if(u||(u=Mm),r.size!=e.size&&!f)return!1;var d=a.get(r);if(d)return d==e;n|=Um,a.set(r,e);var m=yu(u(r),u(e),n,i,s,a);return a.delete(r),m;case Jm:if(Xo)return Xo.call(r)==Xo.call(e)}return!1}var ey=1,ty=Object.prototype,ny=ty.hasOwnProperty;function ry(r,e,t,n,i,s){var a=t&ey,u=Wo(r),f=u.length,d=Wo(e),m=d.length;if(f!=m&&!a)return!1;for(var v=f;v--;){var y=u[v];if(!(a?y in e:ny.call(e,y)))return!1}var x=s.get(r),A=s.get(e);if(x&&A)return x==e&&A==r;var O=!0;s.set(r,e),s.set(e,r);for(var N=a;++v<f;){y=u[v];var M=r[y],W=e[y];if(n)var Z=a?n(W,M,y,e,r,s):n(M,W,y,r,e,s);if(!(Z===void 0?M===W||i(M,W,t,n,s):Z)){O=!1;break}N||(N=y=="constructor")}if(O&&!N){var de=r.constructor,ue=e.constructor;de!=ue&&"constructor"in r&&"constructor"in e&&!(typeof de=="function"&&de instanceof de&&typeof ue=="function"&&ue instanceof ue)&&(O=!1)}return s.delete(r),s.delete(e),O}var iy=1,vu="[object Arguments]",wu="[object Array]",Us="[object Object]",sy=Object.prototype,xu=sy.hasOwnProperty;function oy(r,e,t,n,i,s){var a=Qr(r),u=Qr(e),f=a?wu:Un(r),d=u?wu:Un(e);f=f==vu?Us:f,d=d==vu?Us:d;var m=f==Us,v=d==Us,y=f==d;if(y&&ns(r)){if(!ns(e))return!1;a=!0,m=!1}if(y&&!m)return s||(s=new ir),a||Vo(r)?yu(r,e,t,n,i,s):Qm(r,e,f,t,n,i,s);if(!(t&iy)){var x=m&&xu.call(r,"__wrapped__"),A=v&&xu.call(e,"__wrapped__");if(x||A){var O=x?r.value():r,N=A?e.value():e;return s||(s=new ir),i(O,N,t,n,s)}}return y?(s||(s=new ir),ry(r,e,t,n,i,s)):!1}function Eu(r,e,t,n,i){return r===e?!0:r==null||e==null||!Er(r)&&!Er(e)?r!==r&&e!==e:oy(r,e,t,n,Eu,i)}function ay(r){return function(e,t,n){for(var i=-1,s=Object(e),a=n(e),u=a.length;u--;){var f=a[++i];if(t(s[f],f,s)===!1)break}return e}}var ly=ay();function Qo(r,e,t){(t!==void 0&&!ts(r[e],t)||t===void 0&&!(e in r))&&Uo(r,e,t)}function uy(r){return Er(r)&&Is(r)}function ea(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}function cy(r){return Pd(r,Gl(r))}function fy(r,e,t,n,i,s,a){var u=ea(r,t),f=ea(e,t),d=a.get(f);if(d){Qo(r,t,d);return}var m=s?s(u,f,t+"",r,e,a):void 0,v=m===void 0;if(v){var y=Qr(f),x=!y&&ns(f),A=!y&&!x&&Vo(f);m=f,y||x||A?Qr(u)?m=u:uy(u)?m=wd(u):x?(v=!1,m=tu(f,!0)):A?(v=!1,m=cu(f,!0)):m=[]:og(f)||Ko(f)?(m=u,Ko(u)?m=cy(u):(!jr(u)||$o(u))&&(m=fu(f))):v=!1}v&&(a.set(f,m),i(m,f,n,s,a),a.delete(f)),Qo(r,t,m)}function Ou(r,e,t,n,i){r!==e&&ly(e,function(s,a){if(i||(i=new ir),jr(s))fy(r,e,a,t,Ou,n,i);else{var u=n?n(ea(r,a),s,a+"",r,e,i):void 0;u===void 0&&(u=s),Qo(r,a,u)}},Gl)}function ta(r,e){return Eu(r,e)}var Dr=$d(function(r,e,t){Ou(r,e,t)}),Pe=(r=>(r[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",r))(Pe||{});class sr{constructor(e,t,n={}){this.attrName=e,this.keyName=t;const i=Pe.TYPE&Pe.ATTRIBUTE;this.scope=n.scope!=null?n.scope&Pe.LEVEL|i:Pe.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class Si extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const Su=class Sl{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(e,t,n){const i=this.query(t);if(i==null)throw new Si(`Unable to create ${t} blot`);const s=i,a=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:s.create(n),u=new s(e,a,n);return Sl.blots.set(u.domNode,u),u}find(e,t=!1){return Sl.find(e,t)}query(e,t=Pe.ANY){let n;return typeof e=="string"?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:typeof e=="number"?e&Pe.LEVEL&Pe.BLOCK?n=this.types.block:e&Pe.LEVEL&Pe.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(n=this.classes[i],!!n)),n=n||this.tags[e.tagName]),n==null?null:"scope"in n&&t&Pe.LEVEL&n.scope&&t&Pe.TYPE&n.scope?n:null}register(...e){return e.map(t=>{const n="blotName"in t,i="attrName"in t;if(!n&&!i)throw new Si("Invalid definition");if(n&&t.blotName==="abstract")throw new Si("Cannot register abstract class");const s=n?t.blotName:i?t.attrName:void 0;return this.types[s]=t,i?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):n&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(a=>a.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(a=>{(this.tags[a]==null||t.className==null)&&(this.tags[a]=t)}))),t})}};Su.blots=new WeakMap;let Ai=Su;function Au(r,e){return(r.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class hy extends sr{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){Au(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(Au(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const Fn=hy;function na(r){const e=r.split("-"),t=e.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return e[0]+t}class dy extends sr{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[na(this.keyName)]=t,!0):!1}remove(e){e.style[na(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[na(this.keyName)];return this.canAdd(e,t)?t:""}}const $r=dy;class py{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=Ai.find(this.domNode);if(e==null)return;const t=sr.keys(this.domNode),n=Fn.keys(this.domNode),i=$r.keys(this.domNode);t.concat(n).concat(i).forEach(s=>{const a=e.scroll.query(s,Pe.ATTRIBUTE);a instanceof sr&&(this.attributes[a.attrName]=a)})}copy(e){Object.keys(this.attributes).forEach(t=>{const n=this.attributes[t].value(this.domNode);e.format(t,n)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const Fs=py,Tu=class{constructor(e,t){this.scroll=e,this.domNode=t,Ai.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new Si("Blot definition missing tagName");let t,n;return Array.isArray(this.tagName)?(typeof e=="string"?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof e=="number"&&(n=e),typeof n=="number"?t=document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?t=document.createElement(n):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),Ai.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,i){const s=this.isolate(e,t);if(this.scroll.query(n,Pe.BLOT)!=null&&i)s.wrap(n,i);else if(this.scroll.query(n,Pe.ATTRIBUTE)!=null){const a=this.scroll.create(this.statics.scope);s.wrap(a),a.format(n,i)}}insertAt(e,t,n){const i=n==null?this.scroll.create("text",t):this.scroll.create(t,n),s=this.split(e);this.parent.insertBefore(i,s||void 0)}isolate(e,t){const n=this.split(e);if(n==null)throw new Error("Attempt to isolate at end");return n.split(t),n}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!="function")throw new Si(`Cannot wrap ${e}`);return n.appendChild(this),n}};Tu.blotName="abstract";let _u=Tu;const Nu=class extends _u{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Nu.scope=Pe.INLINE_BLOT;const Ut=Nu;class gy{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let n=t();for(;n&&e>0;)e-=1,n=t();return n}contains(e){const t=this.iterator();let n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){const t=this.iterator();let n=t(),i=0;for(;n;){if(n===e)return i;i+=1,n=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,n=this.head;for(;n!=null;){if(n===e)return t;t+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const n=this.iterator();let i=n();for(;i;){const s=i.length();if(e<s||t&&e===s&&(i.next==null||i.next.length()!==0))return[i,e];e-=s,i=n()}return[null,0]}forEach(e){const t=this.iterator();let n=t();for(;n;)e(n),n=t()}forEachAt(e,t,n){if(t<=0)return;const[i,s]=this.find(e);let a=e-s;const u=this.iterator(i);let f=u();for(;f&&a<e+t;){const d=f.length();e>a?n(f,e-a,Math.min(t,a+d-e)):n(f,0,Math.min(d,e+t-a)),a+=d,f=u()}}map(e){return this.reduce((t,n)=>(t.push(e(n)),t),[])}reduce(e,t){const n=this.iterator();let i=n();for(;i;)t=e(t,i),i=n();return t}}function Cu(r,e){const t=e.find(r);if(t)return t;try{return e.create(r)}catch{const n=e.create(Pe.INLINE);return Array.from(r.childNodes).forEach(i=>{n.domNode.appendChild(i)}),r.parentNode&&r.parentNode.replaceChild(n.domNode,r),n.attach(),n}}const Lu=class Xr extends _u{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,Xr.uiClass&&this.uiNode.classList.add(Xr.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new gy,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=Cu(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof Si)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(n,i,s)=>{n.deleteAt(i,s)})}descendant(e,t=0){const[n,i]=this.children.find(t);return e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e?[n,i]:n instanceof Xr?n.descendant(e,i):[null,-1]}descendants(e,t=0,n=Number.MAX_VALUE){let i=[],s=n;return this.children.forEachAt(t,n,(a,u,f)=>{(e.blotName==null&&e(a)||e.blotName!=null&&a instanceof e)&&i.push(a),a instanceof Xr&&(i=i.concat(a.descendants(e,u,s))),s-=f}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(n=>t instanceof n)||(t.statics.scope===Pe.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof Xr?t.unwrap():t.remove())})}formatAt(e,t,n,i){this.children.forEachAt(e,t,(s,a,u)=>{s.formatAt(a,u,n,i)})}insertAt(e,t,n){const[i,s]=this.children.find(e);if(i)i.insertAt(s,t,n);else{const a=n==null?this.scroll.create("text",t):this.scroll.create(t,n);this.appendChild(a)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(n=>{e.insertBefore(n,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[n,i]=this.children.find(e,t),s=[[this,e]];return n instanceof Xr?s.concat(n.path(i,t)):(n!=null&&s.push([n,i]),s)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return n instanceof Xr&&this.moveChildren(n),super.replaceWith(n)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(i,s,a)=>{const u=i.split(s,t);u!=null&&n.appendChild(u)}),n}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const n=[],i=[];e.forEach(s=>{s.target===this.domNode&&s.type==="childList"&&(n.push(...s.addedNodes),i.push(...s.removedNodes))}),i.forEach(s=>{if(s.parentNode!=null&&s.tagName!=="IFRAME"&&document.body.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const a=this.scroll.find(s);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),n.filter(s=>s.parentNode===this.domNode&&s!==this.uiNode).sort((s,a)=>s===a?0:s.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(s=>{let a=null;s.nextSibling!=null&&(a=this.scroll.find(s.nextSibling));const u=Cu(s,this.scroll);(u.next!==a||u.next==null)&&(u.parent!=null&&u.parent.removeChild(this),this.insertBefore(u,a||void 0))}),this.enforceAllowedChildren()}};Lu.uiClass="";const Kn=Lu;function my(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(r[t]!==e[t])return!1;return!0}const Ti=class Zi extends Kn{static create(e){return super.create(e)}static formats(e,t){const n=t.query(Zi.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Fs(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(n=>{n instanceof Zi||(n=n.wrap(Zi.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(e,Pe.INLINE);if(n==null)return;n instanceof sr?this.attributes.attribute(n,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,i){this.formats()[n]!=null||this.scroll.query(n,Pe.ATTRIBUTE)?this.isolate(e,t).format(n,i):super.formatAt(e,t,n,i)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const n=this.next;n instanceof Zi&&n.prev===this&&my(t,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(e,t){const n=super.wrap(e,t);return n instanceof Zi&&this.attributes.move(n),n}};Ti.allowedChildren=[Ti,Ut],Ti.blotName="inline",Ti.scope=Pe.INLINE_BLOT,Ti.tagName="SPAN";const ra=Ti,_i=class Al extends Kn{static create(e){return super.create(e)}static formats(e,t){const n=t.query(Al.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Fs(this.domNode)}format(e,t){const n=this.scroll.query(e,Pe.BLOCK);n!=null&&(n instanceof sr?this.attributes.attribute(n,t):e===this.statics.blotName&&!t?this.replaceWith(Al.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,i){this.scroll.query(n,Pe.BLOCK)!=null?this.format(n,i):super.formatAt(e,t,n,i)}insertAt(e,t,n){if(n==null||this.scroll.query(t,Pe.INLINE)!=null)super.insertAt(e,t,n);else{const i=this.split(e);if(i!=null){const s=this.scroll.create(t,n);i.parent.insertBefore(s,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};_i.blotName="block",_i.scope=Pe.BLOCK_BLOT,_i.tagName="P",_i.allowedChildren=[ra,_i,Ut];const os=_i,ia=class extends Kn{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,i){super.formatAt(e,t,n,i),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};ia.blotName="container",ia.scope=Pe.BLOCK_BLOT;const Ks=ia;class yy extends Ut{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,i){e===0&&t===this.length()?this.format(n,i):super.formatAt(e,t,n,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const dn=yy,by={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},vy=100,Ni=class extends Kn{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(n=>{this.update(n)}),this.observer.observe(this.domNode,by),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=Pe.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(n=>{n.remove()}):super.deleteAt(e,t)}formatAt(e,t,n,i){this.update(),super.formatAt(e,t,n,i)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);const n=t.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const s=(f,d=!0)=>{f==null||f===this||f.domNode.parentNode!=null&&(n.has(f.domNode)||n.set(f.domNode,[]),d&&s(f.parent))},a=f=>{n.has(f.domNode)&&(f instanceof Kn&&f.children.forEach(a),n.delete(f.domNode),f.optimize(t))};let u=e;for(let f=0;u.length>0;f+=1){if(f>=vy)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(d=>{const m=this.find(d.target,!0);m!=null&&(m.domNode===d.target&&(d.type==="childList"?(s(this.find(d.previousSibling,!1)),Array.from(d.addedNodes).forEach(v=>{const y=this.find(v,!1);s(y,!1),y instanceof Kn&&y.children.forEach(x=>{s(x,!1)})})):d.type==="attributes"&&s(m.prev)),s(m))}),this.children.forEach(a),u=Array.from(this.observer.takeRecords()),i=u.slice();i.length>0;)e.push(i.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map(i=>{const s=this.find(i.target,!0);return s==null?null:n.has(s.domNode)?(n.get(s.domNode).push(i),null):(n.set(s.domNode,[i]),s)}).forEach(i=>{i!=null&&i!==this&&n.has(i.domNode)&&i.update(n.get(i.domNode)||[],t)}),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}};Ni.blotName="scroll",Ni.defaultChild=os,Ni.allowedChildren=[os,Ks],Ni.scope=Pe.BLOCK_BLOT,Ni.tagName="DIV";const sa=Ni,oa=class Uh extends Ut{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,n){n==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Uh&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};oa.blotName="text",oa.scope=Pe.INLINE_BLOT;const Hs=oa,wy=Object.freeze(Object.defineProperty({__proto__:null,Attributor:sr,AttributorStore:Fs,BlockBlot:os,ClassAttributor:Fn,ContainerBlot:Ks,EmbedBlot:dn,InlineBlot:ra,LeafBlot:Ut,ParentBlot:Kn,Registry:Ai,Scope:Pe,ScrollBlot:sa,StyleAttributor:$r,TextBlot:Hs},Symbol.toStringTag,{value:"Module"}));var zs={exports:{}},aa,Ru;function xy(){if(Ru)return aa;Ru=1;var r=-1,e=1,t=0;function n(S,G,P,V,E){if(S===G)return S?[[t,S]]:[];if(P!=null){var T=xe(S,G,P);if(T)return T}var D=u(S,G),U=S.substring(0,D);S=S.substring(D),G=G.substring(D),D=d(S,G);var J=S.substring(S.length-D);S=S.substring(0,S.length-D),G=G.substring(0,G.length-D);var z=i(S,G);return U&&z.unshift([t,U]),J&&z.push([t,J]),W(z,E),V&&v(z),z}function i(S,G){var P;if(!S)return[[e,G]];if(!G)return[[r,S]];var V=S.length>G.length?S:G,E=S.length>G.length?G:S,T=V.indexOf(E);if(T!==-1)return P=[[e,V.substring(0,T)],[t,E],[e,V.substring(T+E.length)]],S.length>G.length&&(P[0][0]=P[2][0]=r),P;if(E.length===1)return[[r,S],[e,G]];var D=m(S,G);if(D){var U=D[0],J=D[1],z=D[2],le=D[3],ve=D[4],pe=n(U,z),Ne=n(J,le);return pe.concat([[t,ve]],Ne)}return s(S,G)}function s(S,G){for(var P=S.length,V=G.length,E=Math.ceil((P+V)/2),T=E,D=2*E,U=new Array(D),J=new Array(D),z=0;z<D;z++)U[z]=-1,J[z]=-1;U[T+1]=0,J[T+1]=0;for(var le=P-V,ve=le%2!==0,pe=0,Ne=0,Oe=0,Ke=0,We=0;We<E;We++){for(var je=-We+pe;je<=We-Ne;je+=2){var ae=T+je,Ie;je===-We||je!==We&&U[ae-1]<U[ae+1]?Ie=U[ae+1]:Ie=U[ae-1]+1;for(var De=Ie-je;Ie<P&&De<V&&S.charAt(Ie)===G.charAt(De);)Ie++,De++;if(U[ae]=Ie,Ie>P)Ne+=2;else if(De>V)pe+=2;else if(ve){var Te=T+le-je;if(Te>=0&&Te<D&&J[Te]!==-1){var Ue=P-J[Te];if(Ie>=Ue)return a(S,G,Ie,De)}}}for(var ut=-We+Oe;ut<=We-Ke;ut+=2){var Te=T+ut,Ue;ut===-We||ut!==We&&J[Te-1]<J[Te+1]?Ue=J[Te+1]:Ue=J[Te-1]+1;for(var ot=Ue-ut;Ue<P&&ot<V&&S.charAt(P-Ue-1)===G.charAt(V-ot-1);)Ue++,ot++;if(J[Te]=Ue,Ue>P)Ke+=2;else if(ot>V)Oe+=2;else if(!ve){var ae=T+le-ut;if(ae>=0&&ae<D&&U[ae]!==-1){var Ie=U[ae],De=T+Ie-ae;if(Ue=P-Ue,Ie>=Ue)return a(S,G,Ie,De)}}}}return[[r,S],[e,G]]}function a(S,G,P,V){var E=S.substring(0,P),T=G.substring(0,V),D=S.substring(P),U=G.substring(V),J=n(E,T),z=n(D,U);return J.concat(z)}function u(S,G){if(!S||!G||S.charAt(0)!==G.charAt(0))return 0;for(var P=0,V=Math.min(S.length,G.length),E=V,T=0;P<E;)S.substring(T,E)==G.substring(T,E)?(P=E,T=P):V=E,E=Math.floor((V-P)/2+P);return Z(S.charCodeAt(E-1))&&E--,E}function f(S,G){var P=S.length,V=G.length;if(P==0||V==0)return 0;P>V?S=S.substring(P-V):P<V&&(G=G.substring(0,P));var E=Math.min(P,V);if(S==G)return E;for(var T=0,D=1;;){var U=S.substring(E-D),J=G.indexOf(U);if(J==-1)return T;D+=J,(J==0||S.substring(E-D)==G.substring(0,D))&&(T=D,D++)}}function d(S,G){if(!S||!G||S.slice(-1)!==G.slice(-1))return 0;for(var P=0,V=Math.min(S.length,G.length),E=V,T=0;P<E;)S.substring(S.length-E,S.length-T)==G.substring(G.length-E,G.length-T)?(P=E,T=P):V=E,E=Math.floor((V-P)/2+P);return de(S.charCodeAt(S.length-E))&&E--,E}function m(S,G){var P=S.length>G.length?S:G,V=S.length>G.length?G:S;if(P.length<4||V.length*2<P.length)return null;function E(Ne,Oe,Ke){for(var We=Ne.substring(Ke,Ke+Math.floor(Ne.length/4)),je=-1,ae="",Ie,De,Te,Ue;(je=Oe.indexOf(We,je+1))!==-1;){var ut=u(Ne.substring(Ke),Oe.substring(je)),ot=d(Ne.substring(0,Ke),Oe.substring(0,je));ae.length<ot+ut&&(ae=Oe.substring(je-ot,je)+Oe.substring(je,je+ut),Ie=Ne.substring(0,Ke-ot),De=Ne.substring(Ke+ut),Te=Oe.substring(0,je-ot),Ue=Oe.substring(je+ut))}return ae.length*2>=Ne.length?[Ie,De,Te,Ue,ae]:null}var T=E(P,V,Math.ceil(P.length/4)),D=E(P,V,Math.ceil(P.length/2)),U;if(!T&&!D)return null;D?T?U=T[4].length>D[4].length?T:D:U=D:U=T;var J,z,le,ve;S.length>G.length?(J=U[0],z=U[1],le=U[2],ve=U[3]):(le=U[0],ve=U[1],J=U[2],z=U[3]);var pe=U[4];return[J,z,le,ve,pe]}function v(S){for(var G=!1,P=[],V=0,E=null,T=0,D=0,U=0,J=0,z=0;T<S.length;)S[T][0]==t?(P[V++]=T,D=J,U=z,J=0,z=0,E=S[T][1]):(S[T][0]==e?J+=S[T][1].length:z+=S[T][1].length,E&&E.length<=Math.max(D,U)&&E.length<=Math.max(J,z)&&(S.splice(P[V-1],0,[r,E]),S[P[V-1]+1][0]=e,V--,V--,T=V>0?P[V-1]:-1,D=0,U=0,J=0,z=0,E=null,G=!0)),T++;for(G&&W(S),M(S),T=1;T<S.length;){if(S[T-1][0]==r&&S[T][0]==e){var le=S[T-1][1],ve=S[T][1],pe=f(le,ve),Ne=f(ve,le);pe>=Ne?(pe>=le.length/2||pe>=ve.length/2)&&(S.splice(T,0,[t,ve.substring(0,pe)]),S[T-1][1]=le.substring(0,le.length-pe),S[T+1][1]=ve.substring(pe),T++):(Ne>=le.length/2||Ne>=ve.length/2)&&(S.splice(T,0,[t,le.substring(0,Ne)]),S[T-1][0]=e,S[T-1][1]=ve.substring(0,ve.length-Ne),S[T+1][0]=r,S[T+1][1]=le.substring(Ne),T++),T++}T++}}var y=/[^a-zA-Z0-9]/,x=/\s/,A=/[\r\n]/,O=/\n\r?\n$/,N=/^\r?\n\r?\n/;function M(S){function G(Ne,Oe){if(!Ne||!Oe)return 6;var Ke=Ne.charAt(Ne.length-1),We=Oe.charAt(0),je=Ke.match(y),ae=We.match(y),Ie=je&&Ke.match(x),De=ae&&We.match(x),Te=Ie&&Ke.match(A),Ue=De&&We.match(A),ut=Te&&Ne.match(O),ot=Ue&&Oe.match(N);return ut||ot?5:Te||Ue?4:je&&!Ie&&De?3:Ie||De?2:je||ae?1:0}for(var P=1;P<S.length-1;){if(S[P-1][0]==t&&S[P+1][0]==t){var V=S[P-1][1],E=S[P][1],T=S[P+1][1],D=d(V,E);if(D){var U=E.substring(E.length-D);V=V.substring(0,V.length-D),E=U+E.substring(0,E.length-D),T=U+T}for(var J=V,z=E,le=T,ve=G(V,E)+G(E,T);E.charAt(0)===T.charAt(0);){V+=E.charAt(0),E=E.substring(1)+T.charAt(0),T=T.substring(1);var pe=G(V,E)+G(E,T);pe>=ve&&(ve=pe,J=V,z=E,le=T)}S[P-1][1]!=J&&(J?S[P-1][1]=J:(S.splice(P-1,1),P--),S[P][1]=z,le?S[P+1][1]=le:(S.splice(P+1,1),P--))}P++}}function W(S,G){S.push([t,""]);for(var P=0,V=0,E=0,T="",D="",U;P<S.length;){if(P<S.length-1&&!S[P][1]){S.splice(P,1);continue}switch(S[P][0]){case e:E++,D+=S[P][1],P++;break;case r:V++,T+=S[P][1],P++;break;case t:var J=P-E-V-1;if(G){if(J>=0&&ce(S[J][1])){var z=S[J][1].slice(-1);if(S[J][1]=S[J][1].slice(0,-1),T=z+T,D=z+D,!S[J][1]){S.splice(J,1),P--;var le=J-1;S[le]&&S[le][0]===e&&(E++,D=S[le][1]+D,le--),S[le]&&S[le][0]===r&&(V++,T=S[le][1]+T,le--),J=le}}if(ue(S[P][1])){var z=S[P][1].charAt(0);S[P][1]=S[P][1].slice(1),T+=z,D+=z}}if(P<S.length-1&&!S[P][1]){S.splice(P,1);break}if(T.length>0||D.length>0){T.length>0&&D.length>0&&(U=u(D,T),U!==0&&(J>=0?S[J][1]+=D.substring(0,U):(S.splice(0,0,[t,D.substring(0,U)]),P++),D=D.substring(U),T=T.substring(U)),U=d(D,T),U!==0&&(S[P][1]=D.substring(D.length-U)+S[P][1],D=D.substring(0,D.length-U),T=T.substring(0,T.length-U)));var ve=E+V;T.length===0&&D.length===0?(S.splice(P-ve,ve),P=P-ve):T.length===0?(S.splice(P-ve,ve,[e,D]),P=P-ve+1):D.length===0?(S.splice(P-ve,ve,[r,T]),P=P-ve+1):(S.splice(P-ve,ve,[r,T],[e,D]),P=P-ve+2)}P!==0&&S[P-1][0]===t?(S[P-1][1]+=S[P][1],S.splice(P,1)):P++,E=0,V=0,T="",D="";break}}S[S.length-1][1]===""&&S.pop();var pe=!1;for(P=1;P<S.length-1;)S[P-1][0]===t&&S[P+1][0]===t&&(S[P][1].substring(S[P][1].length-S[P-1][1].length)===S[P-1][1]?(S[P][1]=S[P-1][1]+S[P][1].substring(0,S[P][1].length-S[P-1][1].length),S[P+1][1]=S[P-1][1]+S[P+1][1],S.splice(P-1,1),pe=!0):S[P][1].substring(0,S[P+1][1].length)==S[P+1][1]&&(S[P-1][1]+=S[P+1][1],S[P][1]=S[P][1].substring(S[P+1][1].length)+S[P+1][1],S.splice(P+1,1),pe=!0)),P++;pe&&W(S,G)}function Z(S){return S>=55296&&S<=56319}function de(S){return S>=56320&&S<=57343}function ue(S){return de(S.charCodeAt(0))}function ce(S){return Z(S.charCodeAt(S.length-1))}function ne(S){for(var G=[],P=0;P<S.length;P++)S[P][1].length>0&&G.push(S[P]);return G}function re(S,G,P,V){return ce(S)||ue(V)?null:ne([[t,S],[r,G],[e,P],[t,V]])}function xe(S,G,P){var V=typeof P=="number"?{index:P,length:0}:P.oldRange,E=typeof P=="number"?null:P.newRange,T=S.length,D=G.length;if(V.length===0&&(E===null||E.length===0)){var U=V.index,J=S.slice(0,U),z=S.slice(U),le=E?E.index:null;e:{var ve=U+D-T;if(le!==null&&le!==ve||ve<0||ve>D)break e;var pe=G.slice(0,ve),Ne=G.slice(ve);if(Ne!==z)break e;var Oe=Math.min(U,ve),Ke=J.slice(0,Oe),We=pe.slice(0,Oe);if(Ke!==We)break e;var je=J.slice(Oe),ae=pe.slice(Oe);return re(Ke,je,ae,z)}e:{if(le!==null&&le!==U)break e;var Ie=U,pe=G.slice(0,Ie),Ne=G.slice(Ie);if(pe!==J)break e;var De=Math.min(T-Ie,D-Ie),Te=z.slice(z.length-De),Ue=Ne.slice(Ne.length-De);if(Te!==Ue)break e;var je=z.slice(0,z.length-De),ae=Ne.slice(0,Ne.length-De);return re(J,je,ae,Te)}}if(V.length>0&&E&&E.length===0)e:{var Ke=S.slice(0,V.index),Te=S.slice(V.index+V.length),Oe=Ke.length,De=Te.length;if(D<Oe+De)break e;var We=G.slice(0,Oe),Ue=G.slice(D-De);if(Ke!==We||Te!==Ue)break e;var je=S.slice(Oe,T-De),ae=G.slice(Oe,D-De);return re(Ke,je,ae,Te)}return null}function Se(S,G,P,V){return n(S,G,P,V,!0)}return Se.INSERT=e,Se.DELETE=r,Se.EQUAL=t,aa=Se,aa}var as={exports:{}};as.exports;var ku;function Pu(){return ku||(ku=1,function(r,e){var t=200,n="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",a="[object Array]",u="[object Boolean]",f="[object Date]",d="[object Error]",m="[object Function]",v="[object GeneratorFunction]",y="[object Map]",x="[object Number]",A="[object Object]",O="[object Promise]",N="[object RegExp]",M="[object Set]",W="[object String]",Z="[object Symbol]",de="[object WeakMap]",ue="[object ArrayBuffer]",ce="[object DataView]",ne="[object Float32Array]",re="[object Float64Array]",xe="[object Int8Array]",Se="[object Int16Array]",S="[object Int32Array]",G="[object Uint8Array]",P="[object Uint8ClampedArray]",V="[object Uint16Array]",E="[object Uint32Array]",T=/[\\^$.*+?()[\]{}|]/g,D=/\w*$/,U=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,z={};z[s]=z[a]=z[ue]=z[ce]=z[u]=z[f]=z[ne]=z[re]=z[xe]=z[Se]=z[S]=z[y]=z[x]=z[A]=z[N]=z[M]=z[W]=z[Z]=z[G]=z[P]=z[V]=z[E]=!0,z[d]=z[m]=z[de]=!1;var le=typeof nr=="object"&&nr&&nr.Object===Object&&nr,ve=typeof self=="object"&&self&&self.Object===Object&&self,pe=le||ve||Function("return this")(),Ne=e&&!e.nodeType&&e,Oe=Ne&&!0&&r&&!r.nodeType&&r,Ke=Oe&&Oe.exports===Ne;function We(h,w){return h.set(w[0],w[1]),h}function je(h,w){return h.add(w),h}function ae(h,w){for(var k=-1,te=h?h.length:0;++k<te&&w(h[k],k,h)!==!1;);return h}function Ie(h,w){for(var k=-1,te=w.length,Me=h.length;++k<te;)h[Me+k]=w[k];return h}function De(h,w,k,te){for(var Me=-1,ke=h?h.length:0;++Me<ke;)k=w(k,h[Me],Me,h);return k}function Te(h,w){for(var k=-1,te=Array(h);++k<h;)te[k]=w(k);return te}function Ue(h,w){return h==null?void 0:h[w]}function ut(h){var w=!1;if(h!=null&&typeof h.toString!="function")try{w=!!(h+"")}catch{}return w}function ot(h){var w=-1,k=Array(h.size);return h.forEach(function(te,Me){k[++w]=[Me,te]}),k}function Ht(h,w){return function(k){return h(w(k))}}function zt(h){var w=-1,k=Array(h.size);return h.forEach(function(te){k[++w]=te}),k}var Rn=Array.prototype,kn=Function.prototype,Xt=Object.prototype,Ct=pe["__core-js_shared__"],Nr=function(){var h=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||"");return h?"Symbol(src)_1."+h:""}(),sn=kn.toString,Qt=Xt.hasOwnProperty,on=Xt.toString,an=RegExp("^"+sn.call(Qt).replace(T,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=Ke?pe.Buffer:void 0,gn=pe.Symbol,mn=pe.Uint8Array,Nt=Ht(Object.getPrototypeOf,Object),Pn=Object.create,ln=Xt.propertyIsEnumerable,fr=Rn.splice,Zn=Object.getOwnPropertySymbols,$t=Lt?Lt.isBuffer:void 0,Le=Ht(Object.keys,Object),un=xn(pe,"DataView"),Mt=xn(pe,"Map"),Tt=xn(pe,"Promise"),me=xn(pe,"Set"),Vt=xn(pe,"WeakMap"),cn=xn(Object,"create"),yn=qt(un),bn=qt(Mt),Xn=qt(Tt),hr=qt(me),Cr=qt(Vt),Rt=gn?gn.prototype:void 0,fn=Rt?Rt.valueOf:void 0;function en(h){var w=-1,k=h?h.length:0;for(this.clear();++w<k;){var te=h[w];this.set(te[0],te[1])}}function dr(){this.__data__=cn?cn(null):{}}function at(h){return this.has(h)&&delete this.__data__[h]}function pt(h){var w=this.__data__;if(cn){var k=w[h];return k===n?void 0:k}return Qt.call(w,h)?w[h]:void 0}function Fr(h){var w=this.__data__;return cn?w[h]!==void 0:Qt.call(w,h)}function qn(h,w){var k=this.__data__;return k[h]=cn&&w===void 0?n:w,this}en.prototype.clear=dr,en.prototype.delete=at,en.prototype.get=pt,en.prototype.has=Fr,en.prototype.set=qn;function gt(h){var w=-1,k=h?h.length:0;for(this.clear();++w<k;){var te=h[w];this.set(te[0],te[1])}}function pr(){this.__data__=[]}function L(h){var w=this.__data__,k=mr(w,h);if(k<0)return!1;var te=w.length-1;return k==te?w.pop():fr.call(w,k,1),!0}function oe(h){var w=this.__data__,k=mr(w,h);return k<0?void 0:w[k][1]}function we(h){return mr(this.__data__,h)>-1}function qe(h,w){var k=this.__data__,te=mr(k,h);return te<0?k.push([h,w]):k[te][1]=w,this}gt.prototype.clear=pr,gt.prototype.delete=L,gt.prototype.get=oe,gt.prototype.has=we,gt.prototype.set=qe;function $e(h){var w=-1,k=h?h.length:0;for(this.clear();++w<k;){var te=h[w];this.set(te[0],te[1])}}function rt(){this.__data__={hash:new en,map:new(Mt||gt),string:new en}}function Be(h){return vr(this,h).delete(h)}function He(h){return vr(this,h).get(h)}function ft(h){return vr(this,h).has(h)}function ct(h,w){return vr(this,h).set(h,w),this}$e.prototype.clear=rt,$e.prototype.delete=Be,$e.prototype.get=He,$e.prototype.has=ft,$e.prototype.set=ct;function Je(h){this.__data__=new gt(h)}function Xe(){this.__data__=new gt}function kt(h){return this.__data__.delete(h)}function Et(h){return this.__data__.get(h)}function Ot(h){return this.__data__.has(h)}function hn(h,w){var k=this.__data__;if(k instanceof gt){var te=k.__data__;if(!Mt||te.length<t-1)return te.push([h,w]),this;k=this.__data__=new $e(te)}return k.set(h,w),this}Je.prototype.clear=Xe,Je.prototype.delete=kt,Je.prototype.get=Et,Je.prototype.has=Ot,Je.prototype.set=hn;function vn(h,w){var k=er(h)||Dn(h)?Te(h.length,String):[],te=k.length,Me=!!te;for(var ke in h)Qt.call(h,ke)&&!(Me&&(ke=="length"||wr(ke,te)))&&k.push(ke);return k}function gr(h,w,k){var te=h[w];(!(Qt.call(h,w)&&tn(te,k))||k===void 0&&!(w in h))&&(h[w]=k)}function mr(h,w){for(var k=h.length;k--;)if(tn(h[k][0],w))return k;return-1}function Pt(h,w){return h&&br(w,tr(w),h)}function Kr(h,w,k,te,Me,ke,tt){var nt;if(te&&(nt=ke?te(h,Me,ke,tt):te(h)),nt!==void 0)return nt;if(!On(h))return h;var bt=er(h);if(bt){if(nt=Ls(h),!w)return Vi(h,nt)}else{var st=En(h),_t=st==m||st==v;if(Gi(h))return Lr(h,w);if(st==A||st==s||_t&&!ke){if(ut(h))return ke?h:{};if(nt=In(_t?{}:h),!w)return Wi(h,Pt(nt,h))}else{if(!z[st])return ke?h:{};nt=Bt(h,st,Kr,w)}}tt||(tt=new Je);var It=tt.get(h);if(It)return It;if(tt.set(h,nt),!bt)var vt=k?Rr(h):tr(h);return ae(vt||h,function(St,wt){vt&&(wt=St,St=h[wt]),gr(nt,wt,Kr(St,w,k,te,wt,h,tt))}),nt}function Hr(h){return On(h)?Pn(h):{}}function Ki(h,w,k){var te=w(h);return er(h)?te:Ie(te,k(h))}function Ze(h){return on.call(h)}function Hi(h){if(!On(h)||jn(h))return!1;var w=Wt(h)||ut(h)?an:U;return w.test(qt(h))}function zi(h){if(!pi(h))return Le(h);var w=[];for(var k in Object(h))Qt.call(h,k)&&k!="constructor"&&w.push(k);return w}function Lr(h,w){if(w)return h.slice();var k=new h.constructor(h.length);return h.copy(k),k}function lt(h){var w=new h.constructor(h.byteLength);return new mn(w).set(new mn(h)),w}function wn(h,w){var k=w?lt(h.buffer):h.buffer;return new h.constructor(k,h.byteOffset,h.byteLength)}function yr(h,w,k){var te=w?k(ot(h),!0):ot(h);return De(te,We,new h.constructor)}function Qn(h){var w=new h.constructor(h.source,D.exec(h));return w.lastIndex=h.lastIndex,w}function hi(h,w,k){var te=w?k(zt(h),!0):zt(h);return De(te,je,new h.constructor)}function di(h){return fn?Object(fn.call(h)):{}}function zr(h,w){var k=w?lt(h.buffer):h.buffer;return new h.constructor(k,h.byteOffset,h.length)}function Vi(h,w){var k=-1,te=h.length;for(w||(w=Array(te));++k<te;)w[k]=h[k];return w}function br(h,w,k,te){k||(k={});for(var Me=-1,ke=w.length;++Me<ke;){var tt=w[Me],nt=void 0;gr(k,tt,nt===void 0?h[tt]:nt)}return k}function Wi(h,w){return br(h,Ge(h),w)}function Rr(h){return Ki(h,tr,Ge)}function vr(h,w){var k=h.__data__;return Vr(w)?k[typeof w=="string"?"string":"hash"]:k.map}function xn(h,w){var k=Ue(h,w);return Hi(k)?k:void 0}var Ge=Zn?Ht(Zn,Object):gi,En=Ze;(un&&En(new un(new ArrayBuffer(1)))!=ce||Mt&&En(new Mt)!=y||Tt&&En(Tt.resolve())!=O||me&&En(new me)!=M||Vt&&En(new Vt)!=de)&&(En=function(h){var w=on.call(h),k=w==A?h.constructor:void 0,te=k?qt(k):void 0;if(te)switch(te){case yn:return ce;case bn:return y;case Xn:return O;case hr:return M;case Cr:return de}return w});function Ls(h){var w=h.length,k=h.constructor(w);return w&&typeof h[0]=="string"&&Qt.call(h,"index")&&(k.index=h.index,k.input=h.input),k}function In(h){return typeof h.constructor=="function"&&!pi(h)?Hr(Nt(h)):{}}function Bt(h,w,k,te){var Me=h.constructor;switch(w){case ue:return lt(h);case u:case f:return new Me(+h);case ce:return wn(h,te);case ne:case re:case xe:case Se:case S:case G:case P:case V:case E:return zr(h,te);case y:return yr(h,te,k);case x:case W:return new Me(h);case N:return Qn(h);case M:return hi(h,te,k);case Z:return di(h)}}function wr(h,w){return w=w??i,!!w&&(typeof h=="number"||J.test(h))&&h>-1&&h%1==0&&h<w}function Vr(h){var w=typeof h;return w=="string"||w=="number"||w=="symbol"||w=="boolean"?h!=="__proto__":h===null}function jn(h){return!!Nr&&Nr in h}function pi(h){var w=h&&h.constructor,k=typeof w=="function"&&w.prototype||Xt;return h===k}function qt(h){if(h!=null){try{return sn.call(h)}catch{}try{return h+""}catch{}}return""}function yt(h){return Kr(h,!0,!0)}function tn(h,w){return h===w||h!==h&&w!==w}function Dn(h){return $n(h)&&Qt.call(h,"callee")&&(!ln.call(h,"callee")||on.call(h)==s)}var er=Array.isArray;function xr(h){return h!=null&&Wr(h.length)&&!Wt(h)}function $n(h){return Gr(h)&&xr(h)}var Gi=$t||Yi;function Wt(h){var w=On(h)?on.call(h):"";return w==m||w==v}function Wr(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=i}function On(h){var w=typeof h;return!!h&&(w=="object"||w=="function")}function Gr(h){return!!h&&typeof h=="object"}function tr(h){return xr(h)?vn(h):zi(h)}function gi(){return[]}function Yi(){return!1}r.exports=yt}(as,as.exports)),as.exports}var ls={exports:{}};ls.exports;var qu;function Iu(){return qu||(qu=1,function(r,e){var t=200,n="__lodash_hash_undefined__",i=1,s=2,a=9007199254740991,u="[object Arguments]",f="[object Array]",d="[object AsyncFunction]",m="[object Boolean]",v="[object Date]",y="[object Error]",x="[object Function]",A="[object GeneratorFunction]",O="[object Map]",N="[object Number]",M="[object Null]",W="[object Object]",Z="[object Promise]",de="[object Proxy]",ue="[object RegExp]",ce="[object Set]",ne="[object String]",re="[object Symbol]",xe="[object Undefined]",Se="[object WeakMap]",S="[object ArrayBuffer]",G="[object DataView]",P="[object Float32Array]",V="[object Float64Array]",E="[object Int8Array]",T="[object Int16Array]",D="[object Int32Array]",U="[object Uint8Array]",J="[object Uint8ClampedArray]",z="[object Uint16Array]",le="[object Uint32Array]",ve=/[\\^$.*+?()[\]{}|]/g,pe=/^\[object .+?Constructor\]$/,Ne=/^(?:0|[1-9]\d*)$/,Oe={};Oe[P]=Oe[V]=Oe[E]=Oe[T]=Oe[D]=Oe[U]=Oe[J]=Oe[z]=Oe[le]=!0,Oe[u]=Oe[f]=Oe[S]=Oe[m]=Oe[G]=Oe[v]=Oe[y]=Oe[x]=Oe[O]=Oe[N]=Oe[W]=Oe[ue]=Oe[ce]=Oe[ne]=Oe[Se]=!1;var Ke=typeof nr=="object"&&nr&&nr.Object===Object&&nr,We=typeof self=="object"&&self&&self.Object===Object&&self,je=Ke||We||Function("return this")(),ae=e&&!e.nodeType&&e,Ie=ae&&!0&&r&&!r.nodeType&&r,De=Ie&&Ie.exports===ae,Te=De&&Ke.process,Ue=function(){try{return Te&&Te.binding&&Te.binding("util")}catch{}}(),ut=Ue&&Ue.isTypedArray;function ot(h,w){for(var k=-1,te=h==null?0:h.length,Me=0,ke=[];++k<te;){var tt=h[k];w(tt,k,h)&&(ke[Me++]=tt)}return ke}function Ht(h,w){for(var k=-1,te=w.length,Me=h.length;++k<te;)h[Me+k]=w[k];return h}function zt(h,w){for(var k=-1,te=h==null?0:h.length;++k<te;)if(w(h[k],k,h))return!0;return!1}function Rn(h,w){for(var k=-1,te=Array(h);++k<h;)te[k]=w(k);return te}function kn(h){return function(w){return h(w)}}function Xt(h,w){return h.has(w)}function Ct(h,w){return h==null?void 0:h[w]}function Nr(h){var w=-1,k=Array(h.size);return h.forEach(function(te,Me){k[++w]=[Me,te]}),k}function sn(h,w){return function(k){return h(w(k))}}function Qt(h){var w=-1,k=Array(h.size);return h.forEach(function(te){k[++w]=te}),k}var on=Array.prototype,an=Function.prototype,Lt=Object.prototype,gn=je["__core-js_shared__"],mn=an.toString,Nt=Lt.hasOwnProperty,Pn=function(){var h=/[^.]+$/.exec(gn&&gn.keys&&gn.keys.IE_PROTO||"");return h?"Symbol(src)_1."+h:""}(),ln=Lt.toString,fr=RegExp("^"+mn.call(Nt).replace(ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zn=De?je.Buffer:void 0,$t=je.Symbol,Le=je.Uint8Array,un=Lt.propertyIsEnumerable,Mt=on.splice,Tt=$t?$t.toStringTag:void 0,me=Object.getOwnPropertySymbols,Vt=Zn?Zn.isBuffer:void 0,cn=sn(Object.keys,Object),yn=Ge(je,"DataView"),bn=Ge(je,"Map"),Xn=Ge(je,"Promise"),hr=Ge(je,"Set"),Cr=Ge(je,"WeakMap"),Rt=Ge(Object,"create"),fn=qt(yn),en=qt(bn),dr=qt(Xn),at=qt(hr),pt=qt(Cr),Fr=$t?$t.prototype:void 0,qn=Fr?Fr.valueOf:void 0;function gt(h){var w=-1,k=h==null?0:h.length;for(this.clear();++w<k;){var te=h[w];this.set(te[0],te[1])}}function pr(){this.__data__=Rt?Rt(null):{},this.size=0}function L(h){var w=this.has(h)&&delete this.__data__[h];return this.size-=w?1:0,w}function oe(h){var w=this.__data__;if(Rt){var k=w[h];return k===n?void 0:k}return Nt.call(w,h)?w[h]:void 0}function we(h){var w=this.__data__;return Rt?w[h]!==void 0:Nt.call(w,h)}function qe(h,w){var k=this.__data__;return this.size+=this.has(h)?0:1,k[h]=Rt&&w===void 0?n:w,this}gt.prototype.clear=pr,gt.prototype.delete=L,gt.prototype.get=oe,gt.prototype.has=we,gt.prototype.set=qe;function $e(h){var w=-1,k=h==null?0:h.length;for(this.clear();++w<k;){var te=h[w];this.set(te[0],te[1])}}function rt(){this.__data__=[],this.size=0}function Be(h){var w=this.__data__,k=Lr(w,h);if(k<0)return!1;var te=w.length-1;return k==te?w.pop():Mt.call(w,k,1),--this.size,!0}function He(h){var w=this.__data__,k=Lr(w,h);return k<0?void 0:w[k][1]}function ft(h){return Lr(this.__data__,h)>-1}function ct(h,w){var k=this.__data__,te=Lr(k,h);return te<0?(++this.size,k.push([h,w])):k[te][1]=w,this}$e.prototype.clear=rt,$e.prototype.delete=Be,$e.prototype.get=He,$e.prototype.has=ft,$e.prototype.set=ct;function Je(h){var w=-1,k=h==null?0:h.length;for(this.clear();++w<k;){var te=h[w];this.set(te[0],te[1])}}function Xe(){this.size=0,this.__data__={hash:new gt,map:new(bn||$e),string:new gt}}function kt(h){var w=xn(this,h).delete(h);return this.size-=w?1:0,w}function Et(h){return xn(this,h).get(h)}function Ot(h){return xn(this,h).has(h)}function hn(h,w){var k=xn(this,h),te=k.size;return k.set(h,w),this.size+=k.size==te?0:1,this}Je.prototype.clear=Xe,Je.prototype.delete=kt,Je.prototype.get=Et,Je.prototype.has=Ot,Je.prototype.set=hn;function vn(h){var w=-1,k=h==null?0:h.length;for(this.__data__=new Je;++w<k;)this.add(h[w])}function gr(h){return this.__data__.set(h,n),this}function mr(h){return this.__data__.has(h)}vn.prototype.add=vn.prototype.push=gr,vn.prototype.has=mr;function Pt(h){var w=this.__data__=new $e(h);this.size=w.size}function Kr(){this.__data__=new $e,this.size=0}function Hr(h){var w=this.__data__,k=w.delete(h);return this.size=w.size,k}function Ki(h){return this.__data__.get(h)}function Ze(h){return this.__data__.has(h)}function Hi(h,w){var k=this.__data__;if(k instanceof $e){var te=k.__data__;if(!bn||te.length<t-1)return te.push([h,w]),this.size=++k.size,this;k=this.__data__=new Je(te)}return k.set(h,w),this.size=k.size,this}Pt.prototype.clear=Kr,Pt.prototype.delete=Hr,Pt.prototype.get=Ki,Pt.prototype.has=Ze,Pt.prototype.set=Hi;function zi(h,w){var k=Dn(h),te=!k&&tn(h),Me=!k&&!te&&xr(h),ke=!k&&!te&&!Me&&Gr(h),tt=k||te||Me||ke,nt=tt?Rn(h.length,String):[],bt=nt.length;for(var st in h)Nt.call(h,st)&&!(tt&&(st=="length"||Me&&(st=="offset"||st=="parent")||ke&&(st=="buffer"||st=="byteLength"||st=="byteOffset")||Bt(st,bt)))&&nt.push(st);return nt}function Lr(h,w){for(var k=h.length;k--;)if(yt(h[k][0],w))return k;return-1}function lt(h,w,k){var te=w(h);return Dn(h)?te:Ht(te,k(h))}function wn(h){return h==null?h===void 0?xe:M:Tt&&Tt in Object(h)?En(h):pi(h)}function yr(h){return On(h)&&wn(h)==u}function Qn(h,w,k,te,Me){return h===w?!0:h==null||w==null||!On(h)&&!On(w)?h!==h&&w!==w:hi(h,w,k,te,Qn,Me)}function hi(h,w,k,te,Me,ke){var tt=Dn(h),nt=Dn(w),bt=tt?f:In(h),st=nt?f:In(w);bt=bt==u?W:bt,st=st==u?W:st;var _t=bt==W,It=st==W,vt=bt==st;if(vt&&xr(h)){if(!xr(w))return!1;tt=!0,_t=!1}if(vt&&!_t)return ke||(ke=new Pt),tt||Gr(h)?br(h,w,k,te,Me,ke):Wi(h,w,bt,k,te,Me,ke);if(!(k&i)){var St=_t&&Nt.call(h,"__wrapped__"),wt=It&&Nt.call(w,"__wrapped__");if(St||wt){var Sn=St?h.value():h,Mn=wt?w.value():w;return ke||(ke=new Pt),Me(Sn,Mn,k,te,ke)}}return vt?(ke||(ke=new Pt),Rr(h,w,k,te,Me,ke)):!1}function di(h){if(!Wr(h)||Vr(h))return!1;var w=Gi(h)?fr:pe;return w.test(qt(h))}function zr(h){return On(h)&&Wt(h.length)&&!!Oe[wn(h)]}function Vi(h){if(!jn(h))return cn(h);var w=[];for(var k in Object(h))Nt.call(h,k)&&k!="constructor"&&w.push(k);return w}function br(h,w,k,te,Me,ke){var tt=k&i,nt=h.length,bt=w.length;if(nt!=bt&&!(tt&&bt>nt))return!1;var st=ke.get(h);if(st&&ke.get(w))return st==w;var _t=-1,It=!0,vt=k&s?new vn:void 0;for(ke.set(h,w),ke.set(w,h);++_t<nt;){var St=h[_t],wt=w[_t];if(te)var Sn=tt?te(wt,St,_t,w,h,ke):te(St,wt,_t,h,w,ke);if(Sn!==void 0){if(Sn)continue;It=!1;break}if(vt){if(!zt(w,function(Mn,kr){if(!Xt(vt,kr)&&(St===Mn||Me(St,Mn,k,te,ke)))return vt.push(kr)})){It=!1;break}}else if(!(St===wt||Me(St,wt,k,te,ke))){It=!1;break}}return ke.delete(h),ke.delete(w),It}function Wi(h,w,k,te,Me,ke,tt){switch(k){case G:if(h.byteLength!=w.byteLength||h.byteOffset!=w.byteOffset)return!1;h=h.buffer,w=w.buffer;case S:return!(h.byteLength!=w.byteLength||!ke(new Le(h),new Le(w)));case m:case v:case N:return yt(+h,+w);case y:return h.name==w.name&&h.message==w.message;case ue:case ne:return h==w+"";case O:var nt=Nr;case ce:var bt=te&i;if(nt||(nt=Qt),h.size!=w.size&&!bt)return!1;var st=tt.get(h);if(st)return st==w;te|=s,tt.set(h,w);var _t=br(nt(h),nt(w),te,Me,ke,tt);return tt.delete(h),_t;case re:if(qn)return qn.call(h)==qn.call(w)}return!1}function Rr(h,w,k,te,Me,ke){var tt=k&i,nt=vr(h),bt=nt.length,st=vr(w),_t=st.length;if(bt!=_t&&!tt)return!1;for(var It=bt;It--;){var vt=nt[It];if(!(tt?vt in w:Nt.call(w,vt)))return!1}var St=ke.get(h);if(St&&ke.get(w))return St==w;var wt=!0;ke.set(h,w),ke.set(w,h);for(var Sn=tt;++It<bt;){vt=nt[It];var Mn=h[vt],kr=w[vt];if(te)var mi=tt?te(kr,Mn,vt,w,h,ke):te(Mn,kr,vt,h,w,ke);if(!(mi===void 0?Mn===kr||Me(Mn,kr,k,te,ke):mi)){wt=!1;break}Sn||(Sn=vt=="constructor")}if(wt&&!Sn){var Yr=h.constructor,Jr=w.constructor;Yr!=Jr&&"constructor"in h&&"constructor"in w&&!(typeof Yr=="function"&&Yr instanceof Yr&&typeof Jr=="function"&&Jr instanceof Jr)&&(wt=!1)}return ke.delete(h),ke.delete(w),wt}function vr(h){return lt(h,tr,Ls)}function xn(h,w){var k=h.__data__;return wr(w)?k[typeof w=="string"?"string":"hash"]:k.map}function Ge(h,w){var k=Ct(h,w);return di(k)?k:void 0}function En(h){var w=Nt.call(h,Tt),k=h[Tt];try{h[Tt]=void 0;var te=!0}catch{}var Me=ln.call(h);return te&&(w?h[Tt]=k:delete h[Tt]),Me}var Ls=me?function(h){return h==null?[]:(h=Object(h),ot(me(h),function(w){return un.call(h,w)}))}:gi,In=wn;(yn&&In(new yn(new ArrayBuffer(1)))!=G||bn&&In(new bn)!=O||Xn&&In(Xn.resolve())!=Z||hr&&In(new hr)!=ce||Cr&&In(new Cr)!=Se)&&(In=function(h){var w=wn(h),k=w==W?h.constructor:void 0,te=k?qt(k):"";if(te)switch(te){case fn:return G;case en:return O;case dr:return Z;case at:return ce;case pt:return Se}return w});function Bt(h,w){return w=w??a,!!w&&(typeof h=="number"||Ne.test(h))&&h>-1&&h%1==0&&h<w}function wr(h){var w=typeof h;return w=="string"||w=="number"||w=="symbol"||w=="boolean"?h!=="__proto__":h===null}function Vr(h){return!!Pn&&Pn in h}function jn(h){var w=h&&h.constructor,k=typeof w=="function"&&w.prototype||Lt;return h===k}function pi(h){return ln.call(h)}function qt(h){if(h!=null){try{return mn.call(h)}catch{}try{return h+""}catch{}}return""}function yt(h,w){return h===w||h!==h&&w!==w}var tn=yr(function(){return arguments}())?yr:function(h){return On(h)&&Nt.call(h,"callee")&&!un.call(h,"callee")},Dn=Array.isArray;function er(h){return h!=null&&Wt(h.length)&&!Gi(h)}var xr=Vt||Yi;function $n(h,w){return Qn(h,w)}function Gi(h){if(!Wr(h))return!1;var w=wn(h);return w==x||w==A||w==d||w==de}function Wt(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=a}function Wr(h){var w=typeof h;return h!=null&&(w=="object"||w=="function")}function On(h){return h!=null&&typeof h=="object"}var Gr=ut?kn(ut):zr;function tr(h){return er(h)?zi(h):Vi(h)}function gi(){return[]}function Yi(){return!1}r.exports=$n}(ls,ls.exports)),ls.exports}var Vs={},ju;function Ey(){if(ju)return Vs;ju=1,Object.defineProperty(Vs,"__esModule",{value:!0});const r=Pu(),e=Iu();var t;return function(n){function i(f={},d={},m=!1){typeof f!="object"&&(f={}),typeof d!="object"&&(d={});let v=r(d);m||(v=Object.keys(v).reduce((y,x)=>(v[x]!=null&&(y[x]=v[x]),y),{}));for(const y in f)f[y]!==void 0&&d[y]===void 0&&(v[y]=f[y]);return Object.keys(v).length>0?v:void 0}n.compose=i;function s(f={},d={}){typeof f!="object"&&(f={}),typeof d!="object"&&(d={});const m=Object.keys(f).concat(Object.keys(d)).reduce((v,y)=>(e(f[y],d[y])||(v[y]=d[y]===void 0?null:d[y]),v),{});return Object.keys(m).length>0?m:void 0}n.diff=s;function a(f={},d={}){f=f||{};const m=Object.keys(d).reduce((v,y)=>(d[y]!==f[y]&&f[y]!==void 0&&(v[y]=d[y]),v),{});return Object.keys(f).reduce((v,y)=>(f[y]!==d[y]&&d[y]===void 0&&(v[y]=null),v),m)}n.invert=a;function u(f,d,m=!1){if(typeof f!="object")return d;if(typeof d!="object")return;if(!m)return d;const v=Object.keys(d).reduce((y,x)=>(f[x]===void 0&&(y[x]=d[x]),y),{});return Object.keys(v).length>0?v:void 0}n.transform=u}(t||(t={})),Vs.default=t,Vs}var Ws={},Du;function $u(){if(Du)return Ws;Du=1,Object.defineProperty(Ws,"__esModule",{value:!0});var r;return function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t}(r||(r={})),Ws.default=r,Ws}var Gs={},Mu;function Oy(){if(Mu)return Gs;Mu=1,Object.defineProperty(Gs,"__esModule",{value:!0});const r=$u();class e{constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);const i=this.ops[this.index];if(i){const s=this.offset,a=r.default.length(i);if(n>=a-s?(n=a-s,this.index+=1,this.offset=0):this.offset+=n,typeof i.delete=="number")return{delete:n};{const u={};return i.attributes&&(u.attributes=i.attributes),typeof i.retain=="number"?u.retain=n:typeof i.retain=="object"&&i.retain!==null?u.retain=i.retain:typeof i.insert=="string"?u.insert=i.insert.substr(s,n):u.insert=i.insert,u}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const n=this.offset,i=this.index,s=this.next(),a=this.ops.slice(this.index);return this.offset=n,this.index=i,[s].concat(a)}}else return[]}}return Gs.default=e,Gs}var Bu;function Sy(){return Bu||(Bu=1,function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=xy(),n=Pu(),i=Iu(),s=Ey();e.AttributeMap=s.default;const a=$u();e.Op=a.default;const u=Oy();e.OpIterator=u.default;const f="\0",d=(v,y)=>{if(typeof v!="object"||v===null)throw new Error(`cannot retain a ${typeof v}`);if(typeof y!="object"||y===null)throw new Error(`cannot retain a ${typeof y}`);const x=Object.keys(v)[0];if(!x||x!==Object.keys(y)[0])throw new Error(`embed types not matched: ${x} != ${Object.keys(y)[0]}`);return[x,v[x],y[x]]};class m{constructor(y){Array.isArray(y)?this.ops=y:y!=null&&Array.isArray(y.ops)?this.ops=y.ops:this.ops=[]}static registerEmbed(y,x){this.handlers[y]=x}static unregisterEmbed(y){delete this.handlers[y]}static getHandler(y){const x=this.handlers[y];if(!x)throw new Error(`no handlers for embed type "${y}"`);return x}insert(y,x){const A={};return typeof y=="string"&&y.length===0?this:(A.insert=y,x!=null&&typeof x=="object"&&Object.keys(x).length>0&&(A.attributes=x),this.push(A))}delete(y){return y<=0?this:this.push({delete:y})}retain(y,x){if(typeof y=="number"&&y<=0)return this;const A={retain:y};return x!=null&&typeof x=="object"&&Object.keys(x).length>0&&(A.attributes=x),this.push(A)}push(y){let x=this.ops.length,A=this.ops[x-1];if(y=n(y),typeof A=="object"){if(typeof y.delete=="number"&&typeof A.delete=="number")return this.ops[x-1]={delete:A.delete+y.delete},this;if(typeof A.delete=="number"&&y.insert!=null&&(x-=1,A=this.ops[x-1],typeof A!="object"))return this.ops.unshift(y),this;if(i(y.attributes,A.attributes)){if(typeof y.insert=="string"&&typeof A.insert=="string")return this.ops[x-1]={insert:A.insert+y.insert},typeof y.attributes=="object"&&(this.ops[x-1].attributes=y.attributes),this;if(typeof y.retain=="number"&&typeof A.retain=="number")return this.ops[x-1]={retain:A.retain+y.retain},typeof y.attributes=="object"&&(this.ops[x-1].attributes=y.attributes),this}}return x===this.ops.length?this.ops.push(y):this.ops.splice(x,0,y),this}chop(){const y=this.ops[this.ops.length-1];return y&&typeof y.retain=="number"&&!y.attributes&&this.ops.pop(),this}filter(y){return this.ops.filter(y)}forEach(y){this.ops.forEach(y)}map(y){return this.ops.map(y)}partition(y){const x=[],A=[];return this.forEach(O=>{(y(O)?x:A).push(O)}),[x,A]}reduce(y,x){return this.ops.reduce(y,x)}changeLength(){return this.reduce((y,x)=>x.insert?y+a.default.length(x):x.delete?y-x.delete:y,0)}length(){return this.reduce((y,x)=>y+a.default.length(x),0)}slice(y=0,x=1/0){const A=[],O=new u.default(this.ops);let N=0;for(;N<x&&O.hasNext();){let M;N<y?M=O.next(y-N):(M=O.next(x-N),A.push(M)),N+=a.default.length(M)}return new m(A)}compose(y){const x=new u.default(this.ops),A=new u.default(y.ops),O=[],N=A.peek();if(N!=null&&typeof N.retain=="number"&&N.attributes==null){let W=N.retain;for(;x.peekType()==="insert"&&x.peekLength()<=W;)W-=x.peekLength(),O.push(x.next());N.retain-W>0&&A.next(N.retain-W)}const M=new m(O);for(;x.hasNext()||A.hasNext();)if(A.peekType()==="insert")M.push(A.next());else if(x.peekType()==="delete")M.push(x.next());else{const W=Math.min(x.peekLength(),A.peekLength()),Z=x.next(W),de=A.next(W);if(de.retain){const ue={};if(typeof Z.retain=="number")ue.retain=typeof de.retain=="number"?W:de.retain;else if(typeof de.retain=="number")Z.retain==null?ue.insert=Z.insert:ue.retain=Z.retain;else{const ne=Z.retain==null?"insert":"retain",[re,xe,Se]=d(Z[ne],de.retain),S=m.getHandler(re);ue[ne]={[re]:S.compose(xe,Se,ne==="retain")}}const ce=s.default.compose(Z.attributes,de.attributes,typeof Z.retain=="number");if(ce&&(ue.attributes=ce),M.push(ue),!A.hasNext()&&i(M.ops[M.ops.length-1],ue)){const ne=new m(x.rest());return M.concat(ne).chop()}}else typeof de.delete=="number"&&(typeof Z.retain=="number"||typeof Z.retain=="object"&&Z.retain!==null)&&M.push(de)}return M.chop()}concat(y){const x=new m(this.ops.slice());return y.ops.length>0&&(x.push(y.ops[0]),x.ops=x.ops.concat(y.ops.slice(1))),x}diff(y,x){if(this.ops===y.ops)return new m;const A=[this,y].map(Z=>Z.map(de=>{if(de.insert!=null)return typeof de.insert=="string"?de.insert:f;const ue=Z===y?"on":"with";throw new Error("diff() called "+ue+" non-document")}).join("")),O=new m,N=t(A[0],A[1],x,!0),M=new u.default(this.ops),W=new u.default(y.ops);return N.forEach(Z=>{let de=Z[1].length;for(;de>0;){let ue=0;switch(Z[0]){case t.INSERT:ue=Math.min(W.peekLength(),de),O.push(W.next(ue));break;case t.DELETE:ue=Math.min(de,M.peekLength()),M.next(ue),O.delete(ue);break;case t.EQUAL:ue=Math.min(M.peekLength(),W.peekLength(),de);const ce=M.next(ue),ne=W.next(ue);i(ce.insert,ne.insert)?O.retain(ue,s.default.diff(ce.attributes,ne.attributes)):O.push(ne).delete(ue);break}de-=ue}}),O.chop()}eachLine(y,x=`
31
- `){const A=new u.default(this.ops);let O=new m,N=0;for(;A.hasNext();){if(A.peekType()!=="insert")return;const M=A.peek(),W=a.default.length(M)-A.peekLength(),Z=typeof M.insert=="string"?M.insert.indexOf(x,W)-W:-1;if(Z<0)O.push(A.next());else if(Z>0)O.push(A.next(Z));else{if(y(O,A.next(1).attributes||{},N)===!1)return;N+=1,O=new m}}O.length()>0&&y(O,{},N)}invert(y){const x=new m;return this.reduce((A,O)=>{if(O.insert)x.delete(a.default.length(O));else{if(typeof O.retain=="number"&&O.attributes==null)return x.retain(O.retain),A+O.retain;if(O.delete||typeof O.retain=="number"){const N=O.delete||O.retain;return y.slice(A,A+N).forEach(W=>{O.delete?x.push(W):O.retain&&O.attributes&&x.retain(a.default.length(W),s.default.invert(O.attributes,W.attributes))}),A+N}else if(typeof O.retain=="object"&&O.retain!==null){const N=y.slice(A,A+1),M=new u.default(N.ops).next(),[W,Z,de]=d(O.retain,M.insert),ue=m.getHandler(W);return x.retain({[W]:ue.invert(Z,de)},s.default.invert(O.attributes,M.attributes)),A+1}}return A},0),x.chop()}transform(y,x=!1){if(x=!!x,typeof y=="number")return this.transformPosition(y,x);const A=y,O=new u.default(this.ops),N=new u.default(A.ops),M=new m;for(;O.hasNext()||N.hasNext();)if(O.peekType()==="insert"&&(x||N.peekType()!=="insert"))M.retain(a.default.length(O.next()));else if(N.peekType()==="insert")M.push(N.next());else{const W=Math.min(O.peekLength(),N.peekLength()),Z=O.next(W),de=N.next(W);if(Z.delete)continue;if(de.delete)M.push(de);else{const ue=Z.retain,ce=de.retain;let ne=typeof ce=="object"&&ce!==null?ce:W;if(typeof ue=="object"&&ue!==null&&typeof ce=="object"&&ce!==null){const re=Object.keys(ue)[0];if(re===Object.keys(ce)[0]){const xe=m.getHandler(re);xe&&(ne={[re]:xe.transform(ue[re],ce[re],x)})}}M.retain(ne,s.default.transform(Z.attributes,de.attributes,x))}}return M.chop()}transformPosition(y,x=!1){x=!!x;const A=new u.default(this.ops);let O=0;for(;A.hasNext()&&O<=y;){const N=A.peekLength(),M=A.peekType();if(A.next(),M==="delete"){y-=Math.min(N,y-O);continue}else M==="insert"&&(O<y||!x)&&(y+=N);O+=N}return y}}m.Op=a.default,m.OpIterator=u.default,m.AttributeMap=s.default,m.handlers={},e.default=m,r.exports=m,r.exports.default=m}(zs,zs.exports)),zs.exports}var Tn=Sy();const Re=Do(Tn);class Hn extends dn{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Hn.blotName="break",Hn.tagName="BR";let zn=class extends Hs{};const Ay={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ys(r){return r.replace(/[&<>"']/g,e=>Ay[e])}const cr=class cr extends ra{static compare(e,t){const n=cr.order.indexOf(e),i=cr.order.indexOf(t);return n>=0||i>=0?n-i:e===t?0:e<t?-1:1}formatAt(e,t,n,i){if(cr.compare(this.statics.blotName,n)<0&&this.scroll.query(n,Pe.BLOT)){const s=this.isolate(e,t);i&&s.wrap(n,i)}else super.formatAt(e,t,n,i)}optimize(e){if(super.optimize(e),this.parent instanceof cr&&cr.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};Ae(cr,"allowedChildren",[cr,Hn,dn,zn]),Ae(cr,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let or=cr;const Uu=1;class jt extends os{constructor(){super(...arguments);Ae(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Fu(this)),this.cache.delta}deleteAt(t,n){super.deleteAt(t,n),this.cache={}}formatAt(t,n,i,s){n<=0||(this.scroll.query(i,Pe.BLOCK)?t+n===this.length()&&this.format(i,s):super.formatAt(t,Math.min(n,this.length()-t-1),i,s),this.cache={})}insertAt(t,n,i){if(i!=null){super.insertAt(t,n,i),this.cache={};return}if(n.length===0)return;const s=n.split(`
32
- `),a=s.shift();a.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});let u=this;s.reduce((f,d)=>(u=u.split(f,!0),u.insertAt(0,d),d.length),t+a.length)}insertBefore(t,n){const{head:i}=this.children;super.insertBefore(t,n),i instanceof Hn&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Uu),this.cache.length}moveChildren(t,n){super.moveChildren(t,n),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n&&(t===0||t>=this.length()-Uu)){const s=this.clone();return t===0?(this.parent.insertBefore(s,this),this):(this.parent.insertBefore(s,this.next),s)}const i=super.split(t,n);return this.cache={},i}}jt.blotName="block",jt.tagName="P",jt.defaultChild=Hn,jt.allowedChildren=[Hn,or,dn,zn];class _n extends dn{attach(){super.attach(),this.attributes=new Fs(this.domNode)}delta(){return new Re().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const n=this.scroll.query(e,Pe.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,t)}formatAt(e,t,n,i){this.format(n,i)}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n);return}const i=t.split(`
33
- `),s=i.pop(),a=i.map(f=>{const d=this.scroll.create(jt.blotName);return d.insertAt(0,f),d}),u=this.split(e);a.forEach(f=>{this.parent.insertBefore(f,u)}),s&&this.parent.insertBefore(this.scroll.create("text",s),u)}}_n.scope=Pe.BLOCK_BLOT;function Fu(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r.descendants(Ut).reduce((t,n)=>n.length()===0?t:t.insert(n.value(),Nn(n,{},e)),new Re).insert(`
34
- `,Nn(r))}function Nn(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return r==null||("formats"in r&&typeof r.formats=="function"&&(e={...e,...r.formats()},t&&delete e["code-token"]),r.parent==null||r.parent.statics.blotName==="scroll"||r.parent.statics.scope!==r.statics.scope)?e:Nn(r.parent,e,t)}const Ln=class Ln extends dn{static value(){}constructor(e,t,n){super(e,t),this.selection=n,this.textNode=document.createTextNode(Ln.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,t){if(this.savedLength!==0){super.format(e,t);return}let n=this,i=0;for(;n!=null&&n.statics.scope!==Pe.BLOCK_BLOT;)i+=n.offset(n.parent),n=n.parent;n!=null&&(this.savedLength=Ln.CONTENTS.length,n.optimize(),n.formatAt(i,Ln.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof zn?this.prev:null,n=t?t.length():0,i=this.next instanceof zn?this.next:null,s=i?i.text:"",{textNode:a}=this,u=a.data.split(Ln.CONTENTS).join("");a.data=Ln.CONTENTS;let f;if(t)f=t,(u||i)&&(t.insertAt(t.length(),u+s),i&&i.remove());else if(i)f=i,i.insertAt(0,u);else{const d=document.createTextNode(u);f=this.scroll.create(d),this.parent.insertBefore(f,this)}if(this.remove(),e){const d=(y,x)=>t&&y===t.domNode?x:y===a?n+x-1:i&&y===i.domNode?n+u.length+x:null,m=d(e.start.node,e.start.offset),v=d(e.end.node,e.end.offset);if(m!==null&&v!==null)return{startNode:f.domNode,startOffset:m,endNode:f.domNode,endOffset:v}}return null}update(e,t){if(e.some(n=>n.type==="characterData"&&n.target===this.textNode)){const n=this.restore();n&&(t.range=n)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=Ln.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};Ae(Ln,"blotName","cursor"),Ae(Ln,"className","ql-cursor"),Ae(Ln,"tagName","span"),Ae(Ln,"CONTENTS","\uFEFF");let Ci=Ln;var la={exports:{}},Ku;function Ty(){return Ku||(Ku=1,function(r){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function i(f,d,m){this.fn=f,this.context=d,this.once=m||!1}function s(f,d,m,v,y){if(typeof m!="function")throw new TypeError("The listener must be a function");var x=new i(m,v||f,y),A=t?t+d:d;return f._events[A]?f._events[A].fn?f._events[A]=[f._events[A],x]:f._events[A].push(x):(f._events[A]=x,f._eventsCount++),f}function a(f,d){--f._eventsCount===0?f._events=new n:delete f._events[d]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var d=[],m,v;if(this._eventsCount===0)return d;for(v in m=this._events)e.call(m,v)&&d.push(t?v.slice(1):v);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(m)):d},u.prototype.listeners=function(d){var m=t?t+d:d,v=this._events[m];if(!v)return[];if(v.fn)return[v.fn];for(var y=0,x=v.length,A=new Array(x);y<x;y++)A[y]=v[y].fn;return A},u.prototype.listenerCount=function(d){var m=t?t+d:d,v=this._events[m];return v?v.fn?1:v.length:0},u.prototype.emit=function(d,m,v,y,x,A){var O=t?t+d:d;if(!this._events[O])return!1;var N=this._events[O],M=arguments.length,W,Z;if(N.fn){switch(N.once&&this.removeListener(d,N.fn,void 0,!0),M){case 1:return N.fn.call(N.context),!0;case 2:return N.fn.call(N.context,m),!0;case 3:return N.fn.call(N.context,m,v),!0;case 4:return N.fn.call(N.context,m,v,y),!0;case 5:return N.fn.call(N.context,m,v,y,x),!0;case 6:return N.fn.call(N.context,m,v,y,x,A),!0}for(Z=1,W=new Array(M-1);Z<M;Z++)W[Z-1]=arguments[Z];N.fn.apply(N.context,W)}else{var de=N.length,ue;for(Z=0;Z<de;Z++)switch(N[Z].once&&this.removeListener(d,N[Z].fn,void 0,!0),M){case 1:N[Z].fn.call(N[Z].context);break;case 2:N[Z].fn.call(N[Z].context,m);break;case 3:N[Z].fn.call(N[Z].context,m,v);break;case 4:N[Z].fn.call(N[Z].context,m,v,y);break;default:if(!W)for(ue=1,W=new Array(M-1);ue<M;ue++)W[ue-1]=arguments[ue];N[Z].fn.apply(N[Z].context,W)}}return!0},u.prototype.on=function(d,m,v){return s(this,d,m,v,!1)},u.prototype.once=function(d,m,v){return s(this,d,m,v,!0)},u.prototype.removeListener=function(d,m,v,y){var x=t?t+d:d;if(!this._events[x])return this;if(!m)return a(this,x),this;var A=this._events[x];if(A.fn)A.fn===m&&(!y||A.once)&&(!v||A.context===v)&&a(this,x);else{for(var O=0,N=[],M=A.length;O<M;O++)(A[O].fn!==m||y&&!A[O].once||v&&A[O].context!==v)&&N.push(A[O]);N.length?this._events[x]=N.length===1?N[0]:N:a(this,x)}return this},u.prototype.removeAllListeners=function(d){var m;return d?(m=t?t+d:d,this._events[m]&&a(this,m)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=t,u.EventEmitter=u,r.exports=u}(la)),la.exports}var _y=Ty();const Ny=Do(_y),ua=new WeakMap,ca=["error","warn","log","info"];let fa="warn";function Hu(r){if(fa&&ca.indexOf(r)<=ca.indexOf(fa)){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];console[r](...t)}}function Sr(r){return ca.reduce((e,t)=>(e[t]=Hu.bind(console,t,r),e),{})}Sr.level=r=>{fa=r},Hu.level=Sr.level;const ha=Sr("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(r=>{document.addEventListener(r,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Array.from(document.querySelectorAll(".ql-container")).forEach(i=>{const s=ua.get(i);s&&s.emitter&&s.emitter.handleDOM(...t)})})});class Ce extends Ny{constructor(){super(),this.domListeners={},this.on("error",ha.error)}emit(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ha.log.call(ha,...t),super.emit(...t)}handleDOM(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];(this.domListeners[e.type]||[]).forEach(s=>{let{node:a,handler:u}=s;(e.target===a||a.contains(e.target))&&u(e,...n)})}listenDOM(e,t,n){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:n})}}Ae(Ce,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),Ae(Ce,"sources",{API:"api",SILENT:"silent",USER:"user"});const da=Sr("quill:selection");class ii{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=t}}class Cy{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new ii(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,Ce.sources.USER),1)}),this.emitter.on(Ce.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const n=this.getNativeRange();n!=null&&n.start.node!==this.cursor.textNode&&this.emitter.once(Ce.events.SCROLL_UPDATE,(i,s)=>{try{this.root.contains(n.start.node)&&this.root.contains(n.end.node)&&this.setNativeRange(n.start.node,n.start.offset,n.end.node,n.end.offset);const a=s.some(u=>u.type==="characterData"||u.type==="childList"||u.type==="attributes"&&u.target===this.root);this.update(a?Ce.sources.SILENT:i)}catch{}})}),this.emitter.on(Ce.events.SCROLL_OPTIMIZE,(n,i)=>{if(i.range){const{startNode:s,startOffset:a,endNode:u,endOffset:f}=i.range;this.setNativeRange(s,a,u,f),this.update(Ce.sources.SILENT)}}),this.update(Ce.sources.SILENT)}handleComposition(){this.emitter.on(Ce.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(Ce.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(Ce.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const n=this.getNativeRange();if(!(n==null||!n.native.collapsed||this.scroll.query(e,Pe.BLOCK))){if(n.start.node!==this.cursor.textNode){const i=this.scroll.find(n.start.node,!1);if(i==null)return;if(i instanceof Ut){const s=i.split(n.start.offset);i.parent.insertBefore(this.cursor,s)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;let i,[s,a]=this.scroll.leaf(e);if(s==null)return null;if(t>0&&a===s.length()){const[m]=this.scroll.leaf(e+1);if(m){const[v]=this.scroll.line(e),[y]=this.scroll.line(e+1);v===y&&(s=m,a=0)}}[i,a]=s.position(a,!0);const u=document.createRange();if(t>0)return u.setStart(i,a),[s,a]=this.scroll.leaf(e+t),s==null?null:([i,a]=s.position(a,!0),u.setEnd(i,a),u.getBoundingClientRect());let f="left",d;if(i instanceof Text){if(!i.data.length)return null;a<i.data.length?(u.setStart(i,a),u.setEnd(i,a+1)):(u.setStart(i,a-1),u.setEnd(i,a),f="right"),d=u.getBoundingClientRect()}else{if(!(s.domNode instanceof Element))return null;d=s.domNode.getBoundingClientRect(),a>0&&(f="right")}return{bottom:d.top+d.height,height:d.height,left:d[f],right:d[f],top:d.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(t==null)return null;const n=this.normalizeNative(t);return da.info("getNativeRange",n),n}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&pa(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const n=t.map(a=>{const[u,f]=a,d=this.scroll.find(u,!0),m=d.offset(this.scroll);return f===0?m:d instanceof Ut?m+d.index(u,f):m+d.length()}),i=Math.min(Math.max(...n),this.scroll.length()-1),s=Math.min(i,...n);return new ii(s,i-s)}normalizeNative(e){if(!pa(this.root,e.startContainer)||!e.collapsed&&!pa(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(n=>{let{node:i,offset:s}=n;for(;!(i instanceof Text)&&i.childNodes.length>0;)if(i.childNodes.length>s)i=i.childNodes[s],s=0;else if(i.childNodes.length===s)i=i.lastChild,i instanceof Text?s=i.data.length:i.childNodes.length>0?s=i.childNodes.length:s=i.childNodes.length+1;else break;n.node=i,n.offset=s}),t}rangeToNative(e){const t=this.scroll.length(),n=(i,s)=>{i=Math.min(t-1,i);const[a,u]=this.scroll.leaf(i);return a?a.position(u,s):[null,-1]};return[...n(e.index,!1),...n(e.index+e.length,!0)]}setNativeRange(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(da.info("setNativeRange",e,t,n,i),e!=null&&(this.root.parentNode==null||e.parentNode==null||n.parentNode==null))return;const a=document.getSelection();if(a!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:u}=this.getNativeRange()||{};if(u==null||s||e!==u.startContainer||t!==u.startOffset||n!==u.endContainer||i!==u.endOffset){e instanceof Element&&e.tagName==="BR"&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),n instanceof Element&&n.tagName==="BR"&&(i=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const f=document.createRange();f.setStart(e,t),f.setEnd(n,i),a.removeAllRanges(),a.addRange(f)}}else a.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ce.sources.API;if(typeof t=="string"&&(n=t,t=!1),da.info("setRange",e),e!=null){const i=this.rangeToNative(e);this.setNativeRange(...i,t)}else this.setNativeRange(null);this.update(n)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ce.sources.USER;const t=this.lastRange,[n,i]=this.getRange();if(this.lastRange=n,this.lastNative=i,this.lastRange!=null&&(this.savedRange=this.lastRange),!ta(t,this.lastRange)){if(!this.composing&&i!=null&&i.native.collapsed&&i.start.node!==this.cursor.textNode){const a=this.cursor.restore();a&&this.setNativeRange(a.startNode,a.startOffset,a.endNode,a.endOffset)}const s=[Ce.events.SELECTION_CHANGE,Oi(this.lastRange),Oi(t),e];this.emitter.emit(Ce.events.EDITOR_CHANGE,...s),e!==Ce.sources.SILENT&&this.emitter.emit(...s)}}}function pa(r,e){try{e.parentNode}catch{return!1}return r.contains(e)}const Ly=/^[ -~]*$/;let Ry=class{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const n=zu(e),i=new Re;return Py(n.ops.slice()).reduce((a,u)=>{const f=Tn.Op.length(u);let d=u.attributes||{},m=!1,v=!1;if(u.insert!=null){if(i.retain(f),typeof u.insert=="string"){const A=u.insert;v=!A.endsWith(`
35
- `)&&(t<=a||!!this.scroll.descendant(_n,a)[0]),this.scroll.insertAt(a,A);const[O,N]=this.scroll.line(a);let M=Dr({},Nn(O));if(O instanceof jt){const[W]=O.descendant(Ut,N);W&&(M=Dr(M,Nn(W)))}d=Tn.AttributeMap.diff(M,d)||{}}else if(typeof u.insert=="object"){const A=Object.keys(u.insert)[0];if(A==null)return a;const O=this.scroll.query(A,Pe.INLINE)!=null;if(O)(t<=a||this.scroll.descendant(_n,a)[0])&&(v=!0);else if(a>0){const[N,M]=this.scroll.descendant(Ut,a-1);N instanceof zn?N.value()[M]!==`
36
- `&&(m=!0):N instanceof dn&&N.statics.scope===Pe.INLINE_BLOT&&(m=!0)}if(this.scroll.insertAt(a,A,u.insert[A]),O){const[N]=this.scroll.descendant(Ut,a);if(N){const M=Dr({},Nn(N));d=Tn.AttributeMap.diff(M,d)||{}}}}t+=f}else if(i.push(u),u.retain!==null&&typeof u.retain=="object"){const A=Object.keys(u.retain)[0];if(A==null)return a;this.scroll.updateEmbedAt(a,A,u.retain[A])}Object.keys(d).forEach(A=>{this.scroll.formatAt(a,f,A,d[A])});const y=m?1:0,x=v?1:0;return t+=y+x,i.retain(y),i.delete(x),a+f+y+x},0),i.reduce((a,u)=>typeof u.delete=="number"?(this.scroll.deleteAt(a,u.delete),a):a+Tn.Op.length(u),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new Re().retain(e).delete(t))}formatLine(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach(s=>{this.scroll.lines(e,Math.max(t,1)).forEach(a=>{a.format(s,n[s])})}),this.scroll.optimize();const i=new Re().retain(e).retain(t,Oi(n));return this.update(i)}formatText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(n).forEach(s=>{this.scroll.formatAt(e,t,s,n[s])});const i=new Re().retain(e).retain(t,Oi(n));return this.update(i)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new Re)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[],i=[];t===0?this.scroll.path(e).forEach(u=>{const[f]=u;f instanceof jt?n.push(f):f instanceof Ut&&i.push(f)}):(n=this.scroll.lines(e,t),i=this.scroll.descendants(Ut,e,t));const[s,a]=[n,i].map(u=>{const f=u.shift();if(f==null)return{};let d=Nn(f);for(;Object.keys(d).length>0;){const m=u.shift();if(m==null)return d;d=ky(Nn(m),d)}return d});return{...s,...a}}getHTML(e,t){const[n,i]=this.scroll.line(e);if(n){const s=n.length();return n.length()>=i+t&&!(i===0&&t===s)?us(n,i,t,!0):us(this.scroll,e,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter(n=>typeof n.insert=="string").map(n=>n.insert).join("")}insertContents(e,t){const n=zu(t),i=new Re().retain(e).concat(n);return this.scroll.insertContents(e,n),this.update(i)}insertEmbed(e,t,n){return this.scroll.insertAt(e,t,n),this.update(new Re().retain(e).insert({[t]:n}))}insertText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
27
+ <%s key={someKey} {...props} />`,Fe,$e,wt,$e),en[$e+Fe]=!0)}if($e=null,Se!==void 0&&(n(Se),$e=""+Se),w(_e)&&(n(_e.key),$e=""+_e.key),"key"in _e){Se={};for(var ft in _e)ft!=="key"&&(Se[ft]=_e[ft])}else Se=_e;return $e&&y(Se,typeof P=="function"?P.displayName||P.name||"Unknown":P),A(P,$e,Ge,st,m(),Se)}function N(P,_e){if(typeof P=="object"&&P&&P.$$typeof!==gn){if(Ne(P))for(var Se=0;Se<P.length;Se++){var Fe=P[Se];D(Fe)&&Y(Fe,_e)}else if(D(P))P._store&&(P._store.validated=1);else if(P===null||typeof P!="object"?Se=null:(Se=U&&P[U]||P["@@iterator"],Se=typeof Se=="function"?Se:null),typeof Se=="function"&&Se!==P.entries&&(Se=Se.call(P),Se!==P))for(;!(P=Se.next()).done;)D(P.value)&&Y(P.value,_e)}}function D(P){return typeof P=="object"&&P!==null&&P.$$typeof===oe}function Y(P,_e){if(P._store&&!P._store.validated&&P.key==null&&(P._store.validated=1,_e=Q(_e),!_t[_e])){_t[_e]=!0;var Se="";P&&P._owner!=null&&P._owner!==m()&&(Se=null,typeof P._owner.tag=="number"?Se=e(P._owner.type):typeof P._owner.name=="string"&&(Se=P._owner.name),Se=" It was passed a child from "+Se+".");var Fe=K.getCurrentStack;K.getCurrentStack=function(){var st=d(P.type);return Fe&&(st+=Fe()||""),st},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',_e,Se),K.getCurrentStack=Fe}}function Q(P){var _e="",Se=m();return Se&&(Se=e(Se.type))&&(_e=`
28
+
29
+ Check the render method of \``+Se+"`."),_e||(P=e(P))&&(_e=`
30
+
31
+ Check the top-level render call using <`+P+">."),_e}var he=dt,oe=Symbol.for("react.transitional.element"),ue=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Ee=Symbol.for("react.consumer"),O=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),U=Symbol.iterator,J=Symbol.for("react.client.reference"),K=he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=Object.prototype.hasOwnProperty,pe=Object.assign,de=Symbol.for("react.client.reference"),Ne=Array.isArray,we=0,Ue,We,je,le,qe,Ie,Ae;i.__reactDisabledLog=!0;var De,it,et=!1,zt=new(typeof WeakMap=="function"?WeakMap:Map),gn=Symbol.for("react.client.reference"),mn,yn={},en={},_t={};Zi.Fragment=ne,Zi.jsx=function(P,_e,Se,Fe,st){return E(P,_e,Se,!1,Fe,st)},Zi.jsxs=function(P,_e,Se,Fe,st){return E(P,_e,Se,!0,Fe,st)}}(),Zi}var Nl;function Kh(){if(Nl)return Ps.exports;Nl=1;var r={};return r.NODE_ENV==="production"?Ps.exports=Uh():Ps.exports=Fh(),Ps.exports}var Ht=Kh(),Cl=typeof global=="object"&&global&&global.Object===Object&&global,Hh=typeof self=="object"&&self&&self.Object===Object&&self,Vn=Cl||Hh||Function("return this")(),Ar=Vn.Symbol,Ll=Object.prototype,zh=Ll.hasOwnProperty,Vh=Ll.toString,Xi=Ar?Ar.toStringTag:void 0;function Wh(r){var e=zh.call(r,Xi),t=r[Xi];try{r[Xi]=void 0;var n=!0}catch{}var i=Vh.call(r);return n&&(e?r[Xi]=t:delete r[Xi]),i}var Gh=Object.prototype,Yh=Gh.toString;function Jh(r){return Yh.call(r)}var Zh="[object Null]",Xh="[object Undefined]",kl=Ar?Ar.toStringTag:void 0;function gi(r){return r==null?r===void 0?Xh:Zh:kl&&kl in Object(r)?Wh(r):Jh(r)}function fr(r){return r!=null&&typeof r=="object"}var zr=Array.isArray;function Tr(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function Rl(r){return r}var Qh="[object AsyncFunction]",ed="[object Function]",td="[object GeneratorFunction]",nd="[object Proxy]";function Mo(r){if(!Tr(r))return!1;var e=gi(r);return e==ed||e==td||e==Qh||e==nd}var Do=Vn["__core-js_shared__"],Pl=function(){var r=/[^.]+$/.exec(Do&&Do.keys&&Do.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function rd(r){return!!Pl&&Pl in r}var id=Function.prototype,sd=id.toString;function Vr(r){if(r!=null){try{return sd.call(r)}catch{}try{return r+""}catch{}}return""}var od=/[\\^$.*+?()[\]{}|]/g,ad=/^\[object .+?Constructor\]$/,ld=Function.prototype,ud=Object.prototype,cd=ld.toString,fd=ud.hasOwnProperty,hd=RegExp("^"+cd.call(fd).replace(od,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dd(r){if(!Tr(r)||rd(r))return!1;var e=Mo(r)?hd:ad;return e.test(Vr(r))}function pd(r,e){return r==null?void 0:r[e]}function Wr(r,e){var t=pd(r,e);return dd(t)?t:void 0}var Bo=Wr(Vn,"WeakMap"),ql=Object.create,gd=function(){function r(){}return function(e){if(!Tr(e))return{};if(ql)return ql(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();function md(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function yd(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var bd=800,vd=16,wd=Date.now;function xd(r){var e=0,t=0;return function(){var n=wd(),i=vd-(n-t);if(t=n,i>0){if(++e>=bd)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function Ed(r){return function(){return r}}var qs=function(){try{var r=Wr(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Sd=qs?function(r,e){return qs(r,"toString",{configurable:!0,enumerable:!1,value:Ed(e),writable:!0})}:Rl,Od=xd(Sd);function Ad(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var Td=9007199254740991,_d=/^(?:0|[1-9]\d*)$/;function jl(r,e){var t=typeof r;return e=e??Td,!!e&&(t=="number"||t!="symbol"&&_d.test(r))&&r>-1&&r%1==0&&r<e}function Uo(r,e,t){e=="__proto__"&&qs?qs(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}function Qi(r,e){return r===e||r!==r&&e!==e}var Nd=Object.prototype,Cd=Nd.hasOwnProperty;function Il(r,e,t){var n=r[e];(!(Cd.call(r,e)&&Qi(n,t))||t===void 0&&!(e in r))&&Uo(r,e,t)}function Ld(r,e,t,n){var i=!t;t||(t={});for(var s=-1,a=e.length;++s<a;){var u=e[s],f=void 0;f===void 0&&(f=r[u]),i?Uo(t,u,f):Il(t,u,f)}return t}var $l=Math.max;function kd(r,e,t){return e=$l(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,s=$l(n.length-e,0),a=Array(s);++i<s;)a[i]=n[e+i];i=-1;for(var u=Array(e+1);++i<e;)u[i]=n[i];return u[e]=t(a),md(r,this,u)}}function Rd(r,e){return Od(kd(r,e,Rl),r+"")}var Pd=9007199254740991;function Ml(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Pd}function js(r){return r!=null&&Ml(r.length)&&!Mo(r)}function qd(r,e,t){if(!Tr(t))return!1;var n=typeof e;return(n=="number"?js(t)&&jl(e,t.length):n=="string"&&e in t)?Qi(t[e],r):!1}function jd(r){return Rd(function(e,t){var n=-1,i=t.length,s=i>1?t[i-1]:void 0,a=i>2?t[2]:void 0;for(s=r.length>3&&typeof s=="function"?(i--,s):void 0,a&&qd(t[0],t[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++n<i;){var u=t[n];u&&r(e,u,n,s)}return e})}var Id=Object.prototype;function Fo(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Id;return r===t}function $d(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Md="[object Arguments]";function Dl(r){return fr(r)&&gi(r)==Md}var Bl=Object.prototype,Dd=Bl.hasOwnProperty,Bd=Bl.propertyIsEnumerable,Ko=Dl(function(){return arguments}())?Dl:function(r){return fr(r)&&Dd.call(r,"callee")&&!Bd.call(r,"callee")};function Ud(){return!1}var Ul=typeof tt=="object"&&tt&&!tt.nodeType&&tt,Fl=Ul&&typeof module=="object"&&module&&!module.nodeType&&module,Fd=Fl&&Fl.exports===Ul,Kl=Fd?Vn.Buffer:void 0,Kd=Kl?Kl.isBuffer:void 0,es=Kd||Ud,Hd="[object Arguments]",zd="[object Array]",Vd="[object Boolean]",Wd="[object Date]",Gd="[object Error]",Yd="[object Function]",Jd="[object Map]",Zd="[object Number]",Xd="[object Object]",Qd="[object RegExp]",ep="[object Set]",tp="[object String]",np="[object WeakMap]",rp="[object ArrayBuffer]",ip="[object DataView]",sp="[object Float32Array]",op="[object Float64Array]",ap="[object Int8Array]",lp="[object Int16Array]",up="[object Int32Array]",cp="[object Uint8Array]",fp="[object Uint8ClampedArray]",hp="[object Uint16Array]",dp="[object Uint32Array]",lt={};lt[sp]=lt[op]=lt[ap]=lt[lp]=lt[up]=lt[cp]=lt[fp]=lt[hp]=lt[dp]=!0,lt[Hd]=lt[zd]=lt[rp]=lt[Vd]=lt[ip]=lt[Wd]=lt[Gd]=lt[Yd]=lt[Jd]=lt[Zd]=lt[Xd]=lt[Qd]=lt[ep]=lt[tp]=lt[np]=!1;function pp(r){return fr(r)&&Ml(r.length)&&!!lt[gi(r)]}function Ho(r){return function(e){return r(e)}}var Hl=typeof tt=="object"&&tt&&!tt.nodeType&&tt,ts=Hl&&typeof module=="object"&&module&&!module.nodeType&&module,gp=ts&&ts.exports===Hl,zo=gp&&Cl.process,mi=function(){try{var r=ts&&ts.require&&ts.require("util").types;return r||zo&&zo.binding&&zo.binding("util")}catch{}}(),zl=mi&&mi.isTypedArray,Vo=zl?Ho(zl):pp,mp=Object.prototype,yp=mp.hasOwnProperty;function Vl(r,e){var t=zr(r),n=!t&&Ko(r),i=!t&&!n&&es(r),s=!t&&!n&&!i&&Vo(r),a=t||n||i||s,u=a?$d(r.length,String):[],f=u.length;for(var d in r)(e||yp.call(r,d))&&!(a&&(d=="length"||i&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||jl(d,f)))&&u.push(d);return u}function Wl(r,e){return function(t){return r(e(t))}}var bp=Wl(Object.keys,Object),vp=Object.prototype,wp=vp.hasOwnProperty;function xp(r){if(!Fo(r))return bp(r);var e=[];for(var t in Object(r))wp.call(r,t)&&t!="constructor"&&e.push(t);return e}function Ep(r){return js(r)?Vl(r):xp(r)}function Sp(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var Op=Object.prototype,Ap=Op.hasOwnProperty;function Tp(r){if(!Tr(r))return Sp(r);var e=Fo(r),t=[];for(var n in r)n=="constructor"&&(e||!Ap.call(r,n))||t.push(n);return t}function Gl(r){return js(r)?Vl(r,!0):Tp(r)}var ns=Wr(Object,"create");function _p(){this.__data__=ns?ns(null):{},this.size=0}function Np(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var Cp="__lodash_hash_undefined__",Lp=Object.prototype,kp=Lp.hasOwnProperty;function Rp(r){var e=this.__data__;if(ns){var t=e[r];return t===Cp?void 0:t}return kp.call(e,r)?e[r]:void 0}var Pp=Object.prototype,qp=Pp.hasOwnProperty;function jp(r){var e=this.__data__;return ns?e[r]!==void 0:qp.call(e,r)}var Ip="__lodash_hash_undefined__";function $p(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=ns&&e===void 0?Ip:e,this}function Gr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Gr.prototype.clear=_p,Gr.prototype.delete=Np,Gr.prototype.get=Rp,Gr.prototype.has=jp,Gr.prototype.set=$p;function Mp(){this.__data__=[],this.size=0}function Is(r,e){for(var t=r.length;t--;)if(Qi(r[t][0],e))return t;return-1}var Dp=Array.prototype,Bp=Dp.splice;function Up(r){var e=this.__data__,t=Is(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Bp.call(e,t,1),--this.size,!0}function Fp(r){var e=this.__data__,t=Is(e,r);return t<0?void 0:e[t][1]}function Kp(r){return Is(this.__data__,r)>-1}function Hp(r,e){var t=this.__data__,n=Is(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}function hr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}hr.prototype.clear=Mp,hr.prototype.delete=Up,hr.prototype.get=Fp,hr.prototype.has=Kp,hr.prototype.set=Hp;var rs=Wr(Vn,"Map");function zp(){this.size=0,this.__data__={hash:new Gr,map:new(rs||hr),string:new Gr}}function Vp(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function $s(r,e){var t=r.__data__;return Vp(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Wp(r){var e=$s(this,r).delete(r);return this.size-=e?1:0,e}function Gp(r){return $s(this,r).get(r)}function Yp(r){return $s(this,r).has(r)}function Jp(r,e){var t=$s(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}function Yr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Yr.prototype.clear=zp,Yr.prototype.delete=Wp,Yr.prototype.get=Gp,Yr.prototype.has=Yp,Yr.prototype.set=Jp;function Zp(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var Yl=Wl(Object.getPrototypeOf,Object),Xp="[object Object]",Qp=Function.prototype,eg=Object.prototype,Jl=Qp.toString,tg=eg.hasOwnProperty,ng=Jl.call(Object);function rg(r){if(!fr(r)||gi(r)!=Xp)return!1;var e=Yl(r);if(e===null)return!0;var t=tg.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Jl.call(t)==ng}function ig(){this.__data__=new hr,this.size=0}function sg(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}function og(r){return this.__data__.get(r)}function ag(r){return this.__data__.has(r)}var lg=200;function ug(r,e){var t=this.__data__;if(t instanceof hr){var n=t.__data__;if(!rs||n.length<lg-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Yr(n)}return t.set(r,e),this.size=t.size,this}function Wn(r){var e=this.__data__=new hr(r);this.size=e.size}Wn.prototype.clear=ig,Wn.prototype.delete=sg,Wn.prototype.get=og,Wn.prototype.has=ag,Wn.prototype.set=ug;var Zl=typeof tt=="object"&&tt&&!tt.nodeType&&tt,Xl=Zl&&typeof module=="object"&&module&&!module.nodeType&&module,cg=Xl&&Xl.exports===Zl,Ql=cg?Vn.Buffer:void 0,eu=Ql?Ql.allocUnsafe:void 0;function tu(r,e){if(e)return r.slice();var t=r.length,n=eu?eu(t):new r.constructor(t);return r.copy(n),n}function fg(r,e){for(var t=-1,n=r==null?0:r.length,i=0,s=[];++t<n;){var a=r[t];e(a,t,r)&&(s[i++]=a)}return s}function hg(){return[]}var dg=Object.prototype,pg=dg.propertyIsEnumerable,nu=Object.getOwnPropertySymbols,gg=nu?function(r){return r==null?[]:(r=Object(r),fg(nu(r),function(e){return pg.call(r,e)}))}:hg;function mg(r,e,t){var n=e(r);return zr(r)?n:Zp(n,t(r))}function Wo(r){return mg(r,Ep,gg)}var Go=Wr(Vn,"DataView"),Yo=Wr(Vn,"Promise"),Jo=Wr(Vn,"Set"),ru="[object Map]",yg="[object Object]",iu="[object Promise]",su="[object Set]",ou="[object WeakMap]",au="[object DataView]",bg=Vr(Go),vg=Vr(rs),wg=Vr(Yo),xg=Vr(Jo),Eg=Vr(Bo),Nn=gi;(Go&&Nn(new Go(new ArrayBuffer(1)))!=au||rs&&Nn(new rs)!=ru||Yo&&Nn(Yo.resolve())!=iu||Jo&&Nn(new Jo)!=su||Bo&&Nn(new Bo)!=ou)&&(Nn=function(r){var e=gi(r),t=e==yg?r.constructor:void 0,n=t?Vr(t):"";if(n)switch(n){case bg:return au;case vg:return ru;case wg:return iu;case xg:return su;case Eg:return ou}return e});var Sg=Object.prototype,Og=Sg.hasOwnProperty;function Ag(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&Og.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var Ms=Vn.Uint8Array;function Zo(r){var e=new r.constructor(r.byteLength);return new Ms(e).set(new Ms(r)),e}function Tg(r,e){var t=Zo(r.buffer);return new r.constructor(t,r.byteOffset,r.byteLength)}var _g=/\w*$/;function Ng(r){var e=new r.constructor(r.source,_g.exec(r));return e.lastIndex=r.lastIndex,e}var lu=Ar?Ar.prototype:void 0,uu=lu?lu.valueOf:void 0;function Cg(r){return uu?Object(uu.call(r)):{}}function cu(r,e){var t=e?Zo(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var Lg="[object Boolean]",kg="[object Date]",Rg="[object Map]",Pg="[object Number]",qg="[object RegExp]",jg="[object Set]",Ig="[object String]",$g="[object Symbol]",Mg="[object ArrayBuffer]",Dg="[object DataView]",Bg="[object Float32Array]",Ug="[object Float64Array]",Fg="[object Int8Array]",Kg="[object Int16Array]",Hg="[object Int32Array]",zg="[object Uint8Array]",Vg="[object Uint8ClampedArray]",Wg="[object Uint16Array]",Gg="[object Uint32Array]";function Yg(r,e,t){var n=r.constructor;switch(e){case Mg:return Zo(r);case Lg:case kg:return new n(+r);case Dg:return Tg(r);case Bg:case Ug:case Fg:case Kg:case Hg:case zg:case Vg:case Wg:case Gg:return cu(r,t);case Rg:return new n;case Pg:case Ig:return new n(r);case qg:return Ng(r);case jg:return new n;case $g:return Cg(r)}}function fu(r){return typeof r.constructor=="function"&&!Fo(r)?gd(Yl(r)):{}}var Jg="[object Map]";function Zg(r){return fr(r)&&Nn(r)==Jg}var hu=mi&&mi.isMap,Xg=hu?Ho(hu):Zg,Qg="[object Set]";function em(r){return fr(r)&&Nn(r)==Qg}var du=mi&&mi.isSet,tm=du?Ho(du):em,nm=1,pu="[object Arguments]",rm="[object Array]",im="[object Boolean]",sm="[object Date]",om="[object Error]",gu="[object Function]",am="[object GeneratorFunction]",lm="[object Map]",um="[object Number]",mu="[object Object]",cm="[object RegExp]",fm="[object Set]",hm="[object String]",dm="[object Symbol]",pm="[object WeakMap]",gm="[object ArrayBuffer]",mm="[object DataView]",ym="[object Float32Array]",bm="[object Float64Array]",vm="[object Int8Array]",wm="[object Int16Array]",xm="[object Int32Array]",Em="[object Uint8Array]",Sm="[object Uint8ClampedArray]",Om="[object Uint16Array]",Am="[object Uint32Array]",at={};at[pu]=at[rm]=at[gm]=at[mm]=at[im]=at[sm]=at[ym]=at[bm]=at[vm]=at[wm]=at[xm]=at[lm]=at[um]=at[mu]=at[cm]=at[fm]=at[hm]=at[dm]=at[Em]=at[Sm]=at[Om]=at[Am]=!0,at[om]=at[gu]=at[pm]=!1;function Ds(r,e,t,n,i,s){var a,u=e&nm;if(a!==void 0)return a;if(!Tr(r))return r;var f=zr(r);if(f)a=Ag(r);else{var d=Nn(r),m=d==gu||d==am;if(es(r))return tu(r,u);if(d==mu||d==pu||m&&!i)a=m?{}:fu(r);else{if(!at[d])return i?r:{};a=Yg(r,d,u)}}s||(s=new Wn);var w=s.get(r);if(w)return w;s.set(r,a),tm(r)?r.forEach(function(A){a.add(Ds(A,e,t,A,r,s))}):Xg(r)&&r.forEach(function(A,E){a.set(E,Ds(A,e,t,E,r,s))});var y=Wo,x=f?void 0:y(r);return Ad(x||r,function(A,E){x&&(E=A,A=r[E]),Il(a,E,Ds(A,e,t,E,r,s))}),a}var Tm=1,_m=4;function yi(r){return Ds(r,Tm|_m)}var Nm="__lodash_hash_undefined__";function Cm(r){return this.__data__.set(r,Nm),this}function Lm(r){return this.__data__.has(r)}function Bs(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Yr;++e<t;)this.add(r[e])}Bs.prototype.add=Bs.prototype.push=Cm,Bs.prototype.has=Lm;function km(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}function Rm(r,e){return r.has(e)}var Pm=1,qm=2;function yu(r,e,t,n,i,s){var a=t&Pm,u=r.length,f=e.length;if(u!=f&&!(a&&f>u))return!1;var d=s.get(r),m=s.get(e);if(d&&m)return d==e&&m==r;var w=-1,y=!0,x=t&qm?new Bs:void 0;for(s.set(r,e),s.set(e,r);++w<u;){var A=r[w],E=e[w];if(n)var N=a?n(E,A,w,e,r,s):n(A,E,w,r,e,s);if(N!==void 0){if(N)continue;y=!1;break}if(x){if(!km(e,function(D,Y){if(!Rm(x,Y)&&(A===D||i(A,D,t,n,s)))return x.push(Y)})){y=!1;break}}else if(!(A===E||i(A,E,t,n,s))){y=!1;break}}return s.delete(r),s.delete(e),y}function jm(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}function Im(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var $m=1,Mm=2,Dm="[object Boolean]",Bm="[object Date]",Um="[object Error]",Fm="[object Map]",Km="[object Number]",Hm="[object RegExp]",zm="[object Set]",Vm="[object String]",Wm="[object Symbol]",Gm="[object ArrayBuffer]",Ym="[object DataView]",bu=Ar?Ar.prototype:void 0,Xo=bu?bu.valueOf:void 0;function Jm(r,e,t,n,i,s,a){switch(t){case Ym:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case Gm:return!(r.byteLength!=e.byteLength||!s(new Ms(r),new Ms(e)));case Dm:case Bm:case Km:return Qi(+r,+e);case Um:return r.name==e.name&&r.message==e.message;case Hm:case Vm:return r==e+"";case Fm:var u=jm;case zm:var f=n&$m;if(u||(u=Im),r.size!=e.size&&!f)return!1;var d=a.get(r);if(d)return d==e;n|=Mm,a.set(r,e);var m=yu(u(r),u(e),n,i,s,a);return a.delete(r),m;case Wm:if(Xo)return Xo.call(r)==Xo.call(e)}return!1}var Zm=1,Xm=Object.prototype,Qm=Xm.hasOwnProperty;function ey(r,e,t,n,i,s){var a=t&Zm,u=Wo(r),f=u.length,d=Wo(e),m=d.length;if(f!=m&&!a)return!1;for(var w=f;w--;){var y=u[w];if(!(a?y in e:Qm.call(e,y)))return!1}var x=s.get(r),A=s.get(e);if(x&&A)return x==e&&A==r;var E=!0;s.set(r,e),s.set(e,r);for(var N=a;++w<f;){y=u[w];var D=r[y],Y=e[y];if(n)var Q=a?n(Y,D,y,e,r,s):n(D,Y,y,r,e,s);if(!(Q===void 0?D===Y||i(D,Y,t,n,s):Q)){E=!1;break}N||(N=y=="constructor")}if(E&&!N){var he=r.constructor,oe=e.constructor;he!=oe&&"constructor"in r&&"constructor"in e&&!(typeof he=="function"&&he instanceof he&&typeof oe=="function"&&oe instanceof oe)&&(E=!1)}return s.delete(r),s.delete(e),E}var ty=1,vu="[object Arguments]",wu="[object Array]",Us="[object Object]",ny=Object.prototype,xu=ny.hasOwnProperty;function ry(r,e,t,n,i,s){var a=zr(r),u=zr(e),f=a?wu:Nn(r),d=u?wu:Nn(e);f=f==vu?Us:f,d=d==vu?Us:d;var m=f==Us,w=d==Us,y=f==d;if(y&&es(r)){if(!es(e))return!1;a=!0,m=!1}if(y&&!m)return s||(s=new Wn),a||Vo(r)?yu(r,e,t,n,i,s):Jm(r,e,f,t,n,i,s);if(!(t&ty)){var x=m&&xu.call(r,"__wrapped__"),A=w&&xu.call(e,"__wrapped__");if(x||A){var E=x?r.value():r,N=A?e.value():e;return s||(s=new Wn),i(E,N,t,n,s)}}return y?(s||(s=new Wn),ey(r,e,t,n,i,s)):!1}function Eu(r,e,t,n,i){return r===e?!0:r==null||e==null||!fr(r)&&!fr(e)?r!==r&&e!==e:ry(r,e,t,n,Eu,i)}function iy(r){return function(e,t,n){for(var i=-1,s=Object(e),a=n(e),u=a.length;u--;){var f=a[++i];if(t(s[f],f,s)===!1)break}return e}}var sy=iy();function Qo(r,e,t){(t!==void 0&&!Qi(r[e],t)||t===void 0&&!(e in r))&&Uo(r,e,t)}function oy(r){return fr(r)&&js(r)}function ea(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}function ay(r){return Ld(r,Gl(r))}function ly(r,e,t,n,i,s,a){var u=ea(r,t),f=ea(e,t),d=a.get(f);if(d){Qo(r,t,d);return}var m=s?s(u,f,t+"",r,e,a):void 0,w=m===void 0;if(w){var y=zr(f),x=!y&&es(f),A=!y&&!x&&Vo(f);m=f,y||x||A?zr(u)?m=u:oy(u)?m=yd(u):x?(w=!1,m=tu(f,!0)):A?(w=!1,m=cu(f,!0)):m=[]:rg(f)||Ko(f)?(m=u,Ko(u)?m=ay(u):(!Tr(u)||Mo(u))&&(m=fu(f))):w=!1}w&&(a.set(f,m),i(m,f,n,s,a),a.delete(f)),Qo(r,t,m)}function Su(r,e,t,n,i){r!==e&&sy(e,function(s,a){if(i||(i=new Wn),Tr(s))ly(r,e,a,t,Su,n,i);else{var u=n?n(ea(r,a),s,a+"",r,e,i):void 0;u===void 0&&(u=s),Qo(r,a,u)}},Gl)}function ta(r,e){return Eu(r,e)}var _r=jd(function(r,e,t){Su(r,e,t)}),Pe=(r=>(r[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",r))(Pe||{});class Gn{constructor(e,t,n={}){this.attrName=e,this.keyName=t;const i=Pe.TYPE&Pe.ATTRIBUTE;this.scope=n.scope!=null?n.scope&Pe.LEVEL|i:Pe.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class bi extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const Ou=class Ol{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(e,t,n){const i=this.query(t);if(i==null)throw new bi(`Unable to create ${t} blot`);const s=i,a=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:s.create(n),u=new s(e,a,n);return Ol.blots.set(u.domNode,u),u}find(e,t=!1){return Ol.find(e,t)}query(e,t=Pe.ANY){let n;return typeof e=="string"?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:typeof e=="number"?e&Pe.LEVEL&Pe.BLOCK?n=this.types.block:e&Pe.LEVEL&Pe.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(n=this.classes[i],!!n)),n=n||this.tags[e.tagName]),n==null?null:"scope"in n&&t&Pe.LEVEL&n.scope&&t&Pe.TYPE&n.scope?n:null}register(...e){return e.map(t=>{const n="blotName"in t,i="attrName"in t;if(!n&&!i)throw new bi("Invalid definition");if(n&&t.blotName==="abstract")throw new bi("Cannot register abstract class");const s=n?t.blotName:i?t.attrName:void 0;return this.types[s]=t,i?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):n&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(a=>a.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(a=>{(this.tags[a]==null||t.className==null)&&(this.tags[a]=t)}))),t})}};Ou.blots=new WeakMap;let vi=Ou;function Au(r,e){return(r.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class uy extends Gn{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){Au(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(Au(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const Cn=uy;function na(r){const e=r.split("-"),t=e.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return e[0]+t}class cy extends Gn{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[na(this.keyName)]=t,!0):!1}remove(e){e.style[na(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[na(this.keyName)];return this.canAdd(e,t)?t:""}}const Nr=cy;class fy{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=vi.find(this.domNode);if(e==null)return;const t=Gn.keys(this.domNode),n=Cn.keys(this.domNode),i=Nr.keys(this.domNode);t.concat(n).concat(i).forEach(s=>{const a=e.scroll.query(s,Pe.ATTRIBUTE);a instanceof Gn&&(this.attributes[a.attrName]=a)})}copy(e){Object.keys(this.attributes).forEach(t=>{const n=this.attributes[t].value(this.domNode);e.format(t,n)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const Fs=fy,Tu=class{constructor(e,t){this.scroll=e,this.domNode=t,vi.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new bi("Blot definition missing tagName");let t,n;return Array.isArray(this.tagName)?(typeof e=="string"?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof e=="number"&&(n=e),typeof n=="number"?t=document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?t=document.createElement(n):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),vi.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,i){const s=this.isolate(e,t);if(this.scroll.query(n,Pe.BLOT)!=null&&i)s.wrap(n,i);else if(this.scroll.query(n,Pe.ATTRIBUTE)!=null){const a=this.scroll.create(this.statics.scope);s.wrap(a),a.format(n,i)}}insertAt(e,t,n){const i=n==null?this.scroll.create("text",t):this.scroll.create(t,n),s=this.split(e);this.parent.insertBefore(i,s||void 0)}isolate(e,t){const n=this.split(e);if(n==null)throw new Error("Attempt to isolate at end");return n.split(t),n}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!="function")throw new bi(`Cannot wrap ${e}`);return n.appendChild(this),n}};Tu.blotName="abstract";let _u=Tu;const Nu=class extends _u{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Nu.scope=Pe.INLINE_BLOT;const jt=Nu;class hy{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let n=t();for(;n&&e>0;)e-=1,n=t();return n}contains(e){const t=this.iterator();let n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){const t=this.iterator();let n=t(),i=0;for(;n;){if(n===e)return i;i+=1,n=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,n=this.head;for(;n!=null;){if(n===e)return t;t+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const n=this.iterator();let i=n();for(;i;){const s=i.length();if(e<s||t&&e===s&&(i.next==null||i.next.length()!==0))return[i,e];e-=s,i=n()}return[null,0]}forEach(e){const t=this.iterator();let n=t();for(;n;)e(n),n=t()}forEachAt(e,t,n){if(t<=0)return;const[i,s]=this.find(e);let a=e-s;const u=this.iterator(i);let f=u();for(;f&&a<e+t;){const d=f.length();e>a?n(f,e-a,Math.min(t,a+d-e)):n(f,0,Math.min(d,e+t-a)),a+=d,f=u()}}map(e){return this.reduce((t,n)=>(t.push(e(n)),t),[])}reduce(e,t){const n=this.iterator();let i=n();for(;i;)t=e(t,i),i=n();return t}}function Cu(r,e){const t=e.find(r);if(t)return t;try{return e.create(r)}catch{const n=e.create(Pe.INLINE);return Array.from(r.childNodes).forEach(i=>{n.domNode.appendChild(i)}),r.parentNode&&r.parentNode.replaceChild(n.domNode,r),n.attach(),n}}const Lu=class Hr extends _u{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,Hr.uiClass&&this.uiNode.classList.add(Hr.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new hy,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=Cu(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof bi)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(n,i,s)=>{n.deleteAt(i,s)})}descendant(e,t=0){const[n,i]=this.children.find(t);return e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e?[n,i]:n instanceof Hr?n.descendant(e,i):[null,-1]}descendants(e,t=0,n=Number.MAX_VALUE){let i=[],s=n;return this.children.forEachAt(t,n,(a,u,f)=>{(e.blotName==null&&e(a)||e.blotName!=null&&a instanceof e)&&i.push(a),a instanceof Hr&&(i=i.concat(a.descendants(e,u,s))),s-=f}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(n=>t instanceof n)||(t.statics.scope===Pe.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof Hr?t.unwrap():t.remove())})}formatAt(e,t,n,i){this.children.forEachAt(e,t,(s,a,u)=>{s.formatAt(a,u,n,i)})}insertAt(e,t,n){const[i,s]=this.children.find(e);if(i)i.insertAt(s,t,n);else{const a=n==null?this.scroll.create("text",t):this.scroll.create(t,n);this.appendChild(a)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(n=>{e.insertBefore(n,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[n,i]=this.children.find(e,t),s=[[this,e]];return n instanceof Hr?s.concat(n.path(i,t)):(n!=null&&s.push([n,i]),s)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return n instanceof Hr&&this.moveChildren(n),super.replaceWith(n)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(i,s,a)=>{const u=i.split(s,t);u!=null&&n.appendChild(u)}),n}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const n=[],i=[];e.forEach(s=>{s.target===this.domNode&&s.type==="childList"&&(n.push(...s.addedNodes),i.push(...s.removedNodes))}),i.forEach(s=>{if(s.parentNode!=null&&s.tagName!=="IFRAME"&&document.body.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const a=this.scroll.find(s);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),n.filter(s=>s.parentNode===this.domNode&&s!==this.uiNode).sort((s,a)=>s===a?0:s.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(s=>{let a=null;s.nextSibling!=null&&(a=this.scroll.find(s.nextSibling));const u=Cu(s,this.scroll);(u.next!==a||u.next==null)&&(u.parent!=null&&u.parent.removeChild(this),this.insertBefore(u,a||void 0))}),this.enforceAllowedChildren()}};Lu.uiClass="";const Ln=Lu;function dy(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(r[t]!==e[t])return!1;return!0}const wi=class Yi extends Ln{static create(e){return super.create(e)}static formats(e,t){const n=t.query(Yi.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Fs(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(n=>{n instanceof Yi||(n=n.wrap(Yi.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(e,Pe.INLINE);if(n==null)return;n instanceof Gn?this.attributes.attribute(n,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,i){this.formats()[n]!=null||this.scroll.query(n,Pe.ATTRIBUTE)?this.isolate(e,t).format(n,i):super.formatAt(e,t,n,i)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const n=this.next;n instanceof Yi&&n.prev===this&&dy(t,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(e,t){const n=super.wrap(e,t);return n instanceof Yi&&this.attributes.move(n),n}};wi.allowedChildren=[wi,jt],wi.blotName="inline",wi.scope=Pe.INLINE_BLOT,wi.tagName="SPAN";const ra=wi,xi=class Al extends Ln{static create(e){return super.create(e)}static formats(e,t){const n=t.query(Al.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Fs(this.domNode)}format(e,t){const n=this.scroll.query(e,Pe.BLOCK);n!=null&&(n instanceof Gn?this.attributes.attribute(n,t):e===this.statics.blotName&&!t?this.replaceWith(Al.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,i){this.scroll.query(n,Pe.BLOCK)!=null?this.format(n,i):super.formatAt(e,t,n,i)}insertAt(e,t,n){if(n==null||this.scroll.query(t,Pe.INLINE)!=null)super.insertAt(e,t,n);else{const i=this.split(e);if(i!=null){const s=this.scroll.create(t,n);i.parent.insertBefore(s,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};xi.blotName="block",xi.scope=Pe.BLOCK_BLOT,xi.tagName="P",xi.allowedChildren=[ra,xi,jt];const is=xi,ia=class extends Ln{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,i){super.formatAt(e,t,n,i),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};ia.blotName="container",ia.scope=Pe.BLOCK_BLOT;const Ks=ia;class py extends jt{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,i){e===0&&t===this.length()?this.format(n,i):super.formatAt(e,t,n,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Xt=py,gy={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},my=100,Ei=class extends Ln{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(n=>{this.update(n)}),this.observer.observe(this.domNode,gy),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=Pe.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(n=>{n.remove()}):super.deleteAt(e,t)}formatAt(e,t,n,i){this.update(),super.formatAt(e,t,n,i)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);const n=t.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const s=(f,d=!0)=>{f==null||f===this||f.domNode.parentNode!=null&&(n.has(f.domNode)||n.set(f.domNode,[]),d&&s(f.parent))},a=f=>{n.has(f.domNode)&&(f instanceof Ln&&f.children.forEach(a),n.delete(f.domNode),f.optimize(t))};let u=e;for(let f=0;u.length>0;f+=1){if(f>=my)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(d=>{const m=this.find(d.target,!0);m!=null&&(m.domNode===d.target&&(d.type==="childList"?(s(this.find(d.previousSibling,!1)),Array.from(d.addedNodes).forEach(w=>{const y=this.find(w,!1);s(y,!1),y instanceof Ln&&y.children.forEach(x=>{s(x,!1)})})):d.type==="attributes"&&s(m.prev)),s(m))}),this.children.forEach(a),u=Array.from(this.observer.takeRecords()),i=u.slice();i.length>0;)e.push(i.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map(i=>{const s=this.find(i.target,!0);return s==null?null:n.has(s.domNode)?(n.get(s.domNode).push(i),null):(n.set(s.domNode,[i]),s)}).forEach(i=>{i!=null&&i!==this&&n.has(i.domNode)&&i.update(n.get(i.domNode)||[],t)}),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}};Ei.blotName="scroll",Ei.defaultChild=is,Ei.allowedChildren=[is,Ks],Ei.scope=Pe.BLOCK_BLOT,Ei.tagName="DIV";const sa=Ei,oa=class Mh extends jt{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,n){n==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Mh&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};oa.blotName="text",oa.scope=Pe.INLINE_BLOT;const Hs=oa,yy=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Gn,AttributorStore:Fs,BlockBlot:is,ClassAttributor:Cn,ContainerBlot:Ks,EmbedBlot:Xt,InlineBlot:ra,LeafBlot:jt,ParentBlot:Ln,Registry:vi,Scope:Pe,ScrollBlot:sa,StyleAttributor:Nr,TextBlot:Hs},Symbol.toStringTag,{value:"Module"}));var zs={exports:{}},aa,ku;function by(){if(ku)return aa;ku=1;var r=-1,e=1,t=0;function n(O,W,R,V,S){if(O===W)return O?[[t,O]]:[];if(R!=null){var T=ve(O,W,R);if(T)return T}var $=u(O,W),U=O.substring(0,$);O=O.substring($),W=W.substring($),$=d(O,W);var J=O.substring(O.length-$);O=O.substring(0,O.length-$),W=W.substring(0,W.length-$);var K=i(O,W);return U&&K.unshift([t,U]),J&&K.push([t,J]),Y(K,S),V&&w(K),K}function i(O,W){var R;if(!O)return[[e,W]];if(!W)return[[r,O]];var V=O.length>W.length?O:W,S=O.length>W.length?W:O,T=V.indexOf(S);if(T!==-1)return R=[[e,V.substring(0,T)],[t,S],[e,V.substring(T+S.length)]],O.length>W.length&&(R[0][0]=R[2][0]=r),R;if(S.length===1)return[[r,O],[e,W]];var $=m(O,W);if($){var U=$[0],J=$[1],K=$[2],ae=$[3],pe=$[4],de=n(U,K),Ne=n(J,ae);return de.concat([[t,pe]],Ne)}return s(O,W)}function s(O,W){for(var R=O.length,V=W.length,S=Math.ceil((R+V)/2),T=S,$=2*S,U=new Array($),J=new Array($),K=0;K<$;K++)U[K]=-1,J[K]=-1;U[T+1]=0,J[T+1]=0;for(var ae=R-V,pe=ae%2!==0,de=0,Ne=0,we=0,Ue=0,We=0;We<S;We++){for(var je=-We+de;je<=We-Ne;je+=2){var le=T+je,qe;je===-We||je!==We&&U[le-1]<U[le+1]?qe=U[le+1]:qe=U[le-1]+1;for(var Ie=qe-je;qe<R&&Ie<V&&O.charAt(qe)===W.charAt(Ie);)qe++,Ie++;if(U[le]=qe,qe>R)Ne+=2;else if(Ie>V)de+=2;else if(pe){var Ae=T+ae-je;if(Ae>=0&&Ae<$&&J[Ae]!==-1){var De=R-J[Ae];if(qe>=De)return a(O,W,qe,Ie)}}}for(var it=-We+we;it<=We-Ue;it+=2){var Ae=T+it,De;it===-We||it!==We&&J[Ae-1]<J[Ae+1]?De=J[Ae+1]:De=J[Ae-1]+1;for(var et=De-it;De<R&&et<V&&O.charAt(R-De-1)===W.charAt(V-et-1);)De++,et++;if(J[Ae]=De,De>R)Ue+=2;else if(et>V)we+=2;else if(!pe){var le=T+ae-it;if(le>=0&&le<$&&U[le]!==-1){var qe=U[le],Ie=T+qe-le;if(De=R-De,qe>=De)return a(O,W,qe,Ie)}}}}return[[r,O],[e,W]]}function a(O,W,R,V){var S=O.substring(0,R),T=W.substring(0,V),$=O.substring(R),U=W.substring(V),J=n(S,T),K=n($,U);return J.concat(K)}function u(O,W){if(!O||!W||O.charAt(0)!==W.charAt(0))return 0;for(var R=0,V=Math.min(O.length,W.length),S=V,T=0;R<S;)O.substring(T,S)==W.substring(T,S)?(R=S,T=R):V=S,S=Math.floor((V-R)/2+R);return Q(O.charCodeAt(S-1))&&S--,S}function f(O,W){var R=O.length,V=W.length;if(R==0||V==0)return 0;R>V?O=O.substring(R-V):R<V&&(W=W.substring(0,R));var S=Math.min(R,V);if(O==W)return S;for(var T=0,$=1;;){var U=O.substring(S-$),J=W.indexOf(U);if(J==-1)return T;$+=J,(J==0||O.substring(S-$)==W.substring(0,$))&&(T=$,$++)}}function d(O,W){if(!O||!W||O.slice(-1)!==W.slice(-1))return 0;for(var R=0,V=Math.min(O.length,W.length),S=V,T=0;R<S;)O.substring(O.length-S,O.length-T)==W.substring(W.length-S,W.length-T)?(R=S,T=R):V=S,S=Math.floor((V-R)/2+R);return he(O.charCodeAt(O.length-S))&&S--,S}function m(O,W){var R=O.length>W.length?O:W,V=O.length>W.length?W:O;if(R.length<4||V.length*2<R.length)return null;function S(Ne,we,Ue){for(var We=Ne.substring(Ue,Ue+Math.floor(Ne.length/4)),je=-1,le="",qe,Ie,Ae,De;(je=we.indexOf(We,je+1))!==-1;){var it=u(Ne.substring(Ue),we.substring(je)),et=d(Ne.substring(0,Ue),we.substring(0,je));le.length<et+it&&(le=we.substring(je-et,je)+we.substring(je,je+it),qe=Ne.substring(0,Ue-et),Ie=Ne.substring(Ue+it),Ae=we.substring(0,je-et),De=we.substring(je+it))}return le.length*2>=Ne.length?[qe,Ie,Ae,De,le]:null}var T=S(R,V,Math.ceil(R.length/4)),$=S(R,V,Math.ceil(R.length/2)),U;if(!T&&!$)return null;$?T?U=T[4].length>$[4].length?T:$:U=$:U=T;var J,K,ae,pe;O.length>W.length?(J=U[0],K=U[1],ae=U[2],pe=U[3]):(ae=U[0],pe=U[1],J=U[2],K=U[3]);var de=U[4];return[J,K,ae,pe,de]}function w(O){for(var W=!1,R=[],V=0,S=null,T=0,$=0,U=0,J=0,K=0;T<O.length;)O[T][0]==t?(R[V++]=T,$=J,U=K,J=0,K=0,S=O[T][1]):(O[T][0]==e?J+=O[T][1].length:K+=O[T][1].length,S&&S.length<=Math.max($,U)&&S.length<=Math.max(J,K)&&(O.splice(R[V-1],0,[r,S]),O[R[V-1]+1][0]=e,V--,V--,T=V>0?R[V-1]:-1,$=0,U=0,J=0,K=0,S=null,W=!0)),T++;for(W&&Y(O),D(O),T=1;T<O.length;){if(O[T-1][0]==r&&O[T][0]==e){var ae=O[T-1][1],pe=O[T][1],de=f(ae,pe),Ne=f(pe,ae);de>=Ne?(de>=ae.length/2||de>=pe.length/2)&&(O.splice(T,0,[t,pe.substring(0,de)]),O[T-1][1]=ae.substring(0,ae.length-de),O[T+1][1]=pe.substring(de),T++):(Ne>=ae.length/2||Ne>=pe.length/2)&&(O.splice(T,0,[t,ae.substring(0,Ne)]),O[T-1][0]=e,O[T-1][1]=pe.substring(0,pe.length-Ne),O[T+1][0]=r,O[T+1][1]=ae.substring(Ne),T++),T++}T++}}var y=/[^a-zA-Z0-9]/,x=/\s/,A=/[\r\n]/,E=/\n\r?\n$/,N=/^\r?\n\r?\n/;function D(O){function W(Ne,we){if(!Ne||!we)return 6;var Ue=Ne.charAt(Ne.length-1),We=we.charAt(0),je=Ue.match(y),le=We.match(y),qe=je&&Ue.match(x),Ie=le&&We.match(x),Ae=qe&&Ue.match(A),De=Ie&&We.match(A),it=Ae&&Ne.match(E),et=De&&we.match(N);return it||et?5:Ae||De?4:je&&!qe&&Ie?3:qe||Ie?2:je||le?1:0}for(var R=1;R<O.length-1;){if(O[R-1][0]==t&&O[R+1][0]==t){var V=O[R-1][1],S=O[R][1],T=O[R+1][1],$=d(V,S);if($){var U=S.substring(S.length-$);V=V.substring(0,V.length-$),S=U+S.substring(0,S.length-$),T=U+T}for(var J=V,K=S,ae=T,pe=W(V,S)+W(S,T);S.charAt(0)===T.charAt(0);){V+=S.charAt(0),S=S.substring(1)+T.charAt(0),T=T.substring(1);var de=W(V,S)+W(S,T);de>=pe&&(pe=de,J=V,K=S,ae=T)}O[R-1][1]!=J&&(J?O[R-1][1]=J:(O.splice(R-1,1),R--),O[R][1]=K,ae?O[R+1][1]=ae:(O.splice(R+1,1),R--))}R++}}function Y(O,W){O.push([t,""]);for(var R=0,V=0,S=0,T="",$="",U;R<O.length;){if(R<O.length-1&&!O[R][1]){O.splice(R,1);continue}switch(O[R][0]){case e:S++,$+=O[R][1],R++;break;case r:V++,T+=O[R][1],R++;break;case t:var J=R-S-V-1;if(W){if(J>=0&&ue(O[J][1])){var K=O[J][1].slice(-1);if(O[J][1]=O[J][1].slice(0,-1),T=K+T,$=K+$,!O[J][1]){O.splice(J,1),R--;var ae=J-1;O[ae]&&O[ae][0]===e&&(S++,$=O[ae][1]+$,ae--),O[ae]&&O[ae][0]===r&&(V++,T=O[ae][1]+T,ae--),J=ae}}if(oe(O[R][1])){var K=O[R][1].charAt(0);O[R][1]=O[R][1].slice(1),T+=K,$+=K}}if(R<O.length-1&&!O[R][1]){O.splice(R,1);break}if(T.length>0||$.length>0){T.length>0&&$.length>0&&(U=u($,T),U!==0&&(J>=0?O[J][1]+=$.substring(0,U):(O.splice(0,0,[t,$.substring(0,U)]),R++),$=$.substring(U),T=T.substring(U)),U=d($,T),U!==0&&(O[R][1]=$.substring($.length-U)+O[R][1],$=$.substring(0,$.length-U),T=T.substring(0,T.length-U)));var pe=S+V;T.length===0&&$.length===0?(O.splice(R-pe,pe),R=R-pe):T.length===0?(O.splice(R-pe,pe,[e,$]),R=R-pe+1):$.length===0?(O.splice(R-pe,pe,[r,T]),R=R-pe+1):(O.splice(R-pe,pe,[r,T],[e,$]),R=R-pe+2)}R!==0&&O[R-1][0]===t?(O[R-1][1]+=O[R][1],O.splice(R,1)):R++,S=0,V=0,T="",$="";break}}O[O.length-1][1]===""&&O.pop();var de=!1;for(R=1;R<O.length-1;)O[R-1][0]===t&&O[R+1][0]===t&&(O[R][1].substring(O[R][1].length-O[R-1][1].length)===O[R-1][1]?(O[R][1]=O[R-1][1]+O[R][1].substring(0,O[R][1].length-O[R-1][1].length),O[R+1][1]=O[R-1][1]+O[R+1][1],O.splice(R-1,1),de=!0):O[R][1].substring(0,O[R+1][1].length)==O[R+1][1]&&(O[R-1][1]+=O[R+1][1],O[R][1]=O[R][1].substring(O[R+1][1].length)+O[R+1][1],O.splice(R+1,1),de=!0)),R++;de&&Y(O,W)}function Q(O){return O>=55296&&O<=56319}function he(O){return O>=56320&&O<=57343}function oe(O){return he(O.charCodeAt(0))}function ue(O){return Q(O.charCodeAt(O.length-1))}function ne(O){for(var W=[],R=0;R<O.length;R++)O[R][1].length>0&&W.push(O[R]);return W}function re(O,W,R,V){return ue(O)||oe(V)?null:ne([[t,O],[r,W],[e,R],[t,V]])}function ve(O,W,R){var V=typeof R=="number"?{index:R,length:0}:R.oldRange,S=typeof R=="number"?null:R.newRange,T=O.length,$=W.length;if(V.length===0&&(S===null||S.length===0)){var U=V.index,J=O.slice(0,U),K=O.slice(U),ae=S?S.index:null;e:{var pe=U+$-T;if(ae!==null&&ae!==pe||pe<0||pe>$)break e;var de=W.slice(0,pe),Ne=W.slice(pe);if(Ne!==K)break e;var we=Math.min(U,pe),Ue=J.slice(0,we),We=de.slice(0,we);if(Ue!==We)break e;var je=J.slice(we),le=de.slice(we);return re(Ue,je,le,K)}e:{if(ae!==null&&ae!==U)break e;var qe=U,de=W.slice(0,qe),Ne=W.slice(qe);if(de!==J)break e;var Ie=Math.min(T-qe,$-qe),Ae=K.slice(K.length-Ie),De=Ne.slice(Ne.length-Ie);if(Ae!==De)break e;var je=K.slice(0,K.length-Ie),le=Ne.slice(0,Ne.length-Ie);return re(J,je,le,Ae)}}if(V.length>0&&S&&S.length===0)e:{var Ue=O.slice(0,V.index),Ae=O.slice(V.index+V.length),we=Ue.length,Ie=Ae.length;if($<we+Ie)break e;var We=W.slice(0,we),De=W.slice($-Ie);if(Ue!==We||Ae!==De)break e;var je=O.slice(we,T-Ie),le=W.slice(we,$-Ie);return re(Ue,je,le,Ae)}return null}function Ee(O,W,R,V){return n(O,W,R,V,!0)}return Ee.INSERT=e,Ee.DELETE=r,Ee.EQUAL=t,aa=Ee,aa}var ss={exports:{}};ss.exports;var Ru;function Pu(){return Ru||(Ru=1,function(r,e){var t=200,n="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",a="[object Array]",u="[object Boolean]",f="[object Date]",d="[object Error]",m="[object Function]",w="[object GeneratorFunction]",y="[object Map]",x="[object Number]",A="[object Object]",E="[object Promise]",N="[object RegExp]",D="[object Set]",Y="[object String]",Q="[object Symbol]",he="[object WeakMap]",oe="[object ArrayBuffer]",ue="[object DataView]",ne="[object Float32Array]",re="[object Float64Array]",ve="[object Int8Array]",Ee="[object Int16Array]",O="[object Int32Array]",W="[object Uint8Array]",R="[object Uint8ClampedArray]",V="[object Uint16Array]",S="[object Uint32Array]",T=/[\\^$.*+?()[\]{}|]/g,$=/\w*$/,U=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,K={};K[s]=K[a]=K[oe]=K[ue]=K[u]=K[f]=K[ne]=K[re]=K[ve]=K[Ee]=K[O]=K[y]=K[x]=K[A]=K[N]=K[D]=K[Y]=K[Q]=K[W]=K[R]=K[V]=K[S]=!0,K[d]=K[m]=K[he]=!1;var ae=typeof zn=="object"&&zn&&zn.Object===Object&&zn,pe=typeof self=="object"&&self&&self.Object===Object&&self,de=ae||pe||Function("return this")(),Ne=e&&!e.nodeType&&e,we=Ne&&!0&&r&&!r.nodeType&&r,Ue=we&&we.exports===Ne;function We(h,v){return h.set(v[0],v[1]),h}function je(h,v){return h.add(v),h}function le(h,v){for(var k=-1,te=h?h.length:0;++k<te&&v(h[k],k,h)!==!1;);return h}function qe(h,v){for(var k=-1,te=v.length,Me=h.length;++k<te;)h[Me+k]=v[k];return h}function Ie(h,v,k,te){for(var Me=-1,Re=h?h.length:0;++Me<Re;)k=v(k,h[Me],Me,h);return k}function Ae(h,v){for(var k=-1,te=Array(h);++k<h;)te[k]=v(k);return te}function De(h,v){return h==null?void 0:h[v]}function it(h){var v=!1;if(h!=null&&typeof h.toString!="function")try{v=!!(h+"")}catch{}return v}function et(h){var v=-1,k=Array(h.size);return h.forEach(function(te,Me){k[++v]=[Me,te]}),k}function zt(h,v){return function(k){return h(v(k))}}function gn(h){var v=-1,k=Array(h.size);return h.forEach(function(te){k[++v]=te}),k}var mn=Array.prototype,yn=Function.prototype,en=Object.prototype,_t=de["__core-js_shared__"],P=function(){var h=/[^.]+$/.exec(_t&&_t.keys&&_t.keys.IE_PROTO||"");return h?"Symbol(src)_1."+h:""}(),_e=yn.toString,Se=en.hasOwnProperty,Fe=en.toString,st=RegExp("^"+_e.call(Se).replace(T,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=Ue?de.Buffer:void 0,$e=de.Symbol,wt=de.Uint8Array,ft=zt(Object.getPrototypeOf,Object),ut=Object.create,Ot=en.propertyIsEnumerable,Zt=mn.splice,Nt=Object.getOwnPropertySymbols,At=Ge?Ge.isBuffer:void 0,Oe=zt(Object.keys,Object),bn=sn(de,"DataView"),Vt=sn(de,"Map"),Dt=sn(de,"Promise"),be=sn(de,"Set"),yr=sn(de,"WeakMap"),er=sn(Object,"create"),br=kt(bn),tr=kt(Vt),vr=kt(Dt),ii=kt(be),si=kt(yr),Wt=$e?$e.prototype:void 0,Mn=Wt?Wt.valueOf:void 0;function tn(h){var v=-1,k=h?h.length:0;for(this.clear();++v<k;){var te=h[v];this.set(te[0],te[1])}}function Rr(){this.__data__=er?er(null):{}}function ot(h){return this.has(h)&&delete this.__data__[h]}function pt(h){var v=this.__data__;if(er){var k=v[h];return k===n?void 0:k}return Se.call(v,h)?v[h]:void 0}function $i(h){var v=this.__data__;return er?v[h]!==void 0:Se.call(v,h)}function nr(h,v){var k=this.__data__;return k[h]=er&&v===void 0?n:v,this}tn.prototype.clear=Rr,tn.prototype.delete=ot,tn.prototype.get=pt,tn.prototype.has=$i,tn.prototype.set=nr;function gt(h){var v=-1,k=h?h.length:0;for(this.clear();++v<k;){var te=h[v];this.set(te[0],te[1])}}function Pr(){this.__data__=[]}function Ns(h){var v=this.__data__,k=sr(v,h);if(k<0)return!1;var te=v.length-1;return k==te?v.pop():Zt.call(v,k,1),!0}function vn(h){var v=this.__data__,k=sr(v,h);return k<0?void 0:v[k][1]}function rr(h){return sr(this.__data__,h)>-1}function wn(h,v){var k=this.__data__,te=sr(k,h);return te<0?k.push([h,v]):k[te][1]=v,this}gt.prototype.clear=Pr,gt.prototype.delete=Ns,gt.prototype.get=vn,gt.prototype.has=rr,gt.prototype.set=wn;function xt(h){var v=-1,k=h?h.length:0;for(this.clear();++v<k;){var te=h[v];this.set(te[0],te[1])}}function Cs(){this.__data__={hash:new tn,map:new(Vt||gt),string:new tn}}function xn(h){return lr(this,h).delete(h)}function Mi(h){return lr(this,h).get(h)}function Dn(h){return lr(this,h).has(h)}function Di(h,v){return lr(this,h).set(h,v),this}xt.prototype.clear=Cs,xt.prototype.delete=xn,xt.prototype.get=Mi,xt.prototype.has=Dn,xt.prototype.set=Di;function Ct(h){this.__data__=new gt(h)}function ct(){this.__data__=new gt}function Bn(h){return this.__data__.delete(h)}function nn(h){return this.__data__.get(h)}function Bi(h){return this.__data__.has(h)}function ir(h,v){var k=this.__data__;if(k instanceof gt){var te=k.__data__;if(!Vt||te.length<t-1)return te.push([h,v]),this;k=this.__data__=new xt(te)}return k.set(h,v),this}Ct.prototype.clear=ct,Ct.prototype.delete=Bn,Ct.prototype.get=nn,Ct.prototype.has=Bi,Ct.prototype.set=ir;function Un(h,v){var k=Kn(h)||On(h)?Ae(h.length,String):[],te=k.length,Me=!!te;for(var Re in h)Se.call(h,Re)&&!(Me&&(Re=="length"||ur(Re,te)))&&k.push(Re);return k}function qr(h,v,k){var te=h[v];(!(Se.call(h,v)&&Gt(te,k))||k===void 0&&!(v in h))&&(h[v]=k)}function sr(h,v){for(var k=h.length;k--;)if(Gt(h[k][0],v))return k;return-1}function Lt(h,v){return h&&ar(v,Hn(v),h)}function jr(h,v,k,te,Me,Re,Xe){var Qe;if(te&&(Qe=Re?te(h,Me,Re,Xe):te(h)),Qe!==void 0)return Qe;if(!an(h))return h;var mt=Kn(h);if(mt){if(Qe=Ls(h),!v)return Hi(h,Qe)}else{var nt=on(h),Tt=nt==m||nt==w;if(Vi(h))return wr(h,v);if(nt==A||nt==s||Tt&&!Re){if(it(h))return Re?h:{};if(Qe=En(Tt?{}:h),!v)return zi(h,Lt(Qe,h))}else{if(!K[nt])return Re?h:{};Qe=qt(h,nt,jr,v)}}Xe||(Xe=new Ct);var Rt=Xe.get(h);if(Rt)return Rt;if(Xe.set(h,Qe),!mt)var yt=k?xr(h):Hn(h);return le(yt||h,function(Et,bt){yt&&(bt=Et,Et=h[bt]),qr(Qe,bt,jr(Et,v,k,te,bt,h,Xe))}),Qe}function Ir(h){return an(h)?ut(h):{}}function Ui(h,v,k){var te=v(h);return Kn(h)?te:qe(te,k(h))}function Ye(h){return Fe.call(h)}function Fi(h){if(!an(h)||Sn(h))return!1;var v=Bt(h)||it(h)?st:U;return v.test(kt(h))}function Ki(h){if(!li(h))return Oe(h);var v=[];for(var k in Object(h))Se.call(h,k)&&k!="constructor"&&v.push(k);return v}function wr(h,v){if(v)return h.slice();var k=new h.constructor(h.length);return h.copy(k),k}function rt(h){var v=new h.constructor(h.byteLength);return new wt(v).set(new wt(h)),v}function rn(h,v){var k=v?rt(h.buffer):h.buffer;return new h.constructor(k,h.byteOffset,h.byteLength)}function or(h,v,k){var te=v?k(et(h),!0):et(h);return Ie(te,We,new h.constructor)}function Fn(h){var v=new h.constructor(h.source,$.exec(h));return v.lastIndex=h.lastIndex,v}function oi(h,v,k){var te=v?k(gn(h),!0):gn(h);return Ie(te,je,new h.constructor)}function ai(h){return Mn?Object(Mn.call(h)):{}}function $r(h,v){var k=v?rt(h.buffer):h.buffer;return new h.constructor(k,h.byteOffset,h.length)}function Hi(h,v){var k=-1,te=h.length;for(v||(v=Array(te));++k<te;)v[k]=h[k];return v}function ar(h,v,k,te){k||(k={});for(var Me=-1,Re=v.length;++Me<Re;){var Xe=v[Me],Qe=void 0;qr(k,Xe,Qe===void 0?h[Xe]:Qe)}return k}function zi(h,v){return ar(h,ze(h),v)}function xr(h){return Ui(h,Hn,ze)}function lr(h,v){var k=h.__data__;return Mr(v)?k[typeof v=="string"?"string":"hash"]:k.map}function sn(h,v){var k=De(h,v);return Fi(k)?k:void 0}var ze=Nt?zt(Nt,Object):ui,on=Ye;(bn&&on(new bn(new ArrayBuffer(1)))!=ue||Vt&&on(new Vt)!=y||Dt&&on(Dt.resolve())!=E||be&&on(new be)!=D||yr&&on(new yr)!=he)&&(on=function(h){var v=Fe.call(h),k=v==A?h.constructor:void 0,te=k?kt(k):void 0;if(te)switch(te){case br:return ue;case tr:return y;case vr:return E;case ii:return D;case si:return he}return v});function Ls(h){var v=h.length,k=h.constructor(v);return v&&typeof h[0]=="string"&&Se.call(h,"index")&&(k.index=h.index,k.input=h.input),k}function En(h){return typeof h.constructor=="function"&&!li(h)?Ir(ft(h)):{}}function qt(h,v,k,te){var Me=h.constructor;switch(v){case oe:return rt(h);case u:case f:return new Me(+h);case ue:return rn(h,te);case ne:case re:case ve:case Ee:case O:case W:case R:case V:case S:return $r(h,te);case y:return or(h,te,k);case x:case Y:return new Me(h);case N:return Fn(h);case D:return oi(h,te,k);case Q:return ai(h)}}function ur(h,v){return v=v??i,!!v&&(typeof h=="number"||J.test(h))&&h>-1&&h%1==0&&h<v}function Mr(h){var v=typeof h;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?h!=="__proto__":h===null}function Sn(h){return!!P&&P in h}function li(h){var v=h&&h.constructor,k=typeof v=="function"&&v.prototype||en;return h===k}function kt(h){if(h!=null){try{return _e.call(h)}catch{}try{return h+""}catch{}}return""}function ht(h){return jr(h,!0,!0)}function Gt(h,v){return h===v||h!==h&&v!==v}function On(h){return An(h)&&Se.call(h,"callee")&&(!Ot.call(h,"callee")||Fe.call(h)==s)}var Kn=Array.isArray;function cr(h){return h!=null&&Dr(h.length)&&!Bt(h)}function An(h){return Br(h)&&cr(h)}var Vi=At||Wi;function Bt(h){var v=an(h)?Fe.call(h):"";return v==m||v==w}function Dr(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=i}function an(h){var v=typeof h;return!!h&&(v=="object"||v=="function")}function Br(h){return!!h&&typeof h=="object"}function Hn(h){return cr(h)?Un(h):Ki(h)}function ui(){return[]}function Wi(){return!1}r.exports=ht}(ss,ss.exports)),ss.exports}var os={exports:{}};os.exports;var qu;function ju(){return qu||(qu=1,function(r,e){var t=200,n="__lodash_hash_undefined__",i=1,s=2,a=9007199254740991,u="[object Arguments]",f="[object Array]",d="[object AsyncFunction]",m="[object Boolean]",w="[object Date]",y="[object Error]",x="[object Function]",A="[object GeneratorFunction]",E="[object Map]",N="[object Number]",D="[object Null]",Y="[object Object]",Q="[object Promise]",he="[object Proxy]",oe="[object RegExp]",ue="[object Set]",ne="[object String]",re="[object Symbol]",ve="[object Undefined]",Ee="[object WeakMap]",O="[object ArrayBuffer]",W="[object DataView]",R="[object Float32Array]",V="[object Float64Array]",S="[object Int8Array]",T="[object Int16Array]",$="[object Int32Array]",U="[object Uint8Array]",J="[object Uint8ClampedArray]",K="[object Uint16Array]",ae="[object Uint32Array]",pe=/[\\^$.*+?()[\]{}|]/g,de=/^\[object .+?Constructor\]$/,Ne=/^(?:0|[1-9]\d*)$/,we={};we[R]=we[V]=we[S]=we[T]=we[$]=we[U]=we[J]=we[K]=we[ae]=!0,we[u]=we[f]=we[O]=we[m]=we[W]=we[w]=we[y]=we[x]=we[E]=we[N]=we[Y]=we[oe]=we[ue]=we[ne]=we[Ee]=!1;var Ue=typeof zn=="object"&&zn&&zn.Object===Object&&zn,We=typeof self=="object"&&self&&self.Object===Object&&self,je=Ue||We||Function("return this")(),le=e&&!e.nodeType&&e,qe=le&&!0&&r&&!r.nodeType&&r,Ie=qe&&qe.exports===le,Ae=Ie&&Ue.process,De=function(){try{return Ae&&Ae.binding&&Ae.binding("util")}catch{}}(),it=De&&De.isTypedArray;function et(h,v){for(var k=-1,te=h==null?0:h.length,Me=0,Re=[];++k<te;){var Xe=h[k];v(Xe,k,h)&&(Re[Me++]=Xe)}return Re}function zt(h,v){for(var k=-1,te=v.length,Me=h.length;++k<te;)h[Me+k]=v[k];return h}function gn(h,v){for(var k=-1,te=h==null?0:h.length;++k<te;)if(v(h[k],k,h))return!0;return!1}function mn(h,v){for(var k=-1,te=Array(h);++k<h;)te[k]=v(k);return te}function yn(h){return function(v){return h(v)}}function en(h,v){return h.has(v)}function _t(h,v){return h==null?void 0:h[v]}function P(h){var v=-1,k=Array(h.size);return h.forEach(function(te,Me){k[++v]=[Me,te]}),k}function _e(h,v){return function(k){return h(v(k))}}function Se(h){var v=-1,k=Array(h.size);return h.forEach(function(te){k[++v]=te}),k}var Fe=Array.prototype,st=Function.prototype,Ge=Object.prototype,$e=je["__core-js_shared__"],wt=st.toString,ft=Ge.hasOwnProperty,ut=function(){var h=/[^.]+$/.exec($e&&$e.keys&&$e.keys.IE_PROTO||"");return h?"Symbol(src)_1."+h:""}(),Ot=Ge.toString,Zt=RegExp("^"+wt.call(ft).replace(pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nt=Ie?je.Buffer:void 0,At=je.Symbol,Oe=je.Uint8Array,bn=Ge.propertyIsEnumerable,Vt=Fe.splice,Dt=At?At.toStringTag:void 0,be=Object.getOwnPropertySymbols,yr=Nt?Nt.isBuffer:void 0,er=_e(Object.keys,Object),br=ze(je,"DataView"),tr=ze(je,"Map"),vr=ze(je,"Promise"),ii=ze(je,"Set"),si=ze(je,"WeakMap"),Wt=ze(Object,"create"),Mn=kt(br),tn=kt(tr),Rr=kt(vr),ot=kt(ii),pt=kt(si),$i=At?At.prototype:void 0,nr=$i?$i.valueOf:void 0;function gt(h){var v=-1,k=h==null?0:h.length;for(this.clear();++v<k;){var te=h[v];this.set(te[0],te[1])}}function Pr(){this.__data__=Wt?Wt(null):{},this.size=0}function Ns(h){var v=this.has(h)&&delete this.__data__[h];return this.size-=v?1:0,v}function vn(h){var v=this.__data__;if(Wt){var k=v[h];return k===n?void 0:k}return ft.call(v,h)?v[h]:void 0}function rr(h){var v=this.__data__;return Wt?v[h]!==void 0:ft.call(v,h)}function wn(h,v){var k=this.__data__;return this.size+=this.has(h)?0:1,k[h]=Wt&&v===void 0?n:v,this}gt.prototype.clear=Pr,gt.prototype.delete=Ns,gt.prototype.get=vn,gt.prototype.has=rr,gt.prototype.set=wn;function xt(h){var v=-1,k=h==null?0:h.length;for(this.clear();++v<k;){var te=h[v];this.set(te[0],te[1])}}function Cs(){this.__data__=[],this.size=0}function xn(h){var v=this.__data__,k=wr(v,h);if(k<0)return!1;var te=v.length-1;return k==te?v.pop():Vt.call(v,k,1),--this.size,!0}function Mi(h){var v=this.__data__,k=wr(v,h);return k<0?void 0:v[k][1]}function Dn(h){return wr(this.__data__,h)>-1}function Di(h,v){var k=this.__data__,te=wr(k,h);return te<0?(++this.size,k.push([h,v])):k[te][1]=v,this}xt.prototype.clear=Cs,xt.prototype.delete=xn,xt.prototype.get=Mi,xt.prototype.has=Dn,xt.prototype.set=Di;function Ct(h){var v=-1,k=h==null?0:h.length;for(this.clear();++v<k;){var te=h[v];this.set(te[0],te[1])}}function ct(){this.size=0,this.__data__={hash:new gt,map:new(tr||xt),string:new gt}}function Bn(h){var v=sn(this,h).delete(h);return this.size-=v?1:0,v}function nn(h){return sn(this,h).get(h)}function Bi(h){return sn(this,h).has(h)}function ir(h,v){var k=sn(this,h),te=k.size;return k.set(h,v),this.size+=k.size==te?0:1,this}Ct.prototype.clear=ct,Ct.prototype.delete=Bn,Ct.prototype.get=nn,Ct.prototype.has=Bi,Ct.prototype.set=ir;function Un(h){var v=-1,k=h==null?0:h.length;for(this.__data__=new Ct;++v<k;)this.add(h[v])}function qr(h){return this.__data__.set(h,n),this}function sr(h){return this.__data__.has(h)}Un.prototype.add=Un.prototype.push=qr,Un.prototype.has=sr;function Lt(h){var v=this.__data__=new xt(h);this.size=v.size}function jr(){this.__data__=new xt,this.size=0}function Ir(h){var v=this.__data__,k=v.delete(h);return this.size=v.size,k}function Ui(h){return this.__data__.get(h)}function Ye(h){return this.__data__.has(h)}function Fi(h,v){var k=this.__data__;if(k instanceof xt){var te=k.__data__;if(!tr||te.length<t-1)return te.push([h,v]),this.size=++k.size,this;k=this.__data__=new Ct(te)}return k.set(h,v),this.size=k.size,this}Lt.prototype.clear=jr,Lt.prototype.delete=Ir,Lt.prototype.get=Ui,Lt.prototype.has=Ye,Lt.prototype.set=Fi;function Ki(h,v){var k=On(h),te=!k&&Gt(h),Me=!k&&!te&&cr(h),Re=!k&&!te&&!Me&&Br(h),Xe=k||te||Me||Re,Qe=Xe?mn(h.length,String):[],mt=Qe.length;for(var nt in h)ft.call(h,nt)&&!(Xe&&(nt=="length"||Me&&(nt=="offset"||nt=="parent")||Re&&(nt=="buffer"||nt=="byteLength"||nt=="byteOffset")||qt(nt,mt)))&&Qe.push(nt);return Qe}function wr(h,v){for(var k=h.length;k--;)if(ht(h[k][0],v))return k;return-1}function rt(h,v,k){var te=v(h);return On(h)?te:zt(te,k(h))}function rn(h){return h==null?h===void 0?ve:D:Dt&&Dt in Object(h)?on(h):li(h)}function or(h){return an(h)&&rn(h)==u}function Fn(h,v,k,te,Me){return h===v?!0:h==null||v==null||!an(h)&&!an(v)?h!==h&&v!==v:oi(h,v,k,te,Fn,Me)}function oi(h,v,k,te,Me,Re){var Xe=On(h),Qe=On(v),mt=Xe?f:En(h),nt=Qe?f:En(v);mt=mt==u?Y:mt,nt=nt==u?Y:nt;var Tt=mt==Y,Rt=nt==Y,yt=mt==nt;if(yt&&cr(h)){if(!cr(v))return!1;Xe=!0,Tt=!1}if(yt&&!Tt)return Re||(Re=new Lt),Xe||Br(h)?ar(h,v,k,te,Me,Re):zi(h,v,mt,k,te,Me,Re);if(!(k&i)){var Et=Tt&&ft.call(h,"__wrapped__"),bt=Rt&&ft.call(v,"__wrapped__");if(Et||bt){var ln=Et?h.value():h,Tn=bt?v.value():v;return Re||(Re=new Lt),Me(ln,Tn,k,te,Re)}}return yt?(Re||(Re=new Lt),xr(h,v,k,te,Me,Re)):!1}function ai(h){if(!Dr(h)||Mr(h))return!1;var v=Vi(h)?Zt:de;return v.test(kt(h))}function $r(h){return an(h)&&Bt(h.length)&&!!we[rn(h)]}function Hi(h){if(!Sn(h))return er(h);var v=[];for(var k in Object(h))ft.call(h,k)&&k!="constructor"&&v.push(k);return v}function ar(h,v,k,te,Me,Re){var Xe=k&i,Qe=h.length,mt=v.length;if(Qe!=mt&&!(Xe&&mt>Qe))return!1;var nt=Re.get(h);if(nt&&Re.get(v))return nt==v;var Tt=-1,Rt=!0,yt=k&s?new Un:void 0;for(Re.set(h,v),Re.set(v,h);++Tt<Qe;){var Et=h[Tt],bt=v[Tt];if(te)var ln=Xe?te(bt,Et,Tt,v,h,Re):te(Et,bt,Tt,h,v,Re);if(ln!==void 0){if(ln)continue;Rt=!1;break}if(yt){if(!gn(v,function(Tn,Er){if(!en(yt,Er)&&(Et===Tn||Me(Et,Tn,k,te,Re)))return yt.push(Er)})){Rt=!1;break}}else if(!(Et===bt||Me(Et,bt,k,te,Re))){Rt=!1;break}}return Re.delete(h),Re.delete(v),Rt}function zi(h,v,k,te,Me,Re,Xe){switch(k){case W:if(h.byteLength!=v.byteLength||h.byteOffset!=v.byteOffset)return!1;h=h.buffer,v=v.buffer;case O:return!(h.byteLength!=v.byteLength||!Re(new Oe(h),new Oe(v)));case m:case w:case N:return ht(+h,+v);case y:return h.name==v.name&&h.message==v.message;case oe:case ne:return h==v+"";case E:var Qe=P;case ue:var mt=te&i;if(Qe||(Qe=Se),h.size!=v.size&&!mt)return!1;var nt=Xe.get(h);if(nt)return nt==v;te|=s,Xe.set(h,v);var Tt=ar(Qe(h),Qe(v),te,Me,Re,Xe);return Xe.delete(h),Tt;case re:if(nr)return nr.call(h)==nr.call(v)}return!1}function xr(h,v,k,te,Me,Re){var Xe=k&i,Qe=lr(h),mt=Qe.length,nt=lr(v),Tt=nt.length;if(mt!=Tt&&!Xe)return!1;for(var Rt=mt;Rt--;){var yt=Qe[Rt];if(!(Xe?yt in v:ft.call(v,yt)))return!1}var Et=Re.get(h);if(Et&&Re.get(v))return Et==v;var bt=!0;Re.set(h,v),Re.set(v,h);for(var ln=Xe;++Rt<mt;){yt=Qe[Rt];var Tn=h[yt],Er=v[yt];if(te)var ci=Xe?te(Er,Tn,yt,v,h,Re):te(Tn,Er,yt,h,v,Re);if(!(ci===void 0?Tn===Er||Me(Tn,Er,k,te,Re):ci)){bt=!1;break}ln||(ln=yt=="constructor")}if(bt&&!ln){var Ur=h.constructor,Fr=v.constructor;Ur!=Fr&&"constructor"in h&&"constructor"in v&&!(typeof Ur=="function"&&Ur instanceof Ur&&typeof Fr=="function"&&Fr instanceof Fr)&&(bt=!1)}return Re.delete(h),Re.delete(v),bt}function lr(h){return rt(h,Hn,Ls)}function sn(h,v){var k=h.__data__;return ur(v)?k[typeof v=="string"?"string":"hash"]:k.map}function ze(h,v){var k=_t(h,v);return ai(k)?k:void 0}function on(h){var v=ft.call(h,Dt),k=h[Dt];try{h[Dt]=void 0;var te=!0}catch{}var Me=Ot.call(h);return te&&(v?h[Dt]=k:delete h[Dt]),Me}var Ls=be?function(h){return h==null?[]:(h=Object(h),et(be(h),function(v){return bn.call(h,v)}))}:ui,En=rn;(br&&En(new br(new ArrayBuffer(1)))!=W||tr&&En(new tr)!=E||vr&&En(vr.resolve())!=Q||ii&&En(new ii)!=ue||si&&En(new si)!=Ee)&&(En=function(h){var v=rn(h),k=v==Y?h.constructor:void 0,te=k?kt(k):"";if(te)switch(te){case Mn:return W;case tn:return E;case Rr:return Q;case ot:return ue;case pt:return Ee}return v});function qt(h,v){return v=v??a,!!v&&(typeof h=="number"||Ne.test(h))&&h>-1&&h%1==0&&h<v}function ur(h){var v=typeof h;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?h!=="__proto__":h===null}function Mr(h){return!!ut&&ut in h}function Sn(h){var v=h&&h.constructor,k=typeof v=="function"&&v.prototype||Ge;return h===k}function li(h){return Ot.call(h)}function kt(h){if(h!=null){try{return wt.call(h)}catch{}try{return h+""}catch{}}return""}function ht(h,v){return h===v||h!==h&&v!==v}var Gt=or(function(){return arguments}())?or:function(h){return an(h)&&ft.call(h,"callee")&&!bn.call(h,"callee")},On=Array.isArray;function Kn(h){return h!=null&&Bt(h.length)&&!Vi(h)}var cr=yr||Wi;function An(h,v){return Fn(h,v)}function Vi(h){if(!Dr(h))return!1;var v=rn(h);return v==x||v==A||v==d||v==he}function Bt(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=a}function Dr(h){var v=typeof h;return h!=null&&(v=="object"||v=="function")}function an(h){return h!=null&&typeof h=="object"}var Br=it?yn(it):$r;function Hn(h){return Kn(h)?Ki(h):Hi(h)}function ui(){return[]}function Wi(){return!1}r.exports=An}(os,os.exports)),os.exports}var Vs={},Iu;function vy(){if(Iu)return Vs;Iu=1,Object.defineProperty(Vs,"__esModule",{value:!0});const r=Pu(),e=ju();var t;return function(n){function i(f={},d={},m=!1){typeof f!="object"&&(f={}),typeof d!="object"&&(d={});let w=r(d);m||(w=Object.keys(w).reduce((y,x)=>(w[x]!=null&&(y[x]=w[x]),y),{}));for(const y in f)f[y]!==void 0&&d[y]===void 0&&(w[y]=f[y]);return Object.keys(w).length>0?w:void 0}n.compose=i;function s(f={},d={}){typeof f!="object"&&(f={}),typeof d!="object"&&(d={});const m=Object.keys(f).concat(Object.keys(d)).reduce((w,y)=>(e(f[y],d[y])||(w[y]=d[y]===void 0?null:d[y]),w),{});return Object.keys(m).length>0?m:void 0}n.diff=s;function a(f={},d={}){f=f||{};const m=Object.keys(d).reduce((w,y)=>(d[y]!==f[y]&&f[y]!==void 0&&(w[y]=d[y]),w),{});return Object.keys(f).reduce((w,y)=>(f[y]!==d[y]&&d[y]===void 0&&(w[y]=null),w),m)}n.invert=a;function u(f,d,m=!1){if(typeof f!="object")return d;if(typeof d!="object")return;if(!m)return d;const w=Object.keys(d).reduce((y,x)=>(f[x]===void 0&&(y[x]=d[x]),y),{});return Object.keys(w).length>0?w:void 0}n.transform=u}(t||(t={})),Vs.default=t,Vs}var Ws={},$u;function Mu(){if($u)return Ws;$u=1,Object.defineProperty(Ws,"__esModule",{value:!0});var r;return function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t}(r||(r={})),Ws.default=r,Ws}var Gs={},Du;function wy(){if(Du)return Gs;Du=1,Object.defineProperty(Gs,"__esModule",{value:!0});const r=Mu();class e{constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);const i=this.ops[this.index];if(i){const s=this.offset,a=r.default.length(i);if(n>=a-s?(n=a-s,this.index+=1,this.offset=0):this.offset+=n,typeof i.delete=="number")return{delete:n};{const u={};return i.attributes&&(u.attributes=i.attributes),typeof i.retain=="number"?u.retain=n:typeof i.retain=="object"&&i.retain!==null?u.retain=i.retain:typeof i.insert=="string"?u.insert=i.insert.substr(s,n):u.insert=i.insert,u}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const n=this.offset,i=this.index,s=this.next(),a=this.ops.slice(this.index);return this.offset=n,this.index=i,[s].concat(a)}}else return[]}}return Gs.default=e,Gs}var Bu;function xy(){return Bu||(Bu=1,function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=by(),n=Pu(),i=ju(),s=vy();e.AttributeMap=s.default;const a=Mu();e.Op=a.default;const u=wy();e.OpIterator=u.default;const f="\0",d=(w,y)=>{if(typeof w!="object"||w===null)throw new Error(`cannot retain a ${typeof w}`);if(typeof y!="object"||y===null)throw new Error(`cannot retain a ${typeof y}`);const x=Object.keys(w)[0];if(!x||x!==Object.keys(y)[0])throw new Error(`embed types not matched: ${x} != ${Object.keys(y)[0]}`);return[x,w[x],y[x]]};class m{constructor(y){Array.isArray(y)?this.ops=y:y!=null&&Array.isArray(y.ops)?this.ops=y.ops:this.ops=[]}static registerEmbed(y,x){this.handlers[y]=x}static unregisterEmbed(y){delete this.handlers[y]}static getHandler(y){const x=this.handlers[y];if(!x)throw new Error(`no handlers for embed type "${y}"`);return x}insert(y,x){const A={};return typeof y=="string"&&y.length===0?this:(A.insert=y,x!=null&&typeof x=="object"&&Object.keys(x).length>0&&(A.attributes=x),this.push(A))}delete(y){return y<=0?this:this.push({delete:y})}retain(y,x){if(typeof y=="number"&&y<=0)return this;const A={retain:y};return x!=null&&typeof x=="object"&&Object.keys(x).length>0&&(A.attributes=x),this.push(A)}push(y){let x=this.ops.length,A=this.ops[x-1];if(y=n(y),typeof A=="object"){if(typeof y.delete=="number"&&typeof A.delete=="number")return this.ops[x-1]={delete:A.delete+y.delete},this;if(typeof A.delete=="number"&&y.insert!=null&&(x-=1,A=this.ops[x-1],typeof A!="object"))return this.ops.unshift(y),this;if(i(y.attributes,A.attributes)){if(typeof y.insert=="string"&&typeof A.insert=="string")return this.ops[x-1]={insert:A.insert+y.insert},typeof y.attributes=="object"&&(this.ops[x-1].attributes=y.attributes),this;if(typeof y.retain=="number"&&typeof A.retain=="number")return this.ops[x-1]={retain:A.retain+y.retain},typeof y.attributes=="object"&&(this.ops[x-1].attributes=y.attributes),this}}return x===this.ops.length?this.ops.push(y):this.ops.splice(x,0,y),this}chop(){const y=this.ops[this.ops.length-1];return y&&typeof y.retain=="number"&&!y.attributes&&this.ops.pop(),this}filter(y){return this.ops.filter(y)}forEach(y){this.ops.forEach(y)}map(y){return this.ops.map(y)}partition(y){const x=[],A=[];return this.forEach(E=>{(y(E)?x:A).push(E)}),[x,A]}reduce(y,x){return this.ops.reduce(y,x)}changeLength(){return this.reduce((y,x)=>x.insert?y+a.default.length(x):x.delete?y-x.delete:y,0)}length(){return this.reduce((y,x)=>y+a.default.length(x),0)}slice(y=0,x=1/0){const A=[],E=new u.default(this.ops);let N=0;for(;N<x&&E.hasNext();){let D;N<y?D=E.next(y-N):(D=E.next(x-N),A.push(D)),N+=a.default.length(D)}return new m(A)}compose(y){const x=new u.default(this.ops),A=new u.default(y.ops),E=[],N=A.peek();if(N!=null&&typeof N.retain=="number"&&N.attributes==null){let Y=N.retain;for(;x.peekType()==="insert"&&x.peekLength()<=Y;)Y-=x.peekLength(),E.push(x.next());N.retain-Y>0&&A.next(N.retain-Y)}const D=new m(E);for(;x.hasNext()||A.hasNext();)if(A.peekType()==="insert")D.push(A.next());else if(x.peekType()==="delete")D.push(x.next());else{const Y=Math.min(x.peekLength(),A.peekLength()),Q=x.next(Y),he=A.next(Y);if(he.retain){const oe={};if(typeof Q.retain=="number")oe.retain=typeof he.retain=="number"?Y:he.retain;else if(typeof he.retain=="number")Q.retain==null?oe.insert=Q.insert:oe.retain=Q.retain;else{const ne=Q.retain==null?"insert":"retain",[re,ve,Ee]=d(Q[ne],he.retain),O=m.getHandler(re);oe[ne]={[re]:O.compose(ve,Ee,ne==="retain")}}const ue=s.default.compose(Q.attributes,he.attributes,typeof Q.retain=="number");if(ue&&(oe.attributes=ue),D.push(oe),!A.hasNext()&&i(D.ops[D.ops.length-1],oe)){const ne=new m(x.rest());return D.concat(ne).chop()}}else typeof he.delete=="number"&&(typeof Q.retain=="number"||typeof Q.retain=="object"&&Q.retain!==null)&&D.push(he)}return D.chop()}concat(y){const x=new m(this.ops.slice());return y.ops.length>0&&(x.push(y.ops[0]),x.ops=x.ops.concat(y.ops.slice(1))),x}diff(y,x){if(this.ops===y.ops)return new m;const A=[this,y].map(Q=>Q.map(he=>{if(he.insert!=null)return typeof he.insert=="string"?he.insert:f;const oe=Q===y?"on":"with";throw new Error("diff() called "+oe+" non-document")}).join("")),E=new m,N=t(A[0],A[1],x,!0),D=new u.default(this.ops),Y=new u.default(y.ops);return N.forEach(Q=>{let he=Q[1].length;for(;he>0;){let oe=0;switch(Q[0]){case t.INSERT:oe=Math.min(Y.peekLength(),he),E.push(Y.next(oe));break;case t.DELETE:oe=Math.min(he,D.peekLength()),D.next(oe),E.delete(oe);break;case t.EQUAL:oe=Math.min(D.peekLength(),Y.peekLength(),he);const ue=D.next(oe),ne=Y.next(oe);i(ue.insert,ne.insert)?E.retain(oe,s.default.diff(ue.attributes,ne.attributes)):E.push(ne).delete(oe);break}he-=oe}}),E.chop()}eachLine(y,x=`
32
+ `){const A=new u.default(this.ops);let E=new m,N=0;for(;A.hasNext();){if(A.peekType()!=="insert")return;const D=A.peek(),Y=a.default.length(D)-A.peekLength(),Q=typeof D.insert=="string"?D.insert.indexOf(x,Y)-Y:-1;if(Q<0)E.push(A.next());else if(Q>0)E.push(A.next(Q));else{if(y(E,A.next(1).attributes||{},N)===!1)return;N+=1,E=new m}}E.length()>0&&y(E,{},N)}invert(y){const x=new m;return this.reduce((A,E)=>{if(E.insert)x.delete(a.default.length(E));else{if(typeof E.retain=="number"&&E.attributes==null)return x.retain(E.retain),A+E.retain;if(E.delete||typeof E.retain=="number"){const N=E.delete||E.retain;return y.slice(A,A+N).forEach(Y=>{E.delete?x.push(Y):E.retain&&E.attributes&&x.retain(a.default.length(Y),s.default.invert(E.attributes,Y.attributes))}),A+N}else if(typeof E.retain=="object"&&E.retain!==null){const N=y.slice(A,A+1),D=new u.default(N.ops).next(),[Y,Q,he]=d(E.retain,D.insert),oe=m.getHandler(Y);return x.retain({[Y]:oe.invert(Q,he)},s.default.invert(E.attributes,D.attributes)),A+1}}return A},0),x.chop()}transform(y,x=!1){if(x=!!x,typeof y=="number")return this.transformPosition(y,x);const A=y,E=new u.default(this.ops),N=new u.default(A.ops),D=new m;for(;E.hasNext()||N.hasNext();)if(E.peekType()==="insert"&&(x||N.peekType()!=="insert"))D.retain(a.default.length(E.next()));else if(N.peekType()==="insert")D.push(N.next());else{const Y=Math.min(E.peekLength(),N.peekLength()),Q=E.next(Y),he=N.next(Y);if(Q.delete)continue;if(he.delete)D.push(he);else{const oe=Q.retain,ue=he.retain;let ne=typeof ue=="object"&&ue!==null?ue:Y;if(typeof oe=="object"&&oe!==null&&typeof ue=="object"&&ue!==null){const re=Object.keys(oe)[0];if(re===Object.keys(ue)[0]){const ve=m.getHandler(re);ve&&(ne={[re]:ve.transform(oe[re],ue[re],x)})}}D.retain(ne,s.default.transform(Q.attributes,he.attributes,x))}}return D.chop()}transformPosition(y,x=!1){x=!!x;const A=new u.default(this.ops);let E=0;for(;A.hasNext()&&E<=y;){const N=A.peekLength(),D=A.peekType();if(A.next(),D==="delete"){y-=Math.min(N,y-E);continue}else D==="insert"&&(E<y||!x)&&(y+=N);E+=N}return y}}m.Op=a.default,m.OpIterator=u.default,m.AttributeMap=s.default,m.handlers={},e.default=m,r.exports=m,r.exports.default=m}(zs,zs.exports)),zs.exports}var cn=xy();const ke=$o(cn);class kn extends Xt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}kn.blotName="break",kn.tagName="BR";let Rn=class extends Hs{};const Ey={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ys(r){return r.replace(/[&<>"']/g,e=>Ey[e])}const Qn=class Qn extends ra{static compare(e,t){const n=Qn.order.indexOf(e),i=Qn.order.indexOf(t);return n>=0||i>=0?n-i:e===t?0:e<t?-1:1}formatAt(e,t,n,i){if(Qn.compare(this.statics.blotName,n)<0&&this.scroll.query(n,Pe.BLOT)){const s=this.isolate(e,t);i&&s.wrap(n,i)}else super.formatAt(e,t,n,i)}optimize(e){if(super.optimize(e),this.parent instanceof Qn&&Qn.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};Te(Qn,"allowedChildren",[Qn,kn,Xt,Rn]),Te(Qn,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let Yn=Qn;const Uu=1;class Pt extends is{constructor(){super(...arguments);Te(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Fu(this)),this.cache.delta}deleteAt(t,n){super.deleteAt(t,n),this.cache={}}formatAt(t,n,i,s){n<=0||(this.scroll.query(i,Pe.BLOCK)?t+n===this.length()&&this.format(i,s):super.formatAt(t,Math.min(n,this.length()-t-1),i,s),this.cache={})}insertAt(t,n,i){if(i!=null){super.insertAt(t,n,i),this.cache={};return}if(n.length===0)return;const s=n.split(`
33
+ `),a=s.shift();a.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});let u=this;s.reduce((f,d)=>(u=u.split(f,!0),u.insertAt(0,d),d.length),t+a.length)}insertBefore(t,n){const{head:i}=this.children;super.insertBefore(t,n),i instanceof kn&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Uu),this.cache.length}moveChildren(t,n){super.moveChildren(t,n),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n&&(t===0||t>=this.length()-Uu)){const s=this.clone();return t===0?(this.parent.insertBefore(s,this),this):(this.parent.insertBefore(s,this.next),s)}const i=super.split(t,n);return this.cache={},i}}Pt.blotName="block",Pt.tagName="P",Pt.defaultChild=kn,Pt.allowedChildren=[kn,Yn,Xt,Rn];class fn extends Xt{attach(){super.attach(),this.attributes=new Fs(this.domNode)}delta(){return new ke().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const n=this.scroll.query(e,Pe.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,t)}formatAt(e,t,n,i){this.format(n,i)}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n);return}const i=t.split(`
34
+ `),s=i.pop(),a=i.map(f=>{const d=this.scroll.create(Pt.blotName);return d.insertAt(0,f),d}),u=this.split(e);a.forEach(f=>{this.parent.insertBefore(f,u)}),s&&this.parent.insertBefore(this.scroll.create("text",s),u)}}fn.scope=Pe.BLOCK_BLOT;function Fu(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r.descendants(jt).reduce((t,n)=>n.length()===0?t:t.insert(n.value(),hn(n,{},e)),new ke).insert(`
35
+ `,hn(r))}function hn(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return r==null||("formats"in r&&typeof r.formats=="function"&&(e={...e,...r.formats()},t&&delete e["code-token"]),r.parent==null||r.parent.statics.blotName==="scroll"||r.parent.statics.scope!==r.statics.scope)?e:hn(r.parent,e,t)}const pn=class pn extends Xt{static value(){}constructor(e,t,n){super(e,t),this.selection=n,this.textNode=document.createTextNode(pn.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,t){if(this.savedLength!==0){super.format(e,t);return}let n=this,i=0;for(;n!=null&&n.statics.scope!==Pe.BLOCK_BLOT;)i+=n.offset(n.parent),n=n.parent;n!=null&&(this.savedLength=pn.CONTENTS.length,n.optimize(),n.formatAt(i,pn.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof Rn?this.prev:null,n=t?t.length():0,i=this.next instanceof Rn?this.next:null,s=i?i.text:"",{textNode:a}=this,u=a.data.split(pn.CONTENTS).join("");a.data=pn.CONTENTS;let f;if(t)f=t,(u||i)&&(t.insertAt(t.length(),u+s),i&&i.remove());else if(i)f=i,i.insertAt(0,u);else{const d=document.createTextNode(u);f=this.scroll.create(d),this.parent.insertBefore(f,this)}if(this.remove(),e){const d=(y,x)=>t&&y===t.domNode?x:y===a?n+x-1:i&&y===i.domNode?n+u.length+x:null,m=d(e.start.node,e.start.offset),w=d(e.end.node,e.end.offset);if(m!==null&&w!==null)return{startNode:f.domNode,startOffset:m,endNode:f.domNode,endOffset:w}}return null}update(e,t){if(e.some(n=>n.type==="characterData"&&n.target===this.textNode)){const n=this.restore();n&&(t.range=n)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=pn.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};Te(pn,"blotName","cursor"),Te(pn,"className","ql-cursor"),Te(pn,"tagName","span"),Te(pn,"CONTENTS","\uFEFF");let Si=pn;var la={exports:{}},Ku;function Sy(){return Ku||(Ku=1,function(r){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function i(f,d,m){this.fn=f,this.context=d,this.once=m||!1}function s(f,d,m,w,y){if(typeof m!="function")throw new TypeError("The listener must be a function");var x=new i(m,w||f,y),A=t?t+d:d;return f._events[A]?f._events[A].fn?f._events[A]=[f._events[A],x]:f._events[A].push(x):(f._events[A]=x,f._eventsCount++),f}function a(f,d){--f._eventsCount===0?f._events=new n:delete f._events[d]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var d=[],m,w;if(this._eventsCount===0)return d;for(w in m=this._events)e.call(m,w)&&d.push(t?w.slice(1):w);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(m)):d},u.prototype.listeners=function(d){var m=t?t+d:d,w=this._events[m];if(!w)return[];if(w.fn)return[w.fn];for(var y=0,x=w.length,A=new Array(x);y<x;y++)A[y]=w[y].fn;return A},u.prototype.listenerCount=function(d){var m=t?t+d:d,w=this._events[m];return w?w.fn?1:w.length:0},u.prototype.emit=function(d,m,w,y,x,A){var E=t?t+d:d;if(!this._events[E])return!1;var N=this._events[E],D=arguments.length,Y,Q;if(N.fn){switch(N.once&&this.removeListener(d,N.fn,void 0,!0),D){case 1:return N.fn.call(N.context),!0;case 2:return N.fn.call(N.context,m),!0;case 3:return N.fn.call(N.context,m,w),!0;case 4:return N.fn.call(N.context,m,w,y),!0;case 5:return N.fn.call(N.context,m,w,y,x),!0;case 6:return N.fn.call(N.context,m,w,y,x,A),!0}for(Q=1,Y=new Array(D-1);Q<D;Q++)Y[Q-1]=arguments[Q];N.fn.apply(N.context,Y)}else{var he=N.length,oe;for(Q=0;Q<he;Q++)switch(N[Q].once&&this.removeListener(d,N[Q].fn,void 0,!0),D){case 1:N[Q].fn.call(N[Q].context);break;case 2:N[Q].fn.call(N[Q].context,m);break;case 3:N[Q].fn.call(N[Q].context,m,w);break;case 4:N[Q].fn.call(N[Q].context,m,w,y);break;default:if(!Y)for(oe=1,Y=new Array(D-1);oe<D;oe++)Y[oe-1]=arguments[oe];N[Q].fn.apply(N[Q].context,Y)}}return!0},u.prototype.on=function(d,m,w){return s(this,d,m,w,!1)},u.prototype.once=function(d,m,w){return s(this,d,m,w,!0)},u.prototype.removeListener=function(d,m,w,y){var x=t?t+d:d;if(!this._events[x])return this;if(!m)return a(this,x),this;var A=this._events[x];if(A.fn)A.fn===m&&(!y||A.once)&&(!w||A.context===w)&&a(this,x);else{for(var E=0,N=[],D=A.length;E<D;E++)(A[E].fn!==m||y&&!A[E].once||w&&A[E].context!==w)&&N.push(A[E]);N.length?this._events[x]=N.length===1?N[0]:N:a(this,x)}return this},u.prototype.removeAllListeners=function(d){var m;return d?(m=t?t+d:d,this._events[m]&&a(this,m)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=t,u.EventEmitter=u,r.exports=u}(la)),la.exports}var Oy=Sy();const Ay=$o(Oy),ua=new WeakMap,ca=["error","warn","log","info"];let fa="warn";function Hu(r){if(fa&&ca.indexOf(r)<=ca.indexOf(fa)){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];console[r](...t)}}function dr(r){return ca.reduce((e,t)=>(e[t]=Hu.bind(console,t,r),e),{})}dr.level=r=>{fa=r},Hu.level=dr.level;const ha=dr("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(r=>{document.addEventListener(r,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Array.from(document.querySelectorAll(".ql-container")).forEach(i=>{const s=ua.get(i);s&&s.emitter&&s.emitter.handleDOM(...t)})})});class Le extends Ay{constructor(){super(),this.domListeners={},this.on("error",ha.error)}emit(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ha.log.call(ha,...t),super.emit(...t)}handleDOM(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];(this.domListeners[e.type]||[]).forEach(s=>{let{node:a,handler:u}=s;(e.target===a||a.contains(e.target))&&u(e,...n)})}listenDOM(e,t,n){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:n})}}Te(Le,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),Te(Le,"sources",{API:"api",SILENT:"silent",USER:"user"});const da=dr("quill:selection");class Jr{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=t}}class Ty{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Jr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,Le.sources.USER),1)}),this.emitter.on(Le.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const n=this.getNativeRange();n!=null&&n.start.node!==this.cursor.textNode&&this.emitter.once(Le.events.SCROLL_UPDATE,(i,s)=>{try{this.root.contains(n.start.node)&&this.root.contains(n.end.node)&&this.setNativeRange(n.start.node,n.start.offset,n.end.node,n.end.offset);const a=s.some(u=>u.type==="characterData"||u.type==="childList"||u.type==="attributes"&&u.target===this.root);this.update(a?Le.sources.SILENT:i)}catch{}})}),this.emitter.on(Le.events.SCROLL_OPTIMIZE,(n,i)=>{if(i.range){const{startNode:s,startOffset:a,endNode:u,endOffset:f}=i.range;this.setNativeRange(s,a,u,f),this.update(Le.sources.SILENT)}}),this.update(Le.sources.SILENT)}handleComposition(){this.emitter.on(Le.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(Le.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(Le.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const n=this.getNativeRange();if(!(n==null||!n.native.collapsed||this.scroll.query(e,Pe.BLOCK))){if(n.start.node!==this.cursor.textNode){const i=this.scroll.find(n.start.node,!1);if(i==null)return;if(i instanceof jt){const s=i.split(n.start.offset);i.parent.insertBefore(this.cursor,s)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;let i,[s,a]=this.scroll.leaf(e);if(s==null)return null;if(t>0&&a===s.length()){const[m]=this.scroll.leaf(e+1);if(m){const[w]=this.scroll.line(e),[y]=this.scroll.line(e+1);w===y&&(s=m,a=0)}}[i,a]=s.position(a,!0);const u=document.createRange();if(t>0)return u.setStart(i,a),[s,a]=this.scroll.leaf(e+t),s==null?null:([i,a]=s.position(a,!0),u.setEnd(i,a),u.getBoundingClientRect());let f="left",d;if(i instanceof Text){if(!i.data.length)return null;a<i.data.length?(u.setStart(i,a),u.setEnd(i,a+1)):(u.setStart(i,a-1),u.setEnd(i,a),f="right"),d=u.getBoundingClientRect()}else{if(!(s.domNode instanceof Element))return null;d=s.domNode.getBoundingClientRect(),a>0&&(f="right")}return{bottom:d.top+d.height,height:d.height,left:d[f],right:d[f],top:d.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(t==null)return null;const n=this.normalizeNative(t);return da.info("getNativeRange",n),n}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&pa(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const n=t.map(a=>{const[u,f]=a,d=this.scroll.find(u,!0),m=d.offset(this.scroll);return f===0?m:d instanceof jt?m+d.index(u,f):m+d.length()}),i=Math.min(Math.max(...n),this.scroll.length()-1),s=Math.min(i,...n);return new Jr(s,i-s)}normalizeNative(e){if(!pa(this.root,e.startContainer)||!e.collapsed&&!pa(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(n=>{let{node:i,offset:s}=n;for(;!(i instanceof Text)&&i.childNodes.length>0;)if(i.childNodes.length>s)i=i.childNodes[s],s=0;else if(i.childNodes.length===s)i=i.lastChild,i instanceof Text?s=i.data.length:i.childNodes.length>0?s=i.childNodes.length:s=i.childNodes.length+1;else break;n.node=i,n.offset=s}),t}rangeToNative(e){const t=this.scroll.length(),n=(i,s)=>{i=Math.min(t-1,i);const[a,u]=this.scroll.leaf(i);return a?a.position(u,s):[null,-1]};return[...n(e.index,!1),...n(e.index+e.length,!0)]}setNativeRange(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(da.info("setNativeRange",e,t,n,i),e!=null&&(this.root.parentNode==null||e.parentNode==null||n.parentNode==null))return;const a=document.getSelection();if(a!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:u}=this.getNativeRange()||{};if(u==null||s||e!==u.startContainer||t!==u.startOffset||n!==u.endContainer||i!==u.endOffset){e instanceof Element&&e.tagName==="BR"&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),n instanceof Element&&n.tagName==="BR"&&(i=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const f=document.createRange();f.setStart(e,t),f.setEnd(n,i),a.removeAllRanges(),a.addRange(f)}}else a.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Le.sources.API;if(typeof t=="string"&&(n=t,t=!1),da.info("setRange",e),e!=null){const i=this.rangeToNative(e);this.setNativeRange(...i,t)}else this.setNativeRange(null);this.update(n)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Le.sources.USER;const t=this.lastRange,[n,i]=this.getRange();if(this.lastRange=n,this.lastNative=i,this.lastRange!=null&&(this.savedRange=this.lastRange),!ta(t,this.lastRange)){if(!this.composing&&i!=null&&i.native.collapsed&&i.start.node!==this.cursor.textNode){const a=this.cursor.restore();a&&this.setNativeRange(a.startNode,a.startOffset,a.endNode,a.endOffset)}const s=[Le.events.SELECTION_CHANGE,yi(this.lastRange),yi(t),e];this.emitter.emit(Le.events.EDITOR_CHANGE,...s),e!==Le.sources.SILENT&&this.emitter.emit(...s)}}}function pa(r,e){try{e.parentNode}catch{return!1}return r.contains(e)}const _y=/^[ -~]*$/;let Ny=class{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const n=zu(e),i=new ke;return Ly(n.ops.slice()).reduce((a,u)=>{const f=cn.Op.length(u);let d=u.attributes||{},m=!1,w=!1;if(u.insert!=null){if(i.retain(f),typeof u.insert=="string"){const A=u.insert;w=!A.endsWith(`
36
+ `)&&(t<=a||!!this.scroll.descendant(fn,a)[0]),this.scroll.insertAt(a,A);const[E,N]=this.scroll.line(a);let D=_r({},hn(E));if(E instanceof Pt){const[Y]=E.descendant(jt,N);Y&&(D=_r(D,hn(Y)))}d=cn.AttributeMap.diff(D,d)||{}}else if(typeof u.insert=="object"){const A=Object.keys(u.insert)[0];if(A==null)return a;const E=this.scroll.query(A,Pe.INLINE)!=null;if(E)(t<=a||this.scroll.descendant(fn,a)[0])&&(w=!0);else if(a>0){const[N,D]=this.scroll.descendant(jt,a-1);N instanceof Rn?N.value()[D]!==`
37
+ `&&(m=!0):N instanceof Xt&&N.statics.scope===Pe.INLINE_BLOT&&(m=!0)}if(this.scroll.insertAt(a,A,u.insert[A]),E){const[N]=this.scroll.descendant(jt,a);if(N){const D=_r({},hn(N));d=cn.AttributeMap.diff(D,d)||{}}}}t+=f}else if(i.push(u),u.retain!==null&&typeof u.retain=="object"){const A=Object.keys(u.retain)[0];if(A==null)return a;this.scroll.updateEmbedAt(a,A,u.retain[A])}Object.keys(d).forEach(A=>{this.scroll.formatAt(a,f,A,d[A])});const y=m?1:0,x=w?1:0;return t+=y+x,i.retain(y),i.delete(x),a+f+y+x},0),i.reduce((a,u)=>typeof u.delete=="number"?(this.scroll.deleteAt(a,u.delete),a):a+cn.Op.length(u),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new ke().retain(e).delete(t))}formatLine(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach(s=>{this.scroll.lines(e,Math.max(t,1)).forEach(a=>{a.format(s,n[s])})}),this.scroll.optimize();const i=new ke().retain(e).retain(t,yi(n));return this.update(i)}formatText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(n).forEach(s=>{this.scroll.formatAt(e,t,s,n[s])});const i=new ke().retain(e).retain(t,yi(n));return this.update(i)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new ke)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[],i=[];t===0?this.scroll.path(e).forEach(u=>{const[f]=u;f instanceof Pt?n.push(f):f instanceof jt&&i.push(f)}):(n=this.scroll.lines(e,t),i=this.scroll.descendants(jt,e,t));const[s,a]=[n,i].map(u=>{const f=u.shift();if(f==null)return{};let d=hn(f);for(;Object.keys(d).length>0;){const m=u.shift();if(m==null)return d;d=Cy(hn(m),d)}return d});return{...s,...a}}getHTML(e,t){const[n,i]=this.scroll.line(e);if(n){const s=n.length();return n.length()>=i+t&&!(i===0&&t===s)?as(n,i,t,!0):as(this.scroll,e,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter(n=>typeof n.insert=="string").map(n=>n.insert).join("")}insertContents(e,t){const n=zu(t),i=new ke().retain(e).concat(n);return this.scroll.insertContents(e,n),this.update(i)}insertEmbed(e,t,n){return this.scroll.insertAt(e,t,n),this.update(new ke().retain(e).insert({[t]:n}))}insertText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
37
38
  `).replace(/\r/g,`
38
- `),this.scroll.insertAt(e,t),Object.keys(n).forEach(i=>{this.scroll.formatAt(e,t.length,i,n[i])}),this.update(new Re().retain(e).insert(t,Oi(n)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if((e==null?void 0:e.statics.blotName)!==jt.blotName)return!1;const t=e;return t.children.length>1?!1:t.children.head instanceof Hn}removeFormat(e,t){const n=this.getText(e,t),[i,s]=this.scroll.line(e+t);let a=0,u=new Re;i!=null&&(a=i.length()-s,u=i.delta().slice(s,s+a-1).insert(`
39
- `));const d=this.getContents(e,t+a).diff(new Re().insert(n).concat(u)),m=new Re().retain(e).concat(d);return this.applyDelta(m)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const i=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(Ly)&&this.scroll.find(t[0].target)){const s=this.scroll.find(t[0].target),a=Nn(s),u=s.offset(this.scroll),f=t[0].oldValue.replace(Ci.CONTENTS,""),d=new Re().insert(f),m=new Re().insert(s.value()),v=n&&{oldRange:Vu(n.oldRange,-u),newRange:Vu(n.newRange,-u)};e=new Re().retain(u).concat(d.diff(m,v)).reduce((x,A)=>A.insert?x.insert(A.insert,a):x.push(A),new Re),this.delta=i.compose(e)}else this.delta=this.getDelta(),(!e||!ta(i.compose(e),this.delta))&&(e=i.diff(this.delta,n));return e}};function Li(r,e,t){if(r.length===0){const[x]=ga(t.pop());return e<=0?`</li></${x}>`:`</li></${x}>${Li([],e-1,t)}`}const[{child:n,offset:i,length:s,indent:a,type:u},...f]=r,[d,m]=ga(u);if(a>e)return t.push(u),a===e+1?`<${d}><li${m}>${us(n,i,s)}${Li(f,a,t)}`:`<${d}><li>${Li(r,e+1,t)}`;const v=t[t.length-1];if(a===e&&u===v)return`</li><li${m}>${us(n,i,s)}${Li(f,a,t)}`;const[y]=ga(t.pop());return`</li></${y}>${Li(r,e-1,t)}`}function us(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in r&&typeof r.html=="function")return r.html(e,t);if(r instanceof zn)return Ys(r.value().slice(e,e+t)).replaceAll(" ","&nbsp;");if(r instanceof Kn){if(r.statics.blotName==="list-container"){const d=[];return r.children.forEachAt(e,t,(m,v,y)=>{const x="formats"in m&&typeof m.formats=="function"?m.formats():{};d.push({child:m,offset:v,length:y,indent:x.indent||0,type:x.list})}),Li(d,-1,[])}const i=[];if(r.children.forEachAt(e,t,(d,m,v)=>{i.push(us(d,m,v))}),n||r.statics.blotName==="list")return i.join("");const{outerHTML:s,innerHTML:a}=r.domNode,[u,f]=s.split(`>${a}<`);return u==="<table"?`<table style="border: 1px solid #000;">${i.join("")}<${f}`:`${u}>${i.join("")}<${f}`}return r.domNode instanceof Element?r.domNode.outerHTML:""}function ky(r,e){return Object.keys(e).reduce((t,n)=>{if(r[n]==null)return t;const i=e[n];return i===r[n]?t[n]=i:Array.isArray(i)?i.indexOf(r[n])<0?t[n]=i.concat([r[n]]):t[n]=i:t[n]=[i,r[n]],t},{})}function ga(r){const e=r==="ordered"?"ol":"ul";switch(r){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function zu(r){return r.reduce((e,t)=>{if(typeof t.insert=="string"){const n=t.insert.replace(/\r\n/g,`
39
+ `),this.scroll.insertAt(e,t),Object.keys(n).forEach(i=>{this.scroll.formatAt(e,t.length,i,n[i])}),this.update(new ke().retain(e).insert(t,yi(n)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if((e==null?void 0:e.statics.blotName)!==Pt.blotName)return!1;const t=e;return t.children.length>1?!1:t.children.head instanceof kn}removeFormat(e,t){const n=this.getText(e,t),[i,s]=this.scroll.line(e+t);let a=0,u=new ke;i!=null&&(a=i.length()-s,u=i.delta().slice(s,s+a-1).insert(`
40
+ `));const d=this.getContents(e,t+a).diff(new ke().insert(n).concat(u)),m=new ke().retain(e).concat(d);return this.applyDelta(m)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const i=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(_y)&&this.scroll.find(t[0].target)){const s=this.scroll.find(t[0].target),a=hn(s),u=s.offset(this.scroll),f=t[0].oldValue.replace(Si.CONTENTS,""),d=new ke().insert(f),m=new ke().insert(s.value()),w=n&&{oldRange:Vu(n.oldRange,-u),newRange:Vu(n.newRange,-u)};e=new ke().retain(u).concat(d.diff(m,w)).reduce((x,A)=>A.insert?x.insert(A.insert,a):x.push(A),new ke),this.delta=i.compose(e)}else this.delta=this.getDelta(),(!e||!ta(i.compose(e),this.delta))&&(e=i.diff(this.delta,n));return e}};function Oi(r,e,t){if(r.length===0){const[x]=ga(t.pop());return e<=0?`</li></${x}>`:`</li></${x}>${Oi([],e-1,t)}`}const[{child:n,offset:i,length:s,indent:a,type:u},...f]=r,[d,m]=ga(u);if(a>e)return t.push(u),a===e+1?`<${d}><li${m}>${as(n,i,s)}${Oi(f,a,t)}`:`<${d}><li>${Oi(r,e+1,t)}`;const w=t[t.length-1];if(a===e&&u===w)return`</li><li${m}>${as(n,i,s)}${Oi(f,a,t)}`;const[y]=ga(t.pop());return`</li></${y}>${Oi(r,e-1,t)}`}function as(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in r&&typeof r.html=="function")return r.html(e,t);if(r instanceof Rn)return Ys(r.value().slice(e,e+t)).replaceAll(" ","&nbsp;");if(r instanceof Ln){if(r.statics.blotName==="list-container"){const d=[];return r.children.forEachAt(e,t,(m,w,y)=>{const x="formats"in m&&typeof m.formats=="function"?m.formats():{};d.push({child:m,offset:w,length:y,indent:x.indent||0,type:x.list})}),Oi(d,-1,[])}const i=[];if(r.children.forEachAt(e,t,(d,m,w)=>{i.push(as(d,m,w))}),n||r.statics.blotName==="list")return i.join("");const{outerHTML:s,innerHTML:a}=r.domNode,[u,f]=s.split(`>${a}<`);return u==="<table"?`<table style="border: 1px solid #000;">${i.join("")}<${f}`:`${u}>${i.join("")}<${f}`}return r.domNode instanceof Element?r.domNode.outerHTML:""}function Cy(r,e){return Object.keys(e).reduce((t,n)=>{if(r[n]==null)return t;const i=e[n];return i===r[n]?t[n]=i:Array.isArray(i)?i.indexOf(r[n])<0?t[n]=i.concat([r[n]]):t[n]=i:t[n]=[i,r[n]],t},{})}function ga(r){const e=r==="ordered"?"ol":"ul";switch(r){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function zu(r){return r.reduce((e,t)=>{if(typeof t.insert=="string"){const n=t.insert.replace(/\r\n/g,`
40
41
  `).replace(/\r/g,`
41
- `);return e.insert(n,t.attributes)}return e.push(t)},new Re)}function Vu(r,e){let{index:t,length:n}=r;return new ii(t+e,n)}function Py(r){const e=[];return r.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
42
+ `);return e.insert(n,t.attributes)}return e.push(t)},new ke)}function Vu(r,e){let{index:t,length:n}=r;return new Jr(t+e,n)}function Ly(r){const e=[];return r.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
42
43
  `).forEach((i,s)=>{s&&e.push({insert:`
43
- `,attributes:t.attributes}),i&&e.push({insert:i,attributes:t.attributes})}):e.push(t)}),e}class Vn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}}Ae(Vn,"DEFAULTS",{});const Js="\uFEFF";class ma extends dn{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(n=>{this.contentNode.appendChild(n)}),this.leftGuard=document.createTextNode(Js),this.rightGuard=document.createTextNode(Js),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,n;const i=e.data.split(Js).join("");if(e===this.leftGuard)if(this.prev instanceof zn){const s=this.prev.length();this.prev.insertAt(s,i),t={startNode:this.prev.domNode,startOffset:s+i.length}}else n=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(n),this),t={startNode:n,startOffset:i.length};else e===this.rightGuard&&(this.next instanceof zn?(this.next.insertAt(0,i),t={startNode:this.next.domNode,startOffset:i.length}):(n=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(n),this.next),t={startNode:n,startOffset:i.length}));return e.data=Js,t}update(e,t){e.forEach(n=>{if(n.type==="characterData"&&(n.target===this.leftGuard||n.target===this.rightGuard)){const i=this.restore(n.target);i&&(t.range=i)}})}}class qy{constructor(e,t){Ae(this,"isComposing",!1);this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;t&&!(t instanceof ma)&&(this.emitter.emit(Ce.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(Ce.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(Ce.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(Ce.events.COMPOSITION_END,e),this.isComposing=!1}}const Ns=class Ns{constructor(e,t){Ae(this,"modules",{});this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}};Ae(Ns,"DEFAULTS",{modules:{}}),Ae(Ns,"themes",{default:Ns});let Ri=Ns;const Iy=r=>r.parentElement||r.getRootNode().host||null,jy=r=>{const e=r.getBoundingClientRect(),t="offsetWidth"in r&&Math.abs(e.width)/r.offsetWidth||1,n="offsetHeight"in r&&Math.abs(e.height)/r.offsetHeight||1;return{top:e.top,right:e.left+r.clientWidth*t,bottom:e.top+r.clientHeight*n,left:e.left}},Zs=r=>{const e=parseInt(r,10);return Number.isNaN(e)?0:e},Wu=(r,e,t,n,i,s)=>r<t&&e>n?0:r<t?-(t-r+i):e>n?e-r>n-t?r+i-t:e-n+s:0,Dy=(r,e)=>{var s,a,u;const t=r.ownerDocument;let n=e,i=r;for(;i;){const f=i===t.body,d=f?{top:0,right:((s=window.visualViewport)==null?void 0:s.width)??t.documentElement.clientWidth,bottom:((a=window.visualViewport)==null?void 0:a.height)??t.documentElement.clientHeight,left:0}:jy(i),m=getComputedStyle(i),v=Wu(n.left,n.right,d.left,d.right,Zs(m.scrollPaddingLeft),Zs(m.scrollPaddingRight)),y=Wu(n.top,n.bottom,d.top,d.bottom,Zs(m.scrollPaddingTop),Zs(m.scrollPaddingBottom));if(v||y)if(f)(u=t.defaultView)==null||u.scrollBy(v,y);else{const{scrollLeft:x,scrollTop:A}=i;y&&(i.scrollTop+=y),v&&(i.scrollLeft+=v);const O=i.scrollLeft-x,N=i.scrollTop-A;n={left:n.left-O,top:n.top-N,right:n.right-O,bottom:n.bottom-N}}i=f||m.position==="fixed"?null:Iy(i)}},$y=100,My=["block","break","cursor","inline","scroll","text"],By=(r,e,t)=>{const n=new Ai;return My.forEach(i=>{const s=e.query(i);s&&n.register(s)}),r.forEach(i=>{let s=e.query(i);s||t.error(`Cannot register "${i}" specified in "formats" config. Are you sure it was registered?`);let a=0;for(;s;)if(n.register(s),s="blotName"in s?s.requiredContainer??null:null,a+=1,a>$y){t.error(`Cycle detected in registering blot requiredContainer: "${i}"`);break}}),n},ki=Sr("quill"),Xs=new Ai;Kn.uiClass="ql-ui";const Jn=class Jn{static debug(e){e===!0&&(e="log"),Sr.level(e)}static find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ua.get(e)||Xs.find(e,t)}static import(e){return this.imports[e]==null&&ki.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const e=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),n="attrName"in e?e.attrName:e.blotName;typeof n=="string"?this.register(`formats/${n}`,e,t):Object.keys(e).forEach(i=>{this.register(i,e[i],t)})}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!n&&ki.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&Xs.register(t),typeof t.register=="function"&&t.register(Xs)}}constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=Uy(e,t),this.container=this.options.container,this.container==null){ki.error("Invalid Quill container",e);return}this.options.debug&&Jn.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",ua.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Ce;const i=sa.blotName,s=this.options.registry.query(i);if(!s||!("blotName"in s))throw new Error(`Cannot initialize Quill without "${i}" blot`);if(this.scroll=new s(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Ry(this.scroll),this.selection=new Cy(this.scroll,this.emitter),this.composition=new qy(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(Ce.events.EDITOR_CHANGE,a=>{a===Ce.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(Ce.events.SCROLL_UPDATE,(a,u)=>{const f=this.selection.lastRange,[d]=this.selection.getRange(),m=f&&d?{oldRange:f,newRange:d}:void 0;Wn.call(this,()=>this.editor.update(null,u,m),a)}),this.emitter.on(Ce.events.SCROLL_EMBED_UPDATE,(a,u)=>{const f=this.selection.lastRange,[d]=this.selection.getRange(),m=f&&d?{oldRange:f,newRange:d}:void 0;Wn.call(this,()=>{const v=new Re().retain(a.offset(this)).retain({[a.statics.blotName]:u});return this.editor.update(v,[],m)},Jn.sources.USER)}),n){const a=this.clipboard.convert({html:`${n}<p><br></p>`,text:`
44
- `});this.setContents(a)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const n=e;e=document.createElement("div"),e.classList.add(n)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,n){return[e,t,,n]=Ar(e,t,n),Wn.call(this,()=>this.editor.deleteText(e,t),n,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ce.sources.API;return Wn.call(this,()=>{const i=this.getSelection(!0);let s=new Re;if(i==null)return s;if(this.scroll.query(e,Pe.BLOCK))s=this.editor.formatLine(i.index,i.length,{[e]:t});else{if(i.length===0)return this.selection.format(e,t),s;s=this.editor.formatText(i.index,i.length,{[e]:t})}return this.setSelection(i,Ce.sources.SILENT),s},n)}formatLine(e,t,n,i,s){let a;return[e,t,a,s]=Ar(e,t,n,i,s),Wn.call(this,()=>this.editor.formatLine(e,t,a),s,e,0)}formatText(e,t,n,i,s){let a;return[e,t,a,s]=Ar(e,t,n,i,s),Wn.call(this,()=>this.editor.formatText(e,t,a),s,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=null;if(typeof e=="number"?n=this.selection.getBounds(e,t):n=this.selection.getBounds(e.index,e.length),!n)return null;const i=this.container.getBoundingClientRect();return{bottom:n.bottom-i.top,height:n.height,left:n.left-i.left,right:n.right-i.left,top:n.top-i.top,width:n.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=Ar(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=Ar(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=Ar(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Jn.sources.API;return Wn.call(this,()=>this.editor.insertEmbed(e,t,n),i,e)}insertText(e,t,n,i,s){let a;return[e,,a,s]=Ar(e,0,n,i,s),Wn.call(this,()=>this.editor.insertText(e,t,a),s,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,n){return[e,t,,n]=Ar(e,t,n),Wn.call(this,()=>this.editor.removeFormat(e,t),n,e)}scrollRectIntoView(e){Dy(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ce.sources.API;return Wn.call(this,()=>{e=new Re(e);const n=this.getLength(),i=this.editor.deleteText(0,n),s=this.editor.insertContents(0,e),a=this.editor.deleteText(this.getLength()-1,1);return i.compose(s).compose(a)},t)}setSelection(e,t,n){e==null?this.selection.setRange(null,t||Jn.sources.API):([e,t,,n]=Ar(e,t,n),this.selection.setRange(new ii(Math.max(0,e),t),n),n!==Ce.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ce.sources.API;const n=new Re().insert(e);return this.setContents(n,t)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ce.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ce.sources.API;return Wn.call(this,()=>(e=new Re(e),this.editor.applyDelta(e)),t,!0)}};Ae(Jn,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Xs,theme:"default"}),Ae(Jn,"events",Ce.events),Ae(Jn,"sources",Ce.sources),Ae(Jn,"version","2.0.3"),Ae(Jn,"imports",{delta:Re,parchment:wy,"core/module":Vn,"core/theme":Ri});let se=Jn;function Gu(r){return typeof r=="string"?document.querySelector(r):r}function ya(r){return Object.entries(r??{}).reduce((e,t)=>{let[n,i]=t;return{...e,[n]:i===!0?{}:i}},{})}function Yu(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==void 0))}function Uy(r,e){const t=Gu(r);if(!t)throw new Error("Invalid Quill container");const i=!e.theme||e.theme===se.DEFAULTS.theme?Ri:se.import(`themes/${e.theme}`);if(!i)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:s,...a}=se.DEFAULTS,{modules:u,...f}=i.DEFAULTS;let d=ya(e.modules);d!=null&&d.toolbar&&d.toolbar.constructor!==Object&&(d={...d,toolbar:{container:d.toolbar}});const m=Dr({},ya(s),ya(u),d),v={...a,...Yu(f),...Yu(e)};let y=e.registry;return y?e.formats&&ki.warn('Ignoring "formats" option because "registry" is specified'):y=e.formats?By(e.formats,v.registry,ki):v.registry,{...v,registry:y,container:t,theme:i,modules:Object.entries(m).reduce((x,A)=>{let[O,N]=A;if(!N)return x;const M=se.import(`modules/${O}`);return M==null?(ki.error(`Cannot load ${O} module. Are you sure you registered it?`),x):{...x,[O]:Dr({},M.DEFAULTS||{},N)}},{}),bounds:Gu(v.bounds)}}function Wn(r,e,t,n){if(!this.isEnabled()&&e===Ce.sources.USER&&!this.allowReadOnlyEdits)return new Re;let i=t==null?null:this.getSelection();const s=this.editor.delta,a=r();if(i!=null&&(t===!0&&(t=i.index),n==null?i=Ju(i,a,e):n!==0&&(i=Ju(i,t,n,e)),this.setSelection(i,Ce.sources.SILENT)),a.length()>0){const u=[Ce.events.TEXT_CHANGE,a,s,e];this.emitter.emit(Ce.events.EDITOR_CHANGE,...u),e!==Ce.sources.SILENT&&this.emitter.emit(...u)}return a}function Ar(r,e,t,n,i){let s={};return typeof r.index=="number"&&typeof r.length=="number"?typeof e!="number"?(i=n,n=t,t=e,e=r.length,r=r.index):(e=r.length,r=r.index):typeof e!="number"&&(i=n,n=t,t=e,e=0),typeof t=="object"?(s=t,i=n):typeof t=="string"&&(n!=null?s[t]=n:i=t),i=i||Ce.sources.API,[r,e,s,i]}function Ju(r,e,t,n){const i=typeof t=="number"?t:0;if(r==null)return null;let s,a;return e&&typeof e.transformPosition=="function"?[s,a]=[r.index,r.index+r.length].map(u=>e.transformPosition(u,n!==Ce.sources.USER)):[s,a]=[r.index,r.index+r.length].map(u=>u<e||u===e&&n===Ce.sources.USER?u:i>=0?u+i:Math.max(e,u+i)),new ii(s,a-s)}class si extends Ks{}function Zu(r){return r instanceof jt||r instanceof _n}function Xu(r){return typeof r.updateContent=="function"}class Pi extends sa{constructor(e,t,n){let{emitter:i}=n;super(e,t),this.emitter=i,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",s=>this.handleDragStart(s))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(Ce.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(Ce.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(Ce.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[n,i]=this.line(e),[s]=this.line(e+t);if(super.deleteAt(e,t),s!=null&&n!==s&&i>0){if(n instanceof _n||s instanceof _n){this.optimize();return}const a=s.children.head instanceof Hn?null:s.children.head;n.moveChildren(s,a),n.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,n,i){super.formatAt(e,t,n,i),this.optimize()}insertAt(e,t,n){if(e>=this.length())if(n==null||this.scroll.query(t,Pe.BLOCK)==null){const i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),n==null&&t.endsWith(`
45
- `)?i.insertAt(0,t.slice(0,-1),n):i.insertAt(0,t,n)}else{const i=this.scroll.create(t,n);this.appendChild(i)}else super.insertAt(e,t,n);this.optimize()}insertBefore(e,t){if(e.statics.scope===Pe.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(e),super.insertBefore(n,t)}else super.insertBefore(e,t)}insertContents(e,t){const n=this.deltaToRenderBlocks(t.concat(new Re().insert(`
46
- `))),i=n.pop();if(i==null)return;this.batchStart();const s=n.shift();if(s){const f=s.type==="block"&&(s.delta.length()===0||!this.descendant(_n,e)[0]&&e<this.length()),d=s.type==="block"?s.delta:new Re().insert({[s.key]:s.value});ba(this,e,d);const m=s.type==="block"?1:0,v=e+d.length()+m;f&&this.insertAt(v-1,`
47
- `);const y=Nn(this.line(e)[0]),x=Tn.AttributeMap.diff(y,s.attributes)||{};Object.keys(x).forEach(A=>{this.formatAt(v-1,1,A,x[A])}),e=v}let[a,u]=this.children.find(e);if(n.length&&(a&&(a=a.split(u),u=0),n.forEach(f=>{if(f.type==="block"){const d=this.createBlock(f.attributes,a||void 0);ba(d,0,f.delta)}else{const d=this.create(f.key,f.value);this.insertBefore(d,a||void 0),Object.keys(f.attributes).forEach(m=>{d.format(m,f.attributes[m])})}})),i.type==="block"&&i.delta.length()){const f=a?a.offset(a.scroll)+u:this.length();ba(this,f,i.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[n,i]=t;return n instanceof Ut?[n,i]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(Zu,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const n=(i,s,a)=>{let u=[],f=a;return i.children.forEachAt(s,a,(d,m,v)=>{Zu(d)?u.push(d):d instanceof Ks&&(u=u.concat(n(d,m,f))),f-=v}),u};return n(this,e,t)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(Ce.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let t=Ce.sources.USER;typeof e=="string"&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(n=>{let{target:i}=n;const s=this.find(i,!0);return s&&!Xu(s)}),e.length>0&&this.emitter.emit(Ce.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(Ce.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,n){const[i]=this.descendant(s=>s instanceof _n,e);i&&i.statics.blotName===t&&Xu(i)&&i.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let n=new Re;return e.forEach(i=>{const s=i==null?void 0:i.insert;if(s)if(typeof s=="string"){const a=s.split(`
48
- `);a.slice(0,-1).forEach(f=>{n.insert(f,i.attributes),t.push({type:"block",delta:n,attributes:i.attributes??{}}),n=new Re});const u=a[a.length-1];u&&n.insert(u,i.attributes)}else{const a=Object.keys(s)[0];if(!a)return;this.query(a,Pe.INLINE)?n.push(i):(n.length()&&t.push({type:"block",delta:n,attributes:{}}),n=new Re,t.push({type:"blockEmbed",key:a,value:s[a],attributes:i.attributes??{}}))}}),n.length()&&t.push({type:"block",delta:n,attributes:{}}),t}createBlock(e,t){let n;const i={};Object.entries(e).forEach(u=>{let[f,d]=u;this.query(f,Pe.BLOCK&Pe.BLOT)!=null?n=f:i[f]=d});const s=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(s,t||void 0);const a=s.length();return Object.entries(i).forEach(u=>{let[f,d]=u;s.formatAt(0,a,f,d)}),s}}Ae(Pi,"blotName","scroll"),Ae(Pi,"className","ql-editor"),Ae(Pi,"tagName","DIV"),Ae(Pi,"defaultChild",jt),Ae(Pi,"allowedChildren",[jt,_n,si]);function ba(r,e,t){t.reduce((n,i)=>{const s=Tn.Op.length(i);let a=i.attributes||{};if(i.insert!=null){if(typeof i.insert=="string"){const u=i.insert;r.insertAt(n,u);const[f]=r.descendant(Ut,n),d=Nn(f);a=Tn.AttributeMap.diff(d,a)||{}}else if(typeof i.insert=="object"){const u=Object.keys(i.insert)[0];if(u==null)return n;if(r.insertAt(n,u,i.insert[u]),r.scroll.query(u,Pe.INLINE)!=null){const[d]=r.descendant(Ut,n),m=Nn(d);a=Tn.AttributeMap.diff(m,a)||{}}}}return Object.keys(a).forEach(u=>{r.formatAt(n,s,u,a[u])}),n+s},e)}const va={scope:Pe.BLOCK,whitelist:["right","center","justify"]},Fy=new sr("align","align",va),Qu=new Fn("align","ql-align",va),ec=new $r("align","text-align",va);class tc extends $r{value(e){let t=super.value(e);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(i=>`00${parseInt(i,10).toString(16)}`.slice(-2)).join("")}`):t}}const Ky=new Fn("color","ql-color",{scope:Pe.INLINE}),wa=new tc("color","color",{scope:Pe.INLINE}),Hy=new Fn("background","ql-bg",{scope:Pe.INLINE}),xa=new tc("background","background-color",{scope:Pe.INLINE});class oi extends si{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map(n=>n.length()<=1?"":n.domNode.innerText).join(`
44
+ `,attributes:t.attributes}),i&&e.push({insert:i,attributes:t.attributes})}):e.push(t)}),e}class Pn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}}Te(Pn,"DEFAULTS",{});const Js="\uFEFF";class ma extends Xt{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(n=>{this.contentNode.appendChild(n)}),this.leftGuard=document.createTextNode(Js),this.rightGuard=document.createTextNode(Js),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,n;const i=e.data.split(Js).join("");if(e===this.leftGuard)if(this.prev instanceof Rn){const s=this.prev.length();this.prev.insertAt(s,i),t={startNode:this.prev.domNode,startOffset:s+i.length}}else n=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(n),this),t={startNode:n,startOffset:i.length};else e===this.rightGuard&&(this.next instanceof Rn?(this.next.insertAt(0,i),t={startNode:this.next.domNode,startOffset:i.length}):(n=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(n),this.next),t={startNode:n,startOffset:i.length}));return e.data=Js,t}update(e,t){e.forEach(n=>{if(n.type==="characterData"&&(n.target===this.leftGuard||n.target===this.rightGuard)){const i=this.restore(n.target);i&&(t.range=i)}})}}class ky{constructor(e,t){Te(this,"isComposing",!1);this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;t&&!(t instanceof ma)&&(this.emitter.emit(Le.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(Le.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(Le.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(Le.events.COMPOSITION_END,e),this.isComposing=!1}}const Ts=class Ts{constructor(e,t){Te(this,"modules",{});this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}};Te(Ts,"DEFAULTS",{modules:{}}),Te(Ts,"themes",{default:Ts});let Ai=Ts;const Ry=r=>r.parentElement||r.getRootNode().host||null,Py=r=>{const e=r.getBoundingClientRect(),t="offsetWidth"in r&&Math.abs(e.width)/r.offsetWidth||1,n="offsetHeight"in r&&Math.abs(e.height)/r.offsetHeight||1;return{top:e.top,right:e.left+r.clientWidth*t,bottom:e.top+r.clientHeight*n,left:e.left}},Zs=r=>{const e=parseInt(r,10);return Number.isNaN(e)?0:e},Wu=(r,e,t,n,i,s)=>r<t&&e>n?0:r<t?-(t-r+i):e>n?e-r>n-t?r+i-t:e-n+s:0,qy=(r,e)=>{var s,a,u;const t=r.ownerDocument;let n=e,i=r;for(;i;){const f=i===t.body,d=f?{top:0,right:((s=window.visualViewport)==null?void 0:s.width)??t.documentElement.clientWidth,bottom:((a=window.visualViewport)==null?void 0:a.height)??t.documentElement.clientHeight,left:0}:Py(i),m=getComputedStyle(i),w=Wu(n.left,n.right,d.left,d.right,Zs(m.scrollPaddingLeft),Zs(m.scrollPaddingRight)),y=Wu(n.top,n.bottom,d.top,d.bottom,Zs(m.scrollPaddingTop),Zs(m.scrollPaddingBottom));if(w||y)if(f)(u=t.defaultView)==null||u.scrollBy(w,y);else{const{scrollLeft:x,scrollTop:A}=i;y&&(i.scrollTop+=y),w&&(i.scrollLeft+=w);const E=i.scrollLeft-x,N=i.scrollTop-A;n={left:n.left-E,top:n.top-N,right:n.right-E,bottom:n.bottom-N}}i=f||m.position==="fixed"?null:Ry(i)}},jy=100,Iy=["block","break","cursor","inline","scroll","text"],$y=(r,e,t)=>{const n=new vi;return Iy.forEach(i=>{const s=e.query(i);s&&n.register(s)}),r.forEach(i=>{let s=e.query(i);s||t.error(`Cannot register "${i}" specified in "formats" config. Are you sure it was registered?`);let a=0;for(;s;)if(n.register(s),s="blotName"in s?s.requiredContainer??null:null,a+=1,a>jy){t.error(`Cycle detected in registering blot requiredContainer: "${i}"`);break}}),n},Ti=dr("quill"),Xs=new vi;Ln.uiClass="ql-ui";const $n=class $n{static debug(e){e===!0&&(e="log"),dr.level(e)}static find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ua.get(e)||Xs.find(e,t)}static import(e){return this.imports[e]==null&&Ti.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const e=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),n="attrName"in e?e.attrName:e.blotName;typeof n=="string"?this.register(`formats/${n}`,e,t):Object.keys(e).forEach(i=>{this.register(i,e[i],t)})}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!n&&Ti.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&Xs.register(t),typeof t.register=="function"&&t.register(Xs)}}constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=My(e,t),this.container=this.options.container,this.container==null){Ti.error("Invalid Quill container",e);return}this.options.debug&&$n.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",ua.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Le;const i=sa.blotName,s=this.options.registry.query(i);if(!s||!("blotName"in s))throw new Error(`Cannot initialize Quill without "${i}" blot`);if(this.scroll=new s(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Ny(this.scroll),this.selection=new Ty(this.scroll,this.emitter),this.composition=new ky(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(Le.events.EDITOR_CHANGE,a=>{a===Le.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(Le.events.SCROLL_UPDATE,(a,u)=>{const f=this.selection.lastRange,[d]=this.selection.getRange(),m=f&&d?{oldRange:f,newRange:d}:void 0;qn.call(this,()=>this.editor.update(null,u,m),a)}),this.emitter.on(Le.events.SCROLL_EMBED_UPDATE,(a,u)=>{const f=this.selection.lastRange,[d]=this.selection.getRange(),m=f&&d?{oldRange:f,newRange:d}:void 0;qn.call(this,()=>{const w=new ke().retain(a.offset(this)).retain({[a.statics.blotName]:u});return this.editor.update(w,[],m)},$n.sources.USER)}),n){const a=this.clipboard.convert({html:`${n}<p><br></p>`,text:`
45
+ `});this.setContents(a)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const n=e;e=document.createElement("div"),e.classList.add(n)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,n){return[e,t,,n]=pr(e,t,n),qn.call(this,()=>this.editor.deleteText(e,t),n,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Le.sources.API;return qn.call(this,()=>{const i=this.getSelection(!0);let s=new ke;if(i==null)return s;if(this.scroll.query(e,Pe.BLOCK))s=this.editor.formatLine(i.index,i.length,{[e]:t});else{if(i.length===0)return this.selection.format(e,t),s;s=this.editor.formatText(i.index,i.length,{[e]:t})}return this.setSelection(i,Le.sources.SILENT),s},n)}formatLine(e,t,n,i,s){let a;return[e,t,a,s]=pr(e,t,n,i,s),qn.call(this,()=>this.editor.formatLine(e,t,a),s,e,0)}formatText(e,t,n,i,s){let a;return[e,t,a,s]=pr(e,t,n,i,s),qn.call(this,()=>this.editor.formatText(e,t,a),s,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=null;if(typeof e=="number"?n=this.selection.getBounds(e,t):n=this.selection.getBounds(e.index,e.length),!n)return null;const i=this.container.getBoundingClientRect();return{bottom:n.bottom-i.top,height:n.height,left:n.left-i.left,right:n.right-i.left,top:n.top-i.top,width:n.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=pr(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=pr(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=pr(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$n.sources.API;return qn.call(this,()=>this.editor.insertEmbed(e,t,n),i,e)}insertText(e,t,n,i,s){let a;return[e,,a,s]=pr(e,0,n,i,s),qn.call(this,()=>this.editor.insertText(e,t,a),s,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,n){return[e,t,,n]=pr(e,t,n),qn.call(this,()=>this.editor.removeFormat(e,t),n,e)}scrollRectIntoView(e){qy(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Le.sources.API;return qn.call(this,()=>{e=new ke(e);const n=this.getLength(),i=this.editor.deleteText(0,n),s=this.editor.insertContents(0,e),a=this.editor.deleteText(this.getLength()-1,1);return i.compose(s).compose(a)},t)}setSelection(e,t,n){e==null?this.selection.setRange(null,t||$n.sources.API):([e,t,,n]=pr(e,t,n),this.selection.setRange(new Jr(Math.max(0,e),t),n),n!==Le.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Le.sources.API;const n=new ke().insert(e);return this.setContents(n,t)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Le.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Le.sources.API;return qn.call(this,()=>(e=new ke(e),this.editor.applyDelta(e)),t,!0)}};Te($n,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Xs,theme:"default"}),Te($n,"events",Le.events),Te($n,"sources",Le.sources),Te($n,"version","2.0.3"),Te($n,"imports",{delta:ke,parchment:yy,"core/module":Pn,"core/theme":Ai});let se=$n;function Gu(r){return typeof r=="string"?document.querySelector(r):r}function ya(r){return Object.entries(r??{}).reduce((e,t)=>{let[n,i]=t;return{...e,[n]:i===!0?{}:i}},{})}function Yu(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==void 0))}function My(r,e){const t=Gu(r);if(!t)throw new Error("Invalid Quill container");const i=!e.theme||e.theme===se.DEFAULTS.theme?Ai:se.import(`themes/${e.theme}`);if(!i)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:s,...a}=se.DEFAULTS,{modules:u,...f}=i.DEFAULTS;let d=ya(e.modules);d!=null&&d.toolbar&&d.toolbar.constructor!==Object&&(d={...d,toolbar:{container:d.toolbar}});const m=_r({},ya(s),ya(u),d),w={...a,...Yu(f),...Yu(e)};let y=e.registry;return y?e.formats&&Ti.warn('Ignoring "formats" option because "registry" is specified'):y=e.formats?$y(e.formats,w.registry,Ti):w.registry,{...w,registry:y,container:t,theme:i,modules:Object.entries(m).reduce((x,A)=>{let[E,N]=A;if(!N)return x;const D=se.import(`modules/${E}`);return D==null?(Ti.error(`Cannot load ${E} module. Are you sure you registered it?`),x):{...x,[E]:_r({},D.DEFAULTS||{},N)}},{}),bounds:Gu(w.bounds)}}function qn(r,e,t,n){if(!this.isEnabled()&&e===Le.sources.USER&&!this.allowReadOnlyEdits)return new ke;let i=t==null?null:this.getSelection();const s=this.editor.delta,a=r();if(i!=null&&(t===!0&&(t=i.index),n==null?i=Ju(i,a,e):n!==0&&(i=Ju(i,t,n,e)),this.setSelection(i,Le.sources.SILENT)),a.length()>0){const u=[Le.events.TEXT_CHANGE,a,s,e];this.emitter.emit(Le.events.EDITOR_CHANGE,...u),e!==Le.sources.SILENT&&this.emitter.emit(...u)}return a}function pr(r,e,t,n,i){let s={};return typeof r.index=="number"&&typeof r.length=="number"?typeof e!="number"?(i=n,n=t,t=e,e=r.length,r=r.index):(e=r.length,r=r.index):typeof e!="number"&&(i=n,n=t,t=e,e=0),typeof t=="object"?(s=t,i=n):typeof t=="string"&&(n!=null?s[t]=n:i=t),i=i||Le.sources.API,[r,e,s,i]}function Ju(r,e,t,n){const i=typeof t=="number"?t:0;if(r==null)return null;let s,a;return e&&typeof e.transformPosition=="function"?[s,a]=[r.index,r.index+r.length].map(u=>e.transformPosition(u,n!==Le.sources.USER)):[s,a]=[r.index,r.index+r.length].map(u=>u<e||u===e&&n===Le.sources.USER?u:i>=0?u+i:Math.max(e,u+i)),new Jr(s,a-s)}class Zr extends Ks{}function Zu(r){return r instanceof Pt||r instanceof fn}function Xu(r){return typeof r.updateContent=="function"}class _i extends sa{constructor(e,t,n){let{emitter:i}=n;super(e,t),this.emitter=i,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",s=>this.handleDragStart(s))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(Le.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(Le.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(Le.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[n,i]=this.line(e),[s]=this.line(e+t);if(super.deleteAt(e,t),s!=null&&n!==s&&i>0){if(n instanceof fn||s instanceof fn){this.optimize();return}const a=s.children.head instanceof kn?null:s.children.head;n.moveChildren(s,a),n.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,n,i){super.formatAt(e,t,n,i),this.optimize()}insertAt(e,t,n){if(e>=this.length())if(n==null||this.scroll.query(t,Pe.BLOCK)==null){const i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),n==null&&t.endsWith(`
46
+ `)?i.insertAt(0,t.slice(0,-1),n):i.insertAt(0,t,n)}else{const i=this.scroll.create(t,n);this.appendChild(i)}else super.insertAt(e,t,n);this.optimize()}insertBefore(e,t){if(e.statics.scope===Pe.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(e),super.insertBefore(n,t)}else super.insertBefore(e,t)}insertContents(e,t){const n=this.deltaToRenderBlocks(t.concat(new ke().insert(`
47
+ `))),i=n.pop();if(i==null)return;this.batchStart();const s=n.shift();if(s){const f=s.type==="block"&&(s.delta.length()===0||!this.descendant(fn,e)[0]&&e<this.length()),d=s.type==="block"?s.delta:new ke().insert({[s.key]:s.value});ba(this,e,d);const m=s.type==="block"?1:0,w=e+d.length()+m;f&&this.insertAt(w-1,`
48
+ `);const y=hn(this.line(e)[0]),x=cn.AttributeMap.diff(y,s.attributes)||{};Object.keys(x).forEach(A=>{this.formatAt(w-1,1,A,x[A])}),e=w}let[a,u]=this.children.find(e);if(n.length&&(a&&(a=a.split(u),u=0),n.forEach(f=>{if(f.type==="block"){const d=this.createBlock(f.attributes,a||void 0);ba(d,0,f.delta)}else{const d=this.create(f.key,f.value);this.insertBefore(d,a||void 0),Object.keys(f.attributes).forEach(m=>{d.format(m,f.attributes[m])})}})),i.type==="block"&&i.delta.length()){const f=a?a.offset(a.scroll)+u:this.length();ba(this,f,i.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[n,i]=t;return n instanceof jt?[n,i]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(Zu,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const n=(i,s,a)=>{let u=[],f=a;return i.children.forEachAt(s,a,(d,m,w)=>{Zu(d)?u.push(d):d instanceof Ks&&(u=u.concat(n(d,m,f))),f-=w}),u};return n(this,e,t)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(Le.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let t=Le.sources.USER;typeof e=="string"&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(n=>{let{target:i}=n;const s=this.find(i,!0);return s&&!Xu(s)}),e.length>0&&this.emitter.emit(Le.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(Le.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,n){const[i]=this.descendant(s=>s instanceof fn,e);i&&i.statics.blotName===t&&Xu(i)&&i.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let n=new ke;return e.forEach(i=>{const s=i==null?void 0:i.insert;if(s)if(typeof s=="string"){const a=s.split(`
49
+ `);a.slice(0,-1).forEach(f=>{n.insert(f,i.attributes),t.push({type:"block",delta:n,attributes:i.attributes??{}}),n=new ke});const u=a[a.length-1];u&&n.insert(u,i.attributes)}else{const a=Object.keys(s)[0];if(!a)return;this.query(a,Pe.INLINE)?n.push(i):(n.length()&&t.push({type:"block",delta:n,attributes:{}}),n=new ke,t.push({type:"blockEmbed",key:a,value:s[a],attributes:i.attributes??{}}))}}),n.length()&&t.push({type:"block",delta:n,attributes:{}}),t}createBlock(e,t){let n;const i={};Object.entries(e).forEach(u=>{let[f,d]=u;this.query(f,Pe.BLOCK&Pe.BLOT)!=null?n=f:i[f]=d});const s=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(s,t||void 0);const a=s.length();return Object.entries(i).forEach(u=>{let[f,d]=u;s.formatAt(0,a,f,d)}),s}}Te(_i,"blotName","scroll"),Te(_i,"className","ql-editor"),Te(_i,"tagName","DIV"),Te(_i,"defaultChild",Pt),Te(_i,"allowedChildren",[Pt,fn,Zr]);function ba(r,e,t){t.reduce((n,i)=>{const s=cn.Op.length(i);let a=i.attributes||{};if(i.insert!=null){if(typeof i.insert=="string"){const u=i.insert;r.insertAt(n,u);const[f]=r.descendant(jt,n),d=hn(f);a=cn.AttributeMap.diff(d,a)||{}}else if(typeof i.insert=="object"){const u=Object.keys(i.insert)[0];if(u==null)return n;if(r.insertAt(n,u,i.insert[u]),r.scroll.query(u,Pe.INLINE)!=null){const[d]=r.descendant(jt,n),m=hn(d);a=cn.AttributeMap.diff(m,a)||{}}}}return Object.keys(a).forEach(u=>{r.formatAt(n,s,u,a[u])}),n+s},e)}const va={scope:Pe.BLOCK,whitelist:["right","center","justify"]},Dy=new Gn("align","align",va),Qu=new Cn("align","ql-align",va),ec=new Nr("align","text-align",va);class tc extends Nr{value(e){let t=super.value(e);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(i=>`00${parseInt(i,10).toString(16)}`.slice(-2)).join("")}`):t}}const By=new Cn("color","ql-color",{scope:Pe.INLINE}),wa=new tc("color","color",{scope:Pe.INLINE}),Uy=new Cn("background","ql-bg",{scope:Pe.INLINE}),xa=new tc("background","background-color",{scope:Pe.INLINE});class Xr extends Zr{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map(n=>n.length()<=1?"":n.domNode.innerText).join(`
49
50
  `).slice(e,e+t)}html(e,t){return`<pre>
50
51
  ${Ys(this.code(e,t))}
51
- </pre>`}}class Ft extends jt{static register(){se.register(oi)}}Ae(Ft,"TAB"," ");class Ea extends or{}Ea.blotName="code",Ea.tagName="CODE",Ft.blotName="code-block",Ft.className="ql-code-block",Ft.tagName="DIV",oi.blotName="code-block-container",oi.className="ql-code-block-container",oi.tagName="DIV",oi.allowedChildren=[Ft],Ft.allowedChildren=[zn,Hn,Ci],Ft.requiredContainer=oi;const Oa={scope:Pe.BLOCK,whitelist:["rtl"]},nc=new sr("direction","dir",Oa),rc=new Fn("direction","ql-direction",Oa),ic=new $r("direction","direction",Oa),sc={scope:Pe.INLINE,whitelist:["serif","monospace"]},oc=new Fn("font","ql-font",sc);class zy extends $r{value(e){return super.value(e).replace(/["']/g,"")}}const ac=new zy("font","font-family",sc),lc=new Fn("size","ql-size",{scope:Pe.INLINE,whitelist:["small","large","huge"]}),uc=new $r("size","font-size",{scope:Pe.INLINE,whitelist:["10px","18px","32px"]}),Vy=Sr("quill:keyboard"),Wy=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Qs extends Vn{static match(e,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(n=>!!t[n]!==e[n]&&t[n]!==null)?!1:t.key===e.key||t.key===e.which}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach(n=>{this.options.bindings[n]&&this.addBinding(this.options.bindings[n])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=Yy(e);if(i==null){Vy.warn("Attempted to add invalid keyboard binding",i);return}typeof t=="function"&&(t={handler:t}),typeof n=="function"&&(n={handler:n}),(Array.isArray(i.key)?i.key:[i.key]).forEach(a=>{const u={...i,key:a,...t,...n};this.bindings[u.key]=this.bindings[u.key]||[],this.bindings[u.key].push(u)})}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229&&(e.key==="Enter"||e.key==="Backspace"))return;const i=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(M=>Qs.match(e,M));if(i.length===0)return;const s=se.find(e.target,!0);if(s&&s.scroll!==this.quill.scroll)return;const a=this.quill.getSelection();if(a==null||!this.quill.hasFocus())return;const[u,f]=this.quill.getLine(a.index),[d,m]=this.quill.getLeaf(a.index),[v,y]=a.length===0?[d,m]:this.quill.getLeaf(a.index+a.length),x=d instanceof Hs?d.value().slice(0,m):"",A=v instanceof Hs?v.value().slice(y):"",O={collapsed:a.length===0,empty:a.length===0&&u.length()<=1,format:this.quill.getFormat(a),line:u,offset:f,prefix:x,suffix:A,event:e};i.some(M=>{if(M.collapsed!=null&&M.collapsed!==O.collapsed||M.empty!=null&&M.empty!==O.empty||M.offset!=null&&M.offset!==O.offset)return!1;if(Array.isArray(M.format)){if(M.format.every(W=>O.format[W]==null))return!1}else if(typeof M.format=="object"&&!Object.keys(M.format).every(W=>M.format[W]===!0?O.format[W]!=null:M.format[W]===!1?O.format[W]==null:ta(M.format[W],O.format[W])))return!1;return M.prefix!=null&&!M.prefix.test(O.prefix)||M.suffix!=null&&!M.suffix.test(O.suffix)?!1:M.handler.call(this,a,O,M)!==!0})&&e.preventDefault()})}handleBackspace(e,t){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let i={};const[s]=this.quill.getLine(e.index);let a=new Re().retain(e.index-n).delete(n);if(t.offset===0){const[u]=this.quill.getLine(e.index-1);if(u&&!(u.statics.blotName==="block"&&u.length()<=1)){const d=s.formats(),m=this.quill.getFormat(e.index-1,1);if(i=Tn.AttributeMap.diff(d,m)||{},Object.keys(i).length>0){const v=new Re().retain(e.index+s.length()-2).retain(1,i);a=a.compose(v)}}}this.quill.updateContents(a,se.sources.USER),this.quill.focus()}handleDelete(e,t){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-n)return;let i={};const[s]=this.quill.getLine(e.index);let a=new Re().retain(e.index).delete(n);if(t.offset>=s.length()-1){const[u]=this.quill.getLine(e.index+1);if(u){const f=s.formats(),d=this.quill.getFormat(e.index,1);i=Tn.AttributeMap.diff(f,d)||{},Object.keys(i).length>0&&(a=a.retain(u.length()-1).retain(1,i))}}this.quill.updateContents(a,se.sources.USER),this.quill.focus()}handleDeleteRange(e){Aa({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const n=Object.keys(t.format).reduce((s,a)=>(this.quill.scroll.query(a,Pe.BLOCK)&&!Array.isArray(t.format[a])&&(s[a]=t.format[a]),s),{}),i=new Re().retain(e.index).delete(e.length).insert(`
52
- `,n);this.quill.updateContents(i,se.sources.USER),this.quill.setSelection(e.index+1,se.sources.SILENT),this.quill.focus()}}const Gy={bindings:{bold:Sa("bold"),italic:Sa("italic"),underline:Sa("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(r,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","+1",se.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(r,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","-1",se.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(r,e){e.format.indent!=null?this.quill.format("indent","-1",se.sources.USER):e.format.list!=null&&this.quill.format("list",!1,se.sources.USER)}},"indent code-block":cc(!0),"outdent code-block":cc(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(r){this.quill.deleteText(r.index-1,1,se.sources.USER)}},tab:{key:"Tab",handler(r,e){if(e.format.table)return!0;this.quill.history.cutoff();const t=new Re().retain(r.index).delete(r.length).insert(" ");return this.quill.updateContents(t,se.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index+1,se.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,se.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(r,e){const t={list:!1};e.format.indent&&(t.indent=!1),this.quill.formatLine(r.index,r.length,t,se.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(r){const[e,t]=this.quill.getLine(r.index),n={...e.formats(),list:"checked"},i=new Re().retain(r.index).insert(`
53
- `,n).retain(e.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,se.sources.USER),this.quill.setSelection(r.index+1,se.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(r,e){const[t,n]=this.quill.getLine(r.index),i=new Re().retain(r.index).insert(`
54
- `,e.format).retain(t.length()-n-1).retain(1,{header:null});this.quill.updateContents(i,se.sources.USER),this.quill.setSelection(r.index+1,se.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(r){const e=this.quill.getModule("table");if(e){const[t,n,i,s]=e.getTable(r),a=Jy(t,n,i,s);if(a==null)return;let u=t.offset();if(a<0){const f=new Re().retain(u).insert(`
55
- `);this.quill.updateContents(f,se.sources.USER),this.quill.setSelection(r.index+1,r.length,se.sources.SILENT)}else if(a>0){u+=t.length();const f=new Re().retain(u).insert(`
56
- `);this.quill.updateContents(f,se.sources.USER),this.quill.setSelection(u,se.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(r,e){const{event:t,line:n}=e,i=n.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(i-1,se.sources.USER):this.quill.setSelection(i+n.length(),se.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(r,e){if(this.quill.scroll.query("list")==null)return!0;const{length:t}=e.prefix,[n,i]=this.quill.getLine(r.index);if(i>t)return!0;let s;switch(e.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(r.index," ",se.sources.USER),this.quill.history.cutoff();const a=new Re().retain(r.index-i).delete(t+1).retain(n.length()-2-i).retain(1,{list:s});return this.quill.updateContents(a,se.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index-t,se.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(r){const[e,t]=this.quill.getLine(r.index);let n=2,i=e;for(;i!=null&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,n-=1,n<=0){const s=new Re().retain(r.index+e.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(s,se.sources.USER),this.quill.setSelection(r.index-1,se.sources.SILENT),!1}return!0}},"embed left":eo("ArrowLeft",!1),"embed left shift":eo("ArrowLeft",!0),"embed right":eo("ArrowRight",!1),"embed right shift":eo("ArrowRight",!0),"table down":fc(!1),"table up":fc(!0)}};Qs.DEFAULTS=Gy;function cc(r){return{key:"Tab",shiftKey:!r,format:{"code-block":!0},handler(e,t){let{event:n}=t;const i=this.quill.scroll.query("code-block"),{TAB:s}=i;if(e.length===0&&!n.shiftKey){this.quill.insertText(e.index,s,se.sources.USER),this.quill.setSelection(e.index+s.length,se.sources.SILENT);return}const a=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:u,length:f}=e;a.forEach((d,m)=>{r?(d.insertAt(0,s),m===0?u+=s.length:f+=s.length):d.domNode.textContent.startsWith(s)&&(d.deleteAt(0,s.length),m===0?u-=s.length:f-=s.length)}),this.quill.update(se.sources.USER),this.quill.setSelection(u,f,se.sources.SILENT)}}}function eo(r,e){return{key:r,shiftKey:e,altKey:null,[r==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(n){let{index:i}=n;r==="ArrowRight"&&(i+=n.length+1);const[s]=this.quill.getLeaf(i);return s instanceof dn?(r==="ArrowLeft"?e?this.quill.setSelection(n.index-1,n.length+1,se.sources.USER):this.quill.setSelection(n.index-1,se.sources.USER):e?this.quill.setSelection(n.index,n.length+1,se.sources.USER):this.quill.setSelection(n.index+n.length+1,se.sources.USER),!1):!0}}}function Sa(r){return{key:r[0],shortKey:!0,handler(e,t){this.quill.format(r,!t.format[r],se.sources.USER)}}}function fc(r){return{key:r?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,t){const n=r?"prev":"next",i=t.line,s=i.parent[n];if(s!=null){if(s.statics.blotName==="table-row"){let a=s.children.head,u=i;for(;u.prev!=null;)u=u.prev,a=a.next;const f=a.offset(this.quill.scroll)+Math.min(t.offset,a.length()-1);this.quill.setSelection(f,0,se.sources.USER)}}else{const a=i.table()[n];a!=null&&(r?this.quill.setSelection(a.offset(this.quill.scroll)+a.length()-1,0,se.sources.USER):this.quill.setSelection(a.offset(this.quill.scroll),0,se.sources.USER))}return!1}}}function Yy(r){if(typeof r=="string"||typeof r=="number")r={key:r};else if(typeof r=="object")r=Oi(r);else return null;return r.shortKey&&(r[Wy]=r.shortKey,delete r.shortKey),r}function Aa(r){let{quill:e,range:t}=r;const n=e.getLines(t);let i={};if(n.length>1){const s=n[0].formats(),a=n[n.length-1].formats();i=Tn.AttributeMap.diff(a,s)||{}}e.deleteText(t,se.sources.USER),Object.keys(i).length>0&&e.formatLine(t.index,1,i,se.sources.USER),e.setSelection(t.index,se.sources.SILENT)}function Jy(r,e,t,n){return e.prev==null&&e.next==null?t.prev==null&&t.next==null?n===0?-1:1:t.prev==null?-1:1:e.prev==null?-1:e.next==null?1:null}const Zy=/font-weight:\s*normal/,Xy=["P","OL","UL"],hc=r=>r&&Xy.includes(r.tagName),Qy=r=>{Array.from(r.querySelectorAll("br")).filter(e=>hc(e.previousElementSibling)&&hc(e.nextElementSibling)).forEach(e=>{var t;(t=e.parentNode)==null||t.removeChild(e)})},eb=r=>{Array.from(r.querySelectorAll('b[style*="font-weight"]')).filter(e=>{var t;return(t=e.getAttribute("style"))==null?void 0:t.match(Zy)}).forEach(e=>{var n;const t=r.createDocumentFragment();t.append(...e.childNodes),(n=e.parentNode)==null||n.replaceChild(t,e)})};function tb(r){r.querySelector('[id^="docs-internal-guid-"]')&&(eb(r),Qy(r))}const nb=/\bmso-list:[^;]*ignore/i,rb=/\bmso-list:[^;]*\bl(\d+)/i,ib=/\bmso-list:[^;]*\blevel(\d+)/i,sb=(r,e)=>{const t=r.getAttribute("style"),n=t==null?void 0:t.match(rb);if(!n)return null;const i=Number(n[1]),s=t==null?void 0:t.match(ib),a=s?Number(s[1]):1,u=new RegExp(`@list l${i}:level${a}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),f=e.match(u),d=f&&f[1]==="bullet"?"bullet":"ordered";return{id:i,indent:a,type:d,element:r}},ob=r=>{var a,u;const e=Array.from(r.querySelectorAll("[style*=mso-list]")),t=[],n=[];e.forEach(f=>{(f.getAttribute("style")||"").match(nb)?t.push(f):n.push(f)}),t.forEach(f=>{var d;return(d=f.parentNode)==null?void 0:d.removeChild(f)});const i=r.documentElement.innerHTML,s=n.map(f=>sb(f,i)).filter(f=>f);for(;s.length;){const f=[];let d=s.shift();for(;d;)f.push(d),d=s.length&&((a=s[0])==null?void 0:a.element)===d.element.nextElementSibling&&s[0].id===d.id?s.shift():null;const m=document.createElement("ul");f.forEach(x=>{const A=document.createElement("li");A.setAttribute("data-list",x.type),x.indent>1&&A.setAttribute("class",`ql-indent-${x.indent-1}`),A.innerHTML=x.element.innerHTML,m.appendChild(A)});const v=(u=f[0])==null?void 0:u.element,{parentNode:y}=v??{};v&&(y==null||y.replaceChild(m,v)),f.slice(1).forEach(x=>{let{element:A}=x;y==null||y.removeChild(A)})}};function ab(r){r.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&ob(r)}const lb=[ab,tb],ub=r=>{r.documentElement&&lb.forEach(e=>{e(r)})},cb=Sr("quill:clipboard"),fb=[[Node.TEXT_NODE,Ob],[Node.TEXT_NODE,mc],["br",mb],[Node.ELEMENT_NODE,mc],[Node.ELEMENT_NODE,gb],[Node.ELEMENT_NODE,pb],[Node.ELEMENT_NODE,xb],["li",vb],["ol, ul",wb],["pre",yb],["tr",Eb],["b",_a("bold")],["i",_a("italic")],["strike",_a("strike")],["style",bb]],hb=[Fy,nc].reduce((r,e)=>(r[e.keyName]=e,r),{}),dc=[ec,xa,wa,ic,ac,uc].reduce((r,e)=>(r[e.keyName]=e,r),{});class pc extends Vn{constructor(e,t){super(e,t),this.quill.root.addEventListener("copy",n=>this.onCaptureCopy(n,!1)),this.quill.root.addEventListener("cut",n=>this.onCaptureCopy(n,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],fb.concat(this.options.matchers??[]).forEach(n=>{let[i,s]=n;this.addMatcher(i,s)})}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:n}=e,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i[Ft.blotName])return new Re().insert(n||"",{[Ft.blotName]:i[Ft.blotName]});if(!t)return new Re().insert(n||"",i);const s=this.convertHTML(t);return cs(s,`
57
- `)&&(s.ops[s.ops.length-1].attributes==null||i.table)?s.compose(new Re().retain(s.length()-1).delete(1)):s}normalizeHTML(e){ub(e)}convertHTML(e){const t=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(t);const n=t.body,i=new WeakMap,[s,a]=this.prepareMatching(n,i);return Ta(this.quill.scroll,n,s,a,i)}dangerouslyPasteHTML(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:se.sources.API;if(typeof e=="string"){const i=this.convert({html:e,text:""});this.quill.setContents(i,t),this.quill.setSelection(0,se.sources.SILENT)}else{const i=this.convert({html:t,text:""});this.quill.updateContents(new Re().retain(e).concat(i),n),this.quill.setSelection(e+i.length(),se.sources.SILENT)}}onCaptureCopy(e){var a,u;let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();const[n]=this.quill.selection.getRange();if(n==null)return;const{html:i,text:s}=this.onCopy(n,t);(a=e.clipboardData)==null||a.setData("text/plain",s),(u=e.clipboardData)==null||u.setData("text/html",i),t&&Aa({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
58
- `)}onCapturePaste(e){var a,u,f,d,m;if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(t==null)return;const n=(a=e.clipboardData)==null?void 0:a.getData("text/html");let i=(u=e.clipboardData)==null?void 0:u.getData("text/plain");if(!n&&!i){const v=(f=e.clipboardData)==null?void 0:f.getData("text/uri-list");v&&(i=this.normalizeURIList(v))}const s=Array.from(((d=e.clipboardData)==null?void 0:d.files)||[]);if(!n&&s.length>0){this.quill.uploader.upload(t,s);return}if(n&&s.length>0){const v=new DOMParser().parseFromString(n,"text/html");if(v.body.childElementCount===1&&((m=v.body.firstElementChild)==null?void 0:m.tagName)==="IMG"){this.quill.uploader.upload(t,s);return}}this.onPaste(t,{html:n,text:i})}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:n,html:i}=t;const s=this.quill.getFormat(e.index),a=this.convert({text:n,html:i},s);cb.log("onPaste",a,{text:n,html:i});const u=new Re().retain(e.index).delete(e.length).concat(a);this.quill.updateContents(u,se.sources.USER),this.quill.setSelection(u.length()-e.length,se.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const n=[],i=[];return this.matchers.forEach(s=>{const[a,u]=s;switch(a){case Node.TEXT_NODE:i.push(u);break;case Node.ELEMENT_NODE:n.push(u);break;default:Array.from(e.querySelectorAll(a)).forEach(f=>{if(t.has(f)){const d=t.get(f);d==null||d.push(u)}else t.set(f,[u])});break}}),[n,i]}}Ae(pc,"DEFAULTS",{matchers:[]});function ai(r,e,t,n){return n.query(e)?r.reduce((i,s)=>{if(!s.insert)return i;if(s.attributes&&s.attributes[e])return i.push(s);const a=t?{[e]:t}:{};return i.insert(s.insert,{...a,...s.attributes})},new Re):r}function cs(r,e){let t="";for(let n=r.ops.length-1;n>=0&&t.length<e.length;--n){const i=r.ops[n];if(typeof i.insert!="string")break;t=i.insert+t}return t.slice(-1*e.length)===e}function Mr(r,e){if(!(r instanceof Element))return!1;const t=e.query(r);return t&&t.prototype instanceof dn?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(r.tagName.toLowerCase())}function db(r,e){return r.previousElementSibling&&r.nextElementSibling&&!Mr(r.previousElementSibling,e)&&!Mr(r.nextElementSibling,e)}const to=new WeakMap;function gc(r){return r==null?!1:(to.has(r)||(r.tagName==="PRE"?to.set(r,!0):to.set(r,gc(r.parentNode))),to.get(r))}function Ta(r,e,t,n,i){return e.nodeType===e.TEXT_NODE?n.reduce((s,a)=>a(e,s,r),new Re):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce((s,a)=>{let u=Ta(r,a,t,n,i);return a.nodeType===e.ELEMENT_NODE&&(u=t.reduce((f,d)=>d(a,f,r),u),u=(i.get(a)||[]).reduce((f,d)=>d(a,f,r),u)),s.concat(u)},new Re):new Re}function _a(r){return(e,t,n)=>ai(t,r,!0,n)}function pb(r,e,t){const n=sr.keys(r),i=Fn.keys(r),s=$r.keys(r),a={};return n.concat(i).concat(s).forEach(u=>{let f=t.query(u,Pe.ATTRIBUTE);f!=null&&(a[f.attrName]=f.value(r),a[f.attrName])||(f=hb[u],f!=null&&(f.attrName===u||f.keyName===u)&&(a[f.attrName]=f.value(r)||void 0),f=dc[u],f!=null&&(f.attrName===u||f.keyName===u)&&(f=dc[u],a[f.attrName]=f.value(r)||void 0))}),Object.entries(a).reduce((u,f)=>{let[d,m]=f;return ai(u,d,m,t)},e)}function gb(r,e,t){const n=t.query(r);if(n==null)return e;if(n.prototype instanceof dn){const i={},s=n.value(r);if(s!=null)return i[n.blotName]=s,new Re().insert(i,n.formats(r,t))}else if(n.prototype instanceof os&&!cs(e,`
52
+ </pre>`}}class It extends Pt{static register(){se.register(Xr)}}Te(It,"TAB"," ");class Ea extends Yn{}Ea.blotName="code",Ea.tagName="CODE",It.blotName="code-block",It.className="ql-code-block",It.tagName="DIV",Xr.blotName="code-block-container",Xr.className="ql-code-block-container",Xr.tagName="DIV",Xr.allowedChildren=[It],It.allowedChildren=[Rn,kn,Si],It.requiredContainer=Xr;const Sa={scope:Pe.BLOCK,whitelist:["rtl"]},nc=new Gn("direction","dir",Sa),rc=new Cn("direction","ql-direction",Sa),ic=new Nr("direction","direction",Sa),sc={scope:Pe.INLINE,whitelist:["serif","monospace"]},oc=new Cn("font","ql-font",sc);class Fy extends Nr{value(e){return super.value(e).replace(/["']/g,"")}}const ac=new Fy("font","font-family",sc),lc=new Cn("size","ql-size",{scope:Pe.INLINE,whitelist:["small","large","huge"]}),uc=new Nr("size","font-size",{scope:Pe.INLINE,whitelist:["10px","18px","32px"]}),Ky=dr("quill:keyboard"),Hy=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Qs extends Pn{static match(e,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(n=>!!t[n]!==e[n]&&t[n]!==null)?!1:t.key===e.key||t.key===e.which}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach(n=>{this.options.bindings[n]&&this.addBinding(this.options.bindings[n])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=Vy(e);if(i==null){Ky.warn("Attempted to add invalid keyboard binding",i);return}typeof t=="function"&&(t={handler:t}),typeof n=="function"&&(n={handler:n}),(Array.isArray(i.key)?i.key:[i.key]).forEach(a=>{const u={...i,key:a,...t,...n};this.bindings[u.key]=this.bindings[u.key]||[],this.bindings[u.key].push(u)})}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229&&(e.key==="Enter"||e.key==="Backspace"))return;const i=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(D=>Qs.match(e,D));if(i.length===0)return;const s=se.find(e.target,!0);if(s&&s.scroll!==this.quill.scroll)return;const a=this.quill.getSelection();if(a==null||!this.quill.hasFocus())return;const[u,f]=this.quill.getLine(a.index),[d,m]=this.quill.getLeaf(a.index),[w,y]=a.length===0?[d,m]:this.quill.getLeaf(a.index+a.length),x=d instanceof Hs?d.value().slice(0,m):"",A=w instanceof Hs?w.value().slice(y):"",E={collapsed:a.length===0,empty:a.length===0&&u.length()<=1,format:this.quill.getFormat(a),line:u,offset:f,prefix:x,suffix:A,event:e};i.some(D=>{if(D.collapsed!=null&&D.collapsed!==E.collapsed||D.empty!=null&&D.empty!==E.empty||D.offset!=null&&D.offset!==E.offset)return!1;if(Array.isArray(D.format)){if(D.format.every(Y=>E.format[Y]==null))return!1}else if(typeof D.format=="object"&&!Object.keys(D.format).every(Y=>D.format[Y]===!0?E.format[Y]!=null:D.format[Y]===!1?E.format[Y]==null:ta(D.format[Y],E.format[Y])))return!1;return D.prefix!=null&&!D.prefix.test(E.prefix)||D.suffix!=null&&!D.suffix.test(E.suffix)?!1:D.handler.call(this,a,E,D)!==!0})&&e.preventDefault()})}handleBackspace(e,t){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let i={};const[s]=this.quill.getLine(e.index);let a=new ke().retain(e.index-n).delete(n);if(t.offset===0){const[u]=this.quill.getLine(e.index-1);if(u&&!(u.statics.blotName==="block"&&u.length()<=1)){const d=s.formats(),m=this.quill.getFormat(e.index-1,1);if(i=cn.AttributeMap.diff(d,m)||{},Object.keys(i).length>0){const w=new ke().retain(e.index+s.length()-2).retain(1,i);a=a.compose(w)}}}this.quill.updateContents(a,se.sources.USER),this.quill.focus()}handleDelete(e,t){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-n)return;let i={};const[s]=this.quill.getLine(e.index);let a=new ke().retain(e.index).delete(n);if(t.offset>=s.length()-1){const[u]=this.quill.getLine(e.index+1);if(u){const f=s.formats(),d=this.quill.getFormat(e.index,1);i=cn.AttributeMap.diff(f,d)||{},Object.keys(i).length>0&&(a=a.retain(u.length()-1).retain(1,i))}}this.quill.updateContents(a,se.sources.USER),this.quill.focus()}handleDeleteRange(e){Aa({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const n=Object.keys(t.format).reduce((s,a)=>(this.quill.scroll.query(a,Pe.BLOCK)&&!Array.isArray(t.format[a])&&(s[a]=t.format[a]),s),{}),i=new ke().retain(e.index).delete(e.length).insert(`
53
+ `,n);this.quill.updateContents(i,se.sources.USER),this.quill.setSelection(e.index+1,se.sources.SILENT),this.quill.focus()}}const zy={bindings:{bold:Oa("bold"),italic:Oa("italic"),underline:Oa("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(r,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","+1",se.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(r,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","-1",se.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(r,e){e.format.indent!=null?this.quill.format("indent","-1",se.sources.USER):e.format.list!=null&&this.quill.format("list",!1,se.sources.USER)}},"indent code-block":cc(!0),"outdent code-block":cc(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(r){this.quill.deleteText(r.index-1,1,se.sources.USER)}},tab:{key:"Tab",handler(r,e){if(e.format.table)return!0;this.quill.history.cutoff();const t=new ke().retain(r.index).delete(r.length).insert(" ");return this.quill.updateContents(t,se.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index+1,se.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,se.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(r,e){const t={list:!1};e.format.indent&&(t.indent=!1),this.quill.formatLine(r.index,r.length,t,se.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(r){const[e,t]=this.quill.getLine(r.index),n={...e.formats(),list:"checked"},i=new ke().retain(r.index).insert(`
54
+ `,n).retain(e.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,se.sources.USER),this.quill.setSelection(r.index+1,se.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(r,e){const[t,n]=this.quill.getLine(r.index),i=new ke().retain(r.index).insert(`
55
+ `,e.format).retain(t.length()-n-1).retain(1,{header:null});this.quill.updateContents(i,se.sources.USER),this.quill.setSelection(r.index+1,se.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(r){const e=this.quill.getModule("table");if(e){const[t,n,i,s]=e.getTable(r),a=Wy(t,n,i,s);if(a==null)return;let u=t.offset();if(a<0){const f=new ke().retain(u).insert(`
56
+ `);this.quill.updateContents(f,se.sources.USER),this.quill.setSelection(r.index+1,r.length,se.sources.SILENT)}else if(a>0){u+=t.length();const f=new ke().retain(u).insert(`
57
+ `);this.quill.updateContents(f,se.sources.USER),this.quill.setSelection(u,se.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(r,e){const{event:t,line:n}=e,i=n.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(i-1,se.sources.USER):this.quill.setSelection(i+n.length(),se.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(r,e){if(this.quill.scroll.query("list")==null)return!0;const{length:t}=e.prefix,[n,i]=this.quill.getLine(r.index);if(i>t)return!0;let s;switch(e.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(r.index," ",se.sources.USER),this.quill.history.cutoff();const a=new ke().retain(r.index-i).delete(t+1).retain(n.length()-2-i).retain(1,{list:s});return this.quill.updateContents(a,se.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index-t,se.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(r){const[e,t]=this.quill.getLine(r.index);let n=2,i=e;for(;i!=null&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,n-=1,n<=0){const s=new ke().retain(r.index+e.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(s,se.sources.USER),this.quill.setSelection(r.index-1,se.sources.SILENT),!1}return!0}},"embed left":eo("ArrowLeft",!1),"embed left shift":eo("ArrowLeft",!0),"embed right":eo("ArrowRight",!1),"embed right shift":eo("ArrowRight",!0),"table down":fc(!1),"table up":fc(!0)}};Qs.DEFAULTS=zy;function cc(r){return{key:"Tab",shiftKey:!r,format:{"code-block":!0},handler(e,t){let{event:n}=t;const i=this.quill.scroll.query("code-block"),{TAB:s}=i;if(e.length===0&&!n.shiftKey){this.quill.insertText(e.index,s,se.sources.USER),this.quill.setSelection(e.index+s.length,se.sources.SILENT);return}const a=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:u,length:f}=e;a.forEach((d,m)=>{r?(d.insertAt(0,s),m===0?u+=s.length:f+=s.length):d.domNode.textContent.startsWith(s)&&(d.deleteAt(0,s.length),m===0?u-=s.length:f-=s.length)}),this.quill.update(se.sources.USER),this.quill.setSelection(u,f,se.sources.SILENT)}}}function eo(r,e){return{key:r,shiftKey:e,altKey:null,[r==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(n){let{index:i}=n;r==="ArrowRight"&&(i+=n.length+1);const[s]=this.quill.getLeaf(i);return s instanceof Xt?(r==="ArrowLeft"?e?this.quill.setSelection(n.index-1,n.length+1,se.sources.USER):this.quill.setSelection(n.index-1,se.sources.USER):e?this.quill.setSelection(n.index,n.length+1,se.sources.USER):this.quill.setSelection(n.index+n.length+1,se.sources.USER),!1):!0}}}function Oa(r){return{key:r[0],shortKey:!0,handler(e,t){this.quill.format(r,!t.format[r],se.sources.USER)}}}function fc(r){return{key:r?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,t){const n=r?"prev":"next",i=t.line,s=i.parent[n];if(s!=null){if(s.statics.blotName==="table-row"){let a=s.children.head,u=i;for(;u.prev!=null;)u=u.prev,a=a.next;const f=a.offset(this.quill.scroll)+Math.min(t.offset,a.length()-1);this.quill.setSelection(f,0,se.sources.USER)}}else{const a=i.table()[n];a!=null&&(r?this.quill.setSelection(a.offset(this.quill.scroll)+a.length()-1,0,se.sources.USER):this.quill.setSelection(a.offset(this.quill.scroll),0,se.sources.USER))}return!1}}}function Vy(r){if(typeof r=="string"||typeof r=="number")r={key:r};else if(typeof r=="object")r=yi(r);else return null;return r.shortKey&&(r[Hy]=r.shortKey,delete r.shortKey),r}function Aa(r){let{quill:e,range:t}=r;const n=e.getLines(t);let i={};if(n.length>1){const s=n[0].formats(),a=n[n.length-1].formats();i=cn.AttributeMap.diff(a,s)||{}}e.deleteText(t,se.sources.USER),Object.keys(i).length>0&&e.formatLine(t.index,1,i,se.sources.USER),e.setSelection(t.index,se.sources.SILENT)}function Wy(r,e,t,n){return e.prev==null&&e.next==null?t.prev==null&&t.next==null?n===0?-1:1:t.prev==null?-1:1:e.prev==null?-1:e.next==null?1:null}const Gy=/font-weight:\s*normal/,Yy=["P","OL","UL"],hc=r=>r&&Yy.includes(r.tagName),Jy=r=>{Array.from(r.querySelectorAll("br")).filter(e=>hc(e.previousElementSibling)&&hc(e.nextElementSibling)).forEach(e=>{var t;(t=e.parentNode)==null||t.removeChild(e)})},Zy=r=>{Array.from(r.querySelectorAll('b[style*="font-weight"]')).filter(e=>{var t;return(t=e.getAttribute("style"))==null?void 0:t.match(Gy)}).forEach(e=>{var n;const t=r.createDocumentFragment();t.append(...e.childNodes),(n=e.parentNode)==null||n.replaceChild(t,e)})};function Xy(r){r.querySelector('[id^="docs-internal-guid-"]')&&(Zy(r),Jy(r))}const Qy=/\bmso-list:[^;]*ignore/i,eb=/\bmso-list:[^;]*\bl(\d+)/i,tb=/\bmso-list:[^;]*\blevel(\d+)/i,nb=(r,e)=>{const t=r.getAttribute("style"),n=t==null?void 0:t.match(eb);if(!n)return null;const i=Number(n[1]),s=t==null?void 0:t.match(tb),a=s?Number(s[1]):1,u=new RegExp(`@list l${i}:level${a}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),f=e.match(u),d=f&&f[1]==="bullet"?"bullet":"ordered";return{id:i,indent:a,type:d,element:r}},rb=r=>{var a,u;const e=Array.from(r.querySelectorAll("[style*=mso-list]")),t=[],n=[];e.forEach(f=>{(f.getAttribute("style")||"").match(Qy)?t.push(f):n.push(f)}),t.forEach(f=>{var d;return(d=f.parentNode)==null?void 0:d.removeChild(f)});const i=r.documentElement.innerHTML,s=n.map(f=>nb(f,i)).filter(f=>f);for(;s.length;){const f=[];let d=s.shift();for(;d;)f.push(d),d=s.length&&((a=s[0])==null?void 0:a.element)===d.element.nextElementSibling&&s[0].id===d.id?s.shift():null;const m=document.createElement("ul");f.forEach(x=>{const A=document.createElement("li");A.setAttribute("data-list",x.type),x.indent>1&&A.setAttribute("class",`ql-indent-${x.indent-1}`),A.innerHTML=x.element.innerHTML,m.appendChild(A)});const w=(u=f[0])==null?void 0:u.element,{parentNode:y}=w??{};w&&(y==null||y.replaceChild(m,w)),f.slice(1).forEach(x=>{let{element:A}=x;y==null||y.removeChild(A)})}};function ib(r){r.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&rb(r)}const sb=[ib,Xy],ob=r=>{r.documentElement&&sb.forEach(e=>{e(r)})},ab=dr("quill:clipboard"),lb=[[Node.TEXT_NODE,wb],[Node.TEXT_NODE,mc],["br",db],[Node.ELEMENT_NODE,mc],[Node.ELEMENT_NODE,hb],[Node.ELEMENT_NODE,fb],[Node.ELEMENT_NODE,bb],["li",mb],["ol, ul",yb],["pre",pb],["tr",vb],["b",_a("bold")],["i",_a("italic")],["strike",_a("strike")],["style",gb]],ub=[Dy,nc].reduce((r,e)=>(r[e.keyName]=e,r),{}),dc=[ec,xa,wa,ic,ac,uc].reduce((r,e)=>(r[e.keyName]=e,r),{});class pc extends Pn{constructor(e,t){super(e,t),this.quill.root.addEventListener("copy",n=>this.onCaptureCopy(n,!1)),this.quill.root.addEventListener("cut",n=>this.onCaptureCopy(n,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],lb.concat(this.options.matchers??[]).forEach(n=>{let[i,s]=n;this.addMatcher(i,s)})}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:n}=e,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i[It.blotName])return new ke().insert(n||"",{[It.blotName]:i[It.blotName]});if(!t)return new ke().insert(n||"",i);const s=this.convertHTML(t);return ls(s,`
58
+ `)&&(s.ops[s.ops.length-1].attributes==null||i.table)?s.compose(new ke().retain(s.length()-1).delete(1)):s}normalizeHTML(e){ob(e)}convertHTML(e){const t=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(t);const n=t.body,i=new WeakMap,[s,a]=this.prepareMatching(n,i);return Ta(this.quill.scroll,n,s,a,i)}dangerouslyPasteHTML(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:se.sources.API;if(typeof e=="string"){const i=this.convert({html:e,text:""});this.quill.setContents(i,t),this.quill.setSelection(0,se.sources.SILENT)}else{const i=this.convert({html:t,text:""});this.quill.updateContents(new ke().retain(e).concat(i),n),this.quill.setSelection(e+i.length(),se.sources.SILENT)}}onCaptureCopy(e){var a,u;let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();const[n]=this.quill.selection.getRange();if(n==null)return;const{html:i,text:s}=this.onCopy(n,t);(a=e.clipboardData)==null||a.setData("text/plain",s),(u=e.clipboardData)==null||u.setData("text/html",i),t&&Aa({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
59
+ `)}onCapturePaste(e){var a,u,f,d,m;if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(t==null)return;const n=(a=e.clipboardData)==null?void 0:a.getData("text/html");let i=(u=e.clipboardData)==null?void 0:u.getData("text/plain");if(!n&&!i){const w=(f=e.clipboardData)==null?void 0:f.getData("text/uri-list");w&&(i=this.normalizeURIList(w))}const s=Array.from(((d=e.clipboardData)==null?void 0:d.files)||[]);if(!n&&s.length>0){this.quill.uploader.upload(t,s);return}if(n&&s.length>0){const w=new DOMParser().parseFromString(n,"text/html");if(w.body.childElementCount===1&&((m=w.body.firstElementChild)==null?void 0:m.tagName)==="IMG"){this.quill.uploader.upload(t,s);return}}this.onPaste(t,{html:n,text:i})}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:n,html:i}=t;const s=this.quill.getFormat(e.index),a=this.convert({text:n,html:i},s);ab.log("onPaste",a,{text:n,html:i});const u=new ke().retain(e.index).delete(e.length).concat(a);this.quill.updateContents(u,se.sources.USER),this.quill.setSelection(u.length()-e.length,se.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const n=[],i=[];return this.matchers.forEach(s=>{const[a,u]=s;switch(a){case Node.TEXT_NODE:i.push(u);break;case Node.ELEMENT_NODE:n.push(u);break;default:Array.from(e.querySelectorAll(a)).forEach(f=>{if(t.has(f)){const d=t.get(f);d==null||d.push(u)}else t.set(f,[u])});break}}),[n,i]}}Te(pc,"DEFAULTS",{matchers:[]});function Qr(r,e,t,n){return n.query(e)?r.reduce((i,s)=>{if(!s.insert)return i;if(s.attributes&&s.attributes[e])return i.push(s);const a=t?{[e]:t}:{};return i.insert(s.insert,{...a,...s.attributes})},new ke):r}function ls(r,e){let t="";for(let n=r.ops.length-1;n>=0&&t.length<e.length;--n){const i=r.ops[n];if(typeof i.insert!="string")break;t=i.insert+t}return t.slice(-1*e.length)===e}function Cr(r,e){if(!(r instanceof Element))return!1;const t=e.query(r);return t&&t.prototype instanceof Xt?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(r.tagName.toLowerCase())}function cb(r,e){return r.previousElementSibling&&r.nextElementSibling&&!Cr(r.previousElementSibling,e)&&!Cr(r.nextElementSibling,e)}const to=new WeakMap;function gc(r){return r==null?!1:(to.has(r)||(r.tagName==="PRE"?to.set(r,!0):to.set(r,gc(r.parentNode))),to.get(r))}function Ta(r,e,t,n,i){return e.nodeType===e.TEXT_NODE?n.reduce((s,a)=>a(e,s,r),new ke):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce((s,a)=>{let u=Ta(r,a,t,n,i);return a.nodeType===e.ELEMENT_NODE&&(u=t.reduce((f,d)=>d(a,f,r),u),u=(i.get(a)||[]).reduce((f,d)=>d(a,f,r),u)),s.concat(u)},new ke):new ke}function _a(r){return(e,t,n)=>Qr(t,r,!0,n)}function fb(r,e,t){const n=Gn.keys(r),i=Cn.keys(r),s=Nr.keys(r),a={};return n.concat(i).concat(s).forEach(u=>{let f=t.query(u,Pe.ATTRIBUTE);f!=null&&(a[f.attrName]=f.value(r),a[f.attrName])||(f=ub[u],f!=null&&(f.attrName===u||f.keyName===u)&&(a[f.attrName]=f.value(r)||void 0),f=dc[u],f!=null&&(f.attrName===u||f.keyName===u)&&(f=dc[u],a[f.attrName]=f.value(r)||void 0))}),Object.entries(a).reduce((u,f)=>{let[d,m]=f;return Qr(u,d,m,t)},e)}function hb(r,e,t){const n=t.query(r);if(n==null)return e;if(n.prototype instanceof Xt){const i={},s=n.value(r);if(s!=null)return i[n.blotName]=s,new ke().insert(i,n.formats(r,t))}else if(n.prototype instanceof is&&!ls(e,`
59
60
  `)&&e.insert(`
60
- `),"blotName"in n&&"formats"in n&&typeof n.formats=="function")return ai(e,n.blotName,n.formats(r,t),t);return e}function mb(r,e){return cs(e,`
61
+ `),"blotName"in n&&"formats"in n&&typeof n.formats=="function")return Qr(e,n.blotName,n.formats(r,t),t);return e}function db(r,e){return ls(e,`
61
62
  `)||e.insert(`
62
- `),e}function yb(r,e,t){const n=t.query("code-block"),i=n&&"formats"in n&&typeof n.formats=="function"?n.formats(r,t):!0;return ai(e,"code-block",i,t)}function bb(){return new Re}function vb(r,e,t){const n=t.query(r);if(n==null||n.blotName!=="list"||!cs(e,`
63
- `))return e;let i=-1,s=r.parentNode;for(;s!=null;)["OL","UL"].includes(s.tagName)&&(i+=1),s=s.parentNode;return i<=0?e:e.reduce((a,u)=>u.insert?u.attributes&&typeof u.attributes.indent=="number"?a.push(u):a.insert(u.insert,{indent:i,...u.attributes||{}}):a,new Re)}function wb(r,e,t){const n=r;let i=n.tagName==="OL"?"ordered":"bullet";const s=n.getAttribute("data-checked");return s&&(i=s==="true"?"checked":"unchecked"),ai(e,"list",i,t)}function mc(r,e,t){if(!cs(e,`
64
- `)){if(Mr(r,t)&&(r.childNodes.length>0||r instanceof HTMLParagraphElement))return e.insert(`
65
- `);if(e.length()>0&&r.nextSibling){let n=r.nextSibling;for(;n!=null;){if(Mr(n,t))return e.insert(`
66
- `);const i=t.query(n);if(i&&i.prototype instanceof _n)return e.insert(`
67
- `);n=n.firstChild}}}return e}function xb(r,e,t){var s;const n={},i=r.style||{};return i.fontStyle==="italic"&&(n.italic=!0),i.textDecoration==="underline"&&(n.underline=!0),i.textDecoration==="line-through"&&(n.strike=!0),((s=i.fontWeight)!=null&&s.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(n.bold=!0),e=Object.entries(n).reduce((a,u)=>{let[f,d]=u;return ai(a,f,d,t)},e),parseFloat(i.textIndent||0)>0?new Re().insert(" ").concat(e):e}function Eb(r,e,t){var i,s;const n=((i=r.parentElement)==null?void 0:i.tagName)==="TABLE"?r.parentElement:(s=r.parentElement)==null?void 0:s.parentElement;if(n!=null){const u=Array.from(n.querySelectorAll("tr")).indexOf(r)+1;return ai(e,"table",u,t)}return e}function Ob(r,e,t){var i;let n=r.data;if(((i=r.parentElement)==null?void 0:i.tagName)==="O:P")return e.insert(n.trim());if(!gc(r)){if(n.trim().length===0&&n.includes(`
68
- `)&&!db(r,t))return e;n=n.replace(/[^\S\u00a0]/g," "),n=n.replace(/ {2,}/g," "),(r.previousSibling==null&&r.parentElement!=null&&Mr(r.parentElement,t)||r.previousSibling instanceof Element&&Mr(r.previousSibling,t))&&(n=n.replace(/^ /,"")),(r.nextSibling==null&&r.parentElement!=null&&Mr(r.parentElement,t)||r.nextSibling instanceof Element&&Mr(r.nextSibling,t))&&(n=n.replace(/ $/,"")),n=n.replaceAll(" "," ")}return e.insert(n)}class yc extends Vn{constructor(t,n){super(t,n);Ae(this,"lastRecorded",0);Ae(this,"ignoreChange",!1);Ae(this,"stack",{undo:[],redo:[]});Ae(this,"currentRange",null);this.quill.on(se.events.EDITOR_CHANGE,(i,s,a,u)=>{i===se.events.SELECTION_CHANGE?s&&u!==se.sources.SILENT&&(this.currentRange=s):i===se.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||u===se.sources.USER?this.record(s,a):this.transform(s)),this.currentRange=Na(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",i=>{i.inputType==="historyUndo"?(this.undo(),i.preventDefault()):i.inputType==="historyRedo"&&(this.redo(),i.preventDefault())})}change(t,n){if(this.stack[t].length===0)return;const i=this.stack[t].pop();if(!i)return;const s=this.quill.getContents(),a=i.delta.invert(s);this.stack[n].push({delta:a,range:Na(i.range,a)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i.delta,se.sources.USER),this.ignoreChange=!1,this.restoreSelection(i)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,n){if(t.ops.length===0)return;this.stack.redo=[];let i=t.invert(n),s=this.currentRange;const a=Date.now();if(this.lastRecorded+this.options.delay>a&&this.stack.undo.length>0){const u=this.stack.undo.pop();u&&(i=i.compose(u.delta),s=u.range)}else this.lastRecorded=a;i.length()!==0&&(this.stack.undo.push({delta:i,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){bc(this.stack.undo,t),bc(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,se.sources.USER);else{const n=Ab(this.quill.scroll,t.delta);this.quill.setSelection(n,se.sources.USER)}}}Ae(yc,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function bc(r,e){let t=e;for(let n=r.length-1;n>=0;n-=1){const i=r[n];r[n]={delta:t.transform(i.delta,!0),range:i.range&&Na(i.range,t)},t=i.delta.transform(t),r[n].delta.length()===0&&r.splice(n,1)}}function Sb(r,e){const t=e.ops[e.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
69
- `):t.attributes!=null?Object.keys(t.attributes).some(n=>r.query(n,Pe.BLOCK)!=null):!1}function Ab(r,e){const t=e.reduce((i,s)=>i+(s.delete||0),0);let n=e.length()-t;return Sb(r,e)&&(n-=1),n}function Na(r,e){if(!r)return r;const t=e.transformPosition(r.index),n=e.transformPosition(r.index+r.length);return{index:t,length:n-t}}class vc extends Vn{constructor(e,t){super(e,t),e.root.addEventListener("drop",n=>{var a;n.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(n.clientX,n.clientY);else if(document.caretPositionFromPoint){const u=document.caretPositionFromPoint(n.clientX,n.clientY);i=document.createRange(),i.setStart(u.offsetNode,u.offset),i.setEnd(u.offsetNode,u.offset)}const s=i&&e.selection.normalizeNative(i);if(s){const u=e.selection.normalizedToRange(s);(a=n.dataTransfer)!=null&&a.files&&this.upload(u,n.dataTransfer.files)}})}upload(e,t){const n=[];Array.from(t).forEach(i=>{var s;i&&((s=this.options.mimetypes)!=null&&s.includes(i.type))&&n.push(i)}),n.length>0&&this.options.handler.call(this,e,n)}}vc.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(r,e){if(!this.quill.scroll.query("image"))return;const t=e.map(n=>new Promise(i=>{const s=new FileReader;s.onload=()=>{i(s.result)},s.readAsDataURL(n)}));Promise.all(t).then(n=>{const i=n.reduce((s,a)=>s.insert({image:a}),new Re().retain(r.index).delete(r.length));this.quill.updateContents(i,Ce.sources.USER),this.quill.setSelection(r.index+n.length,Ce.sources.SILENT)})}};const Tb=["insertText","insertReplacementText"];class _b extends Vn{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",n=>{this.handleBeforeInput(n)}),/Android/i.test(navigator.userAgent)||e.on(se.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){Aa({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const n=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new Re().retain(e.index).insert(t,n),se.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,se.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!Tb.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const n=Nb(e);if(n==null)return;const i=this.quill.selection.normalizeNative(t),s=i?this.quill.selection.normalizedToRange(i):null;s&&this.replaceText(s,n)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function Nb(r){var e;return typeof r.data=="string"?r.data:(e=r.dataTransfer)!=null&&e.types.includes("text/plain")?r.dataTransfer.getData("text/plain"):null}const Cb=/Mac/i.test(navigator.platform),Lb=100,Rb=r=>!!(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="Home"||Cb&&r.key==="a"&&r.ctrlKey===!0);class kb extends Vn{constructor(t,n){super(t,n);Ae(this,"isListening",!1);Ae(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,n){let{line:i,event:s}=n;if(!(i instanceof Kn)||!i.uiNode)return!0;const a=getComputedStyle(i.domNode).direction==="rtl";return a&&s.key!=="ArrowRight"||!a&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(s.shiftKey?1:0),se.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&Rb(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+Lb,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const n=t.getRangeAt(0);if(n.collapsed!==!0||n.startOffset!==0)return;const i=this.quill.scroll.find(n.startContainer);if(!(i instanceof Kn)||!i.uiNode)return;const s=document.createRange();s.setStartAfter(i.uiNode),s.setEndAfter(i.uiNode),t.removeAllRanges(),t.addRange(s)}}se.register({"blots/block":jt,"blots/block/embed":_n,"blots/break":Hn,"blots/container":si,"blots/cursor":Ci,"blots/embed":ma,"blots/inline":or,"blots/scroll":Pi,"blots/text":zn,"modules/clipboard":pc,"modules/history":yc,"modules/keyboard":Qs,"modules/uploader":vc,"modules/input":_b,"modules/uiNode":kb});class Pb extends Fn{add(e,t){let n=0;if(t==="+1"||t==="-1"){const i=this.value(e)||0;n=t==="+1"?i+1:i-1}else typeof t=="number"&&(n=t);return n===0?(this.remove(e),!0):super.add(e,n.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const qb=new Pb("indent","ql-indent",{scope:Pe.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Ca extends jt{}Ae(Ca,"blotName","blockquote"),Ae(Ca,"tagName","blockquote");class La extends jt{static formats(e){return this.tagName.indexOf(e.tagName)+1}}Ae(La,"blotName","header"),Ae(La,"tagName",["H1","H2","H3","H4","H5","H6"]);class fs extends si{}fs.blotName="list-container",fs.tagName="OL";class hs extends jt{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){se.register(fs)}constructor(e,t){super(e,t);const n=t.ownerDocument.createElement("span"),i=s=>{if(!e.isEnabled())return;const a=this.statics.formats(t,e);a==="checked"?(this.format("list","unchecked"),s.preventDefault()):a==="unchecked"&&(this.format("list","checked"),s.preventDefault())};n.addEventListener("mousedown",i),n.addEventListener("touchstart",i),this.attachUI(n)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}hs.blotName="list",hs.tagName="LI",fs.allowedChildren=[hs],hs.requiredContainer=fs;class ds extends or{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}Ae(ds,"blotName","bold"),Ae(ds,"tagName",["STRONG","B"]);class Ra extends ds{}Ae(Ra,"blotName","italic"),Ae(Ra,"tagName",["EM","I"]);class Br extends or{static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return wc(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}Ae(Br,"blotName","link"),Ae(Br,"tagName","A"),Ae(Br,"SANITIZED_URL","about:blank"),Ae(Br,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function wc(r,e){const t=document.createElement("a");t.href=r;const n=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(n)>-1}class ka extends or{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}Ae(ka,"blotName","script"),Ae(ka,"tagName",["SUB","SUP"]);class Pa extends ds{}Ae(Pa,"blotName","strike"),Ae(Pa,"tagName",["S","STRIKE"]);class qa extends or{}Ae(qa,"blotName","underline"),Ae(qa,"tagName","U");class no extends ma{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}Ae(no,"blotName","formula"),Ae(no,"className","ql-formula"),Ae(no,"tagName","SPAN");const xc=["alt","height","width"];class Ia extends dn{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return xc.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return wc(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){xc.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}Ae(Ia,"blotName","image"),Ae(Ia,"tagName","IMG");const Ec=["height","width"];class ro extends _n{static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Ec.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static sanitize(e){return Br.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){Ec.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}Ae(ro,"blotName","video"),Ae(ro,"className","ql-video"),Ae(ro,"tagName","IFRAME");const ps=new Fn("code-token","hljs",{scope:Pe.INLINE});class Tr extends or{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(Ft.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,n){super(e,t,n),ps.add(this.domNode,n)}format(e,t){e!==Tr.blotName?super.format(e,t):t?ps.add(this.domNode,t):(ps.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),ps.value(this.domNode)||this.unwrap()}}Tr.blotName="code-token",Tr.className="ql-token";class Cn extends Ft{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),Tr.blotName,!1),super.replaceWith(e,t)}}class gs extends oi{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===Cn.blotName&&(this.forceNext=!0,this.children.forEach(n=>{n.format(e,t)}))}formatAt(e,t,n,i){n===Cn.blotName&&(this.forceNext=!0),super.formatAt(e,t,n,i)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const i=`${Array.from(this.domNode.childNodes).filter(a=>a!==this.uiNode).map(a=>a.textContent).join(`
63
+ `),e}function pb(r,e,t){const n=t.query("code-block"),i=n&&"formats"in n&&typeof n.formats=="function"?n.formats(r,t):!0;return Qr(e,"code-block",i,t)}function gb(){return new ke}function mb(r,e,t){const n=t.query(r);if(n==null||n.blotName!=="list"||!ls(e,`
64
+ `))return e;let i=-1,s=r.parentNode;for(;s!=null;)["OL","UL"].includes(s.tagName)&&(i+=1),s=s.parentNode;return i<=0?e:e.reduce((a,u)=>u.insert?u.attributes&&typeof u.attributes.indent=="number"?a.push(u):a.insert(u.insert,{indent:i,...u.attributes||{}}):a,new ke)}function yb(r,e,t){const n=r;let i=n.tagName==="OL"?"ordered":"bullet";const s=n.getAttribute("data-checked");return s&&(i=s==="true"?"checked":"unchecked"),Qr(e,"list",i,t)}function mc(r,e,t){if(!ls(e,`
65
+ `)){if(Cr(r,t)&&(r.childNodes.length>0||r instanceof HTMLParagraphElement))return e.insert(`
66
+ `);if(e.length()>0&&r.nextSibling){let n=r.nextSibling;for(;n!=null;){if(Cr(n,t))return e.insert(`
67
+ `);const i=t.query(n);if(i&&i.prototype instanceof fn)return e.insert(`
68
+ `);n=n.firstChild}}}return e}function bb(r,e,t){var s;const n={},i=r.style||{};return i.fontStyle==="italic"&&(n.italic=!0),i.textDecoration==="underline"&&(n.underline=!0),i.textDecoration==="line-through"&&(n.strike=!0),((s=i.fontWeight)!=null&&s.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(n.bold=!0),e=Object.entries(n).reduce((a,u)=>{let[f,d]=u;return Qr(a,f,d,t)},e),parseFloat(i.textIndent||0)>0?new ke().insert(" ").concat(e):e}function vb(r,e,t){var i,s;const n=((i=r.parentElement)==null?void 0:i.tagName)==="TABLE"?r.parentElement:(s=r.parentElement)==null?void 0:s.parentElement;if(n!=null){const u=Array.from(n.querySelectorAll("tr")).indexOf(r)+1;return Qr(e,"table",u,t)}return e}function wb(r,e,t){var i;let n=r.data;if(((i=r.parentElement)==null?void 0:i.tagName)==="O:P")return e.insert(n.trim());if(!gc(r)){if(n.trim().length===0&&n.includes(`
69
+ `)&&!cb(r,t))return e;n=n.replace(/[^\S\u00a0]/g," "),n=n.replace(/ {2,}/g," "),(r.previousSibling==null&&r.parentElement!=null&&Cr(r.parentElement,t)||r.previousSibling instanceof Element&&Cr(r.previousSibling,t))&&(n=n.replace(/^ /,"")),(r.nextSibling==null&&r.parentElement!=null&&Cr(r.parentElement,t)||r.nextSibling instanceof Element&&Cr(r.nextSibling,t))&&(n=n.replace(/ $/,"")),n=n.replaceAll(" "," ")}return e.insert(n)}class yc extends Pn{constructor(t,n){super(t,n);Te(this,"lastRecorded",0);Te(this,"ignoreChange",!1);Te(this,"stack",{undo:[],redo:[]});Te(this,"currentRange",null);this.quill.on(se.events.EDITOR_CHANGE,(i,s,a,u)=>{i===se.events.SELECTION_CHANGE?s&&u!==se.sources.SILENT&&(this.currentRange=s):i===se.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||u===se.sources.USER?this.record(s,a):this.transform(s)),this.currentRange=Na(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",i=>{i.inputType==="historyUndo"?(this.undo(),i.preventDefault()):i.inputType==="historyRedo"&&(this.redo(),i.preventDefault())})}change(t,n){if(this.stack[t].length===0)return;const i=this.stack[t].pop();if(!i)return;const s=this.quill.getContents(),a=i.delta.invert(s);this.stack[n].push({delta:a,range:Na(i.range,a)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i.delta,se.sources.USER),this.ignoreChange=!1,this.restoreSelection(i)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,n){if(t.ops.length===0)return;this.stack.redo=[];let i=t.invert(n),s=this.currentRange;const a=Date.now();if(this.lastRecorded+this.options.delay>a&&this.stack.undo.length>0){const u=this.stack.undo.pop();u&&(i=i.compose(u.delta),s=u.range)}else this.lastRecorded=a;i.length()!==0&&(this.stack.undo.push({delta:i,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){bc(this.stack.undo,t),bc(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,se.sources.USER);else{const n=Eb(this.quill.scroll,t.delta);this.quill.setSelection(n,se.sources.USER)}}}Te(yc,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function bc(r,e){let t=e;for(let n=r.length-1;n>=0;n-=1){const i=r[n];r[n]={delta:t.transform(i.delta,!0),range:i.range&&Na(i.range,t)},t=i.delta.transform(t),r[n].delta.length()===0&&r.splice(n,1)}}function xb(r,e){const t=e.ops[e.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
70
+ `):t.attributes!=null?Object.keys(t.attributes).some(n=>r.query(n,Pe.BLOCK)!=null):!1}function Eb(r,e){const t=e.reduce((i,s)=>i+(s.delete||0),0);let n=e.length()-t;return xb(r,e)&&(n-=1),n}function Na(r,e){if(!r)return r;const t=e.transformPosition(r.index),n=e.transformPosition(r.index+r.length);return{index:t,length:n-t}}class vc extends Pn{constructor(e,t){super(e,t),e.root.addEventListener("drop",n=>{var a;n.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(n.clientX,n.clientY);else if(document.caretPositionFromPoint){const u=document.caretPositionFromPoint(n.clientX,n.clientY);i=document.createRange(),i.setStart(u.offsetNode,u.offset),i.setEnd(u.offsetNode,u.offset)}const s=i&&e.selection.normalizeNative(i);if(s){const u=e.selection.normalizedToRange(s);(a=n.dataTransfer)!=null&&a.files&&this.upload(u,n.dataTransfer.files)}})}upload(e,t){const n=[];Array.from(t).forEach(i=>{var s;i&&((s=this.options.mimetypes)!=null&&s.includes(i.type))&&n.push(i)}),n.length>0&&this.options.handler.call(this,e,n)}}vc.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(r,e){if(!this.quill.scroll.query("image"))return;const t=e.map(n=>new Promise(i=>{const s=new FileReader;s.onload=()=>{i(s.result)},s.readAsDataURL(n)}));Promise.all(t).then(n=>{const i=n.reduce((s,a)=>s.insert({image:a}),new ke().retain(r.index).delete(r.length));this.quill.updateContents(i,Le.sources.USER),this.quill.setSelection(r.index+n.length,Le.sources.SILENT)})}};const Sb=["insertText","insertReplacementText"];class Ob extends Pn{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",n=>{this.handleBeforeInput(n)}),/Android/i.test(navigator.userAgent)||e.on(se.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){Aa({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const n=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new ke().retain(e.index).insert(t,n),se.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,se.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!Sb.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const n=Ab(e);if(n==null)return;const i=this.quill.selection.normalizeNative(t),s=i?this.quill.selection.normalizedToRange(i):null;s&&this.replaceText(s,n)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function Ab(r){var e;return typeof r.data=="string"?r.data:(e=r.dataTransfer)!=null&&e.types.includes("text/plain")?r.dataTransfer.getData("text/plain"):null}const Tb=/Mac/i.test(navigator.platform),_b=100,Nb=r=>!!(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="Home"||Tb&&r.key==="a"&&r.ctrlKey===!0);class Cb extends Pn{constructor(t,n){super(t,n);Te(this,"isListening",!1);Te(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,n){let{line:i,event:s}=n;if(!(i instanceof Ln)||!i.uiNode)return!0;const a=getComputedStyle(i.domNode).direction==="rtl";return a&&s.key!=="ArrowRight"||!a&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(s.shiftKey?1:0),se.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&Nb(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+_b,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const n=t.getRangeAt(0);if(n.collapsed!==!0||n.startOffset!==0)return;const i=this.quill.scroll.find(n.startContainer);if(!(i instanceof Ln)||!i.uiNode)return;const s=document.createRange();s.setStartAfter(i.uiNode),s.setEndAfter(i.uiNode),t.removeAllRanges(),t.addRange(s)}}se.register({"blots/block":Pt,"blots/block/embed":fn,"blots/break":kn,"blots/container":Zr,"blots/cursor":Si,"blots/embed":ma,"blots/inline":Yn,"blots/scroll":_i,"blots/text":Rn,"modules/clipboard":pc,"modules/history":yc,"modules/keyboard":Qs,"modules/uploader":vc,"modules/input":Ob,"modules/uiNode":Cb});class Lb extends Cn{add(e,t){let n=0;if(t==="+1"||t==="-1"){const i=this.value(e)||0;n=t==="+1"?i+1:i-1}else typeof t=="number"&&(n=t);return n===0?(this.remove(e),!0):super.add(e,n.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const kb=new Lb("indent","ql-indent",{scope:Pe.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Ca extends Pt{}Te(Ca,"blotName","blockquote"),Te(Ca,"tagName","blockquote");class La extends Pt{static formats(e){return this.tagName.indexOf(e.tagName)+1}}Te(La,"blotName","header"),Te(La,"tagName",["H1","H2","H3","H4","H5","H6"]);class us extends Zr{}us.blotName="list-container",us.tagName="OL";class cs extends Pt{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){se.register(us)}constructor(e,t){super(e,t);const n=t.ownerDocument.createElement("span"),i=s=>{if(!e.isEnabled())return;const a=this.statics.formats(t,e);a==="checked"?(this.format("list","unchecked"),s.preventDefault()):a==="unchecked"&&(this.format("list","checked"),s.preventDefault())};n.addEventListener("mousedown",i),n.addEventListener("touchstart",i),this.attachUI(n)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}cs.blotName="list",cs.tagName="LI",us.allowedChildren=[cs],cs.requiredContainer=us;class fs extends Yn{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}Te(fs,"blotName","bold"),Te(fs,"tagName",["STRONG","B"]);class ka extends fs{}Te(ka,"blotName","italic"),Te(ka,"tagName",["EM","I"]);class Lr extends Yn{static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return wc(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}Te(Lr,"blotName","link"),Te(Lr,"tagName","A"),Te(Lr,"SANITIZED_URL","about:blank"),Te(Lr,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function wc(r,e){const t=document.createElement("a");t.href=r;const n=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(n)>-1}class Ra extends Yn{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}Te(Ra,"blotName","script"),Te(Ra,"tagName",["SUB","SUP"]);class Pa extends fs{}Te(Pa,"blotName","strike"),Te(Pa,"tagName",["S","STRIKE"]);class qa extends Yn{}Te(qa,"blotName","underline"),Te(qa,"tagName","U");class no extends ma{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}Te(no,"blotName","formula"),Te(no,"className","ql-formula"),Te(no,"tagName","SPAN");const xc=["alt","height","width"];class ja extends Xt{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return xc.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return wc(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){xc.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}Te(ja,"blotName","image"),Te(ja,"tagName","IMG");const Ec=["height","width"];class ro extends fn{static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Ec.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static sanitize(e){return Lr.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){Ec.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}Te(ro,"blotName","video"),Te(ro,"className","ql-video"),Te(ro,"tagName","IFRAME");const hs=new Cn("code-token","hljs",{scope:Pe.INLINE});class gr extends Yn{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(It.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,n){super(e,t,n),hs.add(this.domNode,n)}format(e,t){e!==gr.blotName?super.format(e,t):t?hs.add(this.domNode,t):(hs.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),hs.value(this.domNode)||this.unwrap()}}gr.blotName="code-token",gr.className="ql-token";class dn extends It{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),gr.blotName,!1),super.replaceWith(e,t)}}class ds extends Xr{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===dn.blotName&&(this.forceNext=!0,this.children.forEach(n=>{n.format(e,t)}))}formatAt(e,t,n,i){n===dn.blotName&&(this.forceNext=!0),super.formatAt(e,t,n,i)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const i=`${Array.from(this.domNode.childNodes).filter(a=>a!==this.uiNode).map(a=>a.textContent).join(`
70
71
  `)}
71
- `,s=Cn.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==i){if(i.trim().length>0||this.cachedText==null){const a=this.children.reduce((f,d)=>f.concat(Fu(d,!1)),new Re),u=e(i,s);a.diff(u).reduce((f,d)=>{let{retain:m,attributes:v}=d;return m?(v&&Object.keys(v).forEach(y=>{[Cn.blotName,Tr.blotName].includes(y)&&this.formatAt(f,m,y,v[y])}),f+m):f},0)}this.cachedText=i,this.forceNext=!1}}html(e,t){const[n]=this.children.find(e);return`<pre data-language="${n?Cn.formats(n.domNode):"plain"}">
72
+ `,s=dn.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==i){if(i.trim().length>0||this.cachedText==null){const a=this.children.reduce((f,d)=>f.concat(Fu(d,!1)),new ke),u=e(i,s);a.diff(u).reduce((f,d)=>{let{retain:m,attributes:w}=d;return m?(w&&Object.keys(w).forEach(y=>{[dn.blotName,gr.blotName].includes(y)&&this.formatAt(f,m,y,w[y])}),f+m):f},0)}this.cachedText=i,this.forceNext=!1}}html(e,t){const[n]=this.children.find(e);return`<pre data-language="${n?dn.formats(n.domNode):"plain"}">
72
73
  ${Ys(this.code(e,t))}
73
- </pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=Cn.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}gs.allowedChildren=[Cn],Cn.requiredContainer=gs,Cn.allowedChildren=[Tr,Ci,zn,Hn];const Ib=(r,e,t)=>{if(typeof r.versionString=="string"){const n=r.versionString.split(".")[0];if(parseInt(n,10)>=11)return r.highlight(t,{language:e}).value}return r.highlight(e,t).value};class Oc extends Vn{static register(){se.register(Tr,!0),se.register(Cn,!0),se.register(gs,!0)}constructor(e,t){if(super(e,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((n,i)=>{let{key:s}=i;return n[s]=!0,n},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(se.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof gs))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(n=>{let{key:i,label:s}=n;const a=t.ownerDocument.createElement("option");a.textContent=s,a.setAttribute("value",i),t.appendChild(a)}),t.addEventListener("change",()=>{e.format(Cn.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(t),e.children.head&&(t.value=Cn.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(se.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(se.sources.USER);const n=this.quill.getSelection();(e==null?this.quill.scroll.descendants(gs):[e]).forEach(s=>{s.highlight(this.highlightBlot,t)}),this.quill.update(se.sources.SILENT),n!=null&&this.quill.setSelection(n,se.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return Ys(e).split(`
74
+ </pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=dn.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}ds.allowedChildren=[dn],dn.requiredContainer=ds,dn.allowedChildren=[gr,Si,Rn,kn];const Rb=(r,e,t)=>{if(typeof r.versionString=="string"){const n=r.versionString.split(".")[0];if(parseInt(n,10)>=11)return r.highlight(t,{language:e}).value}return r.highlight(e,t).value};class Sc extends Pn{static register(){se.register(gr,!0),se.register(dn,!0),se.register(ds,!0)}constructor(e,t){if(super(e,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((n,i)=>{let{key:s}=i;return n[s]=!0,n},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(se.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof ds))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(n=>{let{key:i,label:s}=n;const a=t.ownerDocument.createElement("option");a.textContent=s,a.setAttribute("value",i),t.appendChild(a)}),t.addEventListener("change",()=>{e.format(dn.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(t),e.children.head&&(t.value=dn.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(se.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(se.sources.USER);const n=this.quill.getSelection();(e==null?this.quill.scroll.descendants(ds):[e]).forEach(s=>{s.highlight(this.highlightBlot,t)}),this.quill.update(se.sources.SILENT),n!=null&&this.quill.setSelection(n,se.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return Ys(e).split(`
74
75
  `).reduce((i,s,a)=>(a!==0&&i.insert(`
75
- `,{[Ft.blotName]:t}),i.insert(s)),new Re);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(Ft.className),n.innerHTML=Ib(this.options.hljs,t,e),Ta(this.quill.scroll,n,[(i,s)=>{const a=ps.value(i);return a?s.compose(new Re().retain(s.length(),{[Tr.blotName]:a})):s}],[(i,s)=>i.data.split(`
76
+ `,{[It.blotName]:t}),i.insert(s)),new ke);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(It.className),n.innerHTML=Rb(this.options.hljs,t,e),Ta(this.quill.scroll,n,[(i,s)=>{const a=hs.value(i);return a?s.compose(new ke().retain(s.length(),{[gr.blotName]:a})):s}],[(i,s)=>i.data.split(`
76
77
  `).reduce((a,u,f)=>(f!==0&&a.insert(`
77
- `,{[Ft.blotName]:t}),a.insert(u)),s)],new WeakMap)}}Oc.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Cs=class Cs extends jt{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",ja()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===Cs.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};Ae(Cs,"blotName","table"),Ae(Cs,"tagName","TD");let Gn=Cs;class _r extends si{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),i=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===i.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const n=t.formats(),i=t.next.formats();if(n.table!==i.table){const s=this.splitAfter(t);s&&s.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}Ae(_r,"blotName","table-row"),Ae(_r,"tagName","TR");class ar extends si{}Ae(ar,"blotName","table-body"),Ae(ar,"tagName","TBODY");class qi extends si{balanceCells(){const e=this.descendants(_r),t=e.reduce((n,i)=>Math.max(i.children.length,n),0);e.forEach(n=>{new Array(t-n.children.length).fill(0).forEach(()=>{let i;n.children.head!=null&&(i=Gn.formats(n.children.head.domNode));const s=this.scroll.create(Gn.blotName,i);n.appendChild(s),s.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(ar);t==null||t.children.head==null||t.children.forEach(n=>{const i=n.children.at(e);i!=null&&i.remove()})}insertColumn(e){const[t]=this.descendant(ar);t==null||t.children.head==null||t.children.forEach(n=>{const i=n.children.at(e),s=Gn.formats(n.children.head.domNode),a=this.scroll.create(Gn.blotName,s);n.insertBefore(a,i)})}insertRow(e){const[t]=this.descendant(ar);if(t==null||t.children.head==null)return;const n=ja(),i=this.scroll.create(_r.blotName);t.children.head.children.forEach(()=>{const a=this.scroll.create(Gn.blotName,n);i.appendChild(a)});const s=t.children.at(e);t.insertBefore(i,s)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}Ae(qi,"blotName","table-container"),Ae(qi,"tagName","TABLE"),qi.allowedChildren=[ar],ar.requiredContainer=qi,ar.allowedChildren=[_r],_r.requiredContainer=ar,_r.allowedChildren=[Gn],Gn.requiredContainer=_r;function ja(){return`row-${Math.random().toString(36).slice(2,6)}`}let jb=class extends Vn{static register(){se.register(Gn),se.register(_r),se.register(ar),se.register(qi)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(qi).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(se.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(se.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(se.sources.USER),this.quill.setSelection(t,se.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,n]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==Gn.blotName)return[null,null,null,-1];const i=t.parent;return[i.parent.parent,i,t,n]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[n,i,s]=this.getTable(t);if(s==null)return;const a=s.cellOffset();n.insertColumn(a+e),this.quill.update(se.sources.USER);let u=i.rowOffset();e===0&&(u+=1),this.quill.setSelection(t.index+u,t.length,se.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[n,i,s]=this.getTable(t);if(s==null)return;const a=i.rowOffset();n.insertRow(a+e),this.quill.update(se.sources.USER),e>0?this.quill.setSelection(t,se.sources.SILENT):this.quill.setSelection(t.index+i.children.length,t.length,se.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const n=this.quill.getSelection();if(n==null)return;const i=new Array(e).fill(0).reduce(s=>{const a=new Array(t).fill(`
78
- `).join("");return s.insert(a,{table:ja()})},new Re().retain(n.index));this.quill.updateContents(i,se.sources.USER),this.quill.setSelection(n.index,se.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(se.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(se.events.TEXT_CHANGE,(n,i,s)=>{s===se.sources.USER&&this.balanceTables()}),!0):!1)})}};const Sc=Sr("quill:toolbar");class Da extends Vn{constructor(e,t){var n,i;if(super(e,t),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),Db(s,this.options.container),(i=(n=e.container)==null?void 0:n.parentNode)==null||i.insertBefore(s,e.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Sc.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{var u;const a=(u=this.options.handlers)==null?void 0:u[s];a&&this.addHandler(s,a)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(se.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(i=>i.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){Sc.warn("ignoring attaching to nonexistent format",t,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,i=>{let s;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const u=e.options[e.selectedIndex];u.hasAttribute("selected")?s=!1:s=u.value||!1}else e.classList.contains("ql-active")?s=!1:s=e.value||!e.hasAttribute("value"),i.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,s);else if(this.quill.scroll.query(t).prototype instanceof dn){if(s=prompt(`Enter ${t}`),!s)return;this.quill.updateContents(new Re().retain(a.index).delete(a.length).insert({[t]:s}),se.sources.USER)}else this.quill.format(t,s,se.sources.USER);this.update(a)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[i,s]=n;if(s.tagName==="SELECT"){let a=null;if(e==null)a=null;else if(t[i]==null)a=s.querySelector("option[selected]");else if(!Array.isArray(t[i])){let u=t[i];typeof u=="string"&&(u=u.replace(/"/g,'\\"')),a=s.querySelector(`option[value="${u}"]`)}a==null?(s.value="",s.selectedIndex=-1):a.selected=!0}else if(e==null)s.classList.remove("ql-active"),s.setAttribute("aria-pressed","false");else if(s.hasAttribute("value")){const a=t[i],u=a===s.getAttribute("value")||a!=null&&a.toString()===s.getAttribute("value")||a==null&&!s.getAttribute("value");s.classList.toggle("ql-active",u),s.setAttribute("aria-pressed",u.toString())}else{const a=t[i]!=null;s.classList.toggle("ql-active",a),s.setAttribute("aria-pressed",a.toString())}})}}Da.DEFAULTS={};function Ac(r,e,t){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add(`ql-${e}`),n.setAttribute("aria-pressed","false"),t!=null?(n.value=t,n.setAttribute("aria-label",`${e}: ${t}`)):n.setAttribute("aria-label",e),r.appendChild(n)}function Db(r,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(i=>{if(typeof i=="string")Ac(n,i);else{const s=Object.keys(i)[0],a=i[s];Array.isArray(a)?$b(n,s,a):Ac(n,s,a)}}),r.appendChild(n)})}function $b(r,e,t){const n=document.createElement("select");n.classList.add(`ql-${e}`),t.forEach(i=>{const s=document.createElement("option");i!==!1?s.setAttribute("value",String(i)):s.setAttribute("selected","selected"),n.appendChild(s)}),r.appendChild(n)}Da.DEFAULTS={container:null,handlers:{clean(){const r=this.quill.getSelection();if(r!=null)if(r.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,Pe.INLINE)!=null&&this.quill.format(t,!1,se.sources.USER)})}else this.quill.removeFormat(r.index,r.length,se.sources.USER)},direction(r){const{align:e}=this.quill.getFormat();r==="rtl"&&e==null?this.quill.format("align","right",se.sources.USER):!r&&e==="right"&&this.quill.format("align",!1,se.sources.USER),this.quill.format("direction",r,se.sources.USER)},indent(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e),n=parseInt(t.indent||0,10);if(r==="+1"||r==="-1"){let i=r==="+1"?1:-1;t.direction==="rtl"&&(i*=-1),this.quill.format("indent",n+i,se.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,se.sources.USER)},list(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e);r==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,se.sources.USER):this.quill.format("list","unchecked",se.sources.USER):this.quill.format("list",r,se.sources.USER)}}};const Mb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',Bb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Ub='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Fb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Kb='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',Hb='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',zb='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Vb='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Tc='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',ms={align:{"":Mb,center:Bb,right:Ub,justify:Fb},background:Kb,blockquote:Hb,bold:zb,clean:Vb,code:Tc,"code-block":Tc,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'},Wb='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let _c=0;function Nc(r,e){r.setAttribute(e,`${r.getAttribute(e)!=="true"}`)}class io{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Nc(this.label,"aria-expanded"),Nc(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&t.setAttribute("data-value",n),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(t,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=Wb,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${_c}`,_c+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const n=this.buildItem(t);e.appendChild(n),t.selected===!0&&this.selectItem(n)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.container.querySelector(".ql-selected");e!==n&&(n!=null&&n.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const n=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(n)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class Cc extends io{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(n=>{n.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const n=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";n&&(n.tagName==="line"?n.style.stroke=i:n.style.fill=i)}}class Lc extends io{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(n=>{n.innerHTML=t[n.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const n=e||this.defaultItem;if(n!=null){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}const Gb=r=>{const{overflowY:e}=getComputedStyle(r,null);return e!=="visible"&&e!=="clip"};class Rc{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,Gb(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),s=this.root.getBoundingClientRect();let a=0;if(s.right>i.right&&(a=i.right-s.right,this.root.style.left=`${t+a}px`),s.left<i.left&&(a=i.left-s.left,this.root.style.left=`${t+a}px`),s.bottom>i.bottom){const u=s.bottom-s.top,f=e.bottom-e.top+u;this.root.style.top=`${n-f}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const Yb=[!1,"center","right","justify"],Jb=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Zb=[!1,"serif","monospace"],Xb=["1","2","3",!1],Qb=["small",!1,"large","huge"];class ys extends Ri{constructor(e,t){super(e,t);const n=i=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",n);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(s=>{s.container.contains(i.target)||s.close()})};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(n=>{(n.getAttribute("class")||"").split(/\s+/).forEach(s=>{if(s.startsWith("ql-")&&(s=s.slice(3),t[s]!=null))if(s==="direction")n.innerHTML=t[s][""]+t[s].rtl;else if(typeof t[s]=="string")n.innerHTML=t[s];else{const a=n.value||"";a!=null&&t[s][a]&&(n.innerHTML=t[s][a])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&bs(i,Yb),typeof t.align=="object"))return new Lc(i,t.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const s=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&bs(i,Jb,s==="background"?"#ffffff":"#000000"),new Cc(i,t[s])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?bs(i,Zb):i.classList.contains("ql-header")?bs(i,Xb):i.classList.contains("ql-size")&&bs(i,Qb)),new io(i)});const n=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(Ce.events.EDITOR_CHANGE,n)}}ys.DEFAULTS=Dr({},Ri.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let r=this.container.querySelector("input.ql-image[type=file]");r==null&&(r=document.createElement("input"),r.setAttribute("type","file"),r.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),r.classList.add("ql-image"),r.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,r.files),r.value=""}),this.container.appendChild(r)),r.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class kc extends Rc{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);n!=null&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,Ce.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,Ce.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=ev(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,Ce.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(n+1," ",Ce.sources.USER),this.quill.setSelection(n+2,Ce.sources.USER)}break}}this.textbox.value="",this.hide()}}function ev(r){let e=r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=r.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:r}function bs(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(n=>{const i=document.createElement("option");n===t?i.setAttribute("selected","selected"):i.setAttribute("value",String(n)),r.appendChild(i)})}const tv=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Pc extends kc{constructor(e,t){super(e,t),this.quill.on(Ce.events.EDITOR_CHANGE,(n,i,s,a)=>{if(n===Ce.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&a===Ce.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const u=this.quill.getLines(i.index,i.length);if(u.length===1){const f=this.quill.getBounds(i);f!=null&&this.position(f)}else{const f=u[u.length-1],d=this.quill.getIndex(f),m=Math.min(f.length()-1,i.index+i.length-d),v=this.quill.getBounds(new ii(d,m));v!=null&&this.position(v)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Ce.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",t!==0&&(n.style.marginLeft=`${-1*t-n.offsetWidth/2}px`),t}}Ae(Pc,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class qc extends ys{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=tv),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new Pc(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),ms),this.buildPickers(e.container.querySelectorAll("select"),ms))}}qc.DEFAULTS=Dr({},ys.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,se.sources.USER)}}}}});const nv=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Ic extends kc{constructor(){super(...arguments);Ae(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const n=this.linkRange;this.restoreFocus(),this.quill.formatText(n,"link",!1,Ce.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(Ce.events.SELECTION_CHANGE,(t,n,i)=>{if(t!=null){if(t.length===0&&i===Ce.sources.USER){const[s,a]=this.quill.scroll.descendant(Br,t.index);if(s!=null){this.linkRange=new ii(t.index-a,s.length());const u=Br.formats(s.domNode);this.preview.textContent=u,this.preview.setAttribute("href",u),this.show();const f=this.quill.getBounds(this.linkRange);f!=null&&this.position(f);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}Ae(Ic,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class jc extends ys{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=nv),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),ms),this.buildPickers(e.container.querySelectorAll("select"),ms),this.tooltip=new Ic(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,n)=>{e.handlers.link.call(e,!n.format.link)}))}}jc.DEFAULTS=Dr({},ys.DEFAULTS,{modules:{toolbar:{handlers:{link(r){if(r){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,se.sources.USER)}}}}}),se.register({"attributors/attribute/direction":nc,"attributors/class/align":Qu,"attributors/class/background":Hy,"attributors/class/color":Ky,"attributors/class/direction":rc,"attributors/class/font":oc,"attributors/class/size":lc,"attributors/style/align":ec,"attributors/style/background":xa,"attributors/style/color":wa,"attributors/style/direction":ic,"attributors/style/font":ac,"attributors/style/size":uc},!0),se.register({"formats/align":Qu,"formats/direction":rc,"formats/indent":qb,"formats/background":xa,"formats/color":wa,"formats/font":oc,"formats/size":lc,"formats/blockquote":Ca,"formats/code-block":Ft,"formats/header":La,"formats/list":hs,"formats/bold":ds,"formats/code":Ea,"formats/italic":Ra,"formats/link":Br,"formats/script":ka,"formats/strike":Pa,"formats/underline":qa,"formats/formula":no,"formats/image":Ia,"formats/video":ro,"modules/syntax":Oc,"modules/table":jb,"modules/toolbar":Da,"themes/bubble":qc,"themes/snow":jc,"ui/icons":ms,"ui/picker":io,"ui/icon-picker":Lc,"ui/color-picker":Cc,"ui/tooltip":Rc},!0);function Dc(r){const{value:e,style:t,...n}=r,i=mt.useRef(null),s={theme:"snow",...n};return mt.useEffect(()=>{const a=i.current,u=a.ownerDocument.createElement("div");Object.entries(t).forEach(([m,v])=>{u.style[m]=v});const f=a.appendChild(u),d=new se(f,s);return e&&(d.root.innerHTML=e),d.on("text-change",()=>{var m;(m=n.onChange)==null||m.call(n,(d==null?void 0:d.root.innerHTML)||"")}),()=>{a.innerHTML=""}},[i]),Zt.jsx("div",{ref:i,style:{height:"100%"}})}var $c={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Mc=mt.createContext&&mt.createContext($c),rv=["attr","size","title"];function iv(r,e){if(r==null)return{};var t=sv(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function sv(r,e){if(r==null)return{};var t={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;t[n]=r[n]}return t}function so(){return so=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},so.apply(this,arguments)}function Bc(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function oo(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Bc(Object(t),!0).forEach(function(n){ov(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Bc(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ov(r,e,t){return e=av(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function av(r){var e=lv(r,"string");return typeof e=="symbol"?e:e+""}function lv(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Uc(r){return r&&r.map((e,t)=>mt.createElement(e.tag,oo({key:t},e.attr),Uc(e.child)))}function uv(r){return e=>mt.createElement(cv,so({attr:oo({},r.attr)},e),Uc(r.child))}function cv(r){var e=t=>{var{attr:n,size:i,title:s}=r,a=iv(r,rv),u=i||t.size||"1em",f;return t.className&&(f=t.className),r.className&&(f=(f?f+" ":"")+r.className),mt.createElement("svg",so({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,a,{className:f,style:oo(oo({color:r.color||t.color},t.style),r.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),s&&mt.createElement("title",null,s),r.children)};return Mc!==void 0?mt.createElement(Mc.Consumer,null,t=>e(t)):e($c)}function Fc(r){return uv({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 0 0-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"},child:[]}]})(r)}const fv=r=>Array.isArray(r)?r:r&&r.fileList,Kc={maxCount:1,multiple:!0,showUploadList:!0};function Hc(r){var u;const{value:e,...t}=r,n=fv(e),i=Array.isArray(n)?n.length:0,s=t.maxCount??Kc.maxCount??1;let a;return i<s&&((u=t.listType)!=null&&u.startsWith("picture-")?a=Zt.jsx(Fc,{}):a=Zt.jsx(wi.Button,{icon:Zt.jsx(Fc,{}),children:" 上传"})),Zt.jsx(wi.Upload,{...Kc,...t,fileList:n,onChange:f=>{var d;return(d=t.onChange)==null?void 0:d.call(t,f.fileList)},children:i<s&&a})}function $a({children:r}){const n={upload:{renderFormItem:(i,s)=>Zt.jsx(Hc,{...s.fieldProps})},editor:{renderFormItem:(i,s)=>Zt.jsx(Dc,{...s.fieldProps})}};return Zt.jsx(qr.ProConfigProvider,{valueTypeMap:n,children:r})}const hv=()=>wi.Form.useForm().pop(),zc=r=>{const e={layout:"horizontal",colon:!1,labelCol:{span:3},wrapperCol:{span:6},scrollToFirstError:!0,submitter:{render:(t,n)=>Zt.jsx(wi.Form.Item,{wrapperCol:{offset:4,span:8},children:Zt.jsx(wi.Space,{children:n})})},...r};return Zt.jsx($a,{children:Zt.jsx(qr.BetaSchemaForm,{...e})})};zc.useForm=hv;const dv={rowKey:"id",pagination:{pageSize:10},tableAlertRender:({selectedRowKeys:r})=>Zt.jsxs(wi.Space,{children:["已选 ",r.length," 项"]})};function pv(r){return Zt.jsx($a,{children:Zt.jsx(qr.ProTable,{...dv,...r})})}const Fe=r=>typeof r=="string",vs=()=>{let r,e;const t=new Promise((n,i)=>{r=n,e=i});return t.resolve=r,t.reject=e,t},Vc=r=>r==null?"":""+r,gv=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},mv=/###/g,Wc=r=>r&&r.indexOf("###")>-1?r.replace(mv,"."):r,Gc=r=>!r||Fe(r),ws=(r,e,t)=>{const n=Fe(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(Gc(r))return{};const s=Wc(n[i]);!r[s]&&t&&(r[s]=new t),Object.prototype.hasOwnProperty.call(r,s)?r=r[s]:r={},++i}return Gc(r)?{}:{obj:r,k:Wc(n[i])}},Yc=(r,e,t)=>{const{obj:n,k:i}=ws(r,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let s=e[e.length-1],a=e.slice(0,e.length-1),u=ws(r,a,Object);for(;u.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),u=ws(r,a,Object),u!=null&&u.obj&&typeof u.obj[`${u.k}.${s}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${s}`]=t},yv=(r,e,t,n)=>{const{obj:i,k:s}=ws(r,e,Object);i[s]=i[s]||[],i[s].push(t)},ao=(r,e)=>{const{obj:t,k:n}=ws(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},bv=(r,e,t)=>{const n=ao(r,t);return n!==void 0?n:ao(e,t)},Jc=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?Fe(r[n])||r[n]instanceof String||Fe(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):Jc(r[n],e[n],t):r[n]=e[n]);return r},Ii=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var vv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const wv=r=>Fe(r)?r.replace(/[&<>"'\/]/g,e=>vv[e]):r;class xv{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const Ev=[" ",",","?","!",";"],Ov=new xv(20),Sv=(r,e,t)=>{e=e||"",t=t||"";const n=Ev.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(n.length===0)return!0;const i=Ov.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!i.test(r);if(!s){const a=r.indexOf(t);a>0&&!i.test(r.substring(0,a))&&(s=!0)}return s},Ma=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let i=r;for(let s=0;s<n.length;){if(!i||typeof i!="object")return;let a,u="";for(let f=s;f<n.length;++f)if(f!==s&&(u+=t),u+=n[f],a=i[u],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&f<n.length-1)continue;s+=f-s+1;break}i=a}return i},lo=r=>r==null?void 0:r.replace("_","-"),Av={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class uo{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Av,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(Fe(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new uo(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new uo(this.logger,e)}}var lr=new uo;class co{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[u,f]=a;for(let d=0;d<f;d++)u(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[u,f]=a;for(let d=0;d<f;d++)u.apply(u,[e,...n])})}}class Zc extends co{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){var d,m;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;e.indexOf(".")>-1?u=e.split("."):(u=[e,t],n&&(Array.isArray(n)?u.push(...n):Fe(n)&&s?u.push(...n.split(s)):u.push(n)));const f=ao(this.data,u);return!f&&!t&&!n&&e.indexOf(".")>-1&&(e=u[0],t=u[1],n=u.slice(2).join(".")),f||!a||!Fe(n)?f:Ma((m=(d=this.data)==null?void 0:d[e])==null?void 0:m[t],n,s)}addResource(e,t,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let u=[e,t];n&&(u=u.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(u=e.split("."),i=t,t=u[1]),this.addNamespaces(t),Yc(this.data,u,i),s.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(Fe(n[s])||Array.isArray(n[s]))&&this.addResource(e,t,s,n[s],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[e,t];e.indexOf(".")>-1&&(u=e.split("."),i=n,n=t,t=u[1]),this.addNamespaces(t);let f=ao(this.data,u)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Jc(f,n,s):f={...f,...n},Yc(this.data,u,f),a.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var Xc={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,i){return r.forEach(s=>{var a;e=((a=this.processors[s])==null?void 0:a.process(e,t,n,i))??e}),e}};const Qc={},ef=r=>!Fe(r)&&typeof r!="boolean"&&typeof r!="number";class fo extends co{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),gv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=lr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return(n==null?void 0:n.res)!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,u=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Sv(e,n,i);if(a&&!u){const f=e.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:e,namespaces:Fe(s)?[s]:s};const d=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(d[0])>-1)&&(s=d.shift()),e=d.join(i)}return{key:e,namespaces:Fe(s)?[s]:s}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(e[e.length-1],t),f=u[u.length-1],d=t.lng||this.language,m=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode"){if(m){const S=t.nsSeparator||this.options.nsSeparator;return i?{res:`${f}${S}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:f,usedParams:this.getUsedParamsDetails(t)}:`${f}${S}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:f,usedParams:this.getUsedParamsDetails(t)}:a}const v=this.resolve(e,t);let y=v==null?void 0:v.res;const x=(v==null?void 0:v.usedKey)||a,A=(v==null?void 0:v.exactUsedKey)||a,O=["[object Number]","[object Function]","[object RegExp]"],N=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,W=t.count!==void 0&&!Fe(t.count),Z=fo.hasDefaultValue(t),de=W?this.pluralResolver.getSuffix(d,t.count,t):"",ue=t.ordinal&&W?this.pluralResolver.getSuffix(d,t.count,{ordinal:!1}):"",ce=W&&!t.ordinal&&t.count===0,ne=ce&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${de}`]||t[`defaultValue${ue}`]||t.defaultValue;let re=y;M&&!y&&Z&&(re=ne);const xe=ef(re),Se=Object.prototype.toString.apply(re);if(M&&re&&xe&&O.indexOf(Se)<0&&!(Fe(N)&&Array.isArray(re))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,re,{...t,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(v.res=S,v.usedParams=this.getUsedParamsDetails(t),v):S}if(s){const S=Array.isArray(re),G=S?[]:{},P=S?A:x;for(const V in re)if(Object.prototype.hasOwnProperty.call(re,V)){const E=`${P}${s}${V}`;Z&&!y?G[V]=this.translate(E,{...t,defaultValue:ef(ne)?ne[V]:void 0,joinArrays:!1,ns:u}):G[V]=this.translate(E,{...t,joinArrays:!1,ns:u}),G[V]===E&&(G[V]=re[V])}y=G}}else if(M&&Fe(N)&&Array.isArray(y))y=y.join(N),y&&(y=this.extendTranslation(y,e,t,n));else{let S=!1,G=!1;!this.isValidLookup(y)&&Z&&(S=!0,y=ne),this.isValidLookup(y)||(G=!0,y=a);const V=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&G?void 0:y,E=Z&&ne!==y&&this.options.updateMissing;if(G||S||E){if(this.logger.log(E?"updateKey":"missingKey",d,f,a,E?ne:y),s){const J=this.resolve(a,{...t,keySeparator:!1});J&&J.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&D&&D[0])for(let J=0;J<D.length;J++)T.push(D[J]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(t.lng||this.language):T.push(t.lng||this.language);const U=(J,z,le)=>{var pe;const ve=Z&&le!==y?le:V;this.options.missingKeyHandler?this.options.missingKeyHandler(J,f,z,ve,E,t):(pe=this.backendConnector)!=null&&pe.saveMissing&&this.backendConnector.saveMissing(J,f,z,ve,E,t),this.emit("missingKey",J,f,z,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&W?T.forEach(J=>{const z=this.pluralResolver.getSuffixes(J,t);ce&&t[`defaultValue${this.options.pluralSeparator}zero`]&&z.indexOf(`${this.options.pluralSeparator}zero`)<0&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(le=>{U([J],a+le,t[`defaultValue${le}`]||ne)})}):U(T,a,ne))}y=this.extendTranslation(y,e,t,v,n),G&&y===a&&this.options.appendNamespaceToMissingKey&&(y=`${f}:${a}`),(G||S)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}:${a}`:a,S?y:void 0))}return i?(v.res=y,v.usedParams=this.getUsedParamsDetails(t),v):y}extendTranslation(e,t,n,i,s){var d,m;var a=this;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const v=Fe(e)&&(((m=n==null?void 0:n.interpolation)==null?void 0:m.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(v){const A=e.match(this.interpolator.nestingRegexp);y=A&&A.length}let x=n.replace&&!Fe(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),e=this.interpolator.interpolate(e,x,n.lng||this.language||i.usedLng,n),v){const A=e.match(this.interpolator.nestingRegexp),O=A&&A.length;y<O&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var A=arguments.length,O=new Array(A),N=0;N<A;N++)O[N]=arguments[N];return(s==null?void 0:s[0])===O[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${O[0]} in key: ${t[0]}`),null):a.translate(...O,t)},n)),n.interpolation&&this.interpolator.reset()}const u=n.postProcess||this.options.postProcess,f=Fe(u)?[u]:u;return e!=null&&(f!=null&&f.length)&&n.applyPostProcessor!==!1&&(e=Xc.handle(f,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,a,u;return Fe(e)&&(e=[e]),e.forEach(f=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(f,t),m=d.key;i=m;let v=d.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const y=t.count!==void 0&&!Fe(t.count),x=y&&!t.ordinal&&t.count===0,A=t.context!==void 0&&(Fe(t.context)||typeof t.context=="number")&&t.context!=="",O=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);v.forEach(N=>{var M,W;this.isValidLookup(n)||(u=N,!Qc[`${O[0]}-${N}`]&&((M=this.utils)!=null&&M.hasLoadedNamespace)&&!((W=this.utils)!=null&&W.hasLoadedNamespace(u))&&(Qc[`${O[0]}-${N}`]=!0,this.logger.warn(`key "${i}" for languages "${O.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),O.forEach(Z=>{var ce;if(this.isValidLookup(n))return;a=Z;const de=[m];if((ce=this.i18nFormat)!=null&&ce.addLookupKeys)this.i18nFormat.addLookupKeys(de,m,Z,N,t);else{let ne;y&&(ne=this.pluralResolver.getSuffix(Z,t.count,t));const re=`${this.options.pluralSeparator}zero`,xe=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(y&&(de.push(m+ne),t.ordinal&&ne.indexOf(xe)===0&&de.push(m+ne.replace(xe,this.options.pluralSeparator)),x&&de.push(m+re)),A){const Se=`${m}${this.options.contextSeparator}${t.context}`;de.push(Se),y&&(de.push(Se+ne),t.ordinal&&ne.indexOf(xe)===0&&de.push(Se+ne.replace(xe,this.options.pluralSeparator)),x&&de.push(Se+re))}}let ue;for(;ue=de.pop();)this.isValidLookup(n)||(s=ue,n=this.getResource(Z,N,ue,t))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:u}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){var s;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Fe(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of t)delete i[s]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class tf{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=lr.create("languageUtils")}getScriptPartFromCode(e){if(e=lo(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=lo(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Fe(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),Fe(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],s=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Fe(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):Fe(e)&&s(this.formatLanguageCode(e)),n.forEach(a=>{i.indexOf(a)<0&&s(this.formatLanguageCode(a))}),i}}const nf={zero:0,one:1,two:2,few:3,many:4,other:5},rf={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Tv{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=lr.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=lo(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(n,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),rf;if(!e.match(/-|_/))return rf;const f=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(f,t)}return this.pluralRulesCache[s]=a,a}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((i,s)=>nf[i]-nf[s]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const sf=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=bv(r,e,t);return!s&&i&&Fe(t)&&(s=Ma(r,t,n),s===void 0&&(s=Ma(e,t,n))),s},Ba=r=>r.replace(/\$/g,"$$$$");class _v{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=lr.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:u,suffixEscaped:f,formatSeparator:d,unescapeSuffix:m,unescapePrefix:v,nestingPrefix:y,nestingPrefixEscaped:x,nestingSuffix:A,nestingSuffixEscaped:O,nestingOptionsSeparator:N,maxReplaces:M,alwaysFormat:W}=e.interpolation;this.escape=t!==void 0?t:wv,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Ii(s):a||"{{",this.suffix=u?Ii(u):f||"}}",this.formatSeparator=d||",",this.unescapePrefix=m?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=y?Ii(y):x||Ii("$t("),this.nestingSuffix=A?Ii(A):O||Ii(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=M||1e3,this.alwaysFormat=W!==void 0?W:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var x;let s,a,u;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=A=>{if(A.indexOf(this.formatSeparator)<0){const W=sf(t,f,A,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,n,{...i,...t,interpolationkey:A}):W}const O=A.split(this.formatSeparator),N=O.shift().trim(),M=O.join(this.formatSeparator).trim();return this.format(sf(t,f,N,this.options.keySeparator,this.options.ignoreJSONStructure),M,n,{...i,...t,interpolationkey:N})};this.resetRegExp();const m=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,v=((x=i==null?void 0:i.interpolation)==null?void 0:x.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:A=>Ba(A)},{regex:this.regexp,safeValue:A=>this.escapeValue?Ba(this.escape(A)):Ba(A)}].forEach(A=>{for(u=0;s=A.regex.exec(e);){const O=s[1].trim();if(a=d(O),a===void 0)if(typeof m=="function"){const M=m(e,s,i);a=Fe(M)?M:""}else if(i&&Object.prototype.hasOwnProperty.call(i,O))a="";else if(v){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${e}`),a="";else!Fe(a)&&!this.useRawValueToEscape&&(a=Vc(a));const N=A.safeValue(a);if(e=e.replace(s[0],N),v?(A.regex.lastIndex+=a.length,A.regex.lastIndex-=s[0].length):A.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,a;const u=(f,d)=>{const m=this.nestingOptionsSeparator;if(f.indexOf(m)<0)return f;const v=f.split(new RegExp(`${m}[ ]*{`));let y=`{${v[1]}`;f=v[0],y=this.interpolate(y,a);const x=y.match(/'/g),A=y.match(/"/g);(((x==null?void 0:x.length)??0)%2===0&&!A||A.length%2!==0)&&(y=y.replace(/'/g,'"'));try{a=JSON.parse(y),d&&(a={...d,...a})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,O),`${f}${m}${y}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,f};for(;i=this.nestingRegexp.exec(e);){let f=[];a={...n},a=a.replace&&!Fe(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const m=i[1].split(this.formatSeparator).map(v=>v.trim());i[1]=m.shift(),f=m,d=!0}if(s=t(u.call(this,i[1].trim(),a),a),s&&i[0]===e&&!Fe(s))return s;Fe(s)||(s=Vc(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),d&&(s=f.reduce((m,v)=>this.format(m,v,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}const Nv=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[u,...f]=a.split(":"),d=f.join(":").trim().replace(/^'+|'+$/g,""),m=u.trim();t[m]||(t[m]=d),d==="false"&&(t[m]=!1),d==="true"&&(t[m]=!0),isNaN(d)||(t[m]=parseInt(d,10))}})}return{formatName:e,formatOptions:t}},ji=r=>{const e={};return(t,n,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const a=n+JSON.stringify(s);let u=e[a];return u||(u=r(lo(n),i),e[a]=u),u(t)}};class Cv{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=lr.create("formatter"),this.options=e,this.formats={number:ji((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return s=>i.format(s)}),currency:ji((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return s=>i.format(s)}),datetime:ji((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return s=>i.format(s)}),relativetime:ji((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return s=>i.format(s,n.range||"day")}),list:ji((t,n)=>{const i=new Intl.ListFormat(t,{...n});return s=>i.format(s)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ji(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=t.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(u=>u.indexOf(")")>-1)){const u=s.findIndex(f=>f.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,u)].join(this.formatSeparator)}return s.reduce((u,f)=>{var v;const{formatName:d,formatOptions:m}=Nv(f);if(this.formats[d]){let y=u;try{const x=((v=i==null?void 0:i.formatParams)==null?void 0:v[i.interpolationkey])||{},A=x.locale||x.lng||i.locale||i.lng||n;y=this.formats[d](u,A,{...m,...i,...x})}catch(x){this.logger.warn(x)}return y}else this.logger.warn(`there was no format function for ${d}`);return u},e)}}const Lv=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Rv extends co{constructor(e,t,n){var s,a;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=lr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,n,i.backend,i)}queueLoad(e,t,n,i){const s={},a={},u={},f={};return e.forEach(d=>{let m=!0;t.forEach(v=>{const y=`${d}|${v}`;!n.reload&&this.store.hasResourceBundle(d,v)?this.state[y]=2:this.state[y]<0||(this.state[y]===1?a[y]===void 0&&(a[y]=!0):(this.state[y]=1,m=!1,a[y]===void 0&&(a[y]=!0),s[y]===void 0&&(s[y]=!0),f[v]===void 0&&(f[v]=!0)))}),m||(u[d]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(f)}}loaded(e,t,n){const i=e.split("|"),s=i[0],a=i[1];t&&this.emit("failedLoading",s,a,t),!t&&n&&this.store.addResourceBundle(s,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const u={};this.queue.forEach(f=>{yv(f.loaded,[s],a),Lv(f,e),t&&f.errors.push(t),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(d=>{u[d]||(u[d]={});const m=f.loaded[d];m.length&&m.forEach(v=>{u[d][v]===void 0&&(u[d][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(f=>!f.done)}read(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:s,callback:a});return}this.readingCalls++;const u=(d,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(d&&m&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,i+1,s*2,a)},s);return}a(d,m)},f=this.backend[n].bind(this.backend);if(f.length===2){try{const d=f(e,t);d&&typeof d.then=="function"?d.then(m=>u(null,m)).catch(u):u(null,d)}catch(d){u(d)}return}return f(e,t,u)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Fe(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Fe(t)&&(t=[t]);const s=this.queueLoad(e,t,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(a,u)=>{a&&this.logger.warn(`${t}loading namespace ${s} for language ${i} failed`,a),!a&&u&&this.logger.log(`${t}loaded namespace ${s} for language ${i}`,u),this.loaded(e,a,u)})}saveMissing(e,t,n,i,s){var f,d,m,v,y;let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((d=(f=this.services)==null?void 0:f.utils)!=null&&d.hasLoadedNamespace&&!((v=(m=this.services)==null?void 0:m.utils)!=null&&v.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((y=this.backend)!=null&&y.create){const x={...a,isUpdate:s},A=this.backend.create.bind(this.backend);if(A.length<6)try{let O;A.length===5?O=A(e,t,n,i,x):O=A(e,t,n,i),O&&typeof O.then=="function"?O.then(N=>u(null,N)).catch(u):u(null,O)}catch(O){u(O)}else A(e,t,n,i,u,x)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const of=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),Fe(r[1])&&(e.defaultValue=r[1]),Fe(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),af=r=>{var e,t;return Fe(r.ns)&&(r.ns=[r.ns]),Fe(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),Fe(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},ho=()=>{},kv=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class xs extends co{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=af(e),this.services={},this.logger=lr,this.modules={external:[]},kv(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Fe(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=of();this.options={...i,...this.options,...af(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?lr.init(s(this.modules.logger),this.options):lr.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=Cv;const v=new tf(this.options);this.store=new Zc(this.options.resources,this.options);const y=this.services;y.logger=lr,y.resourceStore=this.store,y.languageUtils=v,y.pluralResolver=new Tv(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(y.formatter=s(m),y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new _v(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new Rv(s(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",function(x){for(var A=arguments.length,O=new Array(A>1?A-1:0),N=1;N<A;N++)O[N-1]=arguments[N];e.emit(x,...O)}),this.modules.languageDetector&&(y.languageDetector=s(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=s(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new fo(this.services,this.options),this.translator.on("*",function(x){for(var A=arguments.length,O=new Array(A>1?A-1:0),N=1;N<A;N++)O[N-1]=arguments[N];e.emit(x,...O)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ho),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=function(){return e.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return e.store[m](...arguments),e}});const f=vs(),d=()=>{const m=(v,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(y),n(v,y)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),f}loadResources(e){var s,a;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ho;const i=Fe(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const u=[],f=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(v=>{v!=="cimode"&&u.indexOf(v)<0&&u.push(v)})};i?f(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>f(m)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,d=>f(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(d)})}else n(null)}reloadResources(e,t,n){const i=vs();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ho),this.services.backendConnector.reload(e,t,s=>{i.resolve(),n(s)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Xc.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=vs();this.emit("languageChanging",e);const s=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},a=(f,d)=>{d?(s(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(f,function(){return n.t(...arguments)})},u=f=>{var m,v;!e&&!f&&this.services.languageDetector&&(f=[]);const d=Fe(f)?f:this.services.languageUtils.getBestMatchFromCodes(f);d&&(this.language||s(d),this.translator.language||this.translator.changeLanguage(d),(v=(m=this.services.languageDetector)==null?void 0:m.cacheUserLanguage)==null||v.call(m,d)),this.loadResources(d,y=>{a(y,d)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),i}getFixedT(e,t,n){var i=this;const s=function(a,u){let f;if(typeof u!="object"){for(var d=arguments.length,m=new Array(d>2?d-2:0),v=2;v<d;v++)m[v-2]=arguments[v];f=i.options.overloadTranslationOptionHandler([a,u].concat(m))}else f={...u};f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs,f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||n||s.keyPrefix);const y=i.options.keySeparator||".";let x;return f.keyPrefix&&Array.isArray(a)?x=a.map(A=>`${f.keyPrefix}${y}${A}`):x=f.keyPrefix?`${f.keyPrefix}${y}${a}`:a,i.t(x,f)};return Fe(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(){var i;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=this.translator)==null?void 0:i.translate(...t)}exists(){var i;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=this.translator)==null?void 0:i.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(u,f)=>{const d=this.services.backendConnector.state[`${u}|${f}`];return d===-1||d===0||d===2};if(t.precheck){const u=t.precheck(this,a);if(u!==void 0)return u}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(s,e)))}loadNamespaces(e,t){const n=vs();return this.options.ns?(Fe(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=vs();Fe(e)&&(e=[e]);const i=this.options.preload||[],s=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{n.resolve(),t&&t(a)}),n):(t&&t(),Promise.resolve())}dir(e){var i,s;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((s=this.services)==null?void 0:s.languageUtils)||new tf(of());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new xs(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ho;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},s=new xs(i);if((e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(u=>{s[u]=this[u]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const u=Object.keys(this.store.data).reduce((f,d)=>(f[d]={...this.store.data[d]},Object.keys(f[d]).reduce((m,v)=>(m[v]={...f[d][v]},m),{})),{});s.store=new Zc(u,i),s.services.resourceStore=s.store}return s.translator=new fo(s.services,i),s.translator.on("*",function(u){for(var f=arguments.length,d=new Array(f>1?f-1:0),m=1;m<f;m++)d[m-1]=arguments[m];s.emit(u,...d)}),s.init(i,t),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Dt=xs.createInstance();Dt.createInstance=xs.createInstance,Dt.createInstance,Dt.dir,Dt.init,Dt.loadResources,Dt.reloadResources,Dt.use,Dt.changeLanguage,Dt.getFixedT,Dt.t,Dt.exists,Dt.setDefaultNamespace,Dt.hasLoadedNamespace,Dt.loadNamespaces,Dt.loadLanguages;function Ua(r){"@babel/helpers - typeof";return Ua=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ua(r)}function lf(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Ua(XMLHttpRequest))==="object"}function Pv(r){return!!r&&typeof r.then=="function"}function qv(r){return Pv(r)?r:Promise.resolve(r)}function uf(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function cf(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?uf(Object(t),!0).forEach(function(n){Iv(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):uf(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Iv(r,e,t){return(e=jv(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function jv(r){var e=Dv(r,"string");return li(e)=="symbol"?e:e+""}function Dv(r,e){if(li(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(li(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function li(r){"@babel/helpers - typeof";return li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},li(r)}var Ur=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Ur=global.fetch:typeof window<"u"&&window.fetch&&(Ur=window.fetch);var Es;lf()&&(typeof global<"u"&&global.XMLHttpRequest?Es=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Es=window.XMLHttpRequest));var po;if(typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?po=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(po=window.ActiveXObject)),typeof Ur!="function"&&(Ur=void 0),!Ur&&!Es&&!po)try{Promise.resolve().then(()=>hw).then(function(r){Ur=r.default}).catch(function(){})}catch{}var Fa=function(e,t){if(t&&li(t)==="object"){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},ff=function(e,t,n,i){var s=function(f){if(!f.ok)return n(f.statusText||"Error",{status:f.status});f.text().then(function(d){n(null,{status:f.status,data:d})}).catch(n)};if(i){var a=i(e,t);if(a instanceof Promise){a.then(s).catch(n);return}}typeof fetch=="function"?fetch(e,t).then(s).catch(n):Ur(e,t).then(s).catch(n)},hf=!1,$v=function(e,t,n,i){e.queryStringParams&&(t=Fa(t,e.queryStringParams));var s=cf({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(s["Content-Type"]="application/json");var a=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,u=cf({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:s},hf?{}:a),f=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{ff(t,u,i,f)}catch(d){if(!a||Object.keys(a).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(a).forEach(function(m){delete u[m]}),ff(t,u,i,f),hf=!0}catch(m){i(m)}}},Mv=function(e,t,n,i){n&&li(n)==="object"&&(n=Fa("",n).slice(1)),e.queryStringParams&&(t=Fa(t,e.queryStringParams));try{var s=Es?new Es:new po("MSXML2.XMLHTTP.3.0");s.open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(var u in a)s.setRequestHeader(u,a[u]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(f){console&&console.log(f)}},Bv=function(e,t,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},Ur&&t.indexOf("file:")!==0)return $v(e,t,n,i);if(lf()||typeof ActiveXObject=="function")return Mv(e,t,n,i);i(new Error("No fetch and no xhr implementation found!"))};function Di(r){"@babel/helpers - typeof";return Di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Di(r)}function df(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ka(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?df(Object(t),!0).forEach(function(n){pf(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):df(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Uv(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Fv(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,gf(n.key),n)}}function Kv(r,e,t){return e&&Fv(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function pf(r,e,t){return(e=gf(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function gf(r){var e=Hv(r,"string");return Di(e)=="symbol"?e:e+""}function Hv(r,e){if(Di(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(Di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var zv=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){return pf({},n,i||"")},parseLoadPayload:function(t,n){},request:Bv,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},mf=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Uv(this,r),this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}return Kv(r,[{key:"init",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=t,this.options=Ka(Ka(Ka({},zv()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var a=setInterval(function(){return n.reload()},this.options.reloadInterval);Di(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,s,a){var u=this,f=this.options.loadPath;typeof this.options.loadPath=="function"&&(f=this.options.loadPath(t,i)),f=qv(f),f.then(function(d){if(!d)return a(null,{});var m=u.services.interpolator.interpolate(d,{lng:t.join("+"),ns:i.join("+")});u.loadUrl(m,a,n,s)})}},{key:"loadUrl",value:function(t,n,i,s){var a=this,u=typeof i=="string"?[i]:i,f=typeof s=="string"?[s]:s,d=this.options.parseLoadPayload(u,f);this.options.request(this.options,t,d,function(m,v){if(v&&(v.status>=500&&v.status<600||!v.status))return n("failed loading "+t+"; status code: "+v.status,!0);if(v&&v.status>=400&&v.status<500)return n("failed loading "+t+"; status code: "+v.status,!1);if(!v&&m&&m.message){var y=m.message.toLowerCase(),x=["failed","fetch","network","load"].find(function(N){return y.indexOf(N)>-1});if(x)return n("failed loading "+t+": "+m.message,!0)}if(m)return n(m,!1);var A,O;try{typeof v.data=="string"?A=a.options.parse(v.data,i,s):A=v.data}catch{O="failed parsing "+t+" to json"}if(O)return n(O,!1);n(null,A)})}},{key:"create",value:function(t,n,i,s,a){var u=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var f=this.options.parsePayload(n,i,s),d=0,m=[],v=[];t.forEach(function(y){var x=u.options.addPath;typeof u.options.addPath=="function"&&(x=u.options.addPath(y,n));var A=u.services.interpolator.interpolate(x,{lng:y,ns:n});u.options.request(u.options,A,f,function(O,N){d+=1,m.push(O),v.push(N),d===t.length&&typeof a=="function"&&a(m,v)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,s=n.languageUtils,a=n.logger,u=i.language;if(!(u&&u.toLowerCase()==="cimode")){var f=[],d=function(v){var y=s.toResolveHierarchy(v);y.forEach(function(x){f.indexOf(x)<0&&f.push(x)})};d(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(m){return d(m)}),f.forEach(function(m){t.allOptions.ns.forEach(function(v){i.read(m,v,"read",null,null,function(y,x){y&&a.warn("loading namespace ".concat(v," for language ").concat(m," failed"),y),!y&&x&&a.log("loaded namespace ".concat(v," for language ").concat(m),x),i.loaded("".concat(m,"|").concat(v),y,x)})})})}}}])}();mf.type="backend";const{slice:Vv,forEach:Wv}=[];function Gv(r){return Wv.call(Vv.call(arguments,1),e=>{if(e)for(const t in e)r[t]===void 0&&(r[t]=e[t])}),r}const yf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Yv=function(r,e){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let s=`${r}=${i}`;if(n.maxAge>0){const a=n.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(n.domain){if(!yf.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!yf.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},bf={create(r,e,t,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),n&&(i.domain=n),document.cookie=Yv(r,encodeURIComponent(e),i)},read(r){const e=`${r}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let i=t[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(r){this.create(r,"",-1)}};var Jv={name:"cookie",lookup(r){let{lookupCookie:e}=r;if(e&&typeof document<"u")return bf.read(e)||void 0},cacheUserLanguage(r,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:i,cookieOptions:s}=e;t&&typeof document<"u"&&bf.create(t,r,n,i,s)}},Zv={name:"querystring",lookup(r){var n;let{lookupQuerystring:e}=r,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let u=0;u<a.length;u++){const f=a[u].indexOf("=");f>0&&a[u].substring(0,f)===e&&(t=a[u].substring(f+1))}}return t}};let $i=null;const vf=()=>{if($i!==null)return $i;try{if($i=typeof window<"u"&&window.localStorage!==null,!$i)return!1;const r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r)}catch{$i=!1}return $i};var Xv={name:"localStorage",lookup(r){let{lookupLocalStorage:e}=r;if(e&&vf())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupLocalStorage:t}=e;t&&vf()&&window.localStorage.setItem(t,r)}};let Mi=null;const wf=()=>{if(Mi!==null)return Mi;try{if(Mi=typeof window<"u"&&window.sessionStorage!==null,!Mi)return!1;const r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r)}catch{Mi=!1}return Mi};var Qv={name:"sessionStorage",lookup(r){let{lookupSessionStorage:e}=r;if(e&&wf())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupSessionStorage:t}=e;t&&wf()&&window.sessionStorage.setItem(t,r)}},e1={name:"navigator",lookup(r){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:i}=navigator;if(t)for(let s=0;s<t.length;s++)e.push(t[s]);n&&e.push(n),i&&e.push(i)}return e.length>0?e:void 0}},t1={name:"htmlTag",lookup(r){let{htmlTag:e}=r,t;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},n1={name:"path",lookup(r){var i;let{lookupFromPathIndex:e}=r;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},r1={name:"subdomain",lookup(r){var i,s;let{lookupFromSubdomainIndex:e}=r;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[t]}};let xf=!1;try{document.cookie,xf=!0}catch{}const Ef=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];xf||Ef.splice(1,1);const i1=()=>({order:Ef,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r});class Of{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Gv(t,this.options||{},i1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Jv),this.addDetector(Zv),this.addDetector(Xv),this.addDetector(Qv),this.addDetector(e1),this.addDetector(t1),this.addDetector(n1),this.addDetector(r1)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),t=t.map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}Of.type="languageDetector";var s1=Object.defineProperty,o1=(r,e,t)=>e in r?s1(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Sf=(r,e,t)=>o1(r,typeof e!="symbol"?e+"":e,t),a1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bi(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ha={exports:{}},l1=Ha.exports,Af;function u1(){return Af||(Af=1,function(r,e){(function(t,n){r.exports=n()})(l1,function(){var t=1e3,n=6e4,i=36e5,s="millisecond",a="second",u="minute",f="hour",d="day",m="week",v="month",y="quarter",x="year",A="date",O="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,W={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var E=["th","st","nd","rd"],T=V%100;return"["+V+(E[(T-20)%10]||E[T]||E[0])+"]"}},Z=function(V,E,T){var D=String(V);return!D||D.length>=E?V:""+Array(E+1-D.length).join(T)+V},de={s:Z,z:function(V){var E=-V.utcOffset(),T=Math.abs(E),D=Math.floor(T/60),U=T%60;return(E<=0?"+":"-")+Z(D,2,"0")+":"+Z(U,2,"0")},m:function V(E,T){if(E.date()<T.date())return-V(T,E);var D=12*(T.year()-E.year())+(T.month()-E.month()),U=E.clone().add(D,v),J=T-U<0,z=E.clone().add(D+(J?-1:1),v);return+(-(D+(T-U)/(J?U-z:z-U))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:v,y:x,w:m,d,D:A,h:f,m:u,s:a,ms:s,Q:y}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},ue="en",ce={};ce[ue]=W;var ne="$isDayjsObject",re=function(V){return V instanceof G||!(!V||!V[ne])},xe=function V(E,T,D){var U;if(!E)return ue;if(typeof E=="string"){var J=E.toLowerCase();ce[J]&&(U=J),T&&(ce[J]=T,U=J);var z=E.split("-");if(!U&&z.length>1)return V(z[0])}else{var le=E.name;ce[le]=E,U=le}return!D&&U&&(ue=U),U||!D&&ue},Se=function(V,E){if(re(V))return V.clone();var T=typeof E=="object"?E:{};return T.date=V,T.args=arguments,new G(T)},S=de;S.l=xe,S.i=re,S.w=function(V,E){return Se(V,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var G=function(){function V(T){this.$L=xe(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[ne]=!0}var E=V.prototype;return E.parse=function(T){this.$d=function(D){var U=D.date,J=D.utc;if(U===null)return new Date(NaN);if(S.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var z=U.match(N);if(z){var le=z[2]-1||0,ve=(z[7]||"0").substring(0,3);return J?new Date(Date.UTC(z[1],le,z[3]||1,z[4]||0,z[5]||0,z[6]||0,ve)):new Date(z[1],le,z[3]||1,z[4]||0,z[5]||0,z[6]||0,ve)}}return new Date(U)}(T),this.init()},E.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},E.$utils=function(){return S},E.isValid=function(){return this.$d.toString()!==O},E.isSame=function(T,D){var U=Se(T);return this.startOf(D)<=U&&U<=this.endOf(D)},E.isAfter=function(T,D){return Se(T)<this.startOf(D)},E.isBefore=function(T,D){return this.endOf(D)<Se(T)},E.$g=function(T,D,U){return S.u(T)?this[D]:this.set(U,T)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(T,D){var U=this,J=!!S.u(D)||D,z=S.p(T),le=function(ae,Ie){var De=S.w(U.$u?Date.UTC(U.$y,Ie,ae):new Date(U.$y,Ie,ae),U);return J?De:De.endOf(d)},ve=function(ae,Ie){return S.w(U.toDate()[ae].apply(U.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(Ie)),U)},pe=this.$W,Ne=this.$M,Oe=this.$D,Ke="set"+(this.$u?"UTC":"");switch(z){case x:return J?le(1,0):le(31,11);case v:return J?le(1,Ne):le(0,Ne+1);case m:var We=this.$locale().weekStart||0,je=(pe<We?pe+7:pe)-We;return le(J?Oe-je:Oe+(6-je),Ne);case d:case A:return ve(Ke+"Hours",0);case f:return ve(Ke+"Minutes",1);case u:return ve(Ke+"Seconds",2);case a:return ve(Ke+"Milliseconds",3);default:return this.clone()}},E.endOf=function(T){return this.startOf(T,!1)},E.$set=function(T,D){var U,J=S.p(T),z="set"+(this.$u?"UTC":""),le=(U={},U[d]=z+"Date",U[A]=z+"Date",U[v]=z+"Month",U[x]=z+"FullYear",U[f]=z+"Hours",U[u]=z+"Minutes",U[a]=z+"Seconds",U[s]=z+"Milliseconds",U)[J],ve=J===d?this.$D+(D-this.$W):D;if(J===v||J===x){var pe=this.clone().set(A,1);pe.$d[le](ve),pe.init(),this.$d=pe.set(A,Math.min(this.$D,pe.daysInMonth())).$d}else le&&this.$d[le](ve);return this.init(),this},E.set=function(T,D){return this.clone().$set(T,D)},E.get=function(T){return this[S.p(T)]()},E.add=function(T,D){var U,J=this;T=Number(T);var z=S.p(D),le=function(Ne){var Oe=Se(J);return S.w(Oe.date(Oe.date()+Math.round(Ne*T)),J)};if(z===v)return this.set(v,this.$M+T);if(z===x)return this.set(x,this.$y+T);if(z===d)return le(1);if(z===m)return le(7);var ve=(U={},U[u]=n,U[f]=i,U[a]=t,U)[z]||1,pe=this.$d.getTime()+T*ve;return S.w(pe,this)},E.subtract=function(T,D){return this.add(-1*T,D)},E.format=function(T){var D=this,U=this.$locale();if(!this.isValid())return U.invalidDate||O;var J=T||"YYYY-MM-DDTHH:mm:ssZ",z=S.z(this),le=this.$H,ve=this.$m,pe=this.$M,Ne=U.weekdays,Oe=U.months,Ke=U.meridiem,We=function(Ie,De,Te,Ue){return Ie&&(Ie[De]||Ie(D,J))||Te[De].slice(0,Ue)},je=function(Ie){return S.s(le%12||12,Ie,"0")},ae=Ke||function(Ie,De,Te){var Ue=Ie<12?"AM":"PM";return Te?Ue.toLowerCase():Ue};return J.replace(M,function(Ie,De){return De||function(Te){switch(Te){case"YY":return String(D.$y).slice(-2);case"YYYY":return S.s(D.$y,4,"0");case"M":return pe+1;case"MM":return S.s(pe+1,2,"0");case"MMM":return We(U.monthsShort,pe,Oe,3);case"MMMM":return We(Oe,pe);case"D":return D.$D;case"DD":return S.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return We(U.weekdaysMin,D.$W,Ne,2);case"ddd":return We(U.weekdaysShort,D.$W,Ne,3);case"dddd":return Ne[D.$W];case"H":return String(le);case"HH":return S.s(le,2,"0");case"h":return je(1);case"hh":return je(2);case"a":return ae(le,ve,!0);case"A":return ae(le,ve,!1);case"m":return String(ve);case"mm":return S.s(ve,2,"0");case"s":return String(D.$s);case"ss":return S.s(D.$s,2,"0");case"SSS":return S.s(D.$ms,3,"0");case"Z":return z}return null}(Ie)||z.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(T,D,U){var J,z=this,le=S.p(D),ve=Se(T),pe=(ve.utcOffset()-this.utcOffset())*n,Ne=this-ve,Oe=function(){return S.m(z,ve)};switch(le){case x:J=Oe()/12;break;case v:J=Oe();break;case y:J=Oe()/3;break;case m:J=(Ne-pe)/6048e5;break;case d:J=(Ne-pe)/864e5;break;case f:J=Ne/i;break;case u:J=Ne/n;break;case a:J=Ne/t;break;default:J=Ne}return U?J:S.a(J)},E.daysInMonth=function(){return this.endOf(v).$D},E.$locale=function(){return ce[this.$L]},E.locale=function(T,D){if(!T)return this.$L;var U=this.clone(),J=xe(T,D,!0);return J&&(U.$L=J),U},E.clone=function(){return S.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},V}(),P=G.prototype;return Se.prototype=P,[["$ms",s],["$s",a],["$m",u],["$H",f],["$W",d],["$M",v],["$y",x],["$D",A]].forEach(function(V){P[V[1]]=function(E){return this.$g(E,V[0],V[1])}}),Se.extend=function(V,E){return V.$i||(V(E,G,Se),V.$i=!0),Se},Se.locale=xe,Se.isDayjs=re,Se.unix=function(V){return Se(1e3*V)},Se.en=ce[ue],Se.Ls=ce,Se.p={},Se})}(Ha)),Ha.exports}var c1=u1();const za=Bi(c1);var Va={exports:{}},f1=Va.exports,Tf;function h1(){return Tf||(Tf=1,function(r,e){(function(t,n){r.exports=n()})(f1,function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,u=/\d*[^-_:/,()\s\d]+/,f={},d=function(N){return(N=+N)+(N>68?1900:2e3)},m=function(N){return function(M){this[N]=+M}},v=[/[+-]\d\d:?(\d\d)?|Z/,function(N){(this.zone||(this.zone={})).offset=function(M){if(!M||M==="Z")return 0;var W=M.match(/([+-]|\d\d)/g),Z=60*W[1]+(+W[2]||0);return Z===0?0:W[0]==="+"?-Z:Z}(N)}],y=function(N){var M=f[N];return M&&(M.indexOf?M:M.s.concat(M.f))},x=function(N,M){var W,Z=f.meridiem;if(Z){for(var de=1;de<=24;de+=1)if(N.indexOf(Z(de,0,M))>-1){W=de>12;break}}else W=N===(M?"pm":"PM");return W},A={A:[u,function(N){this.afternoon=x(N,!1)}],a:[u,function(N){this.afternoon=x(N,!0)}],Q:[i,function(N){this.month=3*(N-1)+1}],S:[i,function(N){this.milliseconds=100*+N}],SS:[s,function(N){this.milliseconds=10*+N}],SSS:[/\d{3}/,function(N){this.milliseconds=+N}],s:[a,m("seconds")],ss:[a,m("seconds")],m:[a,m("minutes")],mm:[a,m("minutes")],H:[a,m("hours")],h:[a,m("hours")],HH:[a,m("hours")],hh:[a,m("hours")],D:[a,m("day")],DD:[s,m("day")],Do:[u,function(N){var M=f.ordinal,W=N.match(/\d+/);if(this.day=W[0],M)for(var Z=1;Z<=31;Z+=1)M(Z).replace(/\[|\]/g,"")===N&&(this.day=Z)}],w:[a,m("week")],ww:[s,m("week")],M:[a,m("month")],MM:[s,m("month")],MMM:[u,function(N){var M=y("months"),W=(y("monthsShort")||M.map(function(Z){return Z.slice(0,3)})).indexOf(N)+1;if(W<1)throw new Error;this.month=W%12||W}],MMMM:[u,function(N){var M=y("months").indexOf(N)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,m("year")],YY:[s,function(N){this.year=d(N)}],YYYY:[/\d{4}/,m("year")],Z:v,ZZ:v};function O(N){var M,W;M=N,W=f&&f.formats;for(var Z=(N=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Se,S,G){var P=G&&G.toUpperCase();return S||W[G]||t[G]||W[P].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,E,T){return E||T.slice(1)})})).match(n),de=Z.length,ue=0;ue<de;ue+=1){var ce=Z[ue],ne=A[ce],re=ne&&ne[0],xe=ne&&ne[1];Z[ue]=xe?{regex:re,parser:xe}:ce.replace(/^\[|\]$/g,"")}return function(Se){for(var S={},G=0,P=0;G<de;G+=1){var V=Z[G];if(typeof V=="string")P+=V.length;else{var E=V.regex,T=V.parser,D=Se.slice(P),U=E.exec(D)[0];T.call(S,U),Se=Se.replace(U,"")}}return function(J){var z=J.afternoon;if(z!==void 0){var le=J.hours;z?le<12&&(J.hours+=12):le===12&&(J.hours=0),delete J.afternoon}}(S),S}}return function(N,M,W){W.p.customParseFormat=!0,N&&N.parseTwoDigitYear&&(d=N.parseTwoDigitYear);var Z=M.prototype,de=Z.parse;Z.parse=function(ue){var ce=ue.date,ne=ue.utc,re=ue.args;this.$u=ne;var xe=re[1];if(typeof xe=="string"){var Se=re[2]===!0,S=re[3]===!0,G=Se||S,P=re[2];S&&(P=re[2]),f=this.$locale(),!Se&&P&&(f=W.Ls[P]),this.$d=function(D,U,J,z){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*D);var le=O(U)(D),ve=le.year,pe=le.month,Ne=le.day,Oe=le.hours,Ke=le.minutes,We=le.seconds,je=le.milliseconds,ae=le.zone,Ie=le.week,De=new Date,Te=Ne||(ve||pe?1:De.getDate()),Ue=ve||De.getFullYear(),ut=0;ve&&!pe||(ut=pe>0?pe-1:De.getMonth());var ot,Ht=Oe||0,zt=Ke||0,Rn=We||0,kn=je||0;return ae?new Date(Date.UTC(Ue,ut,Te,Ht,zt,Rn,kn+60*ae.offset*1e3)):J?new Date(Date.UTC(Ue,ut,Te,Ht,zt,Rn,kn)):(ot=new Date(Ue,ut,Te,Ht,zt,Rn,kn),Ie&&(ot=z(ot).week(Ie).toDate()),ot)}catch{return new Date("")}}(ce,xe,ne,W),this.init(),P&&P!==!0&&(this.$L=this.locale(P).$L),G&&ce!=this.format(xe)&&(this.$d=new Date("")),f={}}else if(xe instanceof Array)for(var V=xe.length,E=1;E<=V;E+=1){re[1]=xe[E-1];var T=W.apply(this,re);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}E===V&&(this.$d=new Date(""))}else de.call(this,ue)}}})}(Va)),Va.exports}var d1=h1();const p1=Bi(d1);var Wa={exports:{}},g1=Wa.exports,_f;function m1(){return _f||(_f=1,function(r,e){(function(t,n){r.exports=n()})(g1,function(){var t,n,i=1e3,s=6e4,a=36e5,u=864e5,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=31536e6,m=2628e6,v=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,y={years:d,months:m,days:u,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},x=function(ce){return ce instanceof de},A=function(ce,ne,re){return new de(ce,re,ne.$l)},O=function(ce){return n.p(ce)+"s"},N=function(ce){return ce<0},M=function(ce){return N(ce)?Math.ceil(ce):Math.floor(ce)},W=function(ce){return Math.abs(ce)},Z=function(ce,ne){return ce?N(ce)?{negative:!0,format:""+W(ce)+ne}:{negative:!1,format:""+ce+ne}:{negative:!1,format:""}},de=function(){function ce(re,xe,Se){var S=this;if(this.$d={},this.$l=Se,re===void 0&&(this.$ms=0,this.parseFromMilliseconds()),xe)return A(re*y[O(xe)],this);if(typeof re=="number")return this.$ms=re,this.parseFromMilliseconds(),this;if(typeof re=="object")return Object.keys(re).forEach(function(V){S.$d[O(V)]=re[V]}),this.calMilliseconds(),this;if(typeof re=="string"){var G=re.match(v);if(G){var P=G.slice(2).map(function(V){return V!=null?Number(V):0});return this.$d.years=P[0],this.$d.months=P[1],this.$d.weeks=P[2],this.$d.days=P[3],this.$d.hours=P[4],this.$d.minutes=P[5],this.$d.seconds=P[6],this.calMilliseconds(),this}}return this}var ne=ce.prototype;return ne.calMilliseconds=function(){var re=this;this.$ms=Object.keys(this.$d).reduce(function(xe,Se){return xe+(re.$d[Se]||0)*y[Se]},0)},ne.parseFromMilliseconds=function(){var re=this.$ms;this.$d.years=M(re/d),re%=d,this.$d.months=M(re/m),re%=m,this.$d.days=M(re/u),re%=u,this.$d.hours=M(re/a),re%=a,this.$d.minutes=M(re/s),re%=s,this.$d.seconds=M(re/i),re%=i,this.$d.milliseconds=re},ne.toISOString=function(){var re=Z(this.$d.years,"Y"),xe=Z(this.$d.months,"M"),Se=+this.$d.days||0;this.$d.weeks&&(Se+=7*this.$d.weeks);var S=Z(Se,"D"),G=Z(this.$d.hours,"H"),P=Z(this.$d.minutes,"M"),V=this.$d.seconds||0;this.$d.milliseconds&&(V+=this.$d.milliseconds/1e3,V=Math.round(1e3*V)/1e3);var E=Z(V,"S"),T=re.negative||xe.negative||S.negative||G.negative||P.negative||E.negative,D=G.format||P.format||E.format?"T":"",U=(T?"-":"")+"P"+re.format+xe.format+S.format+D+G.format+P.format+E.format;return U==="P"||U==="-P"?"P0D":U},ne.toJSON=function(){return this.toISOString()},ne.format=function(re){var xe=re||"YYYY-MM-DDTHH:mm:ss",Se={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return xe.replace(f,function(S,G){return G||String(Se[S])})},ne.as=function(re){return this.$ms/y[O(re)]},ne.get=function(re){var xe=this.$ms,Se=O(re);return Se==="milliseconds"?xe%=1e3:xe=Se==="weeks"?M(xe/y[Se]):this.$d[Se],xe||0},ne.add=function(re,xe,Se){var S;return S=xe?re*y[O(xe)]:x(re)?re.$ms:A(re,this).$ms,A(this.$ms+S*(Se?-1:1),this)},ne.subtract=function(re,xe){return this.add(re,xe,!0)},ne.locale=function(re){var xe=this.clone();return xe.$l=re,xe},ne.clone=function(){return A(this.$ms,this)},ne.humanize=function(re){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!re)},ne.valueOf=function(){return this.asMilliseconds()},ne.milliseconds=function(){return this.get("milliseconds")},ne.asMilliseconds=function(){return this.as("milliseconds")},ne.seconds=function(){return this.get("seconds")},ne.asSeconds=function(){return this.as("seconds")},ne.minutes=function(){return this.get("minutes")},ne.asMinutes=function(){return this.as("minutes")},ne.hours=function(){return this.get("hours")},ne.asHours=function(){return this.as("hours")},ne.days=function(){return this.get("days")},ne.asDays=function(){return this.as("days")},ne.weeks=function(){return this.get("weeks")},ne.asWeeks=function(){return this.as("weeks")},ne.months=function(){return this.get("months")},ne.asMonths=function(){return this.as("months")},ne.years=function(){return this.get("years")},ne.asYears=function(){return this.as("years")},ce}(),ue=function(ce,ne,re){return ce.add(ne.years()*re,"y").add(ne.months()*re,"M").add(ne.days()*re,"d").add(ne.hours()*re,"h").add(ne.minutes()*re,"m").add(ne.seconds()*re,"s").add(ne.milliseconds()*re,"ms")};return function(ce,ne,re){t=re,n=re().$utils(),re.duration=function(S,G){var P=re.locale();return A(S,{$l:P},G)},re.isDuration=x;var xe=ne.prototype.add,Se=ne.prototype.subtract;ne.prototype.add=function(S,G){return x(S)?ue(this,S,1):xe.bind(this)(S,G)},ne.prototype.subtract=function(S,G){return x(S)?ue(this,S,-1):Se.bind(this)(S,G)}}})}(Wa)),Wa.exports}var y1=m1();const b1=Bi(y1);var Ga={exports:{}},v1=Ga.exports,Nf;function w1(){return Nf||(Nf=1,function(r,e){(function(t,n){r.exports=n()})(v1,function(){var t="minute",n=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,a,u){var f=a.prototype;u.utc=function(O){var N={date:O,utc:!0,args:arguments};return new a(N)},f.utc=function(O){var N=u(this.toDate(),{locale:this.$L,utc:!0});return O?N.add(this.utcOffset(),t):N},f.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var d=f.parse;f.parse=function(O){O.utc&&(this.$u=!0),this.$utils().u(O.$offset)||(this.$offset=O.$offset),d.call(this,O)};var m=f.init;f.init=function(){if(this.$u){var O=this.$d;this.$y=O.getUTCFullYear(),this.$M=O.getUTCMonth(),this.$D=O.getUTCDate(),this.$W=O.getUTCDay(),this.$H=O.getUTCHours(),this.$m=O.getUTCMinutes(),this.$s=O.getUTCSeconds(),this.$ms=O.getUTCMilliseconds()}else m.call(this)};var v=f.utcOffset;f.utcOffset=function(O,N){var M=this.$utils().u;if(M(O))return this.$u?0:M(this.$offset)?v.call(this):this.$offset;if(typeof O=="string"&&(O=function(ue){ue===void 0&&(ue="");var ce=ue.match(n);if(!ce)return null;var ne=(""+ce[0]).match(i)||["-",0,0],re=ne[0],xe=60*+ne[1]+ +ne[2];return xe===0?0:re==="+"?xe:-xe}(O),O===null))return this;var W=Math.abs(O)<=16?60*O:O,Z=this;if(N)return Z.$offset=W,Z.$u=O===0,Z;if(O!==0){var de=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(Z=this.local().add(W+de,t)).$offset=W,Z.$x.$localOffset=de}else Z=this.utc();return Z};var y=f.format;f.format=function(O){var N=O||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,N)},f.valueOf=function(){var O=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*O},f.isUTC=function(){return!!this.$u},f.toISOString=function(){return this.toDate().toISOString()},f.toString=function(){return this.toDate().toUTCString()};var x=f.toDate;f.toDate=function(O){return O==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():x.call(this)};var A=f.diff;f.diff=function(O,N,M){if(O&&this.$u===O.$u)return A.call(this,O,N,M);var W=this.local(),Z=u(O).local();return A.call(W,Z,N,M)}}})}(Ga)),Ga.exports}var x1=w1();const E1=Bi(x1);za.extend(p1),za.extend(b1),za.extend(E1);var Ya={exports:{}},O1=Ya.exports,Cf;function S1(){return Cf||(Cf=1,function(r,e){(function(t,n){r.exports=n()})(O1,function(){var t=function(o,l){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p}||function(c,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(c[g]=p[g])})(o,l)},n=function(){return(n=Object.assign||function(o){for(var l,c=1,p=arguments.length;c<p;c++)for(var g in l=arguments[c])Object.prototype.hasOwnProperty.call(l,g)&&(o[g]=l[g]);return o}).apply(this,arguments)};function i(o,l,c){for(var p,g=0,b=l.length;g<b;g++)!p&&g in l||((p=p||Array.prototype.slice.call(l,0,g))[g]=l[g]);return o.concat(p||Array.prototype.slice.call(l))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:a1,a=Object.keys,u=Array.isArray;function f(o,l){return typeof l!="object"||a(l).forEach(function(c){o[c]=l[c]}),o}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var d=Object.getPrototypeOf,m={}.hasOwnProperty;function v(o,l){return m.call(o,l)}function y(o,l){typeof l=="function"&&(l=l(d(o))),(typeof Reflect>"u"?a:Reflect.ownKeys)(l).forEach(function(c){A(o,c,l[c])})}var x=Object.defineProperty;function A(o,l,c,p){x(o,l,f(c&&v(c,"get")&&typeof c.get=="function"?{get:c.get,set:c.set,configurable:!0}:{value:c,configurable:!0,writable:!0},p))}function O(o){return{from:function(l){return o.prototype=Object.create(l.prototype),A(o.prototype,"constructor",o),{extend:y.bind(null,o.prototype)}}}}var N=Object.getOwnPropertyDescriptor,M=[].slice;function W(o,l,c){return M.call(o,l,c)}function Z(o,l){return l(o)}function de(o){if(!o)throw new Error("Assertion Failed")}function ue(o){s.setImmediate?setImmediate(o):setTimeout(o,0)}function ce(o,l){if(typeof l=="string"&&v(o,l))return o[l];if(!l)return o;if(typeof l!="string"){for(var c=[],p=0,g=l.length;p<g;++p){var b=ce(o,l[p]);c.push(b)}return c}var _=l.indexOf(".");if(_!==-1){var C=o[l.substr(0,_)];return C==null?void 0:ce(C,l.substr(_+1))}}function ne(o,l,c){if(o&&l!==void 0&&!("isFrozen"in Object&&Object.isFrozen(o)))if(typeof l!="string"&&"length"in l){de(typeof c!="string"&&"length"in c);for(var p=0,g=l.length;p<g;++p)ne(o,l[p],c[p])}else{var b,_,C=l.indexOf(".");C!==-1?(b=l.substr(0,C),(_=l.substr(C+1))===""?c===void 0?u(o)&&!isNaN(parseInt(b))?o.splice(b,1):delete o[b]:o[b]=c:ne(C=!(C=o[b])||!v(o,b)?o[b]={}:C,_,c)):c===void 0?u(o)&&!isNaN(parseInt(l))?o.splice(l,1):delete o[l]:o[l]=c}}function re(o){var l,c={};for(l in o)v(o,l)&&(c[l]=o[l]);return c}var xe=[].concat;function Se(o){return xe.apply([],o)}var an="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Se([8,16,32,64].map(function(o){return["Int","Uint","Float"].map(function(l){return l+o+"Array"})}))).filter(function(o){return s[o]}),S=new Set(an.map(function(o){return s[o]})),G=null;function P(o){return G=new WeakMap,o=function l(c){if(!c||typeof c!="object")return c;var p=G.get(c);if(p)return p;if(u(c)){p=[],G.set(c,p);for(var g=0,b=c.length;g<b;++g)p.push(l(c[g]))}else if(S.has(c.constructor))p=c;else{var _,C=d(c);for(_ in p=C===Object.prototype?{}:Object.create(C),G.set(c,p),c)v(c,_)&&(p[_]=l(c[_]))}return p}(o),G=null,o}var V={}.toString;function E(o){return V.call(o).slice(8,-1)}var T=typeof Symbol<"u"?Symbol.iterator:"@@iterator",D=typeof T=="symbol"?function(o){var l;return o!=null&&(l=o[T])&&l.apply(o)}:function(){return null};function U(o,l){return l=o.indexOf(l),0<=l&&o.splice(l,1),0<=l}var J={};function z(o){var l,c,p,g;if(arguments.length===1){if(u(o))return o.slice();if(this===J&&typeof o=="string")return[o];if(g=D(o)){for(c=[];!(p=g.next()).done;)c.push(p.value);return c}if(o==null)return[o];if(typeof(l=o.length)!="number")return[o];for(c=new Array(l);l--;)c[l]=o[l];return c}for(l=arguments.length,c=new Array(l);l--;)c[l]=arguments[l];return c}var le=typeof Symbol<"u"?function(o){return o[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},on=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Bn=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(on),ve={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 pe(o,l){this.name=o,this.message=l}function Ne(o,l){return o+". Errors: "+Object.keys(l).map(function(c){return l[c].toString()}).filter(function(c,p,g){return g.indexOf(c)===p}).join(`
79
- `)}function Oe(o,l,c,p){this.failures=l,this.failedKeys=p,this.successCount=c,this.message=Ne(o,l)}function Ke(o,l){this.name="BulkError",this.failures=Object.keys(l).map(function(c){return l[c]}),this.failuresByPos=l,this.message=Ne(o,this.failures)}O(pe).from(Error).extend({toString:function(){return this.name+": "+this.message}}),O(Oe).from(pe),O(Ke).from(pe);var We=Bn.reduce(function(o,l){return o[l]=l+"Error",o},{}),je=pe,ae=Bn.reduce(function(o,l){var c=l+"Error";function p(g,b){this.name=c,g?typeof g=="string"?(this.message="".concat(g).concat(b?`
80
- `+b:""),this.inner=b||null):typeof g=="object"&&(this.message="".concat(g.name," ").concat(g.message),this.inner=g):(this.message=ve[l]||c,this.inner=null)}return O(p).from(je),o[l]=p,o},{});ae.Syntax=SyntaxError,ae.Type=TypeError,ae.Range=RangeError;var Ie=on.reduce(function(o,l){return o[l+"Error"]=ae[l],o},{}),De=Bn.reduce(function(o,l){return["Syntax","Type","Range"].indexOf(l)===-1&&(o[l+"Error"]=ae[l]),o},{});function Te(){}function Ue(o){return o}function ut(o,l){return o==null||o===Ue?l:function(c){return l(o(c))}}function ot(o,l){return function(){o.apply(this,arguments),l.apply(this,arguments)}}function Ht(o,l){return o===Te?l:function(){var c=o.apply(this,arguments);c!==void 0&&(arguments[0]=c);var p=this.onsuccess,g=this.onerror;this.onsuccess=null,this.onerror=null;var b=l.apply(this,arguments);return p&&(this.onsuccess=this.onsuccess?ot(p,this.onsuccess):p),g&&(this.onerror=this.onerror?ot(g,this.onerror):g),b!==void 0?b:c}}function zt(o,l){return o===Te?l:function(){o.apply(this,arguments);var c=this.onsuccess,p=this.onerror;this.onsuccess=this.onerror=null,l.apply(this,arguments),c&&(this.onsuccess=this.onsuccess?ot(c,this.onsuccess):c),p&&(this.onerror=this.onerror?ot(p,this.onerror):p)}}function Rn(o,l){return o===Te?l:function(c){var p=o.apply(this,arguments);f(c,p);var g=this.onsuccess,b=this.onerror;return this.onsuccess=null,this.onerror=null,c=l.apply(this,arguments),g&&(this.onsuccess=this.onsuccess?ot(g,this.onsuccess):g),b&&(this.onerror=this.onerror?ot(b,this.onerror):b),p===void 0?c===void 0?void 0:c:f(p,c)}}function kn(o,l){return o===Te?l:function(){return l.apply(this,arguments)!==!1&&o.apply(this,arguments)}}function Xt(o,l){return o===Te?l:function(){var c=o.apply(this,arguments);if(c&&typeof c.then=="function"){for(var p=this,g=arguments.length,b=new Array(g);g--;)b[g]=arguments[g];return c.then(function(){return l.apply(p,b)})}return l.apply(this,arguments)}}De.ModifyError=Oe,De.DexieError=pe,De.BulkError=Ke;var Ct=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Nr(o){Ct=o}var sn={},Qt=100,an=typeof Promise>"u"?[]:function(){var o=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[o,d(o),o];var l=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[l,d(l),o]}(),on=an[0],Bn=an[1],an=an[2],Bn=Bn&&Bn.then,Lt=on&&on.constructor,gn=!!an,mn=function(o,l){un.push([o,l]),Pn&&(queueMicrotask(Cr),Pn=!1)},Nt=!0,Pn=!0,ln=[],fr=[],Zn=Ue,$t={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Te,pgp:!1,env:{},finalize:Te},Le=$t,un=[],Mt=0,Tt=[];function me(o){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var l=this._PSD=Le;if(typeof o!="function"){if(o!==sn)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&yn(this,this._value))}this._state=null,this._value=null,++l.ref,function c(p,g){try{g(function(b){if(p._state===null){if(b===p)throw new TypeError("A promise cannot be resolved with itself.");var _=p._lib&&Rt();b&&typeof b.then=="function"?c(p,function(C,q){b instanceof me?b._then(C,q):b.then(C,q)}):(p._state=!0,p._value=b,bn(p)),_&&fn()}},yn.bind(null,p))}catch(b){yn(p,b)}}(this,o)}var Vt={get:function(){var o=Le,l=pr;function c(p,g){var b=this,_=!o.global&&(o!==Le||l!==pr),C=_&&!qe(),q=new me(function(j,F){Xn(b,new cn(ct(p,o,_,C),ct(g,o,_,C),j,F,o))});return this._consoleTask&&(q._consoleTask=this._consoleTask),q}return c.prototype=sn,c},set:function(o){A(this,"then",o&&o.prototype===sn?Vt:{get:function(){return o},set:Vt.set})}};function cn(o,l,c,p,g){this.onFulfilled=typeof o=="function"?o:null,this.onRejected=typeof l=="function"?l:null,this.resolve=c,this.reject=p,this.psd=g}function yn(o,l){var c,p;fr.push(l),o._state===null&&(c=o._lib&&Rt(),l=Zn(l),o._state=!1,o._value=l,p=o,ln.some(function(g){return g._value===p._value})||ln.push(p),bn(o),c&&fn())}function bn(o){var l=o._listeners;o._listeners=[];for(var c=0,p=l.length;c<p;++c)Xn(o,l[c]);var g=o._PSD;--g.ref||g.finalize(),Mt===0&&(++Mt,mn(function(){--Mt==0&&en()},[]))}function Xn(o,l){if(o._state!==null){var c=o._state?l.onFulfilled:l.onRejected;if(c===null)return(o._state?l.resolve:l.reject)(o._value);++l.psd.ref,++Mt,mn(hr,[c,o,l])}else o._listeners.push(l)}function hr(o,l,c){try{var p,g=l._value;!l._state&&fr.length&&(fr=[]),p=Ct&&l._consoleTask?l._consoleTask.run(function(){return o(g)}):o(g),l._state||fr.indexOf(g)!==-1||function(b){for(var _=ln.length;_;)if(ln[--_]._value===b._value)return ln.splice(_,1)}(l),c.resolve(p)}catch(b){c.reject(b)}finally{--Mt==0&&en(),--c.psd.ref||c.psd.finalize()}}function Cr(){ft($t,function(){Rt()&&fn()})}function Rt(){var o=Nt;return Pn=Nt=!1,o}function fn(){var o,l,c;do for(;0<un.length;)for(o=un,un=[],c=o.length,l=0;l<c;++l){var p=o[l];p[0].apply(null,p[1])}while(0<un.length);Pn=Nt=!0}function en(){var o=ln;ln=[],o.forEach(function(p){p._PSD.onunhandled.call(null,p._value,p)});for(var l=Tt.slice(0),c=l.length;c;)l[--c]()}function dr(o){return new me(sn,!1,o)}function at(o,l){var c=Le;return function(){var p=Rt(),g=Le;try{return Be(c,!0),o.apply(this,arguments)}catch(b){l&&l(b)}finally{Be(g,!1),p&&fn()}}}y(me.prototype,{then:Vt,_then:function(o,l){Xn(this,new cn(null,null,o,l,Le))},catch:function(o){if(arguments.length===1)return this.then(null,o);var l=o,c=arguments[1];return typeof l=="function"?this.then(null,function(p){return(p instanceof l?c:dr)(p)}):this.then(null,function(p){return(p&&p.name===l?c:dr)(p)})},finally:function(o){return this.then(function(l){return me.resolve(o()).then(function(){return l})},function(l){return me.resolve(o()).then(function(){return dr(l)})})},timeout:function(o,l){var c=this;return o<1/0?new me(function(p,g){var b=setTimeout(function(){return g(new ae.Timeout(l))},o);c.then(p,g).finally(clearTimeout.bind(null,b))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&A(me.prototype,Symbol.toStringTag,"Dexie.Promise"),$t.env=He(),y(me,{all:function(){var o=z.apply(null,arguments).map($e);return new me(function(l,c){o.length===0&&l([]);var p=o.length;o.forEach(function(g,b){return me.resolve(g).then(function(_){o[b]=_,--p||l(o)},c)})})},resolve:function(o){return o instanceof me?o:o&&typeof o.then=="function"?new me(function(l,c){o.then(l,c)}):new me(sn,!0,o)},reject:dr,race:function(){var o=z.apply(null,arguments).map($e);return new me(function(l,c){o.map(function(p){return me.resolve(p).then(l,c)})})},PSD:{get:function(){return Le},set:function(o){return Le=o}},totalEchoes:{get:function(){return pr}},newPSD:oe,usePSD:ft,scheduler:{get:function(){return mn},set:function(o){mn=o}},rejectionMapper:{get:function(){return Zn},set:function(o){Zn=o}},follow:function(o,l){return new me(function(c,p){return oe(function(g,b){var _=Le;_.unhandleds=[],_.onunhandled=b,_.finalize=ot(function(){var C,q=this;C=function(){q.unhandleds.length===0?g():b(q.unhandleds[0])},Tt.push(function j(){C(),Tt.splice(Tt.indexOf(j),1)}),++Mt,mn(function(){--Mt==0&&en()},[])},_.finalize),o()},l,c,p)})}}),Lt&&(Lt.allSettled&&A(me,"allSettled",function(){var o=z.apply(null,arguments).map($e);return new me(function(l){o.length===0&&l([]);var c=o.length,p=new Array(c);o.forEach(function(g,b){return me.resolve(g).then(function(_){return p[b]={status:"fulfilled",value:_}},function(_){return p[b]={status:"rejected",reason:_}}).then(function(){return--c||l(p)})})})}),Lt.any&&typeof AggregateError<"u"&&A(me,"any",function(){var o=z.apply(null,arguments).map($e);return new me(function(l,c){o.length===0&&c(new AggregateError([]));var p=o.length,g=new Array(p);o.forEach(function(b,_){return me.resolve(b).then(function(C){return l(C)},function(C){g[_]=C,--p||c(new AggregateError(g))})})})}),Lt.withResolvers&&(me.withResolvers=Lt.withResolvers));var pt={awaits:0,echoes:0,id:0},Fr=0,qn=[],gt=0,pr=0,L=0;function oe(o,l,c,p){var g=Le,b=Object.create(g);return b.parent=g,b.ref=0,b.global=!1,b.id=++L,$t.env,b.env=gn?{Promise:me,PromiseProp:{value:me,configurable:!0,writable:!0},all:me.all,race:me.race,allSettled:me.allSettled,any:me.any,resolve:me.resolve,reject:me.reject}:{},l&&f(b,l),++g.ref,b.finalize=function(){--this.parent.ref||this.parent.finalize()},p=ft(b,o,c,p),b.ref===0&&b.finalize(),p}function we(){return pt.id||(pt.id=++Fr),++pt.awaits,pt.echoes+=Qt,pt.id}function qe(){return!!pt.awaits&&(--pt.awaits==0&&(pt.id=0),pt.echoes=pt.awaits*Qt,!0)}function $e(o){return pt.echoes&&o&&o.constructor===Lt?(we(),o.then(function(l){return qe(),l},function(l){return qe(),Xe(l)})):o}function rt(){var o=qn[qn.length-1];qn.pop(),Be(o,!1)}function Be(o,l){var c,p=Le;(l?!pt.echoes||gt++&&o===Le:!gt||--gt&&o===Le)||queueMicrotask(l?(function(g){++pr,pt.echoes&&--pt.echoes!=0||(pt.echoes=pt.awaits=pt.id=0),qn.push(Le),Be(g,!0)}).bind(null,o):rt),o!==Le&&(Le=o,p===$t&&($t.env=He()),gn&&(c=$t.env.Promise,l=o.env,(p.global||o.global)&&(Object.defineProperty(s,"Promise",l.PromiseProp),c.all=l.all,c.race=l.race,c.resolve=l.resolve,c.reject=l.reject,l.allSettled&&(c.allSettled=l.allSettled),l.any&&(c.any=l.any))))}function He(){var o=s.Promise;return gn?{Promise:o,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:o.all,race:o.race,allSettled:o.allSettled,any:o.any,resolve:o.resolve,reject:o.reject}:{}}function ft(o,l,c,p,g){var b=Le;try{return Be(o,!0),l(c,p,g)}finally{Be(b,!1)}}function ct(o,l,c,p){return typeof o!="function"?o:function(){var g=Le;c&&we(),Be(l,!0);try{return o.apply(this,arguments)}finally{Be(g,!1),p&&queueMicrotask(qe)}}}function Je(o){Promise===Lt&&pt.echoes===0?gt===0?o():enqueueNativeMicroTask(o):setTimeout(o,0)}(""+Bn).indexOf("[native code]")===-1&&(we=qe=Te);var Xe=me.reject,kt="￿",Et="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ot="String expected.",hn=[],vn="__dbnames",gr="readonly",mr="readwrite";function Pt(o,l){return o?l?function(){return o.apply(this,arguments)&&l.apply(this,arguments)}:o:l}var Kr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Hr(o){return typeof o!="string"||/\./.test(o)?function(l){return l}:function(l){return l[o]===void 0&&o in l&&delete(l=P(l))[o],l}}function Ki(){throw ae.Type()}function Ze(o,l){try{var c=Hi(o),p=Hi(l);if(c!==p)return c==="Array"?1:p==="Array"?-1:c==="binary"?1:p==="binary"?-1:c==="string"?1:p==="string"?-1:c==="Date"?1:p!=="Date"?NaN:-1;switch(c){case"number":case"Date":case"string":return l<o?1:o<l?-1:0;case"binary":return function(g,b){for(var _=g.length,C=b.length,q=_<C?_:C,j=0;j<q;++j)if(g[j]!==b[j])return g[j]<b[j]?-1:1;return _===C?0:_<C?-1:1}(zi(o),zi(l));case"Array":return function(g,b){for(var _=g.length,C=b.length,q=_<C?_:C,j=0;j<q;++j){var F=Ze(g[j],b[j]);if(F!==0)return F}return _===C?0:_<C?-1:1}(o,l)}}catch{}return NaN}function Hi(o){var l=typeof o;return l!="object"?l:ArrayBuffer.isView(o)?"binary":(o=E(o),o==="ArrayBuffer"?"binary":o)}function zi(o){return o instanceof Uint8Array?o:ArrayBuffer.isView(o)?new Uint8Array(o.buffer,o.byteOffset,o.byteLength):new Uint8Array(o)}var Lr=(lt.prototype._trans=function(o,l,c){var p=this._tx||Le.trans,g=this.name,b=Ct&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(o==="readonly"?"read":"write"," ").concat(this.name));function _(j,F,R){if(!R.schema[g])throw new ae.NotFound("Table "+g+" not part of transaction");return l(R.idbtrans,R)}var C=Rt();try{var q=p&&p.db._novip===this.db._novip?p===Le.trans?p._promise(o,_,c):oe(function(){return p._promise(o,_,c)},{trans:p,transless:Le.transless||Le}):function j(F,R,H,I){if(F.idbdb&&(F._state.openComplete||Le.letThrough||F._vip)){var B=F._createTransaction(R,H,F._dbSchema);try{B.create(),F._state.PR1398_maxLoop=3}catch(K){return K.name===We.InvalidState&&F.isOpen()&&0<--F._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),F.close({disableAutoOpen:!1}),F.open().then(function(){return j(F,R,H,I)})):Xe(K)}return B._promise(R,function(K,$){return oe(function(){return Le.trans=B,I(K,$,B)})}).then(function(K){if(R==="readwrite")try{B.idbtrans.commit()}catch{}return R==="readonly"?K:B._completion.then(function(){return K})})}if(F._state.openComplete)return Xe(new ae.DatabaseClosed(F._state.dbOpenError));if(!F._state.isBeingOpened){if(!F._state.autoOpen)return Xe(new ae.DatabaseClosed);F.open().catch(Te)}return F._state.dbReadyPromise.then(function(){return j(F,R,H,I)})}(this.db,o,[this.name],_);return b&&(q._consoleTask=b,q=q.catch(function(j){return console.trace(j),Xe(j)})),q}finally{C&&fn()}},lt.prototype.get=function(o,l){var c=this;return o&&o.constructor===Object?this.where(o).first(l):o==null?Xe(new ae.Type("Invalid argument to Table.get()")):this._trans("readonly",function(p){return c.core.get({trans:p,key:o}).then(function(g){return c.hook.reading.fire(g)})}).then(l)},lt.prototype.where=function(o){if(typeof o=="string")return new this.db.WhereClause(this,o);if(u(o))return new this.db.WhereClause(this,"[".concat(o.join("+"),"]"));var l=a(o);if(l.length===1)return this.where(l[0]).equals(o[l[0]]);var c=this.schema.indexes.concat(this.schema.primKey).filter(function(C){if(C.compound&&l.every(function(j){return 0<=C.keyPath.indexOf(j)})){for(var q=0;q<l.length;++q)if(l.indexOf(C.keyPath[q])===-1)return!1;return!0}return!1}).sort(function(C,q){return C.keyPath.length-q.keyPath.length})[0];if(c&&this.db._maxKey!==kt){var b=c.keyPath.slice(0,l.length);return this.where(b).equals(b.map(function(q){return o[q]}))}!c&&Ct&&console.warn("The query ".concat(JSON.stringify(o)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(l.join("+"),"]"));var p=this.schema.idxByName;function g(C,q){return Ze(C,q)===0}var _=l.reduce(function(R,q){var j=R[0],F=R[1],R=p[q],H=o[q];return[j||R,j||!R?Pt(F,R&&R.multi?function(I){return I=ce(I,q),u(I)&&I.some(function(B){return g(H,B)})}:function(I){return g(H,ce(I,q))}):F]},[null,null]),b=_[0],_=_[1];return b?this.where(b.name).equals(o[b.keyPath]).filter(_):c?this.filter(_):this.where(l).equals("")},lt.prototype.filter=function(o){return this.toCollection().and(o)},lt.prototype.count=function(o){return this.toCollection().count(o)},lt.prototype.offset=function(o){return this.toCollection().offset(o)},lt.prototype.limit=function(o){return this.toCollection().limit(o)},lt.prototype.each=function(o){return this.toCollection().each(o)},lt.prototype.toArray=function(o){return this.toCollection().toArray(o)},lt.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},lt.prototype.orderBy=function(o){return new this.db.Collection(new this.db.WhereClause(this,u(o)?"[".concat(o.join("+"),"]"):o))},lt.prototype.reverse=function(){return this.toCollection().reverse()},lt.prototype.mapToClass=function(o){var l,c=this.db,p=this.name;function g(){return l!==null&&l.apply(this,arguments)||this}(this.schema.mappedClass=o).prototype instanceof Ki&&(function(q,j){if(typeof j!="function"&&j!==null)throw new TypeError("Class extends value "+String(j)+" is not a constructor or null");function F(){this.constructor=q}t(q,j),q.prototype=j===null?Object.create(j):(F.prototype=j.prototype,new F)}(g,l=o),Object.defineProperty(g.prototype,"db",{get:function(){return c},enumerable:!1,configurable:!0}),g.prototype.table=function(){return p},o=g);for(var b=new Set,_=o.prototype;_;_=d(_))Object.getOwnPropertyNames(_).forEach(function(q){return b.add(q)});function C(q){if(!q)return q;var j,F=Object.create(o.prototype);for(j in q)if(!b.has(j))try{F[j]=q[j]}catch{}return F}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=C,this.hook("reading",C),o},lt.prototype.defineClass=function(){return this.mapToClass(function(o){f(this,o)})},lt.prototype.add=function(o,l){var c=this,p=this.schema.primKey,g=p.auto,b=p.keyPath,_=o;return b&&g&&(_=Hr(b)(o)),this._trans("readwrite",function(C){return c.core.mutate({trans:C,type:"add",keys:l!=null?[l]:null,values:[_]})}).then(function(C){return C.numFailures?me.reject(C.failures[0]):C.lastResult}).then(function(C){if(b)try{ne(o,b,C)}catch{}return C})},lt.prototype.update=function(o,l){return typeof o!="object"||u(o)?this.where(":id").equals(o).modify(l):(o=ce(o,this.schema.primKey.keyPath),o===void 0?Xe(new ae.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(o).modify(l))},lt.prototype.put=function(o,l){var c=this,p=this.schema.primKey,g=p.auto,b=p.keyPath,_=o;return b&&g&&(_=Hr(b)(o)),this._trans("readwrite",function(C){return c.core.mutate({trans:C,type:"put",values:[_],keys:l!=null?[l]:null})}).then(function(C){return C.numFailures?me.reject(C.failures[0]):C.lastResult}).then(function(C){if(b)try{ne(o,b,C)}catch{}return C})},lt.prototype.delete=function(o){var l=this;return this._trans("readwrite",function(c){return l.core.mutate({trans:c,type:"delete",keys:[o]})}).then(function(c){return c.numFailures?me.reject(c.failures[0]):void 0})},lt.prototype.clear=function(){var o=this;return this._trans("readwrite",function(l){return o.core.mutate({trans:l,type:"deleteRange",range:Kr})}).then(function(l){return l.numFailures?me.reject(l.failures[0]):void 0})},lt.prototype.bulkGet=function(o){var l=this;return this._trans("readonly",function(c){return l.core.getMany({keys:o,trans:c}).then(function(p){return p.map(function(g){return l.hook.reading.fire(g)})})})},lt.prototype.bulkAdd=function(o,l,c){var p=this,g=Array.isArray(l)?l:void 0,b=(c=c||(g?void 0:l))?c.allKeys:void 0;return this._trans("readwrite",function(_){var j=p.schema.primKey,C=j.auto,j=j.keyPath;if(j&&g)throw new ae.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(g&&g.length!==o.length)throw new ae.InvalidArgument("Arguments objects and keys must have the same length");var q=o.length,j=j&&C?o.map(Hr(j)):o;return p.core.mutate({trans:_,type:"add",keys:g,values:j,wantResults:b}).then(function(B){var R=B.numFailures,H=B.results,I=B.lastResult,B=B.failures;if(R===0)return b?H:I;throw new Ke("".concat(p.name,".bulkAdd(): ").concat(R," of ").concat(q," operations failed"),B)})})},lt.prototype.bulkPut=function(o,l,c){var p=this,g=Array.isArray(l)?l:void 0,b=(c=c||(g?void 0:l))?c.allKeys:void 0;return this._trans("readwrite",function(_){var j=p.schema.primKey,C=j.auto,j=j.keyPath;if(j&&g)throw new ae.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(g&&g.length!==o.length)throw new ae.InvalidArgument("Arguments objects and keys must have the same length");var q=o.length,j=j&&C?o.map(Hr(j)):o;return p.core.mutate({trans:_,type:"put",keys:g,values:j,wantResults:b}).then(function(B){var R=B.numFailures,H=B.results,I=B.lastResult,B=B.failures;if(R===0)return b?H:I;throw new Ke("".concat(p.name,".bulkPut(): ").concat(R," of ").concat(q," operations failed"),B)})})},lt.prototype.bulkUpdate=function(o){var l=this,c=this.core,p=o.map(function(_){return _.key}),g=o.map(function(_){return _.changes}),b=[];return this._trans("readwrite",function(_){return c.getMany({trans:_,keys:p,cache:"clone"}).then(function(C){var q=[],j=[];o.forEach(function(R,H){var I=R.key,B=R.changes,K=C[H];if(K){for(var $=0,Y=Object.keys(B);$<Y.length;$++){var X=Y[$],Q=B[X];if(X===l.schema.primKey.keyPath){if(Ze(Q,I)!==0)throw new ae.Constraint("Cannot update primary key in bulkUpdate()")}else ne(K,X,Q)}b.push(H),q.push(I),j.push(K)}});var F=q.length;return c.mutate({trans:_,type:"put",keys:q,values:j,updates:{keys:p,changeSpecs:g}}).then(function(R){var H=R.numFailures,I=R.failures;if(H===0)return F;for(var B=0,K=Object.keys(I);B<K.length;B++){var $,Y=K[B],X=b[Number(Y)];X!=null&&($=I[Y],delete I[Y],I[X]=$)}throw new Ke("".concat(l.name,".bulkUpdate(): ").concat(H," of ").concat(F," operations failed"),I)})})})},lt.prototype.bulkDelete=function(o){var l=this,c=o.length;return this._trans("readwrite",function(p){return l.core.mutate({trans:p,type:"delete",keys:o})}).then(function(_){var g=_.numFailures,b=_.lastResult,_=_.failures;if(g===0)return b;throw new Ke("".concat(l.name,".bulkDelete(): ").concat(g," of ").concat(c," operations failed"),_)})},lt);function lt(){}function wn(o){function l(_,C){if(C){for(var q=arguments.length,j=new Array(q-1);--q;)j[q-1]=arguments[q];return c[_].subscribe.apply(null,j),o}if(typeof _=="string")return c[_]}var c={};l.addEventType=b;for(var p=1,g=arguments.length;p<g;++p)b(arguments[p]);return l;function b(_,C,q){if(typeof _!="object"){var j;C=C||kn;var F={subscribers:[],fire:q=q||Te,subscribe:function(R){F.subscribers.indexOf(R)===-1&&(F.subscribers.push(R),F.fire=C(F.fire,R))},unsubscribe:function(R){F.subscribers=F.subscribers.filter(function(H){return H!==R}),F.fire=F.subscribers.reduce(C,q)}};return c[_]=l[_]=F}a(j=_).forEach(function(R){var H=j[R];if(u(H))b(R,j[R][0],j[R][1]);else{if(H!=="asap")throw new ae.InvalidArgument("Invalid event config");var I=b(R,Ue,function(){for(var B=arguments.length,K=new Array(B);B--;)K[B]=arguments[B];I.subscribers.forEach(function($){ue(function(){$.apply(null,K)})})})}})}}function yr(o,l){return O(l).from({prototype:o}),l}function Qn(o,l){return!(o.filter||o.algorithm||o.or)&&(l?o.justLimit:!o.replayFilter)}function hi(o,l){o.filter=Pt(o.filter,l)}function di(o,l,c){var p=o.replayFilter;o.replayFilter=p?function(){return Pt(p(),l())}:l,o.justLimit=c&&!p}function zr(o,l){if(o.isPrimKey)return l.primaryKey;var c=l.getIndexByKeyPath(o.index);if(!c)throw new ae.Schema("KeyPath "+o.index+" on object store "+l.name+" is not indexed");return c}function Vi(o,l,c){var p=zr(o,l.schema);return l.openCursor({trans:c,values:!o.keysOnly,reverse:o.dir==="prev",unique:!!o.unique,query:{index:p,range:o.range}})}function br(o,l,c,p){var g=o.replayFilter?Pt(o.filter,o.replayFilter()):o.filter;if(o.or){var b={},_=function(C,q,j){var F,R;g&&!g(q,j,function(H){return q.stop(H)},function(H){return q.fail(H)})||((R=""+(F=q.primaryKey))=="[object ArrayBuffer]"&&(R=""+new Uint8Array(F)),v(b,R)||(b[R]=!0,l(C,q,j)))};return Promise.all([o.or._iterate(_,c),Wi(Vi(o,p,c),o.algorithm,_,!o.keysOnly&&o.valueMapper)])}return Wi(Vi(o,p,c),Pt(o.algorithm,g),l,!o.keysOnly&&o.valueMapper)}function Wi(o,l,c,p){var g=at(p?function(b,_,C){return c(p(b),_,C)}:c);return o.then(function(b){if(b)return b.start(function(){var _=function(){return b.continue()};l&&!l(b,function(C){return _=C},function(C){b.stop(C),_=Te},function(C){b.fail(C),_=Te})||g(b.value,b,function(C){return _=C}),_()})})}var Rr=(vr.prototype.execute=function(o){var l=this["@@propmod"];if(l.add!==void 0){var c=l.add;if(u(c))return i(i([],u(o)?o:[],!0),c).sort();if(typeof c=="number")return(Number(o)||0)+c;if(typeof c=="bigint")try{return BigInt(o)+c}catch{return BigInt(0)+c}throw new TypeError("Invalid term ".concat(c))}if(l.remove!==void 0){var p=l.remove;if(u(p))return u(o)?o.filter(function(g){return!p.includes(g)}).sort():[];if(typeof p=="number")return Number(o)-p;if(typeof p=="bigint")try{return BigInt(o)-p}catch{return BigInt(0)-p}throw new TypeError("Invalid subtrahend ".concat(p))}return c=(c=l.replacePrefix)===null||c===void 0?void 0:c[0],c&&typeof o=="string"&&o.startsWith(c)?l.replacePrefix[1]+o.substring(c.length):o},vr);function vr(o){this["@@propmod"]=o}var xn=(Ge.prototype._read=function(o,l){var c=this._ctx;return c.error?c.table._trans(null,Xe.bind(null,c.error)):c.table._trans("readonly",o).then(l)},Ge.prototype._write=function(o){var l=this._ctx;return l.error?l.table._trans(null,Xe.bind(null,l.error)):l.table._trans("readwrite",o,"locked")},Ge.prototype._addAlgorithm=function(o){var l=this._ctx;l.algorithm=Pt(l.algorithm,o)},Ge.prototype._iterate=function(o,l){return br(this._ctx,o,l,this._ctx.table.core)},Ge.prototype.clone=function(o){var l=Object.create(this.constructor.prototype),c=Object.create(this._ctx);return o&&f(c,o),l._ctx=c,l},Ge.prototype.raw=function(){return this._ctx.valueMapper=null,this},Ge.prototype.each=function(o){var l=this._ctx;return this._read(function(c){return br(l,o,c,l.table.core)})},Ge.prototype.count=function(o){var l=this;return this._read(function(c){var p=l._ctx,g=p.table.core;if(Qn(p,!0))return g.count({trans:c,query:{index:zr(p,g.schema),range:p.range}}).then(function(_){return Math.min(_,p.limit)});var b=0;return br(p,function(){return++b,!1},c,g).then(function(){return b})}).then(o)},Ge.prototype.sortBy=function(o,l){var c=o.split(".").reverse(),p=c[0],g=c.length-1;function b(q,j){return j?b(q[c[j]],j-1):q[p]}var _=this._ctx.dir==="next"?1:-1;function C(q,j){return Ze(b(q,g),b(j,g))*_}return this.toArray(function(q){return q.sort(C)}).then(l)},Ge.prototype.toArray=function(o){var l=this;return this._read(function(c){var p=l._ctx;if(p.dir==="next"&&Qn(p,!0)&&0<p.limit){var g=p.valueMapper,b=zr(p,p.table.core.schema);return p.table.core.query({trans:c,limit:p.limit,values:!0,query:{index:b,range:p.range}}).then(function(C){return C=C.result,g?C.map(g):C})}var _=[];return br(p,function(C){return _.push(C)},c,p.table.core).then(function(){return _})},o)},Ge.prototype.offset=function(o){var l=this._ctx;return o<=0||(l.offset+=o,Qn(l)?di(l,function(){var c=o;return function(p,g){return c===0||(c===1?--c:g(function(){p.advance(c),c=0}),!1)}}):di(l,function(){var c=o;return function(){return--c<0}})),this},Ge.prototype.limit=function(o){return this._ctx.limit=Math.min(this._ctx.limit,o),di(this._ctx,function(){var l=o;return function(c,p,g){return--l<=0&&p(g),0<=l}},!0),this},Ge.prototype.until=function(o,l){return hi(this._ctx,function(c,p,g){return!o(c.value)||(p(g),l)}),this},Ge.prototype.first=function(o){return this.limit(1).toArray(function(l){return l[0]}).then(o)},Ge.prototype.last=function(o){return this.reverse().first(o)},Ge.prototype.filter=function(o){var l;return hi(this._ctx,function(c){return o(c.value)}),(l=this._ctx).isMatch=Pt(l.isMatch,o),this},Ge.prototype.and=function(o){return this.filter(o)},Ge.prototype.or=function(o){return new this.db.WhereClause(this._ctx.table,o,this)},Ge.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Ge.prototype.desc=function(){return this.reverse()},Ge.prototype.eachKey=function(o){var l=this._ctx;return l.keysOnly=!l.isMatch,this.each(function(c,p){o(p.key,p)})},Ge.prototype.eachUniqueKey=function(o){return this._ctx.unique="unique",this.eachKey(o)},Ge.prototype.eachPrimaryKey=function(o){var l=this._ctx;return l.keysOnly=!l.isMatch,this.each(function(c,p){o(p.primaryKey,p)})},Ge.prototype.keys=function(o){var l=this._ctx;l.keysOnly=!l.isMatch;var c=[];return this.each(function(p,g){c.push(g.key)}).then(function(){return c}).then(o)},Ge.prototype.primaryKeys=function(o){var l=this._ctx;if(l.dir==="next"&&Qn(l,!0)&&0<l.limit)return this._read(function(p){var g=zr(l,l.table.core.schema);return l.table.core.query({trans:p,values:!1,limit:l.limit,query:{index:g,range:l.range}})}).then(function(p){return p.result}).then(o);l.keysOnly=!l.isMatch;var c=[];return this.each(function(p,g){c.push(g.primaryKey)}).then(function(){return c}).then(o)},Ge.prototype.uniqueKeys=function(o){return this._ctx.unique="unique",this.keys(o)},Ge.prototype.firstKey=function(o){return this.limit(1).keys(function(l){return l[0]}).then(o)},Ge.prototype.lastKey=function(o){return this.reverse().firstKey(o)},Ge.prototype.distinct=function(){var o=this._ctx,o=o.index&&o.table.schema.idxByName[o.index];if(!o||!o.multi)return this;var l={};return hi(this._ctx,function(g){var p=g.primaryKey.toString(),g=v(l,p);return l[p]=!0,!g}),this},Ge.prototype.modify=function(o){var l=this,c=this._ctx;return this._write(function(p){var g,b,_;_=typeof o=="function"?o:(g=a(o),b=g.length,function($){for(var Y=!1,X=0;X<b;++X){var Q=g[X],ie=o[Q],fe=ce($,Q);ie instanceof Rr?(ne($,Q,ie.execute(fe)),Y=!0):fe!==ie&&(ne($,Q,ie),Y=!0)}return Y});var C=c.table.core,R=C.schema.primaryKey,q=R.outbound,j=R.extractKey,F=200,R=l.db._options.modifyChunkSize;R&&(F=typeof R=="object"?R[C.name]||R["*"]||200:R);function H($,Q){var X=Q.failures,Q=Q.numFailures;B+=$-Q;for(var ie=0,fe=a(X);ie<fe.length;ie++){var be=fe[ie];I.push(X[be])}}var I=[],B=0,K=[];return l.clone().primaryKeys().then(function($){function Y(Q){var ie=Math.min(F,$.length-Q);return C.getMany({trans:p,keys:$.slice(Q,Q+ie),cache:"immutable"}).then(function(fe){for(var be=[],he=[],ge=q?[]:null,Ee=[],ye=0;ye<ie;++ye){var _e=fe[ye],Ye={value:P(_e),primKey:$[Q+ye]};_.call(Ye,Ye.value,Ye)!==!1&&(Ye.value==null?Ee.push($[Q+ye]):q||Ze(j(_e),j(Ye.value))===0?(he.push(Ye.value),q&&ge.push($[Q+ye])):(Ee.push($[Q+ye]),be.push(Ye.value)))}return Promise.resolve(0<be.length&&C.mutate({trans:p,type:"add",values:be}).then(function(Qe){for(var et in Qe.failures)Ee.splice(parseInt(et),1);H(be.length,Qe)})).then(function(){return(0<he.length||X&&typeof o=="object")&&C.mutate({trans:p,type:"put",keys:ge,values:he,criteria:X,changeSpec:typeof o!="function"&&o,isAdditionalChunk:0<Q}).then(function(Qe){return H(he.length,Qe)})}).then(function(){return(0<Ee.length||X&&o===En)&&C.mutate({trans:p,type:"delete",keys:Ee,criteria:X,isAdditionalChunk:0<Q}).then(function(Qe){return H(Ee.length,Qe)})}).then(function(){return $.length>Q+ie&&Y(Q+F)})})}var X=Qn(c)&&c.limit===1/0&&(typeof o!="function"||o===En)&&{index:c.index,range:c.range};return Y(0).then(function(){if(0<I.length)throw new Oe("Error modifying one or more objects",I,B,K);return $.length})})})},Ge.prototype.delete=function(){var o=this._ctx,l=o.range;return Qn(o)&&(o.isPrimKey||l.type===3)?this._write(function(c){var p=o.table.core.schema.primaryKey,g=l;return o.table.core.count({trans:c,query:{index:p,range:g}}).then(function(b){return o.table.core.mutate({trans:c,type:"deleteRange",range:g}).then(function(_){var C=_.failures;if(_.lastResult,_.results,_=_.numFailures,_)throw new Oe("Could not delete some values",Object.keys(C).map(function(q){return C[q]}),b-_);return b-_})})}):this.modify(En)},Ge);function Ge(){}var En=function(o,l){return l.value=null};function Ls(o,l){return o<l?-1:o===l?0:1}function In(o,l){return l<o?-1:o===l?0:1}function Bt(o,l,c){return o=o instanceof qt?new o.Collection(o):o,o._ctx.error=new(c||TypeError)(l),o}function wr(o){return new o.Collection(o,function(){return pi("")}).limit(0)}function Vr(o,l,c,p){var g,b,_,C,q,j,F,R=c.length;if(!c.every(function(B){return typeof B=="string"}))return Bt(o,Ot);function H(B){g=B==="next"?function($){return $.toUpperCase()}:function($){return $.toLowerCase()},b=B==="next"?function($){return $.toLowerCase()}:function($){return $.toUpperCase()},_=B==="next"?Ls:In;var K=c.map(function($){return{lower:b($),upper:g($)}}).sort(function($,Y){return _($.lower,Y.lower)});C=K.map(function($){return $.upper}),q=K.map(function($){return $.lower}),F=(j=B)==="next"?"":p}H("next"),o=new o.Collection(o,function(){return jn(C[0],q[R-1]+p)}),o._ondirectionchange=function(B){H(B)};var I=0;return o._addAlgorithm(function(B,K,$){var Y=B.key;if(typeof Y!="string")return!1;var X=b(Y);if(l(X,q,I))return!0;for(var Q=null,ie=I;ie<R;++ie){var fe=function(be,he,ge,Ee,ye,_e){for(var Ye=Math.min(be.length,Ee.length),Qe=-1,et=0;et<Ye;++et){var An=he[et];if(An!==Ee[et])return ye(be[et],ge[et])<0?be.substr(0,et)+ge[et]+ge.substr(et+1):ye(be[et],Ee[et])<0?be.substr(0,et)+Ee[et]+ge.substr(et+1):0<=Qe?be.substr(0,Qe)+he[Qe]+ge.substr(Qe+1):null;ye(be[et],An)<0&&(Qe=et)}return Ye<Ee.length&&_e==="next"?be+ge.substr(be.length):Ye<be.length&&_e==="prev"?be.substr(0,ge.length):Qe<0?null:be.substr(0,Qe)+Ee[Qe]+ge.substr(Qe+1)}(Y,X,C[ie],q[ie],_,j);fe===null&&Q===null?I=ie+1:(Q===null||0<_(Q,fe))&&(Q=fe)}return K(Q!==null?function(){B.continue(Q+F)}:$),!1}),o}function jn(o,l,c,p){return{type:2,lower:o,upper:l,lowerOpen:c,upperOpen:p}}function pi(o){return{type:1,lower:o,upper:o}}var qt=(Object.defineProperty(yt.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),yt.prototype.between=function(o,l,c,p){c=c!==!1,p=p===!0;try{return 0<this._cmp(o,l)||this._cmp(o,l)===0&&(c||p)&&(!c||!p)?wr(this):new this.Collection(this,function(){return jn(o,l,!c,!p)})}catch{return Bt(this,Et)}},yt.prototype.equals=function(o){return o==null?Bt(this,Et):new this.Collection(this,function(){return pi(o)})},yt.prototype.above=function(o){return o==null?Bt(this,Et):new this.Collection(this,function(){return jn(o,void 0,!0)})},yt.prototype.aboveOrEqual=function(o){return o==null?Bt(this,Et):new this.Collection(this,function(){return jn(o,void 0,!1)})},yt.prototype.below=function(o){return o==null?Bt(this,Et):new this.Collection(this,function(){return jn(void 0,o,!1,!0)})},yt.prototype.belowOrEqual=function(o){return o==null?Bt(this,Et):new this.Collection(this,function(){return jn(void 0,o)})},yt.prototype.startsWith=function(o){return typeof o!="string"?Bt(this,Ot):this.between(o,o+kt,!0,!0)},yt.prototype.startsWithIgnoreCase=function(o){return o===""?this.startsWith(o):Vr(this,function(l,c){return l.indexOf(c[0])===0},[o],kt)},yt.prototype.equalsIgnoreCase=function(o){return Vr(this,function(l,c){return l===c[0]},[o],"")},yt.prototype.anyOfIgnoreCase=function(){var o=z.apply(J,arguments);return o.length===0?wr(this):Vr(this,function(l,c){return c.indexOf(l)!==-1},o,"")},yt.prototype.startsWithAnyOfIgnoreCase=function(){var o=z.apply(J,arguments);return o.length===0?wr(this):Vr(this,function(l,c){return c.some(function(p){return l.indexOf(p)===0})},o,kt)},yt.prototype.anyOf=function(){var o=this,l=z.apply(J,arguments),c=this._cmp;try{l.sort(c)}catch{return Bt(this,Et)}if(l.length===0)return wr(this);var p=new this.Collection(this,function(){return jn(l[0],l[l.length-1])});p._ondirectionchange=function(b){c=b==="next"?o._ascending:o._descending,l.sort(c)};var g=0;return p._addAlgorithm(function(b,_,C){for(var q=b.key;0<c(q,l[g]);)if(++g===l.length)return _(C),!1;return c(q,l[g])===0||(_(function(){b.continue(l[g])}),!1)}),p},yt.prototype.notEqual=function(o){return this.inAnyRange([[-1/0,o],[o,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},yt.prototype.noneOf=function(){var o=z.apply(J,arguments);if(o.length===0)return new this.Collection(this);try{o.sort(this._ascending)}catch{return Bt(this,Et)}var l=o.reduce(function(c,p){return c?c.concat([[c[c.length-1][1],p]]):[[-1/0,p]]},null);return l.push([o[o.length-1],this.db._maxKey]),this.inAnyRange(l,{includeLowers:!1,includeUppers:!1})},yt.prototype.inAnyRange=function(Y,l){var c=this,p=this._cmp,g=this._ascending,b=this._descending,_=this._min,C=this._max;if(Y.length===0)return wr(this);if(!Y.every(function(X){return X[0]!==void 0&&X[1]!==void 0&&g(X[0],X[1])<=0}))return Bt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ae.InvalidArgument);var q=!l||l.includeLowers!==!1,j=l&&l.includeUppers===!0,F,R=g;function H(X,Q){return R(X[0],Q[0])}try{(F=Y.reduce(function(X,Q){for(var ie=0,fe=X.length;ie<fe;++ie){var be=X[ie];if(p(Q[0],be[1])<0&&0<p(Q[1],be[0])){be[0]=_(be[0],Q[0]),be[1]=C(be[1],Q[1]);break}}return ie===fe&&X.push(Q),X},[])).sort(H)}catch{return Bt(this,Et)}var I=0,B=j?function(X){return 0<g(X,F[I][1])}:function(X){return 0<=g(X,F[I][1])},K=q?function(X){return 0<b(X,F[I][0])}:function(X){return 0<=b(X,F[I][0])},$=B,Y=new this.Collection(this,function(){return jn(F[0][0],F[F.length-1][1],!q,!j)});return Y._ondirectionchange=function(X){R=X==="next"?($=B,g):($=K,b),F.sort(H)},Y._addAlgorithm(function(X,Q,ie){for(var fe,be=X.key;$(be);)if(++I===F.length)return Q(ie),!1;return!B(fe=be)&&!K(fe)||(c._cmp(be,F[I][1])===0||c._cmp(be,F[I][0])===0||Q(function(){R===g?X.continue(F[I][0]):X.continue(F[I][1])}),!1)}),Y},yt.prototype.startsWithAnyOf=function(){var o=z.apply(J,arguments);return o.every(function(l){return typeof l=="string"})?o.length===0?wr(this):this.inAnyRange(o.map(function(l){return[l,l+kt]})):Bt(this,"startsWithAnyOf() only works with strings")},yt);function yt(){}function tn(o){return at(function(l){return Dn(l),o(l.target.error),!1})}function Dn(o){o.stopPropagation&&o.stopPropagation(),o.preventDefault&&o.preventDefault()}var er="storagemutated",xr="x-storagemutated-1",$n=wn(null,er),Gi=(Wt.prototype._lock=function(){return de(!Le.global),++this._reculock,this._reculock!==1||Le.global||(Le.lockOwnerFor=this),this},Wt.prototype._unlock=function(){if(de(!Le.global),--this._reculock==0)for(Le.global||(Le.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var o=this._blockedFuncs.shift();try{ft(o[1],o[0])}catch{}}return this},Wt.prototype._locked=function(){return this._reculock&&Le.lockOwnerFor!==this},Wt.prototype.create=function(o){var l=this;if(!this.mode)return this;var c=this.db.idbdb,p=this.db._state.dbOpenError;if(de(!this.idbtrans),!o&&!c)switch(p&&p.name){case"DatabaseClosedError":throw new ae.DatabaseClosed(p);case"MissingAPIError":throw new ae.MissingAPI(p.message,p);default:throw new ae.OpenFailed(p)}if(!this.active)throw new ae.TransactionInactive;return de(this._completion._state===null),(o=this.idbtrans=o||(this.db.core||c).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=at(function(g){Dn(g),l._reject(o.error)}),o.onabort=at(function(g){Dn(g),l.active&&l._reject(new ae.Abort(o.error)),l.active=!1,l.on("abort").fire(g)}),o.oncomplete=at(function(){l.active=!1,l._resolve(),"mutatedParts"in o&&$n.storagemutated.fire(o.mutatedParts)}),this},Wt.prototype._promise=function(o,l,c){var p=this;if(o==="readwrite"&&this.mode!=="readwrite")return Xe(new ae.ReadOnly("Transaction is readonly"));if(!this.active)return Xe(new ae.TransactionInactive);if(this._locked())return new me(function(b,_){p._blockedFuncs.push([function(){p._promise(o,l,c).then(b,_)},Le])});if(c)return oe(function(){var b=new me(function(_,C){p._lock();var q=l(_,C,p);q&&q.then&&q.then(_,C)});return b.finally(function(){return p._unlock()}),b._lib=!0,b});var g=new me(function(b,_){var C=l(b,_,p);C&&C.then&&C.then(b,_)});return g._lib=!0,g},Wt.prototype._root=function(){return this.parent?this.parent._root():this},Wt.prototype.waitFor=function(o){var l,c=this._root(),p=me.resolve(o);c._waitingFor?c._waitingFor=c._waitingFor.then(function(){return p}):(c._waitingFor=p,c._waitingQueue=[],l=c.idbtrans.objectStore(c.storeNames[0]),function b(){for(++c._spinCount;c._waitingQueue.length;)c._waitingQueue.shift()();c._waitingFor&&(l.get(-1/0).onsuccess=b)}());var g=c._waitingFor;return new me(function(b,_){p.then(function(C){return c._waitingQueue.push(at(b.bind(null,C)))},function(C){return c._waitingQueue.push(at(_.bind(null,C)))}).finally(function(){c._waitingFor===g&&(c._waitingFor=null)})})},Wt.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ae.Abort))},Wt.prototype.table=function(o){var l=this._memoizedTables||(this._memoizedTables={});if(v(l,o))return l[o];var c=this.schema[o];if(!c)throw new ae.NotFound("Table "+o+" not part of transaction");return c=new this.db.Table(o,c,this),c.core=this.db.core.table(o),l[o]=c},Wt);function Wt(){}function Wr(o,l,c,p,g,b,_){return{name:o,keyPath:l,unique:c,multi:p,auto:g,compound:b,src:(c&&!_?"&":"")+(p?"*":"")+(g?"++":"")+On(l)}}function On(o){return typeof o=="string"?o:o?"["+[].join.call(o,"+")+"]":""}function Gr(o,l,c){return{name:o,primKey:l,indexes:c,mappedClass:null,idxByName:(p=function(g){return[g.name,g]},c.reduce(function(g,b,_){return _=p(b,_),_&&(g[_[0]]=_[1]),g},{}))};var p}var tr=function(o){try{return o.only([[]]),tr=function(){return[[]]},[[]]}catch{return tr=function(){return kt},kt}};function gi(o){return o==null?function(){}:typeof o=="string"?(l=o).split(".").length===1?function(c){return c[l]}:function(c){return ce(c,l)}:function(c){return ce(c,o)};var l}function Yi(o){return[].slice.call(o)}var h=0;function w(o){return o==null?":id":typeof o=="string"?o:"[".concat(o.join("+"),"]")}function k(o,l,q){function p($){if($.type===3)return null;if($.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var I=$.lower,B=$.upper,K=$.lowerOpen,$=$.upperOpen;return I===void 0?B===void 0?null:l.upperBound(B,!!$):B===void 0?l.lowerBound(I,!!K):l.bound(I,B,!!K,!!$)}function g(H){var I,B=H.name;return{name:B,schema:H,mutate:function(K){var $=K.trans,Y=K.type,X=K.keys,Q=K.values,ie=K.range;return new Promise(function(fe,be){fe=at(fe);var he=$.objectStore(B),ge=he.keyPath==null,Ee=Y==="put"||Y==="add";if(!Ee&&Y!=="delete"&&Y!=="deleteRange")throw new Error("Invalid operation type: "+Y);var ye,_e=(X||Q||{length:1}).length;if(X&&Q&&X.length!==Q.length)throw new Error("Given keys array must have same length as given values array.");if(_e===0)return fe({numFailures:0,failures:{},results:[],lastResult:void 0});function Ye(nn){++An,Dn(nn)}var Qe=[],et=[],An=0;if(Y==="deleteRange"){if(ie.type===4)return fe({numFailures:An,failures:et,results:[],lastResult:void 0});ie.type===3?Qe.push(ye=he.clear()):Qe.push(ye=he.delete(p(ie)))}else{var ge=Ee?ge?[Q,X]:[Q,null]:[X,null],ze=ge[0],Yt=ge[1];if(Ee)for(var Jt=0;Jt<_e;++Jt)Qe.push(ye=Yt&&Yt[Jt]!==void 0?he[Y](ze[Jt],Yt[Jt]):he[Y](ze[Jt])),ye.onerror=Ye;else for(Jt=0;Jt<_e;++Jt)Qe.push(ye=he[Y](ze[Jt])),ye.onerror=Ye}function jo(nn){nn=nn.target.result,Qe.forEach(function(vi,Ol){return vi.error!=null&&(et[Ol]=vi.error)}),fe({numFailures:An,failures:et,results:Y==="delete"?X:Qe.map(function(vi){return vi.result}),lastResult:nn})}ye.onerror=function(nn){Ye(nn),jo(nn)},ye.onsuccess=jo})},getMany:function(K){var $=K.trans,Y=K.keys;return new Promise(function(X,Q){X=at(X);for(var ie,fe=$.objectStore(B),be=Y.length,he=new Array(be),ge=0,Ee=0,ye=function(Qe){Qe=Qe.target,he[Qe._pos]=Qe.result,++Ee===ge&&X(he)},_e=tn(Q),Ye=0;Ye<be;++Ye)Y[Ye]!=null&&((ie=fe.get(Y[Ye]))._pos=Ye,ie.onsuccess=ye,ie.onerror=_e,++ge);ge===0&&X(he)})},get:function(K){var $=K.trans,Y=K.key;return new Promise(function(X,Q){X=at(X);var ie=$.objectStore(B).get(Y);ie.onsuccess=function(fe){return X(fe.target.result)},ie.onerror=tn(Q)})},query:(I=j,function(K){return new Promise(function($,Y){$=at($);var X,Q,ie,ge=K.trans,fe=K.values,be=K.limit,ye=K.query,he=be===1/0?void 0:be,Ee=ye.index,ye=ye.range,ge=ge.objectStore(B),Ee=Ee.isPrimaryKey?ge:ge.index(Ee.name),ye=p(ye);if(be===0)return $({result:[]});I?((he=fe?Ee.getAll(ye,he):Ee.getAllKeys(ye,he)).onsuccess=function(_e){return $({result:_e.target.result})},he.onerror=tn(Y)):(X=0,Q=!fe&&"openKeyCursor"in Ee?Ee.openKeyCursor(ye):Ee.openCursor(ye),ie=[],Q.onsuccess=function(_e){var Ye=Q.result;return Ye?(ie.push(fe?Ye.value:Ye.primaryKey),++X===be?$({result:ie}):void Ye.continue()):$({result:ie})},Q.onerror=tn(Y))})}),openCursor:function(K){var $=K.trans,Y=K.values,X=K.query,Q=K.reverse,ie=K.unique;return new Promise(function(fe,be){fe=at(fe);var Ee=X.index,he=X.range,ge=$.objectStore(B),ge=Ee.isPrimaryKey?ge:ge.index(Ee.name),Ee=Q?ie?"prevunique":"prev":ie?"nextunique":"next",ye=!Y&&"openKeyCursor"in ge?ge.openKeyCursor(p(he),Ee):ge.openCursor(p(he),Ee);ye.onerror=tn(be),ye.onsuccess=at(function(_e){var Ye,Qe,et,An,ze=ye.result;ze?(ze.___id=++h,ze.done=!1,Ye=ze.continue.bind(ze),Qe=(Qe=ze.continuePrimaryKey)&&Qe.bind(ze),et=ze.advance.bind(ze),An=function(){throw new Error("Cursor not stopped")},ze.trans=$,ze.stop=ze.continue=ze.continuePrimaryKey=ze.advance=function(){throw new Error("Cursor not started")},ze.fail=at(be),ze.next=function(){var Yt=this,Jt=1;return this.start(function(){return Jt--?Yt.continue():Yt.stop()}).then(function(){return Yt})},ze.start=function(Yt){function Jt(){if(ye.result)try{Yt()}catch(nn){ze.fail(nn)}else ze.done=!0,ze.start=function(){throw new Error("Cursor behind last entry")},ze.stop()}var jo=new Promise(function(nn,vi){nn=at(nn),ye.onerror=tn(vi),ze.fail=vi,ze.stop=function(Ol){ze.stop=ze.continue=ze.continuePrimaryKey=ze.advance=An,nn(Ol)}});return ye.onsuccess=at(function(nn){ye.onsuccess=Jt,Jt()}),ze.continue=Ye,ze.continuePrimaryKey=Qe,ze.advance=et,Jt(),jo},fe(ze)):fe(null)},be)})},count:function(K){var $=K.query,Y=K.trans,X=$.index,Q=$.range;return new Promise(function(ie,fe){var be=Y.objectStore(B),he=X.isPrimaryKey?be:be.index(X.name),be=p(Q),he=be?he.count(be):he.count();he.onsuccess=at(function(ge){return ie(ge.target.result)}),he.onerror=tn(fe)})}}}var b,_,C,F=(_=q,C=Yi((b=o).objectStoreNames),{schema:{name:b.name,tables:C.map(function(H){return _.objectStore(H)}).map(function(H){var I=H.keyPath,$=H.autoIncrement,B=u(I),K={},$={name:H.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:I==null,compound:B,keyPath:I,autoIncrement:$,unique:!0,extractKey:gi(I)},indexes:Yi(H.indexNames).map(function(Y){return H.index(Y)}).map(function(ie){var X=ie.name,Q=ie.unique,fe=ie.multiEntry,ie=ie.keyPath,fe={name:X,compound:u(ie),keyPath:ie,unique:Q,multiEntry:fe,extractKey:gi(ie)};return K[w(ie)]=fe}),getIndexByKeyPath:function(Y){return K[w(Y)]}};return K[":id"]=$.primaryKey,I!=null&&(K[w(I)]=$.primaryKey),$})},hasGetAll:0<C.length&&"getAll"in _.objectStore(C[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),q=F.schema,j=F.hasGetAll,F=q.tables.map(g),R={};return F.forEach(function(H){return R[H.name]=H}),{stack:"dbcore",transaction:o.transaction.bind(o),table:function(H){if(!R[H])throw new Error("Table '".concat(H,"' not found"));return R[H]},MIN_KEY:-1/0,MAX_KEY:tr(l),schema:q}}function te(o,l,c,p){var g=c.IDBKeyRange;return c.indexedDB,{dbcore:(p=k(l,g,p),o.dbcore.reduce(function(b,_){return _=_.create,n(n({},b),_(b))},p))}}function Me(o,p){var c=p.db,p=te(o._middlewares,c,o._deps,p);o.core=p.dbcore,o.tables.forEach(function(g){var b=g.name;o.core.schema.tables.some(function(_){return _.name===b})&&(g.core=o.core.table(b),o[b]instanceof o.Table&&(o[b].core=g.core))})}function ke(o,l,c,p){c.forEach(function(g){var b=p[g];l.forEach(function(_){var C=function q(j,F){return N(j,F)||(j=d(j))&&q(j,F)}(_,g);(!C||"value"in C&&C.value===void 0)&&(_===o.Transaction.prototype||_ instanceof o.Transaction?A(_,g,{get:function(){return this.table(g)},set:function(q){x(this,g,{value:q,writable:!0,configurable:!0,enumerable:!0})}}):_[g]=new o.Table(g,b))})})}function tt(o,l){l.forEach(function(c){for(var p in c)c[p]instanceof o.Table&&delete c[p]})}function nt(o,l){return o._cfg.version-l._cfg.version}function bt(o,l,c,p){var g=o._dbSchema;c.objectStoreNames.contains("$meta")&&!g.$meta&&(g.$meta=Gr("$meta",Mn("")[0],[]),o._storeNames.push("$meta"));var b=o._createTransaction("readwrite",o._storeNames,g);b.create(c),b._completion.catch(p);var _=b._reject.bind(b),C=Le.transless||Le;oe(function(){return Le.trans=b,Le.transless=C,l!==0?(Me(o,c),j=l,((q=b).storeNames.includes("$meta")?q.table("$meta").get("version").then(function(F){return F??j}):me.resolve(j)).then(function(F){return H=F,I=b,B=c,K=[],F=(R=o)._versions,$=R._dbSchema=wt(0,R.idbdb,B),(F=F.filter(function(Y){return Y._cfg.version>=H})).length!==0?(F.forEach(function(Y){K.push(function(){var X=$,Q=Y._cfg.dbschema;Sn(R,X,B),Sn(R,Q,B),$=R._dbSchema=Q;var ie=_t(X,Q);ie.add.forEach(function(Ee){It(B,Ee[0],Ee[1].primKey,Ee[1].indexes)}),ie.change.forEach(function(Ee){if(Ee.recreate)throw new ae.Upgrade("Not yet support for changing primary key");var ye=B.objectStore(Ee.name);Ee.add.forEach(function(_e){return St(ye,_e)}),Ee.change.forEach(function(_e){ye.deleteIndex(_e.name),St(ye,_e)}),Ee.del.forEach(function(_e){return ye.deleteIndex(_e)})});var fe=Y._cfg.contentUpgrade;if(fe&&Y._cfg.version>H){Me(R,B),I._memoizedTables={};var be=re(Q);ie.del.forEach(function(Ee){be[Ee]=X[Ee]}),tt(R,[R.Transaction.prototype]),ke(R,[R.Transaction.prototype],a(be),be),I.schema=be;var he,ge=le(fe);return ge&&we(),ie=me.follow(function(){var Ee;(he=fe(I))&&ge&&(Ee=qe.bind(null,null),he.then(Ee,Ee))}),he&&typeof he.then=="function"?me.resolve(he):ie.then(function(){return he})}}),K.push(function(X){var Q,ie,fe=Y._cfg.dbschema;Q=fe,ie=X,[].slice.call(ie.db.objectStoreNames).forEach(function(be){return Q[be]==null&&ie.db.deleteObjectStore(be)}),tt(R,[R.Transaction.prototype]),ke(R,[R.Transaction.prototype],R._storeNames,R._dbSchema),I.schema=R._dbSchema}),K.push(function(X){R.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(R.idbdb.version/10)===Y._cfg.version?(R.idbdb.deleteObjectStore("$meta"),delete R._dbSchema.$meta,R._storeNames=R._storeNames.filter(function(Q){return Q!=="$meta"})):X.objectStore("$meta").put(Y._cfg.version,"version"))})}),function Y(){return K.length?me.resolve(K.shift()(I.idbtrans)).then(Y):me.resolve()}().then(function(){vt($,B)})):me.resolve();var R,H,I,B,K,$}).catch(_)):(a(g).forEach(function(F){It(c,F,g[F].primKey,g[F].indexes)}),Me(o,c),void me.follow(function(){return o.on.populate.fire(b)}).catch(_));var q,j})}function st(o,l){vt(o._dbSchema,l),l.db.version%10!=0||l.objectStoreNames.contains("$meta")||l.db.createObjectStore("$meta").add(Math.ceil(l.db.version/10-1),"version");var c=wt(0,o.idbdb,l);Sn(o,o._dbSchema,l);for(var p=0,g=_t(c,o._dbSchema).change;p<g.length;p++){var b=function(_){if(_.change.length||_.recreate)return console.warn("Unable to patch indexes of table ".concat(_.name," because it has changes on the type of index or primary key.")),{value:void 0};var C=l.objectStore(_.name);_.add.forEach(function(q){Ct&&console.debug("Dexie upgrade patch: Creating missing index ".concat(_.name,".").concat(q.src)),St(C,q)})}(g[p]);if(typeof b=="object")return b.value}}function _t(o,l){var c,p={del:[],add:[],change:[]};for(c in o)l[c]||p.del.push(c);for(c in l){var g=o[c],b=l[c];if(g){var _={name:c,def:b,recreate:!1,del:[],add:[],change:[]};if(""+(g.primKey.keyPath||"")!=""+(b.primKey.keyPath||"")||g.primKey.auto!==b.primKey.auto)_.recreate=!0,p.change.push(_);else{var C=g.idxByName,q=b.idxByName,j=void 0;for(j in C)q[j]||_.del.push(j);for(j in q){var F=C[j],R=q[j];F?F.src!==R.src&&_.change.push(R):_.add.push(R)}(0<_.del.length||0<_.add.length||0<_.change.length)&&p.change.push(_)}}else p.add.push([c,b])}return p}function It(o,l,c,p){var g=o.db.createObjectStore(l,c.keyPath?{keyPath:c.keyPath,autoIncrement:c.auto}:{autoIncrement:c.auto});return p.forEach(function(b){return St(g,b)}),g}function vt(o,l){a(o).forEach(function(c){l.db.objectStoreNames.contains(c)||(Ct&&console.debug("Dexie: Creating missing table",c),It(l,c,o[c].primKey,o[c].indexes))})}function St(o,l){o.createIndex(l.name,l.keyPath,{unique:l.unique,multiEntry:l.multi})}function wt(o,l,c){var p={};return W(l.objectStoreNames,0).forEach(function(g){for(var b=c.objectStore(g),_=Wr(On(j=b.keyPath),j||"",!0,!1,!!b.autoIncrement,j&&typeof j!="string",!0),C=[],q=0;q<b.indexNames.length;++q){var F=b.index(b.indexNames[q]),j=F.keyPath,F=Wr(F.name,j,!!F.unique,!!F.multiEntry,!1,j&&typeof j!="string",!1);C.push(F)}p[g]=Gr(g,_,C)}),p}function Sn(o,l,c){for(var p=c.db.objectStoreNames,g=0;g<p.length;++g){var b=p[g],_=c.objectStore(b);o._hasGetAll="getAll"in _;for(var C=0;C<_.indexNames.length;++C){var q=_.indexNames[C],j=_.index(q).keyPath,F=typeof j=="string"?j:"["+W(j).join("+")+"]";!l[b]||(j=l[b].idxByName[F])&&(j.name=q,delete l[b].idxByName[F],l[b].idxByName[q]=j)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(o._hasGetAll=!1)}function Mn(o){return o.split(",").map(function(l,c){var p=(l=l.trim()).replace(/([&*]|\+\+)/g,""),g=/^\[/.test(p)?p.match(/^\[(.*)\]$/)[1].split("+"):p;return Wr(p,g||null,/\&/.test(l),/\*/.test(l),/\+\+/.test(l),u(g),c===0)})}var kr=(mi.prototype._parseStoresSpec=function(o,l){a(o).forEach(function(c){if(o[c]!==null){var p=Mn(o[c]),g=p.shift();if(g.unique=!0,g.multi)throw new ae.Schema("Primary key cannot be multi-valued");p.forEach(function(b){if(b.auto)throw new ae.Schema("Only primary key can be marked as autoIncrement (++)");if(!b.keyPath)throw new ae.Schema("Index must have a name and cannot be an empty string")}),l[c]=Gr(c,g,p)}})},mi.prototype.stores=function(c){var l=this.db;this._cfg.storesSource=this._cfg.storesSource?f(this._cfg.storesSource,c):c;var c=l._versions,p={},g={};return c.forEach(function(b){f(p,b._cfg.storesSource),g=b._cfg.dbschema={},b._parseStoresSpec(p,g)}),l._dbSchema=g,tt(l,[l._allTables,l,l.Transaction.prototype]),ke(l,[l._allTables,l,l.Transaction.prototype,this._cfg.tables],a(g),g),l._storeNames=a(g),this},mi.prototype.upgrade=function(o){return this._cfg.contentUpgrade=Xt(this._cfg.contentUpgrade||Te,o),this},mi);function mi(){}function Yr(o,l){var c=o._dbNamesDB;return c||(c=o._dbNamesDB=new Pr(vn,{addons:[],indexedDB:o,IDBKeyRange:l})).version(1).stores({dbnames:"name"}),c.table("dbnames")}function Jr(o){return o&&typeof o.databases=="function"}function fl(o){return oe(function(){return Le.letThrough=!0,o()})}function hl(o){return!("from"in o)}var Gt=function(o,l){if(!this){var c=new Gt;return o&&"d"in o&&f(c,o),c}f(this,arguments.length?{d:1,from:o,to:1<arguments.length?l:o}:{d:0})};function Rs(o,l,c){var p=Ze(l,c);if(!isNaN(p)){if(0<p)throw RangeError();if(hl(o))return f(o,{from:l,to:c,d:1});var g=o.l,p=o.r;if(Ze(c,o.from)<0)return g?Rs(g,l,c):o.l={from:l,to:c,d:1,l:null,r:null},Lh(o);if(0<Ze(l,o.to))return p?Rs(p,l,c):o.r={from:l,to:c,d:1,l:null,r:null},Lh(o);Ze(l,o.from)<0&&(o.from=l,o.l=null,o.d=p?p.d+1:1),0<Ze(c,o.to)&&(o.to=c,o.r=null,o.d=o.l?o.l.d+1:1),c=!o.r,g&&!o.l&&ks(o,g),p&&c&&ks(o,p)}}function ks(o,l){hl(l)||function c(p,q){var b=q.from,_=q.to,C=q.l,q=q.r;Rs(p,b,_),C&&c(p,C),q&&c(p,q)}(o,l)}function Ch(o,l){var c=Lo(l),p=c.next();if(p.done)return!1;for(var g=p.value,b=Lo(o),_=b.next(g.from),C=_.value;!p.done&&!_.done;){if(Ze(C.from,g.to)<=0&&0<=Ze(C.to,g.from))return!0;Ze(g.from,C.from)<0?g=(p=c.next(C.from)).value:C=(_=b.next(g.from)).value}return!1}function Lo(o){var l=hl(o)?null:{s:0,n:o};return{next:function(c){for(var p=0<arguments.length;l;)switch(l.s){case 0:if(l.s=1,p)for(;l.n.l&&Ze(c,l.n.from)<0;)l={up:l,n:l.n.l,s:1};else for(;l.n.l;)l={up:l,n:l.n.l,s:1};case 1:if(l.s=2,!p||Ze(c,l.n.to)<=0)return{value:l.n,done:!1};case 2:if(l.n.r){l.s=3,l={up:l,n:l.n.r,s:0};continue}case 3:l=l.up}return{done:!0}}}}function Lh(o){var l,c,p=(((l=o.r)===null||l===void 0?void 0:l.d)||0)-(((c=o.l)===null||c===void 0?void 0:c.d)||0),g=1<p?"r":p<-1?"l":"";g&&(l=g=="r"?"l":"r",c=n({},o),p=o[g],o.from=p.from,o.to=p.to,o[g]=p[g],c[g]=p[l],(o[l]=c).d=Rh(c)),o.d=Rh(o)}function Rh(c){var l=c.r,c=c.l;return(l?c?Math.max(l.d,c.d):l.d:c?c.d:0)+1}function Ro(o,l){return a(l).forEach(function(c){o[c]?ks(o[c],l[c]):o[c]=function p(g){var b,_,C={};for(b in g)v(g,b)&&(_=g[b],C[b]=!_||typeof _!="object"||S.has(_.constructor)?_:p(_));return C}(l[c])}),o}function dl(o,l){return o.all||l.all||Object.keys(o).some(function(c){return l[c]&&Ch(l[c],o[c])})}y(Gt.prototype,((Bn={add:function(o){return ks(this,o),this},addKey:function(o){return Rs(this,o,o),this},addKeys:function(o){var l=this;return o.forEach(function(c){return Rs(l,c,c)}),this},hasKey:function(o){var l=Lo(this).next(o).value;return l&&Ze(l.from,o)<=0&&0<=Ze(l.to,o)}})[T]=function(){return Lo(this)},Bn));var yi={},pl={},gl=!1;function ko(o){Ro(pl,o),gl||(gl=!0,setTimeout(function(){gl=!1,ml(pl,!(pl={}))},0))}function ml(o,l){l===void 0&&(l=!1);var c=new Set;if(o.all)for(var p=0,g=Object.values(yi);p<g.length;p++)kh(_=g[p],o,c,l);else for(var b in o){var _,C=/^idb\:\/\/(.*)\/(.*)\//.exec(b);C&&(b=C[1],C=C[2],(_=yi["idb://".concat(b,"/").concat(C)])&&kh(_,o,c,l))}c.forEach(function(q){return q()})}function kh(o,l,c,p){for(var g=[],b=0,_=Object.entries(o.queries.query);b<_.length;b++){for(var C=_[b],q=C[0],j=[],F=0,R=C[1];F<R.length;F++){var H=R[F];dl(l,H.obsSet)?H.subscribers.forEach(function($){return c.add($)}):p&&j.push(H)}p&&g.push([q,j])}if(p)for(var I=0,B=g;I<B.length;I++){var K=B[I],q=K[0],j=K[1];o.queries.query[q]=j}}function dw(o){var l=o._state,c=o._deps.indexedDB;if(l.isBeingOpened||o.idbdb)return l.dbReadyPromise.then(function(){return l.dbOpenError?Xe(l.dbOpenError):o});l.isBeingOpened=!0,l.dbOpenError=null,l.openComplete=!1;var p=l.openCanceller,g=Math.round(10*o.verno),b=!1;function _(){if(l.openCanceller!==p)throw new ae.DatabaseClosed("db.open() was cancelled")}function C(){return new me(function(H,I){if(_(),!c)throw new ae.MissingAPI;var B=o.name,K=l.autoSchema||!g?c.open(B):c.open(B,g);if(!K)throw new ae.MissingAPI;K.onerror=tn(I),K.onblocked=at(o._fireOnBlocked),K.onupgradeneeded=at(function($){var Y;F=K.transaction,l.autoSchema&&!o._options.allowEmptyDB?(K.onerror=Dn,F.abort(),K.result.close(),(Y=c.deleteDatabase(B)).onsuccess=Y.onerror=at(function(){I(new ae.NoSuchDatabase("Database ".concat(B," doesnt exist")))})):(F.onerror=tn(I),$=$.oldVersion>Math.pow(2,62)?0:$.oldVersion,R=$<1,o.idbdb=K.result,b&&st(o,F),bt(o,$/10,F,I))},I),K.onsuccess=at(function(){F=null;var $,Y,X,Q,ie,fe=o.idbdb=K.result,be=W(fe.objectStoreNames);if(0<be.length)try{var he=fe.transaction((Q=be).length===1?Q[0]:Q,"readonly");if(l.autoSchema)Y=fe,X=he,($=o).verno=Y.version/10,X=$._dbSchema=wt(0,Y,X),$._storeNames=W(Y.objectStoreNames,0),ke($,[$._allTables],a(X),X);else if(Sn(o,o._dbSchema,he),((ie=_t(wt(0,(ie=o).idbdb,he),ie._dbSchema)).add.length||ie.change.some(function(ge){return ge.add.length||ge.change.length}))&&!b)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."),fe.close(),g=fe.version+1,b=!0,H(C());Me(o,he)}catch{}hn.push(o),fe.onversionchange=at(function(ge){l.vcFired=!0,o.on("versionchange").fire(ge)}),fe.onclose=at(function(ge){o.on("close").fire(ge)}),R&&(ie=o._deps,he=B,fe=ie.indexedDB,ie=ie.IDBKeyRange,Jr(fe)||he===vn||Yr(fe,ie).put({name:he}).catch(Te)),H()},I)}).catch(function(H){switch(H==null?void 0:H.name){case"UnknownError":if(0<l.PR1398_maxLoop)return l.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),C();break;case"VersionError":if(0<g)return g=0,C()}return me.reject(H)})}var q,j=l.dbReadyResolve,F=null,R=!1;return me.race([p,(typeof navigator>"u"?me.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(H){function I(){return indexedDB.databases().finally(H)}q=setInterval(I,100),I()}).finally(function(){return clearInterval(q)}):Promise.resolve()).then(C)]).then(function(){return _(),l.onReadyBeingFired=[],me.resolve(fl(function(){return o.on.ready.fire(o.vip)})).then(function H(){if(0<l.onReadyBeingFired.length){var I=l.onReadyBeingFired.reduce(Xt,Te);return l.onReadyBeingFired=[],me.resolve(fl(function(){return I(o.vip)})).then(H)}})}).finally(function(){l.openCanceller===p&&(l.onReadyBeingFired=null,l.isBeingOpened=!1)}).catch(function(H){l.dbOpenError=H;try{F&&F.abort()}catch{}return p===l.openCanceller&&o._close(),Xe(H)}).finally(function(){l.openComplete=!0,j()}).then(function(){var H;return R&&(H={},o.tables.forEach(function(I){I.schema.indexes.forEach(function(B){B.name&&(H["idb://".concat(o.name,"/").concat(I.name,"/").concat(B.name)]=new Gt(-1/0,[[[]]]))}),H["idb://".concat(o.name,"/").concat(I.name,"/")]=H["idb://".concat(o.name,"/").concat(I.name,"/:dels")]=new Gt(-1/0,[[[]]])}),$n(er).fire(H),ml(H,!0)),o})}function yl(o){function l(b){return o.next(b)}var c=g(l),p=g(function(b){return o.throw(b)});function g(b){return function(q){var C=b(q),q=C.value;return C.done?q:q&&typeof q.then=="function"?q.then(c,p):u(q)?Promise.all(q).then(c,p):c(q)}}return g(l)()}function Po(o,l,c){for(var p=u(o)?o.slice():[o],g=0;g<c;++g)p.push(l);return p}var pw={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(o){return n(n({},o),{table:function(l){var c=o.table(l),p=c.schema,g={},b=[];function _(R,H,I){var B=w(R),K=g[B]=g[B]||[],$=R==null?0:typeof R=="string"?1:R.length,Y=0<H,Y=n(n({},I),{name:Y?"".concat(B,"(virtual-from:").concat(I.name,")"):I.name,lowLevelIndex:I,isVirtual:Y,keyTail:H,keyLength:$,extractKey:gi(R),unique:!Y&&I.unique});return K.push(Y),Y.isPrimaryKey||b.push(Y),1<$&&_($===2?R[0]:R.slice(0,$-1),H+1,I),K.sort(function(X,Q){return X.keyTail-Q.keyTail}),Y}l=_(p.primaryKey.keyPath,0,p.primaryKey),g[":id"]=[l];for(var C=0,q=p.indexes;C<q.length;C++){var j=q[C];_(j.keyPath,0,j)}function F(R){var H,I=R.query.index;return I.isVirtual?n(n({},R),{query:{index:I.lowLevelIndex,range:(H=R.query.range,I=I.keyTail,{type:H.type===1?2:H.type,lower:Po(H.lower,H.lowerOpen?o.MAX_KEY:o.MIN_KEY,I),lowerOpen:!0,upper:Po(H.upper,H.upperOpen?o.MIN_KEY:o.MAX_KEY,I),upperOpen:!0})}}):R}return n(n({},c),{schema:n(n({},p),{primaryKey:l,indexes:b,getIndexByKeyPath:function(R){return(R=g[w(R)])&&R[0]}}),count:function(R){return c.count(F(R))},query:function(R){return c.query(F(R))},openCursor:function(R){var H=R.query.index,I=H.keyTail,B=H.isVirtual,K=H.keyLength;return B?c.openCursor(F(R)).then(function(Y){return Y&&$(Y)}):c.openCursor(R);function $(Y){return Object.create(Y,{continue:{value:function(X){X!=null?Y.continue(Po(X,R.reverse?o.MAX_KEY:o.MIN_KEY,I)):R.unique?Y.continue(Y.key.slice(0,K).concat(R.reverse?o.MIN_KEY:o.MAX_KEY,I)):Y.continue()}},continuePrimaryKey:{value:function(X,Q){Y.continuePrimaryKey(Po(X,o.MAX_KEY,I),Q)}},primaryKey:{get:function(){return Y.primaryKey}},key:{get:function(){var X=Y.key;return K===1?X[0]:X.slice(0,K)}},value:{get:function(){return Y.value}}})}}})}})}};function bl(o,l,c,p){return c=c||{},p=p||"",a(o).forEach(function(g){var b,_,C;v(l,g)?(b=o[g],_=l[g],typeof b=="object"&&typeof _=="object"&&b&&_?(C=E(b))!==E(_)?c[p+g]=l[g]:C==="Object"?bl(b,_,c,p+g+"."):b!==_&&(c[p+g]=l[g]):b!==_&&(c[p+g]=l[g])):c[p+g]=void 0}),a(l).forEach(function(g){v(o,g)||(c[p+g]=l[g])}),c}function vl(o,l){return l.type==="delete"?l.keys:l.keys||l.values.map(o.extractKey)}var gw={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(o){return n(n({},o),{table:function(l){var c=o.table(l),p=c.schema.primaryKey;return n(n({},c),{mutate:function(g){var b=Le.trans,_=b.table(l).hook,C=_.deleting,q=_.creating,j=_.updating;switch(g.type){case"add":if(q.fire===Te)break;return b._promise("readwrite",function(){return F(g)},!0);case"put":if(q.fire===Te&&j.fire===Te)break;return b._promise("readwrite",function(){return F(g)},!0);case"delete":if(C.fire===Te)break;return b._promise("readwrite",function(){return F(g)},!0);case"deleteRange":if(C.fire===Te)break;return b._promise("readwrite",function(){return function R(H,I,B){return c.query({trans:H,values:!1,query:{index:p,range:I},limit:B}).then(function(K){var $=K.result;return F({type:"delete",keys:$,trans:H}).then(function(Y){return 0<Y.numFailures?Promise.reject(Y.failures[0]):$.length<B?{failures:[],numFailures:0,lastResult:void 0}:R(H,n(n({},I),{lower:$[$.length-1],lowerOpen:!0}),B)})})}(g.trans,g.range,1e4)},!0)}return c.mutate(g);function F(R){var H,I,B,K=Le.trans,$=R.keys||vl(p,R);if(!$)throw new Error("Keys missing");return(R=R.type==="add"||R.type==="put"?n(n({},R),{keys:$}):n({},R)).type!=="delete"&&(R.values=i([],R.values)),R.keys&&(R.keys=i([],R.keys)),H=c,B=$,((I=R).type==="add"?Promise.resolve([]):H.getMany({trans:I.trans,keys:B,cache:"immutable"})).then(function(Y){var X=$.map(function(Q,ie){var fe,be,he,ge=Y[ie],Ee={onerror:null,onsuccess:null};return R.type==="delete"?C.fire.call(Ee,Q,ge,K):R.type==="add"||ge===void 0?(fe=q.fire.call(Ee,Q,R.values[ie],K),Q==null&&fe!=null&&(R.keys[ie]=Q=fe,p.outbound||ne(R.values[ie],p.keyPath,Q))):(fe=bl(ge,R.values[ie]),(be=j.fire.call(Ee,fe,Q,ge,K))&&(he=R.values[ie],Object.keys(be).forEach(function(ye){v(he,ye)?he[ye]=be[ye]:ne(he,ye,be[ye])}))),Ee});return c.mutate(R).then(function(Q){for(var ie=Q.failures,fe=Q.results,be=Q.numFailures,Q=Q.lastResult,he=0;he<$.length;++he){var ge=(fe||$)[he],Ee=X[he];ge==null?Ee.onerror&&Ee.onerror(ie[he]):Ee.onsuccess&&Ee.onsuccess(R.type==="put"&&Y[he]?R.values[he]:ge)}return{failures:ie,results:fe,numFailures:be,lastResult:Q}}).catch(function(Q){return X.forEach(function(ie){return ie.onerror&&ie.onerror(Q)}),Promise.reject(Q)})})}}})}})}};function Ph(o,l,c){try{if(!l||l.keys.length<o.length)return null;for(var p=[],g=0,b=0;g<l.keys.length&&b<o.length;++g)Ze(l.keys[g],o[b])===0&&(p.push(c?P(l.values[g]):l.values[g]),++b);return p.length===o.length?p:null}catch{return null}}var mw={stack:"dbcore",level:-1,create:function(o){return{table:function(l){var c=o.table(l);return n(n({},c),{getMany:function(p){if(!p.cache)return c.getMany(p);var g=Ph(p.keys,p.trans._cache,p.cache==="clone");return g?me.resolve(g):c.getMany(p).then(function(b){return p.trans._cache={keys:p.keys,values:p.cache==="clone"?P(b):b},b})},mutate:function(p){return p.type!=="add"&&(p.trans._cache=null),c.mutate(p)}})}}}};function qh(o,l){return o.trans.mode==="readonly"&&!!o.subscr&&!o.trans.explicit&&o.trans.db._options.cache!=="disabled"&&!l.schema.primaryKey.outbound}function Ih(o,l){switch(o){case"query":return l.values&&!l.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var yw={stack:"dbcore",level:0,name:"Observability",create:function(o){var l=o.schema.name,c=new Gt(o.MIN_KEY,o.MAX_KEY);return n(n({},o),{transaction:function(p,g,b){if(Le.subscr&&g!=="readonly")throw new ae.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Le.querier));return o.transaction(p,g,b)},table:function(p){var g=o.table(p),b=g.schema,_=b.primaryKey,R=b.indexes,C=_.extractKey,q=_.outbound,j=_.autoIncrement&&R.filter(function(I){return I.compound&&I.keyPath.includes(_.keyPath)}),F=n(n({},g),{mutate:function(I){function B(ye){return ye="idb://".concat(l,"/").concat(p,"/").concat(ye),Q[ye]||(Q[ye]=new Gt)}var K,$,Y,X=I.trans,Q=I.mutatedParts||(I.mutatedParts={}),ie=B(""),fe=B(":dels"),be=I.type,Ee=I.type==="deleteRange"?[I.range]:I.type==="delete"?[I.keys]:I.values.length<50?[vl(_,I).filter(function(ye){return ye}),I.values]:[],he=Ee[0],ge=Ee[1],Ee=I.trans._cache;return u(he)?(ie.addKeys(he),(Ee=be==="delete"||he.length===ge.length?Ph(he,Ee):null)||fe.addKeys(he),(Ee||ge)&&(K=B,$=Ee,Y=ge,b.indexes.forEach(function(ye){var _e=K(ye.name||"");function Ye(et){return et!=null?ye.extractKey(et):null}function Qe(et){return ye.multiEntry&&u(et)?et.forEach(function(An){return _e.addKey(An)}):_e.addKey(et)}($||Y).forEach(function(et,Yt){var ze=$&&Ye($[Yt]),Yt=Y&&Ye(Y[Yt]);Ze(ze,Yt)!==0&&(ze!=null&&Qe(ze),Yt!=null&&Qe(Yt))})}))):he?(ge={from:(ge=he.lower)!==null&&ge!==void 0?ge:o.MIN_KEY,to:(ge=he.upper)!==null&&ge!==void 0?ge:o.MAX_KEY},fe.add(ge),ie.add(ge)):(ie.add(c),fe.add(c),b.indexes.forEach(function(ye){return B(ye.name).add(c)})),g.mutate(I).then(function(ye){return!he||I.type!=="add"&&I.type!=="put"||(ie.addKeys(ye.results),j&&j.forEach(function(_e){for(var Ye=I.values.map(function(ze){return _e.extractKey(ze)}),Qe=_e.keyPath.findIndex(function(ze){return ze===_.keyPath}),et=0,An=ye.results.length;et<An;++et)Ye[et][Qe]=ye.results[et];B(_e.name).addKeys(Ye)})),X.mutatedParts=Ro(X.mutatedParts||{},Q),ye})}}),R=function(B){var K=B.query,B=K.index,K=K.range;return[B,new Gt((B=K.lower)!==null&&B!==void 0?B:o.MIN_KEY,(K=K.upper)!==null&&K!==void 0?K:o.MAX_KEY)]},H={get:function(I){return[_,new Gt(I.key)]},getMany:function(I){return[_,new Gt().addKeys(I.keys)]},count:R,query:R,openCursor:R};return a(H).forEach(function(I){F[I]=function(B){var K=Le.subscr,$=!!K,Y=qh(Le,g)&&Ih(I,B)?B.obsSet={}:K;if($){var X=function(ge){return ge="idb://".concat(l,"/").concat(p,"/").concat(ge),Y[ge]||(Y[ge]=new Gt)},Q=X(""),ie=X(":dels"),K=H[I](B),$=K[0],K=K[1];if((I==="query"&&$.isPrimaryKey&&!B.values?ie:X($.name||"")).add(K),!$.isPrimaryKey){if(I!=="count"){var fe=I==="query"&&q&&B.values&&g.query(n(n({},B),{values:!1}));return g[I].apply(this,arguments).then(function(ge){if(I==="query"){if(q&&B.values)return fe.then(function(Ye){return Ye=Ye.result,Q.addKeys(Ye),ge});var Ee=B.values?ge.result.map(C):ge.result;(B.values?Q:ie).addKeys(Ee)}else if(I==="openCursor"){var ye=ge,_e=B.values;return ye&&Object.create(ye,{key:{get:function(){return ie.addKey(ye.primaryKey),ye.key}},primaryKey:{get:function(){var Ye=ye.primaryKey;return ie.addKey(Ye),Ye}},value:{get:function(){return _e&&Q.addKey(ye.primaryKey),ye.value}}})}return ge})}ie.add(c)}}return g[I].apply(this,arguments)}}),F}})}};function jh(o,l,c){if(c.numFailures===0)return l;if(l.type==="deleteRange")return null;var p=l.keys?l.keys.length:"values"in l&&l.values?l.values.length:1;return c.numFailures===p?null:(l=n({},l),u(l.keys)&&(l.keys=l.keys.filter(function(g,b){return!(b in c.failures)})),"values"in l&&u(l.values)&&(l.values=l.values.filter(function(g,b){return!(b in c.failures)})),l)}function wl(o,l){return c=o,((p=l).lower===void 0||(p.lowerOpen?0<Ze(c,p.lower):0<=Ze(c,p.lower)))&&(o=o,(l=l).upper===void 0||(l.upperOpen?Ze(o,l.upper)<0:Ze(o,l.upper)<=0));var c,p}function Dh(o,l,H,p,g,b){if(!H||H.length===0)return o;var _=l.query.index,C=_.multiEntry,q=l.query.range,j=p.schema.primaryKey.extractKey,F=_.extractKey,R=(_.lowLevelIndex||_).extractKey,H=H.reduce(function(I,B){var K=I,$=[];if(B.type==="add"||B.type==="put")for(var Y=new Gt,X=B.values.length-1;0<=X;--X){var Q,ie=B.values[X],fe=j(ie);Y.hasKey(fe)||(Q=F(ie),(C&&u(Q)?Q.some(function(ye){return wl(ye,q)}):wl(Q,q))&&(Y.addKey(fe),$.push(ie)))}switch(B.type){case"add":var be=new Gt().addKeys(l.values?I.map(function(_e){return j(_e)}):I),K=I.concat(l.values?$.filter(function(_e){return _e=j(_e),!be.hasKey(_e)&&(be.addKey(_e),!0)}):$.map(function(_e){return j(_e)}).filter(function(_e){return!be.hasKey(_e)&&(be.addKey(_e),!0)}));break;case"put":var he=new Gt().addKeys(B.values.map(function(_e){return j(_e)}));K=I.filter(function(_e){return!he.hasKey(l.values?j(_e):_e)}).concat(l.values?$:$.map(function(_e){return j(_e)}));break;case"delete":var ge=new Gt().addKeys(B.keys);K=I.filter(function(_e){return!ge.hasKey(l.values?j(_e):_e)});break;case"deleteRange":var Ee=B.range;K=I.filter(function(_e){return!wl(j(_e),Ee)})}return K},o);return H===o?o:(H.sort(function(I,B){return Ze(R(I),R(B))||Ze(j(I),j(B))}),l.limit&&l.limit<1/0&&(H.length>l.limit?H.length=l.limit:o.length===l.limit&&H.length<l.limit&&(g.dirty=!0)),b?Object.freeze(H):H)}function $h(o,l){return Ze(o.lower,l.lower)===0&&Ze(o.upper,l.upper)===0&&!!o.lowerOpen==!!l.lowerOpen&&!!o.upperOpen==!!l.upperOpen}function bw(o,l){return function(c,p,g,b){if(c===void 0)return p!==void 0?-1:0;if(p===void 0)return 1;if((p=Ze(c,p))===0){if(g&&b)return 0;if(g)return 1;if(b)return-1}return p}(o.lower,l.lower,o.lowerOpen,l.lowerOpen)<=0&&0<=function(c,p,g,b){if(c===void 0)return p!==void 0?1:0;if(p===void 0)return-1;if((p=Ze(c,p))===0){if(g&&b)return 0;if(g)return-1;if(b)return 1}return p}(o.upper,l.upper,o.upperOpen,l.upperOpen)}function vw(o,l,c,p){o.subscribers.add(c),p.addEventListener("abort",function(){var g,b;o.subscribers.delete(c),o.subscribers.size===0&&(g=o,b=l,setTimeout(function(){g.subscribers.size===0&&U(b,g)},3e3))})}var ww={stack:"dbcore",level:0,name:"Cache",create:function(o){var l=o.schema.name;return n(n({},o),{transaction:function(c,p,g){var b,_,C=o.transaction(c,p,g);return p==="readwrite"&&(_=(b=new AbortController).signal,g=function(q){return function(){if(b.abort(),p==="readwrite"){for(var j=new Set,F=0,R=c;F<R.length;F++){var H=R[F],I=yi["idb://".concat(l,"/").concat(H)];if(I){var B=o.table(H),K=I.optimisticOps.filter(function(_e){return _e.trans===C});if(C._explicit&&q&&C.mutatedParts)for(var $=0,Y=Object.values(I.queries.query);$<Y.length;$++)for(var X=0,Q=(be=Y[$]).slice();X<Q.length;X++)dl((he=Q[X]).obsSet,C.mutatedParts)&&(U(be,he),he.subscribers.forEach(function(_e){return j.add(_e)}));else if(0<K.length){I.optimisticOps=I.optimisticOps.filter(function(_e){return _e.trans!==C});for(var ie=0,fe=Object.values(I.queries.query);ie<fe.length;ie++)for(var be,he,ge,Ee=0,ye=(be=fe[ie]).slice();Ee<ye.length;Ee++)(he=ye[Ee]).res!=null&&C.mutatedParts&&(q&&!he.dirty?(ge=Object.isFrozen(he.res),ge=Dh(he.res,he.req,K,B,he,ge),he.dirty?(U(be,he),he.subscribers.forEach(function(_e){return j.add(_e)})):ge!==he.res&&(he.res=ge,he.promise=me.resolve({result:ge}))):(he.dirty&&U(be,he),he.subscribers.forEach(function(_e){return j.add(_e)})))}}}j.forEach(function(_e){return _e()})}}},C.addEventListener("abort",g(!1),{signal:_}),C.addEventListener("error",g(!1),{signal:_}),C.addEventListener("complete",g(!0),{signal:_})),C},table:function(c){var p=o.table(c),g=p.schema.primaryKey;return n(n({},p),{mutate:function(b){var _=Le.trans;if(g.outbound||_.db._options.cache==="disabled"||_.explicit||_.idbtrans.mode!=="readwrite")return p.mutate(b);var C=yi["idb://".concat(l,"/").concat(c)];return C?(_=p.mutate(b),b.type!=="add"&&b.type!=="put"||!(50<=b.values.length||vl(g,b).some(function(q){return q==null}))?(C.optimisticOps.push(b),b.mutatedParts&&ko(b.mutatedParts),_.then(function(q){0<q.numFailures&&(U(C.optimisticOps,b),(q=jh(0,b,q))&&C.optimisticOps.push(q),b.mutatedParts&&ko(b.mutatedParts))}),_.catch(function(){U(C.optimisticOps,b),b.mutatedParts&&ko(b.mutatedParts)})):_.then(function(q){var j=jh(0,n(n({},b),{values:b.values.map(function(F,R){var H;return q.failures[R]||(F=(H=g.keyPath)!==null&&H!==void 0&&H.includes(".")?P(F):n({},F),ne(F,g.keyPath,q.results[R])),F})}),q);C.optimisticOps.push(j),queueMicrotask(function(){return b.mutatedParts&&ko(b.mutatedParts)})}),_):p.mutate(b)},query:function(b){if(!qh(Le,p)||!Ih("query",b))return p.query(b);var _=((j=Le.trans)===null||j===void 0?void 0:j.db._options.cache)==="immutable",R=Le,C=R.requery,q=R.signal,j=function(B,K,$,Y){var X=yi["idb://".concat(B,"/").concat(K)];if(!X)return[];if(!(K=X.queries[$]))return[null,!1,X,null];var Q=K[(Y.query?Y.query.index.name:null)||""];if(!Q)return[null,!1,X,null];switch($){case"query":var ie=Q.find(function(fe){return fe.req.limit===Y.limit&&fe.req.values===Y.values&&$h(fe.req.query.range,Y.query.range)});return ie?[ie,!0,X,Q]:[Q.find(function(fe){return("limit"in fe.req?fe.req.limit:1/0)>=Y.limit&&(!Y.values||fe.req.values)&&bw(fe.req.query.range,Y.query.range)}),!1,X,Q];case"count":return ie=Q.find(function(fe){return $h(fe.req.query.range,Y.query.range)}),[ie,!!ie,X,Q]}}(l,c,"query",b),F=j[0],R=j[1],H=j[2],I=j[3];return F&&R?F.obsSet=b.obsSet:(R=p.query(b).then(function(B){var K=B.result;if(F&&(F.res=K),_){for(var $=0,Y=K.length;$<Y;++$)Object.freeze(K[$]);Object.freeze(K)}else B.result=P(K);return B}).catch(function(B){return I&&F&&U(I,F),Promise.reject(B)}),F={obsSet:b.obsSet,promise:R,subscribers:new Set,type:"query",req:b,dirty:!1},I?I.push(F):(I=[F],(H=H||(yi["idb://".concat(l,"/").concat(c)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[b.query.index.name||""]=I)),vw(F,I,C,q),F.promise.then(function(B){return{result:Dh(B.result,b,H==null?void 0:H.optimisticOps,p,F,_)}})}})}})}};function qo(o,l){return new Proxy(o,{get:function(c,p,g){return p==="db"?l:Reflect.get(c,p,g)}})}var Pr=(At.prototype.version=function(o){if(isNaN(o)||o<.1)throw new ae.Type("Given version is not a positive number");if(o=Math.round(10*o)/10,this.idbdb||this._state.isBeingOpened)throw new ae.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,o);var l=this._versions,c=l.filter(function(p){return p._cfg.version===o})[0];return c||(c=new this.Version(o),l.push(c),l.sort(nt),c.stores({}),this._state.autoSchema=!1,c)},At.prototype._whenReady=function(o){var l=this;return this.idbdb&&(this._state.openComplete||Le.letThrough||this._vip)?o():new me(function(c,p){if(l._state.openComplete)return p(new ae.DatabaseClosed(l._state.dbOpenError));if(!l._state.isBeingOpened){if(!l._state.autoOpen)return void p(new ae.DatabaseClosed);l.open().catch(Te)}l._state.dbReadyPromise.then(c,p)}).then(o)},At.prototype.use=function(o){var l=o.stack,c=o.create,p=o.level,g=o.name;return g&&this.unuse({stack:l,name:g}),o=this._middlewares[l]||(this._middlewares[l]=[]),o.push({stack:l,create:c,level:p??10,name:g}),o.sort(function(b,_){return b.level-_.level}),this},At.prototype.unuse=function(o){var l=o.stack,c=o.name,p=o.create;return l&&this._middlewares[l]&&(this._middlewares[l]=this._middlewares[l].filter(function(g){return p?g.create!==p:!!c&&g.name!==c})),this},At.prototype.open=function(){var o=this;return ft($t,function(){return dw(o)})},At.prototype._close=function(){var o=this._state,l=hn.indexOf(this);if(0<=l&&hn.splice(l,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}o.isBeingOpened||(o.dbReadyPromise=new me(function(c){o.dbReadyResolve=c}),o.openCanceller=new me(function(c,p){o.cancelOpen=p}))},At.prototype.close=function(c){var l=(c===void 0?{disableAutoOpen:!0}:c).disableAutoOpen,c=this._state;l?(c.isBeingOpened&&c.cancelOpen(new ae.DatabaseClosed),this._close(),c.autoOpen=!1,c.dbOpenError=new ae.DatabaseClosed):(this._close(),c.autoOpen=this._options.autoOpen||c.isBeingOpened,c.openComplete=!1,c.dbOpenError=null)},At.prototype.delete=function(o){var l=this;o===void 0&&(o={disableAutoOpen:!0});var c=0<arguments.length&&typeof arguments[0]!="object",p=this._state;return new me(function(g,b){function _(){l.close(o);var C=l._deps.indexedDB.deleteDatabase(l.name);C.onsuccess=at(function(){var q,j,F;q=l._deps,j=l.name,F=q.indexedDB,q=q.IDBKeyRange,Jr(F)||j===vn||Yr(F,q).delete(j).catch(Te),g()}),C.onerror=tn(b),C.onblocked=l._fireOnBlocked}if(c)throw new ae.InvalidArgument("Invalid closeOptions argument to db.delete()");p.isBeingOpened?p.dbReadyPromise.then(_):_()})},At.prototype.backendDB=function(){return this.idbdb},At.prototype.isOpen=function(){return this.idbdb!==null},At.prototype.hasBeenClosed=function(){var o=this._state.dbOpenError;return o&&o.name==="DatabaseClosed"},At.prototype.hasFailed=function(){return this._state.dbOpenError!==null},At.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(At.prototype,"tables",{get:function(){var o=this;return a(this._allTables).map(function(l){return o._allTables[l]})},enumerable:!1,configurable:!0}),At.prototype.transaction=function(){var o=(function(l,c,p){var g=arguments.length;if(g<2)throw new ae.InvalidArgument("Too few arguments");for(var b=new Array(g-1);--g;)b[g-1]=arguments[g];return p=b.pop(),[l,Se(b),p]}).apply(this,arguments);return this._transaction.apply(this,o)},At.prototype._transaction=function(o,l,c){var p=this,g=Le.trans;g&&g.db===this&&o.indexOf("!")===-1||(g=null);var b,_,C=o.indexOf("?")!==-1;o=o.replace("!","").replace("?","");try{if(_=l.map(function(j){if(j=j instanceof p.Table?j.name:j,typeof j!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return j}),o=="r"||o===gr)b=gr;else{if(o!="rw"&&o!=mr)throw new ae.InvalidArgument("Invalid transaction mode: "+o);b=mr}if(g){if(g.mode===gr&&b===mr){if(!C)throw new ae.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");g=null}g&&_.forEach(function(j){if(g&&g.storeNames.indexOf(j)===-1){if(!C)throw new ae.SubTransaction("Table "+j+" not included in parent transaction.");g=null}}),C&&g&&!g.active&&(g=null)}}catch(j){return g?g._promise(null,function(F,R){R(j)}):Xe(j)}var q=(function j(F,R,H,I,B){return me.resolve().then(function(){var K=Le.transless||Le,$=F._createTransaction(R,H,F._dbSchema,I);if($.explicit=!0,K={trans:$,transless:K},I)$.idbtrans=I.idbtrans;else try{$.create(),$.idbtrans._explicit=!0,F._state.PR1398_maxLoop=3}catch(Q){return Q.name===We.InvalidState&&F.isOpen()&&0<--F._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),F.close({disableAutoOpen:!1}),F.open().then(function(){return j(F,R,H,null,B)})):Xe(Q)}var Y,X=le(B);return X&&we(),K=me.follow(function(){var Q;(Y=B.call($,$))&&(X?(Q=qe.bind(null,null),Y.then(Q,Q)):typeof Y.next=="function"&&typeof Y.throw=="function"&&(Y=yl(Y)))},K),(Y&&typeof Y.then=="function"?me.resolve(Y).then(function(Q){return $.active?Q:Xe(new ae.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):K.then(function(){return Y})).then(function(Q){return I&&$._resolve(),$._completion.then(function(){return Q})}).catch(function(Q){return $._reject(Q),Xe(Q)})})}).bind(null,this,b,_,g,c);return g?g._promise(b,q,"lock"):Le.trans?ft(Le.transless,function(){return p._whenReady(q)}):this._whenReady(q)},At.prototype.table=function(o){if(!v(this._allTables,o))throw new ae.InvalidTable("Table ".concat(o," does not exist"));return this._allTables[o]},At);function At(o,l){var c=this;this._middlewares={},this.verno=0;var p=At.dependencies;this._options=l=n({addons:At.addons,autoOpen:!0,indexedDB:p.indexedDB,IDBKeyRange:p.IDBKeyRange,cache:"cloned"},l),this._deps={indexedDB:l.indexedDB,IDBKeyRange:l.IDBKeyRange},p=l.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var g,b,_,C,q,j={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Te,dbReadyPromise:null,cancelOpen:Te,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:l.autoOpen};j.dbReadyPromise=new me(function(R){j.dbReadyResolve=R}),j.openCanceller=new me(function(R,H){j.cancelOpen=H}),this._state=j,this.name=o,this.on=wn(this,"populate","blocked","versionchange","close",{ready:[Xt,Te]}),this.on.ready.subscribe=Z(this.on.ready.subscribe,function(R){return function(H,I){At.vip(function(){var B,K=c._state;K.openComplete?(K.dbOpenError||me.resolve().then(H),I&&R(H)):K.onReadyBeingFired?(K.onReadyBeingFired.push(H),I&&R(H)):(R(H),B=c,I||R(function $(){B.on.ready.unsubscribe(H),B.on.ready.unsubscribe($)}))})}}),this.Collection=(g=this,yr(xn.prototype,function(Y,$){this.db=g;var I=Kr,B=null;if($)try{I=$()}catch(X){B=X}var K=Y._ctx,$=K.table,Y=$.hook.reading.fire;this._ctx={table:$,index:K.index,isPrimKey:!K.index||$.schema.primKey.keyPath&&K.index===$.schema.primKey.name,range:I,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:B,or:K.or,valueMapper:Y!==Ue?Y:null}})),this.Table=(b=this,yr(Lr.prototype,function(R,H,I){this.db=b,this._tx=I,this.name=R,this.schema=H,this.hook=b._allTables[R]?b._allTables[R].hook:wn(null,{creating:[Ht,Te],reading:[ut,Ue],updating:[Rn,Te],deleting:[zt,Te]})})),this.Transaction=(_=this,yr(Gi.prototype,function(R,H,I,B,K){var $=this;this.db=_,this.mode=R,this.storeNames=H,this.schema=I,this.chromeTransactionDurability=B,this.idbtrans=null,this.on=wn(this,"complete","error","abort"),this.parent=K||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 me(function(Y,X){$._resolve=Y,$._reject=X}),this._completion.then(function(){$.active=!1,$.on.complete.fire()},function(Y){var X=$.active;return $.active=!1,$.on.error.fire(Y),$.parent?$.parent._reject(Y):X&&$.idbtrans&&$.idbtrans.abort(),Xe(Y)})})),this.Version=(C=this,yr(kr.prototype,function(R){this.db=C,this._cfg={version:R,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(q=this,yr(qt.prototype,function(R,H,I){if(this.db=q,this._ctx={table:R,index:H===":id"?null:H,or:I},this._cmp=this._ascending=Ze,this._descending=function(B,K){return Ze(K,B)},this._max=function(B,K){return 0<Ze(B,K)?B:K},this._min=function(B,K){return Ze(B,K)<0?B:K},this._IDBKeyRange=q._deps.IDBKeyRange,!this._IDBKeyRange)throw new ae.MissingAPI})),this.on("versionchange",function(R){0<R.newVersion?console.warn("Another connection wants to upgrade database '".concat(c.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(c.name,"'. Closing db now to resume the delete request.")),c.close({disableAutoOpen:!1})}),this.on("blocked",function(R){!R.newVersion||R.newVersion<R.oldVersion?console.warn("Dexie.delete('".concat(c.name,"') was blocked")):console.warn("Upgrade '".concat(c.name,"' blocked by other connection holding version ").concat(R.oldVersion/10))}),this._maxKey=tr(l.IDBKeyRange),this._createTransaction=function(R,H,I,B){return new c.Transaction(R,H,I,c._options.chromeTransactionDurability,B)},this._fireOnBlocked=function(R){c.on("blocked").fire(R),hn.filter(function(H){return H.name===c.name&&H!==c&&!H._state.vcFired}).map(function(H){return H.on("versionchange").fire(R)})},this.use(mw),this.use(ww),this.use(yw),this.use(pw),this.use(gw);var F=new Proxy(this,{get:function(R,H,I){if(H==="_vip")return!0;if(H==="table")return function(K){return qo(c.table(K),F)};var B=Reflect.get(R,H,I);return B instanceof Lr?qo(B,F):H==="tables"?B.map(function(K){return qo(K,F)}):H==="_createTransaction"?function(){return qo(B.apply(this,arguments),F)}:B}});this.vip=F,p.forEach(function(R){return R(c)})}var Io,Bn=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",xw=(xl.prototype.subscribe=function(o,l,c){return this._subscribe(o&&typeof o!="function"?o:{next:o,error:l,complete:c})},xl.prototype[Bn]=function(){return this},xl);function xl(o){this._subscribe=o}try{Io={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{Io={indexedDB:null,IDBKeyRange:null}}function Mh(o){var l,c=!1,p=new xw(function(g){var b=le(o),_,C=!1,q={},j={},F={get closed(){return C},unsubscribe:function(){C||(C=!0,_&&_.abort(),R&&$n.storagemutated.unsubscribe(I))}};g.start&&g.start(F);var R=!1,H=function(){return Je(B)},I=function(K){Ro(q,K),dl(j,q)&&H()},B=function(){var K,$,Y;!C&&Io.indexedDB&&(q={},K={},_&&_.abort(),_=new AbortController,Y=function(X){var Q=Rt();try{b&&we();var ie=oe(o,X);return ie=b?ie.finally(qe):ie}finally{Q&&fn()}}($={subscr:K,signal:_.signal,requery:H,querier:o,trans:null}),Promise.resolve(Y).then(function(X){c=!0,l=X,C||$.signal.aborted||(q={},function(Q){for(var ie in Q)if(v(Q,ie))return;return 1}(j=K)||R||($n(er,I),R=!0),Je(function(){return!C&&g.next&&g.next(X)}))},function(X){c=!1,["DatabaseClosedError","AbortError"].includes(X==null?void 0:X.name)||C||Je(function(){C||g.error&&g.error(X)})}))};return setTimeout(H,0),F});return p.hasValue=function(){return c},p.getValue=function(){return l},p}var bi=Pr;function El(o){var l=Zr;try{Zr=!0,$n.storagemutated.fire(o),ml(o,!0)}finally{Zr=l}}y(bi,n(n({},De),{delete:function(o){return new bi(o,{addons:[]}).delete()},exists:function(o){return new bi(o,{addons:[]}).open().then(function(l){return l.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(o){try{return l=bi.dependencies,c=l.indexedDB,l=l.IDBKeyRange,(Jr(c)?Promise.resolve(c.databases()).then(function(p){return p.map(function(g){return g.name}).filter(function(g){return g!==vn})}):Yr(c,l).toCollection().primaryKeys()).then(o)}catch{return Xe(new ae.MissingAPI)}var l,c},defineClass:function(){return function(o){f(this,o)}},ignoreTransaction:function(o){return Le.trans?ft(Le.transless,o):o()},vip:fl,async:function(o){return function(){try{var l=yl(o.apply(this,arguments));return l&&typeof l.then=="function"?l:me.resolve(l)}catch(c){return Xe(c)}}},spawn:function(o,l,c){try{var p=yl(o.apply(c,l||[]));return p&&typeof p.then=="function"?p:me.resolve(p)}catch(g){return Xe(g)}},currentTransaction:{get:function(){return Le.trans||null}},waitFor:function(o,l){return l=me.resolve(typeof o=="function"?bi.ignoreTransaction(o):o).timeout(l||6e4),Le.trans?Le.trans.waitFor(l):l},Promise:me,debug:{get:function(){return Ct},set:function(o){Nr(o)}},derive:O,extend:f,props:y,override:Z,Events:wn,on:$n,liveQuery:Mh,extendObservabilitySet:Ro,getByKeyPath:ce,setByKeyPath:ne,delByKeyPath:function(o,l){typeof l=="string"?ne(o,l,void 0):"length"in l&&[].map.call(l,function(c){ne(o,c,void 0)})},shallowClone:re,deepClone:P,getObjectDiff:bl,cmp:Ze,asap:ue,minKey:-1/0,addons:[],connections:hn,errnames:We,dependencies:Io,cache:yi,semVer:"4.0.11",version:"4.0.11".split(".").map(function(o){return parseInt(o)}).reduce(function(o,l,c){return o+l/Math.pow(10,2*c)})})),bi.maxKey=tr(bi.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&($n(er,function(o){Zr||(o=new CustomEvent(xr,{detail:o}),Zr=!0,dispatchEvent(o),Zr=!1)}),addEventListener(xr,function(o){o=o.detail,Zr||El(o)}));var Ji,Zr=!1,Bh=function(){};return typeof BroadcastChannel<"u"&&((Bh=function(){(Ji=new BroadcastChannel(xr)).onmessage=function(o){return o.data&&El(o.data)}})(),typeof Ji.unref=="function"&&Ji.unref(),$n(er,function(o){Zr||Ji.postMessage(o)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(o){if(!Pr.disableBfCache&&o.persisted){Ct&&console.debug("Dexie: handling persisted pagehide"),Ji!=null&&Ji.close();for(var l=0,c=hn;l<c.length;l++)c[l].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(o){!Pr.disableBfCache&&o.persisted&&(Ct&&console.debug("Dexie: handling persisted pageshow"),Bh(),El({all:new Gt(-1/0,[[]])}))})),me.rejectionMapper=function(o,l){return!o||o instanceof pe||o instanceof TypeError||o instanceof SyntaxError||!o.name||!Ie[o.name]?o:(l=new Ie[o.name](l||o.message,o),"stack"in o&&A(l,"stack",{get:function(){return this.inner.stack}}),l)},Nr(Ct),n(Pr,Object.freeze({__proto__:null,Dexie:Pr,liveQuery:Mh,Entity:Ki,cmp:Ze,PropModification:Rr,replacePrefix:function(o,l){return new Rr({replacePrefix:[o,l]})},add:function(o){return new Rr({add:o})},remove:function(o){return new Rr({remove:o})},default:Pr,RangeSet:Gt,mergeRanges:ks,rangesOverlap:Ch}),{default:Pr}),Pr})}(Ya)),Ya.exports}var A1=S1();const Ja=Bi(A1),Lf=Symbol.for("Dexie"),go=globalThis[Lf]||(globalThis[Lf]=Ja);if(Ja.semVer!==go.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${Ja.semVer} and ${go.semVer}`);const{liveQuery:nx,mergeRanges:rx,rangesOverlap:ix,RangeSet:sx,cmp:ox,Entity:ax,PropModification:lx,replacePrefix:ux,add:cx,remove:fx}=go;class T1 extends go{constructor(){super("db"),Sf(this,"rows"),this.version(1).stores({rows:"++id, key"})}}new T1;var mo={},yo={},Za,Rf;function kf(){if(Rf)return Za;Rf=1,Za=r;function r(t,n){if(n!=="$")for(var i=e(n),s=0;s<i.length;s++)n=i[s].toString().replace(/\\"/g,'"'),!(typeof t[n]>"u"&&s!==i.length-1)&&(t=t[n]);return t}function e(t){for(var n=/(?:\.(\w+))|(?:\[(\d+)\])|(?:\["((?:[^\\"]|\\.)*)"\])/g,i=[],s;s=n.exec(t);)i.push(s[1]||s[2]||s[3]);return i}return Za}var Os={},Pf;function _1(){if(Pf)return Os;Pf=1;var r=kf(),e=jf();return Os.getRegexFlags=function(t){var n="";return t.ignoreCase&&(n+="i"),t.global&&(n+="g"),t.multiline&&(n+="m"),n},Os.stringifyFunction=function(t,n){if(typeof n=="function")return n(t);var i=t.toString(),s=i.match(/^[^{]*{|^[^=]*=>/),a=s?s[0]:"<function> ",u=i[i.length-1]==="}"?"}":"";return a.replace(/\r\n|\n/g," ").replace(/\s+/g," ")+" /* ... */ "+u},Os.restore=function(t,n){var i=t[0],s=t.slice(1);switch(i){case"$":return r(n,t);case"r":var a=s.indexOf(","),u=s.slice(0,a),f=s.slice(a+1);return RegExp(f,u);case"d":return new Date(+s);case"f":var d=function(){throw new Error("can't run jsan parsed function")};return d.toString=function(){return s},d;case"u":return;case"e":var m=new Error(s);return m.stack="Stack is unavailable for jsan parsed errors",m;case"s":return Symbol(s);case"g":return Symbol.for(s);case"m":return new Map(e.parse(s));case"l":return new Set(e.parse(s));case"n":return NaN;case"i":return 1/0;case"y":return-1/0;default:return console.warn("unknown type",t),t}},Os}var qf;function N1(){if(qf)return yo;qf=1,kf();var r=_1(),e=typeof WeakMap<"u"?WeakMap:function(){var t=[],n=[];return{set:function(i,s){t.push(i),n.push(s)},get:function(i){for(var s=0;s<t.length;s++)if(t[s]===i)return n[s]}}};return yo.decycle=function t(n,i,s,a){a=a||new e;var u=!Object.prototype.hasOwnProperty.call(i,"circular"),f=i.refs!==!1;return function d(m,v,y){var x,A,O,N=typeof s=="function"?s(y||"",m):m;if(i.date&&N instanceof Date)return{$jsan:"d"+N.getTime()};if(i.regex&&N instanceof RegExp)return{$jsan:"r"+r.getRegexFlags(N)+","+N.source};if(i.function&&typeof N=="function")return{$jsan:"f"+r.stringifyFunction(N,i.function)};if(i.nan&&typeof N=="number"&&isNaN(N))return{$jsan:"n"};if(i.infinity){if(Number.POSITIVE_INFINITY===N)return{$jsan:"i"};if(Number.NEGATIVE_INFINITY===N)return{$jsan:"y"}}if(i.undefined&&N===void 0)return{$jsan:"u"};if(i.error&&N instanceof Error)return{$jsan:"e"+N.message};if(i.symbol&&typeof N=="symbol"){var M=Symbol.keyFor(N);return M!==void 0?{$jsan:"g"+M}:{$jsan:"s"+N.toString().slice(7,-1)}}if(i.map&&typeof Map=="function"&&N instanceof Map&&typeof Array.from=="function")return{$jsan:"m"+JSON.stringify(t(Array.from(N),i,s,a))};if(i.set&&typeof Set=="function"&&N instanceof Set&&typeof Array.from=="function")return{$jsan:"l"+JSON.stringify(t(Array.from(N),i,s,a))};if(N&&typeof N.toJSON=="function")try{N=N.toJSON(y)}catch{var W=y||"$";return"toJSON failed for '"+(a.get(N)||W)+"'"}if(typeof N=="object"&&N!==null&&!(N instanceof Boolean)&&!(N instanceof Date)&&!(N instanceof Number)&&!(N instanceof RegExp)&&!(N instanceof String)&&typeof N!="symbol"&&!(N instanceof Error)){if(typeof N=="object"){var Z=a.get(N);if(Z){if(u&&f)return{$jsan:Z};var de=v.split(".").slice(0,-1).join(".");if(de.indexOf(Z)===0)return u?{$jsan:Z}:typeof i.circular=="function"?i.circular(N,v,Z):i.circular;if(f)return{$jsan:Z}}a.set(N,v)}if(Object.prototype.toString.apply(N)==="[object Array]")for(O=[],x=0;x<N.length;x+=1)O[x]=d(N[x],v+"["+x+"]",x);else{O={};for(A in N)if(Object.prototype.hasOwnProperty.call(N,A)){var ue=/^\w+$/.test(A)?"."+A:"["+JSON.stringify(A)+"]";O[A]=A==="$jsan"?[d(N[A],v+ue)]:d(N[A],v+ue,A)}}return O}return N}(n,"$")},yo.retrocycle=function(t){return function n(i){var s,a,u;if(i&&typeof i=="object")if(Object.prototype.toString.apply(i)==="[object Array]")for(s=0;s<i.length;s+=1)a=i[s],a&&typeof a=="object"&&(a.$jsan?i[s]=r.restore(a.$jsan,t):n(a));else for(u in i){if(typeof i[u]=="string"&&u==="$jsan")return r.restore(i.$jsan,t);u==="$jsan"&&(i[u]=i[u][0]),typeof i[u]=="object"&&(a=i[u],a&&typeof a=="object"&&(a.$jsan?i[u]=r.restore(a.$jsan,t):n(a)))}return i}(t)},yo}var If;function jf(){if(If)return mo;If=1;var r=N1();return mo.stringify=function(e,t,n,i){if(arguments.length<4)try{return arguments.length===1?JSON.stringify(e):JSON.stringify.apply(JSON,arguments)}catch{}var s=i||!1;typeof s=="boolean"&&(s={date:s,function:s,regex:s,undefined:s,error:s,symbol:s,map:s,set:s,nan:s,infinity:s});var a=r.decycle(e,s,t);return arguments.length===1?JSON.stringify(a):JSON.stringify(a,Array.isArray(t)?t:null,n)},mo.parse=function(e,t){var n=/"\$jsan"/.test(e),i;return arguments.length===1?i=JSON.parse(e):i=JSON.parse(e,t),n&&(i=r.retrocycle(i)),i},mo}var Df,$f;function C1(){return $f||($f=1,Df=jf()),Df}var L1=C1();const Mf=Bi(L1),R1=(r=null,e,t,n=!0)=>Mf.stringify(r,e,t,n),k1=(r,e)=>Mf.parse(r,e),Bf={stringify:R1,parse:k1};function Uf(r,e){return function(){return r.apply(e,arguments)}}const{toString:P1}=Object.prototype,{getPrototypeOf:Xa}=Object,bo=(r=>e=>{const t=P1.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Yn=r=>(r=r.toLowerCase(),e=>bo(e)===r),vo=r=>e=>typeof e===r,{isArray:Ui}=Array,Ss=vo("undefined");function q1(r){return r!==null&&!Ss(r)&&r.constructor!==null&&!Ss(r.constructor)&&pn(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Ff=Yn("ArrayBuffer");function I1(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&Ff(r.buffer),e}const j1=vo("string"),pn=vo("function"),Kf=vo("number"),wo=r=>r!==null&&typeof r=="object",D1=r=>r===!0||r===!1,xo=r=>{if(bo(r)!=="object")return!1;const e=Xa(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},$1=Yn("Date"),M1=Yn("File"),B1=Yn("Blob"),U1=Yn("FileList"),F1=r=>wo(r)&&pn(r.pipe),K1=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||pn(r.append)&&((e=bo(r))==="formdata"||e==="object"&&pn(r.toString)&&r.toString()==="[object FormData]"))},H1=Yn("URLSearchParams"),[z1,V1,W1,G1]=["ReadableStream","Request","Response","Headers"].map(Yn),Y1=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function As(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),Ui(r))for(n=0,i=r.length;n<i;n++)e.call(null,r[n],n,r);else{const s=t?Object.getOwnPropertyNames(r):Object.keys(r),a=s.length;let u;for(n=0;n<a;n++)u=s[n],e.call(null,r[u],u,r)}}function Hf(r,e){e=e.toLowerCase();const t=Object.keys(r);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const ui=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zf=r=>!Ss(r)&&r!==ui;function Qa(){const{caseless:r}=zf(this)&&this||{},e={},t=(n,i)=>{const s=r&&Hf(e,i)||i;xo(e[s])&&xo(n)?e[s]=Qa(e[s],n):xo(n)?e[s]=Qa({},n):Ui(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&As(arguments[n],t);return e}const J1=(r,e,t,{allOwnKeys:n}={})=>(As(e,(i,s)=>{t&&pn(i)?r[s]=Uf(i,t):r[s]=i},{allOwnKeys:n}),r),Z1=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),X1=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},Q1=(r,e,t,n)=>{let i,s,a;const u={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)a=i[s],(!n||n(a,r,e))&&!u[a]&&(e[a]=r[a],u[a]=!0);r=t!==!1&&Xa(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},e0=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},t0=r=>{if(!r)return null;if(Ui(r))return r;let e=r.length;if(!Kf(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},n0=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&Xa(Uint8Array)),r0=(r,e)=>{const t=(r&&r[Symbol.iterator]).call(r);let n;for(;(n=t.next())&&!n.done;){const i=n.value;e.call(r,i[0],i[1])}},i0=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},s0=Yn("HTMLFormElement"),o0=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Vf=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),a0=Yn("RegExp"),Wf=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};As(t,(i,s)=>{let a;(a=e(i,s,r))!==!1&&(n[s]=a||i)}),Object.defineProperties(r,n)},l0=r=>{Wf(r,(e,t)=>{if(pn(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(pn(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},u0=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return Ui(r)?n(r):n(String(r).split(e)),t},c0=()=>{},f0=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function h0(r){return!!(r&&pn(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const d0=r=>{const e=new Array(10),t=(n,i)=>{if(wo(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=Ui(n)?[]:{};return As(n,(a,u)=>{const f=t(a,i+1);!Ss(f)&&(s[u]=f)}),e[i]=void 0,s}}return n};return t(r,0)},p0=Yn("AsyncFunction"),g0=r=>r&&(wo(r)||pn(r))&&pn(r.then)&&pn(r.catch),Gf=((r,e)=>r?setImmediate:e?((t,n)=>(ui.addEventListener("message",({source:i,data:s})=>{i===ui&&s===t&&n.length&&n.shift()()},!1),i=>{n.push(i),ui.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",pn(ui.postMessage)),m0=typeof queueMicrotask<"u"?queueMicrotask.bind(ui):typeof process<"u"&&process.nextTick||Gf,ee={isArray:Ui,isArrayBuffer:Ff,isBuffer:q1,isFormData:K1,isArrayBufferView:I1,isString:j1,isNumber:Kf,isBoolean:D1,isObject:wo,isPlainObject:xo,isReadableStream:z1,isRequest:V1,isResponse:W1,isHeaders:G1,isUndefined:Ss,isDate:$1,isFile:M1,isBlob:B1,isRegExp:a0,isFunction:pn,isStream:F1,isURLSearchParams:H1,isTypedArray:n0,isFileList:U1,forEach:As,merge:Qa,extend:J1,trim:Y1,stripBOM:Z1,inherits:X1,toFlatObject:Q1,kindOf:bo,kindOfTest:Yn,endsWith:e0,toArray:t0,forEachEntry:r0,matchAll:i0,isHTMLForm:s0,hasOwnProperty:Vf,hasOwnProp:Vf,reduceDescriptors:Wf,freezeMethods:l0,toObjectSet:u0,toCamelCase:o0,noop:c0,toFiniteNumber:f0,findKey:Hf,global:ui,isContextDefined:zf,isSpecCompliantForm:h0,toJSONObject:d0,isAsyncFn:p0,isThenable:g0,setImmediate:Gf,asap:m0};function Ve(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ee.inherits(Ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ee.toJSONObject(this.config),code:this.code,status:this.status}}});const Yf=Ve.prototype,Jf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Jf[r]={value:r}}),Object.defineProperties(Ve,Jf),Object.defineProperty(Yf,"isAxiosError",{value:!0}),Ve.from=(r,e,t,n,i,s)=>{const a=Object.create(Yf);return ee.toFlatObject(r,a,function(u){return u!==Error.prototype},u=>u!=="isAxiosError"),Ve.call(a,r.message,e,t,n,i),a.cause=r,a.name=r.name,s&&Object.assign(a,s),a};const y0=null;function el(r){return ee.isPlainObject(r)||ee.isArray(r)}function Zf(r){return ee.endsWith(r,"[]")?r.slice(0,-2):r}function Xf(r,e,t){return r?r.concat(e).map(function(n,i){return n=Zf(n),!t&&i?"["+n+"]":n}).join(t?".":""):e}function b0(r){return ee.isArray(r)&&!r.some(el)}const v0=ee.toFlatObject(ee,{},null,function(r){return/^is[A-Z]/.test(r)});function Eo(r,e,t){if(!ee.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=ee.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,A){return!ee.isUndefined(A[x])});const n=t.metaTokens,i=t.visitor||d,s=t.dots,a=t.indexes,u=(t.Blob||typeof Blob<"u"&&Blob)&&ee.isSpecCompliantForm(e);if(!ee.isFunction(i))throw new TypeError("visitor must be a function");function f(x){if(x===null)return"";if(ee.isDate(x))return x.toISOString();if(!u&&ee.isBlob(x))throw new Ve("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(x)||ee.isTypedArray(x)?u&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function d(x,A,O){let N=x;if(x&&!O&&typeof x=="object"){if(ee.endsWith(A,"{}"))A=n?A:A.slice(0,-2),x=JSON.stringify(x);else if(ee.isArray(x)&&b0(x)||(ee.isFileList(x)||ee.endsWith(A,"[]"))&&(N=ee.toArray(x)))return A=Zf(A),N.forEach(function(M,W){!(ee.isUndefined(M)||M===null)&&e.append(a===!0?Xf([A],W,s):a===null?A:A+"[]",f(M))}),!1}return el(x)?!0:(e.append(Xf(O,A,s),f(x)),!1)}const m=[],v=Object.assign(v0,{defaultVisitor:d,convertValue:f,isVisitable:el});function y(x,A){if(!ee.isUndefined(x)){if(m.indexOf(x)!==-1)throw Error("Circular reference detected in "+A.join("."));m.push(x),ee.forEach(x,function(O,N){(!(ee.isUndefined(O)||O===null)&&i.call(e,O,ee.isString(N)?N.trim():N,A,v))===!0&&y(O,A?A.concat(N):[N])}),m.pop()}}if(!ee.isObject(r))throw new TypeError("data must be an object");return y(r),e}function Qf(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function tl(r,e){this._pairs=[],r&&Eo(r,this,e)}const eh=tl.prototype;eh.append=function(r,e){this._pairs.push([r,e])},eh.toString=function(r){const e=r?function(t){return r.call(this,t,Qf)}:Qf;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function w0(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function th(r,e,t){if(!e)return r;const n=t&&t.encode||w0;ee.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let s;if(i?s=i(e,t):s=ee.isURLSearchParams(e)?e.toString():new tl(e,t).toString(n),s){const a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class nh{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ee.forEach(this.handlers,function(t){t!==null&&e(t)})}}const rh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},x0=typeof URLSearchParams<"u"?URLSearchParams:tl,E0=typeof FormData<"u"?FormData:null,O0=typeof Blob<"u"?Blob:null,S0={isBrowser:!0,classes:{URLSearchParams:x0,FormData:E0,Blob:O0},protocols:["http","https","file","blob","url","data"]},nl=typeof window<"u"&&typeof document<"u",rl=typeof navigator=="object"&&navigator||void 0,A0=nl&&(!rl||["ReactNative","NativeScript","NS"].indexOf(rl.product)<0),T0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_0=nl&&window.location.href||"http://localhost",N0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:nl,hasStandardBrowserEnv:A0,hasStandardBrowserWebWorkerEnv:T0,navigator:rl,origin:_0},Symbol.toStringTag,{value:"Module"})),Kt={...N0,...S0};function C0(r,e){return Eo(r,new Kt.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return Kt.isNode&&ee.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function L0(r){return ee.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function R0(r){const e={},t=Object.keys(r);let n;const i=t.length;let s;for(n=0;n<i;n++)s=t[n],e[s]=r[s];return e}function ih(r){function e(t,n,i,s){let a=t[s++];if(a==="__proto__")return!0;const u=Number.isFinite(+a),f=s>=t.length;return a=!a&&ee.isArray(i)?i.length:a,f?(ee.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!u):((!i[a]||!ee.isObject(i[a]))&&(i[a]=[]),e(t,n,i[a],s)&&ee.isArray(i[a])&&(i[a]=R0(i[a])),!u)}if(ee.isFormData(r)&&ee.isFunction(r.entries)){const t={};return ee.forEachEntry(r,(n,i)=>{e(L0(n),i,t,0)}),t}return null}function k0(r,e,t){if(ee.isString(r))try{return(e||JSON.parse)(r),ee.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const Ts={transitional:rh,adapter:["xhr","http","fetch"],transformRequest:[function(r,e){const t=e.getContentType()||"",n=t.indexOf("application/json")>-1,i=ee.isObject(r);if(i&&ee.isHTMLForm(r)&&(r=new FormData(r)),ee.isFormData(r))return n?JSON.stringify(ih(r)):r;if(ee.isArrayBuffer(r)||ee.isBuffer(r)||ee.isStream(r)||ee.isFile(r)||ee.isBlob(r)||ee.isReadableStream(r))return r;if(ee.isArrayBufferView(r))return r.buffer;if(ee.isURLSearchParams(r))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let s;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return C0(r,this.formSerializer).toString();if((s=ee.isFileList(r))||t.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return Eo(s?{"files[]":r}:r,a&&new a,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),k0(r)):r}],transformResponse:[function(r){const e=this.transitional||Ts.transitional,t=e&&e.forcedJSONParsing,n=this.responseType==="json";if(ee.isResponse(r)||ee.isReadableStream(r))return r;if(r&&ee.isString(r)&&(t&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(r)}catch(s){if(i)throw s.name==="SyntaxError"?Ve.from(s,Ve.ERR_BAD_RESPONSE,this,null,this.response):s}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kt.classes.FormData,Blob:Kt.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],r=>{Ts.headers[r]={}});const P0=ee.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),q0=r=>{const e={};let t,n,i;return r&&r.split(`
81
- `).forEach(function(s){i=s.indexOf(":"),t=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!t||e[t]&&P0[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},sh=Symbol("internals");function _s(r){return r&&String(r).trim().toLowerCase()}function Oo(r){return r===!1||r==null?r:ee.isArray(r)?r.map(Oo):String(r)}function I0(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}const j0=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function il(r,e,t,n,i){if(ee.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!ee.isString(e)){if(ee.isString(n))return e.indexOf(n)!==-1;if(ee.isRegExp(n))return n.test(e)}}function D0(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function $0(r,e){const t=ee.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,s,a){return this[n].call(this,e,i,s,a)},configurable:!0})})}let rn=class{constructor(r){r&&this.set(r)}set(r,e,t){const n=this;function i(a,u,f){const d=_s(u);if(!d)throw new Error("header name must be a non-empty string");const m=ee.findKey(n,d);(!m||n[m]===void 0||f===!0||f===void 0&&n[m]!==!1)&&(n[m||u]=Oo(a))}const s=(a,u)=>ee.forEach(a,(f,d)=>i(f,d,u));if(ee.isPlainObject(r)||r instanceof this.constructor)s(r,e);else if(ee.isString(r)&&(r=r.trim())&&!j0(r))s(q0(r),e);else if(ee.isHeaders(r))for(const[a,u]of r.entries())i(u,a,t);else r!=null&&i(e,r,t);return this}get(r,e){if(r=_s(r),r){const t=ee.findKey(this,r);if(t){const n=this[t];if(!e)return n;if(e===!0)return I0(n);if(ee.isFunction(e))return e.call(this,n,t);if(ee.isRegExp(e))return e.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,e){if(r=_s(r),r){const t=ee.findKey(this,r);return!!(t&&this[t]!==void 0&&(!e||il(this,this[t],t,e)))}return!1}delete(r,e){const t=this;let n=!1;function i(s){if(s=_s(s),s){const a=ee.findKey(t,s);a&&(!e||il(t,t[a],a,e))&&(delete t[a],n=!0)}}return ee.isArray(r)?r.forEach(i):i(r),n}clear(r){const e=Object.keys(this);let t=e.length,n=!1;for(;t--;){const i=e[t];(!r||il(this,this[i],i,r,!0))&&(delete this[i],n=!0)}return n}normalize(r){const e=this,t={};return ee.forEach(this,(n,i)=>{const s=ee.findKey(t,i);if(s){e[s]=Oo(n),delete e[i];return}const a=r?D0(i):String(i).trim();a!==i&&delete e[i],e[a]=Oo(n),t[a]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const e=Object.create(null);return ee.forEach(this,(t,n)=>{t!=null&&t!==!1&&(e[n]=r&&ee.isArray(t)?t.join(", "):t)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,e])=>r+": "+e).join(`
82
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...e){const t=new this(r);return e.forEach(n=>t.set(n)),t}static accessor(r){const e=(this[sh]=this[sh]={accessors:{}}).accessors,t=this.prototype;function n(i){const s=_s(i);e[s]||($0(t,i),e[s]=!0)}return ee.isArray(r)?r.forEach(n):n(r),this}};rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ee.reduceDescriptors(rn.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}}),ee.freezeMethods(rn);function sl(r,e){const t=this||Ts,n=e||t,i=rn.from(n.headers);let s=n.data;return ee.forEach(r,function(a){s=a.call(t,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function oh(r){return!!(r&&r.__CANCEL__)}function Fi(r,e,t){Ve.call(this,r??"canceled",Ve.ERR_CANCELED,e,t),this.name="CanceledError"}ee.inherits(Fi,Ve,{__CANCEL__:!0});function ah(r,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new Ve("Request failed with status code "+t.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function M0(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function B0(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,s=0,a;return e=e!==void 0?e:1e3,function(u){const f=Date.now(),d=n[s];a||(a=f),t[i]=u,n[i]=f;let m=s,v=0;for(;m!==i;)v+=t[m++],m=m%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),f-a<e)return;const y=d&&f-d;return y?Math.round(v*1e3/y):void 0}}function U0(r,e){let t=0,n=1e3/e,i,s;const a=(u,f=Date.now())=>{t=f,i=null,s&&(clearTimeout(s),s=null),r.apply(null,u)};return[(...u)=>{const f=Date.now(),d=f-t;d>=n?a(u,f):(i=u,s||(s=setTimeout(()=>{s=null,a(i)},n-d)))},()=>i&&a(i)]}const So=(r,e,t=3)=>{let n=0;const i=B0(50,250);return U0(s=>{const a=s.loaded,u=s.lengthComputable?s.total:void 0,f=a-n,d=i(f),m=a<=u;n=a;const v={loaded:a,total:u,progress:u?a/u:void 0,bytes:f,rate:d||void 0,estimated:d&&u&&m?(u-a)/d:void 0,event:s,lengthComputable:u!=null,[e?"download":"upload"]:!0};r(v)},t)},lh=(r,e)=>{const t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},uh=r=>(...e)=>ee.asap(()=>r(...e)),F0=Kt.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,Kt.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(Kt.origin),Kt.navigator&&/(msie|trident)/i.test(Kt.navigator.userAgent)):()=>!0,K0=Kt.hasStandardBrowserEnv?{write(r,e,t,n,i,s){const a=[r+"="+encodeURIComponent(e)];ee.isNumber(t)&&a.push("expires="+new Date(t).toGMTString()),ee.isString(n)&&a.push("path="+n),ee.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function H0(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function z0(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function ch(r,e,t){let n=!H0(e);return r&&n||t==!1?z0(r,e):e}const fh=r=>r instanceof rn?{...r}:r;function ci(r,e){e=e||{};const t={};function n(d,m,v,y){return ee.isPlainObject(d)&&ee.isPlainObject(m)?ee.merge.call({caseless:y},d,m):ee.isPlainObject(m)?ee.merge({},m):ee.isArray(m)?m.slice():m}function i(d,m,v,y){if(ee.isUndefined(m)){if(!ee.isUndefined(d))return n(void 0,d,v,y)}else return n(d,m,v,y)}function s(d,m){if(!ee.isUndefined(m))return n(void 0,m)}function a(d,m){if(ee.isUndefined(m)){if(!ee.isUndefined(d))return n(void 0,d)}else return n(void 0,m)}function u(d,m,v){if(v in e)return n(d,m);if(v in r)return n(void 0,d)}const f={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:(d,m,v)=>i(fh(d),fh(m),v,!0)};return ee.forEach(Object.keys(Object.assign({},r,e)),function(d){const m=f[d]||i,v=m(r[d],e[d],d);ee.isUndefined(v)&&m!==u||(t[d]=v)}),t}const hh=r=>{const e=ci({},r);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:u}=e;e.headers=a=rn.from(a),e.url=th(ch(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let f;if(ee.isFormData(t)){if(Kt.hasStandardBrowserEnv||Kt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((f=a.getContentType())!==!1){const[d,...m]=f?f.split(";").map(v=>v.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...m].join("; "))}}if(Kt.hasStandardBrowserEnv&&(n&&ee.isFunction(n)&&(n=n(e)),n||n!==!1&&F0(e.url))){const d=i&&s&&K0.read(s);d&&a.set(i,d)}return e},V0=typeof XMLHttpRequest<"u",W0=V0&&function(r){return new Promise(function(e,t){const n=hh(r);let i=n.data;const s=rn.from(n.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:f}=n,d,m,v,y,x;function A(){y&&y(),x&&x(),n.cancelToken&&n.cancelToken.unsubscribe(d),n.signal&&n.signal.removeEventListener("abort",d)}let O=new XMLHttpRequest;O.open(n.method.toUpperCase(),n.url,!0),O.timeout=n.timeout;function N(){if(!O)return;const W=rn.from("getAllResponseHeaders"in O&&O.getAllResponseHeaders()),Z={data:!a||a==="text"||a==="json"?O.responseText:O.response,status:O.status,statusText:O.statusText,headers:W,config:r,request:O};ah(function(de){e(de),A()},function(de){t(de),A()},Z),O=null}"onloadend"in O?O.onloadend=N:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout(N)},O.onabort=function(){O&&(t(new Ve("Request aborted",Ve.ECONNABORTED,r,O)),O=null)},O.onerror=function(){t(new Ve("Network Error",Ve.ERR_NETWORK,r,O)),O=null},O.ontimeout=function(){let W=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const Z=n.transitional||rh;n.timeoutErrorMessage&&(W=n.timeoutErrorMessage),t(new Ve(W,Z.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,r,O)),O=null},i===void 0&&s.setContentType(null),"setRequestHeader"in O&&ee.forEach(s.toJSON(),function(W,Z){O.setRequestHeader(Z,W)}),ee.isUndefined(n.withCredentials)||(O.withCredentials=!!n.withCredentials),a&&a!=="json"&&(O.responseType=n.responseType),f&&([v,x]=So(f,!0),O.addEventListener("progress",v)),u&&O.upload&&([m,y]=So(u),O.upload.addEventListener("progress",m),O.upload.addEventListener("loadend",y)),(n.cancelToken||n.signal)&&(d=W=>{O&&(t(!W||W.type?new Fi(null,r,O):W),O.abort(),O=null)},n.cancelToken&&n.cancelToken.subscribe(d),n.signal&&(n.signal.aborted?d():n.signal.addEventListener("abort",d)));const M=M0(n.url);if(M&&Kt.protocols.indexOf(M)===-1){t(new Ve("Unsupported protocol "+M+":",Ve.ERR_BAD_REQUEST,r));return}O.send(i||null)})},G0=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,i;const s=function(d){if(!i){i=!0,u();const m=d instanceof Error?d:this.reason;n.abort(m instanceof Ve?m:new Fi(m instanceof Error?m.message:m))}};let a=e&&setTimeout(()=>{a=null,s(new Ve(`timeout ${e} of ms exceeded`,Ve.ETIMEDOUT))},e);const u=()=>{r&&(a&&clearTimeout(a),a=null,r.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),r=null)};r.forEach(d=>d.addEventListener("abort",s));const{signal:f}=n;return f.unsubscribe=()=>ee.asap(u),f}},Y0=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let n=0,i;for(;n<t;)i=n+e,yield r.slice(n,i),n=i},J0=async function*(r,e){for await(const t of Z0(r))yield*Y0(t,e)},Z0=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},dh=(r,e,t,n)=>{const i=J0(r,e);let s=0,a,u=f=>{a||(a=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:d,value:m}=await i.next();if(d){u(),f.close();return}let v=m.byteLength;if(t){let y=s+=v;t(y)}f.enqueue(new Uint8Array(m))}catch(d){throw u(d),d}},cancel(f){return u(f),i.return()}},{highWaterMark:2})},Ao=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ph=Ao&&typeof ReadableStream=="function",X0=Ao&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),gh=(r,...e)=>{try{return!!r(...e)}catch{return!1}},Q0=ph&&gh(()=>{let r=!1;const e=new Request(Kt.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),mh=64*1024,ol=ph&&gh(()=>ee.isReadableStream(new Response("").body)),To={stream:ol&&(r=>r.body)};Ao&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!To[e]&&(To[e]=ee.isFunction(r[e])?t=>t[e]():(t,n)=>{throw new Ve(`Response type '${e}' is not supported`,Ve.ERR_NOT_SUPPORT,n)})})})(new Response);const ew=async r=>{if(r==null)return 0;if(ee.isBlob(r))return r.size;if(ee.isSpecCompliantForm(r))return(await new Request(Kt.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(ee.isArrayBufferView(r)||ee.isArrayBuffer(r))return r.byteLength;if(ee.isURLSearchParams(r)&&(r=r+""),ee.isString(r))return(await X0(r)).byteLength},tw=async(r,e)=>ee.toFiniteNumber(r.getContentLength())??ew(e),nw=Ao&&(async r=>{let{url:e,method:t,data:n,signal:i,cancelToken:s,timeout:a,onDownloadProgress:u,onUploadProgress:f,responseType:d,headers:m,withCredentials:v="same-origin",fetchOptions:y}=hh(r);d=d?(d+"").toLowerCase():"text";let x=G0([i,s&&s.toAbortSignal()],a),A;const O=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let N;try{if(f&&Q0&&t!=="get"&&t!=="head"&&(N=await tw(m,n))!==0){let ue=new Request(e,{method:"POST",body:n,duplex:"half"}),ce;if(ee.isFormData(n)&&(ce=ue.headers.get("content-type"))&&m.setContentType(ce),ue.body){const[ne,re]=lh(N,So(uh(f)));n=dh(ue.body,mh,ne,re)}}ee.isString(v)||(v=v?"include":"omit");const M="credentials"in Request.prototype;A=new Request(e,{...y,signal:x,method:t.toUpperCase(),headers:m.normalize().toJSON(),body:n,duplex:"half",credentials:M?v:void 0});let W=await fetch(A);const Z=ol&&(d==="stream"||d==="response");if(ol&&(u||Z&&O)){const ue={};["status","statusText","headers"].forEach(xe=>{ue[xe]=W[xe]});const ce=ee.toFiniteNumber(W.headers.get("content-length")),[ne,re]=u&&lh(ce,So(uh(u),!0))||[];W=new Response(dh(W.body,mh,ne,()=>{re&&re(),O&&O()}),ue)}d=d||"text";let de=await To[ee.findKey(To,d)||"text"](W,r);return!Z&&O&&O(),await new Promise((ue,ce)=>{ah(ue,ce,{data:de,headers:rn.from(W.headers),status:W.status,statusText:W.statusText,config:r,request:A})})}catch(M){throw O&&O(),M&&M.name==="TypeError"&&/fetch/i.test(M.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,r,A),{cause:M.cause||M}):Ve.from(M,M&&M.code,r,A)}}),al={http:y0,xhr:W0,fetch:nw};ee.forEach(al,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const yh=r=>`- ${r}`,rw=r=>ee.isFunction(r)||r===null||r===!1,bh={getAdapter:r=>{r=ee.isArray(r)?r:[r];const{length:e}=r;let t,n;const i={};for(let s=0;s<e;s++){t=r[s];let a;if(n=t,!rw(t)&&(n=al[(a=String(t)).toLowerCase()],n===void 0))throw new Ve(`Unknown adapter '${a}'`);if(n)break;i[a||"#"+s]=n}if(!n){const s=Object.entries(i).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
83
- `+s.map(yh).join(`
84
- `):" "+yh(s[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:al};function ll(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Fi(null,r)}function vh(r){return ll(r),r.headers=rn.from(r.headers),r.data=sl.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),bh.getAdapter(r.adapter||Ts.adapter)(r).then(function(e){return ll(r),e.data=sl.call(r,r.transformResponse,e),e.headers=rn.from(e.headers),e},function(e){return oh(e)||(ll(r),e&&e.response&&(e.response.data=sl.call(r,r.transformResponse,e.response),e.response.headers=rn.from(e.response.headers))),Promise.reject(e)})}const wh="1.8.3",_o={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{_o[r]=function(t){return typeof t===r||"a"+(e<1?"n ":" ")+r}});const xh={};_o.transitional=function(r,e,t){function n(i,s){return"[Axios v"+wh+"] Transitional option '"+i+"'"+s+(t?". "+t:"")}return(i,s,a)=>{if(r===!1)throw new Ve(n(s," has been removed"+(e?" in "+e:"")),Ve.ERR_DEPRECATED);return e&&!xh[s]&&(xh[s]=!0,console.warn(n(s," has been deprecated since v"+e+" and will be removed in the near future"))),r?r(i,s,a):!0}},_o.spelling=function(r){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${r}`),!0)};function iw(r,e,t){if(typeof r!="object")throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const s=n[i],a=e[s];if(a){const u=r[s],f=u===void 0||a(u,s,r);if(f!==!0)throw new Ve("option "+s+" must be "+f,Ve.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Ve("Unknown option "+s,Ve.ERR_BAD_OPTION)}}const No={assertOptions:iw,validators:_o},ur=No.validators;let fi=class{constructor(r){this.defaults=r,this.interceptors={request:new nh,response:new nh}}async request(r,e){try{return await this._request(r,e)}catch(t){if(t instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const i=n.stack?n.stack.replace(/^.+\n/,""):"";try{t.stack?i&&!String(t.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(t.stack+=`
85
- `+i):t.stack=i}catch{}}throw t}}_request(r,e){typeof r=="string"?(e=e||{},e.url=r):e=r||{},e=ci(this.defaults,e);const{transitional:t,paramsSerializer:n,headers:i}=e;t!==void 0&&No.assertOptions(t,{silentJSONParsing:ur.transitional(ur.boolean),forcedJSONParsing:ur.transitional(ur.boolean),clarifyTimeoutError:ur.transitional(ur.boolean)},!1),n!=null&&(ee.isFunction(n)?e.paramsSerializer={serialize:n}:No.assertOptions(n,{encode:ur.function,serialize:ur.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),No.assertOptions(e,{baseUrl:ur.spelling("baseURL"),withXsrfToken:ur.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=i&&ee.merge(i.common,i[e.method]);i&&ee.forEach(["delete","get","head","post","put","patch","common"],x=>{delete i[x]}),e.headers=rn.concat(s,i);const a=[];let u=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(e)===!1||(u=u&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});const f=[];this.interceptors.response.forEach(function(x){f.push(x.fulfilled,x.rejected)});let d,m=0,v;if(!u){const x=[vh.bind(this),void 0];for(x.unshift.apply(x,a),x.push.apply(x,f),v=x.length,d=Promise.resolve(e);m<v;)d=d.then(x[m++],x[m++]);return d}v=a.length;let y=e;for(m=0;m<v;){const x=a[m++],A=a[m++];try{y=x(y)}catch(O){A.call(this,O);break}}try{d=vh.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,v=f.length;m<v;)d=d.then(f[m++],f[m++]);return d}getUri(r){r=ci(this.defaults,r);const e=ch(r.baseURL,r.url,r.allowAbsoluteUrls);return th(e,r.params,r.paramsSerializer)}};ee.forEach(["delete","get","head","options"],function(r){fi.prototype[r]=function(e,t){return this.request(ci(t||{},{method:r,url:e,data:(t||{}).data}))}}),ee.forEach(["post","put","patch"],function(r){function e(t){return function(n,i,s){return this.request(ci(s||{},{method:r,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}fi.prototype[r]=e(),fi.prototype[r+"Form"]=e(!0)});let sw=class Fh{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(u=>{n.subscribe(u),s=u}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},e(function(i,s,a){n.reason||(n.reason=new Fi(i,s,a),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=n=>{e.abort(n)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Fh(function(t){e=t}),cancel:e}}};function ow(r){return function(e){return r.apply(null,e)}}function aw(r){return ee.isObject(r)&&r.isAxiosError===!0}const ul={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ul).forEach(([r,e])=>{ul[e]=r});function Eh(r){const e=new fi(r),t=Uf(fi.prototype.request,e);return ee.extend(t,fi.prototype,e,{allOwnKeys:!0}),ee.extend(t,e,null,{allOwnKeys:!0}),t.create=function(n){return Eh(ci(r,n))},t}const xt=Eh(Ts);xt.Axios=fi,xt.CanceledError=Fi,xt.CancelToken=sw,xt.isCancel=oh,xt.VERSION=wh,xt.toFormData=Eo,xt.AxiosError=Ve,xt.Cancel=xt.CanceledError,xt.all=function(r){return Promise.all(r)},xt.spread=ow,xt.isAxiosError=aw,xt.mergeConfig=ci,xt.AxiosHeaders=rn,xt.formToJSON=r=>ih(ee.isHTMLForm(r)?new FormData(r):r),xt.getAdapter=bh.getAdapter,xt.HttpStatusCode=ul,xt.default=xt;const{Axios:hx,AxiosError:dx,CanceledError:px,isCancel:gx,CancelToken:mx,VERSION:yx,all:bx,Cancel:vx,isAxiosError:wx,spread:xx,toFormData:Ex,AxiosHeaders:Ox,HttpStatusCode:Sx,formToJSON:Ax,getAdapter:Tx,mergeConfig:_x}=xt;class Oh{constructor(e){Sf(this,"storage"),this.storage=e}getRaw(e,t=null){return this.storage.getItem(e)??t}setRaw(e,t){this.storage.setItem(e,t)}get(e,t=null){const n=this.getRaw(e);return n?Bf.parse(n):t}set(e,t){this.setRaw(e,Bf.stringify(t))}del(e){this.storage.removeItem(e)}clear(){this.storage.clear()}}const Sh=new Oh(localStorage),Ah=new Oh(sessionStorage),lw={local:Sh,session:Ah},uw=Object.freeze(Object.defineProperty({__proto__:null,default:lw,local:Sh,session:Ah},Symbol.toStringTag,{value:"Module"}));xt.create({baseURL:"",timeout:3e3});const Th="i18nextLng",cl="zh";Dt.use(mf).use(Of).init({lng:uw.local.getRaw(Th,cl),fallbackLng:cl,backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},interpolation:{escapeValue:!1}});const cw={...Dt,KEY:Th,LNG_ZH:cl};var Co={exports:{}},_h;function fw(){return _h||(_h=1,function(r,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof nr<"u"&&nr,n=function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s}();(function(s){(function(a){var u=typeof s<"u"&&s||typeof self<"u"&&self||typeof u<"u"&&u,f={searchParams:"URLSearchParams"in u,iterable:"Symbol"in u&&"iterator"in Symbol,blob:"FileReader"in u&&"Blob"in u&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in u,arrayBuffer:"ArrayBuffer"in u};function d(E){return E&&DataView.prototype.isPrototypeOf(E)}if(f.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=ArrayBuffer.isView||function(E){return E&&m.indexOf(Object.prototype.toString.call(E))>-1};function y(E){if(typeof E!="string"&&(E=String(E)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(E)||E==="")throw new TypeError('Invalid character in header field name: "'+E+'"');return E.toLowerCase()}function x(E){return typeof E!="string"&&(E=String(E)),E}function A(E){var T={next:function(){var D=E.shift();return{done:D===void 0,value:D}}};return f.iterable&&(T[Symbol.iterator]=function(){return T}),T}function O(E){this.map={},E instanceof O?E.forEach(function(T,D){this.append(D,T)},this):Array.isArray(E)?E.forEach(function(T){this.append(T[0],T[1])},this):E&&Object.getOwnPropertyNames(E).forEach(function(T){this.append(T,E[T])},this)}O.prototype.append=function(E,T){E=y(E),T=x(T);var D=this.map[E];this.map[E]=D?D+", "+T:T},O.prototype.delete=function(E){delete this.map[y(E)]},O.prototype.get=function(E){return E=y(E),this.has(E)?this.map[E]:null},O.prototype.has=function(E){return this.map.hasOwnProperty(y(E))},O.prototype.set=function(E,T){this.map[y(E)]=x(T)},O.prototype.forEach=function(E,T){for(var D in this.map)this.map.hasOwnProperty(D)&&E.call(T,this.map[D],D,this)},O.prototype.keys=function(){var E=[];return this.forEach(function(T,D){E.push(D)}),A(E)},O.prototype.values=function(){var E=[];return this.forEach(function(T){E.push(T)}),A(E)},O.prototype.entries=function(){var E=[];return this.forEach(function(T,D){E.push([D,T])}),A(E)},f.iterable&&(O.prototype[Symbol.iterator]=O.prototype.entries);function N(E){if(E.bodyUsed)return Promise.reject(new TypeError("Already read"));E.bodyUsed=!0}function M(E){return new Promise(function(T,D){E.onload=function(){T(E.result)},E.onerror=function(){D(E.error)}})}function W(E){var T=new FileReader,D=M(T);return T.readAsArrayBuffer(E),D}function Z(E){var T=new FileReader,D=M(T);return T.readAsText(E),D}function de(E){for(var T=new Uint8Array(E),D=new Array(T.length),U=0;U<T.length;U++)D[U]=String.fromCharCode(T[U]);return D.join("")}function ue(E){if(E.slice)return E.slice(0);var T=new Uint8Array(E.byteLength);return T.set(new Uint8Array(E)),T.buffer}function ce(){return this.bodyUsed=!1,this._initBody=function(E){this.bodyUsed=this.bodyUsed,this._bodyInit=E,E?typeof E=="string"?this._bodyText=E:f.blob&&Blob.prototype.isPrototypeOf(E)?this._bodyBlob=E:f.formData&&FormData.prototype.isPrototypeOf(E)?this._bodyFormData=E:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)?this._bodyText=E.toString():f.arrayBuffer&&f.blob&&d(E)?(this._bodyArrayBuffer=ue(E.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(E)||v(E))?this._bodyArrayBuffer=ue(E):this._bodyText=E=Object.prototype.toString.call(E):this._bodyText="",this.headers.get("content-type")||(typeof E=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var E=N(this);if(E)return E;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var E=N(this);return E||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(W)}),this.text=function(){var E=N(this);if(E)return E;if(this._bodyBlob)return Z(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(de(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},f.formData&&(this.formData=function(){return this.text().then(Se)}),this.json=function(){return this.text().then(JSON.parse)},this}var ne=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function re(E){var T=E.toUpperCase();return ne.indexOf(T)>-1?T:E}function xe(E,T){if(!(this instanceof xe))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');T=T||{};var D=T.body;if(E instanceof xe){if(E.bodyUsed)throw new TypeError("Already read");this.url=E.url,this.credentials=E.credentials,T.headers||(this.headers=new O(E.headers)),this.method=E.method,this.mode=E.mode,this.signal=E.signal,!D&&E._bodyInit!=null&&(D=E._bodyInit,E.bodyUsed=!0)}else this.url=String(E);if(this.credentials=T.credentials||this.credentials||"same-origin",(T.headers||!this.headers)&&(this.headers=new O(T.headers)),this.method=re(T.method||this.method||"GET"),this.mode=T.mode||this.mode||null,this.signal=T.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&D)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(D),(this.method==="GET"||this.method==="HEAD")&&(T.cache==="no-store"||T.cache==="no-cache")){var U=/([?&])_=[^&]*/;if(U.test(this.url))this.url=this.url.replace(U,"$1_="+new Date().getTime());else{var J=/\?/;this.url+=(J.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}xe.prototype.clone=function(){return new xe(this,{body:this._bodyInit})};function Se(E){var T=new FormData;return E.trim().split("&").forEach(function(D){if(D){var U=D.split("="),J=U.shift().replace(/\+/g," "),z=U.join("=").replace(/\+/g," ");T.append(decodeURIComponent(J),decodeURIComponent(z))}}),T}function S(E){var T=new O,D=E.replace(/\r?\n[\t ]+/g," ");return D.split("\r").map(function(U){return U.indexOf(`
86
- `)===0?U.substr(1,U.length):U}).forEach(function(U){var J=U.split(":"),z=J.shift().trim();if(z){var le=J.join(":").trim();T.append(z,le)}}),T}ce.call(xe.prototype);function G(E,T){if(!(this instanceof G))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');T||(T={}),this.type="default",this.status=T.status===void 0?200:T.status,this.ok=this.status>=200&&this.status<300,this.statusText=T.statusText===void 0?"":""+T.statusText,this.headers=new O(T.headers),this.url=T.url||"",this._initBody(E)}ce.call(G.prototype),G.prototype.clone=function(){return new G(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},G.error=function(){var E=new G(null,{status:0,statusText:""});return E.type="error",E};var P=[301,302,303,307,308];G.redirect=function(E,T){if(P.indexOf(T)===-1)throw new RangeError("Invalid status code");return new G(null,{status:T,headers:{location:E}})},a.DOMException=u.DOMException;try{new a.DOMException}catch{a.DOMException=function(T,D){this.message=T,this.name=D;var U=Error(T);this.stack=U.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function V(E,T){return new Promise(function(D,U){var J=new xe(E,T);if(J.signal&&J.signal.aborted)return U(new a.DOMException("Aborted","AbortError"));var z=new XMLHttpRequest;function le(){z.abort()}z.onload=function(){var pe={status:z.status,statusText:z.statusText,headers:S(z.getAllResponseHeaders()||"")};pe.url="responseURL"in z?z.responseURL:pe.headers.get("X-Request-URL");var Ne="response"in z?z.response:z.responseText;setTimeout(function(){D(new G(Ne,pe))},0)},z.onerror=function(){setTimeout(function(){U(new TypeError("Network request failed"))},0)},z.ontimeout=function(){setTimeout(function(){U(new TypeError("Network request failed"))},0)},z.onabort=function(){setTimeout(function(){U(new a.DOMException("Aborted","AbortError"))},0)};function ve(pe){try{return pe===""&&u.location.href?u.location.href:pe}catch{return pe}}z.open(J.method,ve(J.url),!0),J.credentials==="include"?z.withCredentials=!0:J.credentials==="omit"&&(z.withCredentials=!1),"responseType"in z&&(f.blob?z.responseType="blob":f.arrayBuffer&&J.headers.get("Content-Type")&&J.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(z.responseType="arraybuffer")),T&&typeof T.headers=="object"&&!(T.headers instanceof O)?Object.getOwnPropertyNames(T.headers).forEach(function(pe){z.setRequestHeader(pe,x(T.headers[pe]))}):J.headers.forEach(function(pe,Ne){z.setRequestHeader(Ne,pe)}),J.signal&&(J.signal.addEventListener("abort",le),z.onreadystatechange=function(){z.readyState===4&&J.signal.removeEventListener("abort",le)}),z.send(typeof J._bodyInit>"u"?null:J._bodyInit)})}return V.polyfill=!0,u.fetch||(u.fetch=V,u.Headers=O,u.Request=xe,u.Response=G),a.Headers=O,a.Request=xe,a.Response=G,a.fetch=V,a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=t.fetch?t:n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,r.exports=e}(Co,Co.exports)),Co.exports}var Nh=fw();const hw=Kh({__proto__:null,default:Do(Nh)},[Nh]);it.Editor=Dc,it.Form=zc,it.Provider=$a,it.Table=pv,it.Upload=Hc,it.i18n=cw,Object.defineProperty(it,Symbol.toStringTag,{value:"Module"})});
78
+ `,{[It.blotName]:t}),a.insert(u)),s)],new WeakMap)}}Sc.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const _s=class _s extends Pt{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",Ia()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===_s.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};Te(_s,"blotName","table"),Te(_s,"tagName","TD");let jn=_s;class mr extends Zr{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),i=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===i.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const n=t.formats(),i=t.next.formats();if(n.table!==i.table){const s=this.splitAfter(t);s&&s.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}Te(mr,"blotName","table-row"),Te(mr,"tagName","TR");class Jn extends Zr{}Te(Jn,"blotName","table-body"),Te(Jn,"tagName","TBODY");class Ni extends Zr{balanceCells(){const e=this.descendants(mr),t=e.reduce((n,i)=>Math.max(i.children.length,n),0);e.forEach(n=>{new Array(t-n.children.length).fill(0).forEach(()=>{let i;n.children.head!=null&&(i=jn.formats(n.children.head.domNode));const s=this.scroll.create(jn.blotName,i);n.appendChild(s),s.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(Jn);t==null||t.children.head==null||t.children.forEach(n=>{const i=n.children.at(e);i!=null&&i.remove()})}insertColumn(e){const[t]=this.descendant(Jn);t==null||t.children.head==null||t.children.forEach(n=>{const i=n.children.at(e),s=jn.formats(n.children.head.domNode),a=this.scroll.create(jn.blotName,s);n.insertBefore(a,i)})}insertRow(e){const[t]=this.descendant(Jn);if(t==null||t.children.head==null)return;const n=Ia(),i=this.scroll.create(mr.blotName);t.children.head.children.forEach(()=>{const a=this.scroll.create(jn.blotName,n);i.appendChild(a)});const s=t.children.at(e);t.insertBefore(i,s)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}Te(Ni,"blotName","table-container"),Te(Ni,"tagName","TABLE"),Ni.allowedChildren=[Jn],Jn.requiredContainer=Ni,Jn.allowedChildren=[mr],mr.requiredContainer=Jn,mr.allowedChildren=[jn],jn.requiredContainer=mr;function Ia(){return`row-${Math.random().toString(36).slice(2,6)}`}let Pb=class extends Pn{static register(){se.register(jn),se.register(mr),se.register(Jn),se.register(Ni)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Ni).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(se.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(se.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(se.sources.USER),this.quill.setSelection(t,se.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,n]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==jn.blotName)return[null,null,null,-1];const i=t.parent;return[i.parent.parent,i,t,n]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[n,i,s]=this.getTable(t);if(s==null)return;const a=s.cellOffset();n.insertColumn(a+e),this.quill.update(se.sources.USER);let u=i.rowOffset();e===0&&(u+=1),this.quill.setSelection(t.index+u,t.length,se.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[n,i,s]=this.getTable(t);if(s==null)return;const a=i.rowOffset();n.insertRow(a+e),this.quill.update(se.sources.USER),e>0?this.quill.setSelection(t,se.sources.SILENT):this.quill.setSelection(t.index+i.children.length,t.length,se.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const n=this.quill.getSelection();if(n==null)return;const i=new Array(e).fill(0).reduce(s=>{const a=new Array(t).fill(`
79
+ `).join("");return s.insert(a,{table:Ia()})},new ke().retain(n.index));this.quill.updateContents(i,se.sources.USER),this.quill.setSelection(n.index,se.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(se.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(se.events.TEXT_CHANGE,(n,i,s)=>{s===se.sources.USER&&this.balanceTables()}),!0):!1)})}};const Oc=dr("quill:toolbar");class $a extends Pn{constructor(e,t){var n,i;if(super(e,t),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),qb(s,this.options.container),(i=(n=e.container)==null?void 0:n.parentNode)==null||i.insertBefore(s,e.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Oc.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{var u;const a=(u=this.options.handlers)==null?void 0:u[s];a&&this.addHandler(s,a)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(se.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(i=>i.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){Oc.warn("ignoring attaching to nonexistent format",t,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,i=>{let s;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const u=e.options[e.selectedIndex];u.hasAttribute("selected")?s=!1:s=u.value||!1}else e.classList.contains("ql-active")?s=!1:s=e.value||!e.hasAttribute("value"),i.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,s);else if(this.quill.scroll.query(t).prototype instanceof Xt){if(s=prompt(`Enter ${t}`),!s)return;this.quill.updateContents(new ke().retain(a.index).delete(a.length).insert({[t]:s}),se.sources.USER)}else this.quill.format(t,s,se.sources.USER);this.update(a)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[i,s]=n;if(s.tagName==="SELECT"){let a=null;if(e==null)a=null;else if(t[i]==null)a=s.querySelector("option[selected]");else if(!Array.isArray(t[i])){let u=t[i];typeof u=="string"&&(u=u.replace(/"/g,'\\"')),a=s.querySelector(`option[value="${u}"]`)}a==null?(s.value="",s.selectedIndex=-1):a.selected=!0}else if(e==null)s.classList.remove("ql-active"),s.setAttribute("aria-pressed","false");else if(s.hasAttribute("value")){const a=t[i],u=a===s.getAttribute("value")||a!=null&&a.toString()===s.getAttribute("value")||a==null&&!s.getAttribute("value");s.classList.toggle("ql-active",u),s.setAttribute("aria-pressed",u.toString())}else{const a=t[i]!=null;s.classList.toggle("ql-active",a),s.setAttribute("aria-pressed",a.toString())}})}}$a.DEFAULTS={};function Ac(r,e,t){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add(`ql-${e}`),n.setAttribute("aria-pressed","false"),t!=null?(n.value=t,n.setAttribute("aria-label",`${e}: ${t}`)):n.setAttribute("aria-label",e),r.appendChild(n)}function qb(r,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(i=>{if(typeof i=="string")Ac(n,i);else{const s=Object.keys(i)[0],a=i[s];Array.isArray(a)?jb(n,s,a):Ac(n,s,a)}}),r.appendChild(n)})}function jb(r,e,t){const n=document.createElement("select");n.classList.add(`ql-${e}`),t.forEach(i=>{const s=document.createElement("option");i!==!1?s.setAttribute("value",String(i)):s.setAttribute("selected","selected"),n.appendChild(s)}),r.appendChild(n)}$a.DEFAULTS={container:null,handlers:{clean(){const r=this.quill.getSelection();if(r!=null)if(r.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,Pe.INLINE)!=null&&this.quill.format(t,!1,se.sources.USER)})}else this.quill.removeFormat(r.index,r.length,se.sources.USER)},direction(r){const{align:e}=this.quill.getFormat();r==="rtl"&&e==null?this.quill.format("align","right",se.sources.USER):!r&&e==="right"&&this.quill.format("align",!1,se.sources.USER),this.quill.format("direction",r,se.sources.USER)},indent(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e),n=parseInt(t.indent||0,10);if(r==="+1"||r==="-1"){let i=r==="+1"?1:-1;t.direction==="rtl"&&(i*=-1),this.quill.format("indent",n+i,se.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,se.sources.USER)},list(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e);r==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,se.sources.USER):this.quill.format("list","unchecked",se.sources.USER):this.quill.format("list",r,se.sources.USER)}}};const Ib='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',$b='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Mb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Db='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Bb='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',Ub='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',Fb='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Kb='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Tc='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',ps={align:{"":Ib,center:$b,right:Mb,justify:Db},background:Bb,blockquote:Ub,bold:Fb,clean:Kb,code:Tc,"code-block":Tc,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'},Hb='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let _c=0;function Nc(r,e){r.setAttribute(e,`${r.getAttribute(e)!=="true"}`)}class io{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Nc(this.label,"aria-expanded"),Nc(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&t.setAttribute("data-value",n),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(t,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=Hb,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${_c}`,_c+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const n=this.buildItem(t);e.appendChild(n),t.selected===!0&&this.selectItem(n)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.container.querySelector(".ql-selected");e!==n&&(n!=null&&n.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const n=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(n)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class Cc extends io{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(n=>{n.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const n=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";n&&(n.tagName==="line"?n.style.stroke=i:n.style.fill=i)}}class Lc extends io{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(n=>{n.innerHTML=t[n.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const n=e||this.defaultItem;if(n!=null){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}const zb=r=>{const{overflowY:e}=getComputedStyle(r,null);return e!=="visible"&&e!=="clip"};class kc{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,zb(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),s=this.root.getBoundingClientRect();let a=0;if(s.right>i.right&&(a=i.right-s.right,this.root.style.left=`${t+a}px`),s.left<i.left&&(a=i.left-s.left,this.root.style.left=`${t+a}px`),s.bottom>i.bottom){const u=s.bottom-s.top,f=e.bottom-e.top+u;this.root.style.top=`${n-f}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const Vb=[!1,"center","right","justify"],Wb=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Gb=[!1,"serif","monospace"],Yb=["1","2","3",!1],Jb=["small",!1,"large","huge"];class gs extends Ai{constructor(e,t){super(e,t);const n=i=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",n);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(s=>{s.container.contains(i.target)||s.close()})};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(n=>{(n.getAttribute("class")||"").split(/\s+/).forEach(s=>{if(s.startsWith("ql-")&&(s=s.slice(3),t[s]!=null))if(s==="direction")n.innerHTML=t[s][""]+t[s].rtl;else if(typeof t[s]=="string")n.innerHTML=t[s];else{const a=n.value||"";a!=null&&t[s][a]&&(n.innerHTML=t[s][a])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&ms(i,Vb),typeof t.align=="object"))return new Lc(i,t.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const s=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&ms(i,Wb,s==="background"?"#ffffff":"#000000"),new Cc(i,t[s])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?ms(i,Gb):i.classList.contains("ql-header")?ms(i,Yb):i.classList.contains("ql-size")&&ms(i,Jb)),new io(i)});const n=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(Le.events.EDITOR_CHANGE,n)}}gs.DEFAULTS=_r({},Ai.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let r=this.container.querySelector("input.ql-image[type=file]");r==null&&(r=document.createElement("input"),r.setAttribute("type","file"),r.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),r.classList.add("ql-image"),r.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,r.files),r.value=""}),this.container.appendChild(r)),r.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Rc extends kc{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);n!=null&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,Le.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,Le.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=Zb(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,Le.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(n+1," ",Le.sources.USER),this.quill.setSelection(n+2,Le.sources.USER)}break}}this.textbox.value="",this.hide()}}function Zb(r){let e=r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=r.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:r}function ms(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(n=>{const i=document.createElement("option");n===t?i.setAttribute("selected","selected"):i.setAttribute("value",String(n)),r.appendChild(i)})}const Xb=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Pc extends Rc{constructor(e,t){super(e,t),this.quill.on(Le.events.EDITOR_CHANGE,(n,i,s,a)=>{if(n===Le.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&a===Le.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const u=this.quill.getLines(i.index,i.length);if(u.length===1){const f=this.quill.getBounds(i);f!=null&&this.position(f)}else{const f=u[u.length-1],d=this.quill.getIndex(f),m=Math.min(f.length()-1,i.index+i.length-d),w=this.quill.getBounds(new Jr(d,m));w!=null&&this.position(w)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Le.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",t!==0&&(n.style.marginLeft=`${-1*t-n.offsetWidth/2}px`),t}}Te(Pc,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class qc extends gs{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Xb),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new Pc(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),ps),this.buildPickers(e.container.querySelectorAll("select"),ps))}}qc.DEFAULTS=_r({},gs.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,se.sources.USER)}}}}});const Qb=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class jc extends Rc{constructor(){super(...arguments);Te(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const n=this.linkRange;this.restoreFocus(),this.quill.formatText(n,"link",!1,Le.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(Le.events.SELECTION_CHANGE,(t,n,i)=>{if(t!=null){if(t.length===0&&i===Le.sources.USER){const[s,a]=this.quill.scroll.descendant(Lr,t.index);if(s!=null){this.linkRange=new Jr(t.index-a,s.length());const u=Lr.formats(s.domNode);this.preview.textContent=u,this.preview.setAttribute("href",u),this.show();const f=this.quill.getBounds(this.linkRange);f!=null&&this.position(f);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}Te(jc,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class Ic extends gs{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Qb),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),ps),this.buildPickers(e.container.querySelectorAll("select"),ps),this.tooltip=new jc(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,n)=>{e.handlers.link.call(e,!n.format.link)}))}}Ic.DEFAULTS=_r({},gs.DEFAULTS,{modules:{toolbar:{handlers:{link(r){if(r){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,se.sources.USER)}}}}}),se.register({"attributors/attribute/direction":nc,"attributors/class/align":Qu,"attributors/class/background":Uy,"attributors/class/color":By,"attributors/class/direction":rc,"attributors/class/font":oc,"attributors/class/size":lc,"attributors/style/align":ec,"attributors/style/background":xa,"attributors/style/color":wa,"attributors/style/direction":ic,"attributors/style/font":ac,"attributors/style/size":uc},!0),se.register({"formats/align":Qu,"formats/direction":rc,"formats/indent":kb,"formats/background":xa,"formats/color":wa,"formats/font":oc,"formats/size":lc,"formats/blockquote":Ca,"formats/code-block":It,"formats/header":La,"formats/list":cs,"formats/bold":fs,"formats/code":Ea,"formats/italic":ka,"formats/link":Lr,"formats/script":Ra,"formats/strike":Pa,"formats/underline":qa,"formats/formula":no,"formats/image":ja,"formats/video":ro,"modules/syntax":Sc,"modules/table":Pb,"modules/toolbar":$a,"themes/bubble":qc,"themes/snow":Ic,"ui/icons":ps,"ui/picker":io,"ui/icon-picker":Lc,"ui/color-picker":Cc,"ui/tooltip":kc},!0);function $c(r){const{value:e,style:t,...n}=r,i=dt.useRef(null);return dt.useEffect(()=>{const s=i.current,a=s.ownerDocument.createElement("div");Object.entries(t).forEach(([d,m])=>{a.style[d]=m});const u=s.appendChild(a),f=new se(u,{theme:"snow",...n});return e&&(f.root.innerHTML=e),f.on("text-change",()=>{var d;(d=n.onChange)==null||d.call(n,f.root.innerHTML||"")}),()=>{s.innerHTML=""}},[i]),Ht.jsx("div",{ref:i,style:{height:"100%"}})}var Mc={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Dc=dt.createContext&&dt.createContext(Mc),e1=["attr","size","title"];function t1(r,e){if(r==null)return{};var t=n1(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function n1(r,e){if(r==null)return{};var t={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;t[n]=r[n]}return t}function so(){return so=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},so.apply(this,arguments)}function Bc(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function oo(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Bc(Object(t),!0).forEach(function(n){r1(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Bc(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function r1(r,e,t){return e=i1(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function i1(r){var e=s1(r,"string");return typeof e=="symbol"?e:e+""}function s1(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Uc(r){return r&&r.map((e,t)=>dt.createElement(e.tag,oo({key:t},e.attr),Uc(e.child)))}function o1(r){return e=>dt.createElement(a1,so({attr:oo({},r.attr)},e),Uc(r.child))}function a1(r){var e=t=>{var{attr:n,size:i,title:s}=r,a=t1(r,e1),u=i||t.size||"1em",f;return t.className&&(f=t.className),r.className&&(f=(f?f+" ":"")+r.className),dt.createElement("svg",so({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,a,{className:f,style:oo(oo({color:r.color||t.color},t.style),r.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),s&&dt.createElement("title",null,s),r.children)};return Dc!==void 0?dt.createElement(Dc.Consumer,null,t=>e(t)):e(Mc)}function Fc(r){return o1({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 0 0-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"},child:[]}]})(r)}const l1=r=>Array.isArray(r)?r:r&&r.fileList,Kc={maxCount:1,multiple:!0,showUploadList:!0};function Hc(r){var u;const{value:e,...t}=r,n=l1(e),i=Array.isArray(n)?n.length:0,s=t.maxCount??Kc.maxCount??1;let a;return i<s&&((u=t.listType)!=null&&u.startsWith("picture-")?a=Ht.jsx(Fc,{}):a=Ht.jsx(pi.Button,{icon:Ht.jsx(Fc,{}),children:" 上传"})),Ht.jsx(pi.Upload,{...Kc,...t,fileList:n,onChange:f=>{var d;return(d=t.onChange)==null?void 0:d.call(t,f.fileList)},children:i<s&&a})}function Ma({children:r}){const n={upload:{renderFormItem:(i,s)=>Ht.jsx(Hc,{...s.fieldProps})},editor:{renderFormItem:(i,s)=>Ht.jsx($c,{...s.fieldProps})}};return Ht.jsx(Or.ProConfigProvider,{valueTypeMap:n,children:r})}const u1=()=>pi.Form.useForm().pop(),zc=r=>{const e={layout:"horizontal",colon:!1,labelCol:{span:3},wrapperCol:{span:6},scrollToFirstError:!0,submitter:{render:(t,n)=>Ht.jsx(pi.Form.Item,{wrapperCol:{offset:4,span:8},children:Ht.jsx(pi.Space,{children:n})})},...r};return Ht.jsx(Ma,{children:Ht.jsx(Or.BetaSchemaForm,{...e})})};zc.useForm=u1;const c1={rowKey:"id",pagination:{pageSize:10},tableAlertRender:({selectedRowKeys:r})=>Ht.jsxs(pi.Space,{children:["已选 ",r.length," 项"]})};function f1(r){return Ht.jsx(Ma,{children:Ht.jsx(Or.ProTable,{...c1,...r})})}const Be=r=>typeof r=="string",ys=()=>{let r,e;const t=new Promise((n,i)=>{r=n,e=i});return t.resolve=r,t.reject=e,t},Vc=r=>r==null?"":""+r,h1=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},d1=/###/g,Wc=r=>r&&r.indexOf("###")>-1?r.replace(d1,"."):r,Gc=r=>!r||Be(r),bs=(r,e,t)=>{const n=Be(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(Gc(r))return{};const s=Wc(n[i]);!r[s]&&t&&(r[s]=new t),Object.prototype.hasOwnProperty.call(r,s)?r=r[s]:r={},++i}return Gc(r)?{}:{obj:r,k:Wc(n[i])}},Yc=(r,e,t)=>{const{obj:n,k:i}=bs(r,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let s=e[e.length-1],a=e.slice(0,e.length-1),u=bs(r,a,Object);for(;u.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),u=bs(r,a,Object),u!=null&&u.obj&&typeof u.obj[`${u.k}.${s}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${s}`]=t},p1=(r,e,t,n)=>{const{obj:i,k:s}=bs(r,e,Object);i[s]=i[s]||[],i[s].push(t)},ao=(r,e)=>{const{obj:t,k:n}=bs(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},g1=(r,e,t)=>{const n=ao(r,t);return n!==void 0?n:ao(e,t)},Jc=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?Be(r[n])||r[n]instanceof String||Be(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):Jc(r[n],e[n],t):r[n]=e[n]);return r},Ci=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var m1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const y1=r=>Be(r)?r.replace(/[&<>"'\/]/g,e=>m1[e]):r;class b1{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const v1=[" ",",","?","!",";"],w1=new b1(20),x1=(r,e,t)=>{e=e||"",t=t||"";const n=v1.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(n.length===0)return!0;const i=w1.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!i.test(r);if(!s){const a=r.indexOf(t);a>0&&!i.test(r.substring(0,a))&&(s=!0)}return s},Da=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let i=r;for(let s=0;s<n.length;){if(!i||typeof i!="object")return;let a,u="";for(let f=s;f<n.length;++f)if(f!==s&&(u+=t),u+=n[f],a=i[u],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&f<n.length-1)continue;s+=f-s+1;break}i=a}return i},lo=r=>r==null?void 0:r.replace("_","-"),E1={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class uo{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||E1,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(Be(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new uo(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new uo(this.logger,e)}}var Zn=new uo;class co{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[u,f]=a;for(let d=0;d<f;d++)u(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[u,f]=a;for(let d=0;d<f;d++)u.apply(u,[e,...n])})}}class Zc extends co{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){var d,m;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;e.indexOf(".")>-1?u=e.split("."):(u=[e,t],n&&(Array.isArray(n)?u.push(...n):Be(n)&&s?u.push(...n.split(s)):u.push(n)));const f=ao(this.data,u);return!f&&!t&&!n&&e.indexOf(".")>-1&&(e=u[0],t=u[1],n=u.slice(2).join(".")),f||!a||!Be(n)?f:Da((m=(d=this.data)==null?void 0:d[e])==null?void 0:m[t],n,s)}addResource(e,t,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let u=[e,t];n&&(u=u.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(u=e.split("."),i=t,t=u[1]),this.addNamespaces(t),Yc(this.data,u,i),s.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(Be(n[s])||Array.isArray(n[s]))&&this.addResource(e,t,s,n[s],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[e,t];e.indexOf(".")>-1&&(u=e.split("."),i=n,n=t,t=u[1]),this.addNamespaces(t);let f=ao(this.data,u)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Jc(f,n,s):f={...f,...n},Yc(this.data,u,f),a.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var Xc={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,i){return r.forEach(s=>{var a;e=((a=this.processors[s])==null?void 0:a.process(e,t,n,i))??e}),e}};const Qc={},ef=r=>!Be(r)&&typeof r!="boolean"&&typeof r!="number";class fo extends co{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),h1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return(n==null?void 0:n.res)!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,u=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!x1(e,n,i);if(a&&!u){const f=e.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:e,namespaces:Be(s)?[s]:s};const d=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(d[0])>-1)&&(s=d.shift()),e=d.join(i)}return{key:e,namespaces:Be(s)?[s]:s}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(e[e.length-1],t),f=u[u.length-1],d=t.lng||this.language,m=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode"){if(m){const O=t.nsSeparator||this.options.nsSeparator;return i?{res:`${f}${O}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:f,usedParams:this.getUsedParamsDetails(t)}:`${f}${O}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:f,usedParams:this.getUsedParamsDetails(t)}:a}const w=this.resolve(e,t);let y=w==null?void 0:w.res;const x=(w==null?void 0:w.usedKey)||a,A=(w==null?void 0:w.exactUsedKey)||a,E=["[object Number]","[object Function]","[object RegExp]"],N=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject,Y=t.count!==void 0&&!Be(t.count),Q=fo.hasDefaultValue(t),he=Y?this.pluralResolver.getSuffix(d,t.count,t):"",oe=t.ordinal&&Y?this.pluralResolver.getSuffix(d,t.count,{ordinal:!1}):"",ue=Y&&!t.ordinal&&t.count===0,ne=ue&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${he}`]||t[`defaultValue${oe}`]||t.defaultValue;let re=y;D&&!y&&Q&&(re=ne);const ve=ef(re),Ee=Object.prototype.toString.apply(re);if(D&&re&&ve&&E.indexOf(Ee)<0&&!(Be(N)&&Array.isArray(re))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,re,{...t,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(w.res=O,w.usedParams=this.getUsedParamsDetails(t),w):O}if(s){const O=Array.isArray(re),W=O?[]:{},R=O?A:x;for(const V in re)if(Object.prototype.hasOwnProperty.call(re,V)){const S=`${R}${s}${V}`;Q&&!y?W[V]=this.translate(S,{...t,defaultValue:ef(ne)?ne[V]:void 0,joinArrays:!1,ns:u}):W[V]=this.translate(S,{...t,joinArrays:!1,ns:u}),W[V]===S&&(W[V]=re[V])}y=W}}else if(D&&Be(N)&&Array.isArray(y))y=y.join(N),y&&(y=this.extendTranslation(y,e,t,n));else{let O=!1,W=!1;!this.isValidLookup(y)&&Q&&(O=!0,y=ne),this.isValidLookup(y)||(W=!0,y=a);const V=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&W?void 0:y,S=Q&&ne!==y&&this.options.updateMissing;if(W||O||S){if(this.logger.log(S?"updateKey":"missingKey",d,f,a,S?ne:y),s){const J=this.resolve(a,{...t,keySeparator:!1});J&&J.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const $=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&$&&$[0])for(let J=0;J<$.length;J++)T.push($[J]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(t.lng||this.language):T.push(t.lng||this.language);const U=(J,K,ae)=>{var de;const pe=Q&&ae!==y?ae:V;this.options.missingKeyHandler?this.options.missingKeyHandler(J,f,K,pe,S,t):(de=this.backendConnector)!=null&&de.saveMissing&&this.backendConnector.saveMissing(J,f,K,pe,S,t),this.emit("missingKey",J,f,K,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&Y?T.forEach(J=>{const K=this.pluralResolver.getSuffixes(J,t);ue&&t[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach(ae=>{U([J],a+ae,t[`defaultValue${ae}`]||ne)})}):U(T,a,ne))}y=this.extendTranslation(y,e,t,w,n),W&&y===a&&this.options.appendNamespaceToMissingKey&&(y=`${f}:${a}`),(W||O)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}:${a}`:a,O?y:void 0))}return i?(w.res=y,w.usedParams=this.getUsedParamsDetails(t),w):y}extendTranslation(e,t,n,i,s){var d,m;var a=this;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const w=Be(e)&&(((m=n==null?void 0:n.interpolation)==null?void 0:m.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(w){const A=e.match(this.interpolator.nestingRegexp);y=A&&A.length}let x=n.replace&&!Be(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),e=this.interpolator.interpolate(e,x,n.lng||this.language||i.usedLng,n),w){const A=e.match(this.interpolator.nestingRegexp),E=A&&A.length;y<E&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var A=arguments.length,E=new Array(A),N=0;N<A;N++)E[N]=arguments[N];return(s==null?void 0:s[0])===E[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${E[0]} in key: ${t[0]}`),null):a.translate(...E,t)},n)),n.interpolation&&this.interpolator.reset()}const u=n.postProcess||this.options.postProcess,f=Be(u)?[u]:u;return e!=null&&(f!=null&&f.length)&&n.applyPostProcessor!==!1&&(e=Xc.handle(f,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,a,u;return Be(e)&&(e=[e]),e.forEach(f=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(f,t),m=d.key;i=m;let w=d.namespaces;this.options.fallbackNS&&(w=w.concat(this.options.fallbackNS));const y=t.count!==void 0&&!Be(t.count),x=y&&!t.ordinal&&t.count===0,A=t.context!==void 0&&(Be(t.context)||typeof t.context=="number")&&t.context!=="",E=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);w.forEach(N=>{var D,Y;this.isValidLookup(n)||(u=N,!Qc[`${E[0]}-${N}`]&&((D=this.utils)!=null&&D.hasLoadedNamespace)&&!((Y=this.utils)!=null&&Y.hasLoadedNamespace(u))&&(Qc[`${E[0]}-${N}`]=!0,this.logger.warn(`key "${i}" for languages "${E.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(Q=>{var ue;if(this.isValidLookup(n))return;a=Q;const he=[m];if((ue=this.i18nFormat)!=null&&ue.addLookupKeys)this.i18nFormat.addLookupKeys(he,m,Q,N,t);else{let ne;y&&(ne=this.pluralResolver.getSuffix(Q,t.count,t));const re=`${this.options.pluralSeparator}zero`,ve=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(y&&(he.push(m+ne),t.ordinal&&ne.indexOf(ve)===0&&he.push(m+ne.replace(ve,this.options.pluralSeparator)),x&&he.push(m+re)),A){const Ee=`${m}${this.options.contextSeparator}${t.context}`;he.push(Ee),y&&(he.push(Ee+ne),t.ordinal&&ne.indexOf(ve)===0&&he.push(Ee+ne.replace(ve,this.options.pluralSeparator)),x&&he.push(Ee+re))}}let oe;for(;oe=he.pop();)this.isValidLookup(n)||(s=oe,n=this.getResource(Q,N,oe,t))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:u}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){var s;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Be(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of t)delete i[s]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class tf{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zn.create("languageUtils")}getScriptPartFromCode(e){if(e=lo(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=lo(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Be(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),Be(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],s=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Be(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):Be(e)&&s(this.formatLanguageCode(e)),n.forEach(a=>{i.indexOf(a)<0&&s(this.formatLanguageCode(a))}),i}}const nf={zero:0,one:1,two:2,few:3,many:4,other:5},rf={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class S1{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Zn.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=lo(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(n,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),rf;if(!e.match(/-|_/))return rf;const f=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(f,t)}return this.pluralRulesCache[s]=a,a}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((i,s)=>nf[i]-nf[s]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const sf=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=g1(r,e,t);return!s&&i&&Be(t)&&(s=Da(r,t,n),s===void 0&&(s=Da(e,t,n))),s},Ba=r=>r.replace(/\$/g,"$$$$");class O1{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Zn.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:u,suffixEscaped:f,formatSeparator:d,unescapeSuffix:m,unescapePrefix:w,nestingPrefix:y,nestingPrefixEscaped:x,nestingSuffix:A,nestingSuffixEscaped:E,nestingOptionsSeparator:N,maxReplaces:D,alwaysFormat:Y}=e.interpolation;this.escape=t!==void 0?t:y1,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Ci(s):a||"{{",this.suffix=u?Ci(u):f||"}}",this.formatSeparator=d||",",this.unescapePrefix=m?"":w||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=y?Ci(y):x||Ci("$t("),this.nestingSuffix=A?Ci(A):E||Ci(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=D||1e3,this.alwaysFormat=Y!==void 0?Y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var x;let s,a,u;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=A=>{if(A.indexOf(this.formatSeparator)<0){const Y=sf(t,f,A,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(Y,void 0,n,{...i,...t,interpolationkey:A}):Y}const E=A.split(this.formatSeparator),N=E.shift().trim(),D=E.join(this.formatSeparator).trim();return this.format(sf(t,f,N,this.options.keySeparator,this.options.ignoreJSONStructure),D,n,{...i,...t,interpolationkey:N})};this.resetRegExp();const m=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,w=((x=i==null?void 0:i.interpolation)==null?void 0:x.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:A=>Ba(A)},{regex:this.regexp,safeValue:A=>this.escapeValue?Ba(this.escape(A)):Ba(A)}].forEach(A=>{for(u=0;s=A.regex.exec(e);){const E=s[1].trim();if(a=d(E),a===void 0)if(typeof m=="function"){const D=m(e,s,i);a=Be(D)?D:""}else if(i&&Object.prototype.hasOwnProperty.call(i,E))a="";else if(w){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${E} for interpolating ${e}`),a="";else!Be(a)&&!this.useRawValueToEscape&&(a=Vc(a));const N=A.safeValue(a);if(e=e.replace(s[0],N),w?(A.regex.lastIndex+=a.length,A.regex.lastIndex-=s[0].length):A.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,a;const u=(f,d)=>{const m=this.nestingOptionsSeparator;if(f.indexOf(m)<0)return f;const w=f.split(new RegExp(`${m}[ ]*{`));let y=`{${w[1]}`;f=w[0],y=this.interpolate(y,a);const x=y.match(/'/g),A=y.match(/"/g);(((x==null?void 0:x.length)??0)%2===0&&!A||A.length%2!==0)&&(y=y.replace(/'/g,'"'));try{a=JSON.parse(y),d&&(a={...d,...a})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,E),`${f}${m}${y}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,f};for(;i=this.nestingRegexp.exec(e);){let f=[];a={...n},a=a.replace&&!Be(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const m=i[1].split(this.formatSeparator).map(w=>w.trim());i[1]=m.shift(),f=m,d=!0}if(s=t(u.call(this,i[1].trim(),a),a),s&&i[0]===e&&!Be(s))return s;Be(s)||(s=Vc(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),d&&(s=f.reduce((m,w)=>this.format(m,w,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}const A1=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[u,...f]=a.split(":"),d=f.join(":").trim().replace(/^'+|'+$/g,""),m=u.trim();t[m]||(t[m]=d),d==="false"&&(t[m]=!1),d==="true"&&(t[m]=!0),isNaN(d)||(t[m]=parseInt(d,10))}})}return{formatName:e,formatOptions:t}},Li=r=>{const e={};return(t,n,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const a=n+JSON.stringify(s);let u=e[a];return u||(u=r(lo(n),i),e[a]=u),u(t)}};class T1{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Zn.create("formatter"),this.options=e,this.formats={number:Li((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return s=>i.format(s)}),currency:Li((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return s=>i.format(s)}),datetime:Li((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return s=>i.format(s)}),relativetime:Li((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return s=>i.format(s,n.range||"day")}),list:Li((t,n)=>{const i=new Intl.ListFormat(t,{...n});return s=>i.format(s)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Li(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=t.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(u=>u.indexOf(")")>-1)){const u=s.findIndex(f=>f.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,u)].join(this.formatSeparator)}return s.reduce((u,f)=>{var w;const{formatName:d,formatOptions:m}=A1(f);if(this.formats[d]){let y=u;try{const x=((w=i==null?void 0:i.formatParams)==null?void 0:w[i.interpolationkey])||{},A=x.locale||x.lng||i.locale||i.lng||n;y=this.formats[d](u,A,{...m,...i,...x})}catch(x){this.logger.warn(x)}return y}else this.logger.warn(`there was no format function for ${d}`);return u},e)}}const _1=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class N1 extends co{constructor(e,t,n){var s,a;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Zn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,n,i.backend,i)}queueLoad(e,t,n,i){const s={},a={},u={},f={};return e.forEach(d=>{let m=!0;t.forEach(w=>{const y=`${d}|${w}`;!n.reload&&this.store.hasResourceBundle(d,w)?this.state[y]=2:this.state[y]<0||(this.state[y]===1?a[y]===void 0&&(a[y]=!0):(this.state[y]=1,m=!1,a[y]===void 0&&(a[y]=!0),s[y]===void 0&&(s[y]=!0),f[w]===void 0&&(f[w]=!0)))}),m||(u[d]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(f)}}loaded(e,t,n){const i=e.split("|"),s=i[0],a=i[1];t&&this.emit("failedLoading",s,a,t),!t&&n&&this.store.addResourceBundle(s,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const u={};this.queue.forEach(f=>{p1(f.loaded,[s],a),_1(f,e),t&&f.errors.push(t),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(d=>{u[d]||(u[d]={});const m=f.loaded[d];m.length&&m.forEach(w=>{u[d][w]===void 0&&(u[d][w]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(f=>!f.done)}read(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:s,callback:a});return}this.readingCalls++;const u=(d,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const w=this.waitingReads.shift();this.read(w.lng,w.ns,w.fcName,w.tried,w.wait,w.callback)}if(d&&m&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,i+1,s*2,a)},s);return}a(d,m)},f=this.backend[n].bind(this.backend);if(f.length===2){try{const d=f(e,t);d&&typeof d.then=="function"?d.then(m=>u(null,m)).catch(u):u(null,d)}catch(d){u(d)}return}return f(e,t,u)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Be(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Be(t)&&(t=[t]);const s=this.queueLoad(e,t,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(a,u)=>{a&&this.logger.warn(`${t}loading namespace ${s} for language ${i} failed`,a),!a&&u&&this.logger.log(`${t}loaded namespace ${s} for language ${i}`,u),this.loaded(e,a,u)})}saveMissing(e,t,n,i,s){var f,d,m,w,y;let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((d=(f=this.services)==null?void 0:f.utils)!=null&&d.hasLoadedNamespace&&!((w=(m=this.services)==null?void 0:m.utils)!=null&&w.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((y=this.backend)!=null&&y.create){const x={...a,isUpdate:s},A=this.backend.create.bind(this.backend);if(A.length<6)try{let E;A.length===5?E=A(e,t,n,i,x):E=A(e,t,n,i),E&&typeof E.then=="function"?E.then(N=>u(null,N)).catch(u):u(null,E)}catch(E){u(E)}else A(e,t,n,i,u,x)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const of=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),Be(r[1])&&(e.defaultValue=r[1]),Be(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),af=r=>{var e,t;return Be(r.ns)&&(r.ns=[r.ns]),Be(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),Be(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},ho=()=>{},C1=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class vs extends co{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=af(e),this.services={},this.logger=Zn,this.modules={external:[]},C1(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Be(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=of();this.options={...i,...this.options,...af(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Zn.init(s(this.modules.logger),this.options):Zn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=T1;const w=new tf(this.options);this.store=new Zc(this.options.resources,this.options);const y=this.services;y.logger=Zn,y.resourceStore=this.store,y.languageUtils=w,y.pluralResolver=new S1(w,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(y.formatter=s(m),y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new O1(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new N1(s(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",function(x){for(var A=arguments.length,E=new Array(A>1?A-1:0),N=1;N<A;N++)E[N-1]=arguments[N];e.emit(x,...E)}),this.modules.languageDetector&&(y.languageDetector=s(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=s(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new fo(this.services,this.options),this.translator.on("*",function(x){for(var A=arguments.length,E=new Array(A>1?A-1:0),N=1;N<A;N++)E[N-1]=arguments[N];e.emit(x,...E)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ho),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=function(){return e.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return e.store[m](...arguments),e}});const f=ys(),d=()=>{const m=(w,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(y),n(w,y)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),f}loadResources(e){var s,a;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ho;const i=Be(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const u=[],f=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(w=>{w!=="cimode"&&u.indexOf(w)<0&&u.push(w)})};i?f(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>f(m)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,d=>f(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(d)})}else n(null)}reloadResources(e,t,n){const i=ys();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ho),this.services.backendConnector.reload(e,t,s=>{i.resolve(),n(s)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Xc.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=ys();this.emit("languageChanging",e);const s=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},a=(f,d)=>{d?(s(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(f,function(){return n.t(...arguments)})},u=f=>{var m,w;!e&&!f&&this.services.languageDetector&&(f=[]);const d=Be(f)?f:this.services.languageUtils.getBestMatchFromCodes(f);d&&(this.language||s(d),this.translator.language||this.translator.changeLanguage(d),(w=(m=this.services.languageDetector)==null?void 0:m.cacheUserLanguage)==null||w.call(m,d)),this.loadResources(d,y=>{a(y,d)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),i}getFixedT(e,t,n){var i=this;const s=function(a,u){let f;if(typeof u!="object"){for(var d=arguments.length,m=new Array(d>2?d-2:0),w=2;w<d;w++)m[w-2]=arguments[w];f=i.options.overloadTranslationOptionHandler([a,u].concat(m))}else f={...u};f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs,f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||n||s.keyPrefix);const y=i.options.keySeparator||".";let x;return f.keyPrefix&&Array.isArray(a)?x=a.map(A=>`${f.keyPrefix}${y}${A}`):x=f.keyPrefix?`${f.keyPrefix}${y}${a}`:a,i.t(x,f)};return Be(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(){var i;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=this.translator)==null?void 0:i.translate(...t)}exists(){var i;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=this.translator)==null?void 0:i.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(u,f)=>{const d=this.services.backendConnector.state[`${u}|${f}`];return d===-1||d===0||d===2};if(t.precheck){const u=t.precheck(this,a);if(u!==void 0)return u}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(s,e)))}loadNamespaces(e,t){const n=ys();return this.options.ns?(Be(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ys();Be(e)&&(e=[e]);const i=this.options.preload||[],s=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{n.resolve(),t&&t(a)}),n):(t&&t(),Promise.resolve())}dir(e){var i,s;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((s=this.services)==null?void 0:s.languageUtils)||new tf(of());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new vs(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ho;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},s=new vs(i);if((e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(u=>{s[u]=this[u]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const u=Object.keys(this.store.data).reduce((f,d)=>(f[d]={...this.store.data[d]},Object.keys(f[d]).reduce((m,w)=>(m[w]={...f[d][w]},m),{})),{});s.store=new Zc(u,i),s.services.resourceStore=s.store}return s.translator=new fo(s.services,i),s.translator.on("*",function(u){for(var f=arguments.length,d=new Array(f>1?f-1:0),m=1;m<f;m++)d[m-1]=arguments[m];s.emit(u,...d)}),s.init(i,t),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const $t=vs.createInstance();$t.createInstance=vs.createInstance;const L1=$t.createInstance,k1=$t.dir,R1=$t.init,P1=$t.loadResources,q1=$t.reloadResources,j1=$t.use,I1=$t.changeLanguage,$1=$t.getFixedT,M1=$t.t,D1=$t.exists,B1=$t.setDefaultNamespace,U1=$t.hasLoadedNamespace,F1=$t.loadNamespaces,K1=$t.loadLanguages;function Ua(r){"@babel/helpers - typeof";return Ua=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ua(r)}function lf(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Ua(XMLHttpRequest))==="object"}function H1(r){return!!r&&typeof r.then=="function"}function z1(r){return H1(r)?r:Promise.resolve(r)}function uf(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function cf(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?uf(Object(t),!0).forEach(function(n){V1(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):uf(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function V1(r,e,t){return(e=W1(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function W1(r){var e=G1(r,"string");return ei(e)=="symbol"?e:e+""}function G1(r,e){if(ei(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(ei(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function ei(r){"@babel/helpers - typeof";return ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ei(r)}var kr=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?kr=global.fetch:typeof window<"u"&&window.fetch&&(kr=window.fetch);var ws;lf()&&(typeof global<"u"&&global.XMLHttpRequest?ws=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(ws=window.XMLHttpRequest));var po;if(typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?po=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(po=window.ActiveXObject)),typeof kr!="function"&&(kr=void 0),!kr&&!ws&&!po)try{Promise.resolve().then(()=>Tw).then(function(r){kr=r.default}).catch(function(){})}catch{}var Fa=function(e,t){if(t&&ei(t)==="object"){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},ff=function(e,t,n,i){var s=function(f){if(!f.ok)return n(f.statusText||"Error",{status:f.status});f.text().then(function(d){n(null,{status:f.status,data:d})}).catch(n)};if(i){var a=i(e,t);if(a instanceof Promise){a.then(s).catch(n);return}}typeof fetch=="function"?fetch(e,t).then(s).catch(n):kr(e,t).then(s).catch(n)},hf=!1,Y1=function(e,t,n,i){e.queryStringParams&&(t=Fa(t,e.queryStringParams));var s=cf({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(s["Content-Type"]="application/json");var a=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,u=cf({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:s},hf?{}:a),f=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{ff(t,u,i,f)}catch(d){if(!a||Object.keys(a).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(a).forEach(function(m){delete u[m]}),ff(t,u,i,f),hf=!0}catch(m){i(m)}}},J1=function(e,t,n,i){n&&ei(n)==="object"&&(n=Fa("",n).slice(1)),e.queryStringParams&&(t=Fa(t,e.queryStringParams));try{var s=ws?new ws:new po("MSXML2.XMLHTTP.3.0");s.open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(var u in a)s.setRequestHeader(u,a[u]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(f){console&&console.log(f)}},Z1=function(e,t,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},kr&&t.indexOf("file:")!==0)return Y1(e,t,n,i);if(lf()||typeof ActiveXObject=="function")return J1(e,t,n,i);i(new Error("No fetch and no xhr implementation found!"))};function ki(r){"@babel/helpers - typeof";return ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ki(r)}function df(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ka(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?df(Object(t),!0).forEach(function(n){pf(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):df(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function X1(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Q1(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,gf(n.key),n)}}function e0(r,e,t){return e&&Q1(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function pf(r,e,t){return(e=gf(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function gf(r){var e=t0(r,"string");return ki(e)=="symbol"?e:e+""}function t0(r,e){if(ki(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(ki(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var n0=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){return pf({},n,i||"")},parseLoadPayload:function(t,n){},request:Z1,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},mf=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};X1(this,r),this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}return e0(r,[{key:"init",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=t,this.options=Ka(Ka(Ka({},n0()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var a=setInterval(function(){return n.reload()},this.options.reloadInterval);ki(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,s,a){var u=this,f=this.options.loadPath;typeof this.options.loadPath=="function"&&(f=this.options.loadPath(t,i)),f=z1(f),f.then(function(d){if(!d)return a(null,{});var m=u.services.interpolator.interpolate(d,{lng:t.join("+"),ns:i.join("+")});u.loadUrl(m,a,n,s)})}},{key:"loadUrl",value:function(t,n,i,s){var a=this,u=typeof i=="string"?[i]:i,f=typeof s=="string"?[s]:s,d=this.options.parseLoadPayload(u,f);this.options.request(this.options,t,d,function(m,w){if(w&&(w.status>=500&&w.status<600||!w.status))return n("failed loading "+t+"; status code: "+w.status,!0);if(w&&w.status>=400&&w.status<500)return n("failed loading "+t+"; status code: "+w.status,!1);if(!w&&m&&m.message){var y=m.message.toLowerCase(),x=["failed","fetch","network","load"].find(function(N){return y.indexOf(N)>-1});if(x)return n("failed loading "+t+": "+m.message,!0)}if(m)return n(m,!1);var A,E;try{typeof w.data=="string"?A=a.options.parse(w.data,i,s):A=w.data}catch{E="failed parsing "+t+" to json"}if(E)return n(E,!1);n(null,A)})}},{key:"create",value:function(t,n,i,s,a){var u=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var f=this.options.parsePayload(n,i,s),d=0,m=[],w=[];t.forEach(function(y){var x=u.options.addPath;typeof u.options.addPath=="function"&&(x=u.options.addPath(y,n));var A=u.services.interpolator.interpolate(x,{lng:y,ns:n});u.options.request(u.options,A,f,function(E,N){d+=1,m.push(E),w.push(N),d===t.length&&typeof a=="function"&&a(m,w)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,s=n.languageUtils,a=n.logger,u=i.language;if(!(u&&u.toLowerCase()==="cimode")){var f=[],d=function(w){var y=s.toResolveHierarchy(w);y.forEach(function(x){f.indexOf(x)<0&&f.push(x)})};d(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(m){return d(m)}),f.forEach(function(m){t.allOptions.ns.forEach(function(w){i.read(m,w,"read",null,null,function(y,x){y&&a.warn("loading namespace ".concat(w," for language ").concat(m," failed"),y),!y&&x&&a.log("loaded namespace ".concat(w," for language ").concat(m),x),i.loaded("".concat(m,"|").concat(w),y,x)})})})}}}])}();mf.type="backend";const{slice:r0,forEach:i0}=[];function s0(r){return i0.call(r0.call(arguments,1),e=>{if(e)for(const t in e)r[t]===void 0&&(r[t]=e[t])}),r}const yf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,o0=function(r,e){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let s=`${r}=${i}`;if(n.maxAge>0){const a=n.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(n.domain){if(!yf.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!yf.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},bf={create(r,e,t,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),n&&(i.domain=n),document.cookie=o0(r,encodeURIComponent(e),i)},read(r){const e=`${r}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let i=t[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(r){this.create(r,"",-1)}};var a0={name:"cookie",lookup(r){let{lookupCookie:e}=r;if(e&&typeof document<"u")return bf.read(e)||void 0},cacheUserLanguage(r,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:i,cookieOptions:s}=e;t&&typeof document<"u"&&bf.create(t,r,n,i,s)}},l0={name:"querystring",lookup(r){var n;let{lookupQuerystring:e}=r,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let u=0;u<a.length;u++){const f=a[u].indexOf("=");f>0&&a[u].substring(0,f)===e&&(t=a[u].substring(f+1))}}return t}};let Ri=null;const vf=()=>{if(Ri!==null)return Ri;try{if(Ri=typeof window<"u"&&window.localStorage!==null,!Ri)return!1;const r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r)}catch{Ri=!1}return Ri};var u0={name:"localStorage",lookup(r){let{lookupLocalStorage:e}=r;if(e&&vf())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupLocalStorage:t}=e;t&&vf()&&window.localStorage.setItem(t,r)}};let Pi=null;const wf=()=>{if(Pi!==null)return Pi;try{if(Pi=typeof window<"u"&&window.sessionStorage!==null,!Pi)return!1;const r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r)}catch{Pi=!1}return Pi};var c0={name:"sessionStorage",lookup(r){let{lookupSessionStorage:e}=r;if(e&&wf())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupSessionStorage:t}=e;t&&wf()&&window.sessionStorage.setItem(t,r)}},f0={name:"navigator",lookup(r){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:i}=navigator;if(t)for(let s=0;s<t.length;s++)e.push(t[s]);n&&e.push(n),i&&e.push(i)}return e.length>0?e:void 0}},h0={name:"htmlTag",lookup(r){let{htmlTag:e}=r,t;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},d0={name:"path",lookup(r){var i;let{lookupFromPathIndex:e}=r;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},p0={name:"subdomain",lookup(r){var i,s;let{lookupFromSubdomainIndex:e}=r;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[t]}};let xf=!1;try{document.cookie,xf=!0}catch{}const Ef=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];xf||Ef.splice(1,1);const g0=()=>({order:Ef,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r});class Sf{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=s0(t,this.options||{},g0()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(a0),this.addDetector(l0),this.addDetector(u0),this.addDetector(c0),this.addDetector(f0),this.addDetector(h0),this.addDetector(d0),this.addDetector(p0)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),t=t.map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}Sf.type="languageDetector";var m0=Object.defineProperty,y0=(r,e,t)=>e in r?m0(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Of=(r,e,t)=>y0(r,typeof e!="symbol"?e+"":e,t),b0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qi(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ha={exports:{}},v0=Ha.exports,Af;function w0(){return Af||(Af=1,function(r,e){(function(t,n){r.exports=n()})(v0,function(){var t=function(o,l){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p}||function(c,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(c[g]=p[g])})(o,l)},n=function(){return(n=Object.assign||function(o){for(var l,c=1,p=arguments.length;c<p;c++)for(var g in l=arguments[c])Object.prototype.hasOwnProperty.call(l,g)&&(o[g]=l[g]);return o}).apply(this,arguments)};function i(o,l,c){for(var p,g=0,b=l.length;g<b;g++)!p&&g in l||((p=p||Array.prototype.slice.call(l,0,g))[g]=l[g]);return o.concat(p||Array.prototype.slice.call(l))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:b0,a=Object.keys,u=Array.isArray;function f(o,l){return typeof l!="object"||a(l).forEach(function(c){o[c]=l[c]}),o}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var d=Object.getPrototypeOf,m={}.hasOwnProperty;function w(o,l){return m.call(o,l)}function y(o,l){typeof l=="function"&&(l=l(d(o))),(typeof Reflect>"u"?a:Reflect.ownKeys)(l).forEach(function(c){A(o,c,l[c])})}var x=Object.defineProperty;function A(o,l,c,p){x(o,l,f(c&&w(c,"get")&&typeof c.get=="function"?{get:c.get,set:c.set,configurable:!0}:{value:c,configurable:!0,writable:!0},p))}function E(o){return{from:function(l){return o.prototype=Object.create(l.prototype),A(o.prototype,"constructor",o),{extend:y.bind(null,o.prototype)}}}}var N=Object.getOwnPropertyDescriptor,D=[].slice;function Y(o,l,c){return D.call(o,l,c)}function Q(o,l){return l(o)}function he(o){if(!o)throw new Error("Assertion Failed")}function oe(o){s.setImmediate?setImmediate(o):setTimeout(o,0)}function ue(o,l){if(typeof l=="string"&&w(o,l))return o[l];if(!l)return o;if(typeof l!="string"){for(var c=[],p=0,g=l.length;p<g;++p){var b=ue(o,l[p]);c.push(b)}return c}var _=l.indexOf(".");if(_!==-1){var C=o[l.substr(0,_)];return C==null?void 0:ue(C,l.substr(_+1))}}function ne(o,l,c){if(o&&l!==void 0&&!("isFrozen"in Object&&Object.isFrozen(o)))if(typeof l!="string"&&"length"in l){he(typeof c!="string"&&"length"in c);for(var p=0,g=l.length;p<g;++p)ne(o,l[p],c[p])}else{var b,_,C=l.indexOf(".");C!==-1?(b=l.substr(0,C),(_=l.substr(C+1))===""?c===void 0?u(o)&&!isNaN(parseInt(b))?o.splice(b,1):delete o[b]:o[b]=c:ne(C=!(C=o[b])||!w(o,b)?o[b]={}:C,_,c)):c===void 0?u(o)&&!isNaN(parseInt(l))?o.splice(l,1):delete o[l]:o[l]=c}}function re(o){var l,c={};for(l in o)w(o,l)&&(c[l]=o[l]);return c}var ve=[].concat;function Ee(o){return ve.apply([],o)}var st="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Ee([8,16,32,64].map(function(o){return["Int","Uint","Float"].map(function(l){return l+o+"Array"})}))).filter(function(o){return s[o]}),O=new Set(st.map(function(o){return s[o]})),W=null;function R(o){return W=new WeakMap,o=function l(c){if(!c||typeof c!="object")return c;var p=W.get(c);if(p)return p;if(u(c)){p=[],W.set(c,p);for(var g=0,b=c.length;g<b;++g)p.push(l(c[g]))}else if(O.has(c.constructor))p=c;else{var _,C=d(c);for(_ in p=C===Object.prototype?{}:Object.create(C),W.set(c,p),c)w(c,_)&&(p[_]=l(c[_]))}return p}(o),W=null,o}var V={}.toString;function S(o){return V.call(o).slice(8,-1)}var T=typeof Symbol<"u"?Symbol.iterator:"@@iterator",$=typeof T=="symbol"?function(o){var l;return o!=null&&(l=o[T])&&l.apply(o)}:function(){return null};function U(o,l){return l=o.indexOf(l),0<=l&&o.splice(l,1),0<=l}var J={};function K(o){var l,c,p,g;if(arguments.length===1){if(u(o))return o.slice();if(this===J&&typeof o=="string")return[o];if(g=$(o)){for(c=[];!(p=g.next()).done;)c.push(p.value);return c}if(o==null)return[o];if(typeof(l=o.length)!="number")return[o];for(c=new Array(l);l--;)c[l]=o[l];return c}for(l=arguments.length,c=new Array(l);l--;)c[l]=arguments[l];return c}var ae=typeof Symbol<"u"?function(o){return o[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Fe=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],_n=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Fe),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 de(o,l){this.name=o,this.message=l}function Ne(o,l){return o+". Errors: "+Object.keys(l).map(function(c){return l[c].toString()}).filter(function(c,p,g){return g.indexOf(c)===p}).join(`
80
+ `)}function we(o,l,c,p){this.failures=l,this.failedKeys=p,this.successCount=c,this.message=Ne(o,l)}function Ue(o,l){this.name="BulkError",this.failures=Object.keys(l).map(function(c){return l[c]}),this.failuresByPos=l,this.message=Ne(o,this.failures)}E(de).from(Error).extend({toString:function(){return this.name+": "+this.message}}),E(we).from(de),E(Ue).from(de);var We=_n.reduce(function(o,l){return o[l]=l+"Error",o},{}),je=de,le=_n.reduce(function(o,l){var c=l+"Error";function p(g,b){this.name=c,g?typeof g=="string"?(this.message="".concat(g).concat(b?`
81
+ `+b:""),this.inner=b||null):typeof g=="object"&&(this.message="".concat(g.name," ").concat(g.message),this.inner=g):(this.message=pe[l]||c,this.inner=null)}return E(p).from(je),o[l]=p,o},{});le.Syntax=SyntaxError,le.Type=TypeError,le.Range=RangeError;var qe=Fe.reduce(function(o,l){return o[l+"Error"]=le[l],o},{}),Ie=_n.reduce(function(o,l){return["Syntax","Type","Range"].indexOf(l)===-1&&(o[l+"Error"]=le[l]),o},{});function Ae(){}function De(o){return o}function it(o,l){return o==null||o===De?l:function(c){return l(o(c))}}function et(o,l){return function(){o.apply(this,arguments),l.apply(this,arguments)}}function zt(o,l){return o===Ae?l:function(){var c=o.apply(this,arguments);c!==void 0&&(arguments[0]=c);var p=this.onsuccess,g=this.onerror;this.onsuccess=null,this.onerror=null;var b=l.apply(this,arguments);return p&&(this.onsuccess=this.onsuccess?et(p,this.onsuccess):p),g&&(this.onerror=this.onerror?et(g,this.onerror):g),b!==void 0?b:c}}function gn(o,l){return o===Ae?l:function(){o.apply(this,arguments);var c=this.onsuccess,p=this.onerror;this.onsuccess=this.onerror=null,l.apply(this,arguments),c&&(this.onsuccess=this.onsuccess?et(c,this.onsuccess):c),p&&(this.onerror=this.onerror?et(p,this.onerror):p)}}function mn(o,l){return o===Ae?l:function(c){var p=o.apply(this,arguments);f(c,p);var g=this.onsuccess,b=this.onerror;return this.onsuccess=null,this.onerror=null,c=l.apply(this,arguments),g&&(this.onsuccess=this.onsuccess?et(g,this.onsuccess):g),b&&(this.onerror=this.onerror?et(b,this.onerror):b),p===void 0?c===void 0?void 0:c:f(p,c)}}function yn(o,l){return o===Ae?l:function(){return l.apply(this,arguments)!==!1&&o.apply(this,arguments)}}function en(o,l){return o===Ae?l:function(){var c=o.apply(this,arguments);if(c&&typeof c.then=="function"){for(var p=this,g=arguments.length,b=new Array(g);g--;)b[g]=arguments[g];return c.then(function(){return l.apply(p,b)})}return l.apply(this,arguments)}}Ie.ModifyError=we,Ie.DexieError=de,Ie.BulkError=Ue;var _t=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function P(o){_t=o}var _e={},Se=100,st=typeof Promise>"u"?[]:function(){var o=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[o,d(o),o];var l=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[l,d(l),o]}(),Fe=st[0],_n=st[1],st=st[2],_n=_n&&_n.then,Ge=Fe&&Fe.constructor,$e=!!st,wt=function(o,l){bn.push([o,l]),ut&&(queueMicrotask(si),ut=!1)},ft=!0,ut=!0,Ot=[],Zt=[],Nt=De,At={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ae,pgp:!1,env:{},finalize:Ae},Oe=At,bn=[],Vt=0,Dt=[];function be(o){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var l=this._PSD=Oe;if(typeof o!="function"){if(o!==_e)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&br(this,this._value))}this._state=null,this._value=null,++l.ref,function c(p,g){try{g(function(b){if(p._state===null){if(b===p)throw new TypeError("A promise cannot be resolved with itself.");var _=p._lib&&Wt();b&&typeof b.then=="function"?c(p,function(C,q){b instanceof be?b._then(C,q):b.then(C,q)}):(p._state=!0,p._value=b,tr(p)),_&&Mn()}},br.bind(null,p))}catch(b){br(p,b)}}(this,o)}var yr={get:function(){var o=Oe,l=Pr;function c(p,g){var b=this,_=!o.global&&(o!==Oe||l!==Pr),C=_&&!wn(),q=new be(function(I,F){vr(b,new er(Di(p,o,_,C),Di(g,o,_,C),I,F,o))});return this._consoleTask&&(q._consoleTask=this._consoleTask),q}return c.prototype=_e,c},set:function(o){A(this,"then",o&&o.prototype===_e?yr:{get:function(){return o},set:yr.set})}};function er(o,l,c,p,g){this.onFulfilled=typeof o=="function"?o:null,this.onRejected=typeof l=="function"?l:null,this.resolve=c,this.reject=p,this.psd=g}function br(o,l){var c,p;Zt.push(l),o._state===null&&(c=o._lib&&Wt(),l=Nt(l),o._state=!1,o._value=l,p=o,Ot.some(function(g){return g._value===p._value})||Ot.push(p),tr(o),c&&Mn())}function tr(o){var l=o._listeners;o._listeners=[];for(var c=0,p=l.length;c<p;++c)vr(o,l[c]);var g=o._PSD;--g.ref||g.finalize(),Vt===0&&(++Vt,wt(function(){--Vt==0&&tn()},[]))}function vr(o,l){if(o._state!==null){var c=o._state?l.onFulfilled:l.onRejected;if(c===null)return(o._state?l.resolve:l.reject)(o._value);++l.psd.ref,++Vt,wt(ii,[c,o,l])}else o._listeners.push(l)}function ii(o,l,c){try{var p,g=l._value;!l._state&&Zt.length&&(Zt=[]),p=_t&&l._consoleTask?l._consoleTask.run(function(){return o(g)}):o(g),l._state||Zt.indexOf(g)!==-1||function(b){for(var _=Ot.length;_;)if(Ot[--_]._value===b._value)return Ot.splice(_,1)}(l),c.resolve(p)}catch(b){c.reject(b)}finally{--Vt==0&&tn(),--c.psd.ref||c.psd.finalize()}}function si(){Dn(At,function(){Wt()&&Mn()})}function Wt(){var o=ft;return ut=ft=!1,o}function Mn(){var o,l,c;do for(;0<bn.length;)for(o=bn,bn=[],c=o.length,l=0;l<c;++l){var p=o[l];p[0].apply(null,p[1])}while(0<bn.length);ut=ft=!0}function tn(){var o=Ot;Ot=[],o.forEach(function(p){p._PSD.onunhandled.call(null,p._value,p)});for(var l=Dt.slice(0),c=l.length;c;)l[--c]()}function Rr(o){return new be(_e,!1,o)}function ot(o,l){var c=Oe;return function(){var p=Wt(),g=Oe;try{return xn(c,!0),o.apply(this,arguments)}catch(b){l&&l(b)}finally{xn(g,!1),p&&Mn()}}}y(be.prototype,{then:yr,_then:function(o,l){vr(this,new er(null,null,o,l,Oe))},catch:function(o){if(arguments.length===1)return this.then(null,o);var l=o,c=arguments[1];return typeof l=="function"?this.then(null,function(p){return(p instanceof l?c:Rr)(p)}):this.then(null,function(p){return(p&&p.name===l?c:Rr)(p)})},finally:function(o){return this.then(function(l){return be.resolve(o()).then(function(){return l})},function(l){return be.resolve(o()).then(function(){return Rr(l)})})},timeout:function(o,l){var c=this;return o<1/0?new be(function(p,g){var b=setTimeout(function(){return g(new le.Timeout(l))},o);c.then(p,g).finally(clearTimeout.bind(null,b))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&A(be.prototype,Symbol.toStringTag,"Dexie.Promise"),At.env=Mi(),y(be,{all:function(){var o=K.apply(null,arguments).map(xt);return new be(function(l,c){o.length===0&&l([]);var p=o.length;o.forEach(function(g,b){return be.resolve(g).then(function(_){o[b]=_,--p||l(o)},c)})})},resolve:function(o){return o instanceof be?o:o&&typeof o.then=="function"?new be(function(l,c){o.then(l,c)}):new be(_e,!0,o)},reject:Rr,race:function(){var o=K.apply(null,arguments).map(xt);return new be(function(l,c){o.map(function(p){return be.resolve(p).then(l,c)})})},PSD:{get:function(){return Oe},set:function(o){return Oe=o}},totalEchoes:{get:function(){return Pr}},newPSD:vn,usePSD:Dn,scheduler:{get:function(){return wt},set:function(o){wt=o}},rejectionMapper:{get:function(){return Nt},set:function(o){Nt=o}},follow:function(o,l){return new be(function(c,p){return vn(function(g,b){var _=Oe;_.unhandleds=[],_.onunhandled=b,_.finalize=et(function(){var C,q=this;C=function(){q.unhandleds.length===0?g():b(q.unhandleds[0])},Dt.push(function I(){C(),Dt.splice(Dt.indexOf(I),1)}),++Vt,wt(function(){--Vt==0&&tn()},[])},_.finalize),o()},l,c,p)})}}),Ge&&(Ge.allSettled&&A(be,"allSettled",function(){var o=K.apply(null,arguments).map(xt);return new be(function(l){o.length===0&&l([]);var c=o.length,p=new Array(c);o.forEach(function(g,b){return be.resolve(g).then(function(_){return p[b]={status:"fulfilled",value:_}},function(_){return p[b]={status:"rejected",reason:_}}).then(function(){return--c||l(p)})})})}),Ge.any&&typeof AggregateError<"u"&&A(be,"any",function(){var o=K.apply(null,arguments).map(xt);return new be(function(l,c){o.length===0&&c(new AggregateError([]));var p=o.length,g=new Array(p);o.forEach(function(b,_){return be.resolve(b).then(function(C){return l(C)},function(C){g[_]=C,--p||c(new AggregateError(g))})})})}),Ge.withResolvers&&(be.withResolvers=Ge.withResolvers));var pt={awaits:0,echoes:0,id:0},$i=0,nr=[],gt=0,Pr=0,Ns=0;function vn(o,l,c,p){var g=Oe,b=Object.create(g);return b.parent=g,b.ref=0,b.global=!1,b.id=++Ns,At.env,b.env=$e?{Promise:be,PromiseProp:{value:be,configurable:!0,writable:!0},all:be.all,race:be.race,allSettled:be.allSettled,any:be.any,resolve:be.resolve,reject:be.reject}:{},l&&f(b,l),++g.ref,b.finalize=function(){--this.parent.ref||this.parent.finalize()},p=Dn(b,o,c,p),b.ref===0&&b.finalize(),p}function rr(){return pt.id||(pt.id=++$i),++pt.awaits,pt.echoes+=Se,pt.id}function wn(){return!!pt.awaits&&(--pt.awaits==0&&(pt.id=0),pt.echoes=pt.awaits*Se,!0)}function xt(o){return pt.echoes&&o&&o.constructor===Ge?(rr(),o.then(function(l){return wn(),l},function(l){return wn(),ct(l)})):o}function Cs(){var o=nr[nr.length-1];nr.pop(),xn(o,!1)}function xn(o,l){var c,p=Oe;(l?!pt.echoes||gt++&&o===Oe:!gt||--gt&&o===Oe)||queueMicrotask(l?(function(g){++Pr,pt.echoes&&--pt.echoes!=0||(pt.echoes=pt.awaits=pt.id=0),nr.push(Oe),xn(g,!0)}).bind(null,o):Cs),o!==Oe&&(Oe=o,p===At&&(At.env=Mi()),$e&&(c=At.env.Promise,l=o.env,(p.global||o.global)&&(Object.defineProperty(s,"Promise",l.PromiseProp),c.all=l.all,c.race=l.race,c.resolve=l.resolve,c.reject=l.reject,l.allSettled&&(c.allSettled=l.allSettled),l.any&&(c.any=l.any))))}function Mi(){var o=s.Promise;return $e?{Promise:o,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:o.all,race:o.race,allSettled:o.allSettled,any:o.any,resolve:o.resolve,reject:o.reject}:{}}function Dn(o,l,c,p,g){var b=Oe;try{return xn(o,!0),l(c,p,g)}finally{xn(b,!1)}}function Di(o,l,c,p){return typeof o!="function"?o:function(){var g=Oe;c&&rr(),xn(l,!0);try{return o.apply(this,arguments)}finally{xn(g,!1),p&&queueMicrotask(wn)}}}function Ct(o){Promise===Ge&&pt.echoes===0?gt===0?o():enqueueNativeMicroTask(o):setTimeout(o,0)}(""+_n).indexOf("[native code]")===-1&&(rr=wn=Ae);var ct=be.reject,Bn="￿",nn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Bi="String expected.",ir=[],Un="__dbnames",qr="readonly",sr="readwrite";function Lt(o,l){return o?l?function(){return o.apply(this,arguments)&&l.apply(this,arguments)}:o:l}var jr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ir(o){return typeof o!="string"||/\./.test(o)?function(l){return l}:function(l){return l[o]===void 0&&o in l&&delete(l=R(l))[o],l}}function Ui(){throw le.Type()}function Ye(o,l){try{var c=Fi(o),p=Fi(l);if(c!==p)return c==="Array"?1:p==="Array"?-1:c==="binary"?1:p==="binary"?-1:c==="string"?1:p==="string"?-1:c==="Date"?1:p!=="Date"?NaN:-1;switch(c){case"number":case"Date":case"string":return l<o?1:o<l?-1:0;case"binary":return function(g,b){for(var _=g.length,C=b.length,q=_<C?_:C,I=0;I<q;++I)if(g[I]!==b[I])return g[I]<b[I]?-1:1;return _===C?0:_<C?-1:1}(Ki(o),Ki(l));case"Array":return function(g,b){for(var _=g.length,C=b.length,q=_<C?_:C,I=0;I<q;++I){var F=Ye(g[I],b[I]);if(F!==0)return F}return _===C?0:_<C?-1:1}(o,l)}}catch{}return NaN}function Fi(o){var l=typeof o;return l!="object"?l:ArrayBuffer.isView(o)?"binary":(o=S(o),o==="ArrayBuffer"?"binary":o)}function Ki(o){return o instanceof Uint8Array?o:ArrayBuffer.isView(o)?new Uint8Array(o.buffer,o.byteOffset,o.byteLength):new Uint8Array(o)}var wr=(rt.prototype._trans=function(o,l,c){var p=this._tx||Oe.trans,g=this.name,b=_t&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(o==="readonly"?"read":"write"," ").concat(this.name));function _(I,F,L){if(!L.schema[g])throw new le.NotFound("Table "+g+" not part of transaction");return l(L.idbtrans,L)}var C=Wt();try{var q=p&&p.db._novip===this.db._novip?p===Oe.trans?p._promise(o,_,c):vn(function(){return p._promise(o,_,c)},{trans:p,transless:Oe.transless||Oe}):function I(F,L,z,j){if(F.idbdb&&(F._state.openComplete||Oe.letThrough||F._vip)){var B=F._createTransaction(L,z,F._dbSchema);try{B.create(),F._state.PR1398_maxLoop=3}catch(H){return H.name===We.InvalidState&&F.isOpen()&&0<--F._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),F.close({disableAutoOpen:!1}),F.open().then(function(){return I(F,L,z,j)})):ct(H)}return B._promise(L,function(H,M){return vn(function(){return Oe.trans=B,j(H,M,B)})}).then(function(H){if(L==="readwrite")try{B.idbtrans.commit()}catch{}return L==="readonly"?H:B._completion.then(function(){return H})})}if(F._state.openComplete)return ct(new le.DatabaseClosed(F._state.dbOpenError));if(!F._state.isBeingOpened){if(!F._state.autoOpen)return ct(new le.DatabaseClosed);F.open().catch(Ae)}return F._state.dbReadyPromise.then(function(){return I(F,L,z,j)})}(this.db,o,[this.name],_);return b&&(q._consoleTask=b,q=q.catch(function(I){return console.trace(I),ct(I)})),q}finally{C&&Mn()}},rt.prototype.get=function(o,l){var c=this;return o&&o.constructor===Object?this.where(o).first(l):o==null?ct(new le.Type("Invalid argument to Table.get()")):this._trans("readonly",function(p){return c.core.get({trans:p,key:o}).then(function(g){return c.hook.reading.fire(g)})}).then(l)},rt.prototype.where=function(o){if(typeof o=="string")return new this.db.WhereClause(this,o);if(u(o))return new this.db.WhereClause(this,"[".concat(o.join("+"),"]"));var l=a(o);if(l.length===1)return this.where(l[0]).equals(o[l[0]]);var c=this.schema.indexes.concat(this.schema.primKey).filter(function(C){if(C.compound&&l.every(function(I){return 0<=C.keyPath.indexOf(I)})){for(var q=0;q<l.length;++q)if(l.indexOf(C.keyPath[q])===-1)return!1;return!0}return!1}).sort(function(C,q){return C.keyPath.length-q.keyPath.length})[0];if(c&&this.db._maxKey!==Bn){var b=c.keyPath.slice(0,l.length);return this.where(b).equals(b.map(function(q){return o[q]}))}!c&&_t&&console.warn("The query ".concat(JSON.stringify(o)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(l.join("+"),"]"));var p=this.schema.idxByName;function g(C,q){return Ye(C,q)===0}var _=l.reduce(function(L,q){var I=L[0],F=L[1],L=p[q],z=o[q];return[I||L,I||!L?Lt(F,L&&L.multi?function(j){return j=ue(j,q),u(j)&&j.some(function(B){return g(z,B)})}:function(j){return g(z,ue(j,q))}):F]},[null,null]),b=_[0],_=_[1];return b?this.where(b.name).equals(o[b.keyPath]).filter(_):c?this.filter(_):this.where(l).equals("")},rt.prototype.filter=function(o){return this.toCollection().and(o)},rt.prototype.count=function(o){return this.toCollection().count(o)},rt.prototype.offset=function(o){return this.toCollection().offset(o)},rt.prototype.limit=function(o){return this.toCollection().limit(o)},rt.prototype.each=function(o){return this.toCollection().each(o)},rt.prototype.toArray=function(o){return this.toCollection().toArray(o)},rt.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},rt.prototype.orderBy=function(o){return new this.db.Collection(new this.db.WhereClause(this,u(o)?"[".concat(o.join("+"),"]"):o))},rt.prototype.reverse=function(){return this.toCollection().reverse()},rt.prototype.mapToClass=function(o){var l,c=this.db,p=this.name;function g(){return l!==null&&l.apply(this,arguments)||this}(this.schema.mappedClass=o).prototype instanceof Ui&&(function(q,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");function F(){this.constructor=q}t(q,I),q.prototype=I===null?Object.create(I):(F.prototype=I.prototype,new F)}(g,l=o),Object.defineProperty(g.prototype,"db",{get:function(){return c},enumerable:!1,configurable:!0}),g.prototype.table=function(){return p},o=g);for(var b=new Set,_=o.prototype;_;_=d(_))Object.getOwnPropertyNames(_).forEach(function(q){return b.add(q)});function C(q){if(!q)return q;var I,F=Object.create(o.prototype);for(I in q)if(!b.has(I))try{F[I]=q[I]}catch{}return F}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=C,this.hook("reading",C),o},rt.prototype.defineClass=function(){return this.mapToClass(function(o){f(this,o)})},rt.prototype.add=function(o,l){var c=this,p=this.schema.primKey,g=p.auto,b=p.keyPath,_=o;return b&&g&&(_=Ir(b)(o)),this._trans("readwrite",function(C){return c.core.mutate({trans:C,type:"add",keys:l!=null?[l]:null,values:[_]})}).then(function(C){return C.numFailures?be.reject(C.failures[0]):C.lastResult}).then(function(C){if(b)try{ne(o,b,C)}catch{}return C})},rt.prototype.update=function(o,l){return typeof o!="object"||u(o)?this.where(":id").equals(o).modify(l):(o=ue(o,this.schema.primKey.keyPath),o===void 0?ct(new le.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(o).modify(l))},rt.prototype.put=function(o,l){var c=this,p=this.schema.primKey,g=p.auto,b=p.keyPath,_=o;return b&&g&&(_=Ir(b)(o)),this._trans("readwrite",function(C){return c.core.mutate({trans:C,type:"put",values:[_],keys:l!=null?[l]:null})}).then(function(C){return C.numFailures?be.reject(C.failures[0]):C.lastResult}).then(function(C){if(b)try{ne(o,b,C)}catch{}return C})},rt.prototype.delete=function(o){var l=this;return this._trans("readwrite",function(c){return l.core.mutate({trans:c,type:"delete",keys:[o]})}).then(function(c){return c.numFailures?be.reject(c.failures[0]):void 0})},rt.prototype.clear=function(){var o=this;return this._trans("readwrite",function(l){return o.core.mutate({trans:l,type:"deleteRange",range:jr})}).then(function(l){return l.numFailures?be.reject(l.failures[0]):void 0})},rt.prototype.bulkGet=function(o){var l=this;return this._trans("readonly",function(c){return l.core.getMany({keys:o,trans:c}).then(function(p){return p.map(function(g){return l.hook.reading.fire(g)})})})},rt.prototype.bulkAdd=function(o,l,c){var p=this,g=Array.isArray(l)?l:void 0,b=(c=c||(g?void 0:l))?c.allKeys:void 0;return this._trans("readwrite",function(_){var I=p.schema.primKey,C=I.auto,I=I.keyPath;if(I&&g)throw new le.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(g&&g.length!==o.length)throw new le.InvalidArgument("Arguments objects and keys must have the same length");var q=o.length,I=I&&C?o.map(Ir(I)):o;return p.core.mutate({trans:_,type:"add",keys:g,values:I,wantResults:b}).then(function(B){var L=B.numFailures,z=B.results,j=B.lastResult,B=B.failures;if(L===0)return b?z:j;throw new Ue("".concat(p.name,".bulkAdd(): ").concat(L," of ").concat(q," operations failed"),B)})})},rt.prototype.bulkPut=function(o,l,c){var p=this,g=Array.isArray(l)?l:void 0,b=(c=c||(g?void 0:l))?c.allKeys:void 0;return this._trans("readwrite",function(_){var I=p.schema.primKey,C=I.auto,I=I.keyPath;if(I&&g)throw new le.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(g&&g.length!==o.length)throw new le.InvalidArgument("Arguments objects and keys must have the same length");var q=o.length,I=I&&C?o.map(Ir(I)):o;return p.core.mutate({trans:_,type:"put",keys:g,values:I,wantResults:b}).then(function(B){var L=B.numFailures,z=B.results,j=B.lastResult,B=B.failures;if(L===0)return b?z:j;throw new Ue("".concat(p.name,".bulkPut(): ").concat(L," of ").concat(q," operations failed"),B)})})},rt.prototype.bulkUpdate=function(o){var l=this,c=this.core,p=o.map(function(_){return _.key}),g=o.map(function(_){return _.changes}),b=[];return this._trans("readwrite",function(_){return c.getMany({trans:_,keys:p,cache:"clone"}).then(function(C){var q=[],I=[];o.forEach(function(L,z){var j=L.key,B=L.changes,H=C[z];if(H){for(var M=0,G=Object.keys(B);M<G.length;M++){var Z=G[M],X=B[Z];if(Z===l.schema.primKey.keyPath){if(Ye(X,j)!==0)throw new le.Constraint("Cannot update primary key in bulkUpdate()")}else ne(H,Z,X)}b.push(z),q.push(j),I.push(H)}});var F=q.length;return c.mutate({trans:_,type:"put",keys:q,values:I,updates:{keys:p,changeSpecs:g}}).then(function(L){var z=L.numFailures,j=L.failures;if(z===0)return F;for(var B=0,H=Object.keys(j);B<H.length;B++){var M,G=H[B],Z=b[Number(G)];Z!=null&&(M=j[G],delete j[G],j[Z]=M)}throw new Ue("".concat(l.name,".bulkUpdate(): ").concat(z," of ").concat(F," operations failed"),j)})})})},rt.prototype.bulkDelete=function(o){var l=this,c=o.length;return this._trans("readwrite",function(p){return l.core.mutate({trans:p,type:"delete",keys:o})}).then(function(_){var g=_.numFailures,b=_.lastResult,_=_.failures;if(g===0)return b;throw new Ue("".concat(l.name,".bulkDelete(): ").concat(g," of ").concat(c," operations failed"),_)})},rt);function rt(){}function rn(o){function l(_,C){if(C){for(var q=arguments.length,I=new Array(q-1);--q;)I[q-1]=arguments[q];return c[_].subscribe.apply(null,I),o}if(typeof _=="string")return c[_]}var c={};l.addEventType=b;for(var p=1,g=arguments.length;p<g;++p)b(arguments[p]);return l;function b(_,C,q){if(typeof _!="object"){var I;C=C||yn;var F={subscribers:[],fire:q=q||Ae,subscribe:function(L){F.subscribers.indexOf(L)===-1&&(F.subscribers.push(L),F.fire=C(F.fire,L))},unsubscribe:function(L){F.subscribers=F.subscribers.filter(function(z){return z!==L}),F.fire=F.subscribers.reduce(C,q)}};return c[_]=l[_]=F}a(I=_).forEach(function(L){var z=I[L];if(u(z))b(L,I[L][0],I[L][1]);else{if(z!=="asap")throw new le.InvalidArgument("Invalid event config");var j=b(L,De,function(){for(var B=arguments.length,H=new Array(B);B--;)H[B]=arguments[B];j.subscribers.forEach(function(M){oe(function(){M.apply(null,H)})})})}})}}function or(o,l){return E(l).from({prototype:o}),l}function Fn(o,l){return!(o.filter||o.algorithm||o.or)&&(l?o.justLimit:!o.replayFilter)}function oi(o,l){o.filter=Lt(o.filter,l)}function ai(o,l,c){var p=o.replayFilter;o.replayFilter=p?function(){return Lt(p(),l())}:l,o.justLimit=c&&!p}function $r(o,l){if(o.isPrimKey)return l.primaryKey;var c=l.getIndexByKeyPath(o.index);if(!c)throw new le.Schema("KeyPath "+o.index+" on object store "+l.name+" is not indexed");return c}function Hi(o,l,c){var p=$r(o,l.schema);return l.openCursor({trans:c,values:!o.keysOnly,reverse:o.dir==="prev",unique:!!o.unique,query:{index:p,range:o.range}})}function ar(o,l,c,p){var g=o.replayFilter?Lt(o.filter,o.replayFilter()):o.filter;if(o.or){var b={},_=function(C,q,I){var F,L;g&&!g(q,I,function(z){return q.stop(z)},function(z){return q.fail(z)})||((L=""+(F=q.primaryKey))=="[object ArrayBuffer]"&&(L=""+new Uint8Array(F)),w(b,L)||(b[L]=!0,l(C,q,I)))};return Promise.all([o.or._iterate(_,c),zi(Hi(o,p,c),o.algorithm,_,!o.keysOnly&&o.valueMapper)])}return zi(Hi(o,p,c),Lt(o.algorithm,g),l,!o.keysOnly&&o.valueMapper)}function zi(o,l,c,p){var g=ot(p?function(b,_,C){return c(p(b),_,C)}:c);return o.then(function(b){if(b)return b.start(function(){var _=function(){return b.continue()};l&&!l(b,function(C){return _=C},function(C){b.stop(C),_=Ae},function(C){b.fail(C),_=Ae})||g(b.value,b,function(C){return _=C}),_()})})}var xr=(lr.prototype.execute=function(o){var l=this["@@propmod"];if(l.add!==void 0){var c=l.add;if(u(c))return i(i([],u(o)?o:[],!0),c).sort();if(typeof c=="number")return(Number(o)||0)+c;if(typeof c=="bigint")try{return BigInt(o)+c}catch{return BigInt(0)+c}throw new TypeError("Invalid term ".concat(c))}if(l.remove!==void 0){var p=l.remove;if(u(p))return u(o)?o.filter(function(g){return!p.includes(g)}).sort():[];if(typeof p=="number")return Number(o)-p;if(typeof p=="bigint")try{return BigInt(o)-p}catch{return BigInt(0)-p}throw new TypeError("Invalid subtrahend ".concat(p))}return c=(c=l.replacePrefix)===null||c===void 0?void 0:c[0],c&&typeof o=="string"&&o.startsWith(c)?l.replacePrefix[1]+o.substring(c.length):o},lr);function lr(o){this["@@propmod"]=o}var sn=(ze.prototype._read=function(o,l){var c=this._ctx;return c.error?c.table._trans(null,ct.bind(null,c.error)):c.table._trans("readonly",o).then(l)},ze.prototype._write=function(o){var l=this._ctx;return l.error?l.table._trans(null,ct.bind(null,l.error)):l.table._trans("readwrite",o,"locked")},ze.prototype._addAlgorithm=function(o){var l=this._ctx;l.algorithm=Lt(l.algorithm,o)},ze.prototype._iterate=function(o,l){return ar(this._ctx,o,l,this._ctx.table.core)},ze.prototype.clone=function(o){var l=Object.create(this.constructor.prototype),c=Object.create(this._ctx);return o&&f(c,o),l._ctx=c,l},ze.prototype.raw=function(){return this._ctx.valueMapper=null,this},ze.prototype.each=function(o){var l=this._ctx;return this._read(function(c){return ar(l,o,c,l.table.core)})},ze.prototype.count=function(o){var l=this;return this._read(function(c){var p=l._ctx,g=p.table.core;if(Fn(p,!0))return g.count({trans:c,query:{index:$r(p,g.schema),range:p.range}}).then(function(_){return Math.min(_,p.limit)});var b=0;return ar(p,function(){return++b,!1},c,g).then(function(){return b})}).then(o)},ze.prototype.sortBy=function(o,l){var c=o.split(".").reverse(),p=c[0],g=c.length-1;function b(q,I){return I?b(q[c[I]],I-1):q[p]}var _=this._ctx.dir==="next"?1:-1;function C(q,I){return Ye(b(q,g),b(I,g))*_}return this.toArray(function(q){return q.sort(C)}).then(l)},ze.prototype.toArray=function(o){var l=this;return this._read(function(c){var p=l._ctx;if(p.dir==="next"&&Fn(p,!0)&&0<p.limit){var g=p.valueMapper,b=$r(p,p.table.core.schema);return p.table.core.query({trans:c,limit:p.limit,values:!0,query:{index:b,range:p.range}}).then(function(C){return C=C.result,g?C.map(g):C})}var _=[];return ar(p,function(C){return _.push(C)},c,p.table.core).then(function(){return _})},o)},ze.prototype.offset=function(o){var l=this._ctx;return o<=0||(l.offset+=o,Fn(l)?ai(l,function(){var c=o;return function(p,g){return c===0||(c===1?--c:g(function(){p.advance(c),c=0}),!1)}}):ai(l,function(){var c=o;return function(){return--c<0}})),this},ze.prototype.limit=function(o){return this._ctx.limit=Math.min(this._ctx.limit,o),ai(this._ctx,function(){var l=o;return function(c,p,g){return--l<=0&&p(g),0<=l}},!0),this},ze.prototype.until=function(o,l){return oi(this._ctx,function(c,p,g){return!o(c.value)||(p(g),l)}),this},ze.prototype.first=function(o){return this.limit(1).toArray(function(l){return l[0]}).then(o)},ze.prototype.last=function(o){return this.reverse().first(o)},ze.prototype.filter=function(o){var l;return oi(this._ctx,function(c){return o(c.value)}),(l=this._ctx).isMatch=Lt(l.isMatch,o),this},ze.prototype.and=function(o){return this.filter(o)},ze.prototype.or=function(o){return new this.db.WhereClause(this._ctx.table,o,this)},ze.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},ze.prototype.desc=function(){return this.reverse()},ze.prototype.eachKey=function(o){var l=this._ctx;return l.keysOnly=!l.isMatch,this.each(function(c,p){o(p.key,p)})},ze.prototype.eachUniqueKey=function(o){return this._ctx.unique="unique",this.eachKey(o)},ze.prototype.eachPrimaryKey=function(o){var l=this._ctx;return l.keysOnly=!l.isMatch,this.each(function(c,p){o(p.primaryKey,p)})},ze.prototype.keys=function(o){var l=this._ctx;l.keysOnly=!l.isMatch;var c=[];return this.each(function(p,g){c.push(g.key)}).then(function(){return c}).then(o)},ze.prototype.primaryKeys=function(o){var l=this._ctx;if(l.dir==="next"&&Fn(l,!0)&&0<l.limit)return this._read(function(p){var g=$r(l,l.table.core.schema);return l.table.core.query({trans:p,values:!1,limit:l.limit,query:{index:g,range:l.range}})}).then(function(p){return p.result}).then(o);l.keysOnly=!l.isMatch;var c=[];return this.each(function(p,g){c.push(g.primaryKey)}).then(function(){return c}).then(o)},ze.prototype.uniqueKeys=function(o){return this._ctx.unique="unique",this.keys(o)},ze.prototype.firstKey=function(o){return this.limit(1).keys(function(l){return l[0]}).then(o)},ze.prototype.lastKey=function(o){return this.reverse().firstKey(o)},ze.prototype.distinct=function(){var o=this._ctx,o=o.index&&o.table.schema.idxByName[o.index];if(!o||!o.multi)return this;var l={};return oi(this._ctx,function(g){var p=g.primaryKey.toString(),g=w(l,p);return l[p]=!0,!g}),this},ze.prototype.modify=function(o){var l=this,c=this._ctx;return this._write(function(p){var g,b,_;_=typeof o=="function"?o:(g=a(o),b=g.length,function(M){for(var G=!1,Z=0;Z<b;++Z){var X=g[Z],ie=o[X],ce=ue(M,X);ie instanceof xr?(ne(M,X,ie.execute(ce)),G=!0):ce!==ie&&(ne(M,X,ie),G=!0)}return G});var C=c.table.core,L=C.schema.primaryKey,q=L.outbound,I=L.extractKey,F=200,L=l.db._options.modifyChunkSize;L&&(F=typeof L=="object"?L[C.name]||L["*"]||200:L);function z(M,X){var Z=X.failures,X=X.numFailures;B+=M-X;for(var ie=0,ce=a(Z);ie<ce.length;ie++){var ye=ce[ie];j.push(Z[ye])}}var j=[],B=0,H=[];return l.clone().primaryKeys().then(function(M){function G(X){var ie=Math.min(F,M.length-X);return C.getMany({trans:p,keys:M.slice(X,X+ie),cache:"immutable"}).then(function(ce){for(var ye=[],fe=[],ge=q?[]:null,xe=[],me=0;me<ie;++me){var Ce=ce[me],Ve={value:R(Ce),primKey:M[X+me]};_.call(Ve,Ve.value,Ve)!==!1&&(Ve.value==null?xe.push(M[X+me]):q||Ye(I(Ce),I(Ve.value))===0?(fe.push(Ve.value),q&&ge.push(M[X+me])):(xe.push(M[X+me]),ye.push(Ve.value)))}return Promise.resolve(0<ye.length&&C.mutate({trans:p,type:"add",values:ye}).then(function(Je){for(var Ze in Je.failures)xe.splice(parseInt(Ze),1);z(ye.length,Je)})).then(function(){return(0<fe.length||Z&&typeof o=="object")&&C.mutate({trans:p,type:"put",keys:ge,values:fe,criteria:Z,changeSpec:typeof o!="function"&&o,isAdditionalChunk:0<X}).then(function(Je){return z(fe.length,Je)})}).then(function(){return(0<xe.length||Z&&o===on)&&C.mutate({trans:p,type:"delete",keys:xe,criteria:Z,isAdditionalChunk:0<X}).then(function(Je){return z(xe.length,Je)})}).then(function(){return M.length>X+ie&&G(X+F)})})}var Z=Fn(c)&&c.limit===1/0&&(typeof o!="function"||o===on)&&{index:c.index,range:c.range};return G(0).then(function(){if(0<j.length)throw new we("Error modifying one or more objects",j,B,H);return M.length})})})},ze.prototype.delete=function(){var o=this._ctx,l=o.range;return Fn(o)&&(o.isPrimKey||l.type===3)?this._write(function(c){var p=o.table.core.schema.primaryKey,g=l;return o.table.core.count({trans:c,query:{index:p,range:g}}).then(function(b){return o.table.core.mutate({trans:c,type:"deleteRange",range:g}).then(function(_){var C=_.failures;if(_.lastResult,_.results,_=_.numFailures,_)throw new we("Could not delete some values",Object.keys(C).map(function(q){return C[q]}),b-_);return b-_})})}):this.modify(on)},ze);function ze(){}var on=function(o,l){return l.value=null};function Ls(o,l){return o<l?-1:o===l?0:1}function En(o,l){return l<o?-1:o===l?0:1}function qt(o,l,c){return o=o instanceof kt?new o.Collection(o):o,o._ctx.error=new(c||TypeError)(l),o}function ur(o){return new o.Collection(o,function(){return li("")}).limit(0)}function Mr(o,l,c,p){var g,b,_,C,q,I,F,L=c.length;if(!c.every(function(B){return typeof B=="string"}))return qt(o,Bi);function z(B){g=B==="next"?function(M){return M.toUpperCase()}:function(M){return M.toLowerCase()},b=B==="next"?function(M){return M.toLowerCase()}:function(M){return M.toUpperCase()},_=B==="next"?Ls:En;var H=c.map(function(M){return{lower:b(M),upper:g(M)}}).sort(function(M,G){return _(M.lower,G.lower)});C=H.map(function(M){return M.upper}),q=H.map(function(M){return M.lower}),F=(I=B)==="next"?"":p}z("next"),o=new o.Collection(o,function(){return Sn(C[0],q[L-1]+p)}),o._ondirectionchange=function(B){z(B)};var j=0;return o._addAlgorithm(function(B,H,M){var G=B.key;if(typeof G!="string")return!1;var Z=b(G);if(l(Z,q,j))return!0;for(var X=null,ie=j;ie<L;++ie){var ce=function(ye,fe,ge,xe,me,Ce){for(var Ve=Math.min(ye.length,xe.length),Je=-1,Ze=0;Ze<Ve;++Ze){var un=fe[Ze];if(un!==xe[Ze])return me(ye[Ze],ge[Ze])<0?ye.substr(0,Ze)+ge[Ze]+ge.substr(Ze+1):me(ye[Ze],xe[Ze])<0?ye.substr(0,Ze)+xe[Ze]+ge.substr(Ze+1):0<=Je?ye.substr(0,Je)+fe[Je]+ge.substr(Je+1):null;me(ye[Ze],un)<0&&(Je=Ze)}return Ve<xe.length&&Ce==="next"?ye+ge.substr(ye.length):Ve<ye.length&&Ce==="prev"?ye.substr(0,ge.length):Je<0?null:ye.substr(0,Je)+xe[Je]+ge.substr(Je+1)}(G,Z,C[ie],q[ie],_,I);ce===null&&X===null?j=ie+1:(X===null||0<_(X,ce))&&(X=ce)}return H(X!==null?function(){B.continue(X+F)}:M),!1}),o}function Sn(o,l,c,p){return{type:2,lower:o,upper:l,lowerOpen:c,upperOpen:p}}function li(o){return{type:1,lower:o,upper:o}}var kt=(Object.defineProperty(ht.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),ht.prototype.between=function(o,l,c,p){c=c!==!1,p=p===!0;try{return 0<this._cmp(o,l)||this._cmp(o,l)===0&&(c||p)&&(!c||!p)?ur(this):new this.Collection(this,function(){return Sn(o,l,!c,!p)})}catch{return qt(this,nn)}},ht.prototype.equals=function(o){return o==null?qt(this,nn):new this.Collection(this,function(){return li(o)})},ht.prototype.above=function(o){return o==null?qt(this,nn):new this.Collection(this,function(){return Sn(o,void 0,!0)})},ht.prototype.aboveOrEqual=function(o){return o==null?qt(this,nn):new this.Collection(this,function(){return Sn(o,void 0,!1)})},ht.prototype.below=function(o){return o==null?qt(this,nn):new this.Collection(this,function(){return Sn(void 0,o,!1,!0)})},ht.prototype.belowOrEqual=function(o){return o==null?qt(this,nn):new this.Collection(this,function(){return Sn(void 0,o)})},ht.prototype.startsWith=function(o){return typeof o!="string"?qt(this,Bi):this.between(o,o+Bn,!0,!0)},ht.prototype.startsWithIgnoreCase=function(o){return o===""?this.startsWith(o):Mr(this,function(l,c){return l.indexOf(c[0])===0},[o],Bn)},ht.prototype.equalsIgnoreCase=function(o){return Mr(this,function(l,c){return l===c[0]},[o],"")},ht.prototype.anyOfIgnoreCase=function(){var o=K.apply(J,arguments);return o.length===0?ur(this):Mr(this,function(l,c){return c.indexOf(l)!==-1},o,"")},ht.prototype.startsWithAnyOfIgnoreCase=function(){var o=K.apply(J,arguments);return o.length===0?ur(this):Mr(this,function(l,c){return c.some(function(p){return l.indexOf(p)===0})},o,Bn)},ht.prototype.anyOf=function(){var o=this,l=K.apply(J,arguments),c=this._cmp;try{l.sort(c)}catch{return qt(this,nn)}if(l.length===0)return ur(this);var p=new this.Collection(this,function(){return Sn(l[0],l[l.length-1])});p._ondirectionchange=function(b){c=b==="next"?o._ascending:o._descending,l.sort(c)};var g=0;return p._addAlgorithm(function(b,_,C){for(var q=b.key;0<c(q,l[g]);)if(++g===l.length)return _(C),!1;return c(q,l[g])===0||(_(function(){b.continue(l[g])}),!1)}),p},ht.prototype.notEqual=function(o){return this.inAnyRange([[-1/0,o],[o,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},ht.prototype.noneOf=function(){var o=K.apply(J,arguments);if(o.length===0)return new this.Collection(this);try{o.sort(this._ascending)}catch{return qt(this,nn)}var l=o.reduce(function(c,p){return c?c.concat([[c[c.length-1][1],p]]):[[-1/0,p]]},null);return l.push([o[o.length-1],this.db._maxKey]),this.inAnyRange(l,{includeLowers:!1,includeUppers:!1})},ht.prototype.inAnyRange=function(G,l){var c=this,p=this._cmp,g=this._ascending,b=this._descending,_=this._min,C=this._max;if(G.length===0)return ur(this);if(!G.every(function(Z){return Z[0]!==void 0&&Z[1]!==void 0&&g(Z[0],Z[1])<=0}))return qt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",le.InvalidArgument);var q=!l||l.includeLowers!==!1,I=l&&l.includeUppers===!0,F,L=g;function z(Z,X){return L(Z[0],X[0])}try{(F=G.reduce(function(Z,X){for(var ie=0,ce=Z.length;ie<ce;++ie){var ye=Z[ie];if(p(X[0],ye[1])<0&&0<p(X[1],ye[0])){ye[0]=_(ye[0],X[0]),ye[1]=C(ye[1],X[1]);break}}return ie===ce&&Z.push(X),Z},[])).sort(z)}catch{return qt(this,nn)}var j=0,B=I?function(Z){return 0<g(Z,F[j][1])}:function(Z){return 0<=g(Z,F[j][1])},H=q?function(Z){return 0<b(Z,F[j][0])}:function(Z){return 0<=b(Z,F[j][0])},M=B,G=new this.Collection(this,function(){return Sn(F[0][0],F[F.length-1][1],!q,!I)});return G._ondirectionchange=function(Z){L=Z==="next"?(M=B,g):(M=H,b),F.sort(z)},G._addAlgorithm(function(Z,X,ie){for(var ce,ye=Z.key;M(ye);)if(++j===F.length)return X(ie),!1;return!B(ce=ye)&&!H(ce)||(c._cmp(ye,F[j][1])===0||c._cmp(ye,F[j][0])===0||X(function(){L===g?Z.continue(F[j][0]):Z.continue(F[j][1])}),!1)}),G},ht.prototype.startsWithAnyOf=function(){var o=K.apply(J,arguments);return o.every(function(l){return typeof l=="string"})?o.length===0?ur(this):this.inAnyRange(o.map(function(l){return[l,l+Bn]})):qt(this,"startsWithAnyOf() only works with strings")},ht);function ht(){}function Gt(o){return ot(function(l){return On(l),o(l.target.error),!1})}function On(o){o.stopPropagation&&o.stopPropagation(),o.preventDefault&&o.preventDefault()}var Kn="storagemutated",cr="x-storagemutated-1",An=rn(null,Kn),Vi=(Bt.prototype._lock=function(){return he(!Oe.global),++this._reculock,this._reculock!==1||Oe.global||(Oe.lockOwnerFor=this),this},Bt.prototype._unlock=function(){if(he(!Oe.global),--this._reculock==0)for(Oe.global||(Oe.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var o=this._blockedFuncs.shift();try{Dn(o[1],o[0])}catch{}}return this},Bt.prototype._locked=function(){return this._reculock&&Oe.lockOwnerFor!==this},Bt.prototype.create=function(o){var l=this;if(!this.mode)return this;var c=this.db.idbdb,p=this.db._state.dbOpenError;if(he(!this.idbtrans),!o&&!c)switch(p&&p.name){case"DatabaseClosedError":throw new le.DatabaseClosed(p);case"MissingAPIError":throw new le.MissingAPI(p.message,p);default:throw new le.OpenFailed(p)}if(!this.active)throw new le.TransactionInactive;return he(this._completion._state===null),(o=this.idbtrans=o||(this.db.core||c).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=ot(function(g){On(g),l._reject(o.error)}),o.onabort=ot(function(g){On(g),l.active&&l._reject(new le.Abort(o.error)),l.active=!1,l.on("abort").fire(g)}),o.oncomplete=ot(function(){l.active=!1,l._resolve(),"mutatedParts"in o&&An.storagemutated.fire(o.mutatedParts)}),this},Bt.prototype._promise=function(o,l,c){var p=this;if(o==="readwrite"&&this.mode!=="readwrite")return ct(new le.ReadOnly("Transaction is readonly"));if(!this.active)return ct(new le.TransactionInactive);if(this._locked())return new be(function(b,_){p._blockedFuncs.push([function(){p._promise(o,l,c).then(b,_)},Oe])});if(c)return vn(function(){var b=new be(function(_,C){p._lock();var q=l(_,C,p);q&&q.then&&q.then(_,C)});return b.finally(function(){return p._unlock()}),b._lib=!0,b});var g=new be(function(b,_){var C=l(b,_,p);C&&C.then&&C.then(b,_)});return g._lib=!0,g},Bt.prototype._root=function(){return this.parent?this.parent._root():this},Bt.prototype.waitFor=function(o){var l,c=this._root(),p=be.resolve(o);c._waitingFor?c._waitingFor=c._waitingFor.then(function(){return p}):(c._waitingFor=p,c._waitingQueue=[],l=c.idbtrans.objectStore(c.storeNames[0]),function b(){for(++c._spinCount;c._waitingQueue.length;)c._waitingQueue.shift()();c._waitingFor&&(l.get(-1/0).onsuccess=b)}());var g=c._waitingFor;return new be(function(b,_){p.then(function(C){return c._waitingQueue.push(ot(b.bind(null,C)))},function(C){return c._waitingQueue.push(ot(_.bind(null,C)))}).finally(function(){c._waitingFor===g&&(c._waitingFor=null)})})},Bt.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new le.Abort))},Bt.prototype.table=function(o){var l=this._memoizedTables||(this._memoizedTables={});if(w(l,o))return l[o];var c=this.schema[o];if(!c)throw new le.NotFound("Table "+o+" not part of transaction");return c=new this.db.Table(o,c,this),c.core=this.db.core.table(o),l[o]=c},Bt);function Bt(){}function Dr(o,l,c,p,g,b,_){return{name:o,keyPath:l,unique:c,multi:p,auto:g,compound:b,src:(c&&!_?"&":"")+(p?"*":"")+(g?"++":"")+an(l)}}function an(o){return typeof o=="string"?o:o?"["+[].join.call(o,"+")+"]":""}function Br(o,l,c){return{name:o,primKey:l,indexes:c,mappedClass:null,idxByName:(p=function(g){return[g.name,g]},c.reduce(function(g,b,_){return _=p(b,_),_&&(g[_[0]]=_[1]),g},{}))};var p}var Hn=function(o){try{return o.only([[]]),Hn=function(){return[[]]},[[]]}catch{return Hn=function(){return Bn},Bn}};function ui(o){return o==null?function(){}:typeof o=="string"?(l=o).split(".").length===1?function(c){return c[l]}:function(c){return ue(c,l)}:function(c){return ue(c,o)};var l}function Wi(o){return[].slice.call(o)}var h=0;function v(o){return o==null?":id":typeof o=="string"?o:"[".concat(o.join("+"),"]")}function k(o,l,q){function p(M){if(M.type===3)return null;if(M.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var j=M.lower,B=M.upper,H=M.lowerOpen,M=M.upperOpen;return j===void 0?B===void 0?null:l.upperBound(B,!!M):B===void 0?l.lowerBound(j,!!H):l.bound(j,B,!!H,!!M)}function g(z){var j,B=z.name;return{name:B,schema:z,mutate:function(H){var M=H.trans,G=H.type,Z=H.keys,X=H.values,ie=H.range;return new Promise(function(ce,ye){ce=ot(ce);var fe=M.objectStore(B),ge=fe.keyPath==null,xe=G==="put"||G==="add";if(!xe&&G!=="delete"&&G!=="deleteRange")throw new Error("Invalid operation type: "+G);var me,Ce=(Z||X||{length:1}).length;if(Z&&X&&Z.length!==X.length)throw new Error("Given keys array must have same length as given values array.");if(Ce===0)return ce({numFailures:0,failures:{},results:[],lastResult:void 0});function Ve(Yt){++un,On(Yt)}var Je=[],Ze=[],un=0;if(G==="deleteRange"){if(ie.type===4)return ce({numFailures:un,failures:Ze,results:[],lastResult:void 0});ie.type===3?Je.push(me=fe.clear()):Je.push(me=fe.delete(p(ie)))}else{var ge=xe?ge?[X,Z]:[X,null]:[Z,null],Ke=ge[0],Ft=ge[1];if(xe)for(var Kt=0;Kt<Ce;++Kt)Je.push(me=Ft&&Ft[Kt]!==void 0?fe[G](Ke[Kt],Ft[Kt]):fe[G](Ke[Kt])),me.onerror=Ve;else for(Kt=0;Kt<Ce;++Kt)Je.push(me=fe[G](Ke[Kt])),me.onerror=Ve}function Io(Yt){Yt=Yt.target.result,Je.forEach(function(di,Sl){return di.error!=null&&(Ze[Sl]=di.error)}),ce({numFailures:un,failures:Ze,results:G==="delete"?Z:Je.map(function(di){return di.result}),lastResult:Yt})}me.onerror=function(Yt){Ve(Yt),Io(Yt)},me.onsuccess=Io})},getMany:function(H){var M=H.trans,G=H.keys;return new Promise(function(Z,X){Z=ot(Z);for(var ie,ce=M.objectStore(B),ye=G.length,fe=new Array(ye),ge=0,xe=0,me=function(Je){Je=Je.target,fe[Je._pos]=Je.result,++xe===ge&&Z(fe)},Ce=Gt(X),Ve=0;Ve<ye;++Ve)G[Ve]!=null&&((ie=ce.get(G[Ve]))._pos=Ve,ie.onsuccess=me,ie.onerror=Ce,++ge);ge===0&&Z(fe)})},get:function(H){var M=H.trans,G=H.key;return new Promise(function(Z,X){Z=ot(Z);var ie=M.objectStore(B).get(G);ie.onsuccess=function(ce){return Z(ce.target.result)},ie.onerror=Gt(X)})},query:(j=I,function(H){return new Promise(function(M,G){M=ot(M);var Z,X,ie,ge=H.trans,ce=H.values,ye=H.limit,me=H.query,fe=ye===1/0?void 0:ye,xe=me.index,me=me.range,ge=ge.objectStore(B),xe=xe.isPrimaryKey?ge:ge.index(xe.name),me=p(me);if(ye===0)return M({result:[]});j?((fe=ce?xe.getAll(me,fe):xe.getAllKeys(me,fe)).onsuccess=function(Ce){return M({result:Ce.target.result})},fe.onerror=Gt(G)):(Z=0,X=!ce&&"openKeyCursor"in xe?xe.openKeyCursor(me):xe.openCursor(me),ie=[],X.onsuccess=function(Ce){var Ve=X.result;return Ve?(ie.push(ce?Ve.value:Ve.primaryKey),++Z===ye?M({result:ie}):void Ve.continue()):M({result:ie})},X.onerror=Gt(G))})}),openCursor:function(H){var M=H.trans,G=H.values,Z=H.query,X=H.reverse,ie=H.unique;return new Promise(function(ce,ye){ce=ot(ce);var xe=Z.index,fe=Z.range,ge=M.objectStore(B),ge=xe.isPrimaryKey?ge:ge.index(xe.name),xe=X?ie?"prevunique":"prev":ie?"nextunique":"next",me=!G&&"openKeyCursor"in ge?ge.openKeyCursor(p(fe),xe):ge.openCursor(p(fe),xe);me.onerror=Gt(ye),me.onsuccess=ot(function(Ce){var Ve,Je,Ze,un,Ke=me.result;Ke?(Ke.___id=++h,Ke.done=!1,Ve=Ke.continue.bind(Ke),Je=(Je=Ke.continuePrimaryKey)&&Je.bind(Ke),Ze=Ke.advance.bind(Ke),un=function(){throw new Error("Cursor not stopped")},Ke.trans=M,Ke.stop=Ke.continue=Ke.continuePrimaryKey=Ke.advance=function(){throw new Error("Cursor not started")},Ke.fail=ot(ye),Ke.next=function(){var Ft=this,Kt=1;return this.start(function(){return Kt--?Ft.continue():Ft.stop()}).then(function(){return Ft})},Ke.start=function(Ft){function Kt(){if(me.result)try{Ft()}catch(Yt){Ke.fail(Yt)}else Ke.done=!0,Ke.start=function(){throw new Error("Cursor behind last entry")},Ke.stop()}var Io=new Promise(function(Yt,di){Yt=ot(Yt),me.onerror=Gt(di),Ke.fail=di,Ke.stop=function(Sl){Ke.stop=Ke.continue=Ke.continuePrimaryKey=Ke.advance=un,Yt(Sl)}});return me.onsuccess=ot(function(Yt){me.onsuccess=Kt,Kt()}),Ke.continue=Ve,Ke.continuePrimaryKey=Je,Ke.advance=Ze,Kt(),Io},ce(Ke)):ce(null)},ye)})},count:function(H){var M=H.query,G=H.trans,Z=M.index,X=M.range;return new Promise(function(ie,ce){var ye=G.objectStore(B),fe=Z.isPrimaryKey?ye:ye.index(Z.name),ye=p(X),fe=ye?fe.count(ye):fe.count();fe.onsuccess=ot(function(ge){return ie(ge.target.result)}),fe.onerror=Gt(ce)})}}}var b,_,C,F=(_=q,C=Wi((b=o).objectStoreNames),{schema:{name:b.name,tables:C.map(function(z){return _.objectStore(z)}).map(function(z){var j=z.keyPath,M=z.autoIncrement,B=u(j),H={},M={name:z.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:j==null,compound:B,keyPath:j,autoIncrement:M,unique:!0,extractKey:ui(j)},indexes:Wi(z.indexNames).map(function(G){return z.index(G)}).map(function(ie){var Z=ie.name,X=ie.unique,ce=ie.multiEntry,ie=ie.keyPath,ce={name:Z,compound:u(ie),keyPath:ie,unique:X,multiEntry:ce,extractKey:ui(ie)};return H[v(ie)]=ce}),getIndexByKeyPath:function(G){return H[v(G)]}};return H[":id"]=M.primaryKey,j!=null&&(H[v(j)]=M.primaryKey),M})},hasGetAll:0<C.length&&"getAll"in _.objectStore(C[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),q=F.schema,I=F.hasGetAll,F=q.tables.map(g),L={};return F.forEach(function(z){return L[z.name]=z}),{stack:"dbcore",transaction:o.transaction.bind(o),table:function(z){if(!L[z])throw new Error("Table '".concat(z,"' not found"));return L[z]},MIN_KEY:-1/0,MAX_KEY:Hn(l),schema:q}}function te(o,l,c,p){var g=c.IDBKeyRange;return c.indexedDB,{dbcore:(p=k(l,g,p),o.dbcore.reduce(function(b,_){return _=_.create,n(n({},b),_(b))},p))}}function Me(o,p){var c=p.db,p=te(o._middlewares,c,o._deps,p);o.core=p.dbcore,o.tables.forEach(function(g){var b=g.name;o.core.schema.tables.some(function(_){return _.name===b})&&(g.core=o.core.table(b),o[b]instanceof o.Table&&(o[b].core=g.core))})}function Re(o,l,c,p){c.forEach(function(g){var b=p[g];l.forEach(function(_){var C=function q(I,F){return N(I,F)||(I=d(I))&&q(I,F)}(_,g);(!C||"value"in C&&C.value===void 0)&&(_===o.Transaction.prototype||_ instanceof o.Transaction?A(_,g,{get:function(){return this.table(g)},set:function(q){x(this,g,{value:q,writable:!0,configurable:!0,enumerable:!0})}}):_[g]=new o.Table(g,b))})})}function Xe(o,l){l.forEach(function(c){for(var p in c)c[p]instanceof o.Table&&delete c[p]})}function Qe(o,l){return o._cfg.version-l._cfg.version}function mt(o,l,c,p){var g=o._dbSchema;c.objectStoreNames.contains("$meta")&&!g.$meta&&(g.$meta=Br("$meta",Tn("")[0],[]),o._storeNames.push("$meta"));var b=o._createTransaction("readwrite",o._storeNames,g);b.create(c),b._completion.catch(p);var _=b._reject.bind(b),C=Oe.transless||Oe;vn(function(){return Oe.trans=b,Oe.transless=C,l!==0?(Me(o,c),I=l,((q=b).storeNames.includes("$meta")?q.table("$meta").get("version").then(function(F){return F??I}):be.resolve(I)).then(function(F){return z=F,j=b,B=c,H=[],F=(L=o)._versions,M=L._dbSchema=bt(0,L.idbdb,B),(F=F.filter(function(G){return G._cfg.version>=z})).length!==0?(F.forEach(function(G){H.push(function(){var Z=M,X=G._cfg.dbschema;ln(L,Z,B),ln(L,X,B),M=L._dbSchema=X;var ie=Tt(Z,X);ie.add.forEach(function(xe){Rt(B,xe[0],xe[1].primKey,xe[1].indexes)}),ie.change.forEach(function(xe){if(xe.recreate)throw new le.Upgrade("Not yet support for changing primary key");var me=B.objectStore(xe.name);xe.add.forEach(function(Ce){return Et(me,Ce)}),xe.change.forEach(function(Ce){me.deleteIndex(Ce.name),Et(me,Ce)}),xe.del.forEach(function(Ce){return me.deleteIndex(Ce)})});var ce=G._cfg.contentUpgrade;if(ce&&G._cfg.version>z){Me(L,B),j._memoizedTables={};var ye=re(X);ie.del.forEach(function(xe){ye[xe]=Z[xe]}),Xe(L,[L.Transaction.prototype]),Re(L,[L.Transaction.prototype],a(ye),ye),j.schema=ye;var fe,ge=ae(ce);return ge&&rr(),ie=be.follow(function(){var xe;(fe=ce(j))&&ge&&(xe=wn.bind(null,null),fe.then(xe,xe))}),fe&&typeof fe.then=="function"?be.resolve(fe):ie.then(function(){return fe})}}),H.push(function(Z){var X,ie,ce=G._cfg.dbschema;X=ce,ie=Z,[].slice.call(ie.db.objectStoreNames).forEach(function(ye){return X[ye]==null&&ie.db.deleteObjectStore(ye)}),Xe(L,[L.Transaction.prototype]),Re(L,[L.Transaction.prototype],L._storeNames,L._dbSchema),j.schema=L._dbSchema}),H.push(function(Z){L.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(L.idbdb.version/10)===G._cfg.version?(L.idbdb.deleteObjectStore("$meta"),delete L._dbSchema.$meta,L._storeNames=L._storeNames.filter(function(X){return X!=="$meta"})):Z.objectStore("$meta").put(G._cfg.version,"version"))})}),function G(){return H.length?be.resolve(H.shift()(j.idbtrans)).then(G):be.resolve()}().then(function(){yt(M,B)})):be.resolve();var L,z,j,B,H,M}).catch(_)):(a(g).forEach(function(F){Rt(c,F,g[F].primKey,g[F].indexes)}),Me(o,c),void be.follow(function(){return o.on.populate.fire(b)}).catch(_));var q,I})}function nt(o,l){yt(o._dbSchema,l),l.db.version%10!=0||l.objectStoreNames.contains("$meta")||l.db.createObjectStore("$meta").add(Math.ceil(l.db.version/10-1),"version");var c=bt(0,o.idbdb,l);ln(o,o._dbSchema,l);for(var p=0,g=Tt(c,o._dbSchema).change;p<g.length;p++){var b=function(_){if(_.change.length||_.recreate)return console.warn("Unable to patch indexes of table ".concat(_.name," because it has changes on the type of index or primary key.")),{value:void 0};var C=l.objectStore(_.name);_.add.forEach(function(q){_t&&console.debug("Dexie upgrade patch: Creating missing index ".concat(_.name,".").concat(q.src)),Et(C,q)})}(g[p]);if(typeof b=="object")return b.value}}function Tt(o,l){var c,p={del:[],add:[],change:[]};for(c in o)l[c]||p.del.push(c);for(c in l){var g=o[c],b=l[c];if(g){var _={name:c,def:b,recreate:!1,del:[],add:[],change:[]};if(""+(g.primKey.keyPath||"")!=""+(b.primKey.keyPath||"")||g.primKey.auto!==b.primKey.auto)_.recreate=!0,p.change.push(_);else{var C=g.idxByName,q=b.idxByName,I=void 0;for(I in C)q[I]||_.del.push(I);for(I in q){var F=C[I],L=q[I];F?F.src!==L.src&&_.change.push(L):_.add.push(L)}(0<_.del.length||0<_.add.length||0<_.change.length)&&p.change.push(_)}}else p.add.push([c,b])}return p}function Rt(o,l,c,p){var g=o.db.createObjectStore(l,c.keyPath?{keyPath:c.keyPath,autoIncrement:c.auto}:{autoIncrement:c.auto});return p.forEach(function(b){return Et(g,b)}),g}function yt(o,l){a(o).forEach(function(c){l.db.objectStoreNames.contains(c)||(_t&&console.debug("Dexie: Creating missing table",c),Rt(l,c,o[c].primKey,o[c].indexes))})}function Et(o,l){o.createIndex(l.name,l.keyPath,{unique:l.unique,multiEntry:l.multi})}function bt(o,l,c){var p={};return Y(l.objectStoreNames,0).forEach(function(g){for(var b=c.objectStore(g),_=Dr(an(I=b.keyPath),I||"",!0,!1,!!b.autoIncrement,I&&typeof I!="string",!0),C=[],q=0;q<b.indexNames.length;++q){var F=b.index(b.indexNames[q]),I=F.keyPath,F=Dr(F.name,I,!!F.unique,!!F.multiEntry,!1,I&&typeof I!="string",!1);C.push(F)}p[g]=Br(g,_,C)}),p}function ln(o,l,c){for(var p=c.db.objectStoreNames,g=0;g<p.length;++g){var b=p[g],_=c.objectStore(b);o._hasGetAll="getAll"in _;for(var C=0;C<_.indexNames.length;++C){var q=_.indexNames[C],I=_.index(q).keyPath,F=typeof I=="string"?I:"["+Y(I).join("+")+"]";!l[b]||(I=l[b].idxByName[F])&&(I.name=q,delete l[b].idxByName[F],l[b].idxByName[q]=I)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(o._hasGetAll=!1)}function Tn(o){return o.split(",").map(function(l,c){var p=(l=l.trim()).replace(/([&*]|\+\+)/g,""),g=/^\[/.test(p)?p.match(/^\[(.*)\]$/)[1].split("+"):p;return Dr(p,g||null,/\&/.test(l),/\*/.test(l),/\+\+/.test(l),u(g),c===0)})}var Er=(ci.prototype._parseStoresSpec=function(o,l){a(o).forEach(function(c){if(o[c]!==null){var p=Tn(o[c]),g=p.shift();if(g.unique=!0,g.multi)throw new le.Schema("Primary key cannot be multi-valued");p.forEach(function(b){if(b.auto)throw new le.Schema("Only primary key can be marked as autoIncrement (++)");if(!b.keyPath)throw new le.Schema("Index must have a name and cannot be an empty string")}),l[c]=Br(c,g,p)}})},ci.prototype.stores=function(c){var l=this.db;this._cfg.storesSource=this._cfg.storesSource?f(this._cfg.storesSource,c):c;var c=l._versions,p={},g={};return c.forEach(function(b){f(p,b._cfg.storesSource),g=b._cfg.dbschema={},b._parseStoresSpec(p,g)}),l._dbSchema=g,Xe(l,[l._allTables,l,l.Transaction.prototype]),Re(l,[l._allTables,l,l.Transaction.prototype,this._cfg.tables],a(g),g),l._storeNames=a(g),this},ci.prototype.upgrade=function(o){return this._cfg.contentUpgrade=en(this._cfg.contentUpgrade||Ae,o),this},ci);function ci(){}function Ur(o,l){var c=o._dbNamesDB;return c||(c=o._dbNamesDB=new Sr(Un,{addons:[],indexedDB:o,IDBKeyRange:l})).version(1).stores({dbnames:"name"}),c.table("dbnames")}function Fr(o){return o&&typeof o.databases=="function"}function fl(o){return vn(function(){return Oe.letThrough=!0,o()})}function hl(o){return!("from"in o)}var Ut=function(o,l){if(!this){var c=new Ut;return o&&"d"in o&&f(c,o),c}f(this,arguments.length?{d:1,from:o,to:1<arguments.length?l:o}:{d:0})};function ks(o,l,c){var p=Ye(l,c);if(!isNaN(p)){if(0<p)throw RangeError();if(hl(o))return f(o,{from:l,to:c,d:1});var g=o.l,p=o.r;if(Ye(c,o.from)<0)return g?ks(g,l,c):o.l={from:l,to:c,d:1,l:null,r:null},_h(o);if(0<Ye(l,o.to))return p?ks(p,l,c):o.r={from:l,to:c,d:1,l:null,r:null},_h(o);Ye(l,o.from)<0&&(o.from=l,o.l=null,o.d=p?p.d+1:1),0<Ye(c,o.to)&&(o.to=c,o.r=null,o.d=o.l?o.l.d+1:1),c=!o.r,g&&!o.l&&Rs(o,g),p&&c&&Rs(o,p)}}function Rs(o,l){hl(l)||function c(p,q){var b=q.from,_=q.to,C=q.l,q=q.r;ks(p,b,_),C&&c(p,C),q&&c(p,q)}(o,l)}function Th(o,l){var c=Lo(l),p=c.next();if(p.done)return!1;for(var g=p.value,b=Lo(o),_=b.next(g.from),C=_.value;!p.done&&!_.done;){if(Ye(C.from,g.to)<=0&&0<=Ye(C.to,g.from))return!0;Ye(g.from,C.from)<0?g=(p=c.next(C.from)).value:C=(_=b.next(g.from)).value}return!1}function Lo(o){var l=hl(o)?null:{s:0,n:o};return{next:function(c){for(var p=0<arguments.length;l;)switch(l.s){case 0:if(l.s=1,p)for(;l.n.l&&Ye(c,l.n.from)<0;)l={up:l,n:l.n.l,s:1};else for(;l.n.l;)l={up:l,n:l.n.l,s:1};case 1:if(l.s=2,!p||Ye(c,l.n.to)<=0)return{value:l.n,done:!1};case 2:if(l.n.r){l.s=3,l={up:l,n:l.n.r,s:0};continue}case 3:l=l.up}return{done:!0}}}}function _h(o){var l,c,p=(((l=o.r)===null||l===void 0?void 0:l.d)||0)-(((c=o.l)===null||c===void 0?void 0:c.d)||0),g=1<p?"r":p<-1?"l":"";g&&(l=g=="r"?"l":"r",c=n({},o),p=o[g],o.from=p.from,o.to=p.to,o[g]=p[g],c[g]=p[l],(o[l]=c).d=Nh(c)),o.d=Nh(o)}function Nh(c){var l=c.r,c=c.l;return(l?c?Math.max(l.d,c.d):l.d:c?c.d:0)+1}function ko(o,l){return a(l).forEach(function(c){o[c]?Rs(o[c],l[c]):o[c]=function p(g){var b,_,C={};for(b in g)w(g,b)&&(_=g[b],C[b]=!_||typeof _!="object"||O.has(_.constructor)?_:p(_));return C}(l[c])}),o}function dl(o,l){return o.all||l.all||Object.keys(o).some(function(c){return l[c]&&Th(l[c],o[c])})}y(Ut.prototype,((_n={add:function(o){return Rs(this,o),this},addKey:function(o){return ks(this,o,o),this},addKeys:function(o){var l=this;return o.forEach(function(c){return ks(l,c,c)}),this},hasKey:function(o){var l=Lo(this).next(o).value;return l&&Ye(l.from,o)<=0&&0<=Ye(l.to,o)}})[T]=function(){return Lo(this)},_n));var fi={},pl={},gl=!1;function Ro(o){ko(pl,o),gl||(gl=!0,setTimeout(function(){gl=!1,ml(pl,!(pl={}))},0))}function ml(o,l){l===void 0&&(l=!1);var c=new Set;if(o.all)for(var p=0,g=Object.values(fi);p<g.length;p++)Ch(_=g[p],o,c,l);else for(var b in o){var _,C=/^idb\:\/\/(.*)\/(.*)\//.exec(b);C&&(b=C[1],C=C[2],(_=fi["idb://".concat(b,"/").concat(C)])&&Ch(_,o,c,l))}c.forEach(function(q){return q()})}function Ch(o,l,c,p){for(var g=[],b=0,_=Object.entries(o.queries.query);b<_.length;b++){for(var C=_[b],q=C[0],I=[],F=0,L=C[1];F<L.length;F++){var z=L[F];dl(l,z.obsSet)?z.subscribers.forEach(function(M){return c.add(M)}):p&&I.push(z)}p&&g.push([q,I])}if(p)for(var j=0,B=g;j<B.length;j++){var H=B[j],q=H[0],I=H[1];o.queries.query[q]=I}}function _w(o){var l=o._state,c=o._deps.indexedDB;if(l.isBeingOpened||o.idbdb)return l.dbReadyPromise.then(function(){return l.dbOpenError?ct(l.dbOpenError):o});l.isBeingOpened=!0,l.dbOpenError=null,l.openComplete=!1;var p=l.openCanceller,g=Math.round(10*o.verno),b=!1;function _(){if(l.openCanceller!==p)throw new le.DatabaseClosed("db.open() was cancelled")}function C(){return new be(function(z,j){if(_(),!c)throw new le.MissingAPI;var B=o.name,H=l.autoSchema||!g?c.open(B):c.open(B,g);if(!H)throw new le.MissingAPI;H.onerror=Gt(j),H.onblocked=ot(o._fireOnBlocked),H.onupgradeneeded=ot(function(M){var G;F=H.transaction,l.autoSchema&&!o._options.allowEmptyDB?(H.onerror=On,F.abort(),H.result.close(),(G=c.deleteDatabase(B)).onsuccess=G.onerror=ot(function(){j(new le.NoSuchDatabase("Database ".concat(B," doesnt exist")))})):(F.onerror=Gt(j),M=M.oldVersion>Math.pow(2,62)?0:M.oldVersion,L=M<1,o.idbdb=H.result,b&&nt(o,F),mt(o,M/10,F,j))},j),H.onsuccess=ot(function(){F=null;var M,G,Z,X,ie,ce=o.idbdb=H.result,ye=Y(ce.objectStoreNames);if(0<ye.length)try{var fe=ce.transaction((X=ye).length===1?X[0]:X,"readonly");if(l.autoSchema)G=ce,Z=fe,(M=o).verno=G.version/10,Z=M._dbSchema=bt(0,G,Z),M._storeNames=Y(G.objectStoreNames,0),Re(M,[M._allTables],a(Z),Z);else if(ln(o,o._dbSchema,fe),((ie=Tt(bt(0,(ie=o).idbdb,fe),ie._dbSchema)).add.length||ie.change.some(function(ge){return ge.add.length||ge.change.length}))&&!b)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."),ce.close(),g=ce.version+1,b=!0,z(C());Me(o,fe)}catch{}ir.push(o),ce.onversionchange=ot(function(ge){l.vcFired=!0,o.on("versionchange").fire(ge)}),ce.onclose=ot(function(ge){o.on("close").fire(ge)}),L&&(ie=o._deps,fe=B,ce=ie.indexedDB,ie=ie.IDBKeyRange,Fr(ce)||fe===Un||Ur(ce,ie).put({name:fe}).catch(Ae)),z()},j)}).catch(function(z){switch(z==null?void 0:z.name){case"UnknownError":if(0<l.PR1398_maxLoop)return l.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),C();break;case"VersionError":if(0<g)return g=0,C()}return be.reject(z)})}var q,I=l.dbReadyResolve,F=null,L=!1;return be.race([p,(typeof navigator>"u"?be.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(z){function j(){return indexedDB.databases().finally(z)}q=setInterval(j,100),j()}).finally(function(){return clearInterval(q)}):Promise.resolve()).then(C)]).then(function(){return _(),l.onReadyBeingFired=[],be.resolve(fl(function(){return o.on.ready.fire(o.vip)})).then(function z(){if(0<l.onReadyBeingFired.length){var j=l.onReadyBeingFired.reduce(en,Ae);return l.onReadyBeingFired=[],be.resolve(fl(function(){return j(o.vip)})).then(z)}})}).finally(function(){l.openCanceller===p&&(l.onReadyBeingFired=null,l.isBeingOpened=!1)}).catch(function(z){l.dbOpenError=z;try{F&&F.abort()}catch{}return p===l.openCanceller&&o._close(),ct(z)}).finally(function(){l.openComplete=!0,I()}).then(function(){var z;return L&&(z={},o.tables.forEach(function(j){j.schema.indexes.forEach(function(B){B.name&&(z["idb://".concat(o.name,"/").concat(j.name,"/").concat(B.name)]=new Ut(-1/0,[[[]]]))}),z["idb://".concat(o.name,"/").concat(j.name,"/")]=z["idb://".concat(o.name,"/").concat(j.name,"/:dels")]=new Ut(-1/0,[[[]]])}),An(Kn).fire(z),ml(z,!0)),o})}function yl(o){function l(b){return o.next(b)}var c=g(l),p=g(function(b){return o.throw(b)});function g(b){return function(q){var C=b(q),q=C.value;return C.done?q:q&&typeof q.then=="function"?q.then(c,p):u(q)?Promise.all(q).then(c,p):c(q)}}return g(l)()}function Po(o,l,c){for(var p=u(o)?o.slice():[o],g=0;g<c;++g)p.push(l);return p}var Nw={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(o){return n(n({},o),{table:function(l){var c=o.table(l),p=c.schema,g={},b=[];function _(L,z,j){var B=v(L),H=g[B]=g[B]||[],M=L==null?0:typeof L=="string"?1:L.length,G=0<z,G=n(n({},j),{name:G?"".concat(B,"(virtual-from:").concat(j.name,")"):j.name,lowLevelIndex:j,isVirtual:G,keyTail:z,keyLength:M,extractKey:ui(L),unique:!G&&j.unique});return H.push(G),G.isPrimaryKey||b.push(G),1<M&&_(M===2?L[0]:L.slice(0,M-1),z+1,j),H.sort(function(Z,X){return Z.keyTail-X.keyTail}),G}l=_(p.primaryKey.keyPath,0,p.primaryKey),g[":id"]=[l];for(var C=0,q=p.indexes;C<q.length;C++){var I=q[C];_(I.keyPath,0,I)}function F(L){var z,j=L.query.index;return j.isVirtual?n(n({},L),{query:{index:j.lowLevelIndex,range:(z=L.query.range,j=j.keyTail,{type:z.type===1?2:z.type,lower:Po(z.lower,z.lowerOpen?o.MAX_KEY:o.MIN_KEY,j),lowerOpen:!0,upper:Po(z.upper,z.upperOpen?o.MIN_KEY:o.MAX_KEY,j),upperOpen:!0})}}):L}return n(n({},c),{schema:n(n({},p),{primaryKey:l,indexes:b,getIndexByKeyPath:function(L){return(L=g[v(L)])&&L[0]}}),count:function(L){return c.count(F(L))},query:function(L){return c.query(F(L))},openCursor:function(L){var z=L.query.index,j=z.keyTail,B=z.isVirtual,H=z.keyLength;return B?c.openCursor(F(L)).then(function(G){return G&&M(G)}):c.openCursor(L);function M(G){return Object.create(G,{continue:{value:function(Z){Z!=null?G.continue(Po(Z,L.reverse?o.MAX_KEY:o.MIN_KEY,j)):L.unique?G.continue(G.key.slice(0,H).concat(L.reverse?o.MIN_KEY:o.MAX_KEY,j)):G.continue()}},continuePrimaryKey:{value:function(Z,X){G.continuePrimaryKey(Po(Z,o.MAX_KEY,j),X)}},primaryKey:{get:function(){return G.primaryKey}},key:{get:function(){var Z=G.key;return H===1?Z[0]:Z.slice(0,H)}},value:{get:function(){return G.value}}})}}})}})}};function bl(o,l,c,p){return c=c||{},p=p||"",a(o).forEach(function(g){var b,_,C;w(l,g)?(b=o[g],_=l[g],typeof b=="object"&&typeof _=="object"&&b&&_?(C=S(b))!==S(_)?c[p+g]=l[g]:C==="Object"?bl(b,_,c,p+g+"."):b!==_&&(c[p+g]=l[g]):b!==_&&(c[p+g]=l[g])):c[p+g]=void 0}),a(l).forEach(function(g){w(o,g)||(c[p+g]=l[g])}),c}function vl(o,l){return l.type==="delete"?l.keys:l.keys||l.values.map(o.extractKey)}var Cw={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(o){return n(n({},o),{table:function(l){var c=o.table(l),p=c.schema.primaryKey;return n(n({},c),{mutate:function(g){var b=Oe.trans,_=b.table(l).hook,C=_.deleting,q=_.creating,I=_.updating;switch(g.type){case"add":if(q.fire===Ae)break;return b._promise("readwrite",function(){return F(g)},!0);case"put":if(q.fire===Ae&&I.fire===Ae)break;return b._promise("readwrite",function(){return F(g)},!0);case"delete":if(C.fire===Ae)break;return b._promise("readwrite",function(){return F(g)},!0);case"deleteRange":if(C.fire===Ae)break;return b._promise("readwrite",function(){return function L(z,j,B){return c.query({trans:z,values:!1,query:{index:p,range:j},limit:B}).then(function(H){var M=H.result;return F({type:"delete",keys:M,trans:z}).then(function(G){return 0<G.numFailures?Promise.reject(G.failures[0]):M.length<B?{failures:[],numFailures:0,lastResult:void 0}:L(z,n(n({},j),{lower:M[M.length-1],lowerOpen:!0}),B)})})}(g.trans,g.range,1e4)},!0)}return c.mutate(g);function F(L){var z,j,B,H=Oe.trans,M=L.keys||vl(p,L);if(!M)throw new Error("Keys missing");return(L=L.type==="add"||L.type==="put"?n(n({},L),{keys:M}):n({},L)).type!=="delete"&&(L.values=i([],L.values)),L.keys&&(L.keys=i([],L.keys)),z=c,B=M,((j=L).type==="add"?Promise.resolve([]):z.getMany({trans:j.trans,keys:B,cache:"immutable"})).then(function(G){var Z=M.map(function(X,ie){var ce,ye,fe,ge=G[ie],xe={onerror:null,onsuccess:null};return L.type==="delete"?C.fire.call(xe,X,ge,H):L.type==="add"||ge===void 0?(ce=q.fire.call(xe,X,L.values[ie],H),X==null&&ce!=null&&(L.keys[ie]=X=ce,p.outbound||ne(L.values[ie],p.keyPath,X))):(ce=bl(ge,L.values[ie]),(ye=I.fire.call(xe,ce,X,ge,H))&&(fe=L.values[ie],Object.keys(ye).forEach(function(me){w(fe,me)?fe[me]=ye[me]:ne(fe,me,ye[me])}))),xe});return c.mutate(L).then(function(X){for(var ie=X.failures,ce=X.results,ye=X.numFailures,X=X.lastResult,fe=0;fe<M.length;++fe){var ge=(ce||M)[fe],xe=Z[fe];ge==null?xe.onerror&&xe.onerror(ie[fe]):xe.onsuccess&&xe.onsuccess(L.type==="put"&&G[fe]?L.values[fe]:ge)}return{failures:ie,results:ce,numFailures:ye,lastResult:X}}).catch(function(X){return Z.forEach(function(ie){return ie.onerror&&ie.onerror(X)}),Promise.reject(X)})})}}})}})}};function Lh(o,l,c){try{if(!l||l.keys.length<o.length)return null;for(var p=[],g=0,b=0;g<l.keys.length&&b<o.length;++g)Ye(l.keys[g],o[b])===0&&(p.push(c?R(l.values[g]):l.values[g]),++b);return p.length===o.length?p:null}catch{return null}}var Lw={stack:"dbcore",level:-1,create:function(o){return{table:function(l){var c=o.table(l);return n(n({},c),{getMany:function(p){if(!p.cache)return c.getMany(p);var g=Lh(p.keys,p.trans._cache,p.cache==="clone");return g?be.resolve(g):c.getMany(p).then(function(b){return p.trans._cache={keys:p.keys,values:p.cache==="clone"?R(b):b},b})},mutate:function(p){return p.type!=="add"&&(p.trans._cache=null),c.mutate(p)}})}}}};function kh(o,l){return o.trans.mode==="readonly"&&!!o.subscr&&!o.trans.explicit&&o.trans.db._options.cache!=="disabled"&&!l.schema.primaryKey.outbound}function Rh(o,l){switch(o){case"query":return l.values&&!l.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var kw={stack:"dbcore",level:0,name:"Observability",create:function(o){var l=o.schema.name,c=new Ut(o.MIN_KEY,o.MAX_KEY);return n(n({},o),{transaction:function(p,g,b){if(Oe.subscr&&g!=="readonly")throw new le.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Oe.querier));return o.transaction(p,g,b)},table:function(p){var g=o.table(p),b=g.schema,_=b.primaryKey,L=b.indexes,C=_.extractKey,q=_.outbound,I=_.autoIncrement&&L.filter(function(j){return j.compound&&j.keyPath.includes(_.keyPath)}),F=n(n({},g),{mutate:function(j){function B(me){return me="idb://".concat(l,"/").concat(p,"/").concat(me),X[me]||(X[me]=new Ut)}var H,M,G,Z=j.trans,X=j.mutatedParts||(j.mutatedParts={}),ie=B(""),ce=B(":dels"),ye=j.type,xe=j.type==="deleteRange"?[j.range]:j.type==="delete"?[j.keys]:j.values.length<50?[vl(_,j).filter(function(me){return me}),j.values]:[],fe=xe[0],ge=xe[1],xe=j.trans._cache;return u(fe)?(ie.addKeys(fe),(xe=ye==="delete"||fe.length===ge.length?Lh(fe,xe):null)||ce.addKeys(fe),(xe||ge)&&(H=B,M=xe,G=ge,b.indexes.forEach(function(me){var Ce=H(me.name||"");function Ve(Ze){return Ze!=null?me.extractKey(Ze):null}function Je(Ze){return me.multiEntry&&u(Ze)?Ze.forEach(function(un){return Ce.addKey(un)}):Ce.addKey(Ze)}(M||G).forEach(function(Ze,Ft){var Ke=M&&Ve(M[Ft]),Ft=G&&Ve(G[Ft]);Ye(Ke,Ft)!==0&&(Ke!=null&&Je(Ke),Ft!=null&&Je(Ft))})}))):fe?(ge={from:(ge=fe.lower)!==null&&ge!==void 0?ge:o.MIN_KEY,to:(ge=fe.upper)!==null&&ge!==void 0?ge:o.MAX_KEY},ce.add(ge),ie.add(ge)):(ie.add(c),ce.add(c),b.indexes.forEach(function(me){return B(me.name).add(c)})),g.mutate(j).then(function(me){return!fe||j.type!=="add"&&j.type!=="put"||(ie.addKeys(me.results),I&&I.forEach(function(Ce){for(var Ve=j.values.map(function(Ke){return Ce.extractKey(Ke)}),Je=Ce.keyPath.findIndex(function(Ke){return Ke===_.keyPath}),Ze=0,un=me.results.length;Ze<un;++Ze)Ve[Ze][Je]=me.results[Ze];B(Ce.name).addKeys(Ve)})),Z.mutatedParts=ko(Z.mutatedParts||{},X),me})}}),L=function(B){var H=B.query,B=H.index,H=H.range;return[B,new Ut((B=H.lower)!==null&&B!==void 0?B:o.MIN_KEY,(H=H.upper)!==null&&H!==void 0?H:o.MAX_KEY)]},z={get:function(j){return[_,new Ut(j.key)]},getMany:function(j){return[_,new Ut().addKeys(j.keys)]},count:L,query:L,openCursor:L};return a(z).forEach(function(j){F[j]=function(B){var H=Oe.subscr,M=!!H,G=kh(Oe,g)&&Rh(j,B)?B.obsSet={}:H;if(M){var Z=function(ge){return ge="idb://".concat(l,"/").concat(p,"/").concat(ge),G[ge]||(G[ge]=new Ut)},X=Z(""),ie=Z(":dels"),H=z[j](B),M=H[0],H=H[1];if((j==="query"&&M.isPrimaryKey&&!B.values?ie:Z(M.name||"")).add(H),!M.isPrimaryKey){if(j!=="count"){var ce=j==="query"&&q&&B.values&&g.query(n(n({},B),{values:!1}));return g[j].apply(this,arguments).then(function(ge){if(j==="query"){if(q&&B.values)return ce.then(function(Ve){return Ve=Ve.result,X.addKeys(Ve),ge});var xe=B.values?ge.result.map(C):ge.result;(B.values?X:ie).addKeys(xe)}else if(j==="openCursor"){var me=ge,Ce=B.values;return me&&Object.create(me,{key:{get:function(){return ie.addKey(me.primaryKey),me.key}},primaryKey:{get:function(){var Ve=me.primaryKey;return ie.addKey(Ve),Ve}},value:{get:function(){return Ce&&X.addKey(me.primaryKey),me.value}}})}return ge})}ie.add(c)}}return g[j].apply(this,arguments)}}),F}})}};function Ph(o,l,c){if(c.numFailures===0)return l;if(l.type==="deleteRange")return null;var p=l.keys?l.keys.length:"values"in l&&l.values?l.values.length:1;return c.numFailures===p?null:(l=n({},l),u(l.keys)&&(l.keys=l.keys.filter(function(g,b){return!(b in c.failures)})),"values"in l&&u(l.values)&&(l.values=l.values.filter(function(g,b){return!(b in c.failures)})),l)}function wl(o,l){return c=o,((p=l).lower===void 0||(p.lowerOpen?0<Ye(c,p.lower):0<=Ye(c,p.lower)))&&(o=o,(l=l).upper===void 0||(l.upperOpen?Ye(o,l.upper)<0:Ye(o,l.upper)<=0));var c,p}function qh(o,l,z,p,g,b){if(!z||z.length===0)return o;var _=l.query.index,C=_.multiEntry,q=l.query.range,I=p.schema.primaryKey.extractKey,F=_.extractKey,L=(_.lowLevelIndex||_).extractKey,z=z.reduce(function(j,B){var H=j,M=[];if(B.type==="add"||B.type==="put")for(var G=new Ut,Z=B.values.length-1;0<=Z;--Z){var X,ie=B.values[Z],ce=I(ie);G.hasKey(ce)||(X=F(ie),(C&&u(X)?X.some(function(me){return wl(me,q)}):wl(X,q))&&(G.addKey(ce),M.push(ie)))}switch(B.type){case"add":var ye=new Ut().addKeys(l.values?j.map(function(Ce){return I(Ce)}):j),H=j.concat(l.values?M.filter(function(Ce){return Ce=I(Ce),!ye.hasKey(Ce)&&(ye.addKey(Ce),!0)}):M.map(function(Ce){return I(Ce)}).filter(function(Ce){return!ye.hasKey(Ce)&&(ye.addKey(Ce),!0)}));break;case"put":var fe=new Ut().addKeys(B.values.map(function(Ce){return I(Ce)}));H=j.filter(function(Ce){return!fe.hasKey(l.values?I(Ce):Ce)}).concat(l.values?M:M.map(function(Ce){return I(Ce)}));break;case"delete":var ge=new Ut().addKeys(B.keys);H=j.filter(function(Ce){return!ge.hasKey(l.values?I(Ce):Ce)});break;case"deleteRange":var xe=B.range;H=j.filter(function(Ce){return!wl(I(Ce),xe)})}return H},o);return z===o?o:(z.sort(function(j,B){return Ye(L(j),L(B))||Ye(I(j),I(B))}),l.limit&&l.limit<1/0&&(z.length>l.limit?z.length=l.limit:o.length===l.limit&&z.length<l.limit&&(g.dirty=!0)),b?Object.freeze(z):z)}function jh(o,l){return Ye(o.lower,l.lower)===0&&Ye(o.upper,l.upper)===0&&!!o.lowerOpen==!!l.lowerOpen&&!!o.upperOpen==!!l.upperOpen}function Rw(o,l){return function(c,p,g,b){if(c===void 0)return p!==void 0?-1:0;if(p===void 0)return 1;if((p=Ye(c,p))===0){if(g&&b)return 0;if(g)return 1;if(b)return-1}return p}(o.lower,l.lower,o.lowerOpen,l.lowerOpen)<=0&&0<=function(c,p,g,b){if(c===void 0)return p!==void 0?1:0;if(p===void 0)return-1;if((p=Ye(c,p))===0){if(g&&b)return 0;if(g)return-1;if(b)return 1}return p}(o.upper,l.upper,o.upperOpen,l.upperOpen)}function Pw(o,l,c,p){o.subscribers.add(c),p.addEventListener("abort",function(){var g,b;o.subscribers.delete(c),o.subscribers.size===0&&(g=o,b=l,setTimeout(function(){g.subscribers.size===0&&U(b,g)},3e3))})}var qw={stack:"dbcore",level:0,name:"Cache",create:function(o){var l=o.schema.name;return n(n({},o),{transaction:function(c,p,g){var b,_,C=o.transaction(c,p,g);return p==="readwrite"&&(_=(b=new AbortController).signal,g=function(q){return function(){if(b.abort(),p==="readwrite"){for(var I=new Set,F=0,L=c;F<L.length;F++){var z=L[F],j=fi["idb://".concat(l,"/").concat(z)];if(j){var B=o.table(z),H=j.optimisticOps.filter(function(Ce){return Ce.trans===C});if(C._explicit&&q&&C.mutatedParts)for(var M=0,G=Object.values(j.queries.query);M<G.length;M++)for(var Z=0,X=(ye=G[M]).slice();Z<X.length;Z++)dl((fe=X[Z]).obsSet,C.mutatedParts)&&(U(ye,fe),fe.subscribers.forEach(function(Ce){return I.add(Ce)}));else if(0<H.length){j.optimisticOps=j.optimisticOps.filter(function(Ce){return Ce.trans!==C});for(var ie=0,ce=Object.values(j.queries.query);ie<ce.length;ie++)for(var ye,fe,ge,xe=0,me=(ye=ce[ie]).slice();xe<me.length;xe++)(fe=me[xe]).res!=null&&C.mutatedParts&&(q&&!fe.dirty?(ge=Object.isFrozen(fe.res),ge=qh(fe.res,fe.req,H,B,fe,ge),fe.dirty?(U(ye,fe),fe.subscribers.forEach(function(Ce){return I.add(Ce)})):ge!==fe.res&&(fe.res=ge,fe.promise=be.resolve({result:ge}))):(fe.dirty&&U(ye,fe),fe.subscribers.forEach(function(Ce){return I.add(Ce)})))}}}I.forEach(function(Ce){return Ce()})}}},C.addEventListener("abort",g(!1),{signal:_}),C.addEventListener("error",g(!1),{signal:_}),C.addEventListener("complete",g(!0),{signal:_})),C},table:function(c){var p=o.table(c),g=p.schema.primaryKey;return n(n({},p),{mutate:function(b){var _=Oe.trans;if(g.outbound||_.db._options.cache==="disabled"||_.explicit||_.idbtrans.mode!=="readwrite")return p.mutate(b);var C=fi["idb://".concat(l,"/").concat(c)];return C?(_=p.mutate(b),b.type!=="add"&&b.type!=="put"||!(50<=b.values.length||vl(g,b).some(function(q){return q==null}))?(C.optimisticOps.push(b),b.mutatedParts&&Ro(b.mutatedParts),_.then(function(q){0<q.numFailures&&(U(C.optimisticOps,b),(q=Ph(0,b,q))&&C.optimisticOps.push(q),b.mutatedParts&&Ro(b.mutatedParts))}),_.catch(function(){U(C.optimisticOps,b),b.mutatedParts&&Ro(b.mutatedParts)})):_.then(function(q){var I=Ph(0,n(n({},b),{values:b.values.map(function(F,L){var z;return q.failures[L]||(F=(z=g.keyPath)!==null&&z!==void 0&&z.includes(".")?R(F):n({},F),ne(F,g.keyPath,q.results[L])),F})}),q);C.optimisticOps.push(I),queueMicrotask(function(){return b.mutatedParts&&Ro(b.mutatedParts)})}),_):p.mutate(b)},query:function(b){if(!kh(Oe,p)||!Rh("query",b))return p.query(b);var _=((I=Oe.trans)===null||I===void 0?void 0:I.db._options.cache)==="immutable",L=Oe,C=L.requery,q=L.signal,I=function(B,H,M,G){var Z=fi["idb://".concat(B,"/").concat(H)];if(!Z)return[];if(!(H=Z.queries[M]))return[null,!1,Z,null];var X=H[(G.query?G.query.index.name:null)||""];if(!X)return[null,!1,Z,null];switch(M){case"query":var ie=X.find(function(ce){return ce.req.limit===G.limit&&ce.req.values===G.values&&jh(ce.req.query.range,G.query.range)});return ie?[ie,!0,Z,X]:[X.find(function(ce){return("limit"in ce.req?ce.req.limit:1/0)>=G.limit&&(!G.values||ce.req.values)&&Rw(ce.req.query.range,G.query.range)}),!1,Z,X];case"count":return ie=X.find(function(ce){return jh(ce.req.query.range,G.query.range)}),[ie,!!ie,Z,X]}}(l,c,"query",b),F=I[0],L=I[1],z=I[2],j=I[3];return F&&L?F.obsSet=b.obsSet:(L=p.query(b).then(function(B){var H=B.result;if(F&&(F.res=H),_){for(var M=0,G=H.length;M<G;++M)Object.freeze(H[M]);Object.freeze(H)}else B.result=R(H);return B}).catch(function(B){return j&&F&&U(j,F),Promise.reject(B)}),F={obsSet:b.obsSet,promise:L,subscribers:new Set,type:"query",req:b,dirty:!1},j?j.push(F):(j=[F],(z=z||(fi["idb://".concat(l,"/").concat(c)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[b.query.index.name||""]=j)),Pw(F,j,C,q),F.promise.then(function(B){return{result:qh(B.result,b,z==null?void 0:z.optimisticOps,p,F,_)}})}})}})}};function qo(o,l){return new Proxy(o,{get:function(c,p,g){return p==="db"?l:Reflect.get(c,p,g)}})}var Sr=(St.prototype.version=function(o){if(isNaN(o)||o<.1)throw new le.Type("Given version is not a positive number");if(o=Math.round(10*o)/10,this.idbdb||this._state.isBeingOpened)throw new le.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,o);var l=this._versions,c=l.filter(function(p){return p._cfg.version===o})[0];return c||(c=new this.Version(o),l.push(c),l.sort(Qe),c.stores({}),this._state.autoSchema=!1,c)},St.prototype._whenReady=function(o){var l=this;return this.idbdb&&(this._state.openComplete||Oe.letThrough||this._vip)?o():new be(function(c,p){if(l._state.openComplete)return p(new le.DatabaseClosed(l._state.dbOpenError));if(!l._state.isBeingOpened){if(!l._state.autoOpen)return void p(new le.DatabaseClosed);l.open().catch(Ae)}l._state.dbReadyPromise.then(c,p)}).then(o)},St.prototype.use=function(o){var l=o.stack,c=o.create,p=o.level,g=o.name;return g&&this.unuse({stack:l,name:g}),o=this._middlewares[l]||(this._middlewares[l]=[]),o.push({stack:l,create:c,level:p??10,name:g}),o.sort(function(b,_){return b.level-_.level}),this},St.prototype.unuse=function(o){var l=o.stack,c=o.name,p=o.create;return l&&this._middlewares[l]&&(this._middlewares[l]=this._middlewares[l].filter(function(g){return p?g.create!==p:!!c&&g.name!==c})),this},St.prototype.open=function(){var o=this;return Dn(At,function(){return _w(o)})},St.prototype._close=function(){var o=this._state,l=ir.indexOf(this);if(0<=l&&ir.splice(l,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}o.isBeingOpened||(o.dbReadyPromise=new be(function(c){o.dbReadyResolve=c}),o.openCanceller=new be(function(c,p){o.cancelOpen=p}))},St.prototype.close=function(c){var l=(c===void 0?{disableAutoOpen:!0}:c).disableAutoOpen,c=this._state;l?(c.isBeingOpened&&c.cancelOpen(new le.DatabaseClosed),this._close(),c.autoOpen=!1,c.dbOpenError=new le.DatabaseClosed):(this._close(),c.autoOpen=this._options.autoOpen||c.isBeingOpened,c.openComplete=!1,c.dbOpenError=null)},St.prototype.delete=function(o){var l=this;o===void 0&&(o={disableAutoOpen:!0});var c=0<arguments.length&&typeof arguments[0]!="object",p=this._state;return new be(function(g,b){function _(){l.close(o);var C=l._deps.indexedDB.deleteDatabase(l.name);C.onsuccess=ot(function(){var q,I,F;q=l._deps,I=l.name,F=q.indexedDB,q=q.IDBKeyRange,Fr(F)||I===Un||Ur(F,q).delete(I).catch(Ae),g()}),C.onerror=Gt(b),C.onblocked=l._fireOnBlocked}if(c)throw new le.InvalidArgument("Invalid closeOptions argument to db.delete()");p.isBeingOpened?p.dbReadyPromise.then(_):_()})},St.prototype.backendDB=function(){return this.idbdb},St.prototype.isOpen=function(){return this.idbdb!==null},St.prototype.hasBeenClosed=function(){var o=this._state.dbOpenError;return o&&o.name==="DatabaseClosed"},St.prototype.hasFailed=function(){return this._state.dbOpenError!==null},St.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(St.prototype,"tables",{get:function(){var o=this;return a(this._allTables).map(function(l){return o._allTables[l]})},enumerable:!1,configurable:!0}),St.prototype.transaction=function(){var o=(function(l,c,p){var g=arguments.length;if(g<2)throw new le.InvalidArgument("Too few arguments");for(var b=new Array(g-1);--g;)b[g-1]=arguments[g];return p=b.pop(),[l,Ee(b),p]}).apply(this,arguments);return this._transaction.apply(this,o)},St.prototype._transaction=function(o,l,c){var p=this,g=Oe.trans;g&&g.db===this&&o.indexOf("!")===-1||(g=null);var b,_,C=o.indexOf("?")!==-1;o=o.replace("!","").replace("?","");try{if(_=l.map(function(I){if(I=I instanceof p.Table?I.name:I,typeof I!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return I}),o=="r"||o===qr)b=qr;else{if(o!="rw"&&o!=sr)throw new le.InvalidArgument("Invalid transaction mode: "+o);b=sr}if(g){if(g.mode===qr&&b===sr){if(!C)throw new le.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");g=null}g&&_.forEach(function(I){if(g&&g.storeNames.indexOf(I)===-1){if(!C)throw new le.SubTransaction("Table "+I+" not included in parent transaction.");g=null}}),C&&g&&!g.active&&(g=null)}}catch(I){return g?g._promise(null,function(F,L){L(I)}):ct(I)}var q=(function I(F,L,z,j,B){return be.resolve().then(function(){var H=Oe.transless||Oe,M=F._createTransaction(L,z,F._dbSchema,j);if(M.explicit=!0,H={trans:M,transless:H},j)M.idbtrans=j.idbtrans;else try{M.create(),M.idbtrans._explicit=!0,F._state.PR1398_maxLoop=3}catch(X){return X.name===We.InvalidState&&F.isOpen()&&0<--F._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),F.close({disableAutoOpen:!1}),F.open().then(function(){return I(F,L,z,null,B)})):ct(X)}var G,Z=ae(B);return Z&&rr(),H=be.follow(function(){var X;(G=B.call(M,M))&&(Z?(X=wn.bind(null,null),G.then(X,X)):typeof G.next=="function"&&typeof G.throw=="function"&&(G=yl(G)))},H),(G&&typeof G.then=="function"?be.resolve(G).then(function(X){return M.active?X:ct(new le.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):H.then(function(){return G})).then(function(X){return j&&M._resolve(),M._completion.then(function(){return X})}).catch(function(X){return M._reject(X),ct(X)})})}).bind(null,this,b,_,g,c);return g?g._promise(b,q,"lock"):Oe.trans?Dn(Oe.transless,function(){return p._whenReady(q)}):this._whenReady(q)},St.prototype.table=function(o){if(!w(this._allTables,o))throw new le.InvalidTable("Table ".concat(o," does not exist"));return this._allTables[o]},St);function St(o,l){var c=this;this._middlewares={},this.verno=0;var p=St.dependencies;this._options=l=n({addons:St.addons,autoOpen:!0,indexedDB:p.indexedDB,IDBKeyRange:p.IDBKeyRange,cache:"cloned"},l),this._deps={indexedDB:l.indexedDB,IDBKeyRange:l.IDBKeyRange},p=l.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var g,b,_,C,q,I={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ae,dbReadyPromise:null,cancelOpen:Ae,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:l.autoOpen};I.dbReadyPromise=new be(function(L){I.dbReadyResolve=L}),I.openCanceller=new be(function(L,z){I.cancelOpen=z}),this._state=I,this.name=o,this.on=rn(this,"populate","blocked","versionchange","close",{ready:[en,Ae]}),this.on.ready.subscribe=Q(this.on.ready.subscribe,function(L){return function(z,j){St.vip(function(){var B,H=c._state;H.openComplete?(H.dbOpenError||be.resolve().then(z),j&&L(z)):H.onReadyBeingFired?(H.onReadyBeingFired.push(z),j&&L(z)):(L(z),B=c,j||L(function M(){B.on.ready.unsubscribe(z),B.on.ready.unsubscribe(M)}))})}}),this.Collection=(g=this,or(sn.prototype,function(G,M){this.db=g;var j=jr,B=null;if(M)try{j=M()}catch(Z){B=Z}var H=G._ctx,M=H.table,G=M.hook.reading.fire;this._ctx={table:M,index:H.index,isPrimKey:!H.index||M.schema.primKey.keyPath&&H.index===M.schema.primKey.name,range:j,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:B,or:H.or,valueMapper:G!==De?G:null}})),this.Table=(b=this,or(wr.prototype,function(L,z,j){this.db=b,this._tx=j,this.name=L,this.schema=z,this.hook=b._allTables[L]?b._allTables[L].hook:rn(null,{creating:[zt,Ae],reading:[it,De],updating:[mn,Ae],deleting:[gn,Ae]})})),this.Transaction=(_=this,or(Vi.prototype,function(L,z,j,B,H){var M=this;this.db=_,this.mode=L,this.storeNames=z,this.schema=j,this.chromeTransactionDurability=B,this.idbtrans=null,this.on=rn(this,"complete","error","abort"),this.parent=H||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 be(function(G,Z){M._resolve=G,M._reject=Z}),this._completion.then(function(){M.active=!1,M.on.complete.fire()},function(G){var Z=M.active;return M.active=!1,M.on.error.fire(G),M.parent?M.parent._reject(G):Z&&M.idbtrans&&M.idbtrans.abort(),ct(G)})})),this.Version=(C=this,or(Er.prototype,function(L){this.db=C,this._cfg={version:L,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(q=this,or(kt.prototype,function(L,z,j){if(this.db=q,this._ctx={table:L,index:z===":id"?null:z,or:j},this._cmp=this._ascending=Ye,this._descending=function(B,H){return Ye(H,B)},this._max=function(B,H){return 0<Ye(B,H)?B:H},this._min=function(B,H){return Ye(B,H)<0?B:H},this._IDBKeyRange=q._deps.IDBKeyRange,!this._IDBKeyRange)throw new le.MissingAPI})),this.on("versionchange",function(L){0<L.newVersion?console.warn("Another connection wants to upgrade database '".concat(c.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(c.name,"'. Closing db now to resume the delete request.")),c.close({disableAutoOpen:!1})}),this.on("blocked",function(L){!L.newVersion||L.newVersion<L.oldVersion?console.warn("Dexie.delete('".concat(c.name,"') was blocked")):console.warn("Upgrade '".concat(c.name,"' blocked by other connection holding version ").concat(L.oldVersion/10))}),this._maxKey=Hn(l.IDBKeyRange),this._createTransaction=function(L,z,j,B){return new c.Transaction(L,z,j,c._options.chromeTransactionDurability,B)},this._fireOnBlocked=function(L){c.on("blocked").fire(L),ir.filter(function(z){return z.name===c.name&&z!==c&&!z._state.vcFired}).map(function(z){return z.on("versionchange").fire(L)})},this.use(Lw),this.use(qw),this.use(kw),this.use(Nw),this.use(Cw);var F=new Proxy(this,{get:function(L,z,j){if(z==="_vip")return!0;if(z==="table")return function(H){return qo(c.table(H),F)};var B=Reflect.get(L,z,j);return B instanceof wr?qo(B,F):z==="tables"?B.map(function(H){return qo(H,F)}):z==="_createTransaction"?function(){return qo(B.apply(this,arguments),F)}:B}});this.vip=F,p.forEach(function(L){return L(c)})}var jo,_n=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",jw=(xl.prototype.subscribe=function(o,l,c){return this._subscribe(o&&typeof o!="function"?o:{next:o,error:l,complete:c})},xl.prototype[_n]=function(){return this},xl);function xl(o){this._subscribe=o}try{jo={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{jo={indexedDB:null,IDBKeyRange:null}}function Ih(o){var l,c=!1,p=new jw(function(g){var b=ae(o),_,C=!1,q={},I={},F={get closed(){return C},unsubscribe:function(){C||(C=!0,_&&_.abort(),L&&An.storagemutated.unsubscribe(j))}};g.start&&g.start(F);var L=!1,z=function(){return Ct(B)},j=function(H){ko(q,H),dl(I,q)&&z()},B=function(){var H,M,G;!C&&jo.indexedDB&&(q={},H={},_&&_.abort(),_=new AbortController,G=function(Z){var X=Wt();try{b&&rr();var ie=vn(o,Z);return ie=b?ie.finally(wn):ie}finally{X&&Mn()}}(M={subscr:H,signal:_.signal,requery:z,querier:o,trans:null}),Promise.resolve(G).then(function(Z){c=!0,l=Z,C||M.signal.aborted||(q={},function(X){for(var ie in X)if(w(X,ie))return;return 1}(I=H)||L||(An(Kn,j),L=!0),Ct(function(){return!C&&g.next&&g.next(Z)}))},function(Z){c=!1,["DatabaseClosedError","AbortError"].includes(Z==null?void 0:Z.name)||C||Ct(function(){C||g.error&&g.error(Z)})}))};return setTimeout(z,0),F});return p.hasValue=function(){return c},p.getValue=function(){return l},p}var hi=Sr;function El(o){var l=Kr;try{Kr=!0,An.storagemutated.fire(o),ml(o,!0)}finally{Kr=l}}y(hi,n(n({},Ie),{delete:function(o){return new hi(o,{addons:[]}).delete()},exists:function(o){return new hi(o,{addons:[]}).open().then(function(l){return l.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(o){try{return l=hi.dependencies,c=l.indexedDB,l=l.IDBKeyRange,(Fr(c)?Promise.resolve(c.databases()).then(function(p){return p.map(function(g){return g.name}).filter(function(g){return g!==Un})}):Ur(c,l).toCollection().primaryKeys()).then(o)}catch{return ct(new le.MissingAPI)}var l,c},defineClass:function(){return function(o){f(this,o)}},ignoreTransaction:function(o){return Oe.trans?Dn(Oe.transless,o):o()},vip:fl,async:function(o){return function(){try{var l=yl(o.apply(this,arguments));return l&&typeof l.then=="function"?l:be.resolve(l)}catch(c){return ct(c)}}},spawn:function(o,l,c){try{var p=yl(o.apply(c,l||[]));return p&&typeof p.then=="function"?p:be.resolve(p)}catch(g){return ct(g)}},currentTransaction:{get:function(){return Oe.trans||null}},waitFor:function(o,l){return l=be.resolve(typeof o=="function"?hi.ignoreTransaction(o):o).timeout(l||6e4),Oe.trans?Oe.trans.waitFor(l):l},Promise:be,debug:{get:function(){return _t},set:function(o){P(o)}},derive:E,extend:f,props:y,override:Q,Events:rn,on:An,liveQuery:Ih,extendObservabilitySet:ko,getByKeyPath:ue,setByKeyPath:ne,delByKeyPath:function(o,l){typeof l=="string"?ne(o,l,void 0):"length"in l&&[].map.call(l,function(c){ne(o,c,void 0)})},shallowClone:re,deepClone:R,getObjectDiff:bl,cmp:Ye,asap:oe,minKey:-1/0,addons:[],connections:ir,errnames:We,dependencies:jo,cache:fi,semVer:"4.0.11",version:"4.0.11".split(".").map(function(o){return parseInt(o)}).reduce(function(o,l,c){return o+l/Math.pow(10,2*c)})})),hi.maxKey=Hn(hi.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(An(Kn,function(o){Kr||(o=new CustomEvent(cr,{detail:o}),Kr=!0,dispatchEvent(o),Kr=!1)}),addEventListener(cr,function(o){o=o.detail,Kr||El(o)}));var Gi,Kr=!1,$h=function(){};return typeof BroadcastChannel<"u"&&(($h=function(){(Gi=new BroadcastChannel(cr)).onmessage=function(o){return o.data&&El(o.data)}})(),typeof Gi.unref=="function"&&Gi.unref(),An(Kn,function(o){Kr||Gi.postMessage(o)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(o){if(!Sr.disableBfCache&&o.persisted){_t&&console.debug("Dexie: handling persisted pagehide"),Gi!=null&&Gi.close();for(var l=0,c=ir;l<c.length;l++)c[l].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(o){!Sr.disableBfCache&&o.persisted&&(_t&&console.debug("Dexie: handling persisted pageshow"),$h(),El({all:new Ut(-1/0,[[]])}))})),be.rejectionMapper=function(o,l){return!o||o instanceof de||o instanceof TypeError||o instanceof SyntaxError||!o.name||!qe[o.name]?o:(l=new qe[o.name](l||o.message,o),"stack"in o&&A(l,"stack",{get:function(){return this.inner.stack}}),l)},P(_t),n(Sr,Object.freeze({__proto__:null,Dexie:Sr,liveQuery:Ih,Entity:Ui,cmp:Ye,PropModification:xr,replacePrefix:function(o,l){return new xr({replacePrefix:[o,l]})},add:function(o){return new xr({add:o})},remove:function(o){return new xr({remove:o})},default:Sr,RangeSet:Ut,mergeRanges:Rs,rangesOverlap:Th}),{default:Sr}),Sr})}(Ha)),Ha.exports}var x0=w0();const za=qi(x0),Tf=Symbol.for("Dexie"),go=globalThis[Tf]||(globalThis[Tf]=za);if(za.semVer!==go.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${za.semVer} and ${go.semVer}`);const{liveQuery:mx,mergeRanges:yx,rangesOverlap:bx,RangeSet:vx,cmp:wx,Entity:xx,PropModification:Ex,replacePrefix:Sx,add:Ox,remove:Ax}=go;class E0 extends go{constructor(){super("db"),Of(this,"rows"),this.version(1).stores({rows:"++id, key"})}}new E0;var Va={exports:{}},S0=Va.exports,_f;function O0(){return _f||(_f=1,function(r,e){(function(t,n){r.exports=n()})(S0,function(){var t=1e3,n=6e4,i=36e5,s="millisecond",a="second",u="minute",f="hour",d="day",m="week",w="month",y="quarter",x="year",A="date",E="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,D=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var S=["th","st","nd","rd"],T=V%100;return"["+V+(S[(T-20)%10]||S[T]||S[0])+"]"}},Q=function(V,S,T){var $=String(V);return!$||$.length>=S?V:""+Array(S+1-$.length).join(T)+V},he={s:Q,z:function(V){var S=-V.utcOffset(),T=Math.abs(S),$=Math.floor(T/60),U=T%60;return(S<=0?"+":"-")+Q($,2,"0")+":"+Q(U,2,"0")},m:function V(S,T){if(S.date()<T.date())return-V(T,S);var $=12*(T.year()-S.year())+(T.month()-S.month()),U=S.clone().add($,w),J=T-U<0,K=S.clone().add($+(J?-1:1),w);return+(-($+(T-U)/(J?U-K:K-U))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:w,y:x,w:m,d,D:A,h:f,m:u,s:a,ms:s,Q:y}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},oe="en",ue={};ue[oe]=Y;var ne="$isDayjsObject",re=function(V){return V instanceof W||!(!V||!V[ne])},ve=function V(S,T,$){var U;if(!S)return oe;if(typeof S=="string"){var J=S.toLowerCase();ue[J]&&(U=J),T&&(ue[J]=T,U=J);var K=S.split("-");if(!U&&K.length>1)return V(K[0])}else{var ae=S.name;ue[ae]=S,U=ae}return!$&&U&&(oe=U),U||!$&&oe},Ee=function(V,S){if(re(V))return V.clone();var T=typeof S=="object"?S:{};return T.date=V,T.args=arguments,new W(T)},O=he;O.l=ve,O.i=re,O.w=function(V,S){return Ee(V,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var W=function(){function V(T){this.$L=ve(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[ne]=!0}var S=V.prototype;return S.parse=function(T){this.$d=function($){var U=$.date,J=$.utc;if(U===null)return new Date(NaN);if(O.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var K=U.match(N);if(K){var ae=K[2]-1||0,pe=(K[7]||"0").substring(0,3);return J?new Date(Date.UTC(K[1],ae,K[3]||1,K[4]||0,K[5]||0,K[6]||0,pe)):new Date(K[1],ae,K[3]||1,K[4]||0,K[5]||0,K[6]||0,pe)}}return new Date(U)}(T),this.init()},S.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},S.$utils=function(){return O},S.isValid=function(){return this.$d.toString()!==E},S.isSame=function(T,$){var U=Ee(T);return this.startOf($)<=U&&U<=this.endOf($)},S.isAfter=function(T,$){return Ee(T)<this.startOf($)},S.isBefore=function(T,$){return this.endOf($)<Ee(T)},S.$g=function(T,$,U){return O.u(T)?this[$]:this.set(U,T)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(T,$){var U=this,J=!!O.u($)||$,K=O.p(T),ae=function(le,qe){var Ie=O.w(U.$u?Date.UTC(U.$y,qe,le):new Date(U.$y,qe,le),U);return J?Ie:Ie.endOf(d)},pe=function(le,qe){return O.w(U.toDate()[le].apply(U.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(qe)),U)},de=this.$W,Ne=this.$M,we=this.$D,Ue="set"+(this.$u?"UTC":"");switch(K){case x:return J?ae(1,0):ae(31,11);case w:return J?ae(1,Ne):ae(0,Ne+1);case m:var We=this.$locale().weekStart||0,je=(de<We?de+7:de)-We;return ae(J?we-je:we+(6-je),Ne);case d:case A:return pe(Ue+"Hours",0);case f:return pe(Ue+"Minutes",1);case u:return pe(Ue+"Seconds",2);case a:return pe(Ue+"Milliseconds",3);default:return this.clone()}},S.endOf=function(T){return this.startOf(T,!1)},S.$set=function(T,$){var U,J=O.p(T),K="set"+(this.$u?"UTC":""),ae=(U={},U[d]=K+"Date",U[A]=K+"Date",U[w]=K+"Month",U[x]=K+"FullYear",U[f]=K+"Hours",U[u]=K+"Minutes",U[a]=K+"Seconds",U[s]=K+"Milliseconds",U)[J],pe=J===d?this.$D+($-this.$W):$;if(J===w||J===x){var de=this.clone().set(A,1);de.$d[ae](pe),de.init(),this.$d=de.set(A,Math.min(this.$D,de.daysInMonth())).$d}else ae&&this.$d[ae](pe);return this.init(),this},S.set=function(T,$){return this.clone().$set(T,$)},S.get=function(T){return this[O.p(T)]()},S.add=function(T,$){var U,J=this;T=Number(T);var K=O.p($),ae=function(Ne){var we=Ee(J);return O.w(we.date(we.date()+Math.round(Ne*T)),J)};if(K===w)return this.set(w,this.$M+T);if(K===x)return this.set(x,this.$y+T);if(K===d)return ae(1);if(K===m)return ae(7);var pe=(U={},U[u]=n,U[f]=i,U[a]=t,U)[K]||1,de=this.$d.getTime()+T*pe;return O.w(de,this)},S.subtract=function(T,$){return this.add(-1*T,$)},S.format=function(T){var $=this,U=this.$locale();if(!this.isValid())return U.invalidDate||E;var J=T||"YYYY-MM-DDTHH:mm:ssZ",K=O.z(this),ae=this.$H,pe=this.$m,de=this.$M,Ne=U.weekdays,we=U.months,Ue=U.meridiem,We=function(qe,Ie,Ae,De){return qe&&(qe[Ie]||qe($,J))||Ae[Ie].slice(0,De)},je=function(qe){return O.s(ae%12||12,qe,"0")},le=Ue||function(qe,Ie,Ae){var De=qe<12?"AM":"PM";return Ae?De.toLowerCase():De};return J.replace(D,function(qe,Ie){return Ie||function(Ae){switch(Ae){case"YY":return String($.$y).slice(-2);case"YYYY":return O.s($.$y,4,"0");case"M":return de+1;case"MM":return O.s(de+1,2,"0");case"MMM":return We(U.monthsShort,de,we,3);case"MMMM":return We(we,de);case"D":return $.$D;case"DD":return O.s($.$D,2,"0");case"d":return String($.$W);case"dd":return We(U.weekdaysMin,$.$W,Ne,2);case"ddd":return We(U.weekdaysShort,$.$W,Ne,3);case"dddd":return Ne[$.$W];case"H":return String(ae);case"HH":return O.s(ae,2,"0");case"h":return je(1);case"hh":return je(2);case"a":return le(ae,pe,!0);case"A":return le(ae,pe,!1);case"m":return String(pe);case"mm":return O.s(pe,2,"0");case"s":return String($.$s);case"ss":return O.s($.$s,2,"0");case"SSS":return O.s($.$ms,3,"0");case"Z":return K}return null}(qe)||K.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(T,$,U){var J,K=this,ae=O.p($),pe=Ee(T),de=(pe.utcOffset()-this.utcOffset())*n,Ne=this-pe,we=function(){return O.m(K,pe)};switch(ae){case x:J=we()/12;break;case w:J=we();break;case y:J=we()/3;break;case m:J=(Ne-de)/6048e5;break;case d:J=(Ne-de)/864e5;break;case f:J=Ne/i;break;case u:J=Ne/n;break;case a:J=Ne/t;break;default:J=Ne}return U?J:O.a(J)},S.daysInMonth=function(){return this.endOf(w).$D},S.$locale=function(){return ue[this.$L]},S.locale=function(T,$){if(!T)return this.$L;var U=this.clone(),J=ve(T,$,!0);return J&&(U.$L=J),U},S.clone=function(){return O.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},V}(),R=W.prototype;return Ee.prototype=R,[["$ms",s],["$s",a],["$m",u],["$H",f],["$W",d],["$M",w],["$y",x],["$D",A]].forEach(function(V){R[V[1]]=function(S){return this.$g(S,V[0],V[1])}}),Ee.extend=function(V,S){return V.$i||(V(S,W,Ee),V.$i=!0),Ee},Ee.locale=ve,Ee.isDayjs=re,Ee.unix=function(V){return Ee(1e3*V)},Ee.en=ue[oe],Ee.Ls=ue,Ee.p={},Ee})}(Va)),Va.exports}var A0=O0();const Wa=qi(A0);var Ga={exports:{}},T0=Ga.exports,Nf;function _0(){return Nf||(Nf=1,function(r,e){(function(t,n){r.exports=n()})(T0,function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,u=/\d*[^-_:/,()\s\d]+/,f={},d=function(N){return(N=+N)+(N>68?1900:2e3)},m=function(N){return function(D){this[N]=+D}},w=[/[+-]\d\d:?(\d\d)?|Z/,function(N){(this.zone||(this.zone={})).offset=function(D){if(!D||D==="Z")return 0;var Y=D.match(/([+-]|\d\d)/g),Q=60*Y[1]+(+Y[2]||0);return Q===0?0:Y[0]==="+"?-Q:Q}(N)}],y=function(N){var D=f[N];return D&&(D.indexOf?D:D.s.concat(D.f))},x=function(N,D){var Y,Q=f.meridiem;if(Q){for(var he=1;he<=24;he+=1)if(N.indexOf(Q(he,0,D))>-1){Y=he>12;break}}else Y=N===(D?"pm":"PM");return Y},A={A:[u,function(N){this.afternoon=x(N,!1)}],a:[u,function(N){this.afternoon=x(N,!0)}],Q:[i,function(N){this.month=3*(N-1)+1}],S:[i,function(N){this.milliseconds=100*+N}],SS:[s,function(N){this.milliseconds=10*+N}],SSS:[/\d{3}/,function(N){this.milliseconds=+N}],s:[a,m("seconds")],ss:[a,m("seconds")],m:[a,m("minutes")],mm:[a,m("minutes")],H:[a,m("hours")],h:[a,m("hours")],HH:[a,m("hours")],hh:[a,m("hours")],D:[a,m("day")],DD:[s,m("day")],Do:[u,function(N){var D=f.ordinal,Y=N.match(/\d+/);if(this.day=Y[0],D)for(var Q=1;Q<=31;Q+=1)D(Q).replace(/\[|\]/g,"")===N&&(this.day=Q)}],w:[a,m("week")],ww:[s,m("week")],M:[a,m("month")],MM:[s,m("month")],MMM:[u,function(N){var D=y("months"),Y=(y("monthsShort")||D.map(function(Q){return Q.slice(0,3)})).indexOf(N)+1;if(Y<1)throw new Error;this.month=Y%12||Y}],MMMM:[u,function(N){var D=y("months").indexOf(N)+1;if(D<1)throw new Error;this.month=D%12||D}],Y:[/[+-]?\d+/,m("year")],YY:[s,function(N){this.year=d(N)}],YYYY:[/\d{4}/,m("year")],Z:w,ZZ:w};function E(N){var D,Y;D=N,Y=f&&f.formats;for(var Q=(N=D.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Ee,O,W){var R=W&&W.toUpperCase();return O||Y[W]||t[W]||Y[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,S,T){return S||T.slice(1)})})).match(n),he=Q.length,oe=0;oe<he;oe+=1){var ue=Q[oe],ne=A[ue],re=ne&&ne[0],ve=ne&&ne[1];Q[oe]=ve?{regex:re,parser:ve}:ue.replace(/^\[|\]$/g,"")}return function(Ee){for(var O={},W=0,R=0;W<he;W+=1){var V=Q[W];if(typeof V=="string")R+=V.length;else{var S=V.regex,T=V.parser,$=Ee.slice(R),U=S.exec($)[0];T.call(O,U),Ee=Ee.replace(U,"")}}return function(J){var K=J.afternoon;if(K!==void 0){var ae=J.hours;K?ae<12&&(J.hours+=12):ae===12&&(J.hours=0),delete J.afternoon}}(O),O}}return function(N,D,Y){Y.p.customParseFormat=!0,N&&N.parseTwoDigitYear&&(d=N.parseTwoDigitYear);var Q=D.prototype,he=Q.parse;Q.parse=function(oe){var ue=oe.date,ne=oe.utc,re=oe.args;this.$u=ne;var ve=re[1];if(typeof ve=="string"){var Ee=re[2]===!0,O=re[3]===!0,W=Ee||O,R=re[2];O&&(R=re[2]),f=this.$locale(),!Ee&&R&&(f=Y.Ls[R]),this.$d=function($,U,J,K){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*$);var ae=E(U)($),pe=ae.year,de=ae.month,Ne=ae.day,we=ae.hours,Ue=ae.minutes,We=ae.seconds,je=ae.milliseconds,le=ae.zone,qe=ae.week,Ie=new Date,Ae=Ne||(pe||de?1:Ie.getDate()),De=pe||Ie.getFullYear(),it=0;pe&&!de||(it=de>0?de-1:Ie.getMonth());var et,zt=we||0,gn=Ue||0,mn=We||0,yn=je||0;return le?new Date(Date.UTC(De,it,Ae,zt,gn,mn,yn+60*le.offset*1e3)):J?new Date(Date.UTC(De,it,Ae,zt,gn,mn,yn)):(et=new Date(De,it,Ae,zt,gn,mn,yn),qe&&(et=K(et).week(qe).toDate()),et)}catch{return new Date("")}}(ue,ve,ne,Y),this.init(),R&&R!==!0&&(this.$L=this.locale(R).$L),W&&ue!=this.format(ve)&&(this.$d=new Date("")),f={}}else if(ve instanceof Array)for(var V=ve.length,S=1;S<=V;S+=1){re[1]=ve[S-1];var T=Y.apply(this,re);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}S===V&&(this.$d=new Date(""))}else he.call(this,oe)}}})}(Ga)),Ga.exports}var N0=_0();const C0=qi(N0);var Ya={exports:{}},L0=Ya.exports,Cf;function k0(){return Cf||(Cf=1,function(r,e){(function(t,n){r.exports=n()})(L0,function(){var t,n,i=1e3,s=6e4,a=36e5,u=864e5,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=31536e6,m=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,y={years:d,months:m,days:u,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},x=function(ue){return ue instanceof he},A=function(ue,ne,re){return new he(ue,re,ne.$l)},E=function(ue){return n.p(ue)+"s"},N=function(ue){return ue<0},D=function(ue){return N(ue)?Math.ceil(ue):Math.floor(ue)},Y=function(ue){return Math.abs(ue)},Q=function(ue,ne){return ue?N(ue)?{negative:!0,format:""+Y(ue)+ne}:{negative:!1,format:""+ue+ne}:{negative:!1,format:""}},he=function(){function ue(re,ve,Ee){var O=this;if(this.$d={},this.$l=Ee,re===void 0&&(this.$ms=0,this.parseFromMilliseconds()),ve)return A(re*y[E(ve)],this);if(typeof re=="number")return this.$ms=re,this.parseFromMilliseconds(),this;if(typeof re=="object")return Object.keys(re).forEach(function(V){O.$d[E(V)]=re[V]}),this.calMilliseconds(),this;if(typeof re=="string"){var W=re.match(w);if(W){var R=W.slice(2).map(function(V){return V!=null?Number(V):0});return this.$d.years=R[0],this.$d.months=R[1],this.$d.weeks=R[2],this.$d.days=R[3],this.$d.hours=R[4],this.$d.minutes=R[5],this.$d.seconds=R[6],this.calMilliseconds(),this}}return this}var ne=ue.prototype;return ne.calMilliseconds=function(){var re=this;this.$ms=Object.keys(this.$d).reduce(function(ve,Ee){return ve+(re.$d[Ee]||0)*y[Ee]},0)},ne.parseFromMilliseconds=function(){var re=this.$ms;this.$d.years=D(re/d),re%=d,this.$d.months=D(re/m),re%=m,this.$d.days=D(re/u),re%=u,this.$d.hours=D(re/a),re%=a,this.$d.minutes=D(re/s),re%=s,this.$d.seconds=D(re/i),re%=i,this.$d.milliseconds=re},ne.toISOString=function(){var re=Q(this.$d.years,"Y"),ve=Q(this.$d.months,"M"),Ee=+this.$d.days||0;this.$d.weeks&&(Ee+=7*this.$d.weeks);var O=Q(Ee,"D"),W=Q(this.$d.hours,"H"),R=Q(this.$d.minutes,"M"),V=this.$d.seconds||0;this.$d.milliseconds&&(V+=this.$d.milliseconds/1e3,V=Math.round(1e3*V)/1e3);var S=Q(V,"S"),T=re.negative||ve.negative||O.negative||W.negative||R.negative||S.negative,$=W.format||R.format||S.format?"T":"",U=(T?"-":"")+"P"+re.format+ve.format+O.format+$+W.format+R.format+S.format;return U==="P"||U==="-P"?"P0D":U},ne.toJSON=function(){return this.toISOString()},ne.format=function(re){var ve=re||"YYYY-MM-DDTHH:mm:ss",Ee={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return ve.replace(f,function(O,W){return W||String(Ee[O])})},ne.as=function(re){return this.$ms/y[E(re)]},ne.get=function(re){var ve=this.$ms,Ee=E(re);return Ee==="milliseconds"?ve%=1e3:ve=Ee==="weeks"?D(ve/y[Ee]):this.$d[Ee],ve||0},ne.add=function(re,ve,Ee){var O;return O=ve?re*y[E(ve)]:x(re)?re.$ms:A(re,this).$ms,A(this.$ms+O*(Ee?-1:1),this)},ne.subtract=function(re,ve){return this.add(re,ve,!0)},ne.locale=function(re){var ve=this.clone();return ve.$l=re,ve},ne.clone=function(){return A(this.$ms,this)},ne.humanize=function(re){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!re)},ne.valueOf=function(){return this.asMilliseconds()},ne.milliseconds=function(){return this.get("milliseconds")},ne.asMilliseconds=function(){return this.as("milliseconds")},ne.seconds=function(){return this.get("seconds")},ne.asSeconds=function(){return this.as("seconds")},ne.minutes=function(){return this.get("minutes")},ne.asMinutes=function(){return this.as("minutes")},ne.hours=function(){return this.get("hours")},ne.asHours=function(){return this.as("hours")},ne.days=function(){return this.get("days")},ne.asDays=function(){return this.as("days")},ne.weeks=function(){return this.get("weeks")},ne.asWeeks=function(){return this.as("weeks")},ne.months=function(){return this.get("months")},ne.asMonths=function(){return this.as("months")},ne.years=function(){return this.get("years")},ne.asYears=function(){return this.as("years")},ue}(),oe=function(ue,ne,re){return ue.add(ne.years()*re,"y").add(ne.months()*re,"M").add(ne.days()*re,"d").add(ne.hours()*re,"h").add(ne.minutes()*re,"m").add(ne.seconds()*re,"s").add(ne.milliseconds()*re,"ms")};return function(ue,ne,re){t=re,n=re().$utils(),re.duration=function(O,W){var R=re.locale();return A(O,{$l:R},W)},re.isDuration=x;var ve=ne.prototype.add,Ee=ne.prototype.subtract;ne.prototype.add=function(O,W){return x(O)?oe(this,O,1):ve.bind(this)(O,W)},ne.prototype.subtract=function(O,W){return x(O)?oe(this,O,-1):Ee.bind(this)(O,W)}}})}(Ya)),Ya.exports}var R0=k0();const P0=qi(R0);var Ja={exports:{}},q0=Ja.exports,Lf;function j0(){return Lf||(Lf=1,function(r,e){(function(t,n){r.exports=n()})(q0,function(){var t="minute",n=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,a,u){var f=a.prototype;u.utc=function(E){var N={date:E,utc:!0,args:arguments};return new a(N)},f.utc=function(E){var N=u(this.toDate(),{locale:this.$L,utc:!0});return E?N.add(this.utcOffset(),t):N},f.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var d=f.parse;f.parse=function(E){E.utc&&(this.$u=!0),this.$utils().u(E.$offset)||(this.$offset=E.$offset),d.call(this,E)};var m=f.init;f.init=function(){if(this.$u){var E=this.$d;this.$y=E.getUTCFullYear(),this.$M=E.getUTCMonth(),this.$D=E.getUTCDate(),this.$W=E.getUTCDay(),this.$H=E.getUTCHours(),this.$m=E.getUTCMinutes(),this.$s=E.getUTCSeconds(),this.$ms=E.getUTCMilliseconds()}else m.call(this)};var w=f.utcOffset;f.utcOffset=function(E,N){var D=this.$utils().u;if(D(E))return this.$u?0:D(this.$offset)?w.call(this):this.$offset;if(typeof E=="string"&&(E=function(oe){oe===void 0&&(oe="");var ue=oe.match(n);if(!ue)return null;var ne=(""+ue[0]).match(i)||["-",0,0],re=ne[0],ve=60*+ne[1]+ +ne[2];return ve===0?0:re==="+"?ve:-ve}(E),E===null))return this;var Y=Math.abs(E)<=16?60*E:E,Q=this;if(N)return Q.$offset=Y,Q.$u=E===0,Q;if(E!==0){var he=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(Q=this.local().add(Y+he,t)).$offset=Y,Q.$x.$localOffset=he}else Q=this.utc();return Q};var y=f.format;f.format=function(E){var N=E||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,N)},f.valueOf=function(){var E=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*E},f.isUTC=function(){return!!this.$u},f.toISOString=function(){return this.toDate().toISOString()},f.toString=function(){return this.toDate().toUTCString()};var x=f.toDate;f.toDate=function(E){return E==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():x.call(this)};var A=f.diff;f.diff=function(E,N,D){if(E&&this.$u===E.$u)return A.call(this,E,N,D);var Y=this.local(),Q=u(E).local();return A.call(Y,Q,N,D)}}})}(Ja)),Ja.exports}var I0=j0();const $0=qi(I0);Wa.extend(C0),Wa.extend(P0),Wa.extend($0);var mo={},yo={},Za,kf;function Rf(){if(kf)return Za;kf=1,Za=r;function r(t,n){if(n!=="$")for(var i=e(n),s=0;s<i.length;s++)n=i[s].toString().replace(/\\"/g,'"'),!(typeof t[n]>"u"&&s!==i.length-1)&&(t=t[n]);return t}function e(t){for(var n=/(?:\.(\w+))|(?:\[(\d+)\])|(?:\["((?:[^\\"]|\\.)*)"\])/g,i=[],s;s=n.exec(t);)i.push(s[1]||s[2]||s[3]);return i}return Za}var xs={},Pf;function M0(){if(Pf)return xs;Pf=1;var r=Rf(),e=If();return xs.getRegexFlags=function(t){var n="";return t.ignoreCase&&(n+="i"),t.global&&(n+="g"),t.multiline&&(n+="m"),n},xs.stringifyFunction=function(t,n){if(typeof n=="function")return n(t);var i=t.toString(),s=i.match(/^[^{]*{|^[^=]*=>/),a=s?s[0]:"<function> ",u=i[i.length-1]==="}"?"}":"";return a.replace(/\r\n|\n/g," ").replace(/\s+/g," ")+" /* ... */ "+u},xs.restore=function(t,n){var i=t[0],s=t.slice(1);switch(i){case"$":return r(n,t);case"r":var a=s.indexOf(","),u=s.slice(0,a),f=s.slice(a+1);return RegExp(f,u);case"d":return new Date(+s);case"f":var d=function(){throw new Error("can't run jsan parsed function")};return d.toString=function(){return s},d;case"u":return;case"e":var m=new Error(s);return m.stack="Stack is unavailable for jsan parsed errors",m;case"s":return Symbol(s);case"g":return Symbol.for(s);case"m":return new Map(e.parse(s));case"l":return new Set(e.parse(s));case"n":return NaN;case"i":return 1/0;case"y":return-1/0;default:return console.warn("unknown type",t),t}},xs}var qf;function D0(){if(qf)return yo;qf=1,Rf();var r=M0(),e=typeof WeakMap<"u"?WeakMap:function(){var t=[],n=[];return{set:function(i,s){t.push(i),n.push(s)},get:function(i){for(var s=0;s<t.length;s++)if(t[s]===i)return n[s]}}};return yo.decycle=function t(n,i,s,a){a=a||new e;var u=!Object.prototype.hasOwnProperty.call(i,"circular"),f=i.refs!==!1;return function d(m,w,y){var x,A,E,N=typeof s=="function"?s(y||"",m):m;if(i.date&&N instanceof Date)return{$jsan:"d"+N.getTime()};if(i.regex&&N instanceof RegExp)return{$jsan:"r"+r.getRegexFlags(N)+","+N.source};if(i.function&&typeof N=="function")return{$jsan:"f"+r.stringifyFunction(N,i.function)};if(i.nan&&typeof N=="number"&&isNaN(N))return{$jsan:"n"};if(i.infinity){if(Number.POSITIVE_INFINITY===N)return{$jsan:"i"};if(Number.NEGATIVE_INFINITY===N)return{$jsan:"y"}}if(i.undefined&&N===void 0)return{$jsan:"u"};if(i.error&&N instanceof Error)return{$jsan:"e"+N.message};if(i.symbol&&typeof N=="symbol"){var D=Symbol.keyFor(N);return D!==void 0?{$jsan:"g"+D}:{$jsan:"s"+N.toString().slice(7,-1)}}if(i.map&&typeof Map=="function"&&N instanceof Map&&typeof Array.from=="function")return{$jsan:"m"+JSON.stringify(t(Array.from(N),i,s,a))};if(i.set&&typeof Set=="function"&&N instanceof Set&&typeof Array.from=="function")return{$jsan:"l"+JSON.stringify(t(Array.from(N),i,s,a))};if(N&&typeof N.toJSON=="function")try{N=N.toJSON(y)}catch{var Y=y||"$";return"toJSON failed for '"+(a.get(N)||Y)+"'"}if(typeof N=="object"&&N!==null&&!(N instanceof Boolean)&&!(N instanceof Date)&&!(N instanceof Number)&&!(N instanceof RegExp)&&!(N instanceof String)&&typeof N!="symbol"&&!(N instanceof Error)){if(typeof N=="object"){var Q=a.get(N);if(Q){if(u&&f)return{$jsan:Q};var he=w.split(".").slice(0,-1).join(".");if(he.indexOf(Q)===0)return u?{$jsan:Q}:typeof i.circular=="function"?i.circular(N,w,Q):i.circular;if(f)return{$jsan:Q}}a.set(N,w)}if(Object.prototype.toString.apply(N)==="[object Array]")for(E=[],x=0;x<N.length;x+=1)E[x]=d(N[x],w+"["+x+"]",x);else{E={};for(A in N)if(Object.prototype.hasOwnProperty.call(N,A)){var oe=/^\w+$/.test(A)?"."+A:"["+JSON.stringify(A)+"]";E[A]=A==="$jsan"?[d(N[A],w+oe)]:d(N[A],w+oe,A)}}return E}return N}(n,"$")},yo.retrocycle=function(t){return function n(i){var s,a,u;if(i&&typeof i=="object")if(Object.prototype.toString.apply(i)==="[object Array]")for(s=0;s<i.length;s+=1)a=i[s],a&&typeof a=="object"&&(a.$jsan?i[s]=r.restore(a.$jsan,t):n(a));else for(u in i){if(typeof i[u]=="string"&&u==="$jsan")return r.restore(i.$jsan,t);u==="$jsan"&&(i[u]=i[u][0]),typeof i[u]=="object"&&(a=i[u],a&&typeof a=="object"&&(a.$jsan?i[u]=r.restore(a.$jsan,t):n(a)))}return i}(t)},yo}var jf;function If(){if(jf)return mo;jf=1;var r=D0();return mo.stringify=function(e,t,n,i){if(arguments.length<4)try{return arguments.length===1?JSON.stringify(e):JSON.stringify.apply(JSON,arguments)}catch{}var s=i||!1;typeof s=="boolean"&&(s={date:s,function:s,regex:s,undefined:s,error:s,symbol:s,map:s,set:s,nan:s,infinity:s});var a=r.decycle(e,s,t);return arguments.length===1?JSON.stringify(a):JSON.stringify(a,Array.isArray(t)?t:null,n)},mo.parse=function(e,t){var n=/"\$jsan"/.test(e),i;return arguments.length===1?i=JSON.parse(e):i=JSON.parse(e,t),n&&(i=r.retrocycle(i)),i},mo}var $f,Mf;function B0(){return Mf||(Mf=1,$f=If()),$f}var U0=B0();const Df=qi(U0),F0=(r=null,e,t,n=!0)=>Df.stringify(r,e,t,n),K0=(r,e)=>Df.parse(r,e);function Bf(r,e){return function(){return r.apply(e,arguments)}}const{toString:H0}=Object.prototype,{getPrototypeOf:Xa}=Object,bo=(r=>e=>{const t=H0.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),In=r=>(r=r.toLowerCase(),e=>bo(e)===r),vo=r=>e=>typeof e===r,{isArray:ji}=Array,Es=vo("undefined");function z0(r){return r!==null&&!Es(r)&&r.constructor!==null&&!Es(r.constructor)&&Qt(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Uf=In("ArrayBuffer");function V0(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&Uf(r.buffer),e}const W0=vo("string"),Qt=vo("function"),Ff=vo("number"),wo=r=>r!==null&&typeof r=="object",G0=r=>r===!0||r===!1,xo=r=>{if(bo(r)!=="object")return!1;const e=Xa(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Y0=In("Date"),J0=In("File"),Z0=In("Blob"),X0=In("FileList"),Q0=r=>wo(r)&&Qt(r.pipe),ev=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Qt(r.append)&&((e=bo(r))==="formdata"||e==="object"&&Qt(r.toString)&&r.toString()==="[object FormData]"))},tv=In("URLSearchParams"),[nv,rv,iv,sv]=["ReadableStream","Request","Response","Headers"].map(In),ov=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ss(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),ji(r))for(n=0,i=r.length;n<i;n++)e.call(null,r[n],n,r);else{const s=t?Object.getOwnPropertyNames(r):Object.keys(r),a=s.length;let u;for(n=0;n<a;n++)u=s[n],e.call(null,r[u],u,r)}}function Kf(r,e){e=e.toLowerCase();const t=Object.keys(r);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const ti=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Hf=r=>!Es(r)&&r!==ti;function Qa(){const{caseless:r}=Hf(this)&&this||{},e={},t=(n,i)=>{const s=r&&Kf(e,i)||i;xo(e[s])&&xo(n)?e[s]=Qa(e[s],n):xo(n)?e[s]=Qa({},n):ji(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Ss(arguments[n],t);return e}const av=(r,e,t,{allOwnKeys:n}={})=>(Ss(e,(i,s)=>{t&&Qt(i)?r[s]=Bf(i,t):r[s]=i},{allOwnKeys:n}),r),lv=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),uv=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},cv=(r,e,t,n)=>{let i,s,a;const u={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)a=i[s],(!n||n(a,r,e))&&!u[a]&&(e[a]=r[a],u[a]=!0);r=t!==!1&&Xa(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},fv=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},hv=r=>{if(!r)return null;if(ji(r))return r;let e=r.length;if(!Ff(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},dv=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&Xa(Uint8Array)),pv=(r,e)=>{const t=(r&&r[Symbol.iterator]).call(r);let n;for(;(n=t.next())&&!n.done;){const i=n.value;e.call(r,i[0],i[1])}},gv=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},mv=In("HTMLFormElement"),yv=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),zf=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),bv=In("RegExp"),Vf=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};Ss(t,(i,s)=>{let a;(a=e(i,s,r))!==!1&&(n[s]=a||i)}),Object.defineProperties(r,n)},vv=r=>{Vf(r,(e,t)=>{if(Qt(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(Qt(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},wv=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return ji(r)?n(r):n(String(r).split(e)),t},xv=()=>{},Ev=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function Sv(r){return!!(r&&Qt(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const Ov=r=>{const e=new Array(10),t=(n,i)=>{if(wo(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=ji(n)?[]:{};return Ss(n,(a,u)=>{const f=t(a,i+1);!Es(f)&&(s[u]=f)}),e[i]=void 0,s}}return n};return t(r,0)},Av=In("AsyncFunction"),Tv=r=>r&&(wo(r)||Qt(r))&&Qt(r.then)&&Qt(r.catch),Wf=((r,e)=>r?setImmediate:e?((t,n)=>(ti.addEventListener("message",({source:i,data:s})=>{i===ti&&s===t&&n.length&&n.shift()()},!1),i=>{n.push(i),ti.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Qt(ti.postMessage)),_v=typeof queueMicrotask<"u"?queueMicrotask.bind(ti):typeof process<"u"&&process.nextTick||Wf,ee={isArray:ji,isArrayBuffer:Uf,isBuffer:z0,isFormData:ev,isArrayBufferView:V0,isString:W0,isNumber:Ff,isBoolean:G0,isObject:wo,isPlainObject:xo,isReadableStream:nv,isRequest:rv,isResponse:iv,isHeaders:sv,isUndefined:Es,isDate:Y0,isFile:J0,isBlob:Z0,isRegExp:bv,isFunction:Qt,isStream:Q0,isURLSearchParams:tv,isTypedArray:dv,isFileList:X0,forEach:Ss,merge:Qa,extend:av,trim:ov,stripBOM:lv,inherits:uv,toFlatObject:cv,kindOf:bo,kindOfTest:In,endsWith:fv,toArray:hv,forEachEntry:pv,matchAll:gv,isHTMLForm:mv,hasOwnProperty:zf,hasOwnProp:zf,reduceDescriptors:Vf,freezeMethods:vv,toObjectSet:wv,toCamelCase:yv,noop:xv,toFiniteNumber:Ev,findKey:Kf,global:ti,isContextDefined:Hf,isSpecCompliantForm:Sv,toJSONObject:Ov,isAsyncFn:Av,isThenable:Tv,setImmediate:Wf,asap:_v};function He(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ee.inherits(He,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ee.toJSONObject(this.config),code:this.code,status:this.status}}});const Gf=He.prototype,Yf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Yf[r]={value:r}}),Object.defineProperties(He,Yf),Object.defineProperty(Gf,"isAxiosError",{value:!0}),He.from=(r,e,t,n,i,s)=>{const a=Object.create(Gf);return ee.toFlatObject(r,a,function(u){return u!==Error.prototype},u=>u!=="isAxiosError"),He.call(a,r.message,e,t,n,i),a.cause=r,a.name=r.name,s&&Object.assign(a,s),a};const Nv=null;function el(r){return ee.isPlainObject(r)||ee.isArray(r)}function Jf(r){return ee.endsWith(r,"[]")?r.slice(0,-2):r}function Zf(r,e,t){return r?r.concat(e).map(function(n,i){return n=Jf(n),!t&&i?"["+n+"]":n}).join(t?".":""):e}function Cv(r){return ee.isArray(r)&&!r.some(el)}const Lv=ee.toFlatObject(ee,{},null,function(r){return/^is[A-Z]/.test(r)});function Eo(r,e,t){if(!ee.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=ee.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,A){return!ee.isUndefined(A[x])});const n=t.metaTokens,i=t.visitor||d,s=t.dots,a=t.indexes,u=(t.Blob||typeof Blob<"u"&&Blob)&&ee.isSpecCompliantForm(e);if(!ee.isFunction(i))throw new TypeError("visitor must be a function");function f(x){if(x===null)return"";if(ee.isDate(x))return x.toISOString();if(!u&&ee.isBlob(x))throw new He("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(x)||ee.isTypedArray(x)?u&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function d(x,A,E){let N=x;if(x&&!E&&typeof x=="object"){if(ee.endsWith(A,"{}"))A=n?A:A.slice(0,-2),x=JSON.stringify(x);else if(ee.isArray(x)&&Cv(x)||(ee.isFileList(x)||ee.endsWith(A,"[]"))&&(N=ee.toArray(x)))return A=Jf(A),N.forEach(function(D,Y){!(ee.isUndefined(D)||D===null)&&e.append(a===!0?Zf([A],Y,s):a===null?A:A+"[]",f(D))}),!1}return el(x)?!0:(e.append(Zf(E,A,s),f(x)),!1)}const m=[],w=Object.assign(Lv,{defaultVisitor:d,convertValue:f,isVisitable:el});function y(x,A){if(!ee.isUndefined(x)){if(m.indexOf(x)!==-1)throw Error("Circular reference detected in "+A.join("."));m.push(x),ee.forEach(x,function(E,N){(!(ee.isUndefined(E)||E===null)&&i.call(e,E,ee.isString(N)?N.trim():N,A,w))===!0&&y(E,A?A.concat(N):[N])}),m.pop()}}if(!ee.isObject(r))throw new TypeError("data must be an object");return y(r),e}function Xf(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function tl(r,e){this._pairs=[],r&&Eo(r,this,e)}const Qf=tl.prototype;Qf.append=function(r,e){this._pairs.push([r,e])},Qf.toString=function(r){const e=r?function(t){return r.call(this,t,Xf)}:Xf;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function kv(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eh(r,e,t){if(!e)return r;const n=t&&t.encode||kv;ee.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let s;if(i?s=i(e,t):s=ee.isURLSearchParams(e)?e.toString():new tl(e,t).toString(n),s){const a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class th{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ee.forEach(this.handlers,function(t){t!==null&&e(t)})}}const nh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rv=typeof URLSearchParams<"u"?URLSearchParams:tl,Pv=typeof FormData<"u"?FormData:null,qv=typeof Blob<"u"?Blob:null,jv={isBrowser:!0,classes:{URLSearchParams:Rv,FormData:Pv,Blob:qv},protocols:["http","https","file","blob","url","data"]},nl=typeof window<"u"&&typeof document<"u",rl=typeof navigator=="object"&&navigator||void 0,Iv=nl&&(!rl||["ReactNative","NativeScript","NS"].indexOf(rl.product)<0),$v=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Mv=nl&&window.location.href||"http://localhost",Dv=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:nl,hasStandardBrowserEnv:Iv,hasStandardBrowserWebWorkerEnv:$v,navigator:rl,origin:Mv},Symbol.toStringTag,{value:"Module"})),Mt={...Dv,...jv};function Bv(r,e){return Eo(r,new Mt.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return Mt.isNode&&ee.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Uv(r){return ee.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Fv(r){const e={},t=Object.keys(r);let n;const i=t.length;let s;for(n=0;n<i;n++)s=t[n],e[s]=r[s];return e}function rh(r){function e(t,n,i,s){let a=t[s++];if(a==="__proto__")return!0;const u=Number.isFinite(+a),f=s>=t.length;return a=!a&&ee.isArray(i)?i.length:a,f?(ee.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!u):((!i[a]||!ee.isObject(i[a]))&&(i[a]=[]),e(t,n,i[a],s)&&ee.isArray(i[a])&&(i[a]=Fv(i[a])),!u)}if(ee.isFormData(r)&&ee.isFunction(r.entries)){const t={};return ee.forEachEntry(r,(n,i)=>{e(Uv(n),i,t,0)}),t}return null}function Kv(r,e,t){if(ee.isString(r))try{return(e||JSON.parse)(r),ee.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const Os={transitional:nh,adapter:["xhr","http","fetch"],transformRequest:[function(r,e){const t=e.getContentType()||"",n=t.indexOf("application/json")>-1,i=ee.isObject(r);if(i&&ee.isHTMLForm(r)&&(r=new FormData(r)),ee.isFormData(r))return n?JSON.stringify(rh(r)):r;if(ee.isArrayBuffer(r)||ee.isBuffer(r)||ee.isStream(r)||ee.isFile(r)||ee.isBlob(r)||ee.isReadableStream(r))return r;if(ee.isArrayBufferView(r))return r.buffer;if(ee.isURLSearchParams(r))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let s;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return Bv(r,this.formSerializer).toString();if((s=ee.isFileList(r))||t.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return Eo(s?{"files[]":r}:r,a&&new a,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),Kv(r)):r}],transformResponse:[function(r){const e=this.transitional||Os.transitional,t=e&&e.forcedJSONParsing,n=this.responseType==="json";if(ee.isResponse(r)||ee.isReadableStream(r))return r;if(r&&ee.isString(r)&&(t&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(r)}catch(s){if(i)throw s.name==="SyntaxError"?He.from(s,He.ERR_BAD_RESPONSE,this,null,this.response):s}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mt.classes.FormData,Blob:Mt.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],r=>{Os.headers[r]={}});const Hv=ee.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zv=r=>{const e={};let t,n,i;return r&&r.split(`
82
+ `).forEach(function(s){i=s.indexOf(":"),t=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!t||e[t]&&Hv[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},ih=Symbol("internals");function As(r){return r&&String(r).trim().toLowerCase()}function So(r){return r===!1||r==null?r:ee.isArray(r)?r.map(So):String(r)}function Vv(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}const Wv=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function il(r,e,t,n,i){if(ee.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!ee.isString(e)){if(ee.isString(n))return e.indexOf(n)!==-1;if(ee.isRegExp(n))return n.test(e)}}function Gv(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Yv(r,e){const t=ee.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,s,a){return this[n].call(this,e,i,s,a)},configurable:!0})})}let Jt=class{constructor(r){r&&this.set(r)}set(r,e,t){const n=this;function i(a,u,f){const d=As(u);if(!d)throw new Error("header name must be a non-empty string");const m=ee.findKey(n,d);(!m||n[m]===void 0||f===!0||f===void 0&&n[m]!==!1)&&(n[m||u]=So(a))}const s=(a,u)=>ee.forEach(a,(f,d)=>i(f,d,u));if(ee.isPlainObject(r)||r instanceof this.constructor)s(r,e);else if(ee.isString(r)&&(r=r.trim())&&!Wv(r))s(zv(r),e);else if(ee.isHeaders(r))for(const[a,u]of r.entries())i(u,a,t);else r!=null&&i(e,r,t);return this}get(r,e){if(r=As(r),r){const t=ee.findKey(this,r);if(t){const n=this[t];if(!e)return n;if(e===!0)return Vv(n);if(ee.isFunction(e))return e.call(this,n,t);if(ee.isRegExp(e))return e.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,e){if(r=As(r),r){const t=ee.findKey(this,r);return!!(t&&this[t]!==void 0&&(!e||il(this,this[t],t,e)))}return!1}delete(r,e){const t=this;let n=!1;function i(s){if(s=As(s),s){const a=ee.findKey(t,s);a&&(!e||il(t,t[a],a,e))&&(delete t[a],n=!0)}}return ee.isArray(r)?r.forEach(i):i(r),n}clear(r){const e=Object.keys(this);let t=e.length,n=!1;for(;t--;){const i=e[t];(!r||il(this,this[i],i,r,!0))&&(delete this[i],n=!0)}return n}normalize(r){const e=this,t={};return ee.forEach(this,(n,i)=>{const s=ee.findKey(t,i);if(s){e[s]=So(n),delete e[i];return}const a=r?Gv(i):String(i).trim();a!==i&&delete e[i],e[a]=So(n),t[a]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const e=Object.create(null);return ee.forEach(this,(t,n)=>{t!=null&&t!==!1&&(e[n]=r&&ee.isArray(t)?t.join(", "):t)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,e])=>r+": "+e).join(`
83
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...e){const t=new this(r);return e.forEach(n=>t.set(n)),t}static accessor(r){const e=(this[ih]=this[ih]={accessors:{}}).accessors,t=this.prototype;function n(i){const s=As(i);e[s]||(Yv(t,i),e[s]=!0)}return ee.isArray(r)?r.forEach(n):n(r),this}};Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ee.reduceDescriptors(Jt.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}}),ee.freezeMethods(Jt);function sl(r,e){const t=this||Os,n=e||t,i=Jt.from(n.headers);let s=n.data;return ee.forEach(r,function(a){s=a.call(t,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function sh(r){return!!(r&&r.__CANCEL__)}function Ii(r,e,t){He.call(this,r??"canceled",He.ERR_CANCELED,e,t),this.name="CanceledError"}ee.inherits(Ii,He,{__CANCEL__:!0});function oh(r,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new He("Request failed with status code "+t.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function Jv(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function Zv(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,s=0,a;return e=e!==void 0?e:1e3,function(u){const f=Date.now(),d=n[s];a||(a=f),t[i]=u,n[i]=f;let m=s,w=0;for(;m!==i;)w+=t[m++],m=m%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),f-a<e)return;const y=d&&f-d;return y?Math.round(w*1e3/y):void 0}}function Xv(r,e){let t=0,n=1e3/e,i,s;const a=(u,f=Date.now())=>{t=f,i=null,s&&(clearTimeout(s),s=null),r.apply(null,u)};return[(...u)=>{const f=Date.now(),d=f-t;d>=n?a(u,f):(i=u,s||(s=setTimeout(()=>{s=null,a(i)},n-d)))},()=>i&&a(i)]}const Oo=(r,e,t=3)=>{let n=0;const i=Zv(50,250);return Xv(s=>{const a=s.loaded,u=s.lengthComputable?s.total:void 0,f=a-n,d=i(f),m=a<=u;n=a;const w={loaded:a,total:u,progress:u?a/u:void 0,bytes:f,rate:d||void 0,estimated:d&&u&&m?(u-a)/d:void 0,event:s,lengthComputable:u!=null,[e?"download":"upload"]:!0};r(w)},t)},ah=(r,e)=>{const t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},lh=r=>(...e)=>ee.asap(()=>r(...e)),Qv=Mt.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,Mt.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(Mt.origin),Mt.navigator&&/(msie|trident)/i.test(Mt.navigator.userAgent)):()=>!0,ew=Mt.hasStandardBrowserEnv?{write(r,e,t,n,i,s){const a=[r+"="+encodeURIComponent(e)];ee.isNumber(t)&&a.push("expires="+new Date(t).toGMTString()),ee.isString(n)&&a.push("path="+n),ee.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function tw(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function nw(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function uh(r,e,t){let n=!tw(e);return r&&(n||t==!1)?nw(r,e):e}const ch=r=>r instanceof Jt?{...r}:r;function ni(r,e){e=e||{};const t={};function n(d,m,w,y){return ee.isPlainObject(d)&&ee.isPlainObject(m)?ee.merge.call({caseless:y},d,m):ee.isPlainObject(m)?ee.merge({},m):ee.isArray(m)?m.slice():m}function i(d,m,w,y){if(ee.isUndefined(m)){if(!ee.isUndefined(d))return n(void 0,d,w,y)}else return n(d,m,w,y)}function s(d,m){if(!ee.isUndefined(m))return n(void 0,m)}function a(d,m){if(ee.isUndefined(m)){if(!ee.isUndefined(d))return n(void 0,d)}else return n(void 0,m)}function u(d,m,w){if(w in e)return n(d,m);if(w in r)return n(void 0,d)}const f={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:(d,m,w)=>i(ch(d),ch(m),w,!0)};return ee.forEach(Object.keys(Object.assign({},r,e)),function(d){const m=f[d]||i,w=m(r[d],e[d],d);ee.isUndefined(w)&&m!==u||(t[d]=w)}),t}const fh=r=>{const e=ni({},r);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:u}=e;e.headers=a=Jt.from(a),e.url=eh(uh(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let f;if(ee.isFormData(t)){if(Mt.hasStandardBrowserEnv||Mt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((f=a.getContentType())!==!1){const[d,...m]=f?f.split(";").map(w=>w.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...m].join("; "))}}if(Mt.hasStandardBrowserEnv&&(n&&ee.isFunction(n)&&(n=n(e)),n||n!==!1&&Qv(e.url))){const d=i&&s&&ew.read(s);d&&a.set(i,d)}return e},rw=typeof XMLHttpRequest<"u",iw=rw&&function(r){return new Promise(function(e,t){const n=fh(r);let i=n.data;const s=Jt.from(n.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:f}=n,d,m,w,y,x;function A(){y&&y(),x&&x(),n.cancelToken&&n.cancelToken.unsubscribe(d),n.signal&&n.signal.removeEventListener("abort",d)}let E=new XMLHttpRequest;E.open(n.method.toUpperCase(),n.url,!0),E.timeout=n.timeout;function N(){if(!E)return;const Y=Jt.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),Q={data:!a||a==="text"||a==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:Y,config:r,request:E};oh(function(he){e(he),A()},function(he){t(he),A()},Q),E=null}"onloadend"in E?E.onloadend=N:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(N)},E.onabort=function(){E&&(t(new He("Request aborted",He.ECONNABORTED,r,E)),E=null)},E.onerror=function(){t(new He("Network Error",He.ERR_NETWORK,r,E)),E=null},E.ontimeout=function(){let Y=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const Q=n.transitional||nh;n.timeoutErrorMessage&&(Y=n.timeoutErrorMessage),t(new He(Y,Q.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,r,E)),E=null},i===void 0&&s.setContentType(null),"setRequestHeader"in E&&ee.forEach(s.toJSON(),function(Y,Q){E.setRequestHeader(Q,Y)}),ee.isUndefined(n.withCredentials)||(E.withCredentials=!!n.withCredentials),a&&a!=="json"&&(E.responseType=n.responseType),f&&([w,x]=Oo(f,!0),E.addEventListener("progress",w)),u&&E.upload&&([m,y]=Oo(u),E.upload.addEventListener("progress",m),E.upload.addEventListener("loadend",y)),(n.cancelToken||n.signal)&&(d=Y=>{E&&(t(!Y||Y.type?new Ii(null,r,E):Y),E.abort(),E=null)},n.cancelToken&&n.cancelToken.subscribe(d),n.signal&&(n.signal.aborted?d():n.signal.addEventListener("abort",d)));const D=Jv(n.url);if(D&&Mt.protocols.indexOf(D)===-1){t(new He("Unsupported protocol "+D+":",He.ERR_BAD_REQUEST,r));return}E.send(i||null)})},sw=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,i;const s=function(d){if(!i){i=!0,u();const m=d instanceof Error?d:this.reason;n.abort(m instanceof He?m:new Ii(m instanceof Error?m.message:m))}};let a=e&&setTimeout(()=>{a=null,s(new He(`timeout ${e} of ms exceeded`,He.ETIMEDOUT))},e);const u=()=>{r&&(a&&clearTimeout(a),a=null,r.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),r=null)};r.forEach(d=>d.addEventListener("abort",s));const{signal:f}=n;return f.unsubscribe=()=>ee.asap(u),f}},ow=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let n=0,i;for(;n<t;)i=n+e,yield r.slice(n,i),n=i},aw=async function*(r,e){for await(const t of lw(r))yield*ow(t,e)},lw=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},hh=(r,e,t,n)=>{const i=aw(r,e);let s=0,a,u=f=>{a||(a=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:d,value:m}=await i.next();if(d){u(),f.close();return}let w=m.byteLength;if(t){let y=s+=w;t(y)}f.enqueue(new Uint8Array(m))}catch(d){throw u(d),d}},cancel(f){return u(f),i.return()}},{highWaterMark:2})},Ao=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",dh=Ao&&typeof ReadableStream=="function",uw=Ao&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),ph=(r,...e)=>{try{return!!r(...e)}catch{return!1}},cw=dh&&ph(()=>{let r=!1;const e=new Request(Mt.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),gh=64*1024,ol=dh&&ph(()=>ee.isReadableStream(new Response("").body)),To={stream:ol&&(r=>r.body)};Ao&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!To[e]&&(To[e]=ee.isFunction(r[e])?t=>t[e]():(t,n)=>{throw new He(`Response type '${e}' is not supported`,He.ERR_NOT_SUPPORT,n)})})})(new Response);const fw=async r=>{if(r==null)return 0;if(ee.isBlob(r))return r.size;if(ee.isSpecCompliantForm(r))return(await new Request(Mt.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(ee.isArrayBufferView(r)||ee.isArrayBuffer(r))return r.byteLength;if(ee.isURLSearchParams(r)&&(r=r+""),ee.isString(r))return(await uw(r)).byteLength},hw=async(r,e)=>ee.toFiniteNumber(r.getContentLength())??fw(e),dw=Ao&&(async r=>{let{url:e,method:t,data:n,signal:i,cancelToken:s,timeout:a,onDownloadProgress:u,onUploadProgress:f,responseType:d,headers:m,withCredentials:w="same-origin",fetchOptions:y}=fh(r);d=d?(d+"").toLowerCase():"text";let x=sw([i,s&&s.toAbortSignal()],a),A;const E=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let N;try{if(f&&cw&&t!=="get"&&t!=="head"&&(N=await hw(m,n))!==0){let oe=new Request(e,{method:"POST",body:n,duplex:"half"}),ue;if(ee.isFormData(n)&&(ue=oe.headers.get("content-type"))&&m.setContentType(ue),oe.body){const[ne,re]=ah(N,Oo(lh(f)));n=hh(oe.body,gh,ne,re)}}ee.isString(w)||(w=w?"include":"omit");const D="credentials"in Request.prototype;A=new Request(e,{...y,signal:x,method:t.toUpperCase(),headers:m.normalize().toJSON(),body:n,duplex:"half",credentials:D?w:void 0});let Y=await fetch(A);const Q=ol&&(d==="stream"||d==="response");if(ol&&(u||Q&&E)){const oe={};["status","statusText","headers"].forEach(ve=>{oe[ve]=Y[ve]});const ue=ee.toFiniteNumber(Y.headers.get("content-length")),[ne,re]=u&&ah(ue,Oo(lh(u),!0))||[];Y=new Response(hh(Y.body,gh,ne,()=>{re&&re(),E&&E()}),oe)}d=d||"text";let he=await To[ee.findKey(To,d)||"text"](Y,r);return!Q&&E&&E(),await new Promise((oe,ue)=>{oh(oe,ue,{data:he,headers:Jt.from(Y.headers),status:Y.status,statusText:Y.statusText,config:r,request:A})})}catch(D){throw E&&E(),D&&D.name==="TypeError"&&/fetch/i.test(D.message)?Object.assign(new He("Network Error",He.ERR_NETWORK,r,A),{cause:D.cause||D}):He.from(D,D&&D.code,r,A)}}),al={http:Nv,xhr:iw,fetch:dw};ee.forEach(al,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const mh=r=>`- ${r}`,pw=r=>ee.isFunction(r)||r===null||r===!1,yh={getAdapter:r=>{r=ee.isArray(r)?r:[r];const{length:e}=r;let t,n;const i={};for(let s=0;s<e;s++){t=r[s];let a;if(n=t,!pw(t)&&(n=al[(a=String(t)).toLowerCase()],n===void 0))throw new He(`Unknown adapter '${a}'`);if(n)break;i[a||"#"+s]=n}if(!n){const s=Object.entries(i).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
84
+ `+s.map(mh).join(`
85
+ `):" "+mh(s[0]):"as no adapter specified";throw new He("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:al};function ll(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Ii(null,r)}function bh(r){return ll(r),r.headers=Jt.from(r.headers),r.data=sl.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),yh.getAdapter(r.adapter||Os.adapter)(r).then(function(e){return ll(r),e.data=sl.call(r,r.transformResponse,e),e.headers=Jt.from(e.headers),e},function(e){return sh(e)||(ll(r),e&&e.response&&(e.response.data=sl.call(r,r.transformResponse,e.response),e.response.headers=Jt.from(e.response.headers))),Promise.reject(e)})}const vh="1.8.4",_o={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{_o[r]=function(t){return typeof t===r||"a"+(e<1?"n ":" ")+r}});const wh={};_o.transitional=function(r,e,t){function n(i,s){return"[Axios v"+vh+"] Transitional option '"+i+"'"+s+(t?". "+t:"")}return(i,s,a)=>{if(r===!1)throw new He(n(s," has been removed"+(e?" in "+e:"")),He.ERR_DEPRECATED);return e&&!wh[s]&&(wh[s]=!0,console.warn(n(s," has been deprecated since v"+e+" and will be removed in the near future"))),r?r(i,s,a):!0}},_o.spelling=function(r){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${r}`),!0)};function gw(r,e,t){if(typeof r!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const s=n[i],a=e[s];if(a){const u=r[s],f=u===void 0||a(u,s,r);if(f!==!0)throw new He("option "+s+" must be "+f,He.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new He("Unknown option "+s,He.ERR_BAD_OPTION)}}const No={assertOptions:gw,validators:_o},Xn=No.validators;let ri=class{constructor(r){this.defaults=r,this.interceptors={request:new th,response:new th}}async request(r,e){try{return await this._request(r,e)}catch(t){if(t instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const i=n.stack?n.stack.replace(/^.+\n/,""):"";try{t.stack?i&&!String(t.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(t.stack+=`
86
+ `+i):t.stack=i}catch{}}throw t}}_request(r,e){typeof r=="string"?(e=e||{},e.url=r):e=r||{},e=ni(this.defaults,e);const{transitional:t,paramsSerializer:n,headers:i}=e;t!==void 0&&No.assertOptions(t,{silentJSONParsing:Xn.transitional(Xn.boolean),forcedJSONParsing:Xn.transitional(Xn.boolean),clarifyTimeoutError:Xn.transitional(Xn.boolean)},!1),n!=null&&(ee.isFunction(n)?e.paramsSerializer={serialize:n}:No.assertOptions(n,{encode:Xn.function,serialize:Xn.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),No.assertOptions(e,{baseUrl:Xn.spelling("baseURL"),withXsrfToken:Xn.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=i&&ee.merge(i.common,i[e.method]);i&&ee.forEach(["delete","get","head","post","put","patch","common"],x=>{delete i[x]}),e.headers=Jt.concat(s,i);const a=[];let u=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(e)===!1||(u=u&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});const f=[];this.interceptors.response.forEach(function(x){f.push(x.fulfilled,x.rejected)});let d,m=0,w;if(!u){const x=[bh.bind(this),void 0];for(x.unshift.apply(x,a),x.push.apply(x,f),w=x.length,d=Promise.resolve(e);m<w;)d=d.then(x[m++],x[m++]);return d}w=a.length;let y=e;for(m=0;m<w;){const x=a[m++],A=a[m++];try{y=x(y)}catch(E){A.call(this,E);break}}try{d=bh.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,w=f.length;m<w;)d=d.then(f[m++],f[m++]);return d}getUri(r){r=ni(this.defaults,r);const e=uh(r.baseURL,r.url,r.allowAbsoluteUrls);return eh(e,r.params,r.paramsSerializer)}};ee.forEach(["delete","get","head","options"],function(r){ri.prototype[r]=function(e,t){return this.request(ni(t||{},{method:r,url:e,data:(t||{}).data}))}}),ee.forEach(["post","put","patch"],function(r){function e(t){return function(n,i,s){return this.request(ni(s||{},{method:r,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}ri.prototype[r]=e(),ri.prototype[r+"Form"]=e(!0)});let mw=class Dh{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(u=>{n.subscribe(u),s=u}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},e(function(i,s,a){n.reason||(n.reason=new Ii(i,s,a),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=n=>{e.abort(n)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Dh(function(t){e=t}),cancel:e}}};function yw(r){return function(e){return r.apply(null,e)}}function bw(r){return ee.isObject(r)&&r.isAxiosError===!0}const ul={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ul).forEach(([r,e])=>{ul[e]=r});function xh(r){const e=new ri(r),t=Bf(ri.prototype.request,e);return ee.extend(t,ri.prototype,e,{allOwnKeys:!0}),ee.extend(t,e,null,{allOwnKeys:!0}),t.create=function(n){return xh(ni(r,n))},t}const vt=xh(Os);vt.Axios=ri,vt.CanceledError=Ii,vt.CancelToken=mw,vt.isCancel=sh,vt.VERSION=vh,vt.toFormData=Eo,vt.AxiosError=He,vt.Cancel=vt.CanceledError,vt.all=function(r){return Promise.all(r)},vt.spread=yw,vt.isAxiosError=bw,vt.mergeConfig=ni,vt.AxiosHeaders=Jt,vt.formToJSON=r=>rh(ee.isHTMLForm(r)?new FormData(r):r),vt.getAdapter=yh.getAdapter,vt.HttpStatusCode=ul,vt.default=vt;const{Axios:Tx,AxiosError:_x,CanceledError:Nx,isCancel:Cx,CancelToken:Lx,VERSION:kx,all:Rx,Cancel:Px,isAxiosError:qx,spread:jx,toFormData:Ix,AxiosHeaders:$x,HttpStatusCode:Mx,formToJSON:Dx,getAdapter:Bx,mergeConfig:Ux}=vt;class Eh{constructor(e){Of(this,"storage"),this.storage=e}getRaw(e,t=null){var n;return((n=this.storage)==null?void 0:n.getItem(e))??t}setRaw(e,t){var n;(n=this.storage)==null||n.setItem(e,t)}get(e,t=null){const n=this.getRaw(e);return n?K0(n):t}set(e,t){this.setRaw(e,F0(t))}del(e){var t;(t=this.storage)==null||t.removeItem(e)}clear(){var e;(e=this.storage)==null||e.clear()}}const vw=typeof localStorage>"u"?void 0:localStorage,ww=typeof sessionStorage>"u"?void 0:sessionStorage,xw=new Eh(vw),Ew=new Eh(ww),Sw=Object.freeze(Object.defineProperty({__proto__:null,local:xw,session:Ew},Symbol.toStringTag,{value:"Module"}));vt.create({baseURL:"",timeout:3e3});const Sh="i18nextLng",cl="zh";$t.use(mf).use(Sf).init({lng:Sw.local.getRaw(Sh,cl),fallbackLng:cl,backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},interpolation:{escapeValue:!1}});const Ow=Object.freeze(Object.defineProperty({__proto__:null,KEY:Sh,LNG_ZH:cl,changeLanguage:I1,createInstance:L1,dir:k1,exists:D1,getFixedT:$1,hasLoadedNamespace:U1,init:R1,loadLanguages:K1,loadNamespaces:F1,loadResources:P1,reloadResources:q1,setDefaultNamespace:B1,t:M1,use:j1},Symbol.toStringTag,{value:"Module"}));var Co={exports:{}},Oh;function Aw(){return Oh||(Oh=1,function(r,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof zn<"u"&&zn,n=function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s}();(function(s){(function(a){var u=typeof s<"u"&&s||typeof self<"u"&&self||typeof u<"u"&&u,f={searchParams:"URLSearchParams"in u,iterable:"Symbol"in u&&"iterator"in Symbol,blob:"FileReader"in u&&"Blob"in u&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in u,arrayBuffer:"ArrayBuffer"in u};function d(S){return S&&DataView.prototype.isPrototypeOf(S)}if(f.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],w=ArrayBuffer.isView||function(S){return S&&m.indexOf(Object.prototype.toString.call(S))>-1};function y(S){if(typeof S!="string"&&(S=String(S)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(S)||S==="")throw new TypeError('Invalid character in header field name: "'+S+'"');return S.toLowerCase()}function x(S){return typeof S!="string"&&(S=String(S)),S}function A(S){var T={next:function(){var $=S.shift();return{done:$===void 0,value:$}}};return f.iterable&&(T[Symbol.iterator]=function(){return T}),T}function E(S){this.map={},S instanceof E?S.forEach(function(T,$){this.append($,T)},this):Array.isArray(S)?S.forEach(function(T){this.append(T[0],T[1])},this):S&&Object.getOwnPropertyNames(S).forEach(function(T){this.append(T,S[T])},this)}E.prototype.append=function(S,T){S=y(S),T=x(T);var $=this.map[S];this.map[S]=$?$+", "+T:T},E.prototype.delete=function(S){delete this.map[y(S)]},E.prototype.get=function(S){return S=y(S),this.has(S)?this.map[S]:null},E.prototype.has=function(S){return this.map.hasOwnProperty(y(S))},E.prototype.set=function(S,T){this.map[y(S)]=x(T)},E.prototype.forEach=function(S,T){for(var $ in this.map)this.map.hasOwnProperty($)&&S.call(T,this.map[$],$,this)},E.prototype.keys=function(){var S=[];return this.forEach(function(T,$){S.push($)}),A(S)},E.prototype.values=function(){var S=[];return this.forEach(function(T){S.push(T)}),A(S)},E.prototype.entries=function(){var S=[];return this.forEach(function(T,$){S.push([$,T])}),A(S)},f.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function N(S){if(S.bodyUsed)return Promise.reject(new TypeError("Already read"));S.bodyUsed=!0}function D(S){return new Promise(function(T,$){S.onload=function(){T(S.result)},S.onerror=function(){$(S.error)}})}function Y(S){var T=new FileReader,$=D(T);return T.readAsArrayBuffer(S),$}function Q(S){var T=new FileReader,$=D(T);return T.readAsText(S),$}function he(S){for(var T=new Uint8Array(S),$=new Array(T.length),U=0;U<T.length;U++)$[U]=String.fromCharCode(T[U]);return $.join("")}function oe(S){if(S.slice)return S.slice(0);var T=new Uint8Array(S.byteLength);return T.set(new Uint8Array(S)),T.buffer}function ue(){return this.bodyUsed=!1,this._initBody=function(S){this.bodyUsed=this.bodyUsed,this._bodyInit=S,S?typeof S=="string"?this._bodyText=S:f.blob&&Blob.prototype.isPrototypeOf(S)?this._bodyBlob=S:f.formData&&FormData.prototype.isPrototypeOf(S)?this._bodyFormData=S:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(S)?this._bodyText=S.toString():f.arrayBuffer&&f.blob&&d(S)?(this._bodyArrayBuffer=oe(S.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(S)||w(S))?this._bodyArrayBuffer=oe(S):this._bodyText=S=Object.prototype.toString.call(S):this._bodyText="",this.headers.get("content-type")||(typeof S=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f.searchParams&&URLSearchParams.prototype.isPrototypeOf(S)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var S=N(this);if(S)return S;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var S=N(this);return S||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(Y)}),this.text=function(){var S=N(this);if(S)return S;if(this._bodyBlob)return Q(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(he(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},f.formData&&(this.formData=function(){return this.text().then(Ee)}),this.json=function(){return this.text().then(JSON.parse)},this}var ne=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function re(S){var T=S.toUpperCase();return ne.indexOf(T)>-1?T:S}function ve(S,T){if(!(this instanceof ve))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');T=T||{};var $=T.body;if(S instanceof ve){if(S.bodyUsed)throw new TypeError("Already read");this.url=S.url,this.credentials=S.credentials,T.headers||(this.headers=new E(S.headers)),this.method=S.method,this.mode=S.mode,this.signal=S.signal,!$&&S._bodyInit!=null&&($=S._bodyInit,S.bodyUsed=!0)}else this.url=String(S);if(this.credentials=T.credentials||this.credentials||"same-origin",(T.headers||!this.headers)&&(this.headers=new E(T.headers)),this.method=re(T.method||this.method||"GET"),this.mode=T.mode||this.mode||null,this.signal=T.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&$)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody($),(this.method==="GET"||this.method==="HEAD")&&(T.cache==="no-store"||T.cache==="no-cache")){var U=/([?&])_=[^&]*/;if(U.test(this.url))this.url=this.url.replace(U,"$1_="+new Date().getTime());else{var J=/\?/;this.url+=(J.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}ve.prototype.clone=function(){return new ve(this,{body:this._bodyInit})};function Ee(S){var T=new FormData;return S.trim().split("&").forEach(function($){if($){var U=$.split("="),J=U.shift().replace(/\+/g," "),K=U.join("=").replace(/\+/g," ");T.append(decodeURIComponent(J),decodeURIComponent(K))}}),T}function O(S){var T=new E,$=S.replace(/\r?\n[\t ]+/g," ");return $.split("\r").map(function(U){return U.indexOf(`
87
+ `)===0?U.substr(1,U.length):U}).forEach(function(U){var J=U.split(":"),K=J.shift().trim();if(K){var ae=J.join(":").trim();T.append(K,ae)}}),T}ue.call(ve.prototype);function W(S,T){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');T||(T={}),this.type="default",this.status=T.status===void 0?200:T.status,this.ok=this.status>=200&&this.status<300,this.statusText=T.statusText===void 0?"":""+T.statusText,this.headers=new E(T.headers),this.url=T.url||"",this._initBody(S)}ue.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},W.error=function(){var S=new W(null,{status:0,statusText:""});return S.type="error",S};var R=[301,302,303,307,308];W.redirect=function(S,T){if(R.indexOf(T)===-1)throw new RangeError("Invalid status code");return new W(null,{status:T,headers:{location:S}})},a.DOMException=u.DOMException;try{new a.DOMException}catch{a.DOMException=function(T,$){this.message=T,this.name=$;var U=Error(T);this.stack=U.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function V(S,T){return new Promise(function($,U){var J=new ve(S,T);if(J.signal&&J.signal.aborted)return U(new a.DOMException("Aborted","AbortError"));var K=new XMLHttpRequest;function ae(){K.abort()}K.onload=function(){var de={status:K.status,statusText:K.statusText,headers:O(K.getAllResponseHeaders()||"")};de.url="responseURL"in K?K.responseURL:de.headers.get("X-Request-URL");var Ne="response"in K?K.response:K.responseText;setTimeout(function(){$(new W(Ne,de))},0)},K.onerror=function(){setTimeout(function(){U(new TypeError("Network request failed"))},0)},K.ontimeout=function(){setTimeout(function(){U(new TypeError("Network request failed"))},0)},K.onabort=function(){setTimeout(function(){U(new a.DOMException("Aborted","AbortError"))},0)};function pe(de){try{return de===""&&u.location.href?u.location.href:de}catch{return de}}K.open(J.method,pe(J.url),!0),J.credentials==="include"?K.withCredentials=!0:J.credentials==="omit"&&(K.withCredentials=!1),"responseType"in K&&(f.blob?K.responseType="blob":f.arrayBuffer&&J.headers.get("Content-Type")&&J.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(K.responseType="arraybuffer")),T&&typeof T.headers=="object"&&!(T.headers instanceof E)?Object.getOwnPropertyNames(T.headers).forEach(function(de){K.setRequestHeader(de,x(T.headers[de]))}):J.headers.forEach(function(de,Ne){K.setRequestHeader(Ne,de)}),J.signal&&(J.signal.addEventListener("abort",ae),K.onreadystatechange=function(){K.readyState===4&&J.signal.removeEventListener("abort",ae)}),K.send(typeof J._bodyInit>"u"?null:J._bodyInit)})}return V.polyfill=!0,u.fetch||(u.fetch=V,u.Headers=E,u.Request=ve,u.Response=W),a.Headers=E,a.Request=ve,a.Response=W,a.fetch=V,a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=t.fetch?t:n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,r.exports=e}(Co,Co.exports)),Co.exports}var Ah=Aw();const Tw=Bh({__proto__:null,default:$o(Ah)},[Ah]);tt.Editor=$c,tt.Form=zc,tt.Provider=Ma,tt.Table=f1,tt.Upload=Hc,tt.i18n=Ow,Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"})});