var jS=Object.defineProperty;var BS=(e,t,n)=>t in e?jS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Bh=(e,t,n)=>(BS(e,typeof t!="symbol"?t+"":t,n),n);function sg(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerpolicy&&(i.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?i.credentials="include":o.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var ls=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zS(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var o=[null];o.push.apply(o,arguments);var i=Function.bind.apply(t,o);return new i}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Li={},VS={get exports(){return Li},set exports(e){Li=e}},El={},L={},WS={get exports(){return L},set exports(e){L=e}},fe={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var sa=Symbol.for("react.element"),HS=Symbol.for("react.portal"),qS=Symbol.for("react.fragment"),KS=Symbol.for("react.strict_mode"),QS=Symbol.for("react.profiler"),GS=Symbol.for("react.provider"),XS=Symbol.for("react.context"),YS=Symbol.for("react.forward_ref"),JS=Symbol.for("react.suspense"),ZS=Symbol.for("react.memo"),e_=Symbol.for("react.lazy"),zh=Symbol.iterator;function t_(e){return e===null||typeof e!="object"?null:(e=zh&&e[zh]||e["@@iterator"],typeof e=="function"?e:null)}var lg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ug=Object.assign,cg={};function Lo(e,t,n){this.props=e,this.context=t,this.refs=cg,this.updater=n||lg}Lo.prototype.isReactComponent={};Lo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Lo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fg(){}fg.prototype=Lo.prototype;function Qf(e,t,n){this.props=e,this.context=t,this.refs=cg,this.updater=n||lg}var Gf=Qf.prototype=new fg;Gf.constructor=Qf;ug(Gf,Lo.prototype);Gf.isPureReactComponent=!0;var Vh=Array.isArray,dg=Object.prototype.hasOwnProperty,Xf={current:null},hg={key:!0,ref:!0,__self:!0,__source:!0};function pg(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)dg.call(t,r)&&!hg.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1{if(i=h_(i,r),i in Hh)return;Hh[i]=!0;const a=i.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!r)for(let c=o.length-1;c>=0;c--){const f=o[c];if(f.href===i&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":d_,a||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),a)return new Promise((c,f)=>{u.addEventListener("load",c),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())};function Ht(e){return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(e)}function At(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p_(e,t){if(Ht(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ht(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mg(e){var t=p_(e,"string");return Ht(t)==="symbol"?t:String(t)}function qh(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{};At(this,e),this.init(t,n)}return It(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||g_,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o1?r-1:0),i=1;i-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var i=typeof t!="string"?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return o()?{}:{obj:e,k:r(i.shift())}}function Yh(e,t,n){var r=Jf(e,t,Object),o=r.obj,i=r.k;o[i]=n}function S_(e,t,n,r){var o=Jf(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}function ks(e,t){var n=Jf(e,t),r=n.obj,o=n.k;if(r)return r[o]}function Jh(e,t,n){var r=ks(e,n);return r!==void 0?r:ks(t,n)}function Sg(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):Sg(e[r],t[r],n):e[r]=t[r]);return e}function Vr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var __={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function b_(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return __[t]}):e}var Rl=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,E_=[" ",",","?","!",";"];function C_(e,t,n){t=t||"",n=n||"";var r=E_.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var o=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}function Zh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ta(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _g(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;ii+a;)a++,s=r.slice(i,i+a).join(n),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=r.slice(i+a).join(n);return u?_g(l,u,n):void 0}o=o[r[i]]}return o}}var x_=function(e){Cl(n,e);var t=R_(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return At(this,n),o=t.call(this),Rl&&Zn.call(zn(o)),o.data=r||{},o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return It(n,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var i=this.options.ns.indexOf(o);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[o,i];a&&typeof a!="string"&&(c=c.concat(a)),a&&typeof a=="string"&&(c=c.concat(l?a.split(l):a)),o.indexOf(".")>-1&&(c=o.split("."));var f=ks(this.data,c);return f||!u||typeof a!="string"?f:_g(this.data&&this.data[o]&&this.data[o][i],a,l)}},{key:"addResource",value:function(o,i,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var c=[o,i];a&&(c=c.concat(u?a.split(u):a)),o.indexOf(".")>-1&&(c=o.split("."),s=i,i=c[1]),this.addNamespaces(i),Yh(this.data,c,s),l.silent||this.emit("added",o,i,a,s)}},{key:"addResources",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(o,i,l,a[l],{silent:!0});s.silent||this.emit("added",o,i,a)}},{key:"addResourceBundle",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[o,i];o.indexOf(".")>-1&&(c=o.split("."),s=a,a=i,i=c[1]),this.addNamespaces(i);var f=ks(this.data,c)||{};s?Sg(f,a,l):f=Ta(Ta({},f),a),Yh(this.data,c,f),u.silent||this.emit("added",o,i,a)}},{key:"removeResourceBundle",value:function(o,i){this.hasResourceBundle(o,i)&&delete this.data[o][i],this.removeNamespaces(i),this.emit("removed",o,i)}},{key:"hasResourceBundle",value:function(o,i){return this.getResource(o,i)!==void 0}},{key:"getResourceBundle",value:function(o,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Ta(Ta({},{}),this.getResource(o,i)):this.getResource(o,i)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var i=this.getDataByLanguage(o),a=i&&Object.keys(i)||[];return!!a.find(function(s){return i[s]&&Object.keys(i[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Zn),bg={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,o,i){var a=this;return t.forEach(function(s){a.processors[s]&&(n=a.processors[s].process(n,r,o,i))}),n}};function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var tp={},np=function(e){Cl(n,e);var t=k_(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return At(this,n),o=t.call(this),Rl&&Zn.call(zn(o)),w_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,zn(o)),o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=rn.create("translator"),o}return It(n,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var a=this.resolve(o,i);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(o,i){var a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ns||this.options.defaultNS||[],u=a&&o.indexOf(a)>-1,c=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!C_(o,a,s);if(u&&!c){var f=o.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:o,namespaces:l};var d=o.split(a);(a!==s||a===s&&this.options.ns.indexOf(d[0])>-1)&&(l=d.shift()),o=d.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,i,a){var s=this;if(Ht(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,c=this.extractFromKey(o[o.length-1],i),f=c.key,d=c.namespaces,p=d[d.length-1],v=i.lng||this.language,y=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(y){var _=i.nsSeparator||this.options.nsSeparator;return l?(m.res="".concat(p).concat(_).concat(f),m):"".concat(p).concat(_).concat(f)}return l?(m.res=f,m):f}var m=this.resolve(o,i),h=m&&m.res,g=m&&m.usedKey||f,S=m&&m.exactUsedKey||f,k=Object.prototype.toString.apply(h),T=["[object Number]","[object Function]","[object RegExp]"],N=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,G=typeof h!="string"&&typeof h!="boolean"&&typeof h!="number";if(I&&h&&G&&T.indexOf(k)<0&&!(typeof N=="string"&&k==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var $=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,Je(Je({},i),{},{ns:d})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(m.res=$,m):$}if(u){var X=k==="[object Array]",ce=X?[]:{},re=X?S:g;for(var w in h)if(Object.prototype.hasOwnProperty.call(h,w)){var P="".concat(re).concat(u).concat(w);ce[w]=this.translate(P,Je(Je({},i),{joinArrays:!1,ns:d})),ce[w]===P&&(ce[w]=h[w])}h=ce}}else if(I&&typeof N=="string"&&k==="[object Array]")h=h.join(N),h&&(h=this.extendTranslation(h,o,i,a));else{var M=!1,C=!1,O=i.count!==void 0&&typeof i.count!="string",A=n.hasDefaultValue(i),D=O?this.pluralResolver.getSuffix(v,i.count,i):"",z=i["defaultValue".concat(D)]||i.defaultValue;!this.isValidLookup(h)&&A&&(M=!0,h=z),this.isValidLookup(h)||(C=!0,h=f);var b=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,U=b&&C?void 0:h,B=A&&z!==h&&this.options.updateMissing;if(C||M||B){if(this.logger.log(B?"updateKey":"missingKey",v,p,f,B?z:h),u){var J=this.resolve(f,Je(Je({},i),{},{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.")}var W=[],Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(var ae=0;ae1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,c,f;return typeof o=="string"&&(o=[o]),o.forEach(function(d){if(!i.isValidLookup(s)){var p=i.extractFromKey(d,a),v=p.key;l=v;var y=p.namespaces;i.options.fallbackNS&&(y=y.concat(i.options.fallbackNS));var _=a.count!==void 0&&typeof a.count!="string",m=_&&!a.ordinal&&a.count===0&&i.pluralResolver.shouldUseIntlApi(),h=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",g=a.lngs?a.lngs:i.languageUtils.toResolveHierarchy(a.lng||i.language,a.fallbackLng);y.forEach(function(S){i.isValidLookup(s)||(f=S,!tp["".concat(g[0],"-").concat(S)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(f)&&(tp["".concat(g[0],"-").concat(S)]=!0,i.logger.warn('key "'.concat(l,'" for languages "').concat(g.join(", "),`" won't get resolved as namespace "`).concat(f,'" 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!!!")),g.forEach(function(k){if(!i.isValidLookup(s)){c=k;var T=[v];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(T,v,k,S,a);else{var N;_&&(N=i.pluralResolver.getSuffix(k,a.count,a));var I="".concat(i.options.pluralSeparator,"zero");if(_&&(T.push(v+N),m&&T.push(v+I)),h){var G="".concat(v).concat(i.options.contextSeparator).concat(a.context);T.push(G),_&&(T.push(G+N),m&&T.push(G+I))}}for(var $;$=T.pop();)i.isValidLookup(s)||(u=$,s=i.getResource(k,S,$,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:c,usedNS:f}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,i,a,s):this.resourceStore.getResource(o,i,a,s)}}],[{key:"hasDefaultValue",value:function(o){var i="defaultValue";for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)&&i===a.substring(0,i.length)&&o[a]!==void 0)return!0;return!1}}]),n}(Zn);function vu(e){return e.charAt(0).toUpperCase()+e.slice(1)}var rp=function(){function e(t){At(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=rn.create("languageUtils")}return It(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=n.split("-");return this.options.lowerCaseLng?o=o.map(function(i){return i.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=vu(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=vu(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=vu(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var o;return n.forEach(function(i){if(!o){var a=r.formatLanguageCode(i);(!r.options.supportedLngs||r.isSupportedCode(a))&&(o=a)}}),!o&&this.options.supportedLngs&&n.forEach(function(i){if(!o){var a=r.getLanguagePartFromCode(i);if(r.isSupportedCode(a))return o=a;o=r.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}},{key:"toResolveHierarchy",value:function(n,r){var o=this,i=this.getFallbackCodes(r||this.options.fallbackLng||[],n),a=[],s=function(u){u&&(o.isSupportedCode(u)?a.push(u):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),i.forEach(function(l){a.indexOf(l)<0&&s(o.formatLanguageCode(l))}),a}}]),e}(),T_=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],L_={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},N_=["v1","v2","v3"],op={zero:0,one:1,two:2,few:3,many:4,other:5};function A_(){var e={};return T_.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:L_[t.fc]}})}),e}var I_=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};At(this,e),this.languageUtils=t,this.options=n,this.logger=rn.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=A_()}return It(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map(function(i){return"".concat(r).concat(i)})}},{key:"getSuffixes",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,o);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort(function(a,s){return op[a]-op[s]}).map(function(a){return"".concat(r.options.prepend).concat(a)}):i.numbers.map(function(a){return r.getSuffix(n,a,o)}):[]}},{key:"getSuffix",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(n,o);return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(r)):this.getSuffixRetroCompatible(i,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var o=this,i=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),a=n.numbers[i];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return o.options.prepend&&a.toString()?o.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}},{key:"shouldUseIntlApi",value:function(){return!N_.includes(this.options.compatibilityJSON)}}]),e}();function ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};At(this,e),this.logger=rn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return It(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:b_,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Vr(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Vr(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Vr(r.nestingPrefix):r.nestingPrefixEscaped||Vr("$t("),this.nestingSuffix=r.nestingSuffix?Vr(r.nestingSuffix):r.nestingSuffixEscaped||Vr(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(n,r,o,i){var a=this,s,l,u,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(_){return _.replace(/\$/g,"$$$$")}var d=function(m){if(m.indexOf(a.formatSeparator)<0){var h=Jh(r,c,m);return a.alwaysFormat?a.format(h,void 0,o,Dt(Dt(Dt({},i),r),{},{interpolationkey:m})):h}var g=m.split(a.formatSeparator),S=g.shift().trim(),k=g.join(a.formatSeparator).trim();return a.format(Jh(r,c,S),k,o,Dt(Dt(Dt({},i),r),{},{interpolationkey:S}))};this.resetRegExp();var p=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,v=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,y=[{regex:this.regexpUnescape,safeValue:function(m){return f(m)}},{regex:this.regexp,safeValue:function(m){return a.escapeValue?f(a.escape(m)):f(m)}}];return y.forEach(function(_){for(u=0;s=_.regex.exec(n);){var m=s[1].trim();if(l=d(m),l===void 0)if(typeof p=="function"){var h=p(n,s,i);l=typeof h=="string"?h:""}else if(i&&i.hasOwnProperty(m))l="";else if(v){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(n)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=Xh(l));var g=_.safeValue(l);if(n=n.replace(s[0],g),v?(_.regex.lastIndex+=l.length,_.regex.lastIndex-=s[0].length):_.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l;function u(p,v){var y=this.nestingOptionsSeparator;if(p.indexOf(y)<0)return p;var _=p.split(new RegExp("".concat(y,"[ ]*{"))),m="{".concat(_[1]);p=_[0],m=this.interpolate(m,l);var h=m.match(/'/g),g=m.match(/"/g);(h&&h.length%2===0&&!g||g.length%2!==0)&&(m=m.replace(/'/g,'"'));try{l=JSON.parse(m),v&&(l=Dt(Dt({},v),l))}catch(S){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),S),"".concat(p).concat(y).concat(m)}return delete l.defaultValue,p}for(;a=this.nestingRegexp.exec(n);){var c=[];l=Dt({},i),l=l.replace&&typeof l.replace!="string"?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;var f=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var d=a[1].split(this.formatSeparator).map(function(p){return p.trim()});a[1]=d.shift(),c=d,f=!0}if(s=r(u.call(this,a[1].trim(),l),l),s&&a[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=Xh(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(n)),s=""),f&&(s=c.reduce(function(p,v){return o.format(p,v,i.lng,Dt(Dt({},i),{},{interpolationkey:a[1].trim()}))},s.trim())),n=n.replace(a[0],s),this.regexp.lastIndex=0}return n}}]),e}();function ap(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if(t==="currency"&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{var i=o.split(";");i.forEach(function(a){if(a){var s=a.split(":"),l=m_(s),u=l[0],c=l.slice(1),f=c.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=f),f==="false"&&(n[u.trim()]=!1),f==="true"&&(n[u.trim()]=!0),isNaN(f)||(n[u.trim()]=parseInt(f,10))}})}}return{formatName:t,formatOptions:n}}function Wr(e){var t={};return function(r,o,i){var a=o+JSON.stringify(i),s=t[a];return s||(s=e(o,i),t[a]=s),s(r)}}var $_=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};At(this,e),this.logger=rn.create("formatter"),this.options=t,this.formats={number:Wr(function(n,r){var o=new Intl.NumberFormat(n,r);return function(i){return o.format(i)}}),currency:Wr(function(n,r){var o=new Intl.NumberFormat(n,On(On({},r),{},{style:"currency"}));return function(i){return o.format(i)}}),datetime:Wr(function(n,r){var o=new Intl.DateTimeFormat(n,On({},r));return function(i){return o.format(i)}}),relativetime:Wr(function(n,r){var o=new Intl.RelativeTimeFormat(n,On({},r));return function(i){return o.format(i,r.range||"day")}}),list:Wr(function(n,r){var o=new Intl.ListFormat(n,On({},r));return function(i){return o.format(i)}})},this.init(t)}return It(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=r.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=Wr(r)}},{key:"format",value:function(n,r,o,i){var a=this,s=r.split(this.formatSeparator),l=s.reduce(function(u,c){var f=D_(c),d=f.formatName,p=f.formatOptions;if(a.formats[d]){var v=u;try{var y=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},_=y.locale||y.lng||i.locale||i.lng||o;v=a.formats[d](u,_,On(On(On({},p),i),y))}catch(m){a.logger.warn(m)}return v}else a.logger.warn("there was no format function for ".concat(d));return u},n);return l}}]),e}();function sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function lp(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function j_(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var B_=function(e){Cl(n,e);var t=U_(n);function n(r,o,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return At(this,n),a=t.call(this),Rl&&Zn.call(zn(a)),a.backend=r,a.store=o,a.services=i,a.languageUtils=i.languageUtils,a.options=s,a.logger=rn.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(i,s.backend,s),a}return It(n,[{key:"queueLoad",value:function(o,i,a,s){var l=this,u={},c={},f={},d={};return o.forEach(function(p){var v=!0;i.forEach(function(y){var _="".concat(p,"|").concat(y);!a.reload&&l.store.hasResourceBundle(p,y)?l.state[_]=2:l.state[_]<0||(l.state[_]===1?c[_]===void 0&&(c[_]=!0):(l.state[_]=1,v=!1,c[_]===void 0&&(c[_]=!0),u[_]===void 0&&(u[_]=!0),d[y]===void 0&&(d[y]=!0)))}),v||(f[p]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(d)}}},{key:"loaded",value:function(o,i,a){var s=o.split("|"),l=s[0],u=s[1];i&&this.emit("failedLoading",l,u,i),a&&this.store.addResourceBundle(l,u,a),this.state[o]=i?-1:2;var c={};this.queue.forEach(function(f){S_(f.loaded,[l],u),j_(f,o),i&&f.errors.push(i),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(d){c[d]||(c[d]={});var p=f.loaded[d];p.length&&p.forEach(function(v){c[d][v]===void 0&&(c[d][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(o,i,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!o.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:i,fcName:a,tried:l,wait:u,callback:c});return}this.readingCalls++;var f=function(y,_){if(s.readingCalls--,s.waitingReads.length>0){var m=s.waitingReads.shift();s.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(y&&_&&l2&&arguments[2]!==void 0?arguments[2]:{},l=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."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(o,i,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(c){a.loadOne(c)})}},{key:"load",value:function(o,i,a){this.prepareLoading(o,i,{},a)}},{key:"reload",value:function(o,i,a){this.prepareLoading(o,i,{reload:!0},a)}},{key:"loadOne",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(c,f){c&&i.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),c),!c&&f&&i.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),f),i.loaded(o,c,f)})}},{key:"saveMissing",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(i)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(i,'" 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(!(a==null||a==="")){if(this.backend&&this.backend.create){var f=lp(lp({},u),{},{isUpdate:l}),d=this.backend.create.bind(this.backend);if(d.length<6)try{var p;d.length===5?p=d(o,i,a,s,f):p=d(o,i,a,s),p&&typeof p.then=="function"?p.then(function(v){return c(null,v)}).catch(c):c(null,p)}catch(v){c(v)}else d(o,i,a,s,c,f)}!o||!o[0]||this.store.addResource(o[0],i,a,s)}}}]),n}(Zn);function up(){return{debug:!1,initImmediate:!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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Ht(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Ht(t[2])==="object"||Ht(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(o){n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function cp(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function fp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function La(){}function W_(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var Ps=function(e){Cl(n,e);var t=z_(n);function n(){var r,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(At(this,n),r=t.call(this),Rl&&Zn.call(zn(r)),r.options=cp(o),r.services={},r.logger=rn,r.modules={external:[]},W_(zn(r)),i&&!r.isInitialized&&!o.isClone){if(!r.options.initImmediate)return r.init(o,i),la(r,zn(r));setTimeout(function(){r.init(o,i)},0)}return r}return It(n,[{key:"init",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(a=i,i={}),!i.defaultNS&&i.defaultNS!==!1&&i.ns&&(typeof i.ns=="string"?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));var s=up();this.options=Zt(Zt(Zt({},s),this.options),cp(i)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Zt(Zt({},s.interpolation),this.options.interpolation)),i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator);function l(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?rn.init(l(this.modules.logger),this.options):rn.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=$_);var c=new rp(this.options);this.store=new x_(this.options.resources,this.options);var f=this.services;f.logger=rn,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new I_(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=l(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new M_(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new B_(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var h=arguments.length,g=new Array(h>1?h-1:0),S=1;S1?h-1:0),S=1;S0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var p=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];p.forEach(function(m){o[m]=function(){var h;return(h=o.store)[m].apply(h,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(m){o[m]=function(){var h;return(h=o.store)[m].apply(h,arguments),o}});var y=Wo(),_=function(){var h=function(S,k){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),y.resolve(k),a(S,k)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return h(null,o.t.bind(o));o.changeLanguage(o.options.lng,h)};return this.options.resources||!this.options.initImmediate?_():setTimeout(_,0),y}},{key:"loadResources",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:La,s=a,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],c=function(p){if(p){var v=i.services.languageUtils.toResolveHierarchy(p);v.forEach(function(y){u.indexOf(y)<0&&u.push(y)})}};if(l)c(l);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(d){return c(d)})}this.options.preload&&this.options.preload.forEach(function(d){return c(d)}),this.services.backendConnector.load(u,this.options.ns,function(d){!d&&!i.resolvedLanguage&&i.language&&i.setResolvedLanguage(i.language),s(d)})}else s(null)}},{key:"reloadResources",value:function(o,i,a){var s=Wo();return o||(o=this.languages),i||(i=this.options.ns),a||(a=La),this.services.backendConnector.reload(o,i,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&bg.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var i=0;i-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(o,i){var a=this;this.isLanguageChangingTo=o;var s=Wo();this.emit("languageChanging",o);var l=function(d){a.language=d,a.languages=a.services.languageUtils.toResolveHierarchy(d),a.resolvedLanguage=void 0,a.setResolvedLanguage(d)},u=function(d,p){p?(l(p),a.translator.changeLanguage(p),a.isLanguageChangingTo=void 0,a.emit("languageChanged",p),a.logger.log("languageChanged",p)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),i&&i(d,function(){return a.t.apply(a,arguments)})},c=function(d){!o&&!d&&a.services.languageDetector&&(d=[]);var p=typeof d=="string"?d:a.services.languageUtils.getBestMatchFromCodes(d);p&&(a.language||l(p),a.translator.language||a.translator.changeLanguage(p),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(p)),a.loadResources(p,function(v){u(v,p)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(o),s}},{key:"getFixedT",value:function(o,i,a){var s=this,l=function u(c,f){var d;if(Ht(f)!=="object"){for(var p=arguments.length,v=new Array(p>2?p-2:0),y=2;y1&&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;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var c=function(p,v){var y=i.services.backendConnector.state["".concat(p,"|").concat(v)];return y===-1||y===2};if(a.precheck){var f=a.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(s,o)&&(!l||c(u,o)))}},{key:"loadNamespaces",value:function(o,i){var a=this,s=Wo();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),i&&i(l)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(o,i){var a=Wo();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),i&&i(u)}),a):(i&&i(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var i=["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"],a=this.services&&this.services.languageUtils||new rp(up());return i.indexOf(a.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:La,s=Zt(Zt(Zt({},this.options),i),{isClone:!0}),l=new n(s);(i.debug!==void 0||i.prefix!==void 0)&&(l.logger=l.logger.clone(i));var u=["store","services","language"];return u.forEach(function(c){l[c]=o[c]}),l.services=Zt({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new np(l.services,l.options),l.translator.on("*",function(c){for(var f=arguments.length,d=new Array(f>1?f-1:0),p=1;p0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Ps(e,t)});var Ye=Ps.createInstance();Ye.createInstance=Ps.createInstance;Ye.createInstance;Ye.dir;Ye.init;Ye.loadResources;Ye.reloadResources;Ye.use;Ye.changeLanguage;Ye.getFixedT;Ye.t;Ye.exists;Ye.setDefaultNamespace;Ye.hasLoadedNamespace;Ye.loadNamespaces;Ye.loadLanguages;var Eg=[],H_=Eg.forEach,q_=Eg.slice;function K_(e){return H_.call(q_.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var dp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Q_=function(t,n,r){var o=r||{};o.path=o.path||"/";var i=encodeURIComponent(n),a="".concat(t,"=").concat(i);if(o.maxAge>0){var s=o.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(s))}if(o.domain){if(!dp.test(o.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(o.domain)}if(o.path){if(!dp.test(o.path))throw new TypeError("option path is invalid");a+="; Path=".concat(o.path)}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(o.expires.toUTCString())}if(o.httpOnly&&(a+="; HttpOnly"),o.secure&&(a+="; Secure"),o.sameSite){var l=typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite;switch(l){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},hp={create:function(t,n,r,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),o&&(i.domain=o),document.cookie=Q_(t,encodeURIComponent(n),i)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),o=0;o-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=r.substring(1),i=o.split("&"),a=0;a0){var l=i[a].substring(0,s);l===t.lookupQuerystring&&(n=i[a].substring(s+1))}}}return n}},Ho=null,pp=function(){if(Ho!==null)return Ho;try{Ho=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Ho=!1}return Ho},Y_={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&pp()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&pp()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},qo=null,vp=function(){if(qo!==null)return qo;try{qo=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{qo=!1}return qo},J_={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&vp()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&vp()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},Z_={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},eb={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},tb={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},nb={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function rb(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var Cg=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};At(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return It(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=K_(r,this.options||{},rb()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(G_),this.addDetector(X_),this.addDetector(Y_),this.addDetector(J_),this.addDetector(Z_),this.addDetector(eb),this.addDetector(tb),this.addDetector(nb)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var o=[];return n.forEach(function(i){if(r.detectors[i]){var a=r.detectors[i].lookup(r.options);a&&typeof a=="string"&&(a=[a]),a&&(o=o.concat(a))}}),this.services.languageUtils.getBestMatchFromCodes?o:o.length>0?o[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var o=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(i){o.detectors[i]&&o.detectors[i].cacheUserLanguage(n,o.options)}))}}]),e}();Cg.type="languageDetector";function uc(e){return uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uc(e)}var Rg=[],ob=Rg.forEach,ib=Rg.slice;function cc(e){return ob.call(ib.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Og(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":uc(XMLHttpRequest))==="object"}function ab(e){return!!e&&typeof e.then=="function"}function sb(e){return ab(e)?e:Promise.resolve(e)}function lb(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ni={},ub={get exports(){return Ni},set exports(e){Ni=e}},hi={},cb={get exports(){return hi},set exports(e){hi=e}},mp;function fb(){return mp||(mp=1,function(e,t){var n=typeof self<"u"?self:ls,r=function(){function i(){this.fetch=!1,this.DOMException=n.DOMException}return i.prototype=n,new i}();(function(i){(function(a){var s={searchParams:"URLSearchParams"in i,iterable:"Symbol"in i&&"iterator"in Symbol,blob:"FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in i,arrayBuffer:"ArrayBuffer"in i};function l(w){return w&&DataView.prototype.isPrototypeOf(w)}if(s.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(w){return w&&u.indexOf(Object.prototype.toString.call(w))>-1};function f(w){if(typeof w!="string"&&(w=String(w)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(w))throw new TypeError("Invalid character in header field name");return w.toLowerCase()}function d(w){return typeof w!="string"&&(w=String(w)),w}function p(w){var P={next:function(){var M=w.shift();return{done:M===void 0,value:M}}};return s.iterable&&(P[Symbol.iterator]=function(){return P}),P}function v(w){this.map={},w instanceof v?w.forEach(function(P,M){this.append(M,P)},this):Array.isArray(w)?w.forEach(function(P){this.append(P[0],P[1])},this):w&&Object.getOwnPropertyNames(w).forEach(function(P){this.append(P,w[P])},this)}v.prototype.append=function(w,P){w=f(w),P=d(P);var M=this.map[w];this.map[w]=M?M+", "+P:P},v.prototype.delete=function(w){delete this.map[f(w)]},v.prototype.get=function(w){return w=f(w),this.has(w)?this.map[w]:null},v.prototype.has=function(w){return this.map.hasOwnProperty(f(w))},v.prototype.set=function(w,P){this.map[f(w)]=d(P)},v.prototype.forEach=function(w,P){for(var M in this.map)this.map.hasOwnProperty(M)&&w.call(P,this.map[M],M,this)},v.prototype.keys=function(){var w=[];return this.forEach(function(P,M){w.push(M)}),p(w)},v.prototype.values=function(){var w=[];return this.forEach(function(P){w.push(P)}),p(w)},v.prototype.entries=function(){var w=[];return this.forEach(function(P,M){w.push([M,P])}),p(w)},s.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function y(w){if(w.bodyUsed)return Promise.reject(new TypeError("Already read"));w.bodyUsed=!0}function _(w){return new Promise(function(P,M){w.onload=function(){P(w.result)},w.onerror=function(){M(w.error)}})}function m(w){var P=new FileReader,M=_(P);return P.readAsArrayBuffer(w),M}function h(w){var P=new FileReader,M=_(P);return P.readAsText(w),M}function g(w){for(var P=new Uint8Array(w),M=new Array(P.length),C=0;C-1?P:w}function I(w,P){P=P||{};var M=P.body;if(w instanceof I){if(w.bodyUsed)throw new TypeError("Already read");this.url=w.url,this.credentials=w.credentials,P.headers||(this.headers=new v(w.headers)),this.method=w.method,this.mode=w.mode,this.signal=w.signal,!M&&w._bodyInit!=null&&(M=w._bodyInit,w.bodyUsed=!0)}else this.url=String(w);if(this.credentials=P.credentials||this.credentials||"same-origin",(P.headers||!this.headers)&&(this.headers=new v(P.headers)),this.method=N(P.method||this.method||"GET"),this.mode=P.mode||this.mode||null,this.signal=P.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&M)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(M)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function G(w){var P=new FormData;return w.trim().split("&").forEach(function(M){if(M){var C=M.split("="),O=C.shift().replace(/\+/g," "),A=C.join("=").replace(/\+/g," ");P.append(decodeURIComponent(O),decodeURIComponent(A))}}),P}function $(w){var P=new v,M=w.replace(/\r?\n[\t ]+/g," ");return M.split(/\r?\n/).forEach(function(C){var O=C.split(":"),A=O.shift().trim();if(A){var D=O.join(":").trim();P.append(A,D)}}),P}k.call(I.prototype);function X(w,P){P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in P?P.statusText:"OK",this.headers=new v(P.headers),this.url=P.url||"",this._initBody(w)}k.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},X.error=function(){var w=new X(null,{status:0,statusText:""});return w.type="error",w};var ce=[301,302,303,307,308];X.redirect=function(w,P){if(ce.indexOf(P)===-1)throw new RangeError("Invalid status code");return new X(null,{status:P,headers:{location:w}})},a.DOMException=i.DOMException;try{new a.DOMException}catch{a.DOMException=function(P,M){this.message=P,this.name=M;var C=Error(P);this.stack=C.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function re(w,P){return new Promise(function(M,C){var O=new I(w,P);if(O.signal&&O.signal.aborted)return C(new a.DOMException("Aborted","AbortError"));var A=new XMLHttpRequest;function D(){A.abort()}A.onload=function(){var z={status:A.status,statusText:A.statusText,headers:$(A.getAllResponseHeaders()||"")};z.url="responseURL"in A?A.responseURL:z.headers.get("X-Request-URL");var b="response"in A?A.response:A.responseText;M(new X(b,z))},A.onerror=function(){C(new TypeError("Network request failed"))},A.ontimeout=function(){C(new TypeError("Network request failed"))},A.onabort=function(){C(new a.DOMException("Aborted","AbortError"))},A.open(O.method,O.url,!0),O.credentials==="include"?A.withCredentials=!0:O.credentials==="omit"&&(A.withCredentials=!1),"responseType"in A&&s.blob&&(A.responseType="blob"),O.headers.forEach(function(z,b){A.setRequestHeader(b,z)}),O.signal&&(O.signal.addEventListener("abort",D),A.onreadystatechange=function(){A.readyState===4&&O.signal.removeEventListener("abort",D)}),A.send(typeof O._bodyInit>"u"?null:O._bodyInit)})}return re.polyfill=!0,i.fetch||(i.fetch=re,i.Headers=v,i.Request=I,i.Response=X),a.Headers=v,a.Request=I,a.Response=X,a.fetch=re,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(cb,hi)),hi}(function(e,t){var n;if(typeof fetch=="function"&&(typeof ls<"u"&&ls.fetch?n=ls.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof lb<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||fb();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(ub,Ni);const xg=Ni,gp=sg({__proto__:null,default:xg},[Ni]);function Ts(e){return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(e)}var yn;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?yn=global.fetch:typeof window<"u"&&window.fetch?yn=window.fetch:yn=fetch);var Ai;Og()&&(typeof global<"u"&&global.XMLHttpRequest?Ai=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Ai=window.XMLHttpRequest));var Ls;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Ls=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Ls=window.ActiveXObject));!yn&&gp&&!Ai&&!Ls&&(yn=xg||gp);typeof yn!="function"&&(yn=void 0);var fc=function(t,n){if(n&&Ts(n)==="object"){var r="";for(var o in n)r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},yp=function(t,n,r){yn(t,n).then(function(o){if(!o.ok)return r(o.statusText||"Error",{status:o.status});o.text().then(function(i){r(null,{status:o.status,data:i})}).catch(r)}).catch(r)},wp=!1,db=function(t,n,r,o){t.queryStringParams&&(n=fc(n,t.queryStringParams));var i=cc({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);r&&(i["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=cc({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},wp?{}:a);try{yp(n,s,o)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return o(l);try{Object.keys(a).forEach(function(u){delete s[u]}),yp(n,s,o),wp=!0}catch(u){o(u)}}},hb=function(t,n,r,o){r&&Ts(r)==="object"&&(r=fc("",r).slice(1)),t.queryStringParams&&(n=fc(n,t.queryStringParams));try{var i;Ai?i=new Ai:i=new Ls("MSXML2.XMLHTTP.3.0"),i.open(r?"POST":"GET",n,1),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!t.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)i.setRequestHeader(s,a[s]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(l){console&&console.log(l)}},pb=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},yn&&n.indexOf("file:")!==0)return db(t,n,r,o);if(Og()||typeof ActiveXObject=="function")return hb(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function Ii(e){return Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ii(e)}function vb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sp(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};vb(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return mb(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=cc(o,this.options||{},wb()),this.allOptions=i,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,o)),l=sb(l),l.then(function(u){if(!u)return a(null,{});var c=s.services.interpolator.interpolate(u,{lng:n.join("+"),ns:o.join("+")});s.loadUrl(c,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this;this.options.request(this.options,n,void 0,function(s,l){if(l&&(l.status>=500&&l.status<600||!l.status))return r("failed loading "+n+"; status code: "+l.status,!0);if(l&&l.status>=400&&l.status<500)return r("failed loading "+n+"; status code: "+l.status,!1);if(!l&&s&&s.message&&s.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+s.message,!0);if(s)return r(s,!1);var u,c;try{typeof l.data=="string"?u=a.options.parse(l.data,o,i):u=l.data}catch{c="failed parsing "+n+" to json"}if(c)return r(c,!1);r(null,u)})}},{key:"create",value:function(n,r,o,i,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,o,i),u=0,c=[],f=[];n.forEach(function(d){var p=s.options.addPath;typeof s.options.addPath=="function"&&(p=s.options.addPath(d,r));var v=s.services.interpolator.interpolate(p,{lng:d,ns:r});s.options.request(s.options,v,l,function(y,_){u+=1,c.push(y),f.push(_),u===n.length&&typeof a=="function"&&a(c,f)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,s=o.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],u=function(f){var d=i.toResolveHierarchy(f);d.forEach(function(p){l.indexOf(p)<0&&l.push(p)})};u(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),l.forEach(function(c){n.allOptions.ns.forEach(function(f){o.read(c,f,"read",null,null,function(d,p){d&&a.warn("loading namespace ".concat(f," for language ").concat(c," failed"),d),!d&&p&&a.log("loaded namespace ".concat(f," for language ").concat(c),p),o.loaded("".concat(c,"|").concat(f),d,p)})})})}}}]),e}();Pg.type="backend";function Sb(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],o=t.options?t.options.fallbackLng:!1,i=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var a=function(l,u){var c=t.services.backendConnector.state["".concat(l,"|").concat(u)];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!o||a(i,e)))}function bb(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return dc("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(i,a){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!a(i.isLanguageChangingTo,e))return!1}}):_b(e,t,n)}var Eb=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Cb={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Rb=function(t){return Cb[t]},Ob=function(t){return t.replace(Eb,Rb)};function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Cp(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};hc=Cp(Cp({},hc),e)}function kb(){return hc}var Tg;function Pb(e){Tg=e}function Tb(){return Tg}var Lb={type:"3rdParty",init:function(t){xb(t.options.react),Pb(t)}},Nb=L.createContext(),Ab=function(){function e(){At(this,e),this.usedNamespaces={}}return It(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(o){r.usedNamespaces[o]||(r.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function Ib(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}function Mb(e,t){return gg(e)||Ib(e,t)||yg(e,t)||wg()}function Rp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mu(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=L.useContext(Nb)||{},o=r.i18n,i=r.defaultNS,a=n||o||Tb();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Ab),!a){dc("You will need to pass in an i18next instance by using initReactI18next");var s=function(G){return Array.isArray(G)?G[G.length-1]:G},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&dc("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=mu(mu(mu({},kb()),a.options.react),t),c=u.useSuspense,f=u.keyPrefix,d=e||i||a.options&&a.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(d);var p=(a.isInitialized||a.initializedStoreOnce)&&d.every(function(I){return bb(I,a,u)});function v(){return a.getFixedT(null,u.nsMode==="fallback"?d:d[0],f)}var y=L.useState(v),_=Mb(y,2),m=_[0],h=_[1],g=d.join(),S=Db(g),k=L.useRef(!0);L.useEffect(function(){var I=u.bindI18n,G=u.bindI18nStore;k.current=!0,!p&&!c&&bp(a,d,function(){k.current&&h(v)}),p&&S&&S!==g&&k.current&&h(v);function $(){k.current&&h(v)}return I&&a&&a.on(I,$),G&&a&&a.store.on(G,$),function(){k.current=!1,I&&a&&I.split(" ").forEach(function(X){return a.off(X,$)}),G&&a&&G.split(" ").forEach(function(X){return a.store.off(X,$)})}},[a,g]);var T=L.useRef(!0);L.useEffect(function(){k.current&&!T.current&&h(v),T.current=!1},[a,f]);var N=[m,a,p];if(N.t=m,N.i18n=a,N.ready=p,p||!p&&!c)return N;throw new Promise(function(I){bp(a,d,function(){I()})})}const Ko={zh_cn:Ot(()=>import("./zh-cn-ace621d4.js"),[],import.meta.url),zh_tw:Ot(()=>import("./zh-tw-47d3ce5e.js"),[],import.meta.url),en:Ot(()=>import("./en-1067a8eb.js"),[],import.meta.url),vi:Ot(()=>import("./vi-75c7db25.js"),[],import.meta.url)};Ye.use(Pg).use(Lb).use(Cg).init({debug:!1,backend:{loadPath:"/__{{lng}}/{{ns}}.json",request:function(e,t,n,r){let o;switch(t){case"/__zh/translation.json":case"/__zh-CN/translation.json":o=Ko.zh_cn;break;case"/__zh-TW/translation.json":o=Ko.zh_tw;break;case"/__en/translation.json":o=Ko.en;break;case"/__vi/translation.json":o=Ko.vi;break;default:o=Ko.zh_cn;break}o&&o.then(i=>{r(null,{status:200,data:i.data})})}},supportedLngs:["zh-CN","zh-TW","en","vi"],load:"currentOnly",fallbackLng:"en",interpolation:{escapeValue:!1}});var mo={},$b={get exports(){return mo},set exports(e){mo=e}},wt={},pc={},Ub={get exports(){return pc},set exports(e){pc=e}},Lg={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(e){function t(O,A){var D=O.length;O.push(A);e:for(;0>>1,b=O[z];if(0>>1;zo(J,D))Wo(Z,J)?(O[z]=Z,O[W]=D,z=W):(O[z]=J,O[B]=D,z=B);else if(Wo(Z,D))O[z]=Z,O[W]=D,z=W;else break e}}return A}function o(O,A){var D=O.sortIndex-A.sortIndex;return D!==0?D:O.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,v=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(O){for(var A=n(u);A!==null;){if(A.callback===null)r(u);else if(A.startTime<=O)r(u),A.sortIndex=A.expirationTime,t(l,A);else break;A=n(u)}}function S(O){if(y=!1,g(O),!v)if(n(l)!==null)v=!0,M(k);else{var A=n(u);A!==null&&C(S,A.startTime-O)}}function k(O,A){v=!1,y&&(y=!1,m(I),I=-1),p=!0;var D=d;try{for(g(A),f=n(l);f!==null&&(!(f.expirationTime>A)||O&&!X());){var z=f.callback;if(typeof z=="function"){f.callback=null,d=f.priorityLevel;var b=z(f.expirationTime<=A);A=e.unstable_now(),typeof b=="function"?f.callback=b:f===n(l)&&r(l),g(A)}else r(l);f=n(l)}if(f!==null)var U=!0;else{var B=n(u);B!==null&&C(S,B.startTime-A),U=!1}return U}finally{f=null,d=D,p=!1}}var T=!1,N=null,I=-1,G=5,$=-1;function X(){return!(e.unstable_now()-$O||125z?(O.sortIndex=D,t(u,O),n(l)===null&&O===n(u)&&(y?(m(I),I=-1):y=!0,C(S,D-z))):(O.sortIndex=b,t(l,O),v||p||(v=!0,M(k))),O},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(O){var A=d;return function(){var D=d;d=A;try{return O.apply(this,arguments)}finally{d=D}}}})(Lg);(function(e){e.exports=Lg})(Ub);/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ng=L,mt=pc;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vc=Object.prototype.hasOwnProperty,Fb=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Op={},xp={};function jb(e){return vc.call(xp,e)?!0:vc.call(Op,e)?!1:Fb.test(e)?xp[e]=!0:(Op[e]=!0,!1)}function Bb(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zb(e,t,n,r){if(t===null||typeof t>"u"||Bb(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function nt(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){We[e]=new nt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];We[t]=new nt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){We[e]=new nt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){We[e]=new nt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){We[e]=new nt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){We[e]=new nt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){We[e]=new nt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){We[e]=new nt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){We[e]=new nt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Zf=/[\-:]([a-z])/g;function ed(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Zf,ed);We[t]=new nt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Zf,ed);We[t]=new nt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Zf,ed);We[t]=new nt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){We[e]=new nt(e,1,!1,e.toLowerCase(),null,!1,!1)});We.xlinkHref=new nt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){We[e]=new nt(e,1,!1,e.toLowerCase(),null,!0,!0)});function td(e,t,n,r){var o=We.hasOwnProperty(t)?We[t]:null;(o!==null?o.type!==0:r||!(2s||o[a]!==i[s]){var l=` `+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{yu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?si(e):""}function Vb(e){switch(e.tag){case 5:return si(e.type);case 16:return si("Lazy");case 13:return si("Suspense");case 19:return si("SuspenseList");case 0:case 2:case 15:return e=wu(e.type,!1),e;case 11:return e=wu(e.type.render,!1),e;case 1:return e=wu(e.type,!0),e;default:return""}}function wc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Qr:return"Fragment";case Kr:return"Portal";case mc:return"Profiler";case nd:return"StrictMode";case gc:return"Suspense";case yc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Mg:return(e.displayName||"Context")+".Consumer";case Ig:return(e._context.displayName||"Context")+".Provider";case rd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case od:return t=e.displayName||null,t!==null?t:wc(e.type)||"Memo";case Tn:t=e._payload,e=e._init;try{return wc(e(t))}catch{}}return null}function Wb(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wc(t);case 8:return t===nd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function er(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $g(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hb(e){var t=$g(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Aa(e){e._valueTracker||(e._valueTracker=Hb(e))}function Ug(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$g(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ns(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Sc(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=er(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Fg(e,t){t=t.checked,t!=null&&td(e,"checked",t,!1)}function _c(e,t){Fg(e,t);var n=er(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bc(e,t.type,n):t.hasOwnProperty("defaultValue")&&bc(e,t.type,er(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function bc(e,t,n){(t!=="number"||Ns(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var li=Array.isArray;function lo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Ia.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Di(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pi).forEach(function(e){qb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pi[t]=pi[e]})});function Vg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pi.hasOwnProperty(e)&&pi[e]?(""+t).trim():t+"px"}function Wg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Vg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Kb=Te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Rc(e,t){if(t){if(Kb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function Oc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xc=null;function id(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kc=null,uo=null,co=null;function Ap(e){if(e=fa(e)){if(typeof kc!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Tl(t),kc(e.stateNode,e.type,t))}}function Hg(e){uo?co?co.push(e):co=[e]:uo=e}function qg(){if(uo){var e=uo,t=co;if(co=uo=null,Ap(e),t)for(e=0;e>>=0,e===0?32:31-(oE(e)/iE|0)|0}var Ma=64,Da=4194304;function ui(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ds(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~o;s!==0?r=ui(s):(i&=a,i!==0&&(r=ui(i)))}else a=n&~o,a!==0?r=ui(a):i!==0&&(r=ui(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ua(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-qt(t),e[t]=n}function uE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=mi),zp=String.fromCharCode(32),Vp=!1;function dy(e,t){switch(e){case"keyup":return $E.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gr=!1;function FE(e,t){switch(e){case"compositionend":return hy(t);case"keypress":return t.which!==32?null:(Vp=!0,zp);case"textInput":return e=t.data,e===zp&&Vp?null:e;default:return null}}function jE(e,t){if(Gr)return e==="compositionend"||!hd&&dy(e,t)?(e=cy(),ds=cd=$n=null,Gr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Kp(n)}}function gy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yy(){for(var e=window,t=Ns();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ns(e.document)}return t}function pd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function GE(e){var t=yy(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gy(n.ownerDocument.documentElement,n)){if(r!==null&&pd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Qp(n,i);var a=Qp(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Xr=null,Ic=null,yi=null,Mc=!1;function Gp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mc||Xr==null||Xr!==Ns(r)||(r=Xr,"selectionStart"in r&&pd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yi&&zi(yi,r)||(yi=r,r=Fs(Ic,"onSelect"),0Zr||(e.current=Bc[Zr],Bc[Zr]=null,Zr--)}function Se(e,t){Zr++,Bc[Zr]=e.current,e.current=t}var tr={},Xe=rr(tr),st=rr(!1),Rr=tr;function yo(e,t){var n=e.type.contextTypes;if(!n)return tr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function lt(e){return e=e.childContextTypes,e!=null}function Bs(){be(st),be(Xe)}function nv(e,t,n){if(Xe.current!==tr)throw Error(j(168));Se(Xe,t),Se(st,n)}function xy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(j(108,Wb(e)||"Unknown",o));return Te({},n,r)}function zs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tr,Rr=Xe.current,Se(Xe,e),Se(st,st.current),!0}function rv(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=xy(e,t,Rr),r.__reactInternalMemoizedMergedChildContext=e,be(st),be(Xe),Se(Xe,e)):be(st),Se(st,n)}var pn=null,Ll=!1,Au=!1;function ky(e){pn===null?pn=[e]:pn.push(e)}function s2(e){Ll=!0,ky(e)}function or(){if(!Au&&pn!==null){Au=!0;var e=0,t=ve;try{var n=pn;for(ve=1;e>=a,o-=a,vn=1<<32-qt(t)+o|n<I?(G=N,N=null):G=N.sibling;var $=d(m,N,g[I],S);if($===null){N===null&&(N=G);break}e&&N&&$.alternate===null&&t(m,N),h=i($,h,I),T===null?k=$:T.sibling=$,T=$,N=G}if(I===g.length)return n(m,N),Ce&&fr(m,I),k;if(N===null){for(;II?(G=N,N=null):G=N.sibling;var X=d(m,N,$.value,S);if(X===null){N===null&&(N=G);break}e&&N&&X.alternate===null&&t(m,N),h=i(X,h,I),T===null?k=X:T.sibling=X,T=X,N=G}if($.done)return n(m,N),Ce&&fr(m,I),k;if(N===null){for(;!$.done;I++,$=g.next())$=f(m,$.value,S),$!==null&&(h=i($,h,I),T===null?k=$:T.sibling=$,T=$);return Ce&&fr(m,I),k}for(N=r(m,N);!$.done;I++,$=g.next())$=p(N,m,I,$.value,S),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?I:$.key),h=i($,h,I),T===null?k=$:T.sibling=$,T=$);return e&&N.forEach(function(ce){return t(m,ce)}),Ce&&fr(m,I),k}function _(m,h,g,S){if(typeof g=="object"&&g!==null&&g.type===Qr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Na:e:{for(var k=g.key,T=h;T!==null;){if(T.key===k){if(k=g.type,k===Qr){if(T.tag===7){n(m,T.sibling),h=o(T,g.props.children),h.return=m,m=h;break e}}else if(T.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Tn&&cv(k)===T.type){n(m,T.sibling),h=o(T,g.props),h.ref=Zo(m,T,g),h.return=m,m=h;break e}n(m,T);break}else t(m,T);T=T.sibling}g.type===Qr?(h=_r(g.props.children,m.mode,S,g.key),h.return=m,m=h):(S=Ss(g.type,g.key,g.props,null,m.mode,S),S.ref=Zo(m,h,g),S.return=m,m=S)}return a(m);case Kr:e:{for(T=g.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),h=o(h,g.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=Bu(g,m.mode,S),h.return=m,m=h}return a(m);case Tn:return T=g._init,_(m,h,T(g._payload),S)}if(li(g))return v(m,h,g,S);if(Qo(g))return y(m,h,g,S);Va(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),h=o(h,g),h.return=m,m=h):(n(m,h),h=ju(g,m.mode,S),h.return=m,m=h),a(m)):n(m,h)}return _}var So=Dy(!0),$y=Dy(!1),da={},sn=rr(da),qi=rr(da),Ki=rr(da);function yr(e){if(e===da)throw Error(j(174));return e}function Ed(e,t){switch(Se(Ki,t),Se(qi,e),Se(sn,da),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Cc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Cc(t,e)}be(sn),Se(sn,t)}function _o(){be(sn),be(qi),be(Ki)}function Uy(e){yr(Ki.current);var t=yr(sn.current),n=Cc(t,e.type);t!==n&&(Se(qi,e),Se(sn,n))}function Cd(e){qi.current===e&&(be(sn),be(qi))}var ke=rr(0);function Qs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Iu=[];function Rd(){for(var e=0;en?n:4,e(!0);var r=Mu.transition;Mu.transition={};try{e(!1),t()}finally{ve=n,Mu.transition=r}}function e0(){return Nt().memoizedState}function f2(e,t,n){var r=Gn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},t0(e))n0(t,n);else if(n=Ny(e,t,n,r),n!==null){var o=et();Kt(n,e,r,o),r0(n,t,r)}}function d2(e,t,n){var r=Gn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(t0(e))n0(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Gt(s,a)){var l=t.interleaved;l===null?(o.next=o,_d(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Ny(e,t,o,r),n!==null&&(o=et(),Kt(n,e,r,o),r0(n,t,r))}}function t0(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function n0(e,t){wi=Gs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function r0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sd(e,n)}}var Xs={readContext:Lt,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},h2={readContext:Lt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:dv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ms(4194308,4,Gy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ms(4194308,4,e,t)},useInsertionEffect:function(e,t){return ms(4,2,e,t)},useMemo:function(e,t){var n=tn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=tn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=f2.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:fv,useDebugValue:Td,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=fv(!1),t=e[0];return e=c2.bind(null,e[1]),tn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,o=tn();if(Ce){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),Be===null)throw Error(j(349));xr&30||By(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,dv(Vy.bind(null,r,i,e),[e]),r.flags|=2048,Xi(9,zy.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=tn(),t=Be.identifierPrefix;if(Ce){var n=mn,r=vn;n=(r&~(1<<32-qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Qi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[nn]=t,e[Hi]=r,d0(e,t,!1,!1),t.stateNode=e;e:{switch(a=Oc(n,r),n){case"dialog":_e("cancel",e),_e("close",e),o=r;break;case"iframe":case"object":case"embed":_e("load",e),o=r;break;case"video":case"audio":for(o=0;oEo&&(t.flags|=128,r=!0,ei(i,!1),t.lanes=4194304)}else{if(!r)if(e=Qs(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ei(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ce)return qe(t),null}else 2*Ae()-i.renderingStartTime>Eo&&n!==1073741824&&(t.flags|=128,r=!0,ei(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ae(),t.sibling=null,n=ke.current,Se(ke,r?n&1|2:n&1),t):(qe(t),null);case 22:case 23:return Dd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ht&1073741824&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function _2(e,t){switch(md(t),t.tag){case 1:return lt(t.type)&&Bs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _o(),be(st),be(Xe),Rd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Cd(t),null;case 13:if(be(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));wo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return be(ke),null;case 4:return _o(),null;case 10:return Sd(t.type._context),null;case 22:case 23:return Dd(),null;case 24:return null;default:return null}}var Ha=!1,Ge=!1,b2=typeof WeakSet=="function"?WeakSet:Set,K=null;function ro(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Le(e,t,r)}else n.current=null}function Zc(e,t,n){try{n()}catch(r){Le(e,t,r)}}var _v=!1;function E2(e,t){if(Dc=$s,e=yy(),pd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||o!==0&&f.nodeType!==3||(s=a+o),f!==i||r!==0&&f.nodeType!==3||(l=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++u===o&&(s=a),d===i&&++c===r&&(l=a),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for($c={focusedElem:e,selectionRange:n},$s=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,_=v.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ft(t.type,y),_);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(S){Le(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return v=_v,_v=!1,v}function Si(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Zc(t,n,i)}o=o.next}while(o!==r)}}function Il(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ef(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function v0(e){var t=e.alternate;t!==null&&(e.alternate=null,v0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nn],delete t[Hi],delete t[jc],delete t[i2],delete t[a2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function m0(e){return e.tag===5||e.tag===3||e.tag===4}function bv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||m0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=js));else if(r!==4&&(e=e.child,e!==null))for(tf(e,t,n),e=e.sibling;e!==null;)tf(e,t,n),e=e.sibling}function nf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(nf(e,t,n),e=e.sibling;e!==null;)nf(e,t,n),e=e.sibling}var ze=null,zt=!1;function xn(e,t,n){for(n=n.child;n!==null;)g0(e,t,n),n=n.sibling}function g0(e,t,n){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(Ol,n)}catch{}switch(n.tag){case 5:Ge||ro(n,t);case 6:var r=ze,o=zt;ze=null,xn(e,t,n),ze=r,zt=o,ze!==null&&(zt?(e=ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ze.removeChild(n.stateNode));break;case 18:ze!==null&&(zt?(e=ze,n=n.stateNode,e.nodeType===8?Nu(e.parentNode,n):e.nodeType===1&&Nu(e,n),ji(e)):Nu(ze,n.stateNode));break;case 4:r=ze,o=zt,ze=n.stateNode.containerInfo,zt=!0,xn(e,t,n),ze=r,zt=o;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Zc(n,t,a),o=o.next}while(o!==r)}xn(e,t,n);break;case 1:if(!Ge&&(ro(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Le(n,t,s)}xn(e,t,n);break;case 21:xn(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,xn(e,t,n),Ge=r):xn(e,t,n);break;default:xn(e,t,n)}}function Ev(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new b2),t.forEach(function(r){var o=N2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function $t(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*R2(r/1960))-r,10e?16:e,Un===null)var r=!1;else{if(e=Un,Un=null,Zs=0,he&6)throw Error(j(331));var o=he;for(he|=4,K=e.current;K!==null;){var i=K,a=i.child;if(K.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lAe()-Id?Sr(e,0):Ad|=n),ut(e,t)}function R0(e,t){t===0&&(e.mode&1?(t=Da,Da<<=1,!(Da&130023424)&&(Da=4194304)):t=1);var n=et();e=bn(e,t),e!==null&&(ua(e,t,n),ut(e,n))}function L2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),R0(e,n)}function N2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(j(314))}r!==null&&r.delete(t),R0(e,n)}var O0;O0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||st.current)at=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return at=!1,w2(e,t,n);at=!!(e.flags&131072)}else at=!1,Ce&&t.flags&1048576&&Py(t,Ws,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;gs(e,t),e=t.pendingProps;var o=yo(t,Xe.current);ho(t,n),o=xd(null,t,r,e,o,n);var i=kd();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(r)?(i=!0,zs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,bd(t),o.updater=Nl,t.stateNode=o,o._reactInternals=t,qc(t,r,e,n),t=Gc(null,t,r,!0,i,n)):(t.tag=0,Ce&&i&&vd(t),Ze(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(gs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=I2(r),e=Ft(r,e),o){case 0:t=Qc(null,t,r,e,n);break e;case 1:t=yv(null,t,r,e,n);break e;case 11:t=mv(null,t,r,e,n);break e;case 14:t=gv(null,t,r,Ft(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),Qc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),yv(e,t,r,o,n);case 3:e:{if(u0(t),e===null)throw Error(j(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Ay(e,t),Ks(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=bo(Error(j(423)),t),t=wv(e,t,r,n,o);break e}else if(r!==o){o=bo(Error(j(424)),t),t=wv(e,t,r,n,o);break e}else for(pt=qn(t.stateNode.containerInfo.firstChild),vt=t,Ce=!0,Vt=null,n=$y(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wo(),r===o){t=En(e,t,n);break e}Ze(e,t,r,n)}t=t.child}return t;case 5:return Uy(t),e===null&&Vc(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Uc(r,o)?a=null:i!==null&&Uc(r,i)&&(t.flags|=32),l0(e,t),Ze(e,t,a,n),t.child;case 6:return e===null&&Vc(t),null;case 13:return c0(e,t,n);case 4:return Ed(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=So(t,null,r,n):Ze(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),mv(e,t,r,o,n);case 7:return Ze(e,t,t.pendingProps,n),t.child;case 8:return Ze(e,t,t.pendingProps.children,n),t.child;case 12:return Ze(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Se(Hs,r._currentValue),r._currentValue=a,i!==null)if(Gt(i.value,a)){if(i.children===o.children&&!st.current){t=En(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=wn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Wc(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(j(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Wc(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ze(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ho(t,n),o=Lt(o),r=r(o),t.flags|=1,Ze(e,t,r,n),t.child;case 14:return r=t.type,o=Ft(r,t.pendingProps),o=Ft(r.type,o),gv(e,t,r,o,n);case 15:return a0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),gs(e,t),t.tag=1,lt(r)?(e=!0,zs(t)):e=!1,ho(t,n),My(t,r,o),qc(t,r,o,n),Gc(null,t,r,!0,e,n);case 19:return f0(e,t,n);case 22:return s0(e,t,n)}throw Error(j(156,t.tag))};function x0(e,t){return Zg(e,t)}function A2(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xt(e,t,n,r){return new A2(e,t,n,r)}function Ud(e){return e=e.prototype,!(!e||!e.isReactComponent)}function I2(e){if(typeof e=="function")return Ud(e)?1:0;if(e!=null){if(e=e.$$typeof,e===rd)return 11;if(e===od)return 14}return 2}function Xn(e,t){var n=e.alternate;return n===null?(n=xt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ss(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")Ud(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Qr:return _r(n.children,o,i,t);case nd:a=8,o|=8;break;case mc:return e=xt(12,n,t,o|2),e.elementType=mc,e.lanes=i,e;case gc:return e=xt(13,n,t,o),e.elementType=gc,e.lanes=i,e;case yc:return e=xt(19,n,t,o),e.elementType=yc,e.lanes=i,e;case Dg:return Dl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ig:a=10;break e;case Mg:a=9;break e;case rd:a=11;break e;case od:a=14;break e;case Tn:a=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=xt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function _r(e,t,n,r){return e=xt(7,e,r,t),e.lanes=n,e}function Dl(e,t,n,r){return e=xt(22,e,r,t),e.elementType=Dg,e.lanes=n,e.stateNode={isHidden:!1},e}function ju(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function Bu(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function M2(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_u(0),this.expirationTimes=_u(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_u(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Fd(e,t,n,r,o,i,a,s,l){return e=new M2(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=xt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},bd(i),e}function D2(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=wt})($b);const L0=Kf(mo);var N0,Lv=mo;N0=Lv.createRoot,Lv.hydrateRoot;var nl={},B2={get exports(){return nl},set exports(e){nl=e}},Tr={},xe={},z2={get exports(){return xe},set exports(e){xe=e}},V2="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",W2=V2,H2=W2;function A0(){}function I0(){}I0.resetWarningCache=A0;var q2=function(){function e(r,o,i,a,s,l){if(l!==H2){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:I0,resetWarningCache:A0};return n.PropTypes=n,n};z2.exports=q2();var rl={},K2={get exports(){return rl},set exports(e){rl=e}},Xt={},Ji={},Q2={get exports(){return Ji},set exports(e){Ji=e}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;/*! * Adapted from jQuery UI core * * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/ui-core/ */var n="none",r="contents",o=/input|select|textarea|button|object|iframe/;function i(f,d){return d.getPropertyValue("overflow")!=="visible"||f.scrollWidth<=0&&f.scrollHeight<=0}function a(f){var d=f.offsetWidth<=0&&f.offsetHeight<=0;if(d&&!f.innerHTML)return!0;try{var p=window.getComputedStyle(f),v=p.getPropertyValue("display");return d?v!==r&&i(f,p):v===n}catch{return console.warn("Failed to inspect element style"),!1}}function s(f){for(var d=f,p=f.getRootNode&&f.getRootNode();d&&d!==document.body;){if(p&&d===p&&(d=p.host.parentNode),a(d))return!1;d=d.parentNode}return!0}function l(f,d){var p=f.nodeName.toLowerCase(),v=o.test(p)&&!f.disabled||p==="a"&&f.href||d;return v&&s(f)}function u(f){var d=f.getAttribute("tabindex");d===null&&(d=void 0);var p=isNaN(d);return(p||d>=0)&&l(f,!p)}function c(f){var d=[].slice.call(f.querySelectorAll("*"),0).reduce(function(p,v){return p.concat(v.shadowRoot?c(v.shadowRoot):[v])},[]);return d.filter(u)}e.exports=t.default})(Q2,Ji);Object.defineProperty(Xt,"__esModule",{value:!0});Xt.resetState=J2;Xt.log=Z2;Xt.handleBlur=Zi;Xt.handleFocus=ea;Xt.markForFocusLater=eC;Xt.returnFocus=tC;Xt.popWithoutFocus=nC;Xt.setupScopedFocus=rC;Xt.teardownScopedFocus=oC;var G2=Ji,X2=Y2(G2);function Y2(e){return e&&e.__esModule?e:{default:e}}var Co=[],io=null,lf=!1;function J2(){Co=[]}function Z2(){}function Zi(){lf=!0}function ea(){if(lf){if(lf=!1,!io)return;setTimeout(function(){if(!io.contains(document.activeElement)){var e=(0,X2.default)(io)[0]||io;e.focus()}},0)}}function eC(){Co.push(document.activeElement)}function tC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=null;try{Co.length!==0&&(t=Co.pop(),t.focus({preventScroll:e}));return}catch{console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}}function nC(){Co.length>0&&Co.pop()}function rC(e){io=e,window.addEventListener?(window.addEventListener("blur",Zi,!1),document.addEventListener("focus",ea,!0)):(window.attachEvent("onBlur",Zi),document.attachEvent("onFocus",ea))}function oC(){io=null,window.addEventListener?(window.removeEventListener("blur",Zi),document.removeEventListener("focus",ea)):(window.detachEvent("onBlur",Zi),document.detachEvent("onFocus",ea))}var ol={},iC={get exports(){return ol},set exports(e){ol=e}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=Ji,r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return s.activeElement.shadowRoot?i(s.activeElement.shadowRoot):s.activeElement}function a(s,l){var u=(0,r.default)(s);if(!u.length){l.preventDefault();return}var c=void 0,f=l.shiftKey,d=u[0],p=u[u.length-1],v=i();if(s===v){if(!f)return;c=p}if(p===v&&!f&&(c=d),d===v&&f&&(c=p),c){l.preventDefault(),c.focus();return}var y=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),_=y!=null&&y[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(_){var m=u.indexOf(v);if(m>-1&&(m+=f?-1:1),c=u[m],typeof c>"u"){l.preventDefault(),c=f?p:d,c.focus();return}l.preventDefault(),c.focus()}}e.exports=t.default})(iC,ol);var Yt={},aC=function(){},sC=aC,Qt={},uf={},lC={get exports(){return uf},set exports(e){uf=e}};/*! Copyright (c) 2015 Jed Watson. Based on code that is Copyright 2013-2015, Facebook, Inc. All rights reserved. */(function(e){(function(){var t=!!(typeof window<"u"&&window.document&&window.document.createElement),n={canUseDOM:t,canUseWorkers:typeof Worker<"u",canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen};e.exports?e.exports=n:window.ExecutionEnvironment=n})()})(lC);Object.defineProperty(Qt,"__esModule",{value:!0});Qt.canUseDOM=Qt.SafeNodeList=Qt.SafeHTMLCollection=void 0;var uC=uf,cC=fC(uC);function fC(e){return e&&e.__esModule?e:{default:e}}var Bl=cC.default,dC=Bl.canUseDOM?window.HTMLElement:{};Qt.SafeHTMLCollection=Bl.canUseDOM?window.HTMLCollection:{};Qt.SafeNodeList=Bl.canUseDOM?window.NodeList:{};Qt.canUseDOM=Bl.canUseDOM;Qt.default=dC;Object.defineProperty(Yt,"__esModule",{value:!0});Yt.resetState=gC;Yt.log=yC;Yt.assertNodeList=M0;Yt.setElement=wC;Yt.validateElement=Vd;Yt.hide=SC;Yt.show=_C;Yt.documentNotReadyOrSSRTesting=bC;var hC=sC,pC=mC(hC),vC=Qt;function mC(e){return e&&e.__esModule?e:{default:e}}var Et=null;function gC(){Et&&(Et.removeAttribute?Et.removeAttribute("aria-hidden"):Et.length!=null?Et.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(Et).forEach(function(e){return e.removeAttribute("aria-hidden")})),Et=null}function yC(){}function M0(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function wC(e){var t=e;if(typeof t=="string"&&vC.canUseDOM){var n=document.querySelectorAll(t);M0(n,t),t=n}return Et=t||Et,Et}function Vd(e){var t=e||Et;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,pC.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function SC(e){var t=!0,n=!1,r=void 0;try{for(var o=Vd(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=!0){var a=i.value;a.setAttribute("aria-hidden","true")}}catch(s){n=!0,r=s}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}function _C(e){var t=!0,n=!1,r=void 0;try{for(var o=Vd(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=!0){var a=i.value;a.removeAttribute("aria-hidden")}}catch(s){n=!0,r=s}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}function bC(){Et=null}var Mo={};Object.defineProperty(Mo,"__esModule",{value:!0});Mo.resetState=EC;Mo.log=CC;var Ei={},Ci={};function Nv(e,t){e.classList.remove(t)}function EC(){var e=document.getElementsByTagName("html")[0];for(var t in Ei)Nv(e,Ei[t]);var n=document.body;for(var r in Ci)Nv(n,Ci[r]);Ei={},Ci={}}function CC(){}var RC=function(t,n){return t[n]||(t[n]=0),t[n]+=1,n},OC=function(t,n){return t[n]&&(t[n]-=1),n},xC=function(t,n,r){r.forEach(function(o){RC(n,o),t.add(o)})},kC=function(t,n,r){r.forEach(function(o){OC(n,o),n[o]===0&&t.remove(o)})};Mo.add=function(t,n){return xC(t.classList,t.nodeName.toLowerCase()=="html"?Ei:Ci,n.split(" "))};Mo.remove=function(t,n){return kC(t.classList,t.nodeName.toLowerCase()=="html"?Ei:Ci,n.split(" "))};var Do={};Object.defineProperty(Do,"__esModule",{value:!0});Do.log=TC;Do.resetState=LC;function PC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var D0=function e(){var t=this;PC(this,e),this.register=function(n){t.openInstances.indexOf(n)===-1&&(t.openInstances.push(n),t.emit("register"))},this.deregister=function(n){var r=t.openInstances.indexOf(n);r!==-1&&(t.openInstances.splice(r,1),t.emit("deregister"))},this.subscribe=function(n){t.subscribers.push(n)},this.emit=function(n){t.subscribers.forEach(function(r){return r(n,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},il=new D0;function TC(){console.log("portalOpenInstances ----------"),console.log(il.openInstances.length),il.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")}function LC(){il=new D0}Do.default=il;var Wd={};Object.defineProperty(Wd,"__esModule",{value:!0});Wd.resetState=MC;Wd.log=DC;var NC=Do,AC=IC(NC);function IC(e){return e&&e.__esModule?e:{default:e}}var Ke=void 0,jt=void 0,br=[];function MC(){for(var e=[Ke,jt],t=0;t0?(document.body.firstChild!==Ke&&document.body.insertBefore(Ke,document.body.firstChild),document.body.lastChild!==jt&&document.body.appendChild(jt)):(Ke.parentElement&&Ke.parentElement.removeChild(Ke),jt.parentElement&&jt.parentElement.removeChild(jt))}AC.default.subscribe($C);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(w){for(var P=1;P0&&(ce-=1,ce===0&&p.show(A)),C.props.shouldFocusAfterRender&&(C.props.shouldReturnFocusAfterClose?(u.returnFocus(C.props.preventScroll),u.teardownScopedFocus()):u.popWithoutFocus()),C.props.onAfterClose&&C.props.onAfterClose(),g.default.deregister(C)},C.open=function(){C.beforeOpen(),C.state.afterOpen&&C.state.beforeClose?(clearTimeout(C.closeTimer),C.setState({beforeClose:!1})):(C.props.shouldFocusAfterRender&&(u.setupScopedFocus(C.node),u.markForFocusLater()),C.setState({isOpen:!0},function(){C.openAnimationFrame=requestAnimationFrame(function(){C.setState({afterOpen:!0}),C.props.isOpen&&C.props.onAfterOpen&&C.props.onAfterOpen({overlayEl:C.overlay,contentEl:C.content})})}))},C.close=function(){C.props.closeTimeoutMS>0?C.closeWithTimeout():C.closeWithoutTimeout()},C.focusContent=function(){return C.content&&!C.contentHasFocus()&&C.content.focus({preventScroll:!0})},C.closeWithTimeout=function(){var O=Date.now()+C.props.closeTimeoutMS;C.setState({beforeClose:!0,closesAt:O},function(){C.closeTimer=setTimeout(C.closeWithoutTimeout,C.state.closesAt-Date.now())})},C.closeWithoutTimeout=function(){C.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},C.afterClose)},C.handleKeyDown=function(O){$(O)&&(0,f.default)(C.content,O),C.props.shouldCloseOnEsc&&X(O)&&(O.stopPropagation(),C.requestClose(O))},C.handleOverlayOnClick=function(O){C.shouldClose===null&&(C.shouldClose=!0),C.shouldClose&&C.props.shouldCloseOnOverlayClick&&(C.ownerHandlesClose()?C.requestClose(O):C.focusContent()),C.shouldClose=null},C.handleContentOnMouseUp=function(){C.shouldClose=!1},C.handleOverlayOnMouseDown=function(O){!C.props.shouldCloseOnOverlayClick&&O.target==C.overlay&&O.preventDefault()},C.handleContentOnClick=function(){C.shouldClose=!1},C.handleContentOnMouseDown=function(){C.shouldClose=!1},C.requestClose=function(O){return C.ownerHandlesClose()&&C.props.onRequestClose(O)},C.ownerHandlesClose=function(){return C.props.onRequestClose},C.shouldBeClosed=function(){return!C.state.isOpen&&!C.state.beforeClose},C.contentHasFocus=function(){return document.activeElement===C.content||C.content.contains(document.activeElement)},C.buildClassName=function(O,A){var D=(typeof A>"u"?"undefined":r(A))==="object"?A:{base:G[O],afterOpen:G[O]+"--after-open",beforeClose:G[O]+"--before-close"},z=D.base;return C.state.afterOpen&&(z=z+" "+D.afterOpen),C.state.beforeClose&&(z=z+" "+D.beforeClose),typeof A=="string"&&A?z+" "+A:z},C.attributesFromObject=function(O,A){return Object.keys(A).reduce(function(D,z){return D[O+"-"+z]=A[z],D},{})},C.state={afterOpen:!1,beforeClose:!1},C.shouldClose=null,C.moveFromContentToOverlay=null,C}return o(P,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(C,O){this.props.isOpen&&!C.isOpen?this.open():!this.props.isOpen&&C.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!O.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var C=this.props,O=C.appElement,A=C.ariaHideApp,D=C.htmlOpenClassName,z=C.bodyOpenClassName,b=C.parentSelector,U=b&&b().ownerDocument||document;z&&y.add(U.body,z),D&&y.add(U.getElementsByTagName("html")[0],D),A&&(ce+=1,p.hide(O)),g.default.register(this)}},{key:"render",value:function(){var C=this.props,O=C.id,A=C.className,D=C.overlayClassName,z=C.defaultStyles,b=C.children,U=A?{}:z.content,B=D?{}:z.overlay;if(this.shouldBeClosed())return null;var J={ref:this.setOverlayRef,className:this.buildClassName("overlay",D),style:n({},B,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},W=n({id:O,ref:this.setContentRef,style:n({},U,this.props.style.content),className:this.buildClassName("content",A),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",n({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),Z=this.props.contentElement(W,b);return this.props.overlayElement(J,Z)}}]),P}(i.Component);re.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},re.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(m.default),s.default.instanceOf(_.SafeHTMLCollection),s.default.instanceOf(_.SafeNodeList),s.default.arrayOf(s.default.instanceOf(m.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=re,e.exports=t.default})(K2,rl);function $0(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function U0(e){function t(n){var r=this.constructor.getDerivedStateFromProps(e,n);return r??null}this.setState(t.bind(this))}function F0(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}$0.__suppressDeprecationWarning=!0;U0.__suppressDeprecationWarning=!0;F0.__suppressDeprecationWarning=!0;function UC(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var n=null,r=null,o=null;if(typeof t.componentWillMount=="function"?n="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?r="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(r="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?o="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(o="UNSAFE_componentWillUpdate"),n!==null||r!==null||o!==null){var i=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. `+i+" uses "+a+" but also contains the following legacy lifecycles:"+(n!==null?` `+n:"")+(r!==null?` `+r:"")+(o!==null?` `+o:"")+` The above lifecycles should be removed. Learn more about this warning here: https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=$0,t.componentWillReceiveProps=U0),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=F0;var s=t.componentDidUpdate;t.componentDidUpdate=function(u,c,f){var d=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;s.call(this,u,c,d)}}return e}const FC=Object.freeze(Object.defineProperty({__proto__:null,polyfill:UC},Symbol.toStringTag,{value:"Module"})),jC=zS(FC);Object.defineProperty(Tr,"__esModule",{value:!0});Tr.bodyOpenClassName=Tr.portalClassName=void 0;var Iv=Object.assign||function(e){for(var t=1;t0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}();function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u";function Qe(){}function ZC(e,t){return typeof e=="function"?e(t):e}function cf(e){return typeof e=="number"&&e>=0&&e!==1/0}function ul(e){return Array.isArray(e)?e:[e]}function z0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _s(e,t,n){return ga(e)?typeof t=="function"?de({},n,{queryKey:e,queryFn:t}):de({},t,{queryKey:e}):e}function l$(e,t,n){return ga(e)?typeof t=="function"?de({},n,{mutationKey:e,mutationFn:t}):de({},t,{mutationKey:e}):typeof e=="function"?de({},t,{mutationFn:e}):de({},e)}function Nn(e,t,n){return ga(e)?[de({},t,{queryKey:e}),n]:[e||{},t]}function eR(e,t){if(e===!0&&t===!0||e==null&&t==null)return"all";if(e===!1&&t===!1)return"none";var n=e??!t;return n?"active":"inactive"}function jv(e,t){var n=e.active,r=e.exact,o=e.fetching,i=e.inactive,a=e.predicate,s=e.queryKey,l=e.stale;if(ga(s)){if(r){if(t.queryHash!==Hd(s,t.options))return!1}else if(!cl(t.queryKey,s))return!1}var u=eR(n,i);if(u==="none")return!1;if(u!=="all"){var c=t.isActive();if(u==="active"&&!c||u==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof o=="boolean"&&t.isFetching()!==o||a&&!a(t))}function Bv(e,t){var n=e.exact,r=e.fetching,o=e.predicate,i=e.mutationKey;if(ga(i)){if(!t.options.mutationKey)return!1;if(n){if(wr(t.options.mutationKey)!==wr(i))return!1}else if(!cl(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function Hd(e,t){var n=(t==null?void 0:t.queryKeyHashFn)||wr;return n(e)}function wr(e){var t=ul(e);return tR(t)}function tR(e){return JSON.stringify(e,function(t,n){return ff(n)?Object.keys(n).sort().reduce(function(r,o){return r[o]=n[o],r},{}):n})}function cl(e,t){return V0(ul(e),ul(t))}function V0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(function(n){return!V0(e[n],t[n])}):!1}function fl(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||ff(e)&&ff(t)){for(var r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{},s=0,l=0;l"u")return!0;var n=t.prototype;return!(!zv(n)||!n.hasOwnProperty("isPrototypeOf"))}function zv(e){return Object.prototype.toString.call(e)==="[object Object]"}function ga(e){return typeof e=="string"||Array.isArray(e)}function rR(e){return new Promise(function(t){setTimeout(t,e)})}function Vv(e){Promise.resolve().then(e).catch(function(t){return setTimeout(function(){throw t})})}function W0(){if(typeof AbortController=="function")return new AbortController}var oR=function(e){va(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(o){var i;if(!ll&&((i=window)!=null&&i.addEventListener)){var a=function(){return o()};return window.addEventListener("visibilitychange",a,!1),window.addEventListener("focus",a,!1),function(){window.removeEventListener("visibilitychange",a),window.removeEventListener("focus",a)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var o;(o=this.cleanup)==null||o.call(this),this.cleanup=void 0}},n.setEventListener=function(o){var i,a=this;this.setup=o,(i=this.cleanup)==null||i.call(this),this.cleanup=o(function(s){typeof s=="boolean"?a.setFocused(s):a.onFocus()})},n.setFocused=function(o){this.focused=o,o&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(o){o()})},n.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},t}(ma),Ri=new oR,iR=function(e){va(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(o){var i;if(!ll&&((i=window)!=null&&i.addEventListener)){var a=function(){return o()};return window.addEventListener("online",a,!1),window.addEventListener("offline",a,!1),function(){window.removeEventListener("online",a),window.removeEventListener("offline",a)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var o;(o=this.cleanup)==null||o.call(this),this.cleanup=void 0}},n.setEventListener=function(o){var i,a=this;this.setup=o,(i=this.cleanup)==null||i.call(this),this.cleanup=o(function(s){typeof s=="boolean"?a.setOnline(s):a.onOnline()})},n.setOnline=function(o){this.online=o,o&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(o){o()})},n.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},t}(ma),bs=new iR;function aR(e){return Math.min(1e3*Math.pow(2,e),3e4)}function dl(e){return typeof(e==null?void 0:e.cancel)=="function"}var H0=function(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent};function Es(e){return e instanceof H0}var q0=function(t){var n=this,r=!1,o,i,a,s;this.abort=t.abort,this.cancel=function(d){return o==null?void 0:o(d)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return i==null?void 0:i()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(d,p){a=d,s=p});var l=function(p){n.isResolved||(n.isResolved=!0,t.onSuccess==null||t.onSuccess(p),i==null||i(),a(p))},u=function(p){n.isResolved||(n.isResolved=!0,t.onError==null||t.onError(p),i==null||i(),s(p))},c=function(){return new Promise(function(p){i=p,n.isPaused=!0,t.onPause==null||t.onPause()}).then(function(){i=void 0,n.isPaused=!1,t.onContinue==null||t.onContinue()})},f=function d(){if(!n.isResolved){var p;try{p=t.fn()}catch(v){p=Promise.reject(v)}o=function(y){if(!n.isResolved&&(u(new H0(y)),n.abort==null||n.abort(),dl(p)))try{p.cancel()}catch{}},n.isTransportCancelable=dl(p),Promise.resolve(p).then(l).catch(function(v){var y,_;if(!n.isResolved){var m=(y=t.retry)!=null?y:3,h=(_=t.retryDelay)!=null?_:aR,g=typeof h=="function"?h(n.failureCount,v):h,S=m===!0||typeof m=="number"&&n.failureCount"u"&&(s.exact=!0),this.queries.find(function(l){return jv(s,l)})},n.findAll=function(o,i){var a=Nn(o,i),s=a[0];return Object.keys(s).length>0?this.queries.filter(function(l){return jv(s,l)}):this.queries},n.notify=function(o){var i=this;Ne.batch(function(){i.listeners.forEach(function(a){a(o)})})},n.onFocus=function(){var o=this;Ne.batch(function(){o.queries.forEach(function(i){i.onFocus()})})},n.onOnline=function(){var o=this;Ne.batch(function(){o.queries.forEach(function(i){i.onOnline()})})},t}(ma),cR=function(){function e(n){this.options=de({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||fR(),this.meta=n.meta}var t=e.prototype;return t.setState=function(r){this.dispatch({type:"setState",state:r})},t.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},t.removeObserver=function(r){this.observers=this.observers.filter(function(o){return o!==r})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(Qe).catch(Qe)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var r=this,o,i=this.state.status==="loading",a=Promise.resolve();return i||(this.dispatch({type:"loading",variables:this.options.variables}),a=a.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(s){s!==r.state.context&&r.dispatch({type:"loading",context:s,variables:r.state.variables})})),a.then(function(){return r.executeMutation()}).then(function(s){o=s,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(o,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(o,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(o,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:o}),o}).catch(function(s){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(s,r.state.variables,r.state.context,r),hl().error(s),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(s,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,s,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:s}),s})})},t.executeMutation=function(){var r=this,o;return this.retryer=new q0({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(o=this.options.retry)!=null?o:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(r){var o=this;this.state=dR(this.state,r),Ne.batch(function(){o.observers.forEach(function(i){i.onMutationUpdate(r)}),o.mutationCache.notify(o)})},e}();function fR(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function dR(e,t){switch(t.type){case"failed":return de({},e,{failureCount:e.failureCount+1});case"pause":return de({},e,{isPaused:!0});case"continue":return de({},e,{isPaused:!1});case"loading":return de({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return de({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return de({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return de({},e,t.state);default:return e}}var hR=function(e){va(t,e);function t(r){var o;return o=e.call(this)||this,o.config=r||{},o.mutations=[],o.mutationId=0,o}var n=t.prototype;return n.build=function(o,i,a){var s=new cR({mutationCache:this,mutationId:++this.mutationId,options:o.defaultMutationOptions(i),state:a,defaultOptions:i.mutationKey?o.getMutationDefaults(i.mutationKey):void 0,meta:i.meta});return this.add(s),s},n.add=function(o){this.mutations.push(o),this.notify(o)},n.remove=function(o){this.mutations=this.mutations.filter(function(i){return i!==o}),o.cancel(),this.notify(o)},n.clear=function(){var o=this;Ne.batch(function(){o.mutations.forEach(function(i){o.remove(i)})})},n.getAll=function(){return this.mutations},n.find=function(o){return typeof o.exact>"u"&&(o.exact=!0),this.mutations.find(function(i){return Bv(o,i)})},n.findAll=function(o){return this.mutations.filter(function(i){return Bv(o,i)})},n.notify=function(o){var i=this;Ne.batch(function(){i.listeners.forEach(function(a){a(o)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var o=this.mutations.filter(function(i){return i.state.isPaused});return Ne.batch(function(){return o.reduce(function(i,a){return i.then(function(){return a.continue().catch(Qe)})},Promise.resolve())})},t}(ma);function pR(){return{onFetch:function(t){t.fetchFn=function(){var n,r,o,i,a,s,l=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,u=(o=t.fetchOptions)==null||(i=o.meta)==null?void 0:i.fetchMore,c=u==null?void 0:u.pageParam,f=(u==null?void 0:u.direction)==="forward",d=(u==null?void 0:u.direction)==="backward",p=((a=t.state.data)==null?void 0:a.pages)||[],v=((s=t.state.data)==null?void 0:s.pageParams)||[],y=W0(),_=y==null?void 0:y.signal,m=v,h=!1,g=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},S=function(w,P,M,C){return m=C?[P].concat(m):[].concat(m,[P]),C?[M].concat(w):[].concat(w,[M])},k=function(w,P,M,C){if(h)return Promise.reject("Cancelled");if(typeof M>"u"&&!P&&w.length)return Promise.resolve(w);var O={queryKey:t.queryKey,signal:_,pageParam:M,meta:t.meta},A=g(O),D=Promise.resolve(A).then(function(b){return S(w,M,b,C)});if(dl(A)){var z=D;z.cancel=A.cancel}return D},T;if(!p.length)T=k([]);else if(f){var N=typeof c<"u",I=N?c:Wv(t.options,p);T=k(p,N,I)}else if(d){var G=typeof c<"u",$=G?c:vR(t.options,p);T=k(p,G,$,!0)}else(function(){m=[];var re=typeof t.options.getNextPageParam>"u",w=l&&p[0]?l(p[0],0,p):!0;T=w?k([],re,v[0]):Promise.resolve(S([],v[0],p[0]));for(var P=function(O){T=T.then(function(A){var D=l&&p[O]?l(p[O],O,p):!0;if(D){var z=re?v[O]:Wv(t.options,A);return k(A,re,z)}return Promise.resolve(S(A,v[O],p[O]))})},M=1;M"u"&&(c.revert=!0);var f=Ne.batch(function(){return a.queryCache.findAll(l).map(function(d){return d.cancel(c)})});return Promise.all(f).then(Qe).catch(Qe)},t.invalidateQueries=function(r,o,i){var a,s,l,u=this,c=Nn(r,o,i),f=c[0],d=c[1],p=de({},f,{active:(a=(s=f.refetchActive)!=null?s:f.active)!=null?a:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return Ne.batch(function(){return u.queryCache.findAll(f).forEach(function(v){v.invalidate()}),u.refetchQueries(p,d)})},t.refetchQueries=function(r,o,i){var a=this,s=Nn(r,o,i),l=s[0],u=s[1],c=Ne.batch(function(){return a.queryCache.findAll(l).map(function(d){return d.fetch(void 0,de({},u,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(c).then(Qe);return u!=null&&u.throwOnError||(f=f.catch(Qe)),f},t.fetchQuery=function(r,o,i){var a=_s(r,o,i),s=this.defaultQueryOptions(a);typeof s.retry>"u"&&(s.retry=!1);var l=this.queryCache.build(this,s);return l.isStaleByTime(s.staleTime)?l.fetch(s):Promise.resolve(l.state.data)},t.prefetchQuery=function(r,o,i){return this.fetchQuery(r,o,i).then(Qe).catch(Qe)},t.fetchInfiniteQuery=function(r,o,i){var a=_s(r,o,i);return a.behavior=pR(),this.fetchQuery(a)},t.prefetchInfiniteQuery=function(r,o,i){return this.fetchInfiniteQuery(r,o,i).then(Qe).catch(Qe)},t.cancelMutations=function(){var r=this,o=Ne.batch(function(){return r.mutationCache.getAll().map(function(i){return i.cancel()})});return Promise.all(o).then(Qe).catch(Qe)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(r){this.defaultOptions=r},t.setQueryDefaults=function(r,o){var i=this.queryDefaults.find(function(a){return wr(r)===wr(a.queryKey)});i?i.defaultOptions=o:this.queryDefaults.push({queryKey:r,defaultOptions:o})},t.getQueryDefaults=function(r){var o;return r?(o=this.queryDefaults.find(function(i){return cl(r,i.queryKey)}))==null?void 0:o.defaultOptions:void 0},t.setMutationDefaults=function(r,o){var i=this.mutationDefaults.find(function(a){return wr(r)===wr(a.mutationKey)});i?i.defaultOptions=o:this.mutationDefaults.push({mutationKey:r,defaultOptions:o})},t.getMutationDefaults=function(r){var o;return r?(o=this.mutationDefaults.find(function(i){return cl(r,i.mutationKey)}))==null?void 0:o.defaultOptions:void 0},t.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var o=de({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!o.queryHash&&o.queryKey&&(o.queryHash=Hd(o.queryKey,o)),o},t.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},t.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:de({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),gR=function(e){va(t,e);function t(r,o){var i;return i=e.call(this)||this,i.client=r,i.options=o,i.trackedProps=[],i.selectError=null,i.bindMethods(),i.setOptions(o),i}var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),Hv(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return df(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return df(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(o,i){var a=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(o),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=a.queryKey),this.updateQuery();var l=this.hasListeners();l&&qv(this.currentQuery,s,this.options,a)&&this.executeFetch(),this.updateResult(i),l&&(this.currentQuery!==s||this.options.enabled!==a.enabled||this.options.staleTime!==a.staleTime)&&this.updateStaleTimeout();var u=this.computeRefetchInterval();l&&(this.currentQuery!==s||this.options.enabled!==a.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)},n.getOptimisticResult=function(o){var i=this.client.defaultQueryObserverOptions(o),a=this.client.getQueryCache().build(this.client,i);return this.createResult(a,i)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(o,i){var a=this,s={},l=function(c){a.trackedProps.includes(c)||a.trackedProps.push(c)};return Object.keys(o).forEach(function(u){Object.defineProperty(s,u,{configurable:!1,enumerable:!0,get:function(){return l(u),o[u]}})}),(i.useErrorBoundary||i.suspense)&&l("error"),s},n.getNextResult=function(o){var i=this;return new Promise(function(a,s){var l=i.subscribe(function(u){u.isFetching||(l(),u.isError&&(o!=null&&o.throwOnError)?s(u.error):a(u))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(o){return this.fetch(de({},o,{meta:{refetchPage:o==null?void 0:o.refetchPage}}))},n.fetchOptimistic=function(o){var i=this,a=this.client.defaultQueryObserverOptions(o),s=this.client.getQueryCache().build(this.client,a);return s.fetch().then(function(){return i.createResult(s,a)})},n.fetch=function(o){var i=this;return this.executeFetch(o).then(function(){return i.updateResult(),i.currentResult})},n.executeFetch=function(o){this.updateQuery();var i=this.currentQuery.fetch(this.options,o);return o!=null&&o.throwOnError||(i=i.catch(Qe)),i},n.updateStaleTimeout=function(){var o=this;if(this.clearStaleTimeout(),!(ll||this.currentResult.isStale||!cf(this.options.staleTime))){var i=z0(this.currentResult.dataUpdatedAt,this.options.staleTime),a=i+1;this.staleTimeoutId=setTimeout(function(){o.currentResult.isStale||o.updateResult()},a)}},n.computeRefetchInterval=function(){var o;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(o=this.options.refetchInterval)!=null?o:!1},n.updateRefetchInterval=function(o){var i=this;this.clearRefetchInterval(),this.currentRefetchInterval=o,!(ll||this.options.enabled===!1||!cf(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(i.options.refetchIntervalInBackground||Ri.isFocused())&&i.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(o,i){var a=this.currentQuery,s=this.options,l=this.currentResult,u=this.currentResultState,c=this.currentResultOptions,f=o!==a,d=f?o.state:this.currentQueryInitialState,p=f?this.currentResult:this.previousQueryResult,v=o.state,y=v.dataUpdatedAt,_=v.error,m=v.errorUpdatedAt,h=v.isFetching,g=v.status,S=!1,k=!1,T;if(i.optimisticResults){var N=this.hasListeners(),I=!N&&Hv(o,i),G=N&&qv(o,a,i,s);(I||G)&&(h=!0,y||(g="loading"))}if(i.keepPreviousData&&!v.dataUpdateCount&&(p!=null&&p.isSuccess)&&g!=="error")T=p.data,y=p.dataUpdatedAt,g=p.status,S=!0;else if(i.select&&typeof v.data<"u")if(l&&v.data===(u==null?void 0:u.data)&&i.select===this.selectFn)T=this.selectResult;else try{this.selectFn=i.select,T=i.select(v.data),i.structuralSharing!==!1&&(T=fl(l==null?void 0:l.data,T)),this.selectResult=T,this.selectError=null}catch(ce){hl().error(ce),this.selectError=ce}else T=v.data;if(typeof i.placeholderData<"u"&&typeof T>"u"&&(g==="loading"||g==="idle")){var $;if(l!=null&&l.isPlaceholderData&&i.placeholderData===(c==null?void 0:c.placeholderData))$=l.data;else if($=typeof i.placeholderData=="function"?i.placeholderData():i.placeholderData,i.select&&typeof $<"u")try{$=i.select($),i.structuralSharing!==!1&&($=fl(l==null?void 0:l.data,$)),this.selectError=null}catch(ce){hl().error(ce),this.selectError=ce}typeof $<"u"&&(g="success",T=$,k=!0)}this.selectError&&(_=this.selectError,T=this.selectResult,m=Date.now(),g="error");var X={status:g,isLoading:g==="loading",isSuccess:g==="success",isError:g==="error",isIdle:g==="idle",data:T,dataUpdatedAt:y,error:_,errorUpdatedAt:m,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>d.dataUpdateCount||v.errorUpdateCount>d.errorUpdateCount,isFetching:h,isRefetching:h&&g!=="loading",isLoadingError:g==="error"&&v.dataUpdatedAt===0,isPlaceholderData:k,isPreviousData:S,isRefetchError:g==="error"&&v.dataUpdatedAt!==0,isStale:qd(o,i),refetch:this.refetch,remove:this.remove};return X},n.shouldNotifyListeners=function(o,i){if(!i)return!0;var a=this.options,s=a.notifyOnChangeProps,l=a.notifyOnChangePropsExclusions;if(!s&&!l||s==="tracked"&&!this.trackedProps.length)return!0;var u=s==="tracked"?this.trackedProps:s;return Object.keys(o).some(function(c){var f=c,d=o[f]!==i[f],p=u==null?void 0:u.some(function(y){return y===c}),v=l==null?void 0:l.some(function(y){return y===c});return d&&!v&&(!u||p)})},n.updateResult=function(o){var i=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!nR(this.currentResult,i)){var a={cache:!0};(o==null?void 0:o.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,i)&&(a.listeners=!0),this.notify(de({},a,o))}},n.updateQuery=function(){var o=this.client.getQueryCache().build(this.client,this.options);if(o!==this.currentQuery){var i=this.currentQuery;this.currentQuery=o,this.currentQueryInitialState=o.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(i==null||i.removeObserver(this),o.addObserver(this))}},n.onQueryUpdate=function(o){var i={};o.type==="success"?i.onSuccess=!0:o.type==="error"&&!Es(o.error)&&(i.onError=!0),this.updateResult(i),this.hasListeners()&&this.updateTimers()},n.notify=function(o){var i=this;Ne.batch(function(){o.onSuccess?(i.options.onSuccess==null||i.options.onSuccess(i.currentResult.data),i.options.onSettled==null||i.options.onSettled(i.currentResult.data,null)):o.onError&&(i.options.onError==null||i.options.onError(i.currentResult.error),i.options.onSettled==null||i.options.onSettled(void 0,i.currentResult.error)),o.listeners&&i.listeners.forEach(function(a){a(i.currentResult)}),o.cache&&i.client.getQueryCache().notify({query:i.currentQuery,type:"observerResultsUpdated"})})},t}(ma);function yR(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Hv(e,t){return yR(e,t)||e.state.dataUpdatedAt>0&&df(e,t,t.refetchOnMount)}function df(e,t,n){if(t.enabled!==!1){var r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&qd(e,t)}return!1}function qv(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&qd(e,n)}function qd(e,t){return e.isStaleByTime(t.staleTime)}var wR=L0.unstable_batchedUpdates;Ne.setBatchNotifyFunction(wR);var SR=console;lR(SR);var Kv=V.createContext(void 0),G0=V.createContext(!1);function X0(e){return e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Kv),window.ReactQueryClientContext):Kv}var _R=function(){var t=V.useContext(X0(V.useContext(G0)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},bR=function(t){var n=t.client,r=t.contextSharing,o=r===void 0?!1:r,i=t.children;V.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var a=X0(o);return V.createElement(G0.Provider,{value:o},V.createElement(a.Provider,{value:n},i))};function ER(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var CR=V.createContext(ER()),RR=function(){return V.useContext(CR)};function OR(e,t,n){return typeof t=="function"?t.apply(void 0,n):typeof t=="boolean"?t:!!e}function xR(e,t){var n=V.useRef(!1),r=V.useState(0),o=r[1],i=_R(),a=RR(),s=i.defaultQueryObserverOptions(e);s.optimisticResults=!0,s.onError&&(s.onError=Ne.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=Ne.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=Ne.batchCalls(s.onSettled)),s.suspense&&(typeof s.staleTime!="number"&&(s.staleTime=1e3),s.cacheTime===0&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(a.isReset()||(s.retryOnMount=!1));var l=V.useState(function(){return new t(i,s)}),u=l[0],c=u.getOptimisticResult(s);if(V.useEffect(function(){n.current=!0,a.clearReset();var f=u.subscribe(Ne.batchCalls(function(){n.current&&o(function(d){return d+1})}));return u.updateResult(),function(){n.current=!1,f()}},[a,u]),V.useEffect(function(){u.setOptions(s,{listeners:!1})},[s,u]),s.suspense&&c.isLoading)throw u.fetchOptimistic(s).then(function(f){var d=f.data;s.onSuccess==null||s.onSuccess(d),s.onSettled==null||s.onSettled(d,null)}).catch(function(f){a.clearReset(),s.onError==null||s.onError(f),s.onSettled==null||s.onSettled(void 0,f)});if(c.isError&&!a.isReset()&&!c.isFetching&&OR(s.suspense,s.useErrorBoundary,[c.error,u.getCurrentQuery()]))throw c.error;return s.notifyOnChangeProps==="tracked"&&(c=u.trackResult(c,s)),c}function Y0(e,t,n){var r=_s(e,t,n);return xR(r,gR)}/** * @remix-run/router v1.3.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ta(){return ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function PR(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function TR(){return Math.random().toString(36).substr(2,8)}function Gv(e,t){return{usr:e.state,key:e.key,idx:t}}function hf(e,t,n,r){return n===void 0&&(n=null),ta({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?$r(t):t,{state:n,key:t&&t.key||r||TR()})}function na(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function $r(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function LR(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=jn.Pop,l=null,u=c();u==null&&(u=0,a.replaceState(ta({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function f(){s=jn.Pop;let _=c(),m=_==null?null:_-u;u=_,l&&l({action:s,location:y.location,delta:m})}function d(_,m){s=jn.Push;let h=hf(y.location,_,m);n&&n(h,_),u=c()+1;let g=Gv(h,u),S=y.createHref(h);try{a.pushState(g,"",S)}catch{o.location.assign(S)}i&&l&&l({action:s,location:y.location,delta:1})}function p(_,m){s=jn.Replace;let h=hf(y.location,_,m);n&&n(h,_),u=c();let g=Gv(h,u),S=y.createHref(h);a.replaceState(g,"",S),i&&l&&l({action:s,location:y.location,delta:0})}function v(_){let m=o.location.origin!=="null"?o.location.origin:o.location.href,h=typeof _=="string"?_:na(_);return Ue(m,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,m)}let y={get action(){return s},get location(){return e(o,a)},listen(_){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Qv,f),l=_,()=>{o.removeEventListener(Qv,f),l=null}},createHref(_){return t(o,_)},createURL:v,encodeLocation(_){let m=v(_);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:p,go(_){return a.go(_)}};return y}var Xv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Xv||(Xv={}));function NR(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?$r(t):t,o=e1(r.pathname||"/",n);if(o==null)return null;let i=J0(e);AR(i);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(Ue(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Yn([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(Ue(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),J0(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:jR(u,i.index),routesMeta:c})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of Z0(i.path))o(i,a,l)}),t}function Z0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=Z0(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function AR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:BR(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const IR=/^:\w+$/,MR=3,DR=2,$R=1,UR=10,FR=-2,Yv=e=>e==="*";function jR(e,t){let n=e.split("/"),r=n.length;return n.some(Yv)&&(r+=FR),t&&(r+=DR),n.filter(o=>!Yv(o)).reduce((o,i)=>o+(IR.test(i)?MR:i===""?$R:UR),r)}function BR(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function zR(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let a=0;a{if(c==="*"){let d=s[f]||"";a=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}return u[c]=qR(s[f]||"",c),u},{}),pathname:i,pathnameBase:a,pattern:e}}function WR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Kd(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,s)=>(r.push(s),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function HR(e){try{return decodeURI(e)}catch(t){return Kd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function qR(e,t){try{return decodeURIComponent(e)}catch(n){return Kd(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function e1(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Kd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function KR(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?$r(e):e;return{pathname:n?n.startsWith("/")?n:QR(n,t):t,search:XR(r),hash:YR(o)}}function QR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function zu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function t1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function n1(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=$r(e):(o=ta({},e),Ue(!o.pathname||!o.pathname.includes("?"),zu("?","pathname","search",o)),Ue(!o.pathname||!o.pathname.includes("#"),zu("#","pathname","hash",o)),Ue(!o.search||!o.search.includes("#"),zu("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(r||a==null)s=n;else{let f=t.length-1;if(a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),f-=1;o.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=KR(o,s),u=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Yn=e=>e.join("/").replace(/\/\/+/g,"/"),GR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),XR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,YR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function JR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ZR=["post","put","patch","delete"];[...ZR];/** * React Router v6.8.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function pf(){return pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.value=r,o.getSnapshot=t,Vu(o)&&i({inst:o})},[e,r,t]),rO(()=>(Vu(o)&&i({inst:o}),e(()=>{Vu(o)&&i({inst:o})})),[e]),iO(r),r}function Vu(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!tO(n,r)}catch{return!0}}function sO(e,t,n){return t()}const lO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",uO=!lO,cO=uO?sO:aO;"useSyncExternalStore"in Tt&&(e=>e.useSyncExternalStore)(Tt);const r1=L.createContext(null),o1=L.createContext(null),zl=L.createContext(null),Vl=L.createContext(null),$o=L.createContext({outlet:null,matches:[]}),i1=L.createContext(null);function fO(e,t){let{relative:n}=t===void 0?{}:t;ya()||Ue(!1);let{basename:r,navigator:o}=L.useContext(zl),{hash:i,pathname:a,search:s}=a1(e,{relative:n}),l=a;return r!=="/"&&(l=a==="/"?r:Yn([r,a])),o.createHref({pathname:l,search:s,hash:i})}function ya(){return L.useContext(Vl)!=null}function wa(){return ya()||Ue(!1),L.useContext(Vl).location}function dO(){ya()||Ue(!1);let{basename:e,navigator:t}=L.useContext(zl),{matches:n}=L.useContext($o),{pathname:r}=wa(),o=JSON.stringify(t1(n).map(s=>s.pathnameBase)),i=L.useRef(!1);return L.useEffect(()=>{i.current=!0}),L.useCallback(function(s,l){if(l===void 0&&(l={}),!i.current)return;if(typeof s=="number"){t.go(s);return}let u=n1(s,JSON.parse(o),r,l.relative==="path");e!=="/"&&(u.pathname=u.pathname==="/"?e:Yn([e,u.pathname])),(l.replace?t.replace:t.push)(u,l.state,l)},[e,t,o,r])}function a1(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=L.useContext($o),{pathname:o}=wa(),i=JSON.stringify(t1(r).map(a=>a.pathnameBase));return L.useMemo(()=>n1(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function s1(e,t){ya()||Ue(!1);let{navigator:n}=L.useContext(zl),r=L.useContext(o1),{matches:o}=L.useContext($o),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let l=wa(),u;if(t){var c;let y=typeof t=="string"?$r(t):t;s==="/"||(c=y.pathname)!=null&&c.startsWith(s)||Ue(!1),u=y}else u=l;let f=u.pathname||"/",d=s==="/"?f:f.slice(s.length)||"/",p=NR(e,{pathname:d}),v=mO(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Yn([s,n.encodeLocation?n.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:Yn([s,n.encodeLocation?n.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,r||void 0);return t&&v?L.createElement(Vl.Provider,{value:{location:pf({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:jn.Pop}},v):v}function hO(){let e=SO(),t=JR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},t),n?L.createElement("pre",{style:o},n):null,i)}class pO extends L.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?L.createElement($o.Provider,{value:this.props.routeContext},L.createElement(i1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function vO(e){let{routeContext:t,match:n,children:r}=e,o=L.useContext(r1);return o&&o.static&&o.staticContext&&n.route.errorElement&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),L.createElement($o.Provider,{value:t},r)}function mO(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,o=n==null?void 0:n.errors;if(o!=null){let i=r.findIndex(a=>a.route.id&&(o==null?void 0:o[a.route.id]));i>=0||Ue(!1),r=r.slice(0,Math.min(r.length,i+1))}return r.reduceRight((i,a,s)=>{let l=a.route.id?o==null?void 0:o[a.route.id]:null,u=n?a.route.errorElement||L.createElement(hO,null):null,c=t.concat(r.slice(0,s+1)),f=()=>L.createElement(vO,{match:a,routeContext:{outlet:i,matches:c}},l?u:a.route.element!==void 0?a.route.element:i);return n&&(a.route.errorElement||s===0)?L.createElement(pO,{location:n.location,component:u,error:l,children:f(),routeContext:{outlet:null,matches:c}}):f()},null)}var Jv;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(Jv||(Jv={}));var pl;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(pl||(pl={}));function gO(e){let t=L.useContext(o1);return t||Ue(!1),t}function yO(e){let t=L.useContext($o);return t||Ue(!1),t}function wO(e){let t=yO(),n=t.matches[t.matches.length-1];return n.route.id||Ue(!1),n.route.id}function SO(){var e;let t=L.useContext(i1),n=gO(pl.UseRouteError),r=wO(pl.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function vf(e){Ue(!1)}function _O(e){let{basename:t="/",children:n=null,location:r,navigationType:o=jn.Pop,navigator:i,static:a=!1}=e;ya()&&Ue(!1);let s=t.replace(/^\/*/,"/"),l=L.useMemo(()=>({basename:s,navigator:i,static:a}),[s,i,a]);typeof r=="string"&&(r=$r(r));let{pathname:u="/",search:c="",hash:f="",state:d=null,key:p="default"}=r,v=L.useMemo(()=>{let y=e1(u,s);return y==null?null:{pathname:y,search:c,hash:f,state:d,key:p}},[s,u,c,f,d,p]);return v==null?null:L.createElement(zl.Provider,{value:l},L.createElement(Vl.Provider,{children:n,value:{location:v,navigationType:o}}))}function bO(e){let{children:t,location:n}=e,r=L.useContext(r1),o=r&&!t?r.router.routes:mf(t);return s1(o,n)}var Zv;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Zv||(Zv={}));new Promise(()=>{});function mf(e,t){t===void 0&&(t=[]);let n=[];return L.Children.forEach(e,(r,o)=>{if(!L.isValidElement(r))return;if(r.type===L.Fragment){n.push.apply(n,mf(r.props.children,t));return}r.type!==vf&&Ue(!1),!r.props.index||!r.props.children||Ue(!1);let i=[...t,o],a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(a.children=mf(r.props.children,i)),n.push(a)}),n}/** * React Router DOM v6.8.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function gf(){return gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function CO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function RO(e,t){return e.button===0&&(!t||t==="_self")&&!CO(e)}const OO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function xO(e){let{basename:t,children:n,window:r}=e,o=L.useRef();o.current==null&&(o.current=kR({window:r,v5Compat:!0}));let i=o.current,[a,s]=L.useState({action:i.action,location:i.location});return L.useLayoutEffect(()=>i.listen(s),[i]),L.createElement(_O,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i})}const kO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",l1=L.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:u,preventScrollReset:c}=t,f=EO(t,OO),d=typeof u=="string"?u:na(u),p=/^[a-z+]+:\/\//i.test(d)||d.startsWith("//"),v=d,y=!1;if(kO&&p){let g=new URL(window.location.href),S=d.startsWith("//")?new URL(g.protocol+d):new URL(d);S.origin===g.origin?v=S.pathname+S.search+S.hash:y=!0}let _=fO(v,{relative:o}),m=PO(v,{replace:a,state:s,target:l,preventScrollReset:c,relative:o});function h(g){r&&r(g),g.defaultPrevented||m(g)}return L.createElement("a",gf({},f,{href:p?d:_,onClick:y||i?r:h,ref:n,target:l}))});var em;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(em||(em={}));var tm;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(tm||(tm={}));function PO(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a}=t===void 0?{}:t,s=dO(),l=wa(),u=a1(e,{relative:a});return L.useCallback(c=>{if(RO(c,n)){c.preventDefault();let f=r!==void 0?r:na(l)===na(u);s(e,{replace:f,state:o,preventScrollReset:i,relative:a})}},[l,s,u,r,o,n,e,i,a])}function TO(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var LO=TO,se=LO;function NO(e){return!!e&&typeof e.then=="function"}var Re=NO;function AO(e,t){if(e!=null)return e;throw se(t??"Got unexpected null or undefined")}var Oe=AO;function ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Wl{getValue(){throw se("BaseLoadable")}toPromise(){throw se("BaseLoadable")}valueMaybe(){throw se("BaseLoadable")}valueOrThrow(){throw se(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw se("BaseLoadable")}promiseOrThrow(){throw se(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw se("BaseLoadable")}errorOrThrow(){throw se(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw se("BaseLoadable")}}class IO extends Wl{constructor(t){super(),ie(this,"state","hasValue"),ie(this,"contents",void 0),this.contents=t}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(t){try{const n=t(this.contents);return Re(n)?Lr(n):Ro(n)?n:Sa(n)}catch(n){return Re(n)?Lr(n.next(()=>this.map(t))):Hl(n)}}}class MO extends Wl{constructor(t){super(),ie(this,"state","hasError"),ie(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(t){return this}}class u1 extends Wl{constructor(t){super(),ie(this,"state","loading"),ie(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(t){return Lr(this.contents.then(n=>{const r=t(n);if(Ro(r)){const o=r;switch(o.state){case"hasValue":return o.contents;case"hasError":throw o.contents;case"loading":return o.contents}}return r}).catch(n=>{if(Re(n))return n.then(()=>this.map(t).contents);throw n}))}}function Sa(e){return Object.freeze(new IO(e))}function Hl(e){return Object.freeze(new MO(e))}function Lr(e){return Object.freeze(new u1(e))}function c1(){return Object.freeze(new u1(new Promise(()=>{})))}function DO(e){return e.every(t=>t.state==="hasValue")?Sa(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?Hl(Oe(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):Lr(Promise.all(e.map(t=>t.contents)))}function f1(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(o=>e[o])).map(o=>Ro(o)?o:Re(o)?Lr(o):Sa(o)),r=DO(n);return Array.isArray(e)?r:r.map(o=>Object.getOwnPropertyNames(e).reduce((i,a,s)=>({...i,[a]:o[s]}),{}))}function Ro(e){return e instanceof Wl}const $O={of:e=>Re(e)?Lr(e):Ro(e)?e:Sa(e),error:e=>Hl(e),loading:()=>c1(),all:f1,isLoadable:Ro};var Ur={loadableWithValue:Sa,loadableWithError:Hl,loadableWithPromise:Lr,loadableLoading:c1,loadableAll:f1,isLoadable:Ro,RecoilLoadable:$O},UO=Ur.loadableWithValue,FO=Ur.loadableWithError,jO=Ur.loadableWithPromise,BO=Ur.loadableLoading,zO=Ur.loadableAll,VO=Ur.isLoadable,WO=Ur.RecoilLoadable,_a=Object.freeze({__proto__:null,loadableWithValue:UO,loadableWithError:FO,loadableWithPromise:jO,loadableLoading:BO,loadableAll:zO,isLoadable:VO,RecoilLoadable:WO});const ql=new Map().set("recoil_hamt_2020",!0).set("recoil_sync_external_store",!0).set("recoil_suppress_rerender_in_callback",!0).set("recoil_memory_managament_2020",!0);function Kl(e){var t;return(t=ql.get(e))!==null&&t!==void 0?t:!1}Kl.setPass=e=>{ql.set(e,!0)};Kl.setFail=e=>{ql.set(e,!1)};Kl.clear=()=>{ql.clear()};var ge=Kl;function HO(e,t,{error:n}={}){return null}var qO=HO,Qd=qO,Wu,Hu,qu;const KO=(Wu=V.createMutableSource)!==null&&Wu!==void 0?Wu:V.unstable_createMutableSource,d1=(Hu=V.useMutableSource)!==null&&Hu!==void 0?Hu:V.unstable_useMutableSource,h1=(qu=V.useSyncExternalStore)!==null&&qu!==void 0?qu:V.unstable_useSyncExternalStore;function QO(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;return((e=t==null?void 0:t.current)!==null&&e!==void 0?e:n.currentDispatcher).useSyncExternalStore!=null}function GO(){return ge("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:ge("recoil_sync_external_store")&&h1!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:ge("recoil_mutable_source")&&d1!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?ge("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:ge("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function XO(){return!1}var ba={createMutableSource:KO,useMutableSource:d1,useSyncExternalStore:h1,currentRendererSupportsUseSyncExternalStore:QO,reactMode:GO,isFastRefreshEnabled:XO};const p1={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0};function YO(){var e,t,n;if(typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)==null)return;const r=(t={}.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED)===null||t===void 0||(n=t.toLowerCase())===null||n===void 0?void 0:n.trim();if(r==null||r==="")return;if(!["true","false"].includes(r))throw se(`({}).RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED value must be 'true', 'false', or empty: ${r}`);p1.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=r==="true"}YO();var v1=p1;class Gd{constructor(t){ie(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class m1 extends Gd{}class g1 extends Gd{}function JO(e){return e instanceof m1||e instanceof g1}var Ql={AbstractRecoilValue:Gd,RecoilState:m1,RecoilValueReadOnly:g1,isRecoilValue:JO},ZO=Ql.AbstractRecoilValue,ex=Ql.RecoilState,tx=Ql.RecoilValueReadOnly,nx=Ql.isRecoilValue,Oo=Object.freeze({__proto__:null,AbstractRecoilValue:ZO,RecoilState:ex,RecoilValueReadOnly:tx,isRecoilValue:nx});function rx(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var Gl=rx;class y1{}const ox=new y1,Nr=new Map,Xd=new Map;function ix(e){return Gl(e,t=>Oe(Xd.get(t)))}function ax(e){if(Nr.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in production. But it is safe to ignore this warning if it occurred because of hot module replacement.`;console.warn(t)}}function sx(e){v1.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&ax(e.key),Nr.set(e.key,e);const t=e.set==null?new Oo.RecoilValueReadOnly(e.key):new Oo.RecoilState(e.key);return Xd.set(e.key,t),t}class w1 extends Error{}function lx(e){const t=Nr.get(e);if(t==null)throw new w1(`Missing definition for RecoilValue: "${e}""`);return t}function ux(e){return Nr.get(e)}const vl=new Map;function cx(e){var t;if(!ge("recoil_memory_managament_2020"))return;const n=Nr.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;Nr.delete(e),(r=S1(e))===null||r===void 0||r(),vl.delete(e)}}function fx(e,t){ge("recoil_memory_managament_2020")&&(t===void 0?vl.delete(e):vl.set(e,t))}function S1(e){return vl.get(e)}var ft={nodes:Nr,recoilValues:Xd,registerNode:sx,getNode:lx,getNodeMaybe:ux,deleteNodeConfigIfPossible:cx,setConfigDeletionHandler:fx,getConfigDeletionHandler:S1,recoilValuesForKeys:ix,NodeMissingError:w1,DefaultValue:y1,DEFAULT_VALUE:ox};function dx(e,t){t()}var hx={enqueueExecution:dx};function px(e,t){return t={exports:{}},e(t,t.exports),t.exports}var vx=px(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},n={},r=5,o=Math.pow(2,r),i=o-1,a=o/2,s=o/4,l={},u=function(E){return function(){return E}},c=n.hash=function(x){var E=typeof x>"u"?"undefined":t(x);if(E==="number")return x;E!=="string"&&(x+="");for(var F=0,H=0,q=x.length;H>1&1431655765,E=(E&858993459)+(E>>2&858993459),E=E+(E>>4)&252645135,E+=E>>8,E+=E>>16,E&127},d=function(E,F){return F>>>E&i},p=function(E){return 1<=F;)q[ne--]=q[ne];return q[F]=H,q}for(var ee=0,te=0,ue=new Array(Q+1);ee>>=1;return ne[F]=H,X(E,te+1,ne)},w=function(E,F,H,q){for(var Q=new Array(F-1),ne=0,ee=0,te=0,ue=q.length;te1?G(E,this.hash,ue):ue[0]}var Ee=q();return Ee===l?this:(++ee.value,P(E,H,this.hash,this,Q,I(E,Q,ne,Ee)))},D=function(E,F,H,q,Q,ne,ee){var te=this.mask,ue=this.children,Ee=d(H,Q),ot=p(Ee),Fe=v(te,ot),bt=te&ot,Mt=bt?ue[Fe]:T,zr=Mt._modify(E,F,H+r,q,Q,ne,ee);if(Mt===zr)return this;var ka=C(E,this),zo=te,Vo=void 0;if(bt&&N(zr)){if(zo&=~ot,!zo)return T;if(ue.length<=2&&ce(ue[Fe^1]))return ue[Fe^1];Vo=_(ka,Fe,ue)}else if(!bt&&!N(zr)){if(ue.length>=a)return re(E,Ee,zr,te,ue);zo|=ot,Vo=m(ka,Fe,zr,ue)}else Vo=y(ka,Fe,zr,ue);return ka?(this.mask=zo,this.children=Vo,this):$(E,zo,Vo)},z=function(E,F,H,q,Q,ne,ee){var te=this.size,ue=this.children,Ee=d(H,Q),ot=ue[Ee],Fe=(ot||T)._modify(E,F,H+r,q,Q,ne,ee);if(ot===Fe)return this;var bt=C(E,this),Mt=void 0;if(N(ot)&&!N(Fe))++te,Mt=y(bt,Ee,Fe,ue);else if(!N(ot)&&N(Fe)){if(--te,te<=s)return w(E,te,Ee,ue);Mt=y(bt,Ee,T,ue)}else Mt=y(bt,Ee,Fe,ue);return bt?(this.size=te,this.children=Mt,this):X(E,te,Mt)};T._modify=function(x,E,F,H,q,Q,ne){var ee=H();return ee===l?T:(++ne.value,I(x,q,Q,ee))};function b(x,E,F,H,q){this._editable=x,this._edit=E,this._config=F,this._root=H,this._size=q}b.prototype.setTree=function(x,E){return this._editable?(this._root=x,this._size=E,this):x===this._root?this:new b(this._editable,this._edit,this._config,x,E)};var U=n.tryGetHash=function(x,E,F,H){for(var q=H._root,Q=0,ne=H._config.keyEq;;)switch(q.type){case h:return ne(F,q.key)?q.value:x;case g:{if(E===q.hash)for(var ee=q.children,te=0,ue=ee.length;te{n.set(o,t(r,o))}),n}var ml=_x;function bx(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function Ex(e){return{nodeDeps:ml(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:ml(e.nodeToNodeSubscriptions,t=>new Set(t))}}function Ku(e,t,n,r){const{nodeDeps:o,nodeToNodeSubscriptions:i}=n,a=o.get(e);if(a&&r&&a!==r.nodeDeps.get(e))return;o.set(e,t);const s=a==null?t:Oi(t,a);for(const l of s)i.has(l)||i.set(l,new Set),Oe(i.get(l)).add(e);if(a){const l=Oi(a,t);for(const u of l){if(!i.has(u))return;const c=Oe(i.get(u));c.delete(e),c.size===0&&i.delete(u)}}}function Cx(e,t,n,r){var o,i,a,s;const l=n.getState();r===l.currentTree.version||r===((o=l.nextTree)===null||o===void 0?void 0:o.version)||((i=l.previousTree)===null||i===void 0||i.version);const u=n.getGraph(r);if(Ku(e,t,u),r===((a=l.previousTree)===null||a===void 0?void 0:a.version)){const f=n.getGraph(l.currentTree.version);Ku(e,t,f,u)}if(r===((s=l.previousTree)===null||s===void 0?void 0:s.version)||r===l.currentTree.version){var c;const f=(c=l.nextTree)===null||c===void 0?void 0:c.version;if(f!==void 0){const d=n.getGraph(f);Ku(e,t,d,u)}}}var Ea={cloneGraph:Ex,graph:bx,saveDepsToStore:Cx};let Rx=0;const Ox=()=>Rx++;let xx=0;const kx=()=>xx++;let Px=0;const Tx=()=>Px++;var Xl={getNextTreeStateVersion:Ox,getNextStoreID:kx,getNextComponentID:Tx};const{persistentMap:nm}=wx,{graph:Lx}=Ea,{getNextTreeStateVersion:_1}=Xl;function b1(){const e=_1();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:nm(),nonvalidatedAtoms:nm()}}function Nx(){const e=b1();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(e.version,Lx()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var E1={makeEmptyTreeState:b1,makeEmptyStoreState:Nx,getNextTreeStateVersion:_1};class C1{}function Ax(){return new C1}var Yl={RetentionZone:C1,retentionZone:Ax};function Ix(e,t){const n=new Set(e);return n.add(t),n}function Mx(e,t){const n=new Set(e);return n.delete(t),n}function Dx(e,t,n){const r=new Map(e);return r.set(t,n),r}function $x(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function Ux(e,t){const n=new Map(e);return n.delete(t),n}function Fx(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var R1={setByAddingToSet:Ix,setByDeletingFromSet:Mx,mapBySettingInMap:Dx,mapByUpdatingInMap:$x,mapByDeletingFromMap:Ux,mapByDeletingMultipleFromMap:Fx};function*jx(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var Zd=jx;function Bx(e,t){return new Proxy(e,{get:(r,o)=>(!(o in r)&&o in t&&(r[o]=t[o]()),r[o]),ownKeys:r=>Object.keys(r)})}var O1=Bx;const{getNode:Ca,getNodeMaybe:zx,recoilValuesForKeys:rm}=ft,{RetentionZone:om}=Yl,{setByAddingToSet:Vx}=R1,Wx=Object.freeze(new Set);class Hx extends Error{}function qx(e,t,n){if(!ge("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function o(i){let a=r.get(i);a||r.set(i,a=new Set),a.add(t)}if(n instanceof om)o(n);else if(Array.isArray(n))for(const i of n)o(i);return()=>{if(!ge("recoil_memory_managament_2020"))return;const{retention:i}=e.getState();function a(s){const l=i.nodesRetainedByZone.get(s);l==null||l.delete(t),l&&l.size===0&&i.nodesRetainedByZone.delete(s)}if(n instanceof om)a(n);else if(Array.isArray(n))for(const s of n)a(s)}}function eh(e,t,n,r){const o=e.getState();if(o.nodeCleanupFunctions.has(n))return;const i=Ca(n),a=qx(e,n,i.retainedBy),s=i.init(e,t,r);o.nodeCleanupFunctions.set(n,()=>{s(),a()})}function Kx(e,t,n){eh(e,e.getState().currentTree,t,n)}function Qx(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function Gx(e,t,n){return eh(e,t,n,"get"),Ca(n).get(e,t)}function x1(e,t,n){return Ca(n).peek(e,t)}function Xx(e,t,n){var r;const o=zx(t);return o==null||(r=o.invalidate)===null||r===void 0||r.call(o,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:Vx(e.dirtyAtoms,t)}}function Yx(e,t,n,r){const o=Ca(n);if(o.set==null)throw new Hx(`Attempt to set read-only RecoilValue: ${n}`);const i=o.set;return eh(e,t,n,"set"),i(e,t,r)}function Jx(e,t,n){const r=e.getState(),o=e.getGraph(t.version),i=Ca(n).nodeType;return O1({type:i},{loadable:()=>x1(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>i==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var a;return rm((a=o.nodeDeps.get(n))!==null&&a!==void 0?a:[])},subscribers:()=>{var a,s;return{nodes:rm(Zd(k1(e,t,new Set([n])),l=>l!==n)),components:Gl((a=(s=r.nodeToComponentSubscriptions.get(n))===null||s===void 0?void 0:s.values())!==null&&a!==void 0?a:[],([l])=>({name:l}))}}})}function k1(e,t,n){const r=new Set,o=Array.from(n),i=e.getGraph(t.version);for(let s=o.pop();s;s=o.pop()){var a;r.add(s);const l=(a=i.nodeToNodeSubscriptions.get(s))!==null&&a!==void 0?a:Wx;for(const u of l)r.has(u)||o.push(u)}return r}var ir={getNodeLoadable:Gx,peekNodeLoadable:x1,setNodeValue:Yx,initializeNode:Kx,cleanUpNode:Qx,setUnvalidatedAtomValue_DEPRECATED:Xx,peekNodeInfo:Jx,getDownstreamNodes:k1};let P1=null;function Zx(e){P1=e}function ek(){var e;(e=P1)===null||e===void 0||e()}var T1={setInvalidateMemoizedSnapshot:Zx,invalidateMemoizedSnapshot:ek};const{getDownstreamNodes:tk,getNodeLoadable:L1,setNodeValue:nk}=ir,{getNextComponentID:rk}=Xl,{getNode:ok,getNodeMaybe:N1}=ft,{DefaultValue:th}=ft,{reactMode:ik}=ba,{AbstractRecoilValue:ak,RecoilState:sk,RecoilValueReadOnly:lk,isRecoilValue:uk}=Oo,{invalidateMemoizedSnapshot:ck}=T1;function fk(e,{key:t},n=e.getState().currentTree){var r,o;const i=e.getState();n.version===i.currentTree.version||n.version===((r=i.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(o=i.previousTree)===null||o===void 0||o.version);const a=L1(e,n,t);return a.state==="loading"&&a.contents.catch(()=>{}),a}function dk(e,t){const n=e.clone();return t.forEach((r,o)=>{r.state==="hasValue"&&r.contents instanceof th?n.delete(o):n.set(o,r)}),n}function hk(e,t,{key:n},r){if(typeof r=="function"){const o=L1(e,t,n);if(o.state==="loading"){const i=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw se(i)}else if(o.state==="hasError")throw o.contents;return r(o.contents)}else return r}function pk(e,t,n){if(n.type==="set"){const{recoilValue:o,valueOrUpdater:i}=n,a=hk(e,t,o,i),s=nk(e,t,o.key,a);for(const[l,u]of s.entries())yf(t,l,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:o},loadable:i}=n;yf(t,o,i)}else if(n.type==="markModified"){const{recoilValue:{key:o}}=n;t.dirtyAtoms.add(o)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:o},unvalidatedValue:i}=n,a=N1(o);a==null||(r=a.invalidate)===null||r===void 0||r.call(a,t),t.atomValues.delete(o),t.nonvalidatedAtoms.set(o,i),t.dirtyAtoms.add(o)}else Qd(`Unknown action ${n.type}`)}function yf(e,t,n){n.state==="hasValue"&&n.contents instanceof th?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function A1(e,t){e.replaceState(n=>{const r=I1(n);for(const o of t)pk(e,r,o);return M1(e,r),ck(),r})}function Jl(e,t){if(xi.length){const n=xi[xi.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else A1(e,[t])}const xi=[];function vk(){const e=new Map;return xi.push(e),()=>{for(const[t,n]of e)A1(t,n);xi.pop()}}function I1(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function M1(e,t){const n=tk(e,t,t.dirtyAtoms);for(const i of n){var r,o;(r=N1(i))===null||r===void 0||(o=r.invalidate)===null||o===void 0||o.call(r,t)}}function D1(e,t,n){Jl(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function mk(e,t,n){if(n instanceof th)return D1(e,t,n);Jl(e,{type:"setLoadable",recoilValue:t,loadable:n})}function gk(e,t){Jl(e,{type:"markModified",recoilValue:t})}function yk(e,t,n){Jl(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function wk(e,{key:t},n,r=null){const o=rk(),i=e.getState();i.nodeToComponentSubscriptions.has(t)||i.nodeToComponentSubscriptions.set(t,new Map),Oe(i.nodeToComponentSubscriptions.get(t)).set(o,[r??"",n]);const a=ik();if(a.early&&(a.mode==="LEGACY"||a.mode==="MUTABLE_SOURCE")){const s=e.getState().nextTree;s&&s.dirtyAtoms.has(t)&&n(s)}return{release:()=>{const s=e.getState(),l=s.nodeToComponentSubscriptions.get(t);l===void 0||!l.has(o)||(l.delete(o),l.size===0&&s.nodeToComponentSubscriptions.delete(t))}}}function Sk(e,t){var n;const{currentTree:r}=e.getState(),o=ok(t.key);(n=o.clearCache)===null||n===void 0||n.call(o,e,r)}var fn={RecoilValueReadOnly:lk,AbstractRecoilValue:ak,RecoilState:sk,getRecoilValueAsLoadable:fk,setRecoilValue:D1,setRecoilValueLoadable:mk,markRecoilValueModified:gk,setUnvalidatedRecoilValue:yk,subscribeToRecoilValue:wk,isRecoilValue:uk,applyAtomValueWrites:dk,batchStart:vk,writeLoadableToTreeState:yf,invalidateDownstreams:M1,copyTreeState:I1,refreshRecoilValue:Sk};function _k(e,t,n){const r=e.entries();let o=r.next();for(;!o.done;){const i=o.value;if(t.call(n,i[1],i[0],e))return!0;o=r.next()}return!1}var bk=_k;const{cleanUpNode:Ek}=ir,{deleteNodeConfigIfPossible:Ck,getNode:$1}=ft,{RetentionZone:U1}=Yl,Rk=12e4,F1=new Set;function j1(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const o=new Set;for(const a of t)if(a instanceof U1)for(const s of Pk(n,a))o.add(s);else o.add(a);const i=Ok(e,o);for(const a of i)kk(e,r,a)}function Ok(e,t){const n=e.getState(),r=n.currentTree,o=e.getGraph(r.version),i=new Set,a=new Set;return s(t),i;function s(l){const u=new Set,c=xk(e,r,l,i,a);for(const v of c){var f;if($1(v).retainedBy==="recoilRoot"){a.add(v);continue}if(((f=n.retention.referenceCounts.get(v))!==null&&f!==void 0?f:0)>0){a.add(v);continue}if(B1(v).some(_=>n.retention.referenceCounts.get(_))){a.add(v);continue}const y=o.nodeToNodeSubscriptions.get(v);if(y&&bk(y,_=>a.has(_))){a.add(v);continue}i.add(v),u.add(v)}const d=new Set;for(const v of u)for(const y of(p=o.nodeDeps.get(v))!==null&&p!==void 0?p:F1){var p;i.has(y)||d.add(y)}d.size&&s(d)}}function xk(e,t,n,r,o){const i=e.getGraph(t.version),a=[],s=new Set;for(;n.size>0;)l(Oe(n.values().next().value));return a;function l(u){if(r.has(u)||o.has(u)){n.delete(u);return}if(s.has(u))return;const c=i.nodeToNodeSubscriptions.get(u);if(c)for(const f of c)l(f);s.add(u),n.delete(u),a.push(u)}}function kk(e,t,n){if(!ge("recoil_memory_managament_2020"))return;Ek(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const o=B1(n);for(const l of o){var i;(i=r.retention.nodesRetainedByZone.get(l))===null||i===void 0||i.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const a=r.graphsByVersion.get(t.version);if(a){const l=a.nodeDeps.get(n);if(l!==void 0){a.nodeDeps.delete(n);for(const u of l){var s;(s=a.nodeToNodeSubscriptions.get(u))===null||s===void 0||s.delete(n)}}a.nodeToNodeSubscriptions.delete(n)}Ck(n)}function Pk(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:F1}function B1(e){const t=$1(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof U1?[t]:t}function Tk(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):j1(e,new Set([t]))}function Lk(e,t,n){var r;if(!ge("recoil_memory_managament_2020"))return;const o=e.getState().retention.referenceCounts,i=((r=o.get(t))!==null&&r!==void 0?r:0)+n;i===0?z1(e,t):o.set(t,i)}function z1(e,t){if(!ge("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),Tk(e,t)}function Nk(e){if(!ge("recoil_memory_managament_2020"))return;const t=e.getState();j1(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function Ak(e){return e===void 0?"recoilRoot":e}var Fr={SUSPENSE_TIMEOUT_MS:Rk,updateRetainCount:Lk,updateRetainCountToZero:z1,releaseScheduledRetainablesNow:Nk,retainedByOptionWithDefault:Ak};const{unstable_batchedUpdates:Ik}=L0;var Mk={unstable_batchedUpdates:Ik};const{unstable_batchedUpdates:Dk}=Mk;var $k={unstable_batchedUpdates:Dk};const{batchStart:Uk}=fn,{unstable_batchedUpdates:Fk}=$k;let nh=Fk;const jk=e=>{nh=e},Bk=()=>nh,zk=e=>{nh(()=>{let t=()=>{};try{t=Uk(),e()}finally{t()}})};var Zl={getBatcher:Bk,setBatcher:jk,batchUpdates:zk};function*Vk(e){for(const t of e)for(const n of t)yield n}var V1=Vk;const W1=typeof Window>"u"||typeof window>"u",Wk=e=>!W1&&(e===window||e instanceof Window),Hk=typeof navigator<"u"&&navigator.product==="ReactNative";var rh={isSSR:W1,isReactNative:Hk,isWindow:Wk};function qk(e,t){let n;return(...o)=>{n||(n={});const i=t(...o);return Object.hasOwnProperty.call(n,i)||(n[i]=e(...o)),n[i]}}function Kk(e,t){let n,r;return(...i)=>{const a=t(...i);return n===a||(n=a,r=e(...i)),r}}function Qk(e,t){let n,r;return[(...a)=>{const s=t(...a);return n===s||(n=s,r=e(...a)),r},()=>{n=null}]}var Gk={memoizeWithArgsHash:qk,memoizeOneWithArgsHash:Kk,memoizeOneWithArgsHashAndInvalidation:Qk};const{batchUpdates:wf}=Zl,{initializeNode:Xk,peekNodeInfo:Yk}=ir,{graph:Jk}=Ea,{getNextStoreID:Zk}=Xl,{DEFAULT_VALUE:eP,recoilValues:im,recoilValuesForKeys:am}=ft,{AbstractRecoilValue:tP,getRecoilValueAsLoadable:nP,setRecoilValue:sm,setUnvalidatedRecoilValue:rP}=fn,{updateRetainCount:Cs}=Fr,{setInvalidateMemoizedSnapshot:oP}=T1,{getNextTreeStateVersion:iP,makeEmptyStoreState:aP}=E1,{isSSR:sP}=rh,{memoizeOneWithArgsHashAndInvalidation:lP}=Gk;class eu{constructor(t,n){ie(this,"_store",void 0),ie(this,"_refCount",1),ie(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),nP(this._store,r))),ie(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),ie(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const a=this._store.getState().currentTree;return am(a.dirtyAtoms)}const o=this._store.getState().knownAtoms,i=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?im.values():r.isInitialized===!0?am(V1([o,i])):Zd(im.values(),({key:a})=>!o.has(a)&&!i.has(a))}),ie(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),Yk(this._store,this._store.getState().currentTree,r))),ie(this,"map",r=>{this.checkRefCount_INTERNAL();const o=new Sf(this,wf);return r(o),o}),ie(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const o=new Sf(this,wf);return o.retain(),await r(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:Zk(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const o=t.graphsByVersion;if(o.has(r))return Oe(o.get(r));const i=Jk();return o.set(r,i),i},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw se("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)Xk(this._store,r,"get"),Cs(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){sP||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!ge("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){ge("recoil_memory_managament_2020")&&this._refCount<=0}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function H1(e,t,n=!1){const r=e.getState(),o=n?iP():t.version;return{currentTree:{version:n?o:t.version,stateID:n?o:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(o,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Gl(r.nodeCleanupFunctions.entries(),([i])=>[i,()=>{}]))}}function uP(e){const t=new eu(aP());return e!=null?t.map(e):t}const[lm,q1]=lP((e,t)=>{var n;const r=e.getState(),o=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:Oe(r.previousTree);return new eu(H1(e,o),e.storeID)},(e,t)=>{var n,r;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((r=e.getState().previousTree)===null||r===void 0?void 0:r.version)});oP(q1);function cP(e,t="latest"){const n=lm(e,t);return n.isRetained()?n:(q1(),lm(e,t))}class Sf extends eu{constructor(t,n){super(H1(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),ie(this,"_batch",void 0),ie(this,"set",(r,o)=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{Cs(i,r.key,1),sm(this.getStore_INTERNAL(),r,o)})}),ie(this,"reset",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{Cs(o,r.key,1),sm(this.getStore_INTERNAL(),r,eP)})}),ie(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();wf(()=>{for(const[i,a]of r.entries())Cs(o,i,1),rP(o,new tP(i),a)})}),this._batch=n}}var tu={Snapshot:eu,MutableSnapshot:Sf,freshSnapshot:uP,cloneSnapshot:cP},fP=tu.Snapshot,dP=tu.MutableSnapshot,hP=tu.freshSnapshot,pP=tu.cloneSnapshot,nu=Object.freeze({__proto__:null,Snapshot:fP,MutableSnapshot:dP,freshSnapshot:hP,cloneSnapshot:pP});function vP(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var mP=vP;const{useRef:gP}=V;function yP(e){const t=gP(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var um=yP;const{getNextTreeStateVersion:wP,makeEmptyStoreState:K1}=E1,{cleanUpNode:SP,getDownstreamNodes:_P,initializeNode:bP,setNodeValue:EP,setUnvalidatedAtomValue_DEPRECATED:CP}=ir,{graph:RP}=Ea,{cloneGraph:OP}=Ea,{getNextStoreID:Q1}=Xl,{createMutableSource:Qu,reactMode:G1}=ba,{applyAtomValueWrites:xP}=fn,{releaseScheduledRetainablesNow:X1}=Fr,{freshSnapshot:kP}=nu,{useCallback:PP,useContext:Y1,useEffect:_f,useMemo:TP,useRef:LP,useState:NP}=V;function ni(){throw se("This component must be used inside a component.")}const J1=Object.freeze({storeID:Q1(),getState:ni,replaceState:ni,getGraph:ni,subscribeToTransactions:ni,addTransactionMetadata:ni});let bf=!1;function cm(e){if(bf)throw se("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){ge("recoil_memory_managament_2020")&&ge("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&X1(e);const n=t.currentTree.version,r=wP();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,OP(Oe(t.graphsByVersion.get(n))))}}const Z1=V.createContext({current:J1}),ru=()=>Y1(Z1),ew=V.createContext(null);function AP(){return Y1(ew)}function oh(e,t,n){const r=_P(e,n,n.dirtyAtoms);for(const o of r){const i=t.nodeToComponentSubscriptions.get(o);if(i)for(const[a,[s,l]]of i)l(n)}}function tw(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[o,i]of t.nodeTransactionSubscriptions)if(r.has(o))for(const[a,s]of i)s(e);for(const[o,i]of t.transactionSubscriptions)i(e);(!G1().early||t.suspendedComponentResolvers.size>0)&&(oh(e,t,n),t.suspendedComponentResolvers.forEach(o=>o()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(o=>o(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function IP(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,tw(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):Qd("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,ge("recoil_memory_managament_2020")&&n==null&&X1(e)}finally{t.commitDepth--}}function MP({setNotifyBatcherOfChange:e}){const t=ru(),[,n]=NP([]);return e(()=>n({})),_f(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),_f(()=>{hx.enqueueExecution("Batcher",()=>{IP(t.current)})}),null}function DP(e,t){const n=K1();return t({set:(r,o)=>{const i=n.currentTree,a=EP(e,i,r.key,o),s=new Set(a.keys()),l=i.nonvalidatedAtoms.clone();for(const u of s)l.delete(u);n.currentTree={...i,dirtyAtoms:mP(i.dirtyAtoms,s),atomValues:xP(i.atomValues,a),nonvalidatedAtoms:l}},setUnvalidatedAtomValues:r=>{r.forEach((o,i)=>{n.currentTree=CP(n.currentTree,i,o)})}}),n}function $P(e){const t=kP(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let fm=0;function UP({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let o;const i=p=>{const v=o.current.graphsByVersion;if(v.has(p))return Oe(v.get(p));const y=RP();return v.set(p,y),y},a=(p,v)=>{if(v==null){const{transactionSubscriptions:y}=f.current.getState(),_=fm++;return y.set(_,p),{release:()=>{y.delete(_)}}}else{const{nodeTransactionSubscriptions:y}=f.current.getState();y.has(v)||y.set(v,new Map);const _=fm++;return Oe(y.get(v)).set(_,p),{release:()=>{const m=y.get(v);m&&(m.delete(_),m.size===0&&y.delete(v))}}}},s=p=>{cm(f.current);for(const v of Object.keys(p))Oe(f.current.getState().nextTree).transactionMetadata[v]=p[v]},l=p=>{cm(f.current);const v=Oe(o.current.nextTree);let y;try{bf=!0,y=p(v)}finally{bf=!1}y!==v&&(o.current.nextTree=y,G1().early&&oh(f.current,o.current,y),Oe(u.current)())},u=LP(null),c=PP(p=>{u.current=p},[u]),f=um(()=>n??{storeID:Q1(),getState:()=>o.current,replaceState:l,getGraph:i,subscribeToTransactions:a,addTransactionMetadata:s});n!=null&&(f.current=n),o=um(()=>e!=null?DP(f.current,e):t!=null?$P(t):K1());const d=TP(()=>Qu==null?void 0:Qu(o,()=>o.current.currentTree.version),[o]);return _f(()=>{const p=f.current;for(const v of new Set(p.getState().knownAtoms))bP(p,v,"get");return()=>{for(const v of p.getState().knownAtoms)SP(p,v)}},[f]),V.createElement(Z1.Provider,{value:f},V.createElement(ew.Provider,{value:d},V.createElement(MP,{setNotifyBatcherOfChange:c}),r))}function FP(e){const{override:t,...n}=e,r=ru();return t===!1&&r.current!==J1?e.children:V.createElement(UP,n)}function jP(){return ru().current.storeID}var Rn={RecoilRoot:FP,useStoreRef:ru,useRecoilMutableSource:AP,useRecoilStoreID:jP,notifyComponents_FOR_TESTING:oh,sendEndOfBatchNotifications_FOR_TESTING:tw};function BP(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{t.current=e}),t.current}var nw=HP;const{useStoreRef:qP}=Rn,{SUSPENSE_TIMEOUT_MS:KP}=Fr,{updateRetainCount:ri}=Fr,{RetentionZone:QP}=Yl,{useEffect:GP,useRef:XP}=V,{isSSR:dm}=rh;function YP(e){if(ge("recoil_memory_managament_2020"))return JP(e)}function JP(e){const n=(Array.isArray(e)?e:[e]).map(a=>a instanceof QP?a:a.key),r=qP();GP(()=>{if(!ge("recoil_memory_managament_2020"))return;const a=r.current;if(o.current&&!dm)window.clearTimeout(o.current),o.current=null;else for(const s of n)ri(a,s,1);return()=>{for(const s of n)ri(a,s,-1)}},[r,...n]);const o=XP(),i=nw(n);if(!dm&&(i===void 0||!zP(i,n))){const a=r.current;for(const s of n)ri(a,s,1);if(i)for(const s of i)ri(a,s,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(const s of n)ri(a,s,-1)},KP)}}var ih=YP;function ZP(){return""}var Ra=ZP;const{batchUpdates:eT}=Zl,{DEFAULT_VALUE:rw}=ft,{currentRendererSupportsUseSyncExternalStore:tT,reactMode:Uo,useMutableSource:nT,useSyncExternalStore:rT}=ba,{useRecoilMutableSource:oT,useStoreRef:dn}=Rn,{AbstractRecoilValue:Ef,getRecoilValueAsLoadable:Oa,setRecoilValue:gl,setUnvalidatedRecoilValue:iT,subscribeToRecoilValue:xo}=fn,{useCallback:ct,useEffect:ko,useMemo:ow,useRef:ki,useState:ah}=V,{setByAddingToSet:aT}=R1;function sh(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(o=>{n.current.getState().suspendedComponentResolvers.add(o)}):e.state==="hasError"?e.contents:se(`Invalid value of loadable atom "${t.key}"`)}function sT(){const e=Ra(),t=dn(),[,n]=ah([]),r=ki(new Set);r.current=new Set;const o=ki(new Set),i=ki(new Map),a=ct(l=>{const u=i.current.get(l);u&&(u.release(),i.current.delete(l))},[i]),s=ct((l,u)=>{i.current.has(u)&&n([])},[]);return ko(()=>{const l=t.current;Oi(r.current,o.current).forEach(u=>{if(i.current.has(u))return;const c=xo(l,new Ef(u),d=>s(d,u),e);i.current.set(u,c),l.getState().nextTree?l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{s(l.getState(),u)}):s(l.getState(),u)}),Oi(o.current,r.current).forEach(u=>{a(u)}),o.current=r.current}),ko(()=>{const l=i.current;return Oi(r.current,new Set(l.keys())).forEach(u=>{const c=xo(t.current,new Ef(u),f=>s(f,u),e);l.set(u,c)}),()=>l.forEach((u,c)=>a(c))},[e,t,a,s]),ow(()=>{function l(v){return y=>{gl(t.current,v,y)}}function u(v){return()=>gl(t.current,v,rw)}function c(v){var y;r.current.has(v.key)||(r.current=aT(r.current,v.key));const _=t.current.getState();return Oa(t.current,v,Uo().early&&(y=_.nextTree)!==null&&y!==void 0?y:_.currentTree)}function f(v){const y=c(v);return sh(y,v,t)}function d(v){return[f(v),l(v)]}function p(v){return[c(v),l(v)]}return{getRecoilValue:f,getRecoilValueLoadable:c,getRecoilState:d,getRecoilStateLoadable:p,getSetRecoilState:l,getResetRecoilState:u}},[r,t])}const lT={current:0};function uT(e){const t=dn(),n=Ra(),r=ct(()=>{var s;const l=t.current,u=l.getState(),c=Uo().early&&(s=u.nextTree)!==null&&s!==void 0?s:u.currentTree;return{loadable:Oa(l,e,c),key:e.key}},[t,e]),o=ct(s=>{let l;return()=>{var u,c;const f=s();return(u=l)!==null&&u!==void 0&&u.loadable.is(f.loadable)&&((c=l)===null||c===void 0?void 0:c.key)===f.key?l:(l=f,f)}},[]),i=ow(()=>o(r),[r,o]),a=ct(s=>{const l=t.current;return xo(l,e,s,n).release},[t,e,n]);return rT(a,i,i).loadable}function cT(e){const t=dn(),n=ct(()=>{var u;const c=t.current,f=c.getState(),d=Uo().early&&(u=f.nextTree)!==null&&u!==void 0?u:f.currentTree;return Oa(c,e,d)},[t,e]),r=ct(()=>n(),[n]),o=Ra(),i=ct((u,c)=>{const f=t.current;return xo(f,e,()=>{if(!ge("recoil_suppress_rerender_in_callback"))return c();const p=n();l.current.is(p)||c(),l.current=p},o).release},[t,e,o,n]),a=oT();if(a==null)throw se("Recoil hooks must be used in components contained within a component.");const s=nT(a,r,i),l=ki(s);return ko(()=>{l.current=s}),s}function Cf(e){const t=dn(),n=Ra(),r=ct(()=>{var l;const u=t.current,c=u.getState(),f=Uo().early&&(l=c.nextTree)!==null&&l!==void 0?l:c.currentTree;return Oa(u,e,f)},[t,e]),o=ct(()=>({loadable:r(),key:e.key}),[r,e.key]),i=ct(l=>{const u=o();return l.loadable.is(u.loadable)&&l.key===u.key?l:u},[o]);ko(()=>{const l=xo(t.current,e,u=>{s(i)},n);return s(i),l.release},[n,e,t,i]);const[a,s]=ah(o);return a.key!==e.key?o().loadable:a.loadable}function fT(e){const t=dn(),[,n]=ah([]),r=Ra(),o=ct(()=>{var s;const l=t.current,u=l.getState(),c=Uo().early&&(s=u.nextTree)!==null&&s!==void 0?s:u.currentTree;return Oa(l,e,c)},[t,e]),i=o(),a=ki(i);return ko(()=>{a.current=i}),ko(()=>{const s=t.current,l=s.getState(),u=xo(s,e,f=>{var d;if(!ge("recoil_suppress_rerender_in_callback"))return n([]);const p=o();(d=a.current)!==null&&d!==void 0&&d.is(p)||n(p),a.current=p},r);if(l.nextTree)s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a.current=null,n([])});else{var c;if(!ge("recoil_suppress_rerender_in_callback"))return n([]);const f=o();(c=a.current)!==null&&c!==void 0&&c.is(f)||n(f),a.current=f}return u.release},[r,o,e,t]),i}function lh(e){return ge("recoil_memory_managament_2020")&&ih(e),{TRANSITION_SUPPORT:Cf,SYNC_EXTERNAL_STORE:tT()?uT:Cf,MUTABLE_SOURCE:cT,LEGACY:fT}[Uo().mode](e)}function iw(e){const t=dn(),n=lh(e);return sh(n,e,t)}function ou(e){const t=dn();return ct(n=>{gl(t.current,e,n)},[t,e])}function dT(e){const t=dn();return ct(()=>{gl(t.current,e,rw)},[t,e])}function hT(e){return[iw(e),ou(e)]}function pT(e){return[lh(e),ou(e)]}function vT(){const e=dn();return(t,n={})=>{eT(()=>{e.current.addTransactionMetadata(n),t.forEach((r,o)=>iT(e.current,new Ef(o),r))})}}function aw(e){return ge("recoil_memory_managament_2020")&&ih(e),Cf(e)}function sw(e){const t=dn(),n=aw(e);return sh(n,e,t)}function mT(e){return[sw(e),ou(e)]}var gT={recoilComponentGetRecoilValueCount_FOR_TESTING:lT,useRecoilInterface:sT,useRecoilState:hT,useRecoilStateLoadable:pT,useRecoilValue:iw,useRecoilValueLoadable:lh,useResetRecoilState:dT,useSetRecoilState:ou,useSetUnvalidatedAtomValues:vT,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:aw,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:sw,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:mT};function yT(e,t){const n=new Map;for(const[r,o]of e)t(o,r)&&n.set(r,o);return n}var wT=yT;function ST(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var _T=ST;function bT(...e){const t=new Map;for(let n=0;nt.current.subscribeToTransactions(e).release,[e,t])}function vm(e){const t=e.atomValues.toMap(),n=ml(wT(t,(r,o)=>{const a=lw(o).persistence_UNSTABLE;return a!=null&&a.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return ET(e.nonvalidatedAtoms.toMap(),n)}function LT(e){au(iu(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const o=vm(r),i=vm(n),a=ml(OT,l=>{var u,c,f,d;return{persistence_UNSTABLE:{type:(u=(c=l.persistence_UNSTABLE)===null||c===void 0?void 0:c.type)!==null&&u!==void 0?u:"none",backButton:(f=(d=l.persistence_UNSTABLE)===null||d===void 0?void 0:d.backButton)!==null&&f!==void 0?f:!1}}}),s=_T(r.dirtyAtoms,l=>o.has(l)||i.has(l));e({atomValues:o,previousAtomValues:i,atomInfo:a,modifiedAtoms:s,transactionMetadata:{...r.transactionMetadata}})},[e]))}function NT(e){au(iu(t=>{const n=yl(t,"latest"),r=yl(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function AT(){const e=uh(),[t,n]=TT(()=>yl(e.current)),r=nw(t),o=hm(),i=hm();if(au(iu(s=>n(yl(s)),[])),uw(()=>{const s=t.retain();if(o.current&&!pm){var l;window.clearTimeout(o.current),o.current=null,(l=i.current)===null||l===void 0||l.call(i),i.current=null}return()=>{window.setTimeout(s,10)}},[t]),r!==t&&!pm){if(o.current){var a;window.clearTimeout(o.current),o.current=null,(a=i.current)===null||a===void 0||a.call(i),i.current=null}i.current=t.retain(),o.current=window.setTimeout(()=>{var s;o.current=null,(s=i.current)===null||s===void 0||s.call(i),i.current=null},PT)}return t}function cw(e,t){var n;const r=e.getState(),o=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,i=t.getStore_INTERNAL().getState().currentTree;CT(()=>{const a=new Set;for(const u of[o.atomValues.keys(),i.atomValues.keys()])for(const c of u){var s,l;((s=o.atomValues.get(c))===null||s===void 0?void 0:s.contents)!==((l=i.atomValues.get(c))===null||l===void 0?void 0:l.contents)&&lw(c).shouldRestoreFromSnapshots&&a.add(c)}a.forEach(u=>{kT(e,new xT(u),i.atomValues.has(u)?Oe(i.atomValues.get(u)):RT)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function IT(){const e=uh();return iu(t=>cw(e.current,t),[e])}var fw={useRecoilSnapshot:AT,gotoSnapshot:cw,useGotoRecoilSnapshot:IT,useRecoilTransactionObserver:NT,useTransactionObservation_DEPRECATED:LT,useTransactionSubscription_DEPRECATED:au};const{peekNodeInfo:MT}=ir,{useStoreRef:DT}=Rn;function $T(){const e=DT();return({key:t})=>MT(e.current,e.current.getState().currentTree,t)}var UT=$T;const{reactMode:FT}=ba,{RecoilRoot:jT,useStoreRef:BT}=Rn,{useMemo:zT}=V;function VT(){FT().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const e=BT().current;return zT(()=>{function t({children:n}){return V.createElement(jT,{store_INTERNAL:e},n)}return t},[e])}var WT=VT;const{loadableWithValue:HT}=_a,{initializeNode:qT}=ir,{DEFAULT_VALUE:KT,getNode:QT}=ft,{copyTreeState:GT,getRecoilValueAsLoadable:XT,invalidateDownstreams:YT,writeLoadableToTreeState:JT}=fn;function mm(e){return QT(e.key).nodeType==="atom"}class ZT{constructor(t,n){ie(this,"_store",void 0),ie(this,"_treeState",void 0),ie(this,"_changes",void 0),ie(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!mm(r))throw se("Reading selectors within atomicUpdate is not supported");const o=XT(this._store,r,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:se(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),ie(this,"set",(r,o)=>{if(!mm(r))throw se("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){const i=this.get(r);this._changes.set(r.key,o(i))}else qT(this._store,r.key,"set"),this._changes.set(r.key,o)}),ie(this,"reset",r=>{this.set(r,KT)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=GT(this._treeState);for(const[n,r]of this._changes)JT(t,n,HT(r));return YT(this._store,t),t}}function eL(e){return t=>{e.replaceState(n=>{const r=new ZT(e,n);return t(r),r.newTreeState_INTERNAL()})}}var tL={atomicUpdater:eL},nL=tL.atomicUpdater,dw=Object.freeze({__proto__:null,atomicUpdater:nL});function rL(e,t){if(!e)throw new Error(t)}var oL=rL,fi=oL;const{atomicUpdater:iL}=dw,{batchUpdates:aL}=Zl,{DEFAULT_VALUE:sL}=ft,{useStoreRef:lL}=Rn,{refreshRecoilValue:uL,setRecoilValue:gm}=fn,{cloneSnapshot:cL}=nu,{gotoSnapshot:fL}=fw,{useCallback:dL}=V;class hw{}const hL=new hw;function pw(e,t,n,r){let o=hL,i;if(aL(()=>{const s="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw se(s);const l=O1({...r??{},set:(c,f)=>gm(e,c,f),reset:c=>gm(e,c,sL),refresh:c=>uL(e,c),gotoSnapshot:c=>fL(e,c),transact_UNSTABLE:c=>iL(e)(c)},{snapshot:()=>{const c=cL(e);return i=c.retain(),c}}),u=t(l);if(typeof u!="function")throw se(s);o=u(...n)}),o instanceof hw&&fi(!1),Re(o))o.finally(()=>{var s;(s=i)===null||s===void 0||s()});else{var a;(a=i)===null||a===void 0||a()}return o}function pL(e,t){const n=lL();return dL((...r)=>pw(n.current,e,r),t!=null?[...t,n]:void 0)}var vw={recoilCallback:pw,useRecoilCallback:pL};const{useStoreRef:vL}=Rn,{refreshRecoilValue:mL}=fn,{useCallback:gL}=V;function yL(e){const t=vL();return gL(()=>{const n=t.current;mL(n,e)},[e,t])}var wL=yL;const{atomicUpdater:SL}=dw,{useStoreRef:_L}=Rn,{useMemo:bL}=V;function EL(e,t){const n=_L();return bL(()=>(...r)=>{SL(n.current)(i=>{e(i)(...r)})},t!=null?[...t,n]:void 0)}var CL=EL;class RL{constructor(t){ie(this,"value",void 0),this.value=t}}var OL={WrappedValue:RL},xL=OL.WrappedValue,mw=Object.freeze({__proto__:null,WrappedValue:xL});const{isFastRefreshEnabled:kL}=ba;class ym extends Error{}class PL{constructor(t){var n,r,o;ie(this,"_name",void 0),ie(this,"_numLeafs",void 0),ie(this,"_root",void 0),ie(this,"_onHit",void 0),ie(this,"_onSet",void 0),ie(this,"_mapNodeValue",void 0),this._name=t==null?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=(n=t==null?void 0:t.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=t==null?void 0:t.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(o=t==null?void 0:t.mapNodeValue)!==null&&o!==void 0?o:i=>i}size(){return this._numLeafs}root(){return this._root}get(t,n){var r;return(r=this.getLeafNode(t,n))===null||r===void 0?void 0:r.value}getLeafNode(t,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const o=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(o)}}set(t,n,r){const o=()=>{var i,a,s,l;let u,c;for(const[_,m]of t){var f,d,p;const h=this._root;if((h==null?void 0:h.type)==="leaf")throw this.invalidCacheError();const g=u;if(u=g?g.branches.get(c):h,u=(f=u)!==null&&f!==void 0?f:{type:"branch",nodeKey:_,parent:g,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==_)throw this.invalidCacheError();g==null||g.branches.set(c,u),r==null||(d=r.onNodeVisit)===null||d===void 0||d.call(r,u),c=this._mapNodeValue(m),this._root=(p=this._root)!==null&&p!==void 0?p:u}const v=u?(i=u)===null||i===void 0?void 0:i.branches.get(c):this._root;if(v!=null&&(v.type!=="leaf"||v.branchKey!==c))throw this.invalidCacheError();const y={type:"leaf",value:n,parent:u,branchKey:c};(a=u)===null||a===void 0||a.branches.set(c,y),this._root=(s=this._root)!==null&&s!==void 0?s:y,this._numLeafs++,this._onSet(y),r==null||(l=r.onNodeVisit)===null||l===void 0||l.call(r,y)};try{o()}catch(i){if(i instanceof ym)this.clear(),o();else throw i}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let r=t.parent,o=t.branchKey;for(;r;){var i;if(r.branches.delete(o),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;o=(i=r)===null||i===void 0?void 0:i.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const t=kL()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw Qd(t+(this._name!=null?` - ${this._name}`:"")),new ym}}var TL={TreeCache:PL},LL=TL.TreeCache,gw=Object.freeze({__proto__:null,TreeCache:LL});class NL{constructor(t){var n;ie(this,"_maxSize",void 0),ie(this,"_size",void 0),ie(this,"_head",void 0),ie(this,"_tail",void 0),ie(this,"_map",void 0),ie(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),r=this._map.get(n);if(r)return this.set(t,r.value),r.value}set(t,n){const r=this._keyMapper(t);this._map.get(r)&&this.delete(t);const i=this.head(),a={key:t,right:i,left:null,value:n};i?i.left=a:this._tail=a,this._map.set(r,a),this._head=a,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const r=Oe(this._map.get(n)),o=r.right,i=r.left;o&&(o.left=r.left),i&&(i.right=r.right),r===this.head()&&(this._head=o),r===this.tail()&&(this._tail=i),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var AL={LRUCache:NL},IL=AL.LRUCache,yw=Object.freeze({__proto__:null,LRUCache:IL});const{LRUCache:ML}=yw,{TreeCache:DL}=gw;function $L({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new ML({maxSize:t}),o=new DL({name:e,mapNodeValue:n,onHit:i=>{r.set(i,!0)},onSet:i=>{const a=r.tail();r.set(i,!0),a&&o.size()>t&&o.delete(a.key)}});return o}var wm=$L;function Ut(e,t,n){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if((t==null?void 0:t.allowFunctions)!==!0)throw se("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var r;return(r=JSON.stringify(e))!==null&&r!==void 0?r:""}if(Re(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,i)=>Ut(o,t,i.toString()))}]`;if(typeof e.toJSON=="function")return Ut(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[i,a]of e)o[typeof i=="string"?i:Ut(i,t)]=a;return Ut(o,t,n)}return e instanceof Set?Ut(Array.from(e).sort((o,i)=>Ut(o,t).localeCompare(Ut(i,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?Ut(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${Ut(o,t)}:${Ut(e[o],t,o)}`).join(",")}}`}function UL(e,t={allowFunctions:!1}){return Ut(e,t)}var su=UL;const{TreeCache:FL}=gw,Ga={equality:"reference",eviction:"keep-all",maxSize:1/0};function jL({equality:e=Ga.equality,eviction:t=Ga.eviction,maxSize:n=Ga.maxSize}=Ga,r){const o=BL(e);return zL(t,n,o,r)}function BL(e){switch(e){case"reference":return t=>t;case"value":return t=>su(t)}throw se(`Unrecognized equality policy ${e}`)}function zL(e,t,n,r){switch(e){case"keep-all":return new FL({name:r,mapNodeValue:n});case"lru":return wm({name:r,maxSize:Oe(t),mapNodeValue:n});case"most-recent":return wm({name:r,maxSize:1,mapNodeValue:n})}throw se(`Unrecognized eviction policy ${e}`)}var VL=jL;function WL(e){return()=>null}var HL={startPerfBlock:WL};const{isLoadable:qL,loadableWithError:Xa,loadableWithPromise:KL,loadableWithValue:Gu}=_a,{WrappedValue:ww}=mw,{getNodeLoadable:Ya,peekNodeLoadable:QL,setNodeValue:GL}=ir,{saveDepsToStore:XL}=Ea,{DEFAULT_VALUE:YL,getConfigDeletionHandler:JL,getNode:ZL,registerNode:Sm}=ft,{isRecoilValue:eN}=Oo,{markRecoilValueModified:_m}=fn,{retainedByOptionWithDefault:tN}=Fr,{recoilCallback:nN}=vw,{startPerfBlock:rN}=HL;class Sw{}const oi=new Sw,ii=[],Ja=new Map,oN=(()=>{let e=0;return()=>e++})();function _w(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:o}=e,i=e.set!=null?e.set:void 0,a=new Set,s=VL(o??{equality:"reference",eviction:"keep-all"},n),l=tN(e.retainedBy_UNSTABLE),u=new Map;let c=0;function f(){return!ge("recoil_memory_managament_2020")||c>0}function d(b){return b.getState().knownSelectors.add(n),c++,()=>{c--}}function p(){return JL(n)!==void 0&&!f()}function v(b,U,B,J,W){M(U,J,W),y(b,B)}function y(b,U){w(b,U)&&re(b),m(U,!0)}function _(b,U){w(b,U)&&(Oe($(b)).stateVersions.clear(),m(U,!1))}function m(b,U){const B=Ja.get(b);if(B!=null){for(const J of B)_m(J,Oe(t));U&&Ja.delete(b)}}function h(b,U){let B=Ja.get(U);B==null&&Ja.set(U,B=new Set),B.add(b)}function g(b,U,B,J,W,Z){return U.then(ae=>{if(!f())throw re(b),oi;const Y=Gu(ae);return v(b,B,W,Y,J),ae}).catch(ae=>{if(!f())throw re(b),oi;if(Re(ae))return S(b,ae,B,J,W,Z);const Y=Xa(ae);throw v(b,B,W,Y,J),ae})}function S(b,U,B,J,W,Z){return U.then(ae=>{if(!f())throw re(b),oi;Z.loadingDepKey!=null&&Z.loadingDepPromise===U?B.atomValues.set(Z.loadingDepKey,Gu(ae)):b.getState().knownSelectors.forEach(pe=>{B.atomValues.delete(pe)});const Y=N(b,B);if(Y&&Y.state!=="loading"){if((w(b,W)||$(b)==null)&&y(b,W),Y.state==="hasValue")return Y.contents;throw Y.contents}if(!w(b,W)){const pe=G(b,B);if(pe!=null)return pe.loadingLoadable.contents}const[me,ye]=T(b,B,W);if(me.state!=="loading"&&v(b,B,W,me,ye),me.state==="hasError")throw me.contents;return me.contents}).catch(ae=>{if(ae instanceof Sw)throw oi;if(!f())throw re(b),oi;const Y=Xa(ae);throw v(b,B,W,Y,J),ae})}function k(b,U,B,J){var W,Z,ae,Y;if(w(b,J)||U.version===((W=b.getState())===null||W===void 0||(Z=W.currentTree)===null||Z===void 0?void 0:Z.version)||U.version===((ae=b.getState())===null||ae===void 0||(Y=ae.nextTree)===null||Y===void 0?void 0:Y.version)){var me,ye,pe;XL(n,B,b,(me=(ye=b.getState())===null||ye===void 0||(pe=ye.nextTree)===null||pe===void 0?void 0:pe.version)!==null&&me!==void 0?me:b.getState().currentTree.version)}for(const we of B)a.add(we)}function T(b,U,B){const J=rN(n);let W=!0,Z=!0;const ae=()=>{J(),Z=!1};let Y,me=!1,ye;const pe={loadingDepKey:null,loadingDepPromise:null},we=new Map;function rt({key:_t}){const dt=Ya(b,U,_t);switch(we.set(_t,dt),W||(k(b,U,new Set(we.keys()),B),_(b,B)),dt.state){case"hasValue":return dt.contents;case"hasError":throw dt.contents;case"loading":throw pe.loadingDepKey=_t,pe.loadingDepPromise=dt.contents,dt.contents}throw se("Invalid Loadable state")}const lr=_t=>(...dt)=>{if(Z)throw se("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&fi(!1),nN(b,_t,dt,{node:t})};try{Y=r({get:rt,getCallback:lr}),Y=eN(Y)?rt(Y):Y,qL(Y)&&(Y.state==="hasError"&&(me=!0),Y=Y.contents),Re(Y)?Y=g(b,Y,U,we,B,pe).finally(ae):ae(),Y=Y instanceof ww?Y.value:Y}catch(_t){Y=_t,Re(Y)?Y=S(b,Y,U,we,B,pe).finally(ae):(me=!0,ae())}return me?ye=Xa(Y):Re(Y)?ye=KL(Y):ye=Gu(Y),W=!1,ce(b,B,we),k(b,U,new Set(we.keys()),B),[ye,we]}function N(b,U){let B=U.atomValues.get(n);if(B!=null)return B;const J=new Set;try{B=s.get(Z=>(typeof Z!="string"&&fi(!1),Ya(b,U,Z).contents),{onNodeVisit:Z=>{Z.type==="branch"&&Z.nodeKey!==n&&J.add(Z.nodeKey)}})}catch(Z){throw se(`Problem with cache lookup for selector "${n}": ${Z.message}`)}if(B){var W;U.atomValues.set(n,B),k(b,U,J,(W=$(b))===null||W===void 0?void 0:W.executionID)}return B}function I(b,U){const B=N(b,U);if(B!=null)return re(b),B;const J=G(b,U);if(J!=null){var W;return((W=J.loadingLoadable)===null||W===void 0?void 0:W.state)==="loading"&&h(b,J.executionID),J.loadingLoadable}const Z=oN(),[ae,Y]=T(b,U,Z);return ae.state==="loading"?(X(b,Z,ae,Y,U),h(b,Z)):(re(b),M(U,ae,Y)),ae}function G(b,U){const B=V1([u.has(b)?[Oe(u.get(b))]:[],Gl(Zd(u,([W])=>W!==b),([,W])=>W)]);function J(W){for(const[Z,ae]of W)if(!Ya(b,U,Z).is(ae))return!0;return!1}for(const W of B){if(W.stateVersions.get(U.version)||!J(W.depValuesDiscoveredSoFarDuringAsyncWork))return W.stateVersions.set(U.version,!0),W;W.stateVersions.set(U.version,!1)}}function $(b){return u.get(b)}function X(b,U,B,J,W){u.set(b,{depValuesDiscoveredSoFarDuringAsyncWork:J,executionID:U,loadingLoadable:B,stateVersions:new Map([[W.version,!0]])})}function ce(b,U,B){if(w(b,U)){const J=$(b);J!=null&&(J.depValuesDiscoveredSoFarDuringAsyncWork=B)}}function re(b){u.delete(b)}function w(b,U){var B;return U===((B=$(b))===null||B===void 0?void 0:B.executionID)}function P(b){return Array.from(b.entries()).map(([U,B])=>[U,B.contents])}function M(b,U,B){b.atomValues.set(n,U);try{s.set(P(B),U)}catch(J){throw se(`Problem with setting cache for selector "${n}": ${J.message}`)}}function C(b){if(ii.includes(n)){const U=`Recoil selector has circular dependencies: ${ii.slice(ii.indexOf(n)).join(" → ")}`;return Xa(se(U))}ii.push(n);try{return b()}finally{ii.pop()}}function O(b,U){const B=U.atomValues.get(n);return B??s.get(J=>{var W;return typeof J!="string"&&fi(!1),(W=QL(b,U,J))===null||W===void 0?void 0:W.contents})}function A(b,U){return C(()=>I(b,U))}function D(b){b.atomValues.delete(n)}function z(b,U){t==null&&fi(!1);for(const J of a){var B;const W=ZL(J);(B=W.clearCache)===null||B===void 0||B.call(W,b,U)}a.clear(),D(U),s.clear(),_m(b,t)}return i!=null?t=Sm({key:n,nodeType:"selector",peek:O,get:A,set:(U,B,J)=>{let W=!1;const Z=new Map;function ae({key:pe}){if(W)throw se("Recoil: Async selector sets are not currently supported.");const we=Ya(U,B,pe);if(we.state==="hasValue")return we.contents;if(we.state==="loading"){const rt=`Getting value of asynchronous atom or selector "${pe}" in a pending state while setting selector "${n}" is not yet supported.`;throw se(rt)}else throw we.contents}function Y(pe,we){if(W)throw se("Recoil: Async selector sets are not currently supported.");const rt=typeof we=="function"?we(ae(pe)):we;GL(U,B,pe.key,rt).forEach((_t,dt)=>Z.set(dt,_t))}function me(pe){Y(pe,YL)}const ye=i({set:Y,get:ae,reset:me},J);if(ye!==void 0)throw Re(ye)?se("Recoil: Async selector sets are not currently supported."):se("Recoil: selector set should be a void function.");return W=!0,Z},init:d,invalidate:D,clearCache:z,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l}):t=Sm({key:n,nodeType:"selector",peek:O,get:A,init:d,invalidate:D,clearCache:z,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}_w.value=e=>new ww(e);var Po=_w;const{isLoadable:iN,loadableWithError:Xu,loadableWithPromise:Yu,loadableWithValue:qr}=_a,{WrappedValue:bw}=mw,{peekNodeInfo:aN}=ir,{DEFAULT_VALUE:vr,DefaultValue:An,getConfigDeletionHandler:Ew,registerNode:sN,setConfigDeletionHandler:lN}=ft,{isRecoilValue:uN}=Oo,{getRecoilValueAsLoadable:cN,markRecoilValueModified:fN,setRecoilValue:bm,setRecoilValueLoadable:dN}=fn,{retainedByOptionWithDefault:hN}=Fr,ai=e=>e instanceof bw?e.value:e;function pN(e){const{key:t,persistence_UNSTABLE:n}=e,r=hN(e.retainedBy_UNSTABLE);let o=0;function i(h){return Yu(h.then(g=>(a=qr(g),g)).catch(g=>{throw a=Xu(g),g}))}let a=Re(e.default)?i(e.default):iN(e.default)?e.default.state==="loading"?i(e.default.contents):e.default:qr(ai(e.default));a.contents;let s;const l=new Map;function u(h){return h}function c(h,g){const S=g.then(k=>{var T,N;return((N=((T=h.getState().nextTree)!==null&&T!==void 0?T:h.getState().currentTree).atomValues.get(t))===null||N===void 0?void 0:N.contents)===S&&bm(h,m,k),k}).catch(k=>{var T,N;throw((N=((T=h.getState().nextTree)!==null&&T!==void 0?T:h.getState().currentTree).atomValues.get(t))===null||N===void 0?void 0:N.contents)===S&&dN(h,m,Xu(k)),k});return S}function f(h,g,S){var k;o++;const T=()=>{var $;o--,($=l.get(h))===null||$===void 0||$.forEach(X=>X()),l.delete(h)};if(h.getState().knownAtoms.add(t),a.state==="loading"){const $=()=>{var X;((X=h.getState().nextTree)!==null&&X!==void 0?X:h.getState().currentTree).atomValues.has(t)||fN(h,m)};a.contents.finally($)}const N=(k=e.effects)!==null&&k!==void 0?k:e.effects_UNSTABLE;if(N!=null){let w=function(D){if(X&&D.key===t){const z=$;return z instanceof An?d(h,g):Re(z)?Yu(z.then(b=>b instanceof An?a.toPromise():b)):qr(z)}return cN(h,D)},P=function(D){return w(D).toPromise()},M=function(D){var z;const b=aN(h,(z=h.getState().nextTree)!==null&&z!==void 0?z:h.getState().currentTree,D.key);return X&&D.key===t&&!($ instanceof An)?{...b,isSet:!0,loadable:w(D)}:b},$=vr,X=!0,ce=!1,re=null;const C=D=>z=>{if(X){const b=w(m),U=b.state==="hasValue"?b.contents:vr;$=typeof z=="function"?z(U):z,Re($)&&($=$.then(B=>(re={effect:D,value:B},B)))}else{if(Re(z))throw se("Setting atoms to async values is not implemented.");typeof z!="function"&&(re={effect:D,value:ai(z)}),bm(h,m,typeof z=="function"?b=>{const U=ai(z(b));return re={effect:D,value:U},U}:ai(z))}},O=D=>()=>C(D)(vr),A=D=>z=>{var b;const{release:U}=h.subscribeToTransactions(B=>{var J;let{currentTree:W,previousTree:Z}=B.getState();Z||(Z=W);const ae=(J=W.atomValues.get(t))!==null&&J!==void 0?J:a;if(ae.state==="hasValue"){var Y,me,ye,pe;const we=ae.contents,rt=(Y=Z.atomValues.get(t))!==null&&Y!==void 0?Y:a,lr=rt.state==="hasValue"?rt.contents:vr;((me=re)===null||me===void 0?void 0:me.effect)!==D||((ye=re)===null||ye===void 0?void 0:ye.value)!==we?z(we,lr,!W.atomValues.has(t)):((pe=re)===null||pe===void 0?void 0:pe.effect)===D&&(re=null)}},t);l.set(h,[...(b=l.get(h))!==null&&b!==void 0?b:[],U])};for(const D of N)try{const z=D({node:m,storeID:h.storeID,parentStoreID_UNSTABLE:h.parentStoreID,trigger:S,setSelf:C(D),resetSelf:O(D),onSet:A(D),getPromise:P,getLoadable:w,getInfo_UNSTABLE:M});if(z!=null){var I;l.set(h,[...(I=l.get(h))!==null&&I!==void 0?I:[],z])}}catch(z){$=z,ce=!0}if(X=!1,!($ instanceof An)){var G;const D=ce?Xu($):Re($)?Yu(c(h,$)):qr(ai($));D.contents,g.atomValues.set(t,D),(G=h.getState().nextTree)===null||G===void 0||G.atomValues.set(t,D)}}return T}function d(h,g){var S,k;return(S=(k=g.atomValues.get(t))!==null&&k!==void 0?k:s)!==null&&S!==void 0?S:a}function p(h,g){if(g.atomValues.has(t))return Oe(g.atomValues.get(t));if(g.nonvalidatedAtoms.has(t)){if(s!=null)return s;if(n==null)return a;const S=g.nonvalidatedAtoms.get(t),k=n.validator(S,vr);return s=k instanceof An?a:qr(k),s}else return a}function v(){s=void 0}function y(h,g,S){if(g.atomValues.has(t)){const k=Oe(g.atomValues.get(t));if(k.state==="hasValue"&&S===k.contents)return new Map}else if(!g.nonvalidatedAtoms.has(t)&&S instanceof An)return new Map;return s=void 0,new Map().set(t,qr(S))}function _(){return Ew(t)!==void 0&&o<=0}const m=sN({key:t,nodeType:"atom",peek:d,get:p,set:y,init:f,invalidate:v,shouldDeleteConfigOnRelease:_,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return m}function ch(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return uN(n)?vN({...t,default:n}):pN({...t,default:n})}function vN(e){const t=ch({...e,default:vr,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof An?r:Oe(e.persistence_UNSTABLE).validator(r,vr)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Po({key:`${e.key}__withFallback`,get:({get:r})=>{const o=r(t);return o instanceof An?e.default:o},set:({set:r},o)=>r(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return lN(n.key,Ew(e.key)),n}ch.value=e=>new bw(e);var Cw=ch;class mN{constructor(t){var n;ie(this,"_map",void 0),ie(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t==null?void 0:t.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var gN={MapCache:mN},yN=gN.MapCache,wN=Object.freeze({__proto__:null,MapCache:yN});const{LRUCache:Em}=yw,{MapCache:SN}=wN,Za={equality:"reference",eviction:"none",maxSize:1/0};function _N({equality:e=Za.equality,eviction:t=Za.eviction,maxSize:n=Za.maxSize}=Za){const r=bN(e);return EN(t,n,r)}function bN(e){switch(e){case"reference":return t=>t;case"value":return t=>su(t)}throw se(`Unrecognized equality policy ${e}`)}function EN(e,t,n){switch(e){case"keep-all":return new SN({mapKey:n});case"lru":return new Em({mapKey:n,maxSize:Oe(t)});case"most-recent":return new Em({mapKey:n,maxSize:1})}throw se(`Unrecognized eviction policy ${e}`)}var Rw=_N;const{setConfigDeletionHandler:CN}=ft;function RN(e){var t,n;const r=Rw({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var i,a;const s=r.get(o);if(s!=null)return s;const{cachePolicyForParams_UNSTABLE:l,...u}=e,c="default"in e?e.default:new Promise(()=>{}),f=Cw({...u,key:`${e.key}__${(i=su(o))!==null&&i!==void 0?i:"void"}`,default:typeof c=="function"?c(o):c,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(o):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(o):(a=e.effects)!==null&&a!==void 0?a:e.effects_UNSTABLE});return r.set(o,f),CN(f.key,()=>{r.delete(o)}),f}}var ON=RN;const{setConfigDeletionHandler:xN}=ft;let kN=0;function PN(e){var t,n;const r=Rw({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var i;let a;try{a=r.get(o)}catch(d){throw se(`Problem with cache lookup for selector ${e.key}: ${d.message}`)}if(a!=null)return a;const s=`${e.key}__selectorFamily/${(i=su(o,{allowFunctions:!0}))!==null&&i!==void 0?i:"void"}/${kN++}`,l=d=>e.get(o)(d),u=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE;let f;if(e.set!=null){const d=e.set;f=Po({key:s,get:l,set:(v,y)=>d(o)(v,y),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else f=Po({key:s,get:l,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(o,f),xN(f.key,()=>{r.delete(o)}),f}}var ar=PN;const TN=ar({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function LN(e){return TN(e)}var NN=LN;const AN=ar({key:"__error",get:e=>()=>{throw se(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function IN(e){return AN(e)}var MN=IN;function DN(e){return e}var $N=DN;const{loadableWithError:Ow,loadableWithPromise:xw,loadableWithValue:kw}=_a;function lu(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[o,i]of t.entries())try{n[o]=e(i)}catch(a){r[o]=a}return[n,r]}function UN(e){return e!=null&&!Re(e)}function uu(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function Rf(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,o)=>({...n,[r]:t[o]}),{})}function vo(e,t,n){const r=n.map((o,i)=>o==null?kw(t[i]):Re(o)?xw(o):Ow(o));return Rf(e,r)}function FN(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const jN=ar({key:"__waitForNone",get:e=>({get:t})=>{const n=uu(e),[r,o]=lu(t,n);return vo(e,r,o)},dangerouslyAllowMutability:!0}),BN=ar({key:"__waitForAny",get:e=>({get:t})=>{const n=uu(e),[r,o]=lu(t,n);return o.some(i=>!Re(i))?vo(e,r,o):new Promise(i=>{for(const[a,s]of o.entries())Re(s)&&s.then(l=>{r[a]=l,o[a]=void 0,i(vo(e,r,o))}).catch(l=>{o[a]=l,i(vo(e,r,o))})})},dangerouslyAllowMutability:!0}),zN=ar({key:"__waitForAll",get:e=>({get:t})=>{const n=uu(e),[r,o]=lu(t,n);if(o.every(a=>a==null))return Rf(e,r);const i=o.find(UN);if(i!=null)throw i;return Promise.all(o).then(a=>Rf(e,FN(r,a)))},dangerouslyAllowMutability:!0}),VN=ar({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=uu(e),[r,o]=lu(t,n);return o.every(i=>!Re(i))?vo(e,r,o):Promise.all(o.map((i,a)=>Re(i)?i.then(s=>{r[a]=s,o[a]=void 0}).catch(s=>{r[a]=void 0,o[a]=s}):null)).then(()=>vo(e,r,o))},dangerouslyAllowMutability:!0}),WN=ar({key:"__noWait",get:e=>({get:t})=>{try{return Po.value(kw(t(e)))}catch(n){return Po.value(Re(n)?xw(n):Ow(n))}},dangerouslyAllowMutability:!0});var HN={waitForNone:jN,waitForAny:BN,waitForAll:zN,waitForAllSettled:VN,noWait:WN};const{RecoilLoadable:qN}=_a,{DefaultValue:KN}=ft,{RecoilRoot:QN,useRecoilStoreID:GN}=Rn,{isRecoilValue:XN}=Oo,{retentionZone:YN}=Yl,{freshSnapshot:JN}=nu,{useRecoilState:ZN,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:eA,useRecoilStateLoadable:tA,useRecoilValue:nA,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:rA,useRecoilValueLoadable:oA,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:iA,useResetRecoilState:aA,useSetRecoilState:sA}=gT,{useGotoRecoilSnapshot:lA,useRecoilSnapshot:uA,useRecoilTransactionObserver:cA}=fw,{useRecoilCallback:fA}=vw,{noWait:dA,waitForAll:hA,waitForAllSettled:pA,waitForAny:vA,waitForNone:mA}=HN;var fh={DefaultValue:KN,isRecoilValue:XN,RecoilLoadable:qN,RecoilEnv:v1,RecoilRoot:QN,useRecoilStoreID:GN,useRecoilBridgeAcrossReactRoots_UNSTABLE:WT,atom:Cw,selector:Po,atomFamily:ON,selectorFamily:ar,constSelector:NN,errorSelector:MN,readOnlySelector:$N,noWait:dA,waitForNone:mA,waitForAny:vA,waitForAll:hA,waitForAllSettled:pA,useRecoilValue:nA,useRecoilValueLoadable:oA,useRecoilState:ZN,useRecoilStateLoadable:tA,useSetRecoilState:sA,useResetRecoilState:aA,useGetRecoilValueInfo_UNSTABLE:UT,useRecoilRefresher_UNSTABLE:wL,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:iA,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:rA,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:eA,useRecoilCallback:fA,useRecoilTransaction_UNSTABLE:CL,useGotoRecoilSnapshot:lA,useRecoilSnapshot:uA,useRecoilTransactionObserver_UNSTABLE:cA,snapshot_UNSTABLE:JN,useRetain:ih,retentionZone:YN},gA=fh.RecoilRoot,yA=fh.atom,u$=fh.useRecoilState;function wA(e,t){let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function Pw(e){return e.replace(/\/$/,"")}function c$(e,t){let n=String(e);for(;n.length=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var ph=L.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=AA(e,["color","size"]);return V.createElement("svg",Of({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),V.createElement("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),V.createElement("line",{x1:"1",y1:"1",x2:"23",y2:"23"}))});ph.propTypes={color:xe.string,size:xe.oneOfType([xe.string,xe.number])};ph.displayName="EyeOff";const MA=ph;function xf(){return xf=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $A(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var vh=L.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=DA(e,["color","size"]);return V.createElement("svg",xf({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),V.createElement("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),V.createElement("circle",{cx:"12",cy:"12",r:"3"}))});vh.propTypes={color:xe.string,size:xe.oneOfType([xe.string,xe.number])};vh.displayName="Eye";const UA=vh;function kf(){return kf=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var mh=L.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=FA(e,["color","size"]);return V.createElement("svg",kf({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),V.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))});mh.propTypes={color:xe.string,size:xe.oneOfType([xe.string,xe.number])};mh.displayName="GitHub";const BA=mh;function Pf(){return Pf=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var gh=L.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=zA(e,["color","size"]);return V.createElement("svg",Pf({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),V.createElement("circle",{cx:"12",cy:"12",r:"10"}),V.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),V.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))});gh.propTypes={color:xe.string,size:xe.oneOfType([xe.string,xe.number])};gh.displayName="Info";const WA=gh;function Tf(){return Tf=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var yh=L.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=HA(e,["color","size"]);return V.createElement("svg",Tf({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),V.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),V.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});yh.propTypes={color:xe.string,size:xe.oneOfType([xe.string,xe.number])};yh.displayName="X";const KA=yh,{useState:QA,useCallback:GA}=V;function XA(e=!1){const[t,n]=QA(e),r=GA(()=>n(o=>!o),[]);return[t,r]}const Aw="yacd.metacubex.one";function YA(){try{const e=localStorage.getItem(Aw);return e?JSON.parse(e):void 0}catch{return}}function jr(e){try{const t=JSON.stringify(e);localStorage.setItem(Aw,t)}catch{}}const Iw="/traffic",JA=new TextDecoder("utf-8"),es=150,ra={labels:Array(es).fill(0),up:Array(es),down:Array(es),size:es,subscribers:[],appendData(e){this.up.shift(),this.down.shift(),this.labels.shift();const t=Date.now();this.up.push(e.up),this.down.push(e.down),this.labels.push(t),this.subscribers.forEach(n=>n(e))},subscribe(e){return this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}}};let ao=!1,ts="";function Lf(e){ra.appendData(JSON.parse(e))}function Mw(e){return e.read().then(({done:t,value:n})=>{const r=JA.decode(n,{stream:!t});ts+=r;const o=ts.split(` `),i=o[o.length-1];for(let a=0;a{if(r.ok){const o=r.body.getReader();Mw(o)}else ao=!1},r=>{console.log("fetch /traffic error",r),ao=!1}),ra}function Cm(e){return t=>{t(`openModal:${e}`,n=>{n.modals[e]=!0})}}function e3(e){return t=>{t(`closeModal:${e}`,n=>{n.modals[e]=!1})}}const t3={apiConfig:!1},d$=e=>e.configs.configs,n3=e=>e.configs.haveFetchedConfig,h$=e=>e.configs.configs["log-level"];function Br(e){return async(t,n)=>{let r;try{r=await Lw(e)}catch{t(Cm("apiConfig"));return}if(!r.ok){console.log("Error fetch configs",r.statusText),t(Cm("apiConfig"));return}const o=await r.json();t("store/configs#fetchConfigs",a=>{a.configs.configs=o}),n3(n())?wh(e):t(r3())}}function r3(){return e=>{e("store/configs#markHaveFetchedConfig",t=>{t.configs.haveFetchedConfig=!0})}}function p$(e,t){return async n=>{xA(e,t).then(r=>{r.ok===!1&&console.log("Error update configs",r.statusText)},r=>{throw console.log("Error update configs",r),r}).then(()=>{n(Br(e))}),n("storeConfigsOptimisticUpdateConfigs",r=>{r.configs.configs={...r.configs.configs,...t}})}}function v$(e){return async t=>{kA(e).then(n=>{n.ok===!1&&console.log("Error reload config file",n.statusText)},n=>{throw console.log("Error reload config file",n),n}).then(()=>{t(Br(e))})}}function m$(e){return async t=>{TA(e).then(n=>{n.ok===!1&&console.log("Error restart core",n.statusText)},n=>{throw console.log("Error restart core",n),n}).then(()=>{t(Br(e))})}}function g$(e){return async t=>{LA(e).then(n=>{n.ok===!1&&console.log("Error upgrade core",n.statusText)},n=>{throw console.log("Error upgrade core",n),n}).then(()=>{t(Br(e))})}}function y$(e){return async t=>{PA(e).then(n=>{n.ok===!1&&console.log("Error update geo databases file",n.statusText)},n=>{throw console.log("Error update geo databases file",n),n}).then(()=>{t(Br(e))})}}function w$(e){return async t=>{NA(e).then(n=>{n.ok===!1&&console.log("Error flush FakeIP pool",n.statusText)},n=>{throw console.log("Error flush FakeIP pool",n),n}).then(()=>{t(Br(e))})}}const o3={configs:{port:7890,"socks-port":7891,"mixed-port":0,"redir-port":0,"tproxy-port":0,"mitm-port":0,"allow-lan":!1,mode:"rule","log-level":"uninit",sniffing:!1,tun:{enable:!1,device:"",stack:"","dns-hijack":[],"auto-route":!1}},haveFetchedConfig:!1},sr=e=>{const t=e.app.selectedClashAPIConfigIndex;return e.app.clashAPIConfigs[t]},Dw=e=>e.app.selectedClashAPIConfigIndex,Sh=e=>e.app.clashAPIConfigs,_h=e=>e.app.theme,$w=e=>e.app.selectedChartStyleIndex,i3=e=>e.app.latencyTestUrl,S$=e=>e.app.collapsibleIsOpen,_$=e=>e.app.proxySortBy,b$=e=>e.app.hideUnavailableProxies,a3=e=>e.app.autoCloseOldConns,E$=e=>e.app.logStreamingPaused,s3=wA(jr,600);function bh(e,{baseURL:t,secret:n}){const r=Sh(e());for(let o=0;o{if(bh(r,{baseURL:e,secret:t}))return;const i={baseURL:e,secret:t,addedAt:Date.now()};n("addClashAPIConfig",a=>{a.app.clashAPIConfigs.push(i)}),jr(r().app)}}function u3({baseURL:e,secret:t}){return async(n,r)=>{const o=bh(r,{baseURL:e,secret:t});n("removeClashAPIConfig",i=>{i.app.clashAPIConfigs.splice(o,1)}),jr(r().app)}}function c3({baseURL:e,secret:t}){return async(n,r)=>{const o=bh(r,{baseURL:e,secret:t});Dw(r())!==o&&n("selectClashAPIConfig",a=>{a.app.selectedClashAPIConfigIndex=o}),jr(r().app);try{window.location.reload()}catch{}}}const Ju=document.querySelector("html");function Uw(e="light"){e==="auto"?Ju.setAttribute("data-theme","auto"):e==="dark"?Ju.setAttribute("data-theme","dark"):Ju.setAttribute("data-theme","light")}function f3(e="auto"){return(t,n)=>{_h(n())!==e&&(Uw(e),t("storeSwitchTheme",o=>{o.app.theme=e}),jr(n().app))}}function d3(e){return(t,n)=>{t("appSelectChartStyleIndex",r=>{r.app.selectedChartStyleIndex=Number(e)}),jr(n().app)}}function Rm(e,t){return(n,r)=>{n("appUpdateAppConfig",o=>{o.app[e]=t}),jr(r().app)}}function h3(e,t,n){return(r,o)=>{r("updateCollapsibleIsOpen",i=>{i.app.collapsibleIsOpen[`${e}:${t}`]=n}),s3(o().app)}}var ag;const p3={baseURL:((ag=document.getElementById("app"))==null?void 0:ag.getAttribute("data-base-url"))??"http://127.0.0.1:6756",secret:"",addedAt:0},v3={selectedClashAPIConfigIndex:0,clashAPIConfigs:[p3],latencyTestUrl:"https://www.gstatic.com/generate_204",selectedChartStyleIndex:0,theme:"dark",collapsibleIsOpen:{},proxySortBy:"Natural",hideUnavailableProxies:!1,autoCloseOldConns:!1,logStreamingPaused:!1};function m3(){const{search:e}=window.location,t={};if(typeof e!="string"||e==="")return t;const n=e.replace(/^\?/,"").split("&");for(let r=0;r1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:Eh(e)?2:Ch(e)?3:0}function Nf(e,t){return Fo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function O3(e,t){return Fo(e)===2?e.get(t):e[t]}function Fw(e,t,n){var r=Fo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function x3(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Eh(e){return L3&&e instanceof Map}function Ch(e){return N3&&e instanceof Set}function pr(e){return e.o||e.t}function Rh(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=I3(e);delete t[gt];for(var n=Ph(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=k3),Object.freeze(e),t&&oa(e,function(n,r){return Oh(r,!0)},!0)),e}function k3(){Wt(2)}function xh(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ln(e){var t=M3[e];return t||Wt(18,e),t}function Om(){return ia}function Zu(e,t){t&&(ln("Patches"),e.u=[],e.s=[],e.v=t)}function wl(e){Af(e),e.p.forEach(P3),e.p=null}function Af(e){e===ia&&(ia=e.l)}function xm(e){return ia={p:[],l:ia,h:e,m:!0,_:0}}function P3(e){var t=e[gt];t.i===0||t.i===1?t.j():t.O=!0}function ec(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||ln("ES5").S(t,e,r),r?(n[gt].P&&(wl(t),Wt(4)),Ir(e)&&(e=Sl(t,e),t.l||_l(t,e)),t.u&&ln("Patches").M(n[gt].t,e,t.u,t.s)):e=Sl(t,n,[]),wl(t),t.u&&t.v(t.u,t.s),e!==jw?e:void 0}function Sl(e,t,n){if(xh(t))return t;var r=t[gt];if(!r)return oa(t,function(s,l){return km(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return _l(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=Rh(r.k):r.o,i=o,a=!1;r.i===3&&(i=new Set(o),o.clear(),a=!0),oa(i,function(s,l){return km(e,r,o,s,l,n,a)}),_l(e,o,!1),n&&e.u&&ln("Patches").N(r,n,e.u,e.s)}return r.o}function km(e,t,n,r,o,i,a){if(To(o)){var s=Sl(e,o,i&&t&&t.i!==3&&!Nf(t.R,r)?i.concat(r):void 0);if(Fw(n,r,s),!To(s))return;e.m=!1}else a&&n.add(o);if(Ir(o)&&!xh(o)){if(!e.h.D&&e._<1)return;Sl(e,o),t&&t.A.l||_l(e,o)}}function _l(e,t,n){n===void 0&&(n=!1),e.h.D&&e.m&&Oh(t,n)}function tc(e,t){var n=e[gt];return(n?pr(n):e)[t]}function Pm(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function If(e){e.P||(e.P=!0,e.l&&If(e.l))}function nc(e){e.o||(e.o=Rh(e.t))}function Mf(e,t,n){var r=Eh(t)?ln("MapSet").F(t,n):Ch(t)?ln("MapSet").T(t,n):e.g?function(o,i){var a=Array.isArray(o),s={i:a?1:0,A:i?i.A:Om(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=s,u=Df;a&&(l=[s],u=di);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return s.k=d,s.j=f,d}(t,n):ln("ES5").J(t,n);return(n?n.A:Om()).p.push(r),r}function T3(e){return To(e)||Wt(22,e),function t(n){if(!Ir(n))return n;var r,o=n[gt],i=Fo(n);if(o){if(!o.P&&(o.i<4||!ln("ES5").K(o)))return o.t;o.I=!0,r=Tm(n,i),o.I=!1}else r=Tm(n,i);return oa(r,function(a,s){o&&O3(o.t,a)===s||Fw(r,a,t(s))}),i===3?new Set(r):r}(e)}function Tm(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Rh(e)}var Lm,ia,kh=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",L3=typeof Map<"u",N3=typeof Set<"u",Nm=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",jw=kh?Symbol.for("immer-nothing"):((Lm={})["immer-nothing"]=!0,Lm),Am=kh?Symbol.for("immer-draftable"):"__$immer_draftable",gt=kh?Symbol.for("immer-state"):"__$immer_state",A3=""+Object.prototype.constructor,Ph=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,I3=Object.getOwnPropertyDescriptors||function(e){var t={};return Ph(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},M3={},Df={get:function(e,t){if(t===gt)return e;var n=pr(e);if(!Nf(n,t))return function(o,i,a){var s,l=Pm(i,a);return l?"value"in l?l.value:(s=l.get)===null||s===void 0?void 0:s.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!Ir(r)?r:r===tc(e.t,t)?(nc(e),e.o[t]=Mf(e.A.h,r,e)):r},has:function(e,t){return t in pr(e)},ownKeys:function(e){return Reflect.ownKeys(pr(e))},set:function(e,t,n){var r=Pm(pr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=tc(pr(e),t),i=o==null?void 0:o[gt];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(x3(n,o)&&(n!==void 0||Nf(e.t,t)))return!0;nc(e),If(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return tc(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,nc(e),If(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=pr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Wt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Wt(12)}},di={};oa(Df,function(e,t){di[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),di.deleteProperty=function(e,t){return di.set.call(this,e,t,void 0)},di.set=function(e,t,n){return Df.set.call(this,e[0],t,n,e[0])};var D3=function(){function e(n){var r=this;this.g=Nm,this.D=!0,this.produce=function(o,i,a){if(typeof o=="function"&&typeof i!="function"){var s=i;i=o;var l=r;return function(y){var _=this;y===void 0&&(y=s);for(var m=arguments.length,h=Array(m>1?m-1:0),g=1;g1?c-1:0),d=1;d=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var a=ln("Patches").$;return To(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),yt=new D3,$3=yt.produce;yt.produceWithPatches.bind(yt);var U3=yt.setAutoFreeze.bind(yt);yt.setUseProxies.bind(yt);yt.applyPatches.bind(yt);yt.createDraft.bind(yt);yt.finishDraft.bind(yt);U3(!1);const{createContext:Th,memo:F3,useMemo:j3,useRef:B3,useEffect:z3,useCallback:Im,useContext:$f,useState:V3}=V,Bw=Th(null),zw=Th(null),Vw=Th(null);function W3(){return $f(Vw)}function H3({initialState:e,actions:t={},children:n}){const r=B3(e),[o,i]=V3(e),a=Im(()=>r.current,[]);z3(()=>{},[a]);const s=Im((u,c)=>{if(typeof u=="function")return u(s,a);const f=$3(a(),c);f!==r.current&&(r.current=f,i(f))},[a]),l=j3(()=>Ww(t,s),[t,s]);return R(Bw.Provider,{value:o,children:R(zw.Provider,{value:s,children:R(Vw.Provider,{value:l,children:n})})})}function Jt(e){return t=>{const n=F3(t);function r(o){const i=$f(Bw),a=$f(zw),s=e(i,o),l={dispatch:a,...o,...s};return R(n,{...l})}return r}}function q3(e,t){return function(...n){return t(e.apply(this,n))}}function Ww(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"?n[r]=q3(o,t):typeof o=="object"&&(n[r]=Ww(o,t))}return n}const K3=e=>({apiConfigs:Sh(e),selectedClashAPIConfigIndex:Dw(e)}),Q3=Jt(K3)(G3);function G3({apiConfigs:e,selectedClashAPIConfigIndex:t}){const{app:{removeClashAPIConfig:n,selectClashAPIConfig:r}}=W3(),o=L.useCallback(a=>{n(a)},[n]),i=L.useCallback(a=>{r(a)},[r]);return R(Cr,{children:R("ul",{className:gn.ul,children:e.map((a,s)=>R("li",{className:Ar(gn.li,{[gn.hasSecret]:a.secret,[gn.isSelected]:s===t}),children:R(X3,{disableRemove:s===t,baseURL:a.baseURL,secret:a.secret,onRemove:o,onSelect:i})},a.baseURL+a.secret))})})}function X3({baseURL:e,secret:t,disableRemove:n,onRemove:r,onSelect:o}){const[i,a]=XA(),s=i?MA:UA,l=L.useCallback(u=>{u.stopPropagation()},[]);return le(Cr,{children:[R(Mm,{disabled:n,onClick:()=>r({baseURL:e,secret:t}),className:gn.close,children:R(KA,{size:20})}),R("span",{className:gn.url,tabIndex:0,role:"button",onClick:()=>o({baseURL:e,secret:t}),onKeyUp:l,children:e}),R("span",{}),t?le(Cr,{children:[R("span",{className:gn.secret,children:i?t:"***"}),R(Mm,{onClick:a,className:gn.eye,children:R(s,{size:20})})]}):null]})}function Mm({children:e,onClick:t,className:n,disabled:r}){return R("button",{disabled:r,className:Ar(n,gn.btn),onClick:t,children:e})}const Y3="_root_zwtea_1",J3="_header_zwtea_5",Z3="_icon_zwtea_10",e4="_body_zwtea_20",t4="_hostnamePort_zwtea_24",n4="_error_zwtea_36",r4="_footer_zwtea_42",ur={root:Y3,header:J3,icon:Z3,body:e4,hostnamePort:t4,error:n4,footer:r4},o4="_btn_vsco8_4",i4="_minimal_vsco8_37",a4="_btnInternal_vsco8_54",s4="_btnStart_vsco8_61",l4="_loadingContainer_vsco8_67",Pi={btn:o4,minimal:i4,btnInternal:a4,btnStart:s4,loadingContainer:l4},u4="_sectionNameType_k6imc_4",c4="_loadingDot_k6imc_75",f4="_dot2_k6imc_1",d4="_dot1_k6imc_1",h4="_dot3_k6imc_1",Hw={sectionNameType:u4,loadingDot:c4,dot2:f4,dot1:d4,dot3:h4};function C$({name:e,type:t}){return le("h2",{className:Hw.sectionNameType,children:[R("span",{style:{marginRight:5},children:e}),R("span",{children:t})]})}function p4(){return R("span",{className:Hw.loadingDot})}const{forwardRef:v4,useCallback:m4}=Tt;function g4(e,t){const{onClick:n,disabled:r=!1,isLoading:o,kind:i="primary",className:a,children:s,label:l,text:u,start:c,...f}=e,d={children:s,label:l,text:u,start:c},p=m4(y=>{o||n&&n(y)},[o,n]),v=Ar(Pi.btn,{[Pi.minimal]:i==="minimal"},a);return R("button",{className:v,ref:t,onClick:p,disabled:r,...f,children:o?le(Cr,{children:[R("span",{style:{display:"inline-flex",opacity:0},children:R(Dm,{...d})}),R("span",{className:Pi.loadingContainer,children:R(p4,{})})]}):R(Dm,{...d})})}function Dm({children:e,label:t,text:n,start:r}){return le("div",{className:Pi.btnInternal,children:[r&&R("span",{className:Pi.btnStart,children:typeof r=="function"?r():r}),e||t||n]})}const y4=v4(g4),w4="_root_1or8t_1",S4="_floatAbove_1or8t_32",$m={root:w4,floatAbove:S4},{useCallback:_4}=Tt;function Um({id:e,label:t,value:n,onChange:r,...o}){const i=_4(a=>r(a),[r]);return le("div",{className:$m.root,children:[R("input",{id:e,value:n,onChange:i,...o}),R("label",{htmlFor:e,className:$m.floatAbove,children:t})]})}const b4="_path_r8pm3_1",E4="_dash_r8pm3_1",C4={path:b4,dash:E4};function Lh({width:e=320,height:t=320,animate:n=!1,c0:r="#316eb5",c1:o="#f19500",line:i="#cccccc"}){const a=Ar({[C4.path]:n});return le("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.2",viewBox:"0 0 512 512",width:e,height:t,children:[R("path",{id:"Layer",className:a,fill:r,stroke:i,strokeLinecap:"round",strokeWidth:"4",d:"m280.8 182.4l119-108.3c1.9-1.7 4.3-2.7 6.8-2.4l39.5 4.1c2.1 0.3 3.9 2.2 3.9 4.4v251.1c0 2-1.5 3.9-3.5 4.4l-41.9 9c-0.5 0.3-1.2 0.3-1.9 0.3h-18.8c-2.4 0-4.4-2-4.4-4.4v-132.9c0-7.5-9-11.7-14.8-6.3l-59 53.4c-2.2 2.2-5.4 2.9-8.5 1.9-27.1-8-56.3-8-83.4 0-2.9 1-6.1 0.3-8.5-1.9l-59-53.4c-5.6-5.4-14.6-1.2-14.6 6.3v132.9c0 2.4-2.2 4.4-4.7 4.4h-18.7c-0.7 0-1.2 0-2-0.3l-41.6-9c-2-0.5-3.5-2.4-3.5-4.4v-251.1c0-2.2 1.8-4.1 3.9-4.4l39.5-4.1c2.5-0.3 4.9 0.7 6.9 2.4l115.7 105.3c2 1.7 4.6 2.5 7.1 2.2 15.3-2.2 31.4-1.9 46.5 0.8z"}),R("path",{id:"Layer",className:a,fill:r,stroke:i,strokeLinecap:"round",strokeWidth:"4",d:"m269.4 361.8l-7.1 13.4c-2.4 4.2-8.5 4.2-11 0l-7-13.4c-2.5-4.1 0.7-9.3 5.3-9h14.4c4.9 0 7.8 4.9 5.4 9z"}),R("path",{id:"Layer",className:a,fill:o,stroke:i,strokeLinecap:"round",strokeWidth:"4",d:"m160.7 362.5c3.6 0 6.8 3.2 6.8 6.9 0 3.6-3.2 6.5-6.8 6.5h-94.6c-3.6 0-6.8-2.9-6.8-6.5 0-3.7 3.2-6.9 6.8-6.9z"}),R("path",{id:"Layer",className:a,fill:o,stroke:i,strokeLinecap:"round",strokeWidth:"4",d:"m158.7 394.7c3.4-1 7.1 1 8.3 4.4 1 3.4-1 7.3-4.4 8.3l-92.8 31.7c-3.4 1.2-7.3-0.7-8.3-4.2-1.2-3.6 0.7-7.3 4.4-8.5z"}),R("path",{id:"Layer",className:a,fill:o,stroke:i,strokeLinecap:"round",strokeWidth:"4",d:"m446.1 426.4c3.4 1.2 5.3 4.9 4.3 8.5-1.2 3.5-4.8 5.4-8.2 4.2l-93.1-31.7c-3.5-1-5.4-4.9-4.2-8.3 1-3.4 4.9-5.4 8.3-4.4z"}),R("path",{id:"Layer",className:a,fill:o,stroke:i,strokeLinecap:"round",strokeWidth:"4",d:"m445.8 362.5c3.7 0 6.6 3.2 6.6 6.9 0 3.6-2.9 6.5-6.6 6.5h-94.8c-3.6 0-6.6-2.9-6.6-6.5 0-3.7 3-6.9 6.6-6.9z"})]})}const{useState:rc,useRef:Fm,useCallback:oc,useEffect:R4}=Tt,qw=0,O4=e=>({apiConfig:sr(e)});function x4({dispatch:e}){const[t,n]=rc(""),[r,o]=rc(""),[i,a]=rc(""),s=Fm(!1),l=Fm(null),u=oc(p=>{s.current=!0,a("");const v=p.target,{name:y}=v,_=v.value;switch(y){case"baseURL":n(_);break;case"secret":o(_);break;default:throw new Error(`unknown input name ${y}`)}},[]),c=oc(()=>{let p=t;if(p){const v=t.substring(0,7);if(v.includes(":/")){if(v!=="http://"&&v!=="https:/")return[1,"Must starts with http:// or https://"]}else window.location.protocol&&(p=`${window.location.protocol}//${p}`)}k4({baseURL:p,secret:r}).then(v=>{v[0]!==qw?a(v[1]):e(l3({baseURL:p,secret:r}))})},[t,r,e]),f=oc(p=>{p.target instanceof Element&&(!p.target.tagName||p.target.tagName.toUpperCase()!=="INPUT")||p.key==="Enter"&&c()},[c]),d=async()=>{(await fetch("/")).json().then(v=>{v.hello==="clash"&&n(window.location.origin)})};return R4(()=>{d()},[]),le("div",{className:ur.root,ref:l,onKeyDown:f,children:[R("div",{className:ur.header,children:R("div",{className:ur.icon,children:R(Lh,{width:160,height:160,stroke:"var(--stroke)"})})}),R("div",{className:ur.body,children:le("div",{className:ur.hostnamePort,children:[R(Um,{id:"baseURL",name:"baseURL",label:"API Base URL",type:"text",placeholder:"http://127.0.0.1:6756",value:t,onChange:u}),R(Um,{id:"secret",name:"secret",label:"Secret(optional)",value:r,type:"text",onChange:u})]})}),R("div",{className:ur.error,children:i||null}),R("div",{className:ur.footer,children:R(y4,{label:"Add",onClick:c})}),R("div",{style:{height:20}}),R(Q3,{})]})}const Kw=Jt(O4)(x4);async function k4(e){try{new URL(e.baseURL)}catch{if(e.baseURL){const n=e.baseURL.substring(0,7);if(n!=="http://"&&n!=="https:/")return[1,"Must starts with http:// or https://"]}return[1,"Invalid URL"]}try{const t=await Lw(e);return t.status>399?[1,t.statusText]:[qw]}catch{return[1,"Failed to connect"]}}async function Qw(e,t){let n={};try{const{url:r,init:o}=Me(t),i=await fetch(r+e,o);i.ok&&(n=await i.json())}catch(r){console.log(`failed to fetch ${e}`,r)}return n}const P4="_root_ul0od_4",T4="_h1_ul0od_10",jm={root:P4,h1:T4};function L4({title:e}){return R("div",{className:jm.root,children:R("h1",{className:jm.h1,children:e})})}const Gw=V.memo(L4),N4="_root_10mcy_4",A4="_mono_10mcy_13",I4="_link_10mcy_17",ic={root:N4,mono:A4,link:I4};function Bm({name:e,link:t,version:n}){return le("div",{className:ic.root,children:[R("h2",{children:e}),le("p",{children:[R("span",{children:"Version "}),R("span",{className:ic.mono,children:n})]}),R("p",{children:le("a",{className:ic.link,href:t,target:"_blank",rel:"noopener noreferrer",children:[R(BA,{size:20}),R("span",{children:"Source"})]})})]})}function M4(e){const{data:t}=Y0(["/version",e.apiConfig],()=>Qw("/version",e.apiConfig));return le(Cr,{children:[R(Gw,{title:"About"}),t&&t.version?R(Bm,{name:t.meta&&t.premium?"sing-box":t.meta?"Clash.Meta":"Clash",version:t.version,link:t.meta&&t.premium?"https://github.com/SagerNet/sing-box":t.meta?"https://github.com/MetaCubeX/Clash.Meta":"https://github.com/Dreamacro/clash"}):null,R(Bm,{name:"Yacd",version:"0.3.7",link:"https://github.com/metacubex/yacd"})]})}const D4=e=>({apiConfig:sr(e)}),$4=Jt(D4)(M4);/** * @reach/utils v0.18.0 * * Copyright (c) 2018-2022, React Training LLC * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Xw(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function kn(e,t){return n=>{if(e&&e(n),!n.defaultPrevented)return t(n)}}function zm(e){return typeof e=="boolean"}function Uf(e){return!!(e&&{}.toString.call(e)=="[object Function]")}function U4(e,t){if(e!=null)if(Uf(e))e(t);else try{e.current=t}catch{throw new Error(`Cannot assign value "${t}" to ref "${e}"`)}}function Yw(...e){return L.useCallback(t=>{for(let n of e)U4(n,t)},e)}function Nh(e){return Xw()?e?e.ownerDocument:document:null}function F4(e){let t=Nh(e),n=t.defaultView||window;return t?{width:t.documentElement.clientWidth??n.innerWidth,height:t.documentElement.clientHeight??n.innerHeight}:{width:0,height:0}}function Jw(...e){return e.filter(t=>t!=null).join("--")}function j4(){let[,e]=L.useState(Object.create(null));return L.useCallback(()=>{e(Object.create(null))},[])}var Ti=Xw()?L.useLayoutEffect:L.useEffect,ac=!1,B4=0;function Vm(){return++B4}var Wm=Tt["useId".toString()];function z4(e){if(Wm!==void 0){let o=Wm();return e??o}let t=e??(ac?Vm():null),[n,r]=L.useState(t);return Ti(()=>{n===null&&r(Vm())},[]),L.useEffect(()=>{ac===!1&&(ac=!0)},[]),e??n??void 0}var V4=({children:e,type:t="reach-portal",containerRef:n})=>{let r=L.useRef(null),o=L.useRef(null),i=j4();return L.useEffect(()=>{n!=null&&(typeof n!="object"||!("current"in n)?console.warn("@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`."):n.current==null&&console.warn("@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html."))},[n]),Ti(()=>{if(!r.current)return;let a=r.current.ownerDocument,s=(n==null?void 0:n.current)||a.body;return o.current=a==null?void 0:a.createElement(t),s.appendChild(o.current),i(),()=>{o.current&&s&&s.removeChild(o.current)}},[t,i,n]),o.current?mo.createPortal(e,o.current):L.createElement("span",{ref:r})},Zw=({unstable_skipInitialRender:e,...t})=>{let[n,r]=L.useState(!1);return L.useEffect(()=>{e&&r(!0)},[e]),e&&!n?null:L.createElement(V4,{...t})};Zw.displayName="Portal";var eS=L.forwardRef(function({as:t="span",style:n={},...r},o){return L.createElement(t,{ref:o,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal",...n},...r})});eS.displayName="VisuallyHidden";var W4=["bottom","height","left","right","top","width"],H4=function(t,n){return t===void 0&&(t={}),n===void 0&&(n={}),W4.some(function(r){return t[r]!==n[r]})},Pn=new Map,tS,q4=function e(){var t=[];Pn.forEach(function(n,r){var o=r.getBoundingClientRect();H4(o,n.rect)&&(n.rect=o,t.push(n))}),t.forEach(function(n){n.callbacks.forEach(function(r){return r(n.rect)})}),tS=window.requestAnimationFrame(e)};function K4(e,t){return{observe:function(){var r=Pn.size===0;Pn.has(e)?Pn.get(e).callbacks.push(t):Pn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),r&&q4()},unobserve:function(){var r=Pn.get(e);if(r){var o=r.callbacks.indexOf(t);o>=0&&r.callbacks.splice(o,1),r.callbacks.length||Pn.delete(e),Pn.size||cancelAnimationFrame(tS)}}}}function nS(e,t,n){let r,o;zm(t)?r=t:(r=(t==null?void 0:t.observe)??!0,o=t==null?void 0:t.onChange),Uf(n)&&(o=n),L.useEffect(()=>{zm(t)&&console.warn("Passing `observe` as the second argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `observe` property as the second argument (`useRect(ref, { observe })`).\nSee https://reach.tech/rect#userect-observe")},[t]),L.useEffect(()=>{Uf(n)&&console.warn("Passing `onChange` as the third argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `onChange` property as the second argument (`useRect(ref, { onChange })`).\nSee https://reach.tech/rect#userect-onchange")},[n]);let[i,a]=L.useState(e.current),s=L.useRef(!1),l=L.useRef(!1),[u,c]=L.useState(null),f=L.useRef(o);return Ti(()=>{f.current=o,e.current!==i&&a(e.current)}),Ti(()=>{i&&!s.current&&(s.current=!0,c(i.getBoundingClientRect()))},[i]),Ti(()=>{if(!r)return;let d=i;if(l.current||(l.current=!0,d=e.current),!d){console.warn("You need to place the ref");return}let p=K4(d,v=>{var y;(y=f.current)==null||y.call(f,v),c(v)});return p.observe(),()=>{p.unobserve()}},[r,i,e]),u}var Q4=100,G4=500,Ff={initial:"IDLE",states:{IDLE:{enter:sc,on:{MOUSE_ENTER:"FOCUSED",FOCUS:"VISIBLE"}},FOCUSED:{enter:J4,leave:Z4,on:{MOUSE_MOVE:"FOCUSED",MOUSE_LEAVE:"IDLE",MOUSE_DOWN:"DISMISSED",BLUR:"IDLE",REST:"VISIBLE"}},VISIBLE:{on:{FOCUS:"FOCUSED",MOUSE_ENTER:"FOCUSED",MOUSE_LEAVE:"LEAVING_VISIBLE",BLUR:"LEAVING_VISIBLE",MOUSE_DOWN:"DISMISSED",SELECT_WITH_KEYBOARD:"DISMISSED",GLOBAL_MOUSE_MOVE:"LEAVING_VISIBLE"}},LEAVING_VISIBLE:{enter:eI,leave:()=>{tI(),sc()},on:{MOUSE_ENTER:"VISIBLE",FOCUS:"VISIBLE",TIME_COMPLETE:"IDLE"}},DISMISSED:{leave:()=>{sc()},on:{MOUSE_LEAVE:"IDLE",BLUR:"IDLE"}}}},kt={value:Ff.initial,context:{id:null}},Rs=[];function X4(e){return Rs.push(e),()=>{Rs.splice(Rs.indexOf(e),1)}}function Y4(){Rs.forEach(e=>e(kt))}var jf;function J4(){window.clearTimeout(jf),jf=window.setTimeout(()=>{Bt({type:"REST"})},Q4)}function Z4(){window.clearTimeout(jf)}var Bf;function eI(){window.clearTimeout(Bf),Bf=window.setTimeout(()=>Bt({type:"TIME_COMPLETE"}),G4)}function tI(){window.clearTimeout(Bf)}function sc(){kt.context.id=null}function nI({id:e,onPointerEnter:t,onPointerMove:n,onPointerLeave:r,onPointerDown:o,onMouseEnter:i,onMouseMove:a,onMouseLeave:s,onMouseDown:l,onFocus:u,onBlur:c,onKeyDown:f,disabled:d,ref:p,DEBUG_STYLE:v}={}){let y=String(z4(e)),[_,m]=L.useState(v?!0:Hm(y,!0)),h=L.useRef(null),g=Yw(p,h),S=nS(h,{observe:_});L.useEffect(()=>X4(()=>{m(Hm(y))}),[y]),L.useEffect(()=>{let M=Nh(h.current);function C(O){(O.key==="Escape"||O.key==="Esc")&&kt.value==="VISIBLE"&&Bt({type:"SELECT_WITH_KEYBOARD"})}return M.addEventListener("keydown",C),()=>M.removeEventListener("keydown",C)},[]),aI({disabled:d,isVisible:_,ref:h});function k(M,C){return typeof window<"u"&&"PointerEvent"in window?M:kn(M,C)}function T(M){return function(O){O.pointerType==="mouse"&&M(O)}}function N(){Bt({type:"MOUSE_ENTER",id:y})}function I(){Bt({type:"MOUSE_MOVE",id:y})}function G(){Bt({type:"MOUSE_LEAVE"})}function $(){kt.context.id===y&&Bt({type:"MOUSE_DOWN"})}function X(){window.__REACH_DISABLE_TOOLTIPS||Bt({type:"FOCUS",id:y})}function ce(){kt.context.id===y&&Bt({type:"BLUR"})}function re(M){(M.key==="Enter"||M.key===" ")&&Bt({type:"SELECT_WITH_KEYBOARD"})}return[{"aria-describedby":_?Jw("tooltip",y):void 0,"data-state":_?"tooltip-visible":"tooltip-hidden","data-reach-tooltip-trigger":"",ref:g,onPointerEnter:kn(t,T(N)),onPointerMove:kn(n,T(I)),onPointerLeave:kn(r,T(G)),onPointerDown:kn(o,T($)),onMouseEnter:k(i,N),onMouseMove:k(a,I),onMouseLeave:k(s,G),onMouseDown:k(l,$),onFocus:kn(u,X),onBlur:kn(c,ce),onKeyDown:kn(f,re)},{id:y,triggerRect:S,isVisible:_},_]}var Ah=L.forwardRef(function({children:e,label:t,ariaLabel:n,id:r,DEBUG_STYLE:o,...i},a){let s=L.Children.only(e);L.useEffect(()=>{n&&console.warn("The `ariaLabel prop is deprecated and will be removed from @reach/tooltip in a future version of Reach UI. Please use `aria-label` instead.")},[n]);let[l,u]=nI({id:r,onPointerEnter:s.props.onPointerEnter,onPointerMove:s.props.onPointerMove,onPointerLeave:s.props.onPointerLeave,onPointerDown:s.props.onPointerDown,onMouseEnter:s.props.onMouseEnter,onMouseMove:s.props.onMouseMove,onMouseLeave:s.props.onMouseLeave,onMouseDown:s.props.onMouseDown,onFocus:s.props.onFocus,onBlur:s.props.onBlur,onKeyDown:s.props.onKeyDown,disabled:s.props.disabled,ref:s.ref,DEBUG_STYLE:o});return L.createElement(L.Fragment,null,L.cloneElement(s,l),L.createElement(rS,{ref:a,label:t,"aria-label":n,...u,...i}))});Ah.displayName="Tooltip";var rS=L.forwardRef(function({label:t,ariaLabel:n,isVisible:r,id:o,...i},a){return r?L.createElement(Zw,null,L.createElement(oS,{ref:a,label:t,"aria-label":n,isVisible:r,...i,id:Jw("tooltip",String(o))})):null});rS.displayName="TooltipPopup";var oS=L.forwardRef(function({ariaLabel:t,"aria-label":n,as:r="div",id:o,isVisible:i,label:a,position:s=iI,style:l,triggerRect:u,...c},f){let d=(n||t)!=null,p=L.useRef(null),v=Yw(f,p),y=nS(p,{observe:i});return L.createElement(L.Fragment,null,L.createElement(r,{role:d?void 0:"tooltip",...c,ref:v,"data-reach-tooltip":"",id:d?void 0:o,style:{...l,...rI(s,u,y)}},a),d&&L.createElement(eS,{role:"tooltip",id:o},n||t))});oS.displayName="TooltipContent";function rI(e,t,n){return n?e(t,n):{visibility:"hidden"}}var oI=8,iI=(e,t,n=oI)=>{let{width:r,height:o}=F4();if(!e||!t)return{};let i={top:e.top-t.height<0,right:r{if(!(typeof window<"u"&&"PointerEvent"in window)||!e||!t)return;let r=Nh(n.current);function o(i){t&&(i.target instanceof Element&&i.target.closest("[data-reach-tooltip-trigger][data-state='tooltip-visible']")||Bt({type:"GLOBAL_MOUSE_MOVE"}))}return r.addEventListener("mousemove",o),()=>{r.removeEventListener("mousemove",o)}},[e,t,n])}function Bt(e){let{value:t,context:n,changed:r}=sI(kt,e);r&&(kt={value:t,context:n},Y4())}function sI(e,t){let n=Ff.states[e.value],r=n&&n.on&&n.on[t.type];if(!r)return{...e,changed:!1};n&&n.leave&&n.leave(e.context,t);const{type:o,...i}=t;let a={...kt.context,...i},s=typeof r=="string"?r:r.target,l=Ff.states[s];return l&&l.enter&&l.enter(e.context,t),{value:s,context:a,changed:!0}}function Hm(e,t){return kt.context.id===e&&(t?kt.value==="VISIBLE":kt.value==="VISIBLE"||kt.value==="LEAVING_VISIBLE")}function lI(e){let t={};const n={},r={};function o(l="default"){return n[l]=e(l).then(u=>{delete n[l],t[l]=u}).catch(u=>{r[l]=u}),n[l]}function i(l="default"){t[l]!==void 0||n[l]||o(l)}function a(l="default"){if(t[l]!==void 0)return t[l];throw r[l]?r[l]:n[l]?n[l]:o(l)}function s(l){l?delete t[l]:t={}}return{preload:i,read:a,clear:s}}const Ih=lI(()=>Ot(()=>import("./index-777fdc28.js"),[],import.meta.url)),uI="_iconWrapper_1rpjb_1",cI="_themeSwitchContainer_1rpjb_21",qm={iconWrapper:uI,themeSwitchContainer:cI};function fI({theme:e,dispatch:t}){const{t:n}=No(),r=L.useMemo(()=>{switch(e){case"dark":return R(Km,{});case"auto":return R(hI,{});case"light":return R(dI,{});default:return console.assert(!1,"Unknown theme"),R(Km,{})}},[e]),o=L.useCallback(i=>t(f3(i.target.value)),[t]);return R(Ah,{label:n("switch_theme"),"aria-label":"switch theme",children:le("div",{className:qm.themeSwitchContainer,children:[R("span",{className:qm.iconWrapper,children:r}),le("select",{onChange:o,children:[R("option",{value:"auto",children:"Auto"}),R("option",{value:"dark",children:"Dark"}),R("option",{value:"light",children:"Light"})]})]})})}function Km(){const t=Ih.read().motion;return R("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:R(t.path,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})})}function dI(){const t=Ih.read().motion;return le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[R("circle",{cx:"12",cy:"12",r:"5"}),le(t.g,{initial:{scale:.7},animate:{scale:1},transition:{duration:.5},children:[R("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),R("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),R("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),R("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),R("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),R("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),R("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),R("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]})}function hI(){const t=Ih.read().motion;return le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[R("circle",{cx:"12",cy:"12",r:"11"}),R("clipPath",{id:"cut-off-bottom",children:R(t.rect,{x:"12",y:"0",width:"12",height:"24",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})}),R("circle",{cx:"12",cy:"12",r:"6",clipPath:"url(#cut-off-bottom)",fill:"currentColor"})]})}const pI=e=>({theme:_h(e)}),iS=Jt(pI)(fI),zf=0,Vf={[zf]:{message:"Browser not supported!",detail:'This browser does not support "fetch", please choose another one.'},default:{message:`出错了! 请尝试清理缓存和Cookie后重试`}};function vI(e){const{code:t}=e;return typeof t=="number"?Vf[t]:Vf.default}const mI="_content_b98hm_1",gI="_container_b98hm_16",yI="_overlay_b98hm_22",wI="_fixed_b98hm_26",rs={content:mI,container:gI,overlay:yI,fixed:wI},SI="_overlay_fy74n_1",_I="_content_fy74n_14",Qm={overlay:SI,content:_I};function bI({isOpen:e,onRequestClose:t,className:n,overlayClassName:r,children:o,...i}){const a=Ar(n,Qm.content),s=Ar(r,Qm.overlay);return R(B0,{isOpen:e,onRequestClose:t,className:a,overlayClassName:s,...i,children:o})}const EI=L.memo(bI),{useCallback:CI,useEffect:RI}=Tt;function OI({dispatch:e,apiConfig:t,modals:n}){if(!window.fetch){const{detail:o}=Vf[zf],i=new Error(o);throw i.code=zf,i}const r=CI(()=>{e(e3("apiConfig"))},[e]);return RI(()=>{e(Br(t))},[e,t]),le(EI,{isOpen:n.apiConfig,className:rs.content,overlayClassName:rs.overlay,shouldCloseOnOverlayClick:!1,shouldCloseOnEsc:!1,onRequestClose:r,children:[R("div",{className:rs.container,children:R(Kw,{})}),R("div",{className:rs.fixed,children:R(iS,{})})]})}const xI=e=>({modals:e.modals,apiConfig:sr(e)}),kI=Jt(xI)(OI),PI="_root_16avz_1",TI="_yacd_16avz_14",LI="_link_16avz_23",lc={root:PI,yacd:TI,link:LI};function NI({width:e=24,height:t=24}={}){return R("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:R("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"})})}const AI="https://github.com/metacubex/yacd";function II({message:e,detail:t}){return le("div",{className:lc.root,children:[R("div",{className:lc.yacd,children:R(Lh,{width:150,height:150})}),e?R("h1",{children:e}):null,t?R("p",{children:t}):null,R("p",{children:le("a",{className:lc.link,href:AI,children:[R(NI,{width:16,height:16}),"metacubex/yacd"]})})]})}class MI extends L.Component{constructor(){super(...arguments);Bh(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){if(this.state.error){const{message:n,detail:r}=vI(this.state.error);return R(II,{message:n,detail:r})}else return this.props.children}}const DI="_root_1ddes_4",$I="_chart_1ddes_13",Gm={root:DI,chart:$I},UI="_loading_wpm96_1",FI="_spinner_wpm96_9",jI="_rotate_wpm96_1",Xm={loading:UI,spinner:FI,rotate:jI},aS=({height:e})=>{const t=e?{height:e}:{};return R("div",{className:Xm.loading,style:t,children:R("div",{className:Xm.spinner})})},sS="/memory",BI=new TextDecoder("utf-8"),os=150,aa={labels:Array(os).fill(0),inuse:Array(os),oslimit:Array(os),size:os,subscribers:[],appendData(e){this.inuse.shift(),this.oslimit.shift(),this.labels.shift();const t=Date.now();this.inuse.push(e.inuse),this.oslimit.push(e.oslimit),this.labels.push(t),this.subscribers.forEach(n=>n(e))},subscribe(e){return this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}}};let so=!1,is="";function Wf(e){aa.appendData(JSON.parse(e))}function lS(e){return e.read().then(({done:t,value:n})=>{const r=BI.decode(n,{stream:!t});is+=r;const o=is.split(` `),i=o[o.length-1];for(let a=0;a{if(r.ok){const o=r.body.getReader();lS(o)}else so=!1},r=>{console.log("fetch /memory error",r),so=!1}),aa}var Mh=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n};function Ym(e,t,n,r=0,o=!1){for(const a of t)if(Mh(n,a.args)){if(o)return;if(a.error)throw a.error;if(a.response)return a.response;throw a.promise}const i={args:n,promise:e(...n).then(a=>i.response=a??!0).catch(a=>i.error=a??"unknown error").then(()=>{r>0&&setTimeout(()=>{const a=t.indexOf(i);a!==-1&&t.splice(a,1)},r)})};if(t.push(i),!o)throw i.promise}function WI(e,...t){if(t===void 0||t.length===0)e.splice(0,e.length);else{const n=e.find(r=>Mh(t,r.args));if(n){const r=e.indexOf(n);r!==-1&&e.splice(r,1)}}}function uS(e,t=0){const n=[];return{read:(...r)=>Ym(e,n,r,t),preload:(...r)=>void Ym(e,n,r,t,!0),clear:(...r)=>WI(n,...r),peek:(...r)=>{var o;return(o=n.find(i=>Mh(r,i.args)))==null?void 0:o.response}}}const Jm=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];function Er(e){if(e<1e3)return e+" B";const t=Math.min(Math.floor(Math.log10(e)/3),Jm.length-1);e=Number((e/Math.pow(1e3,t)).toPrecision(3));const n=Jm[t];return e+" "+n}const HI=uS(()=>Ot(()=>import("./chart-lib-6081a478.js"),[],import.meta.url)),Zm={borderWidth:1,pointRadius:0,tension:.2,fill:!0},qI={responsive:!0,maintainAspectRatio:!0,plugins:{legend:{labels:{boxWidth:20}}},scales:{x:{display:!1,type:"category"},y:{type:"linear",display:!0,grid:{display:!0,color:"#555",drawTicks:!1},border:{dash:[3,6]},ticks:{maxTicksLimit:5,callback(e){return Er(e)+"/s "}}}}},eg=[{down:{backgroundColor:"rgba(81, 168, 221, 0.5)",borderColor:"rgb(81, 168, 221)"},up:{backgroundColor:"rgba(219, 77, 109, 0.5)",borderColor:"rgb(219, 77, 109)"}},{up:{backgroundColor:"rgba(245,78,162,0.6)",borderColor:"rgba(245,78,162,1)"},down:{backgroundColor:"rgba(123,59,140,0.6)",borderColor:"rgba(66,33,142,1)"}},{up:{backgroundColor:"rgba(94, 175, 223, 0.3)",borderColor:"rgb(94, 175, 223)"},down:{backgroundColor:"rgba(139, 227, 195, 0.3)",borderColor:"rgb(139, 227, 195)"}},{up:{backgroundColor:"rgba(242, 174, 62, 0.3)",borderColor:"rgb(242, 174, 62)"},down:{backgroundColor:"rgba(69, 154, 248, 0.3)",borderColor:"rgb(69, 154, 248)"}}],KI=uS(()=>Ot(()=>import("./chart-lib-6081a478.js"),[],import.meta.url)),QI={borderWidth:1,pointRadius:0,tension:.2,fill:!0},cS={responsive:!0,maintainAspectRatio:!0,plugins:{legend:{labels:{boxWidth:20}}},scales:{x:{display:!1,type:"category"},y:{type:"linear",display:!0,grid:{display:!0,color:"#555",drawTicks:!1},border:{dash:[3,6]},ticks:{maxTicksLimit:3,callback(e){return Er(e)}}}}},GI=[{inuse:{backgroundColor:"rgba(81, 168, 221, 0.5)",borderColor:"rgb(81, 168, 221)"}},{inuse:{backgroundColor:"rgba(245,78,162,0.6)",borderColor:"rgba(245,78,162,1)"}},{inuse:{backgroundColor:"rgba(94, 175, 223, 0.3)",borderColor:"rgb(94, 175, 223)"}},{inuse:{backgroundColor:"rgba(242, 174, 62, 0.3)",borderColor:"rgb(242, 174, 62)"}}],{useEffect:fS}=V;function XI(e,t,n,r,o={}){fS(()=>{const i=document.getElementById(t).getContext("2d"),a={...qI,...o},s=new e(i,{type:"line",data:n,options:a}),l=r&&r.subscribe(()=>s.update());return()=>{l&&l(),s.destroy()}},[e,t,n,r,o])}function YI(e,t,n,r,o={}){fS(()=>{const i=document.getElementById(t).getContext("2d"),a={...cS,...o},s=new e(i,{type:"line",data:n,options:a}),l=r&&r.subscribe(()=>s.update());return()=>{l&&l(),s.destroy()}},[e,t,n,r,o])}const JI="_TrafficChart_13afo_1",ZI={TrafficChart:JI},{useMemo:eM}=Tt,tM={justifySelf:"center",position:"relative",width:"100%",height:"100%"},nM={width:"100%",height:"100%",padding:"10px",borderRadius:"10px"},rM=e=>({apiConfig:sr(e),selectedChartStyleIndex:$w(e)}),oM=Jt(rM)(iM);function iM({apiConfig:e,selectedChartStyleIndex:t}){const n=KI.read(),r=zI(e),{t:o}=No(),i=eM(()=>({labels:r.labels,datasets:[{...QI,...cS,...GI[t].inuse,label:o("Memory"),data:r.inuse}]}),[r,t,o]);return YI(n.Chart,"MemoryChart",i,r),R("div",{style:tM,children:R("canvas",{id:"MemoryChart",style:nM,className:ZI.TrafficChart})})}const aM="_TrafficChart_13afo_1",sM={TrafficChart:aM},{useMemo:lM}=Tt,uM={justifySelf:"center",position:"relative",width:"100%",height:"100%"},cM={width:"100%",height:"100%",padding:"10px",borderRadius:"10px"},fM=e=>({apiConfig:sr(e),selectedChartStyleIndex:$w(e)}),dM=Jt(fM)(hM);function hM({apiConfig:e,selectedChartStyleIndex:t}){const n=HI.read(),r=wh(e),{t:o}=No(),i=lM(()=>({labels:r.labels,datasets:[{...Zm,...eg[t].up,label:o("Up"),data:r.up},{...Zm,...eg[t].down,label:o("Down"),data:r.down}]}),[r,t,o]);return XI(n.Chart,"trafficChart",i,r),R("div",{style:uM,children:R("canvas",{id:"trafficChart",style:cM,className:sM.TrafficChart})})}const cu="/connections",Bn=[];function pM(e){let t;try{t=JSON.parse(e),t.connections.forEach(n=>{let r=n.metadata;r.process==null&&r.processPath!=null&&(r.process=r.processPath.replace(/^.*[/\\](.*)$/,"$1"))})}catch{console.log("JSON.parse error",JSON.parse(e))}Bn.forEach(n=>n.listner(t))}let ss;function vM(e,t,n){if(ss===1&&t)return tg({listner:t,onClose:n});ss=1;const r=dh(e,cu),o=new WebSocket(r);if(o.addEventListener("error",()=>{ss=3,Bn.forEach(i=>i.onClose()),Bn.length=0}),o.addEventListener("close",()=>{ss=3,Bn.forEach(i=>i.onClose()),Bn.length=0}),o.addEventListener("message",i=>pM(i.data)),t)return tg({listner:t,onClose:n})}function tg(e){return Bn.push(e),function(){const n=Bn.indexOf(e);Bn.splice(n,1)}}async function R$(e){const{url:t,init:n}=Me(e);return await fetch(t+cu,{...n,method:"DELETE"})}async function mM(e){const{url:t,init:n}=Me(e);return await fetch(t+cu,{...n})}async function gM(e,t){const{url:n,init:r}=Me(e),o=`${n}${cu}/${t}`;return await fetch(o,{...r,method:"DELETE"})}const yM="_TrafficNow_w4nk9_2",wM="_sec_w4nk9_35",cr={TrafficNow:yM,sec:wM},{useState:dS,useEffect:hS,useCallback:SM}=Tt,_M=e=>({apiConfig:sr(e)}),bM=Jt(_M)(EM);function EM({apiConfig:e}){const{t}=No(),{upStr:n,downStr:r}=CM(e),{upTotal:o,dlTotal:i,connNumber:a,mUsage:s}=RM(e);return le("div",{className:cr.TrafficNow,children:[le("div",{className:cr.sec,children:[R("div",{children:t("Upload")}),R("div",{children:n})]}),le("div",{className:cr.sec,children:[R("div",{children:t("Download")}),R("div",{children:r})]}),le("div",{className:cr.sec,children:[R("div",{children:t("Upload Total")}),R("div",{children:o})]}),le("div",{className:cr.sec,children:[R("div",{children:t("Download Total")}),R("div",{children:i})]}),le("div",{className:cr.sec,children:[R("div",{children:t("Active Connections")}),R("div",{children:a})]}),le("div",{className:cr.sec,children:[R("div",{children:t("Memory Usage")}),R("div",{children:s})]})]})}function CM(e){const[t,n]=dS({upStr:"0 B/s",downStr:"0 B/s"});return hS(()=>wh(e).subscribe(r=>n({upStr:Er(r.up)+"/s",downStr:Er(r.down)+"/s"})),[e]),t}function RM(e){const[t,n]=dS({upTotal:"0 B",dlTotal:"0 B",connNumber:0,mUsage:"0 B"}),r=SM(({downloadTotal:o,uploadTotal:i,connections:a,memory:s})=>{n({upTotal:Er(i),dlTotal:Er(o),connNumber:a.length,mUsage:Er(s)})},[n]);return hS(()=>vM(e,r),[e,r]),t}function OM(){const{t:e}=No();return le("div",{children:[R(Gw,{title:e("Overview")}),le("div",{className:Gm.root,children:[R("div",{children:R(bM,{})}),R("div",{className:Gm.chart,children:le(L.Suspense,{fallback:R(aS,{height:"200px"}),children:[R(dM,{}),R(oM,{})]})})]})]})}const xM="_lo_pmly2_1",kM={lo:xM};function PM(){return R("div",{className:kM.lo,children:R(Lh,{width:280,height:280,animate:!0,c0:"transparent",c1:"#646464"})})}const TM=e=>({apiConfig:sr(e),apiConfigs:Sh(e)});function LM({apiConfig:e,apiConfigs:t}){return L.useEffect(()=>{let n="yacd";if(t.length>1)try{n=`${new URL(e.baseURL).host} - yacd`}catch{}document.title=n}),R(Cr,{})}const NM=Jt(TM)(LM);var pS={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ng=V.createContext&&V.createContext(pS),Jn=globalThis&&globalThis.__assign||function(){return Jn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n({apiConfig:sr(e)}),tD=Jt(eD)(nD);function nD(e){const{t}=No(),n=wa();return Y0(["/version",e.apiConfig],()=>Qw("/version",e.apiConfig)),le("div",{className:Dn.root,children:[R("div",{className:Dn.logo_hiddify}),R("center",{children:"WebUI V0 Alpha"}),R("div",{className:Dn.rows,children:ZM.map(({to:r,iconId:o,labelText:i})=>R(JM,{to:r,isActive:n.pathname===r,iconId:o,labelText:t(i)},r))}),le("div",{className:Dn.footer,children:[R(iS,{}),R(Ah,{label:t("about"),children:R(l1,{to:"/about",className:Dn.iconWrapper,children:R(WA,{size:20})})})]})]})}const rD="_input_12jxq_1",O$={input:rD};function Hf(){return Hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=l)&&this.A(n),this.W&&this.setState({N:!1,j:!1}),this.l=Date.now()},t.prototype.p=function(n){n.preventDefault(),typeof n.button=="number"&&n.button!==0||(this.I(n.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.g))},t.prototype.v=function(n){n.preventDefault(),this.L(n.clientX)},t.prototype.g=function(n){this.U(n),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.g)},t.prototype.k=function(n){this.X=null,this.I(n.touches[0].clientX)},t.prototype.m=function(n){this.L(n.touches[0].clientX)},t.prototype.M=function(n){n.preventDefault(),this.U(n)},t.prototype.$=function(n){Date.now()-this.l>50&&(this.A(n),Date.now()-this.u>50&&this.W&&this.setState({j:!1}))},t.prototype.C=function(){this.u=Date.now()},t.prototype.D=function(){this.setState({j:!0})},t.prototype.O=function(){this.setState({j:!1})},t.prototype.S=function(n){this.H=n},t.prototype.T=function(n){n.preventDefault(),this.H.focus(),this.A(n),this.W&&this.setState({j:!1})},t.prototype.A=function(n){var r=this.props;(0,r.onChange)(!r.checked,n,r.id)},t.prototype.render=function(){var n=this.props,r=n.checked,o=n.disabled,i=n.className,a=n.offColor,s=n.onColor,l=n.offHandleColor,u=n.onHandleColor,c=n.checkedIcon,f=n.uncheckedIcon,d=n.checkedHandleIcon,p=n.uncheckedHandleIcon,v=n.boxShadow,y=n.activeBoxShadow,_=n.height,m=n.width,h=n.borderRadius,g=function(P,M){var C={};for(var O in P)Object.prototype.hasOwnProperty.call(P,O)&&M.indexOf(O)===-1&&(C[O]=P[O]);return C}(n,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),S=this.state,k=S.h,T=S.N,N=S.j,I={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:_/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},G={height:_,width:m,margin:Math.max(0,(this.t-_)/2),position:"relative",background:og(k,this.i,this.o,a,s),borderRadius:typeof h=="number"?h:_/2,cursor:o?"default":"pointer",WebkitTransition:T?null:"background 0.25s",MozTransition:T?null:"background 0.25s",transition:T?null:"background 0.25s"},$={height:_,width:Math.min(1.5*_,m-(this.t+_)/2+1),position:"relative",opacity:(k-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},X={height:_,width:Math.min(1.5*_,m-(this.t+_)/2+1),position:"absolute",opacity:1-(k-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},ce={height:this.t,width:this.t,background:og(k,this.i,this.o,l,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:typeof h=="number"?h-1:"50%",position:"absolute",transform:"translateX("+k+"px)",top:Math.max(0,(_-this.t)/2),outline:0,boxShadow:N?y:v,border:0,WebkitTransition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},re={height:this.t,width:this.t,opacity:Math.max(2*(1-(k-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},w={height:this.t,width:this.t,opacity:Math.max(2*((k-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"};return V.createElement("div",{className:i,style:I},V.createElement("div",{className:"react-switch-bg",style:G,onClick:o?null:this.T,onMouseDown:function(P){return P.preventDefault()}},c&&V.createElement("div",{style:$},c),f&&V.createElement("div",{style:X},f)),V.createElement("div",{className:"react-switch-handle",style:ce,onClick:function(P){return P.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.k,onTouchMove:o?null:this.m,onTouchEnd:o?null:this.M,onTouchCancel:o?null:this.O},p&&V.createElement("div",{style:re},p),d&&V.createElement("div",{style:w},d)),V.createElement("input",Hf({},{type:"checkbox",role:"switch","aria-checked":r,checked:r,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},g,{ref:this.S,onFocus:this.D,onBlur:this.O,onKeyUp:this.C,onChange:this.$})))},t}(L.Component);Os.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:oD,checkedIcon:iD,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56};const aD=Os.default?Os.default:Os;function sD({checked:e=!1,onChange:t,theme:n,name:r}){return R(aD,{onChange:t,checked:e,uncheckedIcon:!1,checkedIcon:!1,offColor:n==="dark"?"#393939":"#e9e9e9",onColor:n==="dark"?"#306081":"#005caf",offHandleColor:"#fff",onHandleColor:"#fff",handleDiameter:24,height:28,width:44,className:"rs",name:r})}const x$=Jt(e=>({theme:_h(e)}))(sD),lD="_ToggleSwitch_10mtp_1",uD="_slider_10mtp_28",ig={ToggleSwitch:lD,slider:uD};function cD({options:e,value:t,name:n,onChange:r}){const o=L.useMemo(()=>e.map(s=>s.value).indexOf(t),[e,t]),i=L.useCallback(s=>{const l=Math.floor(100/e.length);if(s===e.length-1)return 100-e.length*l+l;if(s>-1)return l},[e]),a=L.useMemo(()=>({width:i(o)+"%",left:o*i(0)+"%"}),[o,i]);return le("div",{className:ig.ToggleSwitch,children:[R("div",{className:ig.slider,style:a}),e.map((s,l)=>{const u=`${n}-${s.label}`;return le("label",{htmlFor:u,className:l===0?"":"border-left",style:{width:i(l)+"%"},children:[R("input",{id:u,name:n,type:"radio",value:s.value,checked:t===s.value,onChange:r}),R("div",{children:s.label})]},u)})]})}V.memo(cD);const fD=new Q0,dD=new mR({queryCache:fD,defaultOptions:{queries:{suspense:!0}}});var bl="NOT_FOUND";function hD(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:bl},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function pD(e,t){var n=[];function r(s){var l=n.findIndex(function(c){return t(s,c.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return bl}function o(s,l){r(s)===bl&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var vD=function(t,n){return t===n};function mD(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,i=0;i1?t-1:0),r=1;re.logs.logs,gS=e=>e.logs.tail,_D=e=>e.logs.searchText,k$=SD(mS,gS,_D,(e,t,n)=>{const r=[];for(let o=t;o>=0;o--)r.push(e[o]);if(e.length===qf)for(let o=qf-1;o>t;o--)r.push(e[o]);return n===""?r:r.filter(o=>o.payload.toLowerCase().indexOf(n)>=0)});function P$(e){return t=>{t("logsUpdateSearchText",n=>{n.logs.searchText=e.toLowerCase()})}}function T$(e){return(t,n)=>{const r=n(),o=mS(r),i=gS(r),a=i>=qf-1?0:i+1;o[a]=e,t("logsAppendLog",s=>{s.logs.tail=a})}}const bD={searchText:"",logs:[],tail:-1},Dh="/proxies";async function ED(e){const{url:t,init:n}=Me(e);return await(await fetch(t+Dh,n)).json()}async function CD(e,t,n){const r={name:n},{url:o,init:i}=Me(e),a=`${o}${Dh}/${t}`;return await fetch(a,{...i,method:"PUT",body:JSON.stringify(r)})}async function RD(e,t,n="https://www.gstatic.com/generate_204"){const{url:r,init:o}=Me(e),i=`timeout=5000&url=${encodeURIComponent(n)}`,a=`${r}${Dh}/${encodeURIComponent(t)}/delay?${i}`;return await fetch(a,o)}async function L$(e,t,n="http://www.gstatic.com/generate_202"){const{url:r,init:o}=Me(e),i=`url=${encodeURIComponent(n)}&timeout=2000`,a=`${r}/group/${encodeURIComponent(t)}/delay?${i}`;return await fetch(a,o)}async function OD(e){const{url:t,init:n}=Me(e),r=await fetch(t+"/providers/proxies",n);return r.status===404?{providers:{}}:await r.json()}async function yS(e,t){const{url:n,init:r}=Me(e),o={...r,method:"PUT"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t),o)}async function xD(e,t){const{url:n,init:r}=Me(e),o={...r,method:"GET"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t)+"/healthcheck",o)}const kD={proxies:{},delay:{},groupNames:[],showModalClosePrevConns:!1},wS=()=>null,PD=["Direct","Fallback","Reject","Pass","Selector","URLTest","LoadBalance","Unknown"],TD=e=>e.proxies.proxies,SS=e=>e.proxies.delay,N$=e=>e.proxies.groupNames,LD=e=>e.proxies.proxyProviders||[],_S=e=>e.proxies.dangleProxyNames,A$=e=>e.proxies.showModalClosePrevConns;function Bo(e){return async(t,n)=>{const[r,o]=await Promise.all([ED(e),OD(e)]),{providers:i,proxies:a}=FD(o.providers),s={...a,...r.proxies},[l,u]=UD(s),f={...SS(n())};for(let p=0;p{p.proxies.proxies=s,p.proxies.groupNames=l,p.proxies.delay=f,p.proxies.proxyProviders=i,p.proxies.dangleProxyNames=d})}}function I$(e,t){return async n=>{try{await yS(e,t)}catch{}n(Bo(e))}}function M$(e,t){return async n=>{for(let r=0;r{await bS(e,t),await n(Bo(e))}}async function ND(e,t,n){const r=await mM(e);r.ok||console.log("unable to fetch all connections",r.statusText);const i=(await r.json()).connections,a=[];for(const s of i)s.chains.indexOf(t)>-1&&s.chains.indexOf(n)<0&&a.push(s.id);await Promise.all(a.map(s=>gM(e,s).catch(wS)))}function AD(e,t,n){const r=[n,t];let o,i=n;for(;(o=e[i])&&o.now;)r.unshift(o.now),i=o.now;return r}async function ID(e,t,n,r,o){try{if((await CD(n,r,o)).ok===!1)throw new Error("failed to switch proxy: res.statusText")}catch(a){throw console.log(a,"failed to swith proxy"),a}if(e(Bo(n)),a3(t())){const a=TD(t());CS(n,a,{groupName:r,itemName:o})}}function ES(){return e=>{e("closeModalClosePrevConns",t=>{t.proxies.showModalClosePrevConns=!1})}}function CS(e,t,n){const r=AD(t,n.groupName,n.itemName);ND(e,n.groupName,r[0])}function MD(e){return async(t,n)=>{var a;const r=n(),o=(a=r.proxies.switchProxyCtx)==null?void 0:a.to;if(!o){t(ES());return}const i=r.proxies.proxies;CS(e,i,o),t("closePrevConnsAndTheModal",s=>{s.proxies.showModalClosePrevConns=!1,s.proxies.switchProxyCtx=void 0})}}function $$(e,t,n){return async(r,o)=>{ID(r,o,e,t,n).catch(wS),r("store/proxies#switchProxy",i=>{const a=i.proxies.proxies;a[t]&&a[t].now&&(a[t].now=n)})}}function DD(e,t){return async(n,r)=>{const o=i3(r()),i=await RD(e,t,o);let a="";i.ok===!1&&(a=i.statusText);const{delay:s}=await i.json(),u={...SS(r()),[t]:{error:a,number:s}};n("requestDelayForProxyOnce",c=>{c.proxies.delay=u})}}function RS(e,t){return async n=>{await n(DD(e,t))}}function $D(e,t){return async(n,r)=>{const o=_S(r()),i=t.filter(a=>o.indexOf(a)>-1).map(a=>n(RS(e,a)));await Promise.all(i),await n(Bo(e))}}function U$(e){return async(t,n)=>{const r=_S(n());await Promise.all(r.map(i=>t(RS(e,i))));const o=LD(n());for(const i of o)await bS(e,i.name);await t(Bo(e))}}function UD(e){let t=[],n;const r=[];for(const o in e){const i=e[o];i.all&&Array.isArray(i.all)?(t.push(o),o==="GLOBAL"&&(n=Array.from(i.all))):PD.indexOf(i.type)<0&&r.push(o)}return n&&(n.push("GLOBAL"),t=t.map(o=>[n.indexOf(o),o]).sort((o,i)=>o[0]-i[0]).map(o=>o[1])),[t,r]}function FD(e){const t=Object.keys(e),n=[],r={};for(let o=0;oOt(()=>import("./Connections-ac8a4ae7.js"),["./Connections-ac8a4ae7.js","./Select-0e7ed95b.js","./Select-07e025ab.css","./useRemainingViewPortHeight-1c35aab5.js","./BaseModal-ab8cd8e0.js","./BaseModal-e9f180d4.css","./index-84fa0cb3.js","./Input-4a412620.js","./objectWithoutPropertiesLoose-4f48578a.js","./Fab-12e96042.js","./Fab-48def6bf.css","./play-c7b83a10.js","./Connections-2b49f1fb.css"],import.meta.url)),qD=xa(()=>Ot(()=>import("./Config-d98df917.js"),["./Config-d98df917.js","./logs-3f8dcdee.js","./Select-0e7ed95b.js","./Select-07e025ab.css","./Input-4a412620.js","./rotate-cw-6c7b4819.js","./Config-7eb3f1bb.css"],import.meta.url)),KD=xa(()=>Ot(()=>import("./Logs-9ddf6a86.js"),["./Logs-9ddf6a86.js","./logs-3f8dcdee.js","./debounce-c1ba2006.js","./useRemainingViewPortHeight-1c35aab5.js","./Fab-12e96042.js","./Fab-48def6bf.css","./play-c7b83a10.js","./Logs-4c263fad.css"],import.meta.url)),QD=xa(()=>Ot(()=>import("./Proxies-b1261fd3.js"),["./Proxies-b1261fd3.js","./BaseModal-ab8cd8e0.js","./BaseModal-e9f180d4.css","./Fab-12e96042.js","./Fab-48def6bf.css","./TextFitler-ae90d90b.js","./rotate-cw-6c7b4819.js","./debounce-c1ba2006.js","./TextFitler-a112af1a.css","./index-84fa0cb3.js","./Select-0e7ed95b.js","./Select-07e025ab.css","./Proxies-06b60f95.css"],import.meta.url)),GD=xa(()=>Ot(()=>import("./Rules-ce05c965.js"),["./Rules-ce05c965.js","./objectWithoutPropertiesLoose-4f48578a.js","./TextFitler-ae90d90b.js","./rotate-cw-6c7b4819.js","./debounce-c1ba2006.js","./TextFitler-a112af1a.css","./index-84fa0cb3.js","./Fab-12e96042.js","./Fab-48def6bf.css","./useRemainingViewPortHeight-1c35aab5.js","./Rules-162ef666.css"],import.meta.url)),XD=[{path:"/overview",element:R(OM,{})},{path:"/connections",element:R(HD,{})},{path:"/configs",element:R(qD,{})},{path:"/logs",element:R(KD,{})},{path:"/",element:R(QD,{})},{path:"/rules",element:R(GD,{})},{path:"/about",element:R($4,{})},!1].filter(Boolean);function YD(){return le(Cr,{children:[R(kI,{}),R(tD,{}),R("div",{className:OS.content,children:R(xS,{fallback:R(PM,{}),children:s1(XD)})})]})}const JD=()=>R(MI,{children:R(gA,{children:R(H3,{initialState:BD,actions:zD,children:R(bR,{client:dD,children:le("div",{className:OS.app,children:[R(NM,{}),R(xS,{fallback:R(aS,{}),children:R(xO,{children:le(bO,{children:[R(vf,{path:"/backend",element:R(Kw,{})}),R(vf,{path:"*",element:R(YD,{})})]})})})]})})})})}),ZD=Boolean(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function e$(e){if("serviceWorker"in navigator){if(new URL("./",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=".//sw.js";ZD?(t$(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker")})):kS(n,e)})}}function kS(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function t$(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(o=>{o.unregister().then(()=>{window.location.reload()})}):kS(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const PS=document.getElementById("app"),n$=N0(PS);B0.setAppElement(PS);n$.render(R(JD,{}));e$();console.log("Checkout the repo: https://github.com/MetaCubeX/yacd");console.log("Version:","0.3.7");window.onload=function(){const t=document.getElementById("app");t.addEventListener("touchstart",r$,{passive:!0}),t.addEventListener("touchmove",o$,!1),t.addEventListener("touchend",i$,!1)};const on={touching:!1,trace:[]};function r$(e){if(e.touches.length!==1){on.touching=!1,on.trace=[];return}on.touching=!0,on.trace=[{x:e.touches[0].screenX,y:e.touches[0].screenY}]}function o$(e){on.touching&&on.trace.push({x:e.touches[0].screenX,y:e.touches[0].screenY})}function i$(){if(!on.touching)return;const e=on.trace;on.touching=!1,on.trace=[],a$(e)}function a$(e){const t=["/","/proxies","/rules","/connections","/configs","/logs"],n=e[0],r=e[e.length-1],o=window.location.hash.slice(1),i=t.indexOf(o);console.log(i,o,t.length),i!==3&&(r.x-n.x>200&&i>0?window.location.hash=t[i-1]:r.x-n.x<-200&&i